@mortenbrudvik/waveui 0.7.0 → 0.9.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 +564 -155
- package/dist/components/button/Button.cjs +1 -1
- package/dist/components/button/Button.cjs.map +1 -1
- package/dist/components/button/Button.mjs +36 -35
- package/dist/components/button/Button.mjs.map +1 -1
- package/dist/components/button/Button.slots.cjs +1 -1
- package/dist/components/button/Button.slots.cjs.map +1 -1
- package/dist/components/button/Button.slots.mjs +31 -21
- package/dist/components/button/Button.slots.mjs.map +1 -1
- package/dist/components/button/CompoundButton.cjs +1 -1
- package/dist/components/button/CompoundButton.cjs.map +1 -1
- package/dist/components/button/CompoundButton.mjs +31 -29
- package/dist/components/button/CompoundButton.mjs.map +1 -1
- package/dist/components/button/Link.cjs +1 -1
- package/dist/components/button/Link.cjs.map +1 -1
- package/dist/components/button/Link.mjs +24 -23
- package/dist/components/button/Link.mjs.map +1 -1
- package/dist/components/button/MenuButton.cjs +1 -1
- package/dist/components/button/MenuButton.cjs.map +1 -1
- package/dist/components/button/MenuButton.mjs +29 -28
- package/dist/components/button/MenuButton.mjs.map +1 -1
- package/dist/components/button/SplitButton.cjs +1 -1
- package/dist/components/button/SplitButton.cjs.map +1 -1
- package/dist/components/button/SplitButton.mjs +46 -45
- package/dist/components/button/SplitButton.mjs.map +1 -1
- package/dist/components/button/ToggleButton.cjs +1 -1
- package/dist/components/button/ToggleButton.cjs.map +1 -1
- package/dist/components/button/ToggleButton.mjs +38 -35
- package/dist/components/button/ToggleButton.mjs.map +1 -1
- package/dist/components/button/Toolbar.cjs +1 -1
- package/dist/components/button/Toolbar.cjs.map +1 -1
- package/dist/components/button/Toolbar.mjs +43 -42
- package/dist/components/button/Toolbar.mjs.map +1 -1
- package/dist/components/button/Toolbar.parts.cjs +1 -1
- package/dist/components/button/Toolbar.parts.cjs.map +1 -1
- package/dist/components/button/Toolbar.parts.mjs +76 -81
- package/dist/components/button/Toolbar.parts.mjs.map +1 -1
- package/dist/components/data-display/Avatar.cjs +1 -1
- package/dist/components/data-display/Avatar.cjs.map +1 -1
- package/dist/components/data-display/Avatar.mjs +72 -67
- package/dist/components/data-display/Avatar.mjs.map +1 -1
- package/dist/components/data-display/AvatarGroup.cjs +1 -1
- package/dist/components/data-display/AvatarGroup.cjs.map +1 -1
- package/dist/components/data-display/AvatarGroup.mjs +89 -88
- package/dist/components/data-display/AvatarGroup.mjs.map +1 -1
- package/dist/components/data-display/Badge.cjs +1 -1
- package/dist/components/data-display/Badge.cjs.map +1 -1
- package/dist/components/data-display/Badge.mjs +17 -16
- package/dist/components/data-display/Badge.mjs.map +1 -1
- package/dist/components/data-display/CounterBadge.cjs +1 -1
- package/dist/components/data-display/CounterBadge.cjs.map +1 -1
- package/dist/components/data-display/CounterBadge.mjs +18 -17
- package/dist/components/data-display/CounterBadge.mjs.map +1 -1
- package/dist/components/data-display/Divider.cjs +1 -1
- package/dist/components/data-display/Divider.cjs.map +1 -1
- package/dist/components/data-display/Divider.mjs +31 -30
- package/dist/components/data-display/Divider.mjs.map +1 -1
- package/dist/components/data-display/Image.cjs +1 -1
- package/dist/components/data-display/Image.cjs.map +1 -1
- package/dist/components/data-display/Image.mjs +16 -15
- package/dist/components/data-display/Image.mjs.map +1 -1
- package/dist/components/data-display/InfoButton.cjs +2 -0
- package/dist/components/data-display/InfoButton.cjs.map +1 -0
- package/dist/components/data-display/InfoButton.mjs +173 -0
- package/dist/components/data-display/InfoButton.mjs.map +1 -0
- package/dist/components/data-display/InfoLabel.cjs +1 -1
- package/dist/components/data-display/InfoLabel.cjs.map +1 -1
- package/dist/components/data-display/InfoLabel.mjs +36 -92
- package/dist/components/data-display/InfoLabel.mjs.map +1 -1
- package/dist/components/data-display/List.cjs +1 -1
- package/dist/components/data-display/List.cjs.map +1 -1
- package/dist/components/data-display/List.mjs +175 -174
- package/dist/components/data-display/List.mjs.map +1 -1
- package/dist/components/data-display/Persona.cjs +1 -1
- package/dist/components/data-display/Persona.cjs.map +1 -1
- package/dist/components/data-display/Persona.mjs +31 -29
- package/dist/components/data-display/Persona.mjs.map +1 -1
- package/dist/components/data-display/PresenceBadge.cjs +1 -1
- package/dist/components/data-display/PresenceBadge.cjs.map +1 -1
- package/dist/components/data-display/PresenceBadge.mjs +25 -24
- package/dist/components/data-display/PresenceBadge.mjs.map +1 -1
- package/dist/components/data-display/Tag.cjs +1 -1
- package/dist/components/data-display/Tag.cjs.map +1 -1
- package/dist/components/data-display/Tag.mjs +87 -82
- package/dist/components/data-display/Tag.mjs.map +1 -1
- package/dist/components/feedback/MessageBar.cjs +1 -1
- package/dist/components/feedback/MessageBar.cjs.map +1 -1
- package/dist/components/feedback/MessageBar.mjs +129 -71
- package/dist/components/feedback/MessageBar.mjs.map +1 -1
- package/dist/components/feedback/MessageBar.parts.cjs +2 -0
- package/dist/components/feedback/MessageBar.parts.cjs.map +1 -0
- package/dist/components/feedback/MessageBar.parts.mjs +84 -0
- package/dist/components/feedback/MessageBar.parts.mjs.map +1 -0
- package/dist/components/feedback/MessageBar.reflow.cjs +2 -0
- package/dist/components/feedback/MessageBar.reflow.cjs.map +1 -0
- package/dist/components/feedback/MessageBar.reflow.mjs +74 -0
- package/dist/components/feedback/MessageBar.reflow.mjs.map +1 -0
- package/dist/components/feedback/MessageBar.status.cjs +1 -1
- package/dist/components/feedback/MessageBar.status.cjs.map +1 -1
- package/dist/components/feedback/MessageBar.status.mjs +2 -1
- package/dist/components/feedback/MessageBar.status.mjs.map +1 -1
- package/dist/components/feedback/ProgressBar.cjs +1 -1
- package/dist/components/feedback/ProgressBar.cjs.map +1 -1
- package/dist/components/feedback/ProgressBar.mjs +44 -43
- package/dist/components/feedback/ProgressBar.mjs.map +1 -1
- package/dist/components/feedback/Skeleton.cjs +1 -1
- package/dist/components/feedback/Skeleton.cjs.map +1 -1
- package/dist/components/feedback/Skeleton.mjs +26 -24
- package/dist/components/feedback/Skeleton.mjs.map +1 -1
- package/dist/components/feedback/Spinner.cjs +1 -1
- package/dist/components/feedback/Spinner.cjs.map +1 -1
- package/dist/components/feedback/Spinner.mjs +32 -31
- package/dist/components/feedback/Spinner.mjs.map +1 -1
- package/dist/components/feedback/Toast.cjs +1 -1
- package/dist/components/feedback/Toast.cjs.map +1 -1
- package/dist/components/feedback/Toast.context.cjs +2 -0
- package/dist/components/feedback/Toast.context.cjs.map +1 -0
- package/dist/components/feedback/Toast.context.mjs +23 -0
- package/dist/components/feedback/Toast.context.mjs.map +1 -0
- package/dist/components/feedback/Toast.mjs +10 -342
- package/dist/components/feedback/Toast.mjs.map +1 -1
- package/dist/components/feedback/Toast.parts.cjs +2 -0
- package/dist/components/feedback/Toast.parts.cjs.map +1 -0
- package/dist/components/feedback/Toast.parts.mjs +98 -0
- package/dist/components/feedback/Toast.parts.mjs.map +1 -0
- package/dist/components/feedback/Toast.root.cjs +2 -0
- package/dist/components/feedback/Toast.root.cjs.map +1 -0
- package/dist/components/feedback/Toast.root.mjs +109 -0
- package/dist/components/feedback/Toast.root.mjs.map +1 -0
- package/dist/components/feedback/Toaster.cjs +2 -0
- package/dist/components/feedback/Toaster.cjs.map +1 -0
- package/dist/components/feedback/Toaster.mjs +564 -0
- package/dist/components/feedback/Toaster.mjs.map +1 -0
- package/dist/components/input/AlphaSlider.cjs +2 -0
- package/dist/components/input/AlphaSlider.cjs.map +1 -0
- package/dist/components/input/AlphaSlider.mjs +115 -0
- package/dist/components/input/AlphaSlider.mjs.map +1 -0
- package/dist/components/input/Checkbox.cjs +1 -1
- package/dist/components/input/Checkbox.cjs.map +1 -1
- package/dist/components/input/Checkbox.mjs +87 -70
- package/dist/components/input/Checkbox.mjs.map +1 -1
- package/dist/components/input/ColorArea.cjs +2 -0
- package/dist/components/input/ColorArea.cjs.map +1 -0
- package/dist/components/input/ColorArea.mjs +204 -0
- package/dist/components/input/ColorArea.mjs.map +1 -0
- package/dist/components/input/ColorPicker.cjs +5 -5
- package/dist/components/input/ColorPicker.cjs.map +1 -1
- package/dist/components/input/ColorPicker.mjs +142 -165
- package/dist/components/input/ColorPicker.mjs.map +1 -1
- package/dist/components/input/ColorPicker.parts.cjs +2 -0
- package/dist/components/input/ColorPicker.parts.cjs.map +1 -0
- package/dist/components/input/ColorPicker.parts.mjs +192 -0
- package/dist/components/input/ColorPicker.parts.mjs.map +1 -0
- package/dist/components/input/ColorSlider.cjs +2 -0
- package/dist/components/input/ColorSlider.cjs.map +1 -0
- package/dist/components/input/ColorSlider.mjs +138 -0
- package/dist/components/input/ColorSlider.mjs.map +1 -0
- package/dist/components/input/Combobox.cjs +1 -1
- package/dist/components/input/Combobox.cjs.map +1 -1
- package/dist/components/input/Combobox.expand.cjs +1 -1
- package/dist/components/input/Combobox.expand.cjs.map +1 -1
- package/dist/components/input/Combobox.expand.mjs +22 -22
- package/dist/components/input/Combobox.expand.mjs.map +1 -1
- package/dist/components/input/Combobox.mjs +151 -141
- package/dist/components/input/Combobox.mjs.map +1 -1
- package/dist/components/input/DatePicker.cjs +1 -1
- package/dist/components/input/DatePicker.cjs.map +1 -1
- package/dist/components/input/DatePicker.mjs +239 -234
- package/dist/components/input/DatePicker.mjs.map +1 -1
- package/dist/components/input/Dropdown.cjs +1 -1
- package/dist/components/input/Dropdown.cjs.map +1 -1
- package/dist/components/input/Dropdown.mjs +109 -100
- package/dist/components/input/Dropdown.mjs.map +1 -1
- package/dist/components/input/Field.cjs +1 -1
- package/dist/components/input/Field.cjs.map +1 -1
- package/dist/components/input/Field.mjs +139 -105
- package/dist/components/input/Field.mjs.map +1 -1
- package/dist/components/input/Input.cjs +1 -1
- package/dist/components/input/Input.cjs.map +1 -1
- package/dist/components/input/Input.mjs +80 -55
- package/dist/components/input/Input.mjs.map +1 -1
- package/dist/components/input/Label.cjs +1 -1
- package/dist/components/input/Label.cjs.map +1 -1
- package/dist/components/input/Label.mjs +19 -12
- package/dist/components/input/Label.mjs.map +1 -1
- package/dist/components/input/Option.cjs +1 -1
- package/dist/components/input/Option.cjs.map +1 -1
- package/dist/components/input/Option.mjs +100 -98
- package/dist/components/input/Option.mjs.map +1 -1
- package/dist/components/input/RadioGroup.cjs +1 -1
- package/dist/components/input/RadioGroup.cjs.map +1 -1
- package/dist/components/input/RadioGroup.mjs +89 -88
- package/dist/components/input/RadioGroup.mjs.map +1 -1
- package/dist/components/input/Rating.cjs +1 -1
- package/dist/components/input/Rating.cjs.map +1 -1
- package/dist/components/input/Rating.item.cjs +2 -0
- package/dist/components/input/Rating.item.cjs.map +1 -0
- package/dist/components/input/Rating.item.mjs +255 -0
- package/dist/components/input/Rating.item.mjs.map +1 -0
- package/dist/components/input/Rating.mjs +152 -152
- package/dist/components/input/Rating.mjs.map +1 -1
- package/dist/components/input/SearchBox.cjs +1 -1
- package/dist/components/input/SearchBox.cjs.map +1 -1
- package/dist/components/input/SearchBox.mjs +162 -132
- package/dist/components/input/SearchBox.mjs.map +1 -1
- package/dist/components/input/Select.cjs +1 -1
- package/dist/components/input/Select.cjs.map +1 -1
- package/dist/components/input/Select.mjs +34 -24
- package/dist/components/input/Select.mjs.map +1 -1
- package/dist/components/input/Slider.cjs +1 -1
- package/dist/components/input/Slider.cjs.map +1 -1
- package/dist/components/input/Slider.mjs +78 -54
- package/dist/components/input/Slider.mjs.map +1 -1
- package/dist/components/input/SpinButton.cjs +1 -1
- package/dist/components/input/SpinButton.cjs.map +1 -1
- package/dist/components/input/SpinButton.mjs +202 -99
- package/dist/components/input/SpinButton.mjs.map +1 -1
- package/dist/components/input/SwatchPicker.cjs +1 -1
- package/dist/components/input/SwatchPicker.cjs.map +1 -1
- package/dist/components/input/SwatchPicker.mjs +38 -37
- package/dist/components/input/SwatchPicker.mjs.map +1 -1
- package/dist/components/input/Switch.cjs +1 -1
- package/dist/components/input/Switch.cjs.map +1 -1
- package/dist/components/input/Switch.mjs +75 -58
- package/dist/components/input/Switch.mjs.map +1 -1
- package/dist/components/input/TagPicker.cjs +1 -1
- package/dist/components/input/TagPicker.cjs.map +1 -1
- package/dist/components/input/TagPicker.mjs +199 -169
- package/dist/components/input/TagPicker.mjs.map +1 -1
- package/dist/components/input/Textarea.cjs +1 -1
- package/dist/components/input/Textarea.cjs.map +1 -1
- package/dist/components/input/Textarea.mjs +31 -23
- package/dist/components/input/Textarea.mjs.map +1 -1
- package/dist/components/input/TimePicker.cjs +1 -1
- package/dist/components/input/TimePicker.cjs.map +1 -1
- package/dist/components/input/TimePicker.mjs +185 -177
- package/dist/components/input/TimePicker.mjs.map +1 -1
- package/dist/components/input/colorName.cjs +2 -0
- package/dist/components/input/colorName.cjs.map +1 -0
- package/dist/components/input/colorName.mjs +30 -0
- package/dist/components/input/colorName.mjs.map +1 -0
- package/dist/components/input/colorUtils.cjs +1 -1
- package/dist/components/input/colorUtils.cjs.map +1 -1
- package/dist/components/input/colorUtils.mjs +154 -56
- package/dist/components/input/colorUtils.mjs.map +1 -1
- package/dist/components/input/fieldLabel.cjs +2 -0
- package/dist/components/input/fieldLabel.cjs.map +1 -0
- package/dist/components/input/fieldLabel.mjs +17 -0
- package/dist/components/input/fieldLabel.mjs.map +1 -0
- package/dist/components/input/inputLook.cjs +2 -0
- package/dist/components/input/inputLook.cjs.map +1 -0
- package/dist/components/input/inputLook.mjs +28 -0
- package/dist/components/input/inputLook.mjs.map +1 -0
- package/dist/components/input/pickerStyles.cjs +1 -1
- package/dist/components/input/pickerStyles.cjs.map +1 -1
- package/dist/components/input/pickerStyles.mjs +42 -4
- package/dist/components/input/pickerStyles.mjs.map +1 -1
- package/dist/components/layout/Accordion.cjs +1 -1
- package/dist/components/layout/Accordion.cjs.map +1 -1
- package/dist/components/layout/Accordion.mjs +130 -129
- package/dist/components/layout/Accordion.mjs.map +1 -1
- package/dist/components/layout/Card.cjs +1 -1
- package/dist/components/layout/Card.cjs.map +1 -1
- package/dist/components/layout/Card.mjs +78 -77
- package/dist/components/layout/Card.mjs.map +1 -1
- package/dist/components/layout/Carousel.cjs +1 -1
- package/dist/components/layout/Carousel.cjs.map +1 -1
- package/dist/components/layout/Carousel.mjs +111 -110
- package/dist/components/layout/Carousel.mjs.map +1 -1
- package/dist/components/layout/Flex.cjs +1 -1
- package/dist/components/layout/Flex.cjs.map +1 -1
- package/dist/components/layout/Flex.mjs +22 -21
- package/dist/components/layout/Flex.mjs.map +1 -1
- package/dist/components/layout/Grid.cjs +1 -1
- package/dist/components/layout/Grid.cjs.map +1 -1
- package/dist/components/layout/Grid.mjs +19 -18
- package/dist/components/layout/Grid.mjs.map +1 -1
- package/dist/components/layout/Overflow.cjs +1 -1
- package/dist/components/layout/Overflow.cjs.map +1 -1
- package/dist/components/layout/Overflow.mjs +92 -91
- package/dist/components/layout/Overflow.mjs.map +1 -1
- package/dist/components/layout/Stack.cjs +1 -1
- package/dist/components/layout/Stack.cjs.map +1 -1
- package/dist/components/layout/Stack.mjs +14 -13
- package/dist/components/layout/Stack.mjs.map +1 -1
- package/dist/components/layout/TabList.cjs +1 -1
- package/dist/components/layout/TabList.cjs.map +1 -1
- package/dist/components/layout/TabList.mjs +118 -117
- package/dist/components/layout/TabList.mjs.map +1 -1
- package/dist/components/layout/Tree.cjs +1 -1
- package/dist/components/layout/Tree.cjs.map +1 -1
- package/dist/components/layout/Tree.context.cjs +2 -0
- package/dist/components/layout/Tree.context.cjs.map +1 -0
- package/dist/components/layout/Tree.context.mjs +33 -0
- package/dist/components/layout/Tree.context.mjs.map +1 -0
- package/dist/components/layout/Tree.core.cjs +2 -0
- package/dist/components/layout/Tree.core.cjs.map +1 -0
- package/dist/components/layout/Tree.core.mjs +416 -0
- package/dist/components/layout/Tree.core.mjs.map +1 -0
- package/dist/components/layout/Tree.itemPersonaLayout.cjs +2 -0
- package/dist/components/layout/Tree.itemPersonaLayout.cjs.map +1 -0
- package/dist/components/layout/Tree.itemPersonaLayout.mjs +46 -0
- package/dist/components/layout/Tree.itemPersonaLayout.mjs.map +1 -0
- package/dist/components/layout/Tree.mjs +7 -215
- package/dist/components/layout/Tree.mjs.map +1 -1
- package/dist/components/layout/Tree.selection.cjs +2 -0
- package/dist/components/layout/Tree.selection.cjs.map +1 -0
- package/dist/components/layout/Tree.selection.mjs +73 -0
- package/dist/components/layout/Tree.selection.mjs.map +1 -0
- package/dist/components/navigation/Breadcrumb.cjs +1 -1
- package/dist/components/navigation/Breadcrumb.cjs.map +1 -1
- package/dist/components/navigation/Breadcrumb.mjs +76 -75
- package/dist/components/navigation/Breadcrumb.mjs.map +1 -1
- package/dist/components/navigation/Menu.group.cjs +1 -1
- package/dist/components/navigation/Menu.group.cjs.map +1 -1
- package/dist/components/navigation/Menu.group.mjs +39 -37
- package/dist/components/navigation/Menu.group.mjs.map +1 -1
- package/dist/components/navigation/Menu.items.cjs +1 -1
- package/dist/components/navigation/Menu.items.cjs.map +1 -1
- package/dist/components/navigation/Menu.items.mjs +67 -61
- package/dist/components/navigation/Menu.items.mjs.map +1 -1
- package/dist/components/navigation/Menu.link.cjs +1 -1
- package/dist/components/navigation/Menu.link.cjs.map +1 -1
- package/dist/components/navigation/Menu.link.mjs +34 -28
- package/dist/components/navigation/Menu.link.mjs.map +1 -1
- package/dist/components/navigation/Menu.popover.cjs +1 -1
- package/dist/components/navigation/Menu.popover.cjs.map +1 -1
- package/dist/components/navigation/Menu.popover.mjs +114 -113
- package/dist/components/navigation/Menu.popover.mjs.map +1 -1
- package/dist/components/navigation/Menu.root.cjs +1 -1
- package/dist/components/navigation/Menu.root.cjs.map +1 -1
- package/dist/components/navigation/Menu.root.mjs +171 -170
- package/dist/components/navigation/Menu.root.mjs.map +1 -1
- package/dist/components/navigation/Menu.selectable.cjs +1 -1
- package/dist/components/navigation/Menu.selectable.cjs.map +1 -1
- package/dist/components/navigation/Menu.selectable.mjs +85 -63
- package/dist/components/navigation/Menu.selectable.mjs.map +1 -1
- package/dist/components/navigation/Menu.splitGroup.cjs +1 -1
- package/dist/components/navigation/Menu.splitGroup.cjs.map +1 -1
- package/dist/components/navigation/Menu.splitGroup.mjs +27 -26
- package/dist/components/navigation/Menu.splitGroup.mjs.map +1 -1
- package/dist/components/navigation/Menu.trigger.cjs +1 -1
- package/dist/components/navigation/Menu.trigger.cjs.map +1 -1
- package/dist/components/navigation/Menu.trigger.mjs +6 -6
- package/dist/components/navigation/Nav.cjs +1 -1
- package/dist/components/navigation/Nav.cjs.map +1 -1
- package/dist/components/navigation/Nav.mjs +170 -155
- package/dist/components/navigation/Nav.mjs.map +1 -1
- package/dist/components/navigation/Pagination.cjs +1 -1
- package/dist/components/navigation/Pagination.cjs.map +1 -1
- package/dist/components/navigation/Pagination.mjs +73 -65
- package/dist/components/navigation/Pagination.mjs.map +1 -1
- package/dist/components/navigation/Stepper.cjs +1 -1
- package/dist/components/navigation/Stepper.cjs.map +1 -1
- package/dist/components/navigation/Stepper.mjs +110 -109
- package/dist/components/navigation/Stepper.mjs.map +1 -1
- package/dist/components/overlays/Dialog.cjs +1 -1
- package/dist/components/overlays/Dialog.cjs.map +1 -1
- package/dist/components/overlays/Dialog.mjs +109 -108
- package/dist/components/overlays/Dialog.mjs.map +1 -1
- package/dist/components/overlays/Drawer.cjs +1 -1
- package/dist/components/overlays/Drawer.cjs.map +1 -1
- package/dist/components/overlays/Drawer.mjs +110 -109
- package/dist/components/overlays/Drawer.mjs.map +1 -1
- package/dist/components/overlays/Popover.cjs +1 -1
- package/dist/components/overlays/Popover.cjs.map +1 -1
- package/dist/components/overlays/Popover.mjs +148 -151
- package/dist/components/overlays/Popover.mjs.map +1 -1
- package/dist/components/overlays/Popover.shared.cjs +1 -1
- package/dist/components/overlays/Popover.shared.cjs.map +1 -1
- package/dist/components/overlays/Popover.shared.mjs +82 -77
- package/dist/components/overlays/Popover.shared.mjs.map +1 -1
- package/dist/components/overlays/TeachingPopover.cjs +1 -1
- package/dist/components/overlays/TeachingPopover.cjs.map +1 -1
- package/dist/components/overlays/TeachingPopover.mjs +41 -37
- package/dist/components/overlays/TeachingPopover.mjs.map +1 -1
- package/dist/components/overlays/Tooltip.cjs +1 -1
- package/dist/components/overlays/Tooltip.cjs.map +1 -1
- package/dist/components/overlays/Tooltip.mjs +87 -86
- package/dist/components/overlays/Tooltip.mjs.map +1 -1
- package/dist/components/portal/Portal.cjs +1 -1
- package/dist/components/portal/Portal.cjs.map +1 -1
- package/dist/components/portal/Portal.mjs +33 -32
- package/dist/components/portal/Portal.mjs.map +1 -1
- package/dist/components/provider/WaveProvider.cjs +1 -1
- package/dist/components/provider/WaveProvider.cjs.map +1 -1
- package/dist/components/provider/WaveProvider.mjs +36 -29
- package/dist/components/provider/WaveProvider.mjs.map +1 -1
- package/dist/components/table/DataGrid.cjs +1 -1
- package/dist/components/table/DataGrid.cjs.map +1 -1
- package/dist/components/table/DataGrid.mjs +228 -227
- package/dist/components/table/DataGrid.mjs.map +1 -1
- package/dist/components/table/Table.cjs +1 -1
- package/dist/components/table/Table.cjs.map +1 -1
- package/dist/components/table/Table.mjs +60 -59
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/typography/Text.cjs +1 -1
- package/dist/components/typography/Text.cjs.map +1 -1
- package/dist/components/typography/Text.mjs +12 -11
- package/dist/components/typography/Text.mjs.map +1 -1
- package/dist/hooks/useFieldControl.cjs.map +1 -1
- package/dist/hooks/useFieldControl.mjs.map +1 -1
- package/dist/hooks/useMediaQuery.cjs +2 -0
- package/dist/hooks/useMediaQuery.cjs.map +1 -0
- package/dist/hooks/useMediaQuery.mjs +20 -0
- package/dist/hooks/useMediaQuery.mjs.map +1 -0
- package/dist/hooks/usePrefersReducedMotion.cjs +1 -1
- package/dist/hooks/usePrefersReducedMotion.cjs.map +1 -1
- package/dist/hooks/usePrefersReducedMotion.mjs +4 -18
- package/dist/hooks/usePrefersReducedMotion.mjs.map +1 -1
- package/dist/hooks/useRovingTabIndex.cjs +1 -1
- package/dist/hooks/useRovingTabIndex.cjs.map +1 -1
- package/dist/hooks/useRovingTabIndex.mjs +3 -3
- package/dist/hooks/useRovingTabIndex.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2890 -197
- package/dist/index.d.ts +2890 -197
- package/dist/index.mjs +101 -87
- package/dist/lib/classNames.cjs +2 -0
- package/dist/lib/classNames.cjs.map +1 -0
- package/dist/lib/classNames.mjs +423 -0
- package/dist/lib/classNames.mjs.map +1 -0
- package/dist/lib/color.cjs +2 -0
- package/dist/lib/color.cjs.map +1 -0
- package/dist/lib/color.mjs +86 -0
- package/dist/lib/color.mjs.map +1 -0
- package/dist/lib/globalRegistry.cjs.map +1 -1
- package/dist/lib/globalRegistry.mjs.map +1 -1
- package/dist/lib/styles.cjs +1 -1
- package/dist/lib/styles.cjs.map +1 -1
- package/dist/lib/styles.mjs +21 -4
- package/dist/lib/styles.mjs.map +1 -1
- package/dist/lib/toaster.cjs +2 -0
- package/dist/lib/toaster.cjs.map +1 -0
- package/dist/lib/toaster.mjs +77 -0
- package/dist/lib/toaster.mjs.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/styles/tokens.css +13 -0
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,11 @@ export declare interface AccordionBaseProps extends React_2.HTMLAttributes<HTMLD
|
|
|
49
49
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/** Accordion: `root` on the accordion element. */
|
|
53
|
+
export declare const accordionClassNames: {
|
|
54
|
+
readonly root: "wave-accordion";
|
|
55
|
+
};
|
|
56
|
+
|
|
52
57
|
/** Heading level of the element that wraps each Accordion trigger. */
|
|
53
58
|
export declare type AccordionHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
54
59
|
|
|
@@ -72,6 +77,11 @@ export declare const AccordionItem: {
|
|
|
72
77
|
displayName: string;
|
|
73
78
|
};
|
|
74
79
|
|
|
80
|
+
/** Accordion.Item: `root` on the item element. */
|
|
81
|
+
export declare const accordionItemClassNames: {
|
|
82
|
+
readonly root: "wave-accordion-item";
|
|
83
|
+
};
|
|
84
|
+
|
|
75
85
|
/** Properties for the AccordionItem sub-component. */
|
|
76
86
|
export declare interface AccordionItemProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
77
87
|
/** Unique value identifying this accordion item. */
|
|
@@ -110,6 +120,11 @@ export declare const AccordionPanel: {
|
|
|
110
120
|
displayName: string;
|
|
111
121
|
};
|
|
112
122
|
|
|
123
|
+
/** Accordion.Panel: `root` on the `role="region"` element. */
|
|
124
|
+
export declare const accordionPanelClassNames: {
|
|
125
|
+
readonly root: "wave-accordion-panel";
|
|
126
|
+
};
|
|
127
|
+
|
|
113
128
|
/** Properties for the AccordionPanel sub-component (merged onto the `role="region"` element). */
|
|
114
129
|
export declare interface AccordionPanelProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
115
130
|
/** Ref to the panel `<div role="region">`. */
|
|
@@ -168,12 +183,72 @@ export declare const AccordionTrigger: {
|
|
|
168
183
|
displayName: string;
|
|
169
184
|
};
|
|
170
185
|
|
|
186
|
+
/**
|
|
187
|
+
* Accordion.Trigger: `root` on the `<button>`; `heading` on the heading element around it (`<h1>`
|
|
188
|
+
* to `<h6>`, from `headingLevel`); `expandIcon` on the chevron `<svg>`.
|
|
189
|
+
*/
|
|
190
|
+
export declare const accordionTriggerClassNames: {
|
|
191
|
+
readonly root: "wave-accordion-trigger";
|
|
192
|
+
readonly heading: "wave-accordion-trigger__heading";
|
|
193
|
+
readonly expandIcon: "wave-accordion-trigger__expand-icon";
|
|
194
|
+
};
|
|
195
|
+
|
|
171
196
|
/** Properties for the AccordionTrigger sub-component (merged onto the trigger `<button>`). */
|
|
172
197
|
export declare interface AccordionTriggerProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
173
198
|
/** Ref to the trigger `<button>`. */
|
|
174
199
|
ref?: React_2.Ref<HTMLButtonElement>;
|
|
175
200
|
}
|
|
176
201
|
|
|
202
|
+
/**
|
|
203
|
+
* A slider for a color's opacity, drawn over a checkerboard, horizontal (mirrored in right-to-left
|
|
204
|
+
* layouts) or vertical (bottom to top); `transparency` shows transparency instead. The arrow keys
|
|
205
|
+
* move by 1 %, Shift with an arrow and Page Up or Page Down by 10, Home and End to the ends. It is
|
|
206
|
+
* named by `aria-label`, else the surrounding Field's label, else "Opacity" ("Transparency").
|
|
207
|
+
* Inside a ColorPicker, leave `value` and `defaultValue` out and it binds to the picker. Fluent's
|
|
208
|
+
* `AlphaSlider`, with `value`/`onValueChange` for its `color`/`onChange`.
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* <AlphaSlider value={color} onValueChange={setColor} />
|
|
212
|
+
*/
|
|
213
|
+
export declare const AlphaSlider: {
|
|
214
|
+
({ transparency, orientation, value, defaultValue, onValueChange, shape, labels, disabled, name, form, required, controlRef, className, style, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, "aria-details": ariaDetails, autoFocus, tabIndex, onFocus, onBlur, onKeyDown, onKeyUp, ref, ...rest }: AlphaSliderProps): React_2.JSX.Element;
|
|
215
|
+
displayName: string;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/** AlphaSlider: `root` on the slider element; `rail` on the rail; `thumb` on the thumb. */
|
|
219
|
+
export declare const alphaSliderClassNames: {
|
|
220
|
+
readonly root: "wave-alpha-slider";
|
|
221
|
+
readonly rail: "wave-alpha-slider__rail";
|
|
222
|
+
readonly thumb: "wave-alpha-slider__thumb";
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
/** Texts of an AlphaSlider, for localisation. Every key is optional. */
|
|
226
|
+
export declare interface AlphaSliderLabels {
|
|
227
|
+
/** Name of the slider.
|
|
228
|
+
* @default 'Opacity'
|
|
229
|
+
*/
|
|
230
|
+
opacity?: string;
|
|
231
|
+
/** Name of the slider with `transparency`.
|
|
232
|
+
* @default 'Transparency'
|
|
233
|
+
*/
|
|
234
|
+
transparency?: string;
|
|
235
|
+
/** Replaces the value text ("40%"), for languages whose order differs. */
|
|
236
|
+
valueText?: (color: HsvColor, transparency: boolean) => string;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/** Properties for the AlphaSlider component. */
|
|
240
|
+
export declare interface AlphaSliderProps extends Omit<ColorSliderProps, 'channel' | 'labels'> {
|
|
241
|
+
/**
|
|
242
|
+
* Shows transparency (100 % is fully transparent) instead of opacity: the rail, the input's
|
|
243
|
+
* value, the value text and the arrow direction all follow it, while `value.a` stays the
|
|
244
|
+
* opacity (Fluent's `transparency`).
|
|
245
|
+
* @default false
|
|
246
|
+
*/
|
|
247
|
+
transparency?: boolean;
|
|
248
|
+
/** Texts of the slider; bound to a ColorPicker, the picker's `labels` fill the keys you leave out. */
|
|
249
|
+
labels?: AlphaSliderLabels;
|
|
250
|
+
}
|
|
251
|
+
|
|
177
252
|
/**
|
|
178
253
|
* Announces `message` to screen readers through a shared, visually hidden live region
|
|
179
254
|
* (`[data-wave-announcer]`, which modal isolation never makes inert).
|
|
@@ -220,6 +295,21 @@ export declare const Avatar: {
|
|
|
220
295
|
displayName: string;
|
|
221
296
|
};
|
|
222
297
|
|
|
298
|
+
/**
|
|
299
|
+
* Avatar: `root` on the avatar span (with `badge`, on the outer wrapper); `visual` on the circle
|
|
300
|
+
* (the root without `badge`, the inner span with it); `image` on the `<img>` (or the element of
|
|
301
|
+
* your `image` slot); `icon` on the `icon` slot, else on the default person `<svg>`; `initials`
|
|
302
|
+
* on the initials span; `badge` on the `badge` slot.
|
|
303
|
+
*/
|
|
304
|
+
export declare const avatarClassNames: {
|
|
305
|
+
readonly root: "wave-avatar";
|
|
306
|
+
readonly visual: "wave-avatar__visual";
|
|
307
|
+
readonly image: "wave-avatar__image";
|
|
308
|
+
readonly icon: "wave-avatar__icon";
|
|
309
|
+
readonly initials: "wave-avatar__initials";
|
|
310
|
+
readonly badge: "wave-avatar__badge";
|
|
311
|
+
};
|
|
312
|
+
|
|
223
313
|
/**
|
|
224
314
|
* A row of overlapping avatars (`role="group"`; name it with `aria-label`).
|
|
225
315
|
*
|
|
@@ -246,6 +336,20 @@ export declare const AvatarGroup: {
|
|
|
246
336
|
displayName: string;
|
|
247
337
|
};
|
|
248
338
|
|
|
339
|
+
/**
|
|
340
|
+
* AvatarGroup: `root` on the `role="group"` element; `item` on the wrapper around each shown
|
|
341
|
+
* member; `overflowButton` on the "+N" button; `surface` on its popup; `list` on the popup's
|
|
342
|
+
* `<ul>`; `listItem` on each of its `<li>`.
|
|
343
|
+
*/
|
|
344
|
+
export declare const avatarGroupClassNames: {
|
|
345
|
+
readonly root: "wave-avatar-group";
|
|
346
|
+
readonly item: "wave-avatar-group__item";
|
|
347
|
+
readonly overflowButton: "wave-avatar-group__overflow-button";
|
|
348
|
+
readonly surface: "wave-avatar-group__surface";
|
|
349
|
+
readonly list: "wave-avatar-group__list";
|
|
350
|
+
readonly listItem: "wave-avatar-group__list-item";
|
|
351
|
+
};
|
|
352
|
+
|
|
249
353
|
/** Properties for the AvatarGroup component. */
|
|
250
354
|
export declare interface AvatarGroupProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
251
355
|
/**
|
|
@@ -356,6 +460,11 @@ export declare const Badge: {
|
|
|
356
460
|
/** Visual style variant for Badge components. */
|
|
357
461
|
export declare type BadgeAppearance = 'filled' | 'tint' | 'outline';
|
|
358
462
|
|
|
463
|
+
/** Badge: `root` on the badge span. */
|
|
464
|
+
export declare const badgeClassNames: {
|
|
465
|
+
readonly root: "wave-badge";
|
|
466
|
+
};
|
|
467
|
+
|
|
359
468
|
/** Semantic colors of Badge and CounterBadge. */
|
|
360
469
|
export declare type BadgeColor = 'brand' | 'success' | 'warning' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle';
|
|
361
470
|
|
|
@@ -404,6 +513,17 @@ export declare const Breadcrumb: {
|
|
|
404
513
|
Item: typeof BreadcrumbItem;
|
|
405
514
|
};
|
|
406
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Breadcrumb: `root` on the `<nav>`; `list` on its `<ol>`; `listItem` on each `<li>`; `divider`
|
|
518
|
+
* on each separator `<svg>`.
|
|
519
|
+
*/
|
|
520
|
+
export declare const breadcrumbClassNames: {
|
|
521
|
+
readonly root: "wave-breadcrumb";
|
|
522
|
+
readonly list: "wave-breadcrumb__list";
|
|
523
|
+
readonly listItem: "wave-breadcrumb__list-item";
|
|
524
|
+
readonly divider: "wave-breadcrumb__divider";
|
|
525
|
+
};
|
|
526
|
+
|
|
407
527
|
/**
|
|
408
528
|
* One step of a breadcrumb trail:
|
|
409
529
|
* - `href` → a link (`<a>`, anchor attributes);
|
|
@@ -459,6 +579,15 @@ export declare interface BreadcrumbItemButtonProps extends BreadcrumbItemOwnProp
|
|
|
459
579
|
ref?: React_2.Ref<HTMLButtonElement | HTMLSpanElement>;
|
|
460
580
|
}
|
|
461
581
|
|
|
582
|
+
/**
|
|
583
|
+
* Breadcrumb.Item: `root` on the link, button or text span it renders (or your `asChild`
|
|
584
|
+
* element); `icon` on the icon span.
|
|
585
|
+
*/
|
|
586
|
+
export declare const breadcrumbItemClassNames: {
|
|
587
|
+
readonly root: "wave-breadcrumb-item";
|
|
588
|
+
readonly icon: "wave-breadcrumb-item__icon";
|
|
589
|
+
};
|
|
590
|
+
|
|
462
591
|
/**
|
|
463
592
|
* Breadcrumb.Item with an `href` known only at run time (`string | undefined`): a link when it is
|
|
464
593
|
* a string, otherwise a button (with `onClick`) or text. Handlers receive `HTMLElement` events and
|
|
@@ -562,6 +691,16 @@ export declare interface BreadcrumbProps extends React_2.HTMLAttributes<HTMLElem
|
|
|
562
691
|
*/
|
|
563
692
|
export declare const Button: PolymorphicComponent<'button', ButtonOwnProps>;
|
|
564
693
|
|
|
694
|
+
/**
|
|
695
|
+
* Button: `root` on the rendered element (`<button>`, or your `as`); `icon` on the icon box.
|
|
696
|
+
* Style them from your own CSS (`.wave-button`, `.wave-button__icon`). State is not a class: use
|
|
697
|
+
* the `data-*` attributes (`[data-pressed]`, `[data-disabled]`).
|
|
698
|
+
*/
|
|
699
|
+
export declare const buttonClassNames: {
|
|
700
|
+
readonly root: "wave-button";
|
|
701
|
+
readonly icon: "wave-button__icon";
|
|
702
|
+
};
|
|
703
|
+
|
|
565
704
|
/**
|
|
566
705
|
* The Button's own props (the XOwnProps rule of `PolymorphicProps`: component-specific props only).
|
|
567
706
|
* Every other prop comes from the rendered element (`as`), so `as="a"` accepts `href`/`target`
|
|
@@ -668,12 +807,27 @@ export declare const Card: PolymorphicComponent<"div", CardOwnProps> & {
|
|
|
668
807
|
*/
|
|
669
808
|
export declare const CardBody: PolymorphicComponent<'div', CardBodyOwnProps>;
|
|
670
809
|
|
|
810
|
+
/** Card.Body: `root` on the rendered element. */
|
|
811
|
+
export declare const cardBodyClassNames: {
|
|
812
|
+
readonly root: "wave-card-body";
|
|
813
|
+
};
|
|
814
|
+
|
|
671
815
|
/** The Card.Body's own props: none besides the element's (component-specific props only). */
|
|
672
816
|
export declare type CardBodyOwnProps = Record<never, never>;
|
|
673
817
|
|
|
674
818
|
/** Props of {@link CardBody} rendered as `C` (default `'div'`), including `ref`. */
|
|
675
819
|
export declare type CardBodyProps<C extends React_2.ElementType = 'div'> = PolymorphicProps<C, CardBodyOwnProps>;
|
|
676
820
|
|
|
821
|
+
/**
|
|
822
|
+
* Card: `root` on the rendered element (your `as`, default `<div>`); `checkbox` on the built-in
|
|
823
|
+
* selection checkbox; `checkmark` on the corner check `<svg>` of a selected card.
|
|
824
|
+
*/
|
|
825
|
+
export declare const cardClassNames: {
|
|
826
|
+
readonly root: "wave-card";
|
|
827
|
+
readonly checkbox: "wave-card__checkbox";
|
|
828
|
+
readonly checkmark: "wave-card__checkmark";
|
|
829
|
+
};
|
|
830
|
+
|
|
677
831
|
/**
|
|
678
832
|
* The action row of a {@link Card} (end-aligned). A selectable card with actions here needs
|
|
679
833
|
* `selectionControl="checkbox"`. Flat export for React Server Components (`Card.Footer` in client
|
|
@@ -681,6 +835,11 @@ export declare type CardBodyProps<C extends React_2.ElementType = 'div'> = Polym
|
|
|
681
835
|
*/
|
|
682
836
|
export declare const CardFooter: PolymorphicComponent<'div', CardFooterOwnProps>;
|
|
683
837
|
|
|
838
|
+
/** Card.Footer: `root` on the rendered element. */
|
|
839
|
+
export declare const cardFooterClassNames: {
|
|
840
|
+
readonly root: "wave-card-footer";
|
|
841
|
+
};
|
|
842
|
+
|
|
684
843
|
/** The Card.Footer's own props: none besides the element's (component-specific props only). */
|
|
685
844
|
export declare type CardFooterOwnProps = Record<never, never>;
|
|
686
845
|
|
|
@@ -693,6 +852,13 @@ export declare type CardFooterProps<C extends React_2.ElementType = 'div'> = Pol
|
|
|
693
852
|
*/
|
|
694
853
|
export declare const CardHeader: PolymorphicComponent<'div', CardHeaderOwnProps>;
|
|
695
854
|
|
|
855
|
+
/** Card.Header: `root` on the rendered element; `title` on the title; `subtitle` on the subtitle. */
|
|
856
|
+
export declare const cardHeaderClassNames: {
|
|
857
|
+
readonly root: "wave-card-header";
|
|
858
|
+
readonly title: "wave-card-header__title";
|
|
859
|
+
readonly subtitle: "wave-card-header__subtitle";
|
|
860
|
+
};
|
|
861
|
+
|
|
696
862
|
/** The Card.Header's own props (component-specific props only). */
|
|
697
863
|
export declare interface CardHeaderOwnProps {
|
|
698
864
|
/**
|
|
@@ -815,6 +981,24 @@ export declare interface CarouselAutoPlayLabels {
|
|
|
815
981
|
play?: string;
|
|
816
982
|
}
|
|
817
983
|
|
|
984
|
+
/**
|
|
985
|
+
* Carousel: `root` on the `role="region"` element; `autoPlayButton` on the pause and start
|
|
986
|
+
* button; `track` on the moving element around the slides; `slide` on each slide wrapper;
|
|
987
|
+
* `previousButton` and `nextButton` on the arrow buttons; `picker` on the `role="group"` of
|
|
988
|
+
* picker buttons; `pickerButton` on each of them; `pickerIndicator` on each button's dot.
|
|
989
|
+
*/
|
|
990
|
+
export declare const carouselClassNames: {
|
|
991
|
+
readonly root: "wave-carousel";
|
|
992
|
+
readonly autoPlayButton: "wave-carousel__auto-play-button";
|
|
993
|
+
readonly track: "wave-carousel__track";
|
|
994
|
+
readonly slide: "wave-carousel__slide";
|
|
995
|
+
readonly previousButton: "wave-carousel__previous-button";
|
|
996
|
+
readonly nextButton: "wave-carousel__next-button";
|
|
997
|
+
readonly picker: "wave-carousel__picker";
|
|
998
|
+
readonly pickerButton: "wave-carousel__picker-button";
|
|
999
|
+
readonly pickerIndicator: "wave-carousel__picker-indicator";
|
|
1000
|
+
};
|
|
1001
|
+
|
|
818
1002
|
/**
|
|
819
1003
|
* One slide of a {@link Carousel}. Write it in the Carousel, directly or in a Fragment: a component
|
|
820
1004
|
* that renders `Carousel.Item` itself is not recognised as a slide (put that component inside the
|
|
@@ -825,6 +1009,11 @@ export declare const CarouselItem: {
|
|
|
825
1009
|
displayName: string;
|
|
826
1010
|
};
|
|
827
1011
|
|
|
1012
|
+
/** Carousel.Item: `root` on the item element. */
|
|
1013
|
+
export declare const carouselItemClassNames: {
|
|
1014
|
+
readonly root: "wave-carousel-item";
|
|
1015
|
+
};
|
|
1016
|
+
|
|
828
1017
|
/** Properties for the CarouselItem sub-component. */
|
|
829
1018
|
export declare interface CarouselItemProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
830
1019
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
@@ -927,12 +1116,25 @@ export declare interface CarouselProps extends React_2.HTMLAttributes<HTMLDivEle
|
|
|
927
1116
|
* `labelPosition="before"` (the root carries `data-label-position`). The box lines up with the
|
|
928
1117
|
* first line of a label that wraps or has a second line. `children` are not rendered (a
|
|
929
1118
|
* development warning says so).
|
|
1119
|
+
* - `size` (`medium`, `large`) and `shape` (`square`, `circular`) set the box's dimensions and
|
|
1120
|
+
* corners; the root carries `data-size` and `data-shape`. Checkbox does not read a surrounding
|
|
1121
|
+
* `Field`'s size or a `WaveProvider`'s input defaults.
|
|
930
1122
|
*/
|
|
931
1123
|
export declare const Checkbox: {
|
|
932
|
-
({ checked: checkedProp, defaultChecked, indeterminate, onCheckedChange, onChange, disabled, disabledFocusable, label, labelPosition, name, value, required, form, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, "aria-details": ariaDetails, "aria-disabled": ariaDisabled, autoFocus, tabIndex, onClick, onFocus, onBlur, onKeyDown, onKeyUp, controlRef, className, children, ref, ...rest }: CheckboxProps): React_2.JSX.Element;
|
|
1124
|
+
({ checked: checkedProp, defaultChecked, indeterminate, onCheckedChange, onChange, disabled, disabledFocusable, label, labelPosition, size, shape, name, value, required, form, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, "aria-details": ariaDetails, "aria-disabled": ariaDisabled, autoFocus, tabIndex, onClick, onFocus, onBlur, onKeyDown, onKeyUp, controlRef, className, children, ref, ...rest }: CheckboxProps): React_2.JSX.Element;
|
|
933
1125
|
displayName: string;
|
|
934
1126
|
};
|
|
935
1127
|
|
|
1128
|
+
/**
|
|
1129
|
+
* Checkbox: `root` on the `<label>`; `indicator` on the `role="checkbox"` button (the box);
|
|
1130
|
+
* `label` on the label text.
|
|
1131
|
+
*/
|
|
1132
|
+
export declare const checkboxClassNames: {
|
|
1133
|
+
readonly root: "wave-checkbox";
|
|
1134
|
+
readonly indicator: "wave-checkbox__indicator";
|
|
1135
|
+
readonly label: "wave-checkbox__label";
|
|
1136
|
+
};
|
|
1137
|
+
|
|
936
1138
|
/** Handlers that run on the `role="checkbox"` button instead of the root label (C-ROUTING). */
|
|
937
1139
|
declare type CheckboxControlHandlers = 'onClick' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp';
|
|
938
1140
|
|
|
@@ -989,6 +1191,18 @@ export declare interface CheckboxProps extends Omit<React_2.HTMLAttributes<HTMLL
|
|
|
989
1191
|
* @default 'after'
|
|
990
1192
|
*/
|
|
991
1193
|
labelPosition?: CheckboxLabelPosition;
|
|
1194
|
+
/**
|
|
1195
|
+
* Size of the box: an 18px box (the 0.7 look) or a 22px box with a bigger glyph. Unlike the
|
|
1196
|
+
* text controls and pickers, Checkbox does not read a surrounding Field's size or a
|
|
1197
|
+
* WaveProvider's input defaults: this prop is the only source of its size.
|
|
1198
|
+
* @default 'medium'
|
|
1199
|
+
*/
|
|
1200
|
+
size?: CheckboxSize;
|
|
1201
|
+
/**
|
|
1202
|
+
* Shape of the box: square corners (the 0.7 look) or a circular, round box.
|
|
1203
|
+
* @default 'square'
|
|
1204
|
+
*/
|
|
1205
|
+
shape?: CheckboxShape;
|
|
992
1206
|
/**
|
|
993
1207
|
* Form field name. With a name, the checkbox takes part in native form submission: it submits
|
|
994
1208
|
* `name=value` while checked.
|
|
@@ -1018,6 +1232,12 @@ export declare interface CheckboxProps extends Omit<React_2.HTMLAttributes<HTMLL
|
|
|
1018
1232
|
ref?: React_2.Ref<HTMLLabelElement>;
|
|
1019
1233
|
}
|
|
1020
1234
|
|
|
1235
|
+
/** Shape of the box: square corners (the 0.7 look) or a circular, round box. */
|
|
1236
|
+
export declare type CheckboxShape = Extract<Shape, 'square' | 'circular'>;
|
|
1237
|
+
|
|
1238
|
+
/** Size of the box: an 18px box (the 0.7 look) or a 22px box with a bigger glyph. */
|
|
1239
|
+
export declare type CheckboxSize = Extract<Size, 'medium' | 'large'>;
|
|
1240
|
+
|
|
1021
1241
|
/**
|
|
1022
1242
|
* Checked items of a menu or toolbar, per group `name`: `{ sort: ['date'], view: ['ruler', 'grid'] }`.
|
|
1023
1243
|
* A checkbox or switch item (or a toolbar toggle) is checked while its `value` is in
|
|
@@ -1060,43 +1280,213 @@ export declare type CheckedValuesChangeHandler = (checkedValues: Record<string,
|
|
|
1060
1280
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
1061
1281
|
|
|
1062
1282
|
/**
|
|
1063
|
-
* A color
|
|
1064
|
-
*
|
|
1065
|
-
*
|
|
1066
|
-
*
|
|
1067
|
-
*
|
|
1068
|
-
*
|
|
1069
|
-
*
|
|
1070
|
-
*
|
|
1071
|
-
*
|
|
1072
|
-
*
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1075
|
-
*
|
|
1076
|
-
|
|
1283
|
+
* A 2-D color field: saturation from left to right (mirrored in right-to-left layouts) and
|
|
1284
|
+
* brightness from bottom to top, at the value's hue. ArrowLeft and ArrowRight move saturation by
|
|
1285
|
+
* 1 %, ArrowUp and ArrowDown brightness; Shift with an arrow moves by 10, Page Up and Page Down
|
|
1286
|
+
* move brightness by 10, and Home and End set saturation to 0 and 100. A press or drag (mouse,
|
|
1287
|
+
* touch or pen) moves the thumb to the pointer. It is one Tab stop holding two sliders for
|
|
1288
|
+
* assistive technology, "Saturation" and "Brightness", whose value texts start with their own
|
|
1289
|
+
* channel and name the color; focus follows the axis a key moves, and unless the primary pointer
|
|
1290
|
+
* is coarse (touch), only the slider with the Tab stop is exposed. Inside a ColorPicker, leave
|
|
1291
|
+
* `value` and `defaultValue` out and it binds to the picker. Fluent's
|
|
1292
|
+
* `ColorArea`, with `value`/`onValueChange` for its `color`/`onChange`.
|
|
1293
|
+
*
|
|
1294
|
+
* @example
|
|
1295
|
+
* <ColorArea aria-label="Accent color" value={color} onValueChange={setColor} />
|
|
1296
|
+
*/
|
|
1297
|
+
export declare const ColorArea: {
|
|
1298
|
+
({ value, defaultValue, onValueChange, shape, labels, disabled, name, form, required, controlRef, className, style, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, autoFocus, tabIndex, onKeyDown, onPointerDown, onPointerMove, ref, ...rest }: ColorAreaProps): React_2.JSX.Element;
|
|
1299
|
+
displayName: string;
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* ColorArea: `root` on the `role="group"` element; `field` on the gradient layer; `thumb` on the
|
|
1304
|
+
* thumb (the two range inputs are not parts).
|
|
1305
|
+
*/
|
|
1306
|
+
export declare const colorAreaClassNames: {
|
|
1307
|
+
readonly root: "wave-color-area";
|
|
1308
|
+
readonly field: "wave-color-area__field";
|
|
1309
|
+
readonly thumb: "wave-color-area__thumb";
|
|
1310
|
+
};
|
|
1311
|
+
|
|
1312
|
+
/** Texts of a ColorArea, for localisation. Every key is optional. */
|
|
1313
|
+
export declare interface ColorAreaLabels {
|
|
1314
|
+
/** Name of the horizontal slider.
|
|
1315
|
+
* @default 'Saturation'
|
|
1316
|
+
*/
|
|
1317
|
+
saturation?: string;
|
|
1318
|
+
/** Name of the vertical slider (the `value` channel).
|
|
1319
|
+
* @default 'Brightness'
|
|
1320
|
+
*/
|
|
1321
|
+
brightness?: string;
|
|
1322
|
+
/** Role description of both sliders.
|
|
1323
|
+
* @default '2D slider'
|
|
1324
|
+
*/
|
|
1325
|
+
roleDescription?: string;
|
|
1326
|
+
/** Names the color at the end of each value text; return `''` to leave it out.
|
|
1327
|
+
* @default an English namer ("dark blue")
|
|
1328
|
+
*/
|
|
1329
|
+
colorName?: (color: HsvColor) => string;
|
|
1330
|
+
/** Replaces a whole value text, for languages whose order differs. */
|
|
1331
|
+
valueText?: (color: HsvColor, channel: 'saturation' | 'value') => string;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
/** Properties for the ColorArea component. */
|
|
1335
|
+
export declare interface ColorAreaProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {
|
|
1336
|
+
/**
|
|
1337
|
+
* The color (Fluent's `color`). Inside a ColorPicker, leave `value` and `defaultValue` out to
|
|
1338
|
+
* bind the area to the picker.
|
|
1339
|
+
*/
|
|
1340
|
+
value?: HsvColor;
|
|
1341
|
+
/**
|
|
1342
|
+
* Initial color for uncontrolled usage (also what a form reset restores).
|
|
1343
|
+
* @default the brand blue, `{ h: 208, s: 0.92, v: 0.74 }` (`#0f6cbd`)
|
|
1344
|
+
*/
|
|
1345
|
+
defaultValue?: HsvColor;
|
|
1346
|
+
/**
|
|
1347
|
+
* Called with the new color on every step (a key, a pointer move or assistive technology) that
|
|
1348
|
+
* changes it (Fluent's `onChange`). A bound area calls it too.
|
|
1349
|
+
*/
|
|
1350
|
+
onValueChange?: (value: HsvColor) => void;
|
|
1351
|
+
/**
|
|
1352
|
+
* `'square'` removes the corner radius (the thumb stays round). Bound to a ColorPicker, the
|
|
1353
|
+
* picker's shape unless you pass one.
|
|
1354
|
+
* @default 'rounded'
|
|
1355
|
+
*/
|
|
1356
|
+
shape?: ColorPickerShape;
|
|
1357
|
+
/** Texts of the area; bound to a ColorPicker, the picker's `labels` fill the keys you leave out. */
|
|
1358
|
+
labels?: ColorAreaLabels;
|
|
1359
|
+
/**
|
|
1360
|
+
* Unavailable: both inputs are natively disabled, pointer presses are ignored and the area is
|
|
1361
|
+
* dimmed. A bound area is also disabled while the picker's value is not a hex color.
|
|
1362
|
+
* @default false
|
|
1363
|
+
*/
|
|
1364
|
+
disabled?: boolean;
|
|
1365
|
+
/** Form field name: the color is submitted as hex (`hsvToHex`). Ignored while bound to a ColorPicker. */
|
|
1366
|
+
name?: string;
|
|
1367
|
+
/** Id of the form the area belongs to, when it is rendered outside that form. */
|
|
1368
|
+
form?: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* Marks the hidden form input required (a color is always set, so it never blocks). A consumer
|
|
1371
|
+
* `aria-required` does the same: a group supports neither, so neither is set on it.
|
|
1372
|
+
*/
|
|
1373
|
+
required?: boolean;
|
|
1374
|
+
/** Ref to the saturation `<input type="range">`. */
|
|
1375
|
+
controlRef?: React_2.Ref<HTMLInputElement>;
|
|
1376
|
+
/** Ref to the root `role="group"` element. */
|
|
1377
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* A color picker whose value is a hex string (`#rrggbb`, or `#rrggbbaa` with an alpha byte),
|
|
1382
|
+
* grouped as a named `role="group"`.
|
|
1383
|
+
*
|
|
1384
|
+
* - **Default layout** (no children): a color area (saturation and brightness) and a hue slider,
|
|
1385
|
+
* then a preview and the hex field, preset swatches and, with `showOpacity`, an opacity row
|
|
1386
|
+
* whose slider is an `AlphaSlider` (0–100 %). Dragging to gray, white or black keeps the hue.
|
|
1387
|
+
* - **Your own layout** (children): `ColorArea`, `ColorSlider` and `AlphaSlider`, which bind to
|
|
1388
|
+
* the picker while they have neither `value` nor `defaultValue`, and the parts
|
|
1389
|
+
* `ColorPicker.HexField`, `ColorPicker.Swatches` and `ColorPicker.Preview`.
|
|
1390
|
+
* - **Hex field**: the text is a draft. Complete 6- and 8-digit values apply while typing; text
|
|
1391
|
+
* that can never be a hex color is flagged at once (`aria-invalid` plus the `hexError`
|
|
1392
|
+
* description). Leaving the field or pressing Enter applies a short `#rgb` (keeping the current
|
|
1393
|
+
* opacity) or `#rgba`, then shows the current value again; other text stays flagged until it is
|
|
1394
|
+
* corrected, cleared, or the value changes from elsewhere. Enter still submits the surrounding
|
|
1395
|
+
* form, with the color just applied.
|
|
1077
1396
|
* - **Presets** render as a SwatchPicker radiogroup ("Preset colors"): one tab stop, arrow keys
|
|
1078
|
-
* move and pick, and
|
|
1079
|
-
* - **Naming**: `aria-label`/`aria-labelledby` name the group; inside a `Field` its label does,
|
|
1080
|
-
* the Field's hint and error describe the group. The invalid state (`aria-invalid`, from the
|
|
1081
|
-
* Field or the prop) is set on the hex field, since `role="group"` does not support it, and
|
|
1082
|
-
*
|
|
1083
|
-
*
|
|
1084
|
-
* required instead of reaching the group. The texts of the picker's own parts are localised with
|
|
1085
|
-
* `labels`.
|
|
1397
|
+
* move and pick, and picking keeps the current opacity.
|
|
1398
|
+
* - **Naming**: `aria-label`/`aria-labelledby` name the group; inside a `Field` its label does,
|
|
1399
|
+
* and the Field's hint and error describe the group. The invalid state (`aria-invalid`, from the
|
|
1400
|
+
* Field or the prop) is set on the hex field, since `role="group"` does not support it, and a
|
|
1401
|
+
* consumer `aria-errormessage` goes there too. A consumer `aria-required` makes the hidden form
|
|
1402
|
+
* input required instead. The built-in texts are localised with `labels`.
|
|
1086
1403
|
* - **Forms**: with `name` the color is submitted with the form; a form reset restores
|
|
1087
1404
|
* `defaultValue` and reports it through `onValueChange` only when the color changes.
|
|
1088
1405
|
*
|
|
1406
|
+
* React Server Components cannot dot into a client module: import the flat names
|
|
1407
|
+
* `ColorPickerHexField`, `ColorPickerSwatches` and `ColorPickerPreview` there;
|
|
1408
|
+
* `ColorPicker.HexField` etc. work in client files.
|
|
1409
|
+
*
|
|
1089
1410
|
* @example
|
|
1090
1411
|
* <ColorPicker aria-label="Accent color" showOpacity value={color} onValueChange={setColor} />
|
|
1412
|
+
*
|
|
1413
|
+
* <ColorPicker aria-label="Accent color" value={color} onValueChange={setColor}>
|
|
1414
|
+
* <ColorArea />
|
|
1415
|
+
* <ColorSlider />
|
|
1416
|
+
* <ColorPicker.HexField />
|
|
1417
|
+
* </ColorPicker>
|
|
1091
1418
|
*/
|
|
1092
1419
|
export declare const ColorPicker: {
|
|
1093
|
-
({ value: valueProp, defaultValue, onValueChange, onChange, presets, showOpacity, labels, name, required, form, className, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, ref, ...rest }: ColorPickerProps): React_2.JSX.Element;
|
|
1420
|
+
({ value: valueProp, defaultValue, onValueChange, onChange, presets, showOpacity, labels, shape, name, required, form, className, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, children, ref, ...rest }: ColorPickerProps): React_2.JSX.Element;
|
|
1094
1421
|
displayName: string;
|
|
1422
|
+
} & {
|
|
1423
|
+
HexField: {
|
|
1424
|
+
({ id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-errormessage": ariaErrorMessage, "aria-details": ariaDetails, "aria-required": ariaRequired, autoFocus, tabIndex, onFocus, onBlur, onKeyDown, onKeyUp, inputMode, enterKeyHint, autoCapitalize, autoCorrect, spellCheck, controlRef, className, ref, ...rest }: ColorPickerHexFieldProps): React_2.JSX.Element;
|
|
1425
|
+
displayName: string;
|
|
1426
|
+
};
|
|
1427
|
+
Swatches: {
|
|
1428
|
+
({ className, "aria-label": ariaLabel, size, shape, ...rest }: ColorPickerSwatchesProps): React_2.JSX.Element | null;
|
|
1429
|
+
displayName: string;
|
|
1430
|
+
};
|
|
1431
|
+
Preview: {
|
|
1432
|
+
({ className, style, ref, ...rest }: ColorPickerPreviewProps): React_2.JSX.Element;
|
|
1433
|
+
displayName: string;
|
|
1434
|
+
};
|
|
1095
1435
|
};
|
|
1096
1436
|
|
|
1097
1437
|
/**
|
|
1098
|
-
*
|
|
1099
|
-
* the
|
|
1438
|
+
* ColorPicker: `root` on the `role="group"` element; `opacityLabel` on the caption and
|
|
1439
|
+
* `opacityValue` on the percentage of the default layout's opacity row. Its color area and
|
|
1440
|
+
* sliders carry their own classes (ColorArea, ColorSlider, AlphaSlider).
|
|
1441
|
+
*/
|
|
1442
|
+
export declare const colorPickerClassNames: {
|
|
1443
|
+
readonly root: "wave-color-picker";
|
|
1444
|
+
readonly opacityLabel: "wave-color-picker__opacity-label";
|
|
1445
|
+
readonly opacityValue: "wave-color-picker__opacity-value";
|
|
1446
|
+
};
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* The hex text field of a ColorPicker: a caption, the input and its error. The text is a draft:
|
|
1450
|
+
* complete 6- and 8-digit values apply while typing, text that can never be a hex color is
|
|
1451
|
+
* flagged at once, and leaving the field (or Enter) applies a short `#rgb`/`#rgba` and shows the
|
|
1452
|
+
* value again; other text stays flagged until it is corrected, cleared, or the value changes from
|
|
1453
|
+
* elsewhere (a preset, another part, the parent, a form reset). Inside a Field it carries the
|
|
1454
|
+
* Field's invalid state and error. Must be inside a ColorPicker. Also exported as
|
|
1455
|
+
* `ColorPickerHexField` (import the flat name in React Server Components).
|
|
1456
|
+
*/
|
|
1457
|
+
export declare const ColorPickerHexField: {
|
|
1458
|
+
({ id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-errormessage": ariaErrorMessage, "aria-details": ariaDetails, "aria-required": ariaRequired, autoFocus, tabIndex, onFocus, onBlur, onKeyDown, onKeyUp, inputMode, enterKeyHint, autoCapitalize, autoCorrect, spellCheck, controlRef, className, ref, ...rest }: ColorPickerHexFieldProps): React_2.JSX.Element;
|
|
1459
|
+
displayName: string;
|
|
1460
|
+
};
|
|
1461
|
+
|
|
1462
|
+
/**
|
|
1463
|
+
* ColorPicker.HexField: `root` on the field's outer element; `label` on the caption; `input` on
|
|
1464
|
+
* the hex `<input>`; `errorMessage` on the error text.
|
|
1465
|
+
*/
|
|
1466
|
+
export declare const colorPickerHexFieldClassNames: {
|
|
1467
|
+
readonly root: "wave-color-picker-hex-field";
|
|
1468
|
+
readonly label: "wave-color-picker-hex-field__label";
|
|
1469
|
+
readonly input: "wave-color-picker-hex-field__input";
|
|
1470
|
+
readonly errorMessage: "wave-color-picker-hex-field__error-message";
|
|
1471
|
+
};
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* Properties for the ColorPickerHexField sub-component. `id`, the labelling and validation
|
|
1475
|
+
* `aria-*` (`aria-label`, `aria-labelledby`, `aria-describedby`, `aria-invalid`,
|
|
1476
|
+
* `aria-errormessage`, `aria-details`, `aria-required`), `autoFocus`, `tabIndex`, the focus and key
|
|
1477
|
+
* handlers and the text-entry attributes (`inputMode`, `enterKeyHint`, `autoCapitalize`,
|
|
1478
|
+
* `autoCorrect`, `spellCheck`) go to the `<input>`; everything else stays on the outer label.
|
|
1479
|
+
*/
|
|
1480
|
+
export declare interface ColorPickerHexFieldProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
1481
|
+
/** Ref to the hex `<input>`. */
|
|
1482
|
+
controlRef?: React_2.Ref<HTMLInputElement>;
|
|
1483
|
+
/** Ref to the field's outer element: the label around the caption, the input and the error. */
|
|
1484
|
+
ref?: React_2.Ref<HTMLLabelElement>;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* Texts of the ColorPicker's own parts and of the color parts bound to it, for localisation.
|
|
1489
|
+
* Every key is optional; missing keys use the English default.
|
|
1100
1490
|
*/
|
|
1101
1491
|
export declare interface ColorPickerLabels {
|
|
1102
1492
|
/** Visible caption above the hex field.
|
|
@@ -1116,10 +1506,41 @@ export declare interface ColorPickerLabels {
|
|
|
1116
1506
|
* @default 'Preset colors'
|
|
1117
1507
|
*/
|
|
1118
1508
|
presets?: string;
|
|
1119
|
-
/** Visible label and accessible name of the opacity slider
|
|
1509
|
+
/** Visible label of the opacity row and accessible name of the opacity slider (a bound
|
|
1510
|
+
* `AlphaSlider`).
|
|
1120
1511
|
* @default 'Opacity'
|
|
1121
1512
|
*/
|
|
1122
1513
|
opacity?: string;
|
|
1514
|
+
/** Accessible name of a bound `ColorArea`'s group.
|
|
1515
|
+
* @default 'Saturation and brightness'
|
|
1516
|
+
*/
|
|
1517
|
+
area?: string;
|
|
1518
|
+
/** Name of a bound area's saturation slider and of a bound `channel="saturation"` slider.
|
|
1519
|
+
* @default 'Saturation'
|
|
1520
|
+
*/
|
|
1521
|
+
saturation?: string;
|
|
1522
|
+
/** Name of a bound area's brightness slider and of a bound `channel="value"` slider.
|
|
1523
|
+
* @default 'Brightness'
|
|
1524
|
+
*/
|
|
1525
|
+
brightness?: string;
|
|
1526
|
+
/** Role description of a bound area's two sliders.
|
|
1527
|
+
* @default '2D slider'
|
|
1528
|
+
*/
|
|
1529
|
+
roleDescription?: string;
|
|
1530
|
+
/** Name of a bound hue slider.
|
|
1531
|
+
* @default 'Hue'
|
|
1532
|
+
*/
|
|
1533
|
+
hue?: string;
|
|
1534
|
+
/** Name of a bound `AlphaSlider` with `transparency`.
|
|
1535
|
+
* @default 'Transparency'
|
|
1536
|
+
*/
|
|
1537
|
+
transparency?: string;
|
|
1538
|
+
/** Names the color at the end of the bound parts' value texts; return `''` to leave it out.
|
|
1539
|
+
* @default an English namer ("dark blue")
|
|
1540
|
+
*/
|
|
1541
|
+
colorName?: (color: HsvColor) => string;
|
|
1542
|
+
/** Replaces a whole value text of a bound part, for languages whose order differs. */
|
|
1543
|
+
valueText?: (color: HsvColor, channel: 'hue' | 'saturation' | 'value' | 'alpha') => string;
|
|
1123
1544
|
}
|
|
1124
1545
|
|
|
1125
1546
|
/** A named preset color. */
|
|
@@ -1134,6 +1555,26 @@ export declare interface ColorPickerPreset {
|
|
|
1134
1555
|
label: string;
|
|
1135
1556
|
}
|
|
1136
1557
|
|
|
1558
|
+
/**
|
|
1559
|
+
* A swatch of the picker's current color (decorative, `aria-hidden`); it keeps its color in forced
|
|
1560
|
+
* colors and follows the picker's `shape`. Must be inside a ColorPicker. Also exported as
|
|
1561
|
+
* `ColorPickerPreview`.
|
|
1562
|
+
*/
|
|
1563
|
+
export declare const ColorPickerPreview: {
|
|
1564
|
+
({ className, style, ref, ...rest }: ColorPickerPreviewProps): React_2.JSX.Element;
|
|
1565
|
+
displayName: string;
|
|
1566
|
+
};
|
|
1567
|
+
|
|
1568
|
+
/** ColorPicker.Preview: `root` on the preview swatch. */
|
|
1569
|
+
export declare const colorPickerPreviewClassNames: {
|
|
1570
|
+
readonly root: "wave-color-picker-preview";
|
|
1571
|
+
};
|
|
1572
|
+
|
|
1573
|
+
/** Properties for the ColorPickerPreview sub-component. */
|
|
1574
|
+
export declare interface ColorPickerPreviewProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1575
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1137
1578
|
/** Properties for the ColorPicker component. */
|
|
1138
1579
|
export declare interface ColorPickerProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
1139
1580
|
/**
|
|
@@ -1164,16 +1605,34 @@ export declare interface ColorPickerProps extends Omit<React_2.HTMLAttributes<HT
|
|
|
1164
1605
|
* skipped (development warning). Picking a preset keeps the current opacity, so a preset's alpha
|
|
1165
1606
|
* digits are ignored. With an alpha below `f`/`ff` (`#rgba`, `#rrggbbaa`) there is a development
|
|
1166
1607
|
* warning, and a string preset is announced by the `#rrggbb` color it applies; an opaque alpha
|
|
1167
|
-
* (`#rgbf`, `#rrggbbff`) changes nothing, and the string stays the name as written.
|
|
1608
|
+
* (`#rgbf`, `#rrggbbff`) changes nothing, and the string stays the name as written. With
|
|
1609
|
+
* `children`, the presets feed only `ColorPicker.Swatches`.
|
|
1168
1610
|
* @default Blue, Red, Green, Yellow, Purple, Teal, Pink and Black (Fluent brand colors)
|
|
1169
1611
|
*/
|
|
1170
1612
|
presets?: ReadonlyArray<string | ColorPickerPreset>;
|
|
1171
|
-
/**
|
|
1613
|
+
/**
|
|
1614
|
+
* Whether the default layout shows the opacity row: the caption, an alpha slider (0–100 %,
|
|
1615
|
+
* named by `labels.opacity`) and the percentage. The opacity is the alpha byte of `value`. Does
|
|
1616
|
+
* nothing with `children`.
|
|
1172
1617
|
* @default false
|
|
1173
1618
|
*/
|
|
1174
1619
|
showOpacity?: boolean;
|
|
1175
|
-
/** Texts of the picker's own parts
|
|
1620
|
+
/** Texts of the picker's own parts and of the color parts bound to it, for localisation. */
|
|
1176
1621
|
labels?: ColorPickerLabels;
|
|
1622
|
+
/**
|
|
1623
|
+
* `'square'` removes the corner radius of the preview and of the area and the rails of the
|
|
1624
|
+
* color parts bound to it, including those of the default layout.
|
|
1625
|
+
* @default 'rounded'
|
|
1626
|
+
*/
|
|
1627
|
+
shape?: ColorPickerShape;
|
|
1628
|
+
/**
|
|
1629
|
+
* Your own layout: `ColorArea`, `ColorSlider` and `AlphaSlider` (bound to the picker while they
|
|
1630
|
+
* have neither `value` nor `defaultValue`) and the parts `ColorPicker.HexField`,
|
|
1631
|
+
* `ColorPicker.Swatches` and `ColorPicker.Preview`. Without children the picker renders its
|
|
1632
|
+
* default layout. With children, `showOpacity` does nothing and `presets` feed only
|
|
1633
|
+
* `ColorPicker.Swatches`.
|
|
1634
|
+
*/
|
|
1635
|
+
children?: React_2.ReactNode;
|
|
1177
1636
|
/** Form field name. With a name, the current color is submitted with the form. */
|
|
1178
1637
|
name?: string;
|
|
1179
1638
|
/**
|
|
@@ -1188,6 +1647,131 @@ export declare interface ColorPickerProps extends Omit<React_2.HTMLAttributes<HT
|
|
|
1188
1647
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
1189
1648
|
}
|
|
1190
1649
|
|
|
1650
|
+
/** The shape of ColorPicker and its color parts (a subset of `Shape`). */
|
|
1651
|
+
export declare type ColorPickerShape = Extract<Shape, 'rounded' | 'square'>;
|
|
1652
|
+
|
|
1653
|
+
/**
|
|
1654
|
+
* The picker's `presets` as swatches (a SwatchPicker named by `labels.presets`, small and rounded
|
|
1655
|
+
* unless you pass `size` or `shape`). Picking one keeps the opacity. Renders nothing without
|
|
1656
|
+
* presets. Must be inside a ColorPicker. Also exported as `ColorPickerSwatches`.
|
|
1657
|
+
*/
|
|
1658
|
+
export declare const ColorPickerSwatches: {
|
|
1659
|
+
({ className, "aria-label": ariaLabel, size, shape, ...rest }: ColorPickerSwatchesProps): React_2.JSX.Element | null;
|
|
1660
|
+
displayName: string;
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1663
|
+
/**
|
|
1664
|
+
* ColorPicker.Swatches (also carries SwatchPicker's root): `root` on the SwatchPicker it renders;
|
|
1665
|
+
* its swatches keep SwatchPicker's own `swatch` class.
|
|
1666
|
+
*/
|
|
1667
|
+
export declare const colorPickerSwatchesClassNames: {
|
|
1668
|
+
readonly root: "wave-color-picker-swatches";
|
|
1669
|
+
};
|
|
1670
|
+
|
|
1671
|
+
/** Properties for the ColorPickerSwatches sub-component: the picker's `presets` as a SwatchPicker. */
|
|
1672
|
+
export declare type ColorPickerSwatchesProps = Omit<SwatchPickerProps, 'items' | 'value' | 'defaultValue' | 'onValueChange' | 'onChange' | 'name' | 'form' | 'required'>;
|
|
1673
|
+
|
|
1674
|
+
/**
|
|
1675
|
+
* A slider for one channel of an HSV color: hue (the default), saturation or brightness
|
|
1676
|
+
* (`channel="value"`), horizontal (mirrored in right-to-left layouts) or vertical (bottom to top).
|
|
1677
|
+
* The arrow keys move by 1 (hue in degrees, the others in percent), Shift with an arrow and Page
|
|
1678
|
+
* Up or Page Down by 10, Home and End to the ends. It is named by `aria-label`, else the
|
|
1679
|
+
* surrounding Field's label, else "Hue", "Saturation" or "Brightness"; a hue slider's value text
|
|
1680
|
+
* names the color ("210°, blue"). Inside a ColorPicker, leave `value` and `defaultValue` out and
|
|
1681
|
+
* it binds to the picker. Fluent's `ColorSlider`, with `value`/`onValueChange` for its
|
|
1682
|
+
* `color`/`onChange` and `orientation` for its `vertical`.
|
|
1683
|
+
*
|
|
1684
|
+
* @example
|
|
1685
|
+
* <ColorSlider value={color} onValueChange={setColor} />
|
|
1686
|
+
*/
|
|
1687
|
+
export declare const ColorSlider: {
|
|
1688
|
+
({ channel, orientation, value, defaultValue, onValueChange, shape, labels, disabled, name, form, required, controlRef, className, style, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, "aria-details": ariaDetails, autoFocus, tabIndex, onFocus, onBlur, onKeyDown, onKeyUp, ref, ...rest }: ColorSliderProps): React_2.JSX.Element;
|
|
1689
|
+
displayName: string;
|
|
1690
|
+
};
|
|
1691
|
+
|
|
1692
|
+
/** ColorSlider: `root` on the slider element; `rail` on the gradient rail; `thumb` on the thumb. */
|
|
1693
|
+
export declare const colorSliderClassNames: {
|
|
1694
|
+
readonly root: "wave-color-slider";
|
|
1695
|
+
readonly rail: "wave-color-slider__rail";
|
|
1696
|
+
readonly thumb: "wave-color-slider__thumb";
|
|
1697
|
+
};
|
|
1698
|
+
|
|
1699
|
+
/** Texts of a ColorSlider, for localisation. Every key is optional. */
|
|
1700
|
+
export declare interface ColorSliderLabels {
|
|
1701
|
+
/** Name of a hue slider.
|
|
1702
|
+
* @default 'Hue'
|
|
1703
|
+
*/
|
|
1704
|
+
hue?: string;
|
|
1705
|
+
/** Name of a `channel="saturation"` slider.
|
|
1706
|
+
* @default 'Saturation'
|
|
1707
|
+
*/
|
|
1708
|
+
saturation?: string;
|
|
1709
|
+
/** Name of a `channel="value"` slider.
|
|
1710
|
+
* @default 'Brightness'
|
|
1711
|
+
*/
|
|
1712
|
+
brightness?: string;
|
|
1713
|
+
/** Names the color at the end of a hue slider's value text; return `''` to leave it out.
|
|
1714
|
+
* @default an English namer ("blue")
|
|
1715
|
+
*/
|
|
1716
|
+
colorName?: (color: HsvColor) => string;
|
|
1717
|
+
/** Replaces the value text, for languages whose order differs. */
|
|
1718
|
+
valueText?: (color: HsvColor, channel: 'hue' | 'saturation' | 'value') => string;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
/** Properties for the ColorSlider component. */
|
|
1722
|
+
export declare interface ColorSliderProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {
|
|
1723
|
+
/** The channel the slider edits.
|
|
1724
|
+
* @default 'hue'
|
|
1725
|
+
*/
|
|
1726
|
+
channel?: 'hue' | 'saturation' | 'value';
|
|
1727
|
+
/** `'vertical'` draws the rail from bottom to top (Fluent's `vertical`).
|
|
1728
|
+
* @default 'horizontal'
|
|
1729
|
+
*/
|
|
1730
|
+
orientation?: Orientation;
|
|
1731
|
+
/**
|
|
1732
|
+
* The color (Fluent's `color`). Inside a ColorPicker, leave `value` and `defaultValue` out to
|
|
1733
|
+
* bind the slider to the picker.
|
|
1734
|
+
*/
|
|
1735
|
+
value?: HsvColor;
|
|
1736
|
+
/**
|
|
1737
|
+
* Initial color for uncontrolled usage (also what a form reset restores).
|
|
1738
|
+
* @default the brand blue, `{ h: 208, s: 0.92, v: 0.74 }` (`#0f6cbd`)
|
|
1739
|
+
*/
|
|
1740
|
+
defaultValue?: HsvColor;
|
|
1741
|
+
/**
|
|
1742
|
+
* Called with the new color on every step (a key, the pointer or assistive technology) that
|
|
1743
|
+
* changes it (Fluent's `onChange`). A bound slider calls it too.
|
|
1744
|
+
*/
|
|
1745
|
+
onValueChange?: (value: HsvColor) => void;
|
|
1746
|
+
/**
|
|
1747
|
+
* `'square'` removes the corner radius of the rail (the thumb stays round). Bound to a
|
|
1748
|
+
* ColorPicker, the picker's shape unless you pass one.
|
|
1749
|
+
* @default 'rounded'
|
|
1750
|
+
*/
|
|
1751
|
+
shape?: ColorPickerShape;
|
|
1752
|
+
/** Texts of the slider; bound to a ColorPicker, the picker's `labels` fill the keys you leave out. */
|
|
1753
|
+
labels?: ColorSliderLabels;
|
|
1754
|
+
/**
|
|
1755
|
+
* Unavailable: the input is natively disabled and the slider dimmed. A bound slider is also
|
|
1756
|
+
* disabled while the picker's value is not a hex color.
|
|
1757
|
+
* @default false
|
|
1758
|
+
*/
|
|
1759
|
+
disabled?: boolean;
|
|
1760
|
+
/** Form field name: the color is submitted as hex (`hsvToHex`). Ignored while bound to a ColorPicker. */
|
|
1761
|
+
name?: string;
|
|
1762
|
+
/** Id of the form the slider belongs to, when it is rendered outside that form. */
|
|
1763
|
+
form?: string;
|
|
1764
|
+
/**
|
|
1765
|
+
* Marks the hidden form input required (a color is always set, so it never blocks). A consumer
|
|
1766
|
+
* `aria-required` does the same: a slider supports neither, so neither is set on it.
|
|
1767
|
+
*/
|
|
1768
|
+
required?: boolean;
|
|
1769
|
+
/** Ref to the `<input type="range">`. */
|
|
1770
|
+
controlRef?: React_2.Ref<HTMLInputElement>;
|
|
1771
|
+
/** Ref to the root element. */
|
|
1772
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1191
1775
|
/**
|
|
1192
1776
|
* An editable combobox: a text input with a filterable listbox of `Option`s (APG combobox with
|
|
1193
1777
|
* list autocomplete). Typing filters the options; ArrowDown/ArrowUp move the highlight
|
|
@@ -1209,6 +1793,11 @@ export declare interface ColorPickerProps extends Omit<React_2.HTMLAttributes<HT
|
|
|
1209
1793
|
* `name`/`required` the value takes part in form submission, validation and reset. The open
|
|
1210
1794
|
* listbox renders in a portal; while closed it stays in the DOM, hidden.
|
|
1211
1795
|
*
|
|
1796
|
+
* **Size and appearance**: `size` resolves from its own prop, then the surrounding `Field`'s
|
|
1797
|
+
* `size`, then `WaveProvider inputDefaults.size`, else `'medium'`; `appearance` from its own prop,
|
|
1798
|
+
* then `WaveProvider inputDefaults.appearance`, else `'outline'`; both render as `data-size` and
|
|
1799
|
+
* `data-appearance` on the root `<div>`. The listbox keeps its size.
|
|
1800
|
+
*
|
|
1212
1801
|
* Sub-components: `Combobox.Option`, `Combobox.OptionGroup`. React Server Components import the
|
|
1213
1802
|
* flat names `ComboboxOption` / `ComboboxOptionGroup` (dotted access needs a client file).
|
|
1214
1803
|
*/
|
|
@@ -1220,6 +1809,23 @@ export declare const Combobox: {
|
|
|
1220
1809
|
OptionGroup: React_2.FC<OptionGroupProps>;
|
|
1221
1810
|
};
|
|
1222
1811
|
|
|
1812
|
+
/**
|
|
1813
|
+
* Combobox: `root` on the outer element; `input` on the `role="combobox"` input; `clearButton` on
|
|
1814
|
+
* the clear button; `expandButton` on the expand button and `expandIcon` on its glyph; `listbox`
|
|
1815
|
+
* on the `role="listbox"` list; `surface` on its portaled popup; `emptyMessage` on the
|
|
1816
|
+
* "No matches" row.
|
|
1817
|
+
*/
|
|
1818
|
+
export declare const comboboxClassNames: {
|
|
1819
|
+
readonly root: "wave-combobox";
|
|
1820
|
+
readonly input: "wave-combobox__input";
|
|
1821
|
+
readonly clearButton: "wave-combobox__clear-button";
|
|
1822
|
+
readonly expandButton: "wave-combobox__expand-button";
|
|
1823
|
+
readonly expandIcon: "wave-combobox__expand-icon";
|
|
1824
|
+
readonly listbox: "wave-combobox__listbox";
|
|
1825
|
+
readonly surface: "wave-combobox__surface";
|
|
1826
|
+
readonly emptyMessage: "wave-combobox__empty-message";
|
|
1827
|
+
};
|
|
1828
|
+
|
|
1223
1829
|
/**
|
|
1224
1830
|
* The Combobox's built-in texts, for localization. Each member is optional and falls back to its
|
|
1225
1831
|
* English default.
|
|
@@ -1286,6 +1892,18 @@ export declare interface ComboboxProps extends Omit<React_2.HTMLAttributes<HTMLD
|
|
|
1286
1892
|
* @default false
|
|
1287
1893
|
*/
|
|
1288
1894
|
disabled?: boolean;
|
|
1895
|
+
/**
|
|
1896
|
+
* Size of the field: `small` (24px tall), `medium` (32px) or `large` (40px). Default: the
|
|
1897
|
+
* surrounding Field's `size`, else `WaveProvider inputDefaults.size`, else `'medium'`. The
|
|
1898
|
+
* listbox keeps its size.
|
|
1899
|
+
*/
|
|
1900
|
+
size?: CoreSize;
|
|
1901
|
+
/**
|
|
1902
|
+
* Look of the field: `outline` (a full border), `underline` (a bottom stroke only),
|
|
1903
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke: give the field a visible
|
|
1904
|
+
* label). Default: `WaveProvider inputDefaults.appearance`, else `'outline'`.
|
|
1905
|
+
*/
|
|
1906
|
+
appearance?: InputAppearance;
|
|
1289
1907
|
/**
|
|
1290
1908
|
* Whether the typed text is itself the value. Without it, typing only filters the options (the
|
|
1291
1909
|
* first match becomes active, so Enter selects it) and the input shows the selected option's
|
|
@@ -1397,6 +2015,19 @@ export declare function composeEventHandlers<E extends {
|
|
|
1397
2015
|
*/
|
|
1398
2016
|
export declare const CompoundButton: PolymorphicComponent<'button', CompoundButtonOwnProps>;
|
|
1399
2017
|
|
|
2018
|
+
/**
|
|
2019
|
+
* CompoundButton (also carries Button's root and icon classes): `root` on the rendered element;
|
|
2020
|
+
* `icon` on the icon box (Button's icon span in the icon-only layout); `contentContainer` on the
|
|
2021
|
+
* text column; `primaryText` on the main line; `secondaryText` on the second line.
|
|
2022
|
+
*/
|
|
2023
|
+
export declare const compoundButtonClassNames: {
|
|
2024
|
+
readonly root: "wave-compound-button";
|
|
2025
|
+
readonly icon: "wave-compound-button__icon";
|
|
2026
|
+
readonly contentContainer: "wave-compound-button__content-container";
|
|
2027
|
+
readonly primaryText: "wave-compound-button__primary-text";
|
|
2028
|
+
readonly secondaryText: "wave-compound-button__secondary-text";
|
|
2029
|
+
};
|
|
2030
|
+
|
|
1400
2031
|
/**
|
|
1401
2032
|
* The CompoundButton's own props (the XOwnProps rule of `PolymorphicProps`: component-specific
|
|
1402
2033
|
* props only). Every other prop comes from the rendered element (`as`).
|
|
@@ -1454,6 +2085,12 @@ export declare interface CompoundButtonOwnProps {
|
|
|
1454
2085
|
*/
|
|
1455
2086
|
export declare type CompoundButtonProps<C extends React_2.ElementType = 'button'> = PolymorphicProps<C, CompoundButtonOwnProps>;
|
|
1456
2087
|
|
|
2088
|
+
/**
|
|
2089
|
+
* The three-step size of text inputs, pickers, Field and Label (Fluent's field sizes): `small`
|
|
2090
|
+
* (24px tall), `medium` (32px) and `large` (40px).
|
|
2091
|
+
*/
|
|
2092
|
+
export declare type CoreSize = Extract<Size, 'small' | 'medium' | 'large'>;
|
|
2093
|
+
|
|
1457
2094
|
/**
|
|
1458
2095
|
* A small pill showing a count (unread messages, notifications), or with `dot` a small dot
|
|
1459
2096
|
* without a number. Renders nothing for a count of 0 (unless `showZero`) or less, and
|
|
@@ -1475,6 +2112,14 @@ export declare const CounterBadge: {
|
|
|
1475
2112
|
displayName: string;
|
|
1476
2113
|
};
|
|
1477
2114
|
|
|
2115
|
+
/**
|
|
2116
|
+
* CounterBadge (also carries Badge's root): `root` on the badge span (a count it does not show
|
|
2117
|
+
* renders no element).
|
|
2118
|
+
*/
|
|
2119
|
+
export declare const counterBadgeClassNames: {
|
|
2120
|
+
readonly root: "wave-counter-badge";
|
|
2121
|
+
};
|
|
2122
|
+
|
|
1478
2123
|
/** Properties for the CounterBadge component. */
|
|
1479
2124
|
export declare interface CounterBadgeProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
1480
2125
|
/**
|
|
@@ -1516,6 +2161,25 @@ export declare interface CounterBadgeProps extends React_2.HTMLAttributes<HTMLSp
|
|
|
1516
2161
|
ref?: React_2.Ref<HTMLSpanElement>;
|
|
1517
2162
|
}
|
|
1518
2163
|
|
|
2164
|
+
/**
|
|
2165
|
+
* Creates a handle. It touches no DOM, so a module-scope handle is safe during server rendering;
|
|
2166
|
+
* a dispatch on the server does nothing (it returns the id), so no toast is carried from one
|
|
2167
|
+
* request to the next.
|
|
2168
|
+
*
|
|
2169
|
+
* - `dispatchToast` returns the id at once: `toastId`, or one the handle generates.
|
|
2170
|
+
* - Before a Toaster binds the handle, dispatches wait in its queue, in dispatch order (a dispatch
|
|
2171
|
+
* with the id of a waiting one replaces it in place); `dismissToast` removes a waiting toast and
|
|
2172
|
+
* `dismissAllToasts` empties the queue. The Toaster that binds takes the queue.
|
|
2173
|
+
*
|
|
2174
|
+
* @example
|
|
2175
|
+
* export const appToaster = createToaster();
|
|
2176
|
+
* // <Toaster toaster={appToaster}><App /></Toaster>
|
|
2177
|
+
* queryClient.getMutationCache().config.onError = () => {
|
|
2178
|
+
* appToaster.dispatchToast({ status: 'error', title: 'Could not save' });
|
|
2179
|
+
* };
|
|
2180
|
+
*/
|
|
2181
|
+
export declare function createToaster(): ToasterHandle;
|
|
2182
|
+
|
|
1519
2183
|
/**
|
|
1520
2184
|
* An interactive data table (`role="grid"`) following the APG Grid pattern: one tab stop,
|
|
1521
2185
|
* arrow-key navigation between cells (Home/End, Ctrl+Home/Ctrl+End, PageUp/PageDown; Up/Down keep
|
|
@@ -1618,6 +2282,11 @@ export declare const DataGridBody: {
|
|
|
1618
2282
|
displayName: string;
|
|
1619
2283
|
};
|
|
1620
2284
|
|
|
2285
|
+
/** DataGrid.Body: `root` on the `<tbody>`. */
|
|
2286
|
+
export declare const dataGridBodyClassNames: {
|
|
2287
|
+
readonly root: "wave-data-grid-body";
|
|
2288
|
+
};
|
|
2289
|
+
|
|
1621
2290
|
/** Properties for the DataGridBody sub-component. */
|
|
1622
2291
|
export declare interface DataGridBodyProps extends React_2.HTMLAttributes<HTMLTableSectionElement> {
|
|
1623
2292
|
/** DataGrid row elements. */
|
|
@@ -1632,6 +2301,11 @@ export declare const DataGridCell: {
|
|
|
1632
2301
|
displayName: string;
|
|
1633
2302
|
};
|
|
1634
2303
|
|
|
2304
|
+
/** DataGrid.Cell: `root` on the `role="gridcell"` cell. */
|
|
2305
|
+
export declare const dataGridCellClassNames: {
|
|
2306
|
+
readonly root: "wave-data-grid-cell";
|
|
2307
|
+
};
|
|
2308
|
+
|
|
1635
2309
|
/** Properties for the DataGridCell sub-component. */
|
|
1636
2310
|
export declare interface DataGridCellProps extends React_2.TdHTMLAttributes<HTMLTableCellElement> {
|
|
1637
2311
|
/** Cell content. */
|
|
@@ -1640,6 +2314,12 @@ export declare interface DataGridCellProps extends React_2.TdHTMLAttributes<HTML
|
|
|
1640
2314
|
ref?: React_2.Ref<HTMLTableCellElement>;
|
|
1641
2315
|
}
|
|
1642
2316
|
|
|
2317
|
+
/** DataGrid: `root` on the grid element (`role="grid"`); `container` on the wrapper around it. */
|
|
2318
|
+
export declare const dataGridClassNames: {
|
|
2319
|
+
readonly root: "wave-data-grid";
|
|
2320
|
+
readonly container: "wave-data-grid__container";
|
|
2321
|
+
};
|
|
2322
|
+
|
|
1643
2323
|
/** Defines a column in the DataGrid. */
|
|
1644
2324
|
export declare interface DataGridColumn {
|
|
1645
2325
|
/** Unique identifier for the column (the header cell's `columnId`). */
|
|
@@ -1687,6 +2367,16 @@ export declare const DataGridHeaderCell: {
|
|
|
1687
2367
|
displayName: string;
|
|
1688
2368
|
};
|
|
1689
2369
|
|
|
2370
|
+
/**
|
|
2371
|
+
* DataGrid.HeaderCell: `root` on the `<th>`; `button` on the sort button; `sortIcon` on its
|
|
2372
|
+
* direction `<svg>`.
|
|
2373
|
+
*/
|
|
2374
|
+
export declare const dataGridHeaderCellClassNames: {
|
|
2375
|
+
readonly root: "wave-data-grid-header-cell";
|
|
2376
|
+
readonly button: "wave-data-grid-header-cell__button";
|
|
2377
|
+
readonly sortIcon: "wave-data-grid-header-cell__sort-icon";
|
|
2378
|
+
};
|
|
2379
|
+
|
|
1690
2380
|
/** Properties for the DataGridHeaderCell sub-component. */
|
|
1691
2381
|
export declare interface DataGridHeaderCellProps extends React_2.ThHTMLAttributes<HTMLTableCellElement> {
|
|
1692
2382
|
/** Column ID used for sort tracking. Required for `sortable`. */
|
|
@@ -1703,6 +2393,16 @@ export declare interface DataGridHeaderCellProps extends React_2.ThHTMLAttribute
|
|
|
1703
2393
|
ref?: React_2.Ref<HTMLTableCellElement>;
|
|
1704
2394
|
}
|
|
1705
2395
|
|
|
2396
|
+
/**
|
|
2397
|
+
* DataGrid.Header: `root` on the `<thead>`; `selectionCell` on the selection column's cell of
|
|
2398
|
+
* each header row; `selectAllCheckbox` on its checkbox.
|
|
2399
|
+
*/
|
|
2400
|
+
export declare const dataGridHeaderClassNames: {
|
|
2401
|
+
readonly root: "wave-data-grid-header";
|
|
2402
|
+
readonly selectionCell: "wave-data-grid-header__selection-cell";
|
|
2403
|
+
readonly selectAllCheckbox: "wave-data-grid-header__select-all-checkbox";
|
|
2404
|
+
};
|
|
2405
|
+
|
|
1706
2406
|
/** Properties for the DataGridHeader sub-component. */
|
|
1707
2407
|
export declare interface DataGridHeaderProps extends React_2.HTMLAttributes<HTMLTableSectionElement> {
|
|
1708
2408
|
/**
|
|
@@ -1782,6 +2482,16 @@ export declare const DataGridRow: {
|
|
|
1782
2482
|
displayName: string;
|
|
1783
2483
|
};
|
|
1784
2484
|
|
|
2485
|
+
/**
|
|
2486
|
+
* DataGrid.Row: `root` on the `<tr>`; `selectionCell` on its selection cell; `selectionControl`
|
|
2487
|
+
* on the checkbox or radio in it.
|
|
2488
|
+
*/
|
|
2489
|
+
export declare const dataGridRowClassNames: {
|
|
2490
|
+
readonly root: "wave-data-grid-row";
|
|
2491
|
+
readonly selectionCell: "wave-data-grid-row__selection-cell";
|
|
2492
|
+
readonly selectionControl: "wave-data-grid-row__selection-control";
|
|
2493
|
+
};
|
|
2494
|
+
|
|
1785
2495
|
/** Properties for the DataGridRow sub-component. */
|
|
1786
2496
|
export declare interface DataGridRowProps extends React_2.HTMLAttributes<HTMLTableRowElement> {
|
|
1787
2497
|
/**
|
|
@@ -1850,6 +2560,10 @@ export declare interface DataGridUncontrolledSortProps extends NoDeprecatedSortP
|
|
|
1850
2560
|
* clear button that disappears.
|
|
1851
2561
|
* - Every emitted date is local midnight. The calendar opens on the month of the selected date or
|
|
1852
2562
|
* today, clamped into `minDate`/`maxDate`.
|
|
2563
|
+
* - **Size and appearance**: `size` resolves from its own prop, then the surrounding `Field`'s
|
|
2564
|
+
* `size`, then `WaveProvider inputDefaults.size`, else `'medium'`; `appearance` from its own
|
|
2565
|
+
* prop, then `WaveProvider inputDefaults.appearance`, else `'outline'`; both render as
|
|
2566
|
+
* `data-size` and `data-appearance` on the root `<div>`. The calendar keeps its size.
|
|
1853
2567
|
* - The input (`controlRef`) receives `id`, `aria-label`, `aria-labelledby`, `aria-describedby`,
|
|
1854
2568
|
* `aria-invalid`, `aria-required`, `aria-errormessage`, `aria-details`, `tabIndex`,
|
|
1855
2569
|
* `autoFocus`, `onFocus`/`onBlur`/`onKeyDown`/`onKeyUp` and the text input attributes
|
|
@@ -1868,6 +2582,30 @@ export declare const DatePicker: {
|
|
|
1868
2582
|
displayName: string;
|
|
1869
2583
|
};
|
|
1870
2584
|
|
|
2585
|
+
/**
|
|
2586
|
+
* DatePicker: `root` on the outer element; `input` on the text input; `clearButton` on the clear
|
|
2587
|
+
* button; `openCalendarButton` on the calendar button; `errorMessage` on the `role="alert"`
|
|
2588
|
+
* message; `surface` on the portaled `role="dialog"` calendar; `header` on its month row;
|
|
2589
|
+
* `previousMonthButton` and `nextMonthButton` on the month buttons; `heading` on the month
|
|
2590
|
+
* `<h2>`; `grid` on the calendar's `role="grid"` element; `weekday` on each weekday header cell;
|
|
2591
|
+
* `day` on each day button.
|
|
2592
|
+
*/
|
|
2593
|
+
export declare const datePickerClassNames: {
|
|
2594
|
+
readonly root: "wave-date-picker";
|
|
2595
|
+
readonly input: "wave-date-picker__input";
|
|
2596
|
+
readonly clearButton: "wave-date-picker__clear-button";
|
|
2597
|
+
readonly openCalendarButton: "wave-date-picker__open-calendar-button";
|
|
2598
|
+
readonly errorMessage: "wave-date-picker__error-message";
|
|
2599
|
+
readonly surface: "wave-date-picker__surface";
|
|
2600
|
+
readonly header: "wave-date-picker__header";
|
|
2601
|
+
readonly previousMonthButton: "wave-date-picker__previous-month-button";
|
|
2602
|
+
readonly heading: "wave-date-picker__heading";
|
|
2603
|
+
readonly nextMonthButton: "wave-date-picker__next-month-button";
|
|
2604
|
+
readonly grid: "wave-date-picker__grid";
|
|
2605
|
+
readonly weekday: "wave-date-picker__weekday";
|
|
2606
|
+
readonly day: "wave-date-picker__day";
|
|
2607
|
+
};
|
|
2608
|
+
|
|
1871
2609
|
/** Why typed text was not accepted (see {@link DatePickerProps.onInvalidInput}). */
|
|
1872
2610
|
export declare type DatePickerInvalidReason = 'unparseable' | 'out-of-range' | 'disabled';
|
|
1873
2611
|
|
|
@@ -1967,6 +2705,18 @@ export declare interface DatePickerProps extends Omit<React_2.HTMLAttributes<HTM
|
|
|
1967
2705
|
* @default false
|
|
1968
2706
|
*/
|
|
1969
2707
|
disabled?: boolean;
|
|
2708
|
+
/**
|
|
2709
|
+
* Size of the field: `small` (24px tall), `medium` (32px) or `large` (40px). Default: the
|
|
2710
|
+
* surrounding Field's `size`, else `WaveProvider inputDefaults.size`, else `'medium'`. The
|
|
2711
|
+
* calendar keeps its size.
|
|
2712
|
+
*/
|
|
2713
|
+
size?: CoreSize;
|
|
2714
|
+
/**
|
|
2715
|
+
* Look of the field: `outline` (a full border), `underline` (a bottom stroke only),
|
|
2716
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke: give the field a visible
|
|
2717
|
+
* label). Default: `WaveProvider inputDefaults.appearance`, else `'outline'`.
|
|
2718
|
+
*/
|
|
2719
|
+
appearance?: InputAppearance;
|
|
1970
2720
|
/**
|
|
1971
2721
|
* Makes the input read-only: the calendar does not open and the value cannot change. Turning it
|
|
1972
2722
|
* (or `disabled`) on while the user is typing drops the typed text.
|
|
@@ -2135,7 +2885,10 @@ export declare interface DialogCloseRenderProps extends React_2.HTMLAttributes<H
|
|
|
2135
2885
|
/**
|
|
2136
2886
|
* The dialog surface, rendered in a portal (inheriting the WaveProvider theme) while the dialog is
|
|
2137
2887
|
* open: backdrop, title, Close button and a scrolling body. It takes the full width up to its
|
|
2138
|
-
* `size` and never exceeds the viewport (the body scrolls
|
|
2888
|
+
* `size` and never exceeds the viewport (the body scrolls, also sideways for content wider than
|
|
2889
|
+
* the dialog). Its 1rem gap to the viewport edges is its own margin, so a margin in `className`
|
|
2890
|
+
* replaces the gap: with the width and height caps lifted as well and its height set to the
|
|
2891
|
+
* viewport's, it fills the viewport (a full-screen dialog). It is `role="dialog"`, or
|
|
2139
2892
|
* `role="alertdialog"` when the Dialog has `modalType="alert"` (a `role` you pass wins), and
|
|
2140
2893
|
* carries `data-modal-type` with the resolved type.
|
|
2141
2894
|
*/
|
|
@@ -2144,6 +2897,19 @@ export declare const DialogContent: {
|
|
|
2144
2897
|
displayName: string;
|
|
2145
2898
|
};
|
|
2146
2899
|
|
|
2900
|
+
/**
|
|
2901
|
+
* Dialog.Content: `root` on the surface (`role="dialog"` or `"alertdialog"`); `backdrop` on the
|
|
2902
|
+
* backdrop around it; `closeButton` on the built-in Close button (which also carries Button's
|
|
2903
|
+
* root); `body` on the scrolling body. The heading of its `title` prop carries Dialog.Title's
|
|
2904
|
+
* class.
|
|
2905
|
+
*/
|
|
2906
|
+
export declare const dialogContentClassNames: {
|
|
2907
|
+
readonly root: "wave-dialog-content";
|
|
2908
|
+
readonly backdrop: "wave-dialog-content__backdrop";
|
|
2909
|
+
readonly closeButton: "wave-dialog-content__close-button";
|
|
2910
|
+
readonly body: "wave-dialog-content__body";
|
|
2911
|
+
};
|
|
2912
|
+
|
|
2147
2913
|
/** Properties for the DialogContent sub-component. */
|
|
2148
2914
|
export declare interface DialogContentProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
2149
2915
|
/**
|
|
@@ -2184,6 +2950,11 @@ export declare const DialogFooter: {
|
|
|
2184
2950
|
displayName: string;
|
|
2185
2951
|
};
|
|
2186
2952
|
|
|
2953
|
+
/** Dialog.Footer: `root` on the footer element. */
|
|
2954
|
+
export declare const dialogFooterClassNames: {
|
|
2955
|
+
readonly root: "wave-dialog-footer";
|
|
2956
|
+
};
|
|
2957
|
+
|
|
2187
2958
|
/** Properties for the DialogFooter sub-component. */
|
|
2188
2959
|
export declare interface DialogFooterProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
2189
2960
|
/** Footer content, typically action buttons (wrap closing buttons in `Dialog.Close`). */
|
|
@@ -2263,6 +3034,11 @@ export declare const DialogTitle: {
|
|
|
2263
3034
|
displayName: string;
|
|
2264
3035
|
};
|
|
2265
3036
|
|
|
3037
|
+
/** Dialog.Title: `root` on the `<h2>`. */
|
|
3038
|
+
export declare const dialogTitleClassNames: {
|
|
3039
|
+
readonly root: "wave-dialog-title";
|
|
3040
|
+
};
|
|
3041
|
+
|
|
2266
3042
|
/** Properties for the DialogTitle sub-component. */
|
|
2267
3043
|
export declare interface DialogTitleProps extends React_2.HTMLAttributes<HTMLHeadingElement> {
|
|
2268
3044
|
/** The title; any content. */
|
|
@@ -2335,6 +3111,17 @@ export declare interface DialogTriggerRenderProps extends React_2.HTMLAttributes
|
|
|
2335
3111
|
*/
|
|
2336
3112
|
export declare const Divider: PolymorphicComponent<'hr', DividerOwnProps>;
|
|
2337
3113
|
|
|
3114
|
+
/**
|
|
3115
|
+
* Divider: `root` on the `<hr>` of a plain horizontal divider, else on the `role="separator"`
|
|
3116
|
+
* element (or your `as`); `line` on each of the two line elements of a labelled divider; `label`
|
|
3117
|
+
* on its label span.
|
|
3118
|
+
*/
|
|
3119
|
+
export declare const dividerClassNames: {
|
|
3120
|
+
readonly root: "wave-divider";
|
|
3121
|
+
readonly line: "wave-divider__line";
|
|
3122
|
+
readonly label: "wave-divider__label";
|
|
3123
|
+
};
|
|
3124
|
+
|
|
2338
3125
|
/**
|
|
2339
3126
|
* The Divider's own props (the XOwnProps rule of `PolymorphicProps`: component-specific props
|
|
2340
3127
|
* only). Every other prop comes from the rendered element (`as`).
|
|
@@ -2404,6 +3191,20 @@ export declare const Drawer: {
|
|
|
2404
3191
|
};
|
|
2405
3192
|
};
|
|
2406
3193
|
|
|
3194
|
+
/**
|
|
3195
|
+
* Drawer: `root` on the portaled panel (`role="dialog"`, while open); `backdrop` on the backdrop;
|
|
3196
|
+
* `header` on the header row; `closeButton` on the Close button (which also carries Button's
|
|
3197
|
+
* root); `body` on the scrolling body. The heading of its `title` prop carries Drawer.Title's
|
|
3198
|
+
* class.
|
|
3199
|
+
*/
|
|
3200
|
+
export declare const drawerClassNames: {
|
|
3201
|
+
readonly root: "wave-drawer";
|
|
3202
|
+
readonly backdrop: "wave-drawer__backdrop";
|
|
3203
|
+
readonly header: "wave-drawer__header";
|
|
3204
|
+
readonly closeButton: "wave-drawer__close-button";
|
|
3205
|
+
readonly body: "wave-drawer__body";
|
|
3206
|
+
};
|
|
3207
|
+
|
|
2407
3208
|
/**
|
|
2408
3209
|
* Closes the drawer: composes a click handler onto its single child (its own `onClick` runs first;
|
|
2409
3210
|
* calling `preventDefault()` there keeps the drawer open), or passes it to a render-prop child.
|
|
@@ -2523,6 +3324,11 @@ export declare const DrawerTitle: {
|
|
|
2523
3324
|
displayName: string;
|
|
2524
3325
|
};
|
|
2525
3326
|
|
|
3327
|
+
/** Drawer.Title: `root` on the `<h2>`. */
|
|
3328
|
+
export declare const drawerTitleClassNames: {
|
|
3329
|
+
readonly root: "wave-drawer-title";
|
|
3330
|
+
};
|
|
3331
|
+
|
|
2526
3332
|
/** Properties for the DrawerTitle sub-component. */
|
|
2527
3333
|
export declare interface DrawerTitleProps extends React_2.HTMLAttributes<HTMLHeadingElement> {
|
|
2528
3334
|
/** The title; any content. */
|
|
@@ -2608,6 +3414,11 @@ export declare interface DrawerTriggerRenderProps extends React_2.HTMLAttributes
|
|
|
2608
3414
|
* `name`/`required` the value takes part in form submission, validation and reset. The open
|
|
2609
3415
|
* listbox renders in a portal; while closed it stays in the DOM, hidden.
|
|
2610
3416
|
*
|
|
3417
|
+
* **Size and appearance**: `size` resolves from its own prop, then the surrounding `Field`'s
|
|
3418
|
+
* `size`, then `WaveProvider inputDefaults.size`, else `'medium'`; `appearance` from its own prop,
|
|
3419
|
+
* then `WaveProvider inputDefaults.appearance`, else `'outline'`; both render as `data-size` and
|
|
3420
|
+
* `data-appearance` on the root `<div>`. The listbox keeps its size.
|
|
3421
|
+
*
|
|
2611
3422
|
* Sub-components: `Dropdown.Option`, `Dropdown.OptionGroup`. React Server Components import the
|
|
2612
3423
|
* flat names `DropdownOption` / `DropdownOptionGroup` (dotted access needs a client file).
|
|
2613
3424
|
*/
|
|
@@ -2619,6 +3430,21 @@ export declare const Dropdown: {
|
|
|
2619
3430
|
OptionGroup: React_2.FC<OptionGroupProps>;
|
|
2620
3431
|
};
|
|
2621
3432
|
|
|
3433
|
+
/**
|
|
3434
|
+
* Dropdown: `root` on the outer element; `button` on the `role="combobox"` button; `value` on the
|
|
3435
|
+
* value or placeholder span; `expandIcon` on the chevron `<svg>`; `clearButton` on the clear
|
|
3436
|
+
* button; `listbox` on the `role="listbox"` list; `surface` on its portaled popup.
|
|
3437
|
+
*/
|
|
3438
|
+
export declare const dropdownClassNames: {
|
|
3439
|
+
readonly root: "wave-dropdown";
|
|
3440
|
+
readonly button: "wave-dropdown__button";
|
|
3441
|
+
readonly value: "wave-dropdown__value";
|
|
3442
|
+
readonly expandIcon: "wave-dropdown__expand-icon";
|
|
3443
|
+
readonly clearButton: "wave-dropdown__clear-button";
|
|
3444
|
+
readonly listbox: "wave-dropdown__listbox";
|
|
3445
|
+
readonly surface: "wave-dropdown__surface";
|
|
3446
|
+
};
|
|
3447
|
+
|
|
2622
3448
|
/**
|
|
2623
3449
|
* The Dropdown's built-in texts, for localization. Each member is optional and falls back to its
|
|
2624
3450
|
* English default.
|
|
@@ -2678,6 +3504,18 @@ export declare interface DropdownProps extends Omit<React_2.HTMLAttributes<HTMLD
|
|
|
2678
3504
|
* @default false
|
|
2679
3505
|
*/
|
|
2680
3506
|
disabled?: boolean;
|
|
3507
|
+
/**
|
|
3508
|
+
* Size of the field: `small` (24px tall), `medium` (32px) or `large` (40px). Default: the
|
|
3509
|
+
* surrounding Field's `size`, else `WaveProvider inputDefaults.size`, else `'medium'`. The
|
|
3510
|
+
* listbox keeps its size.
|
|
3511
|
+
*/
|
|
3512
|
+
size?: CoreSize;
|
|
3513
|
+
/**
|
|
3514
|
+
* Look of the field: `outline` (a full border), `underline` (a bottom stroke only),
|
|
3515
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke: give the field a visible
|
|
3516
|
+
* label). Default: `WaveProvider inputDefaults.appearance`, else `'outline'`.
|
|
3517
|
+
*/
|
|
3518
|
+
appearance?: InputAppearance;
|
|
2681
3519
|
/** Name of the value in form submissions (renders a hidden input). */
|
|
2682
3520
|
name?: string;
|
|
2683
3521
|
/** Id of the form the value belongs to, when the Dropdown is outside it. */
|
|
@@ -2722,6 +3560,17 @@ export declare interface DropdownProps extends Omit<React_2.HTMLAttributes<HTMLD
|
|
|
2722
3560
|
* - `orientation="horizontal"` puts the label in a start column beside the control, with the
|
|
2723
3561
|
* message and the hint below the control. The label lines up with the first line of the
|
|
2724
3562
|
* control (a Checkbox, Switch or RadioGroup gets 6px of padding above and below for it).
|
|
3563
|
+
* - `size` sets the label's type ramp and, in the horizontal layout, its top padding and the
|
|
3564
|
+
* padding that lines a Checkbox, Switch or RadioGroup row up with it, so the label's first
|
|
3565
|
+
* line keeps lining up with a 24, 32 or 40px control. The message and the hint stay small.
|
|
3566
|
+
* Controls inside read the prop from `FieldContext` as their own default `size` (their own
|
|
3567
|
+
* `size` wins); the Field's own label falls back to `WaveProvider inputDefaults.size`, else
|
|
3568
|
+
* `medium`, and the root always renders that resolved value as `data-size`.
|
|
3569
|
+
* - `label` also takes a `Label` or `InfoLabel` element, which renders in place of Field's own
|
|
3570
|
+
* `<label>` with the Field's wiring (see `label`); an InfoLabel's info button sits next to the
|
|
3571
|
+
* label text, outside the `<label>`, so the control is named by the text alone. A group control
|
|
3572
|
+
* (RadioGroup, your own `<div role="radiogroup">`) is named through `aria-labelledby` pointing
|
|
3573
|
+
* at that `<label>`.
|
|
2725
3574
|
* - Provides `FieldContext`: the library's inputs (Input, Select, Textarea, Slider, SearchBox,
|
|
2726
3575
|
* Checkbox, Switch, RadioGroup, Rating, SpinButton, pickers, …) read it wherever they are inside
|
|
2727
3576
|
* the Field and are named by the label, described by the message and the hint and marked
|
|
@@ -2782,6 +3631,13 @@ export declare interface DropdownProps extends Omit<React_2.HTMLAttributes<HTMLD
|
|
|
2782
3631
|
* </Field>
|
|
2783
3632
|
*
|
|
2784
3633
|
* @example
|
|
3634
|
+
* // An InfoLabel as the label: the input is named "Password", the info button
|
|
3635
|
+
* // "Password Information".
|
|
3636
|
+
* <Field label={<InfoLabel info="Use 12 characters or more.">Password</InfoLabel>} required>
|
|
3637
|
+
* <Input type="password" />
|
|
3638
|
+
* </Field>
|
|
3639
|
+
*
|
|
3640
|
+
* @example
|
|
2785
3641
|
* // A wrapper component goes inside a plain element.
|
|
2786
3642
|
* <Field label="Name" required>
|
|
2787
3643
|
* <div>
|
|
@@ -2792,10 +3648,23 @@ export declare interface DropdownProps extends Omit<React_2.HTMLAttributes<HTMLD
|
|
|
2792
3648
|
* </Field>
|
|
2793
3649
|
*/
|
|
2794
3650
|
export declare const Field: {
|
|
2795
|
-
({ label, hint, error, validationState, validationMessage, validationMessageIcon, orientation, required, htmlFor, className, children, ref, ...rest }: FieldProps): React_2.JSX.Element;
|
|
3651
|
+
({ label, hint, error, validationState, validationMessage, validationMessageIcon, orientation, size, required, htmlFor, className, children, ref, ...rest }: FieldProps): React_2.JSX.Element;
|
|
2796
3652
|
displayName: string;
|
|
2797
3653
|
};
|
|
2798
3654
|
|
|
3655
|
+
/**
|
|
3656
|
+
* Field: `root` on the field element; `label` on the `<label>`; `required` on the asterisk;
|
|
3657
|
+
* `validationMessage` on the message; `validationMessageIcon` on its icon; `hint` on the hint.
|
|
3658
|
+
*/
|
|
3659
|
+
export declare const fieldClassNames: {
|
|
3660
|
+
readonly root: "wave-field";
|
|
3661
|
+
readonly label: "wave-field__label";
|
|
3662
|
+
readonly required: "wave-field__required";
|
|
3663
|
+
readonly validationMessage: "wave-field__validation-message";
|
|
3664
|
+
readonly validationMessageIcon: "wave-field__validation-message-icon";
|
|
3665
|
+
readonly hint: "wave-field__hint";
|
|
3666
|
+
};
|
|
3667
|
+
|
|
2799
3668
|
/**
|
|
2800
3669
|
* What a `Field` tells the controls inside it: the ids of its label, hint and validation message,
|
|
2801
3670
|
* and its validation, invalid and required state. `Field` provides it; every library input reads
|
|
@@ -2847,6 +3716,12 @@ export declare interface FieldContextValue {
|
|
|
2847
3716
|
* `errorId` is set only while that message is an error.
|
|
2848
3717
|
*/
|
|
2849
3718
|
validationMessageId?: string;
|
|
3719
|
+
/**
|
|
3720
|
+
* The Field's own `size` prop, when set: the default size of the text inputs and pickers inside
|
|
3721
|
+
* it (their own `size` wins). Absent when the Field has no `size` (the controls then fall back to
|
|
3722
|
+
* `WaveProvider inputDefaults`) and in contexts built before 0.9.
|
|
3723
|
+
*/
|
|
3724
|
+
size?: CoreSize;
|
|
2850
3725
|
}
|
|
2851
3726
|
|
|
2852
3727
|
/**
|
|
@@ -2909,6 +3784,18 @@ export declare interface FieldProps extends React_2.HTMLAttributes<HTMLDivElemen
|
|
|
2909
3784
|
/**
|
|
2910
3785
|
* Label displayed above the control (beside it with `orientation="horizontal"`); names the
|
|
2911
3786
|
* control.
|
|
3787
|
+
*
|
|
3788
|
+
* A `Label` or `InfoLabel` element passed as `label` renders in place of Field's own `<label>`,
|
|
3789
|
+
* never inside it, and names the control by its label text alone (an InfoLabel's info button
|
|
3790
|
+
* sits next to the `<label>`, outside it). Field always points it at the control (`htmlFor`),
|
|
3791
|
+
* and gives it the Field's label id, `required`, label `size` and `weight="semibold"` (the look
|
|
3792
|
+
* of Field's own label), each only where the element leaves it unset; Field's layout classes go
|
|
3793
|
+
* before the element's `className`, so the element's classes win. The element's own `htmlFor`
|
|
3794
|
+
* is read like the Field's `htmlFor` (which wins over it): it becomes the control's id when the
|
|
3795
|
+
* control has none, and one that points at another element is replaced, with a development
|
|
3796
|
+
* warning. Field shows no asterisk of its own next to such an element: the element shows its
|
|
3797
|
+
* `required` indicator. Only the element itself is recognized, not one inside a Fragment, an
|
|
3798
|
+
* array or another element.
|
|
2912
3799
|
*/
|
|
2913
3800
|
label?: React_2.ReactNode;
|
|
2914
3801
|
/** Hint shown below the control, after any validation message; describes the control. */
|
|
@@ -2951,6 +3838,12 @@ export declare interface FieldProps extends React_2.HTMLAttributes<HTMLDivElemen
|
|
|
2951
3838
|
* @default 'vertical'
|
|
2952
3839
|
*/
|
|
2953
3840
|
orientation?: Orientation;
|
|
3841
|
+
/**
|
|
3842
|
+
* The label's size and the default `size` of the text inputs and pickers inside the Field
|
|
3843
|
+
* (their own `size` wins; choice controls keep theirs). The message and the hint stay small.
|
|
3844
|
+
* @default `WaveProvider` `inputDefaults.size`, else `'medium'`.
|
|
3845
|
+
*/
|
|
3846
|
+
size?: CoreSize;
|
|
2954
3847
|
/**
|
|
2955
3848
|
* Whether the field is required: shows a decorative asterisk next to the label, sets
|
|
2956
3849
|
* `aria-required`, and turns on native constraint validation. `<input>`, `<select>`,
|
|
@@ -2963,7 +3856,8 @@ export declare interface FieldProps extends React_2.HTMLAttributes<HTMLDivElemen
|
|
|
2963
3856
|
required?: boolean;
|
|
2964
3857
|
/**
|
|
2965
3858
|
* The id of the control the label points at, when the control has no `id` of its own
|
|
2966
|
-
* (default: a
|
|
3859
|
+
* (default: the `htmlFor` of a `Label` or `InfoLabel` element passed as `label`, else a
|
|
3860
|
+
* generated id).
|
|
2967
3861
|
*/
|
|
2968
3862
|
htmlFor?: string;
|
|
2969
3863
|
/** Ref to the root `<div>`. */
|
|
@@ -2985,6 +3879,11 @@ export declare interface FieldProps extends React_2.HTMLAttributes<HTMLDivElemen
|
|
|
2985
3879
|
*/
|
|
2986
3880
|
export declare const Flex: PolymorphicComponent<'div', FlexOwnProps>;
|
|
2987
3881
|
|
|
3882
|
+
/** Flex: `root` on the rendered element. */
|
|
3883
|
+
export declare const flexClassNames: {
|
|
3884
|
+
readonly root: "wave-flex";
|
|
3885
|
+
};
|
|
3886
|
+
|
|
2988
3887
|
/**
|
|
2989
3888
|
* The Flex's own props (the XOwnProps rule of `PolymorphicProps`: component-specific props only).
|
|
2990
3889
|
* Every other prop comes from the rendered element (`as`).
|
|
@@ -3049,6 +3948,11 @@ export declare function getThemeClassName(theme: WaveTheme): string;
|
|
|
3049
3948
|
*/
|
|
3050
3949
|
export declare const Grid: PolymorphicComponent<'div', GridOwnProps>;
|
|
3051
3950
|
|
|
3951
|
+
/** Grid: `root` on the rendered element. */
|
|
3952
|
+
export declare const gridClassNames: {
|
|
3953
|
+
readonly root: "wave-grid";
|
|
3954
|
+
};
|
|
3955
|
+
|
|
3052
3956
|
/**
|
|
3053
3957
|
* The Grid's own props (the XOwnProps rule of `PolymorphicProps`: component-specific props only).
|
|
3054
3958
|
* Every other prop comes from the rendered element (`as`).
|
|
@@ -3076,6 +3980,40 @@ export declare interface GridOwnProps {
|
|
|
3076
3980
|
*/
|
|
3077
3981
|
export declare type GridProps<C extends React_2.ElementType = 'div'> = PolymorphicProps<C, GridOwnProps>;
|
|
3078
3982
|
|
|
3983
|
+
/**
|
|
3984
|
+
* The HSV color of a hex string: `#rgb`, `#rgba`, `#rrggbb` or `#rrggbbaa` (surrounding whitespace
|
|
3985
|
+
* ignored, any case). `a` is set only when the input has alpha digits. Returns `null` for anything
|
|
3986
|
+
* else (named colors, `rgb()`, a missing `#`). `hsvToHex(hexToHsv(x))` gives `x` back in
|
|
3987
|
+
* ColorPicker's normal form.
|
|
3988
|
+
*
|
|
3989
|
+
* @example hexToHsv('#ff000080') // { h: 0, s: 1, v: 1, a: 0.50196… }
|
|
3990
|
+
*/
|
|
3991
|
+
export declare function hexToHsv(hex: string): HsvColor | null;
|
|
3992
|
+
|
|
3993
|
+
/**
|
|
3994
|
+
* A color in HSV (Fluent's `HsvColor`): `h` is the hue in degrees (0–360), `s` the saturation, `v`
|
|
3995
|
+
* the brightness (value) and `a` the opacity, each from 0 to 1. Without `a` the color is opaque.
|
|
3996
|
+
*/
|
|
3997
|
+
export declare interface HsvColor {
|
|
3998
|
+
/** Hue in degrees, 0–360. */
|
|
3999
|
+
h: number;
|
|
4000
|
+
/** Saturation, 0–1. */
|
|
4001
|
+
s: number;
|
|
4002
|
+
/** Brightness (value), 0–1. */
|
|
4003
|
+
v: number;
|
|
4004
|
+
/** Opacity, 0–1; left out means opaque. */
|
|
4005
|
+
a?: number;
|
|
4006
|
+
}
|
|
4007
|
+
|
|
4008
|
+
/**
|
|
4009
|
+
* The hex string of an HSV color: lowercase `#rrggbb`, or `#rrggbbaa` when `a` is below 1
|
|
4010
|
+
* (ColorPicker's value format). The hue wraps into [0, 360); saturation, brightness and alpha are
|
|
4011
|
+
* clamped to [0, 1]; a channel that is not a number reads as 0 (alpha: as left out, so opaque).
|
|
4012
|
+
*
|
|
4013
|
+
* @example hsvToHex({ h: 208, s: 0.92, v: 0.74 }) // '#0f6cbd'
|
|
4014
|
+
*/
|
|
4015
|
+
export declare function hsvToHex(color: HsvColor): string;
|
|
4016
|
+
|
|
3079
4017
|
/** Where an icon renders relative to a label: the inline start (`before`) or end (`after`). */
|
|
3080
4018
|
export declare type IconPosition = 'before' | 'after';
|
|
3081
4019
|
|
|
@@ -3094,6 +4032,11 @@ declare const Image_2: {
|
|
|
3094
4032
|
};
|
|
3095
4033
|
export { Image_2 as Image }
|
|
3096
4034
|
|
|
4035
|
+
/** Image: `root` on the `<img>`. */
|
|
4036
|
+
export declare const imageClassNames: {
|
|
4037
|
+
readonly root: "wave-image";
|
|
4038
|
+
};
|
|
4039
|
+
|
|
3097
4040
|
/**
|
|
3098
4041
|
* How an image fits its box (the `width`/`height` attributes, or a size set with `className`):
|
|
3099
4042
|
*
|
|
@@ -3150,43 +4093,166 @@ export declare interface ImageProps extends React_2.ImgHTMLAttributes<HTMLImageE
|
|
|
3150
4093
|
export declare type ImageShape = Shape;
|
|
3151
4094
|
|
|
3152
4095
|
/**
|
|
3153
|
-
* A
|
|
4096
|
+
* A button with the info glyph that shows `info` in a note next to it: text, links or other rich
|
|
4097
|
+
* content, placed above the button with a beak (a toggletip).
|
|
4098
|
+
*
|
|
4099
|
+
* - **Naming.** The button is named "Information" (`aria-label`, which localizes it). Next to a
|
|
4100
|
+
* heading or other text, pass `aria-labelledby` with that text's id and the button's own `id`:
|
|
4101
|
+
* the button is then named "‹text› Information", so several info buttons on a page are told
|
|
4102
|
+
* apart. The note (`role="note"`) is labelled like the button: by the same `aria-labelledby`
|
|
4103
|
+
* ids, else by the button. The button has `aria-expanded`, and `aria-controls` while the note is
|
|
4104
|
+
* open, but no `aria-haspopup`: a note is none of the popup kinds it names.
|
|
4105
|
+
* - **Opening.** A click pins the note open, and a click on a pinned note closes it. With
|
|
4106
|
+
* `openOnHover` (the default) a mouse pointer resting on the button opens it after 250 ms, and
|
|
4107
|
+
* it closes 250 ms after the pointer has left the button and the note (a pointer moving
|
|
4108
|
+
* diagonally from the button into the note keeps it open; touch and pen never hover); keyboard
|
|
4109
|
+
* focus on the button opens it too, while focus that comes from a pointer press waits for the
|
|
4110
|
+
* click. A hover close moves no focus, and a note that keyboard focus opened or keeps never
|
|
4111
|
+
* closes because of pointer movement. Opening never moves focus. Escape, a press outside and
|
|
4112
|
+
* focus moving outside the button and the note close it; Escape returns focus to the button when
|
|
4113
|
+
* it was in the note, and a dismissed note opens again on keyboard focus only once focus has
|
|
4114
|
+
* left both.
|
|
4115
|
+
* - **Tab path.** The note is portaled, but it keeps its place right after the button in the
|
|
4116
|
+
* keyboard order: Tab from the open button enters the note's first element (a link in it), Tab
|
|
4117
|
+
* past its last element continues after the button, and Shift+Tab from its first element
|
|
4118
|
+
* returns to the button.
|
|
4119
|
+
* - **One copy of `info`.** While the note is closed, `info` renders next to the button in an
|
|
4120
|
+
* element that is not displayed and describes the button (`aria-describedby`), so it is in the
|
|
4121
|
+
* server HTML and is read when the button takes focus. While the note is shown, `info` renders
|
|
4122
|
+
* only inside it, in an unnamed element that describes the button. `info` is never in the
|
|
4123
|
+
* document twice, so content with ids or effects is safe; it remounts each time the note opens
|
|
4124
|
+
* and closes, so state inside it starts over and its effects run again.
|
|
4125
|
+
* - **Structure.** The button is the root element: `ref`, `className`, `style` and every other
|
|
4126
|
+
* attribute go to it, the consumer's handlers first. The description and the note render next
|
|
4127
|
+
* to it, never inside it. Its box is 24×24px at every `size` and renders `data-size`. The note
|
|
4128
|
+
* mounts through the presence core: it carries `data-presence`, `data-state` (`open`, and
|
|
4129
|
+
* `closed` while it exits, `inert`) and the `data-wave-infolabel-surface` marker; it ships no
|
|
4130
|
+
* motion of its own.
|
|
4131
|
+
*
|
|
4132
|
+
* Fluent's InfoButton takes the same `info` and `size`. It opens on click only
|
|
4133
|
+
* (`openOnHover={false}` here), renders its note in place, and moves focus into the note; this one
|
|
4134
|
+
* keeps focus on the button and renders the note in a portal. Fluent's `popover` props and a
|
|
4135
|
+
* controlled open state are not offered.
|
|
3154
4136
|
*
|
|
3155
|
-
*
|
|
3156
|
-
*
|
|
3157
|
-
*
|
|
3158
|
-
*
|
|
3159
|
-
*
|
|
3160
|
-
*
|
|
3161
|
-
*
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
4137
|
+
* @example
|
|
4138
|
+
* <h2 id="billing">Billing</h2>
|
|
4139
|
+
* <InfoButton
|
|
4140
|
+
* id="billing-info"
|
|
4141
|
+
* aria-labelledby="billing billing-info"
|
|
4142
|
+
* info={<>Invoices are sent monthly. <a href="/help/billing">Learn more</a></>}
|
|
4143
|
+
* />
|
|
4144
|
+
*/
|
|
4145
|
+
export declare const InfoButton: {
|
|
4146
|
+
({ info, size: sizeProp, openOnHover, id: idProp, type, "aria-label": ariaLabelProp, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, className, disabled, onClick, onFocus, onBlur, onKeyDown, onPointerDown, onMouseDown, onPointerEnter, onPointerMove, onPointerLeave, ref, ...rest }: InfoButtonProps): React_2.JSX.Element;
|
|
4147
|
+
displayName: string;
|
|
4148
|
+
};
|
|
4149
|
+
|
|
4150
|
+
/**
|
|
4151
|
+
* InfoButton: `root` on the `<button>`; `info` on the `role="note"` popup that shows your `info`
|
|
4152
|
+
* (Fluent's `info` slot, the popover surface); `beak` on its arrow.
|
|
4153
|
+
*/
|
|
4154
|
+
export declare const infoButtonClassNames: {
|
|
4155
|
+
readonly root: "wave-info-button";
|
|
4156
|
+
readonly info: "wave-info-button__info";
|
|
4157
|
+
readonly beak: "wave-info-button__beak";
|
|
4158
|
+
};
|
|
4159
|
+
|
|
4160
|
+
/** Properties for the InfoButton component. */
|
|
4161
|
+
export declare interface InfoButtonProps extends Omit<React_2.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
4162
|
+
/**
|
|
4163
|
+
* The information the note shows: text, links or other content. It also describes the button
|
|
4164
|
+
* (`aria-describedby`), from the server HTML on. It is rendered once: next to the button, not
|
|
4165
|
+
* displayed, while the note is closed, and inside the note while it is shown.
|
|
4166
|
+
*/
|
|
4167
|
+
info: React_2.ReactNode;
|
|
4168
|
+
/**
|
|
4169
|
+
* Size of the glyph: 12, 16 or 20px. The button box stays 24×24px at every size, with negative
|
|
4170
|
+
* margins above and below, so it never makes a row that centres its items (as InfoLabel does)
|
|
4171
|
+
* taller.
|
|
4172
|
+
* @default 'medium'
|
|
4173
|
+
*/
|
|
4174
|
+
size?: CoreSize;
|
|
4175
|
+
/**
|
|
4176
|
+
* Open the note when a mouse pointer rests on the button (after 250 ms; it closes 250 ms after
|
|
4177
|
+
* the pointer has left the button and the note, touch and pen never hover), and when the button
|
|
4178
|
+
* receives keyboard focus. `false` opens it only on a click, and so on Enter and Space (Fluent's
|
|
4179
|
+
* InfoButton opens on click only). A click always toggles the note: it pins a note that hover or
|
|
4180
|
+
* keyboard focus opened, and closes a pinned one.
|
|
4181
|
+
* @default true
|
|
4182
|
+
*/
|
|
4183
|
+
openOnHover?: boolean;
|
|
4184
|
+
/**
|
|
4185
|
+
* Accessible name of the button, and of the note, which is labelled like the button. Localize it
|
|
4186
|
+
* here. With `aria-labelledby` listing the id of your text and the button's own `id`, the name is
|
|
4187
|
+
* your text followed by this one ("Billing Information").
|
|
4188
|
+
* @default 'Information'
|
|
4189
|
+
*/
|
|
4190
|
+
'aria-label'?: string;
|
|
4191
|
+
/** Ref to the button. */
|
|
4192
|
+
ref?: React_2.Ref<HTMLButtonElement>;
|
|
4193
|
+
}
|
|
4194
|
+
|
|
4195
|
+
/**
|
|
4196
|
+
* A label followed by a button that reveals more information about it (Fluent's InfoLabel): the
|
|
4197
|
+
* label renders in a real `<label htmlFor>`, and the button shows `info` — text, links or other
|
|
4198
|
+
* rich content — in a note next to it, rendered once whether the note is open or closed (see
|
|
4199
|
+
* `InfoButton`, which owns that note and its opening, closing and Tab order).
|
|
4200
|
+
*
|
|
4201
|
+
* - `children` is the label content; `label` is a deprecated alias (a warning fires once, and
|
|
4202
|
+
* `children` wins when both are given).
|
|
4203
|
+
* - `htmlFor`, `required`, `size`, `weight` and `disabled` route to the `<label>`; `disabled` dims
|
|
4204
|
+
* only the label text, and the info button stays usable.
|
|
4205
|
+
* - The button is named "‹label text› ‹infoButtonLabel›" through `aria-labelledby`, which points
|
|
4206
|
+
* at the `<label>` and at the button's own id (whose `aria-label` supplies the second half), so
|
|
4207
|
+
* several InfoLabels on a page are told apart; `infoButtonLabel` localizes that second half.
|
|
4208
|
+
* `openOnHover` and `size` reach the button too.
|
|
4209
|
+
* - No `controlRef`: InfoLabel is a label, not a form control, so C-ROUTING's composite-control
|
|
4210
|
+
* routing does not apply to it; a layout that needs the button's own element renders `InfoButton`
|
|
4211
|
+
* next to a `Label` instead.
|
|
3166
4212
|
*
|
|
3167
4213
|
* @example
|
|
3168
|
-
* <InfoLabel
|
|
4214
|
+
* <InfoLabel info="Use at least 8 characters.">Password</InfoLabel>
|
|
3169
4215
|
*/
|
|
3170
4216
|
export declare const InfoLabel: {
|
|
3171
|
-
({ label, info, infoButtonLabel, className, ref, ...
|
|
4217
|
+
({ children, label, info, infoButtonLabel, openOnHover, id, htmlFor, required, size, weight, disabled, className, ref, ...rest }: InfoLabelProps): React_2.JSX.Element;
|
|
3172
4218
|
displayName: string;
|
|
3173
4219
|
};
|
|
3174
4220
|
|
|
4221
|
+
/**
|
|
4222
|
+
* InfoLabel: `root` on the outer span; `label` on its Label (which also carries Label's root);
|
|
4223
|
+
* `infoButton` on its InfoButton (which also carries InfoButton's root); `info` on the popup, the
|
|
4224
|
+
* InfoButton's note (which also carries InfoButton's `info`).
|
|
4225
|
+
*/
|
|
4226
|
+
export declare const infoLabelClassNames: {
|
|
4227
|
+
readonly root: "wave-info-label";
|
|
4228
|
+
readonly label: "wave-info-label__label";
|
|
4229
|
+
readonly infoButton: "wave-info-label__info-button";
|
|
4230
|
+
readonly info: "wave-info-label__info";
|
|
4231
|
+
};
|
|
4232
|
+
|
|
3175
4233
|
/** Properties for the InfoLabel component. */
|
|
3176
|
-
export declare interface InfoLabelProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
3177
|
-
/**
|
|
3178
|
-
|
|
4234
|
+
export declare interface InfoLabelProps extends Omit<React_2.HTMLAttributes<HTMLSpanElement>, 'children'>, Pick<LabelProps, 'htmlFor' | 'required' | 'size' | 'weight' | 'disabled'> {
|
|
4235
|
+
/** The label content (Fluent's `children`). */
|
|
4236
|
+
children?: React_2.ReactNode;
|
|
3179
4237
|
/**
|
|
3180
|
-
*
|
|
3181
|
-
*
|
|
3182
|
-
* keyboard focus or click.
|
|
4238
|
+
* The label content.
|
|
4239
|
+
* @deprecated Use `children`.
|
|
3183
4240
|
*/
|
|
3184
|
-
|
|
4241
|
+
label?: React_2.ReactNode;
|
|
4242
|
+
/** The information the info button's note shows: text, links or other rich content. */
|
|
4243
|
+
info: React_2.ReactNode;
|
|
3185
4244
|
/**
|
|
3186
|
-
* Accessible name of the info button
|
|
4245
|
+
* Accessible name of the info button: the second half of its name, after the label text
|
|
4246
|
+
* ("Password Information"). Localize it here.
|
|
3187
4247
|
* @default 'Information'
|
|
3188
4248
|
*/
|
|
3189
4249
|
infoButtonLabel?: string;
|
|
4250
|
+
/**
|
|
4251
|
+
* Opens the note on a mouse hover, after a short delay, and on keyboard focus, next to a click
|
|
4252
|
+
* (see `InfoButton`'s `openOnHover`, which this passes through unchanged).
|
|
4253
|
+
* @default true
|
|
4254
|
+
*/
|
|
4255
|
+
openOnHover?: boolean;
|
|
3190
4256
|
/** Ref to the root `<span>`. */
|
|
3191
4257
|
ref?: React_2.Ref<HTMLSpanElement>;
|
|
3192
4258
|
}
|
|
@@ -3197,6 +4263,12 @@ export declare interface InfoLabelProps extends React_2.HTMLAttributes<HTMLSpanE
|
|
|
3197
4263
|
* optional error message. Inside a `Field` it picks up the label, hint, error, `required` (native
|
|
3198
4264
|
* attribute) and invalid state automatically.
|
|
3199
4265
|
*
|
|
4266
|
+
* `size` resolves from its own prop, then the surrounding `Field`'s `size`, then
|
|
4267
|
+
* `WaveProvider inputDefaults.size`, else `'medium'`; `appearance` from its own prop, then
|
|
4268
|
+
* `WaveProvider inputDefaults.appearance`, else `'outline'`; both render as `data-size` and
|
|
4269
|
+
* `data-appearance` on the element that draws the field (the `<input>`, or the wrapper with slot
|
|
4270
|
+
* content).
|
|
4271
|
+
*
|
|
3200
4272
|
* Every prop reaches the `<input>`, except with slot content: then a bordered `<span>` wrapper
|
|
3201
4273
|
* draws the field and receives `className`, `style` and `hidden` (`ref` stays on the input).
|
|
3202
4274
|
*
|
|
@@ -3206,10 +4278,38 @@ export declare interface InfoLabelProps extends React_2.HTMLAttributes<HTMLSpanE
|
|
|
3206
4278
|
* </Field>
|
|
3207
4279
|
*/
|
|
3208
4280
|
export declare const Input: {
|
|
3209
|
-
({ error, errorMessageProps, contentBefore, contentAfter, onChange, onValueChange, className, ref, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, required, ...props }: InputProps): React_2.JSX.Element;
|
|
4281
|
+
({ error, errorMessageProps, size: sizeProp, htmlSize, appearance: appearanceProp, contentBefore, contentAfter, onChange, onValueChange, className, ref, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, required, ...props }: InputProps): React_2.JSX.Element;
|
|
3210
4282
|
displayName: string;
|
|
3211
4283
|
};
|
|
3212
4284
|
|
|
4285
|
+
/**
|
|
4286
|
+
* Look of a text input or picker: `outline` (a full border), `underline` (a bottom stroke only),
|
|
4287
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke).
|
|
4288
|
+
*/
|
|
4289
|
+
export declare type InputAppearance = 'outline' | 'underline' | 'filled-darker' | 'filled-lighter';
|
|
4290
|
+
|
|
4291
|
+
/**
|
|
4292
|
+
* Input: `root` on the `<input>`, or, with `contentBefore` or `contentAfter` content, on the
|
|
4293
|
+
* wrapper that draws the field; `input` on the `<input>` (also when it is the root);
|
|
4294
|
+
* `contentBefore` and `contentAfter` on the slot spans; `errorMessage` on the `role="alert"`
|
|
4295
|
+
* message after the control.
|
|
4296
|
+
*/
|
|
4297
|
+
export declare const inputClassNames: {
|
|
4298
|
+
readonly root: "wave-input";
|
|
4299
|
+
readonly input: "wave-input__input";
|
|
4300
|
+
readonly contentBefore: "wave-input__content-before";
|
|
4301
|
+
readonly contentAfter: "wave-input__content-after";
|
|
4302
|
+
readonly errorMessage: "wave-input__error-message";
|
|
4303
|
+
};
|
|
4304
|
+
|
|
4305
|
+
/** Default size and appearance of the text inputs and pickers in a subtree. */
|
|
4306
|
+
export declare interface InputDefaults {
|
|
4307
|
+
/** Default `size` of Input, Textarea, Select, SearchBox, SpinButton and the pickers. */
|
|
4308
|
+
size?: CoreSize;
|
|
4309
|
+
/** Default `appearance` of the same controls. */
|
|
4310
|
+
appearance?: InputAppearance;
|
|
4311
|
+
}
|
|
4312
|
+
|
|
3213
4313
|
/**
|
|
3214
4314
|
* Props of the error message element that {@link Input}, `Select` and `Textarea` render after the
|
|
3215
4315
|
* control for a string `error` (`id`, `className`, `role`, data attributes, …).
|
|
@@ -3222,7 +4322,7 @@ export declare interface InputErrorMessageProps extends React_2.HTMLAttributes<H
|
|
|
3222
4322
|
}
|
|
3223
4323
|
|
|
3224
4324
|
/** Properties for the Input component. */
|
|
3225
|
-
export declare interface InputProps extends React_2.InputHTMLAttributes<HTMLInputElement> {
|
|
4325
|
+
export declare interface InputProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3226
4326
|
/**
|
|
3227
4327
|
* Validation error.
|
|
3228
4328
|
* - A non-empty string renders the message in a `role="alert"` element **after** the field (a
|
|
@@ -3240,6 +4340,24 @@ export declare interface InputProps extends React_2.InputHTMLAttributes<HTMLInpu
|
|
|
3240
4340
|
error?: string | boolean;
|
|
3241
4341
|
/** Props of the error message element (`id`, `className`, …) rendered for a string `error`. */
|
|
3242
4342
|
errorMessageProps?: InputErrorMessageProps;
|
|
4343
|
+
/**
|
|
4344
|
+
* Size of the field: `small` (24px tall), `medium` (32px) or `large` (40px). Default: the
|
|
4345
|
+
* surrounding Field's `size`, else `WaveProvider inputDefaults.size`, else `'medium'`.
|
|
4346
|
+
*
|
|
4347
|
+
* A number is the native `size` attribute (the visible width in characters), as in 0.8: it
|
|
4348
|
+
* still renders, warns once in development and is removed in 1.0. Use `htmlSize` for it.
|
|
4349
|
+
* A string of digits only (`size="20"` from untyped code) counts as that number. Any other value
|
|
4350
|
+
* outside the three sizes renders as if `size` were not set.
|
|
4351
|
+
*/
|
|
4352
|
+
size?: CoreSize | number;
|
|
4353
|
+
/** The native `size` attribute: the visible width of the field in characters. */
|
|
4354
|
+
htmlSize?: number;
|
|
4355
|
+
/**
|
|
4356
|
+
* Look of the field: `outline` (a full border), `underline` (a bottom stroke only),
|
|
4357
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke: give the field a visible
|
|
4358
|
+
* label). Default: `WaveProvider inputDefaults.appearance`, else `'outline'`.
|
|
4359
|
+
*/
|
|
4360
|
+
appearance?: InputAppearance;
|
|
3243
4361
|
/**
|
|
3244
4362
|
* Slot rendered before the input text (e.g., an icon). With content in either slot, a bordered
|
|
3245
4363
|
* `<span>` around the input draws the field: it receives `className`, `style` and `hidden`,
|
|
@@ -3260,7 +4378,7 @@ export declare interface InputProps extends React_2.InputHTMLAttributes<HTMLInpu
|
|
|
3260
4378
|
|
|
3261
4379
|
/**
|
|
3262
4380
|
* A text label for a form control (`htmlFor`), on the Fluent type ramp. The optional required
|
|
3263
|
-
*
|
|
4381
|
+
* indicator is decorative (`aria-hidden`). `Field` renders its own label; use `Label` for custom
|
|
3264
4382
|
* layouts.
|
|
3265
4383
|
*
|
|
3266
4384
|
* @example
|
|
@@ -3272,6 +4390,12 @@ export declare const Label: {
|
|
|
3272
4390
|
displayName: string;
|
|
3273
4391
|
};
|
|
3274
4392
|
|
|
4393
|
+
/** Label: `root` on the `<label>`; `required` on the asterisk. */
|
|
4394
|
+
export declare const labelClassNames: {
|
|
4395
|
+
readonly root: "wave-label";
|
|
4396
|
+
readonly required: "wave-label__required";
|
|
4397
|
+
};
|
|
4398
|
+
|
|
3275
4399
|
/**
|
|
3276
4400
|
* Where a label renders relative to its control or indicator. Components accept a subset,
|
|
3277
4401
|
* derived with `Extract<LabelPosition, …>` (never `Exclude<>`, so a later value does not widen
|
|
@@ -3281,11 +4405,12 @@ export declare type LabelPosition = 'before' | 'after' | 'above' | 'below';
|
|
|
3281
4405
|
|
|
3282
4406
|
/** Properties for the Label component. */
|
|
3283
4407
|
export declare interface LabelProps extends React_2.LabelHTMLAttributes<HTMLLabelElement> {
|
|
3284
|
-
/** Whether to show a required indicator
|
|
3285
|
-
*
|
|
4408
|
+
/** Whether to show a required indicator. `true` shows a decorative asterisk; other content
|
|
4409
|
+
* replaces it (for example a `(required)` text). Decorative (`aria-hidden`), so it must not be
|
|
4410
|
+
* focusable; mark the control itself `required`.
|
|
3286
4411
|
* @default false
|
|
3287
4412
|
*/
|
|
3288
|
-
required?: boolean;
|
|
4413
|
+
required?: boolean | React_2.ReactNode;
|
|
3289
4414
|
/** Whether the label is visually dimmed.
|
|
3290
4415
|
* @default false
|
|
3291
4416
|
*/
|
|
@@ -3293,7 +4418,7 @@ export declare interface LabelProps extends React_2.LabelHTMLAttributes<HTMLLabe
|
|
|
3293
4418
|
/** Text size of the label: `small` = caption-1, `medium` = body-1, `large` = body-2.
|
|
3294
4419
|
* @default 'medium'
|
|
3295
4420
|
*/
|
|
3296
|
-
size?:
|
|
4421
|
+
size?: CoreSize;
|
|
3297
4422
|
/** Font weight of the label (the shared `TextWeight` vocabulary).
|
|
3298
4423
|
* @default 'regular'
|
|
3299
4424
|
*/
|
|
@@ -3330,6 +4455,11 @@ export declare const Link: PolymorphicComponent<'a', LinkOwnProps>;
|
|
|
3330
4455
|
*/
|
|
3331
4456
|
export declare type LinkAppearance = 'inline' | 'standalone' | 'subtle';
|
|
3332
4457
|
|
|
4458
|
+
/** Link: `root` on the rendered element (`<a>`, or your `as`). */
|
|
4459
|
+
export declare const linkClassNames: {
|
|
4460
|
+
readonly root: "wave-link";
|
|
4461
|
+
};
|
|
4462
|
+
|
|
3333
4463
|
/**
|
|
3334
4464
|
* The Link's own props (the XOwnProps rule of `PolymorphicProps`: component-specific props only).
|
|
3335
4465
|
* Every other prop comes from the rendered element (`as`, default `'a'`).
|
|
@@ -3421,6 +4551,11 @@ export declare const List: {
|
|
|
3421
4551
|
};
|
|
3422
4552
|
};
|
|
3423
4553
|
|
|
4554
|
+
/** List: `root` on the `<ul>` (the `role="grid"` element of a selectable list with actions). */
|
|
4555
|
+
export declare const listClassNames: {
|
|
4556
|
+
readonly root: "wave-list";
|
|
4557
|
+
};
|
|
4558
|
+
|
|
3424
4559
|
/**
|
|
3425
4560
|
* An item of a {@link List} (also available as `List.Item`). Renders an `<li>` (`listitem`, or
|
|
3426
4561
|
* `option` in a selectable list), or a `<div role="row">` in a selectable list with actions. In a
|
|
@@ -3435,6 +4570,16 @@ export declare const ListItem: {
|
|
|
3435
4570
|
displayName: string;
|
|
3436
4571
|
};
|
|
3437
4572
|
|
|
4573
|
+
/**
|
|
4574
|
+
* List.Item: `root` on the `<li>` (the `role="row"` element of a list with actions); `content` on
|
|
4575
|
+
* the content element; `action` on the action cell.
|
|
4576
|
+
*/
|
|
4577
|
+
export declare const listItemClassNames: {
|
|
4578
|
+
readonly root: "wave-list-item";
|
|
4579
|
+
readonly content: "wave-list-item__content";
|
|
4580
|
+
readonly action: "wave-list-item__action";
|
|
4581
|
+
};
|
|
4582
|
+
|
|
3438
4583
|
/** Properties for the ListItem component. */
|
|
3439
4584
|
export declare interface ListItemProps extends React_2.HTMLAttributes<HTMLLIElement> {
|
|
3440
4585
|
/**
|
|
@@ -3596,7 +4741,7 @@ export declare const Menu: {
|
|
|
3596
4741
|
};
|
|
3597
4742
|
ItemLink: PolymorphicComponent<"a", MenuItemLinkOwnProps>;
|
|
3598
4743
|
Group: {
|
|
3599
|
-
({ children, ref, ...rest }: MenuGroupProps): JSX.Element;
|
|
4744
|
+
({ children, className, ref, ...rest }: MenuGroupProps): JSX.Element;
|
|
3600
4745
|
displayName: string;
|
|
3601
4746
|
};
|
|
3602
4747
|
GroupHeader: {
|
|
@@ -3631,6 +4776,17 @@ export declare const MenuButton: {
|
|
|
3631
4776
|
displayName: string;
|
|
3632
4777
|
};
|
|
3633
4778
|
|
|
4779
|
+
/**
|
|
4780
|
+
* MenuButton (also carries Button's root and icon classes): `root` on the `<button>`; `icon` on
|
|
4781
|
+
* Button's icon span; `menuIcon` on the default chevron `<svg>`, or on the span of your
|
|
4782
|
+
* `menuIcon`.
|
|
4783
|
+
*/
|
|
4784
|
+
export declare const menuButtonClassNames: {
|
|
4785
|
+
readonly root: "wave-menu-button";
|
|
4786
|
+
readonly icon: "wave-menu-button__icon";
|
|
4787
|
+
readonly menuIcon: "wave-menu-button__menu-icon";
|
|
4788
|
+
};
|
|
4789
|
+
|
|
3634
4790
|
/** Properties for the MenuButton component. */
|
|
3635
4791
|
export declare interface MenuButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3636
4792
|
/** Visual style variant.
|
|
@@ -3676,6 +4832,11 @@ export declare interface MenuButtonProps extends React_2.ButtonHTMLAttributes<HT
|
|
|
3676
4832
|
ref?: React_2.Ref<HTMLButtonElement>;
|
|
3677
4833
|
}
|
|
3678
4834
|
|
|
4835
|
+
/** Menu: `root` on the `role="menu"` element of a static menu (a popup menu has Menu.Popover's). */
|
|
4836
|
+
export declare const menuClassNames: {
|
|
4837
|
+
readonly root: "wave-menu";
|
|
4838
|
+
};
|
|
4839
|
+
|
|
3679
4840
|
/**
|
|
3680
4841
|
* A separator between groups of menu items (`role="separator"`).
|
|
3681
4842
|
*
|
|
@@ -3686,6 +4847,11 @@ export declare const MenuDivider: {
|
|
|
3686
4847
|
displayName: string;
|
|
3687
4848
|
};
|
|
3688
4849
|
|
|
4850
|
+
/** Menu.Divider: `root` on the `role="separator"` element. */
|
|
4851
|
+
export declare const menuDividerClassNames: {
|
|
4852
|
+
readonly root: "wave-menu-divider";
|
|
4853
|
+
};
|
|
4854
|
+
|
|
3689
4855
|
/** Properties for the MenuDivider sub-component. */
|
|
3690
4856
|
export declare interface MenuDividerProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
3691
4857
|
/** Ref to the `role="separator"` element. */
|
|
@@ -3705,10 +4871,15 @@ export declare interface MenuDividerProps extends React_2.HTMLAttributes<HTMLDiv
|
|
|
3705
4871
|
* Also exported as `MenuGroup` (import the flat name from React Server Components).
|
|
3706
4872
|
*/
|
|
3707
4873
|
export declare const MenuGroup: {
|
|
3708
|
-
({ children, ref, ...rest }: MenuGroupProps): React_2.JSX.Element;
|
|
4874
|
+
({ children, className, ref, ...rest }: MenuGroupProps): React_2.JSX.Element;
|
|
3709
4875
|
displayName: string;
|
|
3710
4876
|
};
|
|
3711
4877
|
|
|
4878
|
+
/** Menu.Group: `root` on the `role="group"` element. */
|
|
4879
|
+
export declare const menuGroupClassNames: {
|
|
4880
|
+
readonly root: "wave-menu-group";
|
|
4881
|
+
};
|
|
4882
|
+
|
|
3712
4883
|
/**
|
|
3713
4884
|
* The visible heading of a `Menu.Group`. It is not a menu item: arrow keys and typeahead skip it.
|
|
3714
4885
|
* Its text lines up with the item labels (it keeps the menu's check and icon columns). It labels
|
|
@@ -3723,6 +4894,11 @@ export declare const MenuGroupHeader: {
|
|
|
3723
4894
|
displayName: string;
|
|
3724
4895
|
};
|
|
3725
4896
|
|
|
4897
|
+
/** Menu.GroupHeader: `root` on the header element. */
|
|
4898
|
+
export declare const menuGroupHeaderClassNames: {
|
|
4899
|
+
readonly root: "wave-menu-group-header";
|
|
4900
|
+
};
|
|
4901
|
+
|
|
3726
4902
|
/** Properties for the MenuGroupHeader sub-component. */
|
|
3727
4903
|
export declare interface MenuGroupHeaderProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
3728
4904
|
/** Ref to the header element. */
|
|
@@ -3781,6 +4957,19 @@ export declare const MenuItemCheckbox: {
|
|
|
3781
4957
|
displayName: string;
|
|
3782
4958
|
};
|
|
3783
4959
|
|
|
4960
|
+
/**
|
|
4961
|
+
* Menu.ItemCheckbox (also carries Menu.Item's root and matching part classes): `root` on the
|
|
4962
|
+
* `role="menuitemcheckbox"` element; `checkmark`, `icon`, `content` and `shortcut` as on
|
|
4963
|
+
* Menu.Item.
|
|
4964
|
+
*/
|
|
4965
|
+
export declare const menuItemCheckboxClassNames: {
|
|
4966
|
+
readonly root: "wave-menu-item-checkbox";
|
|
4967
|
+
readonly checkmark: "wave-menu-item-checkbox__checkmark";
|
|
4968
|
+
readonly icon: "wave-menu-item-checkbox__icon";
|
|
4969
|
+
readonly content: "wave-menu-item-checkbox__content";
|
|
4970
|
+
readonly shortcut: "wave-menu-item-checkbox__shortcut";
|
|
4971
|
+
};
|
|
4972
|
+
|
|
3784
4973
|
/** Properties for the MenuItemCheckbox sub-component. */
|
|
3785
4974
|
export declare interface MenuItemCheckboxProps extends MenuItemProps, MenuItemSelectableProps {
|
|
3786
4975
|
/**
|
|
@@ -3791,6 +4980,20 @@ export declare interface MenuItemCheckboxProps extends MenuItemProps, MenuItemSe
|
|
|
3791
4980
|
checkmark?: Slot<'span'>;
|
|
3792
4981
|
}
|
|
3793
4982
|
|
|
4983
|
+
/**
|
|
4984
|
+
* Menu.Item: `root` on the `role="menuitem"` element; `checkmark` on the check column; `icon` on
|
|
4985
|
+
* the icon span; `content` on the label span; `shortcut` on the shortcut span;
|
|
4986
|
+
* `submenuIndicator` on the chevron `<svg>` of a submenu trigger.
|
|
4987
|
+
*/
|
|
4988
|
+
export declare const menuItemClassNames: {
|
|
4989
|
+
readonly root: "wave-menu-item";
|
|
4990
|
+
readonly checkmark: "wave-menu-item__checkmark";
|
|
4991
|
+
readonly icon: "wave-menu-item__icon";
|
|
4992
|
+
readonly content: "wave-menu-item__content";
|
|
4993
|
+
readonly shortcut: "wave-menu-item__shortcut";
|
|
4994
|
+
readonly submenuIndicator: "wave-menu-item__submenu-indicator";
|
|
4995
|
+
};
|
|
4996
|
+
|
|
3794
4997
|
/**
|
|
3795
4998
|
* A menu item that navigates (`role="menuitem"` on the link element). Enter follows the link the
|
|
3796
4999
|
* way the browser does (Shift+Enter, Ctrl+Enter and Cmd+Enter open a new window or tab), Space
|
|
@@ -3811,6 +5014,17 @@ export declare interface MenuItemCheckboxProps extends MenuItemProps, MenuItemSe
|
|
|
3811
5014
|
*/
|
|
3812
5015
|
export declare const MenuItemLink: PolymorphicComponent<'a', MenuItemLinkOwnProps>;
|
|
3813
5016
|
|
|
5017
|
+
/**
|
|
5018
|
+
* Menu.ItemLink (also carries Menu.Item's root and matching part classes): `root` on the
|
|
5019
|
+
* `role="menuitem"` link (`<a>`, or your `as`); `icon`, `content` and `shortcut` as on Menu.Item.
|
|
5020
|
+
*/
|
|
5021
|
+
export declare const menuItemLinkClassNames: {
|
|
5022
|
+
readonly root: "wave-menu-item-link";
|
|
5023
|
+
readonly icon: "wave-menu-item-link__icon";
|
|
5024
|
+
readonly content: "wave-menu-item-link__content";
|
|
5025
|
+
readonly shortcut: "wave-menu-item-link__shortcut";
|
|
5026
|
+
};
|
|
5027
|
+
|
|
3814
5028
|
/** The MenuItemLink's own props (the XOwnProps rule: component-specific props only). */
|
|
3815
5029
|
export declare interface MenuItemLinkOwnProps {
|
|
3816
5030
|
/** Icon before the label (decorative); the rules of `Menu.Item.icon`. */
|
|
@@ -3884,6 +5098,18 @@ export declare const MenuItemRadio: {
|
|
|
3884
5098
|
displayName: string;
|
|
3885
5099
|
};
|
|
3886
5100
|
|
|
5101
|
+
/**
|
|
5102
|
+
* Menu.ItemRadio (also carries Menu.Item's root and matching part classes): `root` on the
|
|
5103
|
+
* `role="menuitemradio"` element; `checkmark`, `icon`, `content` and `shortcut` as on Menu.Item.
|
|
5104
|
+
*/
|
|
5105
|
+
export declare const menuItemRadioClassNames: {
|
|
5106
|
+
readonly root: "wave-menu-item-radio";
|
|
5107
|
+
readonly checkmark: "wave-menu-item-radio__checkmark";
|
|
5108
|
+
readonly icon: "wave-menu-item-radio__icon";
|
|
5109
|
+
readonly content: "wave-menu-item-radio__content";
|
|
5110
|
+
readonly shortcut: "wave-menu-item-radio__shortcut";
|
|
5111
|
+
};
|
|
5112
|
+
|
|
3887
5113
|
/** Properties for the MenuItemRadio sub-component. */
|
|
3888
5114
|
export declare interface MenuItemRadioProps extends MenuItemProps, MenuItemSelectableProps {
|
|
3889
5115
|
/** As `MenuItemCheckbox.checkmark`. */
|
|
@@ -3912,6 +5138,20 @@ export declare const MenuItemSwitch: {
|
|
|
3912
5138
|
displayName: string;
|
|
3913
5139
|
};
|
|
3914
5140
|
|
|
5141
|
+
/**
|
|
5142
|
+
* Menu.ItemSwitch (also carries Menu.Item's root, `icon`, `content` and `shortcut` classes):
|
|
5143
|
+
* `root` on the `role="menuitemcheckbox"` element; `icon`, `content` and `shortcut` as on
|
|
5144
|
+
* Menu.Item; `track` on the switch; `thumb` on its thumb.
|
|
5145
|
+
*/
|
|
5146
|
+
export declare const menuItemSwitchClassNames: {
|
|
5147
|
+
readonly root: "wave-menu-item-switch";
|
|
5148
|
+
readonly icon: "wave-menu-item-switch__icon";
|
|
5149
|
+
readonly content: "wave-menu-item-switch__content";
|
|
5150
|
+
readonly shortcut: "wave-menu-item-switch__shortcut";
|
|
5151
|
+
readonly track: "wave-menu-item-switch__track";
|
|
5152
|
+
readonly thumb: "wave-menu-item-switch__thumb";
|
|
5153
|
+
};
|
|
5154
|
+
|
|
3915
5155
|
/** Properties for the MenuItemSwitch sub-component. */
|
|
3916
5156
|
export declare interface MenuItemSwitchProps extends MenuItemProps, MenuItemSelectableProps {
|
|
3917
5157
|
}
|
|
@@ -3959,6 +5199,11 @@ export declare const MenuPopover: {
|
|
|
3959
5199
|
displayName: string;
|
|
3960
5200
|
};
|
|
3961
5201
|
|
|
5202
|
+
/** Menu.Popover: `root` on the portaled `role="menu"` element. */
|
|
5203
|
+
export declare const menuPopoverClassNames: {
|
|
5204
|
+
readonly root: "wave-menu-popover";
|
|
5205
|
+
};
|
|
5206
|
+
|
|
3962
5207
|
/** Properties for the MenuPopover sub-component. */
|
|
3963
5208
|
export declare interface MenuPopoverProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'id'> {
|
|
3964
5209
|
/**
|
|
@@ -4111,6 +5356,11 @@ export declare const MenuSplitGroup: {
|
|
|
4111
5356
|
displayName: string;
|
|
4112
5357
|
};
|
|
4113
5358
|
|
|
5359
|
+
/** Menu.SplitGroup: `root` on the `role="group"` element. */
|
|
5360
|
+
export declare const menuSplitGroupClassNames: {
|
|
5361
|
+
readonly root: "wave-menu-split-group";
|
|
5362
|
+
};
|
|
5363
|
+
|
|
4114
5364
|
/** Properties for the MenuSplitGroup sub-component. */
|
|
4115
5365
|
export declare interface MenuSplitGroupProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
4116
5366
|
/**
|
|
@@ -4249,24 +5499,85 @@ export declare function mergeRefs<T>(...refs: Array<React_2.Ref<T> | undefined |
|
|
|
4249
5499
|
|
|
4250
5500
|
/**
|
|
4251
5501
|
* An inline message that tells the user about the state of a page or task: a status icon, a
|
|
4252
|
-
* visually hidden status label ("Warning:"), the message
|
|
5502
|
+
* visually hidden status label ("Warning:"), an optional title, the message, optional actions and
|
|
5503
|
+
* an optional dismiss button.
|
|
4253
5504
|
*
|
|
4254
5505
|
* - The status sets the tint, the logical start border, the icon and the role (`alert` for
|
|
4255
5506
|
* `warning`/`error`, `status` otherwise). Screen readers hear the severity through `statusLabel`.
|
|
5507
|
+
* - Parts, as direct children: `MessageBar.Title` (a semibold lead-in, read first after the
|
|
5508
|
+
* severity) and `MessageBar.Actions` (buttons after the text on one row, or below it with
|
|
5509
|
+
* `layout="multiline"`). The built-in Dismiss button stays the bar's own.
|
|
5510
|
+
* - With its default roles the bar is a live region and the title is read as the start of its
|
|
5511
|
+
* content; give the bar `role="region"` (a notice that stays on the page) and the title names it.
|
|
4256
5512
|
* - The dismiss button is always the MessageBar's own `<button>` wired to `onDismiss`
|
|
4257
5513
|
* (`type="button"` unless a merged button slot sets its own `type`); the `dismiss` slot only
|
|
4258
5514
|
* replaces its content (see {@link MessageBarProps.dismiss}).
|
|
4259
5515
|
*
|
|
5516
|
+
* React Server Components cannot dot into a client module: import the flat names
|
|
5517
|
+
* `MessageBarTitle` and `MessageBarActions` there; `MessageBar.Title` and `MessageBar.Actions`
|
|
5518
|
+
* work in client files.
|
|
5519
|
+
*
|
|
4260
5520
|
* @example
|
|
4261
5521
|
* <MessageBar status="warning" onDismiss={() => setVisible(false)}>
|
|
4262
|
-
*
|
|
5522
|
+
* <MessageBar.Title>Update available</MessageBar.Title>
|
|
5523
|
+
* A new version is ready to install.
|
|
5524
|
+
* <MessageBar.Actions>
|
|
5525
|
+
* <Button size="small">Update now</Button>
|
|
5526
|
+
* </MessageBar.Actions>
|
|
4263
5527
|
* </MessageBar>
|
|
4264
5528
|
*/
|
|
4265
5529
|
export declare const MessageBar: {
|
|
4266
|
-
({ status, statusLabel, onDismiss, icon, dismiss, children, className, ref, ...rest }: MessageBarProps): React_2.JSX.Element;
|
|
5530
|
+
({ status, statusLabel, onDismiss, icon, dismiss, layout, children, className, ref, ...rest }: MessageBarProps): React_2.JSX.Element;
|
|
5531
|
+
displayName: string;
|
|
5532
|
+
} & {
|
|
5533
|
+
Title: {
|
|
5534
|
+
({ id, className, children, ref, ...rest }: MessageBarTitleProps): React_2.JSX.Element;
|
|
5535
|
+
displayName: string;
|
|
5536
|
+
};
|
|
5537
|
+
Actions: {
|
|
5538
|
+
({ className, children, ref, ...rest }: MessageBarActionsProps): React_2.JSX.Element;
|
|
5539
|
+
displayName: string;
|
|
5540
|
+
};
|
|
5541
|
+
};
|
|
5542
|
+
|
|
5543
|
+
/**
|
|
5544
|
+
* The bar's actions (Retry, Learn more): after the text on one row, on their own row under it in
|
|
5545
|
+
* the multiline layout. Must be a direct child of MessageBar (a Fragment there counts, and so does
|
|
5546
|
+
* a part written in a Server Component); anywhere else it renders where it is (development
|
|
5547
|
+
* warning). Actions whose children render nothing are left out, so the bar keeps its look without
|
|
5548
|
+
* actions. The actions have no role of their own: the bar is already the grouping.
|
|
5549
|
+
*
|
|
5550
|
+
* Also exported as `MessageBarActions` (import the flat name from React Server Components).
|
|
5551
|
+
*/
|
|
5552
|
+
export declare const MessageBarActions: {
|
|
5553
|
+
({ className, children, ref, ...rest }: MessageBarActionsProps): React_2.JSX.Element;
|
|
4267
5554
|
displayName: string;
|
|
4268
5555
|
};
|
|
4269
5556
|
|
|
5557
|
+
/** MessageBar.Actions: `root` on the element that holds the actions. */
|
|
5558
|
+
export declare const messageBarActionsClassNames: {
|
|
5559
|
+
readonly root: "wave-message-bar-actions";
|
|
5560
|
+
};
|
|
5561
|
+
|
|
5562
|
+
/** Properties for the MessageBarActions sub-component. */
|
|
5563
|
+
export declare interface MessageBarActionsProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
5564
|
+
/** Ref to the element that holds the actions. */
|
|
5565
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
5566
|
+
}
|
|
5567
|
+
|
|
5568
|
+
/**
|
|
5569
|
+
* MessageBar: `root` on the bar; `icon` on the status icon span; `body` on the text column (it
|
|
5570
|
+
* holds `MessageBar.Title`); `dismissButton` on the Dismiss button; `dismissIcon` on the icon
|
|
5571
|
+
* inside it (what `dismiss` renders, a merged Button's icon span, else the default `<svg>`).
|
|
5572
|
+
*/
|
|
5573
|
+
export declare const messageBarClassNames: {
|
|
5574
|
+
readonly root: "wave-message-bar";
|
|
5575
|
+
readonly icon: "wave-message-bar__icon";
|
|
5576
|
+
readonly body: "wave-message-bar__body";
|
|
5577
|
+
readonly dismissButton: "wave-message-bar__dismiss-button";
|
|
5578
|
+
readonly dismissIcon: "wave-message-bar__dismiss-icon";
|
|
5579
|
+
};
|
|
5580
|
+
|
|
4270
5581
|
/** Properties for the MessageBar component. */
|
|
4271
5582
|
export declare interface MessageBarProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
4272
5583
|
/** Status level controlling the color, icon, status text and role of the message bar.
|
|
@@ -4288,7 +5599,8 @@ export declare interface MessageBarProps extends React_2.HTMLAttributes<HTMLDivE
|
|
|
4288
5599
|
onDismiss?: () => void;
|
|
4289
5600
|
/**
|
|
4290
5601
|
* Custom status icon, rendered decoratively (`aria-hidden="true"`, a slot object can override
|
|
4291
|
-
* it) in the status color. `
|
|
5602
|
+
* it) in the status color. Only `undefined` keeps the default status icon; `null`, or anything that
|
|
5603
|
+
* renders nothing (`false`, `''`), shows no icon.
|
|
4292
5604
|
*/
|
|
4293
5605
|
icon?: Slot<'span'>;
|
|
4294
5606
|
/**
|
|
@@ -4331,13 +5643,51 @@ export declare interface MessageBarProps extends React_2.HTMLAttributes<HTMLDivE
|
|
|
4331
5643
|
* `style` are merged the same way, and a Wave Button's own props apply as for the element form.
|
|
4332
5644
|
* Pass icon content instead, e.g. `dismiss={<CloseIcon />}`.
|
|
4333
5645
|
*/
|
|
4334
|
-
dismiss?: Slot<'span'> | SlotObject<'button'>;
|
|
4335
|
-
/**
|
|
5646
|
+
dismiss?: Slot<'span'> | SlotObject<'button'>;
|
|
5647
|
+
/**
|
|
5648
|
+
* How the text and the actions share the bar. `'singleline'`: the actions sit on the text's row
|
|
5649
|
+
* (the text wraps inside its column; it is never cut off). `'multiline'`: the actions get a row of
|
|
5650
|
+
* their own under the text. `'auto'`: the actions stay on the text's row while the text fits on
|
|
5651
|
+
* one line, measured after mount (the server renders one row), and move below it otherwise; a bar
|
|
5652
|
+
* without `MessageBar.Actions` is `'multiline'`, the 0.7 look. The root renders the layout in use
|
|
5653
|
+
* as `data-layout` (`singleline` or `multiline`). Fluent's `layout`.
|
|
5654
|
+
* @default 'auto'
|
|
5655
|
+
*/
|
|
5656
|
+
layout?: 'auto' | 'singleline' | 'multiline';
|
|
5657
|
+
/**
|
|
5658
|
+
* The message: body text, with the parts `MessageBar.Title` and `MessageBar.Actions` as direct
|
|
5659
|
+
* children (see the component docs).
|
|
5660
|
+
*/
|
|
4336
5661
|
children: React_2.ReactNode;
|
|
4337
5662
|
/** Ref to the root `<div>`. */
|
|
4338
5663
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
4339
5664
|
}
|
|
4340
5665
|
|
|
5666
|
+
/**
|
|
5667
|
+
* The bar's title, read right after the severity text. Names the bar when the bar has a non-live
|
|
5668
|
+
* `role` (`region`, `group`). Must be a direct child of MessageBar (a Fragment there counts, and so
|
|
5669
|
+
* does a title written in a Server Component); anywhere else it renders where it is, without its
|
|
5670
|
+
* place or the naming (development warning). Give a bar one title: a second one renders as body
|
|
5671
|
+
* text (development warning). A title whose children render nothing is left out.
|
|
5672
|
+
*
|
|
5673
|
+
* Also exported as `MessageBarTitle` (import the flat name from React Server Components).
|
|
5674
|
+
*/
|
|
5675
|
+
export declare const MessageBarTitle: {
|
|
5676
|
+
({ id, className, children, ref, ...rest }: MessageBarTitleProps): React_2.JSX.Element;
|
|
5677
|
+
displayName: string;
|
|
5678
|
+
};
|
|
5679
|
+
|
|
5680
|
+
/** MessageBar.Title: `root` on the title span. */
|
|
5681
|
+
export declare const messageBarTitleClassNames: {
|
|
5682
|
+
readonly root: "wave-message-bar-title";
|
|
5683
|
+
};
|
|
5684
|
+
|
|
5685
|
+
/** Properties for the MessageBarTitle sub-component. */
|
|
5686
|
+
export declare interface MessageBarTitleProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
5687
|
+
/** Ref to the title `<span>`. */
|
|
5688
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
5689
|
+
}
|
|
5690
|
+
|
|
4341
5691
|
/**
|
|
4342
5692
|
* Why a Dialog or Drawer asks to open or close: `trigger` (its Trigger part), `close` (a
|
|
4343
5693
|
* `.Close` part), `close-button` (the built-in Close button), `escape`, `outside-press` (the
|
|
@@ -4400,6 +5750,20 @@ export declare const NavCategory: {
|
|
|
4400
5750
|
displayName: string;
|
|
4401
5751
|
};
|
|
4402
5752
|
|
|
5753
|
+
/**
|
|
5754
|
+
* Nav.Category: `root` on its `<li>`; `button` on the toggle button; `icon` on the icon span;
|
|
5755
|
+
* `label` on the label span; `expandIcon` on the chevron `<svg>`; `list` on the `<ul>` of its
|
|
5756
|
+
* sub-items.
|
|
5757
|
+
*/
|
|
5758
|
+
export declare const navCategoryClassNames: {
|
|
5759
|
+
readonly root: "wave-nav-category";
|
|
5760
|
+
readonly button: "wave-nav-category__button";
|
|
5761
|
+
readonly icon: "wave-nav-category__icon";
|
|
5762
|
+
readonly label: "wave-nav-category__label";
|
|
5763
|
+
readonly expandIcon: "wave-nav-category__expand-icon";
|
|
5764
|
+
readonly list: "wave-nav-category__list";
|
|
5765
|
+
};
|
|
5766
|
+
|
|
4403
5767
|
/** Properties for the NavCategory sub-component. */
|
|
4404
5768
|
export declare interface NavCategoryProps extends React_2.HTMLAttributes<HTMLLIElement> {
|
|
4405
5769
|
/**
|
|
@@ -4423,6 +5787,12 @@ export declare interface NavCategoryProps extends React_2.HTMLAttributes<HTMLLIE
|
|
|
4423
5787
|
ref?: React_2.Ref<HTMLLIElement>;
|
|
4424
5788
|
}
|
|
4425
5789
|
|
|
5790
|
+
/** Nav: `root` on the `<nav>`; `list` on its `<ul>`. */
|
|
5791
|
+
export declare const navClassNames: {
|
|
5792
|
+
readonly root: "wave-nav";
|
|
5793
|
+
readonly list: "wave-nav__list";
|
|
5794
|
+
};
|
|
5795
|
+
|
|
4426
5796
|
/**
|
|
4427
5797
|
* A top-level navigation entry: a link when `href` is given (anchor props), a button otherwise
|
|
4428
5798
|
* (button props). Clicking selects it (`aria-current="page"`); activating a disabled entry never
|
|
@@ -4475,6 +5845,17 @@ export declare interface NavItemButtonProps extends NavItemOwnProps, NoAnchorOnl
|
|
|
4475
5845
|
ref?: React_2.Ref<HTMLButtonElement>;
|
|
4476
5846
|
}
|
|
4477
5847
|
|
|
5848
|
+
/**
|
|
5849
|
+
* Nav.Item: `root` on the `<a>` (with `href`) or `<button>`; `listItem` on the `<li>` around it;
|
|
5850
|
+
* `icon` on the icon span; `content` on the label span.
|
|
5851
|
+
*/
|
|
5852
|
+
export declare const navItemClassNames: {
|
|
5853
|
+
readonly root: "wave-nav-item";
|
|
5854
|
+
readonly listItem: "wave-nav-item__list-item";
|
|
5855
|
+
readonly icon: "wave-nav-item__icon";
|
|
5856
|
+
readonly content: "wave-nav-item__content";
|
|
5857
|
+
};
|
|
5858
|
+
|
|
4478
5859
|
/**
|
|
4479
5860
|
* Nav.Item with an `href` known only at run time (`string | undefined`): a link when it is a
|
|
4480
5861
|
* string, a button otherwise. Resolved after the button and link signatures.
|
|
@@ -4611,6 +5992,12 @@ export declare interface NavSubItemButtonProps extends NavSubItemOwnProps, NoAnc
|
|
|
4611
5992
|
ref?: React_2.Ref<HTMLButtonElement>;
|
|
4612
5993
|
}
|
|
4613
5994
|
|
|
5995
|
+
/** Nav.SubItem: `root` on the `<a>` or `<button>`; `listItem` on the `<li>` around it. */
|
|
5996
|
+
export declare const navSubItemClassNames: {
|
|
5997
|
+
readonly root: "wave-nav-sub-item";
|
|
5998
|
+
readonly listItem: "wave-nav-sub-item__list-item";
|
|
5999
|
+
};
|
|
6000
|
+
|
|
4614
6001
|
/**
|
|
4615
6002
|
* Nav.SubItem with an `href` known only at run time (`string | undefined`): a link when it is a
|
|
4616
6003
|
* string, a button otherwise. Only the attributes both elements share are accepted, and handlers
|
|
@@ -4691,6 +6078,16 @@ export declare interface OpenChangeDetails<R extends string = string> {
|
|
|
4691
6078
|
declare const Option_2: React_2.NamedExoticComponent<OptionProps>;
|
|
4692
6079
|
export { Option_2 as Option }
|
|
4693
6080
|
|
|
6081
|
+
/**
|
|
6082
|
+
* Option (also Combobox.Option and Dropdown.Option): `root` on the `role="option"` element;
|
|
6083
|
+
* `checkIcon` on the check `<svg>`; `content` on the content span.
|
|
6084
|
+
*/
|
|
6085
|
+
export declare const optionClassNames: {
|
|
6086
|
+
readonly root: "wave-option";
|
|
6087
|
+
readonly checkIcon: "wave-option__check-icon";
|
|
6088
|
+
readonly content: "wave-option__content";
|
|
6089
|
+
};
|
|
6090
|
+
|
|
4694
6091
|
/**
|
|
4695
6092
|
* Groups options under a heading: `<li role="presentation">` with the heading and a
|
|
4696
6093
|
* `<ul role="group" aria-labelledby>` of the options. Hidden while a filter (or their own `hidden`)
|
|
@@ -4698,6 +6095,16 @@ export { Option_2 as Option }
|
|
|
4698
6095
|
*/
|
|
4699
6096
|
export declare const OptionGroup: React_2.FC<OptionGroupProps>;
|
|
4700
6097
|
|
|
6098
|
+
/**
|
|
6099
|
+
* OptionGroup (also Combobox.OptionGroup and Dropdown.OptionGroup): `root` on the group's entry
|
|
6100
|
+
* in the list; `label` on its heading; `list` on the `role="group"` list of its options.
|
|
6101
|
+
*/
|
|
6102
|
+
export declare const optionGroupClassNames: {
|
|
6103
|
+
readonly root: "wave-option-group";
|
|
6104
|
+
readonly label: "wave-option-group__label";
|
|
6105
|
+
readonly list: "wave-option-group__list";
|
|
6106
|
+
};
|
|
6107
|
+
|
|
4701
6108
|
/** Properties for the OptionGroup component used to group options. */
|
|
4702
6109
|
export declare interface OptionGroupProps extends React_2.LiHTMLAttributes<HTMLLIElement> {
|
|
4703
6110
|
/** Heading label for the option group (names the group). */
|
|
@@ -4785,6 +6192,15 @@ export declare const Overflow: {
|
|
|
4785
6192
|
};
|
|
4786
6193
|
};
|
|
4787
6194
|
|
|
6195
|
+
/**
|
|
6196
|
+
* Overflow: `root` on the overflow element; `overflowButton` on the element around what
|
|
6197
|
+
* `overflowButton` renders.
|
|
6198
|
+
*/
|
|
6199
|
+
export declare const overflowClassNames: {
|
|
6200
|
+
readonly root: "wave-overflow";
|
|
6201
|
+
readonly overflowButton: "wave-overflow__overflow-button";
|
|
6202
|
+
};
|
|
6203
|
+
|
|
4788
6204
|
/**
|
|
4789
6205
|
* One entry of an {@link Overflow}. While it does not fit it stays mounted but is hidden
|
|
4790
6206
|
* (`data-overflow-hidden` and an inline `display: none` placed after the consumer's own `style`),
|
|
@@ -4797,6 +6213,11 @@ export declare const OverflowItem: {
|
|
|
4797
6213
|
displayName: string;
|
|
4798
6214
|
};
|
|
4799
6215
|
|
|
6216
|
+
/** Overflow.Item: `root` on the item element. */
|
|
6217
|
+
export declare const overflowItemClassNames: {
|
|
6218
|
+
readonly root: "wave-overflow-item";
|
|
6219
|
+
};
|
|
6220
|
+
|
|
4800
6221
|
/** Properties for the OverflowItem sub-component. */
|
|
4801
6222
|
export declare interface OverflowItemProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
4802
6223
|
/**
|
|
@@ -4843,6 +6264,23 @@ export declare const Pagination: {
|
|
|
4843
6264
|
displayName: string;
|
|
4844
6265
|
};
|
|
4845
6266
|
|
|
6267
|
+
/**
|
|
6268
|
+
* Pagination: `root` on the `<nav>`; `list` on its `<ol>`; `listItem` on each `<li>`;
|
|
6269
|
+
* `firstButton`, `previousButton`, `pageButton`, `nextButton` and `lastButton` on its buttons;
|
|
6270
|
+
* `ellipsis` on each "…" span.
|
|
6271
|
+
*/
|
|
6272
|
+
export declare const paginationClassNames: {
|
|
6273
|
+
readonly root: "wave-pagination";
|
|
6274
|
+
readonly list: "wave-pagination__list";
|
|
6275
|
+
readonly listItem: "wave-pagination__list-item";
|
|
6276
|
+
readonly firstButton: "wave-pagination__first-button";
|
|
6277
|
+
readonly previousButton: "wave-pagination__previous-button";
|
|
6278
|
+
readonly pageButton: "wave-pagination__page-button";
|
|
6279
|
+
readonly nextButton: "wave-pagination__next-button";
|
|
6280
|
+
readonly lastButton: "wave-pagination__last-button";
|
|
6281
|
+
readonly ellipsis: "wave-pagination__ellipsis";
|
|
6282
|
+
};
|
|
6283
|
+
|
|
4846
6284
|
/** The kinds of Pagination buttons, as passed to `getItemAriaLabel`. */
|
|
4847
6285
|
export declare type PaginationItemType = 'first' | 'previous' | 'page' | 'next' | 'last';
|
|
4848
6286
|
|
|
@@ -4927,6 +6365,19 @@ export declare const Persona: {
|
|
|
4927
6365
|
displayName: string;
|
|
4928
6366
|
};
|
|
4929
6367
|
|
|
6368
|
+
/**
|
|
6369
|
+
* Persona: `root` on the persona element; `avatar` on the built-in Avatar (which also carries
|
|
6370
|
+
* Avatar's root and `visual` classes) or on your `avatar` slot; `badge` on the element that
|
|
6371
|
+
* places the badge; `primaryText` on the name; `secondaryText` on the second line.
|
|
6372
|
+
*/
|
|
6373
|
+
export declare const personaClassNames: {
|
|
6374
|
+
readonly root: "wave-persona";
|
|
6375
|
+
readonly avatar: "wave-persona__avatar";
|
|
6376
|
+
readonly badge: "wave-persona__badge";
|
|
6377
|
+
readonly primaryText: "wave-persona__primary-text";
|
|
6378
|
+
readonly secondaryText: "wave-persona__secondary-text";
|
|
6379
|
+
};
|
|
6380
|
+
|
|
4930
6381
|
/** Properties for the Persona component. */
|
|
4931
6382
|
export declare interface PersonaProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
4932
6383
|
/** Display name of the person. */
|
|
@@ -5092,6 +6543,16 @@ export declare const PopoverContent: {
|
|
|
5092
6543
|
displayName: string;
|
|
5093
6544
|
};
|
|
5094
6545
|
|
|
6546
|
+
/**
|
|
6547
|
+
* Popover.Content: `root` on the portaled `role="dialog"` surface; `beak` on the arrow; `title`
|
|
6548
|
+
* on the `<h2>` of `title`.
|
|
6549
|
+
*/
|
|
6550
|
+
export declare const popoverContentClassNames: {
|
|
6551
|
+
readonly root: "wave-popover-content";
|
|
6552
|
+
readonly beak: "wave-popover-content__beak";
|
|
6553
|
+
readonly title: "wave-popover-content__title";
|
|
6554
|
+
};
|
|
6555
|
+
|
|
5095
6556
|
/** Properties for the PopoverContent sub-component. */
|
|
5096
6557
|
export declare interface PopoverContentProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
5097
6558
|
/** Content to render inside the popover. */
|
|
@@ -5326,6 +6787,14 @@ export declare const Portal: {
|
|
|
5326
6787
|
displayName: string;
|
|
5327
6788
|
};
|
|
5328
6789
|
|
|
6790
|
+
/**
|
|
6791
|
+
* Portal: `root` on the portal wrapper (the existing `wave-portal` scope class; the wrapper also
|
|
6792
|
+
* takes your `className`).
|
|
6793
|
+
*/
|
|
6794
|
+
export declare const portalClassNames: {
|
|
6795
|
+
readonly root: "wave-portal";
|
|
6796
|
+
};
|
|
6797
|
+
|
|
5329
6798
|
/** Props accepted by {@link Portal}. */
|
|
5330
6799
|
export declare interface PortalProps {
|
|
5331
6800
|
/** Content rendered into the portal. */
|
|
@@ -5409,6 +6878,12 @@ export declare const PresenceBadge: {
|
|
|
5409
6878
|
displayName: string;
|
|
5410
6879
|
};
|
|
5411
6880
|
|
|
6881
|
+
/** PresenceBadge: `root` on the `role="img"` span; `icon` on the status glyph `<svg>`. */
|
|
6882
|
+
export declare const presenceBadgeClassNames: {
|
|
6883
|
+
readonly root: "wave-presence-badge";
|
|
6884
|
+
readonly icon: "wave-presence-badge__icon";
|
|
6885
|
+
};
|
|
6886
|
+
|
|
5412
6887
|
/** Properties for the PresenceBadge component. */
|
|
5413
6888
|
export declare interface PresenceBadgeProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
5414
6889
|
/** Presence status to display. */
|
|
@@ -5471,6 +6946,16 @@ export declare const ProgressBar: {
|
|
|
5471
6946
|
displayName: string;
|
|
5472
6947
|
};
|
|
5473
6948
|
|
|
6949
|
+
/**
|
|
6950
|
+
* ProgressBar: `root` on the `role="progressbar"` element (the track); `bar` on the fill; `label`
|
|
6951
|
+
* on the label of `showLabel` (a sibling of the root).
|
|
6952
|
+
*/
|
|
6953
|
+
export declare const progressBarClassNames: {
|
|
6954
|
+
readonly root: "wave-progress-bar";
|
|
6955
|
+
readonly bar: "wave-progress-bar__bar";
|
|
6956
|
+
readonly label: "wave-progress-bar__label";
|
|
6957
|
+
};
|
|
6958
|
+
|
|
5474
6959
|
/** Color of a {@link ProgressBar}'s fill. */
|
|
5475
6960
|
export declare type ProgressBarColor = 'brand' | 'success' | 'warning' | 'error';
|
|
5476
6961
|
|
|
@@ -5538,12 +7023,27 @@ export declare const RadioGroup: {
|
|
|
5538
7023
|
Item: typeof RadioItem;
|
|
5539
7024
|
};
|
|
5540
7025
|
|
|
7026
|
+
/** RadioGroup: `root` on the `role="radiogroup"` element. */
|
|
7027
|
+
export declare const radioGroupClassNames: {
|
|
7028
|
+
readonly root: "wave-radio-group";
|
|
7029
|
+
};
|
|
7030
|
+
|
|
5541
7031
|
/**
|
|
5542
7032
|
* Flat name of `RadioGroup.Item` (C-COMPOUND), for React Server Components, which cannot access
|
|
5543
7033
|
* the dotted form. Same component as {@link RadioItem}.
|
|
5544
7034
|
*/
|
|
5545
7035
|
export declare const RadioGroupItem: typeof RadioItem;
|
|
5546
7036
|
|
|
7037
|
+
/**
|
|
7038
|
+
* RadioGroup.Item: `root` on the `<label>` (where `className` lands; `ref` and the other props go
|
|
7039
|
+
* to the radio); `indicator` on the `role="radio"` button; `label` on the label text.
|
|
7040
|
+
*/
|
|
7041
|
+
export declare const radioGroupItemClassNames: {
|
|
7042
|
+
readonly root: "wave-radio-group-item";
|
|
7043
|
+
readonly indicator: "wave-radio-group-item__indicator";
|
|
7044
|
+
readonly label: "wave-radio-group-item__label";
|
|
7045
|
+
};
|
|
7046
|
+
|
|
5547
7047
|
/** Props of {@link RadioGroupItem} (same as {@link RadioItemProps}). */
|
|
5548
7048
|
export declare type RadioGroupItemProps = RadioItemProps;
|
|
5549
7049
|
|
|
@@ -5627,26 +7127,61 @@ export declare interface RadioItemProps extends Omit<React_2.ButtonHTMLAttribute
|
|
|
5627
7127
|
/**
|
|
5628
7128
|
* A star rating input (`role="radiogroup"` of `role="radio"` stars).
|
|
5629
7129
|
*
|
|
5630
|
-
* - One tab stop (the chosen
|
|
5631
|
-
* move focus to the chosen
|
|
5632
|
-
* (Left/Right mirrored under `dir="rtl"`), Home
|
|
5633
|
-
*
|
|
5634
|
-
*
|
|
7130
|
+
* - One tab stop (the radio of the chosen value, else the first). Keys choose relative to the
|
|
7131
|
+
* current rating and move focus to the chosen radio, as in 0.4: Right/Up one `step` more (a
|
|
7132
|
+
* star, or half a star), Left/Down one fewer (Left/Right mirrored under `dir="rtl"`), Home the
|
|
7133
|
+
* smallest value (`step`) and End `max`. From an empty rating, Right/Up/Home choose `step`.
|
|
7134
|
+
* Keys at the ends (and Left/Down while empty) emit nothing.
|
|
7135
|
+
* - The keyboard cannot clear a rating: Left/Down stop at `step` (APG radio group; 0.4 went down
|
|
5635
7136
|
* to 0). Only a controlled `value={0}` (or a form reset while `defaultValue` is 0) clears it.
|
|
7137
|
+
* - `step={0.5}` offers half stars. Each star stays one pointer target, which chooses by the
|
|
7138
|
+
* pointer's position (its half from the inline start, else its full value) and then focuses
|
|
7139
|
+
* the radio it chose; it holds two transparent radios ("2.5 stars", "3 stars") for the
|
|
7140
|
+
* keyboard and screen readers, and draws the focus ring of either. A controlled value between
|
|
7141
|
+
* two steps checks no radio and is drawn as the step below it; the keys move it to the next or
|
|
7142
|
+
* previous step.
|
|
5636
7143
|
* - `onValueChange` (and the deprecated `onChange` alias) fire only when the rating changes, so
|
|
5637
7144
|
* choosing the current star again calls neither.
|
|
5638
|
-
* - Hovering previews a value
|
|
7145
|
+
* - Hovering previews a value (half stars preview by the pointer's position); the preview never
|
|
7146
|
+
* outlives the hover or a disabled state.
|
|
7147
|
+
* - `color` colors the filled stars (`marigold`, the default, `brand` or `neutral`; the root
|
|
7148
|
+
* carries `data-color`); `iconFilled` and `iconOutline` replace the star glyphs, as a pair.
|
|
5639
7149
|
* - Inside a `Field` it is named by the Field label (instead of the default "Rating") and
|
|
5640
|
-
* described by its hint and error. The stars are named "1 star", "2 stars",
|
|
5641
|
-
* localizes these names.
|
|
7150
|
+
* described by its hint and error. The stars are named "1 star", "2 stars", … (and a half value
|
|
7151
|
+
* "2.5 stars"); `labels` localizes these names.
|
|
5642
7152
|
* - With `name` (or `required`) it takes part in native forms; a form reset restores
|
|
5643
7153
|
* `defaultValue`.
|
|
7154
|
+
* - The stars are generated from `max`. Children that render content replace them: one
|
|
7155
|
+
* `Rating.Item` per value from 1 to `max`, chosen, previewed, roved and named as the generated
|
|
7156
|
+
* stars are (`max` still sets the key range and the star names).
|
|
7157
|
+
*
|
|
7158
|
+
* Sub-component: `Rating.Item` (the same component as `RatingDisplay.Item`). React Server
|
|
7159
|
+
* Components import its flat name `RatingItem` (dotted access needs a client file).
|
|
5644
7160
|
*/
|
|
5645
7161
|
export declare const Rating: {
|
|
5646
|
-
({ value: valueProp, defaultValue, onValueChange, onChange, max, size, disabled, name, required, form, labels, className, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, onKeyDown, onFocus, onMouseLeave, ref, ...rest }: RatingProps): React_2.JSX.Element;
|
|
7162
|
+
({ value: valueProp, defaultValue, onValueChange, onChange, max, step: stepProp, size, color, iconFilled, iconOutline, disabled, name, required, form, labels, className, children, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, onKeyDown, onFocus, onMouseLeave, ref, ...rest }: RatingProps): React_2.JSX.Element;
|
|
5647
7163
|
displayName: string;
|
|
7164
|
+
} & {
|
|
7165
|
+
Item: {
|
|
7166
|
+
({ value, iconFilled, iconOutline, className, ref, ...rest }: RatingItemProps): React_2.JSX.Element;
|
|
7167
|
+
displayName: string;
|
|
7168
|
+
};
|
|
7169
|
+
};
|
|
7170
|
+
|
|
7171
|
+
/**
|
|
7172
|
+
* Rating: `root` on the `role="radiogroup"` element; `star` on each star (a RatingItem: the
|
|
7173
|
+
* `role="radio"` button, or with `step={0.5}` the span around its two radios); `icon` on each
|
|
7174
|
+
* star glyph (the default `<svg>`, or the span of your `iconFilled`/`iconOutline`).
|
|
7175
|
+
*/
|
|
7176
|
+
export declare const ratingClassNames: {
|
|
7177
|
+
readonly root: "wave-rating";
|
|
7178
|
+
readonly star: "wave-rating__star";
|
|
7179
|
+
readonly icon: "wave-rating__icon";
|
|
5648
7180
|
};
|
|
5649
7181
|
|
|
7182
|
+
/** Color of a rating's filled stars. */
|
|
7183
|
+
export declare type RatingColor = 'neutral' | 'brand' | 'marigold';
|
|
7184
|
+
|
|
5650
7185
|
/**
|
|
5651
7186
|
* A read-only star rating (`role="img"` named "Rating: <value> out of <max>"). A fractional value
|
|
5652
7187
|
* is drawn with a partly filled star, so the stars and the name show the same value.
|
|
@@ -5656,9 +7191,44 @@ export declare const Rating: {
|
|
|
5656
7191
|
* stars (the root carries `data-compact`). Without them only the stars show.
|
|
5657
7192
|
* - The value (up to one decimal) and the count are formatted with `locale`, in the text and in
|
|
5658
7193
|
* the name; `labels` localizes the name. Pass `locale` when rendering on the server.
|
|
7194
|
+
* - `color` colors the filled stars (`marigold`, the default, `brand` or `neutral`; the root
|
|
7195
|
+
* carries `data-color`); `iconFilled` and `iconOutline` replace the star glyphs, as a pair.
|
|
7196
|
+
* - The stars are generated from `max`. Children that render content replace them: one
|
|
7197
|
+
* `RatingDisplay.Item` per value from 1 to `max`. A `compact` display ignores them.
|
|
7198
|
+
*
|
|
7199
|
+
* Sub-component: `RatingDisplay.Item` (the same component as `Rating.Item`). React Server
|
|
7200
|
+
* Components import its flat name `RatingDisplayItem`, or `RatingItem` (dotted access needs a
|
|
7201
|
+
* client file).
|
|
5659
7202
|
*/
|
|
5660
7203
|
export declare const RatingDisplay: {
|
|
5661
|
-
({ value, max, size, showValue, count, compact, locale, labels, className, ref, ...rest }: RatingDisplayProps): React_2.JSX.Element;
|
|
7204
|
+
({ value, max, size, color, iconFilled, iconOutline, showValue, count, compact, locale, labels, className, children, ref, ...rest }: RatingDisplayProps): React_2.JSX.Element;
|
|
7205
|
+
displayName: string;
|
|
7206
|
+
} & {
|
|
7207
|
+
Item: {
|
|
7208
|
+
({ value, iconFilled, iconOutline, className, ref, ...rest }: RatingItemProps): React_2.JSX.Element;
|
|
7209
|
+
displayName: string;
|
|
7210
|
+
};
|
|
7211
|
+
};
|
|
7212
|
+
|
|
7213
|
+
/**
|
|
7214
|
+
* RatingDisplay: `root` on the `role="img"` element; `star` on each star span (a RatingItem, and
|
|
7215
|
+
* the one star of `compact`); `icon` on the star glyphs; `value` on the value span; `count` on the
|
|
7216
|
+
* count span.
|
|
7217
|
+
*/
|
|
7218
|
+
export declare const ratingDisplayClassNames: {
|
|
7219
|
+
readonly root: "wave-rating-display";
|
|
7220
|
+
readonly star: "wave-rating-display__star";
|
|
7221
|
+
readonly icon: "wave-rating-display__icon";
|
|
7222
|
+
readonly value: "wave-rating-display__value";
|
|
7223
|
+
readonly count: "wave-rating-display__count";
|
|
7224
|
+
};
|
|
7225
|
+
|
|
7226
|
+
/**
|
|
7227
|
+
* Flat name of `RatingDisplay.Item` for React Server Components (the same component as
|
|
7228
|
+
* `RatingItem`).
|
|
7229
|
+
*/
|
|
7230
|
+
export declare const RatingDisplayItem: {
|
|
7231
|
+
({ value, iconFilled, iconOutline, className, ref, ...rest }: RatingItemProps): React_2.JSX.Element;
|
|
5662
7232
|
displayName: string;
|
|
5663
7233
|
};
|
|
5664
7234
|
|
|
@@ -5677,7 +7247,7 @@ export declare interface RatingDisplayLabels {
|
|
|
5677
7247
|
}
|
|
5678
7248
|
|
|
5679
7249
|
/** Properties for the RatingDisplay (read-only) component. */
|
|
5680
|
-
export declare interface RatingDisplayProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
7250
|
+
export declare interface RatingDisplayProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
5681
7251
|
/**
|
|
5682
7252
|
* Rating value to display. A fraction is drawn as a partly filled star (`4.6` fills 60% of the
|
|
5683
7253
|
* fifth star), so the stars show the value the accessible name reports.
|
|
@@ -5691,6 +7261,36 @@ export declare interface RatingDisplayProps extends React_2.HTMLAttributes<HTMLD
|
|
|
5691
7261
|
* @default 'medium'
|
|
5692
7262
|
*/
|
|
5693
7263
|
size?: Size;
|
|
7264
|
+
/**
|
|
7265
|
+
* Color of the filled stars: `marigold` (default), `brand` or `neutral`; unfilled stars keep a
|
|
7266
|
+
* 3:1 outline. Fluent's default is `neutral`. A value outside the three (from untyped code)
|
|
7267
|
+
* renders as `marigold`; the root carries `data-color` with the resolved value.
|
|
7268
|
+
* @default 'marigold'
|
|
7269
|
+
*/
|
|
7270
|
+
color?: RatingColor;
|
|
7271
|
+
/**
|
|
7272
|
+
* The glyph of a filled star. `iconFilled` and `iconOutline` are the glyphs of a filled and an
|
|
7273
|
+
* unfilled star, as a pair; decorative. Fluent's RatingDisplay takes one `icon`; here a filled
|
|
7274
|
+
* and an unfilled star must differ by shape, not by color alone.
|
|
7275
|
+
*
|
|
7276
|
+
* - Each glyph is sized by `size` (an SVG child fills the star) and takes the star's color
|
|
7277
|
+
* (paint it with `currentColor`). A partly filled star clips the filled glyph over the
|
|
7278
|
+
* unfilled one from the inline start, and the `compact` star is the filled glyph.
|
|
7279
|
+
* - `null`, `undefined` and a value that renders nothing draw the default star. A value that
|
|
7280
|
+
* renders nothing, and a pair with only one of the two set, log a development warning.
|
|
7281
|
+
* - A `<button>` or `Button` element (or a slot object whose `as` is one) is not nested in the
|
|
7282
|
+
* star: its children become the glyph (the default star when they render nothing), its props
|
|
7283
|
+
* are dropped, and a development warning says so (in place of the warning for a value that
|
|
7284
|
+
* renders nothing).
|
|
7285
|
+
* - A `RatingDisplay.Item` that sets its own pair draws that one instead.
|
|
7286
|
+
*/
|
|
7287
|
+
iconFilled?: Slot<'span'>;
|
|
7288
|
+
/**
|
|
7289
|
+
* The glyph of an unfilled star, as a pair with `iconFilled` (its rules apply); decorative.
|
|
7290
|
+
* Fluent's RatingDisplay takes one `icon`; here a filled and an unfilled star must differ by
|
|
7291
|
+
* shape, not by color alone.
|
|
7292
|
+
*/
|
|
7293
|
+
iconOutline?: Slot<'span'>;
|
|
5694
7294
|
/**
|
|
5695
7295
|
* Shows the value as text after the stars, formatted with `locale` (up to one decimal).
|
|
5696
7296
|
* @default false
|
|
@@ -5715,25 +7315,105 @@ export declare interface RatingDisplayProps extends React_2.HTMLAttributes<HTMLD
|
|
|
5715
7315
|
locale?: string;
|
|
5716
7316
|
/** Built-in texts, for localization. */
|
|
5717
7317
|
labels?: RatingDisplayLabels;
|
|
7318
|
+
/**
|
|
7319
|
+
* Custom stars: one `RatingDisplay.Item` per value from 1 to `max`, in place of the generated
|
|
7320
|
+
* stars (when the children render content). A `compact` display ignores them.
|
|
7321
|
+
*/
|
|
7322
|
+
children?: React_2.ReactNode;
|
|
5718
7323
|
/** Ref to the root element. */
|
|
5719
7324
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
5720
7325
|
}
|
|
5721
7326
|
|
|
7327
|
+
/**
|
|
7328
|
+
* One star of a `Rating` or a `RatingDisplay`, drawn from its root: pass one per value from 1 to
|
|
7329
|
+
* `max` as the root's children, in place of the stars it generates.
|
|
7330
|
+
*
|
|
7331
|
+
* - In a `Rating` it is a `role="radio"` button named by the root's `labels.star` ("2 stars"),
|
|
7332
|
+
* chosen, previewed and roved as a generated star is. With the root's `step={0.5}` it is a star
|
|
7333
|
+
* `<span>`, one pointer target that chooses by the pointer's position, holding two transparent
|
|
7334
|
+
* radios: its half value, then its full value ("1.5 stars", "2 stars"). In a `RatingDisplay` it
|
|
7335
|
+
* is a star filled, partly filled or empty by the root's value.
|
|
7336
|
+
* - It draws the root's `color` and glyph pair, or its own `iconFilled`/`iconOutline` pair when it
|
|
7337
|
+
* sets one.
|
|
7338
|
+
* - `className`, `style`, `data-*`, the other attributes, the handlers and `ref` go to that star
|
|
7339
|
+
* element, the consumer's handlers first. The role, name, checked state and tab stop of its
|
|
7340
|
+
* radio (or radios) come from the root.
|
|
7341
|
+
* - At `step={1}` the consumer's `onClick` and `onMouseEnter` compose onto the radio itself, so a
|
|
7342
|
+
* `preventDefault()` in either vetoes that star's own activation or hover preview. At
|
|
7343
|
+
* `step={0.5}` `onClick` and `onPointerMove` compose onto the star `<span>` instead: its two
|
|
7344
|
+
* radios run their own `onClick` first and choose their own value directly (Space, Enter, a
|
|
7345
|
+
* screen reader, or `radio.click()`), before the click bubbles to the span's composed handler,
|
|
7346
|
+
* so a `preventDefault()` there vetoes only a pointer-chosen value, never a keyboard or
|
|
7347
|
+
* assistive-technology activation.
|
|
7348
|
+
* - Outside a `Rating` or `RatingDisplay` it throws in development.
|
|
7349
|
+
*/
|
|
7350
|
+
export declare const RatingItem: {
|
|
7351
|
+
({ value, iconFilled, iconOutline, className, ref, ...rest }: RatingItemProps): React_2.JSX.Element;
|
|
7352
|
+
displayName: string;
|
|
7353
|
+
};
|
|
7354
|
+
|
|
7355
|
+
/**
|
|
7356
|
+
* RatingItem (also Rating.Item, RatingDisplay.Item and RatingDisplayItem): `root` on the star
|
|
7357
|
+
* element (the `role="radio"` button in a Rating, the span around its two radios with
|
|
7358
|
+
* `step={0.5}`, the star span in a RatingDisplay), which also carries its rating's `star` class;
|
|
7359
|
+
* `icon` on each glyph it draws (the default `<svg>`, or the span of an `iconFilled`/`iconOutline`
|
|
7360
|
+
* glyph), which also carries its rating's `icon` class.
|
|
7361
|
+
*/
|
|
7362
|
+
export declare const ratingItemClassNames: {
|
|
7363
|
+
readonly root: "wave-rating-item";
|
|
7364
|
+
readonly icon: "wave-rating-item__icon";
|
|
7365
|
+
};
|
|
7366
|
+
|
|
7367
|
+
/** Properties for the RatingItem component (`Rating.Item`, `RatingDisplay.Item`). */
|
|
7368
|
+
export declare interface RatingItemProps extends Omit<React_2.HTMLAttributes<HTMLElement>, 'role' | 'aria-checked' | 'aria-label' | 'aria-labelledby' | 'tabIndex' | 'children' | 'onChange'> {
|
|
7369
|
+
/**
|
|
7370
|
+
* The star's full value, from 1 to the root's `max`: the rating it chooses (with the root's
|
|
7371
|
+
* `step={0.5}` also its half, `value - 0.5`), or shows.
|
|
7372
|
+
*/
|
|
7373
|
+
value: number;
|
|
7374
|
+
/**
|
|
7375
|
+
* The glyph of this star when filled, as a pair with `iconOutline`, following the rules of the
|
|
7376
|
+
* root's `iconFilled` (a button is unwrapped, its children becoming the glyph, and a value or
|
|
7377
|
+
* button children that render nothing draw the default star). An item that sets either glyph
|
|
7378
|
+
* of the pair (`null` included) draws its own pair instead of its root's, and a glyph it leaves
|
|
7379
|
+
* unset is the default star (a development warning says so).
|
|
7380
|
+
*/
|
|
7381
|
+
iconFilled?: Slot<'span'>;
|
|
7382
|
+
/**
|
|
7383
|
+
* The glyph of this star when unfilled, as a pair with `iconFilled`, following the rules of the
|
|
7384
|
+
* root's `iconOutline` (a button is unwrapped, its children becoming the glyph, and a value or
|
|
7385
|
+
* button children that render nothing draw the default star). An item that sets either glyph
|
|
7386
|
+
* of the pair (`null` included) draws its own pair instead of its root's, and a glyph it leaves
|
|
7387
|
+
* unset is the default star (a development warning says so).
|
|
7388
|
+
*/
|
|
7389
|
+
iconOutline?: Slot<'span'>;
|
|
7390
|
+
/**
|
|
7391
|
+
* Ref to the star element: the `role="radio"` button in a Rating, the star `<span>` in a Rating
|
|
7392
|
+
* with `step={0.5}` and in a RatingDisplay.
|
|
7393
|
+
*/
|
|
7394
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
7395
|
+
}
|
|
7396
|
+
|
|
5722
7397
|
/**
|
|
5723
7398
|
* The Rating's built-in star names, for localization. Each member is optional and falls back to
|
|
5724
7399
|
* its English default.
|
|
5725
7400
|
*/
|
|
5726
7401
|
export declare interface RatingLabels {
|
|
5727
7402
|
/**
|
|
5728
|
-
* Accessible name of the
|
|
7403
|
+
* Accessible name of the radio that chooses `value`: a whole star (1 to `max`), and with
|
|
7404
|
+
* `step={0.5}` a half value too ("2.5 stars").
|
|
5729
7405
|
* @default (value) => value === 1 ? '1 star' : `${value} stars`
|
|
5730
7406
|
*/
|
|
5731
7407
|
star?: (value: number, max: number) => string;
|
|
5732
7408
|
}
|
|
5733
7409
|
|
|
5734
7410
|
/** Properties for the Rating component. */
|
|
5735
|
-
export declare interface RatingProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
5736
|
-
/**
|
|
7411
|
+
export declare interface RatingProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'color'> {
|
|
7412
|
+
/**
|
|
7413
|
+
* Controlled rating value (`0` = no rating): a whole number of stars, or with `step={0.5}` a
|
|
7414
|
+
* multiple of 0.5. A value between two steps (2.7) checks no radio, is drawn as the step below
|
|
7415
|
+
* it (2.5) and holds the tab stop there; the keys move it to the next or previous step.
|
|
7416
|
+
*/
|
|
5737
7417
|
value?: number;
|
|
5738
7418
|
/** Initial rating for uncontrolled usage (also the value a form reset restores).
|
|
5739
7419
|
* @default 0
|
|
@@ -5751,10 +7431,50 @@ export declare interface RatingProps extends Omit<React_2.HTMLAttributes<HTMLDiv
|
|
|
5751
7431
|
* @default 5
|
|
5752
7432
|
*/
|
|
5753
7433
|
max?: number;
|
|
7434
|
+
/**
|
|
7435
|
+
* The grain of the rating: `1` (whole stars) or `0.5` (half stars). With `0.5`, each star stays
|
|
7436
|
+
* one pointer target of at least 24×24px (a larger `size` keeps a larger one): the half is
|
|
7437
|
+
* chosen by the pointer's position over it (the half at the inline start, which mirrors under
|
|
7438
|
+
* `dir="rtl"`), and two transparent radios per star, the half value then the full value, serve
|
|
7439
|
+
* the keyboard and screen readers. The keys then move by half a star. A value other than `0.5`
|
|
7440
|
+
* (from untyped code) counts as `1`. RatingDisplay has no `step`: it draws any fraction.
|
|
7441
|
+
* @default 1
|
|
7442
|
+
*/
|
|
7443
|
+
step?: 0.5 | 1;
|
|
5754
7444
|
/** Size of the star icons. Every size keeps a target of at least 24×24px.
|
|
5755
7445
|
* @default 'medium'
|
|
5756
7446
|
*/
|
|
5757
7447
|
size?: Size;
|
|
7448
|
+
/**
|
|
7449
|
+
* Color of the filled stars: `marigold` (default), `brand` or `neutral`; unfilled stars keep a
|
|
7450
|
+
* 3:1 outline. Fluent's default is `neutral`. A value outside the three (from untyped code)
|
|
7451
|
+
* renders as `marigold`; the root carries `data-color` with the resolved value.
|
|
7452
|
+
* @default 'marigold'
|
|
7453
|
+
*/
|
|
7454
|
+
color?: RatingColor;
|
|
7455
|
+
/**
|
|
7456
|
+
* The glyph of a filled star. `iconFilled` and `iconOutline` are the glyphs of a filled and an
|
|
7457
|
+
* unfilled star, as a pair; decorative. Fluent's RatingDisplay takes one `icon`; here a filled
|
|
7458
|
+
* and an unfilled star must differ by shape, not by color alone.
|
|
7459
|
+
*
|
|
7460
|
+
* - Each glyph is sized by `size` (an SVG child fills the star) and takes the star's color
|
|
7461
|
+
* (paint it with `currentColor`). A half-filled star (`step={0.5}`) clips the filled glyph
|
|
7462
|
+
* over the unfilled one from the inline start.
|
|
7463
|
+
* - `null`, `undefined` and a value that renders nothing draw the default star. A value that
|
|
7464
|
+
* renders nothing, and a pair with only one of the two set, log a development warning.
|
|
7465
|
+
* - A `<button>` or `Button` element (or a slot object whose `as` is one) is not nested in the
|
|
7466
|
+
* star: its children become the glyph (the default star when they render nothing), its props
|
|
7467
|
+
* are dropped, and a development warning says so (in place of the warning for a value that
|
|
7468
|
+
* renders nothing).
|
|
7469
|
+
* - A `Rating.Item` that sets its own pair draws that one instead.
|
|
7470
|
+
*/
|
|
7471
|
+
iconFilled?: Slot<'span'>;
|
|
7472
|
+
/**
|
|
7473
|
+
* The glyph of an unfilled star, as a pair with `iconFilled` (its rules apply); decorative.
|
|
7474
|
+
* Fluent's RatingDisplay takes one `icon`; here a filled and an unfilled star must differ by
|
|
7475
|
+
* shape, not by color alone.
|
|
7476
|
+
*/
|
|
7477
|
+
iconOutline?: Slot<'span'>;
|
|
5758
7478
|
/** Whether the rating is disabled and non-interactive.
|
|
5759
7479
|
* @default false
|
|
5760
7480
|
*/
|
|
@@ -5769,10 +7489,16 @@ export declare interface RatingProps extends Omit<React_2.HTMLAttributes<HTMLDiv
|
|
|
5769
7489
|
/** Id of the form the rating belongs to, when it is rendered outside that form. */
|
|
5770
7490
|
form?: string;
|
|
5771
7491
|
/**
|
|
5772
|
-
* Names of the stars ("1 star", "2 stars",
|
|
5773
|
-
* `aria-label` (default "Rating"). Unset members keep
|
|
7492
|
+
* Names of the stars ("1 star", "2 stars", …, and "2.5 stars" for a half value), for
|
|
7493
|
+
* localization. The group's own name is `aria-label` (default "Rating"). Unset members keep
|
|
7494
|
+
* their English defaults.
|
|
5774
7495
|
*/
|
|
5775
7496
|
labels?: RatingLabels;
|
|
7497
|
+
/**
|
|
7498
|
+
* Custom stars: one `Rating.Item` per value from 1 to `max`, in place of the generated stars
|
|
7499
|
+
* (when the children render content). `max` still sets the key range and the star names.
|
|
7500
|
+
*/
|
|
7501
|
+
children?: React_2.ReactNode;
|
|
5776
7502
|
/** Ref to the `role="radiogroup"` element. */
|
|
5777
7503
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
5778
7504
|
}
|
|
@@ -5863,15 +7589,34 @@ export declare interface RovingContainerProps {
|
|
|
5863
7589
|
* the label, hint, error and required state automatically.
|
|
5864
7590
|
* - **Forms**: with `name` the text is submitted with the form; a form reset restores
|
|
5865
7591
|
* `defaultValue`.
|
|
7592
|
+
* - **Size and appearance**: `size` resolves from its own prop, then the surrounding `Field`'s
|
|
7593
|
+
* `size`, then `WaveProvider inputDefaults.size`, else `'medium'`; `appearance` from its own
|
|
7594
|
+
* prop, then `WaveProvider inputDefaults.appearance`, else `'outline'`; both render as
|
|
7595
|
+
* `data-size` and `data-appearance` on the root `<div>`.
|
|
5866
7596
|
*
|
|
5867
7597
|
* @example
|
|
5868
7598
|
* <SearchBox aria-label="Search files" value={query} onValueChange={setQuery} />
|
|
5869
7599
|
*/
|
|
5870
7600
|
export declare const SearchBox: {
|
|
5871
|
-
({ value: controlledValue, defaultValue, onValueChange, onChange, onClear, placeholder, disabled, contentBefore, contentAfter, dismiss, className, ref, controlRef, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, "aria-details": ariaDetails, required, name, form, readOnly, autoComplete, autoFocus, autoCapitalize, autoCorrect, inputMode, enterKeyHint, spellCheck, maxLength, minLength, pattern, tabIndex, onFocus, onBlur, onKeyDown, onKeyUp, onMouseDown, hidden, ...rest }: SearchBoxProps): React_2.JSX.Element;
|
|
7601
|
+
({ value: controlledValue, defaultValue, onValueChange, onChange, onClear, placeholder, disabled, size: sizeProp, appearance: appearanceProp, contentBefore, contentAfter, dismiss, className, ref, controlRef, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, "aria-details": ariaDetails, required, name, form, readOnly, autoComplete, autoFocus, autoCapitalize, autoCorrect, inputMode, enterKeyHint, spellCheck, maxLength, minLength, pattern, tabIndex, onFocus, onBlur, onKeyDown, onKeyUp, onMouseDown, hidden, ...rest }: SearchBoxProps): React_2.JSX.Element;
|
|
5872
7602
|
displayName: string;
|
|
5873
7603
|
};
|
|
5874
7604
|
|
|
7605
|
+
/**
|
|
7606
|
+
* SearchBox: `root` on the element that draws the field; `contentBefore` on the span that holds
|
|
7607
|
+
* the search icon or your slot; `input` on the `<input type="search">`; `contentAfter` on the span
|
|
7608
|
+
* that holds your slot; `dismissButton` on the clear button; `dismissIcon` on the icon inside it
|
|
7609
|
+
* (what `dismiss` renders, a merged Button's icon span, else the default `<svg>`).
|
|
7610
|
+
*/
|
|
7611
|
+
export declare const searchBoxClassNames: {
|
|
7612
|
+
readonly root: "wave-search-box";
|
|
7613
|
+
readonly contentBefore: "wave-search-box__content-before";
|
|
7614
|
+
readonly input: "wave-search-box__input";
|
|
7615
|
+
readonly contentAfter: "wave-search-box__content-after";
|
|
7616
|
+
readonly dismissButton: "wave-search-box__dismiss-button";
|
|
7617
|
+
readonly dismissIcon: "wave-search-box__dismiss-icon";
|
|
7618
|
+
};
|
|
7619
|
+
|
|
5875
7620
|
/**
|
|
5876
7621
|
* Props that SearchBox routes to its `<input>` (C-ROUTING): the id, the ARIA naming/validation
|
|
5877
7622
|
* attributes, native text-input attributes and the focus/keyboard handlers.
|
|
@@ -5904,6 +7649,17 @@ export declare interface SearchBoxProps extends Omit<React_2.HTMLAttributes<HTML
|
|
|
5904
7649
|
placeholder?: string;
|
|
5905
7650
|
/** Whether the search box is disabled and non-interactive. */
|
|
5906
7651
|
disabled?: boolean;
|
|
7652
|
+
/**
|
|
7653
|
+
* Size of the field: `small` (24px tall), `medium` (32px) or `large` (40px). Default: the
|
|
7654
|
+
* surrounding Field's `size`, else `WaveProvider inputDefaults.size`, else `'medium'`.
|
|
7655
|
+
*/
|
|
7656
|
+
size?: CoreSize;
|
|
7657
|
+
/**
|
|
7658
|
+
* Look of the field: `outline` (a full border), `underline` (a bottom stroke only),
|
|
7659
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke: give the field a visible
|
|
7660
|
+
* label). Default: `WaveProvider inputDefaults.appearance`, else `'outline'`.
|
|
7661
|
+
*/
|
|
7662
|
+
appearance?: InputAppearance;
|
|
5907
7663
|
/**
|
|
5908
7664
|
* Slot rendered before the text (replaces the default search icon). It takes the room it needs;
|
|
5909
7665
|
* the text starts after it. A value that renders nothing (`null`, `false`, `''`, an empty array
|
|
@@ -5956,6 +7712,11 @@ export declare interface SearchBoxProps extends Omit<React_2.HTMLAttributes<HTML
|
|
|
5956
7712
|
* `Field` label, `aria-label` or `aria-labelledby`. Inside a `Field` it picks up the label, hint,
|
|
5957
7713
|
* error, `required` (native attribute) and invalid state automatically.
|
|
5958
7714
|
*
|
|
7715
|
+
* `size` resolves from its own prop, then the surrounding `Field`'s `size`, then
|
|
7716
|
+
* `WaveProvider inputDefaults.size`, else `'medium'`; `appearance` from its own prop, then
|
|
7717
|
+
* `WaveProvider inputDefaults.appearance`, else `'outline'`; both render as `data-size` and
|
|
7718
|
+
* `data-appearance` on the `<select>`.
|
|
7719
|
+
*
|
|
5959
7720
|
* @example
|
|
5960
7721
|
* <Field label="Country" required>
|
|
5961
7722
|
* <Select defaultValue="">
|
|
@@ -5965,16 +7726,22 @@ export declare interface SearchBoxProps extends Omit<React_2.HTMLAttributes<HTML
|
|
|
5965
7726
|
* </Field>
|
|
5966
7727
|
*/
|
|
5967
7728
|
export declare const Select: {
|
|
5968
|
-
({ error, errorMessageProps, className, children, ref, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, required, ...props }: SelectProps): React_2.JSX.Element;
|
|
7729
|
+
({ error, errorMessageProps, size: sizeProp, htmlSize, appearance: appearanceProp, className, children, ref, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, required, ...props }: SelectProps): React_2.JSX.Element;
|
|
5969
7730
|
displayName: string;
|
|
5970
7731
|
};
|
|
5971
7732
|
|
|
7733
|
+
/** Select: `root` on the `<select>`; `errorMessage` on the message after it, as Input's. */
|
|
7734
|
+
export declare const selectClassNames: {
|
|
7735
|
+
readonly root: "wave-select";
|
|
7736
|
+
readonly errorMessage: "wave-select__error-message";
|
|
7737
|
+
};
|
|
7738
|
+
|
|
5972
7739
|
/** How many items a selectable collection allows (List, DataGrid, Accordion, …). */
|
|
5973
7740
|
declare type SelectionMode_2 = 'single' | 'multiple';
|
|
5974
7741
|
export { SelectionMode_2 as SelectionMode }
|
|
5975
7742
|
|
|
5976
7743
|
/** Properties for the Select component. */
|
|
5977
|
-
export declare interface SelectProps extends React_2.SelectHTMLAttributes<HTMLSelectElement> {
|
|
7744
|
+
export declare interface SelectProps extends Omit<React_2.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
5978
7745
|
/**
|
|
5979
7746
|
* Validation error.
|
|
5980
7747
|
* - A non-empty string renders the message in a `role="alert"` element **after** the select
|
|
@@ -5991,6 +7758,24 @@ export declare interface SelectProps extends React_2.SelectHTMLAttributes<HTMLSe
|
|
|
5991
7758
|
error?: string | boolean;
|
|
5992
7759
|
/** Props of the error message element (`id`, `className`, …) rendered for a string `error`. */
|
|
5993
7760
|
errorMessageProps?: InputErrorMessageProps;
|
|
7761
|
+
/**
|
|
7762
|
+
* Size of the field: `small` (24px tall), `medium` (32px) or `large` (40px). Default: the
|
|
7763
|
+
* surrounding Field's `size`, else `WaveProvider inputDefaults.size`, else `'medium'`.
|
|
7764
|
+
*
|
|
7765
|
+
* A number is the native `size` attribute (the number of visible rows), as in 0.8: it still
|
|
7766
|
+
* renders, warns once in development and is removed in 1.0. Use `htmlSize` for it.
|
|
7767
|
+
* A string of digits only (`size="20"` from untyped code) counts as that number. Any other value
|
|
7768
|
+
* outside the three sizes renders as if `size` were not set.
|
|
7769
|
+
*/
|
|
7770
|
+
size?: CoreSize | number;
|
|
7771
|
+
/** The native `size` attribute: the number of visible rows. */
|
|
7772
|
+
htmlSize?: number;
|
|
7773
|
+
/**
|
|
7774
|
+
* Look of the field: `outline` (a full border), `underline` (a bottom stroke only),
|
|
7775
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke: give the field a visible
|
|
7776
|
+
* label). Default: `WaveProvider inputDefaults.appearance`, else `'outline'`.
|
|
7777
|
+
*/
|
|
7778
|
+
appearance?: InputAppearance;
|
|
5994
7779
|
/** Ref to the `<select>` element. */
|
|
5995
7780
|
ref?: React_2.Ref<HTMLSelectElement>;
|
|
5996
7781
|
}
|
|
@@ -6023,11 +7808,16 @@ export declare const Skeleton: {
|
|
|
6023
7808
|
displayName: string;
|
|
6024
7809
|
} & {
|
|
6025
7810
|
Group: {
|
|
6026
|
-
({ label, "aria-busy": busy, children, ref, ...rest }: SkeletonGroupProps): React_2.JSX.Element;
|
|
7811
|
+
({ label, "aria-busy": busy, className, children, ref, ...rest }: SkeletonGroupProps): React_2.JSX.Element;
|
|
6027
7812
|
displayName: string;
|
|
6028
7813
|
};
|
|
6029
7814
|
};
|
|
6030
7815
|
|
|
7816
|
+
/** Skeleton: `root` on the placeholder element. */
|
|
7817
|
+
export declare const skeletonClassNames: {
|
|
7818
|
+
readonly root: "wave-skeleton";
|
|
7819
|
+
};
|
|
7820
|
+
|
|
6031
7821
|
/**
|
|
6032
7822
|
* Container for the Skeletons of a loading region: `aria-busy="true"` plus a visually hidden
|
|
6033
7823
|
* `label` ("Loading"), while the placeholders stay decorative. It uses no live-region role, so it
|
|
@@ -6037,10 +7827,15 @@ export declare const Skeleton: {
|
|
|
6037
7827
|
* export for React Server Components (`Skeleton.Group` in client files).
|
|
6038
7828
|
*/
|
|
6039
7829
|
export declare const SkeletonGroup: {
|
|
6040
|
-
({ label, "aria-busy": busy, children, ref, ...rest }: SkeletonGroupProps): React_2.JSX.Element;
|
|
7830
|
+
({ label, "aria-busy": busy, className, children, ref, ...rest }: SkeletonGroupProps): React_2.JSX.Element;
|
|
6041
7831
|
displayName: string;
|
|
6042
7832
|
};
|
|
6043
7833
|
|
|
7834
|
+
/** Skeleton.Group: `root` on the group element. */
|
|
7835
|
+
export declare const skeletonGroupClassNames: {
|
|
7836
|
+
readonly root: "wave-skeleton-group";
|
|
7837
|
+
};
|
|
7838
|
+
|
|
6044
7839
|
/** Properties for the Skeleton.Group component. */
|
|
6045
7840
|
export declare interface SkeletonGroupProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
6046
7841
|
/**
|
|
@@ -6079,16 +7874,24 @@ export declare interface SkeletonProps extends React_2.HTMLAttributes<HTMLDivEle
|
|
|
6079
7874
|
* The fill follows the value through the `--wave-slider-progress` variable on the input (also in
|
|
6080
7875
|
* the server HTML), including the browser's snapping to `step` and a form reset.
|
|
6081
7876
|
*
|
|
7877
|
+
* `size` (`small`, `medium`) sets the thumb and rail dimensions; the input carries `data-size`.
|
|
7878
|
+
* Slider does not read a surrounding `Field`'s size or a `WaveProvider`'s input defaults.
|
|
7879
|
+
*
|
|
6082
7880
|
* @example
|
|
6083
7881
|
* <Slider label="Volume" min={0} max={100} value={volume} onValueChange={setVolume} />
|
|
6084
7882
|
*/
|
|
6085
7883
|
export declare const Slider: {
|
|
6086
|
-
({ className, style, label, value, defaultValue, min, max, step, form, onChange, onValueChange, ref, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, required, ...props }: SliderProps): React_2.JSX.Element;
|
|
7884
|
+
({ className, style, label, value, defaultValue, min, max, step, size: sizeProp, form, onChange, onValueChange, ref, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, required, ...props }: SliderProps): React_2.JSX.Element;
|
|
6087
7885
|
displayName: string;
|
|
6088
7886
|
};
|
|
6089
7887
|
|
|
7888
|
+
/** Slider: `root` on the `<input type="range">` (its rail and thumb are pseudo-elements). */
|
|
7889
|
+
export declare const sliderClassNames: {
|
|
7890
|
+
readonly root: "wave-slider";
|
|
7891
|
+
};
|
|
7892
|
+
|
|
6090
7893
|
/** Properties for the Slider component. */
|
|
6091
|
-
export declare interface SliderProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
7894
|
+
export declare interface SliderProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
6092
7895
|
/** Controlled slider value. */
|
|
6093
7896
|
value?: number;
|
|
6094
7897
|
/** Initial value for uncontrolled usage. */
|
|
@@ -6108,10 +7911,25 @@ export declare interface SliderProps extends Omit<React_2.InputHTMLAttributes<HT
|
|
|
6108
7911
|
* `Field`, leave it out so the Field's label names the slider.
|
|
6109
7912
|
*/
|
|
6110
7913
|
label?: string;
|
|
7914
|
+
/**
|
|
7915
|
+
* Size of the thumb and rail: the 0.7 20px thumb on a 4px rail, or a small 16px thumb on a 2px
|
|
7916
|
+
* rail in a 24px-tall input. Unlike the text controls and pickers, Slider does not read a
|
|
7917
|
+
* surrounding `Field`'s size or a `WaveProvider`'s input defaults: this prop is the only source
|
|
7918
|
+
* of its size.
|
|
7919
|
+
*
|
|
7920
|
+
* `SliderProps` inherited the native HTML `size` attribute, which a range input ignores anyway.
|
|
7921
|
+
* A number is deprecated: it renders nothing (not even the native attribute), is reported once
|
|
7922
|
+
* in development, and is a type error from 1.0.
|
|
7923
|
+
* @default 'medium'
|
|
7924
|
+
*/
|
|
7925
|
+
size?: SliderSize | number;
|
|
6111
7926
|
/** Ref to the `<input type="range">` element. */
|
|
6112
7927
|
ref?: React_2.Ref<HTMLInputElement>;
|
|
6113
7928
|
}
|
|
6114
7929
|
|
|
7930
|
+
/** Size of the thumb and rail: a small 16px thumb on a 2px rail, or the 0.7 20px thumb on a 4px rail. */
|
|
7931
|
+
export declare type SliderSize = Extract<Size, 'small' | 'medium'>;
|
|
7932
|
+
|
|
6115
7933
|
/**
|
|
6116
7934
|
* Slot definition — a customisable sub-element of a component. Accepts:
|
|
6117
7935
|
*
|
|
@@ -6159,14 +7977,26 @@ export declare type SortDirection = 'ascending' | 'descending';
|
|
|
6159
7977
|
* A numeric input with decrement/increment buttons (APG spinbutton pattern).
|
|
6160
7978
|
*
|
|
6161
7979
|
* - **Keyboard** on the input: ArrowUp/ArrowDown step by `step`, PageUp/PageDown by `largeStep`
|
|
6162
|
-
* (default ten steps), Home/End jump to `min`/`max` when they are finite
|
|
6163
|
-
*
|
|
6164
|
-
* announce the new
|
|
7980
|
+
* (default ten steps), Home/End jump to `min`/`max` when they are finite (Shift+Home and
|
|
7981
|
+
* Shift+End keep their native text-selection instead). The −/+ buttons are not tab stops and
|
|
7982
|
+
* never take focus, so focus stays on the spinbutton and screen readers announce the new
|
|
7983
|
+
* value.
|
|
7984
|
+
* - **Pointer** on the −/+ buttons (mouse, touch or pen): a short press steps once, on release
|
|
7985
|
+
* (its click), never on the press alone, so a finger that starts a scroll on a button changes
|
|
7986
|
+
* nothing. Holding a button repeats the step: the first after 300ms, then faster, every 80ms
|
|
7987
|
+
* after about a second (Fluent's timing). A hold stops when the button is released, the
|
|
7988
|
+
* pointer leaves it or the press turns into a scroll, at the bound, when the window loses
|
|
7989
|
+
* focus, and when the spin button becomes disabled or read-only. Only the primary button of a
|
|
7990
|
+
* primary pointer holds: a second finger, a secondary button or a Ctrl+press with a mouse (the
|
|
7991
|
+
* secondary click on macOS) neither starts a hold nor ends one. A click without a press (a
|
|
7992
|
+
* screen reader, `element.click()`) steps once. The buttons open no context menu (a long press
|
|
7993
|
+
* on touch would), show no iOS callout, and allow no text selection or double-tap zoom.
|
|
6165
7994
|
* - **Typing** edits a draft: the value is parsed, clamped and committed on blur or Enter
|
|
6166
7995
|
* (Escape reverts). Text that is not a number is flagged with `aria-invalid` and reverted on
|
|
6167
7996
|
* blur. Steps (keys and buttons) start from the typed number, and the −/+ buttons are disabled
|
|
6168
7997
|
* when that number is at `min`/`max`. Steps are rounded to the precision of `step` and of the
|
|
6169
|
-
* value, so `0.1 + 0.2` is `0.3
|
|
7998
|
+
* value, so `0.1 + 0.2` is `0.3`; `precision` rounds every committed value, typed or stepped,
|
|
7999
|
+
* to a fixed number of decimals instead, without padding it (pad with `displayValue`).
|
|
6170
8000
|
* - **Routing**: `id`, ARIA, native input attributes and focus/keyboard handlers go to the
|
|
6171
8001
|
* `<input role="spinbutton">`; `className`, `style`, `data-*`, other handlers and `ref` stay on
|
|
6172
8002
|
* the root (`controlRef` reaches the input). Inside a `Field` it picks up the label, hint, error
|
|
@@ -6174,16 +8004,130 @@ export declare type SortDirection = 'ascending' | 'descending';
|
|
|
6174
8004
|
* or use a label (development warning otherwise).
|
|
6175
8005
|
* - **Forms**: with `name` the committed value is submitted; `required` makes the input natively
|
|
6176
8006
|
* required; a form reset restores `defaultValue`.
|
|
8007
|
+
* - **Empty values**: `allowEmpty` lets the value become `null` (an empty field). Clearing the
|
|
8008
|
+
* text and committing it (blur or Enter) sets the value to `null`, uncontrolled too; stepping
|
|
8009
|
+
* up or down from an empty value starts at 0 and clamps to the nearest bound. `required` (its
|
|
8010
|
+
* own, or a required Field's) still blocks submitting an empty value: the check runs on the
|
|
8011
|
+
* `HiddenInput` that carries the committed value, not on the shown text, so it keeps working
|
|
8012
|
+
* even when the shown text is not empty.
|
|
8013
|
+
* - **Display text**: `displayValue` shows formatted text (`$1.00`) for the value while the field
|
|
8014
|
+
* is not being edited, and as its `aria-valuetext`; while the field has focus and can be
|
|
8015
|
+
* edited it shows the plain number instead, so typing still edits the number (a consumer
|
|
8016
|
+
* `aria-valuetext` always wins). It applies only while `value` is controlled: an uncontrolled
|
|
8017
|
+
* spin button ignores it and warns once in development.
|
|
8018
|
+
* - **Size and appearance**: `size` resolves from its own prop, then the surrounding `Field`'s
|
|
8019
|
+
* `size`, then `WaveProvider inputDefaults.size`, else `'medium'`; `appearance` from its own
|
|
8020
|
+
* prop, then `WaveProvider inputDefaults.appearance`, else `'outline'`; both render as
|
|
8021
|
+
* `data-size` and `data-appearance` on the root. SpinButton takes every size the other fields
|
|
8022
|
+
* do, and unlike 0.7 its root is now exactly as tall as theirs, with its step buttons and
|
|
8023
|
+
* input taking up that height; sizing the root wider widens the input instead of leaving
|
|
8024
|
+
* empty space inside it. The step buttons keep a 1px separator from the input only in
|
|
8025
|
+
* `outline`; the other appearances have none.
|
|
6177
8026
|
* - The −/+ buttons are named "Decrement"/"Increment"; `labels` localizes the names.
|
|
6178
8027
|
*
|
|
6179
8028
|
* @example
|
|
6180
8029
|
* <SpinButton aria-label="Quantity" min={1} max={10} value={qty} onValueChange={setQty} />
|
|
6181
8030
|
*/
|
|
6182
8031
|
export declare const SpinButton: {
|
|
6183
|
-
(
|
|
8032
|
+
(props: SpinButtonProps | SpinButtonAllowEmptyProps): React_2.ReactNode;
|
|
6184
8033
|
displayName: string;
|
|
6185
8034
|
};
|
|
6186
8035
|
|
|
8036
|
+
/** SpinButton props with `allowEmpty`: the value may be `null` (an empty field). */
|
|
8037
|
+
export declare interface SpinButtonAllowEmptyProps extends SpinButtonBaseProps {
|
|
8038
|
+
/** The value may be `null`: clearing the text and committing it empties the field. */
|
|
8039
|
+
allowEmpty: true;
|
|
8040
|
+
/** Controlled value; `null` is an empty field. */
|
|
8041
|
+
value?: number | null;
|
|
8042
|
+
/** Initial value for uncontrolled usage (also what a form reset restores).
|
|
8043
|
+
* @default null
|
|
8044
|
+
*/
|
|
8045
|
+
defaultValue?: number | null;
|
|
8046
|
+
/** Called with the new value when it changes, `null` when the field is emptied. */
|
|
8047
|
+
onValueChange?: (value: number | null) => void;
|
|
8048
|
+
/** Not available with `allowEmpty` (the deprecated alias of `onValueChange`). */
|
|
8049
|
+
onChange?: never;
|
|
8050
|
+
}
|
|
8051
|
+
|
|
8052
|
+
/**
|
|
8053
|
+
* Properties every SpinButton mode shares (every member of {@link SpinButtonProps} and
|
|
8054
|
+
* {@link SpinButtonAllowEmptyProps} except the value members, which differ between them).
|
|
8055
|
+
*/
|
|
8056
|
+
export declare interface SpinButtonBaseProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | keyof SpinButtonInputProps>, SpinButtonInputProps {
|
|
8057
|
+
/** Minimum allowed value.
|
|
8058
|
+
* @default -Infinity
|
|
8059
|
+
*/
|
|
8060
|
+
min?: number;
|
|
8061
|
+
/** Maximum allowed value.
|
|
8062
|
+
* @default Infinity
|
|
8063
|
+
*/
|
|
8064
|
+
max?: number;
|
|
8065
|
+
/** Step of the increment/decrement buttons and of ArrowUp/ArrowDown.
|
|
8066
|
+
* @default 1
|
|
8067
|
+
*/
|
|
8068
|
+
step?: number;
|
|
8069
|
+
/** Step of PageUp/PageDown.
|
|
8070
|
+
* @default step * 10
|
|
8071
|
+
*/
|
|
8072
|
+
largeStep?: number;
|
|
8073
|
+
/**
|
|
8074
|
+
* Decimals every committed value is rounded to, typed or stepped (0–20); the number is not
|
|
8075
|
+
* padded (use `displayValue` for `1.00`). Default: steps round to the decimals of `step` and
|
|
8076
|
+
* the value, typed values are kept as typed.
|
|
8077
|
+
*/
|
|
8078
|
+
precision?: number;
|
|
8079
|
+
/** Whether the spin button is disabled and non-interactive. */
|
|
8080
|
+
disabled?: boolean;
|
|
8081
|
+
/** Form field name. With a name, the committed value is submitted with the form. */
|
|
8082
|
+
name?: string;
|
|
8083
|
+
/** Id of the form the spin button belongs to, when it is rendered outside that form. */
|
|
8084
|
+
form?: string;
|
|
8085
|
+
/**
|
|
8086
|
+
* Names of the −/+ step buttons (not tab stops, but in the accessibility tree), for
|
|
8087
|
+
* localization. Unset members keep their English defaults.
|
|
8088
|
+
*/
|
|
8089
|
+
labels?: SpinButtonLabels;
|
|
8090
|
+
/**
|
|
8091
|
+
* Text shown for the value while the field is not being edited, and its `aria-valuetext` (a
|
|
8092
|
+
* `$1.00` for 1). While the field has focus and can be edited it shows the plain number, so
|
|
8093
|
+
* typing edits the number. Applies only while `value` is controlled (update it with the
|
|
8094
|
+
* value); Fluent's `displayValue`.
|
|
8095
|
+
*/
|
|
8096
|
+
displayValue?: string;
|
|
8097
|
+
/**
|
|
8098
|
+
* Size of the field: `small` (24px tall), `medium` (32px) or `large` (40px). Default: the
|
|
8099
|
+
* surrounding Field's `size`, else `WaveProvider inputDefaults.size`, else `'medium'`.
|
|
8100
|
+
*
|
|
8101
|
+
* SpinButton is 24, 32 or 40px tall like every field; its buttons are square-ish, 24, 32 or
|
|
8102
|
+
* 40px wide.
|
|
8103
|
+
*/
|
|
8104
|
+
size?: CoreSize;
|
|
8105
|
+
/**
|
|
8106
|
+
* Look of the field: `outline` (a full border), `underline` (a bottom stroke only),
|
|
8107
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke: give the field a
|
|
8108
|
+
* visible label). Default: `WaveProvider inputDefaults.appearance`, else `'outline'`.
|
|
8109
|
+
*
|
|
8110
|
+
* The step buttons keep a 1px separator from the input only in `outline`; the other
|
|
8111
|
+
* appearances have none.
|
|
8112
|
+
*/
|
|
8113
|
+
appearance?: InputAppearance;
|
|
8114
|
+
/** Ref to the root `<div>`. */
|
|
8115
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
8116
|
+
/** Ref to the `<input role="spinbutton">` (the focusable control). */
|
|
8117
|
+
controlRef?: React_2.Ref<HTMLInputElement>;
|
|
8118
|
+
}
|
|
8119
|
+
|
|
8120
|
+
/**
|
|
8121
|
+
* SpinButton: `root` on the outer element; `decrementButton` on the − button; `input` on the
|
|
8122
|
+
* `role="spinbutton"` input; `incrementButton` on the + button.
|
|
8123
|
+
*/
|
|
8124
|
+
export declare const spinButtonClassNames: {
|
|
8125
|
+
readonly root: "wave-spin-button";
|
|
8126
|
+
readonly decrementButton: "wave-spin-button__decrement-button";
|
|
8127
|
+
readonly input: "wave-spin-button__input";
|
|
8128
|
+
readonly incrementButton: "wave-spin-button__increment-button";
|
|
8129
|
+
};
|
|
8130
|
+
|
|
6187
8131
|
/**
|
|
6188
8132
|
* Props that SpinButton routes to its `<input role="spinbutton">` (C-ROUTING): the id, the ARIA
|
|
6189
8133
|
* naming/validation attributes, native text-input attributes and the focus/keyboard handlers.
|
|
@@ -6205,8 +8149,14 @@ export declare interface SpinButtonLabels {
|
|
|
6205
8149
|
decrement?: string;
|
|
6206
8150
|
}
|
|
6207
8151
|
|
|
6208
|
-
/**
|
|
6209
|
-
export declare interface SpinButtonProps extends
|
|
8152
|
+
/** SpinButton props with a number value (the 0.7 shape). */
|
|
8153
|
+
export declare interface SpinButtonProps extends SpinButtonBaseProps {
|
|
8154
|
+
/**
|
|
8155
|
+
* Allows an empty value (`null`). Takes the literal `true`: a `boolean` variable fits neither
|
|
8156
|
+
* member of the props, so branch the JSX or spread `{ allowEmpty: true, value }`.
|
|
8157
|
+
* @default false
|
|
8158
|
+
*/
|
|
8159
|
+
allowEmpty?: false;
|
|
6210
8160
|
/** Controlled numeric value. */
|
|
6211
8161
|
value?: number;
|
|
6212
8162
|
/** Initial value for uncontrolled usage (also what a form reset restores).
|
|
@@ -6224,37 +8174,6 @@ export declare interface SpinButtonProps extends Omit<React_2.HTMLAttributes<HTM
|
|
|
6224
8174
|
* @deprecated Use `onValueChange`. (`onChange` is reserved for native change events.)
|
|
6225
8175
|
*/
|
|
6226
8176
|
onChange?: (value: number) => void;
|
|
6227
|
-
/** Minimum allowed value.
|
|
6228
|
-
* @default -Infinity
|
|
6229
|
-
*/
|
|
6230
|
-
min?: number;
|
|
6231
|
-
/** Maximum allowed value.
|
|
6232
|
-
* @default Infinity
|
|
6233
|
-
*/
|
|
6234
|
-
max?: number;
|
|
6235
|
-
/** Step of the increment/decrement buttons and of ArrowUp/ArrowDown.
|
|
6236
|
-
* @default 1
|
|
6237
|
-
*/
|
|
6238
|
-
step?: number;
|
|
6239
|
-
/** Step of PageUp/PageDown.
|
|
6240
|
-
* @default step * 10
|
|
6241
|
-
*/
|
|
6242
|
-
largeStep?: number;
|
|
6243
|
-
/** Whether the spin button is disabled and non-interactive. */
|
|
6244
|
-
disabled?: boolean;
|
|
6245
|
-
/** Form field name. With a name, the committed value is submitted with the form. */
|
|
6246
|
-
name?: string;
|
|
6247
|
-
/** Id of the form the spin button belongs to, when it is rendered outside that form. */
|
|
6248
|
-
form?: string;
|
|
6249
|
-
/**
|
|
6250
|
-
* Names of the −/+ step buttons (not tab stops, but in the accessibility tree), for
|
|
6251
|
-
* localization. Unset members keep their English defaults.
|
|
6252
|
-
*/
|
|
6253
|
-
labels?: SpinButtonLabels;
|
|
6254
|
-
/** Ref to the root `<div>`. */
|
|
6255
|
-
ref?: React_2.Ref<HTMLDivElement>;
|
|
6256
|
-
/** Ref to the `<input role="spinbutton">` (the focusable control). */
|
|
6257
|
-
controlRef?: React_2.Ref<HTMLInputElement>;
|
|
6258
8177
|
}
|
|
6259
8178
|
|
|
6260
8179
|
/**
|
|
@@ -6292,6 +8211,16 @@ export declare const Spinner: {
|
|
|
6292
8211
|
/** Color treatment of a {@link Spinner}. */
|
|
6293
8212
|
export declare type SpinnerAppearance = 'primary' | 'inverted';
|
|
6294
8213
|
|
|
8214
|
+
/**
|
|
8215
|
+
* Spinner: `root` on the outer span; `spinner` on the ring; `label` on the label span (also while
|
|
8216
|
+
* only screen readers get it, without `labelVisible`).
|
|
8217
|
+
*/
|
|
8218
|
+
export declare const spinnerClassNames: {
|
|
8219
|
+
readonly root: "wave-spinner";
|
|
8220
|
+
readonly spinner: "wave-spinner__spinner";
|
|
8221
|
+
readonly label: "wave-spinner__label";
|
|
8222
|
+
};
|
|
8223
|
+
|
|
6295
8224
|
/** Properties for the Spinner component. */
|
|
6296
8225
|
export declare interface SpinnerProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
6297
8226
|
/** Size of the spinner.
|
|
@@ -6359,6 +8288,19 @@ export declare const SplitButton: {
|
|
|
6359
8288
|
displayName: string;
|
|
6360
8289
|
};
|
|
6361
8290
|
|
|
8291
|
+
/**
|
|
8292
|
+
* SplitButton: `root` on the `role="group"` element; `primaryActionButton` and `menuButton` on its
|
|
8293
|
+
* two Buttons (which also carry Button's root); `icon` on the primary half's icon span and
|
|
8294
|
+
* `menuIcon` on the menu half's (both also carry Button's icon class).
|
|
8295
|
+
*/
|
|
8296
|
+
export declare const splitButtonClassNames: {
|
|
8297
|
+
readonly root: "wave-split-button";
|
|
8298
|
+
readonly primaryActionButton: "wave-split-button__primary-action-button";
|
|
8299
|
+
readonly menuButton: "wave-split-button__menu-button";
|
|
8300
|
+
readonly icon: "wave-split-button__icon";
|
|
8301
|
+
readonly menuIcon: "wave-split-button__menu-icon";
|
|
8302
|
+
};
|
|
8303
|
+
|
|
6362
8304
|
/**
|
|
6363
8305
|
* Props for one half of a SplitButton (`menuButtonProps`, `primaryActionButtonProps`): native
|
|
6364
8306
|
* `<button>` attributes, `data-*` attributes and `ref`. They are merged onto the built-in props
|
|
@@ -6461,6 +8403,11 @@ export declare interface SplitButtonProps extends Omit<React_2.HTMLAttributes<HT
|
|
|
6461
8403
|
*/
|
|
6462
8404
|
export declare const Stack: PolymorphicComponent<'div', StackOwnProps>;
|
|
6463
8405
|
|
|
8406
|
+
/** Stack: `root` on the rendered element. */
|
|
8407
|
+
export declare const stackClassNames: {
|
|
8408
|
+
readonly root: "wave-stack";
|
|
8409
|
+
};
|
|
8410
|
+
|
|
6464
8411
|
/**
|
|
6465
8412
|
* The Stack's own props (the XOwnProps rule of `PolymorphicProps`: component-specific props only).
|
|
6466
8413
|
* Every other prop comes from the rendered element (`as`).
|
|
@@ -6525,6 +8472,12 @@ export declare const Stepper: {
|
|
|
6525
8472
|
};
|
|
6526
8473
|
};
|
|
6527
8474
|
|
|
8475
|
+
/** Stepper: `root` on the `role="group"` element; `list` on its `<ol>`. */
|
|
8476
|
+
export declare const stepperClassNames: {
|
|
8477
|
+
readonly root: "wave-stepper";
|
|
8478
|
+
readonly list: "wave-stepper__list";
|
|
8479
|
+
};
|
|
8480
|
+
|
|
6528
8481
|
/** Properties for the Stepper component. */
|
|
6529
8482
|
export declare interface StepperProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
6530
8483
|
/** Controlled index (0-based) of the currently active step. */
|
|
@@ -6574,6 +8527,23 @@ export declare const StepperStep: {
|
|
|
6574
8527
|
displayName: string;
|
|
6575
8528
|
};
|
|
6576
8529
|
|
|
8530
|
+
/**
|
|
8531
|
+
* Stepper.Step: `root` on the step's element inside its `<li>`; `listItem` on the `<li>`; `button`
|
|
8532
|
+
* on the `role="button"` element; `indicator` on the circle; `icon` on the `icon` slot inside it;
|
|
8533
|
+
* `label` on the label; `description` on the description; `connector` on the line to the next
|
|
8534
|
+
* step.
|
|
8535
|
+
*/
|
|
8536
|
+
export declare const stepperStepClassNames: {
|
|
8537
|
+
readonly root: "wave-stepper-step";
|
|
8538
|
+
readonly listItem: "wave-stepper-step__list-item";
|
|
8539
|
+
readonly button: "wave-stepper-step__button";
|
|
8540
|
+
readonly indicator: "wave-stepper-step__indicator";
|
|
8541
|
+
readonly icon: "wave-stepper-step__icon";
|
|
8542
|
+
readonly label: "wave-stepper-step__label";
|
|
8543
|
+
readonly description: "wave-stepper-step__description";
|
|
8544
|
+
readonly connector: "wave-stepper-step__connector";
|
|
8545
|
+
};
|
|
8546
|
+
|
|
6577
8547
|
/** Properties for the Step sub-component. */
|
|
6578
8548
|
export declare interface StepProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
6579
8549
|
/** Label text for the step. */
|
|
@@ -6659,6 +8629,12 @@ export declare const SwatchPicker: {
|
|
|
6659
8629
|
displayName: string;
|
|
6660
8630
|
};
|
|
6661
8631
|
|
|
8632
|
+
/** SwatchPicker: `root` on the `role="radiogroup"` element; `swatch` on each `role="radio"` button. */
|
|
8633
|
+
export declare const swatchPickerClassNames: {
|
|
8634
|
+
readonly root: "wave-swatch-picker";
|
|
8635
|
+
readonly swatch: "wave-swatch-picker__swatch";
|
|
8636
|
+
};
|
|
8637
|
+
|
|
6662
8638
|
/** Properties for the SwatchPicker component. */
|
|
6663
8639
|
export declare interface SwatchPickerProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
6664
8640
|
/** The swatches to display, in order (a readonly array is accepted; it is never modified). */
|
|
@@ -6718,12 +8694,25 @@ export declare type SwatchPickerSize = Extract<Size, 'small' | 'medium' | 'large
|
|
|
6718
8694
|
* `labelPosition` (the root carries `data-label-position`). Beside the label, the switch lines
|
|
6719
8695
|
* up with the first line of a label that wraps or has a second line. `children` are not
|
|
6720
8696
|
* rendered (a development warning says so).
|
|
8697
|
+
* - `size` (`small`, `medium`) sets the track and thumb dimensions; the root carries `data-size`.
|
|
8698
|
+
* Switch does not read a surrounding `Field`'s size or a `WaveProvider`'s input defaults.
|
|
6721
8699
|
*/
|
|
6722
8700
|
export declare const Switch: {
|
|
6723
|
-
({ checked: checkedProp, defaultChecked, onCheckedChange, onChange, disabled, disabledFocusable, label, labelPosition, name, value, required, form, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, "aria-details": ariaDetails, "aria-disabled": ariaDisabled, autoFocus, tabIndex, onClick, onFocus, onBlur, onKeyDown, onKeyUp, controlRef, className, children, ref, ...rest }: SwitchProps): React_2.JSX.Element;
|
|
8701
|
+
({ checked: checkedProp, defaultChecked, onCheckedChange, onChange, disabled, disabledFocusable, label, labelPosition, size, name, value, required, form, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, "aria-details": ariaDetails, "aria-disabled": ariaDisabled, autoFocus, tabIndex, onClick, onFocus, onBlur, onKeyDown, onKeyUp, controlRef, className, children, ref, ...rest }: SwitchProps): React_2.JSX.Element;
|
|
6724
8702
|
displayName: string;
|
|
6725
8703
|
};
|
|
6726
8704
|
|
|
8705
|
+
/**
|
|
8706
|
+
* Switch: `root` on the `<label>`; `track` on the `role="switch"` button; `thumb` on its thumb;
|
|
8707
|
+
* `label` on the label text.
|
|
8708
|
+
*/
|
|
8709
|
+
export declare const switchClassNames: {
|
|
8710
|
+
readonly root: "wave-switch";
|
|
8711
|
+
readonly track: "wave-switch__track";
|
|
8712
|
+
readonly thumb: "wave-switch__thumb";
|
|
8713
|
+
readonly label: "wave-switch__label";
|
|
8714
|
+
};
|
|
8715
|
+
|
|
6727
8716
|
/** Handlers that run on the `role="switch"` button instead of the root label (C-ROUTING). */
|
|
6728
8717
|
declare type SwitchControlHandlers = 'onClick' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp';
|
|
6729
8718
|
|
|
@@ -6772,6 +8761,14 @@ export declare interface SwitchProps extends Omit<React_2.HTMLAttributes<HTMLLab
|
|
|
6772
8761
|
* @default 'after'
|
|
6773
8762
|
*/
|
|
6774
8763
|
labelPosition?: SwitchLabelPosition;
|
|
8764
|
+
/**
|
|
8765
|
+
* Size of the track: the 0.7 40x20 track with a 14px thumb, or a small 32x16 track with a 10px
|
|
8766
|
+
* thumb and a 24px-tall pointer target. Unlike the text controls and pickers, Switch does not
|
|
8767
|
+
* read a surrounding Field's size or a WaveProvider's input defaults: this prop is the only
|
|
8768
|
+
* source of its size.
|
|
8769
|
+
* @default 'medium'
|
|
8770
|
+
*/
|
|
8771
|
+
size?: SwitchSize;
|
|
6775
8772
|
/**
|
|
6776
8773
|
* Form field name. With a name, the switch takes part in native form submission: it submits
|
|
6777
8774
|
* `name=value` while on.
|
|
@@ -6801,6 +8798,9 @@ export declare interface SwitchProps extends Omit<React_2.HTMLAttributes<HTMLLab
|
|
|
6801
8798
|
ref?: React_2.Ref<HTMLLabelElement>;
|
|
6802
8799
|
}
|
|
6803
8800
|
|
|
8801
|
+
/** Size of the track: a 32x16 track with a 10px thumb, or the 0.7 40x20 track with a 14px thumb. */
|
|
8802
|
+
export declare type SwitchSize = Extract<Size, 'small' | 'medium'>;
|
|
8803
|
+
|
|
6804
8804
|
/**
|
|
6805
8805
|
* A non-interactive data table with an optional striped body. The table sits in a horizontally
|
|
6806
8806
|
* scrollable wrapper; while it scrolls, the wrapper is a focusable region (named by
|
|
@@ -6853,6 +8853,11 @@ export declare const TableBody: {
|
|
|
6853
8853
|
displayName: string;
|
|
6854
8854
|
};
|
|
6855
8855
|
|
|
8856
|
+
/** Table.Body: `root` on the `<tbody>`. */
|
|
8857
|
+
export declare const tableBodyClassNames: {
|
|
8858
|
+
readonly root: "wave-table-body";
|
|
8859
|
+
};
|
|
8860
|
+
|
|
6856
8861
|
/** Properties for the TableBody sub-component. */
|
|
6857
8862
|
export declare interface TableBodyProps extends React_2.HTMLAttributes<HTMLTableSectionElement> {
|
|
6858
8863
|
/** Table row elements. */
|
|
@@ -6867,6 +8872,11 @@ export declare const TableCell: {
|
|
|
6867
8872
|
displayName: string;
|
|
6868
8873
|
};
|
|
6869
8874
|
|
|
8875
|
+
/** Table.Cell: `root` on the `<td>`. */
|
|
8876
|
+
export declare const tableCellClassNames: {
|
|
8877
|
+
readonly root: "wave-table-cell";
|
|
8878
|
+
};
|
|
8879
|
+
|
|
6870
8880
|
/** Properties for the TableCell sub-component. */
|
|
6871
8881
|
export declare interface TableCellProps extends React_2.TdHTMLAttributes<HTMLTableCellElement> {
|
|
6872
8882
|
/** Cell content. */
|
|
@@ -6875,6 +8885,12 @@ export declare interface TableCellProps extends React_2.TdHTMLAttributes<HTMLTab
|
|
|
6875
8885
|
ref?: React_2.Ref<HTMLTableCellElement>;
|
|
6876
8886
|
}
|
|
6877
8887
|
|
|
8888
|
+
/** Table: `root` on the `<table>`; `container` on the scroll wrapper around it. */
|
|
8889
|
+
export declare const tableClassNames: {
|
|
8890
|
+
readonly root: "wave-table";
|
|
8891
|
+
readonly container: "wave-table__container";
|
|
8892
|
+
};
|
|
8893
|
+
|
|
6878
8894
|
/** @deprecated Use `Table.Header` (`TableHeader`). */
|
|
6879
8895
|
export declare const TableHead: {
|
|
6880
8896
|
(props: TableHeadProps): React_2.JSX.Element;
|
|
@@ -6902,6 +8918,11 @@ export declare const TableHeaderCell: {
|
|
|
6902
8918
|
displayName: string;
|
|
6903
8919
|
};
|
|
6904
8920
|
|
|
8921
|
+
/** Table.HeaderCell (and the deprecated Table.HeadCell): `root` on the `<th>`. */
|
|
8922
|
+
export declare const tableHeaderCellClassNames: {
|
|
8923
|
+
readonly root: "wave-table-header-cell";
|
|
8924
|
+
};
|
|
8925
|
+
|
|
6905
8926
|
/** Properties for the TableHeaderCell sub-component. */
|
|
6906
8927
|
export declare interface TableHeaderCellProps extends React_2.ThHTMLAttributes<HTMLTableCellElement> {
|
|
6907
8928
|
/** Header cell content. */
|
|
@@ -6910,6 +8931,11 @@ export declare interface TableHeaderCellProps extends React_2.ThHTMLAttributes<H
|
|
|
6910
8931
|
ref?: React_2.Ref<HTMLTableCellElement>;
|
|
6911
8932
|
}
|
|
6912
8933
|
|
|
8934
|
+
/** Table.Header (and the deprecated Table.Head): `root` on the `<thead>`. */
|
|
8935
|
+
export declare const tableHeaderClassNames: {
|
|
8936
|
+
readonly root: "wave-table-header";
|
|
8937
|
+
};
|
|
8938
|
+
|
|
6913
8939
|
/** Properties for the TableHeader sub-component. */
|
|
6914
8940
|
export declare interface TableHeaderProps extends React_2.HTMLAttributes<HTMLTableSectionElement> {
|
|
6915
8941
|
/** Table header row elements. */
|
|
@@ -6951,6 +8977,11 @@ export declare const TableRow: {
|
|
|
6951
8977
|
displayName: string;
|
|
6952
8978
|
};
|
|
6953
8979
|
|
|
8980
|
+
/** Table.Row: `root` on the `<tr>`. */
|
|
8981
|
+
export declare const tableRowClassNames: {
|
|
8982
|
+
readonly root: "wave-table-row";
|
|
8983
|
+
};
|
|
8984
|
+
|
|
6954
8985
|
/** Properties for the TableRow sub-component. */
|
|
6955
8986
|
export declare interface TableRowProps extends React_2.HTMLAttributes<HTMLTableRowElement> {
|
|
6956
8987
|
/** Table cell elements. */
|
|
@@ -6996,6 +9027,11 @@ export declare const TabList: {
|
|
|
6996
9027
|
};
|
|
6997
9028
|
};
|
|
6998
9029
|
|
|
9030
|
+
/** TabList: `root` on the `role="tablist"` element. */
|
|
9031
|
+
export declare const tabListClassNames: {
|
|
9032
|
+
readonly root: "wave-tab-list";
|
|
9033
|
+
};
|
|
9034
|
+
|
|
6999
9035
|
/**
|
|
7000
9036
|
* The content of one tab, rendered only while its tab is selected and labelled by it (while a Tab
|
|
7001
9037
|
* with its value is mounted). A non-empty `id` replaces the generated one (the tab's
|
|
@@ -7006,6 +9042,11 @@ export declare const TabListPanel: {
|
|
|
7006
9042
|
displayName: string;
|
|
7007
9043
|
};
|
|
7008
9044
|
|
|
9045
|
+
/** TabList.Panel: `root` on the `role="tabpanel"` element. */
|
|
9046
|
+
export declare const tabListPanelClassNames: {
|
|
9047
|
+
readonly root: "wave-tab-list-panel";
|
|
9048
|
+
};
|
|
9049
|
+
|
|
7009
9050
|
/**
|
|
7010
9051
|
* Optional container for the panels, rendered after the tablist. Use it to style the panel area,
|
|
7011
9052
|
* and for panels that components render themselves: the TabList finds a Panel in its children, in
|
|
@@ -7017,6 +9058,11 @@ export declare const TabListPanels: {
|
|
|
7017
9058
|
displayName: string;
|
|
7018
9059
|
};
|
|
7019
9060
|
|
|
9061
|
+
/** TabList.Panels: `root` on the element around the panels. */
|
|
9062
|
+
export declare const tabListPanelsClassNames: {
|
|
9063
|
+
readonly root: "wave-tab-list-panels";
|
|
9064
|
+
};
|
|
9065
|
+
|
|
7020
9066
|
/** Properties for the TabList component. */
|
|
7021
9067
|
export declare interface TabListProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'defaultValue'> {
|
|
7022
9068
|
/**
|
|
@@ -7078,6 +9124,11 @@ export declare const TabListTab: {
|
|
|
7078
9124
|
displayName: string;
|
|
7079
9125
|
};
|
|
7080
9126
|
|
|
9127
|
+
/** TabList.Tab: `root` on the `role="tab"` button. */
|
|
9128
|
+
export declare const tabListTabClassNames: {
|
|
9129
|
+
readonly root: "wave-tab-list-tab";
|
|
9130
|
+
};
|
|
9131
|
+
|
|
7081
9132
|
/** Properties for the TabPanel sub-component. */
|
|
7082
9133
|
export declare interface TabPanelProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
7083
9134
|
/** Value of the Tab that shows this panel. */
|
|
@@ -7121,6 +9172,18 @@ export declare interface TabProps extends React_2.ButtonHTMLAttributes<HTMLButto
|
|
|
7121
9172
|
*/
|
|
7122
9173
|
export declare const Tag: PolymorphicComponent<'span', TagOwnProps>;
|
|
7123
9174
|
|
|
9175
|
+
/**
|
|
9176
|
+
* Tag: `root` on the rendered element (your `as`, default `<span>`); `primaryText` on the content
|
|
9177
|
+
* span; `dismissButton` on the Dismiss button; `dismissIcon` on the icon inside it (what
|
|
9178
|
+
* `dismissIcon` renders, a merged Button's icon span, else the default `<svg>`).
|
|
9179
|
+
*/
|
|
9180
|
+
export declare const tagClassNames: {
|
|
9181
|
+
readonly root: "wave-tag";
|
|
9182
|
+
readonly primaryText: "wave-tag__primary-text";
|
|
9183
|
+
readonly dismissButton: "wave-tag__dismiss-button";
|
|
9184
|
+
readonly dismissIcon: "wave-tag__dismiss-icon";
|
|
9185
|
+
};
|
|
9186
|
+
|
|
7124
9187
|
/**
|
|
7125
9188
|
* The Tag's own props (the XOwnProps rule of `PolymorphicProps`: component-specific props only).
|
|
7126
9189
|
* Every other prop comes from the rendered element (`as`, default `span`).
|
|
@@ -7209,12 +9272,38 @@ export declare interface TagOwnProps {
|
|
|
7209
9272
|
* Selected values without a matching option are shown with their raw value. The open list renders
|
|
7210
9273
|
* only in the browser: an open list (`defaultOpen`, `open`) is closed in the server HTML and opens
|
|
7211
9274
|
* once the picker has hydrated.
|
|
9275
|
+
*
|
|
9276
|
+
* **Size and appearance**: `size` resolves from its own prop, then the surrounding `Field`'s
|
|
9277
|
+
* `size`, then `WaveProvider inputDefaults.size`, else `'medium'` (a Field or provider `small`
|
|
9278
|
+
* gives `'medium'` too, since TagPicker has no `small`); `appearance` from its own prop, then
|
|
9279
|
+
* `WaveProvider inputDefaults.appearance`, else `'outline'`; both render as `data-size` and
|
|
9280
|
+
* `data-appearance` on the root `<div>`. The option list keeps its size.
|
|
7212
9281
|
*/
|
|
7213
9282
|
export declare const TagPicker: {
|
|
7214
9283
|
(props: TagPickerProps): React_2.JSX.Element;
|
|
7215
9284
|
displayName: string;
|
|
7216
9285
|
};
|
|
7217
9286
|
|
|
9287
|
+
/**
|
|
9288
|
+
* TagPicker: `root` on the outer element; `control` on the tag area; `group` on the list of tags;
|
|
9289
|
+
* `tag` on each tag; `removeButton` on each tag's remove button; `input` on the `role="combobox"`
|
|
9290
|
+
* input; `listbox` on the `role="listbox"` list; `option` on each Option it renders (which also
|
|
9291
|
+
* carries Option's classes); `surface` on the portaled popup; `emptyMessage` on the "No matches"
|
|
9292
|
+
* row.
|
|
9293
|
+
*/
|
|
9294
|
+
export declare const tagPickerClassNames: {
|
|
9295
|
+
readonly root: "wave-tag-picker";
|
|
9296
|
+
readonly control: "wave-tag-picker__control";
|
|
9297
|
+
readonly group: "wave-tag-picker__group";
|
|
9298
|
+
readonly tag: "wave-tag-picker__tag";
|
|
9299
|
+
readonly removeButton: "wave-tag-picker__remove-button";
|
|
9300
|
+
readonly input: "wave-tag-picker__input";
|
|
9301
|
+
readonly listbox: "wave-tag-picker__listbox";
|
|
9302
|
+
readonly option: "wave-tag-picker__option";
|
|
9303
|
+
readonly surface: "wave-tag-picker__surface";
|
|
9304
|
+
readonly emptyMessage: "wave-tag-picker__empty-message";
|
|
9305
|
+
};
|
|
9306
|
+
|
|
7218
9307
|
/**
|
|
7219
9308
|
* The TagPicker's built-in names, descriptions and announcements, for localization. Each member is
|
|
7220
9309
|
* optional and falls back to its English default.
|
|
@@ -7301,6 +9390,19 @@ export declare interface TagPickerProps extends Omit<React_2.HTMLAttributes<HTML
|
|
|
7301
9390
|
* @default false
|
|
7302
9391
|
*/
|
|
7303
9392
|
disabled?: boolean;
|
|
9393
|
+
/**
|
|
9394
|
+
* Size of the tags and the field: `medium` (the 0.7 look), `large` or `extra-large` (Fluent's
|
|
9395
|
+
* union; TagPicker has no `small`). Default: the surrounding Field's `size`, else `WaveProvider
|
|
9396
|
+
* inputDefaults.size`, else `'medium'`; a Field or provider `small` gives `'medium'` too. The
|
|
9397
|
+
* option list keeps its size.
|
|
9398
|
+
*/
|
|
9399
|
+
size?: TagPickerSize;
|
|
9400
|
+
/**
|
|
9401
|
+
* Look of the field: `outline` (a full border), `underline` (a bottom stroke only),
|
|
9402
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke: give the field a visible
|
|
9403
|
+
* label). Default: `WaveProvider inputDefaults.appearance`, else `'outline'`.
|
|
9404
|
+
*/
|
|
9405
|
+
appearance?: InputAppearance;
|
|
7304
9406
|
/** Name of the values in form submissions (one hidden input per value). */
|
|
7305
9407
|
name?: string;
|
|
7306
9408
|
/** Id of the form the values belong to, when the TagPicker is outside it. */
|
|
@@ -7348,6 +9450,9 @@ export declare interface TagPickerProps extends Omit<React_2.HTMLAttributes<HTML
|
|
|
7348
9450
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
7349
9451
|
}
|
|
7350
9452
|
|
|
9453
|
+
/** Sizes of TagPicker (Fluent's): medium (the 0.7 look), large and extra-large. */
|
|
9454
|
+
export declare type TagPickerSize = Extract<Size, 'medium' | 'large' | 'extra-large'>;
|
|
9455
|
+
|
|
7351
9456
|
/**
|
|
7352
9457
|
* Props of {@link Tag} rendered as `C` (default `'span'`). `TagProps` without a type argument is
|
|
7353
9458
|
* the 0.4 name.
|
|
@@ -7386,6 +9491,23 @@ export declare const TeachingPopover: {
|
|
|
7386
9491
|
displayName: string;
|
|
7387
9492
|
};
|
|
7388
9493
|
|
|
9494
|
+
/**
|
|
9495
|
+
* TeachingPopover: `root` on the `role="dialog"` surface; `beak` on the arrow; `closeButton`,
|
|
9496
|
+
* `backButton` and `nextButton` on its buttons (which also carry Button's root); `title` on the
|
|
9497
|
+
* `<h3>`; `body` on the step body; `footer` on the bottom row; `dot` on each step dot.
|
|
9498
|
+
*/
|
|
9499
|
+
export declare const teachingPopoverClassNames: {
|
|
9500
|
+
readonly root: "wave-teaching-popover";
|
|
9501
|
+
readonly beak: "wave-teaching-popover__beak";
|
|
9502
|
+
readonly closeButton: "wave-teaching-popover__close-button";
|
|
9503
|
+
readonly title: "wave-teaching-popover__title";
|
|
9504
|
+
readonly body: "wave-teaching-popover__body";
|
|
9505
|
+
readonly footer: "wave-teaching-popover__footer";
|
|
9506
|
+
readonly dot: "wave-teaching-popover__dot";
|
|
9507
|
+
readonly backButton: "wave-teaching-popover__back-button";
|
|
9508
|
+
readonly nextButton: "wave-teaching-popover__next-button";
|
|
9509
|
+
};
|
|
9510
|
+
|
|
7389
9511
|
/** The built-in text of a TeachingPopover, for localization (see `TeachingPopoverProps.labels`). */
|
|
7390
9512
|
export declare interface TeachingPopoverLabels {
|
|
7391
9513
|
/** Text of the Back button.
|
|
@@ -7513,16 +9635,27 @@ export { Text_2 as Text }
|
|
|
7513
9635
|
* bottom border while focused). Inside a `Field` it picks up the label, hint, error, `required`
|
|
7514
9636
|
* (native attribute) and invalid state automatically.
|
|
7515
9637
|
*
|
|
9638
|
+
* `size` resolves from its own prop, then the surrounding `Field`'s `size`, then
|
|
9639
|
+
* `WaveProvider inputDefaults.size`, else `'medium'`; `appearance` from its own prop, then
|
|
9640
|
+
* `WaveProvider inputDefaults.appearance`, else `'outline'`; both render as `data-size` and
|
|
9641
|
+
* `data-appearance` on the textarea element.
|
|
9642
|
+
*
|
|
7516
9643
|
* @example
|
|
7517
9644
|
* <Field label="Description" hint="Markdown is supported">
|
|
7518
9645
|
* <Textarea rows={4} />
|
|
7519
9646
|
* </Field>
|
|
7520
9647
|
*/
|
|
7521
9648
|
export declare const Textarea: {
|
|
7522
|
-
({ error, errorMessageProps, className, ref, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, required, ...props }: TextareaProps): React_2.JSX.Element;
|
|
9649
|
+
({ error, errorMessageProps, size: sizeProp, appearance: appearanceProp, className, ref, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, "aria-errormessage": ariaErrorMessage, required, ...props }: TextareaProps): React_2.JSX.Element;
|
|
7523
9650
|
displayName: string;
|
|
7524
9651
|
};
|
|
7525
9652
|
|
|
9653
|
+
/** Textarea: `root` on the `<textarea>`; `errorMessage` on the message after it, as Input's. */
|
|
9654
|
+
export declare const textareaClassNames: {
|
|
9655
|
+
readonly root: "wave-textarea";
|
|
9656
|
+
readonly errorMessage: "wave-textarea__error-message";
|
|
9657
|
+
};
|
|
9658
|
+
|
|
7526
9659
|
/** Properties for the Textarea component. */
|
|
7527
9660
|
export declare interface TextareaProps extends React_2.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
7528
9661
|
/**
|
|
@@ -7541,10 +9674,27 @@ export declare interface TextareaProps extends React_2.TextareaHTMLAttributes<HT
|
|
|
7541
9674
|
error?: string | boolean;
|
|
7542
9675
|
/** Props of the error message element (`id`, `className`, …) rendered for a string `error`. */
|
|
7543
9676
|
errorMessageProps?: InputErrorMessageProps;
|
|
9677
|
+
/**
|
|
9678
|
+
* Size of the field, a minimum height with its type ramp: `small` (64px, Caption 1 text),
|
|
9679
|
+
* `medium` (80px, Body 1) or `large` (96px, Body 2). Default: the surrounding Field's `size`,
|
|
9680
|
+
* else `WaveProvider inputDefaults.size`, else `'medium'`.
|
|
9681
|
+
*/
|
|
9682
|
+
size?: CoreSize;
|
|
9683
|
+
/**
|
|
9684
|
+
* Look of the field: `outline` (a full border), `underline` (a bottom stroke only),
|
|
9685
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke: give the field a visible
|
|
9686
|
+
* label). Default: `WaveProvider inputDefaults.appearance`, else `'outline'`.
|
|
9687
|
+
*/
|
|
9688
|
+
appearance?: InputAppearance;
|
|
7544
9689
|
/** Ref to the `<textarea>` element. */
|
|
7545
9690
|
ref?: React_2.Ref<HTMLTextAreaElement>;
|
|
7546
9691
|
}
|
|
7547
9692
|
|
|
9693
|
+
/** Text: `root` on the rendered element (your `as`, default `<span>`). */
|
|
9694
|
+
export declare const textClassNames: {
|
|
9695
|
+
readonly root: "wave-text";
|
|
9696
|
+
};
|
|
9697
|
+
|
|
7548
9698
|
/**
|
|
7549
9699
|
* The Text's own props (the XOwnProps rule of `PolymorphicProps`: component-specific props only).
|
|
7550
9700
|
* Every other prop comes from the rendered element (`as`, default `'span'`).
|
|
@@ -7603,6 +9753,10 @@ export declare type TextWeight = 'regular' | 'semibold' | 'bold';
|
|
|
7603
9753
|
* picker instead of to the clear button that disappears.
|
|
7604
9754
|
* - The value is `HH:mm` (24-hour) whatever the display `format`; values off the `step` grid or
|
|
7605
9755
|
* outside the bounds are still displayed in `format`.
|
|
9756
|
+
* - **Size and appearance**: `size` resolves from its own prop, then the surrounding `Field`'s
|
|
9757
|
+
* `size`, then `WaveProvider inputDefaults.size`, else `'medium'`; `appearance` from its own
|
|
9758
|
+
* prop, then `WaveProvider inputDefaults.appearance`, else `'outline'`; both render as
|
|
9759
|
+
* `data-size` and `data-appearance` on the root `<div>`. The time list keeps its size.
|
|
7606
9760
|
* - The input (`controlRef`) receives `id`, `aria-label`, `aria-labelledby`, `aria-describedby`,
|
|
7607
9761
|
* `aria-invalid`, `aria-required`, `aria-errormessage`, `aria-details`, `tabIndex`,
|
|
7608
9762
|
* `autoFocus`, `onFocus`/`onBlur`/`onKeyDown`/`onKeyUp` and the text input attributes
|
|
@@ -7619,6 +9773,27 @@ export declare const TimePicker: {
|
|
|
7619
9773
|
displayName: string;
|
|
7620
9774
|
};
|
|
7621
9775
|
|
|
9776
|
+
/**
|
|
9777
|
+
* TimePicker: `root` on the outer element; `input` on the `role="combobox"` input; `clearButton`
|
|
9778
|
+
* on the clear button; `expandButton` on the expand button and `expandIcon` on its glyph;
|
|
9779
|
+
* `errorMessage` on the `role="alert"` message; `listbox` on the `role="listbox"` list; `option`
|
|
9780
|
+
* on each option; `checkIcon` on each option's check column; `surface` on the portaled popup;
|
|
9781
|
+
* `emptyMessage` on its status row.
|
|
9782
|
+
*/
|
|
9783
|
+
export declare const timePickerClassNames: {
|
|
9784
|
+
readonly root: "wave-time-picker";
|
|
9785
|
+
readonly input: "wave-time-picker__input";
|
|
9786
|
+
readonly clearButton: "wave-time-picker__clear-button";
|
|
9787
|
+
readonly expandButton: "wave-time-picker__expand-button";
|
|
9788
|
+
readonly expandIcon: "wave-time-picker__expand-icon";
|
|
9789
|
+
readonly errorMessage: "wave-time-picker__error-message";
|
|
9790
|
+
readonly listbox: "wave-time-picker__listbox";
|
|
9791
|
+
readonly option: "wave-time-picker__option";
|
|
9792
|
+
readonly checkIcon: "wave-time-picker__check-icon";
|
|
9793
|
+
readonly surface: "wave-time-picker__surface";
|
|
9794
|
+
readonly emptyMessage: "wave-time-picker__empty-message";
|
|
9795
|
+
};
|
|
9796
|
+
|
|
7622
9797
|
/** Why typed text was not accepted (see {@link TimePickerProps.onInvalidInput}). */
|
|
7623
9798
|
export declare type TimePickerInvalidReason = 'unparseable' | 'out-of-range';
|
|
7624
9799
|
|
|
@@ -7710,6 +9885,18 @@ export declare interface TimePickerProps extends Omit<React_2.HTMLAttributes<HTM
|
|
|
7710
9885
|
* @default false
|
|
7711
9886
|
*/
|
|
7712
9887
|
disabled?: boolean;
|
|
9888
|
+
/**
|
|
9889
|
+
* Size of the field: `small` (24px tall), `medium` (32px) or `large` (40px). Default: the
|
|
9890
|
+
* surrounding Field's `size`, else `WaveProvider inputDefaults.size`, else `'medium'`. The time
|
|
9891
|
+
* list keeps its size.
|
|
9892
|
+
*/
|
|
9893
|
+
size?: CoreSize;
|
|
9894
|
+
/**
|
|
9895
|
+
* Look of the field: `outline` (a full border), `underline` (a bottom stroke only),
|
|
9896
|
+
* `filled-darker` or `filled-lighter` (a fill without a visible stroke: give the field a visible
|
|
9897
|
+
* label). Default: `WaveProvider inputDefaults.appearance`, else `'outline'`.
|
|
9898
|
+
*/
|
|
9899
|
+
appearance?: InputAppearance;
|
|
7713
9900
|
/**
|
|
7714
9901
|
* Makes the input read-only: the list does not open and the value cannot change. Turning it (or
|
|
7715
9902
|
* `disabled`) on while the user is typing drops the typed text.
|
|
@@ -7788,59 +9975,206 @@ export declare interface TimePickerProps extends Omit<React_2.HTMLAttributes<HTM
|
|
|
7788
9975
|
}
|
|
7789
9976
|
|
|
7790
9977
|
/**
|
|
7791
|
-
*
|
|
7792
|
-
*
|
|
9978
|
+
* A notification: status icon, visually hidden severity text, title, body, footer and a Dismiss
|
|
9979
|
+
* button. Its parts are direct children: `Toast.Title` (the title row, with an optional
|
|
9980
|
+
* `action`), `Toast.Body` (with an optional `subtitle`) and `Toast.Footer` (a row of actions); a
|
|
9981
|
+
* `Toast.Close` anywhere inside makes its child dismiss the toast. The `title` prop and plain
|
|
9982
|
+
* children are the 0.5 form and render as a Title and a Body.
|
|
9983
|
+
*
|
|
9984
|
+
* Dispatch it with `useToastController().dispatchToast(<Toast>…</Toast>)`, or render it yourself.
|
|
7793
9985
|
*
|
|
7794
|
-
* - **In a Toaster
|
|
7795
|
-
*
|
|
9986
|
+
* - **In a Toaster**: not a live region itself; the Toaster announces it once per dispatch through
|
|
9987
|
+
* its permanent live regions (its severity text, then its title, body and the labels of its
|
|
9988
|
+
* actions, never the Dismiss button, or, after the severity text, the dispatch's
|
|
9989
|
+
* `announcement`), politely or, for `error`, assertively, and names its container by the
|
|
9990
|
+
* severity text and title. Every Toast there shows the Dismiss button.
|
|
7796
9991
|
* - **On its own** (your own container, an inline notice): a live region, as in 0.4 —
|
|
7797
9992
|
* `role="status"` with `aria-live="polite"`, or `role="alert"` with `aria-live="assertive"` for
|
|
7798
9993
|
* `error` (override with `role`/`aria-live`). A live region that is added together with its
|
|
7799
9994
|
* text is not announced by every screen reader, so render the Toast in advance and change its
|
|
7800
9995
|
* content, or dispatch it through a Toaster.
|
|
9996
|
+
*
|
|
9997
|
+
* Sub-components are also exported under flat names (`ToastTitle`, `ToastBody`, `ToastFooter`,
|
|
9998
|
+
* `ToastClose`): React Server Components import those, because dotted access (`Toast.Title`)
|
|
9999
|
+
* needs a client file.
|
|
7801
10000
|
*/
|
|
7802
10001
|
export declare const Toast: {
|
|
7803
|
-
({ status, title, statusLabel, onDismiss, dismissLabel, className, children, ref, ...rest }: ToastProps):
|
|
10002
|
+
({ status, title, statusLabel, icon, onDismiss, dismissLabel, className, children, ref, ...rest }: ToastProps): JSX.Element;
|
|
10003
|
+
displayName: string;
|
|
10004
|
+
} & {
|
|
10005
|
+
Title: {
|
|
10006
|
+
({ action, className, children, ref, ...rest }: ToastTitleProps): JSX.Element;
|
|
10007
|
+
displayName: string;
|
|
10008
|
+
};
|
|
10009
|
+
Body: {
|
|
10010
|
+
({ subtitle, id: idProp, className, children, ref, ...rest }: ToastBodyProps): JSX.Element;
|
|
10011
|
+
displayName: string;
|
|
10012
|
+
};
|
|
10013
|
+
Footer: {
|
|
10014
|
+
({ className, ref, ...rest }: ToastFooterProps): JSX.Element;
|
|
10015
|
+
displayName: string;
|
|
10016
|
+
};
|
|
10017
|
+
Close: {
|
|
10018
|
+
({ children, asChild, ref, ...rest }: ToastCloseProps): ReactNode;
|
|
10019
|
+
displayName: string;
|
|
10020
|
+
};
|
|
10021
|
+
};
|
|
10022
|
+
|
|
10023
|
+
/**
|
|
10024
|
+
* The body text and an optional `subtitle`, which describe the toast. Your `id` is the id the
|
|
10025
|
+
* toast's description points at (a generated one otherwise).
|
|
10026
|
+
*
|
|
10027
|
+
* Also exported as `ToastBody` (import the flat name from React Server Components).
|
|
10028
|
+
*/
|
|
10029
|
+
export declare const ToastBody: {
|
|
10030
|
+
({ subtitle, id: idProp, className, children, ref, ...rest }: ToastBodyProps): React_2.JSX.Element;
|
|
10031
|
+
displayName: string;
|
|
10032
|
+
};
|
|
10033
|
+
|
|
10034
|
+
/**
|
|
10035
|
+
* Toast.Body: `root` on the body element (also the one plain children render); `subtitle` on the
|
|
10036
|
+
* `subtitle` line inside it.
|
|
10037
|
+
*/
|
|
10038
|
+
export declare const toastBodyClassNames: {
|
|
10039
|
+
readonly root: "wave-toast-body";
|
|
10040
|
+
readonly subtitle: "wave-toast-body__subtitle";
|
|
10041
|
+
};
|
|
10042
|
+
|
|
10043
|
+
/** Properties for the ToastBody sub-component. */
|
|
10044
|
+
export declare interface ToastBodyProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
10045
|
+
/** A secondary line under the body text. */
|
|
10046
|
+
subtitle?: React_2.ReactNode;
|
|
10047
|
+
/** Ref to the body element. */
|
|
10048
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
10049
|
+
}
|
|
10050
|
+
|
|
10051
|
+
/**
|
|
10052
|
+
* Toast: `root` on the toast; `icon` on the status icon span (or your `icon` slot); `content` on
|
|
10053
|
+
* the text column that holds the title, body and footer; `dismissButton` on the Dismiss button.
|
|
10054
|
+
*/
|
|
10055
|
+
export declare const toastClassNames: {
|
|
10056
|
+
readonly root: "wave-toast";
|
|
10057
|
+
readonly icon: "wave-toast__icon";
|
|
10058
|
+
readonly content: "wave-toast__content";
|
|
10059
|
+
readonly dismissButton: "wave-toast__dismiss-button";
|
|
10060
|
+
};
|
|
10061
|
+
|
|
10062
|
+
/**
|
|
10063
|
+
* Makes its single child dismiss the toast: it calls the Toast's `onDismiss` (when there is one),
|
|
10064
|
+
* then, inside the Toaster, dismisses the toast. Your `onClick` runs first; `preventDefault()`
|
|
10065
|
+
* keeps the toast. Works in dispatched content with or without a `Toast`. Fluent's `ToastTrigger`.
|
|
10066
|
+
*
|
|
10067
|
+
* Also exported as `ToastClose` (import the flat name from React Server Components).
|
|
10068
|
+
*/
|
|
10069
|
+
export declare const ToastClose: {
|
|
10070
|
+
({ children, asChild, ref, ...rest }: ToastCloseProps): React_2.ReactNode;
|
|
7804
10071
|
displayName: string;
|
|
7805
10072
|
};
|
|
7806
10073
|
|
|
10074
|
+
/** Properties for the ToastClose sub-component (as `DialogCloseProps`). */
|
|
10075
|
+
export declare interface ToastCloseProps extends Omit<React_2.HTMLAttributes<HTMLElement>, 'children'> {
|
|
10076
|
+
/** The element that dismisses the toast; a single element gets a composed `onClick`, a function the props. */
|
|
10077
|
+
children: React_2.ReactNode | ((props: ToastCloseRenderProps) => React_2.ReactNode);
|
|
10078
|
+
/** `false` renders a wrapper `<span>` that dismisses on click. @default true */
|
|
10079
|
+
asChild?: boolean;
|
|
10080
|
+
/** Ref to the close element (the child, or the wrapper span). */
|
|
10081
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
10082
|
+
}
|
|
10083
|
+
|
|
10084
|
+
/** Props a `Toast.Close` puts on its element (and passes to a render-prop child), as `DialogCloseRenderProps`. */
|
|
10085
|
+
export declare interface ToastCloseRenderProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
10086
|
+
onClick: React_2.MouseEventHandler<HTMLElement>;
|
|
10087
|
+
/** A callback ref, so the props spread onto any element type. */
|
|
10088
|
+
ref: React_2.RefCallback<HTMLElement>;
|
|
10089
|
+
}
|
|
10090
|
+
|
|
7807
10091
|
/** The toast API returned by {@link useToastController}. */
|
|
7808
10092
|
export declare interface ToastController {
|
|
7809
10093
|
/**
|
|
7810
|
-
* Shows a toast and returns its id (
|
|
7811
|
-
*
|
|
10094
|
+
* Shows a toast and returns its id. `dispatchToast(content, options?)` shows your content,
|
|
10095
|
+
* usually a `<Toast>` with parts; `dispatchToast(options)` builds a toast from text (0.5). A
|
|
10096
|
+
* plain object is read as options; anything else (an element, a portal, a string) is content. A
|
|
10097
|
+
* toast with the same id is replaced (revived while it exits); beyond the Toaster's `limit` the
|
|
10098
|
+
* toast waits in a queue. Fluent's `dispatchToast(content, options)` returns nothing.
|
|
7812
10099
|
*/
|
|
7813
|
-
dispatchToast:
|
|
10100
|
+
dispatchToast: {
|
|
10101
|
+
(content: React_2.ReactNode, options?: ToastDispatchOptions): string;
|
|
10102
|
+
(options: ToastOptions): string;
|
|
10103
|
+
};
|
|
7814
10104
|
/**
|
|
7815
|
-
*
|
|
7816
|
-
* ignored.
|
|
10105
|
+
* Dismisses the toast with this id and cancels its timer: a shown toast exits (it stays, inert,
|
|
10106
|
+
* until an exit motion of yours ends), a waiting one is removed. Unknown ids are ignored.
|
|
7817
10107
|
*/
|
|
7818
10108
|
dismissToast: (id: string) => void;
|
|
7819
|
-
/**
|
|
10109
|
+
/**
|
|
10110
|
+
* Dismisses every toast and cancels their timers: shown toasts exit (as `dismissToast`), queued
|
|
10111
|
+
* ones are removed.
|
|
10112
|
+
*/
|
|
7820
10113
|
dismissAllToasts: () => void;
|
|
7821
10114
|
}
|
|
7822
10115
|
|
|
10116
|
+
/** Options of `dispatchToast(content, options)`, the form that shows your own React content. */
|
|
10117
|
+
export declare interface ToastDispatchOptions {
|
|
10118
|
+
/** As `ToastOptions.toastId`: dispatching again with the id of a shown or exiting toast replaces it. */
|
|
10119
|
+
toastId?: string;
|
|
10120
|
+
/**
|
|
10121
|
+
* Auto-dismiss timeout in milliseconds, as `ToastOptions.timeout`. A toast that holds an action
|
|
10122
|
+
* (an interactive element besides its Dismiss button) stays until it is dismissed unless you
|
|
10123
|
+
* pass one: people using a screen reader, a switch or voice control need time to reach it.
|
|
10124
|
+
* @default 5000, or no timeout for a toast with an action
|
|
10125
|
+
*/
|
|
10126
|
+
timeout?: number;
|
|
10127
|
+
/**
|
|
10128
|
+
* Severity of content that renders no `Toast`: the announcement's politeness (`error` is
|
|
10129
|
+
* assertive), its spoken prefix and the container's name. A rendered `Toast` uses its own
|
|
10130
|
+
* `status`; a different value passed here warns in development.
|
|
10131
|
+
* @default 'info'
|
|
10132
|
+
*/
|
|
10133
|
+
status?: Status;
|
|
10134
|
+
/** Visually hidden severity text for content that renders no `Toast` (as `Toast.statusLabel`). */
|
|
10135
|
+
statusLabel?: string;
|
|
10136
|
+
/**
|
|
10137
|
+
* Text announced instead of the toast's title, body and action labels (the severity text still
|
|
10138
|
+
* comes first), for a toast whose visible text is no good announcement, such as a progress toast.
|
|
10139
|
+
*/
|
|
10140
|
+
announcement?: string;
|
|
10141
|
+
}
|
|
10142
|
+
|
|
7823
10143
|
/**
|
|
7824
10144
|
* Provides {@link useToastController} to its children and shows the dispatched toasts.
|
|
7825
10145
|
*
|
|
7826
|
-
* - **Wrap the app** in `<Toaster>`; components below it call `useToastController()
|
|
10146
|
+
* - **Wrap the app** in `<Toaster>`; components below it call `useToastController()`, and code
|
|
10147
|
+
* outside components (a query-cache callback, a server-event handler) dispatches through a
|
|
10148
|
+
* handle from `createToaster()` bound with `toaster`, which also runs several Toasters side by
|
|
10149
|
+
* side (one handle each).
|
|
10150
|
+
* - **Two ways to dispatch:** `dispatchToast(<Toast>…</Toast>)` shows your content, usually a
|
|
10151
|
+
* `Toast` with `Toast.Title`, `Toast.Body` and `Toast.Footer`; `dispatchToast({ title, body })`
|
|
10152
|
+
* builds a toast from text. Both return the toast's id. Content without a `Toast` takes its
|
|
10153
|
+
* severity from the options (`status`, `statusLabel`) and shows no Dismiss button (add a
|
|
10154
|
+
* `Toast.Close`).
|
|
7827
10155
|
* - The toasts render in a portal (the `toast` layer, above dialogs) inside a region labelled
|
|
7828
10156
|
* "Notifications" (override with `aria-label`). The region is allow-listed for modals
|
|
7829
10157
|
* (`data-wave-focus-trap-allow`): it stays reachable by Tab and exposed to assistive technology
|
|
7830
10158
|
* while a Dialog or Drawer is open, and clicking a toast never dismisses the overlay below.
|
|
7831
10159
|
* - Two permanent, visually hidden live regions (polite, and assertive for `error`) announce every
|
|
7832
|
-
* toast
|
|
7833
|
-
*
|
|
10160
|
+
* toast once per dispatch, read from what it renders after it mounts: the severity text, then
|
|
10161
|
+
* the title, the body and the labels of its actions (never the Dismiss button) or, instead of
|
|
10162
|
+
* those, the dispatch's `announcement`.
|
|
10163
|
+
* The toasts themselves are not live regions. Each message stays in its live region for 2
|
|
10164
|
+
* seconds (or until its toast goes), so browsing the region later meets the text only once.
|
|
7834
10165
|
* - While an open modal panel covers the toasts' corner (a Drawer on the same side), the toasts
|
|
7835
10166
|
* move beside it, so they never hide its focused controls (WCAG 2.4.11). Without room beside it
|
|
7836
10167
|
* (a full-width panel on a narrow screen) they keep their corner.
|
|
7837
|
-
* - Timers pause while
|
|
7838
|
-
*
|
|
7839
|
-
*
|
|
7840
|
-
*
|
|
7841
|
-
*
|
|
7842
|
-
*
|
|
7843
|
-
*
|
|
10168
|
+
* - Timers pause while the pointer or focus is anywhere in the toast region, a menu or popover
|
|
10169
|
+
* opened from a toast included (someone reading or operating one toast is reading the stack),
|
|
10170
|
+
* and while the window is in the background (it has lost focus, or the page is not shown, as in
|
|
10171
|
+
* a background tab). When a toast that contains focus goes away, focus moves to the next toast
|
|
10172
|
+
* (or the previous one), or back to the element that was focused before focus entered the
|
|
10173
|
+
* toasts once no toast is left.
|
|
10174
|
+
* - **Keyboard:** `shortcuts.focus` names a key press that moves focus to the newest toast (use a
|
|
10175
|
+
* modifier, WCAG 2.1.4); Escape in the toast region dismisses every toast and returns focus to
|
|
10176
|
+
* where it was before focus entered the toasts (a tooltip or menu of a toast closes first, and a
|
|
10177
|
+
* Dialog below stays open); Delete or Backspace dismisses the focused toast.
|
|
7844
10178
|
* - Each toast's dismiss button is named "Dismiss"; pass `dismissLabel` to `dispatchToast` for
|
|
7845
10179
|
* other languages.
|
|
7846
10180
|
* - `limit` caps how many toasts show at once: the others wait in a queue, in dispatch order,
|
|
@@ -7853,10 +10187,27 @@ export declare interface ToastController {
|
|
|
7853
10187
|
* </Toaster>
|
|
7854
10188
|
*/
|
|
7855
10189
|
export declare const Toaster: {
|
|
7856
|
-
({ position, limit: limitProp, className, style, children, onFocus, onBlur, ref, ...rest }: ToasterProps): React_2.JSX.Element;
|
|
10190
|
+
({ position, limit: limitProp, shortcuts, toaster: handle, className, style, children, onFocus, onBlur, onKeyDown, onPointerEnter, onPointerLeave, onPointerOver, ref, ...rest }: ToasterProps): React_2.JSX.Element;
|
|
7857
10191
|
displayName: string;
|
|
7858
10192
|
};
|
|
7859
10193
|
|
|
10194
|
+
/**
|
|
10195
|
+
* Toaster: `root` on the portaled toast region; `toast` on the `role="group"` container the
|
|
10196
|
+
* Toaster renders around each toast.
|
|
10197
|
+
*/
|
|
10198
|
+
export declare const toasterClassNames: {
|
|
10199
|
+
readonly root: "wave-toaster";
|
|
10200
|
+
readonly toast: "wave-toaster__toast";
|
|
10201
|
+
};
|
|
10202
|
+
|
|
10203
|
+
/**
|
|
10204
|
+
* A toast controller that code outside React components can call (a query-cache callback, a
|
|
10205
|
+
* server-event handler, a shared helper). Bind it to one Toaster with `<Toaster toaster={handle}>`;
|
|
10206
|
+
* toasts dispatched through it render there. One handle per Toaster is also how an app runs
|
|
10207
|
+
* several Toasters (Fluent's `toasterId`).
|
|
10208
|
+
*/
|
|
10209
|
+
export declare type ToasterHandle = ToastController;
|
|
10210
|
+
|
|
7860
10211
|
/** Properties for the Toaster container component. */
|
|
7861
10212
|
export declare interface ToasterProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
7862
10213
|
/**
|
|
@@ -7868,15 +10219,56 @@ export declare interface ToasterProps extends React_2.HTMLAttributes<HTMLDivElem
|
|
|
7868
10219
|
/**
|
|
7869
10220
|
* Most toasts shown at once. Further toasts wait in a queue (in dispatch order) and appear when
|
|
7870
10221
|
* a shown toast goes; a queued toast is not announced and its timer does not run until then.
|
|
7871
|
-
* Lowering it never hides a toast that is already shown
|
|
7872
|
-
*
|
|
10222
|
+
* Lowering it never hides a toast that is already shown, and a toast dispatched again with its id
|
|
10223
|
+
* while it exits comes back at once, even when `limit` toasts are already shown. A value below 1
|
|
10224
|
+
* counts as 1 (development warning); `Infinity` means no limit.
|
|
7873
10225
|
* @default Infinity
|
|
7874
10226
|
*/
|
|
7875
10227
|
limit?: number;
|
|
10228
|
+
/** Keyboard shortcuts; Escape, Delete and Backspace need none (see the component docs). */
|
|
10229
|
+
shortcuts?: ToasterShortcuts;
|
|
10230
|
+
/**
|
|
10231
|
+
* Binds this Toaster to a handle from `createToaster()`: toasts dispatched through the handle
|
|
10232
|
+
* render here. A handle binds one Toaster: a second Toaster given a bound handle does not bind
|
|
10233
|
+
* (development warning), and does not take the handle over when the first unmounts; the handle
|
|
10234
|
+
* queues again until a Toaster binds it.
|
|
10235
|
+
*/
|
|
10236
|
+
toaster?: ToasterHandle;
|
|
7876
10237
|
/** Ref to the toast region (the portaled `<div role="region">`). */
|
|
7877
10238
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
7878
10239
|
}
|
|
7879
10240
|
|
|
10241
|
+
/** Keyboard shortcuts of a Toaster (Fluent's shape). */
|
|
10242
|
+
export declare interface ToasterShortcuts {
|
|
10243
|
+
/**
|
|
10244
|
+
* Returns `true` for the key press that moves focus to the most recently dispatched toast, for
|
|
10245
|
+
* example `(event) => event.altKey && event.shiftKey && event.code === 'KeyN'`. Use a modifier
|
|
10246
|
+
* (or let people change or turn off the shortcut): a single-character shortcut fails WCAG 2.1.4.
|
|
10247
|
+
*/
|
|
10248
|
+
focus?: (event: KeyboardEvent) => boolean;
|
|
10249
|
+
}
|
|
10250
|
+
|
|
10251
|
+
/**
|
|
10252
|
+
* A row of actions under the body.
|
|
10253
|
+
*
|
|
10254
|
+
* Also exported as `ToastFooter` (import the flat name from React Server Components).
|
|
10255
|
+
*/
|
|
10256
|
+
export declare const ToastFooter: {
|
|
10257
|
+
({ className, ref, ...rest }: ToastFooterProps): React_2.JSX.Element;
|
|
10258
|
+
displayName: string;
|
|
10259
|
+
};
|
|
10260
|
+
|
|
10261
|
+
/** Toast.Footer: `root` on the row of actions. */
|
|
10262
|
+
export declare const toastFooterClassNames: {
|
|
10263
|
+
readonly root: "wave-toast-footer";
|
|
10264
|
+
};
|
|
10265
|
+
|
|
10266
|
+
/** Properties for the ToastFooter sub-component. */
|
|
10267
|
+
export declare interface ToastFooterProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
10268
|
+
/** Ref to the footer element. */
|
|
10269
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
10270
|
+
}
|
|
10271
|
+
|
|
7880
10272
|
/** Options for dispatching a toast notification. */
|
|
7881
10273
|
export declare interface ToastOptions {
|
|
7882
10274
|
/** Status level controlling the toast color, icon, status text and announcement politeness
|
|
@@ -7890,19 +10282,19 @@ export declare interface ToastOptions {
|
|
|
7890
10282
|
body?: string;
|
|
7891
10283
|
/**
|
|
7892
10284
|
* Auto-dismiss timeout in milliseconds. The countdown starts when the toast is shown (a toast
|
|
7893
|
-
* waiting beyond the Toaster's `limit` does not count down) and pauses while the pointer
|
|
7894
|
-
*
|
|
7895
|
-
* lost focus, or the page is not shown, as
|
|
7896
|
-
* there). `0` (or any value that is not a
|
|
7897
|
-
* dismissed.
|
|
10285
|
+
* waiting beyond the Toaster's `limit` does not count down) and pauses while the pointer or
|
|
10286
|
+
* focus is anywhere in the toast region (a menu or popover opened from a toast included) and
|
|
10287
|
+
* while the browser window is in the background (it has lost focus, or the page is not shown, as
|
|
10288
|
+
* in a background tab, also when the Toaster mounts there). `0` (or any value that is not a
|
|
10289
|
+
* positive finite number) keeps the toast until it is dismissed.
|
|
7898
10290
|
* @default 5000
|
|
7899
10291
|
*/
|
|
7900
10292
|
timeout?: number;
|
|
7901
10293
|
/**
|
|
7902
10294
|
* Identifier of the toast. `dispatchToast` returns it (a generated one when omitted). Dispatching
|
|
7903
|
-
* again with the id of a toast that is
|
|
7904
|
-
* the id of a toast that waits beyond the Toaster's
|
|
7905
|
-
* keeps its place in the queue.
|
|
10295
|
+
* again with the id of a toast that is shown, or still exiting after its dismissal, replaces or
|
|
10296
|
+
* revives that toast (content and timer); with the id of a toast that waits beyond the Toaster's
|
|
10297
|
+
* `limit`, it replaces its options and the toast keeps its place in the queue.
|
|
7906
10298
|
*/
|
|
7907
10299
|
toastId?: string;
|
|
7908
10300
|
/**
|
|
@@ -7929,14 +10321,27 @@ export declare interface ToastProps extends React_2.HTMLAttributes<HTMLDivElemen
|
|
|
7929
10321
|
* @default 'info'
|
|
7930
10322
|
*/
|
|
7931
10323
|
status?: Status;
|
|
7932
|
-
/**
|
|
10324
|
+
/**
|
|
10325
|
+
* Title text (the 0.5 form; renders as a `Toast.Title`). A `Toast.Title` among the children wins
|
|
10326
|
+
* over it (development warning).
|
|
10327
|
+
*/
|
|
7933
10328
|
title?: string;
|
|
7934
10329
|
/**
|
|
7935
10330
|
* Visually hidden status text read before the toast (`'Info:'`, `'Success:'`, `'Warning:'`,
|
|
7936
10331
|
* `'Error:'` by default). Pass a translation for other languages, or `''` to omit it.
|
|
7937
10332
|
*/
|
|
7938
10333
|
statusLabel?: string;
|
|
7939
|
-
/**
|
|
10334
|
+
/**
|
|
10335
|
+
* Replaces the status icon (decorative, `aria-hidden`). Only `undefined` keeps the default;
|
|
10336
|
+
* `null`, or anything that renders nothing, shows no icon (the status-icon slot rule, as
|
|
10337
|
+
* `MessageBar.icon`). Fluent's `ToastTitle` `media`.
|
|
10338
|
+
*/
|
|
10339
|
+
icon?: Slot<'span'>;
|
|
10340
|
+
/**
|
|
10341
|
+
* Called when the Dismiss button or a `Toast.Close` is activated; passing it renders the button.
|
|
10342
|
+
* Inside the Toaster every Toast shows the button and it dismisses the toast (your `onDismiss`
|
|
10343
|
+
* runs first). A timeout, Escape, Delete and `dismissToast` do not call it.
|
|
10344
|
+
*/
|
|
7940
10345
|
onDismiss?: () => void;
|
|
7941
10346
|
/**
|
|
7942
10347
|
* Accessible name of the dismiss button. Pass a translation for other languages.
|
|
@@ -7947,6 +10352,35 @@ export declare interface ToastProps extends React_2.HTMLAttributes<HTMLDivElemen
|
|
|
7947
10352
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
7948
10353
|
}
|
|
7949
10354
|
|
|
10355
|
+
/**
|
|
10356
|
+
* The title row: the title text (which names the toast) and an optional `action` at its end. A
|
|
10357
|
+
* direct child of Toast, or dispatched content of a Toaster.
|
|
10358
|
+
*
|
|
10359
|
+
* Also exported as `ToastTitle` (import the flat name from React Server Components).
|
|
10360
|
+
*/
|
|
10361
|
+
export declare const ToastTitle: {
|
|
10362
|
+
({ action, className, children, ref, ...rest }: ToastTitleProps): React_2.JSX.Element;
|
|
10363
|
+
displayName: string;
|
|
10364
|
+
};
|
|
10365
|
+
|
|
10366
|
+
/**
|
|
10367
|
+
* Toast.Title: `root` on the title row (also the one the `title` prop renders); `label` on the
|
|
10368
|
+
* title text, which names the toast; `action` on the `action` slot at the row's end.
|
|
10369
|
+
*/
|
|
10370
|
+
export declare const toastTitleClassNames: {
|
|
10371
|
+
readonly root: "wave-toast-title";
|
|
10372
|
+
readonly label: "wave-toast-title__label";
|
|
10373
|
+
readonly action: "wave-toast-title__action";
|
|
10374
|
+
};
|
|
10375
|
+
|
|
10376
|
+
/** Properties for the ToastTitle sub-component. */
|
|
10377
|
+
export declare interface ToastTitleProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
10378
|
+
/** Content at the end of the title row, such as a link or a button (often in `Toast.Close`). */
|
|
10379
|
+
action?: Slot<'span'>;
|
|
10380
|
+
/** Ref to the title row. */
|
|
10381
|
+
ref?: React_2.Ref<HTMLDivElement>;
|
|
10382
|
+
}
|
|
10383
|
+
|
|
7950
10384
|
/**
|
|
7951
10385
|
* A button that switches between pressed and unpressed, e.g. Bold in a text toolbar. Built on
|
|
7952
10386
|
* {@link Button}: same appearances, sizes, `type="button"` default, decorative icon slot and
|
|
@@ -7967,10 +10401,19 @@ export declare interface ToastProps extends React_2.HTMLAttributes<HTMLDivElemen
|
|
|
7967
10401
|
* <ToggleButton role="checkbox" isAccessible icon={<GridIcon />} aria-label="Grid" />
|
|
7968
10402
|
*/
|
|
7969
10403
|
export declare const ToggleButton: {
|
|
7970
|
-
({ pressed, defaultPressed, onPressedChange, appearance, size, disabled, disabledFocusable, isAccessible, className, onClick, ...props }: ToggleButtonProps): React_2.JSX.Element;
|
|
10404
|
+
({ pressed, defaultPressed, onPressedChange, appearance, size, disabled, disabledFocusable, isAccessible, icon, className, onClick, ...props }: ToggleButtonProps): React_2.JSX.Element;
|
|
7971
10405
|
displayName: string;
|
|
7972
10406
|
};
|
|
7973
10407
|
|
|
10408
|
+
/**
|
|
10409
|
+
* ToggleButton (also carries Button's root and icon classes): `root` on the `<button>`; `icon` on
|
|
10410
|
+
* Button's icon span.
|
|
10411
|
+
*/
|
|
10412
|
+
export declare const toggleButtonClassNames: {
|
|
10413
|
+
readonly root: "wave-toggle-button";
|
|
10414
|
+
readonly icon: "wave-toggle-button__icon";
|
|
10415
|
+
};
|
|
10416
|
+
|
|
7974
10417
|
/** Properties for the ToggleButton component. */
|
|
7975
10418
|
export declare interface ToggleButtonProps extends Omit<React_2.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
7976
10419
|
/** Controlled pressed state. */
|
|
@@ -8078,7 +10521,7 @@ export declare interface ToggleButtonProps extends Omit<React_2.ButtonHTMLAttrib
|
|
|
8078
10521
|
export declare const Toolbar: PolymorphicComponent<"div", ToolbarOwnProps> & {
|
|
8079
10522
|
Button: PolymorphicComponent<"button", ToolbarButtonOwnProps>;
|
|
8080
10523
|
ToggleButton: {
|
|
8081
|
-
({ name, value, appearance, size, onClick, ...rest }: ToolbarToggleButtonProps): React_2.JSX.Element;
|
|
10524
|
+
({ name, value, appearance, size, icon, className, onClick, ...rest }: ToolbarToggleButtonProps): React_2.JSX.Element;
|
|
8082
10525
|
displayName: string;
|
|
8083
10526
|
};
|
|
8084
10527
|
RadioGroup: {
|
|
@@ -8086,7 +10529,7 @@ export declare const Toolbar: PolymorphicComponent<"div", ToolbarOwnProps> & {
|
|
|
8086
10529
|
displayName: string;
|
|
8087
10530
|
};
|
|
8088
10531
|
RadioButton: {
|
|
8089
|
-
({ name, value, appearance, size, onClick, ...rest }: ToolbarRadioButtonProps): React_2.JSX.Element;
|
|
10532
|
+
({ name, value, appearance, size, icon, className, onClick, ...rest }: ToolbarRadioButtonProps): React_2.JSX.Element;
|
|
8090
10533
|
displayName: string;
|
|
8091
10534
|
};
|
|
8092
10535
|
Group: {
|
|
@@ -8111,6 +10554,15 @@ export declare const Toolbar: PolymorphicComponent<"div", ToolbarOwnProps> & {
|
|
|
8111
10554
|
*/
|
|
8112
10555
|
export declare const ToolbarButton: PolymorphicComponent<'button', ToolbarButtonOwnProps>;
|
|
8113
10556
|
|
|
10557
|
+
/**
|
|
10558
|
+
* Toolbar.Button (also carries Button's root and icon classes): `root` on the rendered element;
|
|
10559
|
+
* `icon` on Button's icon span (the icon box of `vertical`).
|
|
10560
|
+
*/
|
|
10561
|
+
export declare const toolbarButtonClassNames: {
|
|
10562
|
+
readonly root: "wave-toolbar-button";
|
|
10563
|
+
readonly icon: "wave-toolbar-button__icon";
|
|
10564
|
+
};
|
|
10565
|
+
|
|
8114
10566
|
/** Toolbar.Button's own props: Button's, plus `vertical`. Default appearance `'subtle'`. */
|
|
8115
10567
|
export declare interface ToolbarButtonOwnProps extends ButtonOwnProps {
|
|
8116
10568
|
/** The icon above the label (a 24 px icon box and a caption-size label). @default false */
|
|
@@ -8120,6 +10572,11 @@ export declare interface ToolbarButtonOwnProps extends ButtonOwnProps {
|
|
|
8120
10572
|
/** Props of {@link ToolbarButton} rendered as `C` (default `'button'`), including `ref`. */
|
|
8121
10573
|
export declare type ToolbarButtonProps<C extends React_2.ElementType = 'button'> = PolymorphicProps<C, ToolbarButtonOwnProps>;
|
|
8122
10574
|
|
|
10575
|
+
/** Toolbar: `root` on the `role="toolbar"` element (your `as`, default `<div>`). */
|
|
10576
|
+
export declare const toolbarClassNames: {
|
|
10577
|
+
readonly root: "wave-toolbar";
|
|
10578
|
+
};
|
|
10579
|
+
|
|
8123
10580
|
/**
|
|
8124
10581
|
* A separator between groups, drawn across the toolbar (vertical in a horizontal toolbar):
|
|
8125
10582
|
* `role="separator"` with `aria-orientation`. It is not focusable, so the arrow keys pass it.
|
|
@@ -8131,6 +10588,11 @@ export declare const ToolbarDivider: {
|
|
|
8131
10588
|
displayName: string;
|
|
8132
10589
|
};
|
|
8133
10590
|
|
|
10591
|
+
/** Toolbar.Divider: `root` on the `role="separator"` element. */
|
|
10592
|
+
export declare const toolbarDividerClassNames: {
|
|
10593
|
+
readonly root: "wave-toolbar-divider";
|
|
10594
|
+
};
|
|
10595
|
+
|
|
8134
10596
|
/** Properties for Toolbar.Divider. */
|
|
8135
10597
|
export declare interface ToolbarDividerProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
8136
10598
|
/** Ref to the separator element. */
|
|
@@ -8154,6 +10616,11 @@ export declare const ToolbarGroup: {
|
|
|
8154
10616
|
displayName: string;
|
|
8155
10617
|
};
|
|
8156
10618
|
|
|
10619
|
+
/** Toolbar.Group: `root` on the group element. */
|
|
10620
|
+
export declare const toolbarGroupClassNames: {
|
|
10621
|
+
readonly root: "wave-toolbar-group";
|
|
10622
|
+
};
|
|
10623
|
+
|
|
8157
10624
|
/** Properties for Toolbar.Group. */
|
|
8158
10625
|
export declare interface ToolbarGroupProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
8159
10626
|
/** Ref to the group element. */
|
|
@@ -8216,10 +10683,19 @@ export declare type ToolbarProps<C extends React_2.ElementType = 'div'> = Polymo
|
|
|
8216
10683
|
* </Toolbar.RadioGroup>
|
|
8217
10684
|
*/
|
|
8218
10685
|
export declare const ToolbarRadioButton: {
|
|
8219
|
-
({ name, value, appearance, size, onClick, ...rest }: ToolbarRadioButtonProps): React_2.JSX.Element;
|
|
10686
|
+
({ name, value, appearance, size, icon, className, onClick, ...rest }: ToolbarRadioButtonProps): React_2.JSX.Element;
|
|
8220
10687
|
displayName: string;
|
|
8221
10688
|
};
|
|
8222
10689
|
|
|
10690
|
+
/**
|
|
10691
|
+
* Toolbar.RadioButton (also carries the root and icon classes of Button and ToggleButton):
|
|
10692
|
+
* `root` on the `role="radio"` button; `icon` on the icon span.
|
|
10693
|
+
*/
|
|
10694
|
+
export declare const toolbarRadioButtonClassNames: {
|
|
10695
|
+
readonly root: "wave-toolbar-radio-button";
|
|
10696
|
+
readonly icon: "wave-toolbar-radio-button__icon";
|
|
10697
|
+
};
|
|
10698
|
+
|
|
8223
10699
|
/** Properties for Toolbar.RadioButton: one choice of a `Toolbar.RadioGroup`. */
|
|
8224
10700
|
export declare interface ToolbarRadioButtonProps extends Omit<ToggleButtonProps, 'pressed' | 'defaultPressed' | 'onPressedChange' | 'name' | 'value' | 'role'> {
|
|
8225
10701
|
/** The group: a key of the Toolbar's `checkedValues`; radio buttons of one `name` are exclusive. */
|
|
@@ -8253,6 +10729,11 @@ export declare const ToolbarRadioGroup: {
|
|
|
8253
10729
|
displayName: string;
|
|
8254
10730
|
};
|
|
8255
10731
|
|
|
10732
|
+
/** Toolbar.RadioGroup: `root` on the `role="radiogroup"` element. */
|
|
10733
|
+
export declare const toolbarRadioGroupClassNames: {
|
|
10734
|
+
readonly root: "wave-toolbar-radio-group";
|
|
10735
|
+
};
|
|
10736
|
+
|
|
8256
10737
|
/** Properties for Toolbar.RadioGroup. */
|
|
8257
10738
|
export declare interface ToolbarRadioGroupProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
8258
10739
|
/** Ref to the group element. */
|
|
@@ -8274,10 +10755,19 @@ export declare interface ToolbarRadioGroupProps extends React_2.HTMLAttributes<H
|
|
|
8274
10755
|
* </Toolbar>
|
|
8275
10756
|
*/
|
|
8276
10757
|
export declare const ToolbarToggleButton: {
|
|
8277
|
-
({ name, value, appearance, size, onClick, ...rest }: ToolbarToggleButtonProps): React_2.JSX.Element;
|
|
10758
|
+
({ name, value, appearance, size, icon, className, onClick, ...rest }: ToolbarToggleButtonProps): React_2.JSX.Element;
|
|
8278
10759
|
displayName: string;
|
|
8279
10760
|
};
|
|
8280
10761
|
|
|
10762
|
+
/**
|
|
10763
|
+
* Toolbar.ToggleButton (also carries the root and icon classes of Button and ToggleButton):
|
|
10764
|
+
* `root` on the `<button>`; `icon` on the icon span.
|
|
10765
|
+
*/
|
|
10766
|
+
export declare const toolbarToggleButtonClassNames: {
|
|
10767
|
+
readonly root: "wave-toolbar-toggle-button";
|
|
10768
|
+
readonly icon: "wave-toolbar-toggle-button__icon";
|
|
10769
|
+
};
|
|
10770
|
+
|
|
8281
10771
|
/** Properties for Toolbar.ToggleButton: ToggleButton's, bound to the Toolbar's `checkedValues`. */
|
|
8282
10772
|
export declare interface ToolbarToggleButtonProps extends Omit<ToggleButtonProps, 'pressed' | 'defaultPressed' | 'onPressedChange' | 'name' | 'value'> {
|
|
8283
10773
|
/** The group: a key of the Toolbar's `checkedValues`. */
|
|
@@ -8336,6 +10826,12 @@ export declare const Tooltip: {
|
|
|
8336
10826
|
/** Color treatment of a tooltip (`TooltipProps.appearance`). */
|
|
8337
10827
|
export declare type TooltipAppearance = 'inverted' | 'normal';
|
|
8338
10828
|
|
|
10829
|
+
/** Tooltip: `root` on the span around your child; `content` on the portaled tooltip. */
|
|
10830
|
+
export declare const tooltipClassNames: {
|
|
10831
|
+
readonly root: "wave-tooltip";
|
|
10832
|
+
readonly content: "wave-tooltip__content";
|
|
10833
|
+
};
|
|
10834
|
+
|
|
8339
10835
|
/** Properties for the Tooltip component. */
|
|
8340
10836
|
export declare interface TooltipProps extends Omit<React_2.HTMLAttributes<HTMLSpanElement>, 'content'> {
|
|
8341
10837
|
/** Content to display inside the tooltip (short, non-interactive text). */
|
|
@@ -8413,30 +10909,68 @@ export declare interface TooltipProps extends Omit<React_2.HTMLAttributes<HTMLSp
|
|
|
8413
10909
|
|
|
8414
10910
|
/**
|
|
8415
10911
|
* A hierarchical list (WAI-ARIA Tree View pattern) with a single tab stop: Up/Down move between
|
|
8416
|
-
* visible items, Home/End to the first/last, Right expands or moves to the first child
|
|
8417
|
-
* collapses or moves to the parent (both mirrored in RTL),
|
|
8418
|
-
*
|
|
10912
|
+
* visible items, Home/End to the first/last, Right expands or moves to the first child (or into
|
|
10913
|
+
* the row's actions, see below), Left collapses or moves to the parent (both mirrored in RTL),
|
|
10914
|
+
* Enter activates (and toggles a parent), and so does Space unless the tree has checkboxes, `*`
|
|
10915
|
+
* expands the siblings, and typing jumps to an item by its text.
|
|
8419
10916
|
*
|
|
8420
10917
|
* Keyboard focus enters at the `selected` item, else the first item; while focus is inside, the
|
|
8421
10918
|
* tab stop follows it, so Shift+Tab leaves the tree.
|
|
8422
10919
|
*
|
|
10920
|
+
* `selectionMode="multiple"` draws a checkbox on every item, bound to `checkedItems`: Space
|
|
10921
|
+
* toggles the focused item's check, a click on the checkbox toggles it, and a click elsewhere on
|
|
10922
|
+
* the row activates the item (as Enter does). Checks cascade: checking an item checks every item
|
|
10923
|
+
* nested in it, and an item shows checked when all of its nested items are checked, mixed when
|
|
10924
|
+
* some are. `onCheckedItemsChange` receives every checked item in tree order (fully checked parents
|
|
10925
|
+
* included), followed by listed values that match no item, and `details` (`value`, `checked`,
|
|
10926
|
+
* `event`).
|
|
10927
|
+
*
|
|
10928
|
+
* Row content: `actions` (buttons at the end of the row, in a toolbar named by the item, shown on
|
|
10929
|
+
* hover and focus, and always where there is no hover or colors are forced), `aside` (a count or a
|
|
10930
|
+
* badge that describes the item), `iconAfter` and `expandIcon`. Tab from the focused item enters
|
|
10931
|
+
* its actions and Shift+Tab returns. Keys and clicks on the actions never activate or check the
|
|
10932
|
+
* item. With `navigationMode="treegrid"`, Right (Left in right-to-left layouts) moves from an
|
|
10933
|
+
* item into its actions and Left returns, the actions take no Tab stop, and on an open parent Right
|
|
10934
|
+
* moves into its actions rather than to its first child (Down does); the roles stay `tree` and
|
|
10935
|
+
* `treeitem`.
|
|
10936
|
+
*
|
|
8423
10937
|
* Items are `Tree.Item` elements; nested items are written in their parent's children (directly,
|
|
8424
10938
|
* in Fragments, or returned by a render function), not rendered by a component of their own.
|
|
8425
|
-
* Every item needs a `value` that is unique within the Tree.
|
|
10939
|
+
* Every item needs a `value` that is unique within the Tree. `Tree.ItemPersonaLayout` lays out a
|
|
10940
|
+
* person (media, name and description) as an item's label.
|
|
8426
10941
|
*
|
|
8427
|
-
* `Tree.Item`
|
|
8428
|
-
* dotted form.
|
|
10942
|
+
* `Tree.Item` and `Tree.ItemPersonaLayout` are also exported as `TreeItem` and
|
|
10943
|
+
* `TreeItemPersonaLayout` for React Server Components, which cannot use the dotted form.
|
|
8429
10944
|
*/
|
|
8430
10945
|
export declare const Tree: {
|
|
8431
|
-
({ expandedItems, defaultExpandedItems, onExpandedItemsChange, onItemSelect, selected, current, className, children, onKeyDown, onKeyDownCapture, onFocus, onBlur, ref, ...rest }: TreeProps):
|
|
10946
|
+
({ expandedItems, defaultExpandedItems, onExpandedItemsChange, onItemSelect, selected, current, selectionMode, navigationMode, checkedItems, defaultCheckedItems, onCheckedItemsChange, className, children, onKeyDown, onKeyDownCapture, onFocus, onBlur, ref, ...rest }: TreeProps): JSX.Element;
|
|
8432
10947
|
displayName: string;
|
|
8433
10948
|
} & {
|
|
8434
10949
|
Item: {
|
|
8435
|
-
({ value, icon, leaf, className, children, onClick, onKeyDown, onFocus, ref, ...props }: TreeItemProps):
|
|
10950
|
+
({ value, icon, iconAfter, expandIcon, aside, actions, leaf, className, children, onClick, onKeyDown, onFocus, onBlur, ref, ...props }: TreeItemProps): JSX.Element;
|
|
10951
|
+
displayName: string;
|
|
10952
|
+
};
|
|
10953
|
+
ItemPersonaLayout: {
|
|
10954
|
+
({ media, description, className, children, ref, ...rest }: TreeItemPersonaLayoutProps): JSX.Element;
|
|
8436
10955
|
displayName: string;
|
|
8437
10956
|
};
|
|
8438
10957
|
};
|
|
8439
10958
|
|
|
10959
|
+
/** The second argument of `onCheckedItemsChange`. */
|
|
10960
|
+
export declare interface TreeCheckedItemsChangeDetails {
|
|
10961
|
+
/** The item that was toggled. */
|
|
10962
|
+
value: string;
|
|
10963
|
+
/** Its new state (a toggle never leaves it mixed). */
|
|
10964
|
+
checked: boolean;
|
|
10965
|
+
/** The DOM event of the toggle: a keyboard event for Space, a mouse event for a click. */
|
|
10966
|
+
event: Event;
|
|
10967
|
+
}
|
|
10968
|
+
|
|
10969
|
+
/** Tree: `root` on the `role="tree"` element. */
|
|
10970
|
+
export declare const treeClassNames: {
|
|
10971
|
+
readonly root: "wave-tree";
|
|
10972
|
+
};
|
|
10973
|
+
|
|
8440
10974
|
/**
|
|
8441
10975
|
* One node of a Tree. Text and other content are the label; nested `Tree.Item` children form its
|
|
8442
10976
|
* child group, which is shown while the item is expanded.
|
|
@@ -8445,25 +10979,87 @@ export declare const Tree: {
|
|
|
8445
10979
|
* Fragments, or returned by a render function (`{node.children.map(renderNode)}`). A component
|
|
8446
10980
|
* that renders `Tree.Item` itself (a recursive `<NodeView node={child} />`) is not recognised:
|
|
8447
10981
|
* its output becomes part of the label, so the parent cannot expand (a development warning names
|
|
8448
|
-
* this). Render data-driven trees with a render function instead.
|
|
10982
|
+
* this). Render data-driven trees with a render function instead. The checks of a
|
|
10983
|
+
* `selectionMode="multiple"` tree cascade by the same rule, so an item that such a component
|
|
10984
|
+
* renders is not checked with its parent.
|
|
8449
10985
|
*
|
|
8450
10986
|
* `ref` and every other prop land on the `role="treeitem"` element, which contains the label row
|
|
8451
10987
|
* and the child group. Its `onClick` receives only clicks on its own row (not on its child group
|
|
8452
10988
|
* or nested items) and its `onKeyDown` only keys pressed while focus is on it or in its row; both
|
|
8453
|
-
* run before the built-in behaviour (call `event.preventDefault()` to skip it).
|
|
8454
|
-
*
|
|
8455
|
-
*
|
|
8456
|
-
*
|
|
10989
|
+
* run before the built-in behaviour (call `event.preventDefault()` to skip it). In a checkbox
|
|
10990
|
+
* tree, a click on the item's checkbox toggles its check and is not passed to `onClick`, and
|
|
10991
|
+
* neither is a click on its actions; `onKeyDown` receives no keys pressed in the actions. Its
|
|
10992
|
+
* other event handlers (`onFocus`, `onDoubleClick`, `onContextMenu` and the rest) are not
|
|
10993
|
+
* filtered: as DOM events bubble, they also receive events from its child group and nested items
|
|
10994
|
+
* (compare `event.target` with `event.currentTarget` to tell them apart).
|
|
10995
|
+
*
|
|
10996
|
+
* `actions` render in a toolbar at the end of the row, named by the item; keys and clicks on them
|
|
10997
|
+
* belong to them and never activate or check the item. `aside` sits before them and describes the
|
|
10998
|
+
* item.
|
|
8457
10999
|
*
|
|
8458
11000
|
* The item is named by its label (`aria-labelledby`), not by its icon or nested items; an
|
|
8459
11001
|
* `aria-label` or `aria-labelledby` prop replaces that name. Typeahead matches the label text too
|
|
8460
11002
|
* (a `data-roving-text` prop replaces it).
|
|
8461
11003
|
*/
|
|
8462
11004
|
export declare const TreeItem: {
|
|
8463
|
-
({ value, icon, leaf, className, children, onClick, onKeyDown, onFocus, ref, ...props }: TreeItemProps): React_2.JSX.Element;
|
|
11005
|
+
({ value, icon, iconAfter, expandIcon, aside, actions, leaf, className, children, onClick, onKeyDown, onFocus, onBlur, ref, ...props }: TreeItemProps): React_2.JSX.Element;
|
|
11006
|
+
displayName: string;
|
|
11007
|
+
};
|
|
11008
|
+
|
|
11009
|
+
/**
|
|
11010
|
+
* Tree.Item: `root` on the `role="treeitem"` element; `row` on its row; `expandIcon` on the
|
|
11011
|
+
* chevron (or your `expandIcon`); `indicator` on the checkbox of a multi-select tree or the radio
|
|
11012
|
+
* of a single-select one; `icon` on the icon span; `label` on the label span; `iconAfter` on the
|
|
11013
|
+
* icon after the label; `aside` on the aside content; `actions` on the row's actions toolbar;
|
|
11014
|
+
* `group` on the `role="group"` element of its nested items.
|
|
11015
|
+
*/
|
|
11016
|
+
export declare const treeItemClassNames: {
|
|
11017
|
+
readonly root: "wave-tree-item";
|
|
11018
|
+
readonly row: "wave-tree-item__row";
|
|
11019
|
+
readonly expandIcon: "wave-tree-item__expand-icon";
|
|
11020
|
+
readonly indicator: "wave-tree-item__indicator";
|
|
11021
|
+
readonly icon: "wave-tree-item__icon";
|
|
11022
|
+
readonly label: "wave-tree-item__label";
|
|
11023
|
+
readonly iconAfter: "wave-tree-item__icon-after";
|
|
11024
|
+
readonly aside: "wave-tree-item__aside";
|
|
11025
|
+
readonly actions: "wave-tree-item__actions";
|
|
11026
|
+
readonly group: "wave-tree-item__group";
|
|
11027
|
+
};
|
|
11028
|
+
|
|
11029
|
+
/**
|
|
11030
|
+
* Lays out an item's label as a person: `media`, the name (children) and a `description` under
|
|
11031
|
+
* it. Use it as a Tree.Item's label content: the item is named by the name and described by the
|
|
11032
|
+
* description. Also exported as `TreeItemPersonaLayout` (Fluent's name; import the flat name from
|
|
11033
|
+
* React Server Components).
|
|
11034
|
+
*/
|
|
11035
|
+
export declare const TreeItemPersonaLayout: {
|
|
11036
|
+
({ media, description, className, children, ref, ...rest }: TreeItemPersonaLayoutProps): React_2.JSX.Element;
|
|
8464
11037
|
displayName: string;
|
|
8465
11038
|
};
|
|
8466
11039
|
|
|
11040
|
+
/**
|
|
11041
|
+
* Tree.ItemPersonaLayout: `root` on the layout span; `media` on the picture; `main` on the name;
|
|
11042
|
+
* `description` on the description line.
|
|
11043
|
+
*/
|
|
11044
|
+
export declare const treeItemPersonaLayoutClassNames: {
|
|
11045
|
+
readonly root: "wave-tree-item-persona-layout";
|
|
11046
|
+
readonly media: "wave-tree-item-persona-layout__media";
|
|
11047
|
+
readonly main: "wave-tree-item-persona-layout__main";
|
|
11048
|
+
readonly description: "wave-tree-item-persona-layout__description";
|
|
11049
|
+
};
|
|
11050
|
+
|
|
11051
|
+
/** Properties for the TreeItemPersonaLayout sub-component (Fluent's `TreeItemPersonaLayout`). */
|
|
11052
|
+
export declare interface TreeItemPersonaLayoutProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
11053
|
+
/**
|
|
11054
|
+
* The person's picture, usually an Avatar (`size="small"`, 32 px, fits a row). The name is shown
|
|
11055
|
+
* next to it, so make it decorative (`<Avatar decorative … />`).
|
|
11056
|
+
*/
|
|
11057
|
+
media?: React_2.ReactNode;
|
|
11058
|
+
/** A second line under the name; it describes the item. */
|
|
11059
|
+
description?: React_2.ReactNode;
|
|
11060
|
+
ref?: React_2.Ref<HTMLSpanElement>;
|
|
11061
|
+
}
|
|
11062
|
+
|
|
8467
11063
|
/** Properties for the TreeItem sub-component. */
|
|
8468
11064
|
export declare interface TreeItemProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
8469
11065
|
/** Unique value identifying this tree item. */
|
|
@@ -8474,6 +11070,34 @@ export declare interface TreeItemProps extends React_2.HTMLAttributes<HTMLDivEle
|
|
|
8474
11070
|
* icon (`''`, `0`) or a list of nothing renders no span.
|
|
8475
11071
|
*/
|
|
8476
11072
|
icon?: Slot<'span'>;
|
|
11073
|
+
/** Icon after the label (decorative, `aria-hidden`; a falsy value renders nothing, as `icon`). */
|
|
11074
|
+
iconAfter?: Slot<'span'>;
|
|
11075
|
+
/**
|
|
11076
|
+
* Replaces the expand chevron (decorative). `null`/`undefined` keep the chevron; `false`, or
|
|
11077
|
+
* anything that renders nothing, hides it (`aria-expanded` still reports the state). Not rotated.
|
|
11078
|
+
*/
|
|
11079
|
+
expandIcon?: Slot<'span'>;
|
|
11080
|
+
/**
|
|
11081
|
+
* Non-interactive content at the end of the row, such as a count or a badge. It describes the item
|
|
11082
|
+
* (`aria-describedby`); it hides while the actions show on hover or focus.
|
|
11083
|
+
*/
|
|
11084
|
+
aside?: React_2.ReactNode;
|
|
11085
|
+
/**
|
|
11086
|
+
* Buttons at the end of the row (a toolbar named by the item's label). Shown while the row is
|
|
11087
|
+
* hovered or the item or its actions have focus, and always in forced colors and without hover
|
|
11088
|
+
* (touch). Tab reaches them from the focused item (`navigationMode="tree"`), or the arrow keys do
|
|
11089
|
+
* (`"treegrid"`). Keys and clicks on them never activate or check the item.
|
|
11090
|
+
*
|
|
11091
|
+
* They also stay shown while a Menu, Popover or Dialog rendered inside them holds focus or its
|
|
11092
|
+
* trigger among them is expanded, so its focus return reaches the action. A dialog your app
|
|
11093
|
+
* renders elsewhere and opens from an action through state (a "Delete…" menu item that opens a
|
|
11094
|
+
* confirm Dialog) closes after the actions have hidden again (on devices with hover, outside
|
|
11095
|
+
* forced colors): a hidden action cannot take focus, so focus returns to the nearest element
|
|
11096
|
+
* that can, normally the item. Render such a Dialog inside `actions` (its `Dialog.Trigger`
|
|
11097
|
+
* there, or the controlled Dialog next to the Menu that opens it) to return focus to the action;
|
|
11098
|
+
* `finalFocusRef` cannot name it, since it is still hidden when the dialog closes.
|
|
11099
|
+
*/
|
|
11100
|
+
actions?: React_2.ReactNode;
|
|
8477
11101
|
/**
|
|
8478
11102
|
* Renders the item as a leaf even when it has nested `Tree.Item`s: they are not rendered, and
|
|
8479
11103
|
* the item has no `aria-expanded` and does not expand. An item is expandable only while it has
|
|
@@ -8499,17 +11123,48 @@ export declare interface TreeProps extends React_2.HTMLAttributes<HTMLDivElement
|
|
|
8499
11123
|
/** Called with the new list of expanded item values when an item expands or collapses. */
|
|
8500
11124
|
onExpandedItemsChange?: (expandedItems: string[]) => void;
|
|
8501
11125
|
/**
|
|
8502
|
-
* Called with an item's value every time it is activated (click, Enter or Space
|
|
8503
|
-
* same item is activated again.
|
|
11126
|
+
* Called with an item's value every time it is activated (a click on its row, Enter, or Space
|
|
11127
|
+
* unless the tree has checkboxes), also when the same item is activated again.
|
|
8504
11128
|
*/
|
|
8505
11129
|
onItemSelect?: (value: string) => void;
|
|
8506
11130
|
/**
|
|
8507
11131
|
* Value of the selected item. When set (also to `null`), every item carries `aria-selected`, and
|
|
8508
|
-
* the selected item is where keyboard focus enters the tree.
|
|
11132
|
+
* the selected item is where keyboard focus enters the tree. It has no effect with
|
|
11133
|
+
* `selectionMode="multiple"` (a development warning): items carry `aria-checked` instead. With
|
|
11134
|
+
* `selectionMode="single"` every item carries `aria-selected` even while it is not set (a
|
|
11135
|
+
* development warning: the radios need it).
|
|
8509
11136
|
*/
|
|
8510
11137
|
selected?: string | null;
|
|
8511
11138
|
/** Value of the current item (for example the open page): it gets `aria-current="true"`. */
|
|
8512
11139
|
current?: string | null;
|
|
11140
|
+
/**
|
|
11141
|
+
* How items are selected. `'none'`: activation only (0.7; `selected` highlights one item).
|
|
11142
|
+
* `'single'`: a radio indicator on every item for `selected`/`onItemSelect`. `'multiple'`: a
|
|
11143
|
+
* checkbox on every item, bound to `checkedItems`; checking an item checks its descendants, and a
|
|
11144
|
+
* parent shows checked, mixed or unchecked from them. Fluent's `'multiselect'` is `'multiple'`.
|
|
11145
|
+
* @default 'none'
|
|
11146
|
+
*/
|
|
11147
|
+
selectionMode?: 'none' | SelectionMode_2;
|
|
11148
|
+
/** Controlled checked items (`selectionMode="multiple"`); see the cascade rule in the component docs. */
|
|
11149
|
+
checkedItems?: readonly string[];
|
|
11150
|
+
/**
|
|
11151
|
+
* Initially checked items (uncontrolled).
|
|
11152
|
+
* @default []
|
|
11153
|
+
*/
|
|
11154
|
+
defaultCheckedItems?: readonly string[];
|
|
11155
|
+
/**
|
|
11156
|
+
* Called with every checked item (in tree order) when a check changes (Fluent's `onCheckedChange`).
|
|
11157
|
+
* WaveUI always passes `details`; it is typed optional until 1.0.
|
|
11158
|
+
*/
|
|
11159
|
+
onCheckedItemsChange?: (checkedItems: string[], details?: TreeCheckedItemsChangeDetails) => void;
|
|
11160
|
+
/**
|
|
11161
|
+
* `'tree'`: Tab from a focused item enters its actions. `'treegrid'`: the "next" arrow
|
|
11162
|
+
* (ArrowRight, ArrowLeft in RTL) moves into an item's actions and "previous" returns; on an
|
|
11163
|
+
* expanded parent "next" no longer moves to the first child (ArrowDown does). The roles stay
|
|
11164
|
+
* `tree` and `treeitem` (Fluent's `navigationMode`).
|
|
11165
|
+
* @default 'tree'
|
|
11166
|
+
*/
|
|
11167
|
+
navigationMode?: 'tree' | 'treegrid';
|
|
8513
11168
|
/** Ref to the `role="tree"` element. */
|
|
8514
11169
|
ref?: React_2.Ref<HTMLDivElement>;
|
|
8515
11170
|
}
|
|
@@ -8843,7 +11498,10 @@ export declare interface UsePresenceResult {
|
|
|
8843
11498
|
* `input[type=hidden]` is no item.
|
|
8844
11499
|
* - **Tab stop** (`tabStop`): `'active'` — the enabled `activeValue` item, else the first enabled
|
|
8845
11500
|
* item; `'last-focused'` — the last focused enabled item, else the `'active'` rule. A nested
|
|
8846
|
-
* composite or a control that uses the arrow keys itself holds it only when no other item can
|
|
11501
|
+
* composite or a control that uses the arrow keys itself holds it only when no other item can;
|
|
11502
|
+
* `'none'` — no item: every item is `tabIndex=-1` (a nested composite keeps its own tab stop;
|
|
11503
|
+
* mark it `data-roving-transparent` to join the group's arrow order), and focus reaches the
|
|
11504
|
+
* items only through the keys or a script.
|
|
8847
11505
|
* - **Keys** are ignored when another handler already called `preventDefault()`; with Meta; with
|
|
8848
11506
|
* Alt or Ctrl, except a single character typed with AltGr (Ctrl+Alt on Windows), which is
|
|
8849
11507
|
* typeahead text (arrows, Home, End and Space with Ctrl+Alt stay ignored); and when they start
|
|
@@ -8935,8 +11593,12 @@ export declare interface UseRovingTabIndexOptions {
|
|
|
8935
11593
|
* 'active' — APG Toolbar (and the static Menu). Either way a nested composite or a control that
|
|
8936
11594
|
* uses the arrow keys itself (text field, select, slider, spin button, editable combobox) holds
|
|
8937
11595
|
* it only when no other item can: arrows pressed there never lead back to the other items, so
|
|
8938
|
-
* focusing one keeps the tab stop on the last focused other item.
|
|
8939
|
-
|
|
11596
|
+
* focusing one keeps the tab stop on the last focused other item. 'none': no item holds it
|
|
11597
|
+
* (every item gets tabIndex -1; a nested composite keeps its own tab stop, and one marked
|
|
11598
|
+
* `data-roving-transparent` joins the group's arrow order), for a composite reached only by
|
|
11599
|
+
* the arrow keys of an enclosing widget or by a script (a tree row's actions); the keys,
|
|
11600
|
+
* `focusValue`, `focusFirst` and `focusLast` keep working. */
|
|
11601
|
+
tabStop?: 'active' | 'last-focused' | 'none';
|
|
8940
11602
|
/** true ⇒ the hook writes tabIndex 0/-1 onto item elements itself and assigns
|
|
8941
11603
|
* data-roving-value="auto-<n>" to items that lack one. For containers that do not render their
|
|
8942
11604
|
* items (Toolbar children, Menu items, Tree rows). Default false (items call getTabIndex).
|
|
@@ -8977,9 +11639,10 @@ export declare interface UseRovingTabIndexResult {
|
|
|
8977
11639
|
}
|
|
8978
11640
|
|
|
8979
11641
|
/**
|
|
8980
|
-
* Returns the {@link ToastController} of the enclosing `<Toaster>`: `dispatchToast(
|
|
8981
|
-
*
|
|
8982
|
-
* toast.
|
|
11642
|
+
* Returns the {@link ToastController} of the enclosing `<Toaster>`: `dispatchToast(content,
|
|
11643
|
+
* options?)` shows your content (usually a `<Toast>` with parts) and `dispatchToast(options)` a
|
|
11644
|
+
* toast built from text; both return the toast's id. `dismissToast(id)` dismisses one toast,
|
|
11645
|
+
* `dismissAllToasts()` every toast.
|
|
8983
11646
|
*
|
|
8984
11647
|
* Must be called inside `<Toaster>`, which provides the controller to its children — wrap the app
|
|
8985
11648
|
* (or the part of it that shows toasts) in `<Toaster>`; a sibling `<Toaster />` does not work.
|
|
@@ -8989,7 +11652,19 @@ export declare interface UseRovingTabIndexResult {
|
|
|
8989
11652
|
* @example
|
|
8990
11653
|
* function SaveButton() {
|
|
8991
11654
|
* const { dispatchToast } = useToastController();
|
|
8992
|
-
* return
|
|
11655
|
+
* return (
|
|
11656
|
+
* <Button
|
|
11657
|
+
* onClick={() =>
|
|
11658
|
+
* dispatchToast(
|
|
11659
|
+
* <Toast status="success">
|
|
11660
|
+
* <Toast.Title>Saved</Toast.Title>
|
|
11661
|
+
* </Toast>,
|
|
11662
|
+
* )
|
|
11663
|
+
* }
|
|
11664
|
+
* >
|
|
11665
|
+
* Save
|
|
11666
|
+
* </Button>
|
|
11667
|
+
* );
|
|
8993
11668
|
* }
|
|
8994
11669
|
* // <Toaster><App /></Toaster>
|
|
8995
11670
|
*/
|
|
@@ -9033,6 +11708,8 @@ export declare interface WaveContextValue {
|
|
|
9033
11708
|
themeClassName: string;
|
|
9034
11709
|
/** Element portaled overlays render into; `null` means `document.body`. */
|
|
9035
11710
|
portalContainer: HTMLElement | null;
|
|
11711
|
+
/** The merged input defaults of the providers above (`{}` outside a provider). */
|
|
11712
|
+
inputDefaults: InputDefaults;
|
|
9036
11713
|
/** `false` when no {@link WaveProvider} is above the caller (the defaults are returned). */
|
|
9037
11714
|
hasProvider: boolean;
|
|
9038
11715
|
}
|
|
@@ -9056,12 +11733,20 @@ export declare type WaveDir = 'ltr' | 'rtl';
|
|
|
9056
11733
|
* enclosing provider, so `<WaveProvider theme="light">` inside an RTL app is a light panel that
|
|
9057
11734
|
* stays right-to-left and keeps the app's portal container. At the top level the defaults are
|
|
9058
11735
|
* `'light'`, `'ltr'` and `document.body`.
|
|
11736
|
+
* - `inputDefaults` nests differently: a nested provider's defined keys override the enclosing
|
|
11737
|
+
* provider's, and an omitted key is inherited, so setting only `appearance` in a nested provider
|
|
11738
|
+
* keeps the enclosing provider's `size`.
|
|
9059
11739
|
*/
|
|
9060
11740
|
export declare const WaveProvider: {
|
|
9061
|
-
({ theme: themeProp, dir: dirProp, portalContainer: portalContainerProp, children, className, ref, ...rest }: WaveProviderProps): React_2.JSX.Element;
|
|
11741
|
+
({ theme: themeProp, dir: dirProp, portalContainer: portalContainerProp, inputDefaults: inputDefaultsProp, children, className, ref, ...rest }: WaveProviderProps): React_2.JSX.Element;
|
|
9062
11742
|
displayName: string;
|
|
9063
11743
|
};
|
|
9064
11744
|
|
|
11745
|
+
/** WaveProvider: `root` on the themed element (the existing `wave-root` scope class). */
|
|
11746
|
+
export declare const waveProviderClassNames: {
|
|
11747
|
+
readonly root: "wave-root";
|
|
11748
|
+
};
|
|
11749
|
+
|
|
9065
11750
|
/** Props accepted by {@link WaveProvider}. */
|
|
9066
11751
|
export declare interface WaveProviderProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
9067
11752
|
/**
|
|
@@ -9081,6 +11766,14 @@ export declare interface WaveProviderProps extends React_2.HTMLAttributes<HTMLDi
|
|
|
9081
11766
|
* @default the enclosing WaveProvider's container, else document.body
|
|
9082
11767
|
*/
|
|
9083
11768
|
portalContainer?: HTMLElement | null;
|
|
11769
|
+
/**
|
|
11770
|
+
* Default `size` and `appearance` of the text inputs and pickers in the subtree (Input,
|
|
11771
|
+
* Textarea, Select, SearchBox, SpinButton, Combobox, Dropdown, DatePicker, TimePicker,
|
|
11772
|
+
* TagPicker). Their own props and a Field's `size` win. A nested provider merges its keys over
|
|
11773
|
+
* the enclosing provider's; an omitted key is inherited.
|
|
11774
|
+
* @default the enclosing WaveProvider's defaults, else none (`medium`, `outline`)
|
|
11775
|
+
*/
|
|
11776
|
+
inputDefaults?: InputDefaults;
|
|
9084
11777
|
/** Content rendered inside the themed container. */
|
|
9085
11778
|
children: React_2.ReactNode;
|
|
9086
11779
|
/** Ref to the themed root `<div>`. */
|