@panneau/ui 5.0.0-alpha.4 → 5.0.0-alpha.42
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 +138 -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/bar-chart/BarChart.css +76 -0
- package/dist/bar-chart/BarChart.d.ts +33 -0
- package/dist/bar-chart/BarChart.d.ts.map +1 -0
- package/dist/bar-chart/BarChart.js +151 -0
- package/dist/bar-chart/BarChart.js.map +1 -0
- package/dist/bar-chart/BarChart.module.js +26 -0
- package/dist/bar-chart/BarChart.module.js.map +1 -0
- package/dist/bar-chart/tokens.d.ts +3 -0
- package/dist/bar-chart/tokens.d.ts.map +1 -0
- package/dist/bar-chart/tokens.js +17 -0
- package/dist/bar-chart/tokens.js.map +1 -0
- 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/chart-legend/ChartLegend.css +73 -0
- package/dist/chart-legend/ChartLegend.d.ts +32 -0
- package/dist/chart-legend/ChartLegend.d.ts.map +1 -0
- package/dist/chart-legend/ChartLegend.js +76 -0
- package/dist/chart-legend/ChartLegend.js.map +1 -0
- package/dist/chart-legend/ChartLegend.module.js +26 -0
- package/dist/chart-legend/ChartLegend.module.js.map +1 -0
- 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 +56 -4
- package/dist/date-picker/DatePicker.d.ts +16 -3
- package/dist/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/date-picker/DatePicker.js +359 -72
- package/dist/date-picker/DatePicker.js.map +1 -1
- package/dist/date-picker/DatePicker.module.js +8 -2
- 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 +44 -5
- 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 +71 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -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 +314 -0
- package/dist/line-chart/LineChart.d.ts +84 -0
- package/dist/line-chart/LineChart.d.ts.map +1 -0
- package/dist/line-chart/LineChart.js +626 -0
- package/dist/line-chart/LineChart.js.map +1 -0
- package/dist/line-chart/LineChart.module.js +73 -0
- package/dist/line-chart/LineChart.module.js.map +1 -0
- package/dist/line-chart/geometry.d.ts +37 -0
- package/dist/line-chart/geometry.d.ts.map +1 -0
- package/dist/line-chart/geometry.js +115 -0
- package/dist/line-chart/geometry.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 +23 -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/meter/Meter.css +23 -0
- package/dist/meter/Meter.d.ts +26 -0
- package/dist/meter/Meter.d.ts.map +1 -0
- package/dist/meter/Meter.js +99 -0
- package/dist/meter/Meter.js.map +1 -0
- package/dist/meter/Meter.module.js +16 -0
- package/dist/meter/Meter.module.js.map +1 -0
- package/dist/meter/tokens.d.ts +3 -0
- package/dist/meter/tokens.d.ts.map +1 -0
- package/dist/meter/tokens.js +15 -0
- package/dist/meter/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 +7 -2
- 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 +214 -9
- package/dist/radio-group/RadioGroup.d.ts +34 -5
- package/dist/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/radio-group/RadioGroup.js +258 -43
- package/dist/radio-group/RadioGroup.js.map +1 -1
- package/dist/radio-group/RadioGroup.module.js +22 -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 +31 -3
- package/dist/radio-group/tokens.js.map +1 -1
- package/dist/root/PanneauRoot.css +35 -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/sparkline/Sparkline.css +44 -0
- package/dist/sparkline/Sparkline.d.ts +23 -0
- package/dist/sparkline/Sparkline.d.ts.map +1 -0
- package/dist/sparkline/Sparkline.js +164 -0
- package/dist/sparkline/Sparkline.js.map +1 -0
- package/dist/sparkline/Sparkline.module.js +20 -0
- package/dist/sparkline/Sparkline.module.js.map +1 -0
- package/dist/sparkline/tokens.d.ts +3 -0
- package/dist/sparkline/tokens.d.ts.map +1 -0
- package/dist/sparkline/tokens.js +17 -0
- package/dist/sparkline/tokens.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 +79 -0
- package/dist/stat/Stat.d.ts +49 -0
- package/dist/stat/Stat.d.ts.map +1 -0
- package/dist/stat/Stat.js +127 -0
- package/dist/stat/Stat.js.map +1 -0
- package/dist/stat/Stat.module.js +28 -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 +24 -11
- package/dist/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +26 -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 +10 -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 +180 -19
- package/dist/toast/Toast.d.ts +61 -10
- package/dist/toast/Toast.d.ts.map +1 -1
- package/dist/toast/Toast.js +246 -70
- package/dist/toast/Toast.js.map +1 -1
- package/dist/toast/Toast.module.js +6 -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.css +1 -1
- package/dist/tooltip/Tooltip.js +38 -8
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/Tooltip.module.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/dist/divider/Divider.js
CHANGED
|
@@ -1,19 +1,63 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import Divider_module_default from "./Divider.module.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/divider/Divider.tsx
|
|
5
6
|
/** A line between groups of content: an `hr`, or a vertical separator in a row. */
|
|
6
|
-
function Divider(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
function Divider(t0) {
|
|
8
|
+
const $ = c(14);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
let t1;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({orientation: t1, className, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = className;
|
|
16
|
+
$[2] = props;
|
|
17
|
+
$[3] = t1;
|
|
18
|
+
} else {
|
|
19
|
+
className = $[1];
|
|
20
|
+
props = $[2];
|
|
21
|
+
t1 = $[3];
|
|
22
|
+
}
|
|
23
|
+
if ((t1 === void 0 ? "horizontal" : t1) === "vertical") {
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[4] !== className) {
|
|
26
|
+
t2 = cx("panneau-divider", Divider_module_default.divider, Divider_module_default.vertical, className);
|
|
27
|
+
$[4] = className;
|
|
28
|
+
$[5] = t2;
|
|
29
|
+
} else t2 = $[5];
|
|
30
|
+
let t3;
|
|
31
|
+
if ($[6] !== props || $[7] !== t2) {
|
|
32
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
33
|
+
role: "separator",
|
|
34
|
+
"aria-orientation": "vertical",
|
|
35
|
+
...props,
|
|
36
|
+
className: t2
|
|
37
|
+
});
|
|
38
|
+
$[6] = props;
|
|
39
|
+
$[7] = t2;
|
|
40
|
+
$[8] = t3;
|
|
41
|
+
} else t3 = $[8];
|
|
42
|
+
return t3;
|
|
43
|
+
}
|
|
44
|
+
let t2;
|
|
45
|
+
if ($[9] !== className) {
|
|
46
|
+
t2 = cx("panneau-divider", Divider_module_default.divider, className);
|
|
47
|
+
$[9] = className;
|
|
48
|
+
$[10] = t2;
|
|
49
|
+
} else t2 = $[10];
|
|
50
|
+
let t3;
|
|
51
|
+
if ($[11] !== props || $[12] !== t2) {
|
|
52
|
+
t3 = /* @__PURE__ */ jsx("hr", {
|
|
53
|
+
...props,
|
|
54
|
+
className: t2
|
|
55
|
+
});
|
|
56
|
+
$[11] = props;
|
|
57
|
+
$[12] = t2;
|
|
58
|
+
$[13] = t3;
|
|
59
|
+
} else t3 = $[13];
|
|
60
|
+
return t3;
|
|
17
61
|
}
|
|
18
62
|
//#endregion
|
|
19
63
|
export { Divider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","names":["styles"],"sources":["../../src/divider/Divider.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Divider.module.css';\n\nexport interface DividerProps extends HTMLAttributes<HTMLElement> {\n /** `vertical` separates items of a row. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n}\n\n/** A line between groups of content: an `hr`, or a vertical separator in a row. */\nexport function Divider({ orientation = 'horizontal', className, ...props }: DividerProps) {\n if (orientation === 'vertical') {\n return (\n <div\n role=\"separator\"\n aria-orientation=\"vertical\"\n {...props}\n className={cx('panneau-divider', styles.divider, styles.vertical, className)}\n />\n );\n }\n return <hr {...props} className={cx('panneau-divider', styles.divider, className)} />;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Divider.js","names":["HTMLAttributes","cx","styles","DividerProps","HTMLElement","orientation","Divider","t0","$","_c","className","props","t1","undefined","t2","divider","vertical","t3","_c","styles"],"sources":["../../src/divider/Divider.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Divider.module.css';\n\nexport interface DividerProps extends HTMLAttributes<HTMLElement> {\n /** `vertical` separates items of a row. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n}\n\n/** A line between groups of content: an `hr`, or a vertical separator in a row. */\nexport function Divider({ orientation = 'horizontal', className, ...props }: DividerProps) {\n if (orientation === 'vertical') {\n return (\n <div\n role=\"separator\"\n aria-orientation=\"vertical\"\n {...props}\n className={cx('panneau-divider', styles.divider, styles.vertical, className)}\n />\n );\n }\n return <hr {...props} className={cx('panneau-divider', styles.divider, className)} />;\n}\n"],"mappings":";;;;;;AAWA,SAAOM,QAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OA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are const dividerTokens: import("
|
|
2
|
+
export declare const dividerTokens: import("../index.js").ComponentTokens<"divider", "panneau-divider-color" | "panneau-divider-width">;
|
|
3
3
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/divider/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Divider. */\nexport const dividerTokens = defineComponentTokens('divider', {\n /** Color of the line. */\n color: 'var(--panneau-color-border)',\n /** Thickness of the line. */\n width: 'var(--panneau-border-width)',\n});\n"],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","dividerTokens","color","width"],"sources":["../../src/divider/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Divider. */\nexport const dividerTokens = defineComponentTokens('divider', {\n /** Color of the line. */\n color: 'var(--panneau-color-border)',\n /** Thickness of the line. */\n width: 'var(--panneau-border-width)',\n});\n"],"mappings":";;;AAGA,IAAaC,gBAAgBD,sBAAsB,WAAW;;CAE1DE,OAAO;;CAEPC,OAAO;AACX,CAAC"}
|
package/dist/field/Field.css
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
.panneau-field-required {
|
|
19
19
|
margin-inline-start: 0.2em;
|
|
20
|
-
color: var(--panneau-color-danger);
|
|
20
|
+
color: var(--panneau-field-required-color, var(--panneau-color-danger));
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.panneau-field-description {
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
.panneau-field-control[data-focus-within],
|
|
71
71
|
.panneau-field-control[data-focus-visible],
|
|
72
72
|
.panneau-field-control:focus-within {
|
|
73
|
-
border-color: var(--panneau-color-focus);
|
|
73
|
+
border-color: var(--panneau-input-border-color-focus, var(--panneau-color-focus));
|
|
74
74
|
outline: none;
|
|
75
|
-
box-shadow: 0 0 0 1px var(--panneau-color-focus);
|
|
75
|
+
box-shadow: var(--panneau-input-focus-ring, 0 0 0 1px var(--panneau-color-focus));
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.panneau-field-control[data-invalid] {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
.panneau-field-control[data-invalid][data-focused],
|
|
83
83
|
.panneau-field-control[data-invalid][data-focus-within],
|
|
84
84
|
.panneau-field-control[data-invalid]:focus-within {
|
|
85
|
-
box-shadow: 0 0 0 1px var(--panneau-color-danger);
|
|
85
|
+
box-shadow: var(--panneau-input-focus-ring-invalid, 0 0 0 1px var(--panneau-color-danger));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.panneau-field-control[data-disabled] {
|
|
@@ -132,6 +132,15 @@
|
|
|
132
132
|
margin-inline-start: var(--panneau-space-2);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
/* A text before or after the value reads with it, as one URL or one amount: `/pages/home`. */
|
|
136
|
+
.panneau-field-adornment[data-text]:first-child {
|
|
137
|
+
margin-inline-end: 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.panneau-field-adornment[data-text]:last-child {
|
|
141
|
+
margin-inline-start: 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
135
144
|
.panneau-field-fieldset {
|
|
136
145
|
display: flex;
|
|
137
146
|
flex-direction: column;
|
|
@@ -146,3 +155,20 @@
|
|
|
146
155
|
margin: 0 0 var(--panneau-space-1);
|
|
147
156
|
padding: 0;
|
|
148
157
|
}
|
|
158
|
+
|
|
159
|
+
/* A legend with controls at the end of its line. */
|
|
160
|
+
.panneau-field-legend-row {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-wrap: wrap;
|
|
163
|
+
align-items: center;
|
|
164
|
+
gap: var(--panneau-space-1) var(--panneau-space-3);
|
|
165
|
+
min-height: var(--panneau-control-height-sm);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.panneau-field-legend-end {
|
|
169
|
+
display: flex;
|
|
170
|
+
flex-wrap: wrap;
|
|
171
|
+
align-items: center;
|
|
172
|
+
gap: var(--panneau-space-2);
|
|
173
|
+
margin-inline-start: auto;
|
|
174
|
+
}
|
|
@@ -11,6 +11,8 @@ var bare = "panneau-field-bare";
|
|
|
11
11
|
var adornment = "panneau-field-adornment";
|
|
12
12
|
var fieldset = "panneau-field-fieldset";
|
|
13
13
|
var legend = "panneau-field-legend";
|
|
14
|
+
var legendRow = "panneau-field-legend-row";
|
|
15
|
+
var legendEnd = "panneau-field-legend-end";
|
|
14
16
|
var Field_module_default = {
|
|
15
17
|
field,
|
|
16
18
|
label,
|
|
@@ -22,9 +24,11 @@ var Field_module_default = {
|
|
|
22
24
|
bare,
|
|
23
25
|
adornment,
|
|
24
26
|
fieldset,
|
|
25
|
-
legend
|
|
27
|
+
legend,
|
|
28
|
+
legendRow,
|
|
29
|
+
legendEnd
|
|
26
30
|
};
|
|
27
31
|
//#endregion
|
|
28
|
-
export { adornment, bare, control, Field_module_default as default, description, error, errors, field, fieldset, label, legend, required };
|
|
32
|
+
export { adornment, bare, control, Field_module_default as default, description, error, errors, field, fieldset, label, legend, legendEnd, legendRow, required };
|
|
29
33
|
|
|
30
34
|
//# sourceMappingURL=Field.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.module.js","names":[],"sources":["../../src/field/Field.module.css"],"sourcesContent":["/* Shared look of labelled controls: label, description, errors and the control itself. */\n\n.field {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-field-gap, var(--panneau-space-1));\n min-width: 0;\n}\n\n.label {\n font-size: var(--panneau-field-label-font-size, var(--panneau-font-size-md));\n font-weight: var(--panneau-field-label-font-weight, var(--panneau-font-weight-medium));\n line-height: var(--panneau-line-height-tight);\n color: var(--panneau-color-text);\n overflow-wrap: anywhere;\n}\n\n.required {\n margin-inline-start: 0.2em;\n color: var(--panneau-color-danger);\n}\n\n.description {\n font-size: var(--panneau-font-size-sm);\n color: var(--panneau-color-text-muted);\n}\n\n.errors {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-space-1);\n font-size: var(--panneau-font-size-sm);\n color: var(--panneau-color-danger);\n}\n\n.error {\n display: block;\n}\n\n.control {\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n min-height: var(--panneau-control-height);\n padding: 0 var(--panneau-input-padding-x, var(--panneau-control-padding-x));\n font-size: var(--panneau-font-size-control);\n line-height: var(--panneau-line-height-tight);\n color: var(--panneau-color-text);\n background-color: var(--panneau-input-bg, var(--panneau-color-surface));\n border: var(--panneau-input-border-width, var(--panneau-border-width)) solid\n var(--panneau-input-border-color, var(--panneau-color-border-control));\n border-radius: var(--panneau-input-radius, var(--panneau-radius-md));\n transition:\n border-color var(--panneau-duration),\n box-shadow var(--panneau-duration);\n}\n\n.control::placeholder {\n color: var(--panneau-color-text-muted);\n opacity: 1;\n}\n\n.control[data-hovered],\n.control:hover {\n border-color: var(--panneau-input-border-color-hover, var(--panneau-color-text-muted));\n}\n\n.control[data-focused],\n.control[data-focus-within],\n.control[data-focus-visible],\n.control:focus-within {\n border-color: var(--panneau-color-focus);\n outline: none;\n box-shadow: 0 0 0 1px var(--panneau-color-focus);\n}\n\n.control[data-invalid] {\n border-color: var(--panneau-color-danger);\n}\n\n.control[data-invalid][data-focused],\n.control[data-invalid][data-focus-within],\n.control[data-invalid]:focus-within {\n box-shadow: 0 0 0 1px var(--panneau-color-danger);\n}\n\n.control[data-disabled] {\n cursor: not-allowed;\n opacity: 0.6;\n background-color: var(--panneau-color-surface-sunken);\n}\n\n.control[data-readonly],\n.control[readonly] {\n background-color: var(--panneau-color-surface-sunken);\n}\n\n/* An input inside a control (with adornments, segments or buttons): the control draws the box. */\n.bare {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n min-height: calc(var(--panneau-control-height) - 2 * var(--panneau-border-width));\n padding: 0;\n font: inherit;\n color: inherit;\n background: transparent;\n border: 0;\n outline: none;\n}\n\n.bare::placeholder {\n color: var(--panneau-color-text-muted);\n opacity: 1;\n}\n\n.adornment {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n gap: var(--panneau-space-1);\n color: var(--panneau-color-text-muted);\n white-space: nowrap;\n}\n\n.adornment:first-child {\n margin-inline-end: var(--panneau-space-2);\n}\n\n.adornment:last-child {\n margin-inline-start: var(--panneau-space-2);\n}\n\n.fieldset {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-space-2);\n min-width: 0;\n}\n\n.legend {\n display: block;\n float: none;\n width: 100%;\n margin: 0 0 var(--panneau-space-1);\n padding: 0;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Field.module.js","names":[],"sources":["../../src/field/Field.module.css"],"sourcesContent":["/* Shared look of labelled controls: label, description, errors and the control itself. */\n\n.field {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-field-gap, var(--panneau-space-1));\n min-width: 0;\n}\n\n.label {\n font-size: var(--panneau-field-label-font-size, var(--panneau-font-size-md));\n font-weight: var(--panneau-field-label-font-weight, var(--panneau-font-weight-medium));\n line-height: var(--panneau-line-height-tight);\n color: var(--panneau-color-text);\n overflow-wrap: anywhere;\n}\n\n.required {\n margin-inline-start: 0.2em;\n color: var(--panneau-field-required-color, var(--panneau-color-danger));\n}\n\n.description {\n font-size: var(--panneau-font-size-sm);\n color: var(--panneau-color-text-muted);\n}\n\n.errors {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-space-1);\n font-size: var(--panneau-font-size-sm);\n color: var(--panneau-color-danger);\n}\n\n.error {\n display: block;\n}\n\n.control {\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n min-height: var(--panneau-control-height);\n padding: 0 var(--panneau-input-padding-x, var(--panneau-control-padding-x));\n font-size: var(--panneau-font-size-control);\n line-height: var(--panneau-line-height-tight);\n color: var(--panneau-color-text);\n background-color: var(--panneau-input-bg, var(--panneau-color-surface));\n border: var(--panneau-input-border-width, var(--panneau-border-width)) solid\n var(--panneau-input-border-color, var(--panneau-color-border-control));\n border-radius: var(--panneau-input-radius, var(--panneau-radius-md));\n transition:\n border-color var(--panneau-duration),\n box-shadow var(--panneau-duration);\n}\n\n.control::placeholder {\n color: var(--panneau-color-text-muted);\n opacity: 1;\n}\n\n.control[data-hovered],\n.control:hover {\n border-color: var(--panneau-input-border-color-hover, var(--panneau-color-text-muted));\n}\n\n.control[data-focused],\n.control[data-focus-within],\n.control[data-focus-visible],\n.control:focus-within {\n border-color: var(--panneau-input-border-color-focus, var(--panneau-color-focus));\n outline: none;\n box-shadow: var(--panneau-input-focus-ring, 0 0 0 1px var(--panneau-color-focus));\n}\n\n.control[data-invalid] {\n border-color: var(--panneau-color-danger);\n}\n\n.control[data-invalid][data-focused],\n.control[data-invalid][data-focus-within],\n.control[data-invalid]:focus-within {\n box-shadow: var(--panneau-input-focus-ring-invalid, 0 0 0 1px var(--panneau-color-danger));\n}\n\n.control[data-disabled] {\n cursor: not-allowed;\n opacity: 0.6;\n background-color: var(--panneau-color-surface-sunken);\n}\n\n.control[data-readonly],\n.control[readonly] {\n background-color: var(--panneau-color-surface-sunken);\n}\n\n/* An input inside a control (with adornments, segments or buttons): the control draws the box. */\n.bare {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n min-height: calc(var(--panneau-control-height) - 2 * var(--panneau-border-width));\n padding: 0;\n font: inherit;\n color: inherit;\n background: transparent;\n border: 0;\n outline: none;\n}\n\n.bare::placeholder {\n color: var(--panneau-color-text-muted);\n opacity: 1;\n}\n\n.adornment {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n gap: var(--panneau-space-1);\n color: var(--panneau-color-text-muted);\n white-space: nowrap;\n}\n\n.adornment:first-child {\n margin-inline-end: var(--panneau-space-2);\n}\n\n.adornment:last-child {\n margin-inline-start: var(--panneau-space-2);\n}\n\n/* A text before or after the value reads with it, as one URL or one amount: `/pages/home`. */\n.adornment[data-text]:first-child {\n margin-inline-end: 0;\n}\n\n.adornment[data-text]:last-child {\n margin-inline-start: 0;\n}\n\n.fieldset {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-space-2);\n min-width: 0;\n}\n\n.legend {\n display: block;\n float: none;\n width: 100%;\n margin: 0 0 var(--panneau-space-1);\n padding: 0;\n}\n\n/* A legend with controls at the end of its line. */\n.legendRow {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--panneau-space-1) var(--panneau-space-3);\n min-height: var(--panneau-control-height-sm);\n}\n\n.legendEnd {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--panneau-space-2);\n margin-inline-start: auto;\n}\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
declare const styles: Readonly<Record<string, string>>;
|
|
3
3
|
/** Props that every labelled control of `@panneau/ui` accepts. */
|
|
4
4
|
export interface FieldChromeProps {
|
|
5
5
|
/** Visible label. Without one, pass `aria-label`. */
|
package/dist/field/FieldParts.js
CHANGED
|
@@ -1,20 +1,43 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import Field_module_default from "./Field.module.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { FieldError, Label, Text } from "react-aria-components";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Fragment as Fragment$1 } from "react";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
7
|
//#region src/field/FieldParts.tsx
|
|
8
|
-
function FieldLabel(
|
|
8
|
+
function FieldLabel(t0) {
|
|
9
|
+
const $ = c(8);
|
|
10
|
+
const { children, isRequired: t1, className } = t0;
|
|
11
|
+
const isRequired = t1 === void 0 ? false : t1;
|
|
9
12
|
if (children === void 0 || children === null) return null;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
let t2;
|
|
14
|
+
if ($[0] !== className) {
|
|
15
|
+
t2 = cx(Field_module_default.label, className);
|
|
16
|
+
$[0] = className;
|
|
17
|
+
$[1] = t2;
|
|
18
|
+
} else t2 = $[1];
|
|
19
|
+
let t3;
|
|
20
|
+
if ($[2] !== isRequired) {
|
|
21
|
+
t3 = isRequired ? /* @__PURE__ */ jsx("span", {
|
|
13
22
|
className: Field_module_default.required,
|
|
14
23
|
"aria-hidden": "true",
|
|
15
24
|
children: "*"
|
|
16
|
-
}) : null
|
|
17
|
-
|
|
25
|
+
}) : null;
|
|
26
|
+
$[2] = isRequired;
|
|
27
|
+
$[3] = t3;
|
|
28
|
+
} else t3 = $[3];
|
|
29
|
+
let t4;
|
|
30
|
+
if ($[4] !== children || $[5] !== t2 || $[6] !== t3) {
|
|
31
|
+
t4 = /* @__PURE__ */ jsxs(Label, {
|
|
32
|
+
className: t2,
|
|
33
|
+
children: [children, t3]
|
|
34
|
+
});
|
|
35
|
+
$[4] = children;
|
|
36
|
+
$[5] = t2;
|
|
37
|
+
$[6] = t3;
|
|
38
|
+
$[7] = t4;
|
|
39
|
+
} else t4 = $[7];
|
|
40
|
+
return t4;
|
|
18
41
|
}
|
|
19
42
|
function FieldDescription(t0) {
|
|
20
43
|
const $ = c(5);
|
|
@@ -40,15 +63,46 @@ function FieldDescription(t0) {
|
|
|
40
63
|
return t2;
|
|
41
64
|
}
|
|
42
65
|
/** Error messages of a React Aria field. They show when the field is invalid. */
|
|
43
|
-
function FieldErrors(
|
|
66
|
+
function FieldErrors(t0) {
|
|
67
|
+
const $ = c(9);
|
|
68
|
+
const { errors: t1, className } = t0;
|
|
69
|
+
let t2;
|
|
70
|
+
if ($[0] !== t1) {
|
|
71
|
+
t2 = t1 === void 0 ? [] : t1;
|
|
72
|
+
$[0] = t1;
|
|
73
|
+
$[1] = t2;
|
|
74
|
+
} else t2 = $[1];
|
|
75
|
+
const errors = t2;
|
|
44
76
|
if (errors.length === 0) return null;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
77
|
+
let t3;
|
|
78
|
+
if ($[2] !== className) {
|
|
79
|
+
t3 = cx(Field_module_default.errors, className);
|
|
80
|
+
$[2] = className;
|
|
81
|
+
$[3] = t3;
|
|
82
|
+
} else t3 = $[3];
|
|
83
|
+
let t4;
|
|
84
|
+
if ($[4] !== errors) {
|
|
85
|
+
t4 = errors.map(_temp);
|
|
86
|
+
$[4] = errors;
|
|
87
|
+
$[5] = t4;
|
|
88
|
+
} else t4 = $[5];
|
|
89
|
+
let t5;
|
|
90
|
+
if ($[6] !== t3 || $[7] !== t4) {
|
|
91
|
+
t5 = /* @__PURE__ */ jsx(FieldError, {
|
|
92
|
+
className: t3,
|
|
93
|
+
children: t4
|
|
94
|
+
});
|
|
95
|
+
$[6] = t3;
|
|
96
|
+
$[7] = t4;
|
|
97
|
+
$[8] = t5;
|
|
98
|
+
} else t5 = $[8];
|
|
99
|
+
return t5;
|
|
100
|
+
}
|
|
101
|
+
function _temp(error, index) {
|
|
102
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [index > 0 ? " " : null, /* @__PURE__ */ jsx("span", {
|
|
103
|
+
className: Field_module_default.error,
|
|
104
|
+
children: error
|
|
105
|
+
})] }, index);
|
|
52
106
|
}
|
|
53
107
|
//#endregion
|
|
54
108
|
export { FieldDescription, FieldErrors, FieldLabel, Field_module_default as fieldStyles };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldParts.js","names":["
|
|
1
|
+
{"version":3,"file":"FieldParts.js","names":["Fragment","ReactNode","FieldError","Label","Text","cx","styles","FieldChromeProps","label","description","errors","className","labelClassName","descriptionClassName","errorsClassName","FieldLabel","t0","$","_c","children","isRequired","t1","undefined","t2","t3","required","t4","FieldDescription","FieldErrors","length","map","_temp","t5","error","index","fieldStyles","_c","styles","Fragment"],"sources":["../../src/field/FieldParts.tsx"],"sourcesContent":["import { Fragment, type ReactNode } from 'react';\nimport { FieldError, Label, Text } from 'react-aria-components';\n\nimport { cx } from '../utils/cx';\nimport styles from './Field.module.css';\n\n/** Props that every labelled control of `@panneau/ui` accepts. */\nexport interface FieldChromeProps {\n /** Visible label. Without one, pass `aria-label`. */\n label?: ReactNode;\n /** Help text under the control. */\n description?: ReactNode;\n /** Error messages. Any message makes the control invalid. */\n errors?: readonly string[];\n /** Class name of the outer element. */\n className?: string;\n labelClassName?: string;\n descriptionClassName?: string;\n errorsClassName?: string;\n}\n\nexport function FieldLabel({\n children,\n isRequired = false,\n className,\n}: {\n children?: ReactNode;\n isRequired?: boolean;\n className?: string | undefined;\n}) {\n if (children === undefined || children === null) {\n return null;\n }\n return (\n <Label className={cx(styles.label, className)}>\n {children}\n {isRequired ? (\n <span className={styles.required} aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </Label>\n );\n}\n\nexport function FieldDescription({\n children,\n className,\n}: {\n children?: ReactNode;\n className?: string | undefined;\n}) {\n if (children === undefined || children === null) {\n return null;\n }\n return (\n <Text slot=\"description\" className={cx(styles.description, className)}>\n {children}\n </Text>\n );\n}\n\n/** Error messages of a React Aria field. They show when the field is invalid. */\nexport function FieldErrors({\n errors = [],\n className,\n}: {\n errors?: readonly string[] | undefined;\n className?: string | undefined;\n}) {\n if (errors.length === 0) {\n return null;\n }\n return (\n <FieldError className={cx(styles.errors, className)}>\n {errors.map((error, index) => (\n <Fragment key={index}>\n {/* A space between messages, for assistive technologies. */}\n {index > 0 ? ' ' : null}\n <span className={styles.error}>{error}</span>\n </Fragment>\n ))}\n </FieldError>\n );\n}\n\nexport { styles as fieldStyles };\n"],"mappings":";;;;;;;AAqBA,SAAOe,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAoB,MAAA,EAAAC,UAAAC,YAAAC,IAAAV,cAAAK;CAEvB,MAAAI,aAAAC,OAAAC,KAAAA,IAAA,QAAAD;CAOA,IAAIF,aAAaG,KAAAA,KAAaH,aAAa,MAAI,OACpC;CACV,IAAAI;CAAA,IAAAN,EAAA,OAAAN,WAAA;EAEqBY,KAAAlB,GAAGC,qBAAME,OAAQG,S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K;CAM3B,IAAAO;CAAA,IAAAN,EAAA,OAAAI,IAAA;EALGE,KAAAF,OAAAC,KAAAA,IAAA,CAAA,IAAAD;EAAWJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAX,MAAAP,SAAAa;CAMA,IAAIb,OAAMmB,WAAY,GAAC,OACZ;CACV,IAAAL;CAAA,IAAAP,EAAA,OAAAN,WAAA;EAE0Ba,KAAAnB,GAAGC,qBAAMI,QAASC,SAAS;EAACM,EAAA,KAAAN;EAAAM,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAP,QAAA;EAC9CgB,KAAAhB,OAAMoB,IAAKC,KAMX;EAACd,EAAA,KAAAP;EAAAO,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAe;CAAA,IAAAf,EAAA,OAAAO,MAAAP,EAAA,OAAAS,IAAA;EAPNM,KAAA,oBAAC,YAAD;GAAuB,WAAAR;GAClBE,UAAAA;EADM,CAAA;EAQET,EAAA,KAAAO;EAAAP,EAAA,KAAAS;EAAAT,EAAA,KAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,OARbe;AAQa;AAnBd,SAAAD,MAAAE,OAAAC,OAAA;CAAA,OAaS,qBAACI,YAAD,EAAA,UAAA,CAEKJ,QAAQ,IAAR,MAAA,MACD,oBAAA,QAAA;EAAiB,WAAA5B,qBAAM2B;EAASA,UAAAA;CAAa,CAAA,CAHxC,EAAA,GAAMC,KAAN;AAIE"}
|
package/dist/field/Fieldset.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
export interface FieldsetProps {
|
|
3
3
|
/** Title of the group of controls. */
|
|
4
4
|
legend?: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Controls at the end of the legend's line, such as the locales of a value. The group is then
|
|
7
|
+
* named by the legend through `aria-labelledby`, since a `<legend>` can't share its line.
|
|
8
|
+
*/
|
|
9
|
+
legendEnd?: ReactNode;
|
|
5
10
|
description?: ReactNode;
|
|
6
11
|
/** Errors of the group as a whole. */
|
|
7
12
|
errors?: readonly string[];
|
|
@@ -18,5 +23,5 @@ export interface FieldsetProps {
|
|
|
18
23
|
* (a group of fields, a list of blocks, a value per locale). The description and the errors
|
|
19
24
|
* describe the group for assistive technologies.
|
|
20
25
|
*/
|
|
21
|
-
export declare function Fieldset({ legend, description, errors, isRequired, isDisabled, children, className, legendClassName, descriptionClassName, errorsClassName, }: FieldsetProps): import("react").JSX.Element;
|
|
26
|
+
export declare function Fieldset({ legend, legendEnd, description, errors, isRequired, isDisabled, children, className, legendClassName, descriptionClassName, errorsClassName, }: FieldsetProps): import("react").JSX.Element;
|
|
22
27
|
//# sourceMappingURL=Fieldset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.d.ts","sourceRoot":"","sources":["../../src/field/Fieldset.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAKxD,MAAM,WAAW,aAAa;IAC1B,sCAAsC;IACtC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,sCAAsC;IACtC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EACrB,MAAM,EACN,WAAW,EACX,MAAW,EACX,UAAkB,EAClB,UAAkB,EAClB,QAAQ,EACR,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,eAAe,GAClB,EAAE,aAAa,+
|
|
1
|
+
{"version":3,"file":"Fieldset.d.ts","sourceRoot":"","sources":["../../src/field/Fieldset.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAKxD,MAAM,WAAW,aAAa;IAC1B,sCAAsC;IACtC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,sCAAsC;IACtC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EACrB,MAAM,EACN,SAAS,EACT,WAAW,EACX,MAAW,EACX,UAAkB,EAClB,UAAkB,EAClB,QAAQ,EACR,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,eAAe,GAClB,EAAE,aAAa,+BA0Df"}
|
package/dist/field/Fieldset.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { cx } from "../utils/cx.js";
|
|
2
2
|
import Field_module_default from "./Field.module.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { Fragment as Fragment$1, useId } from "react";
|
|
5
6
|
//#region src/field/Fieldset.tsx
|
|
6
7
|
/**
|
|
@@ -8,41 +9,139 @@ import { Fragment as Fragment$1, useId } from "react";
|
|
|
8
9
|
* (a group of fields, a list of blocks, a value per locale). The description and the errors
|
|
9
10
|
* describe the group for assistive technologies.
|
|
10
11
|
*/
|
|
11
|
-
function Fieldset(
|
|
12
|
+
function Fieldset(t0) {
|
|
13
|
+
const $ = c(37);
|
|
14
|
+
const { legend, legendEnd, description, errors: t1, isRequired: t2, isDisabled: t3, children, className, legendClassName, descriptionClassName, errorsClassName } = t0;
|
|
15
|
+
let t4;
|
|
16
|
+
if ($[0] !== t1) {
|
|
17
|
+
t4 = t1 === void 0 ? [] : t1;
|
|
18
|
+
$[0] = t1;
|
|
19
|
+
$[1] = t4;
|
|
20
|
+
} else t4 = $[1];
|
|
21
|
+
const errors = t4;
|
|
22
|
+
const isRequired = t2 === void 0 ? false : t2;
|
|
23
|
+
const isDisabled = t3 === void 0 ? false : t3;
|
|
12
24
|
const id = useId();
|
|
13
25
|
const descriptionId = description !== void 0 ? `${id}-description` : null;
|
|
14
26
|
const errorsId = errors.length > 0 ? `${id}-errors` : null;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
let t5;
|
|
28
|
+
if ($[2] !== descriptionId || $[3] !== errorsId) {
|
|
29
|
+
t5 = [descriptionId, errorsId].filter(Boolean);
|
|
30
|
+
$[2] = descriptionId;
|
|
31
|
+
$[3] = errorsId;
|
|
32
|
+
$[4] = t5;
|
|
33
|
+
} else t5 = $[4];
|
|
34
|
+
const describedBy = t5.join(" ");
|
|
35
|
+
const hasLegend = legend !== void 0 && legend !== null;
|
|
36
|
+
const hasLegendEnd = legendEnd !== void 0 && legendEnd !== null;
|
|
37
|
+
let t6;
|
|
38
|
+
if ($[5] !== isRequired) {
|
|
39
|
+
t6 = isRequired ? /* @__PURE__ */ jsx("span", {
|
|
40
|
+
className: Field_module_default.required,
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
children: "*"
|
|
43
|
+
}) : null;
|
|
44
|
+
$[5] = isRequired;
|
|
45
|
+
$[6] = t6;
|
|
46
|
+
} else t6 = $[6];
|
|
47
|
+
let t7;
|
|
48
|
+
if ($[7] !== legend || $[8] !== t6) {
|
|
49
|
+
t7 = /* @__PURE__ */ jsxs(Fragment, { children: [legend, t6] });
|
|
50
|
+
$[7] = legend;
|
|
51
|
+
$[8] = t6;
|
|
52
|
+
$[9] = t7;
|
|
53
|
+
} else t7 = $[9];
|
|
54
|
+
const legendContent = t7;
|
|
55
|
+
let t8;
|
|
56
|
+
if ($[10] !== className) {
|
|
57
|
+
t8 = cx("panneau-fieldset", Field_module_default.fieldset, className);
|
|
58
|
+
$[10] = className;
|
|
59
|
+
$[11] = t8;
|
|
60
|
+
} else t8 = $[11];
|
|
61
|
+
const t9 = hasLegend && hasLegendEnd ? `${id}-legend` : void 0;
|
|
62
|
+
const t10 = describedBy !== "" ? describedBy : void 0;
|
|
63
|
+
const t11 = errors.length > 0 ? true : void 0;
|
|
64
|
+
let t12;
|
|
65
|
+
if ($[12] !== hasLegend || $[13] !== hasLegendEnd || $[14] !== id || $[15] !== legendClassName || $[16] !== legendContent || $[17] !== legendEnd) {
|
|
66
|
+
t12 = hasLegendEnd ? /* @__PURE__ */ jsxs("div", {
|
|
67
|
+
className: Field_module_default.legendRow,
|
|
68
|
+
children: [hasLegend ? /* @__PURE__ */ jsx("span", {
|
|
69
|
+
id: `${id}-legend`,
|
|
70
|
+
className: cx(Field_module_default.label, legendClassName),
|
|
71
|
+
children: legendContent
|
|
72
|
+
}) : null, /* @__PURE__ */ jsx("div", {
|
|
73
|
+
className: Field_module_default.legendEnd,
|
|
74
|
+
children: legendEnd
|
|
75
|
+
})]
|
|
76
|
+
}) : hasLegend ? /* @__PURE__ */ jsx("legend", {
|
|
77
|
+
className: cx(Field_module_default.legend, Field_module_default.label, legendClassName),
|
|
78
|
+
children: legendContent
|
|
79
|
+
}) : null;
|
|
80
|
+
$[12] = hasLegend;
|
|
81
|
+
$[13] = hasLegendEnd;
|
|
82
|
+
$[14] = id;
|
|
83
|
+
$[15] = legendClassName;
|
|
84
|
+
$[16] = legendContent;
|
|
85
|
+
$[17] = legendEnd;
|
|
86
|
+
$[18] = t12;
|
|
87
|
+
} else t12 = $[18];
|
|
88
|
+
let t13;
|
|
89
|
+
if ($[19] !== description || $[20] !== descriptionClassName || $[21] !== descriptionId) {
|
|
90
|
+
t13 = descriptionId !== null ? /* @__PURE__ */ jsx("div", {
|
|
91
|
+
id: descriptionId,
|
|
92
|
+
className: cx(Field_module_default.description, descriptionClassName),
|
|
93
|
+
children: description
|
|
94
|
+
}) : null;
|
|
95
|
+
$[19] = description;
|
|
96
|
+
$[20] = descriptionClassName;
|
|
97
|
+
$[21] = descriptionId;
|
|
98
|
+
$[22] = t13;
|
|
99
|
+
} else t13 = $[22];
|
|
100
|
+
let t14;
|
|
101
|
+
if ($[23] !== errors || $[24] !== errorsClassName || $[25] !== errorsId) {
|
|
102
|
+
t14 = errorsId !== null ? /* @__PURE__ */ jsx("div", {
|
|
103
|
+
id: errorsId,
|
|
104
|
+
className: cx(Field_module_default.errors, errorsClassName),
|
|
105
|
+
children: errors.map(_temp)
|
|
106
|
+
}) : null;
|
|
107
|
+
$[23] = errors;
|
|
108
|
+
$[24] = errorsClassName;
|
|
109
|
+
$[25] = errorsId;
|
|
110
|
+
$[26] = t14;
|
|
111
|
+
} else t14 = $[26];
|
|
112
|
+
let t15;
|
|
113
|
+
if ($[27] !== children || $[28] !== isDisabled || $[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t13 || $[33] !== t14 || $[34] !== t8 || $[35] !== t9) {
|
|
114
|
+
t15 = /* @__PURE__ */ jsxs("fieldset", {
|
|
115
|
+
className: t8,
|
|
116
|
+
"aria-labelledby": t9,
|
|
117
|
+
"aria-describedby": t10,
|
|
118
|
+
"aria-invalid": t11,
|
|
119
|
+
disabled: isDisabled,
|
|
120
|
+
children: [
|
|
121
|
+
t12,
|
|
122
|
+
t13,
|
|
123
|
+
children,
|
|
124
|
+
t14
|
|
125
|
+
]
|
|
126
|
+
});
|
|
127
|
+
$[27] = children;
|
|
128
|
+
$[28] = isDisabled;
|
|
129
|
+
$[29] = t10;
|
|
130
|
+
$[30] = t11;
|
|
131
|
+
$[31] = t12;
|
|
132
|
+
$[32] = t13;
|
|
133
|
+
$[33] = t14;
|
|
134
|
+
$[34] = t8;
|
|
135
|
+
$[35] = t9;
|
|
136
|
+
$[36] = t15;
|
|
137
|
+
} else t15 = $[36];
|
|
138
|
+
return t15;
|
|
139
|
+
}
|
|
140
|
+
function _temp(error, index) {
|
|
141
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [index > 0 ? " " : null, /* @__PURE__ */ jsx("span", {
|
|
142
|
+
className: Field_module_default.error,
|
|
143
|
+
children: error
|
|
144
|
+
})] }, index);
|
|
46
145
|
}
|
|
47
146
|
//#endregion
|
|
48
147
|
export { Fieldset };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.js","names":["styles","Fragment"],"sources":["../../src/field/Fieldset.tsx"],"sourcesContent":["import { Fragment, type ReactNode, useId } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Field.module.css';\n\nexport interface FieldsetProps {\n /** Title of the group of controls. */\n legend?: ReactNode;\n description?: ReactNode;\n /** Errors of the group as a whole. */\n errors?: readonly string[];\n isRequired?: boolean;\n isDisabled?: boolean;\n children?: ReactNode;\n className?: string;\n legendClassName?: string;\n descriptionClassName?: string;\n errorsClassName?: string;\n}\n\n/**\n * Groups related controls under a legend, with a description and errors: for composite values\n * (a group of fields, a list of blocks, a value per locale). The description and the errors\n * describe the group for assistive technologies.\n */\nexport function Fieldset({\n legend,\n description,\n errors = [],\n isRequired = false,\n isDisabled = false,\n children,\n className,\n legendClassName,\n descriptionClassName,\n errorsClassName,\n}: FieldsetProps) {\n const id = useId();\n const descriptionId = description !== undefined ? `${id}-description` : null;\n const errorsId = errors.length > 0 ? `${id}-errors` : null;\n const describedBy = [descriptionId, errorsId].filter(Boolean).join(' ');\n return (\n <fieldset\n className={cx('panneau-fieldset', styles.fieldset, className)}\n aria-describedby={describedBy !== '' ? describedBy : undefined}\n aria-invalid={errors.length > 0 ? true : undefined}\n disabled={isDisabled}\n >\n {
|
|
1
|
+
{"version":3,"file":"Fieldset.js","names":["Fragment","ReactNode","useId","cx","styles","FieldsetProps","legend","legendEnd","description","errors","isRequired","isDisabled","children","className","legendClassName","descriptionClassName","errorsClassName","Fieldset","t0","$","_c","t1","t2","t3","t4","undefined","id","descriptionId","errorsId","length","t5","filter","Boolean","describedBy","join","hasLegend","hasLegendEnd","t6","required","t7","legendContent","t8","fieldset","t9","t10","t11","t12","legendRow","label","t13","t14","map","_temp","t15","error","index","_c","styles","_Fragment","Fragment"],"sources":["../../src/field/Fieldset.tsx"],"sourcesContent":["import { Fragment, type ReactNode, useId } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Field.module.css';\n\nexport interface FieldsetProps {\n /** Title of the group of controls. */\n legend?: ReactNode;\n /**\n * Controls at the end of the legend's line, such as the locales of a value. The group is then\n * named by the legend through `aria-labelledby`, since a `<legend>` can't share its line.\n */\n legendEnd?: ReactNode;\n description?: ReactNode;\n /** Errors of the group as a whole. */\n errors?: readonly string[];\n isRequired?: boolean;\n isDisabled?: boolean;\n children?: ReactNode;\n className?: string;\n legendClassName?: string;\n descriptionClassName?: string;\n errorsClassName?: string;\n}\n\n/**\n * Groups related controls under a legend, with a description and errors: for composite values\n * (a group of fields, a list of blocks, a value per locale). The description and the errors\n * describe the group for assistive technologies.\n */\nexport function Fieldset({\n legend,\n legendEnd,\n description,\n errors = [],\n isRequired = false,\n isDisabled = false,\n children,\n className,\n legendClassName,\n descriptionClassName,\n errorsClassName,\n}: FieldsetProps) {\n const id = useId();\n const descriptionId = description !== undefined ? `${id}-description` : null;\n const errorsId = errors.length > 0 ? `${id}-errors` : null;\n const describedBy = [descriptionId, errorsId].filter(Boolean).join(' ');\n const hasLegend = legend !== undefined && legend !== null;\n const hasLegendEnd = legendEnd !== undefined && legendEnd !== null;\n const legendContent = (\n <>\n {legend}\n {isRequired ? (\n <span className={styles.required} aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </>\n );\n return (\n <fieldset\n className={cx('panneau-fieldset', styles.fieldset, className)}\n aria-labelledby={hasLegend && hasLegendEnd ? `${id}-legend` : undefined}\n aria-describedby={describedBy !== '' ? describedBy : undefined}\n aria-invalid={errors.length > 0 ? true : undefined}\n disabled={isDisabled}\n >\n {hasLegendEnd ? (\n <div className={styles.legendRow}>\n {hasLegend ? (\n <span id={`${id}-legend`} className={cx(styles.label, legendClassName)}>\n {legendContent}\n </span>\n ) : null}\n <div className={styles.legendEnd}>{legendEnd}</div>\n </div>\n ) : hasLegend ? (\n <legend className={cx(styles.legend, styles.label, legendClassName)}>\n {legendContent}\n </legend>\n ) : null}\n {descriptionId !== null ? (\n <div id={descriptionId} className={cx(styles.description, descriptionClassName)}>\n {description}\n </div>\n ) : null}\n {children}\n {errorsId !== null ? (\n <div id={errorsId} className={cx(styles.errors, errorsClassName)}>\n {errors.map((error, index) => (\n <Fragment key={index}>\n {/* A space between messages, for assistive technologies. */}\n {index > 0 ? ' ' : null}\n <span className={styles.error}>{error}</span>\n </Fragment>\n ))}\n </div>\n ) : null}\n </fieldset>\n );\n}\n"],"mappings":";;;;;;;;;;;AA8BA,SAAOiB,SAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAkB,MAAA,EAAAd,QAAAC,WAAA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A+B;EAAA/B,EAAA,MAAAsB;EAAAtB,EAAA,MAAAwB;EAAAxB,EAAA,MAAAkC;CAAA,OAAAA,MAAAlC,EAAA;CAAA,OAtCXkC;AAsCW;AApEZ,SAAAD,MAAAE,OAAAC,OAAA;CAAA,OA4DiB,qBAACI,YAAD,EAAA,UAAA,CAEKJ,QAAQ,IAAR,MAAA,MACD,oBAAA,QAAA;EAAiB,WAAAnD,qBAAMkD;EAASA,UAAAA;CAAa,CAAA,CAHxC,EAAA,GAAMC,KAAN;AAIE"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Tokens of the input box of text inputs, text areas, selects, combo boxes, number inputs, date pickers and time inputs. */
|
|
2
|
-
export declare const inputTokens: import("
|
|
2
|
+
export declare const inputTokens: import("../index.js").ComponentTokens<"input", "panneau-input-radius" | "panneau-input-padding-x" | "panneau-input-border-width" | "panneau-input-bg" | "panneau-input-border-color" | "panneau-input-border-color-hover" | "panneau-input-border-color-focus" | "panneau-input-focus-ring" | "panneau-input-focus-ring-invalid">;
|
|
3
3
|
//# sourceMappingURL=inputTokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputTokens.d.ts","sourceRoot":"","sources":["../../src/field/inputTokens.ts"],"names":[],"mappings":"AAEA,6HAA6H;AAC7H,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"inputTokens.d.ts","sourceRoot":"","sources":["../../src/field/inputTokens.ts"],"names":[],"mappings":"AAEA,6HAA6H;AAC7H,eAAO,MAAM,WAAW,0TAmBtB,CAAC"}
|
|
@@ -13,7 +13,13 @@ var inputTokens = defineComponentTokens("input", {
|
|
|
13
13
|
/** Corner radius. */
|
|
14
14
|
radius: "var(--panneau-radius-md)",
|
|
15
15
|
/** Border color of a hovered input. */
|
|
16
|
-
"border-color-hover": "var(--panneau-color-text-muted)"
|
|
16
|
+
"border-color-hover": "var(--panneau-color-text-muted)",
|
|
17
|
+
/** Border color of a focused input. */
|
|
18
|
+
"border-color-focus": "var(--panneau-color-focus)",
|
|
19
|
+
/** Ring around a focused input, as a `box-shadow`: thicker, softer, or `none`. */
|
|
20
|
+
"focus-ring": "0 0 0 1px var(--panneau-color-focus)",
|
|
21
|
+
/** Ring around a focused input that has errors, as a `box-shadow`. */
|
|
22
|
+
"focus-ring-invalid": "0 0 0 1px var(--panneau-color-danger)"
|
|
17
23
|
});
|
|
18
24
|
//#endregion
|
|
19
25
|
export { inputTokens };
|