Skip to content

Commit

Permalink
Publish new API docs (automated commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnrusschen committed Jun 13, 2024
1 parent abea7ea commit 2f4cdfb
Show file tree
Hide file tree
Showing 14 changed files with 283 additions and 296 deletions.
11 changes: 5 additions & 6 deletions docs/calendar_container.md
Original file line number Diff line number Diff line change
@@ -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` | |
28 changes: 23 additions & 5 deletions docs/calendar_icon.md
Original file line number Diff line number Diff line change
@@ -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
<CalendarIcon icon="my-icon-class" onClick={myClickHandler} />

@example
// To use a React node as the icon
<CalendarIcon icon={<MyIconComponent />} onClick={myClickHandler} />

@returns The `CalendarIcon` component.

| name | type | default value | description |
| ----------- | ---- | ------------- | ----------- |
| `className` | | `""` | |
| `icon` | | | |
| `onClick` | | | |
255 changes: 91 additions & 164 deletions docs/index.md

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions docs/input_time.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# `input_time` (component)

`InputTime` is a React component that manages time input.

@component
@example
<InputTime timeString="12:00" />

@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` | | | |
17 changes: 7 additions & 10 deletions docs/month_dropdown.md
Original file line number Diff line number Diff line change
@@ -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`|||
| name | type | default value | description |
| ------------------------- | ---- | ------------- | ----------- |
| `dropdownMode` (required) | | | |
| `locale` | | | |
| `onChange` (required) | | | |
| `useShortMonthInDropdown` | | | |
16 changes: 7 additions & 9 deletions docs/month_dropdown_options.md
Original file line number Diff line number Diff line change
@@ -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`|||
| name | type | default value | description |
| ----------------------- | ---- | ------------- | ----------- |
| `month` (required) | | | |
| `monthNames` (required) | | | |
| `onCancel` (required) | | | |
| `onChange` (required) | | | |
19 changes: 6 additions & 13 deletions docs/month_year_dropdown.md
Original file line number Diff line number Diff line change
@@ -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`|||
| name | type | default value | description |
| ------------------------- | ---- | ------------- | ----------- |
| `dropdownMode` (required) | | | |
| `locale` | | | |
| `onChange` (required) | | | |
24 changes: 11 additions & 13 deletions docs/month_year_dropdown_options.md
Original file line number Diff line number Diff line change
@@ -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`|||
| name | type | default value | description |
| ----------------------------- | ---- | ------------- | ----------- |
| `date` (required) | | | |
| `dateFormat` (required) | | | |
| `locale` | | | |
| `maxDate` (required) | | | |
| `minDate` (required) | | | |
| `onCancel` (required) | | | |
| `onChange` (required) | | | |
| `scrollableMonthYearDropdown` | | | |
19 changes: 14 additions & 5 deletions docs/portal.md
Original file line number Diff line number Diff line change
@@ -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) | | | |
27 changes: 21 additions & 6 deletions docs/tab_loop.md
Original file line number Diff line number Diff line change
@@ -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`||
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
<TabLoop enableTabLoop={true}>
<ChildComponent />
</TabLoop>

@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` | |
36 changes: 15 additions & 21 deletions docs/time.md
Original file line number Diff line number Diff line change
@@ -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` | |
31 changes: 16 additions & 15 deletions docs/week_number.md
Original file line number Diff line number Diff line change
@@ -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) | | | |
70 changes: 42 additions & 28 deletions docs/year.md
Original file line number Diff line number Diff line change
@@ -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` | | | |
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .

Expand Down

0 comments on commit 2f4cdfb

Please sign in to comment.