@panneau/ui 5.0.0-alpha.1 → 5.0.0-alpha.11
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 +370 -14
- package/bin/check-theme.js +5 -0
- package/dist/alert/Alert.css +28 -42
- package/dist/alert/Alert.d.ts +19 -5
- package/dist/alert/Alert.d.ts.map +1 -1
- package/dist/alert/Alert.js +110 -41
- package/dist/alert/Alert.js.map +1 -1
- package/dist/alert/Alert.module.js +14 -16
- package/dist/alert/Alert.module.js.map +1 -1
- package/dist/alert/tokens.d.ts +3 -0
- package/dist/alert/tokens.d.ts.map +1 -0
- package/dist/alert/tokens.js +21 -0
- package/dist/alert/tokens.js.map +1 -0
- package/dist/badge/Badge.css +24 -36
- package/dist/badge/Badge.d.ts +18 -3
- package/dist/badge/Badge.d.ts.map +1 -1
- package/dist/badge/Badge.js +35 -6
- package/dist/badge/Badge.js.map +1 -1
- package/dist/badge/Badge.module.js +9 -13
- package/dist/badge/Badge.module.js.map +1 -1
- package/dist/badge/tokens.d.ts +3 -0
- package/dist/badge/tokens.d.ts.map +1 -0
- package/dist/badge/tokens.js +23 -0
- package/dist/badge/tokens.js.map +1 -0
- package/dist/button/Button.css +58 -42
- package/dist/button/Button.d.ts +44 -6
- package/dist/button/Button.d.ts.map +1 -1
- package/dist/button/Button.js +172 -22
- package/dist/button/Button.js.map +1 -1
- package/dist/button/Button.module.js +14 -14
- package/dist/button/Button.module.js.map +1 -1
- package/dist/button/LinkButton.d.ts +22 -0
- package/dist/button/LinkButton.d.ts.map +1 -0
- package/dist/button/LinkButton.js +113 -0
- package/dist/button/LinkButton.js.map +1 -0
- package/dist/button/tokens.d.ts +3 -0
- package/dist/button/tokens.d.ts.map +1 -0
- package/dist/button/tokens.js +25 -0
- package/dist/button/tokens.js.map +1 -0
- package/dist/card/Card.css +27 -20
- package/dist/card/Card.js +76 -23
- package/dist/card/Card.js.map +1 -1
- package/dist/card/Card.module.js +5 -5
- package/dist/card/Card.module.js.map +1 -1
- package/dist/card/tokens.d.ts +3 -0
- package/dist/card/tokens.d.ts.map +1 -0
- package/dist/card/tokens.js +31 -0
- package/dist/card/tokens.js.map +1 -0
- package/dist/checkbox/Checkbox.css +22 -21
- package/dist/checkbox/Checkbox.d.ts +1 -1
- package/dist/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/checkbox/Checkbox.js +87 -25
- package/dist/checkbox/Checkbox.js.map +1 -1
- package/dist/checkbox/Checkbox.module.js +6 -6
- package/dist/checkbox/Checkbox.module.js.map +1 -1
- package/dist/checkbox/ChoiceChrome.d.ts +3 -1
- package/dist/checkbox/ChoiceChrome.d.ts.map +1 -1
- package/dist/checkbox/ChoiceChrome.js +82 -21
- package/dist/checkbox/ChoiceChrome.js.map +1 -1
- package/dist/checkbox/tokens.d.ts +3 -0
- package/dist/checkbox/tokens.d.ts.map +1 -0
- package/dist/checkbox/tokens.js +21 -0
- package/dist/checkbox/tokens.js.map +1 -0
- package/dist/combo-box/ComboBox.css +4 -4
- package/dist/combo-box/ComboBox.d.ts +1 -1
- package/dist/combo-box/ComboBox.js +291 -79
- package/dist/combo-box/ComboBox.js.map +1 -1
- package/dist/combo-box/ComboBox.module.js +3 -3
- package/dist/command-palette/CommandPalette.css +299 -0
- package/dist/command-palette/CommandPalette.d.ts +37 -0
- package/dist/command-palette/CommandPalette.d.ts.map +1 -0
- package/dist/command-palette/CommandPalette.js +497 -0
- package/dist/command-palette/CommandPalette.js.map +1 -0
- package/dist/command-palette/CommandPalette.module.js +62 -0
- package/dist/command-palette/CommandPalette.module.js.map +1 -0
- package/dist/command-palette/match.d.ts +39 -0
- package/dist/command-palette/match.d.ts.map +1 -0
- package/dist/command-palette/match.js +44 -0
- package/dist/command-palette/match.js.map +1 -0
- package/dist/command-palette/tokens.d.ts +3 -0
- package/dist/command-palette/tokens.d.ts.map +1 -0
- package/dist/command-palette/tokens.js +23 -0
- package/dist/command-palette/tokens.js.map +1 -0
- package/dist/command-palette/useCommandShortcut.d.ts +12 -0
- package/dist/command-palette/useCommandShortcut.d.ts.map +1 -0
- package/dist/command-palette/useCommandShortcut.js +48 -0
- package/dist/command-palette/useCommandShortcut.js.map +1 -0
- package/dist/container/Container.css +32 -0
- package/dist/container/Container.d.ts +15 -0
- package/dist/container/Container.d.ts.map +1 -0
- package/dist/container/Container.js +61 -0
- package/dist/container/Container.js.map +1 -0
- package/dist/container/Container.module.js +20 -0
- package/dist/container/Container.module.js.map +1 -0
- package/dist/container/tokens.d.ts +3 -0
- package/dist/container/tokens.d.ts.map +1 -0
- package/dist/container/tokens.js +19 -0
- package/dist/container/tokens.js.map +1 -0
- package/dist/date-picker/DatePicker.css +70 -30
- package/dist/date-picker/DatePicker.d.ts +3 -2
- package/dist/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/date-picker/DatePicker.js +279 -72
- package/dist/date-picker/DatePicker.js.map +1 -1
- package/dist/date-picker/DatePicker.module.js +16 -12
- package/dist/date-picker/DatePicker.module.js.map +1 -1
- package/dist/date-picker/calendarTokens.d.ts +3 -0
- package/dist/date-picker/calendarTokens.d.ts.map +1 -0
- package/dist/date-picker/calendarTokens.js +17 -0
- package/dist/date-picker/calendarTokens.js.map +1 -0
- package/dist/dialog/Dialog.css +80 -37
- package/dist/dialog/Dialog.d.ts +15 -3
- package/dist/dialog/Dialog.d.ts.map +1 -1
- package/dist/dialog/Dialog.js +159 -30
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/Dialog.module.js +21 -13
- package/dist/dialog/Dialog.module.js.map +1 -1
- package/dist/dialog/tokens.d.ts +3 -0
- package/dist/dialog/tokens.d.ts.map +1 -0
- package/dist/dialog/tokens.js +31 -0
- package/dist/dialog/tokens.js.map +1 -0
- package/dist/disclosure/Disclosure.css +12 -12
- package/dist/disclosure/Disclosure.d.ts.map +1 -1
- package/dist/disclosure/Disclosure.js +132 -28
- package/dist/disclosure/Disclosure.js.map +1 -1
- package/dist/disclosure/Disclosure.module.js +7 -7
- package/dist/disclosure/Disclosure.module.js.map +1 -1
- package/dist/disclosure/tokens.d.ts +3 -0
- package/dist/disclosure/tokens.d.ts.map +1 -0
- package/dist/disclosure/tokens.js +15 -0
- package/dist/disclosure/tokens.js.map +1 -0
- package/dist/divider/Divider.css +17 -0
- package/dist/divider/Divider.d.ts +8 -0
- package/dist/divider/Divider.d.ts.map +1 -0
- package/dist/divider/Divider.js +65 -0
- package/dist/divider/Divider.js.map +1 -0
- package/dist/divider/Divider.module.js +12 -0
- package/dist/divider/Divider.module.js.map +1 -0
- package/dist/divider/tokens.d.ts +3 -0
- package/dist/divider/tokens.d.ts.map +1 -0
- package/dist/divider/tokens.js +13 -0
- package/dist/divider/tokens.js.map +1 -0
- package/dist/field/Field.css +49 -37
- package/dist/field/Field.module.js +11 -11
- package/dist/field/Field.module.js.map +1 -1
- package/dist/field/FieldParts.d.ts +1 -1
- package/dist/field/FieldParts.js +69 -15
- package/dist/field/FieldParts.js.map +1 -1
- package/dist/field/Fieldset.js +99 -32
- package/dist/field/Fieldset.js.map +1 -1
- package/dist/field/inputTokens.d.ts +3 -0
- package/dist/field/inputTokens.d.ts.map +1 -0
- package/dist/field/inputTokens.js +21 -0
- package/dist/field/inputTokens.js.map +1 -0
- package/dist/field/tokens.d.ts +3 -0
- package/dist/field/tokens.d.ts.map +1 -0
- package/dist/field/tokens.js +15 -0
- package/dist/field/tokens.js.map +1 -0
- package/dist/grid/Grid.css +174 -0
- package/dist/grid/Grid.d.ts +28 -0
- package/dist/grid/Grid.d.ts.map +1 -0
- package/dist/grid/Grid.js +140 -0
- package/dist/grid/Grid.js.map +1 -0
- package/dist/grid/Grid.module.js +12 -0
- package/dist/grid/Grid.module.js.map +1 -0
- package/dist/grid/GridItem.css +59 -0
- package/dist/grid/GridItem.module.js +7 -0
- package/dist/grid/GridItem.module.js.map +1 -0
- package/dist/grid/tokens.d.ts +3 -0
- package/dist/grid/tokens.d.ts.map +1 -0
- package/dist/grid/tokens.js +10 -0
- package/dist/grid/tokens.js.map +1 -0
- package/dist/heading/Heading.css +52 -0
- package/dist/heading/Heading.d.ts +17 -0
- package/dist/heading/Heading.d.ts.map +1 -0
- package/dist/heading/Heading.js +52 -0
- package/dist/heading/Heading.js.map +1 -0
- package/dist/heading/Heading.module.js +16 -0
- package/dist/heading/Heading.module.js.map +1 -0
- package/dist/heading/tokens.d.ts +6 -0
- package/dist/heading/tokens.d.ts.map +1 -0
- package/dist/heading/tokens.js +66 -0
- package/dist/heading/tokens.js.map +1 -0
- package/dist/icon/Icon.css +1 -1
- package/dist/icon/Icon.js +36 -11
- package/dist/icon/Icon.js.map +1 -1
- package/dist/icon/Icon.module.js +1 -1
- package/dist/icon/lucideIconLoader.d.ts +9 -0
- package/dist/icon/lucideIconLoader.d.ts.map +1 -0
- package/dist/icon/lucideIconLoader.js +22 -0
- package/dist/icon/lucideIconLoader.js.map +1 -0
- package/dist/icon/namedIcons.d.ts +16 -9
- package/dist/icon/namedIcons.d.ts.map +1 -1
- package/dist/icon/namedIcons.js +121 -46
- package/dist/icon/namedIcons.js.map +1 -1
- package/dist/icon-button/IconButton.css +2 -2
- package/dist/icon-button/IconButton.d.ts +3 -3
- package/dist/icon-button/IconButton.d.ts.map +1 -1
- package/dist/icon-button/IconButton.js +70 -13
- package/dist/icon-button/IconButton.js.map +1 -1
- package/dist/icon-button/IconButton.module.js +2 -2
- package/dist/index.d.ts +62 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -5
- package/dist/inline/Inline.css +142 -0
- package/dist/inline/Inline.d.ts +17 -0
- package/dist/inline/Inline.d.ts.map +1 -0
- package/dist/inline/Inline.js +79 -0
- package/dist/inline/Inline.js.map +1 -0
- package/dist/inline/Inline.module.js +12 -0
- package/dist/inline/Inline.module.js.map +1 -0
- package/dist/inline/tokens.d.ts +3 -0
- package/dist/inline/tokens.d.ts.map +1 -0
- package/dist/inline/tokens.js +10 -0
- package/dist/inline/tokens.js.map +1 -0
- package/dist/intl/usePanneauIntl.js.map +1 -1
- package/dist/layout/responsive.d.ts +38 -0
- package/dist/layout/responsive.d.ts.map +1 -0
- package/dist/layout/responsive.js +49 -0
- package/dist/layout/responsive.js.map +1 -0
- package/dist/locales/index.js.map +1 -1
- package/dist/menu/Menu.css +84 -0
- package/dist/menu/Menu.d.ts +34 -7
- package/dist/menu/Menu.d.ts.map +1 -1
- package/dist/menu/Menu.js +243 -32
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/Menu.module.js +22 -0
- package/dist/menu/Menu.module.js.map +1 -0
- package/dist/menu/tokens.d.ts +3 -0
- package/dist/menu/tokens.d.ts.map +1 -0
- package/dist/menu/tokens.js +31 -0
- package/dist/menu/tokens.js.map +1 -0
- package/dist/named-icons/index.d.ts +2 -0
- package/dist/named-icons/index.d.ts.map +1 -0
- package/dist/named-icons/index.js +1 -0
- package/dist/number-input/NumberInput.css +30 -12
- package/dist/number-input/NumberInput.d.ts +1 -1
- package/dist/number-input/NumberInput.js +232 -60
- package/dist/number-input/NumberInput.js.map +1 -1
- package/dist/number-input/NumberInput.module.js +7 -5
- package/dist/number-input/NumberInput.module.js.map +1 -1
- package/dist/number-input/tokens.d.ts +3 -0
- package/dist/number-input/tokens.d.ts.map +1 -0
- package/dist/number-input/tokens.js +10 -0
- package/dist/number-input/tokens.js.map +1 -0
- package/dist/pill-trigger/PillTrigger.css +104 -0
- package/dist/pill-trigger/PillTrigger.d.ts +20 -0
- package/dist/pill-trigger/PillTrigger.d.ts.map +1 -0
- package/dist/pill-trigger/PillTrigger.js +94 -0
- package/dist/pill-trigger/PillTrigger.js.map +1 -0
- package/dist/pill-trigger/PillTrigger.module.js +18 -0
- package/dist/pill-trigger/PillTrigger.module.js.map +1 -0
- package/dist/pill-trigger/tokens.d.ts +3 -0
- package/dist/pill-trigger/tokens.d.ts.map +1 -0
- package/dist/pill-trigger/tokens.js +37 -0
- package/dist/pill-trigger/tokens.js.map +1 -0
- package/dist/popover/Popover.css +18 -12
- package/dist/popover/Popover.d.ts.map +1 -1
- package/dist/popover/Popover.js +116 -20
- package/dist/popover/Popover.js.map +1 -1
- package/dist/popover/Popover.module.js +7 -5
- package/dist/popover/Popover.module.js.map +1 -1
- package/dist/popover/tokens.d.ts +3 -0
- package/dist/popover/tokens.d.ts.map +1 -0
- package/dist/popover/tokens.js +19 -0
- package/dist/popover/tokens.js.map +1 -0
- package/dist/prose/Prose.css +141 -0
- package/dist/prose/Prose.d.ts +11 -0
- package/dist/prose/Prose.d.ts.map +1 -0
- package/dist/prose/Prose.js +49 -0
- package/dist/prose/Prose.js.map +1 -0
- package/dist/prose/Prose.module.js +8 -0
- package/dist/prose/Prose.module.js.map +1 -0
- package/dist/prose/tokens.d.ts +3 -0
- package/dist/prose/tokens.d.ts.map +1 -0
- package/dist/prose/tokens.js +33 -0
- package/dist/prose/tokens.js.map +1 -0
- package/dist/radio-group/RadioGroup.css +111 -20
- package/dist/radio-group/RadioGroup.d.ts +24 -5
- package/dist/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/radio-group/RadioGroup.js +214 -43
- package/dist/radio-group/RadioGroup.js.map +1 -1
- package/dist/radio-group/RadioGroup.module.js +18 -8
- package/dist/radio-group/RadioGroup.module.js.map +1 -1
- package/dist/radio-group/tokens.d.ts +3 -0
- package/dist/radio-group/tokens.d.ts.map +1 -0
- package/dist/radio-group/tokens.js +39 -0
- package/dist/radio-group/tokens.js.map +1 -0
- package/dist/root/PanneauRoot.css +243 -20
- package/dist/root/PanneauRoot.d.ts +57 -4
- package/dist/root/PanneauRoot.d.ts.map +1 -1
- package/dist/root/PanneauRoot.js +325 -46
- package/dist/root/PanneauRoot.js.map +1 -1
- package/dist/root/PanneauRoot.module.js +11 -3
- package/dist/root/PanneauRoot.module.js.map +1 -1
- package/dist/root/ThemeScope.d.ts +24 -0
- package/dist/root/ThemeScope.d.ts.map +1 -0
- package/dist/root/ThemeScope.js +132 -0
- package/dist/root/ThemeScope.js.map +1 -0
- package/dist/segmented-control/SegmentedControl.css +83 -0
- package/dist/segmented-control/SegmentedControl.d.ts +35 -0
- package/dist/segmented-control/SegmentedControl.d.ts.map +1 -0
- package/dist/segmented-control/SegmentedControl.js +142 -0
- package/dist/segmented-control/SegmentedControl.js.map +1 -0
- package/dist/segmented-control/SegmentedControl.module.js +16 -0
- package/dist/segmented-control/SegmentedControl.module.js.map +1 -0
- package/dist/segmented-control/tokens.d.ts +3 -0
- package/dist/segmented-control/tokens.d.ts.map +1 -0
- package/dist/segmented-control/tokens.js +29 -0
- package/dist/segmented-control/tokens.js.map +1 -0
- package/dist/select/ListBox.css +46 -23
- package/dist/select/ListBox.module.js +13 -13
- package/dist/select/ListBox.module.js.map +1 -1
- package/dist/select/Select.d.ts +1 -1
- package/dist/select/Select.js +298 -92
- package/dist/select/Select.js.map +1 -1
- package/dist/select/listBoxTokens.d.ts +3 -0
- package/dist/select/listBoxTokens.d.ts.map +1 -0
- package/dist/select/listBoxTokens.js +21 -0
- package/dist/select/listBoxTokens.js.map +1 -0
- package/dist/skeleton/LoadingRegion.d.ts +16 -0
- package/dist/skeleton/LoadingRegion.d.ts.map +1 -0
- package/dist/skeleton/LoadingRegion.js +65 -0
- package/dist/skeleton/LoadingRegion.js.map +1 -0
- package/dist/skeleton/Skeleton.css +62 -0
- package/dist/skeleton/Skeleton.d.ts +25 -0
- package/dist/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/skeleton/Skeleton.js +106 -0
- package/dist/skeleton/Skeleton.js.map +1 -0
- package/dist/skeleton/Skeleton.module.js +22 -0
- package/dist/skeleton/Skeleton.module.js.map +1 -0
- package/dist/skeleton/tokens.d.ts +3 -0
- package/dist/skeleton/tokens.d.ts.map +1 -0
- package/dist/skeleton/tokens.js +15 -0
- package/dist/skeleton/tokens.js.map +1 -0
- package/dist/slider/Slider.css +84 -0
- package/dist/slider/Slider.d.ts +20 -0
- package/dist/slider/Slider.d.ts.map +1 -0
- package/dist/slider/Slider.js +248 -0
- package/dist/slider/Slider.js.map +1 -0
- package/dist/slider/Slider.module.js +20 -0
- package/dist/slider/Slider.module.js.map +1 -0
- package/dist/spinner/Spinner.css +8 -8
- package/dist/spinner/Spinner.js +49 -9
- package/dist/spinner/Spinner.js.map +1 -1
- package/dist/spinner/Spinner.module.js +5 -5
- package/dist/spinner/Spinner.module.js.map +1 -1
- package/dist/spinner/tokens.d.ts +3 -0
- package/dist/spinner/tokens.d.ts.map +1 -0
- package/dist/spinner/tokens.js +10 -0
- package/dist/spinner/tokens.js.map +1 -0
- package/dist/stack/Stack.css +135 -0
- package/dist/stack/Stack.d.ts +15 -0
- package/dist/stack/Stack.d.ts.map +1 -0
- package/dist/stack/Stack.js +74 -0
- package/dist/stack/Stack.js.map +1 -0
- package/dist/stack/Stack.module.js +8 -0
- package/dist/stack/Stack.module.js.map +1 -0
- package/dist/stack/tokens.d.ts +3 -0
- package/dist/stack/tokens.d.ts.map +1 -0
- package/dist/stack/tokens.js +10 -0
- package/dist/stack/tokens.js.map +1 -0
- package/dist/switch/Switch.css +34 -25
- package/dist/switch/Switch.d.ts +1 -1
- package/dist/switch/Switch.d.ts.map +1 -1
- package/dist/switch/Switch.js +69 -11
- package/dist/switch/Switch.js.map +1 -1
- package/dist/switch/Switch.module.js +6 -5
- package/dist/switch/Switch.module.js.map +1 -1
- package/dist/switch/tokens.d.ts +3 -0
- package/dist/switch/tokens.d.ts.map +1 -0
- package/dist/switch/tokens.js +25 -0
- package/dist/switch/tokens.js.map +1 -0
- package/dist/tabs/Tabs.css +24 -23
- package/dist/tabs/Tabs.js +5 -5
- package/dist/tabs/Tabs.js.map +1 -1
- package/dist/tabs/Tabs.module.js +4 -4
- package/dist/tabs/Tabs.module.js.map +1 -1
- package/dist/tabs/tokens.d.ts +3 -0
- package/dist/tabs/tokens.d.ts.map +1 -0
- package/dist/tabs/tokens.js +25 -0
- package/dist/tabs/tokens.js.map +1 -0
- package/dist/tags-input/TagsInput.css +60 -0
- package/dist/tags-input/TagsInput.d.ts +32 -0
- package/dist/tags-input/TagsInput.d.ts.map +1 -0
- package/dist/tags-input/TagsInput.js +316 -0
- package/dist/tags-input/TagsInput.js.map +1 -0
- package/dist/tags-input/TagsInput.module.js +20 -0
- package/dist/tags-input/TagsInput.module.js.map +1 -0
- package/dist/text/Text.css +74 -0
- package/dist/text/Text.d.ts +27 -0
- package/dist/text/Text.d.ts.map +1 -0
- package/dist/text/Text.js +81 -0
- package/dist/text/Text.js.map +1 -0
- package/dist/text/Text.module.js +30 -0
- package/dist/text/Text.module.js.map +1 -0
- package/dist/text/tokens.d.ts +3 -0
- package/dist/text/tokens.d.ts.map +1 -0
- package/dist/text/tokens.js +10 -0
- package/dist/text/tokens.js.map +1 -0
- package/dist/text-area/TextArea.css +1 -1
- package/dist/text-area/TextArea.d.ts +1 -1
- package/dist/text-area/TextArea.js +135 -28
- package/dist/text-area/TextArea.js.map +1 -1
- package/dist/text-area/TextArea.module.js +3 -3
- package/dist/text-area/TextArea.module.js.map +1 -1
- package/dist/text-input/TextInput.d.ts +1 -1
- package/dist/text-input/TextInput.d.ts.map +1 -1
- package/dist/text-input/TextInput.js +164 -47
- package/dist/text-input/TextInput.js.map +1 -1
- package/dist/theme/Tone.css +70 -0
- package/dist/theme/Tone.module.js +20 -0
- package/dist/theme/Tone.module.js.map +1 -0
- package/dist/theme/bootstrap.d.ts +11 -1
- package/dist/theme/bootstrap.d.ts.map +1 -1
- package/dist/theme/bootstrap.js +48 -5
- package/dist/theme/bootstrap.js.map +1 -1
- package/dist/theme/chartColors.d.ts +23 -0
- package/dist/theme/chartColors.d.ts.map +1 -0
- package/dist/theme/chartColors.js +27 -0
- package/dist/theme/chartColors.js.map +1 -0
- package/dist/theme/checkTheme.d.ts +39 -0
- package/dist/theme/checkTheme.d.ts.map +1 -0
- package/dist/theme/checkTheme.js +132 -0
- package/dist/theme/checkTheme.js.map +1 -0
- package/dist/theme/cli.d.ts +14 -0
- package/dist/theme/cli.d.ts.map +1 -0
- package/dist/theme/cli.js +61 -0
- package/dist/theme/cli.js.map +1 -0
- package/dist/theme/color.d.ts +30 -0
- package/dist/theme/color.d.ts.map +1 -0
- package/dist/theme/color.js +94 -0
- package/dist/theme/color.js.map +1 -0
- package/dist/theme/colorVision.d.ts +23 -0
- package/dist/theme/colorVision.d.ts.map +1 -0
- package/dist/theme/colorVision.js +140 -0
- package/dist/theme/colorVision.js.map +1 -0
- package/dist/theme/componentTokens.d.ts +24 -0
- package/dist/theme/componentTokens.d.ts.map +1 -0
- package/dist/theme/componentTokens.js +20 -0
- package/dist/theme/componentTokens.js.map +1 -0
- package/dist/theme/components.d.ts +43 -0
- package/dist/theme/components.d.ts.map +1 -0
- package/dist/theme/components.js +75 -0
- package/dist/theme/components.js.map +1 -0
- package/dist/theme/defineTheme.d.ts +85 -0
- package/dist/theme/defineTheme.d.ts.map +1 -0
- package/dist/theme/defineTheme.js +130 -0
- package/dist/theme/defineTheme.js.map +1 -0
- package/dist/theme/fonts.d.ts +32 -0
- package/dist/theme/fonts.d.ts.map +1 -0
- package/dist/theme/fonts.js +36 -0
- package/dist/theme/fonts.js.map +1 -0
- package/dist/theme/index.d.ts +13 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +10 -0
- package/dist/theme/semanticTokens.d.ts +9 -0
- package/dist/theme/semanticTokens.d.ts.map +1 -0
- package/dist/theme/semanticTokens.js +110 -0
- package/dist/theme/semanticTokens.js.map +1 -0
- package/dist/theme/theme.d.ts +61 -7
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +100 -10
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/toneClass.d.ts +8 -0
- package/dist/theme/toneClass.d.ts.map +1 -0
- package/dist/theme/toneClass.js +15 -0
- package/dist/theme/toneClass.js.map +1 -0
- package/dist/theme/tones.d.ts +89 -0
- package/dist/theme/tones.d.ts.map +1 -0
- package/dist/theme/tones.js +127 -0
- package/dist/theme/tones.js.map +1 -0
- package/dist/time-input/TimeInput.d.ts +1 -1
- package/dist/time-input/TimeInput.js +138 -31
- package/dist/time-input/TimeInput.js.map +1 -1
- package/dist/toast/Toast.css +22 -44
- package/dist/toast/Toast.d.ts +5 -3
- package/dist/toast/Toast.d.ts.map +1 -1
- package/dist/toast/Toast.js +5 -4
- package/dist/toast/Toast.js.map +1 -1
- package/dist/toast/Toast.module.js +10 -16
- package/dist/toast/Toast.module.js.map +1 -1
- package/dist/toast/tokens.d.ts +3 -0
- package/dist/toast/tokens.d.ts.map +1 -0
- package/dist/toast/tokens.js +21 -0
- package/dist/toast/tokens.js.map +1 -0
- package/dist/tooltip/Tooltip.css +12 -11
- package/dist/tooltip/Tooltip.js +38 -8
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/Tooltip.module.js +2 -2
- package/dist/tooltip/Tooltip.module.js.map +1 -1
- package/dist/tooltip/tokens.d.ts +3 -0
- package/dist/tooltip/tokens.d.ts.map +1 -0
- package/dist/tooltip/tokens.js +21 -0
- package/dist/tooltip/tokens.js.map +1 -0
- package/dist/utils/cx.d.ts +1 -1
- package/dist/utils/cx.d.ts.map +1 -1
- package/dist/utils/cx.js +2 -2
- package/dist/utils/cx.js.map +1 -1
- package/dist/utils/events.d.ts +4 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/events.js +9 -0
- package/dist/utils/events.js.map +1 -0
- package/package.json +22 -5
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Breakpoints of the layout primitives, like Bootstrap's `$grid-breakpoints`: the minimum width of
|
|
4
|
+
* the nearest container at which a responsive value applies. They are constants, since CSS
|
|
5
|
+
* variables can't be used in queries; the stylesheets of the primitives use the same values.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BREAKPOINTS: Readonly<{
|
|
8
|
+
sm: "40rem";
|
|
9
|
+
md: "48rem";
|
|
10
|
+
lg: "64rem";
|
|
11
|
+
xl: "80rem";
|
|
12
|
+
}>;
|
|
13
|
+
/** A breakpoint: `sm`, `md`, `lg` or `xl`. */
|
|
14
|
+
export type Breakpoint = keyof typeof BREAKPOINTS;
|
|
15
|
+
/**
|
|
16
|
+
* A value, or values by breakpoint: `{ base: 1, md: 2, lg: 3 }`. Each value applies from its
|
|
17
|
+
* breakpoint up, until a larger one sets another. Breakpoints are widths of the nearest container
|
|
18
|
+
* (`PanneauRoot`, `Container`, a form, a list), not of the viewport, so that a grid in a narrow
|
|
19
|
+
* sidebar behaves as on a phone.
|
|
20
|
+
*/
|
|
21
|
+
export type Responsive<T> = T | Partial<Record<'base' | Breakpoint, T>>;
|
|
22
|
+
/** A step of the space scale of the theme (`--panneau-space-<step>`), or 0. */
|
|
23
|
+
export type Space = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10;
|
|
24
|
+
/** The CSS value of a step of the space scale. */
|
|
25
|
+
export declare function space(step: Space): string;
|
|
26
|
+
/**
|
|
27
|
+
* The inline variables of a responsive prop, `--_panneau-<component>-<prop>-<breakpoint>`, which
|
|
28
|
+
* the static rules of the component read in each container query. Unset breakpoints fall back to
|
|
29
|
+
* smaller ones in CSS.
|
|
30
|
+
*/
|
|
31
|
+
export declare function responsiveVariables<T>(component: string, prop: string, value: Responsive<T> | undefined, toCss: (value: T) => string): Record<string, string>;
|
|
32
|
+
/** Merges inline variables with the `style` prop, which wins. */
|
|
33
|
+
export declare function withVariables(variables: Record<string, string>[], style: CSSProperties | undefined): CSSProperties | undefined;
|
|
34
|
+
/** How the primitives distribute items along their axis: `between` is `space-between`. */
|
|
35
|
+
export type Justification = 'start' | 'center' | 'end' | 'between';
|
|
36
|
+
/** The CSS value of a justification. */
|
|
37
|
+
export declare function justification(value: Justification): string;
|
|
38
|
+
//# sourceMappingURL=responsive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../src/layout/responsive.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;EAKtB,CAAC;AAEH,8CAA8C;AAC9C,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAElD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;AAExE,+EAA+E;AAC/E,MAAM,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAEvD,kDAAkD;AAClD,wBAAgB,KAAK,CAAC,IAAI,EAAE,KAAK,GAAG,MAAM,CAEzC;AAQD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACjC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,EAChC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,GAC5B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAexB;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EACnC,KAAK,EAAE,aAAa,GAAG,SAAS,GACjC,aAAa,GAAG,SAAS,CAG3B;AAED,0FAA0F;AAC1F,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAEnE,wCAAwC;AACxC,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE1D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//#region src/layout/responsive.ts
|
|
2
|
+
/**
|
|
3
|
+
* Breakpoints of the layout primitives, like Bootstrap's `$grid-breakpoints`: the minimum width of
|
|
4
|
+
* the nearest container at which a responsive value applies. They are constants, since CSS
|
|
5
|
+
* variables can't be used in queries; the stylesheets of the primitives use the same values.
|
|
6
|
+
*/
|
|
7
|
+
var BREAKPOINTS = Object.freeze({
|
|
8
|
+
sm: "40rem",
|
|
9
|
+
md: "48rem",
|
|
10
|
+
lg: "64rem",
|
|
11
|
+
xl: "80rem"
|
|
12
|
+
});
|
|
13
|
+
/** The CSS value of a step of the space scale. */
|
|
14
|
+
function space(step) {
|
|
15
|
+
return step === 0 ? "0" : `var(--panneau-space-${step})`;
|
|
16
|
+
}
|
|
17
|
+
var KEYS = ["base", ...Object.keys(BREAKPOINTS)];
|
|
18
|
+
function isByBreakpoint(value) {
|
|
19
|
+
return typeof value === "object" && value !== null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The inline variables of a responsive prop, `--_panneau-<component>-<prop>-<breakpoint>`, which
|
|
23
|
+
* the static rules of the component read in each container query. Unset breakpoints fall back to
|
|
24
|
+
* smaller ones in CSS.
|
|
25
|
+
*/
|
|
26
|
+
function responsiveVariables(component, prop, value, toCss) {
|
|
27
|
+
if (value === void 0) return {};
|
|
28
|
+
const values = isByBreakpoint(value) ? value : { base: value };
|
|
29
|
+
return Object.fromEntries(KEYS.flatMap((key) => {
|
|
30
|
+
const item = values[key];
|
|
31
|
+
return item !== void 0 ? [[`--_panneau-${component}-${prop}-${key}`, toCss(item)]] : [];
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
/** Merges inline variables with the `style` prop, which wins. */
|
|
35
|
+
function withVariables(variables, style) {
|
|
36
|
+
const merged = Object.assign({}, ...variables);
|
|
37
|
+
return Object.keys(merged).length > 0 ? {
|
|
38
|
+
...merged,
|
|
39
|
+
...style
|
|
40
|
+
} : style;
|
|
41
|
+
}
|
|
42
|
+
/** The CSS value of a justification. */
|
|
43
|
+
function justification(value) {
|
|
44
|
+
return value === "between" ? "space-between" : value;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { BREAKPOINTS, justification, responsiveVariables, space, withVariables };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=responsive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsive.js","names":["CSSProperties","BREAKPOINTS","Object","freeze","sm","md","lg","xl","Breakpoint","Responsive","T","Partial","Record","Space","space","step","KEYS","keys","const","isByBreakpoint","value","responsiveVariables","component","prop","toCss","undefined","values","base","fromEntries","flatMap","key","item","withVariables","variables","style","merged","assign","length","Justification","justification"],"sources":["../../src/layout/responsive.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\n\n/**\n * Breakpoints of the layout primitives, like Bootstrap's `$grid-breakpoints`: the minimum width of\n * the nearest container at which a responsive value applies. They are constants, since CSS\n * variables can't be used in queries; the stylesheets of the primitives use the same values.\n */\nexport const BREAKPOINTS = Object.freeze({\n sm: '40rem',\n md: '48rem',\n lg: '64rem',\n xl: '80rem',\n});\n\n/** A breakpoint: `sm`, `md`, `lg` or `xl`. */\nexport type Breakpoint = keyof typeof BREAKPOINTS;\n\n/**\n * A value, or values by breakpoint: `{ base: 1, md: 2, lg: 3 }`. Each value applies from its\n * breakpoint up, until a larger one sets another. Breakpoints are widths of the nearest container\n * (`PanneauRoot`, `Container`, a form, a list), not of the viewport, so that a grid in a narrow\n * sidebar behaves as on a phone.\n */\nexport type Responsive<T> = T | Partial<Record<'base' | Breakpoint, T>>;\n\n/** A step of the space scale of the theme (`--panneau-space-<step>`), or 0. */\nexport type Space = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10;\n\n/** The CSS value of a step of the space scale. */\nexport function space(step: Space): string {\n return step === 0 ? '0' : `var(--panneau-space-${step})`;\n}\n\nconst KEYS = ['base', ...(Object.keys(BREAKPOINTS) as Breakpoint[])] as const;\n\nfunction isByBreakpoint<T>(value: Responsive<T>): value is Partial<Record<'base' | Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * The inline variables of a responsive prop, `--_panneau-<component>-<prop>-<breakpoint>`, which\n * the static rules of the component read in each container query. Unset breakpoints fall back to\n * smaller ones in CSS.\n */\nexport function responsiveVariables<T>(\n component: string,\n prop: string,\n value: Responsive<T> | undefined,\n toCss: (value: T) => string,\n): Record<string, string> {\n if (value === undefined) {\n return {};\n }\n const values: Partial<Record<'base' | Breakpoint, T>> = isByBreakpoint(value)\n ? value\n : { base: value };\n return Object.fromEntries(\n KEYS.flatMap((key) => {\n const item = values[key];\n return item !== undefined\n ? [[`--_panneau-${component}-${prop}-${key}`, toCss(item)]]\n : [];\n }),\n );\n}\n\n/** Merges inline variables with the `style` prop, which wins. */\nexport function withVariables(\n variables: Record<string, string>[],\n style: CSSProperties | undefined,\n): CSSProperties | undefined {\n const merged = Object.assign({}, ...variables) as Record<string, string>;\n return Object.keys(merged).length > 0 ? { ...merged, ...style } : style;\n}\n\n/** How the primitives distribute items along their axis: `between` is `space-between`. */\nexport type Justification = 'start' | 'center' | 'end' | 'between';\n\n/** The CSS value of a justification. */\nexport function justification(value: Justification): string {\n return value === 'between' ? 'space-between' : value;\n}\n"],"mappings":";;;;;;AAOA,IAAaC,cAAcC,OAAOC,OAAO;CACrCC,IAAI;CACJC,IAAI;CACJC,IAAI;CACJC,IAAI;AACR,CAAC;;AAiBD,SAAgBO,MAAMC,MAAqB;CACvC,OAAOA,SAAS,IAAI,MAAM,uBAAuBA,KAAI;AACzD;AAEA,IAAMC,OAAO,CAAC,QAAQ,GAAId,OAAOe,KAAKhB,WAAW,CAAkB;AAEnE,SAASkB,eAAkBC,OAAwE;CAC/F,OAAO,OAAOA,UAAU,YAAYA,UAAU;AAClD;;;;;;AAOA,SAAgBC,oBACZC,WACAC,MACAH,OACAI,OACsB;CACtB,IAAIJ,UAAUK,KAAAA,GACV,OAAO,CAAC;CAEZ,MAAMC,SAAkDP,eAAeC,KAAK,IACtEA,QACA,EAAEO,MAAMP,MAAM;CACpB,OAAOlB,OAAO0B,YACVZ,KAAKa,SAASC,QAAQ;EAClB,MAAMC,OAAOL,OAAOI;EACpB,OAAOC,SAASN,KAAAA,IACV,CAAC,CAAC,cAAcH,UAAS,GAAIC,KAAI,GAAIO,OAAON,MAAMO,IAAI,CAAC,CAAC,IACxD,CAAA;CACV,CAAC,CACL;AACJ;;AAGA,SAAgBC,cACZC,WACAC,OACyB;CACzB,MAAMC,SAASjC,OAAOkC,OAAO,CAAC,GAAG,GAAGH,SAAS;CAC7C,OAAO/B,OAAOe,KAAKkB,MAAM,CAAC,CAACE,SAAS,IAAI;EAAE,GAAGF;EAAQ,GAAGD;CAAM,IAAIA;AACtE;;AAMA,SAAgBK,cAAcnB,OAA8B;CACxD,OAAOA,UAAU,YAAY,kBAAkBA;AACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["allFr"],"sources":["../../src/locales/index.ts"],"sourcesContent":["import { fr as allFr, getDefaultMessages } from '@panneau/intl';\n\nimport { messages } from '../intl/messages';\n\n/**\n * The English messages of `@panneau/ui`, by id. They are also the default messages.\n *\n * @deprecated Use `en`, or `withPanneauMessages()`, from `@panneau/intl`: they have the messages\n * of every package.\n */\nexport const en: Record<string, string> = getDefaultMessages(messages);\n\n/**\n * The French messages of `@panneau/ui`, by id.\n *\n * @deprecated Use `fr`, or `withPanneauMessages()`, from `@panneau/intl`: they have the messages\n * of every package.\n */\nexport const fr: Record<string, string> = Object.fromEntries(\n Object.entries(allFr).filter(([id]) => id in en),\n);\n"],"mappings":";;;;;;;;;AAUA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["fr","allFr","getDefaultMessages","messages","en","Record","Object","fromEntries","entries","filter","id","allFr"],"sources":["../../src/locales/index.ts"],"sourcesContent":["import { fr as allFr, getDefaultMessages } from '@panneau/intl';\n\nimport { messages } from '../intl/messages';\n\n/**\n * The English messages of `@panneau/ui`, by id. They are also the default messages.\n *\n * @deprecated Use `en`, or `withPanneauMessages()`, from `@panneau/intl`: they have the messages\n * of every package.\n */\nexport const en: Record<string, string> = getDefaultMessages(messages);\n\n/**\n * The French messages of `@panneau/ui`, by id.\n *\n * @deprecated Use `fr`, or `withPanneauMessages()`, from `@panneau/intl`: they have the messages\n * of every package.\n */\nexport const fr: Record<string, string> = Object.fromEntries(\n Object.entries(allFr).filter(([id]) => id in en),\n);\n"],"mappings":";;;;;;;;;AAUA,IAAaI,KAA6BF,mBAAmBC,QAAQ;;;;;;;AAQrE,IAAaH,KAA6BM,OAAOC,YAC7CD,OAAOE,QAAQP,IAAK,CAAC,CAACQ,QAAQ,CAACC,QAAQA,MAAMN,EAAE,CACnD"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* Parts of menus on top of the options of ListBox.module.css: sections, footer, media, selection. */
|
|
2
|
+
|
|
3
|
+
/* A menu with a footer: the items scroll, the footer stays under them. */
|
|
4
|
+
.panneau-menu-layout {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
max-height: inherit;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.panneau-menu-layout > [role='menu'] {
|
|
11
|
+
flex: 1 1 auto;
|
|
12
|
+
min-height: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.panneau-menu-section + .panneau-menu-section {
|
|
16
|
+
margin-top: var(--panneau-space-1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.panneau-menu-header {
|
|
20
|
+
padding: var(--panneau-space-2) var(--panneau-list-box-item-padding-x, var(--panneau-space-2))
|
|
21
|
+
var(--panneau-space-1);
|
|
22
|
+
font-size: var(--panneau-menu-header-font-size, var(--panneau-font-size-xs));
|
|
23
|
+
font-weight: var(--panneau-menu-header-font-weight, var(--panneau-font-weight-medium));
|
|
24
|
+
line-height: var(--panneau-line-height-tight);
|
|
25
|
+
color: var(--panneau-menu-header-color, var(--panneau-color-text-muted));
|
|
26
|
+
text-transform: var(--panneau-menu-header-text-transform, uppercase);
|
|
27
|
+
letter-spacing: var(--panneau-menu-header-letter-spacing, 0.04em);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.panneau-menu-footer {
|
|
31
|
+
flex: 0 0 auto;
|
|
32
|
+
padding: var(--panneau-space-2)
|
|
33
|
+
calc(
|
|
34
|
+
var(--panneau-list-box-padding, var(--panneau-space-1)) +
|
|
35
|
+
var(--panneau-list-box-item-padding-x, var(--panneau-space-2))
|
|
36
|
+
);
|
|
37
|
+
font-size: var(--panneau-menu-footer-font-size, var(--panneau-font-size-xs));
|
|
38
|
+
line-height: var(--panneau-line-height-tight);
|
|
39
|
+
color: var(--panneau-menu-footer-color, var(--panneau-color-text-muted));
|
|
40
|
+
border-top: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.panneau-menu-media {
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
flex: 0 0 auto;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
width: var(--panneau-menu-media-size, 1.5rem);
|
|
49
|
+
height: var(--panneau-menu-media-size, 1.5rem);
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
border-radius: var(--panneau-menu-media-radius, var(--panneau-radius-full));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.panneau-menu-item:has([slot='description']) .panneau-menu-media {
|
|
55
|
+
width: var(--panneau-menu-media-size-described, 2rem);
|
|
56
|
+
height: var(--panneau-menu-media-size-described, 2rem);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.panneau-menu-media > :is(img, svg, video, picture) {
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
object-fit: cover;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* The check of a selected item, at its end. */
|
|
66
|
+
.panneau-menu-check {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
flex: 0 0 auto;
|
|
69
|
+
justify-content: flex-end;
|
|
70
|
+
width: 1rem;
|
|
71
|
+
color: var(--panneau-color-text);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.panneau-menu-item[data-selected] {
|
|
75
|
+
background-color: var(--panneau-menu-item-bg-selected, var(--panneau-color-surface-sunken));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* A focused or hovered selected item: the hover color over the selected background. */
|
|
79
|
+
.panneau-menu-item[data-selected]:is([data-focused], [data-hovered]) {
|
|
80
|
+
background-image: linear-gradient(
|
|
81
|
+
var(--panneau-list-box-item-bg-hover, var(--panneau-color-hover)),
|
|
82
|
+
var(--panneau-list-box-item-bg-hover, var(--panneau-color-hover))
|
|
83
|
+
);
|
|
84
|
+
}
|
package/dist/menu/Menu.d.ts
CHANGED
|
@@ -1,26 +1,53 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type MenuItemProps as AriaMenuItemProps, type MenuProps as AriaMenuProps } from 'react-aria-components';
|
|
3
|
-
import { type IconComponent } from '../icon/Icon';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type MenuItemProps as AriaMenuItemProps, type MenuProps as AriaMenuProps, type MenuSectionProps as AriaMenuSectionProps } from 'react-aria-components';
|
|
3
|
+
import { type IconComponent } from '../icon/Icon.js';
|
|
4
4
|
export interface MenuProps<T extends object> extends Omit<AriaMenuProps<T>, 'className' | 'style'> {
|
|
5
5
|
className?: string;
|
|
6
6
|
popoverClassName?: string;
|
|
7
7
|
placement?: 'bottom start' | 'bottom end' | 'top start' | 'top end';
|
|
8
|
+
/**
|
|
9
|
+
* A short note under the items, after a line, such as "Only this step changes.". It isn't an
|
|
10
|
+
* item and can't be focused: the menu is described by it.
|
|
11
|
+
*/
|
|
12
|
+
footer?: ReactNode;
|
|
13
|
+
footerClassName?: string;
|
|
8
14
|
}
|
|
9
15
|
/**
|
|
10
16
|
* A menu of actions, inside a `MenuTrigger` with its button as the first child. Arrow keys move
|
|
11
|
-
* between items, and typing a letter jumps to an item.
|
|
17
|
+
* between items, and typing a letter jumps to an item. With `selectionMode` (`single` or
|
|
18
|
+
* `multiple`) and `selectedKeys`, its items are choices, and the selected ones have a check.
|
|
12
19
|
*/
|
|
13
|
-
export declare function Menu<T extends object>({ className, popoverClassName, placement, ...props }: MenuProps<T>): import("react").JSX.Element;
|
|
20
|
+
export declare function Menu<T extends object>({ className, popoverClassName, placement, footer, footerClassName, ...props }: MenuProps<T>): import("react").JSX.Element;
|
|
14
21
|
export interface MenuItemProps extends Omit<AriaMenuItemProps, 'className' | 'style' | 'children'> {
|
|
15
22
|
children?: ReactNode;
|
|
16
23
|
icon?: IconComponent;
|
|
24
|
+
/**
|
|
25
|
+
* Leading media instead of an icon, such as an avatar or an image, sized with the item: larger
|
|
26
|
+
* when the item has a description.
|
|
27
|
+
*/
|
|
28
|
+
media?: ReactNode;
|
|
17
29
|
description?: string;
|
|
18
30
|
/** Styles the item as destructive. */
|
|
19
31
|
isDanger?: boolean;
|
|
20
32
|
className?: string;
|
|
21
33
|
}
|
|
22
|
-
/**
|
|
23
|
-
|
|
34
|
+
/**
|
|
35
|
+
* An item of a `Menu`. In a menu with a `selectionMode`, a selected item has a check at its end,
|
|
36
|
+
* and the role of a radio (single) or a checkbox (multiple) item.
|
|
37
|
+
*/
|
|
38
|
+
export declare function MenuItem({ children, icon, media, description, isDanger, className, textValue, ...props }: MenuItemProps): import("react").JSX.Element;
|
|
39
|
+
export interface MenuSectionProps<T extends object> extends Omit<AriaMenuSectionProps<T>, 'className' | 'style' | 'children' | 'items'> {
|
|
40
|
+
/**
|
|
41
|
+
* The header of the section, a small muted eyebrow above its items, such as "Publish on". It
|
|
42
|
+
* labels the group. Without it, give the section an `aria-label`.
|
|
43
|
+
*/
|
|
44
|
+
title?: ReactNode;
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
className?: string;
|
|
47
|
+
headerClassName?: string;
|
|
48
|
+
}
|
|
49
|
+
/** A group of items of a `Menu`, with a header. */
|
|
50
|
+
export declare function MenuSection<T extends object>({ title, children, className, headerClassName, ...props }: MenuSectionProps<T>): import("react").JSX.Element;
|
|
24
51
|
/** A line between groups of menu items. */
|
|
25
52
|
export declare function MenuSeparator(): import("react").JSX.Element;
|
|
26
53
|
export { MenuTrigger } from 'react-aria-components';
|
package/dist/menu/Menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../src/menu/Menu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../src/menu/Menu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAC9C,OAAO,EAGH,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,SAAS,IAAI,aAAa,EAE/B,KAAK,gBAAgB,IAAI,oBAAoB,EAIhD,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAMxD,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC;IACpE;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,EACnC,SAAS,EACT,gBAAgB,EAChB,SAA0B,EAC1B,MAAM,EACN,eAAe,EACf,GAAG,KAAK,EACX,EAAE,SAAS,CAAC,CAAC,CAAC,+BA4Bd;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC;IAC9F,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACrB,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAgB,EAChB,SAAS,EACT,SAAS,EACT,GAAG,KAAK,EACX,EAAE,aAAa,+BAkCf;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,IAAI,CAC5D,oBAAoB,CAAC,CAAC,CAAC,EACvB,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAC/C;IACG;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,mDAAmD;AACnD,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,EAC1C,KAAK,EACL,QAAQ,EACR,SAAS,EACT,eAAe,EACf,GAAG,KAAK,EACX,EAAE,gBAAgB,CAAC,CAAC,CAAC,+BASrB;AAED,2CAA2C;AAC3C,wBAAgB,aAAa,gCAE5B;AAED,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/menu/Menu.js
CHANGED
|
@@ -2,44 +2,255 @@ import { cx } from "../utils/cx.js";
|
|
|
2
2
|
import { Icon } from "../icon/Icon.js";
|
|
3
3
|
import { PopoverSurface } from "../popover/Popover.js";
|
|
4
4
|
import ListBox_module_default from "../select/ListBox.module.js";
|
|
5
|
-
import
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import Menu_module_default from "./Menu.module.js";
|
|
7
6
|
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { Check } from "lucide-react";
|
|
8
|
+
import { Header, Menu, MenuItem, MenuSection, MenuTrigger, Separator, Text } from "react-aria-components";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { useId } from "react";
|
|
8
11
|
//#region src/menu/Menu.tsx
|
|
9
12
|
/**
|
|
10
13
|
* A menu of actions, inside a `MenuTrigger` with its button as the first child. Arrow keys move
|
|
11
|
-
* between items, and typing a letter jumps to an item.
|
|
14
|
+
* between items, and typing a letter jumps to an item. With `selectionMode` (`single` or
|
|
15
|
+
* `multiple`) and `selectedKeys`, its items are choices, and the selected ones have a check.
|
|
12
16
|
*/
|
|
13
|
-
function Menu$1(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
function Menu$1(t0) {
|
|
18
|
+
const $ = c(27);
|
|
19
|
+
let className;
|
|
20
|
+
let footer;
|
|
21
|
+
let footerClassName;
|
|
22
|
+
let popoverClassName;
|
|
23
|
+
let props;
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[0] !== t0) {
|
|
26
|
+
({className, popoverClassName, placement: t1, footer, footerClassName, ...props} = t0);
|
|
27
|
+
$[0] = t0;
|
|
28
|
+
$[1] = className;
|
|
29
|
+
$[2] = footer;
|
|
30
|
+
$[3] = footerClassName;
|
|
31
|
+
$[4] = popoverClassName;
|
|
32
|
+
$[5] = props;
|
|
33
|
+
$[6] = t1;
|
|
34
|
+
} else {
|
|
35
|
+
className = $[1];
|
|
36
|
+
footer = $[2];
|
|
37
|
+
footerClassName = $[3];
|
|
38
|
+
popoverClassName = $[4];
|
|
39
|
+
props = $[5];
|
|
40
|
+
t1 = $[6];
|
|
41
|
+
}
|
|
42
|
+
const placement = t1 === void 0 ? "bottom start" : t1;
|
|
43
|
+
const footerId = useId();
|
|
44
|
+
const hasFooter = footer !== void 0 && footer !== null;
|
|
45
|
+
let t2;
|
|
46
|
+
if ($[7] !== footerId || $[8] !== hasFooter || $[9] !== props) {
|
|
47
|
+
t2 = hasFooter ? [props["aria-describedby"], footerId].filter(Boolean).join(" ") : props["aria-describedby"];
|
|
48
|
+
$[7] = footerId;
|
|
49
|
+
$[8] = hasFooter;
|
|
50
|
+
$[9] = props;
|
|
51
|
+
$[10] = t2;
|
|
52
|
+
} else t2 = $[10];
|
|
53
|
+
let t3;
|
|
54
|
+
if ($[11] !== className) {
|
|
55
|
+
t3 = cx("panneau-menu", ListBox_module_default.listBox, className);
|
|
56
|
+
$[11] = className;
|
|
57
|
+
$[12] = t3;
|
|
58
|
+
} else t3 = $[12];
|
|
59
|
+
let t4;
|
|
60
|
+
if ($[13] !== props || $[14] !== t2 || $[15] !== t3) {
|
|
61
|
+
t4 = /* @__PURE__ */ jsx(Menu, {
|
|
62
|
+
...props,
|
|
63
|
+
"aria-describedby": t2,
|
|
64
|
+
className: t3
|
|
65
|
+
});
|
|
66
|
+
$[13] = props;
|
|
67
|
+
$[14] = t2;
|
|
68
|
+
$[15] = t3;
|
|
69
|
+
$[16] = t4;
|
|
70
|
+
} else t4 = $[16];
|
|
71
|
+
const menu = t4;
|
|
72
|
+
let t5;
|
|
73
|
+
if ($[17] !== footer || $[18] !== footerClassName || $[19] !== footerId || $[20] !== hasFooter || $[21] !== menu) {
|
|
74
|
+
t5 = hasFooter ? /* @__PURE__ */ jsxs("div", {
|
|
75
|
+
className: Menu_module_default.layout,
|
|
76
|
+
children: [menu, /* @__PURE__ */ jsx("div", {
|
|
77
|
+
id: footerId,
|
|
78
|
+
className: cx(Menu_module_default.footer, footerClassName),
|
|
79
|
+
children: footer
|
|
80
|
+
})]
|
|
81
|
+
}) : menu;
|
|
82
|
+
$[17] = footer;
|
|
83
|
+
$[18] = footerClassName;
|
|
84
|
+
$[19] = footerId;
|
|
85
|
+
$[20] = hasFooter;
|
|
86
|
+
$[21] = menu;
|
|
87
|
+
$[22] = t5;
|
|
88
|
+
} else t5 = $[22];
|
|
89
|
+
let t6;
|
|
90
|
+
if ($[23] !== placement || $[24] !== popoverClassName || $[25] !== t5) {
|
|
91
|
+
t6 = /* @__PURE__ */ jsx(PopoverSurface, {
|
|
92
|
+
placement,
|
|
93
|
+
className: popoverClassName,
|
|
94
|
+
children: t5
|
|
95
|
+
});
|
|
96
|
+
$[23] = placement;
|
|
97
|
+
$[24] = popoverClassName;
|
|
98
|
+
$[25] = t5;
|
|
99
|
+
$[26] = t6;
|
|
100
|
+
} else t6 = $[26];
|
|
101
|
+
return t6;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* An item of a `Menu`. In a menu with a `selectionMode`, a selected item has a check at its end,
|
|
105
|
+
* and the role of a radio (single) or a checkbox (multiple) item.
|
|
106
|
+
*/
|
|
107
|
+
function MenuItem$1(t0) {
|
|
108
|
+
const $ = c(22);
|
|
109
|
+
let children;
|
|
110
|
+
let className;
|
|
111
|
+
let description;
|
|
112
|
+
let icon;
|
|
113
|
+
let media;
|
|
114
|
+
let props;
|
|
115
|
+
let t1;
|
|
116
|
+
let textValue;
|
|
117
|
+
if ($[0] !== t0) {
|
|
118
|
+
({children, icon, media, description, isDanger: t1, className, textValue, ...props} = t0);
|
|
119
|
+
$[0] = t0;
|
|
120
|
+
$[1] = children;
|
|
121
|
+
$[2] = className;
|
|
122
|
+
$[3] = description;
|
|
123
|
+
$[4] = icon;
|
|
124
|
+
$[5] = media;
|
|
125
|
+
$[6] = props;
|
|
126
|
+
$[7] = t1;
|
|
127
|
+
$[8] = textValue;
|
|
128
|
+
} else {
|
|
129
|
+
children = $[1];
|
|
130
|
+
className = $[2];
|
|
131
|
+
description = $[3];
|
|
132
|
+
icon = $[4];
|
|
133
|
+
media = $[5];
|
|
134
|
+
props = $[6];
|
|
135
|
+
t1 = $[7];
|
|
136
|
+
textValue = $[8];
|
|
137
|
+
}
|
|
138
|
+
const isDanger = t1 === void 0 ? false : t1;
|
|
139
|
+
const t2 = textValue ?? (typeof children === "string" ? children : void 0);
|
|
140
|
+
let t3;
|
|
141
|
+
if ($[9] !== className) {
|
|
142
|
+
t3 = cx("panneau-menu-item", ListBox_module_default.item, Menu_module_default.item, className);
|
|
143
|
+
$[9] = className;
|
|
144
|
+
$[10] = t3;
|
|
145
|
+
} else t3 = $[10];
|
|
146
|
+
const t4 = isDanger || void 0;
|
|
147
|
+
let t5;
|
|
148
|
+
if ($[11] !== children || $[12] !== description || $[13] !== icon || $[14] !== media) {
|
|
149
|
+
t5 = (t6) => {
|
|
150
|
+
const { isSelected, selectionMode } = t6;
|
|
151
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
152
|
+
media !== void 0 && media !== null ? /* @__PURE__ */ jsx("span", {
|
|
153
|
+
className: Menu_module_default.media,
|
|
154
|
+
children: media
|
|
155
|
+
}) : icon !== void 0 ? /* @__PURE__ */ jsx(Icon, { icon }) : null,
|
|
156
|
+
/* @__PURE__ */ jsxs("span", {
|
|
157
|
+
className: ListBox_module_default.itemText,
|
|
158
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
159
|
+
slot: "label",
|
|
160
|
+
className: ListBox_module_default.itemLabel,
|
|
161
|
+
children
|
|
162
|
+
}), description !== void 0 ? /* @__PURE__ */ jsx(Text, {
|
|
163
|
+
slot: "description",
|
|
164
|
+
className: ListBox_module_default.itemDescription,
|
|
165
|
+
children: description
|
|
166
|
+
}) : null]
|
|
167
|
+
}),
|
|
168
|
+
selectionMode !== "none" ? /* @__PURE__ */ jsx("span", {
|
|
169
|
+
className: Menu_module_default.check,
|
|
170
|
+
children: isSelected ? /* @__PURE__ */ jsx(Icon, {
|
|
171
|
+
icon: Check,
|
|
172
|
+
size: "sm"
|
|
173
|
+
}) : null
|
|
174
|
+
}) : null
|
|
175
|
+
] });
|
|
176
|
+
};
|
|
177
|
+
$[11] = children;
|
|
178
|
+
$[12] = description;
|
|
179
|
+
$[13] = icon;
|
|
180
|
+
$[14] = media;
|
|
181
|
+
$[15] = t5;
|
|
182
|
+
} else t5 = $[15];
|
|
183
|
+
let t6;
|
|
184
|
+
if ($[16] !== props || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== t5) {
|
|
185
|
+
t6 = /* @__PURE__ */ jsx(MenuItem, {
|
|
18
186
|
...props,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
187
|
+
textValue: t2,
|
|
188
|
+
className: t3,
|
|
189
|
+
"data-danger": t4,
|
|
190
|
+
children: t5
|
|
191
|
+
});
|
|
192
|
+
$[16] = props;
|
|
193
|
+
$[17] = t2;
|
|
194
|
+
$[18] = t3;
|
|
195
|
+
$[19] = t4;
|
|
196
|
+
$[20] = t5;
|
|
197
|
+
$[21] = t6;
|
|
198
|
+
} else t6 = $[21];
|
|
199
|
+
return t6;
|
|
22
200
|
}
|
|
23
|
-
/**
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
201
|
+
/** A group of items of a `Menu`, with a header. */
|
|
202
|
+
function MenuSection$1(t0) {
|
|
203
|
+
const $ = c(16);
|
|
204
|
+
let children;
|
|
205
|
+
let className;
|
|
206
|
+
let headerClassName;
|
|
207
|
+
let props;
|
|
208
|
+
let title;
|
|
209
|
+
if ($[0] !== t0) {
|
|
210
|
+
({title, children, className, headerClassName, ...props} = t0);
|
|
211
|
+
$[0] = t0;
|
|
212
|
+
$[1] = children;
|
|
213
|
+
$[2] = className;
|
|
214
|
+
$[3] = headerClassName;
|
|
215
|
+
$[4] = props;
|
|
216
|
+
$[5] = title;
|
|
217
|
+
} else {
|
|
218
|
+
children = $[1];
|
|
219
|
+
className = $[2];
|
|
220
|
+
headerClassName = $[3];
|
|
221
|
+
props = $[4];
|
|
222
|
+
title = $[5];
|
|
223
|
+
}
|
|
224
|
+
let t1;
|
|
225
|
+
if ($[6] !== className) {
|
|
226
|
+
t1 = cx(Menu_module_default.section, className);
|
|
227
|
+
$[6] = className;
|
|
228
|
+
$[7] = t1;
|
|
229
|
+
} else t1 = $[7];
|
|
230
|
+
let t2;
|
|
231
|
+
if ($[8] !== headerClassName || $[9] !== title) {
|
|
232
|
+
t2 = title !== void 0 && title !== null ? /* @__PURE__ */ jsx(Header, {
|
|
233
|
+
className: cx(Menu_module_default.header, headerClassName),
|
|
234
|
+
children: title
|
|
235
|
+
}) : null;
|
|
236
|
+
$[8] = headerClassName;
|
|
237
|
+
$[9] = title;
|
|
238
|
+
$[10] = t2;
|
|
239
|
+
} else t2 = $[10];
|
|
240
|
+
let t3;
|
|
241
|
+
if ($[11] !== children || $[12] !== props || $[13] !== t1 || $[14] !== t2) {
|
|
242
|
+
t3 = /* @__PURE__ */ jsxs(MenuSection, {
|
|
243
|
+
...props,
|
|
244
|
+
className: t1,
|
|
245
|
+
children: [t2, children]
|
|
246
|
+
});
|
|
247
|
+
$[11] = children;
|
|
248
|
+
$[12] = props;
|
|
249
|
+
$[13] = t1;
|
|
250
|
+
$[14] = t2;
|
|
251
|
+
$[15] = t3;
|
|
252
|
+
} else t3 = $[15];
|
|
253
|
+
return t3;
|
|
43
254
|
}
|
|
44
255
|
/** A line between groups of menu items. */
|
|
45
256
|
function MenuSeparator() {
|
|
@@ -52,6 +263,6 @@ function MenuSeparator() {
|
|
|
52
263
|
return t0;
|
|
53
264
|
}
|
|
54
265
|
//#endregion
|
|
55
|
-
export { Menu$1 as Menu, MenuItem$1 as MenuItem, MenuSeparator, MenuTrigger };
|
|
266
|
+
export { Menu$1 as Menu, MenuItem$1 as MenuItem, MenuSection$1 as MenuSection, MenuSeparator, MenuTrigger };
|
|
56
267
|
|
|
57
268
|
//# sourceMappingURL=Menu.js.map
|
package/dist/menu/Menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","names":["Menu","AriaMenu","styles","MenuItem","AriaMenuItem","_c"],"sources":["../../src/menu/Menu.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n type MenuItemProps as AriaMenuItemProps,\n type MenuProps as AriaMenuProps,\n Separator,\n Text,\n} from 'react-aria-components';\n\nimport { Icon, type IconComponent } from '../icon/Icon';\nimport { PopoverSurface } from '../popover/Popover';\nimport styles from '../select/ListBox.module.css';\nimport { cx } from '../utils/cx';\n\nexport interface MenuProps<T extends object> extends Omit<AriaMenuProps<T>, 'className' | 'style'> {\n className?: string;\n popoverClassName?: string;\n placement?: 'bottom start' | 'bottom end' | 'top start' | 'top end';\n}\n\n/**\n * A menu of actions, inside a `MenuTrigger` with its button as the first child. Arrow keys move\n * between items, and typing a letter jumps to an item.\n */\nexport function Menu<T extends object>({\n className,\n popoverClassName,\n placement = 'bottom start',\n ...props\n}: MenuProps<T>) {\n return (\n <PopoverSurface placement={placement} className={popoverClassName}>\n <AriaMenu {...props} className={cx(styles.listBox, className)} />\n </PopoverSurface>\n );\n}\n\nexport interface MenuItemProps extends Omit<AriaMenuItemProps, 'className' | 'style' | 'children'> {\n children?: ReactNode;\n icon?: IconComponent;\n description?: string;\n /** Styles the item as destructive. */\n isDanger?: boolean;\n className?: string;\n}\n\n/** An item of a `Menu`. */\nexport function MenuItem({\n children,\n icon,\n description,\n isDanger = false,\n className,\n textValue,\n ...props\n}: MenuItemProps) {\n return (\n <AriaMenuItem\n {...props}\n textValue={textValue ?? (typeof children === 'string' ? children : undefined)}\n className={cx(styles.item, className)}\n data-danger={isDanger || undefined}\n >\n {icon !== undefined ? <Icon icon={icon} /> : null}\n <span className={styles.itemText}>\n <Text slot=\"label\" className={styles.itemLabel}>\n {children}\n </Text>\n {description !== undefined ? (\n <Text slot=\"description\" className={styles.itemDescription}>\n {description}\n </Text>\n ) : null}\n </span>\n </AriaMenuItem>\n );\n}\n\n/** A line between groups of menu items. */\nexport function MenuSeparator() {\n return <Separator className={styles.separator} />;\n}\n\nexport { MenuTrigger } from 'react-aria-components';\n"],"mappings":";;;;;;;;;;;;AAyBA,SAAgBA,OAAuB,EACnC,WACA,kBACA,YAAY,gBACZ,GAAG,SACU;CACb,OACI,oBAAC,gBAAD;EAA2B;EAAW,WAAW;EAC7C,UAAA,oBAACC,MAAD;GAAU,GAAI;GAAO,WAAW,GAAGC,uBAAO,SAAS,SAAS;EAAE,CAAA;CAClD,CAAA;AAExB;;AAYA,SAAgBC,WAAS,EACrB,UACA,MACA,aACA,WAAW,OACX,WACA,WACA,GAAG,SACW;CACd,OACI,qBAACC,UAAD;EACI,GAAI;EACJ,WAAW,cAAc,OAAO,aAAa,WAAW,WAAW,KAAA;EACnE,WAAW,GAAGF,uBAAO,MAAM,SAAS;EACpC,eAAa,YAAY,KAAA;EAJ7B,UAAA,CAMK,SAAS,KAAA,IAAY,oBAAC,MAAD,EAAY,KAAK,CAAA,IAAM,MAC7C,qBAAC,QAAD;GAAM,WAAWA,uBAAO;GAAxB,UAAA,CACI,oBAAC,MAAD;IAAM,MAAK;IAAQ,WAAWA,uBAAO;IAChC;GACC,CAAA,GACL,gBAAgB,KAAA,IACb,oBAAC,MAAD;IAAM,MAAK;IAAc,WAAWA,uBAAO;IACtC,UAAA;GACC,CAAA,IACN,IACF;EACI,CAAA,CAAA;;AAEtB;;AAGA,SAAO,gBAAA;CAAA,MAAA,IAAAG,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,OAAA,IAAA,2BAAA,GAAA;EACI,KAAA,oBAAC,WAAD,EAAsB,WAAAH,uBAAM,UAAU,CAAA;EAAI,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OAA1C;AAA0C"}
|
|
1
|
+
{"version":3,"file":"Menu.js","names":["Check","ReactNode","useId","Menu","AriaMenu","MenuItem","AriaMenuItem","MenuItemProps","AriaMenuItemProps","MenuProps","AriaMenuProps","MenuSection","AriaMenuSection","MenuSectionProps","AriaMenuSectionProps","Header","Separator","Text","Icon","IconComponent","PopoverSurface","listBoxStyles","cx","styles","Omit","T","className","popoverClassName","placement","footer","footerClassName","t0","$","_c","props","t1","undefined","footerId","hasFooter","t2","filter","Boolean","join","t3","listBox","t4","menu","t5","layout","t6","children","icon","media","description","isDanger","textValue","item","isSelected","selectionMode","itemText","itemLabel","itemDescription","check","title","headerClassName","section","header","MenuSeparator","Symbol","for","separator","MenuTrigger","Menu","_c","listBoxStyles","AriaMenu","styles","MenuItem","_Fragment","AriaMenuItem","MenuSection","AriaMenuSection"],"sources":["../../src/menu/Menu.tsx"],"sourcesContent":["import { Check } from 'lucide-react';\nimport { type ReactNode, useId } from 'react';\nimport {\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n type MenuItemProps as AriaMenuItemProps,\n type MenuProps as AriaMenuProps,\n MenuSection as AriaMenuSection,\n type MenuSectionProps as AriaMenuSectionProps,\n Header,\n Separator,\n Text,\n} from 'react-aria-components';\n\nimport { Icon, type IconComponent } from '../icon/Icon';\nimport { PopoverSurface } from '../popover/Popover';\nimport listBoxStyles from '../select/ListBox.module.css';\nimport { cx } from '../utils/cx';\nimport styles from './Menu.module.css';\n\nexport interface MenuProps<T extends object> extends Omit<AriaMenuProps<T>, 'className' | 'style'> {\n className?: string;\n popoverClassName?: string;\n placement?: 'bottom start' | 'bottom end' | 'top start' | 'top end';\n /**\n * A short note under the items, after a line, such as \"Only this step changes.\". It isn't an\n * item and can't be focused: the menu is described by it.\n */\n footer?: ReactNode;\n footerClassName?: string;\n}\n\n/**\n * A menu of actions, inside a `MenuTrigger` with its button as the first child. Arrow keys move\n * between items, and typing a letter jumps to an item. With `selectionMode` (`single` or\n * `multiple`) and `selectedKeys`, its items are choices, and the selected ones have a check.\n */\nexport function Menu<T extends object>({\n className,\n popoverClassName,\n placement = 'bottom start',\n footer,\n footerClassName,\n ...props\n}: MenuProps<T>) {\n const footerId = useId();\n const hasFooter = footer !== undefined && footer !== null;\n const menu = (\n <AriaMenu\n {...props}\n aria-describedby={\n hasFooter\n ? [props['aria-describedby'], footerId].filter(Boolean).join(' ')\n : props['aria-describedby']\n }\n className={cx('panneau-menu', listBoxStyles.listBox, className)}\n />\n );\n return (\n <PopoverSurface placement={placement} className={popoverClassName}>\n {hasFooter ? (\n <div className={styles.layout}>\n {menu}\n <div id={footerId} className={cx(styles.footer, footerClassName)}>\n {footer}\n </div>\n </div>\n ) : (\n menu\n )}\n </PopoverSurface>\n );\n}\n\nexport interface MenuItemProps extends Omit<AriaMenuItemProps, 'className' | 'style' | 'children'> {\n children?: ReactNode;\n icon?: IconComponent;\n /**\n * Leading media instead of an icon, such as an avatar or an image, sized with the item: larger\n * when the item has a description.\n */\n media?: ReactNode;\n description?: string;\n /** Styles the item as destructive. */\n isDanger?: boolean;\n className?: string;\n}\n\n/**\n * An item of a `Menu`. In a menu with a `selectionMode`, a selected item has a check at its end,\n * and the role of a radio (single) or a checkbox (multiple) item.\n */\nexport function MenuItem({\n children,\n icon,\n media,\n description,\n isDanger = false,\n className,\n textValue,\n ...props\n}: MenuItemProps) {\n return (\n <AriaMenuItem\n {...props}\n textValue={textValue ?? (typeof children === 'string' ? children : undefined)}\n className={cx('panneau-menu-item', listBoxStyles.item, styles.item, className)}\n data-danger={isDanger || undefined}\n >\n {({ isSelected, selectionMode }) => (\n <>\n {media !== undefined && media !== null ? (\n <span className={styles.media}>{media}</span>\n ) : icon !== undefined ? (\n <Icon icon={icon} />\n ) : null}\n <span className={listBoxStyles.itemText}>\n <Text slot=\"label\" className={listBoxStyles.itemLabel}>\n {children}\n </Text>\n {description !== undefined ? (\n <Text slot=\"description\" className={listBoxStyles.itemDescription}>\n {description}\n </Text>\n ) : null}\n </span>\n {selectionMode !== 'none' ? (\n <span className={styles.check}>\n {isSelected ? <Icon icon={Check} size=\"sm\" /> : null}\n </span>\n ) : null}\n </>\n )}\n </AriaMenuItem>\n );\n}\n\nexport interface MenuSectionProps<T extends object> extends Omit<\n AriaMenuSectionProps<T>,\n 'className' | 'style' | 'children' | 'items'\n> {\n /**\n * The header of the section, a small muted eyebrow above its items, such as \"Publish on\". It\n * labels the group. Without it, give the section an `aria-label`.\n */\n title?: ReactNode;\n children?: ReactNode;\n className?: string;\n headerClassName?: string;\n}\n\n/** A group of items of a `Menu`, with a header. */\nexport function MenuSection<T extends object>({\n title,\n children,\n className,\n headerClassName,\n ...props\n}: MenuSectionProps<T>) {\n return (\n <AriaMenuSection {...props} className={cx(styles.section, className)}>\n {title !== undefined && title !== null ? (\n <Header className={cx(styles.header, headerClassName)}>{title}</Header>\n ) : null}\n {children}\n </AriaMenuSection>\n );\n}\n\n/** A line between groups of menu items. */\nexport function MenuSeparator() {\n return <Separator className={listBoxStyles.separator} />;\n}\n\nexport { MenuTrigger } from 'react-aria-components';\n"],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./Menu.css";
|
|
2
|
+
//#region src/menu/Menu.module.css
|
|
3
|
+
var layout = "panneau-menu-layout";
|
|
4
|
+
var section = "panneau-menu-section";
|
|
5
|
+
var header = "panneau-menu-header";
|
|
6
|
+
var footer = "panneau-menu-footer";
|
|
7
|
+
var media = "panneau-menu-media";
|
|
8
|
+
var item = "panneau-menu-item";
|
|
9
|
+
var check = "panneau-menu-check";
|
|
10
|
+
var Menu_module_default = {
|
|
11
|
+
layout,
|
|
12
|
+
section,
|
|
13
|
+
header,
|
|
14
|
+
footer,
|
|
15
|
+
media,
|
|
16
|
+
item,
|
|
17
|
+
check
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { check, Menu_module_default as default, footer, header, item, layout, media, section };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=Menu.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.module.js","names":[],"sources":["../../src/menu/Menu.module.css"],"sourcesContent":["/* Parts of menus on top of the options of ListBox.module.css: sections, footer, media, selection. */\n\n/* A menu with a footer: the items scroll, the footer stays under them. */\n.layout {\n display: flex;\n flex-direction: column;\n max-height: inherit;\n}\n\n.layout > [role='menu'] {\n flex: 1 1 auto;\n min-height: 0;\n}\n\n.section + .section {\n margin-top: var(--panneau-space-1);\n}\n\n.header {\n padding: var(--panneau-space-2) var(--panneau-list-box-item-padding-x, var(--panneau-space-2))\n var(--panneau-space-1);\n font-size: var(--panneau-menu-header-font-size, var(--panneau-font-size-xs));\n font-weight: var(--panneau-menu-header-font-weight, var(--panneau-font-weight-medium));\n line-height: var(--panneau-line-height-tight);\n color: var(--panneau-menu-header-color, var(--panneau-color-text-muted));\n text-transform: var(--panneau-menu-header-text-transform, uppercase);\n letter-spacing: var(--panneau-menu-header-letter-spacing, 0.04em);\n}\n\n.footer {\n flex: 0 0 auto;\n padding: var(--panneau-space-2)\n calc(\n var(--panneau-list-box-padding, var(--panneau-space-1)) +\n var(--panneau-list-box-item-padding-x, var(--panneau-space-2))\n );\n font-size: var(--panneau-menu-footer-font-size, var(--panneau-font-size-xs));\n line-height: var(--panneau-line-height-tight);\n color: var(--panneau-menu-footer-color, var(--panneau-color-text-muted));\n border-top: var(--panneau-border-width) solid var(--panneau-color-border);\n}\n\n.media {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n width: var(--panneau-menu-media-size, 1.5rem);\n height: var(--panneau-menu-media-size, 1.5rem);\n overflow: hidden;\n border-radius: var(--panneau-menu-media-radius, var(--panneau-radius-full));\n}\n\n.item:has([slot='description']) .media {\n width: var(--panneau-menu-media-size-described, 2rem);\n height: var(--panneau-menu-media-size-described, 2rem);\n}\n\n.media > :is(img, svg, video, picture) {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n/* The check of a selected item, at its end. */\n.check {\n display: inline-flex;\n flex: 0 0 auto;\n justify-content: flex-end;\n width: 1rem;\n color: var(--panneau-color-text);\n}\n\n.item[data-selected] {\n background-color: var(--panneau-menu-item-bg-selected, var(--panneau-color-surface-sunken));\n}\n\n/* A focused or hovered selected item: the hover color over the selected background. */\n.item[data-selected]:is([data-focused], [data-hovered]) {\n background-image: linear-gradient(\n var(--panneau-list-box-item-bg-hover, var(--panneau-color-hover)),\n var(--panneau-list-box-item-bg-hover, var(--panneau-color-hover))\n );\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of Menu: its sections, its footer, and the media and selection of its items. */
|
|
2
|
+
export declare const menuTokens: import("../index.js").ComponentTokens<"menu", "panneau-menu-header-font-size" | "panneau-menu-header-font-weight" | "panneau-menu-header-color" | "panneau-menu-header-text-transform" | "panneau-menu-header-letter-spacing" | "panneau-menu-footer-font-size" | "panneau-menu-footer-color" | "panneau-menu-media-size" | "panneau-menu-media-size-described" | "panneau-menu-media-radius" | "panneau-menu-item-bg-selected">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/menu/tokens.ts"],"names":[],"mappings":"AAEA,0FAA0F;AAC1F,eAAO,MAAM,UAAU,yZAuBrB,CAAC"}
|