@panneau/ui 5.0.0-alpha.1 → 5.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +370 -14
- package/bin/check-theme.js +5 -0
- package/dist/alert/Alert.css +28 -42
- package/dist/alert/Alert.d.ts +19 -5
- package/dist/alert/Alert.d.ts.map +1 -1
- package/dist/alert/Alert.js +110 -41
- package/dist/alert/Alert.js.map +1 -1
- package/dist/alert/Alert.module.js +14 -16
- package/dist/alert/Alert.module.js.map +1 -1
- package/dist/alert/tokens.d.ts +3 -0
- package/dist/alert/tokens.d.ts.map +1 -0
- package/dist/alert/tokens.js +21 -0
- package/dist/alert/tokens.js.map +1 -0
- package/dist/badge/Badge.css +24 -36
- package/dist/badge/Badge.d.ts +18 -3
- package/dist/badge/Badge.d.ts.map +1 -1
- package/dist/badge/Badge.js +35 -6
- package/dist/badge/Badge.js.map +1 -1
- package/dist/badge/Badge.module.js +9 -13
- package/dist/badge/Badge.module.js.map +1 -1
- package/dist/badge/tokens.d.ts +3 -0
- package/dist/badge/tokens.d.ts.map +1 -0
- package/dist/badge/tokens.js +23 -0
- package/dist/badge/tokens.js.map +1 -0
- package/dist/button/Button.css +58 -42
- package/dist/button/Button.d.ts +32 -5
- package/dist/button/Button.d.ts.map +1 -1
- package/dist/button/Button.js +136 -17
- package/dist/button/Button.js.map +1 -1
- package/dist/button/Button.module.js +14 -14
- package/dist/button/Button.module.js.map +1 -1
- package/dist/button/tokens.d.ts +3 -0
- package/dist/button/tokens.d.ts.map +1 -0
- package/dist/button/tokens.js +25 -0
- package/dist/button/tokens.js.map +1 -0
- package/dist/card/Card.css +27 -20
- package/dist/card/Card.js +76 -23
- package/dist/card/Card.js.map +1 -1
- package/dist/card/Card.module.js +5 -5
- package/dist/card/Card.module.js.map +1 -1
- package/dist/card/tokens.d.ts +3 -0
- package/dist/card/tokens.d.ts.map +1 -0
- package/dist/card/tokens.js +31 -0
- package/dist/card/tokens.js.map +1 -0
- package/dist/checkbox/Checkbox.css +22 -21
- package/dist/checkbox/Checkbox.d.ts +1 -1
- package/dist/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/checkbox/Checkbox.js +87 -25
- package/dist/checkbox/Checkbox.js.map +1 -1
- package/dist/checkbox/Checkbox.module.js +6 -6
- package/dist/checkbox/Checkbox.module.js.map +1 -1
- package/dist/checkbox/ChoiceChrome.d.ts +3 -1
- package/dist/checkbox/ChoiceChrome.d.ts.map +1 -1
- package/dist/checkbox/ChoiceChrome.js +82 -21
- package/dist/checkbox/ChoiceChrome.js.map +1 -1
- package/dist/checkbox/tokens.d.ts +3 -0
- package/dist/checkbox/tokens.d.ts.map +1 -0
- package/dist/checkbox/tokens.js +21 -0
- package/dist/checkbox/tokens.js.map +1 -0
- package/dist/combo-box/ComboBox.css +4 -4
- package/dist/combo-box/ComboBox.d.ts +1 -1
- package/dist/combo-box/ComboBox.js +291 -79
- package/dist/combo-box/ComboBox.js.map +1 -1
- package/dist/combo-box/ComboBox.module.js +3 -3
- package/dist/command-palette/CommandPalette.css +299 -0
- package/dist/command-palette/CommandPalette.d.ts +37 -0
- package/dist/command-palette/CommandPalette.d.ts.map +1 -0
- package/dist/command-palette/CommandPalette.js +497 -0
- package/dist/command-palette/CommandPalette.js.map +1 -0
- package/dist/command-palette/CommandPalette.module.js +62 -0
- package/dist/command-palette/CommandPalette.module.js.map +1 -0
- package/dist/command-palette/match.d.ts +39 -0
- package/dist/command-palette/match.d.ts.map +1 -0
- package/dist/command-palette/match.js +44 -0
- package/dist/command-palette/match.js.map +1 -0
- package/dist/command-palette/tokens.d.ts +3 -0
- package/dist/command-palette/tokens.d.ts.map +1 -0
- package/dist/command-palette/tokens.js +23 -0
- package/dist/command-palette/tokens.js.map +1 -0
- package/dist/command-palette/useCommandShortcut.d.ts +12 -0
- package/dist/command-palette/useCommandShortcut.d.ts.map +1 -0
- package/dist/command-palette/useCommandShortcut.js +48 -0
- package/dist/command-palette/useCommandShortcut.js.map +1 -0
- package/dist/container/Container.css +32 -0
- package/dist/container/Container.d.ts +15 -0
- package/dist/container/Container.d.ts.map +1 -0
- package/dist/container/Container.js +61 -0
- package/dist/container/Container.js.map +1 -0
- package/dist/container/Container.module.js +20 -0
- package/dist/container/Container.module.js.map +1 -0
- package/dist/container/tokens.d.ts +3 -0
- package/dist/container/tokens.d.ts.map +1 -0
- package/dist/container/tokens.js +19 -0
- package/dist/container/tokens.js.map +1 -0
- package/dist/date-picker/DatePicker.css +70 -30
- package/dist/date-picker/DatePicker.d.ts +3 -2
- package/dist/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/date-picker/DatePicker.js +279 -72
- package/dist/date-picker/DatePicker.js.map +1 -1
- package/dist/date-picker/DatePicker.module.js +16 -12
- package/dist/date-picker/DatePicker.module.js.map +1 -1
- package/dist/date-picker/calendarTokens.d.ts +3 -0
- package/dist/date-picker/calendarTokens.d.ts.map +1 -0
- package/dist/date-picker/calendarTokens.js +17 -0
- package/dist/date-picker/calendarTokens.js.map +1 -0
- package/dist/dialog/Dialog.css +80 -37
- package/dist/dialog/Dialog.d.ts +15 -3
- package/dist/dialog/Dialog.d.ts.map +1 -1
- package/dist/dialog/Dialog.js +159 -30
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/Dialog.module.js +21 -13
- package/dist/dialog/Dialog.module.js.map +1 -1
- package/dist/dialog/tokens.d.ts +3 -0
- package/dist/dialog/tokens.d.ts.map +1 -0
- package/dist/dialog/tokens.js +31 -0
- package/dist/dialog/tokens.js.map +1 -0
- package/dist/disclosure/Disclosure.css +12 -12
- package/dist/disclosure/Disclosure.d.ts.map +1 -1
- package/dist/disclosure/Disclosure.js +132 -28
- package/dist/disclosure/Disclosure.js.map +1 -1
- package/dist/disclosure/Disclosure.module.js +7 -7
- package/dist/disclosure/Disclosure.module.js.map +1 -1
- package/dist/disclosure/tokens.d.ts +3 -0
- package/dist/disclosure/tokens.d.ts.map +1 -0
- package/dist/disclosure/tokens.js +15 -0
- package/dist/disclosure/tokens.js.map +1 -0
- package/dist/divider/Divider.css +17 -0
- package/dist/divider/Divider.d.ts +8 -0
- package/dist/divider/Divider.d.ts.map +1 -0
- package/dist/divider/Divider.js +65 -0
- package/dist/divider/Divider.js.map +1 -0
- package/dist/divider/Divider.module.js +12 -0
- package/dist/divider/Divider.module.js.map +1 -0
- package/dist/divider/tokens.d.ts +3 -0
- package/dist/divider/tokens.d.ts.map +1 -0
- package/dist/divider/tokens.js +13 -0
- package/dist/divider/tokens.js.map +1 -0
- package/dist/field/Field.css +49 -37
- package/dist/field/Field.module.js +11 -11
- package/dist/field/Field.module.js.map +1 -1
- package/dist/field/FieldParts.d.ts +1 -1
- package/dist/field/FieldParts.js +69 -15
- package/dist/field/FieldParts.js.map +1 -1
- package/dist/field/Fieldset.js +99 -32
- package/dist/field/Fieldset.js.map +1 -1
- package/dist/field/inputTokens.d.ts +3 -0
- package/dist/field/inputTokens.d.ts.map +1 -0
- package/dist/field/inputTokens.js +21 -0
- package/dist/field/inputTokens.js.map +1 -0
- package/dist/field/tokens.d.ts +3 -0
- package/dist/field/tokens.d.ts.map +1 -0
- package/dist/field/tokens.js +15 -0
- package/dist/field/tokens.js.map +1 -0
- package/dist/grid/Grid.css +174 -0
- package/dist/grid/Grid.d.ts +28 -0
- package/dist/grid/Grid.d.ts.map +1 -0
- package/dist/grid/Grid.js +140 -0
- package/dist/grid/Grid.js.map +1 -0
- package/dist/grid/Grid.module.js +12 -0
- package/dist/grid/Grid.module.js.map +1 -0
- package/dist/grid/GridItem.css +59 -0
- package/dist/grid/GridItem.module.js +7 -0
- package/dist/grid/GridItem.module.js.map +1 -0
- package/dist/grid/tokens.d.ts +3 -0
- package/dist/grid/tokens.d.ts.map +1 -0
- package/dist/grid/tokens.js +10 -0
- package/dist/grid/tokens.js.map +1 -0
- package/dist/heading/Heading.css +52 -0
- package/dist/heading/Heading.d.ts +17 -0
- package/dist/heading/Heading.d.ts.map +1 -0
- package/dist/heading/Heading.js +52 -0
- package/dist/heading/Heading.js.map +1 -0
- package/dist/heading/Heading.module.js +16 -0
- package/dist/heading/Heading.module.js.map +1 -0
- package/dist/heading/tokens.d.ts +6 -0
- package/dist/heading/tokens.d.ts.map +1 -0
- package/dist/heading/tokens.js +66 -0
- package/dist/heading/tokens.js.map +1 -0
- package/dist/icon/Icon.css +1 -1
- package/dist/icon/Icon.js +36 -11
- package/dist/icon/Icon.js.map +1 -1
- package/dist/icon/Icon.module.js +1 -1
- package/dist/icon/lucideIconLoader.d.ts +9 -0
- package/dist/icon/lucideIconLoader.d.ts.map +1 -0
- package/dist/icon/lucideIconLoader.js +22 -0
- package/dist/icon/lucideIconLoader.js.map +1 -0
- package/dist/icon/namedIcons.d.ts +16 -9
- package/dist/icon/namedIcons.d.ts.map +1 -1
- package/dist/icon/namedIcons.js +121 -46
- package/dist/icon/namedIcons.js.map +1 -1
- package/dist/icon-button/IconButton.css +2 -2
- package/dist/icon-button/IconButton.d.ts +3 -3
- package/dist/icon-button/IconButton.d.ts.map +1 -1
- package/dist/icon-button/IconButton.js +70 -13
- package/dist/icon-button/IconButton.js.map +1 -1
- package/dist/icon-button/IconButton.module.js +2 -2
- package/dist/index.d.ts +61 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -5
- package/dist/inline/Inline.css +142 -0
- package/dist/inline/Inline.d.ts +17 -0
- package/dist/inline/Inline.d.ts.map +1 -0
- package/dist/inline/Inline.js +79 -0
- package/dist/inline/Inline.js.map +1 -0
- package/dist/inline/Inline.module.js +12 -0
- package/dist/inline/Inline.module.js.map +1 -0
- package/dist/inline/tokens.d.ts +3 -0
- package/dist/inline/tokens.d.ts.map +1 -0
- package/dist/inline/tokens.js +10 -0
- package/dist/inline/tokens.js.map +1 -0
- package/dist/intl/usePanneauIntl.js.map +1 -1
- package/dist/layout/responsive.d.ts +38 -0
- package/dist/layout/responsive.d.ts.map +1 -0
- package/dist/layout/responsive.js +49 -0
- package/dist/layout/responsive.js.map +1 -0
- package/dist/locales/index.js.map +1 -1
- package/dist/menu/Menu.css +84 -0
- package/dist/menu/Menu.d.ts +34 -7
- package/dist/menu/Menu.d.ts.map +1 -1
- package/dist/menu/Menu.js +243 -32
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/Menu.module.js +22 -0
- package/dist/menu/Menu.module.js.map +1 -0
- package/dist/menu/tokens.d.ts +3 -0
- package/dist/menu/tokens.d.ts.map +1 -0
- package/dist/menu/tokens.js +31 -0
- package/dist/menu/tokens.js.map +1 -0
- package/dist/named-icons/index.d.ts +2 -0
- package/dist/named-icons/index.d.ts.map +1 -0
- package/dist/named-icons/index.js +1 -0
- package/dist/number-input/NumberInput.css +30 -12
- package/dist/number-input/NumberInput.d.ts +1 -1
- package/dist/number-input/NumberInput.js +232 -60
- package/dist/number-input/NumberInput.js.map +1 -1
- package/dist/number-input/NumberInput.module.js +7 -5
- package/dist/number-input/NumberInput.module.js.map +1 -1
- package/dist/number-input/tokens.d.ts +3 -0
- package/dist/number-input/tokens.d.ts.map +1 -0
- package/dist/number-input/tokens.js +10 -0
- package/dist/number-input/tokens.js.map +1 -0
- package/dist/pill-trigger/PillTrigger.css +104 -0
- package/dist/pill-trigger/PillTrigger.d.ts +20 -0
- package/dist/pill-trigger/PillTrigger.d.ts.map +1 -0
- package/dist/pill-trigger/PillTrigger.js +94 -0
- package/dist/pill-trigger/PillTrigger.js.map +1 -0
- package/dist/pill-trigger/PillTrigger.module.js +18 -0
- package/dist/pill-trigger/PillTrigger.module.js.map +1 -0
- package/dist/pill-trigger/tokens.d.ts +3 -0
- package/dist/pill-trigger/tokens.d.ts.map +1 -0
- package/dist/pill-trigger/tokens.js +37 -0
- package/dist/pill-trigger/tokens.js.map +1 -0
- package/dist/popover/Popover.css +18 -12
- package/dist/popover/Popover.d.ts.map +1 -1
- package/dist/popover/Popover.js +116 -20
- package/dist/popover/Popover.js.map +1 -1
- package/dist/popover/Popover.module.js +7 -5
- package/dist/popover/Popover.module.js.map +1 -1
- package/dist/popover/tokens.d.ts +3 -0
- package/dist/popover/tokens.d.ts.map +1 -0
- package/dist/popover/tokens.js +19 -0
- package/dist/popover/tokens.js.map +1 -0
- package/dist/prose/Prose.css +141 -0
- package/dist/prose/Prose.d.ts +11 -0
- package/dist/prose/Prose.d.ts.map +1 -0
- package/dist/prose/Prose.js +49 -0
- package/dist/prose/Prose.js.map +1 -0
- package/dist/prose/Prose.module.js +8 -0
- package/dist/prose/Prose.module.js.map +1 -0
- package/dist/prose/tokens.d.ts +3 -0
- package/dist/prose/tokens.d.ts.map +1 -0
- package/dist/prose/tokens.js +33 -0
- package/dist/prose/tokens.js.map +1 -0
- package/dist/radio-group/RadioGroup.css +111 -20
- package/dist/radio-group/RadioGroup.d.ts +24 -5
- package/dist/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/radio-group/RadioGroup.js +214 -43
- package/dist/radio-group/RadioGroup.js.map +1 -1
- package/dist/radio-group/RadioGroup.module.js +18 -8
- package/dist/radio-group/RadioGroup.module.js.map +1 -1
- package/dist/radio-group/tokens.d.ts +3 -0
- package/dist/radio-group/tokens.d.ts.map +1 -0
- package/dist/radio-group/tokens.js +39 -0
- package/dist/radio-group/tokens.js.map +1 -0
- package/dist/root/PanneauRoot.css +243 -20
- package/dist/root/PanneauRoot.d.ts +57 -4
- package/dist/root/PanneauRoot.d.ts.map +1 -1
- package/dist/root/PanneauRoot.js +325 -46
- package/dist/root/PanneauRoot.js.map +1 -1
- package/dist/root/PanneauRoot.module.js +11 -3
- package/dist/root/PanneauRoot.module.js.map +1 -1
- package/dist/root/ThemeScope.d.ts +24 -0
- package/dist/root/ThemeScope.d.ts.map +1 -0
- package/dist/root/ThemeScope.js +132 -0
- package/dist/root/ThemeScope.js.map +1 -0
- package/dist/segmented-control/SegmentedControl.css +83 -0
- package/dist/segmented-control/SegmentedControl.d.ts +35 -0
- package/dist/segmented-control/SegmentedControl.d.ts.map +1 -0
- package/dist/segmented-control/SegmentedControl.js +142 -0
- package/dist/segmented-control/SegmentedControl.js.map +1 -0
- package/dist/segmented-control/SegmentedControl.module.js +16 -0
- package/dist/segmented-control/SegmentedControl.module.js.map +1 -0
- package/dist/segmented-control/tokens.d.ts +3 -0
- package/dist/segmented-control/tokens.d.ts.map +1 -0
- package/dist/segmented-control/tokens.js +29 -0
- package/dist/segmented-control/tokens.js.map +1 -0
- package/dist/select/ListBox.css +46 -23
- package/dist/select/ListBox.module.js +13 -13
- package/dist/select/ListBox.module.js.map +1 -1
- package/dist/select/Select.d.ts +1 -1
- package/dist/select/Select.js +298 -92
- package/dist/select/Select.js.map +1 -1
- package/dist/select/listBoxTokens.d.ts +3 -0
- package/dist/select/listBoxTokens.d.ts.map +1 -0
- package/dist/select/listBoxTokens.js +21 -0
- package/dist/select/listBoxTokens.js.map +1 -0
- package/dist/skeleton/LoadingRegion.d.ts +16 -0
- package/dist/skeleton/LoadingRegion.d.ts.map +1 -0
- package/dist/skeleton/LoadingRegion.js +65 -0
- package/dist/skeleton/LoadingRegion.js.map +1 -0
- package/dist/skeleton/Skeleton.css +62 -0
- package/dist/skeleton/Skeleton.d.ts +25 -0
- package/dist/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/skeleton/Skeleton.js +106 -0
- package/dist/skeleton/Skeleton.js.map +1 -0
- package/dist/skeleton/Skeleton.module.js +22 -0
- package/dist/skeleton/Skeleton.module.js.map +1 -0
- package/dist/skeleton/tokens.d.ts +3 -0
- package/dist/skeleton/tokens.d.ts.map +1 -0
- package/dist/skeleton/tokens.js +15 -0
- package/dist/skeleton/tokens.js.map +1 -0
- package/dist/slider/Slider.css +84 -0
- package/dist/slider/Slider.d.ts +20 -0
- package/dist/slider/Slider.d.ts.map +1 -0
- package/dist/slider/Slider.js +248 -0
- package/dist/slider/Slider.js.map +1 -0
- package/dist/slider/Slider.module.js +20 -0
- package/dist/slider/Slider.module.js.map +1 -0
- package/dist/spinner/Spinner.css +8 -8
- package/dist/spinner/Spinner.js +49 -9
- package/dist/spinner/Spinner.js.map +1 -1
- package/dist/spinner/Spinner.module.js +5 -5
- package/dist/spinner/Spinner.module.js.map +1 -1
- package/dist/spinner/tokens.d.ts +3 -0
- package/dist/spinner/tokens.d.ts.map +1 -0
- package/dist/spinner/tokens.js +10 -0
- package/dist/spinner/tokens.js.map +1 -0
- package/dist/stack/Stack.css +135 -0
- package/dist/stack/Stack.d.ts +15 -0
- package/dist/stack/Stack.d.ts.map +1 -0
- package/dist/stack/Stack.js +74 -0
- package/dist/stack/Stack.js.map +1 -0
- package/dist/stack/Stack.module.js +8 -0
- package/dist/stack/Stack.module.js.map +1 -0
- package/dist/stack/tokens.d.ts +3 -0
- package/dist/stack/tokens.d.ts.map +1 -0
- package/dist/stack/tokens.js +10 -0
- package/dist/stack/tokens.js.map +1 -0
- package/dist/switch/Switch.css +34 -25
- package/dist/switch/Switch.d.ts +1 -1
- package/dist/switch/Switch.d.ts.map +1 -1
- package/dist/switch/Switch.js +69 -11
- package/dist/switch/Switch.js.map +1 -1
- package/dist/switch/Switch.module.js +6 -5
- package/dist/switch/Switch.module.js.map +1 -1
- package/dist/switch/tokens.d.ts +3 -0
- package/dist/switch/tokens.d.ts.map +1 -0
- package/dist/switch/tokens.js +25 -0
- package/dist/switch/tokens.js.map +1 -0
- package/dist/tabs/Tabs.css +24 -23
- package/dist/tabs/Tabs.js +5 -5
- package/dist/tabs/Tabs.js.map +1 -1
- package/dist/tabs/Tabs.module.js +4 -4
- package/dist/tabs/Tabs.module.js.map +1 -1
- package/dist/tabs/tokens.d.ts +3 -0
- package/dist/tabs/tokens.d.ts.map +1 -0
- package/dist/tabs/tokens.js +25 -0
- package/dist/tabs/tokens.js.map +1 -0
- package/dist/tags-input/TagsInput.css +60 -0
- package/dist/tags-input/TagsInput.d.ts +32 -0
- package/dist/tags-input/TagsInput.d.ts.map +1 -0
- package/dist/tags-input/TagsInput.js +316 -0
- package/dist/tags-input/TagsInput.js.map +1 -0
- package/dist/tags-input/TagsInput.module.js +20 -0
- package/dist/tags-input/TagsInput.module.js.map +1 -0
- package/dist/text/Text.css +74 -0
- package/dist/text/Text.d.ts +27 -0
- package/dist/text/Text.d.ts.map +1 -0
- package/dist/text/Text.js +81 -0
- package/dist/text/Text.js.map +1 -0
- package/dist/text/Text.module.js +30 -0
- package/dist/text/Text.module.js.map +1 -0
- package/dist/text/tokens.d.ts +3 -0
- package/dist/text/tokens.d.ts.map +1 -0
- package/dist/text/tokens.js +10 -0
- package/dist/text/tokens.js.map +1 -0
- package/dist/text-area/TextArea.css +1 -1
- package/dist/text-area/TextArea.d.ts +1 -1
- package/dist/text-area/TextArea.js +135 -28
- package/dist/text-area/TextArea.js.map +1 -1
- package/dist/text-area/TextArea.module.js +3 -3
- package/dist/text-area/TextArea.module.js.map +1 -1
- package/dist/text-input/TextInput.d.ts +1 -1
- package/dist/text-input/TextInput.d.ts.map +1 -1
- package/dist/text-input/TextInput.js +164 -47
- package/dist/text-input/TextInput.js.map +1 -1
- package/dist/theme/Tone.css +70 -0
- package/dist/theme/Tone.module.js +20 -0
- package/dist/theme/Tone.module.js.map +1 -0
- package/dist/theme/bootstrap.d.ts +11 -1
- package/dist/theme/bootstrap.d.ts.map +1 -1
- package/dist/theme/bootstrap.js +48 -5
- package/dist/theme/bootstrap.js.map +1 -1
- package/dist/theme/chartColors.d.ts +23 -0
- package/dist/theme/chartColors.d.ts.map +1 -0
- package/dist/theme/chartColors.js +27 -0
- package/dist/theme/chartColors.js.map +1 -0
- package/dist/theme/checkTheme.d.ts +39 -0
- package/dist/theme/checkTheme.d.ts.map +1 -0
- package/dist/theme/checkTheme.js +132 -0
- package/dist/theme/checkTheme.js.map +1 -0
- package/dist/theme/cli.d.ts +14 -0
- package/dist/theme/cli.d.ts.map +1 -0
- package/dist/theme/cli.js +61 -0
- package/dist/theme/cli.js.map +1 -0
- package/dist/theme/color.d.ts +30 -0
- package/dist/theme/color.d.ts.map +1 -0
- package/dist/theme/color.js +94 -0
- package/dist/theme/color.js.map +1 -0
- package/dist/theme/colorVision.d.ts +23 -0
- package/dist/theme/colorVision.d.ts.map +1 -0
- package/dist/theme/colorVision.js +140 -0
- package/dist/theme/colorVision.js.map +1 -0
- package/dist/theme/componentTokens.d.ts +24 -0
- package/dist/theme/componentTokens.d.ts.map +1 -0
- package/dist/theme/componentTokens.js +20 -0
- package/dist/theme/componentTokens.js.map +1 -0
- package/dist/theme/components.d.ts +43 -0
- package/dist/theme/components.d.ts.map +1 -0
- package/dist/theme/components.js +75 -0
- package/dist/theme/components.js.map +1 -0
- package/dist/theme/defineTheme.d.ts +85 -0
- package/dist/theme/defineTheme.d.ts.map +1 -0
- package/dist/theme/defineTheme.js +130 -0
- package/dist/theme/defineTheme.js.map +1 -0
- package/dist/theme/fonts.d.ts +32 -0
- package/dist/theme/fonts.d.ts.map +1 -0
- package/dist/theme/fonts.js +36 -0
- package/dist/theme/fonts.js.map +1 -0
- package/dist/theme/index.d.ts +13 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +10 -0
- package/dist/theme/semanticTokens.d.ts +9 -0
- package/dist/theme/semanticTokens.d.ts.map +1 -0
- package/dist/theme/semanticTokens.js +110 -0
- package/dist/theme/semanticTokens.js.map +1 -0
- package/dist/theme/theme.d.ts +61 -7
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +100 -10
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/toneClass.d.ts +8 -0
- package/dist/theme/toneClass.d.ts.map +1 -0
- package/dist/theme/toneClass.js +15 -0
- package/dist/theme/toneClass.js.map +1 -0
- package/dist/theme/tones.d.ts +89 -0
- package/dist/theme/tones.d.ts.map +1 -0
- package/dist/theme/tones.js +127 -0
- package/dist/theme/tones.js.map +1 -0
- package/dist/time-input/TimeInput.d.ts +1 -1
- package/dist/time-input/TimeInput.js +138 -31
- package/dist/time-input/TimeInput.js.map +1 -1
- package/dist/toast/Toast.css +22 -44
- package/dist/toast/Toast.d.ts +5 -3
- package/dist/toast/Toast.d.ts.map +1 -1
- package/dist/toast/Toast.js +5 -4
- package/dist/toast/Toast.js.map +1 -1
- package/dist/toast/Toast.module.js +10 -16
- package/dist/toast/Toast.module.js.map +1 -1
- package/dist/toast/tokens.d.ts +3 -0
- package/dist/toast/tokens.d.ts.map +1 -0
- package/dist/toast/tokens.js +21 -0
- package/dist/toast/tokens.js.map +1 -0
- package/dist/tooltip/Tooltip.css +12 -11
- package/dist/tooltip/Tooltip.js +38 -8
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/Tooltip.module.js +2 -2
- package/dist/tooltip/Tooltip.module.js.map +1 -1
- package/dist/tooltip/tokens.d.ts +3 -0
- package/dist/tooltip/tokens.d.ts.map +1 -0
- package/dist/tooltip/tokens.js +21 -0
- package/dist/tooltip/tokens.js.map +1 -0
- package/dist/utils/cx.d.ts +1 -1
- package/dist/utils/cx.d.ts.map +1 -1
- package/dist/utils/cx.js +2 -2
- package/dist/utils/cx.js.map +1 -1
- package/dist/utils/events.d.ts +4 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/events.js +9 -0
- package/dist/utils/events.js.map +1 -0
- package/package.json +22 -5
|
@@ -1,34 +1,95 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import Checkbox_module_default from "./Checkbox.module.js";
|
|
3
3
|
import Field_module_default from "../field/Field.module.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Fragment as Fragment$1, useId } from "react";
|
|
6
7
|
//#region src/checkbox/ChoiceChrome.tsx
|
|
7
8
|
/** Description and errors under a checkbox or a switch, linked to it. */
|
|
8
|
-
function ChoiceChrome(
|
|
9
|
+
function ChoiceChrome(t0) {
|
|
10
|
+
const $ = c(24);
|
|
11
|
+
const { component, description, errors: t1, className, descriptionClassName, errorsClassName, children } = t0;
|
|
12
|
+
let t2;
|
|
13
|
+
if ($[0] !== t1) {
|
|
14
|
+
t2 = t1 === void 0 ? [] : t1;
|
|
15
|
+
$[0] = t1;
|
|
16
|
+
$[1] = t2;
|
|
17
|
+
} else t2 = $[1];
|
|
18
|
+
const errors = t2;
|
|
9
19
|
const id = useId();
|
|
10
20
|
const descriptionId = description !== void 0 && description !== null ? `${id}-description` : null;
|
|
11
21
|
const errorsId = errors.length > 0 ? `${id}-errors` : null;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
let t3;
|
|
23
|
+
if ($[2] !== descriptionId || $[3] !== errorsId) {
|
|
24
|
+
t3 = [descriptionId, errorsId].filter(Boolean);
|
|
25
|
+
$[2] = descriptionId;
|
|
26
|
+
$[3] = errorsId;
|
|
27
|
+
$[4] = t3;
|
|
28
|
+
} else t3 = $[4];
|
|
29
|
+
const describedBy = t3.join(" ");
|
|
30
|
+
const t4 = component !== void 0 && `panneau-${component}`;
|
|
31
|
+
let t5;
|
|
32
|
+
if ($[5] !== className || $[6] !== t4) {
|
|
33
|
+
t5 = cx(t4, Checkbox_module_default.field, className);
|
|
34
|
+
$[5] = className;
|
|
35
|
+
$[6] = t4;
|
|
36
|
+
$[7] = t5;
|
|
37
|
+
} else t5 = $[7];
|
|
38
|
+
const t6 = describedBy !== "" ? describedBy : void 0;
|
|
39
|
+
let t7;
|
|
40
|
+
if ($[8] !== children || $[9] !== t6) {
|
|
41
|
+
t7 = children(t6);
|
|
42
|
+
$[8] = children;
|
|
43
|
+
$[9] = t6;
|
|
44
|
+
$[10] = t7;
|
|
45
|
+
} else t7 = $[10];
|
|
46
|
+
let t8;
|
|
47
|
+
if ($[11] !== description || $[12] !== descriptionClassName || $[13] !== descriptionId) {
|
|
48
|
+
t8 = descriptionId !== null ? /* @__PURE__ */ jsx("div", {
|
|
49
|
+
id: descriptionId,
|
|
50
|
+
className: cx(Field_module_default.description, descriptionClassName),
|
|
51
|
+
children: description
|
|
52
|
+
}) : null;
|
|
53
|
+
$[11] = description;
|
|
54
|
+
$[12] = descriptionClassName;
|
|
55
|
+
$[13] = descriptionId;
|
|
56
|
+
$[14] = t8;
|
|
57
|
+
} else t8 = $[14];
|
|
58
|
+
let t9;
|
|
59
|
+
if ($[15] !== errors || $[16] !== errorsClassName || $[17] !== errorsId) {
|
|
60
|
+
t9 = errorsId !== null ? /* @__PURE__ */ jsx("div", {
|
|
61
|
+
id: errorsId,
|
|
62
|
+
className: cx(Field_module_default.errors, errorsClassName),
|
|
63
|
+
children: errors.map(_temp)
|
|
64
|
+
}) : null;
|
|
65
|
+
$[15] = errors;
|
|
66
|
+
$[16] = errorsClassName;
|
|
67
|
+
$[17] = errorsId;
|
|
68
|
+
$[18] = t9;
|
|
69
|
+
} else t9 = $[18];
|
|
70
|
+
let t10;
|
|
71
|
+
if ($[19] !== t5 || $[20] !== t7 || $[21] !== t8 || $[22] !== t9) {
|
|
72
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
73
|
+
className: t5,
|
|
74
|
+
children: [
|
|
75
|
+
t7,
|
|
76
|
+
t8,
|
|
77
|
+
t9
|
|
78
|
+
]
|
|
79
|
+
});
|
|
80
|
+
$[19] = t5;
|
|
81
|
+
$[20] = t7;
|
|
82
|
+
$[21] = t8;
|
|
83
|
+
$[22] = t9;
|
|
84
|
+
$[23] = t10;
|
|
85
|
+
} else t10 = $[23];
|
|
86
|
+
return t10;
|
|
87
|
+
}
|
|
88
|
+
function _temp(error, index) {
|
|
89
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [index > 0 ? " " : null, /* @__PURE__ */ jsx("span", {
|
|
90
|
+
className: Field_module_default.error,
|
|
91
|
+
children: error
|
|
92
|
+
})] }, index);
|
|
32
93
|
}
|
|
33
94
|
//#endregion
|
|
34
95
|
export { ChoiceChrome };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceChrome.js","names":["styles","fieldStyles","Fragment"],"sources":["../../src/checkbox/ChoiceChrome.tsx"],"sourcesContent":["import { Fragment, type ReactNode, useId } from 'react';\n\nimport { fieldStyles } from '../field/FieldParts';\nimport { cx } from '../utils/cx';\nimport styles from './Checkbox.module.css';\n\nexport interface ChoiceChromeProps {\n /** Help text under the control. */\n description?: ReactNode;\n /** Error messages. Any message makes the control invalid. */\n errors?: readonly string[];\n className?: string;\n descriptionClassName?: string;\n errorsClassName?: string;\n}\n\n/** Description and errors under a checkbox or a switch, linked to it. */\nexport function ChoiceChrome({\n description,\n errors = [],\n className,\n descriptionClassName,\n errorsClassName,\n children,\n}: ChoiceChromeProps & { children: (describedBy: string | undefined) => ReactNode }) {\n const id = useId();\n const descriptionId =\n description !== undefined && description !== null ? `${id}-description` : null;\n const errorsId = errors.length > 0 ? `${id}-errors` : null;\n const describedBy = [descriptionId, errorsId].filter(Boolean).join(' ');\n return (\n <div
|
|
1
|
+
{"version":3,"file":"ChoiceChrome.js","names":["Fragment","ReactNode","useId","fieldStyles","cx","styles","ChoiceChromeProps","component","description","errors","className","descriptionClassName","errorsClassName","ChoiceChrome","t0","$","_c","t1","children","t2","undefined","id","descriptionId","errorsId","length","t3","filter","Boolean","describedBy","join","t4","t5","field","t6","t7","t8","t9","map","_temp","t10","error","index","_c","styles","fieldStyles","Fragment"],"sources":["../../src/checkbox/ChoiceChrome.tsx"],"sourcesContent":["import { Fragment, type ReactNode, useId } from 'react';\n\nimport { fieldStyles } from '../field/FieldParts';\nimport { cx } from '../utils/cx';\nimport styles from './Checkbox.module.css';\n\nexport interface ChoiceChromeProps {\n /** The component, for its `panneau-<component>` class: `checkbox` or `switch`. */\n component?: string;\n /** Help text under the control. */\n description?: ReactNode;\n /** Error messages. Any message makes the control invalid. */\n errors?: readonly string[];\n className?: string;\n descriptionClassName?: string;\n errorsClassName?: string;\n}\n\n/** Description and errors under a checkbox or a switch, linked to it. */\nexport function ChoiceChrome({\n component,\n description,\n errors = [],\n className,\n descriptionClassName,\n errorsClassName,\n children,\n}: ChoiceChromeProps & { children: (describedBy: string | undefined) => ReactNode }) {\n const id = useId();\n const descriptionId =\n description !== undefined && description !== null ? `${id}-description` : null;\n const errorsId = errors.length > 0 ? `${id}-errors` : null;\n const describedBy = [descriptionId, errorsId].filter(Boolean).join(' ');\n return (\n <div\n className={cx(\n component !== undefined && `panneau-${component}`,\n styles.field,\n className,\n )}\n >\n {children(describedBy !== '' ? describedBy : undefined)}\n {descriptionId !== null ? (\n <div\n id={descriptionId}\n className={cx(fieldStyles.description, descriptionClassName)}\n >\n {description}\n </div>\n ) : null}\n {errorsId !== null ? (\n <div id={errorsId} className={cx(fieldStyles.errors, errorsClassName)}>\n {errors.map((error, index) => (\n <Fragment key={index}>\n {/* A space between messages, for assistive technologies. */}\n {index > 0 ? ' ' : null}\n <span className={fieldStyles.error}>{error}</span>\n </Fragment>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of Checkbox. */
|
|
2
|
+
export declare const checkboxTokens: import("../index.js").ComponentTokens<"checkbox", "panneau-checkbox-size" | "panneau-checkbox-radius" | "panneau-checkbox-bg" | "panneau-checkbox-border-color" | "panneau-checkbox-checked-color" | "panneau-checkbox-checked-bg">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/checkbox/tokens.ts"],"names":[],"mappings":"AAEA,0BAA0B;AAC1B,eAAO,MAAM,cAAc,4NAazB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/checkbox/tokens.ts
|
|
3
|
+
/** Tokens of Checkbox. */
|
|
4
|
+
var checkboxTokens = defineComponentTokens("checkbox", {
|
|
5
|
+
/** Size of the box. */
|
|
6
|
+
size: "1.125rem",
|
|
7
|
+
/** Color of the check mark. */
|
|
8
|
+
"checked-color": "var(--panneau-color-accent-text)",
|
|
9
|
+
/** Background of the box. */
|
|
10
|
+
bg: "var(--panneau-color-surface)",
|
|
11
|
+
/** Border color of the box. */
|
|
12
|
+
"border-color": "var(--panneau-color-border-control)",
|
|
13
|
+
/** Corner radius of the box. */
|
|
14
|
+
radius: "var(--panneau-radius-sm)",
|
|
15
|
+
/** Background and border color of a checked box. */
|
|
16
|
+
"checked-bg": "var(--panneau-color-accent)"
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { checkboxTokens };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","checkboxTokens","size","bg","radius"],"sources":["../../src/checkbox/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Checkbox. */\nexport const checkboxTokens = defineComponentTokens('checkbox', {\n /** Size of the box. */\n size: '1.125rem',\n /** Color of the check mark. */\n 'checked-color': 'var(--panneau-color-accent-text)',\n /** Background of the box. */\n bg: 'var(--panneau-color-surface)',\n /** Border color of the box. */\n 'border-color': 'var(--panneau-color-border-control)',\n /** Corner radius of the box. */\n radius: 'var(--panneau-radius-sm)',\n /** Background and border color of a checked box. */\n 'checked-bg': 'var(--panneau-color-accent)',\n});\n"],"mappings":";;;AAGA,IAAaC,iBAAiBD,sBAAsB,YAAY;;CAE5DE,MAAM;;CAEN,iBAAiB;;CAEjBC,IAAI;;CAEJ,gBAAgB;;CAEhBC,QAAQ;;CAER,cAAc;AAClB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.panneau-control
|
|
1
|
+
.panneau-combo-box-control.panneau-combo-box-control {
|
|
2
2
|
padding-inline-end: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.panneau-button
|
|
5
|
+
.panneau-combo-box-button {
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
justify-content: center;
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
border: 0;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.panneau-button
|
|
18
|
+
.panneau-combo-box-button[data-hovered] {
|
|
19
19
|
color: var(--panneau-color-text);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.panneau-status
|
|
22
|
+
.panneau-combo-box-status {
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: center;
|
|
25
25
|
padding-inline: var(--panneau-space-1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComboBoxProps as AriaComboBoxProps } from 'react-aria-components';
|
|
2
|
-
import { type FieldChromeProps } from '../field/FieldParts';
|
|
2
|
+
import { type FieldChromeProps } from '../field/FieldParts.js';
|
|
3
3
|
/** An item that a combo box can pick. */
|
|
4
4
|
export interface ComboBoxItem {
|
|
5
5
|
id: string;
|
|
@@ -8,6 +8,7 @@ import { FieldDescription, FieldErrors, FieldLabel } from "../field/FieldParts.j
|
|
|
8
8
|
import { PopoverSurface } from "../popover/Popover.js";
|
|
9
9
|
import ListBox_module_default from "../select/ListBox.module.js";
|
|
10
10
|
import ComboBox_module_default from "./ComboBox.module.js";
|
|
11
|
+
import { c } from "react/compiler-runtime";
|
|
11
12
|
import { Check, ChevronDown } from "lucide-react";
|
|
12
13
|
import { Button, ComboBox, Group, Input, ListBox, ListBoxItem, Text } from "react-aria-components";
|
|
13
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -16,90 +17,301 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
16
17
|
* A text input with a list of suggestions, to pick one item. Items can be filtered locally or come
|
|
17
18
|
* from a search (`inputValue`, `onInputChange` and `isLoading`).
|
|
18
19
|
*/
|
|
19
|
-
function ComboBox$1(
|
|
20
|
+
function ComboBox$1(t0) {
|
|
21
|
+
const $ = c(80);
|
|
22
|
+
let className;
|
|
23
|
+
let controlClassName;
|
|
24
|
+
let description;
|
|
25
|
+
let descriptionClassName;
|
|
26
|
+
let emptyMessage;
|
|
27
|
+
let errorsClassName;
|
|
28
|
+
let inputClassName;
|
|
29
|
+
let isRequired;
|
|
30
|
+
let items;
|
|
31
|
+
let label;
|
|
32
|
+
let labelClassName;
|
|
33
|
+
let onChange;
|
|
34
|
+
let placeholder;
|
|
35
|
+
let popoverClassName;
|
|
36
|
+
let props;
|
|
37
|
+
let t1;
|
|
38
|
+
let t2;
|
|
39
|
+
let t3;
|
|
40
|
+
let value;
|
|
41
|
+
if ($[0] !== t0) {
|
|
42
|
+
({items, value, onChange, label, description, errors: t1, placeholder, isLoading: t2, emptyMessage, isRequired, menuTrigger: t3, className, labelClassName, descriptionClassName, errorsClassName, controlClassName, inputClassName, popoverClassName, ...props} = t0);
|
|
43
|
+
$[0] = t0;
|
|
44
|
+
$[1] = className;
|
|
45
|
+
$[2] = controlClassName;
|
|
46
|
+
$[3] = description;
|
|
47
|
+
$[4] = descriptionClassName;
|
|
48
|
+
$[5] = emptyMessage;
|
|
49
|
+
$[6] = errorsClassName;
|
|
50
|
+
$[7] = inputClassName;
|
|
51
|
+
$[8] = isRequired;
|
|
52
|
+
$[9] = items;
|
|
53
|
+
$[10] = label;
|
|
54
|
+
$[11] = labelClassName;
|
|
55
|
+
$[12] = onChange;
|
|
56
|
+
$[13] = placeholder;
|
|
57
|
+
$[14] = popoverClassName;
|
|
58
|
+
$[15] = props;
|
|
59
|
+
$[16] = t1;
|
|
60
|
+
$[17] = t2;
|
|
61
|
+
$[18] = t3;
|
|
62
|
+
$[19] = value;
|
|
63
|
+
} else {
|
|
64
|
+
className = $[1];
|
|
65
|
+
controlClassName = $[2];
|
|
66
|
+
description = $[3];
|
|
67
|
+
descriptionClassName = $[4];
|
|
68
|
+
emptyMessage = $[5];
|
|
69
|
+
errorsClassName = $[6];
|
|
70
|
+
inputClassName = $[7];
|
|
71
|
+
isRequired = $[8];
|
|
72
|
+
items = $[9];
|
|
73
|
+
label = $[10];
|
|
74
|
+
labelClassName = $[11];
|
|
75
|
+
onChange = $[12];
|
|
76
|
+
placeholder = $[13];
|
|
77
|
+
popoverClassName = $[14];
|
|
78
|
+
props = $[15];
|
|
79
|
+
t1 = $[16];
|
|
80
|
+
t2 = $[17];
|
|
81
|
+
t3 = $[18];
|
|
82
|
+
value = $[19];
|
|
83
|
+
}
|
|
84
|
+
let t4;
|
|
85
|
+
if ($[20] !== t1) {
|
|
86
|
+
t4 = t1 === void 0 ? [] : t1;
|
|
87
|
+
$[20] = t1;
|
|
88
|
+
$[21] = t4;
|
|
89
|
+
} else t4 = $[21];
|
|
90
|
+
const errors = t4;
|
|
91
|
+
const isLoading = t2 === void 0 ? false : t2;
|
|
92
|
+
const menuTrigger = t3 === void 0 ? "focus" : t3;
|
|
20
93
|
const intl = usePanneauIntl();
|
|
21
94
|
const invalid = errors.length > 0;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
95
|
+
let t5;
|
|
96
|
+
if ($[22] !== onChange) {
|
|
97
|
+
t5 = onChange !== void 0 ? (key) => onChange(key === null ? null : String(key)) : void 0;
|
|
98
|
+
$[22] = onChange;
|
|
99
|
+
$[23] = t5;
|
|
100
|
+
} else t5 = $[23];
|
|
101
|
+
let t6;
|
|
102
|
+
if ($[24] !== items) {
|
|
103
|
+
t6 = items.filter(_temp).map(_temp2);
|
|
104
|
+
$[24] = items;
|
|
105
|
+
$[25] = t6;
|
|
106
|
+
} else t6 = $[25];
|
|
107
|
+
let t7;
|
|
108
|
+
if ($[26] !== className) {
|
|
109
|
+
t7 = cx("panneau-combo-box", Field_module_default.field, className);
|
|
110
|
+
$[26] = className;
|
|
111
|
+
$[27] = t7;
|
|
112
|
+
} else t7 = $[27];
|
|
113
|
+
let t8;
|
|
114
|
+
if ($[28] !== isRequired || $[29] !== label || $[30] !== labelClassName) {
|
|
115
|
+
t8 = /* @__PURE__ */ jsx(FieldLabel, {
|
|
116
|
+
isRequired,
|
|
117
|
+
className: labelClassName,
|
|
118
|
+
children: label
|
|
119
|
+
});
|
|
120
|
+
$[28] = isRequired;
|
|
121
|
+
$[29] = label;
|
|
122
|
+
$[30] = labelClassName;
|
|
123
|
+
$[31] = t8;
|
|
124
|
+
} else t8 = $[31];
|
|
125
|
+
let t9;
|
|
126
|
+
if ($[32] !== controlClassName) {
|
|
127
|
+
t9 = cx(Field_module_default.control, ComboBox_module_default.control, controlClassName);
|
|
128
|
+
$[32] = controlClassName;
|
|
129
|
+
$[33] = t9;
|
|
130
|
+
} else t9 = $[33];
|
|
131
|
+
const t10 = invalid || void 0;
|
|
132
|
+
let t11;
|
|
133
|
+
if ($[34] !== inputClassName) {
|
|
134
|
+
t11 = cx(Field_module_default.bare, inputClassName);
|
|
135
|
+
$[34] = inputClassName;
|
|
136
|
+
$[35] = t11;
|
|
137
|
+
} else t11 = $[35];
|
|
138
|
+
let t12;
|
|
139
|
+
if ($[36] !== placeholder || $[37] !== t11) {
|
|
140
|
+
t12 = /* @__PURE__ */ jsx(Input, {
|
|
141
|
+
placeholder,
|
|
142
|
+
className: t11
|
|
143
|
+
});
|
|
144
|
+
$[36] = placeholder;
|
|
145
|
+
$[37] = t11;
|
|
146
|
+
$[38] = t12;
|
|
147
|
+
} else t12 = $[38];
|
|
148
|
+
let t13;
|
|
149
|
+
if ($[39] !== isLoading) {
|
|
150
|
+
t13 = isLoading ? /* @__PURE__ */ jsx("span", {
|
|
151
|
+
className: ComboBox_module_default.status,
|
|
152
|
+
children: /* @__PURE__ */ jsx(Spinner, { size: "sm" })
|
|
153
|
+
}) : null;
|
|
154
|
+
$[39] = isLoading;
|
|
155
|
+
$[40] = t13;
|
|
156
|
+
} else t13 = $[40];
|
|
157
|
+
let t14;
|
|
158
|
+
if ($[41] !== intl) {
|
|
159
|
+
t14 = intl.formatMessage(messages.showOptions);
|
|
160
|
+
$[41] = intl;
|
|
161
|
+
$[42] = t14;
|
|
162
|
+
} else t14 = $[42];
|
|
163
|
+
let t15;
|
|
164
|
+
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
165
|
+
t15 = /* @__PURE__ */ jsx(Icon, { icon: ChevronDown });
|
|
166
|
+
$[43] = t15;
|
|
167
|
+
} else t15 = $[43];
|
|
168
|
+
let t16;
|
|
169
|
+
if ($[44] !== t14) {
|
|
170
|
+
t16 = /* @__PURE__ */ jsx(Button, {
|
|
171
|
+
className: ComboBox_module_default.button,
|
|
172
|
+
"aria-label": t14,
|
|
173
|
+
children: t15
|
|
174
|
+
});
|
|
175
|
+
$[44] = t14;
|
|
176
|
+
$[45] = t16;
|
|
177
|
+
} else t16 = $[45];
|
|
178
|
+
let t17;
|
|
179
|
+
if ($[46] !== t10 || $[47] !== t12 || $[48] !== t13 || $[49] !== t16 || $[50] !== t9) {
|
|
180
|
+
t17 = /* @__PURE__ */ jsxs(Group, {
|
|
181
|
+
className: t9,
|
|
182
|
+
"data-invalid": t10,
|
|
183
|
+
children: [
|
|
184
|
+
t12,
|
|
185
|
+
t13,
|
|
186
|
+
t16
|
|
187
|
+
]
|
|
188
|
+
});
|
|
189
|
+
$[46] = t10;
|
|
190
|
+
$[47] = t12;
|
|
191
|
+
$[48] = t13;
|
|
192
|
+
$[49] = t16;
|
|
193
|
+
$[50] = t9;
|
|
194
|
+
$[51] = t17;
|
|
195
|
+
} else t17 = $[51];
|
|
196
|
+
let t18;
|
|
197
|
+
if ($[52] !== description || $[53] !== descriptionClassName) {
|
|
198
|
+
t18 = /* @__PURE__ */ jsx(FieldDescription, {
|
|
199
|
+
className: descriptionClassName,
|
|
200
|
+
children: description
|
|
201
|
+
});
|
|
202
|
+
$[52] = description;
|
|
203
|
+
$[53] = descriptionClassName;
|
|
204
|
+
$[54] = t18;
|
|
205
|
+
} else t18 = $[54];
|
|
206
|
+
let t19;
|
|
207
|
+
if ($[55] !== errors || $[56] !== errorsClassName) {
|
|
208
|
+
t19 = /* @__PURE__ */ jsx(FieldErrors, {
|
|
209
|
+
errors,
|
|
210
|
+
className: errorsClassName
|
|
211
|
+
});
|
|
212
|
+
$[55] = errors;
|
|
213
|
+
$[56] = errorsClassName;
|
|
214
|
+
$[57] = t19;
|
|
215
|
+
} else t19 = $[57];
|
|
216
|
+
let t20;
|
|
217
|
+
if ($[58] !== emptyMessage || $[59] !== intl || $[60] !== isLoading) {
|
|
218
|
+
t20 = /* @__PURE__ */ jsx(ListBox, {
|
|
219
|
+
className: ListBox_module_default.listBox,
|
|
220
|
+
renderEmptyState: () => /* @__PURE__ */ jsx("div", {
|
|
221
|
+
className: ListBox_module_default.empty,
|
|
222
|
+
children: isLoading ? intl.formatMessage(messages.loading) : emptyMessage ?? intl.formatMessage(messages.noResults)
|
|
39
223
|
}),
|
|
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
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
224
|
+
children: _temp3
|
|
225
|
+
});
|
|
226
|
+
$[58] = emptyMessage;
|
|
227
|
+
$[59] = intl;
|
|
228
|
+
$[60] = isLoading;
|
|
229
|
+
$[61] = t20;
|
|
230
|
+
} else t20 = $[61];
|
|
231
|
+
let t21;
|
|
232
|
+
if ($[62] !== popoverClassName || $[63] !== t20) {
|
|
233
|
+
t21 = /* @__PURE__ */ jsx(PopoverSurface, {
|
|
234
|
+
className: popoverClassName,
|
|
235
|
+
children: t20
|
|
236
|
+
});
|
|
237
|
+
$[62] = popoverClassName;
|
|
238
|
+
$[63] = t20;
|
|
239
|
+
$[64] = t21;
|
|
240
|
+
} else t21 = $[64];
|
|
241
|
+
let t22;
|
|
242
|
+
if ($[65] !== invalid || $[66] !== isRequired || $[67] !== items || $[68] !== menuTrigger || $[69] !== props || $[70] !== t17 || $[71] !== t18 || $[72] !== t19 || $[73] !== t21 || $[74] !== t5 || $[75] !== t6 || $[76] !== t7 || $[77] !== t8 || $[78] !== value) {
|
|
243
|
+
t22 = /* @__PURE__ */ jsxs(ComboBox, {
|
|
244
|
+
...props,
|
|
245
|
+
items,
|
|
246
|
+
selectedKey: value,
|
|
247
|
+
onSelectionChange: t5,
|
|
248
|
+
disabledKeys: t6,
|
|
249
|
+
menuTrigger,
|
|
250
|
+
allowsEmptyCollection: true,
|
|
251
|
+
isRequired,
|
|
252
|
+
isInvalid: invalid,
|
|
253
|
+
validationBehavior: "aria",
|
|
254
|
+
className: t7,
|
|
255
|
+
children: [
|
|
256
|
+
t8,
|
|
257
|
+
t17,
|
|
258
|
+
t18,
|
|
259
|
+
t19,
|
|
260
|
+
t21
|
|
261
|
+
]
|
|
262
|
+
});
|
|
263
|
+
$[65] = invalid;
|
|
264
|
+
$[66] = isRequired;
|
|
265
|
+
$[67] = items;
|
|
266
|
+
$[68] = menuTrigger;
|
|
267
|
+
$[69] = props;
|
|
268
|
+
$[70] = t17;
|
|
269
|
+
$[71] = t18;
|
|
270
|
+
$[72] = t19;
|
|
271
|
+
$[73] = t21;
|
|
272
|
+
$[74] = t5;
|
|
273
|
+
$[75] = t6;
|
|
274
|
+
$[76] = t7;
|
|
275
|
+
$[77] = t8;
|
|
276
|
+
$[78] = value;
|
|
277
|
+
$[79] = t22;
|
|
278
|
+
} else t22 = $[79];
|
|
279
|
+
return t22;
|
|
280
|
+
}
|
|
281
|
+
function _temp3(item_1) {
|
|
282
|
+
return /* @__PURE__ */ jsx(ListBoxItem, {
|
|
283
|
+
id: item_1.id,
|
|
284
|
+
textValue: item_1.label,
|
|
285
|
+
className: ListBox_module_default.item,
|
|
286
|
+
children: (t0) => {
|
|
287
|
+
const { isSelected } = t0;
|
|
288
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
289
|
+
className: ListBox_module_default.check,
|
|
290
|
+
children: isSelected ? /* @__PURE__ */ jsx(Icon, {
|
|
291
|
+
icon: Check,
|
|
292
|
+
size: "sm"
|
|
293
|
+
}) : null
|
|
294
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
295
|
+
className: ListBox_module_default.itemText,
|
|
296
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
297
|
+
slot: "label",
|
|
298
|
+
className: ListBox_module_default.itemLabel,
|
|
299
|
+
children: item_1.label
|
|
300
|
+
}), item_1.description !== void 0 ? /* @__PURE__ */ jsx(Text, {
|
|
301
|
+
slot: "description",
|
|
302
|
+
className: ListBox_module_default.itemDescription,
|
|
303
|
+
children: item_1.description
|
|
304
|
+
}) : null]
|
|
305
|
+
})] });
|
|
306
|
+
}
|
|
101
307
|
});
|
|
102
308
|
}
|
|
309
|
+
function _temp2(item_0) {
|
|
310
|
+
return item_0.id;
|
|
311
|
+
}
|
|
312
|
+
function _temp(item) {
|
|
313
|
+
return item.disabled === true;
|
|
314
|
+
}
|
|
103
315
|
//#endregion
|
|
104
316
|
export { ComboBox$1 as ComboBox };
|
|
105
317
|
|