Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} = this.props;
const { dayPickerContainerStyles, isDayPickerFocused, showKeyboardShortcuts } = this.state;
const onOutsideClick = (!withFullScreenPortal && withPortal) ? this.onOutsideClick : undefined;
const closeIcon = customCloseIcon || ();
const inputHeight = getInputHeight(reactDates, small);
const withAnyPortal = withPortal || withFullScreenPortal;
/* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable jsx-a11y/click-events-have-key-events */
return (
showKeyboardShortcuts={showKeyboardShortcuts}
onBlur={this.onDayPickerBlur}
phrases={phrases}
dayAriaLabelFormat={dayAriaLabelFormat}
isRTL={isRTL}
firstDayOfWeek={firstDayOfWeek}
weekDayFormat={weekDayFormat}
verticalHeight={verticalHeight}
transitionDuration={transitionDuration}
disabled={disabled}
horizontalMonthPadding={horizontalMonthPadding}
/>
{withFullScreenPortal && (
<button aria-label="{phrases.closeDatePicker}" type="button">
{closeIcon}
</button>
)}
);
/* eslint-enable jsx-a11y/no-static-element-interactions */
/* eslint-enable jsx-a11y/click-events-have-key-events */
}
);
const closeIcon = customCloseIcon || (
);
const inputHeight = getInputHeight(reactDates, small);
const withAnyPortal = withPortal || withFullScreenPortal;
/* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable jsx-a11y/click-events-have-key-events */
return (
function KeyboardShortcutRow({
unicode,
label,
action,
block,
styles,
}) {
return (
<li>
<div>
<span action="" aria-label="{`${label},`}" role="img">
{unicode}</span></div></li>
type="button"
aria-label={toggleButtonText}
onClick={this.onShowKeyboardShortcutsButtonClick}
onKeyDown={(e) => {
if (e.key === 'Enter') {
e.preventDefault();
} else if (e.key === 'Space') {
this.onShowKeyboardShortcutsButtonClick(e);
}
}}
onMouseUp={(e) => {
e.currentTarget.blur();
}}
>
<span>
?
</span>
{showKeyboardShortcutsPanel &&
const inputEl = Input && (
<input>
);
return (
<div>
{enableOutsideClick && (
{inputEl}
{this.maybeRenderDayPickerWithPortal()}
)}
{!enableOutsideClick && inputEl}
{!enableOutsideClick && this.maybeRenderDayPickerWithPortal()}
</div>
);
}
}
regular,
verticalSpacing,
styles,
} = this.props;
const { isInputFocused } = this.state;
const displayValue = this.getDateString(date);
const onOutsideClick = (!withPortal && !withFullScreenPortal) ? this.onClearFocus : undefined;
const hideFang = verticalSpacing < FANG_HEIGHT_PX;
return (
<div>
</div>
)}
{withFullScreenPortal && (
<button type="button" aria-label="{(phrases">
<div>
{closeIcon}
</div>
</button>
)}
);
}
ref={this.setHideKeyboardShortcutsButtonRef}
{...css(
styles.DayPickerKeyboardShortcuts_buttonReset,
styles.DayPickerKeyboardShortcuts_close,
)}
type="button"
tabIndex="0"
aria-label={phrases.hideKeyboardShortcutsPanel}
onClick={closeKeyboardShortcutsPanel}
onKeyDown={this.onKeyDown}
>
<ul id="DayPickerKeyboardShortcuts_description">
{this.keyboardShortcuts.map(({ unicode, label, action }) => (
))}
</ul>
}
);
{renderWeekHeaderElement ? renderWeekHeaderElement(day) : <small>{day}</small>}
));
return (
<div>
<ul>
{header}
</ul>
</div>
);
}