@pexip/components 20.0.0 → 20.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +204 -0
- package/api-docs/README.mdx +11 -2
- package/api-docs/enumerations/TestId.mdx +1 -0
- package/api-docs/functions/announce.mdx +1 -1
- package/api-docs/functions/onEnter.mdx +3 -3
- package/api-docs/functions/sizeToPadding.mdx +16 -6
- package/api-docs/functions/useBoundingRect.mdx +42 -0
- package/api-docs/functions/useBreakpointChange.mdx +1 -1
- package/api-docs/functions/useFocusFrom.mdx +2 -2
- package/api-docs/functions/useFocusFromOpened.mdx +1 -1
- package/api-docs/functions/useGroupedPagesNav.mdx +2 -2
- package/api-docs/functions/useInput.mdx +4 -2
- package/api-docs/functions/useModal.mdx +2 -2
- package/api-docs/functions/useModalHandle.mdx +1 -1
- package/api-docs/functions/useModalWithoutPreventScroll.mdx +2 -2
- package/api-docs/functions/useMultistepIndicator.mdx +24 -8
- package/api-docs/functions/useOutOfViewNavigation.mdx +4 -4
- package/api-docs/functions/useScrollIntoView.mdx +3 -3
- package/api-docs/functions/useTabs.mdx +1 -1
- package/api-docs/functions/withColorScheme.mdx +3 -3
- package/api-docs/functions/withTabName.mdx +2 -2
- package/api-docs/functions/withTransition.mdx +6 -4
- package/api-docs/interfaces/FullSizeWindowCommonProps.mdx +4 -4
- package/api-docs/interfaces/IconCollection.mdx +7 -0
- package/api-docs/interfaces/IconSource.mdx +3 -3
- package/api-docs/interfaces/LoadingBoxProps.mdx +5 -3
- package/api-docs/interfaces/ModalHandle.mdx +1 -1
- package/api-docs/interfaces/MultistepItem.mdx +1 -1
- package/api-docs/interfaces/StatCardRowData.mdx +5 -5
- package/api-docs/interfaces/ToastProps.mdx +3 -3
- package/api-docs/interfaces/VideoHandle.mdx +2 -2
- package/api-docs/interfaces/WithTransitionProps.mdx +1 -0
- package/api-docs/type-aliases/ActivityCardAction.mdx +1 -1
- package/api-docs/type-aliases/AriaMenuItem.mdx +9 -1
- package/api-docs/type-aliases/AriaMenuProps.mdx +5 -1
- package/api-docs/type-aliases/AriaSubMenu.mdx +27 -0
- package/api-docs/type-aliases/AriaSubMenuContentHelpers.mdx +13 -0
- package/api-docs/type-aliases/BreadcrumbItem.mdx +1 -1
- package/api-docs/type-aliases/ClickEventHandler.mdx +1 -1
- package/api-docs/type-aliases/MenuAction.mdx +1 -1
- package/api-docs/type-aliases/MenuItem.mdx +5 -4
- package/api-docs/type-aliases/MultiselectCoreProps.mdx +3 -0
- package/api-docs/type-aliases/MultiselectOption.mdx +1 -1
- package/api-docs/type-aliases/NotificationToastMessage.mdx +1 -1
- package/api-docs/type-aliases/NotificationTooltipPosition.mdx +3 -1
- package/api-docs/type-aliases/NotificationTooltipProps.mdx +3 -0
- package/api-docs/type-aliases/Option.mdx +1 -1
- package/api-docs/type-aliases/SelectProps.mdx +3 -3
- package/api-docs/type-aliases/TagItem.mdx +2 -2
- package/api-docs/variables/AriaMenu.mdx +3 -1
- package/api-docs/variables/Draggable.mdx +51 -0
- package/api-docs/variables/KEYBOARD_EVENT_KEY.mdx +16 -0
- package/api-docs/variables/MultiselectCore.mdx +27 -0
- package/api-docs/variables/MultistepIndicator.mdx +1 -0
- package/api-docs/variables/PreferenceInput.mdx +1 -0
- package/api-docs/variables/Select.mdx +2 -2
- package/api-docs/variables/Sheet.mdx +9 -1
- package/api-docs/variables/Toast.mdx +3 -1
- package/api-docs/variables/ToggleSwitchDisplay.mdx +16 -0
- package/api-docs/variables/buttonVariantsValues.mdx +3 -0
- package/design-tokens/mixins/_focus.scss +54 -10
- package/design-tokens/mixins/media-queries.scss +12 -0
- package/design-tokens/variables.legacy.scss +8 -0
- package/dist/components-no-global-styles.css +1 -1
- package/dist/components.cjs +2 -2
- package/dist/components.css +1 -1
- package/dist/components.js +6253 -8056
- package/dist/types/design-tokens/generated/Icons.d.ts +7 -0
- package/dist/types/design-tokens/generated/Icons.d.ts.map +1 -1
- package/dist/types/src/components/elements/ActionsRow/ActionsRow.d.ts +1 -0
- package/dist/types/src/components/elements/ActionsRow/ActionsRow.d.ts.map +1 -1
- package/dist/types/src/components/elements/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/types/src/components/elements/Draggable/Draggable.view.d.ts +43 -0
- package/dist/types/src/components/elements/Draggable/Draggable.view.d.ts.map +1 -1
- package/dist/types/src/components/elements/Input/Input.d.ts +1 -0
- package/dist/types/src/components/elements/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/elements/ListBoxLink/ListBoxLink.d.ts +2 -2
- package/dist/types/src/components/elements/ListBoxLink/ListBoxLink.d.ts.map +1 -1
- package/dist/types/src/components/elements/ListLink/ListLink.d.ts +8 -5
- package/dist/types/src/components/elements/ListLink/ListLink.d.ts.map +1 -1
- package/dist/types/src/components/elements/Panel/Panel.d.ts +1 -0
- package/dist/types/src/components/elements/Panel/Panel.d.ts.map +1 -1
- package/dist/types/src/components/elements/Scrollbars/Scrollbars.d.ts +0 -1
- package/dist/types/src/components/elements/Scrollbars/Scrollbars.d.ts.map +1 -1
- package/dist/types/src/components/elements/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/dist/types/src/components/elements/ToggleSwitch/ToggleSwitchDisplay.d.ts +28 -0
- package/dist/types/src/components/elements/ToggleSwitch/ToggleSwitchDisplay.d.ts.map +1 -0
- package/dist/types/src/components/elements/Tooltip/NotificationTooltip.d.ts +1 -2
- package/dist/types/src/components/elements/Tooltip/NotificationTooltip.d.ts.map +1 -1
- package/dist/types/src/components/elements/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/src/components/modules/AriaMenu/AriaMenu.d.ts +3 -1
- package/dist/types/src/components/modules/AriaMenu/AriaMenu.d.ts.map +1 -1
- package/dist/types/src/components/modules/AriaMenu/AriaMenu.types.d.ts +121 -1
- package/dist/types/src/components/modules/AriaMenu/AriaMenu.types.d.ts.map +1 -1
- package/dist/types/src/components/modules/AriaMenu/InnerAriaMenu.d.ts +32 -4
- package/dist/types/src/components/modules/AriaMenu/InnerAriaMenu.d.ts.map +1 -1
- package/dist/types/src/components/modules/AriaMenu/InnerAriaMenuButton.d.ts +3 -6
- package/dist/types/src/components/modules/AriaMenu/InnerAriaMenuButton.d.ts.map +1 -1
- package/dist/types/src/components/modules/AriaMenu/InnerAriaMenuItem.d.ts +3 -0
- package/dist/types/src/components/modules/AriaMenu/InnerAriaMenuItem.d.ts.map +1 -1
- package/dist/types/src/components/modules/AriaMenu/InnerAriaMenuNavigator.d.ts +22 -0
- package/dist/types/src/components/modules/AriaMenu/InnerAriaMenuNavigator.d.ts.map +1 -0
- package/dist/types/src/components/modules/AriaMenu/InnerAriaMenuPopover.d.ts.map +1 -1
- package/dist/types/src/components/modules/Avatar/Avatar.utils.d.ts +2 -2
- package/dist/types/src/components/modules/Avatar/Avatar.utils.d.ts.map +1 -1
- package/dist/types/src/components/modules/Captions/Captions.view.d.ts +1 -0
- package/dist/types/src/components/modules/Captions/Captions.view.d.ts.map +1 -1
- package/dist/types/src/components/modules/CondensedTabs/CondensedTabs.view.d.ts +1 -0
- package/dist/types/src/components/modules/CondensedTabs/CondensedTabs.view.d.ts.map +1 -1
- package/dist/types/src/components/modules/ConfirmationModal/ConfirmationModal.d.ts +2 -0
- package/dist/types/src/components/modules/ConfirmationModal/ConfirmationModal.d.ts.map +1 -1
- package/dist/types/src/components/modules/DropContent/DropContent.d.ts.map +1 -1
- package/dist/types/src/components/modules/Menu/Menu.d.ts +3 -1
- package/dist/types/src/components/modules/Menu/Menu.d.ts.map +1 -1
- package/dist/types/src/components/modules/Menu/types.d.ts +4 -2
- package/dist/types/src/components/modules/Menu/types.d.ts.map +1 -1
- package/dist/types/src/components/modules/Modal/Modal.d.ts +2 -0
- package/dist/types/src/components/modules/Modal/Modal.d.ts.map +1 -1
- package/dist/types/src/components/modules/Multiselect/ConfirmableMultiselect.d.ts.map +1 -1
- package/dist/types/src/components/modules/Multiselect/Multiselect.d.ts +8 -0
- package/dist/types/src/components/modules/Multiselect/Multiselect.d.ts.map +1 -1
- package/dist/types/src/components/modules/Multiselect/MultiselectCore.d.ts.map +1 -1
- package/dist/types/src/components/modules/MultistepIndicator/MultistepIndicator.d.ts +1 -0
- package/dist/types/src/components/modules/MultistepIndicator/MultistepIndicator.d.ts.map +1 -1
- package/dist/types/src/components/modules/MultistepIndicator/MultistepIndicator.utils.d.ts +1 -2
- package/dist/types/src/components/modules/MultistepIndicator/MultistepIndicator.utils.d.ts.map +1 -1
- package/dist/types/src/components/modules/MultistepIndicator/OrdinalText.view.d.ts.map +1 -1
- package/dist/types/src/components/modules/PopOutWindow/PopOutWindow.d.ts.map +1 -1
- package/dist/types/src/components/modules/PopOutWindow/copyStyles.d.ts +23 -0
- package/dist/types/src/components/modules/PopOutWindow/copyStyles.d.ts.map +1 -0
- package/dist/types/src/components/modules/PreferenceInput/PreferenceInput.d.ts +2 -0
- package/dist/types/src/components/modules/PreferenceInput/PreferenceInput.d.ts.map +1 -1
- package/dist/types/src/components/modules/Sheet/Sheet.d.ts +12 -1
- package/dist/types/src/components/modules/Sheet/Sheet.d.ts.map +1 -1
- package/dist/types/src/components/modules/TransitionContainer/withTransition.d.ts +1 -0
- package/dist/types/src/components/modules/TransitionContainer/withTransition.d.ts.map +1 -1
- package/dist/types/src/constants/keyboard.d.ts +2 -0
- package/dist/types/src/constants/keyboard.d.ts.map +1 -1
- package/dist/types/src/exports.d.ts +8 -1
- package/dist/types/src/exports.d.ts.map +1 -1
- package/dist/types/src/hooks/useAriaTooltip.d.ts +9 -3
- package/dist/types/src/hooks/useAriaTooltip.d.ts.map +1 -1
- package/dist/types/src/hooks/useBoundingRect.d.ts +27 -0
- package/dist/types/src/hooks/useBoundingRect.d.ts.map +1 -0
- package/dist/types/src/types/sizes.d.ts +1 -1
- package/dist/types/src/types/sizes.d.ts.map +1 -1
- package/dist/types/src/utils/imageSrc.d.ts +1 -1
- package/dist/types/src/utils/testIds.d.ts +1 -0
- package/dist/types/src/utils/testIds.d.ts.map +1 -1
- package/package.json +15 -26
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
| Property | Type |
|
|
4
4
|
| ------ | ------ |
|
|
5
|
-
| <a id="padding"></a> `padding?` | `"small"
|
|
6
|
-
| <a id="flexdirection"></a> `flexDirection?` | `"column"
|
|
7
|
-
| <a id="justifycontent"></a> `justifyContent?` | `"center"
|
|
8
|
-
| <a id="position"></a> `position?` | `"fixed"
|
|
5
|
+
| <a id="padding"></a> `padding?` | `"small" \| "none"` |
|
|
6
|
+
| <a id="flexdirection"></a> `flexDirection?` | `"column" \| "row" \| "rowReverse" \| "columnReverse"` |
|
|
7
|
+
| <a id="justifycontent"></a> `justifyContent?` | `"center" \| "flexStart"` |
|
|
8
|
+
| <a id="position"></a> `position?` | `"fixed" \| "absolute"` |
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
| <a id="iconaudiotransmission"></a> `IconAudioTransmission` | [`IconSource`](IconSource.mdx) |
|
|
22
22
|
| <a id="iconauthenticated"></a> `IconAuthenticated` | [`IconSource`](IconSource.mdx) |
|
|
23
23
|
| <a id="iconbackgroundblur"></a> `IconBackgroundBlur` | [`IconSource`](IconSource.mdx) |
|
|
24
|
+
| <a id="iconbackgroundblurlight"></a> `IconBackgroundBlurLight` | [`IconSource`](IconSource.mdx) |
|
|
25
|
+
| <a id="iconbackgroundblurstrong"></a> `IconBackgroundBlurStrong` | [`IconSource`](IconSource.mdx) |
|
|
24
26
|
| <a id="iconbackgroundreplace"></a> `IconBackgroundReplace` | [`IconSource`](IconSource.mdx) |
|
|
25
27
|
| <a id="iconbackspace"></a> `IconBackspace` | [`IconSource`](IconSource.mdx) |
|
|
26
28
|
| <a id="iconbacktotop"></a> `IconBackToTop` | [`IconSource`](IconSource.mdx) |
|
|
@@ -78,6 +80,7 @@
|
|
|
78
80
|
| <a id="iconimport"></a> `IconImport` | [`IconSource`](IconSource.mdx) |
|
|
79
81
|
| <a id="iconinforound"></a> `IconInfoRound` | [`IconSource`](IconSource.mdx) |
|
|
80
82
|
| <a id="iconkey"></a> `IconKey` | [`IconSource`](IconSource.mdx) |
|
|
83
|
+
| <a id="iconlanguage"></a> `IconLanguage` | [`IconSource`](IconSource.mdx) |
|
|
81
84
|
| <a id="iconleave"></a> `IconLeave` | [`IconSource`](IconSource.mdx) |
|
|
82
85
|
| <a id="iconlink"></a> `IconLink` | [`IconSource`](IconSource.mdx) |
|
|
83
86
|
| <a id="iconlivecaption"></a> `IconLiveCaption` | [`IconSource`](IconSource.mdx) |
|
|
@@ -97,6 +100,7 @@
|
|
|
97
100
|
| <a id="iconmorevertical"></a> `IconMoreVertical` | [`IconSource`](IconSource.mdx) |
|
|
98
101
|
| <a id="iconmove"></a> `IconMove` | [`IconSource`](IconSource.mdx) |
|
|
99
102
|
| <a id="iconnotauthenticated"></a> `IconNotauthenticated` | [`IconSource`](IconSource.mdx) |
|
|
103
|
+
| <a id="iconnotauthenticated-1"></a> `IconNotAuthenticated` | [`IconSource`](IconSource.mdx) |
|
|
100
104
|
| <a id="iconopeninnew"></a> `IconOpenInNew` | [`IconSource`](IconSource.mdx) |
|
|
101
105
|
| <a id="iconparticipant"></a> `IconParticipant` | [`IconSource`](IconSource.mdx) |
|
|
102
106
|
| <a id="iconpasswordhide"></a> `IconPasswordHide` | [`IconSource`](IconSource.mdx) |
|
|
@@ -124,6 +128,7 @@
|
|
|
124
128
|
| <a id="iconshare"></a> `IconShare` | [`IconSource`](IconSource.mdx) |
|
|
125
129
|
| <a id="iconshield"></a> `IconShield` | [`IconSource`](IconSource.mdx) |
|
|
126
130
|
| <a id="iconshuffle"></a> `IconShuffle` | [`IconSource`](IconSource.mdx) |
|
|
131
|
+
| <a id="iconsort"></a> `IconSort` | [`IconSource`](IconSource.mdx) |
|
|
127
132
|
| <a id="iconspeakerdisabled"></a> `IconSpeakerDisabled` | [`IconSource`](IconSource.mdx) |
|
|
128
133
|
| <a id="iconspeakeroff"></a> `IconSpeakerOff` | [`IconSource`](IconSource.mdx) |
|
|
129
134
|
| <a id="iconspeakeron"></a> `IconSpeakerOn` | [`IconSource`](IconSource.mdx) |
|
|
@@ -131,11 +136,13 @@
|
|
|
131
136
|
| <a id="iconstar"></a> `IconStar` | [`IconSource`](IconSource.mdx) |
|
|
132
137
|
| <a id="iconstopround"></a> `IconStopRound` | [`IconSource`](IconSource.mdx) |
|
|
133
138
|
| <a id="iconsupport"></a> `IconSupport` | [`IconSource`](IconSource.mdx) |
|
|
139
|
+
| <a id="iconsupportagent"></a> `IconSupportAgent` | [`IconSource`](IconSource.mdx) |
|
|
134
140
|
| <a id="icontestscripticon"></a> `IconTestScriptIcon` | [`IconSource`](IconSource.mdx) |
|
|
135
141
|
| <a id="iconthumbsdown"></a> `IconThumbsDown` | [`IconSource`](IconSource.mdx) |
|
|
136
142
|
| <a id="iconthumbsup"></a> `IconThumbsUp` | [`IconSource`](IconSource.mdx) |
|
|
137
143
|
| <a id="icontimer"></a> `IconTimer` | [`IconSource`](IconSource.mdx) |
|
|
138
144
|
| <a id="icontranscript"></a> `IconTranscript` | [`IconSource`](IconSource.mdx) |
|
|
145
|
+
| <a id="icontranslation"></a> `IconTranslation` | [`IconSource`](IconSource.mdx) |
|
|
139
146
|
| <a id="icontrash"></a> `IconTrash` | [`IconSource`](IconSource.mdx) |
|
|
140
147
|
| <a id="iconunlock"></a> `IconUnlock` | [`IconSource`](IconSource.mdx) |
|
|
141
148
|
| <a id="iconvideooff"></a> `IconVideoOff` | [`IconSource`](IconSource.mdx) |
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
| Property | Type |
|
|
4
4
|
| ------ | ------ |
|
|
5
|
-
| <a id="size16"></a> `size16` | `FC
|
|
6
|
-
| <a id="size24"></a> `size24` | `FC
|
|
7
|
-
| <a id="size32"></a> `size32` | `FC
|
|
5
|
+
| <a id="size16"></a> `size16` | `FC<SVGProps<SVGSVGElement>>` |
|
|
6
|
+
| <a id="size24"></a> `size24` | `FC<SVGProps<SVGSVGElement>>` |
|
|
7
|
+
| <a id="size32"></a> `size32` | `FC<SVGProps<SVGSVGElement>>` |
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
## Extends
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
```ts
|
|
4
|
+
- Pick<React.ComponentProps<typeof Spinner>, "sizeModifier" | "colorScheme">
|
|
5
|
+
```
|
|
4
6
|
|
|
5
7
|
## Properties
|
|
6
8
|
|
|
@@ -8,5 +10,5 @@
|
|
|
8
10
|
| ------ | ------ | ------ |
|
|
9
11
|
| <a id="classname"></a> `className?` | `string` | - |
|
|
10
12
|
| <a id="isloading"></a> `isLoading?` | `boolean` | - |
|
|
11
|
-
| <a id="sizemodifier"></a> `sizeModifier?` | `"small"
|
|
12
|
-
| <a id="colorscheme"></a> `colorScheme?` | `"dark"
|
|
13
|
+
| <a id="sizemodifier"></a> `sizeModifier?` | `"small" \| "medium" \| "compact"` | `Pick.sizeModifier` |
|
|
14
|
+
| <a id="colorscheme"></a> `colorScheme?` | `"dark" \| "light"` | `Pick.colorScheme` |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
| ------ | ------ |
|
|
5
5
|
| <a id="label"></a> `label` | `string` |
|
|
6
6
|
| <a id="url"></a> `url?` | `string` |
|
|
7
|
-
| <a id="onclick"></a> `onClick?` | () =>
|
|
7
|
+
| <a id="onclick"></a> `onClick?` | `() => void` |
|
|
8
8
|
| <a id="iscompleted"></a> `isCompleted?` | `boolean` |
|
|
9
9
|
| <a id="isfailed"></a> `isFailed?` | `boolean` |
|
|
10
10
|
| <a id="isdisabled"></a> `isDisabled?` | `boolean` |
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
| Property | Type |
|
|
4
4
|
| ------ | ------ |
|
|
5
|
-
| <a id="caption"></a> `caption?` |
|
|
5
|
+
| <a id="caption"></a> `caption?` | `\| string \| ReactElement<unknown, string` | JSXElementConstructor\<any\>\>` |
|
|
6
6
|
| <a id="captionclassname"></a> `captionClassName?` | `string` |
|
|
7
|
-
| <a id="captionsize"></a> `captionSize?` | `"small"
|
|
7
|
+
| <a id="captionsize"></a> `captionSize?` | `"small" \| "medium"` |
|
|
8
8
|
| <a id="captiontitle"></a> `captionTitle?` | `string` |
|
|
9
|
-
| <a id="figure"></a> `figure?` |
|
|
9
|
+
| <a id="figure"></a> `figure?` | `\| string \| number \| ReactElement<unknown, string` | JSXElementConstructor\<any\>\>` |
|
|
10
10
|
| <a id="figureclassname"></a> `figureClassName?` | `string` |
|
|
11
|
-
| <a id="figuresize"></a> `figureSize?` | `"small"
|
|
11
|
+
| <a id="figuresize"></a> `figureSize?` | `"small" \| "medium"` |
|
|
12
12
|
| <a id="figuretitle"></a> `figureTitle?` | `string` |
|
|
13
|
-
| <a id="icon"></a> `icon?` | `ReactElement
|
|
13
|
+
| <a id="icon"></a> `icon?` | `ReactElement<unknown, string \| JSXElementConstructor<any>>` |
|
|
14
14
|
| <a id="iconcolor"></a> `iconColor?` | `string` |
|
|
15
15
|
| <a id="isactive"></a> `isActive?` | `boolean` |
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
| Property | Type |
|
|
4
4
|
| ------ | ------ |
|
|
5
5
|
| <a id="classname"></a> `className?` | `string` |
|
|
6
|
-
| <a id="colorscheme"></a> `colorScheme?` | `"dark"
|
|
6
|
+
| <a id="colorscheme"></a> `colorScheme?` | `"dark" \| "light"` |
|
|
7
7
|
| <a id="enhancestart"></a> `enhanceStart?` | `ReactNode` |
|
|
8
8
|
| <a id="isclickable"></a> `isClickable?` | `boolean` |
|
|
9
9
|
| <a id="isdanger"></a> `isDanger?` | `boolean` |
|
|
10
10
|
| <a id="isdisplayed"></a> `isDisplayed` | `boolean` |
|
|
11
11
|
| <a id="message"></a> `message` | `ReactNode` |
|
|
12
|
-
| <a id="ondismiss"></a> `onDismiss?` | () =>
|
|
13
|
-
| <a id="position"></a> `position?` | `"bottomCenter"
|
|
12
|
+
| <a id="ondismiss"></a> `onDismiss?` | `() => void` |
|
|
13
|
+
| <a id="position"></a> `position?` | `"bottomCenter" \| "topCenter"` |
|
|
14
14
|
| <a id="timeout"></a> `timeout?` | `number` |
|
|
@@ -10,12 +10,20 @@ The structure of a menu item that can be used to create a dropdown menu.
|
|
|
10
10
|
| ------ | ------ | ------ |
|
|
11
11
|
| `key` | `string` | The unique key for the item. |
|
|
12
12
|
| `label` | `React.ReactNode` | The label of the item. |
|
|
13
|
+
| `description?` | `React.ReactNode` | Optional description of the item. This will be displayed below the menu item. |
|
|
13
14
|
| `testId?` | `string` | The test id for the item. |
|
|
14
|
-
| `onItemClick()?` | () =>
|
|
15
|
+
| `onItemClick()?` | `() => void` | If set, this function will be called when the user clicks this item. |
|
|
15
16
|
| `closeMenuOnItemClick?` | `boolean` | If set to false, the menu will not close when the user clicks this item. |
|
|
17
|
+
| `subMenu?` | [`AriaSubMenu`](AriaSubMenu.mdx) | If set, clicking the item runs `onItemClick` (if provided) and opens a submenu in place. The submenu can render a nested list of `AriaMenuItem` or arbitrary React content, and a back button is rendered at the top of the menu to return to the previous level. The menu is not closed when a submenu is opened. |
|
|
16
18
|
| `icon?` | `React.ReactNode` | The icon to display next to the item. |
|
|
19
|
+
| `iconPosition?` | `"start" \| "end"` | Where to place the `icon` relative to the label. `'start'` (the default) renders the icon before the label; `'end'` renders it after the label, pushed to the far end of the item. |
|
|
17
20
|
| `alternativeHoverClassName?` | `string` | Class name that is used to override the default hover style. |
|
|
18
21
|
| `alternativeHoverStyle?` | `CSSProperties` | Style that is used to override the default hover style. |
|
|
19
22
|
| `className?` | `string` | The class name for the item. |
|
|
20
23
|
| `style?` | `CSSProperties` | The style for the item. |
|
|
21
24
|
| `isActive?` | `boolean` | Sets the `data-active` attribute to `true` and applies styling |
|
|
25
|
+
| `isDisabled?` | `boolean` | If set to true, the item will be disabled. |
|
|
26
|
+
| `isDanger?` | `boolean` | If set to true, the item uses the danger text color. |
|
|
27
|
+
| `isChecked?` | `boolean` | Marks the item as a checkable menu item and reports the given state. |
|
|
28
|
+
| `withTopDivider?` | `boolean` | If set to true, a divider will be rendered above the item. |
|
|
29
|
+
| `withBottomDivider?` | `boolean` | If set to true, a divider will be rendered below the item. |
|
|
@@ -8,11 +8,15 @@ type AriaMenuProps = object;
|
|
|
8
8
|
| ------ | ------ | ------ |
|
|
9
9
|
| <a id="items"></a> `items` | [`AriaMenuItem`](AriaMenuItem.mdx)[] | An array of menu items. |
|
|
10
10
|
| <a id="button"></a> `button` | `ReactElement` | The react element that triggers the menu. |
|
|
11
|
+
| <a id="renderbutton"></a> `renderButton?` | `(triggerButton) => ReactNode` | Optionally wraps the rendered menu trigger. **Example** `renderButton={triggerButton => ( <Tooltip text="Settings">{triggerButton}</Tooltip> )}` |
|
|
11
12
|
| <a id="headercontent"></a> `headerContent?` | `ReactElement` | Optional content to show above the menu items. |
|
|
12
|
-
| <a id="onopenchange"></a> `onOpenChange?` | (
|
|
13
|
+
| <a id="onopenchange"></a> `onOpenChange?` | `(isOpen) => void` | Callback function called when the menu open state changes. |
|
|
13
14
|
| <a id="testid"></a> `testId?` | `string` | The test id for the menu. |
|
|
14
15
|
| <a id="colorscheme"></a> `colorScheme?` | [`ColorScheme`](ColorScheme.mdx) | The color scheme for the menu. |
|
|
15
16
|
| <a id="popoverplacement"></a> `popoverPlacement?` | `Placement` | The placement of the popover. |
|
|
16
17
|
| <a id="popoveroffset"></a> `popoverOffset?` | `number` | The offset for the popover. |
|
|
17
18
|
| <a id="menuclassname"></a> `menuClassName?` | `string` | The class name for the menu. |
|
|
18
19
|
| <a id="itemclassname"></a> `itemClassName?` | `string` | The class name for the menu item. |
|
|
20
|
+
| <a id="backbuttonlabel"></a> `backButtonLabel?` | `string` | Default aria label for the back button rendered at the top of a submenu. |
|
|
21
|
+
| <a id="ongoback"></a> `onGoBack?` | `() => void` | Callback function called when the user navigates back one level via the back button rendered at the top of a submenu. |
|
|
22
|
+
| <a id="showsubmenuindicator"></a> `showSubMenuIndicator?` | `boolean` | Whether to show the chevron indicator on menu items that open a submenu. Defaults to `true`. |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
type AriaSubMenu = object &
|
|
3
|
+
| {
|
|
4
|
+
items: AriaMenuItem[];
|
|
5
|
+
content?: never;
|
|
6
|
+
}
|
|
7
|
+
| {
|
|
8
|
+
content: React.ReactNode | (helpers) => React.ReactNode;
|
|
9
|
+
items?: never;
|
|
10
|
+
};
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
A submenu that opens in place inside an [AriaMenu](../variables/AriaMenu.mdx) when its parent item
|
|
14
|
+
is clicked. A submenu can either render a nested list of [AriaMenuItem](AriaMenuItem.mdx)
|
|
15
|
+
(which can themselves open further submenus) or arbitrary React content. When
|
|
16
|
+
a submenu is open, a back button is rendered at the top of the menu to return
|
|
17
|
+
to the previous level.
|
|
18
|
+
|
|
19
|
+
## Type Declaration
|
|
20
|
+
|
|
21
|
+
| Name | Type | Description |
|
|
22
|
+
| ------ | ------ | ------ |
|
|
23
|
+
| `title?` | `React.ReactNode` | Optional title shown next to the back button at the top of the submenu. |
|
|
24
|
+
| `titleTestId?` | `string` | The test id applied to the submenu title. |
|
|
25
|
+
| `testId?` | `string` | The test id applied to the submenu container. |
|
|
26
|
+
| `backButtonLabel?` | `string` | Aria label for the back button rendered at the top of the submenu. Overrides the menu-level `backButtonLabel`. |
|
|
27
|
+
| `backButtonTestId?` | `string` | The test id for the back button rendered at the top of the submenu. |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
type AriaSubMenuContentHelpers = object;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
Helpers passed to a submenu's `content` render function, allowing the content
|
|
6
|
+
to close the whole menu or navigate back to the previous level.
|
|
7
|
+
|
|
8
|
+
## Properties
|
|
9
|
+
|
|
10
|
+
| Property | Type | Description |
|
|
11
|
+
| ------ | ------ | ------ |
|
|
12
|
+
| <a id="close"></a> `close` | `() => void` | Closes the whole menu. |
|
|
13
|
+
| <a id="goback"></a> `goBack` | `() => void` | Navigates back to the previous level. |
|
|
@@ -9,7 +9,7 @@ type MenuAction = object;
|
|
|
9
9
|
| <a id="enhancerstart"></a> `enhancerStart?` | `React.ReactNode` |
|
|
10
10
|
| <a id="isdisabled"></a> `isDisabled?` | `boolean` |
|
|
11
11
|
| <a id="label"></a> `label` | `string` |
|
|
12
|
-
| <a id="onclick"></a> `onClick?` | () =>
|
|
12
|
+
| <a id="onclick"></a> `onClick?` | `() => void` |
|
|
13
13
|
| <a id="target"></a> `target?` | [`LinkTarget`](LinkTarget.mdx) |
|
|
14
14
|
| <a id="testid"></a> `testId?` | `string` |
|
|
15
15
|
| <a id="url"></a> `url?` | `string` |
|
|
@@ -6,23 +6,24 @@ type MenuItem<T> = object;
|
|
|
6
6
|
|
|
7
7
|
| Type Parameter | Default type |
|
|
8
8
|
| ------ | ------ |
|
|
9
|
-
| `T
|
|
9
|
+
| `T extends string` | `string` |
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
13
13
|
| Property | Type |
|
|
14
14
|
| ------ | ------ |
|
|
15
|
-
| <a id="clickaction"></a> `clickAction?` | `React.MouseEventHandler
|
|
15
|
+
| <a id="clickaction"></a> `clickAction?` | `React.MouseEventHandler<HTMLElement>` |
|
|
16
16
|
| <a id="colorscheme"></a> `colorScheme?` | [`ColorScheme`](ColorScheme.mdx) |
|
|
17
17
|
| <a id="icon"></a> `icon?` | [`IconSource`](../interfaces/IconSource.mdx) |
|
|
18
|
-
| <a id="iconcolor"></a> `iconColor?` | `string` |
|
|
19
18
|
| <a id="iconalignedstart"></a> `iconAlignedStart?` | `boolean` |
|
|
19
|
+
| <a id="iconcolor"></a> `iconColor?` | `string` |
|
|
20
|
+
| <a id="iconsize"></a> `iconSize?` | `React.ComponentProps`\<*typeof* [`Icon`](../variables/Icon.mdx)\>\[`"size"`\] |
|
|
20
21
|
| <a id="isariachecked"></a> `isAriaChecked?` | `boolean` |
|
|
21
22
|
| <a id="isariaselected"></a> `isAriaSelected?` | `boolean` |
|
|
22
23
|
| <a id="isdisabled"></a> `isDisabled?` | `boolean` |
|
|
23
24
|
| <a id="isfixedicon"></a> `isFixedIcon?` | `boolean` |
|
|
24
25
|
| <a id="label"></a> `label` | `React.ReactNode` |
|
|
25
|
-
| <a id="linkwrapper"></a> `linkWrapper?` | (
|
|
26
|
+
| <a id="linkwrapper"></a> `linkWrapper?` | `({ children, }) => React.ReactElement` |
|
|
26
27
|
| <a id="role"></a> `role?` | `React.AriaRole` |
|
|
27
28
|
| <a id="target"></a> `target?` | [`LinkTarget`](LinkTarget.mdx) |
|
|
28
29
|
| <a id="testid"></a> `testId?` | `string` |
|
|
@@ -15,4 +15,4 @@ type NotificationToastMessage = object;
|
|
|
15
15
|
| <a id="position"></a> `position?` | [`ToastPosition`](ToastPosition.mdx) | - |
|
|
16
16
|
| <a id="testid"></a> `testid?` | `string` | - |
|
|
17
17
|
| <a id="timeout"></a> `timeout?` | `number` | - |
|
|
18
|
-
| <a id="ondismiss"></a> `onDismiss?` | () =>
|
|
18
|
+
| <a id="ondismiss"></a> `onDismiss?` | `() => void` | - |
|
|
@@ -16,8 +16,8 @@ type SelectProps<T> = Omit<React.ComponentPropsWithRef<"select">, "disabled"> &
|
|
|
16
16
|
| `isFullWidth?` | `boolean` |
|
|
17
17
|
| `label` | `string` |
|
|
18
18
|
| `labelModifier?` | [`LabelModifier`](LabelModifier.mdx) |
|
|
19
|
-
| `onValueChange()` | (
|
|
20
|
-
| `options` | [`Option
|
|
19
|
+
| `onValueChange()` | `(id) => void` |
|
|
20
|
+
| `options` | [`Option<T>`](Option.mdx)[] |
|
|
21
21
|
| `sizeModifier?` | [`SizeModifier`](SizeModifier.mdx) |
|
|
22
22
|
| `value` | `string` |
|
|
23
23
|
| `wrapContent?` | `boolean` |
|
|
@@ -26,4 +26,4 @@ type SelectProps<T> = Omit<React.ComponentPropsWithRef<"select">, "disabled"> &
|
|
|
26
26
|
|
|
27
27
|
| Type Parameter | Default type |
|
|
28
28
|
| ------ | ------ |
|
|
29
|
-
| `T
|
|
29
|
+
| `T extends string` | `string` |
|
|
@@ -10,8 +10,8 @@ type TagItem = object;
|
|
|
10
10
|
| <a id="isinteractive"></a> `isInteractive?` | `boolean` | isInteractive decides whether hover effect will be on or off |
|
|
11
11
|
| <a id="istruncated"></a> `isTruncated?` | `boolean` | - |
|
|
12
12
|
| <a id="label"></a> `label?` | `string` | - |
|
|
13
|
-
| <a id="onclick"></a> `onClick?` | (
|
|
14
|
-
| <a id="onremove"></a> `onRemove?` | () =>
|
|
13
|
+
| <a id="onclick"></a> `onClick?` | `(label?) => void` | - |
|
|
14
|
+
| <a id="onremove"></a> `onRemove?` | `() => void` | - |
|
|
15
15
|
| <a id="removelabel"></a> `removeLabel?` | `string` | - |
|
|
16
16
|
| <a id="title"></a> `title?` | `string` | - |
|
|
17
17
|
| <a id="variant"></a> `variant?` | [`TextVariant`](TextVariant.mdx) | - |
|
|
@@ -2,4 +2,6 @@
|
|
|
2
2
|
const AriaMenu: React.FC<AriaMenuProps>;
|
|
3
3
|
```
|
|
4
4
|
|
|
5
|
-
AriaMenu component represents a dropdown menu.
|
|
5
|
+
AriaMenu component represents a dropdown menu. Menu items can open submenus in
|
|
6
|
+
place, rendering either a nested list of items or arbitrary React content,
|
|
7
|
+
with a back button to return to the previous level.
|
|
@@ -1,3 +1,54 @@
|
|
|
1
1
|
```ts
|
|
2
2
|
const Draggable: ForwardRefExoticComponent<Omit<ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & object, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
3
3
|
```
|
|
4
|
+
|
|
5
|
+
A wrapper that makes its children draggable via pointer (and, when
|
|
6
|
+
`isMoveableWithArrowKeys` is set, the keyboard).
|
|
7
|
+
|
|
8
|
+
By default the **entire** surface of the Draggable starts a drag on
|
|
9
|
+
pointer-down. The two opt-in `data-*` attributes below let you refine which
|
|
10
|
+
parts of the content are draggable. Neither is required — omit them when the
|
|
11
|
+
whole element should be draggable.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
- data-no-drag: Marks a descendant region that should *not* initiate a
|
|
15
|
+
```
|
|
16
|
+
drag. Add it to interactive controls nested inside the Draggable (buttons,
|
|
17
|
+
links, inputs, sliders, menus, etc.) so they stay usable without
|
|
18
|
+
accidentally moving the element.
|
|
19
|
+
```ts
|
|
20
|
+
- data-drag-handle: Marks a descendant that *can* initiate a drag even
|
|
21
|
+
```
|
|
22
|
+
when it sits inside a `data-no-drag` region. Use it to expose a dedicated
|
|
23
|
+
grab handle within an otherwise non-draggable area.
|
|
24
|
+
|
|
25
|
+
Both attributes are resolved with `Element.closest`, so they apply to the
|
|
26
|
+
tagged element and everything nested within it.
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// Whole card is draggable (no attributes needed):
|
|
32
|
+
<Draggable>
|
|
33
|
+
<Card />
|
|
34
|
+
</Draggable>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
// Card is draggable, but the close button stays clickable:
|
|
39
|
+
<Draggable>
|
|
40
|
+
<Card>
|
|
41
|
+
<button data-no-drag onClick={onClose}>Close</button>
|
|
42
|
+
</Card>
|
|
43
|
+
</Draggable>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
// Only the header acts as a drag handle inside an otherwise no-drag body:
|
|
48
|
+
<Draggable>
|
|
49
|
+
<div data-no-drag>
|
|
50
|
+
<div data-drag-handle>Drag me</div>
|
|
51
|
+
<Body />
|
|
52
|
+
</div>
|
|
53
|
+
</Draggable>
|
|
54
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
const KEYBOARD_EVENT_KEY: object;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
## Type Declaration
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default value |
|
|
8
|
+
| ------ | ------ | ------ |
|
|
9
|
+
| <a id="enter"></a> `enter` | `"Enter"` | `'Enter'` |
|
|
10
|
+
| <a id="escape"></a> `escape` | `"Escape"` | `'Escape'` |
|
|
11
|
+
| <a id="arrowup"></a> `arrowUp` | `"ArrowUp"` | `'ArrowUp'` |
|
|
12
|
+
| <a id="arrowright"></a> `arrowRight` | `"ArrowRight"` | `'ArrowRight'` |
|
|
13
|
+
| <a id="arrowdown"></a> `arrowDown` | `"ArrowDown"` | `'ArrowDown'` |
|
|
14
|
+
| <a id="arrowleft"></a> `arrowLeft` | `"ArrowLeft"` | `'ArrowLeft'` |
|
|
15
|
+
| <a id="home"></a> `home` | `"Home"` | `'Home'` |
|
|
16
|
+
| <a id="end"></a> `end` | `"End"` | `'End'` |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
const MultiselectCore: React.FC<{
|
|
3
|
+
buttonType?: React.ComponentProps<typeof DropContent>["type"];
|
|
4
|
+
className?: string;
|
|
5
|
+
colorScheme?: ColorScheme;
|
|
6
|
+
dropContentPosition?: DropContentPosition;
|
|
7
|
+
errorText?: string;
|
|
8
|
+
hasError?: boolean;
|
|
9
|
+
iconType?: IconSource;
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
isFullWidth?: boolean;
|
|
12
|
+
isOpen?: boolean;
|
|
13
|
+
isTruncated?: boolean;
|
|
14
|
+
label: string;
|
|
15
|
+
labelModifier?: LabelModifier;
|
|
16
|
+
menuComponent: DropContentType;
|
|
17
|
+
multipleSelectionText?: string;
|
|
18
|
+
noSelectionText?: string;
|
|
19
|
+
onContentVisibilityChange?: (isVisible) => void;
|
|
20
|
+
onOutsideClose?: () => void;
|
|
21
|
+
options: MultiselectOption[];
|
|
22
|
+
sizeModifier?: SizeModifier;
|
|
23
|
+
testId?: string;
|
|
24
|
+
value: string[] | undefined;
|
|
25
|
+
wrapContent?: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
```
|
|
@@ -19,6 +19,7 @@ const PreferenceInput: React.FC<{
|
|
|
19
19
|
placeholder?: string;
|
|
20
20
|
shouldShowDenyAlert?: boolean;
|
|
21
21
|
type?: "text" | "password" | "number" | "email" | "tel" | "url";
|
|
22
|
+
renderText?: typeof Text;
|
|
22
23
|
onChange?: (e) => void;
|
|
23
24
|
onConfirm?: (value?) => void;
|
|
24
25
|
onEditingStateChange?: (isEditing) => void;
|
|
@@ -6,13 +6,13 @@ const Select: <T>(__namedParameters) => Element;
|
|
|
6
6
|
|
|
7
7
|
| Type Parameter | Default type |
|
|
8
8
|
| ------ | ------ |
|
|
9
|
-
| `T
|
|
9
|
+
| `T extends string` | `string` |
|
|
10
10
|
|
|
11
11
|
## Parameters
|
|
12
12
|
|
|
13
13
|
| Parameter | Type |
|
|
14
14
|
| ------ | ------ |
|
|
15
|
-
| `__namedParameters` | [`SelectProps
|
|
15
|
+
| `__namedParameters` | [`SelectProps<T>`](../type-aliases/SelectProps.mdx) |
|
|
16
16
|
|
|
17
17
|
## Returns
|
|
18
18
|
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
```ts
|
|
2
|
-
const Sheet: React.FC<React.ComponentProps<"div"> & object
|
|
2
|
+
const Sheet: React.FC<React.ComponentProps<"div"> & object &
|
|
3
|
+
| {
|
|
4
|
+
heightPortrait: number;
|
|
5
|
+
heightLandscape: number;
|
|
6
|
+
}
|
|
7
|
+
| {
|
|
8
|
+
heightPortrait?: undefined;
|
|
9
|
+
heightLandscape?: undefined;
|
|
10
|
+
}>;
|
|
3
11
|
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
const ToggleSwitchDisplay: React.FC<ToggleSwitchDisplayProps>;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
Presentational version of ToggleSwitch that renders only the visual toggle
|
|
6
|
+
indicator and label text — it does not render an `<input>` or manage any
|
|
7
|
+
interaction/state itself.
|
|
8
|
+
|
|
9
|
+
Use this when the parent element (e.g. an AriaMenu item) already handles
|
|
10
|
+
interaction and you only need to display the toggle state.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
<ToggleSwitchDisplay checked={isMuted} label="Mute all guests" isSmall />
|
|
16
|
+
```
|