@panneau/ui 5.0.0-alpha.1 → 5.0.0-alpha.3
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 +276 -13
- package/bin/check-theme.js +5 -0
- package/dist/alert/Alert.css +28 -42
- package/dist/alert/Alert.d.ts +18 -4
- package/dist/alert/Alert.d.ts.map +1 -1
- package/dist/alert/Alert.js +4 -3
- package/dist/alert/Alert.js.map +1 -1
- package/dist/alert/Alert.module.js +14 -16
- package/dist/alert/Alert.module.js.map +1 -1
- package/dist/alert/tokens.d.ts +3 -0
- package/dist/alert/tokens.d.ts.map +1 -0
- package/dist/alert/tokens.js +21 -0
- package/dist/alert/tokens.js.map +1 -0
- package/dist/badge/Badge.css +24 -36
- package/dist/badge/Badge.d.ts +18 -3
- package/dist/badge/Badge.d.ts.map +1 -1
- package/dist/badge/Badge.js +3 -2
- package/dist/badge/Badge.js.map +1 -1
- package/dist/badge/Badge.module.js +9 -13
- package/dist/badge/Badge.module.js.map +1 -1
- package/dist/badge/tokens.d.ts +3 -0
- package/dist/badge/tokens.d.ts.map +1 -0
- package/dist/badge/tokens.js +23 -0
- package/dist/badge/tokens.js.map +1 -0
- package/dist/button/Button.css +58 -42
- package/dist/button/Button.d.ts +30 -3
- package/dist/button/Button.d.ts.map +1 -1
- package/dist/button/Button.js +27 -2
- package/dist/button/Button.js.map +1 -1
- package/dist/button/Button.module.js +14 -14
- package/dist/button/Button.module.js.map +1 -1
- package/dist/button/tokens.d.ts +3 -0
- package/dist/button/tokens.d.ts.map +1 -0
- package/dist/button/tokens.js +25 -0
- package/dist/button/tokens.js.map +1 -0
- package/dist/card/Card.css +27 -20
- package/dist/card/Card.js +1 -1
- package/dist/card/Card.js.map +1 -1
- package/dist/card/Card.module.js +5 -5
- package/dist/card/Card.module.js.map +1 -1
- package/dist/card/tokens.d.ts +3 -0
- package/dist/card/tokens.d.ts.map +1 -0
- package/dist/card/tokens.js +31 -0
- package/dist/card/tokens.js.map +1 -0
- package/dist/checkbox/Checkbox.css +22 -21
- package/dist/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/checkbox/Checkbox.js +2 -1
- package/dist/checkbox/Checkbox.js.map +1 -1
- package/dist/checkbox/Checkbox.module.js +6 -6
- package/dist/checkbox/Checkbox.module.js.map +1 -1
- package/dist/checkbox/ChoiceChrome.d.ts +3 -1
- package/dist/checkbox/ChoiceChrome.d.ts.map +1 -1
- package/dist/checkbox/ChoiceChrome.js +2 -2
- package/dist/checkbox/ChoiceChrome.js.map +1 -1
- package/dist/checkbox/tokens.d.ts +3 -0
- package/dist/checkbox/tokens.d.ts.map +1 -0
- package/dist/checkbox/tokens.js +21 -0
- package/dist/checkbox/tokens.js.map +1 -0
- package/dist/combo-box/ComboBox.css +4 -4
- package/dist/combo-box/ComboBox.js +1 -1
- package/dist/combo-box/ComboBox.js.map +1 -1
- package/dist/combo-box/ComboBox.module.js +3 -3
- package/dist/container/Container.css +32 -0
- package/dist/container/Container.d.ts +15 -0
- package/dist/container/Container.d.ts.map +1 -0
- package/dist/container/Container.js +18 -0
- package/dist/container/Container.js.map +1 -0
- package/dist/container/Container.module.js +20 -0
- package/dist/container/Container.module.js.map +1 -0
- package/dist/container/tokens.d.ts +3 -0
- package/dist/container/tokens.d.ts.map +1 -0
- package/dist/container/tokens.js +19 -0
- package/dist/container/tokens.js.map +1 -0
- package/dist/date-picker/DatePicker.css +30 -30
- package/dist/date-picker/DatePicker.js +1 -1
- package/dist/date-picker/DatePicker.js.map +1 -1
- package/dist/date-picker/DatePicker.module.js +11 -11
- package/dist/date-picker/DatePicker.module.js.map +1 -1
- package/dist/date-picker/calendarTokens.d.ts +3 -0
- package/dist/date-picker/calendarTokens.d.ts.map +1 -0
- package/dist/date-picker/calendarTokens.js +17 -0
- package/dist/date-picker/calendarTokens.js.map +1 -0
- package/dist/dialog/Dialog.css +40 -36
- package/dist/dialog/Dialog.js +1 -1
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/Dialog.module.js +11 -11
- package/dist/dialog/Dialog.module.js.map +1 -1
- package/dist/dialog/tokens.d.ts +3 -0
- package/dist/dialog/tokens.d.ts.map +1 -0
- package/dist/dialog/tokens.js +29 -0
- package/dist/dialog/tokens.js.map +1 -0
- package/dist/disclosure/Disclosure.css +12 -12
- package/dist/disclosure/Disclosure.d.ts.map +1 -1
- package/dist/disclosure/Disclosure.js +1 -1
- package/dist/disclosure/Disclosure.js.map +1 -1
- package/dist/disclosure/Disclosure.module.js +7 -7
- package/dist/disclosure/Disclosure.module.js.map +1 -1
- package/dist/disclosure/tokens.d.ts +3 -0
- package/dist/disclosure/tokens.d.ts.map +1 -0
- package/dist/disclosure/tokens.js +15 -0
- package/dist/disclosure/tokens.js.map +1 -0
- package/dist/divider/Divider.css +17 -0
- package/dist/divider/Divider.d.ts +8 -0
- package/dist/divider/Divider.d.ts.map +1 -0
- package/dist/divider/Divider.js +21 -0
- package/dist/divider/Divider.js.map +1 -0
- package/dist/divider/Divider.module.js +12 -0
- package/dist/divider/Divider.module.js.map +1 -0
- package/dist/divider/tokens.d.ts +3 -0
- package/dist/divider/tokens.d.ts.map +1 -0
- package/dist/divider/tokens.js +13 -0
- package/dist/divider/tokens.js.map +1 -0
- package/dist/field/Field.css +40 -37
- package/dist/field/Field.module.js +11 -11
- package/dist/field/Field.module.js.map +1 -1
- package/dist/field/Fieldset.js +1 -1
- package/dist/field/Fieldset.js.map +1 -1
- package/dist/field/inputTokens.d.ts +3 -0
- package/dist/field/inputTokens.d.ts.map +1 -0
- package/dist/field/inputTokens.js +21 -0
- package/dist/field/inputTokens.js.map +1 -0
- package/dist/field/tokens.d.ts +3 -0
- package/dist/field/tokens.d.ts.map +1 -0
- package/dist/field/tokens.js +15 -0
- package/dist/field/tokens.js.map +1 -0
- package/dist/grid/Grid.css +174 -0
- package/dist/grid/Grid.d.ts +28 -0
- package/dist/grid/Grid.d.ts.map +1 -0
- package/dist/grid/Grid.js +31 -0
- package/dist/grid/Grid.js.map +1 -0
- package/dist/grid/Grid.module.js +12 -0
- package/dist/grid/Grid.module.js.map +1 -0
- package/dist/grid/GridItem.css +59 -0
- package/dist/grid/GridItem.module.js +7 -0
- package/dist/grid/GridItem.module.js.map +1 -0
- package/dist/grid/tokens.d.ts +3 -0
- package/dist/grid/tokens.d.ts.map +1 -0
- package/dist/grid/tokens.js +10 -0
- package/dist/grid/tokens.js.map +1 -0
- package/dist/heading/Heading.css +52 -0
- package/dist/heading/Heading.d.ts +17 -0
- package/dist/heading/Heading.d.ts.map +1 -0
- package/dist/heading/Heading.js +17 -0
- package/dist/heading/Heading.js.map +1 -0
- package/dist/heading/Heading.module.js +16 -0
- package/dist/heading/Heading.module.js.map +1 -0
- package/dist/heading/tokens.d.ts +6 -0
- package/dist/heading/tokens.d.ts.map +1 -0
- package/dist/heading/tokens.js +66 -0
- package/dist/heading/tokens.js.map +1 -0
- package/dist/icon/Icon.css +1 -1
- package/dist/icon/Icon.js +1 -1
- package/dist/icon/Icon.js.map +1 -1
- package/dist/icon/Icon.module.js +1 -1
- package/dist/icon/lucideIconLoader.d.ts +9 -0
- package/dist/icon/lucideIconLoader.d.ts.map +1 -0
- package/dist/icon/lucideIconLoader.js +22 -0
- package/dist/icon/lucideIconLoader.js.map +1 -0
- package/dist/icon/namedIcons.d.ts +15 -8
- package/dist/icon/namedIcons.d.ts.map +1 -1
- package/dist/icon/namedIcons.js +43 -29
- package/dist/icon/namedIcons.js.map +1 -1
- package/dist/icon-button/IconButton.css +2 -2
- package/dist/icon-button/IconButton.d.ts +1 -1
- package/dist/icon-button/IconButton.d.ts.map +1 -1
- package/dist/icon-button/IconButton.js +3 -3
- package/dist/icon-button/IconButton.js.map +1 -1
- package/dist/icon-button/IconButton.module.js +2 -2
- package/dist/index.d.ts +26 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -3
- package/dist/inline/Inline.css +142 -0
- package/dist/inline/Inline.d.ts +17 -0
- package/dist/inline/Inline.d.ts.map +1 -0
- package/dist/inline/Inline.js +21 -0
- package/dist/inline/Inline.js.map +1 -0
- package/dist/inline/Inline.module.js +12 -0
- package/dist/inline/Inline.module.js.map +1 -0
- package/dist/inline/tokens.d.ts +3 -0
- package/dist/inline/tokens.d.ts.map +1 -0
- package/dist/inline/tokens.js +10 -0
- package/dist/inline/tokens.js.map +1 -0
- package/dist/layout/responsive.d.ts +38 -0
- package/dist/layout/responsive.d.ts.map +1 -0
- package/dist/layout/responsive.js +49 -0
- package/dist/layout/responsive.js.map +1 -0
- package/dist/menu/Menu.js +2 -2
- package/dist/menu/Menu.js.map +1 -1
- package/dist/named-icons/index.d.ts +2 -0
- package/dist/named-icons/index.d.ts.map +1 -0
- package/dist/named-icons/index.js +1 -0
- package/dist/number-input/NumberInput.css +12 -12
- package/dist/number-input/NumberInput.js +1 -1
- package/dist/number-input/NumberInput.js.map +1 -1
- package/dist/number-input/NumberInput.module.js +4 -4
- package/dist/number-input/NumberInput.module.js.map +1 -1
- package/dist/number-input/tokens.d.ts +3 -0
- package/dist/number-input/tokens.d.ts.map +1 -0
- package/dist/number-input/tokens.js +10 -0
- package/dist/number-input/tokens.js.map +1 -0
- package/dist/popover/Popover.css +13 -12
- package/dist/popover/Popover.js +2 -2
- package/dist/popover/Popover.js.map +1 -1
- package/dist/popover/Popover.module.js +3 -3
- package/dist/popover/Popover.module.js.map +1 -1
- package/dist/popover/tokens.d.ts +3 -0
- package/dist/popover/tokens.d.ts.map +1 -0
- package/dist/popover/tokens.js +19 -0
- package/dist/popover/tokens.js.map +1 -0
- package/dist/prose/Prose.css +141 -0
- package/dist/prose/Prose.d.ts +11 -0
- package/dist/prose/Prose.d.ts.map +1 -0
- package/dist/prose/Prose.js +18 -0
- package/dist/prose/Prose.js.map +1 -0
- package/dist/prose/Prose.module.js +8 -0
- package/dist/prose/Prose.module.js.map +1 -0
- package/dist/prose/tokens.d.ts +3 -0
- package/dist/prose/tokens.d.ts.map +1 -0
- package/dist/prose/tokens.js +33 -0
- package/dist/prose/tokens.js.map +1 -0
- package/dist/radio-group/RadioGroup.css +21 -20
- package/dist/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/radio-group/RadioGroup.js +2 -2
- package/dist/radio-group/RadioGroup.js.map +1 -1
- package/dist/radio-group/RadioGroup.module.js +6 -6
- package/dist/radio-group/RadioGroup.module.js.map +1 -1
- package/dist/radio-group/tokens.d.ts +3 -0
- package/dist/radio-group/tokens.d.ts.map +1 -0
- package/dist/radio-group/tokens.js +19 -0
- package/dist/radio-group/tokens.js.map +1 -0
- package/dist/root/PanneauRoot.css +243 -20
- package/dist/root/PanneauRoot.d.ts +35 -4
- package/dist/root/PanneauRoot.d.ts.map +1 -1
- package/dist/root/PanneauRoot.js +107 -20
- package/dist/root/PanneauRoot.js.map +1 -1
- package/dist/root/PanneauRoot.module.js +11 -3
- package/dist/root/PanneauRoot.module.js.map +1 -1
- package/dist/root/ThemeScope.d.ts +24 -0
- package/dist/root/ThemeScope.d.ts.map +1 -0
- package/dist/root/ThemeScope.js +49 -0
- package/dist/root/ThemeScope.js.map +1 -0
- package/dist/select/ListBox.css +23 -22
- package/dist/select/ListBox.module.js +12 -12
- package/dist/select/ListBox.module.js.map +1 -1
- package/dist/select/Select.js +1 -1
- package/dist/select/Select.js.map +1 -1
- package/dist/select/listBoxTokens.d.ts +3 -0
- package/dist/select/listBoxTokens.d.ts.map +1 -0
- package/dist/select/listBoxTokens.js +19 -0
- package/dist/select/listBoxTokens.js.map +1 -0
- package/dist/spinner/Spinner.css +8 -8
- package/dist/spinner/Spinner.js +1 -1
- package/dist/spinner/Spinner.js.map +1 -1
- package/dist/spinner/Spinner.module.js +5 -5
- package/dist/spinner/Spinner.module.js.map +1 -1
- package/dist/spinner/tokens.d.ts +3 -0
- package/dist/spinner/tokens.d.ts.map +1 -0
- package/dist/spinner/tokens.js +10 -0
- package/dist/spinner/tokens.js.map +1 -0
- package/dist/stack/Stack.css +135 -0
- package/dist/stack/Stack.d.ts +15 -0
- package/dist/stack/Stack.d.ts.map +1 -0
- package/dist/stack/Stack.js +21 -0
- package/dist/stack/Stack.js.map +1 -0
- package/dist/stack/Stack.module.js +8 -0
- package/dist/stack/Stack.module.js.map +1 -0
- package/dist/stack/tokens.d.ts +3 -0
- package/dist/stack/tokens.d.ts.map +1 -0
- package/dist/stack/tokens.js +10 -0
- package/dist/stack/tokens.js.map +1 -0
- package/dist/switch/Switch.css +34 -25
- package/dist/switch/Switch.d.ts.map +1 -1
- package/dist/switch/Switch.js +2 -1
- package/dist/switch/Switch.js.map +1 -1
- package/dist/switch/Switch.module.js +6 -5
- package/dist/switch/Switch.module.js.map +1 -1
- package/dist/switch/tokens.d.ts +3 -0
- package/dist/switch/tokens.d.ts.map +1 -0
- package/dist/switch/tokens.js +25 -0
- package/dist/switch/tokens.js.map +1 -0
- package/dist/tabs/Tabs.css +24 -23
- package/dist/tabs/Tabs.js +4 -4
- package/dist/tabs/Tabs.js.map +1 -1
- package/dist/tabs/Tabs.module.js +4 -4
- package/dist/tabs/Tabs.module.js.map +1 -1
- package/dist/tabs/tokens.d.ts +3 -0
- package/dist/tabs/tokens.d.ts.map +1 -0
- package/dist/tabs/tokens.js +25 -0
- package/dist/tabs/tokens.js.map +1 -0
- package/dist/text/Text.css +74 -0
- package/dist/text/Text.d.ts +27 -0
- package/dist/text/Text.d.ts.map +1 -0
- package/dist/text/Text.js +16 -0
- package/dist/text/Text.js.map +1 -0
- package/dist/text/Text.module.js +30 -0
- package/dist/text/Text.module.js.map +1 -0
- package/dist/text/tokens.d.ts +3 -0
- package/dist/text/tokens.d.ts.map +1 -0
- package/dist/text/tokens.js +10 -0
- package/dist/text/tokens.js.map +1 -0
- package/dist/text-area/TextArea.css +1 -1
- package/dist/text-area/TextArea.js +2 -2
- 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.js +1 -1
- package/dist/text-input/TextInput.js.map +1 -1
- package/dist/theme/Tone.css +70 -0
- package/dist/theme/Tone.module.js +20 -0
- package/dist/theme/Tone.module.js.map +1 -0
- package/dist/theme/bootstrap.d.ts +10 -0
- package/dist/theme/bootstrap.d.ts.map +1 -1
- package/dist/theme/bootstrap.js +48 -5
- package/dist/theme/bootstrap.js.map +1 -1
- package/dist/theme/chartColors.d.ts +23 -0
- package/dist/theme/chartColors.d.ts.map +1 -0
- package/dist/theme/chartColors.js +27 -0
- package/dist/theme/chartColors.js.map +1 -0
- package/dist/theme/checkTheme.d.ts +39 -0
- package/dist/theme/checkTheme.d.ts.map +1 -0
- package/dist/theme/checkTheme.js +132 -0
- package/dist/theme/checkTheme.js.map +1 -0
- package/dist/theme/cli.d.ts +14 -0
- package/dist/theme/cli.d.ts.map +1 -0
- package/dist/theme/cli.js +61 -0
- package/dist/theme/cli.js.map +1 -0
- package/dist/theme/color.d.ts +30 -0
- package/dist/theme/color.d.ts.map +1 -0
- package/dist/theme/color.js +94 -0
- package/dist/theme/color.js.map +1 -0
- package/dist/theme/colorVision.d.ts +23 -0
- package/dist/theme/colorVision.d.ts.map +1 -0
- package/dist/theme/colorVision.js +140 -0
- package/dist/theme/colorVision.js.map +1 -0
- package/dist/theme/componentTokens.d.ts +24 -0
- package/dist/theme/componentTokens.d.ts.map +1 -0
- package/dist/theme/componentTokens.js +20 -0
- package/dist/theme/componentTokens.js.map +1 -0
- package/dist/theme/components.d.ts +38 -0
- package/dist/theme/components.d.ts.map +1 -0
- package/dist/theme/components.js +65 -0
- package/dist/theme/components.js.map +1 -0
- package/dist/theme/defineTheme.d.ts +85 -0
- package/dist/theme/defineTheme.d.ts.map +1 -0
- package/dist/theme/defineTheme.js +130 -0
- package/dist/theme/defineTheme.js.map +1 -0
- package/dist/theme/fonts.d.ts +32 -0
- package/dist/theme/fonts.d.ts.map +1 -0
- package/dist/theme/fonts.js +36 -0
- package/dist/theme/fonts.js.map +1 -0
- package/dist/theme/index.d.ts +13 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +10 -0
- package/dist/theme/semanticTokens.d.ts +9 -0
- package/dist/theme/semanticTokens.d.ts.map +1 -0
- package/dist/theme/semanticTokens.js +110 -0
- package/dist/theme/semanticTokens.js.map +1 -0
- package/dist/theme/theme.d.ts +61 -7
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +100 -10
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/toneClass.d.ts +8 -0
- package/dist/theme/toneClass.d.ts.map +1 -0
- package/dist/theme/toneClass.js +15 -0
- package/dist/theme/toneClass.js.map +1 -0
- package/dist/theme/tones.d.ts +89 -0
- package/dist/theme/tones.d.ts.map +1 -0
- package/dist/theme/tones.js +127 -0
- package/dist/theme/tones.js.map +1 -0
- package/dist/time-input/TimeInput.js +1 -1
- package/dist/time-input/TimeInput.js.map +1 -1
- package/dist/toast/Toast.css +22 -44
- package/dist/toast/Toast.d.ts +5 -3
- package/dist/toast/Toast.d.ts.map +1 -1
- package/dist/toast/Toast.js +4 -3
- package/dist/toast/Toast.js.map +1 -1
- package/dist/toast/Toast.module.js +10 -16
- package/dist/toast/Toast.module.js.map +1 -1
- package/dist/toast/tokens.d.ts +3 -0
- package/dist/toast/tokens.d.ts.map +1 -0
- package/dist/toast/tokens.js +21 -0
- package/dist/toast/tokens.js.map +1 -0
- package/dist/tooltip/Tooltip.css +12 -11
- package/dist/tooltip/Tooltip.js +1 -1
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/Tooltip.module.js +2 -2
- package/dist/tooltip/Tooltip.module.js.map +1 -1
- package/dist/tooltip/tokens.d.ts +3 -0
- package/dist/tooltip/tokens.d.ts.map +1 -0
- package/dist/tooltip/tokens.js +21 -0
- package/dist/tooltip/tokens.js.map +1 -0
- package/dist/utils/cx.d.ts +1 -1
- package/dist/utils/cx.d.ts.map +1 -1
- package/dist/utils/cx.js +2 -2
- package/dist/utils/cx.js.map +1 -1
- package/package.json +20 -3
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/* A vertical stack: each prop can change at the breakpoints of the nearest container. */
|
|
2
|
+
|
|
3
|
+
.panneau-stack {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
}
|
|
8
|
+
/* Responsive values are set inline; children reset them so that they aren't inherited. */
|
|
9
|
+
.panneau-stack > * {
|
|
10
|
+
--_panneau-stack-gap-base: initial;
|
|
11
|
+
--_panneau-stack-gap-sm: initial;
|
|
12
|
+
--_panneau-stack-gap-md: initial;
|
|
13
|
+
--_panneau-stack-gap-lg: initial;
|
|
14
|
+
--_panneau-stack-gap-xl: initial;
|
|
15
|
+
--_panneau-stack-align-base: initial;
|
|
16
|
+
--_panneau-stack-align-sm: initial;
|
|
17
|
+
--_panneau-stack-align-md: initial;
|
|
18
|
+
--_panneau-stack-align-lg: initial;
|
|
19
|
+
--_panneau-stack-align-xl: initial;
|
|
20
|
+
--_panneau-stack-justify-base: initial;
|
|
21
|
+
--_panneau-stack-justify-sm: initial;
|
|
22
|
+
--_panneau-stack-justify-md: initial;
|
|
23
|
+
--_panneau-stack-justify-lg: initial;
|
|
24
|
+
--_panneau-stack-justify-xl: initial;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.panneau-stack {
|
|
28
|
+
gap: var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)));
|
|
29
|
+
align-items: var(--_panneau-stack-align-base, stretch);
|
|
30
|
+
justify-content: var(--_panneau-stack-justify-base, start);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@container (min-width: 40rem) {
|
|
34
|
+
.panneau-stack {
|
|
35
|
+
gap: var(
|
|
36
|
+
--_panneau-stack-gap-sm,
|
|
37
|
+
var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)))
|
|
38
|
+
);
|
|
39
|
+
align-items: var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch));
|
|
40
|
+
justify-content: var(
|
|
41
|
+
--_panneau-stack-justify-sm,
|
|
42
|
+
var(--_panneau-stack-justify-base, start)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@container (min-width: 48rem) {
|
|
48
|
+
.panneau-stack {
|
|
49
|
+
gap: var(
|
|
50
|
+
--_panneau-stack-gap-md,
|
|
51
|
+
var(
|
|
52
|
+
--_panneau-stack-gap-sm,
|
|
53
|
+
var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)))
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
align-items: var(
|
|
57
|
+
--_panneau-stack-align-md,
|
|
58
|
+
var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch))
|
|
59
|
+
);
|
|
60
|
+
justify-content: var(
|
|
61
|
+
--_panneau-stack-justify-md,
|
|
62
|
+
var(--_panneau-stack-justify-sm, var(--_panneau-stack-justify-base, start))
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@container (min-width: 64rem) {
|
|
68
|
+
.panneau-stack {
|
|
69
|
+
gap: var(
|
|
70
|
+
--_panneau-stack-gap-lg,
|
|
71
|
+
var(
|
|
72
|
+
--_panneau-stack-gap-md,
|
|
73
|
+
var(
|
|
74
|
+
--_panneau-stack-gap-sm,
|
|
75
|
+
var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)))
|
|
76
|
+
)
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
align-items: var(
|
|
80
|
+
--_panneau-stack-align-lg,
|
|
81
|
+
var(
|
|
82
|
+
--_panneau-stack-align-md,
|
|
83
|
+
var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch))
|
|
84
|
+
)
|
|
85
|
+
);
|
|
86
|
+
justify-content: var(
|
|
87
|
+
--_panneau-stack-justify-lg,
|
|
88
|
+
var(
|
|
89
|
+
--_panneau-stack-justify-md,
|
|
90
|
+
var(--_panneau-stack-justify-sm, var(--_panneau-stack-justify-base, start))
|
|
91
|
+
)
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@container (min-width: 80rem) {
|
|
97
|
+
.panneau-stack {
|
|
98
|
+
gap: var(
|
|
99
|
+
--_panneau-stack-gap-xl,
|
|
100
|
+
var(
|
|
101
|
+
--_panneau-stack-gap-lg,
|
|
102
|
+
var(
|
|
103
|
+
--_panneau-stack-gap-md,
|
|
104
|
+
var(
|
|
105
|
+
--_panneau-stack-gap-sm,
|
|
106
|
+
var(
|
|
107
|
+
--_panneau-stack-gap-base,
|
|
108
|
+
var(--panneau-stack-gap, var(--panneau-space-4))
|
|
109
|
+
)
|
|
110
|
+
)
|
|
111
|
+
)
|
|
112
|
+
)
|
|
113
|
+
);
|
|
114
|
+
align-items: var(
|
|
115
|
+
--_panneau-stack-align-xl,
|
|
116
|
+
var(
|
|
117
|
+
--_panneau-stack-align-lg,
|
|
118
|
+
var(
|
|
119
|
+
--_panneau-stack-align-md,
|
|
120
|
+
var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch))
|
|
121
|
+
)
|
|
122
|
+
)
|
|
123
|
+
);
|
|
124
|
+
justify-content: var(
|
|
125
|
+
--_panneau-stack-justify-xl,
|
|
126
|
+
var(
|
|
127
|
+
--_panneau-stack-justify-lg,
|
|
128
|
+
var(
|
|
129
|
+
--_panneau-stack-justify-md,
|
|
130
|
+
var(--_panneau-stack-justify-sm, var(--_panneau-stack-justify-base, start))
|
|
131
|
+
)
|
|
132
|
+
)
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import { type Justification, type Responsive, type Space } from '../layout/responsive';
|
|
3
|
+
export interface StackProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
/** Element to render. Defaults to `div`. */
|
|
5
|
+
as?: 'div' | 'section' | 'article' | 'aside' | 'header' | 'footer' | 'nav' | 'main' | 'ul' | 'ol' | 'form';
|
|
6
|
+
/** Space between items, from the space scale. Defaults to the `--panneau-stack-gap` token. */
|
|
7
|
+
gap?: Responsive<Space>;
|
|
8
|
+
/** Horizontal alignment of the items. Defaults to `stretch`. */
|
|
9
|
+
align?: Responsive<'start' | 'center' | 'end' | 'stretch'>;
|
|
10
|
+
/** Vertical distribution of the items, when the stack is taller than them. Defaults to `start`. */
|
|
11
|
+
justify?: Responsive<Justification>;
|
|
12
|
+
}
|
|
13
|
+
/** Items one under the other, with space between them, like Bootstrap's `.vstack`. */
|
|
14
|
+
export declare function Stack({ as: Element, gap, align, justify, className, style, ...props }: StackProps): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../src/stack/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,KAAK,EAKb,MAAM,sBAAsB,CAAC;AAI9B,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,WAAW,CAAC;IAC3D,4CAA4C;IAC5C,EAAE,CAAC,EACG,KAAK,GACL,SAAS,GACT,SAAS,GACT,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,MAAM,GACN,IAAI,GACJ,IAAI,GACJ,MAAM,CAAC;IACb,8FAA8F;IAC9F,GAAG,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IACxB,gEAAgE;IAChE,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC,CAAC;IAC3D,mGAAmG;IACnG,OAAO,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;CACvC;AAED,sFAAsF;AACtF,wBAAgB,KAAK,CAAC,EAClB,EAAE,EAAE,OAAe,EACnB,GAAG,EACH,KAAK,EACL,OAAO,EACP,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACX,EAAE,UAAU,+BAeZ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import { justification, responsiveVariables, space, withVariables } from "../layout/responsive.js";
|
|
3
|
+
import Stack_module_default from "./Stack.module.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/stack/Stack.tsx
|
|
6
|
+
/** Items one under the other, with space between them, like Bootstrap's `.vstack`. */
|
|
7
|
+
function Stack({ as: Element = "div", gap, align, justify, className, style, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Element, {
|
|
9
|
+
...props,
|
|
10
|
+
className: cx("panneau-stack", Stack_module_default.stack, className),
|
|
11
|
+
style: withVariables([
|
|
12
|
+
responsiveVariables("stack", "gap", gap, space),
|
|
13
|
+
responsiveVariables("stack", "align", align, String),
|
|
14
|
+
responsiveVariables("stack", "justify", justify, justification)
|
|
15
|
+
], style)
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Stack };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=Stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.js","names":["styles"],"sources":["../../src/stack/Stack.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport {\n type Justification,\n type Responsive,\n type Space,\n justification,\n responsiveVariables,\n space,\n withVariables,\n} from '../layout/responsive';\nimport { cx } from '../utils/cx';\nimport styles from './Stack.module.css';\n\nexport interface StackProps extends HTMLAttributes<HTMLElement> {\n /** Element to render. Defaults to `div`. */\n as?:\n | 'div'\n | 'section'\n | 'article'\n | 'aside'\n | 'header'\n | 'footer'\n | 'nav'\n | 'main'\n | 'ul'\n | 'ol'\n | 'form';\n /** Space between items, from the space scale. Defaults to the `--panneau-stack-gap` token. */\n gap?: Responsive<Space>;\n /** Horizontal alignment of the items. Defaults to `stretch`. */\n align?: Responsive<'start' | 'center' | 'end' | 'stretch'>;\n /** Vertical distribution of the items, when the stack is taller than them. Defaults to `start`. */\n justify?: Responsive<Justification>;\n}\n\n/** Items one under the other, with space between them, like Bootstrap's `.vstack`. */\nexport function Stack({\n as: Element = 'div',\n gap,\n align,\n justify,\n className,\n style,\n ...props\n}: StackProps) {\n return (\n <Element\n {...props}\n className={cx('panneau-stack', styles.stack, className)}\n style={withVariables(\n [\n responsiveVariables('stack', 'gap', gap, space),\n responsiveVariables('stack', 'align', align, String),\n responsiveVariables('stack', 'justify', justify, justification),\n ],\n style,\n )}\n />\n );\n}\n"],"mappings":";;;;;;AAqCA,SAAgB,MAAM,EAClB,IAAI,UAAU,OACd,KACA,OACA,SACA,WACA,OACA,GAAG,SACQ;CACX,OACI,oBAAC,SAAD;EACI,GAAI;EACJ,WAAW,GAAG,iBAAiBA,qBAAO,OAAO,SAAS;EACtD,OAAO,cACH;GACI,oBAAoB,SAAS,OAAO,KAAK,KAAK;GAC9C,oBAAoB,SAAS,SAAS,OAAO,MAAM;GACnD,oBAAoB,SAAS,WAAW,SAAS,aAAa;EAAC,GAEnE,KACJ;CAAE,CAAA;AAGd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.module.js","names":[],"sources":["../../src/stack/Stack.module.css"],"sourcesContent":["/* A vertical stack: each prop can change at the breakpoints of the nearest container. */\n\n.stack {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n/* Responsive values are set inline; children reset them so that they aren't inherited. */\n.stack > * {\n --_panneau-stack-gap-base: initial;\n --_panneau-stack-gap-sm: initial;\n --_panneau-stack-gap-md: initial;\n --_panneau-stack-gap-lg: initial;\n --_panneau-stack-gap-xl: initial;\n --_panneau-stack-align-base: initial;\n --_panneau-stack-align-sm: initial;\n --_panneau-stack-align-md: initial;\n --_panneau-stack-align-lg: initial;\n --_panneau-stack-align-xl: initial;\n --_panneau-stack-justify-base: initial;\n --_panneau-stack-justify-sm: initial;\n --_panneau-stack-justify-md: initial;\n --_panneau-stack-justify-lg: initial;\n --_panneau-stack-justify-xl: initial;\n}\n\n.stack {\n gap: var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)));\n align-items: var(--_panneau-stack-align-base, stretch);\n justify-content: var(--_panneau-stack-justify-base, start);\n}\n\n@container (min-width: 40rem) {\n .stack {\n gap: var(\n --_panneau-stack-gap-sm,\n var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)))\n );\n align-items: var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch));\n justify-content: var(\n --_panneau-stack-justify-sm,\n var(--_panneau-stack-justify-base, start)\n );\n }\n}\n\n@container (min-width: 48rem) {\n .stack {\n gap: var(\n --_panneau-stack-gap-md,\n var(\n --_panneau-stack-gap-sm,\n var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)))\n )\n );\n align-items: var(\n --_panneau-stack-align-md,\n var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch))\n );\n justify-content: var(\n --_panneau-stack-justify-md,\n var(--_panneau-stack-justify-sm, var(--_panneau-stack-justify-base, start))\n );\n }\n}\n\n@container (min-width: 64rem) {\n .stack {\n gap: var(\n --_panneau-stack-gap-lg,\n var(\n --_panneau-stack-gap-md,\n var(\n --_panneau-stack-gap-sm,\n var(--_panneau-stack-gap-base, var(--panneau-stack-gap, var(--panneau-space-4)))\n )\n )\n );\n align-items: var(\n --_panneau-stack-align-lg,\n var(\n --_panneau-stack-align-md,\n var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch))\n )\n );\n justify-content: var(\n --_panneau-stack-justify-lg,\n var(\n --_panneau-stack-justify-md,\n var(--_panneau-stack-justify-sm, var(--_panneau-stack-justify-base, start))\n )\n );\n }\n}\n\n@container (min-width: 80rem) {\n .stack {\n gap: var(\n --_panneau-stack-gap-xl,\n var(\n --_panneau-stack-gap-lg,\n var(\n --_panneau-stack-gap-md,\n var(\n --_panneau-stack-gap-sm,\n var(\n --_panneau-stack-gap-base,\n var(--panneau-stack-gap, var(--panneau-space-4))\n )\n )\n )\n )\n );\n align-items: var(\n --_panneau-stack-align-xl,\n var(\n --_panneau-stack-align-lg,\n var(\n --_panneau-stack-align-md,\n var(--_panneau-stack-align-sm, var(--_panneau-stack-align-base, stretch))\n )\n )\n );\n justify-content: var(\n --_panneau-stack-justify-xl,\n var(\n --_panneau-stack-justify-lg,\n var(\n --_panneau-stack-justify-md,\n var(--_panneau-stack-justify-sm, var(--_panneau-stack-justify-base, start))\n )\n )\n );\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/stack/tokens.ts"],"names":[],"mappings":"AAEA,uBAAuB;AACvB,eAAO,MAAM,WAAW,4DAGtB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/stack/tokens.ts
|
|
3
|
+
/** Tokens of Stack. */
|
|
4
|
+
var stackTokens = defineComponentTokens("stack", {
|
|
5
|
+
/** Space between items, when the `gap` prop is not set. */
|
|
6
|
+
gap: "var(--panneau-space-4)" });
|
|
7
|
+
//#endregion
|
|
8
|
+
export { stackTokens };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/stack/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Stack. */\nexport const stackTokens = defineComponentTokens('stack', {\n /** Space between items, when the `gap` prop is not set. */\n gap: 'var(--panneau-space-4)',\n});\n"],"mappings":";;;AAGA,IAAa,cAAc,sBAAsB,SAAS;;AAEtD,KAAK,yBACT,CAAC"}
|
package/dist/switch/Switch.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.panneau-switch-
|
|
1
|
+
.panneau-switch-control {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: var(--panneau-space-2);
|
|
@@ -9,61 +9,70 @@
|
|
|
9
9
|
-webkit-tap-highlight-color: transparent;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.panneau-switch-
|
|
12
|
+
.panneau-switch-control[data-disabled] {
|
|
13
13
|
cursor: not-allowed;
|
|
14
14
|
opacity: 0.55;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.panneau-switch-
|
|
17
|
+
.panneau-switch-control[data-readonly] {
|
|
18
18
|
cursor: default;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.panneau-track
|
|
21
|
+
.panneau-switch-track {
|
|
22
22
|
position: relative;
|
|
23
23
|
flex: 0 0 auto;
|
|
24
|
-
width: 2.25rem;
|
|
25
|
-
height: 1.25rem;
|
|
26
|
-
background-color: var(--panneau-color-border-control);
|
|
27
|
-
border-radius: var(--panneau-radius-full);
|
|
24
|
+
width: var(--panneau-switch-width, 2.25rem);
|
|
25
|
+
height: var(--panneau-switch-height, 1.25rem);
|
|
26
|
+
background-color: var(--panneau-switch-track-bg, var(--panneau-color-border-control));
|
|
27
|
+
border-radius: var(--panneau-switch-radius, var(--panneau-radius-full));
|
|
28
28
|
transition: background-color var(--panneau-duration);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.panneau-thumb
|
|
31
|
+
.panneau-switch-thumb {
|
|
32
32
|
position: absolute;
|
|
33
|
-
top:
|
|
34
|
-
left:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
top: calc((var(--panneau-switch-height, 1.25rem) - var(--panneau-switch-thumb-size, 1rem)) / 2);
|
|
34
|
+
left: calc(
|
|
35
|
+
(var(--panneau-switch-height, 1.25rem) - var(--panneau-switch-thumb-size, 1rem)) / 2
|
|
36
|
+
);
|
|
37
|
+
width: var(--panneau-switch-thumb-size, 1rem);
|
|
38
|
+
height: var(--panneau-switch-thumb-size, 1rem);
|
|
39
|
+
background-color: var(--panneau-switch-thumb-bg, var(--panneau-color-surface));
|
|
40
|
+
border-radius: var(--panneau-switch-radius, var(--panneau-radius-full));
|
|
39
41
|
box-shadow: var(--panneau-shadow-sm);
|
|
40
42
|
transition: transform var(--panneau-duration);
|
|
41
43
|
}
|
|
42
44
|
|
|
43
|
-
.panneau-switch-
|
|
44
|
-
background-color: var(--panneau-color-accent);
|
|
45
|
+
.panneau-switch-control[data-selected] .panneau-switch-track {
|
|
46
|
+
background-color: var(--panneau-switch-checked-bg, var(--panneau-color-accent));
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
.panneau-switch-
|
|
48
|
-
background-color: var(--panneau-color-accent-text);
|
|
49
|
-
|
|
49
|
+
.panneau-switch-control[data-selected] .panneau-switch-thumb {
|
|
50
|
+
background-color: var(--panneau-switch-checked-thumb-bg, var(--panneau-color-accent-text));
|
|
51
|
+
/* The thumb travels the width of the track minus its height (both ends keep the same inset). */
|
|
52
|
+
transform: translateX(
|
|
53
|
+
calc(var(--panneau-switch-width, 2.25rem) - var(--panneau-switch-height, 1.25rem))
|
|
54
|
+
);
|
|
50
55
|
}
|
|
51
56
|
|
|
52
|
-
.panneau-switch-
|
|
53
|
-
transform: translateX(
|
|
57
|
+
.panneau-switch-control[data-selected] .panneau-switch-thumb:dir(rtl) {
|
|
58
|
+
transform: translateX(
|
|
59
|
+
calc(
|
|
60
|
+
-1 * calc(var(--panneau-switch-width, 2.25rem) - var(--panneau-switch-height, 1.25rem))
|
|
61
|
+
)
|
|
62
|
+
);
|
|
54
63
|
}
|
|
55
64
|
|
|
56
|
-
.panneau-switch-
|
|
65
|
+
.panneau-switch-control[data-focus-visible] .panneau-switch-track {
|
|
57
66
|
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
58
67
|
outline-offset: 2px;
|
|
59
68
|
}
|
|
60
69
|
|
|
61
|
-
.panneau-label
|
|
70
|
+
.panneau-switch-label {
|
|
62
71
|
overflow-wrap: anywhere;
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
@media (pointer: coarse) {
|
|
66
|
-
.panneau-switch-
|
|
75
|
+
.panneau-switch-control {
|
|
67
76
|
min-height: 2.75rem;
|
|
68
77
|
}
|
|
69
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAwB,KAAK,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElG,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIhF,MAAM,WAAW,WACb,SAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,EAAE,iBAAiB;IACpF,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,6DAA6D;AAC7D,wBAAgB,MAAM,CAAC,EACnB,QAAQ,EACR,WAAW,EACX,MAAW,EACX,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,GAAG,KAAK,EACX,EAAE,WAAW,+
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAwB,KAAK,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElG,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIhF,MAAM,WAAW,WACb,SAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,EAAE,iBAAiB;IACpF,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,6DAA6D;AAC7D,wBAAgB,MAAM,CAAC,EACnB,QAAQ,EACR,WAAW,EACX,MAAW,EACX,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,GAAG,KAAK,EACX,EAAE,WAAW,+BA0Bb"}
|
package/dist/switch/Switch.js
CHANGED
|
@@ -7,6 +7,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
/** An on and off switch, for settings that apply at once. */
|
|
8
8
|
function Switch$1({ children, description, errors = [], className, switchClassName, descriptionClassName, errorsClassName, ...props }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(ChoiceChrome, {
|
|
10
|
+
component: "switch",
|
|
10
11
|
description,
|
|
11
12
|
errors,
|
|
12
13
|
className,
|
|
@@ -15,7 +16,7 @@ function Switch$1({ children, description, errors = [], className, switchClassNa
|
|
|
15
16
|
children: (describedBy) => /* @__PURE__ */ jsxs(Switch, {
|
|
16
17
|
...props,
|
|
17
18
|
"aria-describedby": describedBy,
|
|
18
|
-
className: cx(Switch_module_default.
|
|
19
|
+
className: cx(Switch_module_default.control, switchClassName),
|
|
19
20
|
children: [/* @__PURE__ */ jsx("span", {
|
|
20
21
|
className: Switch_module_default.track,
|
|
21
22
|
"aria-hidden": "true",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","names":["Switch","AriaSwitch","styles"],"sources":["../../src/switch/Switch.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Switch as AriaSwitch, type SwitchProps as AriaSwitchProps } from 'react-aria-components';\n\nimport { ChoiceChrome, type ChoiceChromeProps } from '../checkbox/ChoiceChrome';\nimport { cx } from '../utils/cx';\nimport styles from './Switch.module.css';\n\nexport interface SwitchProps\n extends Omit<AriaSwitchProps, 'className' | 'style' | 'children'>, ChoiceChromeProps {\n /** Label, next to the switch. */\n children?: ReactNode;\n switchClassName?: string;\n}\n\n/** An on and off switch, for settings that apply at once. */\nexport function Switch({\n children,\n description,\n errors = [],\n className,\n switchClassName,\n descriptionClassName,\n errorsClassName,\n ...props\n}: SwitchProps) {\n return (\n <ChoiceChrome\n description={description}\n errors={errors}\n className={className}\n descriptionClassName={descriptionClassName}\n errorsClassName={errorsClassName}\n >\n {(describedBy) => (\n <AriaSwitch\n {...props}\n aria-describedby={describedBy}\n className={cx(styles.
|
|
1
|
+
{"version":3,"file":"Switch.js","names":["Switch","AriaSwitch","styles"],"sources":["../../src/switch/Switch.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Switch as AriaSwitch, type SwitchProps as AriaSwitchProps } from 'react-aria-components';\n\nimport { ChoiceChrome, type ChoiceChromeProps } from '../checkbox/ChoiceChrome';\nimport { cx } from '../utils/cx';\nimport styles from './Switch.module.css';\n\nexport interface SwitchProps\n extends Omit<AriaSwitchProps, 'className' | 'style' | 'children'>, ChoiceChromeProps {\n /** Label, next to the switch. */\n children?: ReactNode;\n switchClassName?: string;\n}\n\n/** An on and off switch, for settings that apply at once. */\nexport function Switch({\n children,\n description,\n errors = [],\n className,\n switchClassName,\n descriptionClassName,\n errorsClassName,\n ...props\n}: SwitchProps) {\n return (\n <ChoiceChrome\n component=\"switch\"\n description={description}\n errors={errors}\n className={className}\n descriptionClassName={descriptionClassName}\n errorsClassName={errorsClassName}\n >\n {(describedBy) => (\n <AriaSwitch\n {...props}\n aria-describedby={describedBy}\n className={cx(styles.control, switchClassName)}\n >\n <span className={styles.track} aria-hidden=\"true\">\n <span className={styles.thumb} />\n </span>\n {children !== undefined ? (\n <span className={styles.label}>{children}</span>\n ) : null}\n </AriaSwitch>\n )}\n </ChoiceChrome>\n );\n}\n"],"mappings":";;;;;;;AAeA,SAAgBA,SAAO,EACnB,UACA,aACA,SAAS,CAAA,GACT,WACA,iBACA,sBACA,iBACA,GAAG,SACS;CACZ,OACI,oBAAC,cAAD;EACI,WAAU;EACG;EACL;EACG;EACW;EACL;EAEf,WAAA,gBACE,qBAACC,QAAD;GACI,GAAI;GACJ,oBAAkB;GAClB,WAAW,GAAGC,sBAAO,SAAS,eAAe;GAHjD,UAAA,CAKI,oBAAC,QAAD;IAAM,WAAWA,sBAAO;IAAO,eAAY;IACvC,UAAA,oBAAC,QAAD,EAAM,WAAWA,sBAAO,MAAM,CAAA;GAC5B,CAAA,GACL,aAAa,KAAA,IACV,oBAAC,QAAD;IAAM,WAAWA,sBAAO;IAAQ;GAAe,CAAA,IAC/C,IACI;;CAEN,CAAA;AAEtB"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import "./Switch.css";
|
|
2
2
|
//#region src/switch/Switch.module.css
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var control = "panneau-switch-control";
|
|
4
|
+
var track = "panneau-switch-track";
|
|
5
|
+
var thumb = "panneau-switch-thumb";
|
|
6
|
+
var label = "panneau-switch-label";
|
|
6
7
|
var Switch_module_default = {
|
|
7
|
-
|
|
8
|
+
control,
|
|
8
9
|
track,
|
|
9
10
|
thumb,
|
|
10
11
|
label
|
|
11
12
|
};
|
|
12
13
|
//#endregion
|
|
13
|
-
export { Switch_module_default as default, label, thumb, track };
|
|
14
|
+
export { control, Switch_module_default as default, label, thumb, track };
|
|
14
15
|
|
|
15
16
|
//# sourceMappingURL=Switch.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.module.js","names":[],"sources":["../../src/switch/Switch.module.css"],"sourcesContent":[".
|
|
1
|
+
{"version":3,"file":"Switch.module.js","names":[],"sources":["../../src/switch/Switch.module.css"],"sourcesContent":[".control {\n display: inline-flex;\n align-items: center;\n gap: var(--panneau-space-2);\n min-height: 1.5rem;\n font-size: var(--panneau-font-size-md);\n color: var(--panneau-color-text);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n}\n\n.control[data-disabled] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.control[data-readonly] {\n cursor: default;\n}\n\n.track {\n position: relative;\n flex: 0 0 auto;\n width: var(--panneau-switch-width, 2.25rem);\n height: var(--panneau-switch-height, 1.25rem);\n background-color: var(--panneau-switch-track-bg, var(--panneau-color-border-control));\n border-radius: var(--panneau-switch-radius, var(--panneau-radius-full));\n transition: background-color var(--panneau-duration);\n}\n\n.thumb {\n position: absolute;\n top: calc((var(--panneau-switch-height, 1.25rem) - var(--panneau-switch-thumb-size, 1rem)) / 2);\n left: calc(\n (var(--panneau-switch-height, 1.25rem) - var(--panneau-switch-thumb-size, 1rem)) / 2\n );\n width: var(--panneau-switch-thumb-size, 1rem);\n height: var(--panneau-switch-thumb-size, 1rem);\n background-color: var(--panneau-switch-thumb-bg, var(--panneau-color-surface));\n border-radius: var(--panneau-switch-radius, var(--panneau-radius-full));\n box-shadow: var(--panneau-shadow-sm);\n transition: transform var(--panneau-duration);\n}\n\n.control[data-selected] .track {\n background-color: var(--panneau-switch-checked-bg, var(--panneau-color-accent));\n}\n\n.control[data-selected] .thumb {\n background-color: var(--panneau-switch-checked-thumb-bg, var(--panneau-color-accent-text));\n /* The thumb travels the width of the track minus its height (both ends keep the same inset). */\n transform: translateX(\n calc(var(--panneau-switch-width, 2.25rem) - var(--panneau-switch-height, 1.25rem))\n );\n}\n\n.control[data-selected] .thumb:dir(rtl) {\n transform: translateX(\n calc(\n -1 * calc(var(--panneau-switch-width, 2.25rem) - var(--panneau-switch-height, 1.25rem))\n )\n );\n}\n\n.control[data-focus-visible] .track {\n outline: var(--panneau-focus-width) solid var(--panneau-color-focus);\n outline-offset: 2px;\n}\n\n.label {\n overflow-wrap: anywhere;\n}\n\n@media (pointer: coarse) {\n .control {\n min-height: 2.75rem;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of Switch. */
|
|
2
|
+
export declare const switchTokens: import("..").ComponentTokens<"switch", "panneau-switch-height" | "panneau-switch-width" | "panneau-switch-radius" | "panneau-switch-checked-bg" | "panneau-switch-track-bg" | "panneau-switch-thumb-size" | "panneau-switch-thumb-bg" | "panneau-switch-checked-thumb-bg">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/switch/tokens.ts"],"names":[],"mappings":"AAEA,wBAAwB;AACxB,eAAO,MAAM,YAAY,4QAiBvB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/switch/tokens.ts
|
|
3
|
+
/** Tokens of Switch. */
|
|
4
|
+
var switchTokens = defineComponentTokens("switch", {
|
|
5
|
+
/** Width of the track. */
|
|
6
|
+
width: "2.25rem",
|
|
7
|
+
/** Height of the track. */
|
|
8
|
+
height: "1.25rem",
|
|
9
|
+
/** Background of the track when off. */
|
|
10
|
+
"track-bg": "var(--panneau-color-border-control)",
|
|
11
|
+
/** Corner radius of the track and the thumb. */
|
|
12
|
+
radius: "var(--panneau-radius-full)",
|
|
13
|
+
/** Size of the thumb. */
|
|
14
|
+
"thumb-size": "1rem",
|
|
15
|
+
/** Background of the thumb when off. */
|
|
16
|
+
"thumb-bg": "var(--panneau-color-surface)",
|
|
17
|
+
/** Background of the track when on. */
|
|
18
|
+
"checked-bg": "var(--panneau-color-accent)",
|
|
19
|
+
/** Background of the thumb when on. */
|
|
20
|
+
"checked-thumb-bg": "var(--panneau-color-accent-text)"
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { switchTokens };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/switch/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Switch. */\nexport const switchTokens = defineComponentTokens('switch', {\n /** Width of the track. */\n width: '2.25rem',\n /** Height of the track. */\n height: '1.25rem',\n /** Background of the track when off. */\n 'track-bg': 'var(--panneau-color-border-control)',\n /** Corner radius of the track and the thumb. */\n radius: 'var(--panneau-radius-full)',\n /** Size of the thumb. */\n 'thumb-size': '1rem',\n /** Background of the thumb when off. */\n 'thumb-bg': 'var(--panneau-color-surface)',\n /** Background of the track when on. */\n 'checked-bg': 'var(--panneau-color-accent)',\n /** Background of the thumb when on. */\n 'checked-thumb-bg': 'var(--panneau-color-accent-text)',\n});\n"],"mappings":";;;AAGA,IAAa,eAAe,sBAAsB,UAAU;;CAExD,OAAO;;CAEP,QAAQ;;CAER,YAAY;;CAEZ,QAAQ;;CAER,cAAc;;CAEd,YAAY;;CAEZ,cAAc;;CAEd,oBAAoB;AACxB,CAAC"}
|
package/dist/tabs/Tabs.css
CHANGED
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
.panneau-tabs
|
|
1
|
+
.panneau-tabs {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
gap: var(--panneau-space-4);
|
|
4
|
+
gap: var(--panneau-tabs-gap, var(--panneau-space-4));
|
|
5
5
|
min-width: 0;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.panneau-list
|
|
8
|
+
.panneau-tabs-list {
|
|
9
9
|
display: flex;
|
|
10
10
|
gap: var(--panneau-space-1);
|
|
11
11
|
overflow-x: auto;
|
|
12
|
-
border-bottom: var(--panneau-border-width) solid
|
|
12
|
+
border-bottom: var(--panneau-border-width) solid
|
|
13
|
+
var(--panneau-tabs-border-color, var(--panneau-color-border));
|
|
13
14
|
scrollbar-width: none;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
.panneau-list
|
|
17
|
+
.panneau-tabs-list::-webkit-scrollbar {
|
|
17
18
|
display: none;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
.panneau-tab
|
|
21
|
+
.panneau-tabs-tab {
|
|
21
22
|
position: relative;
|
|
22
23
|
display: inline-flex;
|
|
23
24
|
flex: 0 0 auto;
|
|
24
25
|
align-items: center;
|
|
25
26
|
gap: var(--panneau-space-2);
|
|
26
27
|
min-height: var(--panneau-control-height);
|
|
27
|
-
padding: 0 var(--panneau-space-3);
|
|
28
|
+
padding: 0 var(--panneau-tabs-tab-padding-x, var(--panneau-space-3));
|
|
28
29
|
font-size: var(--panneau-font-size-md);
|
|
29
|
-
font-weight: var(--panneau-font-weight-medium);
|
|
30
|
-
color: var(--panneau-color-text-muted);
|
|
30
|
+
font-weight: var(--panneau-tabs-tab-font-weight, var(--panneau-font-weight-medium));
|
|
31
|
+
color: var(--panneau-tabs-tab-color, var(--panneau-color-text-muted));
|
|
31
32
|
white-space: nowrap;
|
|
32
33
|
cursor: pointer;
|
|
33
34
|
outline: none;
|
|
34
35
|
-webkit-tap-highlight-color: transparent;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
.panneau-tab
|
|
38
|
+
.panneau-tabs-tab::after {
|
|
38
39
|
position: absolute;
|
|
39
40
|
inset-inline: var(--panneau-space-2);
|
|
40
41
|
bottom: calc(-1 * var(--panneau-border-width));
|
|
41
|
-
height: 2px;
|
|
42
|
+
height: var(--panneau-tabs-indicator-height, 2px);
|
|
42
43
|
content: '';
|
|
43
44
|
background-color: transparent;
|
|
44
45
|
border-radius: 2px 2px 0 0;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
.panneau-tab
|
|
48
|
-
color: var(--panneau-color-text);
|
|
48
|
+
.panneau-tabs-tab[data-hovered] {
|
|
49
|
+
color: var(--panneau-tabs-tab-color-selected, var(--panneau-color-text));
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
.panneau-tab
|
|
52
|
-
color: var(--panneau-color-text);
|
|
52
|
+
.panneau-tabs-tab[data-selected] {
|
|
53
|
+
color: var(--panneau-tabs-tab-color-selected, var(--panneau-color-text));
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
.panneau-tab
|
|
56
|
-
background-color: var(--panneau-color-accent);
|
|
56
|
+
.panneau-tabs-tab[data-selected]::after {
|
|
57
|
+
background-color: var(--panneau-tabs-indicator-color, var(--panneau-color-accent));
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
.panneau-tab
|
|
60
|
+
.panneau-tabs-tab[data-disabled] {
|
|
60
61
|
cursor: not-allowed;
|
|
61
62
|
opacity: 0.5;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
.panneau-tab
|
|
65
|
+
.panneau-tabs-tab[data-focus-visible] {
|
|
65
66
|
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
66
67
|
outline-offset: -2px;
|
|
67
68
|
border-radius: var(--panneau-radius-sm);
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
.panneau-panel
|
|
71
|
+
.panneau-tabs-panel {
|
|
71
72
|
min-width: 0;
|
|
72
73
|
outline: none;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
.panneau-panel
|
|
76
|
+
.panneau-tabs-panel[data-focus-visible] {
|
|
76
77
|
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
77
78
|
outline-offset: 2px;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
.panneau-panel
|
|
81
|
-
.panneau-panel
|
|
81
|
+
.panneau-tabs-panel[data-inert],
|
|
82
|
+
.panneau-tabs-panel[inert] {
|
|
82
83
|
display: none;
|
|
83
84
|
}
|
package/dist/tabs/Tabs.js
CHANGED
|
@@ -20,7 +20,7 @@ function Tabs$1(t0) {
|
|
|
20
20
|
}
|
|
21
21
|
let t1;
|
|
22
22
|
if ($[3] !== className) {
|
|
23
|
-
t1 = cx(Tabs_module_default.tabs, className);
|
|
23
|
+
t1 = cx("panneau-tabs", Tabs_module_default.tabs, className);
|
|
24
24
|
$[3] = className;
|
|
25
25
|
$[4] = t1;
|
|
26
26
|
} else t1 = $[4];
|
|
@@ -52,7 +52,7 @@ function TabList$1(t0) {
|
|
|
52
52
|
}
|
|
53
53
|
let t1;
|
|
54
54
|
if ($[3] !== className) {
|
|
55
|
-
t1 = cx(Tabs_module_default.list, className);
|
|
55
|
+
t1 = cx("panneau-tab-list", Tabs_module_default.list, className);
|
|
56
56
|
$[3] = className;
|
|
57
57
|
$[4] = t1;
|
|
58
58
|
} else t1 = $[4];
|
|
@@ -84,7 +84,7 @@ function Tab$1(t0) {
|
|
|
84
84
|
}
|
|
85
85
|
let t1;
|
|
86
86
|
if ($[3] !== className) {
|
|
87
|
-
t1 = cx(Tabs_module_default.tab, className);
|
|
87
|
+
t1 = cx("panneau-tab", Tabs_module_default.tab, className);
|
|
88
88
|
$[3] = className;
|
|
89
89
|
$[4] = t1;
|
|
90
90
|
} else t1 = $[4];
|
|
@@ -119,7 +119,7 @@ function TabPanel$1(t0) {
|
|
|
119
119
|
}
|
|
120
120
|
let t1;
|
|
121
121
|
if ($[3] !== className) {
|
|
122
|
-
t1 = cx(Tabs_module_default.panel, className);
|
|
122
|
+
t1 = cx("panneau-tab-panel", Tabs_module_default.panel, className);
|
|
123
123
|
$[3] = className;
|
|
124
124
|
$[4] = t1;
|
|
125
125
|
} else t1 = $[4];
|
package/dist/tabs/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","names":["Tabs","_c","styles","AriaTabs","TabList","AriaTabList","Tab","AriaTab","TabPanel","AriaTabPanel"],"sources":["../../src/tabs/Tabs.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n type TabListProps as AriaTabListProps,\n TabPanel as AriaTabPanel,\n type TabPanelProps as AriaTabPanelProps,\n type TabProps as AriaTabProps,\n Tabs as AriaTabs,\n type TabsProps as AriaTabsProps,\n} from 'react-aria-components';\n\nimport { cx } from '../utils/cx';\nimport styles from './Tabs.module.css';\n\nexport interface TabsProps extends Omit<AriaTabsProps, 'className' | 'style'> {\n className?: string;\n}\n\n/** Tabs: a `TabList` of `Tab`s, then a `TabPanel` per tab, matched by `id`. */\nexport function Tabs({ className, ...props }: TabsProps) {\n return <AriaTabs {...props} className={cx(styles.tabs, className)} />;\n}\n\nexport interface TabListProps<T extends object> extends Omit<\n AriaTabListProps<T>,\n 'className' | 'style'\n> {\n className?: string;\n}\n\n/** The row of tabs. It scrolls sideways when the tabs don't fit, on phones. */\nexport function TabList<T extends object>({ className, ...props }: TabListProps<T>) {\n return <AriaTabList {...props} className={cx(styles.list, className)} />;\n}\n\nexport interface TabProps extends Omit<AriaTabProps, 'className' | 'style' | 'children'> {\n children?: ReactNode;\n className?: string;\n}\n\n/** A tab. Put a `Badge` in it for a count, such as the errors of the panel. */\nexport function Tab({ className, ...props }: TabProps) {\n return <AriaTab {...props} className={cx(styles.tab, className)} />;\n}\n\nexport interface TabPanelProps extends Omit<AriaTabPanelProps, 'className' | 'style'> {\n className?: string;\n}\n\n/**\n * The content of a tab. With `shouldForceMount`, the panel stays mounted (and hidden) when another\n * tab is selected, which keeps the state of its fields.\n */\nexport function TabPanel({ className, ...props }: TabPanelProps) {\n return <AriaTabPanel {...props} className={cx(styles.panel, className)} />;\n}\n"],"mappings":";;;;;;;AAoBA,SAAOA,OAAA,IAAA;CAAA,MAAA,IAAAC,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAc,CAAA,CAAA,WAAA,GAAA,SAAA;EAAkC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,YAAA,EAAA;EAAA,QAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,WAAA;EACZ,KAAA,
|
|
1
|
+
{"version":3,"file":"Tabs.js","names":["Tabs","_c","styles","AriaTabs","TabList","AriaTabList","Tab","AriaTab","TabPanel","AriaTabPanel"],"sources":["../../src/tabs/Tabs.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n type TabListProps as AriaTabListProps,\n TabPanel as AriaTabPanel,\n type TabPanelProps as AriaTabPanelProps,\n type TabProps as AriaTabProps,\n Tabs as AriaTabs,\n type TabsProps as AriaTabsProps,\n} from 'react-aria-components';\n\nimport { cx } from '../utils/cx';\nimport styles from './Tabs.module.css';\n\nexport interface TabsProps extends Omit<AriaTabsProps, 'className' | 'style'> {\n className?: string;\n}\n\n/** Tabs: a `TabList` of `Tab`s, then a `TabPanel` per tab, matched by `id`. */\nexport function Tabs({ className, ...props }: TabsProps) {\n return <AriaTabs {...props} className={cx('panneau-tabs', styles.tabs, className)} />;\n}\n\nexport interface TabListProps<T extends object> extends Omit<\n AriaTabListProps<T>,\n 'className' | 'style'\n> {\n className?: string;\n}\n\n/** The row of tabs. It scrolls sideways when the tabs don't fit, on phones. */\nexport function TabList<T extends object>({ className, ...props }: TabListProps<T>) {\n return <AriaTabList {...props} className={cx('panneau-tab-list', styles.list, className)} />;\n}\n\nexport interface TabProps extends Omit<AriaTabProps, 'className' | 'style' | 'children'> {\n children?: ReactNode;\n className?: string;\n}\n\n/** A tab. Put a `Badge` in it for a count, such as the errors of the panel. */\nexport function Tab({ className, ...props }: TabProps) {\n return <AriaTab {...props} className={cx('panneau-tab', styles.tab, className)} />;\n}\n\nexport interface TabPanelProps extends Omit<AriaTabPanelProps, 'className' | 'style'> {\n className?: string;\n}\n\n/**\n * The content of a tab. With `shouldForceMount`, the panel stays mounted (and hidden) when another\n * tab is selected, which keeps the state of its fields.\n */\nexport function TabPanel({ className, ...props }: TabPanelProps) {\n return <AriaTabPanel {...props} className={cx('panneau-tab-panel', styles.panel, className)} />;\n}\n"],"mappings":";;;;;;;AAoBA,SAAOA,OAAA,IAAA;CAAA,MAAA,IAAAC,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAc,CAAA,CAAA,WAAA,GAAA,SAAA;EAAkC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,YAAA,EAAA;EAAA,QAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,WAAA;EACZ,KAAA,GAAG,gBAAgBC,oBAAM,MAAO,SAAS;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,SAAA,EAAA,OAAA,IAAA;EAA1E,KAAA,oBAACC,MAAD;GAAS,GAAK;GAAkB,WAAA;EAA0C,CAAA;EAAI,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OAA9E;AAA8E;;AAWzF,SAAOC,UAAA,IAAA;CAAA,MAAA,IAAAH,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAmC,CAAA,CAAA,WAAA,GAAA,SAAA;EAAwC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,YAAA,EAAA;EAAA,QAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,WAAA;EACpC,KAAA,GAAG,oBAAoBC,oBAAM,MAAO,SAAS;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,SAAA,EAAA,OAAA,IAAA;EAAjF,KAAA,oBAACG,SAAD;GAAY,GAAK;GAAkB,WAAA;EAA8C,CAAA;EAAI,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OAArF;AAAqF;;AAShG,SAAOC,MAAA,IAAA;CAAA,MAAA,IAAAL,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAa,CAAA,CAAA,WAAA,GAAA,SAAA;EAAiC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,YAAA,EAAA;EAAA,QAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,WAAA;EACX,KAAA,GAAG,eAAeC,oBAAM,KAAM,SAAS;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,SAAA,EAAA,OAAA,IAAA;EAAvE,KAAA,oBAACK,KAAD;GAAQ,GAAK;GAAkB,WAAA;EAAwC,CAAA;EAAI,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OAA3E;AAA2E;;;;;AAWtF,SAAOC,WAAA,IAAA;CAAA,MAAA,IAAAP,EAAA,CAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,IAAA;EAAkB,CAAA,CAAA,WAAA,GAAA,SAAA;EAAsC,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA;EAAA,YAAA,EAAA;EAAA,QAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,WAAA;EAChB,KAAA,GAAG,qBAAqBC,oBAAM,OAAQ,SAAS;EAAC,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,SAAA,EAAA,OAAA,IAAA;EAApF,KAAA,oBAACO,UAAD;GAAa,GAAK;GAAkB,WAAA;EAAgD,CAAA;EAAI,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OAAxF;AAAwF"}
|
package/dist/tabs/Tabs.module.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./Tabs.css";
|
|
2
2
|
//#region src/tabs/Tabs.module.css
|
|
3
|
-
var tabs = "panneau-tabs
|
|
4
|
-
var list = "panneau-list
|
|
5
|
-
var tab = "panneau-tab
|
|
6
|
-
var panel = "panneau-panel
|
|
3
|
+
var tabs = "panneau-tabs";
|
|
4
|
+
var list = "panneau-tabs-list";
|
|
5
|
+
var tab = "panneau-tabs-tab";
|
|
6
|
+
var panel = "panneau-tabs-panel";
|
|
7
7
|
var Tabs_module_default = {
|
|
8
8
|
tabs,
|
|
9
9
|
list,
|