@panneau/ui 5.0.0-alpha.1 → 5.0.0-alpha.10
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 +32 -5
- package/dist/button/Button.d.ts.map +1 -1
- package/dist/button/Button.js +136 -17
- 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/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 +61 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -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,104 @@
|
|
|
1
|
+
/* A compact rounded button that shows a current value: the trigger of a menu or a popover. */
|
|
2
|
+
|
|
3
|
+
.panneau-pill-trigger {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
flex: 0 1 auto;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: var(--panneau-pill-trigger-gap, var(--panneau-space-2));
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
min-height: var(--panneau-control-height);
|
|
10
|
+
padding: 0 var(--panneau-pill-trigger-padding-x, var(--panneau-space-3));
|
|
11
|
+
font-family: inherit;
|
|
12
|
+
font-size: var(--panneau-pill-trigger-font-size, var(--panneau-font-size-md));
|
|
13
|
+
font-weight: var(--panneau-pill-trigger-font-weight, var(--panneau-font-weight-medium));
|
|
14
|
+
line-height: var(--panneau-line-height-tight);
|
|
15
|
+
color: var(--panneau-pill-trigger-color, var(--panneau-color-text));
|
|
16
|
+
text-align: start;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
user-select: none;
|
|
20
|
+
background-color: var(--panneau-pill-trigger-bg, var(--panneau-color-surface-sunken));
|
|
21
|
+
border: var(--panneau-border-width) solid var(--panneau-pill-trigger-border-color, transparent);
|
|
22
|
+
border-radius: var(--panneau-pill-trigger-radius, var(--panneau-radius-full));
|
|
23
|
+
transition: background-color var(--panneau-duration);
|
|
24
|
+
-webkit-tap-highlight-color: transparent;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.panneau-pill-trigger[data-hovered],
|
|
28
|
+
.panneau-pill-trigger[data-pressed],
|
|
29
|
+
.panneau-pill-trigger[aria-expanded='true'] {
|
|
30
|
+
background-color: var(
|
|
31
|
+
--panneau-pill-trigger-bg-hover,
|
|
32
|
+
color-mix(in srgb, var(--panneau-color-text) 8%, var(--panneau-color-surface-sunken))
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.panneau-pill-trigger[data-focus-visible] {
|
|
37
|
+
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
38
|
+
outline-offset: 2px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.panneau-pill-trigger[data-disabled] {
|
|
42
|
+
cursor: not-allowed;
|
|
43
|
+
opacity: 0.55;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* With media, the media sits as far from the start as from the top and the bottom. */
|
|
47
|
+
.panneau-pill-trigger:has(.panneau-pill-trigger-media) {
|
|
48
|
+
padding-inline-start: calc(
|
|
49
|
+
(var(--panneau-control-height) - var(--panneau-pill-trigger-media-size, 1.5rem)) / 2 -
|
|
50
|
+
var(--panneau-border-width)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.panneau-pill-trigger-sm {
|
|
55
|
+
min-height: var(--panneau-control-height-sm);
|
|
56
|
+
padding: 0 var(--panneau-pill-trigger-padding-x-sm, var(--panneau-space-2));
|
|
57
|
+
font-size: var(--panneau-pill-trigger-font-size-sm, var(--panneau-font-size-sm));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.panneau-pill-trigger-sm:has(.panneau-pill-trigger-media) {
|
|
61
|
+
padding-inline-start: calc(
|
|
62
|
+
(var(--panneau-control-height-sm) - var(--panneau-pill-trigger-media-size-sm, 1.25rem)) /
|
|
63
|
+
2 - var(--panneau-border-width)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.panneau-pill-trigger-media {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
flex: 0 0 auto;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
width: var(--panneau-pill-trigger-media-size, 1.5rem);
|
|
73
|
+
height: var(--panneau-pill-trigger-media-size, 1.5rem);
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
border-radius: var(--panneau-pill-trigger-media-radius, var(--panneau-radius-full));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.panneau-pill-trigger-sm .panneau-pill-trigger-media {
|
|
79
|
+
width: var(--panneau-pill-trigger-media-size-sm, 1.25rem);
|
|
80
|
+
height: var(--panneau-pill-trigger-media-size-sm, 1.25rem);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.panneau-pill-trigger-media > :is(img, svg, video, picture) {
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
object-fit: cover;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.panneau-pill-trigger-value {
|
|
90
|
+
flex: 0 1 auto;
|
|
91
|
+
min-width: 0;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.panneau-pill-trigger-chevron {
|
|
97
|
+
flex: 0 0 auto;
|
|
98
|
+
color: var(--panneau-color-text-muted);
|
|
99
|
+
transition: rotate var(--panneau-duration);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.panneau-pill-trigger[aria-expanded='true'] .panneau-pill-trigger-chevron {
|
|
103
|
+
rotate: 180deg;
|
|
104
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { type ButtonProps as AriaButtonProps } from 'react-aria-components';
|
|
3
|
+
export interface PillTriggerProps extends Omit<AriaButtonProps, 'className' | 'style' | 'children'> {
|
|
4
|
+
/** The current value, shown inline. */
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Leading media, such as an avatar or an image, clipped to a circle by default. */
|
|
7
|
+
media?: ReactNode;
|
|
8
|
+
/** Defaults to `md`, the height of a control. */
|
|
9
|
+
size?: 'sm' | 'md';
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A compact rounded button that shows a current value, with an optional leading media and a
|
|
15
|
+
* chevron: the trigger of a `Menu` (in a `MenuTrigger`) or a `Popover` (in a `PopoverTrigger`).
|
|
16
|
+
* Its accessible name is its value: give it an `aria-label` that contains the value when the
|
|
17
|
+
* value alone doesn't say what it picks.
|
|
18
|
+
*/
|
|
19
|
+
export declare function PillTrigger({ children, media, size, className, ...props }: PillTriggerProps): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=PillTrigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PillTrigger.d.ts","sourceRoot":"","sources":["../../src/pill-trigger/PillTrigger.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAwB,KAAK,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAMlG,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC1C,eAAe,EACf,WAAW,GAAG,OAAO,GAAG,UAAU,CACrC;IACG,uCAAuC;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oFAAoF;IACpF,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,iDAAiD;IACjD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EACxB,QAAQ,EACR,KAAK,EACL,IAAW,EACX,SAAS,EACT,GAAG,KAAK,EACX,EAAE,gBAAgB,+BAkBlB"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import { Icon } from "../icon/Icon.js";
|
|
3
|
+
import PillTrigger_module_default from "./PillTrigger.module.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { ChevronDown } from "lucide-react";
|
|
6
|
+
import { Button } from "react-aria-components";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/pill-trigger/PillTrigger.tsx
|
|
9
|
+
/**
|
|
10
|
+
* A compact rounded button that shows a current value, with an optional leading media and a
|
|
11
|
+
* chevron: the trigger of a `Menu` (in a `MenuTrigger`) or a `Popover` (in a `PopoverTrigger`).
|
|
12
|
+
* Its accessible name is its value: give it an `aria-label` that contains the value when the
|
|
13
|
+
* value alone doesn't say what it picks.
|
|
14
|
+
*/
|
|
15
|
+
function PillTrigger(t0) {
|
|
16
|
+
const $ = c(19);
|
|
17
|
+
let children;
|
|
18
|
+
let className;
|
|
19
|
+
let media;
|
|
20
|
+
let props;
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[0] !== t0) {
|
|
23
|
+
({children, media, size: t1, className, ...props} = t0);
|
|
24
|
+
$[0] = t0;
|
|
25
|
+
$[1] = children;
|
|
26
|
+
$[2] = className;
|
|
27
|
+
$[3] = media;
|
|
28
|
+
$[4] = props;
|
|
29
|
+
$[5] = t1;
|
|
30
|
+
} else {
|
|
31
|
+
children = $[1];
|
|
32
|
+
className = $[2];
|
|
33
|
+
media = $[3];
|
|
34
|
+
props = $[4];
|
|
35
|
+
t1 = $[5];
|
|
36
|
+
}
|
|
37
|
+
const t2 = (t1 === void 0 ? "md" : t1) === "sm" && PillTrigger_module_default.sm;
|
|
38
|
+
let t3;
|
|
39
|
+
if ($[6] !== className || $[7] !== t2) {
|
|
40
|
+
t3 = cx("panneau-pill-trigger", PillTrigger_module_default.pillTrigger, t2, className);
|
|
41
|
+
$[6] = className;
|
|
42
|
+
$[7] = t2;
|
|
43
|
+
$[8] = t3;
|
|
44
|
+
} else t3 = $[8];
|
|
45
|
+
let t4;
|
|
46
|
+
if ($[9] !== media) {
|
|
47
|
+
t4 = media !== void 0 && media !== null ? /* @__PURE__ */ jsx("span", {
|
|
48
|
+
className: PillTrigger_module_default.media,
|
|
49
|
+
children: media
|
|
50
|
+
}) : null;
|
|
51
|
+
$[9] = media;
|
|
52
|
+
$[10] = t4;
|
|
53
|
+
} else t4 = $[10];
|
|
54
|
+
let t5;
|
|
55
|
+
if ($[11] !== children) {
|
|
56
|
+
t5 = /* @__PURE__ */ jsx("span", {
|
|
57
|
+
className: PillTrigger_module_default.value,
|
|
58
|
+
children
|
|
59
|
+
});
|
|
60
|
+
$[11] = children;
|
|
61
|
+
$[12] = t5;
|
|
62
|
+
} else t5 = $[12];
|
|
63
|
+
let t6;
|
|
64
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
65
|
+
t6 = /* @__PURE__ */ jsx(Icon, {
|
|
66
|
+
icon: ChevronDown,
|
|
67
|
+
size: "sm",
|
|
68
|
+
className: PillTrigger_module_default.chevron
|
|
69
|
+
});
|
|
70
|
+
$[13] = t6;
|
|
71
|
+
} else t6 = $[13];
|
|
72
|
+
let t7;
|
|
73
|
+
if ($[14] !== props || $[15] !== t3 || $[16] !== t4 || $[17] !== t5) {
|
|
74
|
+
t7 = /* @__PURE__ */ jsxs(Button, {
|
|
75
|
+
...props,
|
|
76
|
+
className: t3,
|
|
77
|
+
children: [
|
|
78
|
+
t4,
|
|
79
|
+
t5,
|
|
80
|
+
t6
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
$[14] = props;
|
|
84
|
+
$[15] = t3;
|
|
85
|
+
$[16] = t4;
|
|
86
|
+
$[17] = t5;
|
|
87
|
+
$[18] = t7;
|
|
88
|
+
} else t7 = $[18];
|
|
89
|
+
return t7;
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
export { PillTrigger };
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=PillTrigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PillTrigger.js","names":["ChevronDown","CSSProperties","ReactNode","Button","AriaButton","ButtonProps","AriaButtonProps","Icon","cx","styles","PillTriggerProps","Omit","children","media","size","className","style","PillTrigger","t0","$","_c","props","t1","undefined","t2","sm","t3","pillTrigger","t4","t5","value","t6","Symbol","for","chevron","t7","_c","styles","AriaButton"],"sources":["../../src/pill-trigger/PillTrigger.tsx"],"sourcesContent":["import { ChevronDown } from 'lucide-react';\nimport type { CSSProperties, ReactNode } from 'react';\nimport { Button as AriaButton, type ButtonProps as AriaButtonProps } from 'react-aria-components';\n\nimport { Icon } from '../icon/Icon';\nimport { cx } from '../utils/cx';\nimport styles from './PillTrigger.module.css';\n\nexport interface PillTriggerProps extends Omit<\n AriaButtonProps,\n 'className' | 'style' | 'children'\n> {\n /** The current value, shown inline. */\n children?: ReactNode;\n /** Leading media, such as an avatar or an image, clipped to a circle by default. */\n media?: ReactNode;\n /** Defaults to `md`, the height of a control. */\n size?: 'sm' | 'md';\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * A compact rounded button that shows a current value, with an optional leading media and a\n * chevron: the trigger of a `Menu` (in a `MenuTrigger`) or a `Popover` (in a `PopoverTrigger`).\n * Its accessible name is its value: give it an `aria-label` that contains the value when the\n * value alone doesn't say what it picks.\n */\nexport function PillTrigger({\n children,\n media,\n size = 'md',\n className,\n ...props\n}: PillTriggerProps) {\n return (\n <AriaButton\n {...props}\n className={cx(\n 'panneau-pill-trigger',\n styles.pillTrigger,\n size === 'sm' && styles.sm,\n className,\n )}\n >\n {media !== undefined && media !== null ? (\n <span className={styles.media}>{media}</span>\n ) : null}\n <span className={styles.value}>{children}</span>\n <Icon icon={ChevronDown} size=\"sm\" className={styles.chevron} />\n </AriaButton>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA4BA,SAAOiB,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAR;CAAA,IAAAG;CAAA,IAAAF;CAAA,IAAAQ;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAqB,CAAA,CAAAN,UAAAC,OAAAC,MAAAQ,IAAAP,WAAA,GAAAM,SAAAH;EAMTC,EAAA,KAAAD;EAAAC,EAAA,KAAAP;EAAAO,EAAA,KAAAJ;EAAAI,EAAA,KAAAN;EAAAM,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAV,WAAAO,EAAA;EAAAJ,YAAAI,EAAA;EAAAN,QAAAM,EAAA;EAAAE,QAAAF,EAAA;EAAAG,KAAAH,EAAA;CAAA;CAOH,MAAAK,MAVZF,OAAAC,KAAAA,IAAA,OAAAD,QAUqB,QAAQb,2BAAMgB;CAAG,IAAAC;CAAA,IAAAP,EAAA,OAAAJ,aAAAI,EAAA,OAAAK,IAAA;EAHnBE,KAAAlB,GACP,wBACAC,2BAAMkB,aACNH,IACAT,SACJ;EAACI,EAAA,KAAAJ;EAAAI,EAAA,KAAAK;EAAAL,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAN,OAAA;EAEAe,KAAAf,UAAUU,KAAAA,KAAaV,UAAU,OAC9B,oBAAA,QAAA;GAAiB,WAAAJ,2BAAMI;GAASA,UAAAA;EAAa,CAAA,IADhD;EAEOM,EAAA,KAAAN;EAAAM,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,QAAAP,UAAA;EACRiB,KAAA,oBAAA,QAAA;GAAiB,WAAApB,2BAAMqB;GAASlB;EAAgB,CAAA;EAAAO,EAAA,MAAAP;EAAAO,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,QAAAa,OAAAC,IAAA,2BAAA,GAAA;EAChDF,KAAA,oBAAC,MAAD;GAAY/B,MAAAA;GAAkB,MAAA;GAAgB,WAAAS,2BAAMyB;EAAQ,CAAA;EAAIf,EAAA,MAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,IAAAgB;CAAA,IAAAhB,EAAA,QAAAE,SAAAF,EAAA,QAAAO,MAAAP,EAAA,QAAAS,MAAAT,EAAA,QAAAU,IAAA;EAbpEM,KAAA,qBAACG,QAAD;GAAW,GACHjB;GACO,WAAAK;GAFf,UAAA;IASKE;IAGDC;IACAE;GAbO;;EAcEZ,EAAA,MAAAE;EAAAF,EAAA,MAAAO;EAAAP,EAAA,MAAAS;EAAAT,EAAA,MAAAU;EAAAV,EAAA,MAAAgB;CAAA,OAAAA,KAAAhB,EAAA;CAAA,OAdbgB;AAca"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "./PillTrigger.css";
|
|
2
|
+
//#region src/pill-trigger/PillTrigger.module.css
|
|
3
|
+
var pillTrigger = "panneau-pill-trigger";
|
|
4
|
+
var media = "panneau-pill-trigger-media";
|
|
5
|
+
var sm = "panneau-pill-trigger-sm";
|
|
6
|
+
var value = "panneau-pill-trigger-value";
|
|
7
|
+
var chevron = "panneau-pill-trigger-chevron";
|
|
8
|
+
var PillTrigger_module_default = {
|
|
9
|
+
pillTrigger,
|
|
10
|
+
media,
|
|
11
|
+
sm,
|
|
12
|
+
value,
|
|
13
|
+
chevron
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { chevron, PillTrigger_module_default as default, media, pillTrigger, sm, value };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=PillTrigger.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PillTrigger.module.js","names":[],"sources":["../../src/pill-trigger/PillTrigger.module.css"],"sourcesContent":["/* A compact rounded button that shows a current value: the trigger of a menu or a popover. */\n\n.pillTrigger {\n display: inline-flex;\n flex: 0 1 auto;\n align-items: center;\n gap: var(--panneau-pill-trigger-gap, var(--panneau-space-2));\n max-width: 100%;\n min-height: var(--panneau-control-height);\n padding: 0 var(--panneau-pill-trigger-padding-x, var(--panneau-space-3));\n font-family: inherit;\n font-size: var(--panneau-pill-trigger-font-size, var(--panneau-font-size-md));\n font-weight: var(--panneau-pill-trigger-font-weight, var(--panneau-font-weight-medium));\n line-height: var(--panneau-line-height-tight);\n color: var(--panneau-pill-trigger-color, var(--panneau-color-text));\n text-align: start;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n background-color: var(--panneau-pill-trigger-bg, var(--panneau-color-surface-sunken));\n border: var(--panneau-border-width) solid var(--panneau-pill-trigger-border-color, transparent);\n border-radius: var(--panneau-pill-trigger-radius, var(--panneau-radius-full));\n transition: background-color var(--panneau-duration);\n -webkit-tap-highlight-color: transparent;\n}\n\n.pillTrigger[data-hovered],\n.pillTrigger[data-pressed],\n.pillTrigger[aria-expanded='true'] {\n background-color: var(\n --panneau-pill-trigger-bg-hover,\n color-mix(in srgb, var(--panneau-color-text) 8%, var(--panneau-color-surface-sunken))\n );\n}\n\n.pillTrigger[data-focus-visible] {\n outline: var(--panneau-focus-width) solid var(--panneau-color-focus);\n outline-offset: 2px;\n}\n\n.pillTrigger[data-disabled] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n/* With media, the media sits as far from the start as from the top and the bottom. */\n.pillTrigger:has(.media) {\n padding-inline-start: calc(\n (var(--panneau-control-height) - var(--panneau-pill-trigger-media-size, 1.5rem)) / 2 -\n var(--panneau-border-width)\n );\n}\n\n.sm {\n min-height: var(--panneau-control-height-sm);\n padding: 0 var(--panneau-pill-trigger-padding-x-sm, var(--panneau-space-2));\n font-size: var(--panneau-pill-trigger-font-size-sm, var(--panneau-font-size-sm));\n}\n\n.sm:has(.media) {\n padding-inline-start: calc(\n (var(--panneau-control-height-sm) - var(--panneau-pill-trigger-media-size-sm, 1.25rem)) /\n 2 - var(--panneau-border-width)\n );\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-pill-trigger-media-size, 1.5rem);\n height: var(--panneau-pill-trigger-media-size, 1.5rem);\n overflow: hidden;\n border-radius: var(--panneau-pill-trigger-media-radius, var(--panneau-radius-full));\n}\n\n.sm .media {\n width: var(--panneau-pill-trigger-media-size-sm, 1.25rem);\n height: var(--panneau-pill-trigger-media-size-sm, 1.25rem);\n}\n\n.media > :is(img, svg, video, picture) {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.value {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.chevron {\n flex: 0 0 auto;\n color: var(--panneau-color-text-muted);\n transition: rotate var(--panneau-duration);\n}\n\n.pillTrigger[aria-expanded='true'] .chevron {\n rotate: 180deg;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of PillTrigger. */
|
|
2
|
+
export declare const pillTriggerTokens: import("../index.js").ComponentTokens<"pill-trigger", "panneau-pill-trigger-color" | "panneau-pill-trigger-radius" | "panneau-pill-trigger-gap" | "panneau-pill-trigger-padding-x" | "panneau-pill-trigger-font-size" | "panneau-pill-trigger-font-weight" | "panneau-pill-trigger-padding-x-sm" | "panneau-pill-trigger-font-size-sm" | "panneau-pill-trigger-bg" | "panneau-pill-trigger-border-color" | "panneau-pill-trigger-media-size" | "panneau-pill-trigger-media-radius" | "panneau-pill-trigger-bg-hover" | "panneau-pill-trigger-media-size-sm">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/pill-trigger/tokens.ts"],"names":[],"mappings":"AAEA,6BAA6B;AAC7B,eAAO,MAAM,iBAAiB,qhBA8B5B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/pill-trigger/tokens.ts
|
|
3
|
+
/** Tokens of PillTrigger. */
|
|
4
|
+
var pillTriggerTokens = defineComponentTokens("pill-trigger", {
|
|
5
|
+
/** Background. */
|
|
6
|
+
bg: "var(--panneau-color-surface-sunken)",
|
|
7
|
+
/** Background of a hovered, pressed or open trigger. */
|
|
8
|
+
"bg-hover": "color-mix(in srgb, var(--panneau-color-text) 8%, var(--panneau-color-surface-sunken))",
|
|
9
|
+
/** Color of the value. */
|
|
10
|
+
color: "var(--panneau-color-text)",
|
|
11
|
+
/** Color of the border: none by default. */
|
|
12
|
+
"border-color": "transparent",
|
|
13
|
+
/** Corner radius. */
|
|
14
|
+
radius: "var(--panneau-radius-full)",
|
|
15
|
+
/** Space between the media, the value and the chevron. */
|
|
16
|
+
gap: "var(--panneau-space-2)",
|
|
17
|
+
/** Horizontal padding. */
|
|
18
|
+
"padding-x": "var(--panneau-space-3)",
|
|
19
|
+
/** Horizontal padding of the small size. */
|
|
20
|
+
"padding-x-sm": "var(--panneau-space-2)",
|
|
21
|
+
/** Font size of the value. */
|
|
22
|
+
"font-size": "var(--panneau-font-size-md)",
|
|
23
|
+
/** Font size of the value, small size. */
|
|
24
|
+
"font-size-sm": "var(--panneau-font-size-sm)",
|
|
25
|
+
/** Font weight of the value. */
|
|
26
|
+
"font-weight": "var(--panneau-font-weight-medium)",
|
|
27
|
+
/** Size of the leading media. */
|
|
28
|
+
"media-size": "1.5rem",
|
|
29
|
+
/** Size of the leading media, small size. */
|
|
30
|
+
"media-size-sm": "1.25rem",
|
|
31
|
+
/** Corner radius of the leading media: its content is clipped to it. */
|
|
32
|
+
"media-radius": "var(--panneau-radius-full)"
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { pillTriggerTokens };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","pillTriggerTokens","bg","color","radius","gap"],"sources":["../../src/pill-trigger/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of PillTrigger. */\nexport const pillTriggerTokens = defineComponentTokens('pill-trigger', {\n /** Background. */\n bg: 'var(--panneau-color-surface-sunken)',\n /** Background of a hovered, pressed or open trigger. */\n 'bg-hover':\n 'color-mix(in srgb, var(--panneau-color-text) 8%, var(--panneau-color-surface-sunken))',\n /** Color of the value. */\n color: 'var(--panneau-color-text)',\n /** Color of the border: none by default. */\n 'border-color': 'transparent',\n /** Corner radius. */\n radius: 'var(--panneau-radius-full)',\n /** Space between the media, the value and the chevron. */\n gap: 'var(--panneau-space-2)',\n /** Horizontal padding. */\n 'padding-x': 'var(--panneau-space-3)',\n /** Horizontal padding of the small size. */\n 'padding-x-sm': 'var(--panneau-space-2)',\n /** Font size of the value. */\n 'font-size': 'var(--panneau-font-size-md)',\n /** Font size of the value, small size. */\n 'font-size-sm': 'var(--panneau-font-size-sm)',\n /** Font weight of the value. */\n 'font-weight': 'var(--panneau-font-weight-medium)',\n /** Size of the leading media. */\n 'media-size': '1.5rem',\n /** Size of the leading media, small size. */\n 'media-size-sm': '1.25rem',\n /** Corner radius of the leading media: its content is clipped to it. */\n 'media-radius': 'var(--panneau-radius-full)',\n});\n"],"mappings":";;;AAGA,IAAaC,oBAAoBD,sBAAsB,gBAAgB;;CAEnEE,IAAI;;CAEJ,YACI;;CAEJC,OAAO;;CAEP,gBAAgB;;CAEhBC,QAAQ;;CAERC,KAAK;;CAEL,aAAa;;CAEb,gBAAgB;;CAEhB,aAAa;;CAEb,gBAAgB;;CAEhB,eAAe;;CAEf,cAAc;;CAEd,iBAAiB;;CAEjB,gBAAgB;AACpB,CAAC"}
|
package/dist/popover/Popover.css
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
.panneau-popover
|
|
1
|
+
.panneau-popover {
|
|
2
2
|
min-width: var(--trigger-width, 10rem);
|
|
3
3
|
max-width: calc(100vw - 2 * var(--panneau-space-4));
|
|
4
4
|
color: var(--panneau-color-text);
|
|
5
|
-
background-color: var(--panneau-color-surface-raised);
|
|
6
|
-
border: var(--panneau-border-width) solid
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
background-color: var(--panneau-popover-bg, var(--panneau-color-surface-raised));
|
|
6
|
+
border: var(--panneau-border-width) solid
|
|
7
|
+
var(--panneau-popover-border-color, var(--panneau-color-border));
|
|
8
|
+
border-radius: var(--panneau-popover-radius, var(--panneau-radius-lg));
|
|
9
|
+
box-shadow: var(--panneau-popover-shadow, var(--panneau-shadow-lg));
|
|
9
10
|
outline: none;
|
|
10
11
|
overflow: auto;
|
|
11
12
|
z-index: var(--panneau-z-overlay);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
.panneau-popover
|
|
15
|
-
animation: panneau-pop
|
|
15
|
+
.panneau-popover[data-entering] {
|
|
16
|
+
animation: panneau-popover-pop var(--panneau-duration) ease-out;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
.panneau-popover
|
|
19
|
-
animation: panneau-pop
|
|
19
|
+
.panneau-popover[data-exiting] {
|
|
20
|
+
animation: panneau-popover-pop var(--panneau-duration) ease-in reverse;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
.panneau-dialog
|
|
23
|
-
padding: var(--panneau-space-3);
|
|
23
|
+
.panneau-popover-dialog {
|
|
24
|
+
padding: var(--panneau-popover-padding, var(--panneau-space-3));
|
|
24
25
|
outline: none;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
@keyframes panneau-pop
|
|
28
|
+
@keyframes panneau-popover-pop {
|
|
28
29
|
from {
|
|
29
30
|
opacity: 0;
|
|
30
31
|
transform: scale(0.97);
|
|
31
32
|
}
|
|
32
33
|
}
|
|
34
|
+
|
|
35
|
+
/* Stops the events that React bubbles out of the overlay, without a box of its own. */
|
|
36
|
+
.panneau-popover-boundary {
|
|
37
|
+
display: contents;
|
|
38
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEH,KAAK,YAAY,IAAI,gBAAgB,EAExC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEH,KAAK,YAAY,IAAI,gBAAgB,EAExC,MAAM,uBAAuB,CAAC;AAO/B,MAAM,WAAW,YAAa,SAAQ,IAAI,CACtC,gBAAgB,EAChB,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,0BAA0B,CAClE;IACG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACpB,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,eAAe,EACf,MAAU,EACV,GAAG,KAAK,EACX,EAAE,YAAY,sCAoBd;AAED,qEAAqE;AACrE,wBAAgB,cAAc,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,MAAU,EACV,GAAG,KAAK,EACX,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,iBAAiB,CAAC,sCAetD;AAED,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/popover/Popover.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import { usePortalContainer } from "../root/PanneauRoot.js";
|
|
3
|
+
import { stopPropagation } from "../utils/events.js";
|
|
3
4
|
import Popover_module_default from "./Popover.module.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
4
6
|
import { Dialog, DialogTrigger as PopoverTrigger, Popover } from "react-aria-components";
|
|
5
7
|
import { jsx } from "react/jsx-runtime";
|
|
6
8
|
//#region src/popover/Popover.tsx
|
|
@@ -8,32 +10,126 @@ import { jsx } from "react/jsx-runtime";
|
|
|
8
10
|
* A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its
|
|
9
11
|
* content is a non-modal dialog: focus moves into it and comes back to the button when it closes.
|
|
10
12
|
*/
|
|
11
|
-
function Popover$1(
|
|
13
|
+
function Popover$1(t0) {
|
|
14
|
+
const $ = c(21);
|
|
15
|
+
let ariaLabel;
|
|
16
|
+
let children;
|
|
17
|
+
let className;
|
|
18
|
+
let dialogClassName;
|
|
19
|
+
let props;
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[0] !== t0) {
|
|
22
|
+
({children, "aria-label": ariaLabel, className, dialogClassName, offset: t1, ...props} = t0);
|
|
23
|
+
$[0] = t0;
|
|
24
|
+
$[1] = ariaLabel;
|
|
25
|
+
$[2] = children;
|
|
26
|
+
$[3] = className;
|
|
27
|
+
$[4] = dialogClassName;
|
|
28
|
+
$[5] = props;
|
|
29
|
+
$[6] = t1;
|
|
30
|
+
} else {
|
|
31
|
+
ariaLabel = $[1];
|
|
32
|
+
children = $[2];
|
|
33
|
+
className = $[3];
|
|
34
|
+
dialogClassName = $[4];
|
|
35
|
+
props = $[5];
|
|
36
|
+
t1 = $[6];
|
|
37
|
+
}
|
|
38
|
+
const offset = t1 === void 0 ? 6 : t1;
|
|
12
39
|
const container = usePortalContainer();
|
|
13
40
|
if (container === null) return null;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
41
|
+
let t2;
|
|
42
|
+
if ($[7] !== className) {
|
|
43
|
+
t2 = cx("panneau-popover", Popover_module_default.popover, className);
|
|
44
|
+
$[7] = className;
|
|
45
|
+
$[8] = t2;
|
|
46
|
+
} else t2 = $[8];
|
|
47
|
+
let t3;
|
|
48
|
+
if ($[9] !== dialogClassName) {
|
|
49
|
+
t3 = cx(Popover_module_default.dialog, dialogClassName);
|
|
50
|
+
$[9] = dialogClassName;
|
|
51
|
+
$[10] = t3;
|
|
52
|
+
} else t3 = $[10];
|
|
53
|
+
let t4;
|
|
54
|
+
if ($[11] !== ariaLabel || $[12] !== children || $[13] !== t3) {
|
|
55
|
+
t4 = /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: Popover_module_default.boundary,
|
|
57
|
+
onSubmit: stopPropagation,
|
|
58
|
+
children: /* @__PURE__ */ jsx(Dialog, {
|
|
59
|
+
"aria-label": ariaLabel,
|
|
60
|
+
className: t3,
|
|
61
|
+
children
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
$[11] = ariaLabel;
|
|
65
|
+
$[12] = children;
|
|
66
|
+
$[13] = t3;
|
|
67
|
+
$[14] = t4;
|
|
68
|
+
} else t4 = $[14];
|
|
69
|
+
let t5;
|
|
70
|
+
if ($[15] !== container || $[16] !== offset || $[17] !== props || $[18] !== t2 || $[19] !== t4) {
|
|
71
|
+
t5 = /* @__PURE__ */ jsx(Popover, {
|
|
72
|
+
...props,
|
|
73
|
+
offset,
|
|
74
|
+
className: t2,
|
|
75
|
+
UNSTABLE_portalContainer: container,
|
|
76
|
+
children: t4
|
|
77
|
+
});
|
|
78
|
+
$[15] = container;
|
|
79
|
+
$[16] = offset;
|
|
80
|
+
$[17] = props;
|
|
81
|
+
$[18] = t2;
|
|
82
|
+
$[19] = t4;
|
|
83
|
+
$[20] = t5;
|
|
84
|
+
} else t5 = $[20];
|
|
85
|
+
return t5;
|
|
25
86
|
}
|
|
26
87
|
/** The popover surface without a dialog, for listboxes and menus. */
|
|
27
|
-
function PopoverSurface(
|
|
88
|
+
function PopoverSurface(t0) {
|
|
89
|
+
const $ = c(13);
|
|
90
|
+
let children;
|
|
91
|
+
let className;
|
|
92
|
+
let props;
|
|
93
|
+
let t1;
|
|
94
|
+
if ($[0] !== t0) {
|
|
95
|
+
({children, className, offset: t1, ...props} = t0);
|
|
96
|
+
$[0] = t0;
|
|
97
|
+
$[1] = children;
|
|
98
|
+
$[2] = className;
|
|
99
|
+
$[3] = props;
|
|
100
|
+
$[4] = t1;
|
|
101
|
+
} else {
|
|
102
|
+
children = $[1];
|
|
103
|
+
className = $[2];
|
|
104
|
+
props = $[3];
|
|
105
|
+
t1 = $[4];
|
|
106
|
+
}
|
|
107
|
+
const offset = t1 === void 0 ? 6 : t1;
|
|
28
108
|
const container = usePortalContainer();
|
|
29
109
|
if (container === null) return null;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
110
|
+
let t2;
|
|
111
|
+
if ($[5] !== className) {
|
|
112
|
+
t2 = cx("panneau-popover", Popover_module_default.popover, className);
|
|
113
|
+
$[5] = className;
|
|
114
|
+
$[6] = t2;
|
|
115
|
+
} else t2 = $[6];
|
|
116
|
+
let t3;
|
|
117
|
+
if ($[7] !== children || $[8] !== container || $[9] !== offset || $[10] !== props || $[11] !== t2) {
|
|
118
|
+
t3 = /* @__PURE__ */ jsx(Popover, {
|
|
119
|
+
...props,
|
|
120
|
+
offset,
|
|
121
|
+
className: t2,
|
|
122
|
+
UNSTABLE_portalContainer: container,
|
|
123
|
+
children
|
|
124
|
+
});
|
|
125
|
+
$[7] = children;
|
|
126
|
+
$[8] = container;
|
|
127
|
+
$[9] = offset;
|
|
128
|
+
$[10] = props;
|
|
129
|
+
$[11] = t2;
|
|
130
|
+
$[12] = t3;
|
|
131
|
+
} else t3 = $[12];
|
|
132
|
+
return t3;
|
|
37
133
|
}
|
|
38
134
|
//#endregion
|
|
39
135
|
export { Popover$1 as Popover, PopoverSurface, PopoverTrigger };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","names":["Popover","AriaPopover","styles"],"sources":["../../src/popover/Popover.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Popover as AriaPopover,\n type PopoverProps as AriaPopoverProps,\n Dialog,\n} from 'react-aria-components';\n\nimport { usePortalContainer } from '../root/PanneauRoot';\nimport { cx } from '../utils/cx';\nimport styles from './Popover.module.css';\n\nexport interface PopoverProps extends Omit<\n AriaPopoverProps,\n 'className' | 'style' | 'children' | 'UNSTABLE_portalContainer'\n> {\n children?: ReactNode;\n /** Accessible label of the popover's dialog, when it has no heading. */\n 'aria-label'?: string;\n className?: string;\n dialogClassName?: string;\n}\n\n/**\n * A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its\n * content is a non-modal dialog: focus moves into it and comes back to the button when it closes.\n */\nexport function Popover({\n children,\n 'aria-label': ariaLabel,\n className,\n dialogClassName,\n offset = 6,\n ...props\n}: PopoverProps) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx(styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n <Dialog aria-label={ariaLabel} className={cx(styles.dialog, dialogClassName)}>\n
|
|
1
|
+
{"version":3,"file":"Popover.js","names":["ReactNode","Popover","AriaPopover","PopoverProps","AriaPopoverProps","Dialog","usePortalContainer","cx","stopPropagation","styles","Omit","children","className","dialogClassName","t0","$","_c","ariaLabel","props","t1","offset","undefined","container","t2","popover","t3","dialog","t4","boundary","t5","PopoverSurface","DialogTrigger","PopoverTrigger","Popover","_c","styles","AriaPopover"],"sources":["../../src/popover/Popover.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Popover as AriaPopover,\n type PopoverProps as AriaPopoverProps,\n Dialog,\n} from 'react-aria-components';\n\nimport { usePortalContainer } from '../root/PanneauRoot';\nimport { cx } from '../utils/cx';\nimport { stopPropagation } from '../utils/events';\nimport styles from './Popover.module.css';\n\nexport interface PopoverProps extends Omit<\n AriaPopoverProps,\n 'className' | 'style' | 'children' | 'UNSTABLE_portalContainer'\n> {\n children?: ReactNode;\n /** Accessible label of the popover's dialog, when it has no heading. */\n 'aria-label'?: string;\n className?: string;\n dialogClassName?: string;\n}\n\n/**\n * A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its\n * content is a non-modal dialog: focus moves into it and comes back to the button when it closes.\n */\nexport function Popover({\n children,\n 'aria-label': ariaLabel,\n className,\n dialogClassName,\n offset = 6,\n ...props\n}: PopoverProps) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx('panneau-popover', styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n {/* Like a dialog: a form in the popover doesn't submit a form around it (#146). */}\n <div className={styles.boundary} onSubmit={stopPropagation}>\n <Dialog aria-label={ariaLabel} className={cx(styles.dialog, dialogClassName)}>\n {children}\n </Dialog>\n </div>\n </AriaPopover>\n );\n}\n\n/** The popover surface without a dialog, for listboxes and menus. */\nexport function PopoverSurface({\n children,\n className,\n offset = 6,\n ...props\n}: Omit<PopoverProps, 'aria-label' | 'dialogClassName'>) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx('panneau-popover', styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n {children}\n </AriaPopover>\n );\n}\n\nexport { DialogTrigger as PopoverTrigger } from 'react-aria-components';\n"],"mappings":";;;;;;;;;;;;AA2BA,SAAOC,UAAAa,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAN;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAiB,CAAA,CAAAH,UAAA,cAAAM,WAAAL,WAAAC,iBAAAO,QAAAD,IAAA,GAAAD,SAAAJ;EAOTC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAJ;EAAAI,EAAA,KAAAH;EAAAG,EAAA,KAAAF;EAAAE,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAF,YAAAF,EAAA;EAAAJ,WAAAI,EAAA;EAAAH,YAAAG,EAAA;EAAAF,kBAAAE,EAAA;EAAAG,QAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAFX,MAAAK,SAAAD,OAAAE,KAAAA,IAAA,IAAAF;CAGA,MAAAG,YAAkBhB,mBAAmB;CACrC,IAAIgB,cAAc,MAAI,OACX;CACV,IAAAC;CAAA,IAAAR,EAAA,OAAAH,WAAA;EAKkBW,KAAAhB,GAAG,mBAAmBE,uBAAMe,SAAUZ,SAAS;EAACG,EAAA,KAAAH;EAAAG,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAF,iBAAA;EAKbY,KAAAlB,GAAGE,uBAAMiB,QAASb,eAAe;EAACE,EAAA,KAAAF;EAAAE,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,QAAAE,aAAAF,EAAA,QAAAJ,YAAAI,EAAA,QAAAU,IAAA;EADhFE,KAAA,oBAAA,OAAA;GAAgB,WAAAlB,uBAAMmB;GAAqBpB,UAAAA;GACvC,UAAA,oBAAC,QAAD;IAAoBS,cAAAA;IAAsB,WAAAQ;IACrCd;GADE,CAAA;EAGL,CAAA;EAAAI,EAAA,MAAAE;EAAAF,EAAA,MAAAJ;EAAAI,EAAA,MAAAU;EAAAV,EAAA,MAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,IAAAc;CAAA,IAAAd,EAAA,QAAAO,aAAAP,EAAA,QAAAK,UAAAL,EAAA,QAAAG,SAAAH,EAAA,QAAAQ,MAAAR,EAAA,QAAAY,IAAA;EAXVE,KAAA,oBAACO,SAAD;GAAY,GACJlB;GACIE;GACG,WAAAG;GACeD,0BAAAA;GAG1BK,UAAAA;EAPQ,CAAA;EAYEZ,EAAA,MAAAO;EAAAP,EAAA,MAAAK;EAAAL,EAAA,MAAAG;EAAAH,EAAA,MAAAQ;EAAAR,EAAA,MAAAY;EAAAZ,EAAA,MAAAc;CAAA,OAAAA,KAAAd,EAAA;CAAA,OAZdc;AAYc;;AAKtB,SAAOC,eAAAhB,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAL;CAAA,IAAAC;CAAA,IAAAM;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAwB,CAAA,CAAAH,UAAAC,WAAAQ,QAAAD,IAAA,GAAAD,SAAAJ;EAKwBC,EAAA,KAAAD;EAAAC,EAAA,KAAAJ;EAAAI,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAR,WAAAI,EAAA;EAAAH,YAAAG,EAAA;EAAAG,QAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAFnD,MAAAK,SAAAD,OAAAE,KAAAA,IAAA,IAAAF;CAGA,MAAAG,YAAkBhB,mBAAmB;CACrC,IAAIgB,cAAc,MAAI,OACX;CACV,IAAAC;CAAA,IAAAR,EAAA,OAAAH,WAAA;EAKkBW,KAAAhB,GAAG,mBAAmBE,uBAAMe,SAAUZ,SAAS;EAACG,EAAA,KAAAH;EAAAG,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAJ,YAAAI,EAAA,OAAAO,aAAAP,EAAA,OAAAK,UAAAL,EAAA,QAAAG,SAAAH,EAAA,QAAAQ,IAAA;EAH/DE,KAAA,oBAACW,SAAD;GAAY,GACJlB;GACIE;GACG,WAAAG;GACeD,0BAAAA;GAEzBX;EANO,CAAA;EAOEI,EAAA,KAAAJ;EAAAI,EAAA,KAAAO;EAAAP,EAAA,KAAAK;EAAAL,EAAA,MAAAG;EAAAH,EAAA,MAAAQ;EAAAR,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OAPdU;AAOc"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import "./Popover.css";
|
|
2
2
|
//#region src/popover/Popover.module.css
|
|
3
|
-
var popover = "panneau-popover
|
|
4
|
-
var pop = "panneau-pop
|
|
5
|
-
var dialog = "panneau-dialog
|
|
3
|
+
var popover = "panneau-popover";
|
|
4
|
+
var pop = "panneau-popover-pop";
|
|
5
|
+
var dialog = "panneau-popover-dialog";
|
|
6
|
+
var boundary = "panneau-popover-boundary";
|
|
6
7
|
var Popover_module_default = {
|
|
7
8
|
popover,
|
|
8
9
|
pop,
|
|
9
|
-
dialog
|
|
10
|
+
dialog,
|
|
11
|
+
boundary
|
|
10
12
|
};
|
|
11
13
|
//#endregion
|
|
12
|
-
export { Popover_module_default as default, dialog, pop, popover };
|
|
14
|
+
export { boundary, Popover_module_default as default, dialog, pop, popover };
|
|
13
15
|
|
|
14
16
|
//# sourceMappingURL=Popover.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.module.js","names":[],"sources":["../../src/popover/Popover.module.css"],"sourcesContent":[".popover {\n min-width: var(--trigger-width, 10rem);\n max-width: calc(100vw - 2 * var(--panneau-space-4));\n color: var(--panneau-color-text);\n background-color: var(--panneau-color-surface-raised);\n border: var(--panneau-border-width) solid var(--panneau-color-border);\n border-radius: var(--panneau-radius-lg);\n box-shadow: var(--panneau-shadow-lg);\n outline: none;\n overflow: auto;\n z-index: var(--panneau-z-overlay);\n}\n\n.popover[data-entering] {\n animation: pop var(--panneau-duration) ease-out;\n}\n\n.popover[data-exiting] {\n animation: pop var(--panneau-duration) ease-in reverse;\n}\n\n.dialog {\n padding: var(--panneau-space-3);\n outline: none;\n}\n\n@keyframes pop {\n from {\n opacity: 0;\n transform: scale(0.97);\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Popover.module.js","names":[],"sources":["../../src/popover/Popover.module.css"],"sourcesContent":[".popover {\n min-width: var(--trigger-width, 10rem);\n max-width: calc(100vw - 2 * var(--panneau-space-4));\n color: var(--panneau-color-text);\n background-color: var(--panneau-popover-bg, var(--panneau-color-surface-raised));\n border: var(--panneau-border-width) solid\n var(--panneau-popover-border-color, var(--panneau-color-border));\n border-radius: var(--panneau-popover-radius, var(--panneau-radius-lg));\n box-shadow: var(--panneau-popover-shadow, var(--panneau-shadow-lg));\n outline: none;\n overflow: auto;\n z-index: var(--panneau-z-overlay);\n}\n\n.popover[data-entering] {\n animation: pop var(--panneau-duration) ease-out;\n}\n\n.popover[data-exiting] {\n animation: pop var(--panneau-duration) ease-in reverse;\n}\n\n.dialog {\n padding: var(--panneau-popover-padding, var(--panneau-space-3));\n outline: none;\n}\n\n@keyframes pop {\n from {\n opacity: 0;\n transform: scale(0.97);\n }\n}\n\n/* Stops the events that React bubbles out of the overlay, without a box of its own. */\n.boundary {\n display: contents;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of Popover. */
|
|
2
|
+
export declare const popoverTokens: import("../index.js").ComponentTokens<"popover", "panneau-popover-radius" | "panneau-popover-padding" | "panneau-popover-bg" | "panneau-popover-border-color" | "panneau-popover-shadow">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/popover/tokens.ts"],"names":[],"mappings":"AAEA,yBAAyB;AACzB,eAAO,MAAM,aAAa,kLAWxB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/popover/tokens.ts
|
|
3
|
+
/** Tokens of Popover. */
|
|
4
|
+
var popoverTokens = defineComponentTokens("popover", {
|
|
5
|
+
/** Background. */
|
|
6
|
+
bg: "var(--panneau-color-surface-raised)",
|
|
7
|
+
/** Border color. */
|
|
8
|
+
"border-color": "var(--panneau-color-border)",
|
|
9
|
+
/** Corner radius. */
|
|
10
|
+
radius: "var(--panneau-radius-lg)",
|
|
11
|
+
/** Shadow. */
|
|
12
|
+
shadow: "var(--panneau-shadow-lg)",
|
|
13
|
+
/** Padding of the content. */
|
|
14
|
+
padding: "var(--panneau-space-3)"
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { popoverTokens };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","popoverTokens","bg","radius","shadow","padding"],"sources":["../../src/popover/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Popover. */\nexport const popoverTokens = defineComponentTokens('popover', {\n /** Background. */\n bg: 'var(--panneau-color-surface-raised)',\n /** Border color. */\n 'border-color': 'var(--panneau-color-border)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-lg)',\n /** Shadow. */\n shadow: 'var(--panneau-shadow-lg)',\n /** Padding of the content. */\n padding: 'var(--panneau-space-3)',\n});\n"],"mappings":";;;AAGA,IAAaC,gBAAgBD,sBAAsB,WAAW;;CAE1DE,IAAI;;CAEJ,gBAAgB;;CAEhBC,QAAQ;;CAERC,QAAQ;;CAERC,SAAS;AACb,CAAC"}
|