@panneau/ui 5.0.0-alpha.2 → 5.0.0-alpha.21
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 +144 -15
- package/dist/alert/Alert.d.ts +2 -2
- package/dist/alert/Alert.js +108 -40
- package/dist/alert/Alert.js.map +1 -1
- package/dist/alert/tokens.d.ts +1 -1
- package/dist/alert/tokens.js.map +1 -1
- package/dist/badge/Badge.d.ts +1 -1
- package/dist/badge/Badge.js +34 -6
- package/dist/badge/Badge.js.map +1 -1
- package/dist/badge/tokens.d.ts +1 -1
- package/dist/badge/tokens.js.map +1 -1
- package/dist/button/Button.d.ts +20 -6
- package/dist/button/Button.d.ts.map +1 -1
- package/dist/button/Button.js +169 -22
- package/dist/button/Button.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 +1 -1
- package/dist/button/tokens.js.map +1 -1
- package/dist/card/Card.js +76 -23
- package/dist/card/Card.js.map +1 -1
- package/dist/card/tokens.d.ts +1 -1
- package/dist/card/tokens.js.map +1 -1
- package/dist/checkbox/Checkbox.css +9 -9
- package/dist/checkbox/Checkbox.d.ts +1 -1
- package/dist/checkbox/Checkbox.js +87 -26
- package/dist/checkbox/Checkbox.js.map +1 -1
- package/dist/checkbox/Checkbox.module.js +3 -3
- package/dist/checkbox/Checkbox.module.js.map +1 -1
- package/dist/checkbox/ChoiceChrome.js +82 -21
- package/dist/checkbox/ChoiceChrome.js.map +1 -1
- package/dist/checkbox/tokens.d.ts +1 -1
- package/dist/checkbox/tokens.js.map +1 -1
- package/dist/combo-box/ComboBox.css +10 -0
- package/dist/combo-box/ComboBox.d.ts +7 -2
- package/dist/combo-box/ComboBox.d.ts.map +1 -1
- package/dist/combo-box/ComboBox.js +310 -78
- package/dist/combo-box/ComboBox.js.map +1 -1
- package/dist/combo-box/ComboBox.module.js +4 -2
- package/dist/combo-box/ComboBox.module.js.map +1 -1
- 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.js +48 -5
- package/dist/container/Container.js.map +1 -1
- package/dist/container/tokens.d.ts +1 -1
- package/dist/container/tokens.js.map +1 -1
- package/dist/date-picker/DatePicker.css +40 -0
- 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 +5 -1
- package/dist/date-picker/DatePicker.module.js.map +1 -1
- package/dist/date-picker/calendarTokens.d.ts +1 -1
- package/dist/date-picker/calendarTokens.js.map +1 -1
- package/dist/date-range-picker/DateRangePicker.css +37 -0
- package/dist/date-range-picker/DateRangePicker.d.ts +41 -0
- package/dist/date-range-picker/DateRangePicker.d.ts.map +1 -0
- package/dist/date-range-picker/DateRangePicker.js +438 -0
- package/dist/date-range-picker/DateRangePicker.js.map +1 -0
- package/dist/date-range-picker/DateRangePicker.module.js +20 -0
- package/dist/date-range-picker/DateRangePicker.module.js.map +1 -0
- package/dist/dialog/Dialog.css +41 -2
- package/dist/dialog/Dialog.d.ts +15 -3
- package/dist/dialog/Dialog.d.ts.map +1 -1
- package/dist/dialog/Dialog.js +161 -32
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/Dialog.module.js +10 -2
- package/dist/dialog/Dialog.module.js.map +1 -1
- package/dist/dialog/tokens.d.ts +1 -1
- package/dist/dialog/tokens.d.ts.map +1 -1
- package/dist/dialog/tokens.js +2 -0
- package/dist/dialog/tokens.js.map +1 -1
- package/dist/disclosure/Disclosure.js +132 -28
- package/dist/disclosure/Disclosure.js.map +1 -1
- package/dist/disclosure/tokens.d.ts +1 -1
- package/dist/disclosure/tokens.js.map +1 -1
- package/dist/divider/Divider.js +55 -11
- package/dist/divider/Divider.js.map +1 -1
- package/dist/divider/tokens.d.ts +1 -1
- package/dist/divider/tokens.js.map +1 -1
- package/dist/field/Field.css +26 -0
- package/dist/field/Field.module.js +6 -2
- 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.d.ts +6 -1
- package/dist/field/Fieldset.d.ts.map +1 -1
- package/dist/field/Fieldset.js +132 -33
- package/dist/field/Fieldset.js.map +1 -1
- package/dist/field/inputTokens.d.ts +1 -1
- package/dist/field/inputTokens.js.map +1 -1
- package/dist/field/tokens.d.ts +1 -1
- package/dist/field/tokens.js.map +1 -1
- package/dist/grid/Grid.d.ts +1 -1
- package/dist/grid/Grid.js +123 -14
- package/dist/grid/Grid.js.map +1 -1
- package/dist/grid/tokens.d.ts +1 -1
- package/dist/grid/tokens.js.map +1 -1
- package/dist/heading/Heading.js +41 -6
- package/dist/heading/Heading.js.map +1 -1
- package/dist/heading/tokens.d.ts +1 -1
- package/dist/heading/tokens.js.map +1 -1
- package/dist/icon/Icon.js +36 -11
- package/dist/icon/Icon.js.map +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.d.ts +2 -2
- package/dist/icon-button/IconButton.js +70 -13
- package/dist/icon-button/IconButton.js.map +1 -1
- package/dist/index.d.ts +65 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -6
- package/dist/inline/Inline.d.ts +1 -1
- package/dist/inline/Inline.js +65 -7
- package/dist/inline/Inline.js.map +1 -1
- package/dist/inline/tokens.d.ts +1 -1
- package/dist/inline/tokens.js.map +1 -1
- package/dist/intl/usePanneauIntl.js.map +1 -1
- package/dist/layout/responsive.js.map +1 -1
- package/dist/line-chart/LineChart.css +84 -0
- package/dist/line-chart/LineChart.d.ts +26 -0
- package/dist/line-chart/LineChart.d.ts.map +1 -0
- package/dist/line-chart/LineChart.js +327 -0
- package/dist/line-chart/LineChart.js.map +1 -0
- package/dist/line-chart/LineChart.module.js +28 -0
- package/dist/line-chart/LineChart.module.js.map +1 -0
- package/dist/line-chart/tokens.d.ts +3 -0
- package/dist/line-chart/tokens.d.ts.map +1 -0
- package/dist/line-chart/tokens.js +19 -0
- package/dist/line-chart/tokens.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/node_modules/@internationalized/date/dist/private/CalendarDate.js +136 -0
- package/dist/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +1 -0
- package/dist/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +117 -0
- package/dist/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +1 -0
- package/dist/node_modules/@internationalized/date/dist/private/conversion.js +116 -0
- package/dist/node_modules/@internationalized/date/dist/private/conversion.js.map +1 -0
- package/dist/node_modules/@internationalized/date/dist/private/manipulation.js +206 -0
- package/dist/node_modules/@internationalized/date/dist/private/manipulation.js.map +1 -0
- package/dist/node_modules/@internationalized/date/dist/private/queries.js +26 -0
- package/dist/node_modules/@internationalized/date/dist/private/queries.js.map +1 -0
- package/dist/node_modules/@internationalized/date/dist/private/string.js +19 -0
- package/dist/node_modules/@internationalized/date/dist/private/string.js.map +1 -0
- package/dist/node_modules/@internationalized/date/dist/private/utils.js +8 -0
- package/dist/node_modules/@internationalized/date/dist/private/utils.js.map +1 -0
- package/dist/number-input/NumberInput.css +18 -0
- 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 +3 -1
- package/dist/number-input/NumberInput.module.js.map +1 -1
- package/dist/number-input/tokens.d.ts +1 -1
- package/dist/number-input/tokens.js.map +1 -1
- 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 +5 -0
- 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 +4 -2
- package/dist/popover/Popover.module.js.map +1 -1
- package/dist/popover/tokens.d.ts +1 -1
- package/dist/popover/tokens.js.map +1 -1
- package/dist/prose/Prose.js +36 -5
- package/dist/prose/Prose.js.map +1 -1
- package/dist/prose/tokens.d.ts +1 -1
- package/dist/prose/tokens.js.map +1 -1
- package/dist/radio-group/RadioGroup.css +90 -0
- 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 +12 -2
- package/dist/radio-group/RadioGroup.module.js.map +1 -1
- package/dist/radio-group/tokens.d.ts +2 -2
- package/dist/radio-group/tokens.d.ts.map +1 -1
- package/dist/radio-group/tokens.js +22 -2
- package/dist/radio-group/tokens.js.map +1 -1
- package/dist/root/PanneauRoot.css +24 -0
- package/dist/root/PanneauRoot.d.ts +40 -4
- package/dist/root/PanneauRoot.d.ts.map +1 -1
- package/dist/root/PanneauRoot.js +284 -82
- package/dist/root/PanneauRoot.js.map +1 -1
- package/dist/root/PanneauRoot.module.js.map +1 -1
- package/dist/root/ThemeScope.d.ts +1 -1
- package/dist/root/ThemeScope.d.ts.map +1 -1
- package/dist/root/ThemeScope.js +110 -27
- package/dist/root/ThemeScope.js.map +1 -1
- 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 +75 -1
- package/dist/select/ListBox.module.js +9 -3
- package/dist/select/ListBox.module.js.map +1 -1
- package/dist/select/Select.d.ts +14 -1
- package/dist/select/Select.d.ts.map +1 -1
- package/dist/select/Select.js +335 -92
- package/dist/select/Select.js.map +1 -1
- package/dist/select/listBoxTokens.d.ts +1 -1
- package/dist/select/listBoxTokens.d.ts.map +1 -1
- package/dist/select/listBoxTokens.js +2 -0
- package/dist/select/listBoxTokens.js.map +1 -1
- 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.js +49 -9
- package/dist/spinner/Spinner.js.map +1 -1
- package/dist/spinner/tokens.d.ts +1 -1
- package/dist/spinner/tokens.js.map +1 -1
- package/dist/stack/Stack.d.ts +1 -1
- package/dist/stack/Stack.js +60 -7
- package/dist/stack/Stack.js.map +1 -1
- package/dist/stack/tokens.d.ts +1 -1
- package/dist/stack/tokens.js.map +1 -1
- package/dist/stat/Stat.css +45 -0
- package/dist/stat/Stat.d.ts +27 -0
- package/dist/stat/Stat.d.ts.map +1 -0
- package/dist/stat/Stat.js +87 -0
- package/dist/stat/Stat.js.map +1 -0
- package/dist/stat/Stat.module.js +18 -0
- package/dist/stat/Stat.module.js.map +1 -0
- package/dist/stat/tokens.d.ts +3 -0
- package/dist/stat/tokens.d.ts.map +1 -0
- package/dist/stat/tokens.js +21 -0
- package/dist/stat/tokens.js.map +1 -0
- package/dist/switch/Switch.css +8 -8
- package/dist/switch/Switch.d.ts +1 -1
- package/dist/switch/Switch.js +69 -12
- package/dist/switch/Switch.js.map +1 -1
- package/dist/switch/Switch.module.js +3 -2
- package/dist/switch/Switch.module.js.map +1 -1
- package/dist/switch/tokens.d.ts +1 -1
- package/dist/switch/tokens.js.map +1 -1
- package/dist/tabs/Tabs.js +1 -1
- package/dist/tabs/Tabs.js.map +1 -1
- package/dist/tabs/tokens.d.ts +1 -1
- package/dist/tabs/tokens.js.map +1 -1
- 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.d.ts +1 -1
- package/dist/text/Text.js +70 -5
- package/dist/text/Text.js.map +1 -1
- package/dist/text/tokens.d.ts +1 -1
- package/dist/text/tokens.js.map +1 -1
- 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 +7 -3
- 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 +14 -0
- package/dist/theme/Tone.module.js +4 -2
- package/dist/theme/Tone.module.js.map +1 -1
- package/dist/theme/bootstrap.d.ts +2 -2
- package/dist/theme/bootstrap.d.ts.map +1 -1
- package/dist/theme/bootstrap.js +6 -0
- package/dist/theme/bootstrap.js.map +1 -1
- package/dist/theme/chartColors.js.map +1 -1
- package/dist/theme/checkTheme.d.ts +2 -2
- package/dist/theme/checkTheme.d.ts.map +1 -1
- package/dist/theme/checkTheme.js +24 -0
- package/dist/theme/checkTheme.js.map +1 -1
- package/dist/theme/cli.d.ts +2 -2
- package/dist/theme/cli.js.map +1 -1
- package/dist/theme/color.js.map +1 -1
- package/dist/theme/colorVision.d.ts +1 -1
- package/dist/theme/colorVision.js.map +1 -1
- package/dist/theme/componentTokens.js.map +1 -1
- package/dist/theme/components.d.ts +10 -3
- package/dist/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +14 -0
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/defineTheme.d.ts +5 -5
- package/dist/theme/defineTheme.js.map +1 -1
- package/dist/theme/fonts.js.map +1 -1
- package/dist/theme/index.d.ts +12 -12
- package/dist/theme/index.js +1 -1
- package/dist/theme/semanticTokens.d.ts +1 -1
- package/dist/theme/semanticTokens.d.ts.map +1 -1
- package/dist/theme/semanticTokens.js +6 -0
- package/dist/theme/semanticTokens.js.map +1 -1
- package/dist/theme/theme.d.ts +2 -2
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/toneClass.d.ts +1 -1
- package/dist/theme/toneClass.js.map +1 -1
- package/dist/theme/tones.d.ts +15 -3
- package/dist/theme/tones.d.ts.map +1 -1
- package/dist/theme/tones.js +14 -2
- package/dist/theme/tones.js.map +1 -1
- 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 +131 -15
- package/dist/toast/Toast.d.ts +47 -10
- package/dist/toast/Toast.d.ts.map +1 -1
- package/dist/toast/Toast.js +191 -66
- package/dist/toast/Toast.js.map +1 -1
- package/dist/toast/Toast.module.js +5 -3
- package/dist/toast/Toast.module.js.map +1 -1
- package/dist/toast/tokens.d.ts +1 -1
- package/dist/toast/tokens.js +1 -1
- package/dist/toast/tokens.js.map +1 -1
- package/dist/tooltip/Tooltip.js +38 -8
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/tokens.d.ts +1 -1
- package/dist/tooltip/tokens.js.map +1 -1
- 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 +10 -5
|
@@ -6,6 +6,8 @@ var listBoxTokens = defineComponentTokens("list-box", {
|
|
|
6
6
|
padding: "var(--panneau-space-1)",
|
|
7
7
|
/** Vertical padding of an option. */
|
|
8
8
|
"item-padding-y": "calc(var(--panneau-row-padding-y) / 2)",
|
|
9
|
+
/** Vertical padding of an option with a description, on two lines. */
|
|
10
|
+
"item-padding-y-described": "var(--panneau-space-2)",
|
|
9
11
|
/** Horizontal padding of an option. */
|
|
10
12
|
"item-padding-x": "var(--panneau-space-2)",
|
|
11
13
|
/** Corner radius of an option. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listBoxTokens.js","names":[],"sources":["../../src/select/listBoxTokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of the options of `Select`, `ComboBox` and `Menu`. */\nexport const listBoxTokens = defineComponentTokens('list-box', {\n /** Padding around the options. */\n padding: 'var(--panneau-space-1)',\n /** Vertical padding of an option. */\n 'item-padding-y': 'calc(var(--panneau-row-padding-y) / 2)',\n /** Horizontal padding of an option. */\n 'item-padding-x': 'var(--panneau-space-2)',\n /** Corner radius of an option. */\n 'item-radius': 'var(--panneau-radius-sm)',\n /** Background of a focused or hovered option. */\n 'item-bg-hover': 'var(--panneau-color-hover)',\n});\n"],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"listBoxTokens.js","names":["defineComponentTokens","listBoxTokens","padding"],"sources":["../../src/select/listBoxTokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of the options of `Select`, `ComboBox` and `Menu`. */\nexport const listBoxTokens = defineComponentTokens('list-box', {\n /** Padding around the options. */\n padding: 'var(--panneau-space-1)',\n /** Vertical padding of an option. */\n 'item-padding-y': 'calc(var(--panneau-row-padding-y) / 2)',\n /** Vertical padding of an option with a description, on two lines. */\n 'item-padding-y-described': 'var(--panneau-space-2)',\n /** Horizontal padding of an option. */\n 'item-padding-x': 'var(--panneau-space-2)',\n /** Corner radius of an option. */\n 'item-radius': 'var(--panneau-radius-sm)',\n /** Background of a focused or hovered option. */\n 'item-bg-hover': 'var(--panneau-color-hover)',\n});\n"],"mappings":";;;AAGA,IAAaC,gBAAgBD,sBAAsB,YAAY;;CAE3DE,SAAS;;CAET,kBAAkB;;CAElB,4BAA4B;;CAE5B,kBAAkB;;CAElB,eAAe;;CAEf,iBAAiB;AACrB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export interface LoadingRegionProps {
|
|
3
|
+
/** The skeleton of the content that loads. */
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/** The status message read by screen readers. Defaults to "Loading…". */
|
|
6
|
+
label?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The region of content that loads, around its skeleton (decision 0034): it has
|
|
12
|
+
* `aria-busy="true"`, and says once that the content loads, with a status message that screen
|
|
13
|
+
* readers read and that isn't shown. Render it in place of the content while it loads.
|
|
14
|
+
*/
|
|
15
|
+
export declare function LoadingRegion({ children, label, className, style }: LoadingRegionProps): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=LoadingRegion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingRegion.d.ts","sourceRoot":"","sources":["../../src/skeleton/LoadingRegion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOtD,MAAM,WAAW,kBAAkB;IAC/B,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,kBAAkB,+BAYtF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import { messages } from "../intl/messages.js";
|
|
3
|
+
import { usePanneauIntl } from "../intl/usePanneauIntl.js";
|
|
4
|
+
import Skeleton_module_default from "./Skeleton.module.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/skeleton/LoadingRegion.tsx
|
|
8
|
+
/**
|
|
9
|
+
* The region of content that loads, around its skeleton (decision 0034): it has
|
|
10
|
+
* `aria-busy="true"`, and says once that the content loads, with a status message that screen
|
|
11
|
+
* readers read and that isn't shown. Render it in place of the content while it loads.
|
|
12
|
+
*/
|
|
13
|
+
function LoadingRegion(t0) {
|
|
14
|
+
const $ = c(14);
|
|
15
|
+
const { children, label, className, style } = t0;
|
|
16
|
+
const intl = usePanneauIntl();
|
|
17
|
+
let t1;
|
|
18
|
+
if ($[0] !== intl || $[1] !== label) {
|
|
19
|
+
t1 = label ?? intl.formatMessage(messages.loading);
|
|
20
|
+
$[0] = intl;
|
|
21
|
+
$[1] = label;
|
|
22
|
+
$[2] = t1;
|
|
23
|
+
} else t1 = $[2];
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[3] !== t1) {
|
|
26
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
27
|
+
role: "status",
|
|
28
|
+
className: Skeleton_module_default.status,
|
|
29
|
+
children: t1
|
|
30
|
+
});
|
|
31
|
+
$[3] = t1;
|
|
32
|
+
$[4] = t2;
|
|
33
|
+
} else t2 = $[4];
|
|
34
|
+
let t3;
|
|
35
|
+
if ($[5] !== className) {
|
|
36
|
+
t3 = cx("panneau-loading-region", className);
|
|
37
|
+
$[5] = className;
|
|
38
|
+
$[6] = t3;
|
|
39
|
+
} else t3 = $[6];
|
|
40
|
+
let t4;
|
|
41
|
+
if ($[7] !== children || $[8] !== style || $[9] !== t3) {
|
|
42
|
+
t4 = /* @__PURE__ */ jsx("div", {
|
|
43
|
+
"aria-busy": "true",
|
|
44
|
+
className: t3,
|
|
45
|
+
style,
|
|
46
|
+
children
|
|
47
|
+
});
|
|
48
|
+
$[7] = children;
|
|
49
|
+
$[8] = style;
|
|
50
|
+
$[9] = t3;
|
|
51
|
+
$[10] = t4;
|
|
52
|
+
} else t4 = $[10];
|
|
53
|
+
let t5;
|
|
54
|
+
if ($[11] !== t2 || $[12] !== t4) {
|
|
55
|
+
t5 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t4] });
|
|
56
|
+
$[11] = t2;
|
|
57
|
+
$[12] = t4;
|
|
58
|
+
$[13] = t5;
|
|
59
|
+
} else t5 = $[13];
|
|
60
|
+
return t5;
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { LoadingRegion };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=LoadingRegion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingRegion.js","names":["CSSProperties","ReactNode","messages","usePanneauIntl","cx","styles","LoadingRegionProps","children","label","className","style","LoadingRegion","t0","$","_c","intl","t1","formatMessage","loading","t2","status","t3","t4","t5","_c","styles","_Fragment"],"sources":["../../src/skeleton/LoadingRegion.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\n\nimport { messages } from '../intl/messages';\nimport { usePanneauIntl } from '../intl/usePanneauIntl';\nimport { cx } from '../utils/cx';\nimport styles from './Skeleton.module.css';\n\nexport interface LoadingRegionProps {\n /** The skeleton of the content that loads. */\n children?: ReactNode;\n /** The status message read by screen readers. Defaults to \"Loading…\". */\n label?: string;\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * The region of content that loads, around its skeleton (decision 0034): it has\n * `aria-busy=\"true\"`, and says once that the content loads, with a status message that screen\n * readers read and that isn't shown. Render it in place of the content while it loads.\n */\nexport function LoadingRegion({ children, label, className, style }: LoadingRegionProps) {\n const intl = usePanneauIntl();\n return (\n <>\n <span role=\"status\" className={styles.status}>\n {label ?? intl.formatMessage(messages.loading)}\n </span>\n <div aria-busy=\"true\" className={cx('panneau-loading-region', className)} style={style}>\n {children}\n </div>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAqBA,SAAOW,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAuB,MAAA,EAAAP,UAAAC,OAAAC,WAAAC,UAAAE;CAC1B,MAAAG,OAAaZ,eAAe;CAAE,IAAAa;CAAA,IAAAH,EAAA,OAAAE,QAAAF,EAAA,OAAAL,OAAA;EAIjBQ,KAAAR,SAASO,KAAIE,cAAef,SAAQgB,OAAQ;EAACL,EAAA,KAAAE;EAAAF,EAAA,KAAAL;EAAAK,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAG,IAAA;EADlDG,KAAA,oBAAA,QAAA;GAAW,MAAA;GAAoB,WAAAd,wBAAMe;GAChCJ,UAAAA;EACE,CAAA;EAAAH,EAAA,KAAAG;EAAAH,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAJ,WAAA;EAC0BY,KAAAjB,GAAG,0BAA0BK,SAAS;EAACI,EAAA,KAAAJ;EAAAI,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAN,YAAAM,EAAA,OAAAH,SAAAG,EAAA,OAAAQ,IAAA;EAAxEC,KAAA,oBAAA,OAAA;GAAe,aAAA;GAAkB,WAAAD;GAAgDX;GAC5EH;EACC,CAAA;EAAAM,EAAA,KAAAN;EAAAM,EAAA,KAAAH;EAAAG,EAAA,KAAAQ;EAAAR,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,QAAAM,MAAAN,EAAA,QAAAS,IAAA;EANVC,KAAA,qBAAAG,UAAA,EAAA,UAAA,CACIP,IAGAG,EAEM,EAAA,CAAA;EACPT,EAAA,MAAAM;EAAAN,EAAA,MAAAS;EAAAT,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OAPHU;AAOG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.panneau-skeleton-block {
|
|
2
|
+
display: block;
|
|
3
|
+
flex-shrink: 0;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
background-color: var(
|
|
6
|
+
--panneau-skeleton-color,
|
|
7
|
+
color-mix(in srgb, var(--panneau-color-text) 9%, transparent)
|
|
8
|
+
);
|
|
9
|
+
border-radius: var(--panneau-skeleton-radius, var(--panneau-radius-sm));
|
|
10
|
+
animation: panneau-skeleton-pulse var(--panneau-skeleton-duration, 1.6s) ease-in-out infinite;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* A line of text: as tall as a line, with the block in its middle, like the glyphs. */
|
|
14
|
+
.panneau-skeleton-line {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
height: 1.5em;
|
|
17
|
+
height: 1lh;
|
|
18
|
+
padding-block: 0.3em;
|
|
19
|
+
background-clip: content-box;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.panneau-skeleton-lines {
|
|
23
|
+
display: block;
|
|
24
|
+
max-width: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.panneau-skeleton-lines > .panneau-skeleton-line:last-child:not(:first-child) {
|
|
28
|
+
width: 60%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.panneau-skeleton-circle {
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
width: 2.5rem;
|
|
34
|
+
aspect-ratio: 1;
|
|
35
|
+
border-radius: 50%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.panneau-skeleton-rect {
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes panneau-skeleton-pulse {
|
|
43
|
+
50% {
|
|
44
|
+
opacity: 0.45;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (prefers-reduced-motion: reduce) {
|
|
49
|
+
.panneau-skeleton-block {
|
|
50
|
+
animation: none;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* The status message of a loading region: read by screen readers, not shown. */
|
|
55
|
+
.panneau-skeleton-status {
|
|
56
|
+
position: absolute;
|
|
57
|
+
width: 1px;
|
|
58
|
+
height: 1px;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
clip-path: inset(50%);
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export interface SkeletonProps {
|
|
3
|
+
/**
|
|
4
|
+
* `text` (the default): a line of text, or several with `lines`. `rect`: a block, as wide as
|
|
5
|
+
* its container unless `width` says otherwise. `circle`: an avatar or an icon.
|
|
6
|
+
*/
|
|
7
|
+
shape?: 'text' | 'rect' | 'circle';
|
|
8
|
+
/** Lines of text, the last one shorter. Only for `text`. Defaults to 1. */
|
|
9
|
+
lines?: number;
|
|
10
|
+
/** A length, in pixels for a number. For `circle`, its diameter. */
|
|
11
|
+
width?: number | string;
|
|
12
|
+
/** A length, in pixels for a number. Lines of text take the height of a line. */
|
|
13
|
+
height?: number | string;
|
|
14
|
+
/** The shape of a `rect` without a height: `16 / 9` as `'16 / 9'`, or a number. */
|
|
15
|
+
aspectRatio?: number | string;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A placeholder of content that loads, in its shape: a line of text, a block or a circle
|
|
21
|
+
* (decision 0034). It is hidden from assistive technologies: the region that loads says it, with
|
|
22
|
+
* `LoadingRegion`. It pulses, unless the user prefers reduced motion, with the colors of the theme.
|
|
23
|
+
*/
|
|
24
|
+
export declare function Skeleton({ shape, lines, width, height, aspectRatio, className, style, }: SkeletonProps): import("react").JSX.Element;
|
|
25
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../src/skeleton/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C,MAAM,WAAW,aAAa;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IACnC,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EACrB,KAAc,EACd,KAAS,EACT,KAAK,EACL,MAAM,EACN,WAAW,EACX,SAAS,EACT,KAAK,GACR,EAAE,aAAa,+BAgCf"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import Skeleton_module_default from "./Skeleton.module.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/skeleton/Skeleton.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A placeholder of content that loads, in its shape: a line of text, a block or a circle
|
|
8
|
+
* (decision 0034). It is hidden from assistive technologies: the region that loads says it, with
|
|
9
|
+
* `LoadingRegion`. It pulses, unless the user prefers reduced motion, with the colors of the theme.
|
|
10
|
+
*/
|
|
11
|
+
function Skeleton(t0) {
|
|
12
|
+
const $ = c(27);
|
|
13
|
+
const { shape: t1, lines: t2, width, height, aspectRatio, className, style } = t0;
|
|
14
|
+
const shape = t1 === void 0 ? "text" : t1;
|
|
15
|
+
const lines = t2 === void 0 ? 1 : t2;
|
|
16
|
+
let t3;
|
|
17
|
+
if ($[0] !== width) {
|
|
18
|
+
t3 = width !== void 0 ? { width } : {};
|
|
19
|
+
$[0] = width;
|
|
20
|
+
$[1] = t3;
|
|
21
|
+
} else t3 = $[1];
|
|
22
|
+
let t4;
|
|
23
|
+
if ($[2] !== height || $[3] !== shape) {
|
|
24
|
+
t4 = height !== void 0 && shape !== "text" ? { height } : {};
|
|
25
|
+
$[2] = height;
|
|
26
|
+
$[3] = shape;
|
|
27
|
+
$[4] = t4;
|
|
28
|
+
} else t4 = $[4];
|
|
29
|
+
let t5;
|
|
30
|
+
if ($[5] !== aspectRatio || $[6] !== shape) {
|
|
31
|
+
t5 = aspectRatio !== void 0 && shape === "rect" ? { aspectRatio } : {};
|
|
32
|
+
$[5] = aspectRatio;
|
|
33
|
+
$[6] = shape;
|
|
34
|
+
$[7] = t5;
|
|
35
|
+
} else t5 = $[7];
|
|
36
|
+
let t6;
|
|
37
|
+
if ($[8] !== style || $[9] !== t3 || $[10] !== t4 || $[11] !== t5) {
|
|
38
|
+
t6 = {
|
|
39
|
+
...t3,
|
|
40
|
+
...t4,
|
|
41
|
+
...t5,
|
|
42
|
+
...style
|
|
43
|
+
};
|
|
44
|
+
$[8] = style;
|
|
45
|
+
$[9] = t3;
|
|
46
|
+
$[10] = t4;
|
|
47
|
+
$[11] = t5;
|
|
48
|
+
$[12] = t6;
|
|
49
|
+
} else t6 = $[12];
|
|
50
|
+
const size = t6;
|
|
51
|
+
if (shape === "text" && lines > 1) {
|
|
52
|
+
let t7;
|
|
53
|
+
if ($[13] !== className) {
|
|
54
|
+
t7 = cx("panneau-skeleton", Skeleton_module_default.lines, className);
|
|
55
|
+
$[13] = className;
|
|
56
|
+
$[14] = t7;
|
|
57
|
+
} else t7 = $[14];
|
|
58
|
+
let t8;
|
|
59
|
+
if ($[15] !== lines) {
|
|
60
|
+
t8 = Array.from({ length: lines }, _temp);
|
|
61
|
+
$[15] = lines;
|
|
62
|
+
$[16] = t8;
|
|
63
|
+
} else t8 = $[16];
|
|
64
|
+
let t9;
|
|
65
|
+
if ($[17] !== size || $[18] !== t7 || $[19] !== t8) {
|
|
66
|
+
t9 = /* @__PURE__ */ jsx("span", {
|
|
67
|
+
"aria-hidden": "true",
|
|
68
|
+
className: t7,
|
|
69
|
+
style: size,
|
|
70
|
+
children: t8
|
|
71
|
+
});
|
|
72
|
+
$[17] = size;
|
|
73
|
+
$[18] = t7;
|
|
74
|
+
$[19] = t8;
|
|
75
|
+
$[20] = t9;
|
|
76
|
+
} else t9 = $[20];
|
|
77
|
+
return t9;
|
|
78
|
+
}
|
|
79
|
+
const t7 = shape === "text" ? Skeleton_module_default.line : shape === "circle" ? Skeleton_module_default.circle : Skeleton_module_default.rect;
|
|
80
|
+
let t8;
|
|
81
|
+
if ($[21] !== className || $[22] !== t7) {
|
|
82
|
+
t8 = cx("panneau-skeleton", Skeleton_module_default.block, t7, className);
|
|
83
|
+
$[21] = className;
|
|
84
|
+
$[22] = t7;
|
|
85
|
+
$[23] = t8;
|
|
86
|
+
} else t8 = $[23];
|
|
87
|
+
let t9;
|
|
88
|
+
if ($[24] !== size || $[25] !== t8) {
|
|
89
|
+
t9 = /* @__PURE__ */ jsx("span", {
|
|
90
|
+
"aria-hidden": "true",
|
|
91
|
+
className: t8,
|
|
92
|
+
style: size
|
|
93
|
+
});
|
|
94
|
+
$[24] = size;
|
|
95
|
+
$[25] = t8;
|
|
96
|
+
$[26] = t9;
|
|
97
|
+
} else t9 = $[26];
|
|
98
|
+
return t9;
|
|
99
|
+
}
|
|
100
|
+
function _temp(_, index) {
|
|
101
|
+
return /* @__PURE__ */ jsx("span", { className: cx(Skeleton_module_default.block, Skeleton_module_default.line) }, index);
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { Skeleton };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.js","names":["CSSProperties","cx","styles","SkeletonProps","shape","lines","width","height","aspectRatio","className","style","Skeleton","t0","$","_c","t1","t2","undefined","t3","t4","t5","t6","size","t7","t8","Array","from","length","_temp","t9","line","circle","rect","block","_","index","_c","styles"],"sources":["../../src/skeleton/Skeleton.tsx"],"sourcesContent":["import type { CSSProperties } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Skeleton.module.css';\n\nexport interface SkeletonProps {\n /**\n * `text` (the default): a line of text, or several with `lines`. `rect`: a block, as wide as\n * its container unless `width` says otherwise. `circle`: an avatar or an icon.\n */\n shape?: 'text' | 'rect' | 'circle';\n /** Lines of text, the last one shorter. Only for `text`. Defaults to 1. */\n lines?: number;\n /** A length, in pixels for a number. For `circle`, its diameter. */\n width?: number | string;\n /** A length, in pixels for a number. Lines of text take the height of a line. */\n height?: number | string;\n /** The shape of a `rect` without a height: `16 / 9` as `'16 / 9'`, or a number. */\n aspectRatio?: number | string;\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * A placeholder of content that loads, in its shape: a line of text, a block or a circle\n * (decision 0034). It is hidden from assistive technologies: the region that loads says it, with\n * `LoadingRegion`. It pulses, unless the user prefers reduced motion, with the colors of the theme.\n */\nexport function Skeleton({\n shape = 'text',\n lines = 1,\n width,\n height,\n aspectRatio,\n className,\n style,\n}: SkeletonProps) {\n const size: CSSProperties = {\n ...(width !== undefined ? { width } : {}),\n ...(height !== undefined && shape !== 'text' ? { height } : {}),\n ...(aspectRatio !== undefined && shape === 'rect' ? { aspectRatio } : {}),\n ...style,\n };\n if (shape === 'text' && lines > 1) {\n return (\n <span\n aria-hidden=\"true\"\n className={cx('panneau-skeleton', styles.lines, className)}\n style={size}\n >\n {Array.from({ length: lines }, (_, index) => (\n <span key={index} className={cx(styles.block, styles.line)} />\n ))}\n </span>\n );\n }\n return (\n <span\n aria-hidden=\"true\"\n className={cx(\n 'panneau-skeleton',\n styles.block,\n shape === 'text' ? styles.line : shape === 'circle' ? styles.circle : styles.rect,\n className,\n )}\n style={size}\n />\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./Skeleton.css";
|
|
2
|
+
//#region src/skeleton/Skeleton.module.css
|
|
3
|
+
var block = "panneau-skeleton-block";
|
|
4
|
+
var pulse = "panneau-skeleton-pulse";
|
|
5
|
+
var line = "panneau-skeleton-line";
|
|
6
|
+
var lines = "panneau-skeleton-lines";
|
|
7
|
+
var circle = "panneau-skeleton-circle";
|
|
8
|
+
var rect = "panneau-skeleton-rect";
|
|
9
|
+
var status = "panneau-skeleton-status";
|
|
10
|
+
var Skeleton_module_default = {
|
|
11
|
+
block,
|
|
12
|
+
pulse,
|
|
13
|
+
line,
|
|
14
|
+
lines,
|
|
15
|
+
circle,
|
|
16
|
+
rect,
|
|
17
|
+
status
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { block, circle, Skeleton_module_default as default, line, lines, pulse, rect, status };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=Skeleton.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.module.js","names":[],"sources":["../../src/skeleton/Skeleton.module.css"],"sourcesContent":[".block {\n display: block;\n flex-shrink: 0;\n max-width: 100%;\n background-color: var(\n --panneau-skeleton-color,\n color-mix(in srgb, var(--panneau-color-text) 9%, transparent)\n );\n border-radius: var(--panneau-skeleton-radius, var(--panneau-radius-sm));\n animation: pulse var(--panneau-skeleton-duration, 1.6s) ease-in-out infinite;\n}\n\n/* A line of text: as tall as a line, with the block in its middle, like the glyphs. */\n.line {\n box-sizing: border-box;\n height: 1.5em;\n height: 1lh;\n padding-block: 0.3em;\n background-clip: content-box;\n}\n\n.lines {\n display: block;\n max-width: 100%;\n}\n\n.lines > .line:last-child:not(:first-child) {\n width: 60%;\n}\n\n.circle {\n flex-shrink: 0;\n width: 2.5rem;\n aspect-ratio: 1;\n border-radius: 50%;\n}\n\n.rect {\n width: 100%;\n}\n\n@keyframes pulse {\n 50% {\n opacity: 0.45;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .block {\n animation: none;\n }\n}\n\n/* The status message of a loading region: read by screen readers, not shown. */\n.status {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/skeleton/tokens.ts"],"names":[],"mappings":"AAEA,0BAA0B;AAC1B,eAAO,MAAM,cAAc,8HAOzB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/skeleton/tokens.ts
|
|
3
|
+
/** Tokens of Skeleton. */
|
|
4
|
+
var skeletonTokens = defineComponentTokens("skeleton", {
|
|
5
|
+
/** Color of the blocks: a tint of the text, so they show on every surface. */
|
|
6
|
+
color: "color-mix(in srgb, var(--panneau-color-text) 9%, transparent)",
|
|
7
|
+
/** Corner radius of lines and rectangles. */
|
|
8
|
+
radius: "var(--panneau-radius-sm)",
|
|
9
|
+
/** Duration of one pulse. */
|
|
10
|
+
duration: "1.6s"
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { skeletonTokens };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","skeletonTokens","color","radius","duration"],"sources":["../../src/skeleton/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Skeleton. */\nexport const skeletonTokens = defineComponentTokens('skeleton', {\n /** Color of the blocks: a tint of the text, so they show on every surface. */\n color: 'color-mix(in srgb, var(--panneau-color-text) 9%, transparent)',\n /** Corner radius of lines and rectangles. */\n radius: 'var(--panneau-radius-sm)',\n /** Duration of one pulse. */\n duration: '1.6s',\n});\n"],"mappings":";;;AAGA,IAAaC,iBAAiBD,sBAAsB,YAAY;;CAE5DE,OAAO;;CAEPC,QAAQ;;CAERC,UAAU;AACd,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* A track with the part before the thumb filled, and the value next to the label. */
|
|
2
|
+
|
|
3
|
+
.panneau-slider {
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.panneau-slider-header {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: baseline;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
gap: var(--panneau-space-2);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.panneau-slider-output {
|
|
15
|
+
font-size: var(--panneau-font-size-sm);
|
|
16
|
+
font-variant-numeric: var(--panneau-font-numeric);
|
|
17
|
+
color: var(--panneau-color-text-muted);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.panneau-slider-track {
|
|
21
|
+
position: relative;
|
|
22
|
+
height: var(--panneau-control-height-sm);
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* The rail, centered in the track. */
|
|
27
|
+
.panneau-slider-track::before {
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 50%;
|
|
30
|
+
right: 0;
|
|
31
|
+
left: 0;
|
|
32
|
+
height: 0.25rem;
|
|
33
|
+
content: '';
|
|
34
|
+
background-color: var(--panneau-color-surface-sunken);
|
|
35
|
+
border: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
36
|
+
border-radius: var(--panneau-radius-full);
|
|
37
|
+
transform: translateY(-50%);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.panneau-slider-fill {
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 50%;
|
|
43
|
+
left: 0;
|
|
44
|
+
height: 0.25rem;
|
|
45
|
+
background-color: var(--panneau-color-accent);
|
|
46
|
+
border-radius: var(--panneau-radius-full);
|
|
47
|
+
transform: translateY(-50%);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.panneau-slider-thumb {
|
|
51
|
+
top: 50%;
|
|
52
|
+
width: 1.125rem;
|
|
53
|
+
height: 1.125rem;
|
|
54
|
+
background-color: var(--panneau-color-surface);
|
|
55
|
+
border: 2px solid var(--panneau-color-accent);
|
|
56
|
+
border-radius: var(--panneau-radius-full);
|
|
57
|
+
box-shadow: var(--panneau-shadow-sm);
|
|
58
|
+
transform: translateY(-50%);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.panneau-slider[data-empty] .panneau-slider-thumb {
|
|
62
|
+
border-color: var(--panneau-color-border-control);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.panneau-slider-thumb[data-dragging] {
|
|
66
|
+
background-color: var(--panneau-color-accent);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.panneau-slider-thumb[data-focus-visible] {
|
|
70
|
+
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
71
|
+
outline-offset: 2px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.panneau-slider[data-invalid] .panneau-slider-thumb {
|
|
75
|
+
border-color: var(--panneau-color-danger);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.panneau-slider[data-disabled] {
|
|
79
|
+
opacity: 0.6;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.panneau-slider[data-disabled] .panneau-slider-track {
|
|
83
|
+
cursor: not-allowed;
|
|
84
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type SliderProps as AriaSliderProps } from 'react-aria-components';
|
|
3
|
+
import { type FieldChromeProps } from '../field/FieldParts.js';
|
|
4
|
+
export interface SliderProps extends Omit<AriaSliderProps<number>, 'className' | 'style' | 'children' | 'value' | 'defaultValue' | 'onChange'>, FieldChromeProps {
|
|
5
|
+
/** The number, or `null` until the slider is moved: the thumb then rests at the start. */
|
|
6
|
+
value?: number | null;
|
|
7
|
+
defaultValue?: number | null;
|
|
8
|
+
onChange?: (value: number) => void;
|
|
9
|
+
/** Content after the value: a unit. */
|
|
10
|
+
suffix?: ReactNode;
|
|
11
|
+
/** Name of the input, in a form. */
|
|
12
|
+
name?: string;
|
|
13
|
+
isRequired?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A number between `minValue` and `maxValue` (0 and 100 by default), picked on a track by mouse,
|
|
17
|
+
* touch or arrow keys. Its value shows next to its label, formatted for the locale.
|
|
18
|
+
*/
|
|
19
|
+
export declare function Slider({ label, description, errors, value, defaultValue, onChange, suffix, name, isRequired, minValue, maxValue, className, labelClassName, descriptionClassName, errorsClassName, ...props }: SliderProps): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=Slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../src/slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAC9C,OAAO,EAEH,KAAK,WAAW,IAAI,eAAe,EAItC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,KAAK,gBAAgB,EAA2B,MAAM,qBAAqB,CAAC;AAIrF,MAAM,WAAW,WACb,SACI,IAAI,CACA,eAAe,CAAC,MAAM,CAAC,EACvB,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,CAC7E,EACD,gBAAgB;IACpB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,uCAAuC;IACvC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EACnB,KAAK,EACL,WAAW,EACX,MAAW,EACX,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,UAAU,EACV,QAAY,EACZ,QAAc,EACd,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,GAAG,KAAK,EACX,EAAE,WAAW,+BAyEb"}
|