diff --git a/docs/calendar_container.md b/docs/calendar_container.md index e1bb60121..b6013064f 100644 --- a/docs/calendar_container.md +++ b/docs/calendar_container.md @@ -1,8 +1,7 @@ # `calendar_container` (component) -| name | type | default value | description | -| -------------------- | -------- | ------------- | ----------- | -| `children` | `node` | | | -| `className` | `string` | | | -| `showTime` | `bool` | `false` | | -| `showTimeSelectOnly` | `bool` | `false` | | +| name | type | default value | description | +| -------------------- | ---- | ------------- | ----------- | +| `className` | | | | +| `showTime` | | `false` | | +| `showTimeSelectOnly` | | `false` | | diff --git a/docs/calendar_icon.md b/docs/calendar_icon.md index cb57659de..f01046d72 100644 --- a/docs/calendar_icon.md +++ b/docs/calendar_icon.md @@ -1,7 +1,25 @@ # `calendar_icon` (component) -| name | type | default value | description | -| ----------- | --------------------- | ------------- | ----------- | -| `className` | `string` | `""` | | -| `icon` | `union(string\|node)` | | | -| `onClick` | `func` | | | +`CalendarIcon` is a React component that renders an icon for a calendar. +The icon can be a string representing a CSS class, a React node, or a default SVG icon. + +@component +@prop icon - The icon to be displayed. This can be a string representing a CSS class or a React node. +@prop className - An optional string representing additional CSS classes to be applied to the icon. +@prop onClick - An optional function to be called when the icon is clicked. + +@example +// To use a CSS class as the icon + + +@example +// To use a React node as the icon +} onClick={myClickHandler} /> + +@returns The `CalendarIcon` component. + +| name | type | default value | description | +| ----------- | ---- | ------------- | ----------- | +| `className` | | `""` | | +| `icon` | | | | +| `onClick` | | | | diff --git a/docs/index.md b/docs/index.md index 317027568..f2fd19c85 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,166 +1,93 @@ # `index` (component) -| name | type | default value | description | -| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----------- | -| `adjustDateOnChange` | `bool` | | | -| `allowSameDay` | `bool` | `false` | | -| `ariaDescribedBy` | `string` | | | -| `ariaInvalid` | `string` | | | -| `ariaLabelClose` | `string` | | | -| `ariaLabelledBy` | `string` | | | -| `ariaRequired` | `string` | | | -| `autoComplete` | `string` | | | -| `autoFocus` | `bool` | | | -| `calendarClassName` | `string` | | | -| `calendarContainer` | `func` | | | -| `calendarIconClassname` | `string` | | | -| `calendarIconClassName` | `string` | | | -| `calendarStartDay` | `number` | `undefined` | | -| `children` | `node` | | | -| `chooseDayAriaLabelPrefix` | `string` | | | -| `className` | `string` | | | -| `clearButtonClassName` | `string` | | | -| `clearButtonTitle` | `string` | | | -| `closeOnScroll` | `union(bool\|func)` | | | -| `customInput` | `element` | | | -| `customInputRef` | `string` | | | -| `customTimeInput` | `element` | `null` | | -| `dateFormat` | `union(string\|array)` | `"MM/dd/yyyy"` | | -| `dateFormatCalendar` | `string` | `"LLLL yyyy"` | | -| `dayClassName` | `func` | | | -| `disabled` | `bool` | `false` | | -| `disabledDayAriaLabelPrefix` | `string` | | | -| `disabledKeyboardNavigation` | `bool` | `false` | | -| `dropdownMode` | `enum("scroll"\|"select")` | `"scroll"` | | -| `enableTabLoop` | `bool` | `true` | | -| `endDate` | `instanceOfDate` | | | -| `excludeDateIntervals` | `arrayOf[object Object]` | | | -| `excludeDates` | `arrayOf[object Object]` | | | -| `excludeScrollbar` | `bool` | `true` | | -| `excludeTimes` | `array` | | | -| `filterDate` | `func` | | | -| `filterTime` | `func` | | | -| `fixedHeight` | `bool` | | | -| `focusSelectedMonth` | `bool` | `false` | | -| `forceShowMonthNavigation` | `bool` | | | -| `form` | `string` | | | -| `formatWeekDay` | `func` | | | -| `formatWeekNumber` | `func` | | | -| `highlightDates` | `array` | | | -| `holidays` | `array` | | | -| `icon` | `union(string\|node)` | | | -| `id` | `string` | | | -| `includeDateIntervals` | `array` | | | -| `includeDates` | `array` | | | -| `includeTimes` | `array` | | | -| `injectTimes` | `array` | | | -| `inline` | `bool` | | | -| `isClearable` | `bool` | | | -| `locale` | `union(string\|shape)` | | | -| `maxDate` | `instanceOfDate` | | | -| `maxTime` | `instanceOfDate` | | | -| `minDate` | `instanceOfDate` | | | -| `minTime` | `instanceOfDate` | | | -| `monthAriaLabelPrefix` | `string` | | | -| `monthClassName` | `func` | | | -| `monthsShown` | `number` | `1` | | -| `name` | `string` | | | -| `nextMonthAriaLabel` | `string` | `"Next Month"` | | -| `nextMonthButtonLabel` | `union(string\|node)` | `"Next Month"` | | -| `nextYearAriaLabel` | `string` | `"Next Year"` | | -| `nextYearButtonLabel` | `string` | `"Next Year"` | | -| `onBlur` | `func` | | | -| `onCalendarClose` | `func` | | | -| `onCalendarOpen` | `func` | | | -| `onChange` (required) | `func` | | | -| `onChangeRaw` | `func` | | | -| `onClickOutside` | `func` | | | -| `onDayMouseEnter` | `func` | | | -| `onFocus` | `func` | | | -| `onInputClick` | `func` | | | -| `onInputError` | `func` | | | -| `onKeyDown` | `func` | | | -| `onMonthChange` | `func` | | | -| `onMonthMouseLeave` | `func` | | | -| `onSelect` | `func` | | | -| `onWeekSelect` | `func` | | | -| `onYearChange` | `func` | | | -| `onYearMouseEnter` | `func` | | | -| `onYearMouseLeave` | `func` | | | -| `open` | `bool` | | | -| `openToDate` | `instanceOfDate` | | | -| `peekNextMonth` | `bool` | | | -| `placeholderText` | `string` | | | -| `popperClassName` | `string` | | | -| `popperContainer` | `func` | | | -| `popperModifiers` | `arrayOf[object Object]` | | | -| `popperPlacement` | `enum("top-start"\|"top-end"\|"bottom-start"\|"bottom-end"\|"right-start"\|"right-end"\|"left-start"\|"left-end"\|"top"\|"right"\|"bottom"\|"left")` | | | -| `popperProps` | `object` | | | -| `portalHost` | `instanceOfShadowRoot` | | | -| `portalId` | `string` | | | -| `preventOpenOnFocus` | `bool` | `false` | | -| `previousMonthAriaLabel` | `string` | `"Previous Month"` | | -| `previousMonthButtonLabel` | `union(string\|node)` | `"Previous Month"` | | -| `previousYearAriaLabel` | `string` | `"Previous Year"` | | -| `previousYearButtonLabel` | `string` | `"Previous Year"` | | -| `readOnly` | `bool` | `false` | | -| `renderCustomHeader` | `func` | | | -| `renderDayContents` | `func` | | | -| `renderMonthContent` | `func` | | | -| `renderQuarterContent` | `func` | | | -| `renderYearContent` | `func` | | | -| `required` | `bool` | | | -| `scrollableMonthYearDropdown` | `bool` | | | -| `scrollableYearDropdown` | `bool` | | | -| `selected` | `instanceOfDate` | | | -| `selectedDates` | `arrayOf[object Object]` | | | -| `selectsDisabledDaysInRange` | `bool` | `false` | | -| `selectsEnd` | `bool` | | | -| `selectsMultiple` | `bool` | | | -| `selectsRange` | `bool` | | | -| `selectsStart` | `bool` | | | -| `shouldCloseOnSelect` | `bool` | `true` | | -| `showDateSelect` | `bool` | | | -| `showDisabledMonthNavigation` | `bool` | | | -| `showFourColumnMonthYearPicker` | `bool` | `false` | | -| `showFullMonthYearPicker` | `bool` | `false` | | -| `showIcon` | `bool` | | | -| `showMonthDropdown` | `bool` | | | -| `showMonthYearDropdown` | `bool` | | | -| `showMonthYearPicker` | `bool` | `false` | | -| `showPopperArrow` | `bool` | `true` | | -| `showPreviousMonths` | `bool` | `false` | | -| `showQuarterYearPicker` | `bool` | `false` | | -| `showTimeInput` | `bool` | `false` | | -| `showTimeSelect` | `bool` | `false` | | -| `showTimeSelectOnly` | `bool` | | | -| `showTwoColumnMonthYearPicker` | `bool` | `false` | | -| `showWeekNumbers` | `bool` | | | -| `showWeekPicker` | `bool` | `false` | | -| `showYearDropdown` | `bool` | | | -| `showYearPicker` | `bool` | `false` | | -| `startDate` | `instanceOfDate` | | | -| `startOpen` | `bool` | | | -| `strictParsing` | `bool` | `false` | | -| `swapRange` | `bool` | `false` | | -| `tabIndex` | `number` | | | -| `timeCaption` | `string` | `"Time"` | | -| `timeClassName` | `func` | | | -| `timeFormat` | `string` | | | -| `timeInputLabel` | `string` | `"Time"` | | -| `timeIntervals` | `number` | `30` | | -| `title` | `string` | | | -| `todayButton` | `node` | | | -| `toggleCalendarOnIconClick` | `union(func\|bool)` | `false` | | -| `usePointerEvent` | `bool` | `false` | | -| `useShortMonthInDropdown` | `bool` | | | -| `useWeekdaysShort` | `bool` | | | -| `value` | `string` | | | -| `weekAriaLabelPrefix` | `string` | | | -| `weekDayClassName` | `func` | | | -| `weekLabel` | `string` | | | -| `withPortal` | `bool` | `false` | | -| `wrapperClassName` | `string` | | | -| `yearClassName` | `func` | | | -| `yearDropdownItemNumber` | `number` | | | -| `yearItemNumber` | `number` | `12` | | +| name | type | default value | description | +| ------------------------------- | ---- | ------------------ | ----------- | +| `allowSameDay` | | `false` | | +| `ariaDescribedBy` | | | | +| `ariaInvalid` | | | | +| `ariaLabelClose` | | | | +| `ariaLabelledBy` | | | | +| `ariaRequired` | | | | +| `autoComplete` | | | | +| `autoFocus` | | | | +| `calendarClassName` | | | | +| `calendarContainer` | | | | +| `calendarIconClassName` | | | | +| `calendarIconClassname` | | | | +| `calendarStartDay` | | `undefined` | | +| `className` | | | | +| `clearButtonClassName` | | | | +| `clearButtonTitle` | | | | +| `closeOnScroll` | | | | +| `customInput` | | | | +| `customInputRef` | | | | +| `customTimeInput` | | `null` | | +| `dateFormat` | | `"MM/dd/yyyy"` | | +| `dateFormatCalendar` | | `"LLLL yyyy"` | | +| `disabled` | | `false` | | +| `disabledKeyboardNavigation` | | `false` | | +| `dropdownMode` | | `"scroll"` | | +| `enableTabLoop` | | `true` | | +| `excludeScrollbar` | | `true` | | +| `focusSelectedMonth` | | `false` | | +| `form` | | | | +| `highlightDates` | | | | +| `holidays` | | | | +| `id` | | | | +| `isClearable` | | | | +| `monthsShown` | | `1` | | +| `name` | | | | +| `nextMonthAriaLabel` | | `"Next Month"` | | +| `nextMonthButtonLabel` | | `"Next Month"` | | +| `nextYearAriaLabel` | | `"Next Year"` | | +| `nextYearButtonLabel` | | `"Next Year"` | | +| `onBlur` | | | | +| `onCalendarClose` | | | | +| `onCalendarOpen` | | | | +| `onChangeRaw` | | | | +| `onClickOutside` | | | | +| `onFocus` | | | | +| `onInputClick` | | | | +| `onInputError` | | | | +| `onKeyDown` | | | | +| `onSelect` (required) | | | | +| `open` | | | | +| `placeholderText` | | | | +| `popperClassName` | | | | +| `preventOpenOnFocus` | | `false` | | +| `previousMonthAriaLabel` | | `"Previous Month"` | | +| `previousMonthButtonLabel` | | `"Previous Month"` | | +| `previousYearAriaLabel` | | `"Previous Year"` | | +| `previousYearButtonLabel` | | `"Previous Year"` | | +| `readOnly` | | `false` | | +| `required` | | | | +| `selected` | | | | +| `selectsDisabledDaysInRange` | | `false` | | +| `shouldCloseOnSelect` | | `true` | | +| `showDateSelect` | | | | +| `showFourColumnMonthYearPicker` | | `false` | | +| `showFullMonthYearPicker` | | `false` | | +| `showIcon` | | | | +| `showMonthYearPicker` | | `false` | | +| `showPopperArrow` | | `true` | | +| `showPreviousMonths` | | `false` | | +| `showQuarterYearPicker` | | `false` | | +| `showTimeInput` | | `false` | | +| `showTimeSelect` | | `false` | | +| `showTwoColumnMonthYearPicker` | | `false` | | +| `showWeekPicker` | | `false` | | +| `showYearPicker` | | `false` | | +| `startDate` | | | | +| `startOpen` | | | | +| `strictParsing` | | `false` | | +| `swapRange` | | `false` | | +| `tabIndex` | | | | +| `timeCaption` | | `"Time"` | | +| `timeInputLabel` | | `"Time"` | | +| `timeIntervals` | | `30` | | +| `title` | | | | +| `toggleCalendarOnIconClick` | | `false` | | +| `usePointerEvent` | | `false` | | +| `value` | | | | +| `withPortal` | | `false` | | +| `yearItemNumber` | | `12` | | diff --git a/docs/input_time.md b/docs/input_time.md new file mode 100644 index 000000000..c30685905 --- /dev/null +++ b/docs/input_time.md @@ -0,0 +1,24 @@ +# `input_time` (component) + +`InputTime` is a React component that manages time input. + +@component +@example + + +@param props - The properties that define the `InputTime` component. +@param props.onChange - Function that is called when the date changes. +@param props.date - The initial date value. +@param props.timeString - The initial time string value. +@param props.timeInputLabel - The label for the time input. +@param props.customTimeInput - An optional custom time input element. + +@returns The `InputTime` component. + +| name | type | default value | description | +| ----------------- | ---- | ------------- | ----------- | +| `customTimeInput` | | | | +| `date` | | | | +| `onChange` | | | | +| `timeInputLabel` | | | | +| `timeString` | | | | diff --git a/docs/month_dropdown.md b/docs/month_dropdown.md index cecd525c8..949116c24 100644 --- a/docs/month_dropdown.md +++ b/docs/month_dropdown.md @@ -1,11 +1,8 @@ -`month_dropdown` (component) -============================ +# `month_dropdown` (component) - -| name | type | default value | description | -|---|---|---|---| -|`dropdownMode` (required)|`enum("scroll"\|"select")`||| -|`locale`|`string`||| -|`month` (required)|`number`||| -|`onChange` (required)|`func`||| -|`useShortMonthInDropdown`|`bool`||| \ No newline at end of file +| name | type | default value | description | +| ------------------------- | ---- | ------------- | ----------- | +| `dropdownMode` (required) | | | | +| `locale` | | | | +| `onChange` (required) | | | | +| `useShortMonthInDropdown` | | | | diff --git a/docs/month_dropdown_options.md b/docs/month_dropdown_options.md index b4822e419..29437b4ce 100644 --- a/docs/month_dropdown_options.md +++ b/docs/month_dropdown_options.md @@ -1,10 +1,8 @@ -`month_dropdown_options` (component) -==================================== +# `month_dropdown_options` (component) - -| name | type | default value | description | -|---|---|---|---| -|`month` (required)|`number`||| -|`monthNames` (required)|`arrayOf[object Object]`||| -|`onCancel` (required)|`func`||| -|`onChange` (required)|`func`||| \ No newline at end of file +| name | type | default value | description | +| ----------------------- | ---- | ------------- | ----------- | +| `month` (required) | | | | +| `monthNames` (required) | | | | +| `onCancel` (required) | | | | +| `onChange` (required) | | | | diff --git a/docs/month_year_dropdown.md b/docs/month_year_dropdown.md index c014b916f..b2074e2a7 100644 --- a/docs/month_year_dropdown.md +++ b/docs/month_year_dropdown.md @@ -1,14 +1,7 @@ -`month_year_dropdown` (component) -================================= +# `month_year_dropdown` (component) - -| name | type | default value | description | -|---|---|---|---| -|`date` (required)|`instanceOfDate`||| -|`dateFormat` (required)|`string`||| -|`dropdownMode` (required)|`enum("scroll"\|"select")`||| -|`locale`|`string`||| -|`maxDate` (required)|`instanceOfDate`||| -|`minDate` (required)|`instanceOfDate`||| -|`onChange` (required)|`func`||| -|`scrollableMonthYearDropdown`|`bool`||| \ No newline at end of file +| name | type | default value | description | +| ------------------------- | ---- | ------------- | ----------- | +| `dropdownMode` (required) | | | | +| `locale` | | | | +| `onChange` (required) | | | | diff --git a/docs/month_year_dropdown_options.md b/docs/month_year_dropdown_options.md index b3465976d..a14c32091 100644 --- a/docs/month_year_dropdown_options.md +++ b/docs/month_year_dropdown_options.md @@ -1,14 +1,12 @@ -`month_year_dropdown_options` (component) -========================================= +# `month_year_dropdown_options` (component) - -| name | type | default value | description | -|---|---|---|---| -|`date` (required)|`instanceOfDate`||| -|`dateFormat` (required)|`string`||| -|`locale`|`string`||| -|`maxDate` (required)|`instanceOfDate`||| -|`minDate` (required)|`instanceOfDate`||| -|`onCancel` (required)|`func`||| -|`onChange` (required)|`func`||| -|`scrollableMonthYearDropdown`|`bool`||| \ No newline at end of file +| name | type | default value | description | +| ----------------------------- | ---- | ------------- | ----------- | +| `date` (required) | | | | +| `dateFormat` (required) | | | | +| `locale` | | | | +| `maxDate` (required) | | | | +| `minDate` (required) | | | | +| `onCancel` (required) | | | | +| `onChange` (required) | | | | +| `scrollableMonthYearDropdown` | | | | diff --git a/docs/portal.md b/docs/portal.md index aead89467..b1fd3fd65 100644 --- a/docs/portal.md +++ b/docs/portal.md @@ -1,7 +1,16 @@ # `portal` (component) -| name | type | default value | description | -| ------------ | ---------------------- | ------------- | ----------- | -| `children` | `any` | | | -| `portalHost` | `instanceOfShadowRoot` | | | -| `portalId` | `string` | | | +`Portal` is a React component that allows you to render children into a DOM node +that exists outside the DOM hierarchy of the parent component. + +@class +@param {PortalProps} props - The properties that define the `Portal` component. +@property {React.ReactNode} props.children - The children to be rendered into the `Portal`. +@property {string} props.portalId - The id of the DOM node into which the `Portal` will render. +@property {ShadowRoot} [props.portalHost] - The DOM node to host the `Portal`. + +| name | type | default value | description | +| --------------------- | ---- | ------------- | ----------- | +| `children` (required) | | | | +| `portalHost` | | | | +| `portalId` (required) | | | | diff --git a/docs/tab_loop.md b/docs/tab_loop.md index 22cffd70b..211d301f3 100644 --- a/docs/tab_loop.md +++ b/docs/tab_loop.md @@ -1,8 +1,23 @@ -`tab_loop` (component) -====================== +# `tab_loop` (component) +`TabLoop` is a React component that manages tabbing behavior for its children. -| name | type | default value | description | -|---|---|---|---| -|`children`|`any`||| -|`enableTabLoop`|`bool`|`true`|| \ No newline at end of file +TabLoop prevents the user from tabbing outside of the popper +It creates a tabindex loop so that "Tab" on the last element will focus the first element +and "Shift Tab" on the first element will focus the last element + +@component +@example + + + + +@param props - The properties that define the `TabLoop` component. +@param props.children - The child components. +@param props.enableTabLoop - Whether to enable the tab loop. + +@returns The `TabLoop` component. + +| name | type | default value | description | +| --------------- | ---- | ------------- | ----------- | +| `enableTabLoop` | | `true` | | diff --git a/docs/time.md b/docs/time.md index b2cc52f17..44754efa4 100644 --- a/docs/time.md +++ b/docs/time.md @@ -1,23 +1,17 @@ # `time` (component) -| name | type | default value | description | -| -------------------- | ---------------------- | ------------- | ----------- | -| `excludeTimes` | `array` | | | -| `filterTime` | `func` | | | -| `format` | `string` | | | -| `handleOnKeyDown` | `func` | | | -| `includeTimes` | `array` | | | -| `injectTimes` | `array` | | | -| `intervals` | `number` | `30` | | -| `locale` | `union(string\|shape)` | | | -| `maxTime` | `instanceOfDate` | | | -| `minTime` | `instanceOfDate` | | | -| `monthRef` | `object` | | | -| `onChange` | `func` | | | -| `onTimeChange` | | `() => {}` | | -| `openToDate` | `instanceOfDate` | | | -| `selected` | `instanceOfDate` | | | -| `showTimeSelectOnly` | `bool` | | | -| `timeCaption` | `string` | `"Time"` | | -| `timeClassName` | `func` | | | -| `todayButton` | `node` | `null` | | +| name | type | default value | description | +| -------------------- | ---- | ------------- | ----------- | +| `format` | | | | +| `handleOnKeyDown` | | | | +| `injectTimes` | | | | +| `intervals` | | `30` | | +| `locale` | | | | +| `monthRef` | | | | +| `onChange` | | | | +| `openToDate` | | | | +| `selected` | | | | +| `showTimeSelectOnly` | | | | +| `timeCaption` | | `"Time"` | | +| `timeClassName` | | | | +| `todayButton` | | `null` | | diff --git a/docs/week_number.md b/docs/week_number.md index 2461510db..55ba540cf 100644 --- a/docs/week_number.md +++ b/docs/week_number.md @@ -1,17 +1,18 @@ # `week_number` (component) -| name | type | default value | description | -| ---------------------------- | -------------------- | ------------- | ----------- | -| `ariaLabelPrefix` | `string` | `"week "` | | -| `containerRef` | `union(func\|shape)` | | | -| `date` (required) | `instanceOfDate` | | | -| `disabledKeyboardNavigation` | `bool` | | | -| `handleOnKeyDown` | `func` | | | -| `inline` | `bool` | | | -| `onClick` | `func` | | | -| `preSelection` | `instanceOfDate` | | | -| `selected` | `instanceOfDate` | | | -| `shouldFocusDayInline` | `bool` | | | -| `showWeekNumber` | `bool` | | | -| `showWeekPicker` | `bool` | | | -| `weekNumber` (required) | `number` | | | +| name | type | default value | description | +| ---------------------------- | ---- | ------------- | ----------- | +| `ariaLabelPrefix` | | `"week "` | | +| `containerRef` | | | | +| `date` (required) | | | | +| `disabledKeyboardNavigation` | | | | +| `handleOnKeyDown` | | | | +| `inline` | | | | +| `isInputFocused` | | | | +| `onClick` | | | | +| `preSelection` | | | | +| `selected` | | | | +| `shouldFocusDayInline` | | | | +| `showWeekNumber` | | | | +| `showWeekPicker` | | | | +| `weekNumber` (required) | | | | diff --git a/docs/year.md b/docs/year.md index 392e818c2..9bf269e82 100644 --- a/docs/year.md +++ b/docs/year.md @@ -1,30 +1,44 @@ # `year` (component) -| name | type | default value | description | -| ----------------------------- | ------------------------ | ------------- | ----------- | -| `clearSelectingDate` | `func` | | | -| `date` | `instanceOfDate` | | | -| `disabledKeyboardNavigation` | `bool` | | | -| `endDate` | `instanceOfDate` | | | -| `excludeDates` | `arrayOf[object Object]` | | | -| `filterDate` | `func` | | | -| `handleOnKeyDown` | `func` | | | -| `includeDates` | `array` | | | -| `inline` | `bool` | | | -| `maxDate` | `instanceOfDate` | | | -| `minDate` | `instanceOfDate` | | | -| `onDayClick` | `func` | | | -| `onYearMouseEnter` (required) | `func` | | | -| `onYearMouseLeave` (required) | `func` | | | -| `preSelection` | `instanceOfDate` | | | -| `renderYearContent` | `func` | | | -| `selected` | `object` | | | -| `selectingDate` | `instanceOfDate` | | | -| `selectsEnd` | `bool` | | | -| `selectsRange` | `bool` | | | -| `selectsStart` | `bool` | | | -| `setPreSelection` | `func` | | | -| `startDate` | `instanceOfDate` | | | -| `usePointerEvent` | `bool` | | | -| `yearClassName` | `func` | | | -| `yearItemNumber` | `number` | | | +`Year` is a component that represents a year in a date picker. + +@class +@param {YearProps} props - The properties that define the `Year` component. +@property {VoidFunction} [props.clearSelectingDate] - Function to clear the selected date. +@property {Date} [props.date] - The currently selected date. +@property {boolean} [props.disabledKeyboardNavigation] - If true, keyboard navigation is disabled. +@property {Date} [props.endDate] - The end date in a range selection. +@property {(date: Date) => void} props.onDayClick - Function to handle day click events. +@property {Date} props.preSelection - The date that is currently in focus. +@property {(date: Date) => void} props.setPreSelection - Function to set the pre-selected date. +@property {{ [key: string]: any }} props.selected - The selected date(s). +@property {boolean} props.inline - If true, the date picker is displayed inline. +@property {Date} props.maxDate - The maximum selectable date. +@property {Date} props.minDate - The minimum selectable date. +@property {boolean} props.usePointerEvent - If true, pointer events are used instead of mouse events. +@property {(date: Date) => void} props.onYearMouseEnter - Function to handle mouse enter events on a year. +@property {(date: Date) => void} props.onYearMouseLeave - Function to handle mouse leave events on a year. + +| name | type | default value | description | +| ----------------------------- | ---- | ------------- | ----------- | +| `clearSelectingDate` | | | | +| `date` | | | | +| `disabledKeyboardNavigation` | | | | +| `endDate` | | | | +| `handleOnKeyDown` | | | | +| `inline` | | | | +| `onDayClick` | | | | +| `onYearMouseEnter` (required) | | | | +| `onYearMouseLeave` (required) | | | | +| `preSelection` | | | | +| `renderYearContent` | | | | +| `selected` | | | | +| `selectingDate` | | | | +| `selectsEnd` | | | | +| `selectsRange` | | | | +| `selectsStart` | | | | +| `setPreSelection` | | | | +| `startDate` | | | | +| `usePointerEvent` | | | | +| `yearClassName` | | | | +| `yearItemNumber` | | | | diff --git a/scripts/release.sh b/scripts/release.sh index c0b2599cc..a399cee01 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -13,7 +13,7 @@ git checkout . npm version $1 -npx react-docgen ./src/*.jsx | node ./scripts/buildDocs.js +npx react-docgen ./src/*.tsx | node ./scripts/buildDocs.js git add .