@panneau/ui 5.0.0-alpha.3 → 5.0.0-alpha.31
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 +129 -4
- 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/aside/Aside.css +255 -0
- package/dist/aside/Aside.d.ts +86 -0
- package/dist/aside/Aside.d.ts.map +1 -0
- package/dist/aside/Aside.js +403 -0
- package/dist/aside/Aside.js.map +1 -0
- package/dist/aside/Aside.module.js +46 -0
- package/dist/aside/Aside.module.js.map +1 -0
- package/dist/aside/tokens.d.ts +3 -0
- package/dist/aside/tokens.d.ts.map +1 -0
- package/dist/aside/tokens.js +23 -0
- package/dist/aside/tokens.js.map +1 -0
- 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.css +13 -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/Button.module.js.map +1 -1
- package/dist/button/LinkButton.d.ts +22 -0
- package/dist/button/LinkButton.d.ts.map +1 -0
- package/dist/button/LinkButton.js +113 -0
- package/dist/button/LinkButton.js.map +1 -0
- package/dist/button/tokens.d.ts +1 -1
- package/dist/button/tokens.d.ts.map +1 -1
- package/dist/button/tokens.js +4 -0
- package/dist/button/tokens.js.map +1 -1
- package/dist/card/Card.css +1 -0
- package/dist/card/Card.js +76 -23
- package/dist/card/Card.js.map +1 -1
- package/dist/card/Card.module.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 +15 -16
- package/dist/checkbox/Checkbox.d.ts +1 -1
- package/dist/checkbox/Checkbox.js +86 -25
- package/dist/checkbox/Checkbox.js.map +1 -1
- 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 +2 -2
- 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 +50 -4
- 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 +2 -2
- 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 +30 -4
- 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.d.ts.map +1 -1
- package/dist/field/inputTokens.js +7 -1
- package/dist/field/inputTokens.js.map +1 -1
- package/dist/field/tokens.d.ts +1 -1
- package/dist/field/tokens.d.ts.map +1 -1
- package/dist/field/tokens.js +3 -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.css +5 -0
- package/dist/icon/Icon.d.ts +5 -1
- package/dist/icon/Icon.d.ts.map +1 -1
- package/dist/icon/Icon.js +38 -12
- package/dist/icon/Icon.js.map +1 -1
- package/dist/icon/Icon.module.js.map +1 -1
- package/dist/icon/lucideIconLoader.d.ts +1 -1
- package/dist/icon/lucideIconLoader.js.map +1 -1
- package/dist/icon/namedIcons.d.ts +1 -1
- package/dist/icon/namedIcons.js +87 -26
- package/dist/icon/namedIcons.js.map +1 -1
- package/dist/icon/tokens.d.ts +3 -0
- package/dist/icon/tokens.d.ts.map +1 -0
- package/dist/icon/tokens.js +13 -0
- package/dist/icon/tokens.js.map +1 -0
- 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 +67 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -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 +1 -1
- 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 +99 -9
- 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 +23 -3
- package/dist/radio-group/tokens.js.map +1 -1
- package/dist/root/PanneauRoot.css +29 -0
- package/dist/root/PanneauRoot.d.ts +37 -6
- package/dist/root/PanneauRoot.d.ts.map +1 -1
- package/dist/root/PanneauRoot.js +283 -85
- 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 +87 -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 +33 -0
- package/dist/segmented-control/tokens.js.map +1 -0
- package/dist/select/ListBox.css +86 -1
- package/dist/select/ListBox.module.js +11 -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 +352 -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 +94 -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 +21 -6
- package/dist/spinner/Spinner.d.ts.map +1 -1
- package/dist/spinner/Spinner.js +60 -10
- package/dist/spinner/Spinner.js.map +1 -1
- package/dist/spinner/Spinner.module.js +5 -1
- package/dist/spinner/Spinner.module.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 +16 -10
- package/dist/switch/Switch.d.ts +1 -1
- package/dist/switch/Switch.js +68 -11
- package/dist/switch/Switch.js.map +1 -1
- package/dist/switch/Switch.module.js.map +1 -1
- package/dist/switch/tokens.d.ts +1 -1
- package/dist/switch/tokens.d.ts.map +1 -1
- package/dist/switch/tokens.js +4 -2
- package/dist/switch/tokens.js.map +1 -1
- package/dist/tabs/Tabs.css +11 -4
- package/dist/tabs/Tabs.js +1 -1
- package/dist/tabs/Tabs.js.map +1 -1
- package/dist/tabs/Tabs.module.js.map +1 -1
- package/dist/tabs/tokens.d.ts +1 -1
- package/dist/tabs/tokens.js +1 -1
- package/dist/tabs/tokens.js.map +1 -1
- package/dist/tags-input/TagsInput.css +73 -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.d.ts +1 -1
- package/dist/text-area/TextArea.js +135 -28
- package/dist/text-area/TextArea.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 +6 -4
- package/dist/theme/checkTheme.d.ts.map +1 -1
- package/dist/theme/checkTheme.js +54 -7
- 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.d.ts +13 -0
- package/dist/theme/color.d.ts.map +1 -1
- package/dist/theme/color.js +41 -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 +21 -11
- package/dist/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +20 -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/selectedTokens.d.ts +11 -0
- package/dist/theme/selectedTokens.d.ts.map +1 -0
- package/dist/theme/selectedTokens.js +23 -0
- package/dist/theme/selectedTokens.js.map +1 -0
- package/dist/theme/semanticTokens.d.ts +1 -1
- package/dist/theme/semanticTokens.d.ts.map +1 -1
- package/dist/theme/semanticTokens.js +7 -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 +150 -19
- package/dist/toast/Toast.d.ts +55 -10
- package/dist/toast/Toast.d.ts.map +1 -1
- package/dist/toast/Toast.js +226 -70
- 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/dist/utils/preference.d.ts +7 -0
- package/dist/utils/preference.d.ts.map +1 -0
- package/dist/utils/preference.js +54 -0
- package/dist/utils/preference.js.map +1 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ Every component reads its own tokens, `--panneau-<component>-<token>`, which def
|
|
|
73
73
|
|
|
74
74
|
### Tones and appearances
|
|
75
75
|
|
|
76
|
-
Components with a color take a `tone`, like Bootstrap's theme colors: `neutral`, `accent`, `success`, `warning`, `danger` and `
|
|
76
|
+
Components with a color take a `tone`, like Bootstrap's theme colors: `neutral`, `accent`, `success`, `warning`, `danger`, `info` and `muted` are built in. What each one means for a state (`muted` is what is over: Archived, Cancelled) is written once, in [the tones of the protocol](../../docs/protocol.md#tones): follow it, so that a user learns the colors once. `Button`, `Badge` and `Alert` also take an `appearance` (`solid`, `outline`, `subtle`, and `ghost` for buttons):
|
|
77
77
|
|
|
78
78
|
```tsx
|
|
79
79
|
<Button tone="accent">Save</Button>
|
|
@@ -214,7 +214,7 @@ Responsive values are inline CSS variables, read by static rules in each contain
|
|
|
214
214
|
|
|
215
215
|
### Density
|
|
216
216
|
|
|
217
|
-
A density is a set of tokens: `--panneau-control-height` and `-sm`, `--panneau-font-size-control`, `--panneau-control-padding-x` (inputs and buttons)
|
|
217
|
+
A density is a set of tokens: `--panneau-control-height` and `-sm`, `--panneau-font-size-control`, `--panneau-control-padding-x` (inputs and buttons), `--panneau-row-padding-y` (rows of tables, options of lists) and `--panneau-target-size`, the smallest size of what a pointer or a finger hits that isn't a control (rows of checkboxes, radios and switches, links of the sidebar, sortable headers): 1.5rem, and 2.75rem in the touch density. The `density` of the root picks one, and the `size` props of components (`size="sm"`) stay relative to it.
|
|
218
218
|
|
|
219
219
|
A theme redefines a density in `densities`. Density tokens set in `tokens` instead apply to every density, which then no longer changes them.
|
|
220
220
|
|
|
@@ -245,6 +245,17 @@ Charts (dashboard widgets, reports) use only the chart tokens of the theme, in b
|
|
|
245
245
|
|
|
246
246
|
Each default categorical color reaches 3:1 against the surface (WCAG non-text contrast), and the eight stay distinct for people with protanopia, deuteranopia or tritanopia: a test checks it. `checkTheme()` runs the same checks on the chart colors a theme sets, and `checkColorDifferences(colors)` on any palette.
|
|
247
247
|
|
|
248
|
+
`Stat` and `LineChart` are the charts of the dashboard ([decision 0064](../../docs/decisions/0064-dashboard-widgets.md)):
|
|
249
|
+
|
|
250
|
+
```tsx
|
|
251
|
+
<Stat label="Overdue" value={3} help="Since Monday" tone="danger" href="/entries?filter[late]=1" />
|
|
252
|
+
<LineChart label="Entries per day" points={[{ label: 'Oct 5', value: 4 }, { label: 'Oct 6', value: 8 }]} />
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
- `Stat` shows a number for the locale (`format` takes the options of `Intl.NumberFormat`), what it counts above it and its help under it. A `tone` colors the number only when it calls for attention: the help says why.
|
|
256
|
+
- `LineChart` draws a line and the area under it on a categorical chart color (`color`, from 0), with the top of its scale and its first and last labels. The plot is hidden from assistive technologies, which read the values in a table.
|
|
257
|
+
- Both draw a skeleton of their shape while their `value` or `points` are `undefined`.
|
|
258
|
+
|
|
248
259
|
### Checking a theme
|
|
249
260
|
|
|
250
261
|
`checkTheme(theme)` reports what a theme makes hard to read: text tokens against backgrounds (4.5:1), control borders and chart colors (3:1), the text of each tone on the surface and on its subtle background, and categorical chart colors that look alike with a color vision deficiency. The `panneau-check-theme` command runs it on a JSON theme or on an export of a module, and exits with 1 when a check fails, for CI:
|
|
@@ -288,18 +299,132 @@ Class names are stable and readable, without a hash, like Bootstrap's: target th
|
|
|
288
299
|
|
|
289
300
|
The theme model is described in [decision 0024](../../docs/decisions/0024-theme-model.md).
|
|
290
301
|
|
|
302
|
+
### Content Security Policy
|
|
303
|
+
|
|
304
|
+
Panneau runs under a strict Content Security Policy: it never needs `'unsafe-eval'` or inline scripts. For styles:
|
|
305
|
+
|
|
306
|
+
- **CSS Modules** are files of the packages, that the project's bundler serves as its other stylesheets (`style-src 'self'`).
|
|
307
|
+
- **Themes and fonts** are `<style>` elements (and a `<link>` for each font stylesheet) that `PanneauRoot` writes from the theme. With a policy without `'unsafe-inline'`, give them the page's nonce: `<PanneauRoot nonce={nonce}>`, or `nonce` of `<Panneau>` and `createPanneauApp()`. Without it, Panneau reads the nonce where React Aria does: `<meta property="csp-nonce" content="…">`, then `__webpack_nonce__`. The default theme writes no `<style>`.
|
|
308
|
+
- **React Aria** adds one `<style>` (`react-aria-pressable-style`) with the same nonce.
|
|
309
|
+
- **Inline `style` attributes** that components set (widths of progress bars, positions of popovers) go through the CSSOM, which `style-src` doesn't block.
|
|
310
|
+
|
|
311
|
+
```html
|
|
312
|
+
<meta property="csp-nonce" content="{{ $nonce }}" />
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
```text
|
|
316
|
+
Content-Security-Policy: default-src 'self'; style-src 'self' 'nonce-{{ $nonce }}'; img-src 'self' data: https:
|
|
317
|
+
```
|
|
318
|
+
|
|
291
319
|
## Primitives
|
|
292
320
|
|
|
293
|
-
`Heading`, `Text`, `Prose`, `Stack`, `Inline`, `Grid`, `Container`, `Divider`, `Button`, `IconButton`, `TextInput`, `TextArea`, `NumberInput`, `Select` (single or multiple), `ComboBox`, `Checkbox`, `Switch`, `RadioGroup`, `DatePicker`, `TimeInput`, `Fieldset`, `Dialog`, `Popover`, `Menu`, `Tabs`, `Tooltip`, toasts (`useToast()`), `Alert`, `Badge`, `Spinner`, `Card`, `Disclosure` and `Icon`.
|
|
321
|
+
`Heading`, `Text`, `Prose`, `Stack`, `Inline`, `Grid`, `Container`, `Divider`, `Button`, `IconButton`, `TextInput`, `TextArea`, `NumberInput`, `Slider`, `TagsInput`, `Select` (single or multiple), `ComboBox`, `Checkbox`, `Switch`, `RadioGroup`, `SegmentedControl`, `DatePicker`, `TimeInput`, `Fieldset`, `Dialog`, `Popover`, `Menu`, `PillTrigger`, `Tabs`, `Tooltip`, toasts (`useToast()`), `Alert`, `Badge`, `Spinner`, `Skeleton`, `LoadingRegion`, `Card`, `Disclosure` and `Icon`.
|
|
294
322
|
|
|
295
323
|
- Every component accepts `className`, and `xxxClassName` props for its inner elements (`labelClassName`, `inputClassName`…).
|
|
296
324
|
- Labelled controls take `label`, `description` and `errors` (a list of messages: any message makes the control invalid and describes it).
|
|
297
|
-
- They work on phones: larger touch targets on touch screens, dialogs as bottom sheets, scrolling tabs.
|
|
325
|
+
- They work on phones: larger touch targets on touch screens, dialogs as bottom sheets (or the whole screen, with `fullScreenOnPhone`), scrolling tabs.
|
|
326
|
+
|
|
327
|
+
### Rich choices
|
|
328
|
+
|
|
329
|
+
Picking one item among a few rich ones, such as an account (an avatar, a name, a handle), a plan or a template, takes a menu or radio cards.
|
|
330
|
+
|
|
331
|
+
- **`Menu`** groups its items in `MenuSection`s, whose `title` is a small muted eyebrow that labels the group, and takes a `footer`: a short note under the items, after a line, which describes the menu and can't be focused. With `selectionMode` (`single` or `multiple`) and `selectedKeys`, its items are radio or checkbox items, and the selected ones have a check at their end and a sunken background.
|
|
332
|
+
- **`MenuItem`** takes a leading `media` (an avatar or an image) instead of an `icon`: larger when the item has a `description`, and clipped to a circle by default (`--panneau-menu-media-radius`).
|
|
333
|
+
- **`PillTrigger`** is a compact rounded button that shows the current value, with an optional leading `media` and a chevron, for a `MenuTrigger` or a `PopoverTrigger`. Its accessible name is its value: give it an `aria-label` that contains the value when the value alone doesn't say what it picks.
|
|
334
|
+
|
|
335
|
+
```tsx
|
|
336
|
+
<MenuTrigger>
|
|
337
|
+
<PillTrigger size="sm" media={<Avatar user={account} />}>
|
|
338
|
+
{account.name}
|
|
339
|
+
</PillTrigger>
|
|
340
|
+
<Menu
|
|
341
|
+
aria-label="Accounts"
|
|
342
|
+
selectionMode="single"
|
|
343
|
+
selectedKeys={[account.id]}
|
|
344
|
+
onSelectionChange={(keys) => keys !== 'all' && onChange([...keys][0])}
|
|
345
|
+
footer="Only this step changes."
|
|
346
|
+
>
|
|
347
|
+
<MenuSection title="Publish on">
|
|
348
|
+
{accounts.map((item) => (
|
|
349
|
+
<MenuItem
|
|
350
|
+
key={item.id}
|
|
351
|
+
id={item.id}
|
|
352
|
+
media={<Avatar user={item} />}
|
|
353
|
+
description={item.handle}
|
|
354
|
+
>
|
|
355
|
+
{item.name}
|
|
356
|
+
</MenuItem>
|
|
357
|
+
))}
|
|
358
|
+
</MenuSection>
|
|
359
|
+
</Menu>
|
|
360
|
+
</MenuTrigger>
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
- **`RadioGroup`** with `appearance="cards"` shows its options as bordered cards in a grid of `columns` (2 by default): each card has the radio, the option's `media`, its label and its description, and the selected card has a stronger border. The grid is a size container of its own, and becomes a single column when it is narrower than 28rem. Keyboard and focus work as in a list of radios.
|
|
364
|
+
|
|
365
|
+
```tsx
|
|
366
|
+
<RadioGroup
|
|
367
|
+
label="Publish on"
|
|
368
|
+
appearance="cards"
|
|
369
|
+
options={accounts.map((item) => ({
|
|
370
|
+
value: item.id,
|
|
371
|
+
label: item.name,
|
|
372
|
+
description: item.handle,
|
|
373
|
+
media: <Avatar user={item} />,
|
|
374
|
+
}))}
|
|
375
|
+
value={accountId}
|
|
376
|
+
onChange={setAccountId}
|
|
377
|
+
/>
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### Loading
|
|
381
|
+
|
|
382
|
+
Content that loads shows a skeleton of its shape, never a spinner in its place ([decision 0034](../../docs/decisions/0034-skeletons-while-content-loads.md)). Spinners are for operations in progress (`Button` `isPending`) and lookups inside a control (`ComboBox` `isLoading`).
|
|
383
|
+
|
|
384
|
+
- `Skeleton` is a block of the shape to come: a line of text (`lines` for several, the last one shorter), a `rect` with a `width`, a `height` or an `aspectRatio`, or a `circle`. It is `aria-hidden`, pulses unless the user prefers reduced motion, and reads the `skeleton` component tokens (`color`, `radius`, `duration`).
|
|
385
|
+
- `LoadingRegion` goes around the skeleton, in place of the content: it has `aria-busy="true"`, and a status message says once that the content loads (`label`, "Loading…" by default).
|
|
386
|
+
|
|
387
|
+
```tsx
|
|
388
|
+
function ArticleCard({ article }: { article: Article | undefined }) {
|
|
389
|
+
if (article === undefined) {
|
|
390
|
+
return (
|
|
391
|
+
<LoadingRegion label="Loading the article…">
|
|
392
|
+
<Skeleton shape="rect" aspectRatio="16 / 9" />
|
|
393
|
+
<Skeleton lines={3} />
|
|
394
|
+
</LoadingRegion>
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
return <ArticleView article={article} />;
|
|
398
|
+
}
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
A skeleton never replaces content already shown: while it is fetched again, it stays, dimmed, with `aria-busy`, as in lists.
|
|
402
|
+
|
|
403
|
+
### Toasts
|
|
404
|
+
|
|
405
|
+
`useToast().show(content, options)` shows a toast in the region of the closest `PanneauRoot` ([decision 0062](../../docs/decisions/0062-toasts.md)):
|
|
406
|
+
|
|
407
|
+
```tsx
|
|
408
|
+
const toasts = useToast();
|
|
409
|
+
toasts.show(
|
|
410
|
+
{ title: '3 entries archived', tone: 'success', action: { label: 'Undo', onAction: undo } },
|
|
411
|
+
{ key: 'archive' },
|
|
412
|
+
);
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
- **Only when the page doesn't already say it.** A toast for what happened out of sight (a run that finished, a change made from a menu), for what can be undone, and for an error that has no place in the page (the network, a logout that failed). No toast where the page shows the result: a form says "Saved" in its footer, an error of a field stays on it, and a run that starts shows in the runs button of the shell.
|
|
416
|
+
- **Name the thing, and offer the next step**: what was done to what ("“Spring contest” saved", "3 entries archived"), and an `action` that leads to the result ("Open", "Download") or undoes it ("Undo").
|
|
417
|
+
- **One per thing**: a toast with the `key` of one already shown replaces it. At most three show at once; the older ones fold behind the newest and unfold on hover or focus.
|
|
418
|
+
- **Timeouts that match what the toast holds** (`getToastTimeout()`): about 5 seconds, longer for a longer text, about 10 seconds with an action, none for an error (`danger`). Timers pause while the region is hovered or focused. `timeout` sets another, `null` none.
|
|
419
|
+
- **Quiet**: a success has the neutral look with its icon; only warnings and errors color the edge.
|
|
420
|
+
- **At the bottom, centered**, above what sticks to the bottom of the page: such an element calls `useToastOffset(ref)`, as the footer of a form does. `PanneauRoot`'s `toastPlacement` puts them at `bottom-end` or `top-end` instead. On a phone, they take the whole width.
|
|
298
421
|
|
|
299
422
|
## Icons
|
|
300
423
|
|
|
301
424
|
Components take icons as components: any Lucide icon (`icon={Pencil}`), or a component with the same props.
|
|
302
425
|
|
|
426
|
+
The stroke of icons scales with them, so every size has the same weight: `--panneau-icon-stroke-width` is in units of Lucide's 24-unit grid (`2` by default, about 1.33px at 16px). A theme sets it for a lighter or a bolder icon set.
|
|
427
|
+
|
|
303
428
|
Definitions name their icons (`"icon": "send"`, a name of [lucide.dev/icons](https://lucide.dev/icons)). `getNamedIcon(name)` turns a name into an icon component that goes wherever an icon component goes, and loads it with the `iconLoader` of `PanneauRoot`:
|
|
304
429
|
|
|
305
430
|
```tsx
|
package/dist/alert/Alert.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode, Ref } from 'react';
|
|
2
|
-
import { type IconComponent } from '../icon/Icon';
|
|
3
|
-
import type { Tone } from '../theme/tones';
|
|
2
|
+
import { type IconComponent } from '../icon/Icon.js';
|
|
3
|
+
import type { Tone } from '../theme/tones.js';
|
|
4
4
|
/** @deprecated Use `Tone`. */
|
|
5
5
|
export type AlertTone = Tone;
|
|
6
6
|
/** How an alert uses its tone. */
|
package/dist/alert/Alert.js
CHANGED
|
@@ -5,6 +5,7 @@ import { usePanneauIntl } from "../intl/usePanneauIntl.js";
|
|
|
5
5
|
import { toneClass } from "../theme/toneClass.js";
|
|
6
6
|
import { IconButton } from "../icon-button/IconButton.js";
|
|
7
7
|
import Alert_module_default from "./Alert.module.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { CircleAlert, CircleCheck, Info, TriangleAlert, X } from "lucide-react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
//#region src/alert/Alert.tsx
|
|
@@ -16,48 +17,115 @@ var TONE_ICONS = {
|
|
|
16
17
|
info: Info
|
|
17
18
|
};
|
|
18
19
|
/** A message inside the page: an error summary, a warning, a confirmation. */
|
|
19
|
-
function Alert(
|
|
20
|
+
function Alert(t0) {
|
|
21
|
+
const $ = c(31);
|
|
22
|
+
const { tone: t1, appearance: t2, variant, title, children, icon, actions, onDismiss, role, id, tabIndex, ref, className, titleClassName, bodyClassName } = t0;
|
|
23
|
+
const tone = t1 === void 0 ? "neutral" : t1;
|
|
24
|
+
const appearance = t2 === void 0 ? "subtle" : t2;
|
|
20
25
|
const intl = usePanneauIntl();
|
|
21
26
|
const shown = icon === void 0 ? TONE_ICONS[tone] ?? Info : icon;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
]
|
|
60
|
-
}
|
|
27
|
+
let t3;
|
|
28
|
+
if ($[0] !== appearance || $[1] !== className || $[2] !== tone || $[3] !== variant) {
|
|
29
|
+
t3 = cx("panneau-alert", Alert_module_default.alert, toneClass(tone), Alert_module_default[appearance], variant !== void 0 && `panneau-alert-variant-${variant}`, className);
|
|
30
|
+
$[0] = appearance;
|
|
31
|
+
$[1] = className;
|
|
32
|
+
$[2] = tone;
|
|
33
|
+
$[3] = variant;
|
|
34
|
+
$[4] = t3;
|
|
35
|
+
} else t3 = $[4];
|
|
36
|
+
let t4;
|
|
37
|
+
if ($[5] !== shown) {
|
|
38
|
+
t4 = shown !== null ? /* @__PURE__ */ jsx(Icon, {
|
|
39
|
+
icon: shown,
|
|
40
|
+
size: "lg",
|
|
41
|
+
className: Alert_module_default.icon
|
|
42
|
+
}) : null;
|
|
43
|
+
$[5] = shown;
|
|
44
|
+
$[6] = t4;
|
|
45
|
+
} else t4 = $[6];
|
|
46
|
+
let t5;
|
|
47
|
+
if ($[7] !== title || $[8] !== titleClassName) {
|
|
48
|
+
t5 = title !== void 0 && title !== null ? /* @__PURE__ */ jsx("div", {
|
|
49
|
+
className: cx(Alert_module_default.title, titleClassName),
|
|
50
|
+
children: title
|
|
51
|
+
}) : null;
|
|
52
|
+
$[7] = title;
|
|
53
|
+
$[8] = titleClassName;
|
|
54
|
+
$[9] = t5;
|
|
55
|
+
} else t5 = $[9];
|
|
56
|
+
let t6;
|
|
57
|
+
if ($[10] !== bodyClassName || $[11] !== children) {
|
|
58
|
+
t6 = children !== void 0 && children !== null ? /* @__PURE__ */ jsx("div", {
|
|
59
|
+
className: cx(Alert_module_default.body, bodyClassName),
|
|
60
|
+
children
|
|
61
|
+
}) : null;
|
|
62
|
+
$[10] = bodyClassName;
|
|
63
|
+
$[11] = children;
|
|
64
|
+
$[12] = t6;
|
|
65
|
+
} else t6 = $[12];
|
|
66
|
+
let t7;
|
|
67
|
+
if ($[13] !== actions) {
|
|
68
|
+
t7 = actions !== void 0 && actions !== null ? /* @__PURE__ */ jsx("div", {
|
|
69
|
+
className: Alert_module_default.actions,
|
|
70
|
+
children: actions
|
|
71
|
+
}) : null;
|
|
72
|
+
$[13] = actions;
|
|
73
|
+
$[14] = t7;
|
|
74
|
+
} else t7 = $[14];
|
|
75
|
+
let t8;
|
|
76
|
+
if ($[15] !== t5 || $[16] !== t6 || $[17] !== t7) {
|
|
77
|
+
t8 = /* @__PURE__ */ jsxs("div", {
|
|
78
|
+
className: Alert_module_default.content,
|
|
79
|
+
children: [
|
|
80
|
+
t5,
|
|
81
|
+
t6,
|
|
82
|
+
t7
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
$[15] = t5;
|
|
86
|
+
$[16] = t6;
|
|
87
|
+
$[17] = t7;
|
|
88
|
+
$[18] = t8;
|
|
89
|
+
} else t8 = $[18];
|
|
90
|
+
let t9;
|
|
91
|
+
if ($[19] !== intl || $[20] !== onDismiss) {
|
|
92
|
+
t9 = onDismiss !== void 0 ? /* @__PURE__ */ jsx(IconButton, {
|
|
93
|
+
icon: X,
|
|
94
|
+
size: "sm",
|
|
95
|
+
label: intl.formatMessage(messages.close),
|
|
96
|
+
showTooltip: false,
|
|
97
|
+
onPress: onDismiss,
|
|
98
|
+
className: Alert_module_default.dismiss
|
|
99
|
+
}) : null;
|
|
100
|
+
$[19] = intl;
|
|
101
|
+
$[20] = onDismiss;
|
|
102
|
+
$[21] = t9;
|
|
103
|
+
} else t9 = $[21];
|
|
104
|
+
let t10;
|
|
105
|
+
if ($[22] !== id || $[23] !== ref || $[24] !== role || $[25] !== t3 || $[26] !== t4 || $[27] !== t8 || $[28] !== t9 || $[29] !== tabIndex) {
|
|
106
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
107
|
+
ref,
|
|
108
|
+
id,
|
|
109
|
+
role,
|
|
110
|
+
tabIndex,
|
|
111
|
+
className: t3,
|
|
112
|
+
children: [
|
|
113
|
+
t4,
|
|
114
|
+
t8,
|
|
115
|
+
t9
|
|
116
|
+
]
|
|
117
|
+
});
|
|
118
|
+
$[22] = id;
|
|
119
|
+
$[23] = ref;
|
|
120
|
+
$[24] = role;
|
|
121
|
+
$[25] = t3;
|
|
122
|
+
$[26] = t4;
|
|
123
|
+
$[27] = t8;
|
|
124
|
+
$[28] = t9;
|
|
125
|
+
$[29] = tabIndex;
|
|
126
|
+
$[30] = t10;
|
|
127
|
+
} else t10 = $[30];
|
|
128
|
+
return t10;
|
|
61
129
|
}
|
|
62
130
|
//#endregion
|
|
63
131
|
export { Alert };
|
package/dist/alert/Alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","names":["styles"],"sources":["../../src/alert/Alert.tsx"],"sourcesContent":["import { CircleAlert, CircleCheck, Info, TriangleAlert, X } from 'lucide-react';\nimport type { ReactNode, Ref } from 'react';\n\nimport { IconButton } from '../icon-button/IconButton';\nimport { Icon, type IconComponent } from '../icon/Icon';\nimport { messages } from '../intl/messages';\nimport { usePanneauIntl } from '../intl/usePanneauIntl';\nimport { toneClass } from '../theme/toneClass';\nimport type { Tone } from '../theme/tones';\nimport { cx } from '../utils/cx';\nimport styles from './Alert.module.css';\n\n/** @deprecated Use `Tone`. */\nexport type AlertTone = Tone;\n\n/** How an alert uses its tone. */\nexport type AlertAppearance = 'subtle' | 'outline' | 'solid';\n\n/**\n * Named variants of `Alert`, registered by a theme (`components.alert.variants`). Declare them\n * here so that `variant=\"banner\"` type-checks.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- extended by projects\nexport interface AlertVariants {}\n\nconst TONE_ICONS: Partial<Record<Tone, IconComponent>> = {\n neutral: Info,\n success: CircleCheck,\n danger: CircleAlert,\n warning: TriangleAlert,\n info: Info,\n};\n\nexport interface AlertProps {\n /** Defaults to `neutral`. */\n tone?: Tone;\n /** Defaults to `subtle`. */\n appearance?: AlertAppearance;\n /** A named variant of the theme. */\n variant?: keyof AlertVariants & string;\n title?: ReactNode;\n children?: ReactNode;\n /** Replaces the icon of the tone (an info icon for tones added by a theme). `null` hides it. */\n icon?: IconComponent | null;\n /** Buttons under the message. */\n actions?: ReactNode;\n /** Shows a close button. */\n onDismiss?: () => void;\n /**\n * `alert` announces the message as soon as it appears, for errors that need attention.\n * `status` announces it politely. Without a role, it is only read in place.\n */\n role?: 'alert' | 'status';\n id?: string;\n /** Makes the alert focusable, to move focus to it (an error summary). */\n tabIndex?: number;\n ref?: Ref<HTMLDivElement>;\n className?: string;\n titleClassName?: string;\n bodyClassName?: string;\n}\n\n/** A message inside the page: an error summary, a warning, a confirmation. */\nexport function Alert({\n tone = 'neutral',\n appearance = 'subtle',\n variant,\n title,\n children,\n icon,\n actions,\n onDismiss,\n role,\n id,\n tabIndex,\n ref,\n className,\n titleClassName,\n bodyClassName,\n}: AlertProps) {\n const intl = usePanneauIntl();\n const shown = icon === undefined ? (TONE_ICONS[tone] ?? Info) : icon;\n return (\n <div\n ref={ref}\n id={id}\n role={role}\n tabIndex={tabIndex}\n className={cx(\n 'panneau-alert',\n styles.alert,\n toneClass(tone),\n styles[appearance],\n variant !== undefined && `panneau-alert-variant-${variant}`,\n className,\n )}\n >\n {shown !== null ? <Icon icon={shown} size=\"lg\" className={styles.icon} /> : null}\n <div className={styles.content}>\n {title !== undefined && title !== null ? (\n <div className={cx(styles.title, titleClassName)}>{title}</div>\n ) : null}\n {children !== undefined && children !== null ? (\n <div className={cx(styles.body, bodyClassName)}>{children}</div>\n ) : null}\n {actions !== undefined && actions !== null ? (\n <div className={styles.actions}>{actions}</div>\n ) : null}\n </div>\n {onDismiss !== undefined ? (\n <IconButton\n icon={X}\n size=\"sm\"\n label={intl.formatMessage(messages.close)}\n showTooltip={false}\n onPress={onDismiss}\n className={styles.dismiss}\n />\n ) : null}\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Alert.js","names":["CircleAlert","CircleCheck","Info","TriangleAlert","X","ReactNode","Ref","IconButton","Icon","IconComponent","messages","usePanneauIntl","toneClass","Tone","cx","styles","AlertTone","AlertAppearance","AlertVariants","TONE_ICONS","Partial","Record","neutral","success","danger","warning","info","AlertProps","tone","appearance","variant","title","children","icon","actions","onDismiss","role","id","tabIndex","ref","HTMLDivElement","className","titleClassName","bodyClassName","Alert","t0","$","_c","t1","t2","undefined","intl","shown","t3","alert","t4","t5","t6","body","t7","t8","content","t9","formatMessage","close","dismiss","t10","_c","styles"],"sources":["../../src/alert/Alert.tsx"],"sourcesContent":["import { CircleAlert, CircleCheck, Info, TriangleAlert, X } from 'lucide-react';\nimport type { ReactNode, Ref } from 'react';\n\nimport { IconButton } from '../icon-button/IconButton';\nimport { Icon, type IconComponent } from '../icon/Icon';\nimport { messages } from '../intl/messages';\nimport { usePanneauIntl } from '../intl/usePanneauIntl';\nimport { toneClass } from '../theme/toneClass';\nimport type { Tone } from '../theme/tones';\nimport { cx } from '../utils/cx';\nimport styles from './Alert.module.css';\n\n/** @deprecated Use `Tone`. */\nexport type AlertTone = Tone;\n\n/** How an alert uses its tone. */\nexport type AlertAppearance = 'subtle' | 'outline' | 'solid';\n\n/**\n * Named variants of `Alert`, registered by a theme (`components.alert.variants`). Declare them\n * here so that `variant=\"banner\"` type-checks.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- extended by projects\nexport interface AlertVariants {}\n\nconst TONE_ICONS: Partial<Record<Tone, IconComponent>> = {\n neutral: Info,\n success: CircleCheck,\n danger: CircleAlert,\n warning: TriangleAlert,\n info: Info,\n};\n\nexport interface AlertProps {\n /** Defaults to `neutral`. */\n tone?: Tone;\n /** Defaults to `subtle`. */\n appearance?: AlertAppearance;\n /** A named variant of the theme. */\n variant?: keyof AlertVariants & string;\n title?: ReactNode;\n children?: ReactNode;\n /** Replaces the icon of the tone (an info icon for tones added by a theme). `null` hides it. */\n icon?: IconComponent | null;\n /** Buttons under the message. */\n actions?: ReactNode;\n /** Shows a close button. */\n onDismiss?: () => void;\n /**\n * `alert` announces the message as soon as it appears, for errors that need attention.\n * `status` announces it politely. Without a role, it is only read in place.\n */\n role?: 'alert' | 'status';\n id?: string;\n /** Makes the alert focusable, to move focus to it (an error summary). */\n tabIndex?: number;\n ref?: Ref<HTMLDivElement>;\n className?: string;\n titleClassName?: string;\n bodyClassName?: string;\n}\n\n/** A message inside the page: an error summary, a warning, a confirmation. */\nexport function Alert({\n tone = 'neutral',\n appearance = 'subtle',\n variant,\n title,\n children,\n icon,\n actions,\n onDismiss,\n role,\n id,\n tabIndex,\n ref,\n className,\n titleClassName,\n bodyClassName,\n}: AlertProps) {\n const intl = usePanneauIntl();\n const shown = icon === undefined ? (TONE_ICONS[tone] ?? Info) : icon;\n return (\n <div\n ref={ref}\n id={id}\n role={role}\n tabIndex={tabIndex}\n className={cx(\n 'panneau-alert',\n styles.alert,\n toneClass(tone),\n styles[appearance],\n variant !== undefined && `panneau-alert-variant-${variant}`,\n className,\n )}\n >\n {shown !== null ? <Icon icon={shown} size=\"lg\" className={styles.icon} /> : null}\n <div className={styles.content}>\n {title !== undefined && title !== null ? (\n <div className={cx(styles.title, titleClassName)}>{title}</div>\n ) : null}\n {children !== undefined && children !== null ? (\n <div className={cx(styles.body, bodyClassName)}>{children}</div>\n ) : null}\n {actions !== undefined && actions !== null ? (\n <div className={styles.actions}>{actions}</div>\n ) : null}\n </div>\n {onDismiss !== undefined ? (\n <IconButton\n icon={X}\n size=\"sm\"\n label={intl.formatMessage(messages.close)}\n showTooltip={false}\n onPress={onDismiss}\n className={styles.dismiss}\n />\n ) : null}\n </div>\n );\n}\n"],"mappings":"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"}
|
package/dist/alert/tokens.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Tokens of Alert. */
|
|
2
|
-
export declare const alertTokens: import("
|
|
2
|
+
export declare const alertTokens: import("../index.js").ComponentTokens<"alert", "panneau-alert-radius" | "panneau-alert-gap" | "panneau-alert-padding-y" | "panneau-alert-padding-x" | "panneau-alert-border-width" | "panneau-alert-title-font-weight">;
|
|
3
3
|
//# sourceMappingURL=tokens.d.ts.map
|
package/dist/alert/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/alert/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Alert. */\nexport const alertTokens = defineComponentTokens('alert', {\n /** Space between the icon, the content and the dismiss button. */\n gap: 'var(--panneau-space-3)',\n /** Vertical padding. */\n 'padding-y': 'var(--panneau-space-3)',\n /** Horizontal padding. */\n 'padding-x': 'var(--panneau-space-4)',\n /** Width of the border. */\n 'border-width': 'var(--panneau-border-width)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-md)',\n /** Font weight of the title. */\n 'title-font-weight': 'var(--panneau-font-weight-bold)',\n});\n"],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","alertTokens","gap","radius"],"sources":["../../src/alert/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Alert. */\nexport const alertTokens = defineComponentTokens('alert', {\n /** Space between the icon, the content and the dismiss button. */\n gap: 'var(--panneau-space-3)',\n /** Vertical padding. */\n 'padding-y': 'var(--panneau-space-3)',\n /** Horizontal padding. */\n 'padding-x': 'var(--panneau-space-4)',\n /** Width of the border. */\n 'border-width': 'var(--panneau-border-width)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-md)',\n /** Font weight of the title. */\n 'title-font-weight': 'var(--panneau-font-weight-bold)',\n});\n"],"mappings":";;;AAGA,IAAaC,cAAcD,sBAAsB,SAAS;;CAEtDE,KAAK;;CAEL,aAAa;;CAEb,aAAa;;CAEb,gBAAgB;;CAEhBC,QAAQ;;CAER,qBAAqB;AACzB,CAAC"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/* The column next to the main content (decision 0074): below it or over it on narrow layouts,
|
|
2
|
+
beside it from 56rem of the layout, where it stays in view. */
|
|
3
|
+
|
|
4
|
+
.panneau-aside-layout {
|
|
5
|
+
container: panneau-aside-layout / inline-size;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.panneau-aside-grid {
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: minmax(0, 1fr);
|
|
12
|
+
align-items: start;
|
|
13
|
+
gap: var(--panneau-space-6);
|
|
14
|
+
min-width: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.panneau-aside-main {
|
|
18
|
+
min-width: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.panneau-aside {
|
|
22
|
+
container: panneau-aside / inline-size;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
min-width: 0;
|
|
26
|
+
background: var(--panneau-aside-bg, var(--panneau-color-surface));
|
|
27
|
+
border: var(
|
|
28
|
+
--panneau-aside-border,
|
|
29
|
+
var(--panneau-border-width) solid var(--panneau-color-border)
|
|
30
|
+
);
|
|
31
|
+
border-radius: var(--panneau-aside-radius, var(--panneau-radius-lg));
|
|
32
|
+
box-shadow: var(--panneau-aside-shadow, var(--panneau-shadow-sm));
|
|
33
|
+
outline: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.panneau-aside:focus-visible {
|
|
37
|
+
box-shadow:
|
|
38
|
+
var(--panneau-aside-shadow, var(--panneau-shadow-sm)),
|
|
39
|
+
0 0 0 var(--panneau-focus-width) var(--panneau-color-focus);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Over the content, on its right: the whole height of the screen, the whole width on a phone. */
|
|
43
|
+
.panneau-aside-overlay > .panneau-aside {
|
|
44
|
+
position: fixed;
|
|
45
|
+
inset-block: 0;
|
|
46
|
+
inset-inline-end: 0;
|
|
47
|
+
z-index: var(--panneau-z-overlay);
|
|
48
|
+
width: min(100%, var(--panneau-aside-width, 22rem));
|
|
49
|
+
border-block: 0;
|
|
50
|
+
border-inline-end: 0;
|
|
51
|
+
border-radius: 0;
|
|
52
|
+
box-shadow: var(--panneau-shadow-lg);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.panneau-aside-overlay > .panneau-aside[data-wide] {
|
|
56
|
+
width: min(100%, var(--panneau-aside-width-wide, 50%));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.panneau-aside-overlay > .panneau-aside:focus-visible {
|
|
60
|
+
box-shadow:
|
|
61
|
+
var(--panneau-shadow-lg),
|
|
62
|
+
inset 0 0 0 var(--panneau-focus-width) var(--panneau-color-focus);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Widening only matters beside the content, or over it. */
|
|
66
|
+
.panneau-aside-widen {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.panneau-aside-overlay > .panneau-aside .panneau-aside-widen {
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* On a phone, over the whole width: there is nothing to widen. */
|
|
75
|
+
@container panneau-aside-layout (max-width: 40rem) {
|
|
76
|
+
.panneau-aside-overlay > .panneau-aside,
|
|
77
|
+
.panneau-aside-overlay > .panneau-aside[data-wide] {
|
|
78
|
+
width: 100%;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.panneau-aside-overlay > .panneau-aside .panneau-aside-widen {
|
|
82
|
+
display: none;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@container panneau-aside-layout (min-width: 56rem) {
|
|
87
|
+
.panneau-aside-with-aside {
|
|
88
|
+
grid-template-columns: minmax(0, 1fr) var(--panneau-aside-width, 22rem);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.panneau-aside-with-aside:has(> .panneau-aside[data-wide]) {
|
|
92
|
+
grid-template-columns: minmax(0, 1fr) var(--panneau-aside-width-wide, 50%);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.panneau-aside-grid > .panneau-aside,
|
|
96
|
+
.panneau-aside-grid.panneau-aside-overlay > .panneau-aside {
|
|
97
|
+
position: sticky;
|
|
98
|
+
inset-block: var(--panneau-space-4) auto;
|
|
99
|
+
z-index: auto;
|
|
100
|
+
width: auto;
|
|
101
|
+
max-height: calc(100dvh - 2 * var(--panneau-space-4) - var(--panneau-frame-bottom, 0px));
|
|
102
|
+
border: var(
|
|
103
|
+
--panneau-aside-border,
|
|
104
|
+
var(--panneau-border-width) solid var(--panneau-color-border)
|
|
105
|
+
);
|
|
106
|
+
border-radius: var(--panneau-aside-radius, var(--panneau-radius-lg));
|
|
107
|
+
box-shadow: var(--panneau-aside-shadow, var(--panneau-shadow-sm));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.panneau-aside-grid > .panneau-aside:focus-visible,
|
|
111
|
+
.panneau-aside-grid.panneau-aside-overlay > .panneau-aside:focus-visible {
|
|
112
|
+
box-shadow:
|
|
113
|
+
var(--panneau-aside-shadow, var(--panneau-shadow-sm)),
|
|
114
|
+
0 0 0 var(--panneau-focus-width) var(--panneau-color-focus);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.panneau-aside-grid > .panneau-aside .panneau-aside-widen {
|
|
118
|
+
display: inline-flex;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.panneau-aside-header {
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: flex-start;
|
|
125
|
+
justify-content: space-between;
|
|
126
|
+
gap: var(--panneau-space-2);
|
|
127
|
+
padding: var(--panneau-aside-padding, var(--panneau-space-4))
|
|
128
|
+
var(--panneau-aside-padding, var(--panneau-space-4)) var(--panneau-space-2);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.panneau-aside-header-buttons {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex: none;
|
|
134
|
+
gap: var(--panneau-space-1);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.panneau-aside-title {
|
|
138
|
+
min-width: 0;
|
|
139
|
+
margin: 0;
|
|
140
|
+
overflow-wrap: anywhere;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* The title while it loads: a line of the heading's size. */
|
|
144
|
+
.panneau-aside-title-skeleton {
|
|
145
|
+
font-size: var(--panneau-heading-2-font-size, 1.375rem);
|
|
146
|
+
line-height: var(--panneau-heading-2-line-height, var(--panneau-line-height-tight));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.panneau-aside-toolbar {
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-wrap: wrap;
|
|
152
|
+
gap: var(--panneau-space-2);
|
|
153
|
+
padding: 0 var(--panneau-aside-padding, var(--panneau-space-4)) var(--panneau-space-3);
|
|
154
|
+
border-bottom: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.panneau-aside-body {
|
|
158
|
+
display: flex;
|
|
159
|
+
flex: 1 1 auto;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
min-height: 0;
|
|
162
|
+
padding: var(--panneau-aside-padding, var(--panneau-space-4));
|
|
163
|
+
overflow-y: auto;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* A block of the aside, under a line when it follows another. */
|
|
167
|
+
.panneau-aside-panel {
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
min-width: 0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* A panel with nothing to show, such as the errors of a form before a failed save, takes no
|
|
174
|
+
space. So does a panel shown beside the content only, below or over it. Lines separate the
|
|
175
|
+
panels that show. */
|
|
176
|
+
.panneau-aside-panel:empty,
|
|
177
|
+
.panneau-aside-panel[data-beside-only] {
|
|
178
|
+
display: none;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.panneau-aside-panel:not(:empty, [data-beside-only]) ~ .panneau-aside-panel:not(:empty, [data-beside-only]) {
|
|
182
|
+
margin-top: var(--panneau-aside-padding, var(--panneau-space-4));
|
|
183
|
+
padding-top: var(--panneau-aside-padding, var(--panneau-space-4));
|
|
184
|
+
border-top: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@container panneau-aside-layout (min-width: 56rem) {
|
|
188
|
+
.panneau-aside-panel[data-beside-only]:not(:empty) {
|
|
189
|
+
display: flex;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.panneau-aside-panel:not(:empty) ~ .panneau-aside-panel:not(:empty) {
|
|
193
|
+
margin-top: var(--panneau-aside-padding, var(--panneau-space-4));
|
|
194
|
+
padding-top: var(--panneau-aside-padding, var(--panneau-space-4));
|
|
195
|
+
border-top: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.panneau-aside-panel-heading {
|
|
200
|
+
margin: 0;
|
|
201
|
+
font: inherit;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.panneau-aside-panel-title {
|
|
205
|
+
flex: 1 1 auto;
|
|
206
|
+
min-width: 0;
|
|
207
|
+
margin: 0;
|
|
208
|
+
font-size: var(--panneau-font-size-md);
|
|
209
|
+
font-weight: var(--panneau-font-weight-bold);
|
|
210
|
+
line-height: var(--panneau-line-height-tight);
|
|
211
|
+
color: var(--panneau-color-text);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.panneau-aside-panel-trigger {
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
gap: var(--panneau-space-2);
|
|
218
|
+
width: 100%;
|
|
219
|
+
min-height: var(--panneau-target-size, 1.5rem);
|
|
220
|
+
padding: 0;
|
|
221
|
+
text-align: start;
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
background: transparent;
|
|
224
|
+
border: 0;
|
|
225
|
+
border-radius: var(--panneau-radius-sm);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.panneau-aside-panel-trigger[data-focus-visible] {
|
|
229
|
+
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
230
|
+
outline-offset: 2px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.panneau-aside-chevron {
|
|
234
|
+
flex: none;
|
|
235
|
+
color: var(--panneau-color-text-muted);
|
|
236
|
+
transition: transform var(--panneau-duration);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.panneau-aside-panel:not([data-expanded]) .panneau-aside-chevron {
|
|
240
|
+
transform: rotate(-90deg);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* A panel with a title, which can't be collapsed. */
|
|
244
|
+
section.panneau-aside-panel > .panneau-aside-panel-title {
|
|
245
|
+
margin-bottom: var(--panneau-space-3);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.panneau-aside-panel-content {
|
|
249
|
+
min-width: 0;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Collapsed, the content is hidden with its space. */
|
|
253
|
+
.panneau-aside-panel-heading + .panneau-aside-panel-content {
|
|
254
|
+
padding-top: var(--panneau-space-3);
|
|
255
|
+
}
|