@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,74 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import { justification, responsiveVariables, space, withVariables } from "../layout/responsive.js";
|
|
3
|
+
import Stack_module_default from "./Stack.module.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/stack/Stack.tsx
|
|
7
|
+
/** Items one under the other, with space between them, like Bootstrap's `.vstack`. */
|
|
8
|
+
function Stack(t0) {
|
|
9
|
+
const $ = c(20);
|
|
10
|
+
let align;
|
|
11
|
+
let className;
|
|
12
|
+
let gap;
|
|
13
|
+
let justify;
|
|
14
|
+
let props;
|
|
15
|
+
let style;
|
|
16
|
+
let t1;
|
|
17
|
+
if ($[0] !== t0) {
|
|
18
|
+
({as: t1, gap, align, justify, className, style, ...props} = t0);
|
|
19
|
+
$[0] = t0;
|
|
20
|
+
$[1] = align;
|
|
21
|
+
$[2] = className;
|
|
22
|
+
$[3] = gap;
|
|
23
|
+
$[4] = justify;
|
|
24
|
+
$[5] = props;
|
|
25
|
+
$[6] = style;
|
|
26
|
+
$[7] = t1;
|
|
27
|
+
} else {
|
|
28
|
+
align = $[1];
|
|
29
|
+
className = $[2];
|
|
30
|
+
gap = $[3];
|
|
31
|
+
justify = $[4];
|
|
32
|
+
props = $[5];
|
|
33
|
+
style = $[6];
|
|
34
|
+
t1 = $[7];
|
|
35
|
+
}
|
|
36
|
+
const Element = t1 === void 0 ? "div" : t1;
|
|
37
|
+
let t2;
|
|
38
|
+
if ($[8] !== className) {
|
|
39
|
+
t2 = cx("panneau-stack", Stack_module_default.stack, className);
|
|
40
|
+
$[8] = className;
|
|
41
|
+
$[9] = t2;
|
|
42
|
+
} else t2 = $[9];
|
|
43
|
+
let t3;
|
|
44
|
+
if ($[10] !== align || $[11] !== gap || $[12] !== justify || $[13] !== style) {
|
|
45
|
+
t3 = withVariables([
|
|
46
|
+
responsiveVariables("stack", "gap", gap, space),
|
|
47
|
+
responsiveVariables("stack", "align", align, String),
|
|
48
|
+
responsiveVariables("stack", "justify", justify, justification)
|
|
49
|
+
], style);
|
|
50
|
+
$[10] = align;
|
|
51
|
+
$[11] = gap;
|
|
52
|
+
$[12] = justify;
|
|
53
|
+
$[13] = style;
|
|
54
|
+
$[14] = t3;
|
|
55
|
+
} else t3 = $[14];
|
|
56
|
+
let t4;
|
|
57
|
+
if ($[15] !== Element || $[16] !== props || $[17] !== t2 || $[18] !== t3) {
|
|
58
|
+
t4 = /* @__PURE__ */ jsx(Element, {
|
|
59
|
+
...props,
|
|
60
|
+
className: t2,
|
|
61
|
+
style: t3
|
|
62
|
+
});
|
|
63
|
+
$[15] = Element;
|
|
64
|
+
$[16] = props;
|
|
65
|
+
$[17] = t2;
|
|
66
|
+
$[18] = t3;
|
|
67
|
+
$[19] = t4;
|
|
68
|
+
} else t4 = $[19];
|
|
69
|
+
return t4;
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { Stack };
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=Stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.js","names":["HTMLAttributes","Justification","Responsive","Space","justification","responsiveVariables","space","withVariables","cx","styles","StackProps","HTMLElement","as","gap","align","justify","Stack","t0","$","_c","className","props","style","t1","Element","undefined","t2","stack","t3","String","t4","_c","styles"],"sources":["../../src/stack/Stack.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport {\n type Justification,\n type Responsive,\n type Space,\n justification,\n responsiveVariables,\n space,\n withVariables,\n} from '../layout/responsive';\nimport { cx } from '../utils/cx';\nimport styles from './Stack.module.css';\n\nexport interface StackProps extends HTMLAttributes<HTMLElement> {\n /** Element to render. Defaults to `div`. */\n as?:\n | 'div'\n | 'section'\n | 'article'\n | 'aside'\n | 'header'\n | 'footer'\n | 'nav'\n | 'main'\n | 'ul'\n | 'ol'\n | 'form';\n /** Space between items, from the space scale. Defaults to the `--panneau-stack-gap` token. */\n gap?: Responsive<Space>;\n /** Horizontal alignment of the items. Defaults to `stretch`. */\n align?: Responsive<'start' | 'center' | 'end' | 'stretch'>;\n /** Vertical distribution of the items, when the stack is taller than them. Defaults to `start`. */\n justify?: Responsive<Justification>;\n}\n\n/** Items one under the other, with space between them, like Bootstrap's `.vstack`. */\nexport function Stack({\n as: Element = 'div',\n gap,\n align,\n justify,\n className,\n style,\n ...props\n}: StackProps) {\n return (\n <Element\n {...props}\n className={cx('panneau-stack', styles.stack, className)}\n style={withVariables(\n [\n responsiveVariables('stack', 'gap', gap, space),\n responsiveVariables('stack', 'align', align, String),\n responsiveVariables('stack', 'justify', justify, justification),\n ],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U;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,QAAAM,WAAAN,EAAA,QAAAG,SAAAH,EAAA,QAAAQ,MAAAR,EAAA,QAAAU,IAAA;EAVLE,KAAA,oBAAC,SAAD;GAAQ,GACAT;GACO,WAAAK;GACJ,OAAAE;EAON,CAAA;EACHV,EAAA,MAAAM;EAAAN,EAAA,MAAAG;EAAAH,EAAA,MAAAQ;EAAAR,EAAA,MAAAU;EAAAV,EAAA,MAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OAXFY;AAWE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.module.js","names":[],"sources":["../../src/stack/Stack.module.css"],"sourcesContent":["/* A vertical stack: each prop can change at the breakpoints of the nearest container. */\n\n.stack {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n/* Responsive values are set inline; children reset them so that they aren't inherited. */\n.stack > * {\n --_panneau-stack-gap-base: initial;\n --_panneau-stack-gap-sm: initial;\n --_panneau-stack-gap-md: initial;\n --_panneau-stack-gap-lg: initial;\n --_panneau-stack-gap-xl: initial;\n --_panneau-stack-align-base: initial;\n --_panneau-stack-align-sm: initial;\n --_panneau-stack-align-md: initial;\n --_panneau-stack-align-lg: initial;\n --_panneau-stack-align-xl: initial;\n --_panneau-stack-justify-base: initial;\n --_panneau-stack-justify-sm: initial;\n --_panneau-stack-justify-md: initial;\n --_panneau-stack-justify-lg: initial;\n --_panneau-stack-justify-xl: initial;\n}\n\n.stack {\n gap: var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)));\n align-items: var(--_panneau-stack-align-base, stretch);\n justify-content: var(--_panneau-stack-justify-base, start);\n}\n\n@container (min-width: 40rem) {\n .stack {\n gap: var(\n --_panneau-stack-gap-sm,\n var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)))\n );\n align-items: var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch));\n justify-content: var(\n --_panneau-stack-justify-sm,\n var(--_panneau-stack-justify-base, start)\n );\n }\n}\n\n@container (min-width: 48rem) {\n .stack {\n gap: var(\n --_panneau-stack-gap-md,\n var(\n --_panneau-stack-gap-sm,\n var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)))\n )\n );\n align-items: var(\n --_panneau-stack-align-md,\n var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch))\n );\n justify-content: var(\n --_panneau-stack-justify-md,\n var(--_panneau-stack-justify-sm, var(--_panneau-stack-justify-base, start))\n );\n }\n}\n\n@container (min-width: 64rem) {\n .stack {\n gap: var(\n --_panneau-stack-gap-lg,\n var(\n --_panneau-stack-gap-md,\n var(\n --_panneau-stack-gap-sm,\n var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)))\n )\n )\n );\n align-items: var(\n --_panneau-stack-align-lg,\n var(\n --_panneau-stack-align-md,\n var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch))\n )\n );\n justify-content: var(\n --_panneau-stack-justify-lg,\n var(\n --_panneau-stack-justify-md,\n var(--_panneau-stack-justify-sm, var(--_panneau-stack-justify-base, start))\n )\n );\n }\n}\n\n@container (min-width: 80rem) {\n .stack {\n gap: var(\n --_panneau-stack-gap-xl,\n var(\n --_panneau-stack-gap-lg,\n var(\n --_panneau-stack-gap-md,\n var(\n --_panneau-stack-gap-sm,\n var(\n --_panneau-stack-gap-base,\n var(--panneau-stack-gap, var(--panneau-space-4))\n )\n )\n )\n )\n );\n align-items: var(\n --_panneau-stack-align-xl,\n var(\n --_panneau-stack-align-lg,\n var(\n --_panneau-stack-align-md,\n var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch))\n )\n )\n );\n justify-content: var(\n --_panneau-stack-justify-xl,\n var(\n --_panneau-stack-justify-lg,\n var(\n --_panneau-stack-justify-md,\n var(--_panneau-stack-justify-sm, var(--_panneau-stack-justify-base, start))\n )\n )\n );\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/stack/tokens.ts"],"names":[],"mappings":"AAEA,uBAAuB;AACvB,eAAO,MAAM,WAAW,4DAGtB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/stack/tokens.ts
|
|
3
|
+
/** Tokens of Stack. */
|
|
4
|
+
var stackTokens = defineComponentTokens("stack", {
|
|
5
|
+
/** Space between items, when the `gap` prop is not set. */
|
|
6
|
+
gap: "var(--panneau-space-4)" });
|
|
7
|
+
//#endregion
|
|
8
|
+
export { stackTokens };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","stackTokens","gap"],"sources":["../../src/stack/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Stack. */\nexport const stackTokens = defineComponentTokens('stack', {\n /** Space between items, when the `gap` prop is not set. */\n gap: 'var(--panneau-space-4)',\n});\n"],"mappings":";;;AAGA,IAAaC,cAAcD,sBAAsB,SAAS;;AAEtDE,KAAK,yBACT,CAAC"}
|
package/dist/switch/Switch.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.panneau-switch-
|
|
1
|
+
.panneau-switch-control {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: var(--panneau-space-2);
|
|
@@ -9,61 +9,70 @@
|
|
|
9
9
|
-webkit-tap-highlight-color: transparent;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.panneau-switch-
|
|
12
|
+
.panneau-switch-control[data-disabled] {
|
|
13
13
|
cursor: not-allowed;
|
|
14
14
|
opacity: 0.55;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.panneau-switch-
|
|
17
|
+
.panneau-switch-control[data-readonly] {
|
|
18
18
|
cursor: default;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.panneau-track
|
|
21
|
+
.panneau-switch-track {
|
|
22
22
|
position: relative;
|
|
23
23
|
flex: 0 0 auto;
|
|
24
|
-
width: 2.25rem;
|
|
25
|
-
height: 1.25rem;
|
|
26
|
-
background-color: var(--panneau-color-border-control);
|
|
27
|
-
border-radius: var(--panneau-radius-full);
|
|
24
|
+
width: var(--panneau-switch-width, 2.25rem);
|
|
25
|
+
height: var(--panneau-switch-height, 1.25rem);
|
|
26
|
+
background-color: var(--panneau-switch-track-bg, var(--panneau-color-border-control));
|
|
27
|
+
border-radius: var(--panneau-switch-radius, var(--panneau-radius-full));
|
|
28
28
|
transition: background-color var(--panneau-duration);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.panneau-thumb
|
|
31
|
+
.panneau-switch-thumb {
|
|
32
32
|
position: absolute;
|
|
33
|
-
top:
|
|
34
|
-
left:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
top: calc((var(--panneau-switch-height, 1.25rem) - var(--panneau-switch-thumb-size, 1rem)) / 2);
|
|
34
|
+
left: calc(
|
|
35
|
+
(var(--panneau-switch-height, 1.25rem) - var(--panneau-switch-thumb-size, 1rem)) / 2
|
|
36
|
+
);
|
|
37
|
+
width: var(--panneau-switch-thumb-size, 1rem);
|
|
38
|
+
height: var(--panneau-switch-thumb-size, 1rem);
|
|
39
|
+
background-color: var(--panneau-switch-thumb-bg, var(--panneau-color-surface));
|
|
40
|
+
border-radius: var(--panneau-switch-radius, var(--panneau-radius-full));
|
|
39
41
|
box-shadow: var(--panneau-shadow-sm);
|
|
40
42
|
transition: transform var(--panneau-duration);
|
|
41
43
|
}
|
|
42
44
|
|
|
43
|
-
.panneau-switch-
|
|
44
|
-
background-color: var(--panneau-color-accent);
|
|
45
|
+
.panneau-switch-control[data-selected] .panneau-switch-track {
|
|
46
|
+
background-color: var(--panneau-switch-checked-bg, var(--panneau-color-accent));
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
.panneau-switch-
|
|
48
|
-
background-color: var(--panneau-color-accent-text);
|
|
49
|
-
|
|
49
|
+
.panneau-switch-control[data-selected] .panneau-switch-thumb {
|
|
50
|
+
background-color: var(--panneau-switch-checked-thumb-bg, var(--panneau-color-accent-text));
|
|
51
|
+
/* The thumb travels the width of the track minus its height (both ends keep the same inset). */
|
|
52
|
+
transform: translateX(
|
|
53
|
+
calc(var(--panneau-switch-width, 2.25rem) - var(--panneau-switch-height, 1.25rem))
|
|
54
|
+
);
|
|
50
55
|
}
|
|
51
56
|
|
|
52
|
-
.panneau-switch-
|
|
53
|
-
transform: translateX(
|
|
57
|
+
.panneau-switch-control[data-selected] .panneau-switch-thumb:dir(rtl) {
|
|
58
|
+
transform: translateX(
|
|
59
|
+
calc(
|
|
60
|
+
-1 * calc(var(--panneau-switch-width, 2.25rem) - var(--panneau-switch-height, 1.25rem))
|
|
61
|
+
)
|
|
62
|
+
);
|
|
54
63
|
}
|
|
55
64
|
|
|
56
|
-
.panneau-switch-
|
|
65
|
+
.panneau-switch-control[data-focus-visible] .panneau-switch-track {
|
|
57
66
|
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
58
67
|
outline-offset: 2px;
|
|
59
68
|
}
|
|
60
69
|
|
|
61
|
-
.panneau-label
|
|
70
|
+
.panneau-switch-label {
|
|
62
71
|
overflow-wrap: anywhere;
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
@media (pointer: coarse) {
|
|
66
|
-
.panneau-switch-
|
|
75
|
+
.panneau-switch-control {
|
|
67
76
|
min-height: 2.75rem;
|
|
68
77
|
}
|
|
69
78
|
}
|
package/dist/switch/Switch.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { type SwitchProps as AriaSwitchProps } from 'react-aria-components';
|
|
3
|
-
import { type ChoiceChromeProps } from '../checkbox/ChoiceChrome';
|
|
3
|
+
import { type ChoiceChromeProps } from '../checkbox/ChoiceChrome.js';
|
|
4
4
|
export interface SwitchProps extends Omit<AriaSwitchProps, 'className' | 'style' | 'children'>, ChoiceChromeProps {
|
|
5
5
|
/** Label, next to the switch. */
|
|
6
6
|
children?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAwB,KAAK,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElG,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIhF,MAAM,WAAW,WACb,SAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,EAAE,iBAAiB;IACpF,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,6DAA6D;AAC7D,wBAAgB,MAAM,CAAC,EACnB,QAAQ,EACR,WAAW,EACX,MAAW,EACX,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,GAAG,KAAK,EACX,EAAE,WAAW,+
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAwB,KAAK,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElG,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIhF,MAAM,WAAW,WACb,SAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,EAAE,iBAAiB;IACpF,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,6DAA6D;AAC7D,wBAAgB,MAAM,CAAC,EACnB,QAAQ,EACR,WAAW,EACX,MAAW,EACX,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,GAAG,KAAK,EACX,EAAE,WAAW,+BA0Bb"}
|
package/dist/switch/Switch.js
CHANGED
|
@@ -1,21 +1,55 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import { ChoiceChrome } from "../checkbox/ChoiceChrome.js";
|
|
3
3
|
import Switch_module_default from "./Switch.module.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { Switch } from "react-aria-components";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
//#region src/switch/Switch.tsx
|
|
7
8
|
/** An on and off switch, for settings that apply at once. */
|
|
8
|
-
function Switch$1(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
function Switch$1(t0) {
|
|
10
|
+
const $ = c(22);
|
|
11
|
+
let children;
|
|
12
|
+
let className;
|
|
13
|
+
let description;
|
|
14
|
+
let descriptionClassName;
|
|
15
|
+
let errorsClassName;
|
|
16
|
+
let props;
|
|
17
|
+
let switchClassName;
|
|
18
|
+
let t1;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({children, description, errors: t1, className, switchClassName, descriptionClassName, errorsClassName, ...props} = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = children;
|
|
23
|
+
$[2] = className;
|
|
24
|
+
$[3] = description;
|
|
25
|
+
$[4] = descriptionClassName;
|
|
26
|
+
$[5] = errorsClassName;
|
|
27
|
+
$[6] = props;
|
|
28
|
+
$[7] = switchClassName;
|
|
29
|
+
$[8] = t1;
|
|
30
|
+
} else {
|
|
31
|
+
children = $[1];
|
|
32
|
+
className = $[2];
|
|
33
|
+
description = $[3];
|
|
34
|
+
descriptionClassName = $[4];
|
|
35
|
+
errorsClassName = $[5];
|
|
36
|
+
props = $[6];
|
|
37
|
+
switchClassName = $[7];
|
|
38
|
+
t1 = $[8];
|
|
39
|
+
}
|
|
40
|
+
let t2;
|
|
41
|
+
if ($[9] !== t1) {
|
|
42
|
+
t2 = t1 === void 0 ? [] : t1;
|
|
43
|
+
$[9] = t1;
|
|
44
|
+
$[10] = t2;
|
|
45
|
+
} else t2 = $[10];
|
|
46
|
+
const errors = t2;
|
|
47
|
+
let t3;
|
|
48
|
+
if ($[11] !== children || $[12] !== props || $[13] !== switchClassName) {
|
|
49
|
+
t3 = (describedBy) => /* @__PURE__ */ jsxs(Switch, {
|
|
16
50
|
...props,
|
|
17
51
|
"aria-describedby": describedBy,
|
|
18
|
-
className: cx(Switch_module_default.
|
|
52
|
+
className: cx(Switch_module_default.control, switchClassName),
|
|
19
53
|
children: [/* @__PURE__ */ jsx("span", {
|
|
20
54
|
className: Switch_module_default.track,
|
|
21
55
|
"aria-hidden": "true",
|
|
@@ -24,8 +58,32 @@ function Switch$1({ children, description, errors = [], className, switchClassNa
|
|
|
24
58
|
className: Switch_module_default.label,
|
|
25
59
|
children
|
|
26
60
|
}) : null]
|
|
27
|
-
})
|
|
28
|
-
|
|
61
|
+
});
|
|
62
|
+
$[11] = children;
|
|
63
|
+
$[12] = props;
|
|
64
|
+
$[13] = switchClassName;
|
|
65
|
+
$[14] = t3;
|
|
66
|
+
} else t3 = $[14];
|
|
67
|
+
let t4;
|
|
68
|
+
if ($[15] !== className || $[16] !== description || $[17] !== descriptionClassName || $[18] !== errors || $[19] !== errorsClassName || $[20] !== t3) {
|
|
69
|
+
t4 = /* @__PURE__ */ jsx(ChoiceChrome, {
|
|
70
|
+
component: "switch",
|
|
71
|
+
description,
|
|
72
|
+
errors,
|
|
73
|
+
className,
|
|
74
|
+
descriptionClassName,
|
|
75
|
+
errorsClassName,
|
|
76
|
+
children: t3
|
|
77
|
+
});
|
|
78
|
+
$[15] = className;
|
|
79
|
+
$[16] = description;
|
|
80
|
+
$[17] = descriptionClassName;
|
|
81
|
+
$[18] = errors;
|
|
82
|
+
$[19] = errorsClassName;
|
|
83
|
+
$[20] = t3;
|
|
84
|
+
$[21] = t4;
|
|
85
|
+
} else t4 = $[21];
|
|
86
|
+
return t4;
|
|
29
87
|
}
|
|
30
88
|
//#endregion
|
|
31
89
|
export { Switch$1 as Switch };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","names":["Switch","AriaSwitch","styles"],"sources":["../../src/switch/Switch.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Switch as AriaSwitch, type SwitchProps as AriaSwitchProps } from 'react-aria-components';\n\nimport { ChoiceChrome, type ChoiceChromeProps } from '../checkbox/ChoiceChrome';\nimport { cx } from '../utils/cx';\nimport styles from './Switch.module.css';\n\nexport interface SwitchProps\n extends Omit<AriaSwitchProps, 'className' | 'style' | 'children'>, ChoiceChromeProps {\n /** Label, next to the switch. */\n children?: ReactNode;\n switchClassName?: string;\n}\n\n/** An on and off switch, for settings that apply at once. */\nexport function Switch({\n children,\n description,\n errors = [],\n className,\n switchClassName,\n descriptionClassName,\n errorsClassName,\n ...props\n}: SwitchProps) {\n return (\n <ChoiceChrome\n description={description}\n errors={errors}\n className={className}\n descriptionClassName={descriptionClassName}\n errorsClassName={errorsClassName}\n >\n {(describedBy) => (\n <AriaSwitch\n {...props}\n aria-describedby={describedBy}\n className={cx(styles.
|
|
1
|
+
{"version":3,"file":"Switch.js","names":["ReactNode","Switch","AriaSwitch","SwitchProps","AriaSwitchProps","ChoiceChrome","ChoiceChromeProps","cx","styles","Omit","children","switchClassName","t0","$","_c","className","description","descriptionClassName","errorsClassName","props","t1","errors","t2","undefined","t3","describedBy","control","track","thumb","label","t4","Switch","_c","AriaSwitch","styles"],"sources":["../../src/switch/Switch.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Switch as AriaSwitch, type SwitchProps as AriaSwitchProps } from 'react-aria-components';\n\nimport { ChoiceChrome, type ChoiceChromeProps } from '../checkbox/ChoiceChrome';\nimport { cx } from '../utils/cx';\nimport styles from './Switch.module.css';\n\nexport interface SwitchProps\n extends Omit<AriaSwitchProps, 'className' | 'style' | 'children'>, ChoiceChromeProps {\n /** Label, next to the switch. */\n children?: ReactNode;\n switchClassName?: string;\n}\n\n/** An on and off switch, for settings that apply at once. */\nexport function Switch({\n children,\n description,\n errors = [],\n className,\n switchClassName,\n descriptionClassName,\n errorsClassName,\n ...props\n}: SwitchProps) {\n return (\n <ChoiceChrome\n component=\"switch\"\n description={description}\n errors={errors}\n className={className}\n descriptionClassName={descriptionClassName}\n errorsClassName={errorsClassName}\n >\n {(describedBy) => (\n <AriaSwitch\n {...props}\n aria-describedby={describedBy}\n className={cx(styles.control, switchClassName)}\n >\n <span className={styles.track} aria-hidden=\"true\">\n <span className={styles.thumb} />\n </span>\n {children !== undefined ? (\n <span className={styles.label}>{children}</span>\n ) : null}\n </AriaSwitch>\n )}\n </ChoiceChrome>\n );\n}\n"],"mappings":";;;;;;;;AAeA,SAAOC,SAAAW,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAS;CAAA,IAAAP,EAAA,OAAAD,IAAA;EAAgB,CAAA,CAAAF,UAAAM,aAAAK,QAAAD,IAAAL,WAAAJ,iBAAAM,sBAAAC,iBAAA,GAAAC,SAAAP;EASTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAF;EAAAE,EAAA,KAAAO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,EAAA,MAAAQ;EAAAR,EAAA,MAAAK;EAAAL,EAAA,MAAAW;EAAAX,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OAtBfiB;AAsBe"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import "./Switch.css";
|
|
2
2
|
//#region src/switch/Switch.module.css
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var control = "panneau-switch-control";
|
|
4
|
+
var track = "panneau-switch-track";
|
|
5
|
+
var thumb = "panneau-switch-thumb";
|
|
6
|
+
var label = "panneau-switch-label";
|
|
6
7
|
var Switch_module_default = {
|
|
7
|
-
|
|
8
|
+
control,
|
|
8
9
|
track,
|
|
9
10
|
thumb,
|
|
10
11
|
label
|
|
11
12
|
};
|
|
12
13
|
//#endregion
|
|
13
|
-
export { Switch_module_default as default, label, thumb, track };
|
|
14
|
+
export { control, Switch_module_default as default, label, thumb, track };
|
|
14
15
|
|
|
15
16
|
//# sourceMappingURL=Switch.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.module.js","names":[],"sources":["../../src/switch/Switch.module.css"],"sourcesContent":[".
|
|
1
|
+
{"version":3,"file":"Switch.module.js","names":[],"sources":["../../src/switch/Switch.module.css"],"sourcesContent":[".control {\n display: inline-flex;\n align-items: center;\n gap: var(--panneau-space-2);\n min-height: 1.5rem;\n font-size: var(--panneau-font-size-md);\n color: var(--panneau-color-text);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n}\n\n.control[data-disabled] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.control[data-readonly] {\n cursor: default;\n}\n\n.track {\n position: relative;\n flex: 0 0 auto;\n width: var(--panneau-switch-width, 2.25rem);\n height: var(--panneau-switch-height, 1.25rem);\n background-color: var(--panneau-switch-track-bg, var(--panneau-color-border-control));\n border-radius: var(--panneau-switch-radius, var(--panneau-radius-full));\n transition: background-color var(--panneau-duration);\n}\n\n.thumb {\n position: absolute;\n top: calc((var(--panneau-switch-height, 1.25rem) - var(--panneau-switch-thumb-size, 1rem)) / 2);\n left: calc(\n (var(--panneau-switch-height, 1.25rem) - var(--panneau-switch-thumb-size, 1rem)) / 2\n );\n width: var(--panneau-switch-thumb-size, 1rem);\n height: var(--panneau-switch-thumb-size, 1rem);\n background-color: var(--panneau-switch-thumb-bg, var(--panneau-color-surface));\n border-radius: var(--panneau-switch-radius, var(--panneau-radius-full));\n box-shadow: var(--panneau-shadow-sm);\n transition: transform var(--panneau-duration);\n}\n\n.control[data-selected] .track {\n background-color: var(--panneau-switch-checked-bg, var(--panneau-color-accent));\n}\n\n.control[data-selected] .thumb {\n background-color: var(--panneau-switch-checked-thumb-bg, var(--panneau-color-accent-text));\n /* The thumb travels the width of the track minus its height (both ends keep the same inset). */\n transform: translateX(\n calc(var(--panneau-switch-width, 2.25rem) - var(--panneau-switch-height, 1.25rem))\n );\n}\n\n.control[data-selected] .thumb:dir(rtl) {\n transform: translateX(\n calc(\n -1 * calc(var(--panneau-switch-width, 2.25rem) - var(--panneau-switch-height, 1.25rem))\n )\n );\n}\n\n.control[data-focus-visible] .track {\n outline: var(--panneau-focus-width) solid var(--panneau-color-focus);\n outline-offset: 2px;\n}\n\n.label {\n overflow-wrap: anywhere;\n}\n\n@media (pointer: coarse) {\n .control {\n min-height: 2.75rem;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of Switch. */
|
|
2
|
+
export declare const switchTokens: import("../index.js").ComponentTokens<"switch", "panneau-switch-height" | "panneau-switch-width" | "panneau-switch-radius" | "panneau-switch-checked-bg" | "panneau-switch-track-bg" | "panneau-switch-thumb-size" | "panneau-switch-thumb-bg" | "panneau-switch-checked-thumb-bg">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/switch/tokens.ts"],"names":[],"mappings":"AAEA,wBAAwB;AACxB,eAAO,MAAM,YAAY,4QAiBvB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/switch/tokens.ts
|
|
3
|
+
/** Tokens of Switch. */
|
|
4
|
+
var switchTokens = defineComponentTokens("switch", {
|
|
5
|
+
/** Width of the track. */
|
|
6
|
+
width: "2.25rem",
|
|
7
|
+
/** Height of the track. */
|
|
8
|
+
height: "1.25rem",
|
|
9
|
+
/** Background of the track when off. */
|
|
10
|
+
"track-bg": "var(--panneau-color-border-control)",
|
|
11
|
+
/** Corner radius of the track and the thumb. */
|
|
12
|
+
radius: "var(--panneau-radius-full)",
|
|
13
|
+
/** Size of the thumb. */
|
|
14
|
+
"thumb-size": "1rem",
|
|
15
|
+
/** Background of the thumb when off. */
|
|
16
|
+
"thumb-bg": "var(--panneau-color-surface)",
|
|
17
|
+
/** Background of the track when on. */
|
|
18
|
+
"checked-bg": "var(--panneau-color-accent)",
|
|
19
|
+
/** Background of the thumb when on. */
|
|
20
|
+
"checked-thumb-bg": "var(--panneau-color-accent-text)"
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { switchTokens };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","switchTokens","width","height","radius"],"sources":["../../src/switch/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Switch. */\nexport const switchTokens = defineComponentTokens('switch', {\n /** Width of the track. */\n width: '2.25rem',\n /** Height of the track. */\n height: '1.25rem',\n /** Background of the track when off. */\n 'track-bg': 'var(--panneau-color-border-control)',\n /** Corner radius of the track and the thumb. */\n radius: 'var(--panneau-radius-full)',\n /** Size of the thumb. */\n 'thumb-size': '1rem',\n /** Background of the thumb when off. */\n 'thumb-bg': 'var(--panneau-color-surface)',\n /** Background of the track when on. */\n 'checked-bg': 'var(--panneau-color-accent)',\n /** Background of the thumb when on. */\n 'checked-thumb-bg': 'var(--panneau-color-accent-text)',\n});\n"],"mappings":";;;AAGA,IAAaC,eAAeD,sBAAsB,UAAU;;CAExDE,OAAO;;CAEPC,QAAQ;;CAER,YAAY;;CAEZC,QAAQ;;CAER,cAAc;;CAEd,YAAY;;CAEZ,cAAc;;CAEd,oBAAoB;AACxB,CAAC"}
|
package/dist/tabs/Tabs.css
CHANGED
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
.panneau-tabs
|
|
1
|
+
.panneau-tabs {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
gap: var(--panneau-space-4);
|
|
4
|
+
gap: var(--panneau-tabs-gap, var(--panneau-space-4));
|
|
5
5
|
min-width: 0;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.panneau-list
|
|
8
|
+
.panneau-tabs-list {
|
|
9
9
|
display: flex;
|
|
10
10
|
gap: var(--panneau-space-1);
|
|
11
11
|
overflow-x: auto;
|
|
12
|
-
border-bottom: var(--panneau-border-width) solid
|
|
12
|
+
border-bottom: var(--panneau-border-width) solid
|
|
13
|
+
var(--panneau-tabs-border-color, var(--panneau-color-border));
|
|
13
14
|
scrollbar-width: none;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
.panneau-list
|
|
17
|
+
.panneau-tabs-list::-webkit-scrollbar {
|
|
17
18
|
display: none;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
.panneau-tab
|
|
21
|
+
.panneau-tabs-tab {
|
|
21
22
|
position: relative;
|
|
22
23
|
display: inline-flex;
|
|
23
24
|
flex: 0 0 auto;
|
|
24
25
|
align-items: center;
|
|
25
26
|
gap: var(--panneau-space-2);
|
|
26
27
|
min-height: var(--panneau-control-height);
|
|
27
|
-
padding: 0 var(--panneau-space-3);
|
|
28
|
+
padding: 0 var(--panneau-tabs-tab-padding-x, var(--panneau-space-3));
|
|
28
29
|
font-size: var(--panneau-font-size-md);
|
|
29
|
-
font-weight: var(--panneau-font-weight-medium);
|
|
30
|
-
color: var(--panneau-color-text-muted);
|
|
30
|
+
font-weight: var(--panneau-tabs-tab-font-weight, var(--panneau-font-weight-medium));
|
|
31
|
+
color: var(--panneau-tabs-tab-color, var(--panneau-color-text-muted));
|
|
31
32
|
white-space: nowrap;
|
|
32
33
|
cursor: pointer;
|
|
33
34
|
outline: none;
|
|
34
35
|
-webkit-tap-highlight-color: transparent;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
.panneau-tab
|
|
38
|
+
.panneau-tabs-tab::after {
|
|
38
39
|
position: absolute;
|
|
39
40
|
inset-inline: var(--panneau-space-2);
|
|
40
41
|
bottom: calc(-1 * var(--panneau-border-width));
|
|
41
|
-
height: 2px;
|
|
42
|
+
height: var(--panneau-tabs-indicator-height, 2px);
|
|
42
43
|
content: '';
|
|
43
44
|
background-color: transparent;
|
|
44
45
|
border-radius: 2px 2px 0 0;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
.panneau-tab
|
|
48
|
-
color: var(--panneau-color-text);
|
|
48
|
+
.panneau-tabs-tab[data-hovered] {
|
|
49
|
+
color: var(--panneau-tabs-tab-color-selected, var(--panneau-color-text));
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
.panneau-tab
|
|
52
|
-
color: var(--panneau-color-text);
|
|
52
|
+
.panneau-tabs-tab[data-selected] {
|
|
53
|
+
color: var(--panneau-tabs-tab-color-selected, var(--panneau-color-text));
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
.panneau-tab
|
|
56
|
-
background-color: var(--panneau-color-accent);
|
|
56
|
+
.panneau-tabs-tab[data-selected]::after {
|
|
57
|
+
background-color: var(--panneau-tabs-indicator-color, var(--panneau-color-accent));
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
.panneau-tab
|
|
60
|
+
.panneau-tabs-tab[data-disabled] {
|
|
60
61
|
cursor: not-allowed;
|
|
61
62
|
opacity: 0.5;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
.panneau-tab
|
|
65
|
+
.panneau-tabs-tab[data-focus-visible] {
|
|
65
66
|
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
66
67
|
outline-offset: -2px;
|
|
67
68
|
border-radius: var(--panneau-radius-sm);
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
.panneau-panel
|
|
71
|
+
.panneau-tabs-panel {
|
|
71
72
|
min-width: 0;
|
|
72
73
|
outline: none;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
.panneau-panel
|
|
76
|
+
.panneau-tabs-panel[data-focus-visible] {
|
|
76
77
|
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
77
78
|
outline-offset: 2px;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
.panneau-panel
|
|
81
|
-
.panneau-panel
|
|
81
|
+
.panneau-tabs-panel[data-inert],
|
|
82
|
+
.panneau-tabs-panel[inert] {
|
|
82
83
|
display: none;
|
|
83
84
|
}
|
package/dist/tabs/Tabs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import Tabs_module_default from "./Tabs.module.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { Tab, TabList, TabPanel, Tabs } from "react-aria-components";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { c } from "react/compiler-runtime";
|
|
6
6
|
//#region src/tabs/Tabs.tsx
|
|
7
7
|
/** Tabs: a `TabList` of `Tab`s, then a `TabPanel` per tab, matched by `id`. */
|
|
8
8
|
function Tabs$1(t0) {
|
|
@@ -20,7 +20,7 @@ function Tabs$1(t0) {
|
|
|
20
20
|
}
|
|
21
21
|
let t1;
|
|
22
22
|
if ($[3] !== className) {
|
|
23
|
-
t1 = cx(Tabs_module_default.tabs, className);
|
|
23
|
+
t1 = cx("panneau-tabs", Tabs_module_default.tabs, className);
|
|
24
24
|
$[3] = className;
|
|
25
25
|
$[4] = t1;
|
|
26
26
|
} else t1 = $[4];
|
|
@@ -52,7 +52,7 @@ function TabList$1(t0) {
|
|
|
52
52
|
}
|
|
53
53
|
let t1;
|
|
54
54
|
if ($[3] !== className) {
|
|
55
|
-
t1 = cx(Tabs_module_default.list, className);
|
|
55
|
+
t1 = cx("panneau-tab-list", Tabs_module_default.list, className);
|
|
56
56
|
$[3] = className;
|
|
57
57
|
$[4] = t1;
|
|
58
58
|
} else t1 = $[4];
|
|
@@ -84,7 +84,7 @@ function Tab$1(t0) {
|
|
|
84
84
|
}
|
|
85
85
|
let t1;
|
|
86
86
|
if ($[3] !== className) {
|
|
87
|
-
t1 = cx(Tabs_module_default.tab, className);
|
|
87
|
+
t1 = cx("panneau-tab", Tabs_module_default.tab, className);
|
|
88
88
|
$[3] = className;
|
|
89
89
|
$[4] = t1;
|
|
90
90
|
} else t1 = $[4];
|
|
@@ -119,7 +119,7 @@ function TabPanel$1(t0) {
|
|
|
119
119
|
}
|
|
120
120
|
let t1;
|
|
121
121
|
if ($[3] !== className) {
|
|
122
|
-
t1 = cx(Tabs_module_default.panel, className);
|
|
122
|
+
t1 = cx("panneau-tab-panel", Tabs_module_default.panel, className);
|
|
123
123
|
$[3] = className;
|
|
124
124
|
$[4] = t1;
|
|
125
125
|
} else t1 = $[4];
|
package/dist/tabs/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","names":["Tabs","_c","styles","AriaTabs","TabList","AriaTabList","Tab","AriaTab","TabPanel","AriaTabPanel"],"sources":["../../src/tabs/Tabs.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n type TabListProps as AriaTabListProps,\n TabPanel as AriaTabPanel,\n type TabPanelProps as AriaTabPanelProps,\n type TabProps as AriaTabProps,\n Tabs as AriaTabs,\n type TabsProps as AriaTabsProps,\n} from 'react-aria-components';\n\nimport { cx } from '../utils/cx';\nimport styles from './Tabs.module.css';\n\nexport interface TabsProps extends Omit<AriaTabsProps, 'className' | 'style'> {\n className?: string;\n}\n\n/** Tabs: a `TabList` of `Tab`s, then a `TabPanel` per tab, matched by `id`. */\nexport function Tabs({ className, ...props }: TabsProps) {\n return <AriaTabs {...props} className={cx(styles.tabs, className)} />;\n}\n\nexport interface TabListProps<T extends object> extends Omit<\n AriaTabListProps<T>,\n 'className' | 'style'\n> {\n className?: string;\n}\n\n/** The row of tabs. It scrolls sideways when the tabs don't fit, on phones. */\nexport function TabList<T extends object>({ className, ...props }: TabListProps<T>) {\n return <AriaTabList {...props} className={cx(styles.list, className)} />;\n}\n\nexport interface TabProps extends Omit<AriaTabProps, 'className' | 'style' | 'children'> {\n children?: ReactNode;\n className?: string;\n}\n\n/** A tab. Put a `Badge` in it for a count, such as the errors of the panel. */\nexport function Tab({ className, ...props }: TabProps) {\n return <AriaTab {...props} className={cx(styles.tab, className)} />;\n}\n\nexport interface TabPanelProps extends Omit<AriaTabPanelProps, 'className' | 'style'> {\n className?: string;\n}\n\n/**\n * The content of a tab. With `shouldForceMount`, the panel stays mounted (and hidden) when another\n * tab is selected, which keeps the state of its fields.\n */\nexport function TabPanel({ className, ...props }: TabPanelProps) {\n return <AriaTabPanel {...props} className={cx(styles.panel, className)} />;\n}\n"],"mappings":";;;;;;;AAoBA,
|
|
1
|
+
{"version":3,"file":"Tabs.js","names":["ReactNode","Tab","AriaTab","TabList","AriaTabList","TabListProps","AriaTabListProps","TabPanel","AriaTabPanel","TabPanelProps","AriaTabPanelProps","TabProps","AriaTabProps","Tabs","AriaTabs","TabsProps","AriaTabsProps","cx","styles","Omit","className","t0","$","_c","props","t1","tabs","t2","T","list","children","tab","panel","Tabs","_c","styles","AriaTabs","TabList","AriaTabList","Tab","AriaTab","TabPanel","AriaTabPanel"],"sources":["../../src/tabs/Tabs.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n type TabListProps as AriaTabListProps,\n TabPanel as AriaTabPanel,\n type TabPanelProps as AriaTabPanelProps,\n type TabProps as AriaTabProps,\n Tabs as AriaTabs,\n type TabsProps as AriaTabsProps,\n} from 'react-aria-components';\n\nimport { cx } from '../utils/cx';\nimport styles from './Tabs.module.css';\n\nexport interface TabsProps extends Omit<AriaTabsProps, 'className' | 'style'> {\n className?: string;\n}\n\n/** Tabs: a `TabList` of `Tab`s, then a `TabPanel` per tab, matched by `id`. */\nexport function Tabs({ className, ...props }: TabsProps) {\n return <AriaTabs {...props} className={cx('panneau-tabs', styles.tabs, className)} />;\n}\n\nexport interface TabListProps<T extends object> extends Omit<\n AriaTabListProps<T>,\n 'className' | 'style'\n> {\n className?: string;\n}\n\n/** The row of tabs. It scrolls sideways when the tabs don't fit, on phones. */\nexport function TabList<T extends object>({ className, ...props }: TabListProps<T>) {\n return <AriaTabList {...props} className={cx('panneau-tab-list', styles.list, className)} />;\n}\n\nexport interface TabProps extends Omit<AriaTabProps, 'className' | 'style' | 'children'> {\n children?: ReactNode;\n className?: string;\n}\n\n/** A tab. Put a `Badge` in it for a count, such as the errors of the panel. */\nexport function Tab({ className, ...props }: TabProps) {\n return <AriaTab {...props} className={cx('panneau-tab', styles.tab, className)} />;\n}\n\nexport interface TabPanelProps extends Omit<AriaTabPanelProps, 'className' | 'style'> {\n className?: string;\n}\n\n/**\n * The content of a tab. With `shouldForceMount`, the panel stays mounted (and hidden) when another\n * tab is selected, which keeps the state of its fields.\n */\nexport function TabPanel({ className, ...props }: TabPanelProps) {\n return <AriaTabPanel {...props} className={cx('panneau-tab-panel', styles.panel, className)} />;\n}\n"],"mappings":";;;;;;;AAoBA,SAAOa,OAAAQ,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAH;CAAA,IAAAI;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAc,CAAA,CAAAD,WAAA,GAAA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