@pexip/components 20.1.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 +178 -0
- package/api-docs/README.mdx +10 -2
- package/api-docs/enumerations/TestId.mdx +1 -0
- package/api-docs/functions/useBoundingRect.mdx +42 -0
- package/api-docs/interfaces/IconCollection.mdx +3 -0
- package/api-docs/type-aliases/AriaMenuItem.mdx +5 -0
- package/api-docs/type-aliases/AriaMenuProps.mdx +4 -0
- package/api-docs/type-aliases/AriaSubMenu.mdx +27 -0
- package/api-docs/type-aliases/AriaSubMenuContentHelpers.mdx +13 -0
- package/api-docs/type-aliases/MenuItem.mdx +2 -1
- package/api-docs/type-aliases/MultiselectCoreProps.mdx +3 -0
- 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/Sheet.mdx +9 -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/dist/components-no-global-styles.css +1 -1
- package/dist/components.cjs +2 -2
- package/dist/components.css +1 -1
- package/dist/components.js +6131 -7965
- package/dist/types/design-tokens/generated/Icons.d.ts +3 -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 +0 -1
- 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 +109 -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.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 +10 -1
- package/dist/types/src/components/modules/Sheet/Sheet.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 +7 -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 +13 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,183 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 20.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- bb40023: Add optional `hasDivider` prop to `ActionsRow` component. Defaults to
|
|
8
|
+
`true` to preserve existing behavior. Set to `false` to hide the divider.
|
|
9
|
+
- 54883ee: Add `IconSupportAgent` and `IconTranslation`.
|
|
10
|
+
- ca742b0: Fix shrinking icon in `ListLink`. Support `fontVariant` in
|
|
11
|
+
`PlainMenuEntry` in `Menu`.
|
|
12
|
+
- 35a460a: Add `descriptionUrlLinks` prop to `ConfirmationModal` to control
|
|
13
|
+
whether URLs in the description are rendered as clickable links
|
|
14
|
+
- db2c663: Add `presentationElementClassName` prop to `Modal`.
|
|
15
|
+
- cbe8f20: Export `MultiselectCore` so apps can reuse the shared select trigger
|
|
16
|
+
with a custom menu.
|
|
17
|
+
- 593d327: Add nested submenu support to `AriaMenu`, including:
|
|
18
|
+
|
|
19
|
+
- Item and custom-content submenus
|
|
20
|
+
- Configurable back navigation
|
|
21
|
+
- Accessible labelling and keyboard navigation
|
|
22
|
+
- Focus restoration and scrollable overflow
|
|
23
|
+
- Optional submenu indicators and trailing icons
|
|
24
|
+
|
|
25
|
+
Also expose scrollbar styling on `Panel` and keep portalled tooltips
|
|
26
|
+
interactive inside React Aria overlays.
|
|
27
|
+
|
|
28
|
+
- 031693b: Export `buttonVariantsValues`.
|
|
29
|
+
- 81f985c: Add `titleWordBreak` prop to `ConfirmationModal`
|
|
30
|
+
- 27917fb: Add `ToggleSwitchDisplay` presentational component for rendering
|
|
31
|
+
toggle state without interactive elements. Refactor `ToggleSwitch` to compose
|
|
32
|
+
`ToggleSwitchDisplay` internally.
|
|
33
|
+
- ee5a093: Hand tooltip positioning over to react-aria's `useOverlayPosition`.
|
|
34
|
+
|
|
35
|
+
- `Tooltip`, `CustomTooltip` and `NotificationTooltip` are now positioned,
|
|
36
|
+
flipped and kept inside the viewport by react-aria instead of hard-coded CSS
|
|
37
|
+
offsets. This fixes tooltips escaping the viewport, e.g. at 400% browser
|
|
38
|
+
zoom.
|
|
39
|
+
- The arrow is placed with react-aria's `arrowProps` and oriented with the
|
|
40
|
+
resolved `data-placement`, so it stays attached to and pointing at the
|
|
41
|
+
trigger.
|
|
42
|
+
- The CSS placement classes on the tooltip content were removed in favour of
|
|
43
|
+
`data-placement`.
|
|
44
|
+
- The in-meeting control tooltips now hide with the rest of the UI when it
|
|
45
|
+
auto-hides, which they no longer inherited once portalled.
|
|
46
|
+
- **Breaking:** the `usePortal` prop was removed from `NotificationTooltip`;
|
|
47
|
+
the tooltip is always rendered in a portal.
|
|
48
|
+
|
|
49
|
+
- e4a320d: Add renderText prop to PreferenceInput to allow replacing the value's
|
|
50
|
+
Text element
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- 8ef9f04: `AriaMenu` items accept an `isChecked` prop, which renders the item
|
|
55
|
+
as a `menuitemcheckbox` and reports its state. Use it for items that toggle
|
|
56
|
+
something, so the state is announced on the focusable item rather than on a
|
|
57
|
+
presentational control inside it.
|
|
58
|
+
- b1f3f9e: Improve accessible danger styling for shared menu and select
|
|
59
|
+
components. AriaMenu now supports a danger state for menu items, and Select
|
|
60
|
+
updates its danger tokens to use higher-contrast colors.
|
|
61
|
+
- 3e652a1: Update Captions header layout to show speakers on the left with
|
|
62
|
+
ellipsis truncation and timestamp on the right. Add `timestamp` prop for
|
|
63
|
+
`Captions` component.
|
|
64
|
+
- 8ef9f04: `CondensedTabs` now exposes its selected state to assistive
|
|
65
|
+
technology. Tabs carry `aria-selected`, the tablist is a single tab stop with
|
|
66
|
+
a roving `tabindex`, and arrow/Home/End keys move between tabs.
|
|
67
|
+
- 380b19c: Draggable: added support for [data-drag-handle] and [data-no-drag]
|
|
68
|
+
regions — pointer-down inside a no-drag region is ignored unless it originates
|
|
69
|
+
from a drag handle, with matching grab/grabbing cursor styling.
|
|
70
|
+
|
|
71
|
+
AriaMenu: menu items now support an optional description rendered below the
|
|
72
|
+
label; preventFocusOnPress is stripped from the DOM button props.
|
|
73
|
+
|
|
74
|
+
Modal: added withAlternativeMaskColor prop and a new
|
|
75
|
+
alternative-modal-mask-color token.
|
|
76
|
+
|
|
77
|
+
Sheet: added withMask, withShadow, innerFullHeight, and custom
|
|
78
|
+
heightPortrait/heightLandscape (dvh) props with orientation-based media
|
|
79
|
+
queries.
|
|
80
|
+
|
|
81
|
+
Added a new md (36px) avatar/circle size (Avatar, RoundIndicator, sizes,
|
|
82
|
+
design tokens) and an $alpha-70 token.
|
|
83
|
+
|
|
84
|
+
Added and exported a new useBoundingRect hook (observes an element's bounding
|
|
85
|
+
rect via ResizeObserver, polls ref.current, with optional
|
|
86
|
+
window-resize/orientation updates); also exported the KEYBOARD_EVENT_KEY
|
|
87
|
+
constant.
|
|
88
|
+
|
|
89
|
+
Scrollbars: removed the redundant children prop from its type.
|
|
90
|
+
|
|
91
|
+
- 1c01e62: Add `language` icon
|
|
92
|
+
- 8f2380a: Default button type "button" for `ListBoxLink` to prevent it being a
|
|
93
|
+
submit type.
|
|
94
|
+
- 3dba14c: Fix horizontal scroll on multiselect dropdown
|
|
95
|
+
- 542adab: Fix crash in `AriaMenu` when items are hidden via branding
|
|
96
|
+
`hiddenFunctionality`. Items whose `data-testid` is overridden to a Fragment
|
|
97
|
+
are now filtered out before entering the react-aria collection, preventing a
|
|
98
|
+
null ref focus crash on keyboard navigation.
|
|
99
|
+
- 33cba9e: Fix copyStyles test to use a lightweight DOM mock that avoids
|
|
100
|
+
triggering happy-dom resource loading.
|
|
101
|
+
- f378928: Stop `aria-label` from overriding visible text in
|
|
102
|
+
`MultistepIndicator`:
|
|
103
|
+
|
|
104
|
+
- Steps no longer carry a 0-based `step N` label that hides the visible step
|
|
105
|
+
name. A label is only set when the step name is not rendered, and it uses
|
|
106
|
+
the same 1-based number as the visible step.
|
|
107
|
+
- The wrapping list is no longer named after the current step; an `aria-label`
|
|
108
|
+
can be supplied by the consumer instead.
|
|
109
|
+
|
|
110
|
+
- 571f17c: Fix CSP style-src-elem violation in PopOutWindow when rendering into
|
|
111
|
+
an about:blank window by inlining stylesheet rules instead of using link
|
|
112
|
+
elements.
|
|
113
|
+
- d066ed1: Restore borders and selection states in forced colors (high contrast)
|
|
114
|
+
mode for `Box` (and so `Panel`/`Modal`), `Button`, `Tabs`, `CondensedTabs`,
|
|
115
|
+
`ToggleSwitch`, `Pill` (and so `Toast`/`NotificationToast`) and `InfoCard`
|
|
116
|
+
- a84b03f: Adds top and bottom margin to `Divider` inside `InnerAriaMenuItem`.
|
|
117
|
+
- 265c898: Migrate test runner from Jest to Vitest.
|
|
118
|
+
- 55018dc: Fix `Modal` becoming non-interactive when opened over a react-aria
|
|
119
|
+
modal overlay (e.g. the mobile participants panel). The modal portal is now
|
|
120
|
+
flagged as a react-aria top layer so it is no longer marked `inert`, which
|
|
121
|
+
previously made its buttons unresponsive and, on touch, caused taps to fall
|
|
122
|
+
through and close the modal without running the action.
|
|
123
|
+
- 3dba14c: Fix clicking an option label in `Multiselect` and
|
|
124
|
+
`ConfirmableMultiselect` not toggling the checkbox. The label was passed to
|
|
125
|
+
`Checkbox` as an inline component, which made React remount it on every render
|
|
126
|
+
and prevented the browser from firing a `click` event on it.
|
|
127
|
+
|
|
128
|
+
`DropContent` now keeps `onContentVisibilityChange` in a ref, so passing an
|
|
129
|
+
inline callback no longer re-runs the effect on every render.
|
|
130
|
+
|
|
131
|
+
- 8b420de: allow for containerRef on Input, setting a ref on the container for
|
|
132
|
+
the input element
|
|
133
|
+
- 5650609: Remove the unused `@types/prettier` dev dependency. It shadowed the
|
|
134
|
+
optional `@types/prettier` peer of `storybook`, which made Yarn resolve a
|
|
135
|
+
second virtual instance of `storybook` for this package and duplicated
|
|
136
|
+
`storybook/theming` in Storybook production builds.
|
|
137
|
+
- e0979b2: Fixed `Draggable` cancelling the first drag. The drag effect tracked
|
|
138
|
+
the element through `ref.current`, which is `null` on the initial render and
|
|
139
|
+
only populated on the next render, causing the effect to tear down and re-arm
|
|
140
|
+
mid-drag. The element is now held in state via a merged callback ref, so the
|
|
141
|
+
first drag completes reliably.
|
|
142
|
+
- 1d41a9d: - CondensedTabs: updated active tab contrast to meet WCAG non-text
|
|
143
|
+
contrast requirements
|
|
144
|
+
- AriaMenu: active/highlighted item now uses accent background with white text
|
|
145
|
+
for contrast; disabled items are excluded from keyboard focus navigation;
|
|
146
|
+
focus indicator uses configurable box-shadow mixin with suppress-on-hover to
|
|
147
|
+
avoid conflicts with hover state
|
|
148
|
+
- Button: translucent button active state uses accent surface background and
|
|
149
|
+
white text
|
|
150
|
+
- Input: focus outline added via the configurable focus mixin; light and dark
|
|
151
|
+
focused stories added
|
|
152
|
+
- ToggleSwitch: focus styling migrated to the configurable box-shadow mixin
|
|
153
|
+
with reduced shadow widths; light/dark checked/unchecked focus stories added
|
|
154
|
+
- Select: focus styling consolidated into the configurable box-shadow mixin,
|
|
155
|
+
removing hardcoded box-shadow overrides
|
|
156
|
+
- Focus mixin (\_focus.scss): refactored to accept `$border-width`,
|
|
157
|
+
`$shadow-width-inset`, `$shadow-width`, `suppress-on-hover`, and
|
|
158
|
+
`color-scheme` parameters for per-component customization
|
|
159
|
+
- b3eedbb: Migrate stories to Storybook 10: import `action` from
|
|
160
|
+
`storybook/actions`, testing helpers from `storybook/test` and doc blocks from
|
|
161
|
+
`@storybook/addon-docs/blocks`, replace the per-story `backgrounds` parameter
|
|
162
|
+
with the `backgrounds` global, and drop the removed
|
|
163
|
+
`@storybook/addon-actions`, `@storybook/blocks` and `@storybook/test` dev
|
|
164
|
+
dependencies.
|
|
165
|
+
- 8f82582: Change colors of the `MultiStepIndicator` steps to be white
|
|
166
|
+
- 62e149e: Checkbox now correctly applies visible focus styling by importing
|
|
167
|
+
Checkbox token definitions into the module stylesheet.
|
|
168
|
+
|
|
169
|
+
Added a dedicated test id on the Checkbox checkmark container span to make
|
|
170
|
+
focus-state assertions more stable in end-to-end tests.
|
|
171
|
+
|
|
172
|
+
New Checkbox Storybook stories for focus verification in both light and dark
|
|
173
|
+
|
|
174
|
+
- Updated dependencies [5a17991]
|
|
175
|
+
- Updated dependencies [380b19c]
|
|
176
|
+
- Updated dependencies [265c898]
|
|
177
|
+
- @pexip/utils@17.4.1
|
|
178
|
+
- @pexip/hooks@21.0.9
|
|
179
|
+
- @pexip/signal@16.9.6
|
|
180
|
+
|
|
3
181
|
## 20.1.0
|
|
4
182
|
|
|
5
183
|
### Minor Changes
|
package/api-docs/README.mdx
CHANGED
|
@@ -80,6 +80,8 @@ import '@pexip/components/dist/index.css';
|
|
|
80
80
|
| [StatusItem](type-aliases/StatusItem.mdx) | - |
|
|
81
81
|
| [ActivityCardAction](type-aliases/ActivityCardAction.mdx) | - |
|
|
82
82
|
| [AriaMenuProps](type-aliases/AriaMenuProps.mdx) | - |
|
|
83
|
+
| [AriaSubMenuContentHelpers](type-aliases/AriaSubMenuContentHelpers.mdx) | Helpers passed to a submenu's `content` render function, allowing the content to close the whole menu or navigate back to the previous level. |
|
|
84
|
+
| [AriaSubMenu](type-aliases/AriaSubMenu.mdx) | A submenu that opens in place inside an [AriaMenu](variables/AriaMenu.mdx) when its parent item is clicked. A submenu can either render a nested list of [AriaMenuItem](type-aliases/AriaMenuItem.mdx) (which can themselves open further submenus) or arbitrary React content. When a submenu is open, a back button is rendered at the top of the menu to return to the previous level. |
|
|
83
85
|
| [AriaMenuItem](type-aliases/AriaMenuItem.mdx) | The structure of a menu item that can be used to create a dropdown menu. |
|
|
84
86
|
| [BreadcrumbItem](type-aliases/BreadcrumbItem.mdx) | - |
|
|
85
87
|
| [DropContentPosition](type-aliases/DropContentPosition.mdx) | - |
|
|
@@ -89,6 +91,7 @@ import '@pexip/components/dist/index.css';
|
|
|
89
91
|
| [MenuAction](type-aliases/MenuAction.mdx) | - |
|
|
90
92
|
| [MenuContent](type-aliases/MenuContent.mdx) | - |
|
|
91
93
|
| [ModalProps](type-aliases/ModalProps.mdx) | - |
|
|
94
|
+
| [MultiselectCoreProps](type-aliases/MultiselectCoreProps.mdx) | - |
|
|
92
95
|
| [MultistepIndicatorProps](type-aliases/MultistepIndicatorProps.mdx) | - |
|
|
93
96
|
| [NotificationToastMessage](type-aliases/NotificationToastMessage.mdx) | - |
|
|
94
97
|
| [NotificationToastSignal](type-aliases/NotificationToastSignal.mdx) | - |
|
|
@@ -152,7 +155,7 @@ import '@pexip/components/dist/index.css';
|
|
|
152
155
|
| [CoreHeader](variables/CoreHeader.mdx) | - |
|
|
153
156
|
| [Divider](variables/Divider.mdx) | - |
|
|
154
157
|
| [DragAndDrop](variables/DragAndDrop.mdx) | - |
|
|
155
|
-
| [Draggable](variables/Draggable.mdx) |
|
|
158
|
+
| [Draggable](variables/Draggable.mdx) | A wrapper that makes its children draggable via pointer (and, when `isMoveableWithArrowKeys` is set, the keyboard). |
|
|
156
159
|
| [FileUpload](variables/FileUpload.mdx) | - |
|
|
157
160
|
| [Heading](variables/Heading.mdx) | - |
|
|
158
161
|
| [Icon](variables/Icon.mdx) | - |
|
|
@@ -182,6 +185,7 @@ import '@pexip/components/dist/index.css';
|
|
|
182
185
|
| [TextHeading](variables/TextHeading.mdx) | - |
|
|
183
186
|
| [TextLink](variables/TextLink.mdx) | - |
|
|
184
187
|
| [ToggleSwitch](variables/ToggleSwitch.mdx) | - |
|
|
188
|
+
| [ToggleSwitchDisplay](variables/ToggleSwitchDisplay.mdx) | Presentational version of ToggleSwitch that renders only the visual toggle indicator and label text — it does not render an `<input>` or manage any interaction/state itself. |
|
|
185
189
|
| [CustomTooltip](variables/CustomTooltip.mdx) | - |
|
|
186
190
|
| [NotificationTooltip](variables/NotificationTooltip.mdx) | - |
|
|
187
191
|
| [Tooltip](variables/Tooltip.mdx) | Tooltips need to be accessible to keyboard and screen reader users, so we ensure that they are only placed on focusable and hoverable elements. For example, plain text and disabled buttons aren't focusable, meaning keyboard and screen reader users would be unable to access the information in that tooltip. |
|
|
@@ -202,7 +206,7 @@ import '@pexip/components/dist/index.css';
|
|
|
202
206
|
| [Accordion](variables/Accordion.mdx) | - |
|
|
203
207
|
| [ActivityCard](variables/ActivityCard.mdx) | - |
|
|
204
208
|
| [ariaMenuOpenStateSignal](variables/ariaMenuOpenStateSignal.mdx) | - |
|
|
205
|
-
| [AriaMenu](variables/AriaMenu.mdx) | AriaMenu component represents a dropdown menu. |
|
|
209
|
+
| [AriaMenu](variables/AriaMenu.mdx) | AriaMenu component represents a dropdown menu. Menu items can open submenus in place, rendering either a nested list of items or arbitrary React content, with a back button to return to the previous level. |
|
|
206
210
|
| [AspectRatio](variables/AspectRatio.mdx) | A wrapper that makes its children element bound to an aspect ratio. Default ration is 16:9, `{width: 16, height: 9}` |
|
|
207
211
|
| [ColorPickerPreviewButton](variables/ColorPickerPreviewButton.mdx) | - |
|
|
208
212
|
| [ImagePreviewButton](variables/ImagePreviewButton.mdx) | - |
|
|
@@ -236,6 +240,7 @@ import '@pexip/components/dist/index.css';
|
|
|
236
240
|
| [HotKey](variables/HotKey.mdx) | - |
|
|
237
241
|
| [ConfirmableMultiselect](variables/ConfirmableMultiselect.mdx) | - |
|
|
238
242
|
| [Multiselect](variables/Multiselect.mdx) | - |
|
|
243
|
+
| [MultiselectCore](variables/MultiselectCore.mdx) | - |
|
|
239
244
|
| [MultistepIndicator](variables/MultistepIndicator.mdx) | - |
|
|
240
245
|
| [NotificationToast](variables/NotificationToast.mdx) | The NotificationToast component works like a normal toast, except it displays data received via a signal, and it stores the messages as an array, displaying one at a time. |
|
|
241
246
|
| [notificationToastSignal](variables/notificationToastSignal.mdx) | - |
|
|
@@ -277,11 +282,13 @@ import '@pexip/components/dist/index.css';
|
|
|
277
282
|
| [UserMenuButton](variables/UserMenuButton.mdx) | - |
|
|
278
283
|
| [UserMenuDropContent](variables/UserMenuDropContent.mdx) | - |
|
|
279
284
|
| [VideoWrapper](variables/VideoWrapper.mdx) | - |
|
|
285
|
+
| [KEYBOARD\_EVENT\_KEY](variables/KEYBOARD_EVENT_KEY.mdx) | - |
|
|
280
286
|
| [themeValues](variables/themeValues.mdx) | - |
|
|
281
287
|
| [ThemeContext](variables/ThemeContext.mdx) | - |
|
|
282
288
|
| [ThemeConsumer](variables/ThemeConsumer.mdx) | - |
|
|
283
289
|
| [ThemeProvider](variables/ThemeProvider.mdx) | - |
|
|
284
290
|
| [TooltipPositionValue](variables/TooltipPositionValue.mdx) | - |
|
|
291
|
+
| [buttonVariantsValues](variables/buttonVariantsValues.mdx) | - |
|
|
285
292
|
|
|
286
293
|
## Functions
|
|
287
294
|
|
|
@@ -318,6 +325,7 @@ import '@pexip/components/dist/index.css';
|
|
|
318
325
|
| [useXlDown](functions/useXlDown.mdx) | - |
|
|
319
326
|
| [useXlUp](functions/useXlUp.mdx) | - |
|
|
320
327
|
| [useXs](functions/useXs.mdx) | - |
|
|
328
|
+
| [useBoundingRect](functions/useBoundingRect.mdx) | Observes a HTMLElement and returns its bounding rect. Updates when the element's size changes. |
|
|
321
329
|
| [useBreakpointChange](functions/useBreakpointChange.mdx) | - |
|
|
322
330
|
| [useFocusFrom](functions/useFocusFrom.mdx) | This hook gives the ability to set the focus on an element which is then blurred right away, thereby effectively resetting the focus order. The next focusable element that comes after this element will be focused on the next tab. |
|
|
323
331
|
| [useFocusFromOpened](functions/useFocusFromOpened.mdx) | Use this hook to set the focus point on an element when something becomes opened, e.g. set focus on a panel container or menu container when it becomes visible so that the next time the user hits on the tab key the element that becomes focused on is potentially a tabbable element inside the container element. |
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| <a id="buttonthreecolumnselector"></a> `ButtonThreeColumnSelector` | `"button-three-column-selector"` |
|
|
8
8
|
| <a id="buttoncollapsablecontainertoggle"></a> `ButtonCollapsableContainerToggle` | `"button-collapsable-container-toggle"` |
|
|
9
9
|
| <a id="checkboxcheck"></a> `CheckboxCheck` | `"checkbox-check"` |
|
|
10
|
+
| <a id="checkboxcheckcontainer"></a> `CheckboxCheckContainer` | `"checkbox-check-container"` |
|
|
10
11
|
| <a id="confirmablemultiselectconfirm"></a> `ConfirmableMultiselectConfirm` | `"confirmable-multiselect-confirm"` |
|
|
11
12
|
| <a id="headercore"></a> `HeaderCore` | `"header-core"` |
|
|
12
13
|
| <a id="headercoreenhancers"></a> `HeaderCoreEnhancers` | `"header-core-enhancers"` |
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
function useBoundingRect(
|
|
3
|
+
element,
|
|
4
|
+
updateOnWindowResize,
|
|
5
|
+
windowResizeThrottle): DOMRect | undefined;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Observes a HTMLElement and returns its bounding rect.
|
|
9
|
+
Updates when the element's size changes.
|
|
10
|
+
|
|
11
|
+
If a ref to a HTMLElement is passed and ref.current is null it polls the ref to detect when
|
|
12
|
+
the HTMLElement value gets assigned to ref.current, this is useful in case the Component
|
|
13
|
+
using this hook does not rerender when ref.current changes.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Default value | Description |
|
|
18
|
+
| ------ | ------ | ------ | ------ |
|
|
19
|
+
| `element` | `HTMLElement \| RefObject<HTMLElement` | null\>` \\| `null` \| `undefined` | The HTMLElement, null, or a ref to an HTMLElement to observe |
|
|
20
|
+
| `updateOnWindowResize` | `boolean` | `false` | Whether to update the rect on window resize (default: false) |
|
|
21
|
+
| `windowResizeThrottle` | `number` | `0` | Throttle interval in ms for window resize updates (default: 0) |
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
DOMRect | undefined
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The DOMRect of the element, or undefined if element is not available
|
|
30
|
+
|
|
31
|
+
## Example
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
35
|
+
const rect = useBoundingRect(ref);
|
|
36
|
+
|
|
37
|
+
const [element, setElement] = useState<HTMLDivElement | null>(null);
|
|
38
|
+
const rect2 = useBoundingRect(element);
|
|
39
|
+
|
|
40
|
+
// Update on window resize with 150ms throttle
|
|
41
|
+
const rect3 = useBoundingRect(ref, true, 150);
|
|
42
|
+
```
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
| <a id="iconimport"></a> `IconImport` | [`IconSource`](IconSource.mdx) |
|
|
81
81
|
| <a id="iconinforound"></a> `IconInfoRound` | [`IconSource`](IconSource.mdx) |
|
|
82
82
|
| <a id="iconkey"></a> `IconKey` | [`IconSource`](IconSource.mdx) |
|
|
83
|
+
| <a id="iconlanguage"></a> `IconLanguage` | [`IconSource`](IconSource.mdx) |
|
|
83
84
|
| <a id="iconleave"></a> `IconLeave` | [`IconSource`](IconSource.mdx) |
|
|
84
85
|
| <a id="iconlink"></a> `IconLink` | [`IconSource`](IconSource.mdx) |
|
|
85
86
|
| <a id="iconlivecaption"></a> `IconLiveCaption` | [`IconSource`](IconSource.mdx) |
|
|
@@ -135,11 +136,13 @@
|
|
|
135
136
|
| <a id="iconstar"></a> `IconStar` | [`IconSource`](IconSource.mdx) |
|
|
136
137
|
| <a id="iconstopround"></a> `IconStopRound` | [`IconSource`](IconSource.mdx) |
|
|
137
138
|
| <a id="iconsupport"></a> `IconSupport` | [`IconSource`](IconSource.mdx) |
|
|
139
|
+
| <a id="iconsupportagent"></a> `IconSupportAgent` | [`IconSource`](IconSource.mdx) |
|
|
138
140
|
| <a id="icontestscripticon"></a> `IconTestScriptIcon` | [`IconSource`](IconSource.mdx) |
|
|
139
141
|
| <a id="iconthumbsdown"></a> `IconThumbsDown` | [`IconSource`](IconSource.mdx) |
|
|
140
142
|
| <a id="iconthumbsup"></a> `IconThumbsUp` | [`IconSource`](IconSource.mdx) |
|
|
141
143
|
| <a id="icontimer"></a> `IconTimer` | [`IconSource`](IconSource.mdx) |
|
|
142
144
|
| <a id="icontranscript"></a> `IconTranscript` | [`IconSource`](IconSource.mdx) |
|
|
145
|
+
| <a id="icontranslation"></a> `IconTranslation` | [`IconSource`](IconSource.mdx) |
|
|
143
146
|
| <a id="icontrash"></a> `IconTrash` | [`IconSource`](IconSource.mdx) |
|
|
144
147
|
| <a id="iconunlock"></a> `IconUnlock` | [`IconSource`](IconSource.mdx) |
|
|
145
148
|
| <a id="iconvideooff"></a> `IconVideoOff` | [`IconSource`](IconSource.mdx) |
|
|
@@ -10,15 +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
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 |
|
|
22
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. |
|
|
23
28
|
| `withTopDivider?` | `boolean` | If set to true, a divider will be rendered above the item. |
|
|
24
29
|
| `withBottomDivider?` | `boolean` | If set to true, a divider will be rendered below the item. |
|
|
@@ -8,6 +8,7 @@ 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
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. |
|
|
@@ -16,3 +17,6 @@ type AriaMenuProps = object;
|
|
|
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. |
|
|
@@ -15,8 +15,9 @@ type MenuItem<T> = object;
|
|
|
15
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` |
|
|
@@ -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;
|
|
@@ -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
|
+
```
|