@panneau/ui 5.0.0-alpha.4 → 5.0.0-alpha.41
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 +50 -4
- package/dist/date-picker/DatePicker.d.ts +3 -2
- package/dist/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/date-picker/DatePicker.js +279 -72
- package/dist/date-picker/DatePicker.js.map +1 -1
- package/dist/date-picker/DatePicker.module.js +5 -1
- package/dist/date-picker/DatePicker.module.js.map +1 -1
- package/dist/date-picker/calendarTokens.d.ts +1 -1
- package/dist/date-picker/calendarTokens.js +2 -2
- package/dist/date-picker/calendarTokens.js.map +1 -1
- package/dist/date-range-picker/DateRangePicker.css +37 -0
- package/dist/date-range-picker/DateRangePicker.d.ts +41 -0
- package/dist/date-range-picker/DateRangePicker.d.ts.map +1 -0
- package/dist/date-range-picker/DateRangePicker.js +438 -0
- package/dist/date-range-picker/DateRangePicker.js.map +1 -0
- package/dist/date-range-picker/DateRangePicker.module.js +20 -0
- package/dist/date-range-picker/DateRangePicker.module.js.map +1 -0
- package/dist/dialog/Dialog.css +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 +99 -9
- package/dist/radio-group/RadioGroup.d.ts +24 -5
- package/dist/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/radio-group/RadioGroup.js +214 -43
- package/dist/radio-group/RadioGroup.js.map +1 -1
- package/dist/radio-group/RadioGroup.module.js +12 -2
- package/dist/radio-group/RadioGroup.module.js.map +1 -1
- package/dist/radio-group/tokens.d.ts +2 -2
- package/dist/radio-group/tokens.d.ts.map +1 -1
- package/dist/radio-group/tokens.js +23 -3
- package/dist/radio-group/tokens.js.map +1 -1
- package/dist/root/PanneauRoot.css +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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive.js","names":[],"sources":["../../src/layout/responsive.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\n\n/**\n * Breakpoints of the layout primitives, like Bootstrap's `$grid-breakpoints`: the minimum width of\n * the nearest container at which a responsive value applies. They are constants, since CSS\n * variables can't be used in queries; the stylesheets of the primitives use the same values.\n */\nexport const BREAKPOINTS = Object.freeze({\n sm: '40rem',\n md: '48rem',\n lg: '64rem',\n xl: '80rem',\n});\n\n/** A breakpoint: `sm`, `md`, `lg` or `xl`. */\nexport type Breakpoint = keyof typeof BREAKPOINTS;\n\n/**\n * A value, or values by breakpoint: `{ base: 1, md: 2, lg: 3 }`. Each value applies from its\n * breakpoint up, until a larger one sets another. Breakpoints are widths of the nearest container\n * (`PanneauRoot`, `Container`, a form, a list), not of the viewport, so that a grid in a narrow\n * sidebar behaves as on a phone.\n */\nexport type Responsive<T> = T | Partial<Record<'base' | Breakpoint, T>>;\n\n/** A step of the space scale of the theme (`--panneau-space-<step>`), or 0. */\nexport type Space = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10;\n\n/** The CSS value of a step of the space scale. */\nexport function space(step: Space): string {\n return step === 0 ? '0' : `var(--panneau-space-${step})`;\n}\n\nconst KEYS = ['base', ...(Object.keys(BREAKPOINTS) as Breakpoint[])] as const;\n\nfunction isByBreakpoint<T>(value: Responsive<T>): value is Partial<Record<'base' | Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * The inline variables of a responsive prop, `--_panneau-<component>-<prop>-<breakpoint>`, which\n * the static rules of the component read in each container query. Unset breakpoints fall back to\n * smaller ones in CSS.\n */\nexport function responsiveVariables<T>(\n component: string,\n prop: string,\n value: Responsive<T> | undefined,\n toCss: (value: T) => string,\n): Record<string, string> {\n if (value === undefined) {\n return {};\n }\n const values: Partial<Record<'base' | Breakpoint, T>> = isByBreakpoint(value)\n ? value\n : { base: value };\n return Object.fromEntries(\n KEYS.flatMap((key) => {\n const item = values[key];\n return item !== undefined\n ? [[`--_panneau-${component}-${prop}-${key}`, toCss(item)]]\n : [];\n }),\n );\n}\n\n/** Merges inline variables with the `style` prop, which wins. */\nexport function withVariables(\n variables: Record<string, string>[],\n style: CSSProperties | undefined,\n): CSSProperties | undefined {\n const merged = Object.assign({}, ...variables) as Record<string, string>;\n return Object.keys(merged).length > 0 ? { ...merged, ...style } : style;\n}\n\n/** How the primitives distribute items along their axis: `between` is `space-between`. */\nexport type Justification = 'start' | 'center' | 'end' | 'between';\n\n/** The CSS value of a justification. */\nexport function justification(value: Justification): string {\n return value === 'between' ? 'space-between' : value;\n}\n"],"mappings":";;;;;;AAOA,
|
|
1
|
+
{"version":3,"file":"responsive.js","names":["CSSProperties","BREAKPOINTS","Object","freeze","sm","md","lg","xl","Breakpoint","Responsive","T","Partial","Record","Space","space","step","KEYS","keys","const","isByBreakpoint","value","responsiveVariables","component","prop","toCss","undefined","values","base","fromEntries","flatMap","key","item","withVariables","variables","style","merged","assign","length","Justification","justification"],"sources":["../../src/layout/responsive.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\n\n/**\n * Breakpoints of the layout primitives, like Bootstrap's `$grid-breakpoints`: the minimum width of\n * the nearest container at which a responsive value applies. They are constants, since CSS\n * variables can't be used in queries; the stylesheets of the primitives use the same values.\n */\nexport const BREAKPOINTS = Object.freeze({\n sm: '40rem',\n md: '48rem',\n lg: '64rem',\n xl: '80rem',\n});\n\n/** A breakpoint: `sm`, `md`, `lg` or `xl`. */\nexport type Breakpoint = keyof typeof BREAKPOINTS;\n\n/**\n * A value, or values by breakpoint: `{ base: 1, md: 2, lg: 3 }`. Each value applies from its\n * breakpoint up, until a larger one sets another. Breakpoints are widths of the nearest container\n * (`PanneauRoot`, `Container`, a form, a list), not of the viewport, so that a grid in a narrow\n * sidebar behaves as on a phone.\n */\nexport type Responsive<T> = T | Partial<Record<'base' | Breakpoint, T>>;\n\n/** A step of the space scale of the theme (`--panneau-space-<step>`), or 0. */\nexport type Space = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10;\n\n/** The CSS value of a step of the space scale. */\nexport function space(step: Space): string {\n return step === 0 ? '0' : `var(--panneau-space-${step})`;\n}\n\nconst KEYS = ['base', ...(Object.keys(BREAKPOINTS) as Breakpoint[])] as const;\n\nfunction isByBreakpoint<T>(value: Responsive<T>): value is Partial<Record<'base' | Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * The inline variables of a responsive prop, `--_panneau-<component>-<prop>-<breakpoint>`, which\n * the static rules of the component read in each container query. Unset breakpoints fall back to\n * smaller ones in CSS.\n */\nexport function responsiveVariables<T>(\n component: string,\n prop: string,\n value: Responsive<T> | undefined,\n toCss: (value: T) => string,\n): Record<string, string> {\n if (value === undefined) {\n return {};\n }\n const values: Partial<Record<'base' | Breakpoint, T>> = isByBreakpoint(value)\n ? value\n : { base: value };\n return Object.fromEntries(\n KEYS.flatMap((key) => {\n const item = values[key];\n return item !== undefined\n ? [[`--_panneau-${component}-${prop}-${key}`, toCss(item)]]\n : [];\n }),\n );\n}\n\n/** Merges inline variables with the `style` prop, which wins. */\nexport function withVariables(\n variables: Record<string, string>[],\n style: CSSProperties | undefined,\n): CSSProperties | undefined {\n const merged = Object.assign({}, ...variables) as Record<string, string>;\n return Object.keys(merged).length > 0 ? { ...merged, ...style } : style;\n}\n\n/** How the primitives distribute items along their axis: `between` is `space-between`. */\nexport type Justification = 'start' | 'center' | 'end' | 'between';\n\n/** The CSS value of a justification. */\nexport function justification(value: Justification): string {\n return value === 'between' ? 'space-between' : value;\n}\n"],"mappings":";;;;;;AAOA,IAAaC,cAAcC,OAAOC,OAAO;CACrCC,IAAI;CACJC,IAAI;CACJC,IAAI;CACJC,IAAI;AACR,CAAC;;AAiBD,SAAgBO,MAAMC,MAAqB;CACvC,OAAOA,SAAS,IAAI,MAAM,uBAAuBA,KAAI;AACzD;AAEA,IAAMC,OAAO,CAAC,QAAQ,GAAId,OAAOe,KAAKhB,WAAW,CAAkB;AAEnE,SAASkB,eAAkBC,OAAwE;CAC/F,OAAO,OAAOA,UAAU,YAAYA,UAAU;AAClD;;;;;;AAOA,SAAgBC,oBACZC,WACAC,MACAH,OACAI,OACsB;CACtB,IAAIJ,UAAUK,KAAAA,GACV,OAAO,CAAC;CAEZ,MAAMC,SAAkDP,eAAeC,KAAK,IACtEA,QACA,EAAEO,MAAMP,MAAM;CACpB,OAAOlB,OAAO0B,YACVZ,KAAKa,SAASC,QAAQ;EAClB,MAAMC,OAAOL,OAAOI;EACpB,OAAOC,SAASN,KAAAA,IACV,CAAC,CAAC,cAAcH,UAAS,GAAIC,KAAI,GAAIO,OAAON,MAAMO,IAAI,CAAC,CAAC,IACxD,CAAA;CACV,CAAC,CACL;AACJ;;AAGA,SAAgBC,cACZC,WACAC,OACyB;CACzB,MAAMC,SAASjC,OAAOkC,OAAO,CAAC,GAAG,GAAGH,SAAS;CAC7C,OAAO/B,OAAOe,KAAKkB,MAAM,CAAC,CAACE,SAAS,IAAI;EAAE,GAAGF;EAAQ,GAAGD;CAAM,IAAIA;AACtE;;AAMA,SAAgBK,cAAcnB,OAA8B;CACxD,OAAOA,UAAU,YAAY,kBAAkBA;AACnD"}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
.panneau-line-chart-chart {
|
|
2
|
+
--_panneau-line-chart-plot-height: var(
|
|
3
|
+
--_panneau-line-chart-height,
|
|
4
|
+
var(--panneau-line-chart-height, 8rem)
|
|
5
|
+
);
|
|
6
|
+
--_panneau-line-chart-reveal: var(
|
|
7
|
+
--panneau-line-chart-reveal-duration,
|
|
8
|
+
calc(var(--panneau-duration-slow) * 3)
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: var(--panneau-space-1);
|
|
14
|
+
min-width: 0;
|
|
15
|
+
margin: 0;
|
|
16
|
+
container: panneau-line-chart / inline-size;
|
|
17
|
+
font-size: var(--panneau-line-chart-label-font-size, var(--panneau-font-size-xs));
|
|
18
|
+
line-height: 1.5;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.panneau-line-chart-skeleton {
|
|
22
|
+
height: var(--_panneau-line-chart-plot-height);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.panneau-line-chart-axis-label {
|
|
26
|
+
color: var(--panneau-color-text-muted);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* The scale on the left of the plot, the dates under it */
|
|
30
|
+
.panneau-line-chart-body {
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: minmax(0, 1fr);
|
|
33
|
+
column-gap: var(--panneau-space-2);
|
|
34
|
+
row-gap: var(--panneau-space-1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.panneau-line-chart-chart[data-axis] .panneau-line-chart-body {
|
|
38
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
39
|
+
/* Room for the top graduation, centered on its line */
|
|
40
|
+
padding-block-start: 0.75em;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Room for a value written above the highest point */
|
|
44
|
+
.panneau-line-chart-chart[data-labels] .panneau-line-chart-body {
|
|
45
|
+
padding-block-start: 2em;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.panneau-line-chart-scale {
|
|
49
|
+
position: relative;
|
|
50
|
+
height: var(--_panneau-line-chart-plot-height);
|
|
51
|
+
color: var(--panneau-color-text-muted);
|
|
52
|
+
font-variant-numeric: tabular-nums;
|
|
53
|
+
text-align: end;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.panneau-line-chart-widest {
|
|
57
|
+
display: block;
|
|
58
|
+
height: 0;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
visibility: hidden;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.panneau-line-chart-tick {
|
|
64
|
+
position: absolute;
|
|
65
|
+
inset-inline-end: 0;
|
|
66
|
+
transform: translateY(-50%);
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.panneau-line-chart-plot {
|
|
71
|
+
position: relative;
|
|
72
|
+
height: var(--_panneau-line-chart-plot-height);
|
|
73
|
+
border-radius: var(--panneau-radius-sm);
|
|
74
|
+
touch-action: pan-y;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.panneau-line-chart-plot[role='slider'] {
|
|
78
|
+
cursor: crosshair;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.panneau-line-chart-plot[role='slider']:focus-visible {
|
|
82
|
+
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
83
|
+
outline-offset: 4px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.panneau-line-chart-svg {
|
|
87
|
+
display: block;
|
|
88
|
+
width: 100%;
|
|
89
|
+
height: 100%;
|
|
90
|
+
overflow: visible;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.panneau-line-chart-grid,
|
|
94
|
+
.panneau-line-chart-baseline {
|
|
95
|
+
stroke-width: 1px;
|
|
96
|
+
vector-effect: non-scaling-stroke;
|
|
97
|
+
shape-rendering: crispEdges;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.panneau-line-chart-grid {
|
|
101
|
+
stroke: var(--panneau-line-chart-grid-color, var(--panneau-color-border));
|
|
102
|
+
stroke-opacity: 0.6;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.panneau-line-chart-baseline {
|
|
106
|
+
stroke: var(--panneau-color-border);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.panneau-line-chart-area-top {
|
|
110
|
+
stop-color: var(--_panneau-line-chart-color);
|
|
111
|
+
stop-opacity: var(--panneau-line-chart-area-opacity, 0.2);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.panneau-line-chart-area-bottom {
|
|
115
|
+
stop-color: var(--_panneau-line-chart-color);
|
|
116
|
+
stop-opacity: 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.panneau-line-chart-area {
|
|
120
|
+
stroke: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* A line of several in the color of a tone */
|
|
124
|
+
.panneau-line-chart-toned {
|
|
125
|
+
--_panneau-line-chart-color: var(--panneau-tone-solid);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* A stacked line: the area between it and the one under it */
|
|
129
|
+
.panneau-line-chart-stack-area {
|
|
130
|
+
fill: var(--_panneau-line-chart-color);
|
|
131
|
+
fill-opacity: calc(var(--panneau-line-chart-area-opacity, 0.2) * 1.75);
|
|
132
|
+
stroke: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.panneau-line-chart-line {
|
|
136
|
+
fill: none;
|
|
137
|
+
stroke: var(--_panneau-line-chart-color);
|
|
138
|
+
stroke-width: var(--panneau-line-chart-line-width, 2px);
|
|
139
|
+
stroke-linejoin: round;
|
|
140
|
+
stroke-linecap: round;
|
|
141
|
+
vector-effect: non-scaling-stroke;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* The line draws itself from the left when the chart appears, then its labels fade in */
|
|
145
|
+
.panneau-line-chart-reveal {
|
|
146
|
+
animation: panneau-line-chart-reveal var(--_panneau-line-chart-reveal) var(--panneau-ease-out) both;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.panneau-line-chart-marks {
|
|
150
|
+
animation: panneau-line-chart-fade-in var(--panneau-duration-slow) var(--panneau-ease-out)
|
|
151
|
+
var(--_panneau-line-chart-reveal) both;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@keyframes panneau-line-chart-reveal {
|
|
155
|
+
from {
|
|
156
|
+
clip-path: inset(-10% 100% -10% -10%);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
to {
|
|
160
|
+
clip-path: inset(-10% -10% -10% -10%);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@keyframes panneau-line-chart-fade-in {
|
|
165
|
+
from {
|
|
166
|
+
opacity: 0;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@media (prefers-reduced-motion: reduce) {
|
|
171
|
+
.panneau-line-chart-reveal,
|
|
172
|
+
.panneau-line-chart-marks {
|
|
173
|
+
animation: none;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* A dot, round whatever the width of the chart, with a ring of the surface around it */
|
|
178
|
+
.panneau-line-chart-dot {
|
|
179
|
+
position: absolute;
|
|
180
|
+
width: var(--panneau-line-chart-dot-size, 8px);
|
|
181
|
+
height: var(--panneau-line-chart-dot-size, 8px);
|
|
182
|
+
border-radius: 50%;
|
|
183
|
+
background-color: var(--_panneau-line-chart-color);
|
|
184
|
+
box-shadow: 0 0 0 2px var(--panneau-card-bg, var(--panneau-color-surface));
|
|
185
|
+
transform: translate(-50%, -50%);
|
|
186
|
+
pointer-events: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.panneau-line-chart-active-dot {
|
|
190
|
+
width: calc(var(--panneau-line-chart-dot-size, 8px) + 2px);
|
|
191
|
+
height: calc(var(--panneau-line-chart-dot-size, 8px) + 2px);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.panneau-line-chart-crosshair {
|
|
195
|
+
position: absolute;
|
|
196
|
+
inset-block: 0;
|
|
197
|
+
width: 1px;
|
|
198
|
+
background-color: var(--panneau-color-border-control);
|
|
199
|
+
transform: translateX(-50%);
|
|
200
|
+
pointer-events: none;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* A value on the line: above or under its point, kept inside the width of the plot */
|
|
204
|
+
.panneau-line-chart-value-label,
|
|
205
|
+
.panneau-line-chart-tooltip {
|
|
206
|
+
position: absolute;
|
|
207
|
+
white-space: nowrap;
|
|
208
|
+
pointer-events: none;
|
|
209
|
+
--_panneau-line-chart-shift-x: calc(var(--_x) * -1%);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.panneau-line-chart-value-label {
|
|
213
|
+
padding-inline: 2px;
|
|
214
|
+
font-weight: var(--panneau-font-weight-medium);
|
|
215
|
+
font-variant-numeric: tabular-nums;
|
|
216
|
+
color: var(--panneau-color-text);
|
|
217
|
+
background-color: var(--panneau-card-bg, var(--panneau-color-surface));
|
|
218
|
+
border-radius: var(--panneau-radius-sm);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.panneau-line-chart-value-label[data-placement='above'],
|
|
222
|
+
.panneau-line-chart-tooltip[data-placement='above'] {
|
|
223
|
+
transform: translate(var(--_panneau-line-chart-shift-x), calc(-100% - 0.5rem));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.panneau-line-chart-value-label[data-placement='below'],
|
|
227
|
+
.panneau-line-chart-tooltip[data-placement='below'] {
|
|
228
|
+
transform: translate(var(--_panneau-line-chart-shift-x), 0.5rem);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.panneau-line-chart-tooltip {
|
|
232
|
+
display: flex;
|
|
233
|
+
flex-direction: column;
|
|
234
|
+
padding: var(--panneau-space-1) var(--panneau-space-2);
|
|
235
|
+
color: var(--panneau-color-text);
|
|
236
|
+
background-color: var(--panneau-color-surface);
|
|
237
|
+
border: 1px solid var(--panneau-color-border);
|
|
238
|
+
border-radius: var(--panneau-radius-sm);
|
|
239
|
+
box-shadow: var(--panneau-shadow-sm, none);
|
|
240
|
+
z-index: 1;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.panneau-line-chart-tooltip-value {
|
|
244
|
+
font-size: var(--panneau-font-size-sm);
|
|
245
|
+
font-weight: var(--panneau-font-weight-bold);
|
|
246
|
+
font-variant-numeric: tabular-nums;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.panneau-line-chart-tooltip-label {
|
|
250
|
+
color: var(--panneau-color-text-muted);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.panneau-line-chart-tooltip-row {
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
gap: var(--panneau-space-1);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.panneau-line-chart-tooltip-row .panneau-line-chart-tooltip-value {
|
|
260
|
+
margin-inline-start: auto;
|
|
261
|
+
padding-inline-start: var(--panneau-space-2);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.panneau-line-chart-swatch {
|
|
265
|
+
flex-shrink: 0;
|
|
266
|
+
width: 0.625rem;
|
|
267
|
+
height: 0.625rem;
|
|
268
|
+
border-radius: 2px;
|
|
269
|
+
background-color: var(--_panneau-line-chart-color);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.panneau-line-chart-dates {
|
|
273
|
+
position: relative;
|
|
274
|
+
grid-column: -2 / -1;
|
|
275
|
+
height: 1.5em;
|
|
276
|
+
color: var(--panneau-color-text-muted);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* Centered under its point, the first and last kept inside the width of the plot */
|
|
280
|
+
.panneau-line-chart-date {
|
|
281
|
+
position: absolute;
|
|
282
|
+
white-space: nowrap;
|
|
283
|
+
transform: translateX(-50%);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.panneau-line-chart-date[data-edge='start'] {
|
|
287
|
+
transform: none;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.panneau-line-chart-date[data-edge='end'] {
|
|
291
|
+
transform: translateX(-100%);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.panneau-line-chart-minor {
|
|
295
|
+
display: none;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@container panneau-line-chart (min-width: 28rem) {
|
|
299
|
+
.panneau-line-chart-minor {
|
|
300
|
+
display: inline;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.panneau-line-chart-visually-hidden {
|
|
305
|
+
position: absolute;
|
|
306
|
+
width: 1px;
|
|
307
|
+
height: 1px;
|
|
308
|
+
padding: 0;
|
|
309
|
+
margin: -1px;
|
|
310
|
+
overflow: hidden;
|
|
311
|
+
clip-path: inset(50%);
|
|
312
|
+
white-space: nowrap;
|
|
313
|
+
border: 0;
|
|
314
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { Tone } from '../theme/tones.js';
|
|
2
|
+
/** A point of a `LineChart`. */
|
|
3
|
+
export interface LineChartPoint {
|
|
4
|
+
/** What the point is, in its table and its tooltip: a day, a week, a month. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** A shorter label, under the chart: `Oct 5`. The `label` by default. */
|
|
7
|
+
shortLabel?: string | undefined;
|
|
8
|
+
value: number;
|
|
9
|
+
}
|
|
10
|
+
/** A line of a `LineChart` with several. */
|
|
11
|
+
export interface LineChartSeries {
|
|
12
|
+
/** What the line is: a column of the table of the chart, and a line of its tooltip. */
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* Its points, one per date, in the order of those of the first line, whose labels are the
|
|
16
|
+
* dates of the chart. A point missing is 0.
|
|
17
|
+
*/
|
|
18
|
+
points: LineChartPoint[];
|
|
19
|
+
/** Its categorical color, from 0. Defaults to its place among the lines. */
|
|
20
|
+
color?: number | undefined;
|
|
21
|
+
/** The solid color of a tone instead. */
|
|
22
|
+
tone?: Tone | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface LineChartProps {
|
|
25
|
+
/** What the chart shows: the caption of its table, for assistive technologies. */
|
|
26
|
+
label: string;
|
|
27
|
+
/** The points, in order. Left `undefined` while they load: a skeleton of the plot. */
|
|
28
|
+
points?: LineChartPoint[] | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Several lines over the same dates, instead of `points`: each on its categorical color or its
|
|
31
|
+
* tone, without values written on them (a legend beside the chart gives their names and
|
|
32
|
+
* totals). The table of the chart has a column per line.
|
|
33
|
+
*/
|
|
34
|
+
series?: LineChartSeries[] | undefined;
|
|
35
|
+
/** Stacks the lines of `series`, as areas: the top one is their total. */
|
|
36
|
+
stacked?: boolean | undefined;
|
|
37
|
+
/** Formats a value: in the table, the labels on the line and the tooltip. A number of the locale by default. */
|
|
38
|
+
formatValue?: ((value: number) => string) | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Formats a graduation of the scale, short: `1 min`, `25 %`. A number of the locale by default,
|
|
41
|
+
* compact (`10K`) on a scale that reaches 10,000.
|
|
42
|
+
*/
|
|
43
|
+
formatTick?: ((value: number) => string) | undefined;
|
|
44
|
+
/** What the values are, above the scale: `Entries`, `Minutes`. */
|
|
45
|
+
axisLabel?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Shows the scale: round graduations, with a line across the plot for each. Without it, a line
|
|
48
|
+
* at 0 alone, for a chart that only shows a trend. `true` by default.
|
|
49
|
+
*/
|
|
50
|
+
showAxis?: boolean | undefined;
|
|
51
|
+
/** Writes the last value at the end of the line. `true` by default. */
|
|
52
|
+
showLast?: boolean | undefined;
|
|
53
|
+
/** Marks the highest value on the line, with its value. */
|
|
54
|
+
showMax?: boolean | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Shows the value of the point under the pointer, or chosen with the arrow keys: for a long
|
|
57
|
+
* series, where a point can't be read from the scale. Off by default: the values a chart needs
|
|
58
|
+
* are on it, and every one is in its table.
|
|
59
|
+
*/
|
|
60
|
+
isInteractive?: boolean | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Fixes the bounds of the scale: `{ min: 0, max: 1 }` for a ratio. From 0, or the lowest value
|
|
63
|
+
* under it, to a round value above the highest by default.
|
|
64
|
+
*/
|
|
65
|
+
domain?: {
|
|
66
|
+
min?: number | undefined;
|
|
67
|
+
max?: number | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
/** `monotone` (default) curves through the points without going past them, `linear` joins them straight. */
|
|
70
|
+
curve?: 'monotone' | 'linear' | undefined;
|
|
71
|
+
/** Height of the plot, without the labels: `'10rem'`. Defaults to the `height` token. */
|
|
72
|
+
height?: string | undefined;
|
|
73
|
+
/** The categorical color of the line, from 0. Defaults to the first. */
|
|
74
|
+
color?: number | undefined;
|
|
75
|
+
className?: string | undefined;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A line of values over time, on the categorical chart colors of the theme: a curve and the area
|
|
79
|
+
* under it, a scale of round graduations, labels of dates under it, and the last value at the end
|
|
80
|
+
* of the line. The plot is hidden from assistive technologies, which read the values in a table;
|
|
81
|
+
* with `isInteractive`, the pointer and the arrow keys also show the value of each point.
|
|
82
|
+
*/
|
|
83
|
+
export declare function LineChart({ label, points: ownPoints, series, stacked, formatValue, formatTick, axisLabel, showAxis, showLast, showMax, isInteractive, domain, curve, height, color, className, }: LineChartProps): import("react").JSX.Element;
|
|
84
|
+
//# sourceMappingURL=LineChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../src/line-chart/LineChart.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAK3C,gCAAgC;AAChC,MAAM,WAAW,cAAc;IAC3B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,4CAA4C;AAC5C,MAAM,WAAW,eAAe;IAC5B,uFAAuF;IACvF,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,yCAAyC;IACzC,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC3B,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,MAAM,CAAC,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;IACtC;;;;OAIG;IACH,MAAM,CAAC,EAAE,eAAe,EAAE,GAAG,SAAS,CAAC;IACvC,0EAA0E;IAC1E,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,gHAAgH;IAChH,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IACtD;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IACrD,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,SAAS,CAAC;IAC5E,4GAA4G;IAC5G,KAAK,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC1C,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAQD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,MAAM,EAAE,SAAS,EACjB,MAAM,EACN,OAAe,EACf,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAe,EACf,QAAe,EACf,OAAe,EACf,aAAqB,EACrB,MAAM,EACN,KAAkB,EAClB,MAAM,EACN,KAAS,EACT,SAAS,GACZ,EAAE,cAAc,+BAgZhB"}
|