@molecule/app-ui-react 4.3.2 → 4.11.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/README.md +137 -244
- package/dist/components/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion.js +4 -3
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/Alert.d.ts.map +1 -1
- package/dist/components/Alert.js +2 -1
- package/dist/components/Alert.js.map +1 -1
- package/dist/components/AuthGuard.d.ts.map +1 -1
- package/dist/components/AuthGuard.js +2 -1
- package/dist/components/AuthGuard.js.map +1 -1
- package/dist/components/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar.js +2 -2
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/Badge.d.ts.map +1 -1
- package/dist/components/Badge.js +4 -1
- package/dist/components/Badge.js.map +1 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +3 -1
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Card.d.ts +6 -6
- package/dist/components/Card.d.ts.map +1 -1
- package/dist/components/Card.js +43 -17
- package/dist/components/Card.js.map +1 -1
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +4 -20
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/ConfirmButton.d.ts +4 -4
- package/dist/components/ConfirmButton.d.ts.map +1 -1
- package/dist/components/ConfirmButton.js +18 -13
- package/dist/components/ConfirmButton.js.map +1 -1
- package/dist/components/ConfirmButton.native.d.ts +8 -0
- package/dist/components/ConfirmButton.native.d.ts.map +1 -0
- package/dist/components/ConfirmButton.native.js +4 -0
- package/dist/components/ConfirmButton.native.js.map +1 -0
- package/dist/components/ConfirmButton.web.d.ts +6 -0
- package/dist/components/ConfirmButton.web.d.ts.map +1 -0
- package/dist/components/ConfirmButton.web.js +4 -0
- package/dist/components/ConfirmButton.web.js.map +1 -0
- package/dist/components/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/ConfirmDialog.js +2 -1
- package/dist/components/ConfirmDialog.js.map +1 -1
- package/dist/components/Dropdown.d.ts +7 -7
- package/dist/components/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown.js +66 -125
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/Dropdown.native.d.ts +15 -0
- package/dist/components/Dropdown.native.d.ts.map +1 -0
- package/dist/components/Dropdown.native.js +9 -0
- package/dist/components/Dropdown.native.js.map +1 -0
- package/dist/components/Dropdown.web.d.ts +15 -0
- package/dist/components/Dropdown.web.d.ts.map +1 -0
- package/dist/components/Dropdown.web.js +9 -0
- package/dist/components/Dropdown.web.js.map +1 -0
- package/dist/components/EmptyState.d.ts.map +1 -1
- package/dist/components/EmptyState.js +2 -1
- package/dist/components/EmptyState.js.map +1 -1
- package/dist/components/FloatingInput.d.ts +6 -2
- package/dist/components/FloatingInput.d.ts.map +1 -1
- package/dist/components/FloatingInput.js +13 -8
- package/dist/components/FloatingInput.js.map +1 -1
- package/dist/components/Form.d.ts +11 -2
- package/dist/components/Form.d.ts.map +1 -1
- package/dist/components/Form.js +17 -10
- package/dist/components/Form.js.map +1 -1
- package/dist/components/Icon.d.ts +15 -23
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/Icon.js +14 -20
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +20 -3
- package/dist/components/Input.js.map +1 -1
- package/dist/components/LanguagePicker.d.ts +5 -4
- package/dist/components/LanguagePicker.d.ts.map +1 -1
- package/dist/components/LanguagePicker.js +5 -3
- package/dist/components/LanguagePicker.js.map +1 -1
- package/dist/components/Layout.d.ts.map +1 -1
- package/dist/components/Layout.js +7 -4
- package/dist/components/Layout.js.map +1 -1
- package/dist/components/LoadErrorBanner.d.ts +4 -3
- package/dist/components/LoadErrorBanner.d.ts.map +1 -1
- package/dist/components/LoadErrorBanner.js +4 -2
- package/dist/components/LoadErrorBanner.js.map +1 -1
- package/dist/components/Modal.d.ts +5 -23
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +38 -201
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/PageHeader.d.ts.map +1 -1
- package/dist/components/PageHeader.js +2 -1
- package/dist/components/PageHeader.js.map +1 -1
- package/dist/components/PageShell.d.ts.map +1 -1
- package/dist/components/PageShell.js +3 -2
- package/dist/components/PageShell.js.map +1 -1
- package/dist/components/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination.js +7 -6
- package/dist/components/Pagination.js.map +1 -1
- package/dist/components/Progress.d.ts.map +1 -1
- package/dist/components/Progress.js +2 -1
- package/dist/components/Progress.js.map +1 -1
- package/dist/components/PromptDialog.d.ts.map +1 -1
- package/dist/components/PromptDialog.js +18 -21
- package/dist/components/PromptDialog.js.map +1 -1
- package/dist/components/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup.js +4 -3
- package/dist/components/RadioGroup.js.map +1 -1
- package/dist/components/ResponsiveAppShell.d.ts.map +1 -1
- package/dist/components/ResponsiveAppShell.js +29 -136
- package/dist/components/ResponsiveAppShell.js.map +1 -1
- package/dist/components/Select.d.ts +21 -6
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Select.js +50 -37
- package/dist/components/Select.js.map +1 -1
- package/dist/components/Separator.d.ts.map +1 -1
- package/dist/components/Separator.js +2 -1
- package/dist/components/Separator.js.map +1 -1
- package/dist/components/SidebarUserCard.d.ts +5 -4
- package/dist/components/SidebarUserCard.d.ts.map +1 -1
- package/dist/components/SidebarUserCard.js +4 -3
- package/dist/components/SidebarUserCard.js.map +1 -1
- package/dist/components/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton.js +3 -2
- package/dist/components/Skeleton.js.map +1 -1
- package/dist/components/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner.js +2 -1
- package/dist/components/Spinner.js.map +1 -1
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.js +5 -43
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Table.d.ts.map +1 -1
- package/dist/components/Table.js +9 -8
- package/dist/components/Table.js.map +1 -1
- package/dist/components/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs.js +5 -4
- package/dist/components/Tabs.js.map +1 -1
- package/dist/components/Textarea.d.ts +1 -2
- package/dist/components/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea.js +8 -47
- package/dist/components/Textarea.js.map +1 -1
- package/dist/components/ThemeToggle.d.ts +5 -4
- package/dist/components/ThemeToggle.d.ts.map +1 -1
- package/dist/components/ThemeToggle.js +6 -2
- package/dist/components/ThemeToggle.js.map +1 -1
- package/dist/components/Toast.d.ts +14 -12
- package/dist/components/Toast.d.ts.map +1 -1
- package/dist/components/Toast.js +38 -64
- package/dist/components/Toast.js.map +1 -1
- package/dist/components/Toast.native.d.ts +17 -0
- package/dist/components/Toast.native.d.ts.map +1 -0
- package/dist/components/Toast.native.js +14 -0
- package/dist/components/Toast.native.js.map +1 -0
- package/dist/components/Toast.web.d.ts +16 -0
- package/dist/components/Toast.web.d.ts.map +1 -0
- package/dist/components/Toast.web.js +14 -0
- package/dist/components/Toast.web.js.map +1 -0
- package/dist/components/Tooltip.d.ts +5 -3
- package/dist/components/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip.js +81 -209
- package/dist/components/Tooltip.js.map +1 -1
- package/dist/components/Tooltip.native.d.ts +11 -0
- package/dist/components/Tooltip.native.d.ts.map +1 -0
- package/dist/components/Tooltip.native.js +9 -0
- package/dist/components/Tooltip.native.js.map +1 -0
- package/dist/components/Tooltip.web.d.ts +10 -0
- package/dist/components/Tooltip.web.d.ts.map +1 -0
- package/dist/components/Tooltip.web.js +9 -0
- package/dist/components/Tooltip.web.js.map +1 -0
- package/dist/components/UserMenuPopover.d.ts.map +1 -1
- package/dist/components/UserMenuPopover.js +19 -33
- package/dist/components/UserMenuPopover.js.map +1 -1
- package/dist/components/index.d.ts +4 -4
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -4
- package/dist/components/index.js.map +1 -1
- package/dist/elements/Anchor.d.ts +14 -0
- package/dist/elements/Anchor.d.ts.map +1 -0
- package/dist/elements/Anchor.js +17 -0
- package/dist/elements/Anchor.js.map +1 -0
- package/dist/elements/Box.d.ts +16 -0
- package/dist/elements/Box.d.ts.map +1 -0
- package/dist/elements/Box.js +57 -0
- package/dist/elements/Box.js.map +1 -0
- package/dist/elements/CheckField.d.ts +17 -0
- package/dist/elements/CheckField.d.ts.map +1 -0
- package/dist/elements/CheckField.js +53 -0
- package/dist/elements/CheckField.js.map +1 -0
- package/dist/elements/Disclosure.d.ts +12 -0
- package/dist/elements/Disclosure.d.ts.map +1 -0
- package/dist/elements/Disclosure.js +25 -0
- package/dist/elements/Disclosure.js.map +1 -0
- package/dist/elements/Fieldset.d.ts +16 -0
- package/dist/elements/Fieldset.d.ts.map +1 -0
- package/dist/elements/Fieldset.js +18 -0
- package/dist/elements/Fieldset.js.map +1 -0
- package/dist/elements/FileField.d.ts +15 -0
- package/dist/elements/FileField.d.ts.map +1 -0
- package/dist/elements/FileField.js +28 -0
- package/dist/elements/FileField.js.map +1 -0
- package/dist/elements/FormArea.d.ts +18 -0
- package/dist/elements/FormArea.d.ts.map +1 -0
- package/dist/elements/FormArea.js +26 -0
- package/dist/elements/FormArea.js.map +1 -0
- package/dist/elements/GlyphIcon.d.ts +17 -0
- package/dist/elements/GlyphIcon.d.ts.map +1 -0
- package/dist/elements/GlyphIcon.js +29 -0
- package/dist/elements/GlyphIcon.js.map +1 -0
- package/dist/elements/Image.d.ts +17 -0
- package/dist/elements/Image.d.ts.map +1 -0
- package/dist/elements/Image.js +22 -0
- package/dist/elements/Image.js.map +1 -0
- package/dist/elements/Link.d.ts +17 -0
- package/dist/elements/Link.d.ts.map +1 -0
- package/dist/elements/Link.js +15 -0
- package/dist/elements/Link.js.map +1 -0
- package/dist/elements/Pressable.d.ts +17 -0
- package/dist/elements/Pressable.d.ts.map +1 -0
- package/dist/elements/Pressable.js +43 -0
- package/dist/elements/Pressable.js.map +1 -0
- package/dist/elements/PulseDots.d.ts +15 -0
- package/dist/elements/PulseDots.d.ts.map +1 -0
- package/dist/elements/PulseDots.js +36 -0
- package/dist/elements/PulseDots.js.map +1 -0
- package/dist/elements/RangeField.d.ts +11 -0
- package/dist/elements/RangeField.d.ts.map +1 -0
- package/dist/elements/RangeField.js +24 -0
- package/dist/elements/RangeField.js.map +1 -0
- package/dist/elements/RichText.d.ts +23 -0
- package/dist/elements/RichText.d.ts.map +1 -0
- package/dist/elements/RichText.js +40 -0
- package/dist/elements/RichText.js.map +1 -0
- package/dist/elements/Rule.d.ts +9 -0
- package/dist/elements/Rule.d.ts.map +1 -0
- package/dist/elements/Rule.js +16 -0
- package/dist/elements/Rule.js.map +1 -0
- package/dist/elements/ScrollArea.d.ts +16 -0
- package/dist/elements/ScrollArea.d.ts.map +1 -0
- package/dist/elements/ScrollArea.js +42 -0
- package/dist/elements/ScrollArea.js.map +1 -0
- package/dist/elements/SelectField.d.ts +11 -0
- package/dist/elements/SelectField.d.ts.map +1 -0
- package/dist/elements/SelectField.js +64 -0
- package/dist/elements/SelectField.js.map +1 -0
- package/dist/elements/Svg.d.ts +124 -0
- package/dist/elements/Svg.d.ts.map +1 -0
- package/dist/elements/Svg.js +178 -0
- package/dist/elements/Svg.js.map +1 -0
- package/dist/elements/TableBox.d.ts +16 -0
- package/dist/elements/TableBox.d.ts.map +1 -0
- package/dist/elements/TableBox.js +18 -0
- package/dist/elements/TableBox.js.map +1 -0
- package/dist/elements/TableCell.d.ts +16 -0
- package/dist/elements/TableCell.d.ts.map +1 -0
- package/dist/elements/TableCell.js +18 -0
- package/dist/elements/TableCell.js.map +1 -0
- package/dist/elements/Text.d.ts +18 -0
- package/dist/elements/Text.d.ts.map +1 -0
- package/dist/elements/Text.js +20 -0
- package/dist/elements/Text.js.map +1 -0
- package/dist/elements/TextField.d.ts +18 -0
- package/dist/elements/TextField.d.ts.map +1 -0
- package/dist/elements/TextField.js +105 -0
- package/dist/elements/TextField.js.map +1 -0
- package/dist/elements/drag.d.ts +11 -0
- package/dist/elements/drag.d.ts.map +1 -0
- package/dist/elements/drag.js +22 -0
- package/dist/elements/drag.js.map +1 -0
- package/dist/elements/flow.d.ts +17 -0
- package/dist/elements/flow.d.ts.map +1 -0
- package/dist/elements/flow.js +18 -0
- package/dist/elements/flow.js.map +1 -0
- package/dist/elements/hover.d.ts +10 -0
- package/dist/elements/hover.d.ts.map +1 -0
- package/dist/elements/hover.js +23 -0
- package/dist/elements/hover.js.map +1 -0
- package/dist/elements/index.d.ts +45 -0
- package/dist/elements/index.d.ts.map +1 -0
- package/dist/elements/index.js +45 -0
- package/dist/elements/index.js.map +1 -0
- package/dist/elements/measure.d.ts +25 -0
- package/dist/elements/measure.d.ts.map +1 -0
- package/dist/elements/measure.js +20 -0
- package/dist/elements/measure.js.map +1 -0
- package/dist/elements/paste.d.ts +5 -0
- package/dist/elements/paste.d.ts.map +1 -0
- package/dist/elements/paste.js +15 -0
- package/dist/elements/paste.js.map +1 -0
- package/dist/elements/ref.d.ts +16 -0
- package/dist/elements/ref.d.ts.map +1 -0
- package/dist/elements/ref.js +18 -0
- package/dist/elements/ref.js.map +1 -0
- package/dist/elements/reveal.d.ts +8 -0
- package/dist/elements/reveal.d.ts.map +1 -0
- package/dist/elements/reveal.js +14 -0
- package/dist/elements/reveal.js.map +1 -0
- package/dist/elements/style.d.ts +35 -0
- package/dist/elements/style.d.ts.map +1 -0
- package/dist/elements/style.js +34 -0
- package/dist/elements/style.js.map +1 -0
- package/dist/elements/types.d.ts +23 -0
- package/dist/elements/types.d.ts.map +1 -0
- package/dist/elements/types.js +7 -0
- package/dist/elements/types.js.map +1 -0
- package/dist/elements/viewport.d.ts +53 -0
- package/dist/elements/viewport.d.ts.map +1 -0
- package/dist/elements/viewport.js +104 -0
- package/dist/elements/viewport.js.map +1 -0
- package/dist/elements/wheelZoom.d.ts +12 -0
- package/dist/elements/wheelZoom.d.ts.map +1 -0
- package/dist/elements/wheelZoom.js +18 -0
- package/dist/elements/wheelZoom.js.map +1 -0
- package/dist/index.web.d.ts +13 -0
- package/dist/index.web.d.ts.map +1 -0
- package/dist/index.web.js +12 -0
- package/dist/index.web.js.map +1 -0
- package/dist/platform/arrow.d.ts +5 -0
- package/dist/platform/arrow.d.ts.map +1 -0
- package/dist/platform/arrow.js +49 -0
- package/dist/platform/arrow.js.map +1 -0
- package/dist/platform/index.d.ts +29 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/index.js +180 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/types.d.ts +19 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utilities/isReactNode.d.ts +16 -0
- package/dist/utilities/isReactNode.d.ts.map +1 -0
- package/dist/utilities/isReactNode.js +27 -0
- package/dist/utilities/isReactNode.js.map +1 -0
- package/dist/utilities/mergeRefs.d.ts +7 -3
- package/dist/utilities/mergeRefs.d.ts.map +1 -1
- package/dist/utilities/mergeRefs.js +22 -11
- package/dist/utilities/mergeRefs.js.map +1 -1
- package/dist/utilities/renderIcon.d.ts +3 -2
- package/dist/utilities/renderIcon.d.ts.map +1 -1
- package/dist/utilities/renderIcon.js +9 -14
- package/dist/utilities/renderIcon.js.map +1 -1
- package/package.json +39 -14
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-26T04:13:56.022Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-ui-react
|
|
@@ -78,7 +78,7 @@ function ConfirmDelete({ onConfirm }: { onConfirm: () => void }) {
|
|
|
78
78
|
## Installation
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
|
-
npm install @molecule/app-ui-react @molecule/app-i18n @molecule/app-icons @molecule/app-react @molecule/app-ui react react-dom
|
|
81
|
+
npm install @molecule/app-ui-react @molecule/app-filesystem @molecule/app-i18n @molecule/app-icons @molecule/app-inline-style-dom @molecule/app-overlay-dom @molecule/app-pointer-events-dom @molecule/app-react @molecule/app-ui react react-dom
|
|
82
82
|
npm install -D @types/react @types/react-dom
|
|
83
83
|
```
|
|
84
84
|
|
|
@@ -99,8 +99,8 @@ interface CSSProperties {
|
|
|
99
99
|
|
|
100
100
|
#### `KitEvent`
|
|
101
101
|
|
|
102
|
-
The event a UI kit hands a component's handler: the members
|
|
103
|
-
passes React's event (so `stopPropagation()` stops React parent handlers), the other kits pass the DOM event;
|
|
102
|
+
The event a web UI kit hands a component's handler: the members shared by the web kits. React's kit
|
|
103
|
+
passes React's event (so `stopPropagation()` stops React parent handlers), the other web kits pass the DOM event;
|
|
104
104
|
both satisfy this type. A handler that needs a member only one of them has (`nativeEvent`, `composedPath()`,
|
|
105
105
|
`isComposing`) takes the component's ref element (see {@link BaseProps}) and listens on it.
|
|
106
106
|
|
|
@@ -246,7 +246,7 @@ interface HTMLElementProps extends BaseProps {
|
|
|
246
246
|
id?: string
|
|
247
247
|
title?: string
|
|
248
248
|
tabIndex?: number
|
|
249
|
-
role?:
|
|
249
|
+
role?: ElementRole
|
|
250
250
|
'aria-label'?: string
|
|
251
251
|
'aria-labelledby'?: string
|
|
252
252
|
'aria-describedby'?: string
|
|
@@ -290,6 +290,7 @@ interface InputElementProps extends HTMLElementProps {
|
|
|
290
290
|
maxLength?: number
|
|
291
291
|
minLength?: number
|
|
292
292
|
pattern?: string
|
|
293
|
+
/** Web change event. Prefer the control's value callback for shared web and native code. */
|
|
293
294
|
onChange?: ChangeEventHandler
|
|
294
295
|
onInput?: FormEventHandler
|
|
295
296
|
}
|
|
@@ -331,6 +332,7 @@ interface TextareaElementProps extends HTMLElementProps {
|
|
|
331
332
|
maxLength?: number
|
|
332
333
|
minLength?: number
|
|
333
334
|
wrap?: 'hard' | 'soft' | 'off'
|
|
335
|
+
/** Web change event. {@link TextareaProps.onValueChange} also works on native. */
|
|
334
336
|
onChange?: ChangeEventHandler
|
|
335
337
|
onInput?: FormEventHandler
|
|
336
338
|
}
|
|
@@ -346,6 +348,7 @@ interface SelectElementProps extends HTMLElementProps {
|
|
|
346
348
|
required?: boolean
|
|
347
349
|
autoFocus?: boolean
|
|
348
350
|
multiple?: boolean
|
|
351
|
+
/** Web change event. {@link SelectProps.onValueChange} also works on native. */
|
|
349
352
|
onChange?: ChangeEventHandler
|
|
350
353
|
}
|
|
351
354
|
```
|
|
@@ -427,7 +430,7 @@ Props for the Input component (text field, email, password, etc.).
|
|
|
427
430
|
Ref element: the native `<input>`.
|
|
428
431
|
|
|
429
432
|
```typescript
|
|
430
|
-
interface InputProps extends InputElementProps {
|
|
433
|
+
interface InputProps extends InputElementProps, Pick<TextFieldProps, 'onValueChange'> {
|
|
431
434
|
/**
|
|
432
435
|
* Input type.
|
|
433
436
|
*/
|
|
@@ -494,7 +497,7 @@ Props for the Textarea component.
|
|
|
494
497
|
Ref element: the native `<textarea>`.
|
|
495
498
|
|
|
496
499
|
```typescript
|
|
497
|
-
interface TextareaProps extends TextareaElementProps {
|
|
500
|
+
interface TextareaProps extends TextareaElementProps, Pick<TextFieldProps, 'onValueChange'> {
|
|
498
501
|
/**
|
|
499
502
|
* Text size tier (see {@link TextareaClassOptions.size}) — pass the same
|
|
500
503
|
* `size` as a neighboring Input for identical font sizes.
|
|
@@ -580,7 +583,7 @@ interface SelectProps<T = string> extends SelectElementProps {
|
|
|
580
583
|
value?: T
|
|
581
584
|
|
|
582
585
|
/**
|
|
583
|
-
*
|
|
586
|
+
* Called with the selected value on web and native.
|
|
584
587
|
*/
|
|
585
588
|
onValueChange?: (value: T) => void
|
|
586
589
|
|
|
@@ -623,7 +626,7 @@ Props for the Checkbox component.
|
|
|
623
626
|
Ref element: the native `<input type="checkbox">`.
|
|
624
627
|
|
|
625
628
|
```typescript
|
|
626
|
-
interface CheckboxProps extends InputElementProps {
|
|
629
|
+
interface CheckboxProps extends InputElementProps, Pick<CheckFieldProps, 'onCheckedChange'> {
|
|
627
630
|
/**
|
|
628
631
|
* Checkbox label.
|
|
629
632
|
*/
|
|
@@ -734,7 +737,7 @@ Props for the Switch/Toggle component.
|
|
|
734
737
|
Ref element: the `role="switch"` button.
|
|
735
738
|
|
|
736
739
|
```typescript
|
|
737
|
-
interface SwitchProps extends InputElementProps {
|
|
740
|
+
interface SwitchProps extends InputElementProps, Pick<CheckFieldProps, 'onCheckedChange'> {
|
|
738
741
|
/**
|
|
739
742
|
* Switch label.
|
|
740
743
|
*/
|
|
@@ -825,6 +828,14 @@ interface ModalProps extends HTMLElementProps {
|
|
|
825
828
|
* @default 'Close'
|
|
826
829
|
*/
|
|
827
830
|
closeLabel?: string
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* The control that takes focus when the modal opens, such as the field a dialog exists to fill.
|
|
834
|
+
* Without it, focus goes to the first focusable control, or to the dialog when it has none. The
|
|
835
|
+
* modal reads it once the open dialog is in the document, so a control rendered in the
|
|
836
|
+
* children can be named here.
|
|
837
|
+
*/
|
|
838
|
+
initialFocus?: OverlayTarget
|
|
828
839
|
}
|
|
829
840
|
```
|
|
830
841
|
|
|
@@ -927,41 +938,6 @@ interface BadgeProps extends HTMLElementProps {
|
|
|
927
938
|
}
|
|
928
939
|
```
|
|
929
940
|
|
|
930
|
-
#### `TooltipProps`
|
|
931
|
-
|
|
932
|
-
Props for the Tooltip component (hover/focus popover with informational text).
|
|
933
|
-
|
|
934
|
-
Ref element: the `role="tooltip"` box, empty while hidden.
|
|
935
|
-
|
|
936
|
-
```typescript
|
|
937
|
-
interface TooltipProps extends HTMLElementProps {
|
|
938
|
-
/**
|
|
939
|
-
* Tooltip content.
|
|
940
|
-
*/
|
|
941
|
-
content: Children
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* Element that triggers the tooltip.
|
|
945
|
-
*/
|
|
946
|
-
children: Children
|
|
947
|
-
|
|
948
|
-
/**
|
|
949
|
-
* Tooltip placement.
|
|
950
|
-
*/
|
|
951
|
-
placement?: TooltipPlacement
|
|
952
|
-
|
|
953
|
-
/**
|
|
954
|
-
* Delay before showing (ms).
|
|
955
|
-
*/
|
|
956
|
-
delay?: number
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* Whether the tooltip has an arrow.
|
|
960
|
-
*/
|
|
961
|
-
hasArrow?: boolean
|
|
962
|
-
}
|
|
963
|
-
```
|
|
964
|
-
|
|
965
941
|
#### `CardProps`
|
|
966
942
|
|
|
967
943
|
Props for the Card container component (elevated, outlined, or filled surface).
|
|
@@ -1222,60 +1198,6 @@ interface AlertProps extends HTMLElementProps {
|
|
|
1222
1198
|
}
|
|
1223
1199
|
```
|
|
1224
1200
|
|
|
1225
|
-
#### `ToastProps`
|
|
1226
|
-
|
|
1227
|
-
Props for the Toast/notification component.
|
|
1228
|
-
|
|
1229
|
-
```typescript
|
|
1230
|
-
interface ToastProps extends HTMLElementProps {
|
|
1231
|
-
/**
|
|
1232
|
-
* Toast content.
|
|
1233
|
-
*/
|
|
1234
|
-
children?: Children
|
|
1235
|
-
|
|
1236
|
-
/**
|
|
1237
|
-
* Toast title.
|
|
1238
|
-
*/
|
|
1239
|
-
title?: string
|
|
1240
|
-
|
|
1241
|
-
/**
|
|
1242
|
-
* Toast description.
|
|
1243
|
-
*/
|
|
1244
|
-
description?: string
|
|
1245
|
-
|
|
1246
|
-
/**
|
|
1247
|
-
* Toast status/type.
|
|
1248
|
-
*/
|
|
1249
|
-
status?: ColorVariant
|
|
1250
|
-
|
|
1251
|
-
/**
|
|
1252
|
-
* Duration in milliseconds (0 for persistent).
|
|
1253
|
-
*/
|
|
1254
|
-
duration?: number
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* Whether the toast is dismissible.
|
|
1258
|
-
*/
|
|
1259
|
-
dismissible?: boolean
|
|
1260
|
-
|
|
1261
|
-
/**
|
|
1262
|
-
* Called when dismissed.
|
|
1263
|
-
*/
|
|
1264
|
-
onDismiss?: () => void
|
|
1265
|
-
|
|
1266
|
-
/**
|
|
1267
|
-
* Toast position.
|
|
1268
|
-
*/
|
|
1269
|
-
position?: 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left'
|
|
1270
|
-
|
|
1271
|
-
/**
|
|
1272
|
-
* Accessible label for the close button.
|
|
1273
|
-
* @default 'Close'
|
|
1274
|
-
*/
|
|
1275
|
-
closeLabel?: string
|
|
1276
|
-
}
|
|
1277
|
-
```
|
|
1278
|
-
|
|
1279
1201
|
#### `TabItem`
|
|
1280
1202
|
|
|
1281
1203
|
A single tab in a Tabs component.
|
|
@@ -1679,7 +1601,7 @@ Props for {@link ConfirmButton}.
|
|
|
1679
1601
|
```typescript
|
|
1680
1602
|
interface ConfirmButtonProps extends Omit<
|
|
1681
1603
|
ButtonProps,
|
|
1682
|
-
'onClick' | 'children' | 'onConfirm' | keyof React.DOMAttributes<
|
|
1604
|
+
'onClick' | 'children' | 'onConfirm' | keyof React.DOMAttributes<ElementHandle>
|
|
1683
1605
|
> {
|
|
1684
1606
|
/**
|
|
1685
1607
|
* Fired ONLY on the confirming (second) click — i.e. when the action
|
|
@@ -1762,15 +1684,11 @@ interface ReactFormProps extends FormProps {
|
|
|
1762
1684
|
|
|
1763
1685
|
#### `IconProps`
|
|
1764
1686
|
|
|
1765
|
-
Props for {@link Icon}
|
|
1766
|
-
|
|
1767
|
-
Extends `SVGProps<SVGSVGElement>` so callers can pass any SVG / HTML
|
|
1768
|
-
attribute the underlying `<svg>` accepts, including `data-mol-id`,
|
|
1769
|
-
`aria-*`, `role`, event handlers, `style`, etc. — without the
|
|
1770
|
-
component needing to enumerate them.
|
|
1687
|
+
Props for {@link Icon}: the glyph, its size, and the attributes the root `<svg>` takes
|
|
1688
|
+
(`aria-*`, `role`, `data-*` and `data-mol-id`, paint overrides such as `fill`, and `style`).
|
|
1771
1689
|
|
|
1772
1690
|
```typescript
|
|
1773
|
-
interface IconProps extends Omit<
|
|
1691
|
+
interface IconProps extends ElementProps, Omit<SvgPaintProps, 'className'> {
|
|
1774
1692
|
/**
|
|
1775
1693
|
* Name of the glyph to look up in the bonded icon set. Typed as
|
|
1776
1694
|
* {@link IconName} so a typo fails the type-check instead of throwing at
|
|
@@ -1782,6 +1700,8 @@ interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'width' | 'height' | '
|
|
|
1782
1700
|
size?: number
|
|
1783
1701
|
/** Class name forwarded to the root `<svg>`. */
|
|
1784
1702
|
className?: string
|
|
1703
|
+
/** CSS for the root `<svg>` on the web. */
|
|
1704
|
+
style?: CSSProperties
|
|
1785
1705
|
}
|
|
1786
1706
|
```
|
|
1787
1707
|
|
|
@@ -1789,14 +1709,14 @@ interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'width' | 'height' | '
|
|
|
1789
1709
|
|
|
1790
1710
|
Props for {@link LanguagePicker}.
|
|
1791
1711
|
|
|
1792
|
-
Extends
|
|
1712
|
+
Extends the framework-agnostic button element props so callers can pass any extra
|
|
1793
1713
|
`data-*`, `aria-*`, event handler, or `style` prop without forking the
|
|
1794
1714
|
component. The named props let apps customize the trigger label, icon,
|
|
1795
1715
|
size, and modal heading without spreading attribute concerns.
|
|
1796
1716
|
|
|
1797
1717
|
```typescript
|
|
1798
1718
|
interface LanguagePickerProps extends Omit<
|
|
1799
|
-
|
|
1719
|
+
ButtonElementProps,
|
|
1800
1720
|
'aria-label' | 'onClick' | 'type' | 'children'
|
|
1801
1721
|
> {
|
|
1802
1722
|
/** i18n key for the trigger button label / aria-label. Defaults to `'footer.language'`. */
|
|
@@ -1831,10 +1751,10 @@ interface LanguagePickerProps extends Omit<
|
|
|
1831
1751
|
#### `LoadErrorBannerProps`
|
|
1832
1752
|
|
|
1833
1753
|
Props for {@link LoadErrorBanner}. Rest props are forwarded to the root
|
|
1834
|
-
|
|
1754
|
+
element, so they are typed as its attributes.
|
|
1835
1755
|
|
|
1836
1756
|
```typescript
|
|
1837
|
-
interface LoadErrorBannerProps extends Omit<
|
|
1757
|
+
interface LoadErrorBannerProps extends Omit<HTMLElementProps, 'children'> {
|
|
1838
1758
|
/** The primary error line (e.g. the localized "Could not load X."). */
|
|
1839
1759
|
message: React.ReactNode
|
|
1840
1760
|
/** Secondary line under the message (status code, hint). */
|
|
@@ -2139,15 +2059,16 @@ interface SeparatorProps extends BaseProps {
|
|
|
2139
2059
|
|
|
2140
2060
|
Props for the {@link SidebarUserCard} component.
|
|
2141
2061
|
|
|
2142
|
-
Extends
|
|
2062
|
+
Extends the framework-agnostic button element props so callers can pass extra
|
|
2143
2063
|
`data-*`, `aria-*`, `style`, or event handler props onto the trigger
|
|
2144
2064
|
button without forking. The named props below cover the common
|
|
2145
2065
|
customization points.
|
|
2146
2066
|
|
|
2147
2067
|
```typescript
|
|
2148
2068
|
interface SidebarUserCardProps extends Omit<
|
|
2149
|
-
|
|
2150
|
-
|
|
2069
|
+
ButtonElementProps,
|
|
2070
|
+
// `dataMolId` names the trigger, so the generic `automationId` is not a second way to do it.
|
|
2071
|
+
'aria-label' | 'onClick' | 'children' | 'automationId'
|
|
2151
2072
|
> {
|
|
2152
2073
|
/**
|
|
2153
2074
|
* Panel content shown inside the drawer/modal (typically the app's
|
|
@@ -2185,14 +2106,14 @@ interface SidebarUserCardProps extends Omit<
|
|
|
2185
2106
|
|
|
2186
2107
|
Props for {@link ThemeToggle}.
|
|
2187
2108
|
|
|
2188
|
-
Extends
|
|
2109
|
+
Extends the framework-agnostic button element props so callers can pass any extra
|
|
2189
2110
|
`data-*`, `aria-*`, event handler, or `style` prop without forking the
|
|
2190
2111
|
component. The handful of explicitly named props below let apps swap
|
|
2191
2112
|
the icon glyphs, label, or size without spreading attribute concerns.
|
|
2192
2113
|
|
|
2193
2114
|
```typescript
|
|
2194
2115
|
interface ThemeToggleProps extends Omit<
|
|
2195
|
-
|
|
2116
|
+
ButtonElementProps,
|
|
2196
2117
|
'aria-label' | 'aria-pressed' | 'onClick' | 'type'
|
|
2197
2118
|
> {
|
|
2198
2119
|
/** i18n key for the `aria-label`. Defaults to `'theme.toggle'`. */
|
|
@@ -2341,6 +2262,38 @@ interface UserMenuPopoverSignOutProps {
|
|
|
2341
2262
|
}
|
|
2342
2263
|
```
|
|
2343
2264
|
|
|
2265
|
+
#### `ToastProps`
|
|
2266
|
+
|
|
2267
|
+
Toast's root box attributes and notification content.
|
|
2268
|
+
|
|
2269
|
+
```typescript
|
|
2270
|
+
interface ToastProps
|
|
2271
|
+
extends
|
|
2272
|
+
Omit<OverlayRootProps, 'title'>,
|
|
2273
|
+
Omit<CoreToastProps, keyof HTMLElementProps | 'children'> {
|
|
2274
|
+
/** The displayed notification heading. */
|
|
2275
|
+
title?: CoreToastProps['title']
|
|
2276
|
+
/** Message shown when no description was supplied. */
|
|
2277
|
+
children?: ReactNode
|
|
2278
|
+
}
|
|
2279
|
+
```
|
|
2280
|
+
|
|
2281
|
+
#### `TooltipProps`
|
|
2282
|
+
|
|
2283
|
+
Tooltip's root box attributes and the trigger that shows its content.
|
|
2284
|
+
|
|
2285
|
+
```typescript
|
|
2286
|
+
interface TooltipProps
|
|
2287
|
+
extends
|
|
2288
|
+
OverlayRootProps,
|
|
2289
|
+
Omit<CoreTooltipProps, keyof HTMLElementProps | 'children' | 'content'> {
|
|
2290
|
+
/** The tooltip's content. */
|
|
2291
|
+
content: ReactNode
|
|
2292
|
+
/** The trigger whose focus or hover reveals the tooltip. */
|
|
2293
|
+
children: ReactNode
|
|
2294
|
+
}
|
|
2295
|
+
```
|
|
2296
|
+
|
|
2344
2297
|
### Types
|
|
2345
2298
|
|
|
2346
2299
|
#### `Children`
|
|
@@ -2549,32 +2502,25 @@ function ConfirmDialog({
|
|
|
2549
2502
|
#### `Icon(props)`
|
|
2550
2503
|
|
|
2551
2504
|
Renders an SVG glyph looked up by `name` from the bonded
|
|
2552
|
-
`@molecule/app-icons` set.
|
|
2505
|
+
`@molecule/app-icons` set, on React DOM and React Native.
|
|
2553
2506
|
|
|
2554
2507
|
Handles two icon-data shapes returned by the bond:
|
|
2555
2508
|
|
|
2556
|
-
1. Pre-rendered SVG markup (`icon.svg`)
|
|
2557
|
-
|
|
2558
|
-
bond a set that controls its own SVG strings.
|
|
2509
|
+
1. Pre-rendered SVG markup (`icon.svg`), drawn by {@link SvgMarkup}. The bond is the trust
|
|
2510
|
+
boundary; only bond a set that controls its own SVG strings.
|
|
2559
2511
|
2. Structured paths (`icon.paths`) — rendered as discrete `<path>`
|
|
2560
2512
|
children, with optional stroke styling forwarded from the icon set.
|
|
2561
2513
|
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
Decorative by default: when the caller passes no `aria-label` /
|
|
2566
|
-
`aria-labelledby` / `role`, the SVG is rendered `aria-hidden` +
|
|
2567
|
-
`focusable="false"` so screen readers skip it (an unnamed inline SVG is
|
|
2568
|
-
announced as a stray "image" by some combos). Passing any of those props
|
|
2569
|
-
opts the icon into the accessibility tree.
|
|
2514
|
+
An icon without an accessible name (`aria-label`, `aria-labelledby` or a `role`) is decorative:
|
|
2515
|
+
it is hidden from assistive technology and never takes focus.
|
|
2570
2516
|
|
|
2571
2517
|
```typescript
|
|
2572
|
-
function Icon({ name, size = 20, className, ...rest }: IconProps): React.JSX.Element
|
|
2518
|
+
function Icon({ name, size = 20, className, style, ...rest }: IconProps): React.JSX.Element
|
|
2573
2519
|
```
|
|
2574
2520
|
|
|
2575
|
-
- `props` — {@link IconProps}
|
|
2521
|
+
- `props` — See {@link IconProps}.
|
|
2576
2522
|
|
|
2577
|
-
**Returns:**
|
|
2523
|
+
**Returns:** The icon.
|
|
2578
2524
|
|
|
2579
2525
|
#### `LanguagePicker(props)`
|
|
2580
2526
|
|
|
@@ -2605,6 +2551,8 @@ function LanguagePicker({
|
|
|
2605
2551
|
iconSize = 16,
|
|
2606
2552
|
display = 'name',
|
|
2607
2553
|
className,
|
|
2554
|
+
style,
|
|
2555
|
+
testId,
|
|
2608
2556
|
renderTrigger,
|
|
2609
2557
|
...rest
|
|
2610
2558
|
}?: LanguagePickerProps): JSX.Element
|
|
@@ -2624,6 +2572,8 @@ function LoadErrorBanner({
|
|
|
2624
2572
|
retryLabel: retryLabelProp,
|
|
2625
2573
|
retryMolId = 'load-error-retry',
|
|
2626
2574
|
children,
|
|
2575
|
+
style,
|
|
2576
|
+
testId,
|
|
2627
2577
|
...rest
|
|
2628
2578
|
}: LoadErrorBannerProps): JSX.Element
|
|
2629
2579
|
```
|
|
@@ -2823,6 +2773,8 @@ function SidebarUserCard({
|
|
|
2823
2773
|
ariaLabelDefault = 'Open account menu',
|
|
2824
2774
|
dataMolId = 'sidebar-user-card',
|
|
2825
2775
|
className,
|
|
2776
|
+
style,
|
|
2777
|
+
testId,
|
|
2826
2778
|
...rest
|
|
2827
2779
|
}: SidebarUserCardProps): JSX.Element
|
|
2828
2780
|
```
|
|
@@ -2853,31 +2805,20 @@ function ThemeToggle({
|
|
|
2853
2805
|
lightIcon = 'sun',
|
|
2854
2806
|
iconSize = 20,
|
|
2855
2807
|
className,
|
|
2808
|
+
style,
|
|
2809
|
+
testId,
|
|
2856
2810
|
...rest
|
|
2857
2811
|
}?: ThemeToggleProps): JSX.Element
|
|
2858
2812
|
```
|
|
2859
2813
|
|
|
2860
2814
|
- `props` — {@link ThemeToggleProps}
|
|
2861
2815
|
|
|
2862
|
-
#### `useToast()`
|
|
2863
|
-
|
|
2864
|
-
Hook to access the toast context for adding and removing toasts.
|
|
2865
|
-
|
|
2866
|
-
```typescript
|
|
2867
|
-
function useToast(): ToastContextValue
|
|
2868
|
-
```
|
|
2869
|
-
|
|
2870
|
-
**Returns:** The toast context value with toast management methods.
|
|
2871
|
-
|
|
2872
2816
|
#### `ToastProvider(props)`
|
|
2873
2817
|
|
|
2874
2818
|
Provider component that manages global toast state.
|
|
2875
2819
|
|
|
2876
2820
|
```typescript
|
|
2877
|
-
function ToastProvider({
|
|
2878
|
-
children,
|
|
2879
|
-
position = 'bottom-right',
|
|
2880
|
-
}: ToastProviderProps): React.JSX.Element
|
|
2821
|
+
function ToastProvider({ children, position = 'bottom-right' }: ToastProviderProps): JSX.Element
|
|
2881
2822
|
```
|
|
2882
2823
|
|
|
2883
2824
|
- `props` — The component props.
|
|
@@ -3099,7 +3040,7 @@ Card header component.
|
|
|
3099
3040
|
|
|
3100
3041
|
```typescript
|
|
3101
3042
|
const CardHeader: React.ForwardRefExoticComponent<
|
|
3102
|
-
|
|
3043
|
+
CardSectionProps & React.RefAttributes<HTMLDivElement>
|
|
3103
3044
|
>
|
|
3104
3045
|
```
|
|
3105
3046
|
|
|
@@ -3109,7 +3050,7 @@ Card title component.
|
|
|
3109
3050
|
|
|
3110
3051
|
```typescript
|
|
3111
3052
|
const CardTitle: React.ForwardRefExoticComponent<
|
|
3112
|
-
|
|
3053
|
+
CardSectionProps & React.RefAttributes<HTMLHeadingElement>
|
|
3113
3054
|
>
|
|
3114
3055
|
```
|
|
3115
3056
|
|
|
@@ -3119,7 +3060,7 @@ Card description component.
|
|
|
3119
3060
|
|
|
3120
3061
|
```typescript
|
|
3121
3062
|
const CardDescription: React.ForwardRefExoticComponent<
|
|
3122
|
-
|
|
3063
|
+
CardSectionProps & React.RefAttributes<HTMLParagraphElement>
|
|
3123
3064
|
>
|
|
3124
3065
|
```
|
|
3125
3066
|
|
|
@@ -3129,7 +3070,7 @@ Card content component.
|
|
|
3129
3070
|
|
|
3130
3071
|
```typescript
|
|
3131
3072
|
const CardContent: React.ForwardRefExoticComponent<
|
|
3132
|
-
|
|
3073
|
+
CardSectionProps & React.RefAttributes<HTMLDivElement>
|
|
3133
3074
|
>
|
|
3134
3075
|
```
|
|
3135
3076
|
|
|
@@ -3139,7 +3080,7 @@ Card footer component.
|
|
|
3139
3080
|
|
|
3140
3081
|
```typescript
|
|
3141
3082
|
const CardFooter: React.ForwardRefExoticComponent<
|
|
3142
|
-
|
|
3083
|
+
CardSectionProps & React.RefAttributes<HTMLDivElement>
|
|
3143
3084
|
>
|
|
3144
3085
|
```
|
|
3145
3086
|
|
|
@@ -3155,62 +3096,37 @@ const Checkbox: React.ForwardRefExoticComponent<
|
|
|
3155
3096
|
|
|
3156
3097
|
#### `ConfirmButton`
|
|
3157
3098
|
|
|
3158
|
-
|
|
3159
|
-
the second commits. Auto-disarms after {@link ConfirmButtonProps.disarmSeconds}
|
|
3160
|
-
(default 4s) so an armed-then-abandoned row can't surprise anyone later.
|
|
3161
|
-
|
|
3162
|
-
Replaces the fleet's hand-rolled arm-confirm pattern (previously
|
|
3163
|
-
reimplemented per app — button flips, dialogs, `window.confirm`, or worse,
|
|
3164
|
-
nothing at all) with one accessible, touch-friendly implementation:
|
|
3165
|
-
the whole button is the target (≥36px via the button CVA), the armed
|
|
3166
|
-
state is announced through `aria-live`, and Escape disarms.
|
|
3099
|
+
Confirms a destructive action and forwards its host handle.
|
|
3167
3100
|
|
|
3168
3101
|
```typescript
|
|
3169
|
-
const ConfirmButton:
|
|
3170
|
-
ConfirmButtonProps & React.RefAttributes<HTMLButtonElement>
|
|
3171
|
-
>
|
|
3102
|
+
const ConfirmButton: ForwardRefExoticComponent<ConfirmButtonProps & RefAttributes<ElementHandle>>
|
|
3172
3103
|
```
|
|
3173
3104
|
|
|
3174
3105
|
#### `Dropdown`
|
|
3175
3106
|
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
Implements the WAI-ARIA APG menu-button pattern. The trigger is made a
|
|
3179
|
-
real, keyboard-operable control: if `trigger` is a single element (a
|
|
3180
|
-
`<button>`, an icon `<Button>`, …) it is cloned with `aria-haspopup`,
|
|
3181
|
-
`aria-expanded`, `aria-controls`, and the open/keyboard handlers merged
|
|
3182
|
-
onto it directly — no extra wrapper, no double focus stop. If `trigger`
|
|
3183
|
-
is not a single element (text, a fragment, multiple nodes), it is wrapped
|
|
3184
|
-
in a `role="button" tabIndex={0}` container instead so keyboard/AT users
|
|
3185
|
-
can still reach it. Enter/Space/ArrowDown open the menu and move focus to
|
|
3186
|
-
the first item (ArrowUp opens to the last item); once open, ArrowUp/Down/
|
|
3187
|
-
Home/End roving-navigate the `role="menuitem"` items, Escape closes and
|
|
3188
|
-
returns focus to the trigger, and Tab closes the menu in sync with focus
|
|
3189
|
-
leaving it (matching native menus, which do not trap Tab).
|
|
3107
|
+
Opens a list of options and forwards the menu's mounted host.
|
|
3190
3108
|
|
|
3191
3109
|
```typescript
|
|
3192
|
-
const Dropdown:
|
|
3193
|
-
DropdownProps<string> & React.RefAttributes<HTMLDivElement>
|
|
3194
|
-
>
|
|
3110
|
+
const Dropdown: ForwardRefExoticComponent<DropdownProps<string> & RefAttributes<ElementHandle>>
|
|
3195
3111
|
```
|
|
3196
3112
|
|
|
3197
3113
|
#### `DropdownLabel`
|
|
3198
3114
|
|
|
3199
|
-
|
|
3115
|
+
Labels a group of menu items.
|
|
3200
3116
|
|
|
3201
3117
|
```typescript
|
|
3202
|
-
const DropdownLabel:
|
|
3203
|
-
{ children:
|
|
3118
|
+
const DropdownLabel: ForwardRefExoticComponent<
|
|
3119
|
+
{ children: ReactNode; className?: string } & RefAttributes<ElementHandle>
|
|
3204
3120
|
>
|
|
3205
3121
|
```
|
|
3206
3122
|
|
|
3207
3123
|
#### `DropdownSeparator`
|
|
3208
3124
|
|
|
3209
|
-
|
|
3125
|
+
Separates groups of menu items.
|
|
3210
3126
|
|
|
3211
3127
|
```typescript
|
|
3212
|
-
const DropdownSeparator:
|
|
3213
|
-
{ className?: string } &
|
|
3128
|
+
const DropdownSeparator: ForwardRefExoticComponent<
|
|
3129
|
+
{ className?: string } & RefAttributes<ElementHandle>
|
|
3214
3130
|
>
|
|
3215
3131
|
```
|
|
3216
3132
|
|
|
@@ -3273,9 +3189,15 @@ const FormField: React.ForwardRefExoticComponent<
|
|
|
3273
3189
|
|
|
3274
3190
|
Label component.
|
|
3275
3191
|
|
|
3192
|
+
It takes a label element's React attributes and renders the renderer-neutral label element.
|
|
3193
|
+
`role` and `aria-invalid` take the types that element takes (the ones every kit component's
|
|
3194
|
+
props declare); the other attributes reach the element as given.
|
|
3195
|
+
|
|
3276
3196
|
```typescript
|
|
3277
3197
|
const Label: React.ForwardRefExoticComponent<
|
|
3278
|
-
React.LabelHTMLAttributes<HTMLLabelElement> & {
|
|
3198
|
+
Omit<React.LabelHTMLAttributes<HTMLLabelElement>, 'role' | 'aria-invalid'> & {
|
|
3199
|
+
role?: ElementRole
|
|
3200
|
+
'aria-invalid'?: AriaBoolean
|
|
3279
3201
|
required?: boolean
|
|
3280
3202
|
} & React.RefAttributes<HTMLLabelElement>
|
|
3281
3203
|
>
|
|
@@ -3325,29 +3247,13 @@ const Spacer: React.ForwardRefExoticComponent<SpacerProps & React.RefAttributes<
|
|
|
3325
3247
|
|
|
3326
3248
|
#### `Modal`
|
|
3327
3249
|
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
`aria-*`, `data-*`, `automationId` as `data-mol-id`, the DOM event handlers) reaches the
|
|
3332
|
-
inner dialog `<div>`; a caller's `role`, `tabIndex` or `aria-labelledby` replaces the
|
|
3333
|
-
default (e.g. `role="alertdialog"`).
|
|
3334
|
-
|
|
3335
|
-
The internal close button always carries `data-mol-id="modal-close"`
|
|
3336
|
-
as the molecule-convention default for the one fixed interactive
|
|
3337
|
-
element inside the chrome.
|
|
3338
|
-
|
|
3339
|
-
Implements the WAI-ARIA APG dialog (modal) pattern: on open, focus moves
|
|
3340
|
-
to the first focusable element inside the dialog (or the dialog itself
|
|
3341
|
-
when it has none); Tab/Shift+Tab are trapped inside the dialog; on close,
|
|
3342
|
-
focus returns to whatever was focused before the dialog opened. Stacked
|
|
3343
|
-
dialogs (a confirm above a drawer) each register on a module-level stack —
|
|
3344
|
-
Escape and the Tab trap only act for the TOPMOST dialog, and the body
|
|
3345
|
-
scroll lock is reference-counted so closing one of several open dialogs
|
|
3346
|
-
never unlocks scroll behind the ones still open.
|
|
3250
|
+
A blocking dialog. The inner dialog receives the forwarded ref and caller attributes,
|
|
3251
|
+
including overrides for `role`, `tabIndex` and `aria-labelledby`. The platform owns
|
|
3252
|
+
the dialog's focus, dismissal order and scroll lock.
|
|
3347
3253
|
|
|
3348
3254
|
```typescript
|
|
3349
|
-
const Modal:
|
|
3350
|
-
ModalProps & { 'data-mol-id'?: string } &
|
|
3255
|
+
const Modal: ForwardRefExoticComponent<
|
|
3256
|
+
ModalProps & { 'data-mol-id'?: string } & RefAttributes<HTMLDivElement>
|
|
3351
3257
|
>
|
|
3352
3258
|
```
|
|
3353
3259
|
|
|
@@ -3442,12 +3348,10 @@ const ResponsiveAppShell: typeof ResponsiveAppShellBase & {
|
|
|
3442
3348
|
|
|
3443
3349
|
#### `Select`
|
|
3444
3350
|
|
|
3445
|
-
Select
|
|
3351
|
+
Select with an optional label, hint, validation error and grouped choices.
|
|
3446
3352
|
|
|
3447
3353
|
```typescript
|
|
3448
|
-
const Select:
|
|
3449
|
-
SelectProps<string> & React.RefAttributes<HTMLSelectElement>
|
|
3450
|
-
>
|
|
3354
|
+
const Select: ForwardRefExoticComponent<ReactSelectProps & RefAttributes<HTMLSelectElement>>
|
|
3451
3355
|
```
|
|
3452
3356
|
|
|
3453
3357
|
#### `Separator`
|
|
@@ -3532,55 +3436,39 @@ const Tabs: React.ForwardRefExoticComponent<TabsProps<string> & React.RefAttribu
|
|
|
3532
3436
|
Textarea component.
|
|
3533
3437
|
|
|
3534
3438
|
```typescript
|
|
3535
|
-
const Textarea:
|
|
3536
|
-
TextareaProps & React.RefAttributes<HTMLTextAreaElement>
|
|
3537
|
-
>
|
|
3439
|
+
const Textarea: ForwardRefExoticComponent<TextareaProps & RefAttributes<HTMLTextAreaElement>>
|
|
3538
3440
|
```
|
|
3539
3441
|
|
|
3540
3442
|
#### `Toast`
|
|
3541
3443
|
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
The auto-dismiss countdown pauses on hover AND focus (WCAG 2.2.1) and
|
|
3545
|
-
resumes with whatever time was left — a slow reader or a keyboard/AT
|
|
3546
|
-
user interacting with the toast never has it disappear mid-read. The
|
|
3547
|
-
announced role follows `status`: `warning`/`error` get the assertive
|
|
3548
|
-
`role="alert"`; every other status (`info`, `success`, the default) gets
|
|
3549
|
-
the polite `role="status"` so routine confirmations don't interrupt a
|
|
3550
|
-
screen reader mid-sentence the way an assertive announcement does.
|
|
3444
|
+
Renders a notification and forwards its renderer's host handle.
|
|
3551
3445
|
|
|
3552
3446
|
```typescript
|
|
3553
|
-
const Toast:
|
|
3447
|
+
const Toast: ForwardRefExoticComponent<ToastProps & RefAttributes<ElementHandle>>
|
|
3554
3448
|
```
|
|
3555
3449
|
|
|
3556
3450
|
#### `ToastContainer`
|
|
3557
3451
|
|
|
3558
|
-
|
|
3452
|
+
Positions notifications in a portal and forwards its host handle.
|
|
3559
3453
|
|
|
3560
3454
|
```typescript
|
|
3561
|
-
const ToastContainer:
|
|
3562
|
-
ToastContainerProps & React.RefAttributes<HTMLDivElement>
|
|
3563
|
-
>
|
|
3455
|
+
const ToastContainer: ForwardRefExoticComponent<ToastContainerProps & RefAttributes<ElementHandle>>
|
|
3564
3456
|
```
|
|
3565
3457
|
|
|
3566
|
-
|
|
3458
|
+
#### `useToast`
|
|
3567
3459
|
|
|
3568
|
-
|
|
3460
|
+
Adds and removes notifications using React-renderable content.
|
|
3569
3461
|
|
|
3570
|
-
|
|
3462
|
+
```typescript
|
|
3463
|
+
const useToast: () => ToastContextValue<ToastProps>
|
|
3464
|
+
```
|
|
3465
|
+
|
|
3466
|
+
#### `Tooltip`
|
|
3571
3467
|
|
|
3572
|
-
|
|
3573
|
-
one custom component that forwards `aria-describedby`) for the tooltip's
|
|
3574
|
-
content to be programmatically associated with it — this is what lets a
|
|
3575
|
-
screen reader announce the tooltip text for the actually-focused control.
|
|
3576
|
-
A non-element `children` (plain text, a fragment, multiple nodes) still
|
|
3577
|
-
shows the tooltip visually on hover/focus, but without that association.
|
|
3578
|
-
`hasArrow` renders a small themed pointer at the resolved `placement`
|
|
3579
|
-
edge. Entering another tooltip trigger immediately dismisses the previous
|
|
3580
|
-
tooltip, including any pending delayed show.
|
|
3468
|
+
Displays supplemental content and forwards the tooltip's host handle while visible.
|
|
3581
3469
|
|
|
3582
3470
|
```typescript
|
|
3583
|
-
const Tooltip:
|
|
3471
|
+
const Tooltip: ForwardRefExoticComponent<TooltipProps & RefAttributes<ElementHandle>>
|
|
3584
3472
|
```
|
|
3585
3473
|
|
|
3586
3474
|
## Injection Notes
|
|
@@ -3589,17 +3477,22 @@ const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttribute
|
|
|
3589
3477
|
|
|
3590
3478
|
Peer dependencies:
|
|
3591
3479
|
|
|
3592
|
-
- `@molecule/app-
|
|
3480
|
+
- `@molecule/app-filesystem` ^1.1.0
|
|
3481
|
+
- `@molecule/app-i18n` ^1.3.0
|
|
3593
3482
|
- `@molecule/app-icons` ^1.0.1
|
|
3594
|
-
- `@molecule/app-react` ^4.
|
|
3595
|
-
- `@molecule/app-ui` ^1.
|
|
3483
|
+
- `@molecule/app-react` ^4.15.0
|
|
3484
|
+
- `@molecule/app-ui` ^1.12.0
|
|
3596
3485
|
- `react` ^18.0.0 || ^19.0.0
|
|
3597
3486
|
- `react-dom` ^18.0.0 || ^19.0.0
|
|
3598
3487
|
|
|
3599
3488
|
### Runtime Dependencies
|
|
3600
3489
|
|
|
3490
|
+
- `@molecule/app-filesystem`
|
|
3601
3491
|
- `@molecule/app-i18n`
|
|
3602
3492
|
- `@molecule/app-icons`
|
|
3493
|
+
- `@molecule/app-inline-style-dom`
|
|
3494
|
+
- `@molecule/app-overlay-dom`
|
|
3495
|
+
- `@molecule/app-pointer-events-dom`
|
|
3603
3496
|
- `@molecule/app-react`
|
|
3604
3497
|
- `@molecule/app-ui`
|
|
3605
3498
|
- `react`
|