@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,44 @@
|
|
|
1
|
+
//#region src/command-palette/match.ts
|
|
2
|
+
/** Lower case, without accents: `Été` and `ete` are the same. */
|
|
3
|
+
function normalizeSearch(text, locale) {
|
|
4
|
+
return text.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLocaleLowerCase(locale).trim();
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* How well an item matches a query, lower being better, or `null` when it doesn't: every word of
|
|
8
|
+
* the query must be in its label, description or keywords. A label that starts with the query
|
|
9
|
+
* comes first, then a label with a word that starts with it, then a label that contains it.
|
|
10
|
+
*/
|
|
11
|
+
function score(item, query, words, locale) {
|
|
12
|
+
const label = normalizeSearch(item.label, locale);
|
|
13
|
+
const text = normalizeSearch([
|
|
14
|
+
item.label,
|
|
15
|
+
item.description ?? "",
|
|
16
|
+
...item.keywords ?? []
|
|
17
|
+
].join(" "), locale);
|
|
18
|
+
if (!words.every((word) => text.includes(word))) return null;
|
|
19
|
+
if (label.startsWith(query)) return 0;
|
|
20
|
+
if (label.split(/\s+/).some((word) => word.startsWith(query))) return 1;
|
|
21
|
+
return label.includes(query) ? 2 : 3;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The groups of a palette for a query: the items that match it, ranked, in non-empty groups. Groups
|
|
25
|
+
* that are already `matched` keep their items, after the others. Without a query, every item.
|
|
26
|
+
*/
|
|
27
|
+
function matchCommands(groups, query, locale) {
|
|
28
|
+
const normalized = normalizeSearch(query, locale);
|
|
29
|
+
const words = normalized.split(/\s+/).filter((word) => word !== "");
|
|
30
|
+
const local = groups.filter((group) => group.matched !== true);
|
|
31
|
+
const remote = groups.filter((group) => group.matched === true);
|
|
32
|
+
return [...words.length === 0 ? local : local.map((group) => ({
|
|
33
|
+
...group,
|
|
34
|
+
items: group.items.map((item, index) => ({
|
|
35
|
+
item,
|
|
36
|
+
index,
|
|
37
|
+
rank: score(item, normalized, words, locale)
|
|
38
|
+
})).filter((entry) => entry.rank !== null).sort((a, b) => a.rank - b.rank || a.index - b.index).map(({ item }) => item)
|
|
39
|
+
})), ...remote].filter((group) => group.items.length > 0);
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { matchCommands, normalizeSearch };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=match.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.js","names":["IconComponent","CommandPaletteItem","id","label","description","keywords","icon","imageUrl","href","onAction","keepsOpen","CommandPaletteGroup","items","matched","normalizeSearch","text","locale","normalize","replace","toLocaleLowerCase","trim","score","item","query","words","join","every","word","includes","startsWith","split","some","matchCommands","groups","normalized","filter","local","group","remote","length","map","index","rank","entry","sort","a","b"],"sources":["../../src/command-palette/match.ts"],"sourcesContent":["import type { IconComponent } from '../icon/Icon';\n\n/** An item of a `CommandPalette`: a link to follow, or an action to run. */\nexport interface CommandPaletteItem {\n /** Unique in the palette. */\n id: string;\n label: string;\n /** A second line, such as the subtitle of an item or what an action does. */\n description?: string;\n /** More words it is found by, never shown. */\n keywords?: readonly string[];\n icon?: IconComponent;\n /** An image instead of an icon, such as the thumbnail of an item. */\n imageUrl?: string;\n /** A path or URL to go to, through the app's `RouterProvider`. */\n href?: string;\n /** Runs when the item is chosen, after which the palette closes. */\n onAction?: () => void;\n /** The palette stays open after `onAction`, such as an item that narrows the search. */\n keepsOpen?: boolean;\n}\n\n/** A titled group of items. */\nexport interface CommandPaletteGroup {\n id: string;\n label: string;\n items: readonly CommandPaletteItem[];\n /**\n * The items already match the query, such as results of a server: they are shown as they are,\n * after the groups that the palette matches itself.\n */\n matched?: boolean;\n}\n\n/** Lower case, without accents: `Été` and `ete` are the same. */\nexport function normalizeSearch(text: string, locale?: string): string {\n return text\n .normalize('NFD')\n .replace(/\\p{Diacritic}/gu, '')\n .toLocaleLowerCase(locale)\n .trim();\n}\n\n/**\n * How well an item matches a query, lower being better, or `null` when it doesn't: every word of\n * the query must be in its label, description or keywords. A label that starts with the query\n * comes first, then a label with a word that starts with it, then a label that contains it.\n */\nfunction score(item: CommandPaletteItem, query: string, words: string[], locale?: string) {\n const label = normalizeSearch(item.label, locale);\n const text = normalizeSearch(\n [item.label, item.description ?? '', ...(item.keywords ?? [])].join(' '),\n locale,\n );\n if (!words.every((word) => text.includes(word))) {\n return null;\n }\n if (label.startsWith(query)) {\n return 0;\n }\n if (label.split(/\\s+/).some((word) => word.startsWith(query))) {\n return 1;\n }\n return label.includes(query) ? 2 : 3;\n}\n\n/**\n * The groups of a palette for a query: the items that match it, ranked, in non-empty groups. Groups\n * that are already `matched` keep their items, after the others. Without a query, every item.\n */\nexport function matchCommands(\n groups: readonly CommandPaletteGroup[],\n query: string,\n locale?: string,\n): CommandPaletteGroup[] {\n const normalized = normalizeSearch(query, locale);\n const words = normalized.split(/\\s+/).filter((word) => word !== '');\n const local = groups.filter((group) => group.matched !== true);\n const remote = groups.filter((group) => group.matched === true);\n const matched =\n words.length === 0\n ? local\n : local.map((group) => ({\n ...group,\n items: group.items\n .map((item, index) => ({\n item,\n index,\n rank: score(item, normalized, words, locale),\n }))\n .filter(\n (entry): entry is typeof entry & { rank: number } => entry.rank !== null,\n )\n .sort((a, b) => a.rank - b.rank || a.index - b.index)\n .map(({ item }) => item),\n }));\n return [...matched, ...remote].filter((group) => group.items.length > 0);\n}\n"],"mappings":";;AAmCA,SAAgBc,gBAAgBC,MAAcC,QAAyB;CACnE,OAAOD,KACFE,UAAU,KAAK,CAAC,CAChBC,QAAQ,mBAAmB,EAAE,CAAC,CAC9BC,kBAAkBH,MAAM,CAAC,CACzBI,KAAK;AACd;;;;;;AAOA,SAASC,MAAMC,MAA0BC,OAAeC,OAAiBR,QAAiB;CACtF,MAAMb,QAAQW,gBAAgBQ,KAAKnB,OAAOa,MAAM;CAChD,MAAMD,OAAOD,gBACT;EAACQ,KAAKnB;EAAOmB,KAAKlB,eAAe;EAAI,GAAIkB,KAAKjB,YAAY,CAAA;CAAG,CAAC,CAACoB,KAAK,GAAG,GACvET,MACJ;CACA,IAAI,CAACQ,MAAME,OAAOC,SAASZ,KAAKa,SAASD,IAAI,CAAC,GAC1C,OAAO;CAEX,IAAIxB,MAAM0B,WAAWN,KAAK,GACtB,OAAO;CAEX,IAAIpB,MAAM2B,MAAM,KAAK,CAAC,CAACC,MAAMJ,SAASA,KAAKE,WAAWN,KAAK,CAAC,GACxD,OAAO;CAEX,OAAOpB,MAAMyB,SAASL,KAAK,IAAI,IAAI;AACvC;;;;;AAMA,SAAgBS,cACZC,QACAV,OACAP,QACqB;CACrB,MAAMkB,aAAapB,gBAAgBS,OAAOP,MAAM;CAChD,MAAMQ,QAAQU,WAAWJ,MAAM,KAAK,CAAC,CAACK,QAAQR,SAASA,SAAS,EAAE;CAClE,MAAMS,QAAQH,OAAOE,QAAQE,UAAUA,MAAMxB,YAAY,IAAI;CAC7D,MAAMyB,SAASL,OAAOE,QAAQE,UAAUA,MAAMxB,YAAY,IAAI;CAkB9D,OAAO,CAAC,GAhBJW,MAAMe,WAAW,IACXH,QACAA,MAAMI,KAAKH,WAAW;EAClB,GAAGA;EACHzB,OAAOyB,MAAMzB,MACR4B,KAAKlB,MAAMmB,WAAW;GACnBnB;GACAmB;GACAC,MAAMrB,MAAMC,MAAMY,YAAYV,OAAOR,MAAM;EAC/C,EAAE,CAAC,CACFmB,QACIQ,UAAoDA,MAAMD,SAAS,IACxE,CAAC,CACAE,MAAMC,GAAGC,MAAMD,EAAEH,OAAOI,EAAEJ,QAAQG,EAAEJ,QAAQK,EAAEL,KAAK,CAAC,CACpDD,KAAK,EAAElB,WAAWA,IAAI;CAC/B,EAAE,GACQ,GAAGgB,MAAM,CAAC,CAACH,QAAQE,UAAUA,MAAMzB,MAAM2B,SAAS,CAAC;AAC3E"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of CommandPalette. */
|
|
2
|
+
export declare const commandPaletteTokens: import("../index.js").ComponentTokens<"command-palette", "panneau-command-palette-width" | "panneau-command-palette-radius" | "panneau-command-palette-bg" | "panneau-command-palette-offset-top" | "panneau-command-palette-list-max-height" | "panneau-command-palette-item-radius" | "panneau-command-palette-item-active-bg">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/command-palette/tokens.ts"],"names":[],"mappings":"AAEA,gCAAgC;AAChC,eAAO,MAAM,oBAAoB,0TAe/B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/command-palette/tokens.ts
|
|
3
|
+
/** Tokens of CommandPalette. */
|
|
4
|
+
var commandPaletteTokens = defineComponentTokens("command-palette", {
|
|
5
|
+
/** Maximum width. */
|
|
6
|
+
width: "40rem",
|
|
7
|
+
/** Space above the palette, which opens near the top of the screen. */
|
|
8
|
+
"offset-top": "12dvh",
|
|
9
|
+
/** Maximum height of the list of results. */
|
|
10
|
+
"list-max-height": "60dvh",
|
|
11
|
+
/** Background. */
|
|
12
|
+
bg: "var(--panneau-color-surface-raised)",
|
|
13
|
+
/** Corner radius. */
|
|
14
|
+
radius: "var(--panneau-radius-lg)",
|
|
15
|
+
/** Corner radius of the items. */
|
|
16
|
+
"item-radius": "var(--panneau-radius-md)",
|
|
17
|
+
/** Background of the item chosen with the keyboard or the pointer. */
|
|
18
|
+
"item-active-bg": "var(--panneau-color-hover)"
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { commandPaletteTokens };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","commandPaletteTokens","width","bg","radius"],"sources":["../../src/command-palette/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of CommandPalette. */\nexport const commandPaletteTokens = defineComponentTokens('command-palette', {\n /** Maximum width. */\n width: '40rem',\n /** Space above the palette, which opens near the top of the screen. */\n 'offset-top': '12dvh',\n /** Maximum height of the list of results. */\n 'list-max-height': '60dvh',\n /** Background. */\n bg: 'var(--panneau-color-surface-raised)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-lg)',\n /** Corner radius of the items. */\n 'item-radius': 'var(--panneau-radius-md)',\n /** Background of the item chosen with the keyboard or the pointer. */\n 'item-active-bg': 'var(--panneau-color-hover)',\n});\n"],"mappings":";;;AAGA,IAAaC,uBAAuBD,sBAAsB,mBAAmB;;CAEzEE,OAAO;;CAEP,cAAc;;CAEd,mBAAmB;;CAEnBC,IAAI;;CAEJC,QAAQ;;CAER,eAAe;;CAEf,kBAAkB;AACtB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Whether the platform's shortcut key is ⌘ (Apple) rather than Ctrl. */
|
|
2
|
+
export declare function isApplePlatform(): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Calls `onToggle` on ⌘K (Apple) or Ctrl+K (elsewhere), to open or close a `CommandPalette`. The
|
|
5
|
+
* key is left alone when something already handled it (an editor that links with Mod-K), when it
|
|
6
|
+
* repeats, during a composition, or when another modal dialog is open while the palette is closed.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useCommandShortcut(onToggle: () => void, { isOpen, enabled }?: {
|
|
9
|
+
isOpen?: boolean;
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
}): void;
|
|
12
|
+
//# sourceMappingURL=useCommandShortcut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCommandShortcut.d.ts","sourceRoot":"","sources":["../../src/command-palette/useCommandShortcut.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAC9B,QAAQ,EAAE,MAAM,IAAI,EACpB,EAAE,MAAc,EAAE,OAAc,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GACjF,IAAI,CA2BN"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
//#region src/command-palette/useCommandShortcut.ts
|
|
4
|
+
/** Whether the platform's shortcut key is ⌘ (Apple) rather than Ctrl. */
|
|
5
|
+
function isApplePlatform() {
|
|
6
|
+
return typeof navigator !== "undefined" && /mac|iphone|ipad|ipod/i.test(navigator.platform);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Calls `onToggle` on ⌘K (Apple) or Ctrl+K (elsewhere), to open or close a `CommandPalette`. The
|
|
10
|
+
* key is left alone when something already handled it (an editor that links with Mod-K), when it
|
|
11
|
+
* repeats, during a composition, or when another modal dialog is open while the palette is closed.
|
|
12
|
+
*/
|
|
13
|
+
function useCommandShortcut(onToggle, t0) {
|
|
14
|
+
const $ = c(6);
|
|
15
|
+
let t1;
|
|
16
|
+
if ($[0] !== t0) {
|
|
17
|
+
t1 = t0 === void 0 ? {} : t0;
|
|
18
|
+
$[0] = t0;
|
|
19
|
+
$[1] = t1;
|
|
20
|
+
} else t1 = $[1];
|
|
21
|
+
const { isOpen: t2, enabled: t3 } = t1;
|
|
22
|
+
const isOpen = t2 === void 0 ? false : t2;
|
|
23
|
+
const enabled = t3 === void 0 ? true : t3;
|
|
24
|
+
let t4;
|
|
25
|
+
if ($[2] !== enabled || $[3] !== isOpen || $[4] !== onToggle) {
|
|
26
|
+
t4 = () => {
|
|
27
|
+
if (!enabled) return;
|
|
28
|
+
const onKeyDown = (event) => {
|
|
29
|
+
const modifier = isApplePlatform() ? event.metaKey : event.ctrlKey;
|
|
30
|
+
if (event.key.toLowerCase() !== "k" || !modifier || event.altKey || event.shiftKey || event.defaultPrevented || event.repeat || event.isComposing) return;
|
|
31
|
+
if (!isOpen && document.querySelector("[role=\"dialog\"][aria-modal=\"true\"]") !== null) return;
|
|
32
|
+
event.preventDefault();
|
|
33
|
+
onToggle();
|
|
34
|
+
};
|
|
35
|
+
window.addEventListener("keydown", onKeyDown);
|
|
36
|
+
return () => window.removeEventListener("keydown", onKeyDown);
|
|
37
|
+
};
|
|
38
|
+
$[2] = enabled;
|
|
39
|
+
$[3] = isOpen;
|
|
40
|
+
$[4] = onToggle;
|
|
41
|
+
$[5] = t4;
|
|
42
|
+
} else t4 = $[5];
|
|
43
|
+
useEffect(t4);
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { isApplePlatform, useCommandShortcut };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=useCommandShortcut.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCommandShortcut.js","names":["useEffect","isApplePlatform","navigator","test","platform","useCommandShortcut","onToggle","t0","$","_c","t1","undefined","isOpen","t2","enabled","t3","t4","onKeyDown","event","modifier","metaKey","ctrlKey","key","toLowerCase","altKey","shiftKey","defaultPrevented","repeat","isComposing","document","querySelector","preventDefault","window","addEventListener","removeEventListener","_c"],"sources":["../../src/command-palette/useCommandShortcut.ts"],"sourcesContent":["import { useEffect } from 'react';\n\n/** Whether the platform's shortcut key is ⌘ (Apple) rather than Ctrl. */\nexport function isApplePlatform(): boolean {\n return typeof navigator !== 'undefined' && /mac|iphone|ipad|ipod/i.test(navigator.platform);\n}\n\n/**\n * Calls `onToggle` on ⌘K (Apple) or Ctrl+K (elsewhere), to open or close a `CommandPalette`. The\n * key is left alone when something already handled it (an editor that links with Mod-K), when it\n * repeats, during a composition, or when another modal dialog is open while the palette is closed.\n */\nexport function useCommandShortcut(\n onToggle: () => void,\n { isOpen = false, enabled = true }: { isOpen?: boolean; enabled?: boolean } = {},\n): void {\n useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n const onKeyDown = (event: KeyboardEvent) => {\n const modifier = isApplePlatform() ? event.metaKey : event.ctrlKey;\n if (\n event.key.toLowerCase() !== 'k' ||\n !modifier ||\n event.altKey ||\n event.shiftKey ||\n event.defaultPrevented ||\n event.repeat ||\n event.isComposing\n ) {\n return;\n }\n if (!isOpen && document.querySelector('[role=\"dialog\"][aria-modal=\"true\"]') !== null) {\n return;\n }\n event.preventDefault();\n onToggle();\n };\n window.addEventListener('keydown', onKeyDown);\n return () => window.removeEventListener('keydown', onKeyDown);\n });\n}\n"],"mappings":";;;;AAGA,SAAgBC,kBAA2B;CACvC,OAAO,OAAOC,cAAc,eAAe,wBAAwBC,KAAKD,UAAUE,QAAQ;AAC9F;;;;;;AAOA,SAAOC,mBAAAC,UAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAEHG,KAAAH,OAAAI,KAAAA,IAAA,CAA+E,IAA/EJ;EAAgFC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAhF,MAAA,EAAAI,QAAAC,IAAAC,SAAAC,OAAAL;CAAE,MAAAE,SAAAC,OAAAF,KAAAA,IAAA,QAAAE;CAAgB,MAAAC,UAAAC,OAAAJ,KAAAA,IAAA,OAAAI;CAAc,IAAAC;CAAA,IAAAR,EAAA,OAAAM,WAAAN,EAAA,OAAAI,UAAAJ,EAAA,OAAAF,UAAA;EAEtBU,WAAA;GACN,IAAI,CAACF,SAAO;GAGZ,MAAAG,aAAkBC,UAAA;IACd,MAAAC,WAAiBlB,gBAAgD,IAA5BiB,MAAKE,UAAWF,MAAKG;IAC1D,IACIH,MAAKI,IAAIC,YAAa,MAAM,OAA5B,CACCJ,YACDD,MAAKM,UACLN,MAAKO,YACLP,MAAKQ,oBACLR,MAAKS,UACLT,MAAKU,aAAY;IAIrB,IAAI,CAAChB,UAAUiB,SAAQC,cAAe,wCAAoC,MAAM,MAAI;IAGpFZ,MAAKa,eAAgB;IACrBzB,SAAS;GAAC;GAEd0B,OAAMC,iBAAkB,WAAWhB,SAAS;GAAC,aAChCe,OAAME,oBAAqB,WAAWjB,SAAS;EAAC;EAChET,EAAA,KAAAM;EAAAN,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAzBDR,UAAUgB,EAyBT;AAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A centered column with a maximum width. It is a size container: the responsive props of the
|
|
3
|
+
* primitives inside it follow its width.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.panneau-container {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
width: 100%;
|
|
9
|
+
margin-inline: auto;
|
|
10
|
+
padding-inline: var(--panneau-container-padding-x, var(--panneau-space-4));
|
|
11
|
+
container-type: inline-size;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.panneau-container-sm {
|
|
15
|
+
max-width: var(--panneau-container-width-sm, 40rem);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.panneau-container-md {
|
|
19
|
+
max-width: var(--panneau-container-width-md, 48rem);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.panneau-container-lg {
|
|
23
|
+
max-width: var(--panneau-container-width-lg, 64rem);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.panneau-container-xl {
|
|
27
|
+
max-width: var(--panneau-container-width-xl, 80rem);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.panneau-container-flush {
|
|
31
|
+
padding-inline: 0;
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export interface ContainerProps extends HTMLAttributes<HTMLElement> {
|
|
3
|
+
/** Element to render. Defaults to `div`. */
|
|
4
|
+
as?: 'div' | 'section' | 'main' | 'article' | 'header' | 'footer';
|
|
5
|
+
/** Maximum width, from the `--panneau-container-width-*` tokens, or `full`. Defaults to `lg`. */
|
|
6
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
7
|
+
/** Removes the horizontal padding. */
|
|
8
|
+
flush?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A centered column with a maximum width. It is a size container: responsive props inside it follow
|
|
12
|
+
* its width. Like any size container, it needs a width from its parent: in a row, give it one.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Container({ as: Element, size, flush, className, ...props }: ContainerProps): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../src/container/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK5C,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,WAAW,CAAC;IAC/D,4CAA4C;IAC5C,EAAE,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAClE,iGAAiG;IACjG,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC1C,sCAAsC;IACtC,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EACtB,EAAE,EAAE,OAAe,EACnB,IAAW,EACX,KAAa,EACb,SAAS,EACT,GAAG,KAAK,EACX,EAAE,cAAc,+BAahB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import Container_module_default from "./Container.module.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/container/Container.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A centered column with a maximum width. It is a size container: responsive props inside it follow
|
|
8
|
+
* its width. Like any size container, it needs a width from its parent: in a row, give it one.
|
|
9
|
+
*/
|
|
10
|
+
function Container(t0) {
|
|
11
|
+
const $ = c(14);
|
|
12
|
+
let className;
|
|
13
|
+
let props;
|
|
14
|
+
let t1;
|
|
15
|
+
let t2;
|
|
16
|
+
let t3;
|
|
17
|
+
if ($[0] !== t0) {
|
|
18
|
+
({as: t1, size: t2, flush: t3, className, ...props} = t0);
|
|
19
|
+
$[0] = t0;
|
|
20
|
+
$[1] = className;
|
|
21
|
+
$[2] = props;
|
|
22
|
+
$[3] = t1;
|
|
23
|
+
$[4] = t2;
|
|
24
|
+
$[5] = t3;
|
|
25
|
+
} else {
|
|
26
|
+
className = $[1];
|
|
27
|
+
props = $[2];
|
|
28
|
+
t1 = $[3];
|
|
29
|
+
t2 = $[4];
|
|
30
|
+
t3 = $[5];
|
|
31
|
+
}
|
|
32
|
+
const Element = t1 === void 0 ? "div" : t1;
|
|
33
|
+
const size = t2 === void 0 ? "lg" : t2;
|
|
34
|
+
const flush = t3 === void 0 ? false : t3;
|
|
35
|
+
const t4 = size !== "full" && Container_module_default[size];
|
|
36
|
+
const t5 = flush && Container_module_default.flush;
|
|
37
|
+
let t6;
|
|
38
|
+
if ($[6] !== className || $[7] !== t4 || $[8] !== t5) {
|
|
39
|
+
t6 = cx("panneau-container", Container_module_default.container, t4, t5, className);
|
|
40
|
+
$[6] = className;
|
|
41
|
+
$[7] = t4;
|
|
42
|
+
$[8] = t5;
|
|
43
|
+
$[9] = t6;
|
|
44
|
+
} else t6 = $[9];
|
|
45
|
+
let t7;
|
|
46
|
+
if ($[10] !== Element || $[11] !== props || $[12] !== t6) {
|
|
47
|
+
t7 = /* @__PURE__ */ jsx(Element, {
|
|
48
|
+
...props,
|
|
49
|
+
className: t6
|
|
50
|
+
});
|
|
51
|
+
$[10] = Element;
|
|
52
|
+
$[11] = props;
|
|
53
|
+
$[12] = t6;
|
|
54
|
+
$[13] = t7;
|
|
55
|
+
} else t7 = $[13];
|
|
56
|
+
return t7;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Container };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=Container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.js","names":["HTMLAttributes","cx","styles","ContainerProps","HTMLElement","as","size","flush","Container","t0","$","_c","className","props","t1","t2","t3","Element","undefined","t4","t5","t6","container","t7","_c","styles"],"sources":["../../src/container/Container.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Container.module.css';\n\nexport interface ContainerProps extends HTMLAttributes<HTMLElement> {\n /** Element to render. Defaults to `div`. */\n as?: 'div' | 'section' | 'main' | 'article' | 'header' | 'footer';\n /** Maximum width, from the `--panneau-container-width-*` tokens, or `full`. Defaults to `lg`. */\n size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\n /** Removes the horizontal padding. */\n flush?: boolean;\n}\n\n/**\n * A centered column with a maximum width. It is a size container: responsive props inside it follow\n * its width. Like any size container, it needs a width from its parent: in a row, give it one.\n */\nexport function Container({\n as: Element = 'div',\n size = 'lg',\n flush = false,\n className,\n ...props\n}: ContainerProps) {\n return (\n <Element\n {...props}\n className={cx(\n 'panneau-container',\n styles.container,\n size !== 'full' && styles[size],\n flush && styles.flush,\n className,\n )}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAkBA,SAAOQ,UAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAN,EAAA,OAAAD,IAAA;EAAmB,CAAA,CAAAJ,IAAAS,IAAAR,MAAAS,IAAAR,OAAAS,IAAAJ,WAAA,GAAAC,SAAAJ;EAMTC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAA;EAAAJ,YAAAF,EAAA;EAAAG,QAAAH,EAAA;EAAAI,KAAAJ,EAAA;EAAAK,KAAAL,EAAA;EAAAM,KAAAN,EAAA;CAAA;CALT,MAAAO,UAAAH,OAAAI,KAAAA,IAAA,QAAAJ;CACJ,MAAAR,OAAAS,OAAAG,KAAAA,IAAA,OAAAH;CACA,MAAAR,QAAAS,OAAAE,KAAAA,IAAA,QAAAF;CAUY,MAAAG,KAAAb,SAAS,UAAUJ,yBAAOI;CAC1B,MAAAc,KAAAb,SAASL,yBAAMK;CAAM,IAAAc;CAAA,IAAAX,EAAA,OAAAE,aAAAF,EAAA,OAAAS,MAAAT,EAAA,OAAAU,IAAA;EAJdC,KAAApB,GACP,qBACAC,yBAAMoB,WACNH,IACAC,IACAR,SACJ;EAACF,EAAA,KAAAE;EAAAF,EAAA,KAAAS;EAAAT,EAAA,KAAAU;EAAAV,EAAA,KAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,QAAAO,WAAAP,EAAA,QAAAG,SAAAH,EAAA,QAAAW,IAAA;EARLE,KAAA,oBAAC,SAAD;GAAQ,GACAV;GACO,WAAAQ;EAMV,CAAA;EACHX,EAAA,MAAAO;EAAAP,EAAA,MAAAG;EAAAH,EAAA,MAAAW;EAAAX,EAAA,MAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OATFa;AASE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./Container.css";
|
|
2
|
+
//#region src/container/Container.module.css
|
|
3
|
+
var container = "panneau-container";
|
|
4
|
+
var sm = "panneau-container-sm";
|
|
5
|
+
var md = "panneau-container-md";
|
|
6
|
+
var lg = "panneau-container-lg";
|
|
7
|
+
var xl = "panneau-container-xl";
|
|
8
|
+
var flush = "panneau-container-flush";
|
|
9
|
+
var Container_module_default = {
|
|
10
|
+
container,
|
|
11
|
+
sm,
|
|
12
|
+
md,
|
|
13
|
+
lg,
|
|
14
|
+
xl,
|
|
15
|
+
flush
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { container, Container_module_default as default, flush, lg, md, sm, xl };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=Container.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.module.js","names":[],"sources":["../../src/container/Container.module.css"],"sourcesContent":["/*\n * A centered column with a maximum width. It is a size container: the responsive props of the\n * primitives inside it follow its width.\n */\n\n.container {\n box-sizing: border-box;\n width: 100%;\n margin-inline: auto;\n padding-inline: var(--panneau-container-padding-x, var(--panneau-space-4));\n container-type: inline-size;\n}\n\n.sm {\n max-width: var(--panneau-container-width-sm, 40rem);\n}\n\n.md {\n max-width: var(--panneau-container-width-md, 48rem);\n}\n\n.lg {\n max-width: var(--panneau-container-width-lg, 64rem);\n}\n\n.xl {\n max-width: var(--panneau-container-width-xl, 80rem);\n}\n\n.flush {\n padding-inline: 0;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of Container. */
|
|
2
|
+
export declare const containerTokens: import("../index.js").ComponentTokens<"container", "panneau-container-padding-x" | "panneau-container-width-sm" | "panneau-container-width-md" | "panneau-container-width-lg" | "panneau-container-width-xl">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/container/tokens.ts"],"names":[],"mappings":"AAEA,2BAA2B;AAC3B,eAAO,MAAM,eAAe,sMAW1B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/container/tokens.ts
|
|
3
|
+
/** Tokens of Container. */
|
|
4
|
+
var containerTokens = defineComponentTokens("container", {
|
|
5
|
+
/** Maximum width of the `sm` size. */
|
|
6
|
+
"width-sm": "40rem",
|
|
7
|
+
/** Maximum width of the `md` size. */
|
|
8
|
+
"width-md": "48rem",
|
|
9
|
+
/** Maximum width of the `lg` size, the default. */
|
|
10
|
+
"width-lg": "64rem",
|
|
11
|
+
/** Maximum width of the `xl` size. */
|
|
12
|
+
"width-xl": "80rem",
|
|
13
|
+
/** Horizontal padding. */
|
|
14
|
+
"padding-x": "var(--panneau-space-4)"
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { containerTokens };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","containerTokens"],"sources":["../../src/container/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Container. */\nexport const containerTokens = defineComponentTokens('container', {\n /** Maximum width of the `sm` size. */\n 'width-sm': '40rem',\n /** Maximum width of the `md` size. */\n 'width-md': '48rem',\n /** Maximum width of the `lg` size, the default. */\n 'width-lg': '64rem',\n /** Maximum width of the `xl` size. */\n 'width-xl': '80rem',\n /** Horizontal padding. */\n 'padding-x': 'var(--panneau-space-4)',\n});\n"],"mappings":";;;AAGA,IAAaC,kBAAkBD,sBAAsB,aAAa;;CAE9D,YAAY;;CAEZ,YAAY;;CAEZ,YAAY;;CAEZ,YAAY;;CAEZ,aAAa;AACjB,CAAC"}
|
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
.panneau-control
|
|
1
|
+
.panneau-date-picker-control.panneau-date-picker-control {
|
|
2
2
|
padding-inline-end: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.panneau-input
|
|
5
|
+
.panneau-date-picker-input {
|
|
6
6
|
display: flex;
|
|
7
7
|
flex: 1 1 auto;
|
|
8
8
|
align-items: center;
|
|
9
9
|
min-width: 0;
|
|
10
10
|
overflow-x: auto;
|
|
11
11
|
white-space: nowrap;
|
|
12
|
-
font-variant-numeric:
|
|
12
|
+
font-variant-numeric: var(--panneau-font-numeric);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.panneau-
|
|
15
|
+
.panneau-date-picker-segment {
|
|
16
16
|
padding: 0 0.0625rem;
|
|
17
17
|
border-radius: var(--panneau-radius-sm);
|
|
18
18
|
outline: none;
|
|
19
19
|
caret-color: transparent;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.panneau-
|
|
22
|
+
.panneau-date-picker-segment[data-type='literal'] {
|
|
23
23
|
padding: 0;
|
|
24
24
|
color: var(--panneau-color-text-muted);
|
|
25
|
+
/* The space of `10/15/2026, 9:30 AM`, which a flex item would drop */
|
|
26
|
+
white-space: pre;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
.panneau-
|
|
29
|
+
.panneau-date-picker-segment[data-placeholder] {
|
|
28
30
|
color: var(--panneau-color-text-muted);
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
.panneau-
|
|
33
|
+
.panneau-date-picker-segment[data-focused] {
|
|
32
34
|
color: var(--panneau-color-accent-text);
|
|
33
35
|
background-color: var(--panneau-color-accent);
|
|
34
36
|
}
|
|
35
37
|
|
|
36
|
-
.panneau-button
|
|
38
|
+
.panneau-date-picker-button {
|
|
37
39
|
display: flex;
|
|
38
40
|
align-items: center;
|
|
39
41
|
justify-content: center;
|
|
@@ -47,22 +49,58 @@
|
|
|
47
49
|
border-inline-start: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
.panneau-button
|
|
52
|
+
.panneau-date-picker-button[data-hovered] {
|
|
51
53
|
color: var(--panneau-color-text);
|
|
52
54
|
background-color: var(--panneau-color-hover);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
.panneau-button
|
|
57
|
+
.panneau-date-picker-button[data-focus-visible] {
|
|
56
58
|
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
57
59
|
outline-offset: -2px;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
/* As wide as the calendar, not as the field. */
|
|
63
|
+
.panneau-date-picker-popover.panneau-date-picker-popover {
|
|
64
|
+
min-width: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* The previous and next months. */
|
|
68
|
+
.panneau-date-picker-nav-button {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
width: var(--panneau-calendar-cell-size, 2.25rem);
|
|
73
|
+
height: var(--panneau-calendar-cell-size, 2.25rem);
|
|
74
|
+
padding: 0;
|
|
75
|
+
color: var(--panneau-color-text-muted);
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
background: transparent;
|
|
78
|
+
border: 0;
|
|
79
|
+
border-radius: var(--panneau-calendar-cell-radius, var(--panneau-radius-md));
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.panneau-date-picker-nav-button[data-hovered] {
|
|
84
|
+
color: var(--panneau-color-text);
|
|
85
|
+
background-color: var(--panneau-color-hover);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.panneau-date-picker-nav-button[data-focus-visible] {
|
|
89
|
+
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
90
|
+
outline-offset: -2px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.panneau-date-picker-nav-button[data-disabled] {
|
|
94
|
+
cursor: not-allowed;
|
|
95
|
+
opacity: 0.4;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.panneau-date-picker-calendar {
|
|
61
99
|
width: max-content;
|
|
62
100
|
max-width: 100%;
|
|
63
101
|
}
|
|
64
102
|
|
|
65
|
-
.panneau-header
|
|
103
|
+
.panneau-date-picker-header {
|
|
66
104
|
display: flex;
|
|
67
105
|
align-items: center;
|
|
68
106
|
justify-content: space-between;
|
|
@@ -70,66 +108,68 @@
|
|
|
70
108
|
margin-bottom: var(--panneau-space-2);
|
|
71
109
|
}
|
|
72
110
|
|
|
73
|
-
.panneau-
|
|
111
|
+
.panneau-date-picker-heading {
|
|
74
112
|
margin: 0;
|
|
75
113
|
font-size: var(--panneau-font-size-md);
|
|
76
114
|
font-weight: var(--panneau-font-weight-bold);
|
|
77
115
|
text-transform: capitalize;
|
|
78
116
|
}
|
|
79
117
|
|
|
80
|
-
.panneau-grid
|
|
118
|
+
.panneau-date-picker-grid {
|
|
81
119
|
border-collapse: collapse;
|
|
82
120
|
}
|
|
83
121
|
|
|
84
|
-
.panneau-weekday
|
|
122
|
+
.panneau-date-picker-weekday {
|
|
85
123
|
padding-bottom: var(--panneau-space-1);
|
|
86
124
|
font-size: var(--panneau-font-size-xs);
|
|
87
125
|
font-weight: var(--panneau-font-weight-medium);
|
|
88
126
|
color: var(--panneau-color-text-muted);
|
|
89
127
|
}
|
|
90
128
|
|
|
91
|
-
.panneau-cell
|
|
129
|
+
.panneau-date-picker-cell {
|
|
92
130
|
display: flex;
|
|
93
131
|
align-items: center;
|
|
94
132
|
justify-content: center;
|
|
95
|
-
width: 2.25rem;
|
|
96
|
-
height: 2.25rem;
|
|
133
|
+
width: var(--panneau-calendar-cell-size, 2.25rem);
|
|
134
|
+
height: var(--panneau-calendar-cell-size, 2.25rem);
|
|
97
135
|
font-size: var(--panneau-font-size-md);
|
|
98
|
-
font-variant-numeric:
|
|
136
|
+
font-variant-numeric: var(--panneau-font-numeric);
|
|
99
137
|
cursor: pointer;
|
|
100
|
-
border-radius: var(--panneau-radius-md);
|
|
138
|
+
border-radius: var(--panneau-calendar-cell-radius, var(--panneau-radius-md));
|
|
101
139
|
outline: none;
|
|
102
140
|
}
|
|
103
141
|
|
|
104
|
-
.panneau-cell
|
|
142
|
+
.panneau-date-picker-cell[data-outside-month] {
|
|
105
143
|
display: none;
|
|
106
144
|
}
|
|
107
145
|
|
|
108
|
-
.panneau-cell
|
|
146
|
+
.panneau-date-picker-cell[data-hovered] {
|
|
109
147
|
background-color: var(--panneau-color-hover);
|
|
110
148
|
}
|
|
111
149
|
|
|
112
|
-
.panneau-cell
|
|
113
|
-
color: var(--panneau-color-accent-text);
|
|
114
|
-
background-color: var(--panneau-color-accent);
|
|
150
|
+
.panneau-date-picker-cell[data-selected] {
|
|
151
|
+
color: var(--panneau-calendar-selected-color, var(--panneau-color-accent-text));
|
|
152
|
+
background-color: var(--panneau-calendar-selected-bg, var(--panneau-color-accent));
|
|
115
153
|
}
|
|
116
154
|
|
|
117
|
-
.panneau-cell
|
|
155
|
+
.panneau-date-picker-cell[data-today]:not([data-selected]) {
|
|
118
156
|
font-weight: var(--panneau-font-weight-bold);
|
|
119
157
|
box-shadow: inset 0 0 0 1px var(--panneau-color-border-control);
|
|
120
158
|
}
|
|
121
159
|
|
|
122
|
-
.panneau-cell
|
|
123
|
-
.panneau-cell
|
|
160
|
+
.panneau-date-picker-cell[data-disabled],
|
|
161
|
+
.panneau-date-picker-cell[data-unavailable] {
|
|
124
162
|
cursor: not-allowed;
|
|
125
163
|
opacity: 0.4;
|
|
126
164
|
}
|
|
127
165
|
|
|
128
|
-
.panneau-cell
|
|
166
|
+
.panneau-date-picker-cell[data-focus-visible] {
|
|
129
167
|
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
130
168
|
outline-offset: 1px;
|
|
131
169
|
}
|
|
132
170
|
|
|
133
|
-
.panneau-time
|
|
171
|
+
.panneau-date-picker-time {
|
|
134
172
|
margin-top: var(--panneau-space-3);
|
|
173
|
+
padding-top: var(--panneau-space-3);
|
|
174
|
+
border-top: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
135
175
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type DatePickerProps as AriaDatePickerProps, type DateValue } from 'react-aria-components';
|
|
2
|
-
import { type FieldChromeProps } from '../field/FieldParts';
|
|
2
|
+
import { type FieldChromeProps } from '../field/FieldParts.js';
|
|
3
3
|
export interface DatePickerProps extends Omit<AriaDatePickerProps<DateValue>, 'className' | 'style' | 'children' | 'isInvalid' | 'validate'>, FieldChromeProps {
|
|
4
4
|
controlClassName?: string;
|
|
5
5
|
popoverClassName?: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* A date, or a date and time with `granularity="minute"`, typed segment by segment in the order of
|
|
9
|
-
* the locale, or picked in a calendar.
|
|
9
|
+
* the locale, or picked in a calendar. With a time, the calendar has a field for it, and stays
|
|
10
|
+
* open after a day is picked. Values are `@internationalized/date` objects.
|
|
10
11
|
*/
|
|
11
12
|
export declare function DatePicker({ label, description, errors, isRequired, isReadOnly, className, labelClassName, descriptionClassName, errorsClassName, controlClassName, popoverClassName, ...props }: DatePickerProps): import("react").JSX.Element;
|
|
12
13
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../src/date-picker/DatePicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../src/date-picker/DatePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,eAAe,IAAI,mBAAmB,EAW3C,KAAK,SAAS,EAIjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACH,KAAK,gBAAgB,EAKxB,MAAM,qBAAqB,CAAC;AAiC7B,MAAM,WAAW,eACb,SACI,IAAI,CACA,mBAAmB,CAAC,SAAS,CAAC,EAC9B,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAChE,EACD,gBAAgB;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACvB,KAAK,EACL,WAAW,EACX,MAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,GAAG,KAAK,EACX,EAAE,eAAe,+BAgEjB"}
|