@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,113 @@
|
|
|
1
|
+
import { ButtonContent, getButtonClassName } from "./Button.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { Link } from "react-aria-components";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/button/LinkButton.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A link that looks like a `Button`: the same tones, appearances, sizes and states. It goes
|
|
8
|
+
* through React Aria, so an app's router handles it.
|
|
9
|
+
*/
|
|
10
|
+
function LinkButton(t0) {
|
|
11
|
+
const $ = c(31);
|
|
12
|
+
let appearance;
|
|
13
|
+
let children;
|
|
14
|
+
let className;
|
|
15
|
+
let icon;
|
|
16
|
+
let iconEnd;
|
|
17
|
+
let props;
|
|
18
|
+
let t1;
|
|
19
|
+
let t2;
|
|
20
|
+
let t3;
|
|
21
|
+
let tone;
|
|
22
|
+
let variant;
|
|
23
|
+
if ($[0] !== t0) {
|
|
24
|
+
({tone, appearance, variant, size: t1, icon, iconEnd, fullWidth: t2, external: t3, children, className, ...props} = t0);
|
|
25
|
+
$[0] = t0;
|
|
26
|
+
$[1] = appearance;
|
|
27
|
+
$[2] = children;
|
|
28
|
+
$[3] = className;
|
|
29
|
+
$[4] = icon;
|
|
30
|
+
$[5] = iconEnd;
|
|
31
|
+
$[6] = props;
|
|
32
|
+
$[7] = t1;
|
|
33
|
+
$[8] = t2;
|
|
34
|
+
$[9] = t3;
|
|
35
|
+
$[10] = tone;
|
|
36
|
+
$[11] = variant;
|
|
37
|
+
} else {
|
|
38
|
+
appearance = $[1];
|
|
39
|
+
children = $[2];
|
|
40
|
+
className = $[3];
|
|
41
|
+
icon = $[4];
|
|
42
|
+
iconEnd = $[5];
|
|
43
|
+
props = $[6];
|
|
44
|
+
t1 = $[7];
|
|
45
|
+
t2 = $[8];
|
|
46
|
+
t3 = $[9];
|
|
47
|
+
tone = $[10];
|
|
48
|
+
variant = $[11];
|
|
49
|
+
}
|
|
50
|
+
const size = t1 === void 0 ? "md" : t1;
|
|
51
|
+
const fullWidth = t2 === void 0 ? false : t2;
|
|
52
|
+
const external = t3 === void 0 ? false : t3;
|
|
53
|
+
let t4;
|
|
54
|
+
if ($[12] !== external) {
|
|
55
|
+
t4 = external ? {
|
|
56
|
+
target: "_blank",
|
|
57
|
+
rel: "noopener noreferrer"
|
|
58
|
+
} : {};
|
|
59
|
+
$[12] = external;
|
|
60
|
+
$[13] = t4;
|
|
61
|
+
} else t4 = $[13];
|
|
62
|
+
let t5;
|
|
63
|
+
if ($[14] !== appearance || $[15] !== className || $[16] !== fullWidth || $[17] !== size || $[18] !== tone || $[19] !== variant) {
|
|
64
|
+
t5 = getButtonClassName({
|
|
65
|
+
tone,
|
|
66
|
+
appearance,
|
|
67
|
+
variant,
|
|
68
|
+
size,
|
|
69
|
+
fullWidth,
|
|
70
|
+
className
|
|
71
|
+
});
|
|
72
|
+
$[14] = appearance;
|
|
73
|
+
$[15] = className;
|
|
74
|
+
$[16] = fullWidth;
|
|
75
|
+
$[17] = size;
|
|
76
|
+
$[18] = tone;
|
|
77
|
+
$[19] = variant;
|
|
78
|
+
$[20] = t5;
|
|
79
|
+
} else t5 = $[20];
|
|
80
|
+
let t6;
|
|
81
|
+
if ($[21] !== children || $[22] !== icon || $[23] !== iconEnd || $[24] !== size) {
|
|
82
|
+
t6 = /* @__PURE__ */ jsx(ButtonContent, {
|
|
83
|
+
icon,
|
|
84
|
+
iconEnd,
|
|
85
|
+
size,
|
|
86
|
+
children
|
|
87
|
+
});
|
|
88
|
+
$[21] = children;
|
|
89
|
+
$[22] = icon;
|
|
90
|
+
$[23] = iconEnd;
|
|
91
|
+
$[24] = size;
|
|
92
|
+
$[25] = t6;
|
|
93
|
+
} else t6 = $[25];
|
|
94
|
+
let t7;
|
|
95
|
+
if ($[26] !== props || $[27] !== t4 || $[28] !== t5 || $[29] !== t6) {
|
|
96
|
+
t7 = /* @__PURE__ */ jsx(Link, {
|
|
97
|
+
...t4,
|
|
98
|
+
...props,
|
|
99
|
+
className: t5,
|
|
100
|
+
children: t6
|
|
101
|
+
});
|
|
102
|
+
$[26] = props;
|
|
103
|
+
$[27] = t4;
|
|
104
|
+
$[28] = t5;
|
|
105
|
+
$[29] = t6;
|
|
106
|
+
$[30] = t7;
|
|
107
|
+
} else t7 = $[30];
|
|
108
|
+
return t7;
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
export { LinkButton };
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=LinkButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkButton.js","names":["CSSProperties","ReactNode","Link","AriaLink","LinkProps","AriaLinkProps","ButtonContent","ButtonStyleProps","getButtonClassName","LinkButtonProps","Omit","href","external","children","className","style","LinkButton","t0","$","_c","appearance","icon","iconEnd","props","t1","t2","t3","tone","variant","size","fullWidth","undefined","t4","target","rel","t5","t6","t7","_c","AriaLink"],"sources":["../../src/button/LinkButton.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport { Link as AriaLink, type LinkProps as AriaLinkProps } from 'react-aria-components';\n\nimport { ButtonContent, type ButtonStyleProps, getButtonClassName } from './Button';\n\nexport interface LinkButtonProps\n extends ButtonStyleProps, Omit<AriaLinkProps, 'className' | 'style' | 'children'> {\n /** Where the link goes, through the app's router for a path of the admin. */\n href: string;\n /**\n * Leaves the admin: opens in a new tab, without access to the admin (`target=\"_blank\"`,\n * `rel=\"noopener noreferrer\"`). Absolute URLs aren't external by themselves: a sign-in\n * provider opens in the same tab.\n */\n external?: boolean;\n children?: ReactNode;\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * A link that looks like a `Button`: the same tones, appearances, sizes and states. It goes\n * through React Aria, so an app's router handles it.\n */\nexport function LinkButton({\n tone,\n appearance,\n variant,\n size = 'md',\n icon,\n iconEnd,\n fullWidth = false,\n external = false,\n children,\n className,\n ...props\n}: LinkButtonProps) {\n return (\n <AriaLink\n {...(external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n {...props}\n className={getButtonClassName({\n tone,\n appearance,\n variant,\n size,\n fullWidth,\n className,\n })}\n >\n <ButtonContent icon={icon} iconEnd={iconEnd} size={size}>\n {children}\n </ButtonContent>\n </AriaLink>\n );\n}\n"],"mappings":";;;;;;;;;AAwBA,SAAOgB,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAP;CAAA,IAAAC;CAAA,IAAAO;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAV,EAAA,OAAAD,IAAA;EAAoB,CAAA,CAAAU,MAAAP,YAAAQ,SAAAC,MAAAL,IAAAH,MAAAC,SAAAQ,WAAAL,IAAAb,UAAAc,IAAAb,UAAAC,WAAA,GAAAS,SAAAN;EAYTC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAL;EAAAK,EAAA,KAAAJ;EAAAI,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;EAAAR,EAAA,MAAAS;EAAAT,EAAA,MAAAU;CAAA,OAAA;EAAAR,aAAAF,EAAA;EAAAL,WAAAK,EAAA;EAAAJ,YAAAI,EAAA;EAAAG,OAAAH,EAAA;EAAAI,UAAAJ,EAAA;EAAAK,QAAAL,EAAA;EAAAM,KAAAN,EAAA;EAAAO,KAAAP,EAAA;EAAAQ,KAAAR,EAAA;EAAAS,OAAAT,EAAA;EAAAU,UAAAV,EAAA;CAAA;CARd,MAAAW,OAAAL,OAAAO,KAAAA,IAAA,OAAAP;CAGA,MAAAM,YAAAL,OAAAM,KAAAA,IAAA,QAAAN;CACA,MAAAb,WAAAc,OAAAK,KAAAA,IAAA,QAAAL;CAAgB,IAAAM;CAAA,IAAAd,EAAA,QAAAN,UAAA;EAOHoB,KAAApB,WAAA;GAAAqB,QAAqB;GAAQC,KAAO;EAA2B,IAA/D,CAA+D;EAAChB,EAAA,MAAAN;EAAAM,EAAA,MAAAc;CAAA,OAAAA,KAAAd,EAAA;CAAA,IAAAiB;CAAA,IAAAjB,EAAA,QAAAE,cAAAF,EAAA,QAAAJ,aAAAI,EAAA,QAAAY,aAAAZ,EAAA,QAAAW,QAAAX,EAAA,QAAAS,QAAAT,EAAA,QAAAU,SAAA;EAE1DO,KAAA3B,mBAAmB;GAAAmB;GAAAP;GAAAQ;GAAAC;GAAAC;GAAAhB;EAO9B,CAAC;EAACI,EAAA,MAAAE;EAAAF,EAAA,MAAAJ;EAAAI,EAAA,MAAAY;EAAAZ,EAAA,MAAAW;EAAAX,EAAA,MAAAS;EAAAT,EAAA,MAAAU;EAAAV,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,IAAAkB;CAAA,IAAAlB,EAAA,QAAAL,YAAAK,EAAA,QAAAG,QAAAH,EAAA,QAAAI,WAAAJ,EAAA,QAAAW,MAAA;EAEFO,KAAA,oBAAC,eAAD;GAAqBf;GAAeC;GAAeO;GAC9ChB;EADS,CAAA;EAEEK,EAAA,MAAAL;EAAAK,EAAA,MAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAW;EAAAX,EAAA,MAAAkB;CAAA,OAAAA,KAAAlB,EAAA;CAAA,IAAAmB;CAAA,IAAAnB,EAAA,QAAAK,SAAAL,EAAA,QAAAc,MAAAd,EAAA,QAAAiB,MAAAjB,EAAA,QAAAkB,IAAA;EAdpBC,KAAA,oBAACE,MAAD;GAAS,GACAP;GAAgE,GACjET;GACO,WAAAY;GASXC,UAAAA;EAZK,CAAA;EAeElB,EAAA,MAAAK;EAAAL,EAAA,MAAAc;EAAAd,EAAA,MAAAiB;EAAAjB,EAAA,MAAAkB;EAAAlB,EAAA,MAAAmB;CAAA,OAAAA,KAAAnB,EAAA;CAAA,OAfXmB;AAeW"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of Button. */
|
|
2
|
+
export declare const buttonTokens: import("../index.js").ComponentTokens<"button", "panneau-button-radius" | "panneau-button-gap" | "panneau-button-padding-x" | "panneau-button-border-width" | "panneau-button-font-size" | "panneau-button-font-weight" | "panneau-button-padding-x-sm" | "panneau-button-font-size-sm">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/button/tokens.ts"],"names":[],"mappings":"AAEA,wBAAwB;AACxB,eAAO,MAAM,YAAY,iRAiBvB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/button/tokens.ts
|
|
3
|
+
/** Tokens of Button. */
|
|
4
|
+
var buttonTokens = defineComponentTokens("button", {
|
|
5
|
+
/** Space between the icon and the label. */
|
|
6
|
+
gap: "var(--panneau-space-2)",
|
|
7
|
+
/** Horizontal padding. */
|
|
8
|
+
"padding-x": "calc(var(--panneau-control-padding-x) + var(--panneau-space-1))",
|
|
9
|
+
/** Font size of the label. */
|
|
10
|
+
"font-size": "var(--panneau-font-size-md)",
|
|
11
|
+
/** Font weight of the label. */
|
|
12
|
+
"font-weight": "var(--panneau-font-weight-medium)",
|
|
13
|
+
/** Width of the border. */
|
|
14
|
+
"border-width": "var(--panneau-border-width)",
|
|
15
|
+
/** Corner radius. */
|
|
16
|
+
radius: "var(--panneau-radius-md)",
|
|
17
|
+
/** Horizontal padding of the small size. */
|
|
18
|
+
"padding-x-sm": "var(--panneau-control-padding-x)",
|
|
19
|
+
/** Font size of the small size. */
|
|
20
|
+
"font-size-sm": "var(--panneau-font-size-sm)"
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { buttonTokens };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","buttonTokens","gap","radius"],"sources":["../../src/button/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Button. */\nexport const buttonTokens = defineComponentTokens('button', {\n /** Space between the icon and the label. */\n gap: 'var(--panneau-space-2)',\n /** Horizontal padding. */\n 'padding-x': 'calc(var(--panneau-control-padding-x) + var(--panneau-space-1))',\n /** Font size of the label. */\n 'font-size': 'var(--panneau-font-size-md)',\n /** Font weight of the label. */\n 'font-weight': 'var(--panneau-font-weight-medium)',\n /** Width of the border. */\n 'border-width': 'var(--panneau-border-width)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-md)',\n /** Horizontal padding of the small size. */\n 'padding-x-sm': 'var(--panneau-control-padding-x)',\n /** Font size of the small size. */\n 'font-size-sm': 'var(--panneau-font-size-sm)',\n});\n"],"mappings":";;;AAGA,IAAaC,eAAeD,sBAAsB,UAAU;;CAExDE,KAAK;;CAEL,aAAa;;CAEb,aAAa;;CAEb,eAAe;;CAEf,gBAAgB;;CAEhBC,QAAQ;;CAER,gBAAgB;;CAEhB,gBAAgB;AACpB,CAAC"}
|
package/dist/card/Card.css
CHANGED
|
@@ -1,50 +1,57 @@
|
|
|
1
|
-
.panneau-card
|
|
1
|
+
.panneau-card {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
min-width: 0;
|
|
5
5
|
color: var(--panneau-color-text);
|
|
6
|
-
background-color: var(--panneau-color-surface);
|
|
7
|
-
border: var(--panneau-border-width
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
background-color: var(--panneau-card-bg, var(--panneau-color-surface));
|
|
7
|
+
border: var(--panneau-card-border-width, var(--panneau-border-width)) solid
|
|
8
|
+
var(--panneau-card-border-color, var(--panneau-color-border));
|
|
9
|
+
border-radius: var(--panneau-card-radius, var(--panneau-radius-lg));
|
|
10
|
+
box-shadow: var(--panneau-card-shadow, var(--panneau-shadow-sm));
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
.panneau-header
|
|
13
|
+
.panneau-card-header {
|
|
13
14
|
display: flex;
|
|
14
15
|
flex-wrap: wrap;
|
|
15
16
|
align-items: center;
|
|
16
17
|
justify-content: space-between;
|
|
17
18
|
gap: var(--panneau-space-2);
|
|
18
|
-
padding: var(--panneau-
|
|
19
|
-
|
|
19
|
+
padding: var(--panneau-card-header-padding-y, var(--panneau-space-3))
|
|
20
|
+
var(--panneau-card-padding-x, var(--panneau-space-4));
|
|
21
|
+
border-bottom: var(--panneau-card-border-width, var(--panneau-border-width)) solid
|
|
22
|
+
var(--panneau-card-border-color, var(--panneau-color-border));
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
.panneau-title
|
|
23
|
-
font-size: var(--panneau-font-size-lg);
|
|
24
|
-
font-weight: var(--panneau-font-weight-bold);
|
|
25
|
+
.panneau-card-title {
|
|
26
|
+
font-size: var(--panneau-card-title-font-size, var(--panneau-font-size-lg));
|
|
27
|
+
font-weight: var(--panneau-card-title-font-weight, var(--panneau-font-weight-bold));
|
|
25
28
|
line-height: var(--panneau-line-height-tight);
|
|
29
|
+
margin: 0;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
.panneau-body
|
|
32
|
+
.panneau-card-body {
|
|
29
33
|
display: flex;
|
|
30
34
|
flex-direction: column;
|
|
31
|
-
gap: var(--panneau-space-4);
|
|
32
|
-
padding: var(--panneau-space-4)
|
|
35
|
+
gap: var(--panneau-card-gap, var(--panneau-space-4));
|
|
36
|
+
padding: var(--panneau-card-padding-y, var(--panneau-space-4))
|
|
37
|
+
var(--panneau-card-padding-x, var(--panneau-space-4));
|
|
33
38
|
}
|
|
34
39
|
|
|
35
|
-
.panneau-footer
|
|
40
|
+
.panneau-card-footer {
|
|
36
41
|
display: flex;
|
|
37
42
|
flex-wrap: wrap;
|
|
38
43
|
justify-content: flex-end;
|
|
39
44
|
gap: var(--panneau-space-2);
|
|
40
|
-
padding: var(--panneau-
|
|
41
|
-
|
|
45
|
+
padding: var(--panneau-card-header-padding-y, var(--panneau-space-3))
|
|
46
|
+
var(--panneau-card-padding-x, var(--panneau-space-4));
|
|
47
|
+
border-top: var(--panneau-card-border-width, var(--panneau-border-width)) solid
|
|
48
|
+
var(--panneau-card-border-color, var(--panneau-color-border));
|
|
42
49
|
}
|
|
43
50
|
|
|
44
51
|
@media (max-width: 30rem) {
|
|
45
|
-
.panneau-header
|
|
46
|
-
.panneau-body
|
|
47
|
-
.panneau-footer
|
|
52
|
+
.panneau-card-header,
|
|
53
|
+
.panneau-card-body,
|
|
54
|
+
.panneau-card-footer {
|
|
48
55
|
padding-inline: var(--panneau-space-3);
|
|
49
56
|
}
|
|
50
57
|
}
|
package/dist/card/Card.js
CHANGED
|
@@ -1,36 +1,89 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import Card_module_default from "./Card.module.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { useId } from "react";
|
|
5
6
|
//#region src/card/Card.tsx
|
|
6
7
|
/** A surface that groups related content, with an optional header and footer. */
|
|
7
|
-
function Card(
|
|
8
|
+
function Card(t0) {
|
|
9
|
+
const $ = c(24);
|
|
10
|
+
const { title, headingLevel: t1, actions, children, footer, as, className, headerClassName, bodyClassName, footerClassName } = t0;
|
|
11
|
+
const headingLevel = t1 === void 0 ? 2 : t1;
|
|
8
12
|
const titleId = useId();
|
|
9
13
|
const hasTitle = title !== void 0 && title !== null;
|
|
10
14
|
const Element = as ?? (hasTitle ? "section" : "div");
|
|
11
15
|
const Heading = `h${headingLevel}`;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
className:
|
|
26
|
-
children
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
]
|
|
33
|
-
|
|
16
|
+
let t2;
|
|
17
|
+
if ($[0] !== className) {
|
|
18
|
+
t2 = cx("panneau-card", Card_module_default.card, className);
|
|
19
|
+
$[0] = className;
|
|
20
|
+
$[1] = t2;
|
|
21
|
+
} else t2 = $[1];
|
|
22
|
+
const t3 = hasTitle && Element !== "div" ? titleId : void 0;
|
|
23
|
+
let t4;
|
|
24
|
+
if ($[2] !== Heading || $[3] !== actions || $[4] !== hasTitle || $[5] !== headerClassName || $[6] !== title || $[7] !== titleId) {
|
|
25
|
+
t4 = hasTitle || actions !== void 0 && actions !== null ? /* @__PURE__ */ jsxs("header", {
|
|
26
|
+
className: cx(Card_module_default.header, headerClassName),
|
|
27
|
+
children: [hasTitle ? /* @__PURE__ */ jsx(Heading, {
|
|
28
|
+
id: titleId,
|
|
29
|
+
className: Card_module_default.title,
|
|
30
|
+
children: title
|
|
31
|
+
}) : /* @__PURE__ */ jsx("span", {}), actions]
|
|
32
|
+
}) : null;
|
|
33
|
+
$[2] = Heading;
|
|
34
|
+
$[3] = actions;
|
|
35
|
+
$[4] = hasTitle;
|
|
36
|
+
$[5] = headerClassName;
|
|
37
|
+
$[6] = title;
|
|
38
|
+
$[7] = titleId;
|
|
39
|
+
$[8] = t4;
|
|
40
|
+
} else t4 = $[8];
|
|
41
|
+
let t5;
|
|
42
|
+
if ($[9] !== bodyClassName) {
|
|
43
|
+
t5 = cx(Card_module_default.body, bodyClassName);
|
|
44
|
+
$[9] = bodyClassName;
|
|
45
|
+
$[10] = t5;
|
|
46
|
+
} else t5 = $[10];
|
|
47
|
+
let t6;
|
|
48
|
+
if ($[11] !== children || $[12] !== t5) {
|
|
49
|
+
t6 = /* @__PURE__ */ jsx("div", {
|
|
50
|
+
className: t5,
|
|
51
|
+
children
|
|
52
|
+
});
|
|
53
|
+
$[11] = children;
|
|
54
|
+
$[12] = t5;
|
|
55
|
+
$[13] = t6;
|
|
56
|
+
} else t6 = $[13];
|
|
57
|
+
let t7;
|
|
58
|
+
if ($[14] !== footer || $[15] !== footerClassName) {
|
|
59
|
+
t7 = footer !== void 0 && footer !== null ? /* @__PURE__ */ jsx("footer", {
|
|
60
|
+
className: cx(Card_module_default.footer, footerClassName),
|
|
61
|
+
children: footer
|
|
62
|
+
}) : null;
|
|
63
|
+
$[14] = footer;
|
|
64
|
+
$[15] = footerClassName;
|
|
65
|
+
$[16] = t7;
|
|
66
|
+
} else t7 = $[16];
|
|
67
|
+
let t8;
|
|
68
|
+
if ($[17] !== Element || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== t6 || $[22] !== t7) {
|
|
69
|
+
t8 = /* @__PURE__ */ jsxs(Element, {
|
|
70
|
+
className: t2,
|
|
71
|
+
"aria-labelledby": t3,
|
|
72
|
+
children: [
|
|
73
|
+
t4,
|
|
74
|
+
t6,
|
|
75
|
+
t7
|
|
76
|
+
]
|
|
77
|
+
});
|
|
78
|
+
$[17] = Element;
|
|
79
|
+
$[18] = t2;
|
|
80
|
+
$[19] = t3;
|
|
81
|
+
$[20] = t4;
|
|
82
|
+
$[21] = t6;
|
|
83
|
+
$[22] = t7;
|
|
84
|
+
$[23] = t8;
|
|
85
|
+
} else t8 = $[23];
|
|
86
|
+
return t8;
|
|
34
87
|
}
|
|
35
88
|
//#endregion
|
|
36
89
|
export { Card };
|
package/dist/card/Card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","names":["styles"],"sources":["../../src/card/Card.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Card.module.css';\n\nexport interface CardProps {\n /** Title in the header. */\n title?: ReactNode;\n /** Heading level of the title. Defaults to 2. */\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Content at the end of the header: actions, a status. */\n actions?: ReactNode;\n children?: ReactNode;\n footer?: ReactNode;\n /** Element of the card: `section` (default) with a title, `div` otherwise. */\n as?: 'section' | 'div' | 'article';\n className?: string;\n headerClassName?: string;\n bodyClassName?: string;\n footerClassName?: string;\n}\n\n/** A surface that groups related content, with an optional header and footer. */\nexport function Card({\n title,\n headingLevel = 2,\n actions,\n children,\n footer,\n as,\n className,\n headerClassName,\n bodyClassName,\n footerClassName,\n}: CardProps) {\n const titleId = useId();\n const hasTitle = title !== undefined && title !== null;\n const Element = as ?? (hasTitle ? 'section' : 'div');\n const Heading = `h${headingLevel}` as const;\n return (\n <Element\n className={cx(styles.card, className)}\n aria-labelledby={hasTitle && Element !== 'div' ? titleId : undefined}\n >\n {hasTitle || (actions !== undefined && actions !== null) ? (\n <header className={cx(styles.header, headerClassName)}>\n {hasTitle ? (\n <Heading id={titleId} className={styles.title}>\n {title}\n </Heading>\n ) : (\n <span />\n )}\n {actions}\n </header>\n ) : null}\n <div className={cx(styles.body, bodyClassName)}>{children}</div>\n {footer !== undefined && footer !== null ? (\n <footer className={cx(styles.footer, footerClassName)}>{footer}</footer>\n ) : null}\n </Element>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.js","names":["ReactNode","useId","cx","styles","CardProps","title","headingLevel","actions","children","footer","as","className","headerClassName","bodyClassName","footerClassName","Card","t0","$","_c","t1","undefined","titleId","hasTitle","Element","Heading","const","t2","card","t3","t4","header","t5","body","t6","t7","t8","_c","styles"],"sources":["../../src/card/Card.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Card.module.css';\n\nexport interface CardProps {\n /** Title in the header. */\n title?: ReactNode;\n /** Heading level of the title. Defaults to 2. */\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Content at the end of the header: actions, a status. */\n actions?: ReactNode;\n children?: ReactNode;\n footer?: ReactNode;\n /** Element of the card: `section` (default) with a title, `div` otherwise. */\n as?: 'section' | 'div' | 'article';\n className?: string;\n headerClassName?: string;\n bodyClassName?: string;\n footerClassName?: string;\n}\n\n/** A surface that groups related content, with an optional header and footer. */\nexport function Card({\n title,\n headingLevel = 2,\n actions,\n children,\n footer,\n as,\n className,\n headerClassName,\n bodyClassName,\n footerClassName,\n}: CardProps) {\n const titleId = useId();\n const hasTitle = title !== undefined && title !== null;\n const Element = as ?? (hasTitle ? 'section' : 'div');\n const Heading = `h${headingLevel}` as const;\n return (\n <Element\n className={cx('panneau-card', styles.card, className)}\n aria-labelledby={hasTitle && Element !== 'div' ? titleId : undefined}\n >\n {hasTitle || (actions !== undefined && actions !== null) ? (\n <header className={cx(styles.header, headerClassName)}>\n {hasTitle ? (\n <Heading id={titleId} className={styles.title}>\n {title}\n </Heading>\n ) : (\n <span />\n )}\n {actions}\n </header>\n ) : null}\n <div className={cx(styles.body, bodyClassName)}>{children}</div>\n {footer !== undefined && footer !== null ? (\n <footer className={cx(styles.footer, footerClassName)}>{footer}</footer>\n ) : null}\n </Element>\n );\n}\n"],"mappings":";;;;;;;AAuBA,SAAOe,KAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAc,MAAA,EAAAb,OAAAC,cAAAa,IAAAZ,SAAAC,UAAAC,QAAAC,IAAAC,WAAAC,iBAAAC,eAAAC,oBAAAE;CAEjB,MAAAV,eAAAa,OAAAC,KAAAA,IAAA,IAAAD;CAUA,MAAAE,UAAgBpB,MAAM;CACtB,MAAAqB,WAAiBjB,UAAUe,KAAAA,KAAaf,UAAU;CAClD,MAAAkB,UAAgBb,OAAOY,WAAA,YAAA;CACvB,MAAAE,UAAgB,IAAIlB;CAAwB,IAAAoB;CAAA,IAAAT,EAAA,OAAAN,WAAA;EAGzBe,KAAAxB,GAAG,gBAAgBC,oBAAMwB,MAAOhB,SAAS;EAACM,EAAA,KAAAN;EAAAM,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CACpC,MAAAW,KAAAN,YAAYC,YAAY,QAAxBF,UAAAD,KAAAA;CAAmD,IAAAS;CAAA,IAAAZ,EAAA,OAAAO,WAAAP,EAAA,OAAAV,WAAAU,EAAA,OAAAK,YAAAL,EAAA,OAAAL,mBAAAK,EAAA,OAAAZ,SAAAY,EAAA,OAAAI,SAAA;EAEnEQ,KAAAP,YAAaf,YAAYa,KAAAA,KAAab,YAAY,OAC/C,qBAAA,UAAA;GAAmB,WAAAL,GAAGC,oBAAM2B,QAASlB,eAAe;GAApD,UAAA,CACKU,WACG,oBAAC,SAAD;IAAaD,IAAAA;IAAoB,WAAAlB,oBAAME;IAClCA,UAAAA;GADG,CAAA,IAIR,oBAAA,QAAA,CAAQ,CAAA,GAEXE,OACI;EAVZ,CAAA,IAAA;EAWOU,EAAA,KAAAO;EAAAP,EAAA,KAAAV;EAAAU,EAAA,KAAAK;EAAAL,EAAA,KAAAL;EAAAK,EAAA,KAAAZ;EAAAY,EAAA,KAAAI;EAAAJ,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,IAAAc;CAAA,IAAAd,EAAA,OAAAJ,eAAA;EACQkB,KAAA7B,GAAGC,oBAAM6B,MAAOnB,aAAa;EAACI,EAAA,KAAAJ;EAAAI,EAAA,MAAAc;CAAA,OAAAA,KAAAd,EAAA;CAAA,IAAAgB;CAAA,IAAAhB,EAAA,QAAAT,YAAAS,EAAA,QAAAc,IAAA;EAA9CE,KAAA,oBAAA,OAAA;GAAgB,WAAAF;GAAiCvB;EAAe,CAAA;EAAAS,EAAA,MAAAT;EAAAS,EAAA,MAAAc;EAAAd,EAAA,MAAAgB;CAAA,OAAAA,KAAAhB,EAAA;CAAA,IAAAiB;CAAA,IAAAjB,EAAA,QAAAR,UAAAQ,EAAA,QAAAH,iBAAA;EAC/DoB,KAAAzB,WAAWW,KAAAA,KAAaX,WAAW,OAChC,oBAAA,UAAA;GAAmB,WAAAP,GAAGC,oBAAMM,QAASK,eAAe;GAAIL,UAAAA;EAAgB,CAAA,IAD3E;EAEOQ,EAAA,MAAAR;EAAAQ,EAAA,MAAAH;EAAAG,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,IAAAkB;CAAA,IAAAlB,EAAA,QAAAM,WAAAN,EAAA,QAAAS,MAAAT,EAAA,QAAAW,MAAAX,EAAA,QAAAY,MAAAZ,EAAA,QAAAgB,MAAAhB,EAAA,QAAAiB,IAAA;EAnBZC,KAAA,qBAAC,SAAD;GACe,WAAAT;GACM,mBAAAE;GAFrB,UAAA;IAIKC;IAYDI;IACCC;GAjBG;;EAoBEjB,EAAA,MAAAM;EAAAN,EAAA,MAAAS;EAAAT,EAAA,MAAAW;EAAAX,EAAA,MAAAY;EAAAZ,EAAA,MAAAgB;EAAAhB,EAAA,MAAAiB;EAAAjB,EAAA,MAAAkB;CAAA,OAAAA,KAAAlB,EAAA;CAAA,OApBVkB;AAoBU"}
|
package/dist/card/Card.module.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./Card.css";
|
|
2
2
|
//#region src/card/Card.module.css
|
|
3
|
-
var card = "panneau-card
|
|
4
|
-
var header = "panneau-header
|
|
5
|
-
var title = "panneau-title
|
|
6
|
-
var body = "panneau-body
|
|
7
|
-
var footer = "panneau-footer
|
|
3
|
+
var card = "panneau-card";
|
|
4
|
+
var header = "panneau-card-header";
|
|
5
|
+
var title = "panneau-card-title";
|
|
6
|
+
var body = "panneau-card-body";
|
|
7
|
+
var footer = "panneau-card-footer";
|
|
8
8
|
var Card_module_default = {
|
|
9
9
|
card,
|
|
10
10
|
header,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.module.js","names":[],"sources":["../../src/card/Card.module.css"],"sourcesContent":[".card {\n display: flex;\n flex-direction: column;\n min-width: 0;\n color: var(--panneau-color-text);\n background-color: var(--panneau-color-surface);\n border: var(--panneau-border-width) solid var(--panneau-color-border);\n border-radius: var(--panneau-radius-lg);\n box-shadow: var(--panneau-shadow-sm);\n}\n\n.header {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: var(--panneau-space-2);\n padding: var(--panneau-space-3) var(--panneau-space-4);\n border-bottom: var(--panneau-border-width) solid var(--panneau-color-border);\n}\n\n.title {\n font-size: var(--panneau-font-size-lg);\n font-weight: var(--panneau-font-weight-bold);\n line-height: var(--panneau-line-height-tight);\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-space-4);\n padding: var(--panneau-space-4);\n}\n\n.footer {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: var(--panneau-space-2);\n padding: var(--panneau-space-3) var(--panneau-space-4);\n border-top: var(--panneau-border-width) solid var(--panneau-color-border);\n}\n\n@media (max-width: 30rem) {\n .header,\n .body,\n .footer {\n padding-inline: var(--panneau-space-3);\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Card.module.js","names":[],"sources":["../../src/card/Card.module.css"],"sourcesContent":[".card {\n display: flex;\n flex-direction: column;\n min-width: 0;\n color: var(--panneau-color-text);\n background-color: var(--panneau-card-bg, var(--panneau-color-surface));\n border: var(--panneau-card-border-width, var(--panneau-border-width)) solid\n var(--panneau-card-border-color, var(--panneau-color-border));\n border-radius: var(--panneau-card-radius, var(--panneau-radius-lg));\n box-shadow: var(--panneau-card-shadow, var(--panneau-shadow-sm));\n}\n\n.header {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: var(--panneau-space-2);\n padding: var(--panneau-card-header-padding-y, var(--panneau-space-3))\n var(--panneau-card-padding-x, var(--panneau-space-4));\n border-bottom: var(--panneau-card-border-width, var(--panneau-border-width)) solid\n var(--panneau-card-border-color, var(--panneau-color-border));\n}\n\n.title {\n font-size: var(--panneau-card-title-font-size, var(--panneau-font-size-lg));\n font-weight: var(--panneau-card-title-font-weight, var(--panneau-font-weight-bold));\n line-height: var(--panneau-line-height-tight);\n margin: 0;\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-card-gap, var(--panneau-space-4));\n padding: var(--panneau-card-padding-y, var(--panneau-space-4))\n var(--panneau-card-padding-x, var(--panneau-space-4));\n}\n\n.footer {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: var(--panneau-space-2);\n padding: var(--panneau-card-header-padding-y, var(--panneau-space-3))\n var(--panneau-card-padding-x, var(--panneau-space-4));\n border-top: var(--panneau-card-border-width, var(--panneau-border-width)) solid\n var(--panneau-card-border-color, var(--panneau-color-border));\n}\n\n@media (max-width: 30rem) {\n .header,\n .body,\n .footer {\n padding-inline: var(--panneau-space-3);\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of Card. */
|
|
2
|
+
export declare const cardTokens: import("../index.js").ComponentTokens<"card", "panneau-card-radius" | "panneau-card-gap" | "panneau-card-padding-y" | "panneau-card-padding-x" | "panneau-card-border-width" | "panneau-card-title-font-weight" | "panneau-card-bg" | "panneau-card-border-color" | "panneau-card-shadow" | "panneau-card-header-padding-y" | "panneau-card-title-font-size">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/card/tokens.ts"],"names":[],"mappings":"AAEA,sBAAsB;AACtB,eAAO,MAAM,UAAU,sVAuBrB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/card/tokens.ts
|
|
3
|
+
/** Tokens of Card. */
|
|
4
|
+
var cardTokens = defineComponentTokens("card", {
|
|
5
|
+
/** Background. */
|
|
6
|
+
bg: "var(--panneau-color-surface)",
|
|
7
|
+
/** Width of the border and of the separators. */
|
|
8
|
+
"border-width": "var(--panneau-border-width)",
|
|
9
|
+
/** Color of the border and of the separators. */
|
|
10
|
+
"border-color": "var(--panneau-color-border)",
|
|
11
|
+
/** Corner radius. */
|
|
12
|
+
radius: "var(--panneau-radius-lg)",
|
|
13
|
+
/** Shadow. */
|
|
14
|
+
shadow: "var(--panneau-shadow-sm)",
|
|
15
|
+
/** Vertical padding of the header and the footer. */
|
|
16
|
+
"header-padding-y": "var(--panneau-space-3)",
|
|
17
|
+
/** Horizontal padding of every section. */
|
|
18
|
+
"padding-x": "var(--panneau-space-4)",
|
|
19
|
+
/** Font size of the title. */
|
|
20
|
+
"title-font-size": "var(--panneau-font-size-lg)",
|
|
21
|
+
/** Font weight of the title. */
|
|
22
|
+
"title-font-weight": "var(--panneau-font-weight-bold)",
|
|
23
|
+
/** Vertical padding of the body. */
|
|
24
|
+
"padding-y": "var(--panneau-space-4)",
|
|
25
|
+
/** Space between the children of the body. */
|
|
26
|
+
gap: "var(--panneau-space-4)"
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { cardTokens };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","cardTokens","bg","radius","shadow","gap"],"sources":["../../src/card/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Card. */\nexport const cardTokens = defineComponentTokens('card', {\n /** Background. */\n bg: 'var(--panneau-color-surface)',\n /** Width of the border and of the separators. */\n 'border-width': 'var(--panneau-border-width)',\n /** Color of the border and of the separators. */\n 'border-color': 'var(--panneau-color-border)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-lg)',\n /** Shadow. */\n shadow: 'var(--panneau-shadow-sm)',\n /** Vertical padding of the header and the footer. */\n 'header-padding-y': 'var(--panneau-space-3)',\n /** Horizontal padding of every section. */\n 'padding-x': 'var(--panneau-space-4)',\n /** Font size of the title. */\n 'title-font-size': 'var(--panneau-font-size-lg)',\n /** Font weight of the title. */\n 'title-font-weight': 'var(--panneau-font-weight-bold)',\n /** Vertical padding of the body. */\n 'padding-y': 'var(--panneau-space-4)',\n /** Space between the children of the body. */\n gap: 'var(--panneau-space-4)',\n});\n"],"mappings":";;;AAGA,IAAaC,aAAaD,sBAAsB,QAAQ;;CAEpDE,IAAI;;CAEJ,gBAAgB;;CAEhB,gBAAgB;;CAEhBC,QAAQ;;CAERC,QAAQ;;CAER,oBAAoB;;CAEpB,aAAa;;CAEb,mBAAmB;;CAEnB,qBAAqB;;CAErB,aAAa;;CAEbC,KAAK;AACT,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.panneau-field
|
|
1
|
+
.panneau-checkbox-field {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--panneau-space-1);
|
|
5
5
|
min-width: 0;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.panneau-checkbox-
|
|
8
|
+
.panneau-checkbox-control {
|
|
9
9
|
display: inline-flex;
|
|
10
10
|
align-items: flex-start;
|
|
11
11
|
gap: var(--panneau-space-2);
|
|
@@ -16,64 +16,65 @@
|
|
|
16
16
|
-webkit-tap-highlight-color: transparent;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.panneau-checkbox-
|
|
19
|
+
.panneau-checkbox-control[data-disabled] {
|
|
20
20
|
cursor: not-allowed;
|
|
21
21
|
opacity: 0.55;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.panneau-box
|
|
24
|
+
.panneau-checkbox-box {
|
|
25
25
|
display: flex;
|
|
26
26
|
flex: 0 0 auto;
|
|
27
27
|
align-items: center;
|
|
28
28
|
justify-content: center;
|
|
29
|
-
width: 1.125rem;
|
|
30
|
-
height: 1.125rem;
|
|
29
|
+
width: var(--panneau-checkbox-size, 1.125rem);
|
|
30
|
+
height: var(--panneau-checkbox-size, 1.125rem);
|
|
31
31
|
margin-top: 0.125rem;
|
|
32
|
-
color: var(--panneau-color-accent-text);
|
|
33
|
-
background-color: var(--panneau-color-surface);
|
|
34
|
-
border: var(--panneau-border-width) solid
|
|
35
|
-
|
|
32
|
+
color: var(--panneau-checkbox-checked-color, var(--panneau-color-accent-text));
|
|
33
|
+
background-color: var(--panneau-checkbox-bg, var(--panneau-color-surface));
|
|
34
|
+
border: var(--panneau-border-width) solid
|
|
35
|
+
var(--panneau-checkbox-border-color, var(--panneau-color-border-control));
|
|
36
|
+
border-radius: var(--panneau-checkbox-radius, var(--panneau-radius-sm));
|
|
36
37
|
transition:
|
|
37
38
|
background-color var(--panneau-duration),
|
|
38
39
|
border-color var(--panneau-duration);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
.panneau-checkbox-
|
|
42
|
+
.panneau-checkbox-control[data-hovered] .panneau-checkbox-box {
|
|
42
43
|
border-color: var(--panneau-color-text-muted);
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
.panneau-checkbox-
|
|
46
|
-
.panneau-checkbox-
|
|
47
|
-
background-color: var(--panneau-color-accent);
|
|
48
|
-
border-color: var(--panneau-color-accent);
|
|
46
|
+
.panneau-checkbox-control[data-selected] .panneau-checkbox-box,
|
|
47
|
+
.panneau-checkbox-control[data-indeterminate] .panneau-checkbox-box {
|
|
48
|
+
background-color: var(--panneau-checkbox-checked-bg, var(--panneau-color-accent));
|
|
49
|
+
border-color: var(--panneau-checkbox-checked-bg, var(--panneau-color-accent));
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
.panneau-checkbox-
|
|
52
|
+
.panneau-checkbox-control[data-invalid] .panneau-checkbox-box {
|
|
52
53
|
border-color: var(--panneau-color-danger);
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
.panneau-checkbox-
|
|
56
|
+
.panneau-checkbox-control[data-focus-visible] .panneau-checkbox-box {
|
|
56
57
|
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
57
58
|
outline-offset: 2px;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
.panneau-checkbox-
|
|
61
|
+
.panneau-checkbox-control[data-readonly] {
|
|
61
62
|
cursor: default;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
.panneau-label
|
|
65
|
+
.panneau-checkbox-label {
|
|
65
66
|
line-height: var(--panneau-line-height);
|
|
66
67
|
overflow-wrap: anywhere;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
/* Touch screens: a taller row, so the whole label is an easy target. */
|
|
70
71
|
@media (pointer: coarse) {
|
|
71
|
-
.panneau-checkbox-
|
|
72
|
+
.panneau-checkbox-control {
|
|
72
73
|
min-height: 2.75rem;
|
|
73
74
|
align-items: center;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
.panneau-box
|
|
77
|
+
.panneau-checkbox-box {
|
|
77
78
|
margin-top: 0;
|
|
78
79
|
}
|
|
79
80
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { type CheckboxProps as AriaCheckboxProps } from 'react-aria-components';
|
|
3
|
-
import { type ChoiceChromeProps } from './ChoiceChrome';
|
|
3
|
+
import { type ChoiceChromeProps } from './ChoiceChrome.js';
|
|
4
4
|
export interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'isInvalid' | 'validate'>, ChoiceChromeProps {
|
|
5
5
|
/** Label, next to the box. */
|
|
6
6
|
children?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/checkbox/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEH,KAAK,aAAa,IAAI,iBAAiB,EAC1C,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,MAAM,WAAW,aACb,SACI,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC,EACtF,iBAAiB;IACrB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,+EAA+E;AAC/E,wBAAgB,QAAQ,CAAC,EACrB,QAAQ,EACR,WAAW,EACX,MAAW,EACX,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,GAAG,KAAK,EACX,EAAE,aAAa,+
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/checkbox/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEH,KAAK,aAAa,IAAI,iBAAiB,EAC1C,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,MAAM,WAAW,aACb,SACI,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC,EACtF,iBAAiB;IACrB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,+EAA+E;AAC/E,wBAAgB,QAAQ,CAAC,EACrB,QAAQ,EACR,WAAW,EACX,MAAW,EACX,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,GAAG,KAAK,EACX,EAAE,aAAa,+BAoCf"}
|