From 6722ef7fe9c9e71387efb47d8f9130ef2d4491fe Mon Sep 17 00:00:00 2001
From: Navin
+ Collection of no-ui components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit
System.
+Explore all components ยป
+Renderless Components
-Accessible, composable, customizable renderless components powered by Reakit
+
+
+
+
+
-
- Collection of no-ui components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit + Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit System. Explore all components ยป
@@ -90,3 +93,26 @@ below documentation to learn more. ## License MIT ยฉ [Timeless](https://timeless.co/) + +## Contributors โจ + +Thanks goes to these wonderful people +([emoji key](https://allcontributors.org/docs/en/emoji-key)): + + + + +Navin Moorthy ๐ป |
+
@@ -105,6 +105,7 @@ Thanks goes to these wonderful people
Navin Moorthy ๐ป |
+ Anurag Hazra ๐ป |
@@ -106,6 +106,7 @@ Thanks goes to these wonderful people
false | undefined Allow to open multiple
+ accordion items
+- **`manual`** boolean Whether the accodion selection should be
+ manual.
+- **`allowToggle`** boolean Allow to toggle accordion items
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`rtl`** boolean Determines how `next` and `previous` functions
+ will behave. If `rtl` is set to `true`, they will be inverted. This only
+ affects the composite widget behavior. You still need to set `dir="rtl"` on
+ HTML/CSS.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`loop`** boolean | "horizontal" | "vertical" On
+ one-dimensional composites:
+
+ - `true` loops from the last item to the first item and vice-versa.
+ - `horizontal` loops only if `orientation` is `horizontal` or not set.
+ - `vertical` loops only if `orientation` is `vertical` or not set.
+ - If `currentId` is initially set to `null`, the composite element will be
+ focused in between the last and first items.
+
+ On two-dimensional composites:
+
+ - `true` loops from the last row/column item to the first item in the same
+ row/column and vice-versa. If it's the last item in the last row, it moves
+ to the first item in the first row and vice-versa.
+ - `horizontal` loops only from the last row item to the first item in the same
+ row.
+ - `vertical` loops only from the last column item to the first item in the
+ column row.
+ - If `currentId` is initially set to `null`, vertical loop will have no effect
+ as moving down from the last row or up from the first row will focus the
+ composite element.
+ - If `wrap` matches the value of `loop`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`shift`** boolean **Has effect only on two-dimensional
+ composites**. If enabled, moving up or down when there's no next item or the
+ next item is disabled will shift to the item right before it.
+
+### `Accordion`
+
+- **`disabled`** boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`groups`** Group[] Lists all the composite groups with their
+ `id` and DOM `ref`. This state is automatically updated when `registerGroup`
+ and `unregisterGroup` are called.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`move`** (id: string | null) => void Moves focus to a given
+ item ID.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+
+string | undefined Accordion's id
+- **`visible`** boolean Whether it's visible or not.
+- **`animating`** boolean Whether it's animating or not.
+- **`animated`** number | boolean If `true`, `animating` will be
+ set to `true` when `visible` is updated. It'll wait for `stopAnimation` to be
+ called or a CSS transition ends. If `animated` is set to a `number`,
+ `stopAnimation` will be called only after the same number of milliseconds have
+ passed.
+- **`stopAnimation`** () => void Stops animation. It's called
+ automatically if there's a CSS transition.
+- **`id`** string | undefined Same as the HTML attribute.
+string ID that will serve as a base for all the
+ items IDs.
+- **`allowMultiple`** boolean Allow to open multiple accordion
+ items
+- **`selectedId`** string | null | undefined The current selected
+ accordion's `id`.
+- **`selectedIds`** (string | null)[] | undefined The current
+ selected accordion's `id`.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`registerPanel`** (item: Item) => void Registers a
+ accordion panel.
+- **`unregisterPanel`** (id: string) => void Unregisters a
+ accordion panel.
+- **`panels`** Item[] Lists all the panels.
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`id`** string | undefined Same as the HTML attribute.
+string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`registerItem`** (item: Item) => void Registers a composite
+ item.
+- **`unregisterItem`** (id: string) => void Unregisters a
+ composite item.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`next`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the next item.
+- **`previous`** (unstable_allTheWay?: boolean | undefined) =>
+ void Moves focus to the previous item.
+- **`up`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item above.
+- **`down`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item below.
+- **`manual`** boolean Whether the accodion selection should be
+ manual.
+- **`allowMultiple`** boolean Allow to open multiple accordion
+ items
+- **`selectedId`** string | null | undefined The current selected
+ accordion's `id`.
+- **`allowToggle`** boolean Allow to toggle accordion items
+- **`selectedIds`** (string | null)[] | undefined The current
+ selected accordion's `id`.
+- **`panels`** Item[] Lists all the panels.
+- **`select`** (id: string | null) => void Moves into and
+ selects an accordion by its `id`.
+- **`unSelect`** (id: string | null) => void Moves into and
+ unSelects an accordion by its `id` if it's already selected.
+
+boolean | undefined If true, sets
+ `aria-current: "page"`
+- **`disabled`** boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`isExternal`** boolean | undefined Opens the link in a new tab
+
+### `Breadcrumbs`
+
+No props to show
+
+## Accessibilty
+
+- `Breadcrumbs` should have `aria-label` or `aria-labelledby` attribute.
+- `BreadcrumbLink` should have `aria-current` set to `page` if the currenct page
+ is loaded.
+- `BreadcrumbLink` extends the accessibility features of [Link](#Link).
+
+## Composition
+
+- BreadcrumbLink uses [useLink](./link.md)
+- Breadcrumbs uses [useBox](https://reakit.io/docs/box)
+
+## Example
+
+```js
+import * as React from "react";
+
+import { Breadcrumbs, BreadcrumbLink } from "renderless-components";
+
+export const App = props => {
+ return (
+ T | undefined The current value (controlled).
+- **`defaultValue`** T | undefined The default value
+ (uncontrolled).
+- **`onChange`** ((value: T) => void) | undefined Handler that
+ is called when the value changes.
+- **`minValue`** T | undefined The smallest value allowed.
+- **`maxValue`** T | undefined The largest value allowed.
+- **`isDisabled`** boolean | undefined Whether the input is
+ disabled.
+- **`isReadOnly`** boolean | undefined Whether the input can be
+ selected but not changed by the user.
+- **`autoFocus`** boolean | undefined Whether the element should
+ receive focus on render.
+- **`id`** string | undefined Id for the calendar grid
+
+### `useRangeCalendarState`
+
+- **`value`** T | undefined The current value (controlled).
+- **`defaultValue`** T | undefined The default value
+ (uncontrolled).
+- **`onChange`** ((value: T) => void) | undefined Handler that
+ is called when the value changes.
+- **`minValue`** T | undefined The smallest value allowed.
+- **`maxValue`** T | undefined The largest value allowed.
+- **`isDisabled`** boolean | undefined Whether the input is
+ disabled.
+- **`isReadOnly`** boolean | undefined Whether the input can be
+ selected but not changed by the user.
+- **`autoFocus`** boolean | undefined Whether the element should
+ receive focus on render.
+- **`id`** string | undefined Id for the calendar grid
+
+### `Calendar`
+
+string | undefined Id for the Calendar Header
+
+"nextMonth"
+ | "previousMonth" | "nextYear" | "p...
+
+- **`disabled`** boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+() => void Focus the cell one month next
+ to the current date
+- **`focusPreviousMonth`** () => void Focus the cell one month
+ prev to the current date
+- **`focusPreviousYear`** () => void Focus the cell of the date
+ one year before the current date
+- **`focusNextYear`** () => void Focus the cell of the date one
+ year from the current date
+
+Date
+
+Date Selected Date value
+- **`isDisabled`** boolean `true` if the calendar is disabled
+- **`currentMonth`** Date Month of the current Date
+- **`isRangeCalendar`** boolean `true` if the calendar is used as
+ RangeCalendar
+- **`highlightDate`** (date: Date) => void
+
+- **`highlightedRange`** RangeValue<Date> | null
+
+Date
+
+- **`disabled`** boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+Date Selected Date value
+- **`isDisabled`** boolean `true` if the calendar is disabled
+- **`isRangeCalendar`** boolean `true` if the calendar is used as
+ RangeCalendar
+- **`focusedDate`** Date Date value that is currently focused
+- **`selectDate`** (value: Date) => void sets `dateValue`
+- **`setFocusedDate`** (value: SetStateAction<Date>) =>
+ void Sets `focusedDate`
+- **`month`** number Month of the current date value
+- **`minDate`** Date | undefined Minimum allowed Date value
+- **`maxDate`** Date | undefined Maximum allowed Date value
+- **`isFocused`** boolean `true` if the calendar is focused
+- **`anchorDate`** Date | null
+
+string | undefined Id for the Calendar Header
+- **`focusNextMonth`** () => void Focus the cell one month next
+ to the current date
+- **`focusPreviousMonth`** () => void Focus the cell one month
+ prev to the current date
+- **`focusPreviousYear`** () => void Focus the cell of the date
+ one year before the current date
+- **`focusNextYear`** () => void Focus the cell of the date one
+ year from the current date
+- **`isDisabled`** boolean `true` if the calendar is disabled
+- **`isRangeCalendar`** boolean `true` if the calendar is used as
+ RangeCalendar
+- **`isReadOnly`** boolean `true` if the calendar is only readonly
+- **`setFocused`** (value: SetStateAction<boolean>) =>
+ void Sets `isFocused`
+- **`selectFocusedDate`** () => void Selects the `focusedDate`
+- **`focusEndOfMonth`** () => void Focus the cell of the last
+ day of the month
+- **`focusStartOfMonth`** () => void Focus the cell of the
+ first day of the month
+- **`focusNextDay`** () => void Focus the cell next to the
+ current date
+- **`focusPreviousDay`** () => void Focus the cell prev to the
+ current date
+- **`focusNextWeek`** () => void Focus the cell one week next
+ to the current date
+- **`focusPreviousWeek`** () => void Focus the cell one week
+ prev to the current date
+- **`setAnchorDate`** (value: SetStateAction<Date | null>) =>
+ void
+
+DateTimeFormatOpts | undefined
+
+string | undefined Id for the Calendar Header
+- **`currentMonth`** Date Month of the current Date
+
+number
+
+{ title: string; abbr: string; }[] Generated week
+ days for CalendarWeekTitle based on weekStart
+
++Next | Codebase Overview โ +
diff --git a/docs/datepicker.md b/docs/datepicker.md new file mode 100644 index 000000000..25218cc06 --- /dev/null +++ b/docs/datepicker.md @@ -0,0 +1,535 @@ +## DatePicker + +Accessible `DatePicker` component. + +[DatePicker - Open On Sandbox](https://codesandbox.io/s/ixpqy) + +[RangeDatePicker - Open On Sandbox](https://codesandbox.io/s/wlu79) + +## Props + + + +### `DatePicker` + +boolean Whether it's visible or not.
+- **`pickerId`** string | undefined
+
+- **`dialogId`** string | undefined
+
+- **`isDisabled`** boolean | undefined
+
+- **`isReadOnly`** boolean | undefined
+
+- **`segmentFocus`** (() => void) | undefined
+
+- **`show`** () => void Changes the `visible` state to `true`
+- **`isRequired`** boolean | undefined
+
+- **`validationState`** "valid" | "invalid"
+
+boolean Whether it's visible or not.
+- **`pickerId`** string | undefined
+
+- **`dialogId`** string | undefined
+
+- **`isDisabled`** boolean | undefined
+
+- **`isReadOnly`** boolean | undefined
+
+- **`segmentFocus`** (() => void) | undefined
+
+- **`show`** () => void Changes the `visible` state to `true`
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`id`** string | undefined Same as the HTML attribute.
+- **`segment`** DateSegment
+
+string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`registerItem`** (item: Item) => void Registers a composite
+ item.
+- **`unregisterItem`** (id: string) => void Unregisters a
+ composite item.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`next`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the next item.
+- **`previous`** (unstable_allTheWay?: boolean | undefined) =>
+ void Moves focus to the previous item.
+- **`up`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item above.
+- **`down`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item below.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`fieldValue`** Date
+
+- **`setSegment`** (part: DateTimeFormatPartTypes, v: number) =>
+ void
+
+- **`increment`** (part: DateTimeFormatPartTypes) => void
+
+- **`decrement`** (part: DateTimeFormatPartTypes) => void
+
+- **`incrementPage`** (part: DateTimeFormatPartTypes) => void
+
+- **`decrementPage`** (part: DateTimeFormatPartTypes) => void
+
+- **`dateFormatter`** DateTimeFormat
+
+- **`confirmPlaceholder`** (part: DateTimeFormatPartTypes) =>
+ void
+
+- **`isDisabled`** boolean | undefined
+
+- **`isReadOnly`** boolean | undefined
+
+- **`isRequired`** boolean | undefined
+
+- **`pickerId`** string | undefined
+
+- **`isDateRangePicker`** boolean
+
+string ID that will serve as a base for all the
+ items IDs.
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+boolean Whether it's visible or not.
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`toggle`** () => void Toggles the `visible` state
+- **`unstable_referenceRef`** โ ๏ธ
+ RefObject<HTMLElement | null> The reference element.
+- **`isDisabled`** boolean | undefined
+
+- **`isReadOnly`** boolean | undefined
+
+string ID that will serve as a base for all the
+ items IDs.
+- **`visible`** boolean Whether it's visible or not.
+- **`animating`** boolean Whether it's animating or not.
+- **`animated`** number | boolean If `true`, `animating` will be
+ set to `true` when `visible` is updated. It'll wait for `stopAnimation` to be
+ called or a CSS transition ends. If `animated` is set to a `number`,
+ `stopAnimation` will be called only after the same number of milliseconds have
+ passed.
+- **`stopAnimation`** () => void Stops animation. It's called
+ automatically if there's a CSS transition.
+- **`modal`** boolean Toggles Dialog's `modal` state.
+ - Non-modal: `preventBodyScroll` doesn't work and focus is free.
+ - Modal: `preventBodyScroll` is automatically enabled, focus is trapped within
+ the dialog and the dialog is rendered within a `Portal` by default.
+- **`hide`** () => void Changes the `visible` state to `false`
+- **`hideOnEsc`** boolean | undefined When enabled, user can hide
+ the dialog by pressing `Escape`.
+- **`hideOnClickOutside`** boolean | undefined When enabled, user
+ can hide the dialog by clicking outside it.
+- **`preventBodyScroll`** boolean | undefined When enabled, user
+ can't scroll on body when the dialog is visible. This option doesn't work if
+ the dialog isn't modal.
+- **`unstable_initialFocusRef`** โ ๏ธ
+ RefObject<HTMLElement> | undefined The element that will
+ be focused when the dialog shows. When not set, the first tabbable element
+ within the dialog will be used.
+- **`unstable_finalFocusRef`** โ ๏ธ
+ RefObject<HTMLElement> | undefined The element that will
+ be focused when the dialog hides. When not set, the disclosure component will
+ be used.
+- **`unstable_orphan`** โ ๏ธ boolean |
+ undefined Whether or not the dialog should be a child of its parent.
+ Opening a nested orphan dialog will close its parent dialog if
+ `hideOnClickOutside` is set to `true` on the parent. It will be set to `false`
+ if `modal` is `false`.
+- **`placement`** "left" | "right" | "top" |
+ "bottom" | undefined
+
+### `DrawerCloseButton`
+
+- **`disabled`** boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`visible`** boolean Whether it's visible or not.
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`toggle`** () => void Toggles the `visible` state
+
+## Composition
+
+- Drawer uses [useDialog](undefined)
+- DrawerCloseButton uses [useDialogDisclosure](undefined)
+
+## Example
+
+```js
+import React from "react";
+import { css } from "@emotion/css";
+
+import {
+ Drawer,
+ useDrawerState,
+ DrawerBackdrop,
+ DrawerCloseButton,
+ DrawerDisclosure,
+} from "renderless-components";
+
+export const App = () => {
+ const dialog = useDrawerState({ animated: true });
+ const inputRef = React.useRef(null);
+ const [placement, setPlacement] = React.useState("left");
+
+ return (
+ Welcome to Reakit!
+ +boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`isExternal`** boolean | undefined Opens the link in a new tab
+
+## Accessibilty
+
+- `Link` has role `link`.
+
+## Composition
+
+- Link uses [useClickable](https://reakit.io/docs/clickable)
+
+## Example
+
+```js
+import * as React from "react";
+
+import { Link } from "renderless-components";
+
+export const App = props => {
+ return Reakit;
+};
+
+export default App;
+```
diff --git a/docs/meter.md b/docs/meter.md
new file mode 100644
index 000000000..cd219ee66
--- /dev/null
+++ b/docs/meter.md
@@ -0,0 +1,145 @@
+## Meter
+
+Accessible `Meter` component.
+
+[Meter - Open On Sandbox](https://codesandbox.io/s/vyipe)
+
+## Props
+
+
+
+### `useMeterState`
+
+- **`value`** number The `value` of the meter indicator.
+
+If `undefined`/`not valid` the meter bar will be equal to `min`
+
+- **`min`** number The minimum value of the meter
+- **`max`** number The maximum value of the meter
+- **`low`** number The higher limit of min range.
+
+Defaults to `min`.
+
+- **`optimum`** number The lower limit of max range.
+
+Defaults to `median of low & high`.
+
+- **`high`** number The lower limit of max range.
+
+Defaults to `max`.
+
+### `Meter`
+
+number The `value` of the meter indicator.
+
+If `undefined`/`not valid` the meter bar will be equal to `min`
+
+- **`min`** number The minimum value of the meter
+- **`max`** number The maximum value of the meter
+- **`percent`** number Percentage of the value progressed with
+ respect to min & max
+
+string | number The value of the counter. Should be
+ less than `max` and greater than `min`
+
+If no value, initial value is set to `""`
+
+- **`keepWithinRange`** boolean This controls the value update
+ behavior in general.
+
+- If `true` and you use the stepper or up/down arrow keys, the value will not
+ exceed the `max` or go lower than `min`
+
+- If `false`, the value will be allowed to go out of range.
+- **`min`** number The minimum value of the counter
+- **`max`** number The maximum value of the counter
+- **`step`** number The step used to increment or decrement the
+ value
+- **`precision`** number The number of decimal points used to round
+ the value
+
+If no precision, initial value is from the decimal places from value/step - `0`
+
+- **`defaultValue`** string | number | undefined The initial value
+ of the counter. Should be less than `max` and greater than `min`
+- **`onChange`**
+ ((valueAsString:
+ string, valueAsNumber: number)... The callback fired when the value
+ changes
+- **`focusInputOnChange`** boolean | undefined If `true`, the input
+ will be focused as you increment or decrement the value with the stepper
+
+### `NumberInput`
+
+- **`disabled`** boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`clampValueOnBlur`** boolean | undefined This controls the
+ value update when you blur out of the input.
+- If `true` and the value is greater than `max`, the value will be reset to
+ `max`
+- Else, the value remains the same.
+- **`allowMouseWheel`** boolean | undefined If `true`, the input's
+value will change based on mouse wheel
+boolean This controls the value update
+ behavior in general.
+
+- If `true` and you use the stepper or up/down arrow keys, the value will not
+ exceed the `max` or go lower than `min`
+
+- If `false`, the value will be allowed to go out of range.
+- **`value`** string | number The value of the counter. Should be
+ less than `max` and greater than `min`
+
+If no value, initial value is set to `""`
+
+- **`min`** number The minimum value of the counter
+- **`max`** number The maximum value of the counter
+- **`step`** number The step used to increment or decrement the
+ value
+- **`valueAsNumber`** number The value of the counter in number.
+- **`isOutOfRange`** boolean True, if value is less than `min` &
+ greater than `max`.
+- **`inputRef`** RefObject<HTMLElement | null> The Input
+ Element.
+- **`setValue`** (next: StringOrNumber) => void Set the value
+ which will be converted to string.
+- **`increment`** (step: number) => void Increment the value
+ based on the step
+- **`decrement`** (step: number) => void Decrement the value
+ based on the step
+- **`setCastedValue`** (value: StringOrNumber) => void Set the
+ casted value based on precision & step.
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+boolean This controls the value update
+ behavior in general.
+
+- If `true` and you use the stepper or up/down arrow keys, the value will not
+ exceed the `max` or go lower than `min`
+
+- If `false`, the value will be allowed to go out of range.
+- **`isAtMin`** boolean Truw, if value is equal to min.
+- **`focusInput`** () => void Focus input if focus input on
+ value change is `true`
+- **`spinDown`** () => void Spinner handler that decrements the
+ value after an interval
+- **`spinStop`** () => void Spinner handler that Stop it from
+ incrementing or decrementing
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+boolean This controls the value update
+ behavior in general.
+
+- If `true` and you use the stepper or up/down arrow keys, the value will not
+ exceed the `max` or go lower than `min`
+
+- If `false`, the value will be allowed to go out of range.
+- **`isAtMax`** boolean True, if value is equal to max.
+- **`focusInput`** () => void Focus input if focus input on
+ value change is `true`
+- **`spinUp`** () => void Spinner handler that increments the
+ value after an interval
+- **`spinStop`** () => void Spinner handler that Stop it from
+ incrementing or decrementing
+
+number | undefined Set the default
+ page(uncontrollable)
+- **`page`** number | undefined Set the page(controllable)
+- **`onChange`** ((page: number) => void) | undefined
+
+- **`count`** number | undefined Total no. of pages
+- **`boundaryCount`** number | undefined No. of boundary pages to
+ be visible
+- **`siblingCount`** number | undefined No. of sibiling pages
+ allowed before/after the current page
+
+### `Pagination`
+
+number The current active page
+- **`pages`** (string | number)[] All the page with start & end
+ ellipsis
+- **`isAtFirstPage`** boolean True, if the currentPage is at first
+ page
+- **`isAtLastPage`** boolean True, if the currentPage is at last
+ page
+- **`movePage`** (page: number) => void Go to the specified
+ page number
+- **`nextPage`** () => void Go to next page
+- **`prevPage`** () => void Go to previous page
+- **`firstPage`** () => void Go to first page
+- **`lastPage`** () => void Go to last page
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`goto`**
+ number
+ | "nextPage" | "prevPage" | "firstPage" ...
+
+number The current active page
+- **`movePage`** (page: number) => void Go to the specified
+ page number
+- **`nextPage`** () => void Go to next page
+- **`prevPage`** () => void Go to previous page
+- **`firstPage`** () => void Go to first page
+- **`lastPage`** () => void Go to last page
+- **`isAtLastPage`** boolean True, if the currentPage is at last
+ page
+- **`isAtFirstPage`** boolean True, if the currentPage is at first
+ page
+
+boolean Whether it's visible or not.
+- **`pickerId`** string | undefined
+
+- **`dialogId`** string | undefined
+
+- **`isDisabled`** boolean | undefined
+
+- **`isReadOnly`** boolean | undefined
+
+- **`segmentFocus`** (() => void) | undefined
+
+- **`show`** () => void Changes the `visible` state to `true`
+
+boolean | undefined When enabled, user can hide
+ the dialog by pressing `Escape`.
+- **`hideOnClickOutside`** boolean | undefined When enabled, user
+ can hide the dialog by clicking outside it.
+- **`preventBodyScroll`** boolean | undefined When enabled, user
+ can't scroll on body when the dialog is visible. This option doesn't work if
+ the dialog isn't modal.
+- **`unstable_initialFocusRef`** โ ๏ธ
+ RefObject<HTMLElement> | undefined The element that will
+ be focused when the dialog shows. When not set, the first tabbable element
+ within the dialog will be used.
+- **`unstable_finalFocusRef`** โ ๏ธ
+ RefObject<HTMLElement> | undefined The element that will
+ be focused when the dialog hides. When not set, the disclosure component will
+ be used.
+- **`unstable_orphan`** โ ๏ธ boolean |
+undefined Whether or not the dialog should be a child of its parent.
+Opening a nested orphan dialog will close its parent dialog if
+`hideOnClickOutside` is set to `true` on the parent. It will be set to `false`
+if `modal` is `false`.
+string ID that will serve as a base for all the
+ items IDs.
+- **`visible`** boolean Whether it's visible or not.
+- **`animated`** number | boolean If `true`, `animating` will be
+ set to `true` when `visible` is updated. It'll wait for `stopAnimation` to be
+ called or a CSS transition ends. If `animated` is set to a `number`,
+ `stopAnimation` will be called only after the same number of milliseconds have
+ passed.
+- **`animating`** boolean Whether it's animating or not.
+- **`stopAnimation`** () => void Stops animation. It's called
+ automatically if there's a CSS transition.
+- **`modal`** boolean Toggles Dialog's `modal` state.
+ - Non-modal: `preventBodyScroll` doesn't work and focus is free.
+ - Modal: `preventBodyScroll` is automatically enabled, focus is trapped within
+ the dialog and the dialog is rendered within a `Portal` by default.
+- **`hide`** () => void Changes the `visible` state to `false`
+- **`dialogId`** string | undefined
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+boolean Whether it's visible or not.
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`toggle`** () => void Toggles the `visible` state
+- **`unstable_referenceRef`** โ ๏ธ
+ RefObject<HTMLElement | null> The reference element.
+- **`isDisabled`** boolean | undefined
+
+- **`isReadOnly`** boolean | undefined
+
+number | null The `value` of the progress indicator.
+
+If `null` the progress bar will be in `indeterminate` state
+
+- **`min`** number The minimum value of the progress
+- **`max`** number The maximum value of the
+
+### `Progress`
+
+number | null The `value` of the progress indicator.
+
+If `null` the progress bar will be in `indeterminate` state
+
+- **`min`** number The minimum value of the progress
+- **`max`** number The maximum value of the
+- **`isIndeterminate`** boolean Set isInterminate state
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`id`** string | undefined Same as the HTML attribute.
+- **`segment`** DateSegment
+
+- **`isDisabled`** boolean | undefined
+
+- **`isReadOnly`** boolean | undefined
+
+- **`isRequired`** boolean | undefined
+
+string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`registerItem`** (item: Item) => void Registers a composite
+ item.
+- **`unregisterItem`** (id: string) => void Unregisters a
+ composite item.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`next`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the next item.
+- **`previous`** (unstable_allTheWay?: boolean | undefined) =>
+ void Moves focus to the previous item.
+- **`up`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item above.
+- **`down`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item below.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`fieldValue`** Date
+
+- **`setSegment`** (part: DateTimeFormatPartTypes, v: number) =>
+ void
+
+- **`increment`** (part: DateTimeFormatPartTypes) => void
+
+- **`decrement`** (part: DateTimeFormatPartTypes) => void
+
+- **`incrementPage`** (part: DateTimeFormatPartTypes) => void
+
+- **`decrementPage`** (part: DateTimeFormatPartTypes) => void
+
+- **`dateFormatter`** DateTimeFormat
+
+- **`confirmPlaceholder`** (part: DateTimeFormatPartTypes) =>
+ void
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`groups`** Group[] Lists all the composite groups with their
+ `id` and DOM `ref`. This state is automatically updated when `registerGroup`
+ and `unregisterGroup` are called.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`move`** (id: string | null) => void Moves focus to a given
+ item ID.
+
+string[] Options/values provided.
+- **`selectedValue`** string | null Initial value to be selected
+
+### `useSelectListState`
+
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`rtl`** boolean Determines how `next` and `previous` functions
+ will behave. If `rtl` is set to `true`, they will be inverted. This only
+ affects the composite widget behavior. You still need to set `dir="rtl"` on
+ HTML/CSS.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`loop`** boolean | "horizontal" | "vertical" On
+ one-dimensional composites:
+
+ - `true` loops from the last item to the first item and vice-versa.
+ - `horizontal` loops only if `orientation` is `horizontal` or not set.
+ - `vertical` loops only if `orientation` is `vertical` or not set.
+ - If `currentId` is initially set to `null`, the composite element will be
+ focused in between the last and first items.
+
+ On two-dimensional composites:
+
+ - `true` loops from the last row/column item to the first item in the same
+ row/column and vice-versa. If it's the last item in the last row, it moves
+ to the first item in the first row and vice-versa.
+ - `horizontal` loops only from the last row item to the first item in the same
+ row.
+ - `vertical` loops only from the last column item to the first item in the
+ column row.
+ - If `currentId` is initially set to `null`, vertical loop will have no effect
+ as moving down from the last row or up from the first row will focus the
+ composite element.
+ - If `wrap` matches the value of `loop`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`shift`** boolean **Has effect only on two-dimensional
+ composites**. If enabled, moving up or down when there's no next item or the
+ next item is disabled will shift to the item right before it.
+- **`values`** string[] Options/values provided.
+- **`selectedValue`** string | null Initial value to be selected
+
+### `useSelectPopoverState`
+
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`visible`** boolean Whether it's visible or not.
+- **`animated`** number | boolean If `true`, `animating` will be
+ set to `true` when `visible` is updated. It'll wait for `stopAnimation` to be
+ called or a CSS transition ends. If `animated` is set to a `number`,
+ `stopAnimation` will be called only after the same number of milliseconds have
+ passed.
+- **`modal`** boolean Toggles Dialog's `modal` state.
+ - Non-modal: `preventBodyScroll` doesn't work and focus is free.
+ - Modal: `preventBodyScroll` is automatically enabled, focus is trapped within
+ the dialog and the dialog is rendered within a `Portal` by default.
+- **`placement`**
+ "auto-start"
+ | "auto" | "auto-end" | "top-start... Actual
+ `placement`.
+- **`unstable_fixed`** โ ๏ธ boolean |
+ undefined Whether or not the popover should have `position` set to
+ `fixed`.
+- **`unstable_flip`** โ ๏ธ boolean |
+ undefined Flip the popover's placement when it starts to overlap its
+ reference element.
+- **`unstable_offset`** โ ๏ธ [string |
+ number, string | number] | undefined Offset between the reference and
+ the popover: [main axis, alt axis]. Should not be combined with `gutter`.
+- **`gutter`** number | undefined Offset between the reference and
+ the popover on the main axis. Should not be combined with `unstable_offset`.
+- **`unstable_preventOverflow`** โ ๏ธ
+ boolean | undefined Prevents popover from being positioned
+ outside the boundary.
+
+### `useSelectState`
+
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`visible`** boolean Whether it's visible or not.
+- **`animated`** number | boolean If `true`, `animating` will be
+ set to `true` when `visible` is updated. It'll wait for `stopAnimation` to be
+ called or a CSS transition ends. If `animated` is set to a `number`,
+ `stopAnimation` will be called only after the same number of milliseconds have
+ passed.
+- **`modal`** boolean Toggles Dialog's `modal` state.
+ - Non-modal: `preventBodyScroll` doesn't work and focus is free.
+ - Modal: `preventBodyScroll` is automatically enabled, focus is trapped within
+ the dialog and the dialog is rendered within a `Portal` by default.
+- **`placement`**
+ "auto-start"
+ | "auto" | "auto-end" | "top-start... Actual
+ `placement`.
+- **`unstable_fixed`** โ ๏ธ boolean |
+ undefined Whether or not the popover should have `position` set to
+ `fixed`.
+- **`unstable_flip`** โ ๏ธ boolean |
+ undefined Flip the popover's placement when it starts to overlap its
+ reference element.
+- **`unstable_offset`** โ ๏ธ [string |
+ number, string | number] | undefined Offset between the reference and
+ the popover: [main axis, alt axis]. Should not be combined with `gutter`.
+- **`gutter`** number | undefined Offset between the reference and
+ the popover on the main axis. Should not be combined with `unstable_offset`.
+- **`unstable_preventOverflow`** โ ๏ธ
+ boolean | undefined Prevents popover from being positioned
+ outside the boundary.
+- **`rtl`** boolean Determines how `next` and `previous` functions
+ will behave. If `rtl` is set to `true`, they will be inverted. This only
+ affects the composite widget behavior. You still need to set `dir="rtl"` on
+ HTML/CSS.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`loop`** boolean | "horizontal" | "vertical" On
+ one-dimensional composites:
+
+ - `true` loops from the last item to the first item and vice-versa.
+ - `horizontal` loops only if `orientation` is `horizontal` or not set.
+ - `vertical` loops only if `orientation` is `vertical` or not set.
+ - If `currentId` is initially set to `null`, the composite element will be
+ focused in between the last and first items.
+
+ On two-dimensional composites:
+
+ - `true` loops from the last row/column item to the first item in the same
+ row/column and vice-versa. If it's the last item in the last row, it moves
+ to the first item in the first row and vice-versa.
+ - `horizontal` loops only from the last row item to the first item in the same
+ row.
+ - `vertical` loops only from the last column item to the first item in the
+ column row.
+ - If `currentId` is initially set to `null`, vertical loop will have no effect
+ as moving down from the last row or up from the first row will focus the
+ composite element.
+ - If `wrap` matches the value of `loop`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`shift`** boolean **Has effect only on two-dimensional
+ composites**. If enabled, moving up or down when there's no next item or the
+ next item is disabled will shift to the item right before it.
+- **`values`** string[] Options/values provided.
+- **`selectedValue`** string | null Initial value to be selected
+
+### `Select`
+
+- **`disabled`** boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`hideOnEsc`** boolean | undefined When enabled, user can hide
+the select popover by pressing `esc` while focusing on the select input.
+boolean Whether it's visible or not.
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`toggle`** () => void Toggles the `visible` state
+- **`unstable_referenceRef`** โ ๏ธ
+ RefObject<HTMLElement | null> The reference element.
+- **`animated`** number | boolean If `true`, `animating` will be
+ set to `true` when `visible` is updated. It'll wait for `stopAnimation` to be
+ called or a CSS transition ends. If `animated` is set to a `number`,
+ `stopAnimation` will be called only after the same number of milliseconds have
+ passed.
+- **`animating`** boolean Whether it's animating or not.
+- **`modal`** boolean Toggles Dialog's `modal` state.
+ - Non-modal: `preventBodyScroll` doesn't work and focus is free.
+ - Modal: `preventBodyScroll` is automatically enabled, focus is trapped within
+ the dialog and the dialog is rendered within a `Portal` by default.
+- **`placement`**
+ "auto-start"
+ | "auto" | "auto-end" | "top-start... Actual
+ `placement`.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`rtl`** boolean Determines how `next` and `previous` functions
+ will behave. If `rtl` is set to `true`, they will be inverted. This only
+ affects the composite widget behavior. You still need to set `dir="rtl"` on
+ HTML/CSS.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`groups`** Group[] Lists all the composite groups with their
+ `id` and DOM `ref`. This state is automatically updated when `registerGroup`
+ and `unregisterGroup` are called.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`loop`** boolean | "horizontal" | "vertical" On
+ one-dimensional composites:
+
+ - `true` loops from the last item to the first item and vice-versa.
+ - `horizontal` loops only if `orientation` is `horizontal` or not set.
+ - `vertical` loops only if `orientation` is `vertical` or not set.
+ - If `currentId` is initially set to `null`, the composite element will be
+ focused in between the last and first items.
+
+ On two-dimensional composites:
+
+ - `true` loops from the last row/column item to the first item in the same
+ row/column and vice-versa. If it's the last item in the last row, it moves
+ to the first item in the first row and vice-versa.
+ - `horizontal` loops only from the last row item to the first item in the same
+ row.
+ - `vertical` loops only from the last column item to the first item in the
+ column row.
+ - If `currentId` is initially set to `null`, vertical loop will have no effect
+ as moving down from the last row or up from the first row will focus the
+ composite element.
+ - If `wrap` matches the value of `loop`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`shift`** boolean **Has effect only on two-dimensional
+ composites**. If enabled, moving up or down when there's no next item or the
+ next item is disabled will shift to the item right before it.
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`menuRole`** "listbox" | "tree" | "grid" |
+ "dialog" Indicates the type of the suggestions popup.
+- **`items`** Item[] Lists all the select items with their `id`,
+ DOM `ref`, `disabled` state, `value` and `groupId` if any. This state is
+ automatically updated when `registerItem` and `unregisterItem` are called.
+- **`values`** string[] Options/values provided.
+- **`valuesById`** { id: string; value: string; }[] Initial value
+ to be selected
+- **`selectedValue`** string | null Initial value to be selected
+- **`currentValue`** string | undefined Initial value to be
+ selected
+- **`selectedId`** string | null | undefined Id of the item that is
+ currently selected.
+- **`setBaseId`** (value: SetStateAction<string>) =>
+ void Sets `baseId`.
+- **`show`** () => void Changes the `visible` state to `true`
+- **`hide`** () => void Changes the `visible` state to `false`
+- **`setVisible`** (value: SetStateAction<boolean>) =>
+ void Sets `visible`.
+- **`setAnimated`** (value: SetStateAction<number | boolean>)
+ => void Sets `animated`.
+- **`stopAnimation`** () => void Stops animation. It's called
+ automatically if there's a CSS transition.
+- **`setModal`** (value: SetStateAction<boolean>) =>
+ void Sets `modal`.
+- **`place`** (value: SetStateAction<Placement>) =>
+ void Change the `placement` state.
+- **`unregisterItem`** (id: string) => void Unregisters a
+ composite item.
+- **`registerGroup`** (group: Group) => void Registers a
+ composite group.
+- **`unregisterGroup`** (id: string) => void Unregisters a
+ composite group.
+- **`move`** (id: string | null) => void Moves focus to a given
+ item ID.
+- **`next`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the next item.
+- **`previous`** (unstable_allTheWay?: boolean | undefined) =>
+ void Moves focus to the previous item.
+- **`up`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item above.
+- **`down`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item below.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`sort`** () => void Sorts the `composite.items` based on
+ the items position in the DOM. This is especially useful after modifying the
+ composite items order in the DOM. Most of the time, though, you don't need to
+ manually call this function as the re-ordering happens automatically.
+- **`unstable_setVirtual`** โ ๏ธ (value:
+ SetStateAction<boolean>) => void Sets `virtual`.
+- **`setRTL`** (value: SetStateAction<boolean>) => void
+ Sets `rtl`.
+- **`setOrientation`**
+ (value:
+ SetStateAction<"horizontal" | "vertical... Sets
+ `orientation`.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`setLoop`**
+ (value:
+ SetStateAction<boolean | "horizontal" |... Sets `loop`.
+- **`setWrap`**
+ (value:
+ SetStateAction<boolean | "horizontal" |... Sets `wrap`.
+- **`setShift`** (value: SetStateAction<boolean>) =>
+ void Sets `shift`.
+- **`reset`** () => void Resets to initial state.
+- **`registerItem`** (item: Item) => void Registers a select
+ item.
+- **`setSelectedValue`** (value: SetStateAction<string | null>)
+ => void Sets `values`.
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`id`** string | undefined Same as the HTML attribute.
+- **`value`** string | undefined Item's value that will be used to
+fill input value and filter `matches` based on the input value. You can omit
+this for items that perform actions other than filling a form. For example,
+items may open a dialog.
+string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`registerItem`** (item: Item) => void Registers a composite
+ item.
+- **`unregisterItem`** (id: string) => void Unregisters a
+ composite item.
+- **`next`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the next item.
+- **`previous`** (unstable_allTheWay?: boolean | undefined) =>
+ void Moves focus to the previous item.
+- **`up`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item above.
+- **`down`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item below.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`visible`** boolean Whether it's visible or not.
+- **`hide`** () => void Changes the `visible` state to `false`
+- **`setSelectedValue`** (value: SetStateAction<string | null>)
+ => void Sets `values`.
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`groups`** Group[] Lists all the composite groups with their
+ `id` and DOM `ref`. This state is automatically updated when `registerGroup`
+ and `unregisterGroup` are called.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`move`** (id: string | null) => void Moves focus to a given
+ item ID.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`menuRole`** "listbox" | "tree" | "grid" |
+ "dialog" Indicates the type of the suggestions popup.
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`id`** string | undefined Same as the HTML attribute.
+- **`value`** string | undefined Item's value that will be used to
+fill input value and filter `matches` based on the input value. You can omit
+this for items that perform actions other than filling a form. For example,
+items may open a dialog.
+string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`registerItem`** (item: Item) => void Registers a composite
+ item.
+- **`unregisterItem`** (id: string) => void Unregisters a
+ composite item.
+- **`next`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the next item.
+- **`previous`** (unstable_allTheWay?: boolean | undefined) =>
+ void Moves focus to the previous item.
+- **`up`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item above.
+- **`down`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item below.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`visible`** boolean Whether it's visible or not.
+- **`hide`** () => void Changes the `visible` state to `false`
+- **`setSelectedValue`** (value: SetStateAction<string | null>)
+ => void Sets `values`.
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`hideOnEsc`** boolean | undefined When enabled, user can hide
+ the dialog by pressing `Escape`.
+- **`hideOnClickOutside`** boolean | undefined When enabled, user
+ can hide the dialog by clicking outside it.
+- **`preventBodyScroll`** boolean | undefined When enabled, user
+ can't scroll on body when the dialog is visible. This option doesn't work if
+ the dialog isn't modal.
+- **`unstable_initialFocusRef`** โ ๏ธ
+ RefObject<HTMLElement> | undefined The element that will
+ be focused when the dialog shows. When not set, the first tabbable element
+ within the dialog will be used.
+- **`unstable_finalFocusRef`** โ ๏ธ
+ RefObject<HTMLElement> | undefined The element that will
+ be focused when the dialog hides. When not set, the disclosure component will
+ be used.
+- **`unstable_orphan`** โ ๏ธ boolean |
+undefined Whether or not the dialog should be a child of its parent.
+Opening a nested orphan dialog will close its parent dialog if
+`hideOnClickOutside` is set to `true` on the parent. It will be set to `false`
+if `modal` is `false`.
+string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`groups`** Group[] Lists all the composite groups with their
+ `id` and DOM `ref`. This state is automatically updated when `registerGroup`
+ and `unregisterGroup` are called.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`move`** (id: string | null) => void Moves focus to a given
+ item ID.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`menuRole`** "listbox" | "tree" | "grid" |
+ "dialog" Indicates the type of the suggestions popup.
+- **`visible`** boolean Whether it's visible or not.
+- **`animated`** number | boolean If `true`, `animating` will be
+ set to `true` when `visible` is updated. It'll wait for `stopAnimation` to be
+ called or a CSS transition ends. If `animated` is set to a `number`,
+ `stopAnimation` will be called only after the same number of milliseconds have
+ passed.
+- **`animating`** boolean Whether it's animating or not.
+- **`stopAnimation`** () => void Stops animation. It's called
+ automatically if there's a CSS transition.
+- **`modal`** boolean Toggles Dialog's `modal` state.
+ - Non-modal: `preventBodyScroll` doesn't work and focus is free.
+ - Modal: `preventBodyScroll` is automatically enabled, focus is trapped within
+ the dialog and the dialog is rendered within a `Portal` by default.
+- **`hide`** () => void Changes the `visible` state to `false`
+- **`values`** string[] Options/values provided.
+- **`valuesById`** { id: string; value: string; }[] Initial value
+ to be selected
+- **`currentValue`** string | undefined Initial value to be
+ selected
+
+number[] The `value` of the slider indicator.
+
+If `undefined`/`not valid` the slider bar will be the optimum of min & max
+
+- **`min`** number The minimum value of the slider
+- **`max`** number The maximum value of the slider
+- **`step`** number The step in which increments/decrements have to
+ be made
+- **`isDisabled`** boolean If `true`, the slider will be disabled
+- **`orientation`** "horizontal" | "vertical"
+ Orientation of the slider
+- **`reversed`** boolean Direction of the slider
+- **`defaultValues`** number[] | undefined The `defaultValue` of
+ the slider indicator.
+- **`onChange`** ((value: number[]) => void) | undefined
+ Handler that is called when the value changes.
+- **`onChangeEnd`** ((value: number[]) => void) | undefined Get
+ the value when dragging is started
+- **`onChangeStart`** ((value: number[]) => void) | undefined
+ Get the value when dragging is stopped
+- **`formatOptions`** NumberFormatOptions | undefined Get the
+ formated value based on number format options
+
+### `SliderInput`
+
+- **`disabled`** boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`id`** string | undefined Same as the HTML attribute.
+- **`index`** number
+
+number The step in which increments/decrements have to
+ be made
+- **`isDisabled`** boolean If `true`, the slider will be disabled
+- **`orientation`** "horizontal" | "vertical"
+ Orientation of the slider
+- **`getThumbMinValue`** (index: number) => number Returns the
+ min values for the index
+- **`getThumbMaxValue`** (index: number) => number Returns the
+ max values for the index
+- **`getThumbValueLabel`** (index: number) => string Returns
+ the formatted thumb value based on it's index
+- **`registerInput`** (item: Item) => void Register the inputs
+ on mount
+- **`unregisterInput`** (id: string) => void Unregister the
+ inputs on mount
+- **`setFocusedThumb`** (index: number | undefined) => void Set
+ currently Focused Thumb
+- **`setThumbValue`** (index: number, value: number) => void
+ Sets value for thumb. The actually value set will be clamped and rounded
+ according to min/max/step
+
+number
+
+number The step in which increments/decrements have to
+ be made
+- **`isDisabled`** boolean If `true`, the slider will be disabled
+- **`orientation`** "horizontal" | "vertical"
+ Orientation of the slider
+- **`reversed`** boolean Direction of the slider
+- **`trackRef`** RefObject<HTMLElement | null> The track
+ slider element.
+- **`focusedThumb`** number | undefined Currently focused thumb
+- **`getThumbValue`** (index: number) => number Get Thumb value
+ based on its index
+- **`getThumbPercent`** (index: number) => number Returns the
+ value offset as a percentage from 0 to 1.
+- **`inputs`** Item[] Get all the inputs in the DOM
+- **`setThumbValue`** (index: number, value: number) => void
+ Sets value for thumb. The actually value set will be clamped and rounded
+ according to min/max/step
+- **`setThumbEditable`** (index: number, editable: boolean) =>
+ void Set true if the thumb registered is editable
+- **`setThumbDragging`** (index: number, dragging: boolean) =>
+ void set dragging true if the thumb registered is being currently
+ dragged
+- **`setThumbPercent`** (index: number, percent: number) =>
+ void Sets value for thumb by percent offset (between 0 and 1)
+
+number[] The `value` of the slider indicator.
+
+If `undefined`/`not valid` the slider bar will be the optimum of min & max
+
+- **`isDisabled`** boolean If `true`, the slider will be disabled
+- **`orientation`** "horizontal" | "vertical"
+ Orientation of the slider
+- **`reversed`** boolean Direction of the slider
+- **`trackRef`** RefObject<HTMLElement | null> The track
+ slider element.
+- **`getThumbPercent`** (index: number) => number Returns the
+ value offset as a percentage from 0 to 1.
+- **`getPercentValue`** (percent: number) => number Converts a
+ percent along track (between 0 and 1) to the corresponding value
+- **`isThumbEditable`** (index: number) => boolean Get
+ editableThumb based on the index
+- **`isThumbDragging`** (index: number) => boolean Whether a
+ specific index is being dragged
+- **`setFocusedThumb`** (index: number | undefined) => void Set
+ currently Focused Thumb
+- **`setThumbValue`** (index: number, value: number) => void
+ Sets value for thumb. The actually value set will be clamped and rounded
+ according to min/max/step
+- **`setThumbDragging`** (index: number, dragging: boolean) =>
+ void set dragging true if the thumb registered is being currently
+ dragged
+- **`setThumbPercent`** (index: number, percent: number) =>
+ void Sets value for thumb by percent offset (between 0 and 1)
+
+boolean Whether it's visible or not.
+- **`pickerId`** string | undefined
+
+- **`dialogId`** string | undefined
+
+- **`isDisabled`** boolean | undefined
+
+- **`isReadOnly`** boolean | undefined
+
+- **`segmentFocus`** (() => void) | undefined
+
+- **`show`** () => void Changes the `visible` state to `true`
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`groups`** Group[] Lists all the composite groups with their
+ `id` and DOM `ref`. This state is automatically updated when `registerGroup`
+ and `unregisterGroup` are called.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`move`** (id: string | null) => void Moves focus to a given
+ item ID.
+- **`columnType`** "hour" | "minute" |
+ "meridian"
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`id`** string | undefined Same as the HTML attribute.
+- **`value`** number
+
+string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`registerItem`** (item: Item) => void Registers a composite
+ item.
+- **`unregisterItem`** (id: string) => void Unregisters a
+ composite item.
+- **`next`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the next item.
+- **`previous`** (unstable_allTheWay?: boolean | undefined) =>
+ void Moves focus to the previous item.
+- **`up`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item above.
+- **`down`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item below.
+- **`visible`** boolean | undefined
+
+- **`move`** (id: string | null) => void Moves focus to a given
+ item ID.
+- **`selected`** number
+
+- **`setSelected`** (value: number) => void
+
+boolean | undefined When enabled, user can hide
+ the dialog by pressing `Escape`.
+- **`hideOnClickOutside`** boolean | undefined When enabled, user
+ can hide the dialog by clicking outside it.
+- **`preventBodyScroll`** boolean | undefined When enabled, user
+ can't scroll on body when the dialog is visible. This option doesn't work if
+ the dialog isn't modal.
+- **`unstable_initialFocusRef`** โ ๏ธ
+ RefObject<HTMLElement> | undefined The element that will
+ be focused when the dialog shows. When not set, the first tabbable element
+ within the dialog will be used.
+- **`unstable_finalFocusRef`** โ ๏ธ
+ RefObject<HTMLElement> | undefined The element that will
+ be focused when the dialog hides. When not set, the disclosure component will
+ be used.
+- **`unstable_orphan`** โ ๏ธ boolean |
+undefined Whether or not the dialog should be a child of its parent.
+Opening a nested orphan dialog will close its parent dialog if
+`hideOnClickOutside` is set to `true` on the parent. It will be set to `false`
+if `modal` is `false`.
+boolean Whether it's visible or not.
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`animated`** number | boolean If `true`, `animating` will be
+ set to `true` when `visible` is updated. It'll wait for `stopAnimation` to be
+ called or a CSS transition ends. If `animated` is set to a `number`,
+ `stopAnimation` will be called only after the same number of milliseconds have
+ passed.
+- **`animating`** boolean Whether it's animating or not.
+- **`stopAnimation`** () => void Stops animation. It's called
+ automatically if there's a CSS transition.
+- **`modal`** boolean Toggles Dialog's `modal` state.
+ - Non-modal: `preventBodyScroll` doesn't work and focus is free.
+ - Modal: `preventBodyScroll` is automatically enabled, focus is trapped within
+ the dialog and the dialog is rendered within a `Portal` by default.
+- **`hide`** () => void Changes the `visible` state to `false`
+- **`dialogId`** string | undefined
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+ `disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+ form elements. In this case, only `aria-disabled` will be set.
+- **`id`** string | undefined Same as the HTML attribute.
+- **`segment`** DateSegment
+
+- **`isRequired`** boolean | undefined
+
+string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`registerItem`** (item: Item) => void Registers a composite
+ item.
+- **`unregisterItem`** (id: string) => void Unregisters a
+ composite item.
+- **`next`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the next item.
+- **`previous`** (unstable_allTheWay?: boolean | undefined) =>
+ void Moves focus to the previous item.
+- **`up`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item above.
+- **`down`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item below.
+- **`fieldValue`** Date
+
+- **`setSegment`** (part: DateTimeFormatPartTypes, v: number) =>
+ void
+
+- **`increment`** (part: DateTimeFormatPartTypes) => void
+
+- **`decrement`** (part: DateTimeFormatPartTypes) => void
+
+- **`incrementPage`** (part: DateTimeFormatPartTypes) => void
+
+- **`decrementPage`** (part: DateTimeFormatPartTypes) => void
+
+- **`dateFormatter`** DateTimeFormat
+
+- **`confirmPlaceholder`** (part: DateTimeFormatPartTypes) =>
+ void
+
+- **`isDisabled`** boolean | undefined
+
+- **`isReadOnly`** boolean | undefined
+
+- **`setFieldValue`** (value: Date) => void
+
+- **`segments`** DateSegment[]
+
+- **`setBaseId`** (value: SetStateAction<string>) =>
+ void Sets `baseId`.
+- **`rtl`** boolean Determines how `next` and `previous` functions
+ will behave. If `rtl` is set to `true`, they will be inverted. This only
+ affects the composite widget behavior. You still need to set `dir="rtl"` on
+ HTML/CSS.
+- **`groups`** Group[] Lists all the composite groups with their
+ `id` and DOM `ref`. This state is automatically updated when `registerGroup`
+ and `unregisterGroup` are called.
+- **`loop`** boolean | "horizontal" | "vertical" On
+ one-dimensional composites:
+
+ - `true` loops from the last item to the first item and vice-versa.
+ - `horizontal` loops only if `orientation` is `horizontal` or not set.
+ - `vertical` loops only if `orientation` is `vertical` or not set.
+ - If `currentId` is initially set to `null`, the composite element will be
+ focused in between the last and first items.
+
+ On two-dimensional composites:
+
+ - `true` loops from the last row/column item to the first item in the same
+ row/column and vice-versa. If it's the last item in the last row, it moves
+ to the first item in the first row and vice-versa.
+ - `horizontal` loops only from the last row item to the first item in the same
+ row.
+ - `vertical` loops only from the last column item to the first item in the
+ column row.
+ - If `currentId` is initially set to `null`, vertical loop will have no effect
+ as moving down from the last row or up from the first row will focus the
+ composite element.
+ - If `wrap` matches the value of `loop`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`shift`** boolean **Has effect only on two-dimensional
+ composites**. If enabled, moving up or down when there's no next item or the
+ next item is disabled will shift to the item right before it.
+- **`registerGroup`** (group: Group) => void Registers a
+ composite group.
+- **`unregisterGroup`** (id: string) => void Unregisters a
+ composite group.
+- **`move`** (id: string | null) => void Moves focus to a given
+ item ID.
+- **`sort`** () => void Sorts the `composite.items` based on
+ the items position in the DOM. This is especially useful after modifying the
+ composite items order in the DOM. Most of the time, though, you don't need to
+ manually call this function as the re-ordering happens automatically.
+- **`unstable_setVirtual`** โ ๏ธ (value:
+ SetStateAction<boolean>) => void Sets `virtual`.
+- **`setRTL`** (value: SetStateAction<boolean>) => void
+ Sets `rtl`.
+- **`setOrientation`**
+ (value:
+ SetStateAction<"horizontal" | "vertical... Sets
+ `orientation`.
+- **`setLoop`**
+ (value:
+ SetStateAction<boolean | "horizontal" |... Sets `loop`.
+- **`setWrap`**
+ (value:
+ SetStateAction<boolean | "horizontal" |... Sets `wrap`.
+- **`setShift`** (value: SetStateAction<boolean>) =>
+ void Sets `shift`.
+- **`reset`** () => void Resets to initial state.
+- **`visible`** boolean Whether it's visible or not.
+- **`animated`** number | boolean If `true`, `animating` will be
+ set to `true` when `visible` is updated. It'll wait for `stopAnimation` to be
+ called or a CSS transition ends. If `animated` is set to a `number`,
+ `stopAnimation` will be called only after the same number of milliseconds have
+ passed.
+- **`animating`** boolean Whether it's animating or not.
+- **`show`** () => void Changes the `visible` state to `true`
+- **`hide`** () => void Changes the `visible` state to `false`
+- **`toggle`** () => void Toggles the `visible` state
+- **`setVisible`** (value: SetStateAction<boolean>) =>
+ void Sets `visible`.
+- **`setAnimated`** (value: SetStateAction<number | boolean>)
+ => void Sets `animated`.
+- **`stopAnimation`** () => void Stops animation. It's called
+ automatically if there's a CSS transition.
+- **`modal`** boolean Toggles Dialog's `modal` state.
+ - Non-modal: `preventBodyScroll` doesn't work and focus is free.
+ - Modal: `preventBodyScroll` is automatically enabled, focus is trapped within
+ the dialog and the dialog is rendered within a `Portal` by default.
+- **`setModal`** (value: SetStateAction<boolean>) =>
+ void Sets `modal`.
+- **`unstable_referenceRef`** โ ๏ธ
+ RefObject<HTMLElement | null> The reference element.
+- **`placement`**
+ "auto-start"
+ | "auto" | "auto-end" | "top-start... Actual
+ `placement`.
+- **`place`** (value: SetStateAction<Placement>) =>
+ void Change the `placement` state.
+- **`pickerId`** string | undefined
+
+- **`dialogId`** string | undefined
+
+- **`segmentFocus`** (() => void) | undefined
+
+- **`time`** Date
+
+- **`hours`** number[]
+
+- **`minutes`** number[]
+
+- **`meridies`** string[]
+
+- **`hourState`**
+ {
+ baseId: string; unstable_idCountRef: MutableR...
+
+- **`minuteState`**
+ {
+ baseId: string; unstable_idCountRef: MutableR...
+
+- **`meridiesState`**
+ {
+ baseId: string; unstable_idCountRef: MutableR...
+
+boolean | undefined Same as the HTML attribute.
+- **`focusable`** boolean | undefined When an element is
+`disabled`, it may still be `focusable`. It works similarly to `readOnly` on
+form elements. In this case, only `aria-disabled` will be set.
+boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`groups`** Group[] Lists all the composite groups with their
+ `id` and DOM `ref`. This state is automatically updated when `registerGroup`
+ and `unregisterGroup` are called.
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`move`** (id: string | null) => void Moves focus to a given
+ item ID.
+
+boolean Whether it's visible or not.
+- **`pickerId`** string | undefined
+
+- **`dialogId`** string | undefined
+
+- **`isDisabled`** boolean | undefined
+
+- **`isReadOnly`** boolean | undefined
+
+- **`segmentFocus`** (() => void) | undefined
+
+- **`show`** () => void Changes the `visible` state to `true`
+- **`fieldValue`** Date
+
+- **`setFieldValue`** (value: Date) => void
+
+- **`segments`** DateSegment[]
+
+- **`dateFormatter`** DateTimeFormat
+
+- **`increment`** (part: DateTimeFormatPartTypes) => void
+
+- **`decrement`** (part: DateTimeFormatPartTypes) => void
+
+- **`incrementPage`** (part: DateTimeFormatPartTypes) => void
+
+- **`decrementPage`** (part: DateTimeFormatPartTypes) => void
+
+- **`setSegment`** (part: DateTimeFormatPartTypes, v: number) =>
+ void
+
+- **`confirmPlaceholder`** (part: DateTimeFormatPartTypes) =>
+ void
+
+- **`baseId`** string ID that will serve as a base for all the
+ items IDs.
+- **`setBaseId`** (value: SetStateAction<string>) =>
+ void Sets `baseId`.
+- **`unstable_virtual`** โ ๏ธ
+ boolean If enabled, the composite element will act as an
+ [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
+ container instead of
+ [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
+ DOM focus will remain on the composite while its items receive virtual focus.
+- **`rtl`** boolean Determines how `next` and `previous` functions
+ will behave. If `rtl` is set to `true`, they will be inverted. This only
+ affects the composite widget behavior. You still need to set `dir="rtl"` on
+ HTML/CSS.
+- **`orientation`** "horizontal" | "vertical" |
+ undefined Defines the orientation of the composite widget. If the
+ composite has a single row or column (one-dimensional), the `orientation`
+ value determines which arrow keys can be used to move focus:
+
+ - `undefined`: all arrow keys work.
+ - `horizontal`: only left and right arrow keys work.
+ - `vertical`: only up and down arrow keys work.
+
+ It doesn't have any effect on two-dimensional composites.
+
+- **`items`** Item[] Lists all the composite items with their `id`,
+ DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
+ updated when `registerItem` and `unregisterItem` are called.
+- **`groups`** Group[] Lists all the composite groups with their
+ `id` and DOM `ref`. This state is automatically updated when `registerGroup`
+ and `unregisterGroup` are called.
+- **`currentId`** string | null | undefined The current focused
+ item `id`.
+ - `undefined` will automatically focus the first enabled composite item.
+ - `null` will focus the base composite element and users will be able to
+ navigate out of it using arrow keys.
+ - If `currentId` is initially set to `null`, the base composite element itself
+ will have focus and users will be able to navigate to it using arrow keys.
+- **`loop`** boolean | "horizontal" | "vertical" On
+ one-dimensional composites:
+
+ - `true` loops from the last item to the first item and vice-versa.
+ - `horizontal` loops only if `orientation` is `horizontal` or not set.
+ - `vertical` loops only if `orientation` is `vertical` or not set.
+ - If `currentId` is initially set to `null`, the composite element will be
+ focused in between the last and first items.
+
+ On two-dimensional composites:
+
+ - `true` loops from the last row/column item to the first item in the same
+ row/column and vice-versa. If it's the last item in the last row, it moves
+ to the first item in the first row and vice-versa.
+ - `horizontal` loops only from the last row item to the first item in the same
+ row.
+ - `vertical` loops only from the last column item to the first item in the
+ column row.
+ - If `currentId` is initially set to `null`, vertical loop will have no effect
+ as moving down from the last row or up from the first row will focus the
+ composite element.
+ - If `wrap` matches the value of `loop`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+
+- **`wrap`** boolean | "horizontal" | "vertical"
+ **Has effect only on two-dimensional composites**. If enabled, moving to the
+ next item from the last one in a row or column will focus the first item in
+ the next row or column and vice-versa.
+ - `true` wraps between rows and columns.
+ - `horizontal` wraps only between rows.
+ - `vertical` wraps only between columns.
+ - If `loop` matches the value of `wrap`, it'll wrap between the last item in
+ the last row or column and the first item in the first row or column and
+ vice-versa.
+- **`shift`** boolean **Has effect only on two-dimensional
+ composites**. If enabled, moving up or down when there's no next item or the
+ next item is disabled will shift to the item right before it.
+- **`unstable_moves`** โ ๏ธ number
+ Stores the number of moves that have been performed by calling `move`, `next`,
+ `previous`, `up`, `down`, `first` or `last`.
+- **`registerItem`** (item: Item) => void Registers a composite
+ item.
+- **`unregisterItem`** (id: string) => void Unregisters a
+ composite item.
+- **`registerGroup`** (group: Group) => void Registers a
+ composite group.
+- **`unregisterGroup`** (id: string) => void Unregisters a
+ composite group.
+- **`move`** (id: string | null) => void Moves focus to a given
+ item ID.
+- **`next`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the next item.
+- **`previous`** (unstable_allTheWay?: boolean | undefined) =>
+ void Moves focus to the previous item.
+- **`up`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item above.
+- **`down`** (unstable_allTheWay?: boolean | undefined) => void
+ Moves focus to the item below.
+- **`first`** () => void Moves focus to the first item.
+- **`last`** () => void Moves focus to the last item.
+- **`sort`** () => void Sorts the `composite.items` based on
+ the items position in the DOM. This is especially useful after modifying the
+ composite items order in the DOM. Most of the time, though, you don't need to
+ manually call this function as the re-ordering happens automatically.
+- **`unstable_setVirtual`** โ ๏ธ (value:
+ SetStateAction<boolean>) => void Sets `virtual`.
+- **`setRTL`** (value: SetStateAction<boolean>) => void
+ Sets `rtl`.
+- **`setOrientation`**
+ (value:
+ SetStateAction<"horizontal" | "vertical... Sets
+ `orientation`.
+- **`setCurrentId`**
+ (value:
+ SetStateAction<string | null | undefine... Sets `currentId`. This
+ is different from `composite.move` as this only updates the `currentId` state
+ without moving focus. When the composite widget gets focused by the user, the
+ item referred by the `currentId` state will get focus.
+- **`setLoop`**
+ (value:
+ SetStateAction<boolean | "horizontal" |... Sets `loop`.
+- **`setWrap`**
+ (value:
+ SetStateAction<boolean | "horizontal" |... Sets `wrap`.
+- **`setShift`** (value: SetStateAction<boolean>) =>
+ void Sets `shift`.
+- **`reset`** () => void Resets to initial state.
+- **`animated`** number | boolean If `true`, `animating` will be
+ set to `true` when `visible` is updated. It'll wait for `stopAnimation` to be
+ called or a CSS transition ends. If `animated` is set to a `number`,
+ `stopAnimation` will be called only after the same number of milliseconds have
+ passed.
+- **`animating`** boolean Whether it's animating or not.
+- **`hide`** () => void Changes the `visible` state to `false`
+- **`toggle`** () => void Toggles the `visible` state
+- **`setVisible`** (value: SetStateAction<boolean>) =>
+ void Sets `visible`.
+- **`setAnimated`** (value: SetStateAction<number | boolean>)
+ => void Sets `animated`.
+- **`stopAnimation`** () => void Stops animation. It's called
+ automatically if there's a CSS transition.
+- **`modal`** boolean Toggles Dialog's `modal` state.
+ - Non-modal: `preventBodyScroll` doesn't work and focus is free.
+ - Modal: `preventBodyScroll` is automatically enabled, focus is trapped within
+ the dialog and the dialog is rendered within a `Portal` by default.
+- **`setModal`** (value: SetStateAction<boolean>) =>
+ void Sets `modal`.
+- **`unstable_referenceRef`** โ ๏ธ
+ RefObject<HTMLElement | null> The reference element.
+- **`placement`**
+ "auto-start"
+ | "auto" | "auto-end" | "top-start... Actual
+ `placement`.
+- **`place`** (value: SetStateAction<Placement>) =>
+ void Change the `placement` state.
+- **`time`** Date
+
+- **`hours`** number[]
+
+- **`minutes`** number[]
+
+- **`meridies`** string[]
+
+- **`hourState`**
+ {
+ baseId: string; unstable_idCountRef: MutableR...
+
+- **`minuteState`**
+ {
+ baseId: string; unstable_idCountRef: MutableR...
+
+- **`meridiesState`**
+ {
+ baseId: string; unstable_idCountRef: MutableR...
+
+${encode(
+ type.substring(0, 47),
+ )}...`;
+ }
+ return `${encode(type)}`;
+}
+
+/**
+ * @param {string} rootPath
+ * @param {import("ts-morph").Symbol} prop
+ */
+function createPropTypeObject(rootPath, prop) {
+ return {
+ name: prop.getEscapedName(),
+ description: getComment(prop),
+ type: getPropType(rootPath, prop),
+ };
+}
+
+/**
+ * @param {import("ts-morph").Nodefalse | undefined Allow to open multiple
- accordion items
- **`manual`** boolean Whether the accodion selection should be
manual.
- **`allowToggle`** boolean Allow to toggle accordion items
+- **`allowMultiple`** false | undefined Allow to open multiple
+ accordion items
- **`baseId`** string ID that will serve as a base for all the
items IDs.
- **`unstable_virtual`** โ ๏ธ
@@ -139,7 +139,7 @@ form elements. In this case, only `aria-disabled` will be set.
- **`items`** Item[] Lists all the composite items with their `id`,
DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
updated when `registerItem` and `unregisterItem` are called.
-- **`move`** (id: string | null) => void Moves focus to a given
+- **`move`** (id: StringOrNull) => void Moves focus to a given
item ID.
- **`setCurrentId`**
(value:
@@ -174,8 +174,8 @@ form elements. In this case, only `aria-disabled` will be set.
items
- **`selectedId`** string | null | undefined The current selected
accordion's `id`.
-- **`selectedIds`** (string | null)[] | undefined The current
- selected accordion's `id`.
+- **`selectedIds`** StringOrNull[] | undefined The current selected
+ accordion's `id`.
- **`items`** Item[] Lists all the composite items with their `id`,
DOM `ref`, `disabled` state and `groupId` if any. This state is automatically
updated when `registerItem` and `unregisterItem` are called.
@@ -251,17 +251,17 @@ form elements. In this case, only `aria-disabled` will be set.
Moves focus to the item below.
- **`manual`** boolean Whether the accodion selection should be
manual.
+- **`allowToggle`** boolean Allow to toggle accordion items
- **`allowMultiple`** boolean Allow to open multiple accordion
items
- **`selectedId`** string | null | undefined The current selected
accordion's `id`.
-- **`allowToggle`** boolean Allow to toggle accordion items
-- **`selectedIds`** (string | null)[] | undefined The current
- selected accordion's `id`.
+- **`selectedIds`** StringOrNull[] | undefined The current selected
+ accordion's `id`.
- **`panels`** Item[] Lists all the panels.
-- **`select`** (id: string | null) => void Moves into and
+- **`select`** (id: StringOrNull) => void Moves into and
selects an accordion by its `id`.
-- **`unSelect`** (id: string | null) => void Moves into and
+- **`unSelect`** (id: StringOrNull) => void Moves into and
unSelects an accordion by its `id` if it's already selected.
diff --git a/docs/breadcrumb.md b/docs/breadcrumb.md
index 59711184b..bc7e137d8 100644
--- a/docs/breadcrumb.md
+++ b/docs/breadcrumb.md
@@ -32,7 +32,7 @@ No props to show
## Composition
- BreadcrumbLink uses [useLink](./link.md)
-- Breadcrumbs uses [useBox](https://reakit.io/docs/box)
+- Breadcrumbs uses [useRole](https://reakit.io/docs/role)
## Example
diff --git a/docs/calendar.md b/docs/calendar.md
index f6d7810ae..af0872acd 100644
--- a/docs/calendar.md
+++ b/docs/calendar.md
@@ -2,9 +2,9 @@
Accessible `Calendar` component.
-[RangeCalendar - Open On Sandbox](https://codesandbox.io/s/khdp2)
+[RangeCalendar - Open On Sandbox](https://codesandbox.io/s/86dqv)
-[Calendar - Open On Sandbox](https://codesandbox.io/s/pmtcs)
+[Calendar - Open On Sandbox](https://codesandbox.io/s/qte2l)
## Props
@@ -186,13 +186,13 @@ form elements. In this case, only `aria-disabled` will be set.
## Composition
-- Calendar uses [useBox](https://reakit.io/docs/box)
+- Calendar uses [useRole](https://reakit.io/docs/role)
- CalendarButton uses [useButton](https://reakit.io/docs/button)
-- CalendarCell uses [useBox](https://reakit.io/docs/box)
+- CalendarCell uses [useRole](https://reakit.io/docs/role)
- CalendarCellButton uses [useButton](https://reakit.io/docs/button)
-- CalendarGrid uses [useBox](https://reakit.io/docs/box)
-- CalendarHeader uses [useBox](https://reakit.io/docs/box)
-- CalendarWeekTitle uses [useBox](https://reakit.io/docs/box)
+- CalendarGrid uses [useRole](https://reakit.io/docs/role)
+- CalendarHeader uses [useRole](https://reakit.io/docs/role)
+- CalendarWeekTitle uses [useRole](https://reakit.io/docs/role)
## Example
diff --git a/docs/datepicker.md b/docs/datepicker.md
index 25218cc06..3fd94d69b 100644
--- a/docs/datepicker.md
+++ b/docs/datepicker.md
@@ -2,9 +2,9 @@
Accessible `DatePicker` component.
-[DatePicker - Open On Sandbox](https://codesandbox.io/s/ixpqy)
+[RangeDatePicker - Open On Sandbox](https://codesandbox.io/s/cq9ql)
-[RangeDatePicker - Open On Sandbox](https://codesandbox.io/s/wlu79)
+[DatePicker - Open On Sandbox](https://codesandbox.io/s/4j912)
## Props
@@ -180,11 +180,11 @@ form elements. In this case, only `aria-disabled` will be set.
## Composition
-- DatePicker uses [usePickerBase](undefined)
-- DatePickerContent uses [usePickerBaseContent](undefined)
-- DatePickerSegment uses [useSegment](undefined)
-- DatePickerSegmentField uses [useSegmentField](undefined)
-- DatePickerTrigger uses [usePickerBaseTrigger](undefined)
+- DatePicker uses [usePickerBase](./picker-base.md)
+- DatePickerContent uses [usePickerBaseContent](./picker-base.md)
+- DatePickerSegment uses [useSegment](./segment.md)
+- DatePickerSegmentField uses [useSegmentField](./segment.md)
+- DatePickerTrigger uses [usePickerBaseTrigger](./picker-base.md)
## Example
diff --git a/docs/drawer.md b/docs/drawer.md
index 3860ed818..9668a32cd 100644
--- a/docs/drawer.md
+++ b/docs/drawer.md
@@ -2,7 +2,7 @@
Accessible `Drawer` component.
-[Drawer - Open On Sandbox](https://codesandbox.io/s/96zk3)
+[Drawer - Open On Sandbox](https://codesandbox.io/s/c13ec)
## Props
@@ -62,14 +62,14 @@ Accessible `Drawer` component.
## Composition
-- Drawer uses [useDialog](undefined)
-- DrawerCloseButton uses [useDialogDisclosure](undefined)
+- Drawer uses [useDialog](https://reakit.io/docs/dialog/)
+- DrawerCloseButton uses [useDialogDisclosure](https://reakit.io/docs/dialog/)
## Example
```js
import React from "react";
-import { css } from "@emotion/css";
+import { css } from "emotion";
import {
Drawer,
diff --git a/docs/meter.md b/docs/meter.md
index cd219ee66..e97a64b02 100644
--- a/docs/meter.md
+++ b/docs/meter.md
@@ -2,7 +2,7 @@
Accessible `Meter` component.
-[Meter - Open On Sandbox](https://codesandbox.io/s/vyipe)
+[Meter - Open On Sandbox](https://codesandbox.io/s/n9f9q)
## Props
@@ -12,21 +12,21 @@ Accessible `Meter` component.
- **`value`** number The `value` of the meter indicator.
-If `undefined`/`not valid` the meter bar will be equal to `min`
+ If `undefined`/`not valid` the meter bar will be equal to `min`
- **`min`** number The minimum value of the meter
- **`max`** number The maximum value of the meter
- **`low`** number The higher limit of min range.
-Defaults to `min`.
+ Defaults to `min`.
- **`optimum`** number The lower limit of max range.
-Defaults to `median of low & high`.
+ Defaults to `median of low & high`.
- **`high`** number The lower limit of max range.
-Defaults to `max`.
+ Defaults to `max`.
### `Meter`
@@ -35,7 +35,7 @@ Defaults to `max`.
- **`value`** number The `value` of the meter indicator.
-If `undefined`/`not valid` the meter bar will be equal to `min`
+ If `undefined`/`not valid` the meter bar will be equal to `min`
- **`min`** number The minimum value of the meter
- **`max`** number The maximum value of the meter
@@ -46,13 +46,13 @@ If `undefined`/`not valid` the meter bar will be equal to `min`
## Composition
-- Meter uses [useBox](https://reakit.io/docs/box)
+- Meter uses [useRole](https://reakit.io/docs/role)
## Example
```js
import * as React from "react";
-import { css, keyframes } from "@emotion/css";
+import { css, keyframes } from "emotion";
import { Meter, useMeterState } from "renderless-components";
diff --git a/docs/number-input.md b/docs/number-input.md
index 9aac8840d..fcd3776c8 100644
--- a/docs/number-input.md
+++ b/docs/number-input.md
@@ -2,7 +2,7 @@
Accessible `NumberInput` component.
-[NumberInput - Open On Sandbox](https://codesandbox.io/s/siflz)
+[NumberInput - Open On Sandbox](https://codesandbox.io/s/ybuxv)
## Props
@@ -13,15 +13,16 @@ Accessible `NumberInput` component.
- **`value`** string | number The value of the counter. Should be
less than `max` and greater than `min`
-If no value, initial value is set to `""`
+ If no value, initial value is set to `""`
- **`keepWithinRange`** boolean This controls the value update
behavior in general.
-- If `true` and you use the stepper or up/down arrow keys, the value will not
- exceed the `max` or go lower than `min`
+ - If `true` and you use the stepper or up/down arrow keys, the value will not
+ exceed the `max` or go lower than `min`
+
+ - If `false`, the value will be allowed to go out of range.
-- If `false`, the value will be allowed to go out of range.
- **`min`** number The minimum value of the counter
- **`max`** number The maximum value of the counter
- **`step`** number The step used to increment or decrement the
@@ -29,7 +30,8 @@ If no value, initial value is set to `""`
- **`precision`** number The number of decimal points used to round
the value
-If no precision, initial value is from the decimal places from value/step - `0`
+ If no precision, initial value is from the decimal places from value/step -
+ `0`
- **`defaultValue`** string | number | undefined The initial value
of the counter. Should be less than `max` and greater than `min`
@@ -59,14 +61,15 @@ value will change based on mouse wheel
- **`keepWithinRange`** boolean This controls the value update
behavior in general.
-- If `true` and you use the stepper or up/down arrow keys, the value will not
- exceed the `max` or go lower than `min`
+ - If `true` and you use the stepper or up/down arrow keys, the value will not
+ exceed the `max` or go lower than `min`
+
+ - If `false`, the value will be allowed to go out of range.
-- If `false`, the value will be allowed to go out of range.
- **`value`** string | number The value of the counter. Should be
less than `max` and greater than `min`
-If no value, initial value is set to `""`
+ If no value, initial value is set to `""`
- **`min`** number The minimum value of the counter
- **`max`** number The maximum value of the counter
@@ -100,10 +103,11 @@ form elements. In this case, only `aria-disabled` will be set.
- **`keepWithinRange`** boolean This controls the value update
behavior in general.
-- If `true` and you use the stepper or up/down arrow keys, the value will not
- exceed the `max` or go lower than `min`
+ - If `true` and you use the stepper or up/down arrow keys, the value will not
+ exceed the `max` or go lower than `min`
+
+ - If `false`, the value will be allowed to go out of range.
-- If `false`, the value will be allowed to go out of range.
- **`isAtMin`** boolean Truw, if value is equal to min.
- **`focusInput`** () => void Focus input if focus input on
value change is `true`
@@ -126,10 +130,11 @@ form elements. In this case, only `aria-disabled` will be set.
- **`keepWithinRange`** boolean This controls the value update
behavior in general.
-- If `true` and you use the stepper or up/down arrow keys, the value will not
- exceed the `max` or go lower than `min`
+ - If `true` and you use the stepper or up/down arrow keys, the value will not
+ exceed the `max` or go lower than `min`
+
+ - If `false`, the value will be allowed to go out of range.
-- If `false`, the value will be allowed to go out of range.
- **`isAtMax`** boolean True, if value is equal to max.
- **`focusInput`** () => void Focus input if focus input on
value change is `true`
@@ -142,7 +147,7 @@ form elements. In this case, only `aria-disabled` will be set.
## Composition
-- NumberInput uses [useInput](undefined)
+- NumberInput uses [useInput](https://reakit.io/docs/input/)
- NumberInputDecrementButton uses [useButton](https://reakit.io/docs/button)
- NumberInputIncrementButton uses [useButton](https://reakit.io/docs/button)
diff --git a/docs/pagination.md b/docs/pagination.md
index b6680583e..ea94b631f 100644
--- a/docs/pagination.md
+++ b/docs/pagination.md
@@ -2,7 +2,7 @@
Accessible `Pagination` component.
-[Pagination - Open On Sandbox](https://codesandbox.io/s/ugo4e)
+[Pagination - Open On Sandbox](https://codesandbox.io/s/jp1fn)
## Props
@@ -71,7 +71,7 @@ Accessible `Pagination` component.
## Composition
-- Pagination uses [useBox](https://reakit.io/docs/box)
+- Pagination uses [useRole](https://reakit.io/docs/role)
- PaginationButton uses [useButton](https://reakit.io/docs/button)
## Example
diff --git a/docs/picker-base.md b/docs/picker-base.md
index fa5773fd9..8c869b56c 100644
--- a/docs/picker-base.md
+++ b/docs/picker-base.md
@@ -2,7 +2,7 @@
Accessible `PickerBase` component.
-[PickerBase - Open On Sandbox](https://codesandbox.io/s/neryg)
+[PickerBase - Open On Sandbox](https://codesandbox.io/s/rsuxm)
## Props
@@ -96,9 +96,9 @@ form elements. In this case, only `aria-disabled` will be set.
## Composition
-- PickerBase uses [useBox](https://reakit.io/docs/box)
-- PickerBaseContent uses [usePopover](undefined)
-- PickerBaseTrigger uses [usePopoverDisclosure](undefined)
+- PickerBase uses [useRole](https://reakit.io/docs/role)
+- PickerBaseContent uses [usePopover](https://reakit.io/docs/popover/)
+- PickerBaseTrigger uses [usePopoverDisclosure](https://reakit.io/docs/popover/)
## Example
diff --git a/docs/progress.md b/docs/progress.md
index 92b5be9e7..3753ae603 100644
--- a/docs/progress.md
+++ b/docs/progress.md
@@ -12,7 +12,7 @@ Accessible `Progress` component.
- **`value`** number | null The `value` of the progress indicator.
-If `null` the progress bar will be in `indeterminate` state
+ If `null` the progress bar will be in `indeterminate` state
- **`min`** number The minimum value of the progress
- **`max`** number The maximum value of the
@@ -24,7 +24,7 @@ If `null` the progress bar will be in `indeterminate` state
- **`value`** number | null The `value` of the progress indicator.
-If `null` the progress bar will be in `indeterminate` state
+ If `null` the progress bar will be in `indeterminate` state
- **`min`** number The minimum value of the progress
- **`max`** number The maximum value of the
@@ -34,14 +34,14 @@ If `null` the progress bar will be in `indeterminate` state
## Composition
-- Progress uses [useBox](https://reakit.io/docs/box)
+- Progress uses [useRole](https://reakit.io/docs/role)
## Example
```js
import * as React from "react";
import { Button } from "reakit";
-import { css, keyframes } from "@emotion/css";
+import { css, keyframes } from "emotion";
import { cx, isNull, Progress, useProgressState } from "renderless-components";
diff --git a/docs/segment.md b/docs/segment.md
index c3d1b2f55..72ebe6bfa 100644
--- a/docs/segment.md
+++ b/docs/segment.md
@@ -2,7 +2,7 @@
Accessible `Segment` component.
-[Segment - Open On Sandbox](https://codesandbox.io/s/xiccb)
+[Segment - Open On Sandbox](https://codesandbox.io/s/pddby)
## Props
diff --git a/docs/select.md b/docs/select.md
index 70e361fb6..8e1d8f244 100644
--- a/docs/select.md
+++ b/docs/select.md
@@ -2,7 +2,7 @@
Accessible `Select` component.
-[Select - Open On Sandbox](https://codesandbox.io/s/tcnxl)
+[Select - Open On Sandbox](https://codesandbox.io/s/hrtki)
## Props
@@ -715,11 +715,12 @@ if `modal` is `false`.
## Composition
-- Select uses [usePopoverDisclosure](undefined)
+- Select uses [usePopoverDisclosure](https://reakit.io/docs/popover/)
- SelectItem uses [useCompositeItem](https://reakit.io/docs/composite)
- SelectList uses [useComposite](https://reakit.io/docs/composite)
-- SelectOption uses [useSelectItem](undefined)
-- SelectPopover uses [useSelectList](undefined) and [usePopover](undefined)
+- SelectOption uses [useSelectItem](./select.md)
+- SelectPopover uses [useSelectList](./select.md) and
+ [usePopover](https://reakit.io/docs/popover/)
## Example
diff --git a/docs/slider.md b/docs/slider.md
index 4604fae88..52599e8c0 100644
--- a/docs/slider.md
+++ b/docs/slider.md
@@ -2,7 +2,7 @@
Accessible `Slider` component.
-[Slider - Open On Sandbox](https://codesandbox.io/s/d0mp9)
+[Slider - Open On Sandbox](https://codesandbox.io/s/s20jt)
## Props
@@ -12,7 +12,7 @@ Accessible `Slider` component.
- **`values`** number[] The `value` of the slider indicator.
-If `undefined`/`not valid` the slider bar will be the optimum of min & max
+ If `undefined`/`not valid` the slider bar will be the optimum of min & max
- **`min`** number The minimum value of the slider
- **`max`** number The maximum value of the slider
@@ -111,7 +111,7 @@ If `undefined`/`not valid` the slider bar will be the optimum of min & max
- **`values`** number[] The `value` of the slider indicator.
-If `undefined`/`not valid` the slider bar will be the optimum of min & max
+ If `undefined`/`not valid` the slider bar will be the optimum of min & max
- **`isDisabled`** boolean If `true`, the slider will be disabled
- **`orientation`** "horizontal" | "vertical"
@@ -143,9 +143,9 @@ If `undefined`/`not valid` the slider bar will be the optimum of min & max
## Composition
- SliderInput uses [unstable_useId](https://reakit.io/docs/id) and
- [useInput](undefined)
-- SliderThumb uses [useBox](https://reakit.io/docs/box)
-- SliderTrack uses [useBox](https://reakit.io/docs/box)
+ [useInput](https://reakit.io/docs/input/)
+- SliderThumb uses [useRole](https://reakit.io/docs/role)
+- SliderTrack uses [useRole](https://reakit.io/docs/role)
## Example
diff --git a/docs/timepicker.md b/docs/timepicker.md
index 49f78b344..d6238b726 100644
--- a/docs/timepicker.md
+++ b/docs/timepicker.md
@@ -2,7 +2,7 @@
Accessible `TimePicker` component.
-[TimePicker - Open On Sandbox](https://codesandbox.io/s/mdhu9)
+[TimePicker - Open On Sandbox](https://codesandbox.io/s/5k3uo)
## Props
@@ -724,14 +724,14 @@ form elements. In this case, only `aria-disabled` will be set.
## Composition
-- TimePicker uses [usePickerBase](undefined)
+- TimePicker uses [usePickerBase](./picker-base.md)
- TimePickerColumn uses [useComposite](https://reakit.io/docs/composite)
- TimePickerColumnValue uses [useButton](https://reakit.io/docs/button) and
[useCompositeItem](https://reakit.io/docs/composite)
-- TimePickerContent uses [usePickerBaseContent](undefined)
-- TimePickerSegment uses [useSegment](undefined)
-- TimePickerSegmentField uses [useSegmentField](undefined)
-- TimePickerTrigger uses [usePickerBaseTrigger](undefined)
+- TimePickerContent uses [usePickerBaseContent](./picker-base.md)
+- TimePickerSegment uses [useSegment](./segment.md)
+- TimePickerSegmentField uses [useSegmentField](./segment.md)
+- TimePickerTrigger uses [usePickerBaseTrigger](./picker-base.md)
## Example
diff --git a/docs/toast.md b/docs/toast.md
index bd3ae6be5..73785c275 100644
--- a/docs/toast.md
+++ b/docs/toast.md
@@ -2,9 +2,9 @@
Accessible `Toast` component.
-[Toast CSS Animated - Open On Sandbox](https://codesandbox.io/s/ze954)
+[Toast - Open On Sandbox](https://codesandbox.io/s/fkpd6)
-[Toast - Open On Sandbox](https://codesandbox.io/s/clz0m)
+[Toast CSS Animated - Open On Sandbox](https://codesandbox.io/s/dwkcp)
## Example
diff --git a/scripts/utils/inject-composition.js b/scripts/utils/inject-composition.js
index 8ff4a0d47..d9552f6fe 100644
--- a/scripts/utils/inject-composition.js
+++ b/scripts/utils/inject-composition.js
@@ -63,11 +63,24 @@ function getMarkdown(compose) {
useComposite: "https://reakit.io/docs/composite",
useCompositeItem: "https://reakit.io/docs/composite",
unstable_useId: "https://reakit.io/docs/id",
+ useDialog: "https://reakit.io/docs/dialog/",
+ useDialogDisclosure: "https://reakit.io/docs/dialog/",
useDisclosureContent: "https://reakit.io/docs/disclosure",
+ usePopover: "https://reakit.io/docs/popover/",
+ usePopoverDisclosure: "https://reakit.io/docs/popover/",
useButton: "https://reakit.io/docs/button",
useBox: "https://reakit.io/docs/box",
+ useRole: "https://reakit.io/docs/role",
+ useInput: "https://reakit.io/docs/input/",
useClickable: "https://reakit.io/docs/clickable",
useLink: "./link.md",
+ usePickerBase: "./picker-base.md",
+ usePickerBaseContent: "./picker-base.md",
+ usePickerBaseTrigger: "./picker-base.md",
+ useSegment: "./segment.md",
+ useSegmentField: "./segment.md",
+ useSelectItem: "./select.md",
+ useSelectList: "./select.md",
};
const formatter = new Intl.ListFormat("en", {
diff --git a/yarn.lock b/yarn.lock
index ca776a0af..31ba68c55 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1122,11 +1122,7 @@
dependencies:
regenerator-runtime "^0.13.4"
-<<<<<<< HEAD
-"@babel/runtime@^7.12.1":
-=======
-"@babel/runtime@^7.12.5":
->>>>>>> master
+"@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5":
version "7.12.5"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e"
integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==
@@ -1632,6 +1628,13 @@
slash "^3.0.0"
strip-ansi "^6.0.0"
+"@jest/create-cache-key-function@^26.5.0":
+ version "26.6.2"
+ resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-26.6.2.tgz#04cf439207a4fd12418d8aee551cddc86f9ac5f5"
+ integrity sha512-LgEuqU1f/7WEIPYqwLPIvvHuc1sB6gMVbT6zWhin3txYUNYK/kGQrC1F2WR4gR34YlI9bBtViTm5z98RqVZAaw==
+ dependencies:
+ "@jest/types" "^26.6.2"
+
"@jest/environment@^26.6.2":
version "26.6.2"
resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c"
@@ -3013,10 +3016,10 @@
"@babel/runtime" "^7.12.5"
"@testing-library/dom" "^7.27.1"
-"@testing-library/user-event@12.2.2":
- version "12.2.2"
- resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-12.2.2.tgz#22d0047da745289335240f523dfe74c889ec96cb"
- integrity sha512-mTYL9LrwiSeyorStUOMuRGQDn1ca40tIhuv//o/K3lY8wBEp+9Im90MFVx5i3u7zCPmavn3uWZs/10chsbI8Tg==
+"@testing-library/user-event@12.1.10":
+ version "12.1.10"
+ resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-12.1.10.tgz#e043ef5aa10e4b3e56b434e383d2fbfef1fcfb7f"
+ integrity sha512-StlNdKHp2Rpb7yrny/5/CGpz8bR3jLa1Ge59ODGU6TmAhkrxSpvR6tCD1gaMFkkjEUWkmmye8BaXsZPcaiJ6Ug==
dependencies:
"@babel/runtime" "^7.10.2"
@@ -3497,61 +3500,61 @@
dependencies:
"@types/yargs-parser" "*"
-"@typescript-eslint/eslint-plugin@4.8.1":
- version "4.8.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.1.tgz#b362abe0ee478a6c6d06c14552a6497f0b480769"
- integrity sha512-d7LeQ7dbUrIv5YVFNzGgaW3IQKMmnmKFneRWagRlGYOSfLJVaRbj/FrBNOBC1a3tVO+TgNq1GbHvRtg1kwL0FQ==
+"@typescript-eslint/eslint-plugin@4.6.0":
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.6.0.tgz#210cd538bb703f883aff81d3996961f5dba31fdb"
+ integrity sha512-1+419X+Ynijytr1iWI+/IcX/kJryc78YNpdaXR1aRO1sU3bC0vZrIAF1tIX7rudVI84W7o7M4zo5p1aVt70fAg==
dependencies:
- "@typescript-eslint/experimental-utils" "4.8.1"
- "@typescript-eslint/scope-manager" "4.8.1"
+ "@typescript-eslint/experimental-utils" "4.6.0"
+ "@typescript-eslint/scope-manager" "4.6.0"
debug "^4.1.1"
functional-red-black-tree "^1.0.1"
regexpp "^3.0.0"
semver "^7.3.2"
tsutils "^3.17.1"
-"@typescript-eslint/experimental-utils@4.8.1":
- version "4.8.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.1.tgz#27275c20fa4336df99ebcf6195f7d7aa7aa9f22d"
- integrity sha512-WigyLn144R3+lGATXW4nNcDJ9JlTkG8YdBWHkDlN0lC3gUGtDi7Pe3h5GPvFKMcRz8KbZpm9FJV9NTW8CpRHpg==
+"@typescript-eslint/experimental-utils@4.6.0":
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.6.0.tgz#f750aef4dd8e5970b5c36084f0a5ca2f0db309a4"
+ integrity sha512-pnh6Beh2/4xjJVNL+keP49DFHk3orDHHFylSp3WEjtgW3y1U+6l+jNnJrGlbs6qhAz5z96aFmmbUyKhunXKvKw==
dependencies:
"@types/json-schema" "^7.0.3"
- "@typescript-eslint/scope-manager" "4.8.1"
- "@typescript-eslint/types" "4.8.1"
- "@typescript-eslint/typescript-estree" "4.8.1"
+ "@typescript-eslint/scope-manager" "4.6.0"
+ "@typescript-eslint/types" "4.6.0"
+ "@typescript-eslint/typescript-estree" "4.6.0"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"
-"@typescript-eslint/parser@4.8.1":
- version "4.8.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.8.1.tgz#4fe2fbdbb67485bafc4320b3ae91e34efe1219d1"
- integrity sha512-QND8XSVetATHK9y2Ltc/XBl5Ro7Y62YuZKnPEwnNPB8E379fDsvzJ1dMJ46fg/VOmk0hXhatc+GXs5MaXuL5Uw==
+"@typescript-eslint/parser@4.6.0":
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.0.tgz#7e9ff7df2f21d5c8f65f17add3b99eeeec33199d"
+ integrity sha512-Dj6NJxBhbdbPSZ5DYsQqpR32MwujF772F2H3VojWU6iT4AqL4BKuoNWOPFCoSZvCcADDvQjDpa6OLDAaiZPz2Q==
dependencies:
- "@typescript-eslint/scope-manager" "4.8.1"
- "@typescript-eslint/types" "4.8.1"
- "@typescript-eslint/typescript-estree" "4.8.1"
+ "@typescript-eslint/scope-manager" "4.6.0"
+ "@typescript-eslint/types" "4.6.0"
+ "@typescript-eslint/typescript-estree" "4.6.0"
debug "^4.1.1"
-"@typescript-eslint/scope-manager@4.8.1":
- version "4.8.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.1.tgz#e343c475f8f1d15801b546cb17d7f309b768fdce"
- integrity sha512-r0iUOc41KFFbZdPAdCS4K1mXivnSZqXS5D9oW+iykQsRlTbQRfuFRSW20xKDdYiaCoH+SkSLeIF484g3kWzwOQ==
+"@typescript-eslint/scope-manager@4.6.0":
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.0.tgz#b7d8b57fe354047a72dfb31881d9643092838662"
+ integrity sha512-uZx5KvStXP/lwrMrfQQwDNvh2ppiXzz5TmyTVHb+5TfZ3sUP7U1onlz3pjoWrK9konRyFe1czyxObWTly27Ang==
dependencies:
- "@typescript-eslint/types" "4.8.1"
- "@typescript-eslint/visitor-keys" "4.8.1"
+ "@typescript-eslint/types" "4.6.0"
+ "@typescript-eslint/visitor-keys" "4.6.0"
-"@typescript-eslint/types@4.8.1":
- version "4.8.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.1.tgz#23829c73c5fc6f4fcd5346a7780b274f72fee222"
- integrity sha512-ave2a18x2Y25q5K05K/U3JQIe2Av4+TNi/2YuzyaXLAsDx6UZkz1boZ7nR/N6Wwae2PpudTZmHFXqu7faXfHmA==
+"@typescript-eslint/types@4.6.0":
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.0.tgz#157ca925637fd53c193c6bf226a6c02b752dde2f"
+ integrity sha512-5FAgjqH68SfFG4UTtIFv+rqYJg0nLjfkjD0iv+5O27a0xEeNZ5rZNDvFGZDizlCD1Ifj7MAbSW2DPMrf0E9zjA==
-"@typescript-eslint/typescript-estree@4.8.1":
- version "4.8.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.1.tgz#7307e3f2c9e95df7daa8dc0a34b8c43b7ec0dd32"
- integrity sha512-bJ6Fn/6tW2g7WIkCWh3QRlaSU7CdUUK52shx36/J7T5oTQzANvi6raoTsbwGM11+7eBbeem8hCCKbyvAc0X3sQ==
+"@typescript-eslint/typescript-estree@4.6.0":
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.0.tgz#85bd98dcc8280511cfc5b2ce7b03a9ffa1732b08"
+ integrity sha512-s4Z9qubMrAo/tw0CbN0IN4AtfwuehGXVZM0CHNMdfYMGBDhPdwTEpBrecwhP7dRJu6d9tT9ECYNaWDHvlFSngA==
dependencies:
- "@typescript-eslint/types" "4.8.1"
- "@typescript-eslint/visitor-keys" "4.8.1"
+ "@typescript-eslint/types" "4.6.0"
+ "@typescript-eslint/visitor-keys" "4.6.0"
debug "^4.1.1"
globby "^11.0.1"
is-glob "^4.0.1"
@@ -3559,12 +3562,12 @@
semver "^7.3.2"
tsutils "^3.17.1"
-"@typescript-eslint/visitor-keys@4.8.1":
- version "4.8.1"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.1.tgz#794f68ee292d1b2e3aa9690ebedfcb3a8c90e3c3"
- integrity sha512-3nrwXFdEYALQh/zW8rFwP4QltqsanCDz4CwWMPiIZmwlk9GlvBeueEIbq05SEq4ganqM0g9nh02xXgv5XI3PeQ==
+"@typescript-eslint/visitor-keys@4.6.0":
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.0.tgz#fb05d6393891b0a089b243fc8f9fb8039383d5da"
+ integrity sha512-38Aa9Ztl0XyFPVzmutHXqDMCu15Xx8yKvUo38Gu3GhsuckCh3StPI5t2WIO9LHEsOH7MLmlGfKUisU8eW1Sjhg==
dependencies:
- "@typescript-eslint/types" "4.8.1"
+ "@typescript-eslint/types" "4.6.0"
eslint-visitor-keys "^2.0.0"
"@vivaxy/git@^4.1.1":
@@ -7933,11 +7936,7 @@ fastq@^1.6.0:
dependencies:
reusify "^1.0.4"
-<<<<<<< HEAD
-fault@^1.0.1, fault@^1.0.2:
-=======
-fault@^1.0.0, fault@^1.0.2:
->>>>>>> master
+fault@^1.0.0, fault@^1.0.1, fault@^1.0.2:
version "1.0.4"
resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.4.tgz#eafcfc0a6d214fc94601e170df29954a4f842f13"
integrity sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==
@@ -13154,16 +13153,12 @@ pify@^4.0.1:
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
-<<<<<<< HEAD
pify@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f"
integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==
-pinkie-promise@^2.0.0:
-=======
pinkie-promise@^2.0.0, pinkie-promise@^2.0.1:
->>>>>>> master
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o=
@@ -14411,7 +14406,6 @@ remark-footnotes@2.0.0:
resolved "https://registry.yarnpkg.com/remark-footnotes/-/remark-footnotes-2.0.0.tgz#9001c4c2ffebba55695d2dd80ffb8b82f7e6303f"
integrity sha512-3Clt8ZMH75Ayjp9q4CorNeyjwIxHFcTkaektplKGl2A1jNGEUey8cKL0ZC5vJwfcD5GFGsNLImLG/NGzWIzoMQ==
-<<<<<<< HEAD
remark-frontmatter@^1.2.0:
version "1.3.3"
resolved "https://registry.yarnpkg.com/remark-frontmatter/-/remark-frontmatter-1.3.3.tgz#67ec63c89da5a84bb793ecec166e11b4eb47af10"
@@ -14420,16 +14414,10 @@ remark-frontmatter@^1.2.0:
fault "^1.0.1"
xtend "^4.0.1"
-remark-mdx@1.6.18:
- version "1.6.18"
- resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-1.6.18.tgz#d8c76017c95824cc7fb853bb2759add8ba0cf319"
- integrity sha512-xNhjv4kJZ8L6RV68yK8fQ6XWlvSIFOE5VPmM7wMKSwkvwBu6tlUJy0gRF2WiZ4fPPOj6jpqlVB9QakipvZuEqg==
-=======
remark-mdx@1.6.21:
version "1.6.21"
resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-1.6.21.tgz#0c1a7e042e50938ff89ad8dd7e8e219d4b0404ce"
integrity sha512-IGb3l46a6NFi62egT+WXeTT3T8wYTunmPCEGTfDO6oRAfuss9VAb/3InVCKKGXXoiNi0mTuplI0EFusdCLGk3A==
->>>>>>> master
dependencies:
"@babel/core" "7.11.6"
"@babel/helper-plugin-utils" "7.10.4"
@@ -16147,12 +16135,6 @@ tr46@^2.0.2:
dependencies:
punycode "^2.1.1"
-<<<<<<< HEAD
-traverse@^0.6.6:
- version "0.6.6"
- resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137"
- integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=
-=======
trash@^6.1.1:
version "6.1.1"
resolved "https://registry.yarnpkg.com/trash/-/trash-6.1.1.tgz#8fb863421b31f32571f2650b53534934d5e63025"
@@ -16167,7 +16149,11 @@ trash@^6.1.1:
p-try "^2.2.0"
uuid "^3.3.2"
xdg-trashdir "^2.1.1"
->>>>>>> master
+
+traverse@^0.6.6:
+ version "0.6.6"
+ resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137"
+ integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=
tree-kill@^1.2.2:
version "1.2.2"
@@ -16224,11 +16210,12 @@ ts-essentials@^2.0.3:
resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745"
integrity sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w==
-ts-jest@26.4.4:
- version "26.4.4"
- resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.4.tgz#61f13fb21ab400853c532270e52cc0ed7e502c49"
- integrity sha512-3lFWKbLxJm34QxyVNNCgXX1u4o/RV0myvA2y2Bxm46iGIjKlaY0own9gIckbjZJPn+WaJEnfPPJ20HHGpoq4yg==
+ts-jest@26.4.3:
+ version "26.4.3"
+ resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.3.tgz#d153a616033e7ec8544b97ddbe2638cbe38d53db"
+ integrity sha512-pFDkOKFGY+nL9v5pkhm+BIFpoAuno96ff7GMnIYr/3L6slFOS365SI0fGEVYx2RKGji5M2elxhWjDMPVcOCdSw==
dependencies:
+ "@jest/create-cache-key-function" "^26.5.0"
"@types/jest" "26.x"
bs-logger "0.x"
buffer-from "1.x"
@@ -16241,11 +16228,7 @@ ts-jest@26.4.4:
semver "7.x"
yargs-parser "20.x"
-<<<<<<< HEAD
ts-morph@^8.2.0:
-=======
-ts-morph@8.2.0:
->>>>>>> master
version "8.2.0"
resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-8.2.0.tgz#41d83cd501cbd897eb029ac489d6d5b927555c57"
integrity sha512-NHHWu+7I2/AOZiTni5w3f+xCfIxrkzPCcQbTGa81Yk3pr23a4h9xLLEE6tIGuYIubWjkjr9QVC3ITqgmA5touQ==
@@ -16405,17 +16388,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
-<<<<<<< HEAD
typescript@4.0.5, typescript@~4.0.2:
version "4.0.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389"
integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==
-=======
-typescript@4.1.2:
- version "4.1.2"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
- integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==
->>>>>>> master
uglify-js@^3.1.4:
version "3.11.2"
@@ -17244,19 +17220,17 @@ ws@^7.2.3:
resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8"
integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==
-<<<<<<< HEAD
x-is-string@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/x-is-string/-/x-is-string-0.1.0.tgz#474b50865af3a49a9c4657f05acd145458f77d82"
integrity sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=
-=======
+
xdg-basedir@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-2.0.0.tgz#edbc903cc385fc04523d966a335504b5504d1bd2"
integrity sha1-7byQPMOF/ARSPZZqM1UEtVBNG9I=
dependencies:
os-homedir "^1.0.0"
->>>>>>> master
xdg-basedir@^3.0.0:
version "3.0.0"
From 526a28b56ac44233d46de7979d09028cea0dcab3 Mon Sep 17 00:00:00 2001
From: Navin
Date: Wed, 2 Dec 2020 19:03:30 +0530
Subject: [PATCH 12/12] =?UTF-8?q?build(utils):=20=F0=9F=92=9A=20=20fix=20t?=
=?UTF-8?q?he=20build=20with=20utils=20&=20csb=20links?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
scripts/generate-js.js | 2 +-
scripts/transpile-ts.js | 1 +
scripts/utils/inject-csb-links.js | 4 ++--
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/generate-js.js b/scripts/generate-js.js
index 8d6844c96..1ef9e2084 100644
--- a/scripts/generate-js.js
+++ b/scripts/generate-js.js
@@ -10,7 +10,7 @@ const {
createFile,
getDirectories,
createDirectory,
-} = require("./fs-utils");
+} = require("./utils/fs-utils");
const transpileTs = require("./transpile-ts");
// -> get all the component folders [accordion, breadcrumb...]
diff --git a/scripts/transpile-ts.js b/scripts/transpile-ts.js
index 8d7637f26..fffadd0c0 100644
--- a/scripts/transpile-ts.js
+++ b/scripts/transpile-ts.js
@@ -1,6 +1,7 @@
const ts = require("typescript");
const prettier = require("prettier/standalone");
const parserBabel = require("prettier/parser-babel");
+
const prettierConfig = require("../.prettierrc.json");
module.exports = function transformTs(file) {
diff --git a/scripts/utils/inject-csb-links.js b/scripts/utils/inject-csb-links.js
index 6bb8bb1cf..ad8186da7 100644
--- a/scripts/utils/inject-csb-links.js
+++ b/scripts/utils/inject-csb-links.js
@@ -82,8 +82,8 @@ const getSandboxDefineLink = (files, extraDeps) => {
ReactDOM.render( , rootElement);
`,
},
- "src/App.js": files.js && { content: files.js },
- "src/styles.css": files.css && { content: files.css },
+ "src/App.js": files.js ? { content: files.js } : "",
+ "src/styles.css": files.css ? { content: files.css } : "",
"src/Utils.component.js": files.utils && {
content: files.utils,
},