@mortenbrudvik/waveui 0.4.0 → 0.8.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 +1484 -173
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/components/button/Button.cjs +2 -0
- package/dist/components/button/Button.cjs.map +1 -0
- package/dist/components/button/Button.mjs +51 -0
- package/dist/components/button/Button.mjs.map +1 -0
- package/dist/components/button/Button.semantics.cjs +2 -0
- package/dist/components/button/Button.semantics.cjs.map +1 -0
- package/dist/components/button/Button.semantics.mjs +61 -0
- package/dist/components/button/Button.semantics.mjs.map +1 -0
- package/dist/components/button/Button.slots.cjs +2 -0
- package/dist/components/button/Button.slots.cjs.map +1 -0
- package/dist/components/button/Button.slots.mjs +57 -0
- package/dist/components/button/Button.slots.mjs.map +1 -0
- package/dist/components/button/CompoundButton.cjs +2 -0
- package/dist/components/button/CompoundButton.cjs.map +1 -0
- package/dist/components/button/CompoundButton.mjs +55 -0
- package/dist/components/button/CompoundButton.mjs.map +1 -0
- package/dist/components/button/Link.cjs +2 -0
- package/dist/components/button/Link.cjs.map +1 -0
- package/dist/components/button/Link.mjs +38 -0
- package/dist/components/button/Link.mjs.map +1 -0
- package/dist/components/button/MenuButton.cjs +2 -0
- package/dist/components/button/MenuButton.cjs.map +1 -0
- package/dist/components/button/MenuButton.mjs +46 -0
- package/dist/components/button/MenuButton.mjs.map +1 -0
- package/dist/components/button/SplitButton.cjs +2 -0
- package/dist/components/button/SplitButton.cjs.map +1 -0
- package/dist/components/button/SplitButton.mjs +67 -0
- package/dist/components/button/SplitButton.mjs.map +1 -0
- package/dist/components/button/ToggleButton.cjs +2 -0
- package/dist/components/button/ToggleButton.cjs.map +1 -0
- package/dist/components/button/ToggleButton.mjs +68 -0
- package/dist/components/button/ToggleButton.mjs.map +1 -0
- package/dist/components/button/Toolbar.cjs +2 -0
- package/dist/components/button/Toolbar.cjs.map +1 -0
- package/dist/components/button/Toolbar.context.cjs +2 -0
- package/dist/components/button/Toolbar.context.cjs.map +1 -0
- package/dist/components/button/Toolbar.context.mjs +31 -0
- package/dist/components/button/Toolbar.context.mjs.map +1 -0
- package/dist/components/button/Toolbar.mjs +64 -0
- package/dist/components/button/Toolbar.mjs.map +1 -0
- package/dist/components/button/Toolbar.parts.cjs +2 -0
- package/dist/components/button/Toolbar.parts.cjs.map +1 -0
- package/dist/components/button/Toolbar.parts.mjs +126 -0
- package/dist/components/button/Toolbar.parts.mjs.map +1 -0
- package/dist/components/button/buttonStyles.cjs +2 -0
- package/dist/components/button/buttonStyles.cjs.map +1 -0
- package/dist/components/button/buttonStyles.mjs +39 -0
- package/dist/components/button/buttonStyles.mjs.map +1 -0
- package/dist/components/data-display/Avatar.cjs +2 -0
- package/dist/components/data-display/Avatar.cjs.map +1 -0
- package/dist/components/data-display/Avatar.mjs +162 -0
- package/dist/components/data-display/Avatar.mjs.map +1 -0
- package/dist/components/data-display/AvatarGroup.cjs +2 -0
- package/dist/components/data-display/AvatarGroup.cjs.map +1 -0
- package/dist/components/data-display/AvatarGroup.mjs +135 -0
- package/dist/components/data-display/AvatarGroup.mjs.map +1 -0
- package/dist/components/data-display/Badge.cjs +2 -0
- package/dist/components/data-display/Badge.cjs.map +1 -0
- package/dist/components/data-display/Badge.colors.cjs +2 -0
- package/dist/components/data-display/Badge.colors.cjs.map +1 -0
- package/dist/components/data-display/Badge.colors.mjs +58 -0
- package/dist/components/data-display/Badge.colors.mjs.map +1 -0
- package/dist/components/data-display/Badge.mjs +33 -0
- package/dist/components/data-display/Badge.mjs.map +1 -0
- package/dist/components/data-display/CounterBadge.cjs +2 -0
- package/dist/components/data-display/CounterBadge.cjs.map +1 -0
- package/dist/components/data-display/CounterBadge.mjs +29 -0
- package/dist/components/data-display/CounterBadge.mjs.map +1 -0
- package/dist/components/data-display/Divider.cjs +2 -0
- package/dist/components/data-display/Divider.cjs.map +1 -0
- package/dist/components/data-display/Divider.mjs +53 -0
- package/dist/components/data-display/Divider.mjs.map +1 -0
- package/dist/components/data-display/Image.cjs +2 -0
- package/dist/components/data-display/Image.cjs.map +1 -0
- package/dist/components/data-display/Image.mjs +33 -0
- package/dist/components/data-display/Image.mjs.map +1 -0
- package/dist/components/data-display/InfoLabel.cjs +2 -0
- package/dist/components/data-display/InfoLabel.cjs.map +1 -0
- package/dist/components/data-display/InfoLabel.mjs +105 -0
- package/dist/components/data-display/InfoLabel.mjs.map +1 -0
- package/dist/components/data-display/List.cjs +2 -0
- package/dist/components/data-display/List.cjs.map +1 -0
- package/dist/components/data-display/List.mjs +382 -0
- package/dist/components/data-display/List.mjs.map +1 -0
- package/dist/components/data-display/List.registry.cjs +2 -0
- package/dist/components/data-display/List.registry.cjs.map +1 -0
- package/dist/components/data-display/List.registry.mjs +101 -0
- package/dist/components/data-display/List.registry.mjs.map +1 -0
- package/dist/components/data-display/Persona.cjs +2 -0
- package/dist/components/data-display/Persona.cjs.map +1 -0
- package/dist/components/data-display/Persona.mjs +50 -0
- package/dist/components/data-display/Persona.mjs.map +1 -0
- package/dist/components/data-display/PresenceBadge.cjs +2 -0
- package/dist/components/data-display/PresenceBadge.cjs.map +1 -0
- package/dist/components/data-display/PresenceBadge.mjs +72 -0
- package/dist/components/data-display/PresenceBadge.mjs.map +1 -0
- package/dist/components/data-display/Tag.cjs +2 -0
- package/dist/components/data-display/Tag.cjs.map +1 -0
- package/dist/components/data-display/Tag.mjs +152 -0
- package/dist/components/data-display/Tag.mjs.map +1 -0
- package/dist/components/feedback/MessageBar.cjs +2 -0
- package/dist/components/feedback/MessageBar.cjs.map +1 -0
- package/dist/components/feedback/MessageBar.mjs +202 -0
- package/dist/components/feedback/MessageBar.mjs.map +1 -0
- 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 +2 -0
- package/dist/components/feedback/MessageBar.status.cjs.map +1 -0
- package/dist/components/feedback/MessageBar.status.mjs +46 -0
- package/dist/components/feedback/MessageBar.status.mjs.map +1 -0
- package/dist/components/feedback/ProgressBar.cjs +2 -0
- package/dist/components/feedback/ProgressBar.cjs.map +1 -0
- package/dist/components/feedback/ProgressBar.mjs +73 -0
- package/dist/components/feedback/ProgressBar.mjs.map +1 -0
- package/dist/components/feedback/Skeleton.cjs +2 -0
- package/dist/components/feedback/Skeleton.cjs.map +1 -0
- package/dist/components/feedback/Skeleton.mjs +49 -0
- package/dist/components/feedback/Skeleton.mjs.map +1 -0
- package/dist/components/feedback/Spinner.cjs +2 -0
- package/dist/components/feedback/Spinner.cjs.map +1 -0
- package/dist/components/feedback/Spinner.mjs +61 -0
- package/dist/components/feedback/Spinner.mjs.map +1 -0
- package/dist/components/feedback/Toast.cjs +2 -0
- package/dist/components/feedback/Toast.cjs.map +1 -0
- 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 +15 -0
- package/dist/components/feedback/Toast.mjs.map +1 -0
- 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 +2 -0
- package/dist/components/input/Checkbox.cjs.map +1 -0
- package/dist/components/input/Checkbox.mjs +97 -0
- package/dist/components/input/Checkbox.mjs.map +1 -0
- 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 +6 -0
- package/dist/components/input/ColorPicker.cjs.map +1 -0
- package/dist/components/input/ColorPicker.mjs +213 -0
- package/dist/components/input/ColorPicker.mjs.map +1 -0
- 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 +2 -0
- package/dist/components/input/Combobox.cjs.map +1 -0
- package/dist/components/input/Combobox.expand.cjs +2 -0
- package/dist/components/input/Combobox.expand.cjs.map +1 -0
- package/dist/components/input/Combobox.expand.mjs +38 -0
- package/dist/components/input/Combobox.expand.mjs.map +1 -0
- package/dist/components/input/Combobox.mjs +192 -0
- package/dist/components/input/Combobox.mjs.map +1 -0
- package/dist/components/input/DatePicker.cjs +2 -0
- package/dist/components/input/DatePicker.cjs.map +1 -0
- package/dist/components/input/DatePicker.mjs +341 -0
- package/dist/components/input/DatePicker.mjs.map +1 -0
- package/dist/components/input/Dropdown.cjs +2 -0
- package/dist/components/input/Dropdown.cjs.map +1 -0
- package/dist/components/input/Dropdown.mjs +131 -0
- package/dist/components/input/Dropdown.mjs.map +1 -0
- package/dist/components/input/Field.cjs +2 -0
- package/dist/components/input/Field.cjs.map +1 -0
- package/dist/components/input/Field.mjs +201 -0
- package/dist/components/input/Field.mjs.map +1 -0
- package/dist/components/input/Input.cjs +2 -0
- package/dist/components/input/Input.cjs.map +1 -0
- package/dist/components/input/Input.mjs +82 -0
- package/dist/components/input/Input.mjs.map +1 -0
- package/dist/components/input/Label.cjs +2 -0
- package/dist/components/input/Label.cjs.map +1 -0
- package/dist/components/input/Label.mjs +29 -0
- package/dist/components/input/Label.mjs.map +1 -0
- package/dist/components/input/Option.cjs +2 -0
- package/dist/components/input/Option.cjs.map +1 -0
- package/dist/components/input/Option.mjs +171 -0
- package/dist/components/input/Option.mjs.map +1 -0
- package/dist/components/input/RadioGroup.cjs +2 -0
- package/dist/components/input/RadioGroup.cjs.map +1 -0
- package/dist/components/input/RadioGroup.mjs +140 -0
- package/dist/components/input/RadioGroup.mjs.map +1 -0
- package/dist/components/input/Rating.cjs +2 -0
- package/dist/components/input/Rating.cjs.map +1 -0
- package/dist/components/input/Rating.mjs +197 -0
- package/dist/components/input/Rating.mjs.map +1 -0
- package/dist/components/input/SearchBox.cjs +2 -0
- package/dist/components/input/SearchBox.cjs.map +1 -0
- package/dist/components/input/SearchBox.mjs +204 -0
- package/dist/components/input/SearchBox.mjs.map +1 -0
- package/dist/components/input/Select.cjs +2 -0
- package/dist/components/input/Select.cjs.map +1 -0
- package/dist/components/input/Select.mjs +34 -0
- package/dist/components/input/Select.mjs.map +1 -0
- package/dist/components/input/Slider.cjs +2 -0
- package/dist/components/input/Slider.cjs.map +1 -0
- package/dist/components/input/Slider.mjs +80 -0
- package/dist/components/input/Slider.mjs.map +1 -0
- package/dist/components/input/SpinButton.cjs +2 -0
- package/dist/components/input/SpinButton.cjs.map +1 -0
- package/dist/components/input/SpinButton.mjs +158 -0
- package/dist/components/input/SpinButton.mjs.map +1 -0
- package/dist/components/input/SwatchPicker.cjs +2 -0
- package/dist/components/input/SwatchPicker.cjs.map +1 -0
- package/dist/components/input/SwatchPicker.mjs +114 -0
- package/dist/components/input/SwatchPicker.mjs.map +1 -0
- package/dist/components/input/Switch.cjs +2 -0
- package/dist/components/input/Switch.cjs.map +1 -0
- package/dist/components/input/Switch.mjs +93 -0
- package/dist/components/input/Switch.mjs.map +1 -0
- package/dist/components/input/TagPicker.cjs +2 -0
- package/dist/components/input/TagPicker.cjs.map +1 -0
- package/dist/components/input/TagPicker.mjs +253 -0
- package/dist/components/input/TagPicker.mjs.map +1 -0
- package/dist/components/input/Textarea.cjs +2 -0
- package/dist/components/input/Textarea.cjs.map +1 -0
- package/dist/components/input/Textarea.mjs +33 -0
- package/dist/components/input/Textarea.mjs.map +1 -0
- package/dist/components/input/TimePicker.cjs +2 -0
- package/dist/components/input/TimePicker.cjs.map +1 -0
- package/dist/components/input/TimePicker.mjs +295 -0
- package/dist/components/input/TimePicker.mjs.map +1 -0
- 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 +2 -0
- package/dist/components/input/colorUtils.cjs.map +1 -0
- package/dist/components/input/colorUtils.mjs +194 -0
- package/dist/components/input/colorUtils.mjs.map +1 -0
- package/dist/components/input/dateUtils.cjs +2 -0
- package/dist/components/input/dateUtils.cjs.map +1 -0
- package/dist/components/input/dateUtils.mjs +250 -0
- package/dist/components/input/dateUtils.mjs.map +1 -0
- package/dist/components/input/pickerStyles.cjs +2 -0
- package/dist/components/input/pickerStyles.cjs.map +1 -0
- package/dist/components/input/pickerStyles.mjs +10 -0
- package/dist/components/input/pickerStyles.mjs.map +1 -0
- package/dist/components/internal/HiddenInput.cjs +2 -0
- package/dist/components/internal/HiddenInput.cjs.map +1 -0
- package/dist/components/internal/HiddenInput.mjs +88 -0
- package/dist/components/internal/HiddenInput.mjs.map +1 -0
- package/dist/components/layout/Accordion.cjs +2 -0
- package/dist/components/layout/Accordion.cjs.map +1 -0
- package/dist/components/layout/Accordion.mjs +237 -0
- package/dist/components/layout/Accordion.mjs.map +1 -0
- package/dist/components/layout/Card.cjs +2 -0
- package/dist/components/layout/Card.cjs.map +1 -0
- package/dist/components/layout/Card.mjs +122 -0
- package/dist/components/layout/Card.mjs.map +1 -0
- package/dist/components/layout/Carousel.cjs +2 -0
- package/dist/components/layout/Carousel.cjs.map +1 -0
- package/dist/components/layout/Carousel.mjs +206 -0
- package/dist/components/layout/Carousel.mjs.map +1 -0
- package/dist/components/layout/Flex.cjs +2 -0
- package/dist/components/layout/Flex.cjs.map +1 -0
- package/dist/components/layout/Flex.mjs +55 -0
- package/dist/components/layout/Flex.mjs.map +1 -0
- package/dist/components/layout/Grid.cjs +2 -0
- package/dist/components/layout/Grid.cjs.map +1 -0
- package/dist/components/layout/Grid.mjs +63 -0
- package/dist/components/layout/Grid.mjs.map +1 -0
- package/dist/components/layout/Overflow.cjs +2 -0
- package/dist/components/layout/Overflow.cjs.map +1 -0
- package/dist/components/layout/Overflow.mjs +270 -0
- package/dist/components/layout/Overflow.mjs.map +1 -0
- package/dist/components/layout/Stack.cjs +2 -0
- package/dist/components/layout/Stack.cjs.map +1 -0
- package/dist/components/layout/Stack.mjs +40 -0
- package/dist/components/layout/Stack.mjs.map +1 -0
- package/dist/components/layout/TabList.cjs +2 -0
- package/dist/components/layout/TabList.cjs.map +1 -0
- package/dist/components/layout/TabList.mjs +239 -0
- package/dist/components/layout/TabList.mjs.map +1 -0
- package/dist/components/layout/Tree.cjs +2 -0
- package/dist/components/layout/Tree.cjs.map +1 -0
- 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 +12 -0
- package/dist/components/layout/Tree.mjs.map +1 -0
- 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/layout/disclosureIds.cjs +2 -0
- package/dist/components/layout/disclosureIds.cjs.map +1 -0
- package/dist/components/layout/disclosureIds.mjs +12 -0
- package/dist/components/layout/disclosureIds.mjs.map +1 -0
- package/dist/components/motion/Presence.cjs +2 -0
- package/dist/components/motion/Presence.cjs.map +1 -0
- package/dist/components/motion/Presence.mjs +35 -0
- package/dist/components/motion/Presence.mjs.map +1 -0
- package/dist/components/navigation/Breadcrumb.cjs +2 -0
- package/dist/components/navigation/Breadcrumb.cjs.map +1 -0
- package/dist/components/navigation/Breadcrumb.mjs +145 -0
- package/dist/components/navigation/Breadcrumb.mjs.map +1 -0
- package/dist/components/navigation/Menu.cjs +2 -0
- package/dist/components/navigation/Menu.cjs.map +1 -0
- package/dist/components/navigation/Menu.context.cjs +2 -0
- package/dist/components/navigation/Menu.context.cjs.map +1 -0
- package/dist/components/navigation/Menu.context.mjs +82 -0
- package/dist/components/navigation/Menu.context.mjs.map +1 -0
- package/dist/components/navigation/Menu.group.cjs +2 -0
- package/dist/components/navigation/Menu.group.cjs.map +1 -0
- package/dist/components/navigation/Menu.group.mjs +60 -0
- package/dist/components/navigation/Menu.group.mjs.map +1 -0
- package/dist/components/navigation/Menu.items.cjs +2 -0
- package/dist/components/navigation/Menu.items.cjs.map +1 -0
- package/dist/components/navigation/Menu.items.mjs +133 -0
- package/dist/components/navigation/Menu.items.mjs.map +1 -0
- package/dist/components/navigation/Menu.link.cjs +2 -0
- package/dist/components/navigation/Menu.link.cjs.map +1 -0
- package/dist/components/navigation/Menu.link.mjs +47 -0
- package/dist/components/navigation/Menu.link.mjs.map +1 -0
- package/dist/components/navigation/Menu.mjs +27 -0
- package/dist/components/navigation/Menu.mjs.map +1 -0
- package/dist/components/navigation/Menu.popover.cjs +2 -0
- package/dist/components/navigation/Menu.popover.cjs.map +1 -0
- package/dist/components/navigation/Menu.popover.mjs +232 -0
- package/dist/components/navigation/Menu.popover.mjs.map +1 -0
- package/dist/components/navigation/Menu.root.cjs +2 -0
- package/dist/components/navigation/Menu.root.cjs.map +1 -0
- package/dist/components/navigation/Menu.root.mjs +309 -0
- package/dist/components/navigation/Menu.root.mjs.map +1 -0
- package/dist/components/navigation/Menu.selectable.cjs +2 -0
- package/dist/components/navigation/Menu.selectable.cjs.map +1 -0
- package/dist/components/navigation/Menu.selectable.mjs +111 -0
- package/dist/components/navigation/Menu.selectable.mjs.map +1 -0
- package/dist/components/navigation/Menu.shared.cjs +2 -0
- package/dist/components/navigation/Menu.shared.cjs.map +1 -0
- package/dist/components/navigation/Menu.shared.mjs +23 -0
- package/dist/components/navigation/Menu.shared.mjs.map +1 -0
- package/dist/components/navigation/Menu.splitGroup.cjs +2 -0
- package/dist/components/navigation/Menu.splitGroup.cjs.map +1 -0
- package/dist/components/navigation/Menu.splitGroup.mjs +52 -0
- package/dist/components/navigation/Menu.splitGroup.mjs.map +1 -0
- package/dist/components/navigation/Menu.trigger.cjs +2 -0
- package/dist/components/navigation/Menu.trigger.cjs.map +1 -0
- package/dist/components/navigation/Menu.trigger.mjs +79 -0
- package/dist/components/navigation/Menu.trigger.mjs.map +1 -0
- package/dist/components/navigation/Nav.cjs +2 -0
- package/dist/components/navigation/Nav.cjs.map +1 -0
- package/dist/components/navigation/Nav.mjs +291 -0
- package/dist/components/navigation/Nav.mjs.map +1 -0
- package/dist/components/navigation/Pagination.cjs +2 -0
- package/dist/components/navigation/Pagination.cjs.map +1 -0
- package/dist/components/navigation/Pagination.mjs +118 -0
- package/dist/components/navigation/Pagination.mjs.map +1 -0
- package/dist/components/navigation/Stepper.cjs +2 -0
- package/dist/components/navigation/Stepper.cjs.map +1 -0
- package/dist/components/navigation/Stepper.mjs +205 -0
- package/dist/components/navigation/Stepper.mjs.map +1 -0
- package/dist/components/overlays/Dialog.cjs +2 -0
- package/dist/components/overlays/Dialog.cjs.map +1 -0
- package/dist/components/overlays/Dialog.mjs +181 -0
- package/dist/components/overlays/Dialog.mjs.map +1 -0
- package/dist/components/overlays/Dialog.shared.cjs +2 -0
- package/dist/components/overlays/Dialog.shared.cjs.map +1 -0
- package/dist/components/overlays/Dialog.shared.mjs +227 -0
- package/dist/components/overlays/Dialog.shared.mjs.map +1 -0
- package/dist/components/overlays/Drawer.cjs +2 -0
- package/dist/components/overlays/Drawer.cjs.map +1 -0
- package/dist/components/overlays/Drawer.mjs +193 -0
- package/dist/components/overlays/Drawer.mjs.map +1 -0
- package/dist/components/overlays/Popover.cjs +2 -0
- package/dist/components/overlays/Popover.cjs.map +1 -0
- package/dist/components/overlays/Popover.mjs +367 -0
- package/dist/components/overlays/Popover.mjs.map +1 -0
- package/dist/components/overlays/Popover.shared.cjs +2 -0
- package/dist/components/overlays/Popover.shared.cjs.map +1 -0
- package/dist/components/overlays/Popover.shared.mjs +182 -0
- package/dist/components/overlays/Popover.shared.mjs.map +1 -0
- package/dist/components/overlays/TeachingPopover.cjs +2 -0
- package/dist/components/overlays/TeachingPopover.cjs.map +1 -0
- package/dist/components/overlays/TeachingPopover.mjs +185 -0
- package/dist/components/overlays/TeachingPopover.mjs.map +1 -0
- package/dist/components/overlays/Tooltip.cjs +2 -0
- package/dist/components/overlays/Tooltip.cjs.map +1 -0
- package/dist/components/overlays/Tooltip.mjs +161 -0
- package/dist/components/overlays/Tooltip.mjs.map +1 -0
- package/dist/components/portal/Portal.cjs +2 -0
- package/dist/components/portal/Portal.cjs.map +1 -0
- package/dist/components/portal/Portal.mjs +46 -0
- package/dist/components/portal/Portal.mjs.map +1 -0
- package/dist/components/provider/WaveProvider.cjs +2 -0
- package/dist/components/provider/WaveProvider.cjs.map +1 -0
- package/dist/components/provider/WaveProvider.mjs +52 -0
- package/dist/components/provider/WaveProvider.mjs.map +1 -0
- package/dist/components/table/DataGrid.cjs +2 -0
- package/dist/components/table/DataGrid.cjs.map +1 -0
- package/dist/components/table/DataGrid.mjs +490 -0
- package/dist/components/table/DataGrid.mjs.map +1 -0
- package/dist/components/table/Table.cjs +2 -0
- package/dist/components/table/Table.cjs.map +1 -0
- package/dist/components/table/Table.mjs +100 -0
- package/dist/components/table/Table.mjs.map +1 -0
- package/dist/components/table/useGridNavigation.cjs +2 -0
- package/dist/components/table/useGridNavigation.cjs.map +1 -0
- package/dist/components/table/useGridNavigation.mjs +336 -0
- package/dist/components/table/useGridNavigation.mjs.map +1 -0
- package/dist/components/typography/Text.cjs +2 -0
- package/dist/components/typography/Text.cjs.map +1 -0
- package/dist/components/typography/Text.mjs +39 -0
- package/dist/components/typography/Text.mjs.map +1 -0
- package/dist/hooks/useAnnounce.cjs +2 -0
- package/dist/hooks/useAnnounce.cjs.map +1 -0
- package/dist/hooks/useAnnounce.mjs +88 -0
- package/dist/hooks/useAnnounce.mjs.map +1 -0
- package/dist/hooks/useCheckedValues.cjs +2 -0
- package/dist/hooks/useCheckedValues.cjs.map +1 -0
- package/dist/hooks/useCheckedValues.mjs +102 -0
- package/dist/hooks/useCheckedValues.mjs.map +1 -0
- package/dist/hooks/useContextMenuAnchor.cjs +2 -0
- package/dist/hooks/useContextMenuAnchor.cjs.map +1 -0
- package/dist/hooks/useContextMenuAnchor.mjs +132 -0
- package/dist/hooks/useContextMenuAnchor.mjs.map +1 -0
- package/dist/hooks/useControllable.cjs +2 -0
- package/dist/hooks/useControllable.cjs.map +1 -0
- package/dist/hooks/useControllable.mjs +37 -0
- package/dist/hooks/useControllable.mjs.map +1 -0
- package/dist/hooks/useDirection.cjs +2 -0
- package/dist/hooks/useDirection.cjs.map +1 -0
- package/dist/hooks/useDirection.mjs +57 -0
- package/dist/hooks/useDirection.mjs.map +1 -0
- package/dist/hooks/useDismiss.cjs +2 -0
- package/dist/hooks/useDismiss.cjs.map +1 -0
- package/dist/hooks/useDismiss.mjs +57 -0
- package/dist/hooks/useDismiss.mjs.map +1 -0
- package/dist/hooks/useEventCallback.cjs +2 -0
- package/dist/hooks/useEventCallback.cjs.map +1 -0
- package/dist/hooks/useEventCallback.mjs +16 -0
- package/dist/hooks/useEventCallback.mjs.map +1 -0
- package/dist/hooks/useFieldControl.cjs +2 -0
- package/dist/hooks/useFieldControl.cjs.map +1 -0
- package/dist/hooks/useFieldControl.mjs +62 -0
- package/dist/hooks/useFieldControl.mjs.map +1 -0
- package/dist/hooks/useFocusTrap.cjs +2 -0
- package/dist/hooks/useFocusTrap.cjs.map +1 -0
- package/dist/hooks/useFocusTrap.mjs +266 -0
- package/dist/hooks/useFocusTrap.mjs.map +1 -0
- package/dist/hooks/useFormReset.cjs +2 -0
- package/dist/hooks/useFormReset.cjs.map +1 -0
- package/dist/hooks/useFormReset.mjs +33 -0
- package/dist/hooks/useFormReset.mjs.map +1 -0
- package/dist/hooks/useHoverIntent.cjs +2 -0
- package/dist/hooks/useHoverIntent.cjs.map +1 -0
- package/dist/hooks/useHoverIntent.mjs +201 -0
- package/dist/hooks/useHoverIntent.mjs.map +1 -0
- package/dist/hooks/useId.cjs +2 -0
- package/dist/hooks/useId.cjs.map +1 -0
- package/dist/hooks/useId.mjs +11 -0
- package/dist/hooks/useId.mjs.map +1 -0
- package/dist/hooks/useIsClient.cjs +2 -0
- package/dist/hooks/useIsClient.cjs.map +1 -0
- package/dist/hooks/useIsClient.mjs +19 -0
- package/dist/hooks/useIsClient.mjs.map +1 -0
- package/dist/hooks/useListbox.cjs +2 -0
- package/dist/hooks/useListbox.cjs.map +1 -0
- package/dist/hooks/useListbox.mjs +492 -0
- package/dist/hooks/useListbox.mjs.map +1 -0
- 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/useMergedRefs.cjs +2 -0
- package/dist/hooks/useMergedRefs.cjs.map +1 -0
- package/dist/hooks/useMergedRefs.mjs +57 -0
- package/dist/hooks/useMergedRefs.mjs.map +1 -0
- package/dist/hooks/useModalIsolation.cjs +2 -0
- package/dist/hooks/useModalIsolation.cjs.map +1 -0
- package/dist/hooks/useModalIsolation.mjs +87 -0
- package/dist/hooks/useModalIsolation.mjs.map +1 -0
- package/dist/hooks/useModalLayer.cjs +2 -0
- package/dist/hooks/useModalLayer.cjs.map +1 -0
- package/dist/hooks/useModalLayer.mjs +30 -0
- package/dist/hooks/useModalLayer.mjs.map +1 -0
- package/dist/hooks/usePopupPosition.cjs +2 -0
- package/dist/hooks/usePopupPosition.cjs.map +1 -0
- package/dist/hooks/usePopupPosition.mjs +117 -0
- package/dist/hooks/usePopupPosition.mjs.map +1 -0
- package/dist/hooks/usePrefersReducedMotion.cjs +2 -0
- package/dist/hooks/usePrefersReducedMotion.cjs.map +1 -0
- package/dist/hooks/usePrefersReducedMotion.mjs +10 -0
- package/dist/hooks/usePrefersReducedMotion.mjs.map +1 -0
- package/dist/hooks/usePresence.cjs +2 -0
- package/dist/hooks/usePresence.cjs.map +1 -0
- package/dist/hooks/usePresence.mjs +136 -0
- package/dist/hooks/usePresence.mjs.map +1 -0
- package/dist/hooks/usePreserveFocus.cjs +2 -0
- package/dist/hooks/usePreserveFocus.cjs.map +1 -0
- package/dist/hooks/usePreserveFocus.mjs +50 -0
- package/dist/hooks/usePreserveFocus.mjs.map +1 -0
- package/dist/hooks/useRestoreFocus.cjs +2 -0
- package/dist/hooks/useRestoreFocus.cjs.map +1 -0
- package/dist/hooks/useRestoreFocus.mjs +271 -0
- package/dist/hooks/useRestoreFocus.mjs.map +1 -0
- package/dist/hooks/useRovingTabIndex.cjs +2 -0
- package/dist/hooks/useRovingTabIndex.cjs.map +1 -0
- package/dist/hooks/useRovingTabIndex.mjs +389 -0
- package/dist/hooks/useRovingTabIndex.mjs.map +1 -0
- package/dist/hooks/useScrollLock.cjs +2 -0
- package/dist/hooks/useScrollLock.cjs.map +1 -0
- package/dist/hooks/useScrollLock.mjs +71 -0
- package/dist/hooks/useScrollLock.mjs.map +1 -0
- package/dist/hooks/useTriggerElement.cjs +2 -0
- package/dist/hooks/useTriggerElement.cjs.map +1 -0
- package/dist/hooks/useTriggerElement.mjs +126 -0
- package/dist/hooks/useTriggerElement.mjs.map +1 -0
- package/dist/hooks/useTypeahead.cjs +2 -0
- package/dist/hooks/useTypeahead.cjs.map +1 -0
- package/dist/hooks/useTypeahead.mjs +38 -0
- package/dist/hooks/useTypeahead.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +11086 -0
- package/dist/index.d.ts +10405 -1757
- package/dist/index.mjs +103 -5695
- package/dist/lib/aria.cjs +2 -0
- package/dist/lib/aria.cjs.map +1 -0
- package/dist/lib/aria.mjs +29 -0
- package/dist/lib/aria.mjs.map +1 -0
- package/dist/lib/children.cjs +2 -0
- package/dist/lib/children.cjs.map +1 -0
- package/dist/lib/children.mjs +37 -0
- package/dist/lib/children.mjs.map +1 -0
- package/dist/lib/classNames.cjs +2 -0
- package/dist/lib/classNames.cjs.map +1 -0
- package/dist/lib/classNames.mjs +415 -0
- package/dist/lib/classNames.mjs.map +1 -0
- package/dist/lib/cn.cjs +2 -0
- package/dist/lib/cn.cjs.map +1 -0
- package/dist/lib/cn.mjs +64 -0
- package/dist/lib/cn.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/composeEventHandlers.cjs +2 -0
- package/dist/lib/composeEventHandlers.cjs.map +1 -0
- package/dist/lib/composeEventHandlers.mjs +11 -0
- package/dist/lib/composeEventHandlers.mjs.map +1 -0
- package/dist/lib/dev.cjs +2 -0
- package/dist/lib/dev.cjs.map +1 -0
- package/dist/lib/dev.mjs +42 -0
- package/dist/lib/dev.mjs.map +1 -0
- package/dist/lib/direction.cjs +2 -0
- package/dist/lib/direction.cjs.map +1 -0
- package/dist/lib/direction.mjs +35 -0
- package/dist/lib/direction.mjs.map +1 -0
- package/dist/lib/events.cjs +2 -0
- package/dist/lib/events.cjs.map +1 -0
- package/dist/lib/events.mjs +31 -0
- package/dist/lib/events.mjs.map +1 -0
- package/dist/lib/focus.cjs +2 -0
- package/dist/lib/focus.cjs.map +1 -0
- package/dist/lib/focus.mjs +119 -0
- package/dist/lib/focus.mjs.map +1 -0
- package/dist/lib/globalRegistry.cjs +2 -0
- package/dist/lib/globalRegistry.cjs.map +1 -0
- package/dist/lib/globalRegistry.mjs +13 -0
- package/dist/lib/globalRegistry.mjs.map +1 -0
- package/dist/lib/icons.cjs +2 -0
- package/dist/lib/icons.cjs.map +1 -0
- package/dist/lib/icons.mjs +254 -0
- package/dist/lib/icons.mjs.map +1 -0
- package/dist/lib/labelInName.cjs +2 -0
- package/dist/lib/labelInName.cjs.map +1 -0
- package/dist/lib/labelInName.mjs +54 -0
- package/dist/lib/labelInName.mjs.map +1 -0
- package/dist/lib/layers.cjs +2 -0
- package/dist/lib/layers.cjs.map +1 -0
- package/dist/lib/layers.mjs +224 -0
- package/dist/lib/layers.mjs.map +1 -0
- package/dist/lib/mergeProps.cjs +2 -0
- package/dist/lib/mergeProps.cjs.map +1 -0
- package/dist/lib/mergeProps.mjs +21 -0
- package/dist/lib/mergeProps.mjs.map +1 -0
- package/dist/lib/mergeRefs.cjs +2 -0
- package/dist/lib/mergeRefs.cjs.map +1 -0
- package/dist/lib/mergeRefs.mjs +29 -0
- package/dist/lib/mergeRefs.mjs.map +1 -0
- package/dist/lib/renderTrigger.cjs +2 -0
- package/dist/lib/renderTrigger.cjs.map +1 -0
- package/dist/lib/renderTrigger.mjs +29 -0
- package/dist/lib/renderTrigger.mjs.map +1 -0
- package/dist/lib/slot.cjs +2 -0
- package/dist/lib/slot.cjs.map +1 -0
- package/dist/lib/slot.mjs +122 -0
- package/dist/lib/slot.mjs.map +1 -0
- package/dist/lib/styles.cjs +2 -0
- package/dist/lib/styles.cjs.map +1 -0
- package/dist/lib/styles.mjs +16 -0
- package/dist/lib/styles.mjs.map +1 -0
- package/dist/lib/theme.cjs +2 -0
- package/dist/lib/theme.cjs.map +1 -0
- package/dist/lib/theme.mjs +16 -0
- package/dist/lib/theme.mjs.map +1 -0
- 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/preflight.css +2 -0
- package/dist/styles.css +2 -0
- package/package.json +149 -100
- package/src/styles/animations.css +7 -39
- package/src/styles/base.css +103 -0
- package/src/styles/globals.css +10 -22
- package/src/styles/legacy-tokens.css +184 -0
- package/src/styles/preflight.css +7 -0
- package/src/styles/styles.css +32 -0
- package/src/styles/tailwind.css +17 -0
- package/src/styles/tokens.css +561 -221
- package/src/styles/variants.css +29 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalRegistry.mjs","names":["getGlobalRegistry","symbol","key","store","create"],"sources":["../../src/lib/globalRegistry.ts"],"sourcesContent":["const NAMESPACE = '@mortenbrudvik/waveui/';\n\ntype GlobalStore = Record<symbol, unknown>;\n\n/**\n * Returns the module singleton registered under `key`, creating it with `create` on first use.\n *\n * The value is stored on `globalThis[Symbol.for('@mortenbrudvik/waveui/' + key)]` (non-enumerable),\n * so an app that evaluates the library twice — the ESM and the CJS build side by side (Next.js\n * server CJS + client ESM, or a dependency that `require`s the package) — still shares one state\n * per key. A change to the value shape stored under a key must stay compatible with the other copy.\n *\n * Keys and their users:\n * - `'layers'` — the dismiss-layer stack (`layers.ts`);\n * - `'traps'` — the focus-trap stack (`useFocusTrap`);\n * - `'scrollLock'` — the scroll-lock counter (`useScrollLock`);\n * - `'inert'` — the elements made inert behind a modal (`useModalIsolation`);\n * - `'restoreFocusTracker'` — the pointer/focus tracker of `useRestoreFocus`;\n * - `'announcer'` — the live-region announcer (`useAnnounce`);\n * - `'orderedSurfaces'` — the open surfaces whose keyboard order `usePopoverTabOrder` manages\n * (`Popover.shared.tsx`);\n * - `'toasterHandles'` — the state of every `createToaster()` handle (`toaster.ts`);\n * - `'warnings'` and `'missing-context'` — the warn-once keys and the logged missing-context\n * texts (`dev.ts`).\n *\n * @param key Registry name, e.g. `'warnings'` or `'layers'`.\n * @param create Factory for the initial value; called at most once per realm.\n */\nexport function getGlobalRegistry<T>(key: string, create: () => T): T {\n const symbol = Symbol.for(NAMESPACE + key);\n const store = globalThis as unknown as GlobalStore;\n if (!Object.prototype.hasOwnProperty.call(store, symbol)) {\n Object.defineProperty(store, symbol, {\n value: create(),\n configurable: true,\n enumerable: false,\n writable: true,\n });\n }\n return store[symbol] as T;\n}\n"],"mappings":"AA4BA,SAAgBA,EAAqB,GAAa,GAAoB;CACpE,IAAMC,IAAS,OAAO,IAAI,2BAAYC,CAAG,GACnCC,IAAQ;CASd,OARK,OAAO,UAAU,eAAe,KAAKA,GAAOF,CAAM,KACrD,OAAO,eAAeE,GAAOF,GAAQ;EACnC,OAAOG,EAAO;EACd,cAAc;EACd,YAAY;EACZ,UAAU;CACZ,CAAC,GAEID,EAAMF;AACf"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("react/jsx-runtime");function r({name:e,displayName:t,viewBox:r,defaultSize:i,paint:a,strokeWidth:o,content:s}){let c=a===`fill`?{fill:`currentColor`}:{fill:`none`,stroke:`currentColor`,strokeWidth:o,strokeLinecap:`round`,strokeLinejoin:`round`},l=({size:t=i,title:a,children:o,...l})=>{let u=a?{role:`img`}:{"aria-hidden":!0,focusable:`false`};return(0,n.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:t,height:t,viewBox:r,"data-wave-icon":e,...c,...u,...l,children:[a?(0,n.jsx)(`title`,{children:a}):null,s,o]})};return l.displayName=t,l}var i=`M2.22 4.47a.75.75 0 0 1 1.06 0L6 7.19l2.72-2.72a.75.75 0 1 1 1.06 1.06L6.53 8.78a.75.75 0 0 1-1.06 0L2.22 5.53a.75.75 0 0 1 0-1.06Z`,a=`M4.47 2.22a.75.75 0 0 0 0 1.06L7.19 6 4.47 8.72a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L5.53 2.22a.75.75 0 0 0-1.06 0Z`,o=`M7.53 2.22a.75.75 0 0 1 0 1.06L4.81 6l2.72 2.72a.75.75 0 1 1-1.06 1.06L3.22 6.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z`,s=r({name:`dismiss`,displayName:`DismissIcon`,viewBox:`0 0 20 20`,defaultSize:16,paint:`fill`,content:(0,n.jsx)(`path`,{d:`M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z`})}),c=r({name:`chevron-down`,displayName:`ChevronDownIcon`,viewBox:`0 0 12 12`,defaultSize:12,paint:`fill`,content:(0,n.jsx)(`path`,{d:i})}),l=r({name:`chevron-left`,displayName:`ChevronLeftIcon`,viewBox:`0 0 12 12`,defaultSize:12,paint:`fill`,content:(0,n.jsx)(`path`,{d:o})}),u=r({name:`chevron-right`,displayName:`ChevronRightIcon`,viewBox:`0 0 12 12`,defaultSize:12,paint:`fill`,content:(0,n.jsx)(`path`,{d:a})}),d=r({name:`chevron-double-left`,displayName:`ChevronDoubleLeftIcon`,viewBox:`0 0 12 12`,defaultSize:12,paint:`fill`,content:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`path`,{d:o,transform:`translate(-1.4 0)`}),(0,n.jsx)(`path`,{d:o,transform:`translate(2.6 0)`})]})}),f=r({name:`chevron-double-right`,displayName:`ChevronDoubleRightIcon`,viewBox:`0 0 12 12`,defaultSize:12,paint:`fill`,content:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`path`,{d:a,transform:`translate(-2.6 0)`}),(0,n.jsx)(`path`,{d:a,transform:`translate(1.4 0)`})]})}),p=r({name:`calendar`,displayName:`CalendarIcon`,viewBox:`0 0 20 20`,defaultSize:16,paint:`fill`,content:(0,n.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M5.75 2a.75.75 0 0 1 .75.75V4h7V2.75a.75.75 0 0 1 1.5 0V4h.25A2.75 2.75 0 0 1 18 6.75v8.5A2.75 2.75 0 0 1 15.25 18H4.75A2.75 2.75 0 0 1 2 15.25v-8.5A2.75 2.75 0 0 1 4.75 4H5V2.75A.75.75 0 0 1 5.75 2Zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75Z`})}),m=r({name:`check`,displayName:`CheckIcon`,viewBox:`0 0 12 12`,defaultSize:16,paint:`stroke`,strokeWidth:2,content:(0,n.jsx)(`path`,{d:`M2.5 6l2.5 2.5L9.5 3`})}),h=r({name:`subtract`,displayName:`SubtractIcon`,viewBox:`0 0 12 12`,defaultSize:16,paint:`stroke`,strokeWidth:2,content:(0,n.jsx)(`path`,{d:`M2.5 6h7`})}),g=r({name:`search`,displayName:`SearchIcon`,viewBox:`0 0 20 20`,defaultSize:16,paint:`fill`,content:(0,n.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.45 4.38l3.09 3.08a.75.75 0 1 1-1.06 1.06l-3.09-3.08A7 7 0 0 1 2 9Z`})}),_=r({name:`info`,displayName:`InfoIcon`,viewBox:`0 0 20 20`,defaultSize:16,paint:`fill`,content:(0,n.jsx)(`path`,{fillRule:`evenodd`,d:`M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.5 5v1h-1V7h1Zm0 3v4h-1v-4h1Z`})}),v=r({name:`success`,displayName:`SuccessIcon`,viewBox:`0 0 20 20`,defaultSize:16,paint:`fill`,content:(0,n.jsx)(`path`,{fillRule:`evenodd`,d:`M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm3.36 5.65-4 5a.5.5 0 0 1-.72.05l-2-2a.5.5 0 0 1 .72-.7l1.77 1.76 3.6-4.5a.5.5 0 0 1 .78.62l-.15.17Z`})}),y=r({name:`warning`,displayName:`WarningIcon`,viewBox:`0 0 20 20`,defaultSize:16,paint:`fill`,content:(0,n.jsx)(`path`,{fillRule:`evenodd`,d:`M9.15 3.45a1 1 0 0 1 1.7 0l6.86 11.44A1 1 0 0 1 16.86 17H3.14a1 1 0 0 1-.85-1.53L9.15 3.45ZM10.5 13v1h-1v-1h1Zm0-5v4h-1V8h1Z`})}),b=r({name:`error`,displayName:`ErrorIcon`,viewBox:`0 0 20 20`,defaultSize:16,paint:`fill`,content:(0,n.jsx)(`path`,{fillRule:`evenodd`,d:`M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.5 5v4h-1V7h1Zm0 6v1h-1v-1h1Z`})}),x=r({name:`star`,displayName:`StarIcon`,viewBox:`0 0 20 20`,defaultSize:16,paint:`fill`,content:(0,n.jsx)(`path`,{d:`M10 1.5l2.47 5.01 5.53.8-4 3.9.94 5.49L10 13.88l-4.94 2.82.94-5.49-4-3.9 5.53-.8L10 1.5Z`})}),S=r({name:`add`,displayName:`AddIcon`,viewBox:`0 0 12 12`,defaultSize:16,paint:`stroke`,strokeWidth:2,content:(0,n.jsx)(`path`,{d:`M6 2.5v7M2.5 6h7`})}),C=r({name:`person`,displayName:`PersonIcon`,viewBox:`0 0 20 20`,defaultSize:16,paint:`fill`,content:(0,n.jsx)(`path`,{d:`M10 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm-5.5 10h11A2.5 2.5 0 0 1 18 14.5v.5c0 2.4-2.9 4-8 4s-8-1.6-8-4v-.5A2.5 2.5 0 0 1 4.5 12Z`})}),w=r({name:`presence-available`,displayName:`PresenceAvailableIcon`,viewBox:`0 0 16 16`,defaultSize:16,paint:`stroke`,content:(0,n.jsx)(`path`,{d:`M4.6 8.3l2.2 2.2 4.6-4.8`,strokeWidth:2})}),T=r({name:`presence-busy`,displayName:`PresenceBusyIcon`,viewBox:`0 0 16 16`,defaultSize:16,paint:`fill`,content:(0,n.jsx)(`path`,{d:`M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Z`})}),E=r({name:`presence-away`,displayName:`PresenceAwayIcon`,viewBox:`0 0 16 16`,defaultSize:16,paint:`stroke`,content:(0,n.jsx)(`path`,{d:`M8 4.4V8l2.6 1.8`,strokeWidth:1.8})}),D=r({name:`presence-offline`,displayName:`PresenceOfflineIcon`,viewBox:`0 0 16 16`,defaultSize:16,paint:`stroke`,content:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`circle`,{cx:8,cy:8,r:6.5,strokeWidth:2.5}),(0,n.jsx)(`path`,{d:`M6 6l4 4m0-4l-4 4`,strokeWidth:1.6})]})}),O=r({name:`presence-dnd`,displayName:`PresenceDndIcon`,viewBox:`0 0 16 16`,defaultSize:16,paint:`stroke`,content:(0,n.jsx)(`path`,{d:`M4.5 8h7`,strokeWidth:2.2})}),k=r({name:`presence-oof`,displayName:`PresenceOofIcon`,viewBox:`0 0 16 16`,defaultSize:16,paint:`stroke`,content:(0,n.jsx)(`path`,{d:`M11.4 8H4.8m2.9-3L4.7 8l3 3`,strokeWidth:1.8})});exports.AddIcon=S,exports.CalendarIcon=p,exports.CheckIcon=m,exports.ChevronDoubleLeftIcon=d,exports.ChevronDoubleRightIcon=f,exports.ChevronDownIcon=c,exports.ChevronLeftIcon=l,exports.ChevronRightIcon=u,exports.DismissIcon=s,exports.ErrorIcon=b,exports.InfoIcon=_,exports.PersonIcon=C,exports.PresenceAvailableIcon=w,exports.PresenceAwayIcon=E,exports.PresenceBusyIcon=T,exports.PresenceDndIcon=O,exports.PresenceOfflineIcon=D,exports.PresenceOofIcon=k,exports.SearchIcon=g,exports.StarIcon=x,exports.SubtractIcon=h,exports.SuccessIcon=v,exports.WarningIcon=y;
|
|
2
|
+
//# sourceMappingURL=icons.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.cjs","names":["_Fragment","require_runtime","react","react_jsx_runtime","createIcon","paintProps","paint","Icon","defaultSize","rest","a11yProps","title","size","name","content","children","displayName","CHEVRON_DOWN","CHEVRON_RIGHT","CHEVRON_LEFT","DismissIcon","ChevronDownIcon","ChevronLeftIcon","ChevronRightIcon","ChevronDoubleLeftIcon","ChevronDoubleRightIcon","CalendarIcon","CheckIcon","SubtractIcon","SearchIcon","InfoIcon","SuccessIcon","WarningIcon","ErrorIcon","StarIcon","AddIcon","PersonIcon","PresenceAvailableIcon","PresenceBusyIcon","PresenceAwayIcon","PresenceOfflineIcon","PresenceDndIcon","PresenceOofIcon"],"sources":["../../src/lib/icons.tsx"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Props of the shared internal icons. Every other SVG attribute is forwarded to the `<svg>`.\n *\n * Icons are decorative by default (`aria-hidden=\"true\"`, `focusable=\"false\"`): the control that\n * contains them provides the accessible name. Pass `title` for a standalone meaningful icon; it\n * then renders `role=\"img\"` with a `<title>`.\n */\nexport interface IconProps extends React.SVGProps<SVGSVGElement> {\n /** Width and height (number = px, or any CSS length). Default 16 (chevrons 12). */\n size?: number | string;\n /** Accessible name; makes the icon a named image instead of a decorative one. */\n title?: string;\n}\n\n/** An internal icon component. */\nexport interface IconComponent {\n (props: IconProps): React.JSX.Element;\n displayName: string;\n}\n\ninterface IconDefinition {\n /** Value of `data-wave-icon`. */\n name: string;\n displayName: string;\n viewBox: string;\n defaultSize: number;\n /** Stroked glyphs paint with `stroke`, filled glyphs with `fill`. */\n paint: 'fill' | 'stroke';\n strokeWidth?: number;\n content: React.ReactNode;\n}\n\n/**\n * Builds an icon component. Side-effect free: every call site carries a `@__PURE__` annotation\n * comment so bundlers drop the icons a consumer does not use (a test bundles a one-icon entry with\n * Vite's production build). Keep that annotation on new icons.\n */\nfunction createIcon({\n name,\n displayName,\n viewBox,\n defaultSize,\n paint,\n strokeWidth,\n content,\n}: IconDefinition): IconComponent {\n const paintProps: React.SVGProps<SVGSVGElement> =\n paint === 'fill'\n ? { fill: 'currentColor' }\n : {\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n };\n\n const Icon = ({ size = defaultSize, title, children, ...rest }: IconProps) => {\n const a11yProps: React.SVGProps<SVGSVGElement> = title\n ? { role: 'img' }\n : { 'aria-hidden': true, focusable: 'false' };\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox={viewBox}\n data-wave-icon={name}\n {...paintProps}\n {...a11yProps}\n {...rest}\n >\n {title ? <title>{title}</title> : null}\n {content}\n {children}\n </svg>\n );\n };\n Icon.displayName = displayName;\n return Icon;\n}\n\nconst CHEVRON_DOWN =\n 'M2.22 4.47a.75.75 0 0 1 1.06 0L6 7.19l2.72-2.72a.75.75 0 1 1 1.06 1.06L6.53 8.78a.75.75 0 0 1-1.06 0L2.22 5.53a.75.75 0 0 1 0-1.06Z';\nconst CHEVRON_UP =\n 'M2.22 7.53a.75.75 0 0 0 1.06 0L6 4.81l2.72 2.72a.75.75 0 1 0 1.06-1.06L6.53 3.22a.75.75 0 0 0-1.06 0L2.22 6.47a.75.75 0 0 0 0 1.06Z';\nconst CHEVRON_RIGHT =\n 'M4.47 2.22a.75.75 0 0 0 0 1.06L7.19 6 4.47 8.72a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L5.53 2.22a.75.75 0 0 0-1.06 0Z';\nconst CHEVRON_LEFT =\n 'M7.53 2.22a.75.75 0 0 1 0 1.06L4.81 6l2.72 2.72a.75.75 0 1 1-1.06 1.06L3.22 6.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z';\n\n/** Close / clear / dismiss glyph (Dialog, Drawer, MessageBar, Toast, Tag, SearchBox, pickers). */\nexport const DismissIcon = /* @__PURE__ */ createIcon({\n name: 'dismiss',\n displayName: 'DismissIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path d=\"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z\" />\n ),\n});\n\n/** Disclosure chevron pointing down (MenuButton, SplitButton, Dropdown, Accordion). */\nexport const ChevronDownIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-down',\n displayName: 'ChevronDownIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: <path d={CHEVRON_DOWN} />,\n});\n\n/** Chevron pointing up. */\nexport const ChevronUpIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-up',\n displayName: 'ChevronUpIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: <path d={CHEVRON_UP} />,\n});\n\n/** Chevron pointing left (physical). Mirror directional uses with `wave-rtl:-scale-x-100`. */\nexport const ChevronLeftIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-left',\n displayName: 'ChevronLeftIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: <path d={CHEVRON_LEFT} />,\n});\n\n/** Chevron pointing right (physical). Mirror directional uses with `wave-rtl:-scale-x-100`. */\nexport const ChevronRightIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-right',\n displayName: 'ChevronRightIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: <path d={CHEVRON_RIGHT} />,\n});\n\n/** Double chevron pointing left (Pagination \"first\"). */\nexport const ChevronDoubleLeftIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-double-left',\n displayName: 'ChevronDoubleLeftIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: (\n <>\n <path d={CHEVRON_LEFT} transform=\"translate(-1.4 0)\" />\n <path d={CHEVRON_LEFT} transform=\"translate(2.6 0)\" />\n </>\n ),\n});\n\n/** Double chevron pointing right (Pagination \"last\"). */\nexport const ChevronDoubleRightIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-double-right',\n displayName: 'ChevronDoubleRightIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: (\n <>\n <path d={CHEVRON_RIGHT} transform=\"translate(-2.6 0)\" />\n <path d={CHEVRON_RIGHT} transform=\"translate(1.4 0)\" />\n </>\n ),\n});\n\n/** Calendar glyph (DatePicker toggle). */\nexport const CalendarIcon = /* @__PURE__ */ createIcon({\n name: 'calendar',\n displayName: 'CalendarIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5.75 2a.75.75 0 0 1 .75.75V4h7V2.75a.75.75 0 0 1 1.5 0V4h.25A2.75 2.75 0 0 1 18 6.75v8.5A2.75 2.75 0 0 1 15.25 18H4.75A2.75 2.75 0 0 1 2 15.25v-8.5A2.75 2.75 0 0 1 4.75 4H5V2.75A.75.75 0 0 1 5.75 2Zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75Z\"\n />\n ),\n});\n\n/** Clock glyph (TimePicker). */\nexport const ClockIcon = /* @__PURE__ */ createIcon({\n name: 'clock',\n displayName: 'ClockIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path d=\"M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Zm-.75 2.25a.75.75 0 0 1 1.5 0v3.94l2.28 2.28a.75.75 0 1 1-1.06 1.06l-2.5-2.5a.75.75 0 0 1-.22-.53V5.75Z\" />\n ),\n});\n\n/** Check mark (Checkbox, selected options). */\nexport const CheckIcon = /* @__PURE__ */ createIcon({\n name: 'check',\n displayName: 'CheckIcon',\n viewBox: '0 0 12 12',\n defaultSize: 16,\n paint: 'stroke',\n strokeWidth: 2,\n content: <path d=\"M2.5 6l2.5 2.5L9.5 3\" />,\n});\n\n/** Horizontal bar (indeterminate Checkbox). */\nexport const SubtractIcon = /* @__PURE__ */ createIcon({\n name: 'subtract',\n displayName: 'SubtractIcon',\n viewBox: '0 0 12 12',\n defaultSize: 16,\n paint: 'stroke',\n strokeWidth: 2,\n content: <path d=\"M2.5 6h7\" />,\n});\n\n/** Magnifier (SearchBox). */\nexport const SearchIcon = /* @__PURE__ */ createIcon({\n name: 'search',\n displayName: 'SearchIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.45 4.38l3.09 3.08a.75.75 0 1 1-1.06 1.06l-3.09-3.08A7 7 0 0 1 2 9Z\"\n />\n ),\n});\n\n/** Information glyph (InfoLabel, informational MessageBar/Toast). */\nexport const InfoIcon = /* @__PURE__ */ createIcon({\n name: 'info',\n displayName: 'InfoIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n d=\"M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.5 5v1h-1V7h1Zm0 3v4h-1v-4h1Z\"\n />\n ),\n});\n\n/** Success status glyph (MessageBar, Toast). */\nexport const SuccessIcon = /* @__PURE__ */ createIcon({\n name: 'success',\n displayName: 'SuccessIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n d=\"M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm3.36 5.65-4 5a.5.5 0 0 1-.72.05l-2-2a.5.5 0 0 1 .72-.7l1.77 1.76 3.6-4.5a.5.5 0 0 1 .78.62l-.15.17Z\"\n />\n ),\n});\n\n/** Warning status glyph (MessageBar, Toast). */\nexport const WarningIcon = /* @__PURE__ */ createIcon({\n name: 'warning',\n displayName: 'WarningIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n d=\"M9.15 3.45a1 1 0 0 1 1.7 0l6.86 11.44A1 1 0 0 1 16.86 17H3.14a1 1 0 0 1-.85-1.53L9.15 3.45ZM10.5 13v1h-1v-1h1Zm0-5v4h-1V8h1Z\"\n />\n ),\n});\n\n/** Error status glyph (MessageBar, Toast). */\nexport const ErrorIcon = /* @__PURE__ */ createIcon({\n name: 'error',\n displayName: 'ErrorIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n d=\"M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.5 5v4h-1V7h1Zm0 6v1h-1v-1h1Z\"\n />\n ),\n});\n\n/** Star (Rating). */\nexport const StarIcon = /* @__PURE__ */ createIcon({\n name: 'star',\n displayName: 'StarIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path d=\"M10 1.5l2.47 5.01 5.53.8-4 3.9.94 5.49L10 13.88l-4.94 2.82.94-5.49-4-3.9 5.53-.8L10 1.5Z\" />\n ),\n});\n\n/** Plus (SpinButton increment); the {@link SubtractIcon} bar plus a vertical bar. */\nexport const AddIcon = /* @__PURE__ */ createIcon({\n name: 'add',\n displayName: 'AddIcon',\n viewBox: '0 0 12 12',\n defaultSize: 16,\n paint: 'stroke',\n strokeWidth: 2,\n content: <path d=\"M6 2.5v7M2.5 6h7\" />,\n});\n\n/**\n * Generic person (Avatar fallback when there is no image, icon or name). Accepts a relative size\n * such as `size=\"60%\"` to scale with its container.\n */\nexport const PersonIcon = /* @__PURE__ */ createIcon({\n name: 'person',\n displayName: 'PersonIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path d=\"M10 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm-5.5 10h11A2.5 2.5 0 0 1 18 14.5v.5c0 2.4-2.9 4-8 4s-8-1.6-8-4v-.5A2.5 2.5 0 0 1 4.5 12Z\" />\n ),\n});\n\n/*\n * Presence glyphs (PresenceBadge). Drawn in a 16x16 box that the badge circle fills, with stroke\n * weights tuned for the 8-20px badge sizes; render them with `className=\"size-full\"`. They differ\n * from CheckIcon/ClockIcon/DismissIcon in geometry, so every status keeps a distinct shape at\n * badge size. Mirror the out-of-office arrow in right-to-left layouts (`wave-rtl:-scale-x-100`).\n */\n\n/** Presence \"available\": a check mark. */\nexport const PresenceAvailableIcon = /* @__PURE__ */ createIcon({\n name: 'presence-available',\n displayName: 'PresenceAvailableIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'stroke',\n content: <path d=\"M4.6 8.3l2.2 2.2 4.6-4.8\" strokeWidth={2} />,\n});\n\n/**\n * Presence \"busy\": a full disc in `currentColor`. Forced-colors mode replaces the badge background\n * with Canvas but forces `color` to CanvasText, so busy stays a solid dot instead of an empty ring.\n */\nexport const PresenceBusyIcon = /* @__PURE__ */ createIcon({\n name: 'presence-busy',\n displayName: 'PresenceBusyIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'fill',\n content: <path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Z\" />,\n});\n\n/** Presence \"away\": clock hands. */\nexport const PresenceAwayIcon = /* @__PURE__ */ createIcon({\n name: 'presence-away',\n displayName: 'PresenceAwayIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'stroke',\n content: <path d=\"M8 4.4V8l2.6 1.8\" strokeWidth={1.8} />,\n});\n\n/** Presence \"offline\": a hollow ring with an X. */\nexport const PresenceOfflineIcon = /* @__PURE__ */ createIcon({\n name: 'presence-offline',\n displayName: 'PresenceOfflineIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'stroke',\n content: (\n <>\n <circle cx={8} cy={8} r={6.5} strokeWidth={2.5} />\n <path d=\"M6 6l4 4m0-4l-4 4\" strokeWidth={1.6} />\n </>\n ),\n});\n\n/** Presence \"do not disturb\": a horizontal bar. */\nexport const PresenceDndIcon = /* @__PURE__ */ createIcon({\n name: 'presence-dnd',\n displayName: 'PresenceDndIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'stroke',\n content: <path d=\"M4.5 8h7\" strokeWidth={2.2} />,\n});\n\n/** Presence \"out of office\": an arrow pointing left (physical; mirror it in RTL). */\nexport const PresenceOofIcon = /* @__PURE__ */ createIcon({\n name: 'presence-oof',\n displayName: 'PresenceOofIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'stroke',\n content: <path d=\"M11.4 8H4.8m2.9-3L4.7 8l3 3\" strokeWidth={1.8} />,\n});\n"],"mappings":"gIAuCA,SAASI,EAAW,CAClB,OACA,cACA,UACA,cACA,QACA,cACA,WACgC,CAChC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C"}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/lib/icons.tsx
|
|
4
|
+
function r({ name: e, displayName: r, viewBox: i, defaultSize: a, paint: o, strokeWidth: s, content: c }) {
|
|
5
|
+
let l = o === "fill" ? { fill: "currentColor" } : {
|
|
6
|
+
fill: "none",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
strokeWidth: s,
|
|
9
|
+
strokeLinecap: "round",
|
|
10
|
+
strokeLinejoin: "round"
|
|
11
|
+
}, u = ({ size: r = a, title: o, children: s, ...u }) => {
|
|
12
|
+
let d = o ? { role: "img" } : {
|
|
13
|
+
"aria-hidden": !0,
|
|
14
|
+
focusable: "false"
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ n("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
width: r,
|
|
19
|
+
height: r,
|
|
20
|
+
viewBox: i,
|
|
21
|
+
"data-wave-icon": e,
|
|
22
|
+
...l,
|
|
23
|
+
...d,
|
|
24
|
+
...u,
|
|
25
|
+
children: [
|
|
26
|
+
o ? /* @__PURE__ */ t("title", { children: o }) : null,
|
|
27
|
+
c,
|
|
28
|
+
s
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
return u.displayName = r, u;
|
|
33
|
+
}
|
|
34
|
+
var i = "M2.22 4.47a.75.75 0 0 1 1.06 0L6 7.19l2.72-2.72a.75.75 0 1 1 1.06 1.06L6.53 8.78a.75.75 0 0 1-1.06 0L2.22 5.53a.75.75 0 0 1 0-1.06Z", a = "M4.47 2.22a.75.75 0 0 0 0 1.06L7.19 6 4.47 8.72a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L5.53 2.22a.75.75 0 0 0-1.06 0Z", o = "M7.53 2.22a.75.75 0 0 1 0 1.06L4.81 6l2.72 2.72a.75.75 0 1 1-1.06 1.06L3.22 6.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z", s = /* @__PURE__ */ r({
|
|
35
|
+
name: "dismiss",
|
|
36
|
+
displayName: "DismissIcon",
|
|
37
|
+
viewBox: "0 0 20 20",
|
|
38
|
+
defaultSize: 16,
|
|
39
|
+
paint: "fill",
|
|
40
|
+
content: /* @__PURE__ */ t("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
|
|
41
|
+
}), c = /* @__PURE__ */ r({
|
|
42
|
+
name: "chevron-down",
|
|
43
|
+
displayName: "ChevronDownIcon",
|
|
44
|
+
viewBox: "0 0 12 12",
|
|
45
|
+
defaultSize: 12,
|
|
46
|
+
paint: "fill",
|
|
47
|
+
content: /* @__PURE__ */ t("path", { d: i })
|
|
48
|
+
}), l = /* @__PURE__ */ r({
|
|
49
|
+
name: "chevron-left",
|
|
50
|
+
displayName: "ChevronLeftIcon",
|
|
51
|
+
viewBox: "0 0 12 12",
|
|
52
|
+
defaultSize: 12,
|
|
53
|
+
paint: "fill",
|
|
54
|
+
content: /* @__PURE__ */ t("path", { d: o })
|
|
55
|
+
}), u = /* @__PURE__ */ r({
|
|
56
|
+
name: "chevron-right",
|
|
57
|
+
displayName: "ChevronRightIcon",
|
|
58
|
+
viewBox: "0 0 12 12",
|
|
59
|
+
defaultSize: 12,
|
|
60
|
+
paint: "fill",
|
|
61
|
+
content: /* @__PURE__ */ t("path", { d: a })
|
|
62
|
+
}), d = /* @__PURE__ */ r({
|
|
63
|
+
name: "chevron-double-left",
|
|
64
|
+
displayName: "ChevronDoubleLeftIcon",
|
|
65
|
+
viewBox: "0 0 12 12",
|
|
66
|
+
defaultSize: 12,
|
|
67
|
+
paint: "fill",
|
|
68
|
+
content: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("path", {
|
|
69
|
+
d: o,
|
|
70
|
+
transform: "translate(-1.4 0)"
|
|
71
|
+
}), /* @__PURE__ */ t("path", {
|
|
72
|
+
d: o,
|
|
73
|
+
transform: "translate(2.6 0)"
|
|
74
|
+
})] })
|
|
75
|
+
}), f = /* @__PURE__ */ r({
|
|
76
|
+
name: "chevron-double-right",
|
|
77
|
+
displayName: "ChevronDoubleRightIcon",
|
|
78
|
+
viewBox: "0 0 12 12",
|
|
79
|
+
defaultSize: 12,
|
|
80
|
+
paint: "fill",
|
|
81
|
+
content: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("path", {
|
|
82
|
+
d: a,
|
|
83
|
+
transform: "translate(-2.6 0)"
|
|
84
|
+
}), /* @__PURE__ */ t("path", {
|
|
85
|
+
d: a,
|
|
86
|
+
transform: "translate(1.4 0)"
|
|
87
|
+
})] })
|
|
88
|
+
}), p = /* @__PURE__ */ r({
|
|
89
|
+
name: "calendar",
|
|
90
|
+
displayName: "CalendarIcon",
|
|
91
|
+
viewBox: "0 0 20 20",
|
|
92
|
+
defaultSize: 16,
|
|
93
|
+
paint: "fill",
|
|
94
|
+
content: /* @__PURE__ */ t("path", {
|
|
95
|
+
fillRule: "evenodd",
|
|
96
|
+
clipRule: "evenodd",
|
|
97
|
+
d: "M5.75 2a.75.75 0 0 1 .75.75V4h7V2.75a.75.75 0 0 1 1.5 0V4h.25A2.75 2.75 0 0 1 18 6.75v8.5A2.75 2.75 0 0 1 15.25 18H4.75A2.75 2.75 0 0 1 2 15.25v-8.5A2.75 2.75 0 0 1 4.75 4H5V2.75A.75.75 0 0 1 5.75 2Zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75Z"
|
|
98
|
+
})
|
|
99
|
+
}), m = /* @__PURE__ */ r({
|
|
100
|
+
name: "check",
|
|
101
|
+
displayName: "CheckIcon",
|
|
102
|
+
viewBox: "0 0 12 12",
|
|
103
|
+
defaultSize: 16,
|
|
104
|
+
paint: "stroke",
|
|
105
|
+
strokeWidth: 2,
|
|
106
|
+
content: /* @__PURE__ */ t("path", { d: "M2.5 6l2.5 2.5L9.5 3" })
|
|
107
|
+
}), h = /* @__PURE__ */ r({
|
|
108
|
+
name: "subtract",
|
|
109
|
+
displayName: "SubtractIcon",
|
|
110
|
+
viewBox: "0 0 12 12",
|
|
111
|
+
defaultSize: 16,
|
|
112
|
+
paint: "stroke",
|
|
113
|
+
strokeWidth: 2,
|
|
114
|
+
content: /* @__PURE__ */ t("path", { d: "M2.5 6h7" })
|
|
115
|
+
}), g = /* @__PURE__ */ r({
|
|
116
|
+
name: "search",
|
|
117
|
+
displayName: "SearchIcon",
|
|
118
|
+
viewBox: "0 0 20 20",
|
|
119
|
+
defaultSize: 16,
|
|
120
|
+
paint: "fill",
|
|
121
|
+
content: /* @__PURE__ */ t("path", {
|
|
122
|
+
fillRule: "evenodd",
|
|
123
|
+
clipRule: "evenodd",
|
|
124
|
+
d: "M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.45 4.38l3.09 3.08a.75.75 0 1 1-1.06 1.06l-3.09-3.08A7 7 0 0 1 2 9Z"
|
|
125
|
+
})
|
|
126
|
+
}), _ = /* @__PURE__ */ r({
|
|
127
|
+
name: "info",
|
|
128
|
+
displayName: "InfoIcon",
|
|
129
|
+
viewBox: "0 0 20 20",
|
|
130
|
+
defaultSize: 16,
|
|
131
|
+
paint: "fill",
|
|
132
|
+
content: /* @__PURE__ */ t("path", {
|
|
133
|
+
fillRule: "evenodd",
|
|
134
|
+
d: "M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.5 5v1h-1V7h1Zm0 3v4h-1v-4h1Z"
|
|
135
|
+
})
|
|
136
|
+
}), v = /* @__PURE__ */ r({
|
|
137
|
+
name: "success",
|
|
138
|
+
displayName: "SuccessIcon",
|
|
139
|
+
viewBox: "0 0 20 20",
|
|
140
|
+
defaultSize: 16,
|
|
141
|
+
paint: "fill",
|
|
142
|
+
content: /* @__PURE__ */ t("path", {
|
|
143
|
+
fillRule: "evenodd",
|
|
144
|
+
d: "M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm3.36 5.65-4 5a.5.5 0 0 1-.72.05l-2-2a.5.5 0 0 1 .72-.7l1.77 1.76 3.6-4.5a.5.5 0 0 1 .78.62l-.15.17Z"
|
|
145
|
+
})
|
|
146
|
+
}), y = /* @__PURE__ */ r({
|
|
147
|
+
name: "warning",
|
|
148
|
+
displayName: "WarningIcon",
|
|
149
|
+
viewBox: "0 0 20 20",
|
|
150
|
+
defaultSize: 16,
|
|
151
|
+
paint: "fill",
|
|
152
|
+
content: /* @__PURE__ */ t("path", {
|
|
153
|
+
fillRule: "evenodd",
|
|
154
|
+
d: "M9.15 3.45a1 1 0 0 1 1.7 0l6.86 11.44A1 1 0 0 1 16.86 17H3.14a1 1 0 0 1-.85-1.53L9.15 3.45ZM10.5 13v1h-1v-1h1Zm0-5v4h-1V8h1Z"
|
|
155
|
+
})
|
|
156
|
+
}), b = /* @__PURE__ */ r({
|
|
157
|
+
name: "error",
|
|
158
|
+
displayName: "ErrorIcon",
|
|
159
|
+
viewBox: "0 0 20 20",
|
|
160
|
+
defaultSize: 16,
|
|
161
|
+
paint: "fill",
|
|
162
|
+
content: /* @__PURE__ */ t("path", {
|
|
163
|
+
fillRule: "evenodd",
|
|
164
|
+
d: "M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.5 5v4h-1V7h1Zm0 6v1h-1v-1h1Z"
|
|
165
|
+
})
|
|
166
|
+
}), x = /* @__PURE__ */ r({
|
|
167
|
+
name: "star",
|
|
168
|
+
displayName: "StarIcon",
|
|
169
|
+
viewBox: "0 0 20 20",
|
|
170
|
+
defaultSize: 16,
|
|
171
|
+
paint: "fill",
|
|
172
|
+
content: /* @__PURE__ */ t("path", { d: "M10 1.5l2.47 5.01 5.53.8-4 3.9.94 5.49L10 13.88l-4.94 2.82.94-5.49-4-3.9 5.53-.8L10 1.5Z" })
|
|
173
|
+
}), S = /* @__PURE__ */ r({
|
|
174
|
+
name: "add",
|
|
175
|
+
displayName: "AddIcon",
|
|
176
|
+
viewBox: "0 0 12 12",
|
|
177
|
+
defaultSize: 16,
|
|
178
|
+
paint: "stroke",
|
|
179
|
+
strokeWidth: 2,
|
|
180
|
+
content: /* @__PURE__ */ t("path", { d: "M6 2.5v7M2.5 6h7" })
|
|
181
|
+
}), C = /* @__PURE__ */ r({
|
|
182
|
+
name: "person",
|
|
183
|
+
displayName: "PersonIcon",
|
|
184
|
+
viewBox: "0 0 20 20",
|
|
185
|
+
defaultSize: 16,
|
|
186
|
+
paint: "fill",
|
|
187
|
+
content: /* @__PURE__ */ t("path", { d: "M10 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm-5.5 10h11A2.5 2.5 0 0 1 18 14.5v.5c0 2.4-2.9 4-8 4s-8-1.6-8-4v-.5A2.5 2.5 0 0 1 4.5 12Z" })
|
|
188
|
+
}), w = /* @__PURE__ */ r({
|
|
189
|
+
name: "presence-available",
|
|
190
|
+
displayName: "PresenceAvailableIcon",
|
|
191
|
+
viewBox: "0 0 16 16",
|
|
192
|
+
defaultSize: 16,
|
|
193
|
+
paint: "stroke",
|
|
194
|
+
content: /* @__PURE__ */ t("path", {
|
|
195
|
+
d: "M4.6 8.3l2.2 2.2 4.6-4.8",
|
|
196
|
+
strokeWidth: 2
|
|
197
|
+
})
|
|
198
|
+
}), T = /* @__PURE__ */ r({
|
|
199
|
+
name: "presence-busy",
|
|
200
|
+
displayName: "PresenceBusyIcon",
|
|
201
|
+
viewBox: "0 0 16 16",
|
|
202
|
+
defaultSize: 16,
|
|
203
|
+
paint: "fill",
|
|
204
|
+
content: /* @__PURE__ */ t("path", { d: "M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Z" })
|
|
205
|
+
}), E = /* @__PURE__ */ r({
|
|
206
|
+
name: "presence-away",
|
|
207
|
+
displayName: "PresenceAwayIcon",
|
|
208
|
+
viewBox: "0 0 16 16",
|
|
209
|
+
defaultSize: 16,
|
|
210
|
+
paint: "stroke",
|
|
211
|
+
content: /* @__PURE__ */ t("path", {
|
|
212
|
+
d: "M8 4.4V8l2.6 1.8",
|
|
213
|
+
strokeWidth: 1.8
|
|
214
|
+
})
|
|
215
|
+
}), D = /* @__PURE__ */ r({
|
|
216
|
+
name: "presence-offline",
|
|
217
|
+
displayName: "PresenceOfflineIcon",
|
|
218
|
+
viewBox: "0 0 16 16",
|
|
219
|
+
defaultSize: 16,
|
|
220
|
+
paint: "stroke",
|
|
221
|
+
content: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("circle", {
|
|
222
|
+
cx: 8,
|
|
223
|
+
cy: 8,
|
|
224
|
+
r: 6.5,
|
|
225
|
+
strokeWidth: 2.5
|
|
226
|
+
}), /* @__PURE__ */ t("path", {
|
|
227
|
+
d: "M6 6l4 4m0-4l-4 4",
|
|
228
|
+
strokeWidth: 1.6
|
|
229
|
+
})] })
|
|
230
|
+
}), O = /* @__PURE__ */ r({
|
|
231
|
+
name: "presence-dnd",
|
|
232
|
+
displayName: "PresenceDndIcon",
|
|
233
|
+
viewBox: "0 0 16 16",
|
|
234
|
+
defaultSize: 16,
|
|
235
|
+
paint: "stroke",
|
|
236
|
+
content: /* @__PURE__ */ t("path", {
|
|
237
|
+
d: "M4.5 8h7",
|
|
238
|
+
strokeWidth: 2.2
|
|
239
|
+
})
|
|
240
|
+
}), k = /* @__PURE__ */ r({
|
|
241
|
+
name: "presence-oof",
|
|
242
|
+
displayName: "PresenceOofIcon",
|
|
243
|
+
viewBox: "0 0 16 16",
|
|
244
|
+
defaultSize: 16,
|
|
245
|
+
paint: "stroke",
|
|
246
|
+
content: /* @__PURE__ */ t("path", {
|
|
247
|
+
d: "M11.4 8H4.8m2.9-3L4.7 8l3 3",
|
|
248
|
+
strokeWidth: 1.8
|
|
249
|
+
})
|
|
250
|
+
});
|
|
251
|
+
//#endregion
|
|
252
|
+
export { S as AddIcon, p as CalendarIcon, m as CheckIcon, d as ChevronDoubleLeftIcon, f as ChevronDoubleRightIcon, c as ChevronDownIcon, l as ChevronLeftIcon, u as ChevronRightIcon, s as DismissIcon, b as ErrorIcon, _ as InfoIcon, C as PersonIcon, w as PresenceAvailableIcon, E as PresenceAwayIcon, T as PresenceBusyIcon, O as PresenceDndIcon, D as PresenceOfflineIcon, k as PresenceOofIcon, g as SearchIcon, x as StarIcon, h as SubtractIcon, v as SuccessIcon, y as WarningIcon };
|
|
253
|
+
|
|
254
|
+
//# sourceMappingURL=icons.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.mjs","names":["_Fragment","createIcon","paintProps","paint","Icon","defaultSize","rest","a11yProps","title","size","name","content","children","displayName","CHEVRON_DOWN","CHEVRON_RIGHT","CHEVRON_LEFT","DismissIcon","ChevronDownIcon","ChevronLeftIcon","ChevronRightIcon","ChevronDoubleLeftIcon","Fragment","ChevronDoubleRightIcon","CalendarIcon","CheckIcon","SubtractIcon","SearchIcon","InfoIcon","SuccessIcon","WarningIcon","ErrorIcon","StarIcon","AddIcon","PersonIcon","PresenceAvailableIcon","PresenceBusyIcon","PresenceAwayIcon","PresenceOfflineIcon","PresenceDndIcon","PresenceOofIcon"],"sources":["../../src/lib/icons.tsx"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Props of the shared internal icons. Every other SVG attribute is forwarded to the `<svg>`.\n *\n * Icons are decorative by default (`aria-hidden=\"true\"`, `focusable=\"false\"`): the control that\n * contains them provides the accessible name. Pass `title` for a standalone meaningful icon; it\n * then renders `role=\"img\"` with a `<title>`.\n */\nexport interface IconProps extends React.SVGProps<SVGSVGElement> {\n /** Width and height (number = px, or any CSS length). Default 16 (chevrons 12). */\n size?: number | string;\n /** Accessible name; makes the icon a named image instead of a decorative one. */\n title?: string;\n}\n\n/** An internal icon component. */\nexport interface IconComponent {\n (props: IconProps): React.JSX.Element;\n displayName: string;\n}\n\ninterface IconDefinition {\n /** Value of `data-wave-icon`. */\n name: string;\n displayName: string;\n viewBox: string;\n defaultSize: number;\n /** Stroked glyphs paint with `stroke`, filled glyphs with `fill`. */\n paint: 'fill' | 'stroke';\n strokeWidth?: number;\n content: React.ReactNode;\n}\n\n/**\n * Builds an icon component. Side-effect free: every call site carries a `@__PURE__` annotation\n * comment so bundlers drop the icons a consumer does not use (a test bundles a one-icon entry with\n * Vite's production build). Keep that annotation on new icons.\n */\nfunction createIcon({\n name,\n displayName,\n viewBox,\n defaultSize,\n paint,\n strokeWidth,\n content,\n}: IconDefinition): IconComponent {\n const paintProps: React.SVGProps<SVGSVGElement> =\n paint === 'fill'\n ? { fill: 'currentColor' }\n : {\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n };\n\n const Icon = ({ size = defaultSize, title, children, ...rest }: IconProps) => {\n const a11yProps: React.SVGProps<SVGSVGElement> = title\n ? { role: 'img' }\n : { 'aria-hidden': true, focusable: 'false' };\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox={viewBox}\n data-wave-icon={name}\n {...paintProps}\n {...a11yProps}\n {...rest}\n >\n {title ? <title>{title}</title> : null}\n {content}\n {children}\n </svg>\n );\n };\n Icon.displayName = displayName;\n return Icon;\n}\n\nconst CHEVRON_DOWN =\n 'M2.22 4.47a.75.75 0 0 1 1.06 0L6 7.19l2.72-2.72a.75.75 0 1 1 1.06 1.06L6.53 8.78a.75.75 0 0 1-1.06 0L2.22 5.53a.75.75 0 0 1 0-1.06Z';\nconst CHEVRON_UP =\n 'M2.22 7.53a.75.75 0 0 0 1.06 0L6 4.81l2.72 2.72a.75.75 0 1 0 1.06-1.06L6.53 3.22a.75.75 0 0 0-1.06 0L2.22 6.47a.75.75 0 0 0 0 1.06Z';\nconst CHEVRON_RIGHT =\n 'M4.47 2.22a.75.75 0 0 0 0 1.06L7.19 6 4.47 8.72a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L5.53 2.22a.75.75 0 0 0-1.06 0Z';\nconst CHEVRON_LEFT =\n 'M7.53 2.22a.75.75 0 0 1 0 1.06L4.81 6l2.72 2.72a.75.75 0 1 1-1.06 1.06L3.22 6.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z';\n\n/** Close / clear / dismiss glyph (Dialog, Drawer, MessageBar, Toast, Tag, SearchBox, pickers). */\nexport const DismissIcon = /* @__PURE__ */ createIcon({\n name: 'dismiss',\n displayName: 'DismissIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path d=\"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z\" />\n ),\n});\n\n/** Disclosure chevron pointing down (MenuButton, SplitButton, Dropdown, Accordion). */\nexport const ChevronDownIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-down',\n displayName: 'ChevronDownIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: <path d={CHEVRON_DOWN} />,\n});\n\n/** Chevron pointing up. */\nexport const ChevronUpIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-up',\n displayName: 'ChevronUpIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: <path d={CHEVRON_UP} />,\n});\n\n/** Chevron pointing left (physical). Mirror directional uses with `wave-rtl:-scale-x-100`. */\nexport const ChevronLeftIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-left',\n displayName: 'ChevronLeftIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: <path d={CHEVRON_LEFT} />,\n});\n\n/** Chevron pointing right (physical). Mirror directional uses with `wave-rtl:-scale-x-100`. */\nexport const ChevronRightIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-right',\n displayName: 'ChevronRightIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: <path d={CHEVRON_RIGHT} />,\n});\n\n/** Double chevron pointing left (Pagination \"first\"). */\nexport const ChevronDoubleLeftIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-double-left',\n displayName: 'ChevronDoubleLeftIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: (\n <>\n <path d={CHEVRON_LEFT} transform=\"translate(-1.4 0)\" />\n <path d={CHEVRON_LEFT} transform=\"translate(2.6 0)\" />\n </>\n ),\n});\n\n/** Double chevron pointing right (Pagination \"last\"). */\nexport const ChevronDoubleRightIcon = /* @__PURE__ */ createIcon({\n name: 'chevron-double-right',\n displayName: 'ChevronDoubleRightIcon',\n viewBox: '0 0 12 12',\n defaultSize: 12,\n paint: 'fill',\n content: (\n <>\n <path d={CHEVRON_RIGHT} transform=\"translate(-2.6 0)\" />\n <path d={CHEVRON_RIGHT} transform=\"translate(1.4 0)\" />\n </>\n ),\n});\n\n/** Calendar glyph (DatePicker toggle). */\nexport const CalendarIcon = /* @__PURE__ */ createIcon({\n name: 'calendar',\n displayName: 'CalendarIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5.75 2a.75.75 0 0 1 .75.75V4h7V2.75a.75.75 0 0 1 1.5 0V4h.25A2.75 2.75 0 0 1 18 6.75v8.5A2.75 2.75 0 0 1 15.25 18H4.75A2.75 2.75 0 0 1 2 15.25v-8.5A2.75 2.75 0 0 1 4.75 4H5V2.75A.75.75 0 0 1 5.75 2Zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75Z\"\n />\n ),\n});\n\n/** Clock glyph (TimePicker). */\nexport const ClockIcon = /* @__PURE__ */ createIcon({\n name: 'clock',\n displayName: 'ClockIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path d=\"M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Zm-.75 2.25a.75.75 0 0 1 1.5 0v3.94l2.28 2.28a.75.75 0 1 1-1.06 1.06l-2.5-2.5a.75.75 0 0 1-.22-.53V5.75Z\" />\n ),\n});\n\n/** Check mark (Checkbox, selected options). */\nexport const CheckIcon = /* @__PURE__ */ createIcon({\n name: 'check',\n displayName: 'CheckIcon',\n viewBox: '0 0 12 12',\n defaultSize: 16,\n paint: 'stroke',\n strokeWidth: 2,\n content: <path d=\"M2.5 6l2.5 2.5L9.5 3\" />,\n});\n\n/** Horizontal bar (indeterminate Checkbox). */\nexport const SubtractIcon = /* @__PURE__ */ createIcon({\n name: 'subtract',\n displayName: 'SubtractIcon',\n viewBox: '0 0 12 12',\n defaultSize: 16,\n paint: 'stroke',\n strokeWidth: 2,\n content: <path d=\"M2.5 6h7\" />,\n});\n\n/** Magnifier (SearchBox). */\nexport const SearchIcon = /* @__PURE__ */ createIcon({\n name: 'search',\n displayName: 'SearchIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.45 4.38l3.09 3.08a.75.75 0 1 1-1.06 1.06l-3.09-3.08A7 7 0 0 1 2 9Z\"\n />\n ),\n});\n\n/** Information glyph (InfoLabel, informational MessageBar/Toast). */\nexport const InfoIcon = /* @__PURE__ */ createIcon({\n name: 'info',\n displayName: 'InfoIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n d=\"M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.5 5v1h-1V7h1Zm0 3v4h-1v-4h1Z\"\n />\n ),\n});\n\n/** Success status glyph (MessageBar, Toast). */\nexport const SuccessIcon = /* @__PURE__ */ createIcon({\n name: 'success',\n displayName: 'SuccessIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n d=\"M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm3.36 5.65-4 5a.5.5 0 0 1-.72.05l-2-2a.5.5 0 0 1 .72-.7l1.77 1.76 3.6-4.5a.5.5 0 0 1 .78.62l-.15.17Z\"\n />\n ),\n});\n\n/** Warning status glyph (MessageBar, Toast). */\nexport const WarningIcon = /* @__PURE__ */ createIcon({\n name: 'warning',\n displayName: 'WarningIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n d=\"M9.15 3.45a1 1 0 0 1 1.7 0l6.86 11.44A1 1 0 0 1 16.86 17H3.14a1 1 0 0 1-.85-1.53L9.15 3.45ZM10.5 13v1h-1v-1h1Zm0-5v4h-1V8h1Z\"\n />\n ),\n});\n\n/** Error status glyph (MessageBar, Toast). */\nexport const ErrorIcon = /* @__PURE__ */ createIcon({\n name: 'error',\n displayName: 'ErrorIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path\n fillRule=\"evenodd\"\n d=\"M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.5 5v4h-1V7h1Zm0 6v1h-1v-1h1Z\"\n />\n ),\n});\n\n/** Star (Rating). */\nexport const StarIcon = /* @__PURE__ */ createIcon({\n name: 'star',\n displayName: 'StarIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path d=\"M10 1.5l2.47 5.01 5.53.8-4 3.9.94 5.49L10 13.88l-4.94 2.82.94-5.49-4-3.9 5.53-.8L10 1.5Z\" />\n ),\n});\n\n/** Plus (SpinButton increment); the {@link SubtractIcon} bar plus a vertical bar. */\nexport const AddIcon = /* @__PURE__ */ createIcon({\n name: 'add',\n displayName: 'AddIcon',\n viewBox: '0 0 12 12',\n defaultSize: 16,\n paint: 'stroke',\n strokeWidth: 2,\n content: <path d=\"M6 2.5v7M2.5 6h7\" />,\n});\n\n/**\n * Generic person (Avatar fallback when there is no image, icon or name). Accepts a relative size\n * such as `size=\"60%\"` to scale with its container.\n */\nexport const PersonIcon = /* @__PURE__ */ createIcon({\n name: 'person',\n displayName: 'PersonIcon',\n viewBox: '0 0 20 20',\n defaultSize: 16,\n paint: 'fill',\n content: (\n <path d=\"M10 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm-5.5 10h11A2.5 2.5 0 0 1 18 14.5v.5c0 2.4-2.9 4-8 4s-8-1.6-8-4v-.5A2.5 2.5 0 0 1 4.5 12Z\" />\n ),\n});\n\n/*\n * Presence glyphs (PresenceBadge). Drawn in a 16x16 box that the badge circle fills, with stroke\n * weights tuned for the 8-20px badge sizes; render them with `className=\"size-full\"`. They differ\n * from CheckIcon/ClockIcon/DismissIcon in geometry, so every status keeps a distinct shape at\n * badge size. Mirror the out-of-office arrow in right-to-left layouts (`wave-rtl:-scale-x-100`).\n */\n\n/** Presence \"available\": a check mark. */\nexport const PresenceAvailableIcon = /* @__PURE__ */ createIcon({\n name: 'presence-available',\n displayName: 'PresenceAvailableIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'stroke',\n content: <path d=\"M4.6 8.3l2.2 2.2 4.6-4.8\" strokeWidth={2} />,\n});\n\n/**\n * Presence \"busy\": a full disc in `currentColor`. Forced-colors mode replaces the badge background\n * with Canvas but forces `color` to CanvasText, so busy stays a solid dot instead of an empty ring.\n */\nexport const PresenceBusyIcon = /* @__PURE__ */ createIcon({\n name: 'presence-busy',\n displayName: 'PresenceBusyIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'fill',\n content: <path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Z\" />,\n});\n\n/** Presence \"away\": clock hands. */\nexport const PresenceAwayIcon = /* @__PURE__ */ createIcon({\n name: 'presence-away',\n displayName: 'PresenceAwayIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'stroke',\n content: <path d=\"M8 4.4V8l2.6 1.8\" strokeWidth={1.8} />,\n});\n\n/** Presence \"offline\": a hollow ring with an X. */\nexport const PresenceOfflineIcon = /* @__PURE__ */ createIcon({\n name: 'presence-offline',\n displayName: 'PresenceOfflineIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'stroke',\n content: (\n <>\n <circle cx={8} cy={8} r={6.5} strokeWidth={2.5} />\n <path d=\"M6 6l4 4m0-4l-4 4\" strokeWidth={1.6} />\n </>\n ),\n});\n\n/** Presence \"do not disturb\": a horizontal bar. */\nexport const PresenceDndIcon = /* @__PURE__ */ createIcon({\n name: 'presence-dnd',\n displayName: 'PresenceDndIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'stroke',\n content: <path d=\"M4.5 8h7\" strokeWidth={2.2} />,\n});\n\n/** Presence \"out of office\": an arrow pointing left (physical; mirror it in RTL). */\nexport const PresenceOofIcon = /* @__PURE__ */ createIcon({\n name: 'presence-oof',\n displayName: 'PresenceOofIcon',\n viewBox: '0 0 16 16',\n defaultSize: 16,\n paint: 'stroke',\n content: <path d=\"M11.4 8H4.8m2.9-3L4.7 8l3 3\" strokeWidth={1.8} />,\n});\n"],"mappings":";;;AAuCA,SAASC,EAAW,EAClB,SACA,gBACA,YACA,gBACA,UACA,gBACA,cACgC;CAChC,IAAMC,IACJC,MAAU,SACN,EAAE,MAAM,eAAe,IACvB;E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a;CACb,OAAO;CACP,SACE,kBAAAtC,GAAA,EAAA,UAAA,CACE,kBAAC,UAAD;EAAQ,IAAI;EAAG,IAAI;EAAG,GAAG;EAAK,aAAa;CAAM,CAAA,GACjD,kBAAC,QAAD;EAAM,GAAE;EAAoB,aAAa;CAAM,CAAA,CAC/C,EAAA,CAAA;AAEN,CAAC,GAGYuC,IAAkC,kBAAW;CACxD,MAAM;CACN,aAAa;CACb,SAAS;CACT,aAAa;CACb,OAAO;CACP,SAAS,kBAAC,QAAD;EAAM,GAAE;EAAW,aAAa;CAAM,CAAA;AACjD,CAAC,GAGYC,IAAkC,kBAAW;CACxD,MAAM;CACN,aAAa;CACb,SAAS;CACT,aAAa;CACb,OAAO;CACP,SAAS,kBAAC,QAAD;EAAM,GAAE;EAA8B,aAAa;CAAM,CAAA;AACpE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);var n=/[\p{L}\p{N}]/gu,r=2,i=new Set([`title`,`desc`,`style`,`script`,`template`]);function a(e){return e.match(n)?.length??0}function o(e){if(typeof e==`string`)return a(e);if(typeof e==`number`||typeof e==`bigint`)return a(String(e));if(typeof e!=`object`||!e)return 0;if(t.isValidElement(e)){let{props:t}=e,n=t[`aria-hidden`];return n===!0||n===`true`||t.hidden||typeof e.type==`string`&&i.has(e.type)?0:o(t.children)}if(!(Symbol.iterator in e))return 0;let n=e;if(!Array.isArray(n)&&n[Symbol.iterator]()===n)return 0;let s=0;for(let e of n)if(s+=o(e),s>=r)break;return s}function s(e){return o(e)>=r}function c(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode(e){if(e.nodeType===Node.TEXT_NODE)return NodeFilter.FILTER_ACCEPT;let t=e;return t.getAttribute(`aria-hidden`)===`true`||t.hasAttribute(`hidden`)||i.has(t.localName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}}),n=0;for(;t.nextNode();)if(n+=a(t.currentNode.nodeValue??``),n>=r)return!0;return!1}var l={childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`aria-hidden`,`hidden`]};function u(e,t){let n=new MutationObserver(()=>t());return n.observe(e,l),()=>n.disconnect()}exports.hasRenderedTextLabel=c,exports.hasTextLabel=s,exports.observeTextLabel=u;
|
|
2
|
+
//# sourceMappingURL=labelInName.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelInName.cjs","names":["React","require_runtime","react","LABEL_CHARACTER","MIN_LABEL_CHARACTERS","NON_LABEL_ELEMENTS","countLabelCharacters","text","countLiteralLabelCharacters","node","ariaHidden","props","iterable","count","item","hasTextLabel","hasRenderedTextLabel","walker","element","child","LABEL_MUTATIONS","observeTextLabel","observer","onChange"],"sources":["../../src/lib/labelInName.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * The C-SLOTS naming predicate (spec §1, WCAG 2.5.3 Label in Name): whether the content of a wired\n * dismiss/clear button (MessageBar `dismiss`, SearchBox `dismiss`, Tag `dismissIcon`) has a\n * **text label**, so the text names the button instead of the default name.\n *\n * A text label is text with **at least two letters or digits** (`\\p{L}`/`\\p{N}`) in total, outside\n * `aria-hidden=\"true\"`/`hidden` subtrees and outside SVG `<title>`/`<desc>`, `<script>`, `<style>`\n * and `<template>`. A lone character (`X`, `x`, `×`, `+`) is a symbolic glyph and keeps the\n * default name, as an icon does.\n *\n * Consumers keep the React glue: the literal check for the server render and the first client\n * render (so hydration matches), then the rendered DOM after mount, re-checked on every change:\n *\n * ```ts\n * const literal = hasTextLabel(children);\n * const [target, setTarget] = React.useState<HTMLElement | null>(null); // callback ref (C-HOOKS)\n * const subscribe = React.useCallback(\n * (onChange: () => void) => (target ? observeTextLabel(target, onChange) : noop),\n * [target],\n * );\n * const textLabel = React.useSyncExternalStore(\n * subscribe,\n * () => (target ? hasRenderedTextLabel(target) : literal),\n * () => literal,\n * );\n * ```\n *\n * Text hidden only by CSS (a responsive `hidden sm:inline` label) is not detected and counts as a\n * label, because a computed-style check would not follow media queries: document an explicit\n * `aria-label` for such buttons on the consuming prop.\n */\n\n/** A letter or a digit. */\nconst LABEL_CHARACTER = /[\\p{L}\\p{N}]/gu;\n\n/** Letters and digits a text label needs: a lone character (`X`, `×`, `+`) is a symbol. */\nconst MIN_LABEL_CHARACTERS = 2;\n\n/** Elements whose text is never a visible label (SVG `<title>`/`<desc>`, scripts, styles). */\nconst NON_LABEL_ELEMENTS: ReadonlySet<string> = new Set([\n 'title',\n 'desc',\n 'style',\n 'script',\n 'template',\n]);\n\ntype UnknownProps = Record<string, unknown>;\n\nfunction countLabelCharacters(text: string): number {\n return text.match(LABEL_CHARACTER)?.length ?? 0;\n}\n\n/**\n * Letters and digits in the literal strings and numbers of `node`, outside `aria-hidden`/`hidden`\n * elements (counting stops at {@link MIN_LABEL_CHARACTERS}). Text rendered by components, and\n * one-shot iterators (which reading would consume), are found by the DOM check after mount.\n */\nfunction countLiteralLabelCharacters(node: unknown): number {\n if (typeof node === 'string') return countLabelCharacters(node);\n if (typeof node === 'number' || typeof node === 'bigint') {\n return countLabelCharacters(String(node));\n }\n if (typeof node !== 'object' || node === null) return 0;\n if (React.isValidElement<UnknownProps>(node)) {\n const { props } = node;\n const ariaHidden = props['aria-hidden'];\n if (ariaHidden === true || ariaHidden === 'true' || props.hidden) return 0;\n if (typeof node.type === 'string' && NON_LABEL_ELEMENTS.has(node.type)) return 0;\n return countLiteralLabelCharacters(props.children);\n }\n if (!(Symbol.iterator in node)) return 0;\n const iterable = node as Iterable<unknown>;\n // A one-shot iterator (a generator) returns itself: reading it would consume it.\n if (!Array.isArray(iterable) && (iterable[Symbol.iterator]() as unknown) === iterable) return 0;\n let count = 0;\n for (const item of iterable) {\n count += countLiteralLabelCharacters(item);\n if (count >= MIN_LABEL_CHARACTERS) break;\n }\n return count;\n}\n\n/**\n * Whether the literal `node` has a text label: strings, numbers, elements (skipping\n * `aria-hidden`/`hidden` elements and SVG `<title>`/`<desc>`, `<script>`, `<style>`,\n * `<template>`), arrays and re-iterable collections such as a `Set`. A one-shot iterator (a\n * generator) is never read, and text rendered by a component is not seen: both are found by\n * {@link hasRenderedTextLabel} after mount.\n *\n * Takes a `React.ReactNode`, typed `unknown` because a slot's `children` prop is `unknown` at the\n * call sites; anything that is not a React node has no text label.\n */\nexport function hasTextLabel(node: unknown): boolean {\n return countLiteralLabelCharacters(node) >= MIN_LABEL_CHARACTERS;\n}\n\n/**\n * Whether the rendered `element` contains a text label: at least two letters or digits in text\n * outside `aria-hidden` and `hidden` subtrees and outside SVG `<title>`/`<desc>`, `<script>`,\n * `<style>` and `<template>` (visually hidden text included, since it names the button too).\n * Walks the descendants of `element` with a `TreeWalker` and stops as soon as two characters are\n * found. Text hidden only by CSS is not detected and counts as a label.\n */\nexport function hasRenderedTextLabel(element: Element): boolean {\n const walker = element.ownerDocument.createTreeWalker(\n element,\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,\n {\n acceptNode(node) {\n if (node.nodeType === Node.TEXT_NODE) return NodeFilter.FILTER_ACCEPT;\n const child = node as Element;\n return child.getAttribute('aria-hidden') === 'true' ||\n child.hasAttribute('hidden') ||\n NON_LABEL_ELEMENTS.has(child.localName)\n ? NodeFilter.FILTER_REJECT\n : NodeFilter.FILTER_SKIP;\n },\n },\n );\n let count = 0;\n while (walker.nextNode()) {\n count += countLabelCharacters(walker.currentNode.nodeValue ?? '');\n if (count >= MIN_LABEL_CHARACTERS) return true;\n }\n return false;\n}\n\n/** Re-checks the name whenever the content changes (e.g. a translation loads). */\nconst LABEL_MUTATIONS: MutationObserverInit = {\n childList: true,\n subtree: true,\n characterData: true,\n attributes: true,\n attributeFilter: ['aria-hidden', 'hidden'],\n};\n\n/**\n * Calls `onChange` whenever the text label of `element` may have changed: text edits, added or\n * removed nodes at any depth, and `aria-hidden`/`hidden` changes. Returns the disconnect, so it\n * can be the `subscribe` of `useSyncExternalStore` directly.\n */\nexport function observeTextLabel(element: Element, onChange: () => void): () => void {\n const observer = new MutationObserver(() => onChange());\n observer.observe(element, LABEL_MUTATIONS);\n return () => observer.disconnect();\n}\n"],"mappings":"6FAmCA,IAAMG,EAAkB,iBAGlBC,EAAuB,EAGvBC,EAA0C,IAAI,IAAI,CACtD,QACA,OACA,QACA,SACA,UACF,CAAC,EAID,SAASC,EAAqB,EAAsB,CAClD,OAAOC,EAAK,MAAMJ,CAAe,CAAC,EAAE,QAAU,CAChD,CAOA,SAASK,EAA4B,EAAuB,CAC1D,GAAI,OAAOC,GAAS,SAAU,OAAOH,EAAqBG,CAAI,EAC9D,GAAI,OAAOA,GAAS,UAAY,OAAOA,GAAS,SAC9C,OAAOH,EAAqB,OAAOG,CAAI,CAAC,EAE1C,GAAI,OAAOA,GAAS,WAAYA,EAAe,MAAO,GACtD,GAAIT,EAAM,eAA6BS,CAAI,EAAG,CAC5C,GAAM,CAAE,SAAUA,EACZC,EAAaC,EAAM,eAGzB,OAFID,IAAe,IAAQA,IAAe,QAAUC,EAAM,QACtD,OAAOF,EAAK,MAAS,UAAYJ,EAAmB,IAAII,EAAK,IAAI,EAAU,EACxED,EAA4BG,EAAM,QAAQ,CACnD,CACA,GAAI,EAAE,OAAO,YAAYF,GAAO,MAAO,GACvC,IAAMG,EAAWH,EAEjB,GAAI,CAAC,MAAM,QAAQG,CAAQ,GAAMA,EAAS,OAAO,SAAS,CAAC,IAAkBA,EAAU,MAAO,GAC9F,IAAIC,EAAQ,EACZ,IAAK,IAAMC,KAAQF,EAEjB,GADA,GAASJ,EAA4BM,CAAI,EACrCD,GAAST,EAAsB,MAErC,OAAOS,CACT,CAYA,SAAgBE,EAAa,EAAwB,CACnD,OAAOP,EAA4BC,CAAI,GAAKL,CAC9C,CASA,SAAgBY,EAAqB,EAA2B,CAC9D,IAAMC,EAASC,EAAQ,cAAc,iBACnCA,EACA,WAAW,aAAe,WAAW,UACrC,CACE,WAAW,EAAM,CACf,GAAIT,EAAK,WAAa,KAAK,UAAW,OAAO,WAAW,cACxD,IAAMU,EAAQV,EACd,OAAOU,EAAM,aAAa,aAAa,IAAM,QAC3CA,EAAM,aAAa,QAAQ,GAC3Bd,EAAmB,IAAIc,EAAM,SAAS,EACpC,WAAW,cACX,WAAW,WACjB,CACF,CACF,EACIN,EAAQ,EACZ,KAAOI,EAAO,SAAS,GAErB,GADA,GAASX,EAAqBW,EAAO,YAAY,WAAa,EAAE,EAC5DJ,GAAST,EAAsB,MAAO,GAE5C,MAAO,EACT,CAGA,IAAMgB,EAAwC,CAC5C,UAAW,GACX,QAAS,GACT,cAAe,GACf,WAAY,GACZ,gBAAiB,CAAC,cAAe,QAAQ,CAC3C,EAOA,SAAgBC,EAAiB,EAAkB,EAAkC,CACnF,IAAMC,EAAW,IAAI,qBAAuBC,EAAS,CAAC,EAEtD,OADAD,EAAS,QAAQJ,EAASE,CAAe,MAC5BE,EAAS,WAAW,CACnC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
//#region src/lib/labelInName.ts
|
|
3
|
+
var t = /[\p{L}\p{N}]/gu, n = 2, r = /* @__PURE__ */ new Set([
|
|
4
|
+
"title",
|
|
5
|
+
"desc",
|
|
6
|
+
"style",
|
|
7
|
+
"script",
|
|
8
|
+
"template"
|
|
9
|
+
]);
|
|
10
|
+
function i(e) {
|
|
11
|
+
return e.match(t)?.length ?? 0;
|
|
12
|
+
}
|
|
13
|
+
function a(t) {
|
|
14
|
+
if (typeof t == "string") return i(t);
|
|
15
|
+
if (typeof t == "number" || typeof t == "bigint") return i(String(t));
|
|
16
|
+
if (typeof t != "object" || !t) return 0;
|
|
17
|
+
if (e.isValidElement(t)) {
|
|
18
|
+
let { props: e } = t, n = e["aria-hidden"];
|
|
19
|
+
return n === !0 || n === "true" || e.hidden || typeof t.type == "string" && r.has(t.type) ? 0 : a(e.children);
|
|
20
|
+
}
|
|
21
|
+
if (!(Symbol.iterator in t)) return 0;
|
|
22
|
+
let o = t;
|
|
23
|
+
if (!Array.isArray(o) && o[Symbol.iterator]() === o) return 0;
|
|
24
|
+
let s = 0;
|
|
25
|
+
for (let e of o) if (s += a(e), s >= n) break;
|
|
26
|
+
return s;
|
|
27
|
+
}
|
|
28
|
+
function o(e) {
|
|
29
|
+
return a(e) >= n;
|
|
30
|
+
}
|
|
31
|
+
function s(e) {
|
|
32
|
+
let t = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, { acceptNode(e) {
|
|
33
|
+
if (e.nodeType === Node.TEXT_NODE) return NodeFilter.FILTER_ACCEPT;
|
|
34
|
+
let t = e;
|
|
35
|
+
return t.getAttribute("aria-hidden") === "true" || t.hasAttribute("hidden") || r.has(t.localName) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_SKIP;
|
|
36
|
+
} }), a = 0;
|
|
37
|
+
for (; t.nextNode();) if (a += i(t.currentNode.nodeValue ?? ""), a >= n) return !0;
|
|
38
|
+
return !1;
|
|
39
|
+
}
|
|
40
|
+
var c = {
|
|
41
|
+
childList: !0,
|
|
42
|
+
subtree: !0,
|
|
43
|
+
characterData: !0,
|
|
44
|
+
attributes: !0,
|
|
45
|
+
attributeFilter: ["aria-hidden", "hidden"]
|
|
46
|
+
};
|
|
47
|
+
function l(e, t) {
|
|
48
|
+
let n = new MutationObserver(() => t());
|
|
49
|
+
return n.observe(e, c), () => n.disconnect();
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { s as hasRenderedTextLabel, o as hasTextLabel, l as observeTextLabel };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=labelInName.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelInName.mjs","names":["React","LABEL_CHARACTER","MIN_LABEL_CHARACTERS","NON_LABEL_ELEMENTS","countLabelCharacters","text","countLiteralLabelCharacters","node","ariaHidden","props","iterable","count","item","hasTextLabel","hasRenderedTextLabel","walker","element","child","LABEL_MUTATIONS","observeTextLabel","observer","onChange"],"sources":["../../src/lib/labelInName.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * The C-SLOTS naming predicate (spec §1, WCAG 2.5.3 Label in Name): whether the content of a wired\n * dismiss/clear button (MessageBar `dismiss`, SearchBox `dismiss`, Tag `dismissIcon`) has a\n * **text label**, so the text names the button instead of the default name.\n *\n * A text label is text with **at least two letters or digits** (`\\p{L}`/`\\p{N}`) in total, outside\n * `aria-hidden=\"true\"`/`hidden` subtrees and outside SVG `<title>`/`<desc>`, `<script>`, `<style>`\n * and `<template>`. A lone character (`X`, `x`, `×`, `+`) is a symbolic glyph and keeps the\n * default name, as an icon does.\n *\n * Consumers keep the React glue: the literal check for the server render and the first client\n * render (so hydration matches), then the rendered DOM after mount, re-checked on every change:\n *\n * ```ts\n * const literal = hasTextLabel(children);\n * const [target, setTarget] = React.useState<HTMLElement | null>(null); // callback ref (C-HOOKS)\n * const subscribe = React.useCallback(\n * (onChange: () => void) => (target ? observeTextLabel(target, onChange) : noop),\n * [target],\n * );\n * const textLabel = React.useSyncExternalStore(\n * subscribe,\n * () => (target ? hasRenderedTextLabel(target) : literal),\n * () => literal,\n * );\n * ```\n *\n * Text hidden only by CSS (a responsive `hidden sm:inline` label) is not detected and counts as a\n * label, because a computed-style check would not follow media queries: document an explicit\n * `aria-label` for such buttons on the consuming prop.\n */\n\n/** A letter or a digit. */\nconst LABEL_CHARACTER = /[\\p{L}\\p{N}]/gu;\n\n/** Letters and digits a text label needs: a lone character (`X`, `×`, `+`) is a symbol. */\nconst MIN_LABEL_CHARACTERS = 2;\n\n/** Elements whose text is never a visible label (SVG `<title>`/`<desc>`, scripts, styles). */\nconst NON_LABEL_ELEMENTS: ReadonlySet<string> = new Set([\n 'title',\n 'desc',\n 'style',\n 'script',\n 'template',\n]);\n\ntype UnknownProps = Record<string, unknown>;\n\nfunction countLabelCharacters(text: string): number {\n return text.match(LABEL_CHARACTER)?.length ?? 0;\n}\n\n/**\n * Letters and digits in the literal strings and numbers of `node`, outside `aria-hidden`/`hidden`\n * elements (counting stops at {@link MIN_LABEL_CHARACTERS}). Text rendered by components, and\n * one-shot iterators (which reading would consume), are found by the DOM check after mount.\n */\nfunction countLiteralLabelCharacters(node: unknown): number {\n if (typeof node === 'string') return countLabelCharacters(node);\n if (typeof node === 'number' || typeof node === 'bigint') {\n return countLabelCharacters(String(node));\n }\n if (typeof node !== 'object' || node === null) return 0;\n if (React.isValidElement<UnknownProps>(node)) {\n const { props } = node;\n const ariaHidden = props['aria-hidden'];\n if (ariaHidden === true || ariaHidden === 'true' || props.hidden) return 0;\n if (typeof node.type === 'string' && NON_LABEL_ELEMENTS.has(node.type)) return 0;\n return countLiteralLabelCharacters(props.children);\n }\n if (!(Symbol.iterator in node)) return 0;\n const iterable = node as Iterable<unknown>;\n // A one-shot iterator (a generator) returns itself: reading it would consume it.\n if (!Array.isArray(iterable) && (iterable[Symbol.iterator]() as unknown) === iterable) return 0;\n let count = 0;\n for (const item of iterable) {\n count += countLiteralLabelCharacters(item);\n if (count >= MIN_LABEL_CHARACTERS) break;\n }\n return count;\n}\n\n/**\n * Whether the literal `node` has a text label: strings, numbers, elements (skipping\n * `aria-hidden`/`hidden` elements and SVG `<title>`/`<desc>`, `<script>`, `<style>`,\n * `<template>`), arrays and re-iterable collections such as a `Set`. A one-shot iterator (a\n * generator) is never read, and text rendered by a component is not seen: both are found by\n * {@link hasRenderedTextLabel} after mount.\n *\n * Takes a `React.ReactNode`, typed `unknown` because a slot's `children` prop is `unknown` at the\n * call sites; anything that is not a React node has no text label.\n */\nexport function hasTextLabel(node: unknown): boolean {\n return countLiteralLabelCharacters(node) >= MIN_LABEL_CHARACTERS;\n}\n\n/**\n * Whether the rendered `element` contains a text label: at least two letters or digits in text\n * outside `aria-hidden` and `hidden` subtrees and outside SVG `<title>`/`<desc>`, `<script>`,\n * `<style>` and `<template>` (visually hidden text included, since it names the button too).\n * Walks the descendants of `element` with a `TreeWalker` and stops as soon as two characters are\n * found. Text hidden only by CSS is not detected and counts as a label.\n */\nexport function hasRenderedTextLabel(element: Element): boolean {\n const walker = element.ownerDocument.createTreeWalker(\n element,\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,\n {\n acceptNode(node) {\n if (node.nodeType === Node.TEXT_NODE) return NodeFilter.FILTER_ACCEPT;\n const child = node as Element;\n return child.getAttribute('aria-hidden') === 'true' ||\n child.hasAttribute('hidden') ||\n NON_LABEL_ELEMENTS.has(child.localName)\n ? NodeFilter.FILTER_REJECT\n : NodeFilter.FILTER_SKIP;\n },\n },\n );\n let count = 0;\n while (walker.nextNode()) {\n count += countLabelCharacters(walker.currentNode.nodeValue ?? '');\n if (count >= MIN_LABEL_CHARACTERS) return true;\n }\n return false;\n}\n\n/** Re-checks the name whenever the content changes (e.g. a translation loads). */\nconst LABEL_MUTATIONS: MutationObserverInit = {\n childList: true,\n subtree: true,\n characterData: true,\n attributes: true,\n attributeFilter: ['aria-hidden', 'hidden'],\n};\n\n/**\n * Calls `onChange` whenever the text label of `element` may have changed: text edits, added or\n * removed nodes at any depth, and `aria-hidden`/`hidden` changes. Returns the disconnect, so it\n * can be the `subscribe` of `useSyncExternalStore` directly.\n */\nexport function observeTextLabel(element: Element, onChange: () => void): () => void {\n const observer = new MutationObserver(() => onChange());\n observer.observe(element, LABEL_MUTATIONS);\n return () => observer.disconnect();\n}\n"],"mappings":";;AAmCA,IAAMC,IAAkB,kBAGlBC,IAAuB,GAGvBC,oBAA0C,IAAI,IAAI;CACtD;CACA;CACA;CACA;CACA;AACF,CAAC;AAID,SAASC,EAAqB,GAAsB;CAClD,OAAOC,EAAK,MAAMJ,CAAe,CAAC,EAAE,UAAU;AAChD;AAOA,SAASK,EAA4B,GAAuB;CAC1D,IAAI,OAAOC,KAAS,UAAU,OAAOH,EAAqBG,CAAI;CAC9D,IAAI,OAAOA,KAAS,YAAY,OAAOA,KAAS,UAC9C,OAAOH,EAAqB,OAAOG,CAAI,C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,IAAMC,IAAW,IAAI,uBAAuBC,EAAS,CAAC;CAEtD,OADAD,EAAS,QAAQJ,GAASE,CAAe,SAC5BE,EAAS,WAAW;AACnC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("./globalRegistry.cjs");var t={overlay:`var(--wave-z-overlay, 1000)`,toast:`var(--wave-z-toast, 1100)`,tooltip:`var(--wave-z-tooltip, 1200)`},n=`[data-wave-focus-trap-allow]`;function r(){let t=e.getGlobalRegistry(`layers`,()=>({stack:[],elements:new Map,counter:0,press:null,listeners:null,subscribers:new Set,isolated:new Map}));return t.subscribers??=new Set,t.isolated??=new Map,t}function i(e){for(let t of Array.from(e.subscribers))t()}var a=1;function o(e,t){if(t!==null)return e.stack.find(e=>e.id===t)}function s(e,t,n){let r=new Set([t.id]),i=t.parentId;for(;i!==null&&!r.has(i);){if(i===n)return!0;r.add(i),i=o(e,i)?.parentId??null}return!1}function c(e,t){return!!e&&e.contains(t)}function l(e,t,n,r){if(r.has(t))return!1;r.add(t);let i=o(e,t);if(i&&i.getElements().some(e=>c(e,n)))return!0;let a=e.elements.get(t);if(a){for(let e of a)if(c(e,n))return!0}for(let i of e.stack)if(i.parentId===t&&l(e,i.id,n,r))return!0;return!1}function u(e){let t=e.nodeType===a?e:e.parentElement;return!!t&&t.closest(`[data-wave-focus-trap-allow]`)!==null}function d(e,t){return u(t)?!0:l(r(),e,t,new Set)}function f(e,t){if(e===t||e.id===t.id)return 0;let n=r();if(s(n,e,t.id))return 1;if(s(n,t,e.id))return-1;let i=n.stack.indexOf(e),a=n.stack.indexOf(t);return i!==-1&&a!==-1?i-a:e.order-t.order}function p(e){let{stack:t}=r();for(let n=t.length-1;n>=0;n--){let r=t[n];if(!e||e(r))return r}return null}function m(e){let{isolated:t}=r();t.set(e,(t.get(e)??0)+1);let n=!0;return()=>{if(!n)return;n=!1;let r=(t.get(e)??1)-1;r>0?t.set(e,r):t.delete(e)}}function h(e){return e.isolated.size===0?null:p(t=>e.isolated.has(t.id))}function g(e,t){return!!t&&t!==e&&f(t,e)>0}function _(e){let{subscribers:t}=r();return t.add(e),()=>{t.delete(e)}}function v(){return[...r().stack]}function y(e){return o(r(),e)??null}function b(e,t){let n=r(),i=o(n,e);return!!i&&s(n,i,t)}function x(e,t){let n=r(),i=[],a=t?.includeOwnElements??!0,s=(t,r)=>{if(r.has(t))return;r.add(t);let c=o(n,t);if(c&&(a||t!==e))for(let e of c.getElements())e&&!i.includes(e)&&i.push(e);for(let e of n.elements.get(t)??[])i.includes(e)||i.push(e);for(let e of n.stack)e.parentId===t&&s(e.id,r)};return s(e,new Set),i}function S(e,t){let n=r();for(let r=n.stack.length-1;r>=0;r--){let i=n.stack[r];if(i.kind===`modal`&&(t===void 0||i.id!==t&&!s(n,i,t)))return!d(i.id,e)}return!1}function C(e,t){let n=r(),i=n.elements.get(e);return i||(i=new Set,n.elements.set(e,i)),i.add(t),()=>{let r=n.elements.get(e);r&&(r.delete(t),r.size===0&&n.elements.delete(e))}}function w(e){let t=r();t.counter+=1,e.order=t.counter;let n=t.stack.findIndex(n=>s(t,n,e.id));n===-1?t.stack.push(e):t.stack.splice(n,0,e),L(t),i(t);let a=!0;return()=>{if(!a)return;a=!1;let n=t.stack.indexOf(e);n!==-1&&t.stack.splice(n,1),t.press&&(t.press.layers=t.press.layers.filter(t=>t!==e)),t.stack.length===0&&R(t),i(t)}}function T(e){let t=e.target;return t&&typeof t.nodeType==`number`?t:null}function E(e){return[...e].sort((e,t)=>f(t,e))}function D(e,t,n){let r=h(e),i=e=>e.escape&&!g(e,r),a=e=>!!t&&d(e.id,t)||!!n&&d(e.id,n),o=p(a);return(o?p(t=>i(t)&&(t===o||s(e,t,o.id)))??p(e=>i(e)&&a(e)):null)??p(i)}function O(e){return e===`Enter`||e===` `||e===`Spacebar`}function k(e){let t=r();if(e.key===`Escape`||e.key===`Esc`){if(e.defaultPrevented||e.isComposing)return;let n=D(t,T(e),document.activeElement);if(!n)return;e.preventDefault(),n.onDismiss(`escape`,e);return}O(e.key)&&(t.press=null)}function A(e){let t=r(),n=T(e);if(!n||e.button!==0){t.press=null;return}let i=h(t);t.press={layers:t.stack.filter(t=>{let{outsidePress:r}=t;return!r||g(t,i)||d(t.id,n)?!1:typeof r!=`function`||r(e)!==!1})}}var j=1e3;function M(e){let t=r().press;if(!t)return;let n=e.pointerType===`mouse`?0:j;setTimeout(()=>{let e=r();e.press===t&&(e.press=null)},n)}function N(){r().press=null}function P(e){let t=r(),n=t.press;if(t.press=null,!n)return;let i=T(e),a=n.layers.filter(e=>!(i&&d(e.id,i)));for(let n of E(a))t.stack.includes(n)&&n.onDismiss(`outside-press`,e)}function F(e){let t=T(e);if(!t)return;let n=r().stack.filter(e=>e.focusOutside&&!d(e.id,t));n.length!==0&&queueMicrotask(()=>I(n,t,e))}function I(e,t,n){let i=r(),a=(t.ownerDocument??document).activeElement,o=e.filter(e=>i.stack.includes(e)&&!d(e.id,t)&&!(a&&d(e.id,a)));for(let e of E(o))i.stack.includes(e)&&e.onDismiss(`focus-outside`,n)}function L(e){if(e.listeners||typeof document>`u`)return;let t=document;t.addEventListener(`keydown`,k),t.addEventListener(`pointerdown`,A,!0),t.addEventListener(`pointerup`,M,!0),t.addEventListener(`pointercancel`,N,!0),t.addEventListener(`contextmenu`,N,!0),t.addEventListener(`click`,P),t.addEventListener(`focusin`,F,!0),e.listeners={remove(){t.removeEventListener(`keydown`,k),t.removeEventListener(`pointerdown`,A,!0),t.removeEventListener(`pointerup`,M,!0),t.removeEventListener(`pointercancel`,N,!0),t.removeEventListener(`contextmenu`,N,!0),t.removeEventListener(`click`,P),t.removeEventListener(`focusin`,F,!0)}}}function R(e){e.listeners?.remove(),e.listeners=null,e.press=null}exports.ALLOW_OUTSIDE_SELECTOR=n,exports.Z_INDEX=t,exports.compareLayers=f,exports.getLayer=y,exports.getLayerTreeElements=x,exports.getOpenLayers=v,exports.getTopmostLayer=p,exports.isDescendantLayer=b,exports.isInsideLayerTree=d,exports.isInsideOtherOpenModal=S,exports.registerLayer=w,exports.registerLayerElement=C,exports.registerLayerIsolation=m,exports.subscribeLayers=_;
|
|
2
|
+
//# sourceMappingURL=layers.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layers.cjs","names":["getGlobalRegistry","require_globalRegistry","Z_INDEX","ALLOW_OUTSIDE_SELECTOR","getState","state","notifySubscribers","subscriber","ELEMENT_NODE","findLayer","id","layer","isDescendantOf","visited","parentId","ancestorId","containsNode","container","target","isInsideTreeWithoutAllowList","layerId","record","el","registered","isInsideAllowList","isInsideLayerTree","compareLayers","a","b","indexA","indexB","getTopmostLayer","i","stack","predicate","registerLayerIsolation","isolated","count","getIsolationBarrier","isBelowBarrier","barrier","subscribeLayers","subscribers","listener","getOpenLayers","getLayer","isDescendantLayer","getLayerTreeElements","result","includeOwn","options","visit","isInsideOtherOpenModal","exceptLayerId","registerLayerElement","set","current","registerLayer","firstDescendant","ensureListeners","index","removeListeners","getEventTargetNode","event","sortTopmostFirst","layers","findEscapeHandler","isCandidate","contains","active","scope","isClickActivationKey","key","handleKeyDown","handler","handlePointerDown","outsidePress","GESTURE_CLICK_TIMEOUT_MS","handlePointerUp","press","timeout","forgetPress","handleClick","toDismiss","handleFocusIn","candidates","dismissFocusOutside","doc"],"sources":["../../src/lib/layers.ts"],"sourcesContent":["import { getGlobalRegistry } from './globalRegistry';\n\n/**\n * The shared stack of open dismissable layers (dialogs, drawers, popovers, menus, listboxes,\n * tooltips) and the document listeners that route Escape, outside presses and focus changes to\n * them. `useDismiss` registers layers; focus traps, modal isolation and focus restore read the\n * stack. It lives in `getGlobalRegistry('layers')`, so an app that loads both the ESM and the CJS\n * build still has one stack and one set of listeners.\n */\n\n/**\n * z-index of each portal layer. `Portal` adds its nesting depth, so a surface opened from inside\n * another overlay always stacks above it. The values fall back to the defaults of `tokens.css`.\n */\nexport const Z_INDEX = {\n overlay: 'var(--wave-z-overlay, 1000)',\n toast: 'var(--wave-z-toast, 1100)',\n tooltip: 'var(--wave-z-tooltip, 1200)',\n} as const;\n\n/**\n * What kind of surface a layer is. `modal` marks dialog-like surfaces (focus-restore validation and\n * modal isolation look for them); a modal blocks presses and Escape for the layers below it only\n * while its page isolation is active ({@link registerLayerIsolation}).\n */\nexport type LayerKind = 'modal' | 'popover' | 'menu' | 'listbox' | 'tooltip' | 'toast';\n\n/** Why a layer is being dismissed. */\nexport type DismissReason = 'escape' | 'outside-press' | 'focus-outside';\n\n/** A registered layer. Getters are allowed, so fields can read the latest options. */\nexport interface LayerRecord {\n /** Unique id; children name it as their `parentId` (through `DismissLayerContext`). */\n id: string;\n /** The enclosing layer (React parentage, which survives portals), or `null`. */\n parentId: string | null;\n kind: LayerKind;\n /** Global open-order counter, assigned by {@link registerLayer} (the passed value is replaced). */\n order: number;\n /** The elements that belong to the layer: its surface, its trigger, extra ignore targets. */\n getElements(): Array<HTMLElement | null>;\n /** The element the layer is anchored to (its trigger); focus traps leave the layer through it. */\n getAnchor(): HTMLElement | null;\n /** Whether Escape dismisses the layer. */\n escape: boolean;\n /** Whether a press outside the layer's tree dismisses it; a predicate returning `false` opts out. */\n outsidePress: boolean | ((event: PointerEvent | MouseEvent) => boolean);\n /** Whether focus moving outside the layer's tree dismisses it. */\n focusOutside: boolean;\n /** Called when the layer should close. */\n onDismiss(reason: DismissReason, event: Event): void;\n}\n\n/**\n * Regions (the Toaster viewport) whose content counts as inside **every** layer and whose\n * tabbables join every focus trap's Tab cycle. Modal isolation never makes them inert.\n */\nexport const ALLOW_OUTSIDE_SELECTOR = '[data-wave-focus-trap-allow]';\n\ninterface PressSnapshot {\n /**\n * Layers with outside press enabled whose tree did not contain the pointerdown target. Only these\n * can be dismissed by the click: a layer registered later (opened by that press, or closed and\n * reopened, which registers a new record) is not in it, and a layer that unregisters is removed.\n */\n layers: LayerRecord[];\n}\n\ninterface InstalledListeners {\n remove(): void;\n}\n\ninterface LayerState {\n /** Open layers from bottom to top. A parent always precedes its descendants. */\n stack: LayerRecord[];\n /** Elements registered per layer id (portal wrappers of the layer's descendants). */\n elements: Map<string, Set<HTMLElement>>;\n counter: number;\n press: PressSnapshot | null;\n listeners: InstalledListeners | null;\n /** Called after a layer registers or unregisters (modal isolation re-plans). */\n subscribers: Set<() => void>;\n /** Ids of layers whose modal isolation currently makes the page inert, with a use count. */\n isolated: Map<string, number>;\n}\n\nfunction getState(): LayerState {\n const state = getGlobalRegistry<LayerState>('layers', () => ({\n stack: [],\n elements: new Map(),\n counter: 0,\n press: null,\n listeners: null,\n subscribers: new Set(),\n isolated: new Map(),\n }));\n // A registry created by an earlier copy of this module (hot reload) may predate these fields.\n state.subscribers ??= new Set();\n state.isolated ??= new Map();\n return state;\n}\n\nfunction notifySubscribers(state: LayerState): void {\n for (const subscriber of Array.from(state.subscribers)) subscriber();\n}\n\nconst ELEMENT_NODE = 1;\n\nfunction findLayer(state: LayerState, id: string | null): LayerRecord | undefined {\n if (id === null) return undefined;\n return state.stack.find((layer) => layer.id === id);\n}\n\n/** Whether `layer` is a (possibly indirect) descendant of the layer `ancestorId`. */\nfunction isDescendantOf(state: LayerState, layer: LayerRecord, ancestorId: string): boolean {\n const visited = new Set<string>([layer.id]);\n let parentId = layer.parentId;\n while (parentId !== null && !visited.has(parentId)) {\n if (parentId === ancestorId) return true;\n visited.add(parentId);\n parentId = findLayer(state, parentId)?.parentId ?? null;\n }\n return false;\n}\n\nfunction containsNode(container: Node | null | undefined, target: Node): boolean {\n return !!container && container.contains(target);\n}\n\nfunction isInsideTreeWithoutAllowList(\n state: LayerState,\n layerId: string,\n target: Node,\n visited: Set<string>,\n): boolean {\n if (visited.has(layerId)) return false;\n visited.add(layerId);\n\n const record = findLayer(state, layerId);\n if (record && record.getElements().some((el) => containsNode(el, target))) return true;\n\n const registered = state.elements.get(layerId);\n if (registered) {\n for (const el of registered) {\n if (containsNode(el, target)) return true;\n }\n }\n\n for (const layer of state.stack) {\n if (\n layer.parentId === layerId &&\n isInsideTreeWithoutAllowList(state, layer.id, target, visited)\n ) {\n return true;\n }\n }\n return false;\n}\n\nfunction isInsideAllowList(target: Node): boolean {\n const el = target.nodeType === ELEMENT_NODE ? (target as Element) : target.parentElement;\n return !!el && el.closest(ALLOW_OUTSIDE_SELECTOR) !== null;\n}\n\n/**\n * Whether `target` belongs to the tree of the layer `layerId`:\n * - the layer's own elements (`getElements()`),\n * - elements registered for it with {@link registerLayerElement} (portal wrappers of overlays\n * rendered inside it — React parentage survives portals, the DOM does not),\n * - every descendant layer's tree, and\n * - regions matching {@link ALLOW_OUTSIDE_SELECTOR} (the Toaster viewport), which count as inside\n * every layer.\n */\nexport function isInsideLayerTree(layerId: string, target: Node): boolean {\n if (isInsideAllowList(target)) return true;\n return isInsideTreeWithoutAllowList(getState(), layerId, target, new Set());\n}\n\n/**\n * Compares two layers for stacking: `> 0` when `a` is above `b`. A descendant layer is above its\n * ancestor; otherwise the layer whose tree opened later is above. (A parent that registers after\n * its descendants — effects run child-first when both open in one commit — takes the place of its\n * earliest descendant.)\n */\nexport function compareLayers(a: LayerRecord, b: LayerRecord): number {\n if (a === b || a.id === b.id) return 0;\n const state = getState();\n if (isDescendantOf(state, a, b.id)) return 1;\n if (isDescendantOf(state, b, a.id)) return -1;\n const indexA = state.stack.indexOf(a);\n const indexB = state.stack.indexOf(b);\n if (indexA !== -1 && indexB !== -1) return indexA - indexB;\n return a.order - b.order;\n}\n\n/** The topmost open layer (optionally the topmost one matching `predicate`), or `null`. */\nexport function getTopmostLayer(predicate?: (layer: LayerRecord) => boolean): LayerRecord | null {\n const { stack } = getState();\n for (let i = stack.length - 1; i >= 0; i--) {\n const layer = stack[i];\n if (!predicate || predicate(layer)) return layer;\n }\n return null;\n}\n\n/**\n * Marks the layer `layerId` as isolating the page: `useModalIsolation` made everything outside its\n * tree inert (Dialog, Drawer). While it is open, the topmost isolating layer is a barrier — layers\n * stacked below it (its ancestors and older siblings) are never dismissed by outside presses and\n * never receive Escape, the way a modal blocks the page behind it. Layers above it (its\n * descendants, or a modal opened later) are unaffected. A `kind: 'modal'` layer without isolation\n * (a transient popup such as the DatePicker calendar, whose page stays interactive) is no barrier.\n * Returns the unregister function; registrations are counted, so the layer stays marked until\n * every registration is removed.\n */\nexport function registerLayerIsolation(layerId: string): () => void {\n const { isolated } = getState();\n isolated.set(layerId, (isolated.get(layerId) ?? 0) + 1);\n let registered = true;\n return () => {\n if (!registered) return;\n registered = false;\n const count = (isolated.get(layerId) ?? 1) - 1;\n if (count > 0) isolated.set(layerId, count);\n else isolated.delete(layerId);\n };\n}\n\n/** The topmost open layer whose modal isolation is active, or `null`. */\nfunction getIsolationBarrier(state: LayerState): LayerRecord | null {\n if (state.isolated.size === 0) return null;\n return getTopmostLayer((layer) => state.isolated.has(layer.id));\n}\n\n/** Whether `layer` is stacked below `barrier` (neither the barrier itself nor above it). */\nfunction isBelowBarrier(layer: LayerRecord, barrier: LayerRecord | null): boolean {\n return !!barrier && barrier !== layer && compareLayers(barrier, layer) > 0;\n}\n\n/**\n * Whether `layer` is stacked below the topmost open **isolating** modal (see\n * {@link registerLayerIsolation}). Such a layer is behind the modal and inert: outside presses\n * never dismiss it and Escape never reaches it. The modal's descendants are above it and stay\n * reachable; a modal-kind layer without isolation shields nothing.\n */\nexport function isBehindIsolatingModal(layer: LayerRecord): boolean {\n return isBelowBarrier(layer, getIsolationBarrier(getState()));\n}\n\n/**\n * Calls `listener` synchronously after any layer registers or unregisters (in the committing\n * component's layout effect, so a modal can re-plan its isolation before a newly opened modal\n * moves focus). Returns the unsubscribe function.\n */\nexport function subscribeLayers(listener: () => void): () => void {\n const { subscribers } = getState();\n subscribers.add(listener);\n return () => {\n subscribers.delete(listener);\n };\n}\n\n/** The open layers from bottom to top (a copy; a parent always precedes its descendants). */\nexport function getOpenLayers(): LayerRecord[] {\n return [...getState().stack];\n}\n\n/** The open layer with this id, or `null`. */\nexport function getLayer(layerId: string): LayerRecord | null {\n return findLayer(getState(), layerId) ?? null;\n}\n\n/** Whether the open layer `layerId` is a (possibly indirect) descendant of `ancestorId`. */\nexport function isDescendantLayer(layerId: string, ancestorId: string): boolean {\n const state = getState();\n const layer = findLayer(state, layerId);\n return !!layer && isDescendantOf(state, layer, ancestorId);\n}\n\n/**\n * Every element that makes up the tree of `layerId`: the layer's own elements, the elements\n * registered for it and the same for each descendant layer (the allow-list is not included).\n * With `includeOwnElements: false` the layer's own `getElements()` are left out (its descendants'\n * are still included).\n */\nexport function getLayerTreeElements(\n layerId: string,\n options?: { includeOwnElements?: boolean },\n): HTMLElement[] {\n const state = getState();\n const result: HTMLElement[] = [];\n const includeOwn = options?.includeOwnElements ?? true;\n const visit = (id: string, visited: Set<string>) => {\n if (visited.has(id)) return;\n visited.add(id);\n const record = findLayer(state, id);\n if (record && (includeOwn || id !== layerId)) {\n for (const el of record.getElements()) {\n if (el && !result.includes(el)) result.push(el);\n }\n }\n for (const el of state.elements.get(id) ?? []) {\n if (!result.includes(el)) result.push(el);\n }\n for (const layer of state.stack) {\n if (layer.parentId === id) visit(layer.id, visited);\n }\n };\n visit(layerId, new Set());\n return result;\n}\n\n/**\n * Whether focusing `el` would send focus behind another open modal layer: the topmost open modal\n * layer other than `exceptLayerId` (and its descendants, which close with it) does not contain\n * `el` in its tree. An element inside that modal's tree (for example an opener inside a parent\n * dialog) is reachable and returns `false`. Used to validate focus-restore targets.\n */\nexport function isInsideOtherOpenModal(el: Element, exceptLayerId?: string): boolean {\n const state = getState();\n for (let i = state.stack.length - 1; i >= 0; i--) {\n const layer = state.stack[i];\n if (layer.kind !== 'modal') continue;\n if (exceptLayerId !== undefined) {\n if (layer.id === exceptLayerId || isDescendantOf(state, layer, exceptLayerId)) continue;\n }\n return !isInsideLayerTree(layer.id, el);\n }\n return false;\n}\n\n/**\n * Registers an element (a portal wrapper) as part of the layer `layerId`, so presses and focus\n * inside it count as inside that layer and its ancestors. Returns the unregister function (usable\n * as a React 19 ref-callback cleanup). The layer does not need to be registered yet.\n */\nexport function registerLayerElement(layerId: string, el: HTMLElement): () => void {\n const state = getState();\n let set = state.elements.get(layerId);\n if (!set) {\n set = new Set();\n state.elements.set(layerId, set);\n }\n set.add(el);\n return () => {\n const current = state.elements.get(layerId);\n if (!current) return;\n current.delete(el);\n if (current.size === 0) state.elements.delete(layerId);\n };\n}\n\n/**\n * Registers an open layer and returns its unregister function. `record.order` is set to the next\n * value of the global open-order counter. The layer is placed on top of the stack — or, when some\n * of its descendants registered first (same commit), directly below the earliest of them.\n */\nexport function registerLayer(record: LayerRecord): () => void {\n const state = getState();\n state.counter += 1;\n record.order = state.counter;\n\n const firstDescendant = state.stack.findIndex((layer) => isDescendantOf(state, layer, record.id));\n if (firstDescendant === -1) state.stack.push(record);\n else state.stack.splice(firstDescendant, 0, record);\n\n ensureListeners(state);\n notifySubscribers(state);\n\n let registered = true;\n return () => {\n if (!registered) return;\n registered = false;\n const index = state.stack.indexOf(record);\n if (index !== -1) state.stack.splice(index, 1);\n if (state.press) {\n state.press.layers = state.press.layers.filter((layer) => layer !== record);\n }\n if (state.stack.length === 0) removeListeners(state);\n notifySubscribers(state);\n };\n}\n\n// ---------------------------------------------------------------------------\n// Document listeners\n// ---------------------------------------------------------------------------\n\nfunction getEventTargetNode(event: Event): Node | null {\n const target = event.target as { nodeType?: unknown } | null;\n return target && typeof target.nodeType === 'number' ? (target as Node) : null;\n}\n\n/** Topmost first: descendants before their ancestors. */\nfunction sortTopmostFirst(layers: LayerRecord[]): LayerRecord[] {\n return [...layers].sort((a, b) => compareLayers(b, a));\n}\n\n/**\n * The layer that handles an Escape whose target / focused element is `target` / `active`.\n * Candidates are the escape-enabled layers that are not stacked below the topmost isolating modal\n * (a modal that ignores Escape never lets the key close something inert behind it — its ancestor\n * dialog as much as an older sibling):\n * 1. the innermost layer whose tree contains them (the topmost such layer) is the focus scope;\n * 2. the topmost candidate of that scope's subtree handles it — the scope itself or an open\n * descendant above it (a tooltip or popover opened from the focused dialog closes first, while\n * a sibling of the focused layer is not in its subtree);\n * 3. else the topmost candidate whose tree contains them (an ancestor);\n * 4. else — no layer contains them, or none of the containing layers takes Escape — the global\n * topmost candidate.\n */\nfunction findEscapeHandler(\n state: LayerState,\n target: Node | null,\n active: Element | null,\n): LayerRecord | null {\n const barrier = getIsolationBarrier(state);\n const isCandidate = (layer: LayerRecord) => layer.escape && !isBelowBarrier(layer, barrier);\n const contains = (layer: LayerRecord) =>\n (!!target && isInsideLayerTree(layer.id, target)) ||\n (!!active && isInsideLayerTree(layer.id, active));\n const scope = getTopmostLayer(contains);\n const handler = scope\n ? (getTopmostLayer(\n (layer) =>\n isCandidate(layer) && (layer === scope || isDescendantOf(state, layer, scope.id)),\n ) ?? getTopmostLayer((layer) => isCandidate(layer) && contains(layer)))\n : null;\n return handler ?? getTopmostLayer(isCandidate);\n}\n\n/** Keys that activate the focused control with a synthetic click. */\nfunction isClickActivationKey(key: string): boolean {\n return key === 'Enter' || key === ' ' || key === 'Spacebar';\n}\n\nfunction handleKeyDown(event: KeyboardEvent): void {\n const state = getState();\n if (event.key === 'Escape' || event.key === 'Esc') {\n if (event.defaultPrevented || event.isComposing) return;\n const handler = findEscapeHandler(state, getEventTargetNode(event), document.activeElement);\n if (!handler) return;\n event.preventDefault();\n handler.onDismiss('escape', event);\n return;\n }\n // A keyboard-activated click (Enter/Space) must not dismiss layers recorded by an unrelated\n // earlier pointerdown. Other keys keep the pending press: modifiers held for a Shift/Ctrl+click\n // auto-repeat their keydown while the pointer is down.\n if (isClickActivationKey(event.key)) state.press = null;\n}\n\nfunction handlePointerDown(event: PointerEvent): void {\n const state = getState();\n const target = getEventTargetNode(event);\n // Only a primary press is followed by a click (right/middle buttons fire contextmenu/auxclick).\n if (!target || event.button !== 0) {\n state.press = null;\n return;\n }\n const barrier = getIsolationBarrier(state);\n const layers = state.stack.filter((layer) => {\n const { outsidePress } = layer;\n if (!outsidePress) return false;\n // A layer behind an open isolating modal (its parent dialog, or a dialog below a sibling\n // modal opened from inside it) is inert and not reachable: presses inside that modal, or on\n // its backdrop, are not \"outside\" presses for it.\n if (isBelowBarrier(layer, barrier)) return false;\n if (isInsideLayerTree(layer.id, target)) return false;\n return typeof outsidePress !== 'function' || outsidePress(event) !== false;\n });\n state.press = { layers };\n}\n\n/**\n * How long (ms) a touch, pen or unknown-device press waits for its click after the pointerup. A\n * tap's click follows within about 350 ms (at most the double-tap delay); a press that gets no\n * click (a long press that opened the context menu, a tap on a non-clickable area) is forgotten\n * after this, so a later programmatic `click()` cannot complete it.\n */\nconst GESTURE_CLICK_TIMEOUT_MS = 1000;\n\n/**\n * A mouse click is dispatched right after its pointerup, in the same task. When none follows (the\n * pointer was released over another window or element tree), a mouse press is forgotten on the\n * next macrotask, so a later programmatic `click()` cannot complete it. Touch and stylus taps are\n * turned into a click by a separate gesture event in a later task (Apple Pencil on iPadOS and\n * Android styluses report `pointerType: 'pen'`, and an unknown device type `''` may behave the\n * same way), so every other pointer type keeps its press for {@link GESTURE_CLICK_TIMEOUT_MS}.\n * The next pointerdown, pointercancel, contextmenu or Enter/Space forgets a press earlier.\n */\nfunction handlePointerUp(event: PointerEvent): void {\n const press = getState().press;\n if (!press) return;\n const timeout = event.pointerType === 'mouse' ? 0 : GESTURE_CLICK_TIMEOUT_MS;\n setTimeout(() => {\n const current = getState();\n if (current.press === press) current.press = null;\n }, timeout);\n}\n\n/** A cancelled pointer stream, or a context menu (a long press, a Mac Ctrl+click), gets no click. */\nfunction forgetPress(): void {\n getState().press = null;\n}\n\nfunction handleClick(event: MouseEvent): void {\n const state = getState();\n const press = state.press;\n state.press = null;\n if (!press) return;\n const target = getEventTargetNode(event);\n const toDismiss = press.layers.filter(\n (layer) => !(target && isInsideLayerTree(layer.id, target)),\n );\n for (const layer of sortTopmostFirst(toDismiss)) {\n // An earlier layer's onDismiss may already have unregistered this one.\n if (state.stack.includes(layer)) layer.onDismiss('outside-press', event);\n }\n}\n\nfunction handleFocusIn(event: FocusEvent): void {\n const target = getEventTargetNode(event);\n if (!target) return;\n const candidates = getState().stack.filter(\n (layer) => layer.focusOutside && !isInsideLayerTree(layer.id, target),\n );\n if (candidates.length === 0) return;\n // Not in this dispatch: React applies `autoFocus` in the layout phase of the commit that mounts\n // a surface, before that surface's portal wrapper and dismiss layer register. A field focused\n // as a popover or dialog opens inside the layer is inside its tree once that commit has run.\n queueMicrotask(() => dismissFocusOutside(candidates, target, event));\n}\n\n/**\n * Dismisses each of `candidates` that is still open and whose tree still contains neither the\n * focusin `target` nor the element focused now (focus that came back inside keeps it open; focus\n * lost to `<body>` after leaving does not).\n */\nfunction dismissFocusOutside(candidates: LayerRecord[], target: Node, event: FocusEvent): void {\n const state = getState();\n const active = (target.ownerDocument ?? document).activeElement;\n const toDismiss = candidates.filter(\n (layer) =>\n state.stack.includes(layer) &&\n !isInsideLayerTree(layer.id, target) &&\n !(active && isInsideLayerTree(layer.id, active)),\n );\n for (const layer of sortTopmostFirst(toDismiss)) {\n // An earlier layer's onDismiss may already have unregistered this one.\n if (state.stack.includes(layer)) layer.onDismiss('focus-outside', event);\n }\n}\n\nfunction ensureListeners(state: LayerState): void {\n if (state.listeners || typeof document === 'undefined') return;\n const doc = document;\n doc.addEventListener('keydown', handleKeyDown);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('pointerup', handlePointerUp, true);\n doc.addEventListener('pointercancel', forgetPress, true);\n doc.addEventListener('contextmenu', forgetPress, true);\n doc.addEventListener('click', handleClick);\n doc.addEventListener('focusin', handleFocusIn, true);\n state.listeners = {\n remove() {\n doc.removeEventListener('keydown', handleKeyDown);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('pointerup', handlePointerUp, true);\n doc.removeEventListener('pointercancel', forgetPress, true);\n doc.removeEventListener('contextmenu', forgetPress, true);\n doc.removeEventListener('click', handleClick);\n doc.removeEventListener('focusin', handleFocusIn, true);\n },\n };\n}\n\nfunction removeListeners(state: LayerState): void {\n state.listeners?.remove();\n state.listeners = null;\n state.press = null;\n}\n"],"mappings":"wCAcA,IAAaE,EAAU,CACrB,QAAS,8BACT,MAAO,4BACP,QAA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