@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,31 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/menu/tokens.ts
|
|
3
|
+
/** Tokens of Menu: its sections, its footer, and the media and selection of its items. */
|
|
4
|
+
var menuTokens = defineComponentTokens("menu", {
|
|
5
|
+
/** Font size of the header of a section. */
|
|
6
|
+
"header-font-size": "var(--panneau-font-size-xs)",
|
|
7
|
+
/** Font weight of the header of a section. */
|
|
8
|
+
"header-font-weight": "var(--panneau-font-weight-medium)",
|
|
9
|
+
/** Color of the header of a section. */
|
|
10
|
+
"header-color": "var(--panneau-color-text-muted)",
|
|
11
|
+
/** Case of the header of a section: `uppercase` makes it an eyebrow, `none` keeps its text. */
|
|
12
|
+
"header-text-transform": "uppercase",
|
|
13
|
+
/** Letter spacing of the header of a section. */
|
|
14
|
+
"header-letter-spacing": "0.04em",
|
|
15
|
+
/** Font size of the footer note. */
|
|
16
|
+
"footer-font-size": "var(--panneau-font-size-xs)",
|
|
17
|
+
/** Color of the footer note. */
|
|
18
|
+
"footer-color": "var(--panneau-color-text-muted)",
|
|
19
|
+
/** Size of the leading media of an item. */
|
|
20
|
+
"media-size": "1.5rem",
|
|
21
|
+
/** Size of the leading media of an item with a description, on two lines. */
|
|
22
|
+
"media-size-described": "2rem",
|
|
23
|
+
/** Corner radius of the leading media of an item: its content is clipped to it. */
|
|
24
|
+
"media-radius": "var(--panneau-radius-full)",
|
|
25
|
+
/** Background of a selected item. */
|
|
26
|
+
"item-bg-selected": "var(--panneau-color-surface-sunken)"
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { menuTokens };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","menuTokens"],"sources":["../../src/menu/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Menu: its sections, its footer, and the media and selection of its items. */\nexport const menuTokens = defineComponentTokens('menu', {\n /** Font size of the header of a section. */\n 'header-font-size': 'var(--panneau-font-size-xs)',\n /** Font weight of the header of a section. */\n 'header-font-weight': 'var(--panneau-font-weight-medium)',\n /** Color of the header of a section. */\n 'header-color': 'var(--panneau-color-text-muted)',\n /** Case of the header of a section: `uppercase` makes it an eyebrow, `none` keeps its text. */\n 'header-text-transform': 'uppercase',\n /** Letter spacing of the header of a section. */\n 'header-letter-spacing': '0.04em',\n /** Font size of the footer note. */\n 'footer-font-size': 'var(--panneau-font-size-xs)',\n /** Color of the footer note. */\n 'footer-color': 'var(--panneau-color-text-muted)',\n /** Size of the leading media of an item. */\n 'media-size': '1.5rem',\n /** Size of the leading media of an item with a description, on two lines. */\n 'media-size-described': '2rem',\n /** Corner radius of the leading media of an item: its content is clipped to it. */\n 'media-radius': 'var(--panneau-radius-full)',\n /** Background of a selected item. */\n 'item-bg-selected': 'var(--panneau-color-surface-sunken)',\n});\n"],"mappings":";;;AAGA,IAAaC,aAAaD,sBAAsB,QAAQ;;CAEpD,oBAAoB;;CAEpB,sBAAsB;;CAEtB,gBAAgB;;CAEhB,yBAAyB;;CAEzB,yBAAyB;;CAEzB,oBAAoB;;CAEpB,gBAAgB;;CAEhB,cAAc;;CAEd,wBAAwB;;CAExB,gBAAgB;;CAEhB,oBAAoB;AACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/named-icons/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { lucideIconLoader } from "../icon/lucideIconLoader.js";
|
|
@@ -1,25 +1,39 @@
|
|
|
1
|
-
.panneau-control
|
|
1
|
+
.panneau-number-input-control.panneau-number-input-control {
|
|
2
2
|
padding-inline-end: 0;
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
7
|
-
|
|
6
|
+
/* Without steppers, the control has its padding back. */
|
|
7
|
+
.panneau-number-input-control.panneau-number-input-control[data-readonly] {
|
|
8
|
+
padding-inline-end: var(--panneau-input-padding-x, var(--panneau-control-padding-x));
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
.panneau-
|
|
11
|
+
.panneau-number-input-input {
|
|
12
|
+
font-variant-numeric: var(--panneau-font-numeric);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* The suffix sits between the value and the steppers, which have no padding of their own. */
|
|
16
|
+
.panneau-number-input-suffix.panneau-number-input-suffix {
|
|
17
|
+
margin-inline: var(--panneau-space-2);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.panneau-number-input-control[data-readonly] .panneau-number-input-suffix {
|
|
21
|
+
margin-inline-end: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.panneau-number-input-steppers {
|
|
11
25
|
display: flex;
|
|
12
26
|
flex-direction: column;
|
|
13
27
|
align-self: stretch;
|
|
14
28
|
border-inline-start: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
15
29
|
}
|
|
16
30
|
|
|
17
|
-
.panneau-stepper
|
|
31
|
+
.panneau-number-input-stepper {
|
|
18
32
|
display: flex;
|
|
19
33
|
flex: 1 1 0;
|
|
20
34
|
align-items: center;
|
|
21
35
|
justify-content: center;
|
|
22
|
-
width: 1.75rem;
|
|
36
|
+
width: var(--panneau-number-input-stepper-width, 1.75rem);
|
|
23
37
|
padding: 0;
|
|
24
38
|
color: var(--panneau-color-text-muted);
|
|
25
39
|
cursor: pointer;
|
|
@@ -27,31 +41,35 @@
|
|
|
27
41
|
border: 0;
|
|
28
42
|
}
|
|
29
43
|
|
|
30
|
-
.panneau-stepper
|
|
44
|
+
.panneau-number-input-stepper + .panneau-number-input-stepper {
|
|
31
45
|
border-top: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
32
46
|
}
|
|
33
47
|
|
|
34
|
-
.panneau-stepper
|
|
48
|
+
.panneau-number-input-stepper[data-hovered] {
|
|
35
49
|
color: var(--panneau-color-text);
|
|
36
50
|
background-color: var(--panneau-color-hover);
|
|
37
51
|
}
|
|
38
52
|
|
|
39
|
-
.panneau-stepper
|
|
53
|
+
.panneau-number-input-stepper[data-pressed] {
|
|
40
54
|
background-color: var(--panneau-color-pressed);
|
|
41
55
|
}
|
|
42
56
|
|
|
43
|
-
.panneau-stepper
|
|
57
|
+
.panneau-number-input-stepper[data-disabled] {
|
|
44
58
|
cursor: not-allowed;
|
|
45
59
|
opacity: 0.5;
|
|
46
60
|
}
|
|
47
61
|
|
|
48
62
|
/* Touch screens have their own keyboard for numbers: the steppers would be too small. */
|
|
49
63
|
@media (pointer: coarse) {
|
|
50
|
-
.panneau-steppers
|
|
64
|
+
.panneau-number-input-steppers {
|
|
51
65
|
display: none;
|
|
52
66
|
}
|
|
53
67
|
|
|
54
|
-
.panneau-control
|
|
68
|
+
.panneau-number-input-control.panneau-number-input-control {
|
|
55
69
|
padding-inline-end: var(--panneau-space-3);
|
|
56
70
|
}
|
|
71
|
+
|
|
72
|
+
.panneau-number-input-suffix.panneau-number-input-suffix {
|
|
73
|
+
margin-inline-end: 0;
|
|
74
|
+
}
|
|
57
75
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { type NumberFieldProps as AriaNumberFieldProps } from 'react-aria-components';
|
|
3
|
-
import { type FieldChromeProps } from '../field/FieldParts';
|
|
3
|
+
import { type FieldChromeProps } from '../field/FieldParts.js';
|
|
4
4
|
export interface NumberInputProps extends Omit<AriaNumberFieldProps, 'className' | 'style' | 'children' | 'isInvalid' | 'validate' | 'value' | 'defaultValue' | 'onChange'>, FieldChromeProps {
|
|
5
5
|
/** The number, or `null` when empty. */
|
|
6
6
|
value?: number | null;
|
|
@@ -3,6 +3,7 @@ import { Icon } from "../icon/Icon.js";
|
|
|
3
3
|
import Field_module_default from "../field/Field.module.js";
|
|
4
4
|
import { FieldDescription, FieldErrors, FieldLabel } from "../field/FieldParts.js";
|
|
5
5
|
import NumberInput_module_default from "./NumberInput.module.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
6
7
|
import { ChevronDown, ChevronUp } from "lucide-react";
|
|
7
8
|
import { Button, Group, Input, NumberField } from "react-aria-components";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -14,67 +15,238 @@ function toAria(value) {
|
|
|
14
15
|
* A number input, formatted for the locale, with steppers and arrow keys. An empty input is
|
|
15
16
|
* `null`, not `NaN`.
|
|
16
17
|
*/
|
|
17
|
-
function NumberInput(
|
|
18
|
+
function NumberInput(t0) {
|
|
19
|
+
const $ = c(69);
|
|
20
|
+
let className;
|
|
21
|
+
let controlClassName;
|
|
22
|
+
let defaultValue;
|
|
23
|
+
let description;
|
|
24
|
+
let descriptionClassName;
|
|
25
|
+
let errorsClassName;
|
|
26
|
+
let inputClassName;
|
|
27
|
+
let isReadOnly;
|
|
28
|
+
let isRequired;
|
|
29
|
+
let label;
|
|
30
|
+
let labelClassName;
|
|
31
|
+
let onChange;
|
|
32
|
+
let placeholder;
|
|
33
|
+
let props;
|
|
34
|
+
let suffix;
|
|
35
|
+
let t1;
|
|
36
|
+
let value;
|
|
37
|
+
if ($[0] !== t0) {
|
|
38
|
+
({label, description, errors: t1, value, defaultValue, onChange, placeholder, suffix, className, labelClassName, descriptionClassName, errorsClassName, controlClassName, inputClassName, isRequired, isReadOnly, ...props} = t0);
|
|
39
|
+
$[0] = t0;
|
|
40
|
+
$[1] = className;
|
|
41
|
+
$[2] = controlClassName;
|
|
42
|
+
$[3] = defaultValue;
|
|
43
|
+
$[4] = description;
|
|
44
|
+
$[5] = descriptionClassName;
|
|
45
|
+
$[6] = errorsClassName;
|
|
46
|
+
$[7] = inputClassName;
|
|
47
|
+
$[8] = isReadOnly;
|
|
48
|
+
$[9] = isRequired;
|
|
49
|
+
$[10] = label;
|
|
50
|
+
$[11] = labelClassName;
|
|
51
|
+
$[12] = onChange;
|
|
52
|
+
$[13] = placeholder;
|
|
53
|
+
$[14] = props;
|
|
54
|
+
$[15] = suffix;
|
|
55
|
+
$[16] = t1;
|
|
56
|
+
$[17] = value;
|
|
57
|
+
} else {
|
|
58
|
+
className = $[1];
|
|
59
|
+
controlClassName = $[2];
|
|
60
|
+
defaultValue = $[3];
|
|
61
|
+
description = $[4];
|
|
62
|
+
descriptionClassName = $[5];
|
|
63
|
+
errorsClassName = $[6];
|
|
64
|
+
inputClassName = $[7];
|
|
65
|
+
isReadOnly = $[8];
|
|
66
|
+
isRequired = $[9];
|
|
67
|
+
label = $[10];
|
|
68
|
+
labelClassName = $[11];
|
|
69
|
+
onChange = $[12];
|
|
70
|
+
placeholder = $[13];
|
|
71
|
+
props = $[14];
|
|
72
|
+
suffix = $[15];
|
|
73
|
+
t1 = $[16];
|
|
74
|
+
value = $[17];
|
|
75
|
+
}
|
|
76
|
+
let t2;
|
|
77
|
+
if ($[18] !== t1) {
|
|
78
|
+
t2 = t1 === void 0 ? [] : t1;
|
|
79
|
+
$[18] = t1;
|
|
80
|
+
$[19] = t2;
|
|
81
|
+
} else t2 = $[19];
|
|
82
|
+
const errors = t2;
|
|
18
83
|
const invalid = errors.length > 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
]
|
|
77
|
-
|
|
84
|
+
let t3;
|
|
85
|
+
if ($[20] !== value) {
|
|
86
|
+
t3 = toAria(value);
|
|
87
|
+
$[20] = value;
|
|
88
|
+
$[21] = t3;
|
|
89
|
+
} else t3 = $[21];
|
|
90
|
+
let t4;
|
|
91
|
+
if ($[22] !== defaultValue) {
|
|
92
|
+
t4 = toAria(defaultValue);
|
|
93
|
+
$[22] = defaultValue;
|
|
94
|
+
$[23] = t4;
|
|
95
|
+
} else t4 = $[23];
|
|
96
|
+
let t5;
|
|
97
|
+
if ($[24] !== onChange) {
|
|
98
|
+
t5 = (next) => onChange?.(Number.isNaN(next) ? null : next);
|
|
99
|
+
$[24] = onChange;
|
|
100
|
+
$[25] = t5;
|
|
101
|
+
} else t5 = $[25];
|
|
102
|
+
let t6;
|
|
103
|
+
if ($[26] !== className) {
|
|
104
|
+
t6 = cx("panneau-number-input", Field_module_default.field, className);
|
|
105
|
+
$[26] = className;
|
|
106
|
+
$[27] = t6;
|
|
107
|
+
} else t6 = $[27];
|
|
108
|
+
let t7;
|
|
109
|
+
if ($[28] !== isRequired || $[29] !== label || $[30] !== labelClassName) {
|
|
110
|
+
t7 = /* @__PURE__ */ jsx(FieldLabel, {
|
|
111
|
+
isRequired,
|
|
112
|
+
className: labelClassName,
|
|
113
|
+
children: label
|
|
114
|
+
});
|
|
115
|
+
$[28] = isRequired;
|
|
116
|
+
$[29] = label;
|
|
117
|
+
$[30] = labelClassName;
|
|
118
|
+
$[31] = t7;
|
|
119
|
+
} else t7 = $[31];
|
|
120
|
+
let t8;
|
|
121
|
+
if ($[32] !== controlClassName) {
|
|
122
|
+
t8 = cx(Field_module_default.control, NumberInput_module_default.control, controlClassName);
|
|
123
|
+
$[32] = controlClassName;
|
|
124
|
+
$[33] = t8;
|
|
125
|
+
} else t8 = $[33];
|
|
126
|
+
const t9 = invalid || void 0;
|
|
127
|
+
const t10 = isReadOnly || void 0;
|
|
128
|
+
let t11;
|
|
129
|
+
if ($[34] !== inputClassName) {
|
|
130
|
+
t11 = cx(Field_module_default.bare, NumberInput_module_default.input, inputClassName);
|
|
131
|
+
$[34] = inputClassName;
|
|
132
|
+
$[35] = t11;
|
|
133
|
+
} else t11 = $[35];
|
|
134
|
+
let t12;
|
|
135
|
+
if ($[36] !== placeholder || $[37] !== t11) {
|
|
136
|
+
t12 = /* @__PURE__ */ jsx(Input, {
|
|
137
|
+
placeholder,
|
|
138
|
+
className: t11
|
|
139
|
+
});
|
|
140
|
+
$[36] = placeholder;
|
|
141
|
+
$[37] = t11;
|
|
142
|
+
$[38] = t12;
|
|
143
|
+
} else t12 = $[38];
|
|
144
|
+
let t13;
|
|
145
|
+
if ($[39] !== suffix) {
|
|
146
|
+
t13 = suffix !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
147
|
+
className: cx(Field_module_default.adornment, NumberInput_module_default.suffix),
|
|
148
|
+
children: suffix
|
|
149
|
+
}) : null;
|
|
150
|
+
$[39] = suffix;
|
|
151
|
+
$[40] = t13;
|
|
152
|
+
} else t13 = $[40];
|
|
153
|
+
let t14;
|
|
154
|
+
if ($[41] !== isReadOnly) {
|
|
155
|
+
t14 = isReadOnly !== true ? /* @__PURE__ */ jsxs("span", {
|
|
156
|
+
className: NumberInput_module_default.steppers,
|
|
157
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
158
|
+
slot: "increment",
|
|
159
|
+
className: NumberInput_module_default.stepper,
|
|
160
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
161
|
+
icon: ChevronUp,
|
|
162
|
+
size: "xs"
|
|
163
|
+
})
|
|
164
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
165
|
+
slot: "decrement",
|
|
166
|
+
className: NumberInput_module_default.stepper,
|
|
167
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
168
|
+
icon: ChevronDown,
|
|
169
|
+
size: "xs"
|
|
170
|
+
})
|
|
171
|
+
})]
|
|
172
|
+
}) : null;
|
|
173
|
+
$[41] = isReadOnly;
|
|
174
|
+
$[42] = t14;
|
|
175
|
+
} else t14 = $[42];
|
|
176
|
+
let t15;
|
|
177
|
+
if ($[43] !== t10 || $[44] !== t12 || $[45] !== t13 || $[46] !== t14 || $[47] !== t8 || $[48] !== t9) {
|
|
178
|
+
t15 = /* @__PURE__ */ jsxs(Group, {
|
|
179
|
+
className: t8,
|
|
180
|
+
"data-invalid": t9,
|
|
181
|
+
"data-readonly": t10,
|
|
182
|
+
children: [
|
|
183
|
+
t12,
|
|
184
|
+
t13,
|
|
185
|
+
t14
|
|
186
|
+
]
|
|
187
|
+
});
|
|
188
|
+
$[43] = t10;
|
|
189
|
+
$[44] = t12;
|
|
190
|
+
$[45] = t13;
|
|
191
|
+
$[46] = t14;
|
|
192
|
+
$[47] = t8;
|
|
193
|
+
$[48] = t9;
|
|
194
|
+
$[49] = t15;
|
|
195
|
+
} else t15 = $[49];
|
|
196
|
+
let t16;
|
|
197
|
+
if ($[50] !== description || $[51] !== descriptionClassName) {
|
|
198
|
+
t16 = /* @__PURE__ */ jsx(FieldDescription, {
|
|
199
|
+
className: descriptionClassName,
|
|
200
|
+
children: description
|
|
201
|
+
});
|
|
202
|
+
$[50] = description;
|
|
203
|
+
$[51] = descriptionClassName;
|
|
204
|
+
$[52] = t16;
|
|
205
|
+
} else t16 = $[52];
|
|
206
|
+
let t17;
|
|
207
|
+
if ($[53] !== errors || $[54] !== errorsClassName) {
|
|
208
|
+
t17 = /* @__PURE__ */ jsx(FieldErrors, {
|
|
209
|
+
errors,
|
|
210
|
+
className: errorsClassName
|
|
211
|
+
});
|
|
212
|
+
$[53] = errors;
|
|
213
|
+
$[54] = errorsClassName;
|
|
214
|
+
$[55] = t17;
|
|
215
|
+
} else t17 = $[55];
|
|
216
|
+
let t18;
|
|
217
|
+
if ($[56] !== invalid || $[57] !== isReadOnly || $[58] !== isRequired || $[59] !== props || $[60] !== t15 || $[61] !== t16 || $[62] !== t17 || $[63] !== t3 || $[64] !== t4 || $[65] !== t5 || $[66] !== t6 || $[67] !== t7) {
|
|
218
|
+
t18 = /* @__PURE__ */ jsxs(NumberField, {
|
|
219
|
+
...props,
|
|
220
|
+
value: t3,
|
|
221
|
+
defaultValue: t4,
|
|
222
|
+
onChange: t5,
|
|
223
|
+
isRequired,
|
|
224
|
+
isReadOnly,
|
|
225
|
+
isInvalid: invalid,
|
|
226
|
+
validationBehavior: "aria",
|
|
227
|
+
className: t6,
|
|
228
|
+
children: [
|
|
229
|
+
t7,
|
|
230
|
+
t15,
|
|
231
|
+
t16,
|
|
232
|
+
t17
|
|
233
|
+
]
|
|
234
|
+
});
|
|
235
|
+
$[56] = invalid;
|
|
236
|
+
$[57] = isReadOnly;
|
|
237
|
+
$[58] = isRequired;
|
|
238
|
+
$[59] = props;
|
|
239
|
+
$[60] = t15;
|
|
240
|
+
$[61] = t16;
|
|
241
|
+
$[62] = t17;
|
|
242
|
+
$[63] = t3;
|
|
243
|
+
$[64] = t4;
|
|
244
|
+
$[65] = t5;
|
|
245
|
+
$[66] = t6;
|
|
246
|
+
$[67] = t7;
|
|
247
|
+
$[68] = t18;
|
|
248
|
+
} else t18 = $[68];
|
|
249
|
+
return t18;
|
|
78
250
|
}
|
|
79
251
|
//#endregion
|
|
80
252
|
export { NumberInput };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.js","names":["fieldStyles","styles"],"sources":["../../src/number-input/NumberInput.tsx"],"sourcesContent":["import { ChevronDown, ChevronUp } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport {\n type NumberFieldProps as AriaNumberFieldProps,\n Button,\n Group,\n Input,\n NumberField,\n} from 'react-aria-components';\n\nimport {\n type FieldChromeProps,\n FieldDescription,\n FieldErrors,\n FieldLabel,\n fieldStyles,\n} from '../field/FieldParts';\nimport { Icon } from '../icon/Icon';\nimport { cx } from '../utils/cx';\nimport styles from './NumberInput.module.css';\n\nexport interface NumberInputProps\n extends\n Omit<\n AriaNumberFieldProps,\n | 'className'\n | 'style'\n | 'children'\n | 'isInvalid'\n | 'validate'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >,\n FieldChromeProps {\n /** The number, or `null` when empty. */\n value?: number | null;\n defaultValue?: number | null;\n /** Called with the number, or `null` when the input is cleared. */\n onChange?: (value: number | null) => void;\n placeholder?: string;\n /** Content after the number, inside the control: a unit. */\n suffix?: ReactNode;\n controlClassName?: string;\n inputClassName?: string;\n}\n\nfunction toAria(value: number | null | undefined): number | undefined {\n return value === null ? Number.NaN : value;\n}\n\n/**\n * A number input, formatted for the locale, with steppers and arrow keys. An empty input is\n * `null`, not `NaN`.\n */\nexport function NumberInput({\n label,\n description,\n errors = [],\n value,\n defaultValue,\n onChange,\n placeholder,\n suffix,\n className,\n labelClassName,\n descriptionClassName,\n errorsClassName,\n controlClassName,\n inputClassName,\n isRequired,\n isReadOnly,\n ...props\n}: NumberInputProps) {\n const invalid = errors.length > 0;\n return (\n <NumberField\n {...props}\n value={toAria(value)}\n defaultValue={toAria(defaultValue)}\n onChange={(next) => onChange?.(Number.isNaN(next) ? null : next)}\n isRequired={isRequired}\n isReadOnly={isReadOnly}\n isInvalid={invalid}\n validationBehavior=\"aria\"\n className={cx(fieldStyles.field, className)}\n >\n <FieldLabel isRequired={isRequired} className={labelClassName}>\n {label}\n </FieldLabel>\n <Group\n className={cx(fieldStyles.control, styles.control, controlClassName)}\n data-invalid={invalid || undefined}\n data-readonly={isReadOnly || undefined}\n >\n <Input\n placeholder={placeholder}\n className={cx(fieldStyles.bare, styles.input, inputClassName)}\n />\n {suffix !== undefined ? (\n <span className={fieldStyles.adornment}>{suffix}</span>\n ) : null}\n {isReadOnly !== true ? (\n <span className={styles.steppers}>\n <Button slot=\"increment\" className={styles.stepper}>\n <Icon icon={ChevronUp} size=\"xs\" />\n </Button>\n <Button slot=\"decrement\" className={styles.stepper}>\n <Icon icon={ChevronDown} size=\"xs\" />\n </Button>\n </span>\n ) : null}\n </Group>\n <FieldDescription className={descriptionClassName}>{description}</FieldDescription>\n <FieldErrors errors={errors} className={errorsClassName} />\n </NumberField>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NumberInput.js","names":["ChevronDown","ChevronUp","ReactNode","NumberFieldProps","AriaNumberFieldProps","Button","Group","Input","NumberField","FieldChromeProps","FieldDescription","FieldErrors","FieldLabel","fieldStyles","Icon","cx","styles","NumberInputProps","Omit","value","defaultValue","onChange","placeholder","suffix","controlClassName","inputClassName","toAria","Number","NaN","NumberInput","t0","$","_c","className","description","descriptionClassName","errorsClassName","isReadOnly","isRequired","label","labelClassName","props","t1","errors","t2","undefined","invalid","length","t3","t4","t5","next","isNaN","t6","field","t7","t8","control","t9","t10","t11","bare","input","t12","t13","adornment","t14","steppers","stepper","t15","t16","t17","t18","_c","fieldStyles","styles"],"sources":["../../src/number-input/NumberInput.tsx"],"sourcesContent":["import { ChevronDown, ChevronUp } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport {\n type NumberFieldProps as AriaNumberFieldProps,\n Button,\n Group,\n Input,\n NumberField,\n} from 'react-aria-components';\n\nimport {\n type FieldChromeProps,\n FieldDescription,\n FieldErrors,\n FieldLabel,\n fieldStyles,\n} from '../field/FieldParts';\nimport { Icon } from '../icon/Icon';\nimport { cx } from '../utils/cx';\nimport styles from './NumberInput.module.css';\n\nexport interface NumberInputProps\n extends\n Omit<\n AriaNumberFieldProps,\n | 'className'\n | 'style'\n | 'children'\n | 'isInvalid'\n | 'validate'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >,\n FieldChromeProps {\n /** The number, or `null` when empty. */\n value?: number | null;\n defaultValue?: number | null;\n /** Called with the number, or `null` when the input is cleared. */\n onChange?: (value: number | null) => void;\n placeholder?: string;\n /** Content after the number, inside the control: a unit. */\n suffix?: ReactNode;\n controlClassName?: string;\n inputClassName?: string;\n}\n\nfunction toAria(value: number | null | undefined): number | undefined {\n return value === null ? Number.NaN : value;\n}\n\n/**\n * A number input, formatted for the locale, with steppers and arrow keys. An empty input is\n * `null`, not `NaN`.\n */\nexport function NumberInput({\n label,\n description,\n errors = [],\n value,\n defaultValue,\n onChange,\n placeholder,\n suffix,\n className,\n labelClassName,\n descriptionClassName,\n errorsClassName,\n controlClassName,\n inputClassName,\n isRequired,\n isReadOnly,\n ...props\n}: NumberInputProps) {\n const invalid = errors.length > 0;\n return (\n <NumberField\n {...props}\n value={toAria(value)}\n defaultValue={toAria(defaultValue)}\n onChange={(next) => onChange?.(Number.isNaN(next) ? null : next)}\n isRequired={isRequired}\n isReadOnly={isReadOnly}\n isInvalid={invalid}\n validationBehavior=\"aria\"\n className={cx('panneau-number-input', fieldStyles.field, className)}\n >\n <FieldLabel isRequired={isRequired} className={labelClassName}>\n {label}\n </FieldLabel>\n <Group\n className={cx(fieldStyles.control, styles.control, controlClassName)}\n data-invalid={invalid || undefined}\n data-readonly={isReadOnly || undefined}\n >\n <Input\n placeholder={placeholder}\n className={cx(fieldStyles.bare, styles.input, inputClassName)}\n />\n {suffix !== undefined ? (\n <span className={cx(fieldStyles.adornment, styles.suffix)}>{suffix}</span>\n ) : null}\n {isReadOnly !== true ? (\n <span className={styles.steppers}>\n <Button slot=\"increment\" className={styles.stepper}>\n <Icon icon={ChevronUp} size=\"xs\" />\n </Button>\n <Button slot=\"decrement\" className={styles.stepper}>\n <Icon icon={ChevronDown} size=\"xs\" />\n </Button>\n </span>\n ) : null}\n </Group>\n <FieldDescription className={descriptionClassName}>{description}</FieldDescription>\n <FieldErrors errors={errors} className={errorsClassName} />\n </NumberField>\n );\n}\n"],"mappings":";;;;;;;;;;AA+CA,SAAS0B,OAAOP,OAAsD;CAClE,OAAOA,UAAU,OAAOQ,MAAaR;AACzC;;;;;AAMA,SAAOU,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAT;CAAA,IAAAJ;CAAA,IAAAc;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAX;CAAA,IAAAY;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAnB;CAAA,IAAAC;CAAA,IAAAmB;CAAA,IAAAlB;CAAA,IAAAmB;CAAA,IAAAvB;CAAA,IAAAY,EAAA,OAAAD,IAAA;EAAqB,CAAA,CAAAS,OAAAL,aAAAS,QAAAD,IAAA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AAV,EAAA,MAAAsC;EAAAtC,EAAA,MAAAuC;EAAAvC,EAAA,MAAAwC;EAAAxC,EAAA,MAAAiB;EAAAjB,EAAA,MAAAkB;EAAAlB,EAAA,MAAAmB;EAAAnB,EAAA,MAAAsB;EAAAtB,EAAA,MAAAwB;EAAAxB,EAAA,MAAAyC;CAAA,OAAAA,MAAAzC,EAAA;CAAA,OAvCdyC;AAuCc"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import "./NumberInput.css";
|
|
2
2
|
//#region src/number-input/NumberInput.module.css
|
|
3
|
-
var control = "panneau-control
|
|
4
|
-
var input = "panneau-input-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var control = "panneau-number-input-control";
|
|
4
|
+
var input = "panneau-number-input-input";
|
|
5
|
+
var suffix = "panneau-number-input-suffix";
|
|
6
|
+
var steppers = "panneau-number-input-steppers";
|
|
7
|
+
var stepper = "panneau-number-input-stepper";
|
|
7
8
|
var NumberInput_module_default = {
|
|
8
9
|
control,
|
|
9
10
|
input,
|
|
11
|
+
suffix,
|
|
10
12
|
steppers,
|
|
11
13
|
stepper
|
|
12
14
|
};
|
|
13
15
|
//#endregion
|
|
14
|
-
export { control, NumberInput_module_default as default, input, stepper, steppers };
|
|
16
|
+
export { control, NumberInput_module_default as default, input, stepper, steppers, suffix };
|
|
15
17
|
|
|
16
18
|
//# sourceMappingURL=NumberInput.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.module.js","names":[],"sources":["../../src/number-input/NumberInput.module.css"],"sourcesContent":[".control.control {\n padding-inline-end: 0;\n overflow: hidden;\n}\n\n.input {\n font-variant-numeric:
|
|
1
|
+
{"version":3,"file":"NumberInput.module.js","names":[],"sources":["../../src/number-input/NumberInput.module.css"],"sourcesContent":[".control.control {\n padding-inline-end: 0;\n overflow: hidden;\n}\n\n/* Without steppers, the control has its padding back. */\n.control.control[data-readonly] {\n padding-inline-end: var(--panneau-input-padding-x, var(--panneau-control-padding-x));\n}\n\n.input {\n font-variant-numeric: var(--panneau-font-numeric);\n}\n\n/* The suffix sits between the value and the steppers, which have no padding of their own. */\n.suffix.suffix {\n margin-inline: var(--panneau-space-2);\n}\n\n.control[data-readonly] .suffix {\n margin-inline-end: 0;\n}\n\n.steppers {\n display: flex;\n flex-direction: column;\n align-self: stretch;\n border-inline-start: var(--panneau-border-width) solid var(--panneau-color-border);\n}\n\n.stepper {\n display: flex;\n flex: 1 1 0;\n align-items: center;\n justify-content: center;\n width: var(--panneau-number-input-stepper-width, 1.75rem);\n padding: 0;\n color: var(--panneau-color-text-muted);\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n\n.stepper + .stepper {\n border-top: var(--panneau-border-width) solid var(--panneau-color-border);\n}\n\n.stepper[data-hovered] {\n color: var(--panneau-color-text);\n background-color: var(--panneau-color-hover);\n}\n\n.stepper[data-pressed] {\n background-color: var(--panneau-color-pressed);\n}\n\n.stepper[data-disabled] {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Touch screens have their own keyboard for numbers: the steppers would be too small. */\n@media (pointer: coarse) {\n .steppers {\n display: none;\n }\n\n .control.control {\n padding-inline-end: var(--panneau-space-3);\n }\n\n .suffix.suffix {\n margin-inline-end: 0;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/number-input/tokens.ts"],"names":[],"mappings":"AAEA,6BAA6B;AAC7B,eAAO,MAAM,iBAAiB,oFAG5B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/number-input/tokens.ts
|
|
3
|
+
/** Tokens of NumberInput. */
|
|
4
|
+
var numberInputTokens = defineComponentTokens("number-input", {
|
|
5
|
+
/** Width of the increment and decrement buttons. */
|
|
6
|
+
"stepper-width": "1.75rem" });
|
|
7
|
+
//#endregion
|
|
8
|
+
export { numberInputTokens };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","numberInputTokens"],"sources":["../../src/number-input/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of NumberInput. */\nexport const numberInputTokens = defineComponentTokens('number-input', {\n /** Width of the increment and decrement buttons. */\n 'stepper-width': '1.75rem',\n});\n"],"mappings":";;;AAGA,IAAaC,oBAAoBD,sBAAsB,gBAAgB;;AAEnE,iBAAiB,UACrB,CAAC"}
|