@panneau/ui 5.0.0-alpha.1 → 5.0.0-alpha.11
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 +370 -14
- package/bin/check-theme.js +5 -0
- package/dist/alert/Alert.css +28 -42
- package/dist/alert/Alert.d.ts +19 -5
- package/dist/alert/Alert.d.ts.map +1 -1
- package/dist/alert/Alert.js +110 -41
- package/dist/alert/Alert.js.map +1 -1
- package/dist/alert/Alert.module.js +14 -16
- package/dist/alert/Alert.module.js.map +1 -1
- package/dist/alert/tokens.d.ts +3 -0
- package/dist/alert/tokens.d.ts.map +1 -0
- package/dist/alert/tokens.js +21 -0
- package/dist/alert/tokens.js.map +1 -0
- package/dist/badge/Badge.css +24 -36
- package/dist/badge/Badge.d.ts +18 -3
- package/dist/badge/Badge.d.ts.map +1 -1
- package/dist/badge/Badge.js +35 -6
- package/dist/badge/Badge.js.map +1 -1
- package/dist/badge/Badge.module.js +9 -13
- package/dist/badge/Badge.module.js.map +1 -1
- package/dist/badge/tokens.d.ts +3 -0
- package/dist/badge/tokens.d.ts.map +1 -0
- package/dist/badge/tokens.js +23 -0
- package/dist/badge/tokens.js.map +1 -0
- package/dist/button/Button.css +58 -42
- package/dist/button/Button.d.ts +44 -6
- package/dist/button/Button.d.ts.map +1 -1
- package/dist/button/Button.js +172 -22
- package/dist/button/Button.js.map +1 -1
- package/dist/button/Button.module.js +14 -14
- package/dist/button/Button.module.js.map +1 -1
- package/dist/button/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 +3 -0
- package/dist/button/tokens.d.ts.map +1 -0
- package/dist/button/tokens.js +25 -0
- package/dist/button/tokens.js.map +1 -0
- package/dist/card/Card.css +27 -20
- package/dist/card/Card.js +76 -23
- package/dist/card/Card.js.map +1 -1
- package/dist/card/Card.module.js +5 -5
- package/dist/card/Card.module.js.map +1 -1
- package/dist/card/tokens.d.ts +3 -0
- package/dist/card/tokens.d.ts.map +1 -0
- package/dist/card/tokens.js +31 -0
- package/dist/card/tokens.js.map +1 -0
- package/dist/checkbox/Checkbox.css +22 -21
- package/dist/checkbox/Checkbox.d.ts +1 -1
- package/dist/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/checkbox/Checkbox.js +87 -25
- package/dist/checkbox/Checkbox.js.map +1 -1
- package/dist/checkbox/Checkbox.module.js +6 -6
- package/dist/checkbox/Checkbox.module.js.map +1 -1
- package/dist/checkbox/ChoiceChrome.d.ts +3 -1
- package/dist/checkbox/ChoiceChrome.d.ts.map +1 -1
- package/dist/checkbox/ChoiceChrome.js +82 -21
- package/dist/checkbox/ChoiceChrome.js.map +1 -1
- package/dist/checkbox/tokens.d.ts +3 -0
- package/dist/checkbox/tokens.d.ts.map +1 -0
- package/dist/checkbox/tokens.js +21 -0
- package/dist/checkbox/tokens.js.map +1 -0
- package/dist/combo-box/ComboBox.css +4 -4
- package/dist/combo-box/ComboBox.d.ts +1 -1
- package/dist/combo-box/ComboBox.js +291 -79
- package/dist/combo-box/ComboBox.js.map +1 -1
- package/dist/combo-box/ComboBox.module.js +3 -3
- 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.css +32 -0
- package/dist/container/Container.d.ts +15 -0
- package/dist/container/Container.d.ts.map +1 -0
- package/dist/container/Container.js +61 -0
- package/dist/container/Container.js.map +1 -0
- package/dist/container/Container.module.js +20 -0
- package/dist/container/Container.module.js.map +1 -0
- package/dist/container/tokens.d.ts +3 -0
- package/dist/container/tokens.d.ts.map +1 -0
- package/dist/container/tokens.js +19 -0
- package/dist/container/tokens.js.map +1 -0
- package/dist/date-picker/DatePicker.css +70 -30
- 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 +16 -12
- package/dist/date-picker/DatePicker.module.js.map +1 -1
- package/dist/date-picker/calendarTokens.d.ts +3 -0
- package/dist/date-picker/calendarTokens.d.ts.map +1 -0
- package/dist/date-picker/calendarTokens.js +17 -0
- package/dist/date-picker/calendarTokens.js.map +1 -0
- package/dist/dialog/Dialog.css +80 -37
- package/dist/dialog/Dialog.d.ts +15 -3
- package/dist/dialog/Dialog.d.ts.map +1 -1
- package/dist/dialog/Dialog.js +159 -30
- package/dist/dialog/Dialog.js.map +1 -1
- package/dist/dialog/Dialog.module.js +21 -13
- package/dist/dialog/Dialog.module.js.map +1 -1
- package/dist/dialog/tokens.d.ts +3 -0
- package/dist/dialog/tokens.d.ts.map +1 -0
- package/dist/dialog/tokens.js +31 -0
- package/dist/dialog/tokens.js.map +1 -0
- package/dist/disclosure/Disclosure.css +12 -12
- package/dist/disclosure/Disclosure.d.ts.map +1 -1
- package/dist/disclosure/Disclosure.js +132 -28
- package/dist/disclosure/Disclosure.js.map +1 -1
- package/dist/disclosure/Disclosure.module.js +7 -7
- package/dist/disclosure/Disclosure.module.js.map +1 -1
- package/dist/disclosure/tokens.d.ts +3 -0
- package/dist/disclosure/tokens.d.ts.map +1 -0
- package/dist/disclosure/tokens.js +15 -0
- package/dist/disclosure/tokens.js.map +1 -0
- package/dist/divider/Divider.css +17 -0
- package/dist/divider/Divider.d.ts +8 -0
- package/dist/divider/Divider.d.ts.map +1 -0
- package/dist/divider/Divider.js +65 -0
- package/dist/divider/Divider.js.map +1 -0
- package/dist/divider/Divider.module.js +12 -0
- package/dist/divider/Divider.module.js.map +1 -0
- package/dist/divider/tokens.d.ts +3 -0
- package/dist/divider/tokens.d.ts.map +1 -0
- package/dist/divider/tokens.js +13 -0
- package/dist/divider/tokens.js.map +1 -0
- package/dist/field/Field.css +49 -37
- package/dist/field/Field.module.js +11 -11
- 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.js +99 -32
- package/dist/field/Fieldset.js.map +1 -1
- package/dist/field/inputTokens.d.ts +3 -0
- package/dist/field/inputTokens.d.ts.map +1 -0
- package/dist/field/inputTokens.js +21 -0
- package/dist/field/inputTokens.js.map +1 -0
- package/dist/field/tokens.d.ts +3 -0
- package/dist/field/tokens.d.ts.map +1 -0
- package/dist/field/tokens.js +15 -0
- package/dist/field/tokens.js.map +1 -0
- package/dist/grid/Grid.css +174 -0
- package/dist/grid/Grid.d.ts +28 -0
- package/dist/grid/Grid.d.ts.map +1 -0
- package/dist/grid/Grid.js +140 -0
- package/dist/grid/Grid.js.map +1 -0
- package/dist/grid/Grid.module.js +12 -0
- package/dist/grid/Grid.module.js.map +1 -0
- package/dist/grid/GridItem.css +59 -0
- package/dist/grid/GridItem.module.js +7 -0
- package/dist/grid/GridItem.module.js.map +1 -0
- package/dist/grid/tokens.d.ts +3 -0
- package/dist/grid/tokens.d.ts.map +1 -0
- package/dist/grid/tokens.js +10 -0
- package/dist/grid/tokens.js.map +1 -0
- package/dist/heading/Heading.css +52 -0
- package/dist/heading/Heading.d.ts +17 -0
- package/dist/heading/Heading.d.ts.map +1 -0
- package/dist/heading/Heading.js +52 -0
- package/dist/heading/Heading.js.map +1 -0
- package/dist/heading/Heading.module.js +16 -0
- package/dist/heading/Heading.module.js.map +1 -0
- package/dist/heading/tokens.d.ts +6 -0
- package/dist/heading/tokens.d.ts.map +1 -0
- package/dist/heading/tokens.js +66 -0
- package/dist/heading/tokens.js.map +1 -0
- package/dist/icon/Icon.css +1 -1
- package/dist/icon/Icon.js +36 -11
- package/dist/icon/Icon.js.map +1 -1
- package/dist/icon/Icon.module.js +1 -1
- package/dist/icon/lucideIconLoader.d.ts +9 -0
- package/dist/icon/lucideIconLoader.d.ts.map +1 -0
- package/dist/icon/lucideIconLoader.js +22 -0
- package/dist/icon/lucideIconLoader.js.map +1 -0
- package/dist/icon/namedIcons.d.ts +16 -9
- package/dist/icon/namedIcons.d.ts.map +1 -1
- package/dist/icon/namedIcons.js +121 -46
- package/dist/icon/namedIcons.js.map +1 -1
- package/dist/icon-button/IconButton.css +2 -2
- package/dist/icon-button/IconButton.d.ts +3 -3
- package/dist/icon-button/IconButton.d.ts.map +1 -1
- package/dist/icon-button/IconButton.js +70 -13
- package/dist/icon-button/IconButton.js.map +1 -1
- package/dist/icon-button/IconButton.module.js +2 -2
- package/dist/index.d.ts +62 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -5
- package/dist/inline/Inline.css +142 -0
- package/dist/inline/Inline.d.ts +17 -0
- package/dist/inline/Inline.d.ts.map +1 -0
- package/dist/inline/Inline.js +79 -0
- package/dist/inline/Inline.js.map +1 -0
- package/dist/inline/Inline.module.js +12 -0
- package/dist/inline/Inline.module.js.map +1 -0
- package/dist/inline/tokens.d.ts +3 -0
- package/dist/inline/tokens.d.ts.map +1 -0
- package/dist/inline/tokens.js +10 -0
- package/dist/inline/tokens.js.map +1 -0
- package/dist/intl/usePanneauIntl.js.map +1 -1
- package/dist/layout/responsive.d.ts +38 -0
- package/dist/layout/responsive.d.ts.map +1 -0
- package/dist/layout/responsive.js +49 -0
- package/dist/layout/responsive.js.map +1 -0
- package/dist/locales/index.js.map +1 -1
- package/dist/menu/Menu.css +84 -0
- package/dist/menu/Menu.d.ts +34 -7
- package/dist/menu/Menu.d.ts.map +1 -1
- package/dist/menu/Menu.js +243 -32
- package/dist/menu/Menu.js.map +1 -1
- package/dist/menu/Menu.module.js +22 -0
- package/dist/menu/Menu.module.js.map +1 -0
- package/dist/menu/tokens.d.ts +3 -0
- package/dist/menu/tokens.d.ts.map +1 -0
- package/dist/menu/tokens.js +31 -0
- package/dist/menu/tokens.js.map +1 -0
- package/dist/named-icons/index.d.ts +2 -0
- package/dist/named-icons/index.d.ts.map +1 -0
- package/dist/named-icons/index.js +1 -0
- package/dist/number-input/NumberInput.css +30 -12
- 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 +7 -5
- package/dist/number-input/NumberInput.module.js.map +1 -1
- package/dist/number-input/tokens.d.ts +3 -0
- package/dist/number-input/tokens.d.ts.map +1 -0
- package/dist/number-input/tokens.js +10 -0
- package/dist/number-input/tokens.js.map +1 -0
- package/dist/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 +18 -12
- 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 +7 -5
- package/dist/popover/Popover.module.js.map +1 -1
- package/dist/popover/tokens.d.ts +3 -0
- package/dist/popover/tokens.d.ts.map +1 -0
- package/dist/popover/tokens.js +19 -0
- package/dist/popover/tokens.js.map +1 -0
- package/dist/prose/Prose.css +141 -0
- package/dist/prose/Prose.d.ts +11 -0
- package/dist/prose/Prose.d.ts.map +1 -0
- package/dist/prose/Prose.js +49 -0
- package/dist/prose/Prose.js.map +1 -0
- package/dist/prose/Prose.module.js +8 -0
- package/dist/prose/Prose.module.js.map +1 -0
- package/dist/prose/tokens.d.ts +3 -0
- package/dist/prose/tokens.d.ts.map +1 -0
- package/dist/prose/tokens.js +33 -0
- package/dist/prose/tokens.js.map +1 -0
- package/dist/radio-group/RadioGroup.css +111 -20
- 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 +18 -8
- package/dist/radio-group/RadioGroup.module.js.map +1 -1
- package/dist/radio-group/tokens.d.ts +3 -0
- package/dist/radio-group/tokens.d.ts.map +1 -0
- package/dist/radio-group/tokens.js +39 -0
- package/dist/radio-group/tokens.js.map +1 -0
- package/dist/root/PanneauRoot.css +243 -20
- package/dist/root/PanneauRoot.d.ts +57 -4
- package/dist/root/PanneauRoot.d.ts.map +1 -1
- package/dist/root/PanneauRoot.js +325 -46
- package/dist/root/PanneauRoot.js.map +1 -1
- package/dist/root/PanneauRoot.module.js +11 -3
- package/dist/root/PanneauRoot.module.js.map +1 -1
- package/dist/root/ThemeScope.d.ts +24 -0
- package/dist/root/ThemeScope.d.ts.map +1 -0
- package/dist/root/ThemeScope.js +132 -0
- package/dist/root/ThemeScope.js.map +1 -0
- package/dist/segmented-control/SegmentedControl.css +83 -0
- package/dist/segmented-control/SegmentedControl.d.ts +35 -0
- package/dist/segmented-control/SegmentedControl.d.ts.map +1 -0
- package/dist/segmented-control/SegmentedControl.js +142 -0
- package/dist/segmented-control/SegmentedControl.js.map +1 -0
- package/dist/segmented-control/SegmentedControl.module.js +16 -0
- package/dist/segmented-control/SegmentedControl.module.js.map +1 -0
- package/dist/segmented-control/tokens.d.ts +3 -0
- package/dist/segmented-control/tokens.d.ts.map +1 -0
- package/dist/segmented-control/tokens.js +29 -0
- package/dist/segmented-control/tokens.js.map +1 -0
- package/dist/select/ListBox.css +46 -23
- package/dist/select/ListBox.module.js +13 -13
- package/dist/select/ListBox.module.js.map +1 -1
- package/dist/select/Select.d.ts +1 -1
- package/dist/select/Select.js +298 -92
- package/dist/select/Select.js.map +1 -1
- package/dist/select/listBoxTokens.d.ts +3 -0
- package/dist/select/listBoxTokens.d.ts.map +1 -0
- package/dist/select/listBoxTokens.js +21 -0
- package/dist/select/listBoxTokens.js.map +1 -0
- package/dist/skeleton/LoadingRegion.d.ts +16 -0
- package/dist/skeleton/LoadingRegion.d.ts.map +1 -0
- package/dist/skeleton/LoadingRegion.js +65 -0
- package/dist/skeleton/LoadingRegion.js.map +1 -0
- package/dist/skeleton/Skeleton.css +62 -0
- package/dist/skeleton/Skeleton.d.ts +25 -0
- package/dist/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/skeleton/Skeleton.js +106 -0
- package/dist/skeleton/Skeleton.js.map +1 -0
- package/dist/skeleton/Skeleton.module.js +22 -0
- package/dist/skeleton/Skeleton.module.js.map +1 -0
- package/dist/skeleton/tokens.d.ts +3 -0
- package/dist/skeleton/tokens.d.ts.map +1 -0
- package/dist/skeleton/tokens.js +15 -0
- package/dist/skeleton/tokens.js.map +1 -0
- package/dist/slider/Slider.css +84 -0
- package/dist/slider/Slider.d.ts +20 -0
- package/dist/slider/Slider.d.ts.map +1 -0
- package/dist/slider/Slider.js +248 -0
- package/dist/slider/Slider.js.map +1 -0
- package/dist/slider/Slider.module.js +20 -0
- package/dist/slider/Slider.module.js.map +1 -0
- package/dist/spinner/Spinner.css +8 -8
- package/dist/spinner/Spinner.js +49 -9
- package/dist/spinner/Spinner.js.map +1 -1
- package/dist/spinner/Spinner.module.js +5 -5
- package/dist/spinner/Spinner.module.js.map +1 -1
- package/dist/spinner/tokens.d.ts +3 -0
- package/dist/spinner/tokens.d.ts.map +1 -0
- package/dist/spinner/tokens.js +10 -0
- package/dist/spinner/tokens.js.map +1 -0
- package/dist/stack/Stack.css +135 -0
- package/dist/stack/Stack.d.ts +15 -0
- package/dist/stack/Stack.d.ts.map +1 -0
- package/dist/stack/Stack.js +74 -0
- package/dist/stack/Stack.js.map +1 -0
- package/dist/stack/Stack.module.js +8 -0
- package/dist/stack/Stack.module.js.map +1 -0
- package/dist/stack/tokens.d.ts +3 -0
- package/dist/stack/tokens.d.ts.map +1 -0
- package/dist/stack/tokens.js +10 -0
- package/dist/stack/tokens.js.map +1 -0
- package/dist/switch/Switch.css +34 -25
- package/dist/switch/Switch.d.ts +1 -1
- package/dist/switch/Switch.d.ts.map +1 -1
- package/dist/switch/Switch.js +69 -11
- package/dist/switch/Switch.js.map +1 -1
- package/dist/switch/Switch.module.js +6 -5
- package/dist/switch/Switch.module.js.map +1 -1
- package/dist/switch/tokens.d.ts +3 -0
- package/dist/switch/tokens.d.ts.map +1 -0
- package/dist/switch/tokens.js +25 -0
- package/dist/switch/tokens.js.map +1 -0
- package/dist/tabs/Tabs.css +24 -23
- package/dist/tabs/Tabs.js +5 -5
- package/dist/tabs/Tabs.js.map +1 -1
- package/dist/tabs/Tabs.module.js +4 -4
- package/dist/tabs/Tabs.module.js.map +1 -1
- package/dist/tabs/tokens.d.ts +3 -0
- package/dist/tabs/tokens.d.ts.map +1 -0
- package/dist/tabs/tokens.js +25 -0
- package/dist/tabs/tokens.js.map +1 -0
- package/dist/tags-input/TagsInput.css +60 -0
- package/dist/tags-input/TagsInput.d.ts +32 -0
- package/dist/tags-input/TagsInput.d.ts.map +1 -0
- package/dist/tags-input/TagsInput.js +316 -0
- package/dist/tags-input/TagsInput.js.map +1 -0
- package/dist/tags-input/TagsInput.module.js +20 -0
- package/dist/tags-input/TagsInput.module.js.map +1 -0
- package/dist/text/Text.css +74 -0
- package/dist/text/Text.d.ts +27 -0
- package/dist/text/Text.d.ts.map +1 -0
- package/dist/text/Text.js +81 -0
- package/dist/text/Text.js.map +1 -0
- package/dist/text/Text.module.js +30 -0
- package/dist/text/Text.module.js.map +1 -0
- package/dist/text/tokens.d.ts +3 -0
- package/dist/text/tokens.d.ts.map +1 -0
- package/dist/text/tokens.js +10 -0
- package/dist/text/tokens.js.map +1 -0
- package/dist/text-area/TextArea.css +1 -1
- package/dist/text-area/TextArea.d.ts +1 -1
- package/dist/text-area/TextArea.js +135 -28
- package/dist/text-area/TextArea.js.map +1 -1
- package/dist/text-area/TextArea.module.js +3 -3
- package/dist/text-area/TextArea.module.js.map +1 -1
- package/dist/text-input/TextInput.d.ts +1 -1
- 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 +70 -0
- package/dist/theme/Tone.module.js +20 -0
- package/dist/theme/Tone.module.js.map +1 -0
- package/dist/theme/bootstrap.d.ts +11 -1
- package/dist/theme/bootstrap.d.ts.map +1 -1
- package/dist/theme/bootstrap.js +48 -5
- package/dist/theme/bootstrap.js.map +1 -1
- package/dist/theme/chartColors.d.ts +23 -0
- package/dist/theme/chartColors.d.ts.map +1 -0
- package/dist/theme/chartColors.js +27 -0
- package/dist/theme/chartColors.js.map +1 -0
- package/dist/theme/checkTheme.d.ts +39 -0
- package/dist/theme/checkTheme.d.ts.map +1 -0
- package/dist/theme/checkTheme.js +132 -0
- package/dist/theme/checkTheme.js.map +1 -0
- package/dist/theme/cli.d.ts +14 -0
- package/dist/theme/cli.d.ts.map +1 -0
- package/dist/theme/cli.js +61 -0
- package/dist/theme/cli.js.map +1 -0
- package/dist/theme/color.d.ts +30 -0
- package/dist/theme/color.d.ts.map +1 -0
- package/dist/theme/color.js +94 -0
- package/dist/theme/color.js.map +1 -0
- package/dist/theme/colorVision.d.ts +23 -0
- package/dist/theme/colorVision.d.ts.map +1 -0
- package/dist/theme/colorVision.js +140 -0
- package/dist/theme/colorVision.js.map +1 -0
- package/dist/theme/componentTokens.d.ts +24 -0
- package/dist/theme/componentTokens.d.ts.map +1 -0
- package/dist/theme/componentTokens.js +20 -0
- package/dist/theme/componentTokens.js.map +1 -0
- package/dist/theme/components.d.ts +43 -0
- package/dist/theme/components.d.ts.map +1 -0
- package/dist/theme/components.js +75 -0
- package/dist/theme/components.js.map +1 -0
- package/dist/theme/defineTheme.d.ts +85 -0
- package/dist/theme/defineTheme.d.ts.map +1 -0
- package/dist/theme/defineTheme.js +130 -0
- package/dist/theme/defineTheme.js.map +1 -0
- package/dist/theme/fonts.d.ts +32 -0
- package/dist/theme/fonts.d.ts.map +1 -0
- package/dist/theme/fonts.js +36 -0
- package/dist/theme/fonts.js.map +1 -0
- package/dist/theme/index.d.ts +13 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +10 -0
- package/dist/theme/semanticTokens.d.ts +9 -0
- package/dist/theme/semanticTokens.d.ts.map +1 -0
- package/dist/theme/semanticTokens.js +110 -0
- package/dist/theme/semanticTokens.js.map +1 -0
- package/dist/theme/theme.d.ts +61 -7
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +100 -10
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/toneClass.d.ts +8 -0
- package/dist/theme/toneClass.d.ts.map +1 -0
- package/dist/theme/toneClass.js +15 -0
- package/dist/theme/toneClass.js.map +1 -0
- package/dist/theme/tones.d.ts +89 -0
- package/dist/theme/tones.d.ts.map +1 -0
- package/dist/theme/tones.js +127 -0
- package/dist/theme/tones.js.map +1 -0
- package/dist/time-input/TimeInput.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 +22 -44
- package/dist/toast/Toast.d.ts +5 -3
- package/dist/toast/Toast.d.ts.map +1 -1
- package/dist/toast/Toast.js +5 -4
- package/dist/toast/Toast.js.map +1 -1
- package/dist/toast/Toast.module.js +10 -16
- package/dist/toast/Toast.module.js.map +1 -1
- package/dist/toast/tokens.d.ts +3 -0
- package/dist/toast/tokens.d.ts.map +1 -0
- package/dist/toast/tokens.js +21 -0
- package/dist/toast/tokens.js.map +1 -0
- package/dist/tooltip/Tooltip.css +12 -11
- package/dist/tooltip/Tooltip.js +38 -8
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/Tooltip.module.js +2 -2
- package/dist/tooltip/Tooltip.module.js.map +1 -1
- package/dist/tooltip/tokens.d.ts +3 -0
- package/dist/tooltip/tokens.d.ts.map +1 -0
- package/dist/tooltip/tokens.js +21 -0
- package/dist/tooltip/tokens.js.map +1 -0
- package/dist/utils/cx.d.ts +1 -1
- package/dist/utils/cx.d.ts.map +1 -1
- package/dist/utils/cx.js +2 -2
- package/dist/utils/cx.js.map +1 -1
- package/dist/utils/events.d.ts +4 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/events.js +9 -0
- package/dist/utils/events.js.map +1 -0
- package/package.json +22 -5
package/dist/dialog/Dialog.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.panneau-overlay
|
|
1
|
+
.panneau-dialog-overlay {
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: var(--panneau-z-overlay);
|
|
@@ -7,120 +7,163 @@
|
|
|
7
7
|
justify-content: center;
|
|
8
8
|
min-height: 100dvh;
|
|
9
9
|
padding: var(--panneau-space-4);
|
|
10
|
-
background-color: var(--panneau-color-backdrop);
|
|
10
|
+
background-color: var(--panneau-dialog-backdrop, var(--panneau-color-backdrop));
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.panneau-overlay
|
|
14
|
-
animation: panneau-fade
|
|
13
|
+
.panneau-dialog-overlay[data-entering] {
|
|
14
|
+
animation: panneau-dialog-fade var(--panneau-duration) ease-out;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.panneau-overlay
|
|
18
|
-
animation: panneau-fade
|
|
17
|
+
.panneau-dialog-overlay[data-exiting] {
|
|
18
|
+
animation: panneau-dialog-fade var(--panneau-duration) ease-in reverse;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.panneau-modal
|
|
21
|
+
.panneau-dialog-modal {
|
|
22
22
|
display: flex;
|
|
23
23
|
width: 100%;
|
|
24
|
-
max-width: 32rem;
|
|
24
|
+
max-width: var(--panneau-dialog-width, 32rem);
|
|
25
25
|
max-height: calc(100dvh - 2 * var(--panneau-space-4));
|
|
26
26
|
outline: none;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.panneau-sm
|
|
30
|
-
max-width: 24rem;
|
|
29
|
+
.panneau-dialog-sm {
|
|
30
|
+
max-width: var(--panneau-dialog-width-sm, 24rem);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.panneau-lg
|
|
34
|
-
max-width: 48rem;
|
|
33
|
+
.panneau-dialog-lg {
|
|
34
|
+
max-width: var(--panneau-dialog-width-lg, 48rem);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.panneau-
|
|
38
|
-
|
|
37
|
+
.panneau-dialog-xl {
|
|
38
|
+
max-width: var(--panneau-dialog-width-xl, 72rem);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.panneau-dialog-
|
|
41
|
+
.panneau-dialog-modal[data-entering] {
|
|
42
|
+
animation: panneau-dialog-rise var(--panneau-duration) ease-out;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.panneau-dialog {
|
|
42
46
|
display: flex;
|
|
43
47
|
flex-direction: column;
|
|
44
48
|
width: 100%;
|
|
45
49
|
max-height: inherit;
|
|
46
50
|
color: var(--panneau-color-text);
|
|
47
|
-
background-color: var(--panneau-color-surface-raised);
|
|
48
|
-
border-radius: var(--panneau-radius-lg);
|
|
49
|
-
box-shadow: var(--panneau-shadow-lg);
|
|
51
|
+
background-color: var(--panneau-dialog-bg, var(--panneau-color-surface-raised));
|
|
52
|
+
border-radius: var(--panneau-dialog-radius, var(--panneau-radius-lg));
|
|
53
|
+
box-shadow: var(--panneau-dialog-shadow, var(--panneau-shadow-lg));
|
|
50
54
|
outline: none;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
|
-
.panneau-header
|
|
57
|
+
.panneau-dialog-header {
|
|
54
58
|
display: flex;
|
|
55
59
|
align-items: flex-start;
|
|
56
60
|
gap: var(--panneau-space-3);
|
|
57
|
-
padding: var(--panneau-space-4) var(--panneau-space-4) 0
|
|
61
|
+
padding: var(--panneau-space-4) var(--panneau-space-4) 0
|
|
62
|
+
var(--panneau-dialog-padding-x, var(--panneau-space-5));
|
|
58
63
|
}
|
|
59
64
|
|
|
60
|
-
.panneau-
|
|
61
|
-
|
|
65
|
+
.panneau-dialog-header-content {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex: 0 1 auto;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: var(--panneau-space-2);
|
|
70
|
+
min-width: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.panneau-dialog-title {
|
|
74
|
+
flex: 1 1 12rem;
|
|
62
75
|
min-width: 0;
|
|
63
76
|
padding-top: var(--panneau-space-1);
|
|
64
|
-
font-size: var(--panneau-font-size-lg);
|
|
65
|
-
font-weight: var(--panneau-font-weight-bold);
|
|
77
|
+
font-size: var(--panneau-dialog-title-font-size, var(--panneau-font-size-lg));
|
|
78
|
+
font-weight: var(--panneau-dialog-title-font-weight, var(--panneau-font-weight-bold));
|
|
66
79
|
line-height: var(--panneau-line-height-tight);
|
|
67
80
|
overflow-wrap: anywhere;
|
|
81
|
+
margin: 0;
|
|
68
82
|
}
|
|
69
83
|
|
|
70
|
-
.panneau-body
|
|
84
|
+
.panneau-dialog-body {
|
|
71
85
|
flex: 1 1 auto;
|
|
72
86
|
min-height: 0;
|
|
73
|
-
padding: var(--panneau-space-3) var(--panneau-
|
|
87
|
+
padding: var(--panneau-space-3) var(--panneau-dialog-padding-x, var(--panneau-space-5))
|
|
88
|
+
var(--panneau-space-4);
|
|
74
89
|
overflow-y: auto;
|
|
75
90
|
}
|
|
76
91
|
|
|
77
|
-
.panneau-footer
|
|
92
|
+
.panneau-dialog-footer {
|
|
78
93
|
display: flex;
|
|
79
94
|
flex-wrap: wrap;
|
|
80
95
|
justify-content: flex-end;
|
|
81
96
|
gap: var(--panneau-space-2);
|
|
82
|
-
padding: var(--panneau-space-3) var(--panneau-
|
|
97
|
+
padding: var(--panneau-space-3) var(--panneau-dialog-padding-x, var(--panneau-space-5))
|
|
98
|
+
var(--panneau-space-4);
|
|
83
99
|
border-top: var(--panneau-border-width) solid var(--panneau-color-border);
|
|
84
100
|
}
|
|
85
101
|
|
|
86
102
|
/* Phones: the dialog is a sheet at the bottom, with full-width buttons. */
|
|
87
103
|
@media (max-width: 30rem) {
|
|
88
|
-
.panneau-overlay
|
|
104
|
+
.panneau-dialog-overlay {
|
|
89
105
|
align-items: flex-end;
|
|
90
106
|
padding: 0;
|
|
91
107
|
}
|
|
92
108
|
|
|
93
|
-
.panneau-modal
|
|
94
|
-
.panneau-sm
|
|
95
|
-
.panneau-lg
|
|
109
|
+
.panneau-dialog-modal,
|
|
110
|
+
.panneau-dialog-sm,
|
|
111
|
+
.panneau-dialog-lg,
|
|
112
|
+
.panneau-dialog-xl {
|
|
96
113
|
max-width: none;
|
|
97
114
|
max-height: calc(100dvh - var(--panneau-space-8));
|
|
98
115
|
}
|
|
99
116
|
|
|
100
|
-
.panneau-dialog
|
|
117
|
+
.panneau-dialog {
|
|
101
118
|
border-end-start-radius: 0;
|
|
102
119
|
border-end-end-radius: 0;
|
|
103
120
|
padding-bottom: env(safe-area-inset-bottom);
|
|
104
121
|
}
|
|
105
122
|
|
|
106
|
-
.
|
|
123
|
+
/* The whole screen, under the notch. */
|
|
124
|
+
.panneau-dialog-full-screen-on-phone {
|
|
125
|
+
height: 100dvh;
|
|
126
|
+
max-height: 100dvh;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.panneau-dialog-full-screen-on-phone .panneau-dialog {
|
|
130
|
+
border-radius: 0;
|
|
131
|
+
padding-top: env(safe-area-inset-top);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* The header's content goes under the title and the close button. */
|
|
135
|
+
.panneau-dialog-header {
|
|
136
|
+
flex-wrap: wrap;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.panneau-dialog-header-content {
|
|
140
|
+
flex: 1 1 100%;
|
|
141
|
+
order: 1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.panneau-dialog-footer {
|
|
107
145
|
flex-direction: column-reverse;
|
|
108
146
|
}
|
|
109
147
|
|
|
110
|
-
.panneau-footer
|
|
148
|
+
.panneau-dialog-footer > * {
|
|
111
149
|
width: 100%;
|
|
112
150
|
}
|
|
113
151
|
}
|
|
114
152
|
|
|
115
|
-
@keyframes panneau-fade
|
|
153
|
+
@keyframes panneau-dialog-fade {
|
|
116
154
|
from {
|
|
117
155
|
opacity: 0;
|
|
118
156
|
}
|
|
119
157
|
}
|
|
120
158
|
|
|
121
|
-
@keyframes panneau-rise
|
|
159
|
+
@keyframes panneau-dialog-rise {
|
|
122
160
|
from {
|
|
123
161
|
opacity: 0;
|
|
124
162
|
transform: translateY(0.5rem);
|
|
125
163
|
}
|
|
126
164
|
}
|
|
165
|
+
|
|
166
|
+
/* Stops the events that React bubbles out of the overlay, without a box of its own. */
|
|
167
|
+
.panneau-dialog-boundary {
|
|
168
|
+
display: contents;
|
|
169
|
+
}
|
package/dist/dialog/Dialog.d.ts
CHANGED
|
@@ -5,6 +5,11 @@ export interface DialogProps extends Pick<ModalOverlayProps, 'isOpen' | 'default
|
|
|
5
5
|
title: ReactNode;
|
|
6
6
|
/** Content, or a function that gets `close()`. */
|
|
7
7
|
children?: ReactNode | ((close: () => void) => ReactNode);
|
|
8
|
+
/**
|
|
9
|
+
* More content in the header, between the title and the close button: a switcher, a few
|
|
10
|
+
* actions. On phones, it goes under the title. A function gets `close()`.
|
|
11
|
+
*/
|
|
12
|
+
headerContent?: ReactNode | ((close: () => void) => ReactNode);
|
|
8
13
|
/** Buttons at the bottom, or a function that gets `close()`. */
|
|
9
14
|
footer?: ReactNode | ((close: () => void) => ReactNode);
|
|
10
15
|
/**
|
|
@@ -14,7 +19,13 @@ export interface DialogProps extends Pick<ModalOverlayProps, 'isOpen' | 'default
|
|
|
14
19
|
isDismissable?: boolean;
|
|
15
20
|
/** `alertdialog` for confirmations and interruptions. Defaults to `dialog`. */
|
|
16
21
|
role?: 'dialog' | 'alertdialog';
|
|
17
|
-
|
|
22
|
+
/** Maximum width: `sm`, `md` (the default), `lg`, or `xl` for pickers and editors. */
|
|
23
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
24
|
+
/**
|
|
25
|
+
* On phones, takes the whole screen instead of opening as a sheet at the bottom: for dialogs
|
|
26
|
+
* that need all the room they can get, such as pickers.
|
|
27
|
+
*/
|
|
28
|
+
fullScreenOnPhone?: boolean;
|
|
18
29
|
className?: string;
|
|
19
30
|
overlayClassName?: string;
|
|
20
31
|
headerClassName?: string;
|
|
@@ -24,8 +35,9 @@ export interface DialogProps extends Pick<ModalOverlayProps, 'isOpen' | 'default
|
|
|
24
35
|
/**
|
|
25
36
|
* A modal dialog. Controlled with `isOpen` and `onOpenChange`, or inside a `DialogTrigger` with
|
|
26
37
|
* its button as the first child. It traps focus, closes with Escape, and returns focus when it
|
|
27
|
-
* closes. On phones, it opens as a sheet at the bottom of the screen
|
|
38
|
+
* closes. On phones, it opens as a sheet at the bottom of the screen, or takes the whole screen with
|
|
39
|
+
* `fullScreenOnPhone`.
|
|
28
40
|
*/
|
|
29
|
-
export declare function Dialog({ title, children, footer, isDismissable, role, size, className, overlayClassName, headerClassName, bodyClassName, footerClassName, ...props }: DialogProps): import("react").JSX.Element | null;
|
|
41
|
+
export declare function Dialog({ title, children, headerContent, footer, isDismissable, role, size, fullScreenOnPhone, className, overlayClassName, headerClassName, bodyClassName, footerClassName, ...props }: DialogProps): import("react").JSX.Element | null;
|
|
30
42
|
export { DialogTrigger } from 'react-aria-components';
|
|
31
43
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/dialog/Dialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAKH,KAAK,iBAAiB,EACzB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/dialog/Dialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAKH,KAAK,iBAAiB,EACzB,MAAM,uBAAuB,CAAC;AAU/B,MAAM,WAAW,WAAY,SAAQ,IAAI,CACrC,iBAAiB,EACjB,QAAQ,GAAG,aAAa,GAAG,cAAc,GAAG,2BAA2B,CAC1E;IACG,mDAAmD;IACnD,KAAK,EAAE,SAAS,CAAC;IACjB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC,CAAC;IAC1D;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC,CAAC;IAC/D,gEAAgE;IAChE,MAAM,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC,CAAC;IACxD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;IAChC,sFAAsF;IACtF,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,EACnB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,MAAM,EACN,aAAoB,EACpB,IAAe,EACf,IAAW,EACX,iBAAyB,EACzB,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,GAAG,KAAK,EACX,EAAE,WAAW,sCAiEb;AAED,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/dialog/Dialog.js
CHANGED
|
@@ -3,7 +3,9 @@ import { messages } from "../intl/messages.js";
|
|
|
3
3
|
import { usePanneauIntl } from "../intl/usePanneauIntl.js";
|
|
4
4
|
import { usePortalContainer } from "../root/PanneauRoot.js";
|
|
5
5
|
import { IconButton } from "../icon-button/IconButton.js";
|
|
6
|
+
import { stopPropagation } from "../utils/events.js";
|
|
6
7
|
import Dialog_module_default from "./Dialog.module.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
7
9
|
import { X } from "lucide-react";
|
|
8
10
|
import { Dialog, DialogTrigger, Heading, Modal, ModalOverlay } from "react-aria-components";
|
|
9
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -11,49 +13,176 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
11
13
|
/**
|
|
12
14
|
* A modal dialog. Controlled with `isOpen` and `onOpenChange`, or inside a `DialogTrigger` with
|
|
13
15
|
* its button as the first child. It traps focus, closes with Escape, and returns focus when it
|
|
14
|
-
* closes. On phones, it opens as a sheet at the bottom of the screen
|
|
16
|
+
* closes. On phones, it opens as a sheet at the bottom of the screen, or takes the whole screen with
|
|
17
|
+
* `fullScreenOnPhone`.
|
|
15
18
|
*/
|
|
16
|
-
function Dialog$1(
|
|
19
|
+
function Dialog$1(t0) {
|
|
20
|
+
const $ = c(45);
|
|
21
|
+
let bodyClassName;
|
|
22
|
+
let children;
|
|
23
|
+
let className;
|
|
24
|
+
let footer;
|
|
25
|
+
let footerClassName;
|
|
26
|
+
let headerClassName;
|
|
27
|
+
let headerContent;
|
|
28
|
+
let overlayClassName;
|
|
29
|
+
let props;
|
|
30
|
+
let t1;
|
|
31
|
+
let t2;
|
|
32
|
+
let t3;
|
|
33
|
+
let t4;
|
|
34
|
+
let title;
|
|
35
|
+
if ($[0] !== t0) {
|
|
36
|
+
({title, children, headerContent, footer, isDismissable: t1, role: t2, size: t3, fullScreenOnPhone: t4, className, overlayClassName, headerClassName, bodyClassName, footerClassName, ...props} = t0);
|
|
37
|
+
$[0] = t0;
|
|
38
|
+
$[1] = bodyClassName;
|
|
39
|
+
$[2] = children;
|
|
40
|
+
$[3] = className;
|
|
41
|
+
$[4] = footer;
|
|
42
|
+
$[5] = footerClassName;
|
|
43
|
+
$[6] = headerClassName;
|
|
44
|
+
$[7] = headerContent;
|
|
45
|
+
$[8] = overlayClassName;
|
|
46
|
+
$[9] = props;
|
|
47
|
+
$[10] = t1;
|
|
48
|
+
$[11] = t2;
|
|
49
|
+
$[12] = t3;
|
|
50
|
+
$[13] = t4;
|
|
51
|
+
$[14] = title;
|
|
52
|
+
} else {
|
|
53
|
+
bodyClassName = $[1];
|
|
54
|
+
children = $[2];
|
|
55
|
+
className = $[3];
|
|
56
|
+
footer = $[4];
|
|
57
|
+
footerClassName = $[5];
|
|
58
|
+
headerClassName = $[6];
|
|
59
|
+
headerContent = $[7];
|
|
60
|
+
overlayClassName = $[8];
|
|
61
|
+
props = $[9];
|
|
62
|
+
t1 = $[10];
|
|
63
|
+
t2 = $[11];
|
|
64
|
+
t3 = $[12];
|
|
65
|
+
t4 = $[13];
|
|
66
|
+
title = $[14];
|
|
67
|
+
}
|
|
68
|
+
const isDismissable = t1 === void 0 ? true : t1;
|
|
69
|
+
const role = t2 === void 0 ? "dialog" : t2;
|
|
70
|
+
const size = t3 === void 0 ? "md" : t3;
|
|
71
|
+
const fullScreenOnPhone = t4 === void 0 ? false : t4;
|
|
17
72
|
const intl = usePanneauIntl();
|
|
18
73
|
const container = usePortalContainer();
|
|
19
74
|
if (container === null) return null;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
75
|
+
let t5;
|
|
76
|
+
if ($[15] !== overlayClassName) {
|
|
77
|
+
t5 = cx(Dialog_module_default.overlay, overlayClassName);
|
|
78
|
+
$[15] = overlayClassName;
|
|
79
|
+
$[16] = t5;
|
|
80
|
+
} else t5 = $[16];
|
|
81
|
+
const t6 = Dialog_module_default[size];
|
|
82
|
+
const t7 = fullScreenOnPhone && Dialog_module_default.fullScreenOnPhone;
|
|
83
|
+
let t8;
|
|
84
|
+
if ($[17] !== t6 || $[18] !== t7) {
|
|
85
|
+
t8 = cx(Dialog_module_default.modal, t6, t7);
|
|
86
|
+
$[17] = t6;
|
|
87
|
+
$[18] = t7;
|
|
88
|
+
$[19] = t8;
|
|
89
|
+
} else t8 = $[19];
|
|
90
|
+
let t9;
|
|
91
|
+
if ($[20] !== className) {
|
|
92
|
+
t9 = cx("panneau-dialog", Dialog_module_default.dialog, className);
|
|
93
|
+
$[20] = className;
|
|
94
|
+
$[21] = t9;
|
|
95
|
+
} else t9 = $[21];
|
|
96
|
+
let t10;
|
|
97
|
+
if ($[22] !== bodyClassName || $[23] !== children || $[24] !== footer || $[25] !== footerClassName || $[26] !== headerClassName || $[27] !== headerContent || $[28] !== intl || $[29] !== isDismissable || $[30] !== title) {
|
|
98
|
+
t10 = (t11) => {
|
|
99
|
+
const { close } = t11;
|
|
100
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
101
|
+
/* @__PURE__ */ jsxs("div", {
|
|
102
|
+
className: cx(Dialog_module_default.header, headerClassName),
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx(Heading, {
|
|
34
105
|
slot: "title",
|
|
35
106
|
className: Dialog_module_default.title,
|
|
36
107
|
children: title
|
|
37
|
-
}),
|
|
108
|
+
}),
|
|
109
|
+
headerContent !== void 0 && headerContent !== null ? /* @__PURE__ */ jsx("div", {
|
|
110
|
+
className: Dialog_module_default.headerContent,
|
|
111
|
+
children: typeof headerContent === "function" ? headerContent(close) : headerContent
|
|
112
|
+
}) : null,
|
|
113
|
+
isDismissable ? /* @__PURE__ */ jsx(IconButton, {
|
|
38
114
|
icon: X,
|
|
39
115
|
size: "sm",
|
|
40
116
|
label: intl.formatMessage(messages.close),
|
|
41
117
|
showTooltip: false,
|
|
42
118
|
onPress: close
|
|
43
|
-
}) : null
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
119
|
+
}) : null
|
|
120
|
+
]
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ jsx("div", {
|
|
123
|
+
className: cx(Dialog_module_default.body, bodyClassName),
|
|
124
|
+
children: typeof children === "function" ? children(close) : children
|
|
125
|
+
}),
|
|
126
|
+
footer !== void 0 && footer !== null ? /* @__PURE__ */ jsx("div", {
|
|
127
|
+
className: cx(Dialog_module_default.footer, footerClassName),
|
|
128
|
+
children: typeof footer === "function" ? footer(close) : footer
|
|
129
|
+
}) : null
|
|
130
|
+
] });
|
|
131
|
+
};
|
|
132
|
+
$[22] = bodyClassName;
|
|
133
|
+
$[23] = children;
|
|
134
|
+
$[24] = footer;
|
|
135
|
+
$[25] = footerClassName;
|
|
136
|
+
$[26] = headerClassName;
|
|
137
|
+
$[27] = headerContent;
|
|
138
|
+
$[28] = intl;
|
|
139
|
+
$[29] = isDismissable;
|
|
140
|
+
$[30] = title;
|
|
141
|
+
$[31] = t10;
|
|
142
|
+
} else t10 = $[31];
|
|
143
|
+
let t11;
|
|
144
|
+
if ($[32] !== role || $[33] !== t10 || $[34] !== t9) {
|
|
145
|
+
t11 = /* @__PURE__ */ jsx("div", {
|
|
146
|
+
className: Dialog_module_default.boundary,
|
|
147
|
+
onSubmit: stopPropagation,
|
|
148
|
+
children: /* @__PURE__ */ jsx(Dialog, {
|
|
149
|
+
role,
|
|
150
|
+
className: t9,
|
|
151
|
+
children: t10
|
|
54
152
|
})
|
|
55
|
-
})
|
|
56
|
-
|
|
153
|
+
});
|
|
154
|
+
$[32] = role;
|
|
155
|
+
$[33] = t10;
|
|
156
|
+
$[34] = t9;
|
|
157
|
+
$[35] = t11;
|
|
158
|
+
} else t11 = $[35];
|
|
159
|
+
let t12;
|
|
160
|
+
if ($[36] !== t11 || $[37] !== t8) {
|
|
161
|
+
t12 = /* @__PURE__ */ jsx(Modal, {
|
|
162
|
+
className: t8,
|
|
163
|
+
children: t11
|
|
164
|
+
});
|
|
165
|
+
$[36] = t11;
|
|
166
|
+
$[37] = t8;
|
|
167
|
+
$[38] = t12;
|
|
168
|
+
} else t12 = $[38];
|
|
169
|
+
let t13;
|
|
170
|
+
if ($[39] !== container || $[40] !== isDismissable || $[41] !== props || $[42] !== t12 || $[43] !== t5) {
|
|
171
|
+
t13 = /* @__PURE__ */ jsx(ModalOverlay, {
|
|
172
|
+
...props,
|
|
173
|
+
isDismissable,
|
|
174
|
+
className: t5,
|
|
175
|
+
UNSTABLE_portalContainer: container,
|
|
176
|
+
children: t12
|
|
177
|
+
});
|
|
178
|
+
$[39] = container;
|
|
179
|
+
$[40] = isDismissable;
|
|
180
|
+
$[41] = props;
|
|
181
|
+
$[42] = t12;
|
|
182
|
+
$[43] = t5;
|
|
183
|
+
$[44] = t13;
|
|
184
|
+
} else t13 = $[44];
|
|
185
|
+
return t13;
|
|
57
186
|
}
|
|
58
187
|
//#endregion
|
|
59
188
|
export { Dialog$1 as Dialog, DialogTrigger };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":["Dialog","styles","AriaDialog","_Fragment"],"sources":["../../src/dialog/Dialog.tsx"],"sourcesContent":["import { X } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport {\n Dialog as AriaDialog,\n Heading,\n Modal,\n ModalOverlay,\n type ModalOverlayProps,\n} from 'react-aria-components';\n\nimport { IconButton } from '../icon-button/IconButton';\nimport { messages } from '../intl/messages';\nimport { usePanneauIntl } from '../intl/usePanneauIntl';\nimport { usePortalContainer } from '../root/PanneauRoot';\nimport { cx } from '../utils/cx';\nimport styles from './Dialog.module.css';\n\nexport interface DialogProps extends Pick<\n ModalOverlayProps,\n 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'isKeyboardDismissDisabled'\n> {\n /** Heading of the dialog, which also labels it. */\n title: ReactNode;\n /** Content, or a function that gets `close()`. */\n children?: ReactNode | ((close: () => void) => ReactNode);\n /** Buttons at the bottom, or a function that gets `close()`. */\n footer?: ReactNode | ((close: () => void) => ReactNode);\n /**\n * Closes on a click outside and shows a close button. Defaults to true. Turn it off for dialogs\n * that need an answer.\n */\n isDismissable?: boolean;\n /** `alertdialog` for confirmations and interruptions. Defaults to `dialog`. */\n role?: 'dialog' | 'alertdialog';\n size?: 'sm' | 'md' | 'lg';\n className?: string;\n overlayClassName?: string;\n headerClassName?: string;\n bodyClassName?: string;\n footerClassName?: string;\n}\n\n/**\n * A modal dialog. Controlled with `isOpen` and `onOpenChange`, or inside a `DialogTrigger` with\n * its button as the first child. It traps focus, closes with Escape, and returns focus when it\n * closes. On phones, it opens as a sheet at the bottom of the screen.\n */\nexport function Dialog({\n title,\n children,\n footer,\n isDismissable = true,\n role = 'dialog',\n size = 'md',\n className,\n overlayClassName,\n headerClassName,\n bodyClassName,\n footerClassName,\n ...props\n}: DialogProps) {\n const intl = usePanneauIntl();\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <ModalOverlay\n {...props}\n isDismissable={isDismissable}\n className={cx(styles.overlay, overlayClassName)}\n UNSTABLE_portalContainer={container}\n >\n <Modal className={cx(styles.modal, styles[size])}>\n <AriaDialog role={role} className={cx(styles.dialog, className)}>\n {({ close }) => (\n <>\n <div className={cx(styles.header, headerClassName)}>\n <Heading slot=\"title\" className={styles.title}>\n {title}\n </Heading>\n {isDismissable ? (\n <IconButton\n icon={X}\n size=\"sm\"\n label={intl.formatMessage(messages.close)}\n showTooltip={false}\n onPress={close}\n />\n ) : null}\n </div>\n <div className={cx(styles.body, bodyClassName)}>\n {typeof children === 'function' ? children(close) : children}\n </div>\n {footer !== undefined && footer !== null ? (\n <div className={cx(styles.footer, footerClassName)}>\n {typeof footer === 'function' ? footer(close) : footer}\n </div>\n ) : null}\n </>\n )}\n </AriaDialog>\n </Modal>\n </ModalOverlay>\n );\n}\n\nexport { DialogTrigger } from 'react-aria-components';\n"],"mappings":";;;;;;;;;;;;;;;AA+CA,SAAgBA,SAAO,EACnB,OACA,UACA,QACA,gBAAgB,MAChB,OAAO,UACP,OAAO,MACP,WACA,kBACA,iBACA,eACA,iBACA,GAAG,SACS;CACZ,MAAM,OAAO,eAAe;CAC5B,MAAM,YAAY,mBAAmB;CACrC,IAAI,cAAc,MACd,OAAO;CAEX,OACI,oBAAC,cAAD;EACI,GAAI;EACW;EACf,WAAW,GAAGC,sBAAO,SAAS,gBAAgB;EAC9C,0BAA0B;EAE1B,UAAA,oBAAC,OAAD;GAAO,WAAW,GAAGA,sBAAO,OAAOA,sBAAO,KAAK;GAC3C,UAAA,oBAACC,QAAD;IAAkB;IAAM,WAAW,GAAGD,sBAAO,QAAQ,SAAS;IACxD,WAAA,EAAE,YACA,qBAAAE,UAAA,EAAA,UAAA;KACI,qBAAC,OAAD;MAAK,WAAW,GAAGF,sBAAO,QAAQ,eAAe;MAAjD,UAAA,CACI,oBAAC,SAAD;OAAS,MAAK;OAAQ,WAAWA,sBAAO;OACnC,UAAA;MACI,CAAA,GACR,gBACG,oBAAC,YAAD;OACI,MAAM;OACN,MAAK;OACL,OAAO,KAAK,cAAc,SAAS,KAAK;OACxC,aAAa;OACb,SAAS;MAAM,CAAA,IAEnB,IACH;;KACL,oBAAC,OAAD;MAAK,WAAW,GAAGA,sBAAO,MAAM,aAAa;MACxC,UAAA,OAAO,aAAa,aAAa,SAAS,KAAK,IAAI;KACnD,CAAA;KACJ,WAAW,KAAA,KAAa,WAAW,OAChC,oBAAC,OAAD;MAAK,WAAW,GAAGA,sBAAO,QAAQ,eAAe;MAC5C,UAAA,OAAO,WAAW,aAAa,OAAO,KAAK,IAAI;KAC/C,CAAA,IACL;IACR,EAAA,CAAA;GAEI,CAAA;EACT,CAAA;CACG,CAAA;AAEtB"}
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["X","ReactNode","Dialog","AriaDialog","Heading","Modal","ModalOverlay","ModalOverlayProps","IconButton","messages","usePanneauIntl","usePortalContainer","cx","stopPropagation","styles","DialogProps","Pick","title","children","close","headerContent","footer","isDismissable","role","size","fullScreenOnPhone","className","overlayClassName","headerClassName","bodyClassName","footerClassName","t0","$","_c","props","t1","t2","t3","t4","undefined","intl","container","t5","overlay","t6","t7","t8","modal","t9","dialog","t10","t11","header","formatMessage","body","boundary","t12","t13","DialogTrigger","Dialog","_c","styles","_Fragment","AriaDialog"],"sources":["../../src/dialog/Dialog.tsx"],"sourcesContent":["import { X } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport {\n Dialog as AriaDialog,\n Heading,\n Modal,\n ModalOverlay,\n type ModalOverlayProps,\n} from 'react-aria-components';\n\nimport { IconButton } from '../icon-button/IconButton';\nimport { messages } from '../intl/messages';\nimport { usePanneauIntl } from '../intl/usePanneauIntl';\nimport { usePortalContainer } from '../root/PanneauRoot';\nimport { cx } from '../utils/cx';\nimport { stopPropagation } from '../utils/events';\nimport styles from './Dialog.module.css';\n\nexport interface DialogProps extends Pick<\n ModalOverlayProps,\n 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'isKeyboardDismissDisabled'\n> {\n /** Heading of the dialog, which also labels it. */\n title: ReactNode;\n /** Content, or a function that gets `close()`. */\n children?: ReactNode | ((close: () => void) => ReactNode);\n /**\n * More content in the header, between the title and the close button: a switcher, a few\n * actions. On phones, it goes under the title. A function gets `close()`.\n */\n headerContent?: ReactNode | ((close: () => void) => ReactNode);\n /** Buttons at the bottom, or a function that gets `close()`. */\n footer?: ReactNode | ((close: () => void) => ReactNode);\n /**\n * Closes on a click outside and shows a close button. Defaults to true. Turn it off for dialogs\n * that need an answer.\n */\n isDismissable?: boolean;\n /** `alertdialog` for confirmations and interruptions. Defaults to `dialog`. */\n role?: 'dialog' | 'alertdialog';\n /** Maximum width: `sm`, `md` (the default), `lg`, or `xl` for pickers and editors. */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n /**\n * On phones, takes the whole screen instead of opening as a sheet at the bottom: for dialogs\n * that need all the room they can get, such as pickers.\n */\n fullScreenOnPhone?: boolean;\n className?: string;\n overlayClassName?: string;\n headerClassName?: string;\n bodyClassName?: string;\n footerClassName?: string;\n}\n\n/**\n * A modal dialog. Controlled with `isOpen` and `onOpenChange`, or inside a `DialogTrigger` with\n * its button as the first child. It traps focus, closes with Escape, and returns focus when it\n * closes. On phones, it opens as a sheet at the bottom of the screen, or takes the whole screen with\n * `fullScreenOnPhone`.\n */\nexport function Dialog({\n title,\n children,\n headerContent,\n footer,\n isDismissable = true,\n role = 'dialog',\n size = 'md',\n fullScreenOnPhone = false,\n className,\n overlayClassName,\n headerClassName,\n bodyClassName,\n footerClassName,\n ...props\n}: DialogProps) {\n const intl = usePanneauIntl();\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <ModalOverlay\n {...props}\n isDismissable={isDismissable}\n className={cx(styles.overlay, overlayClassName)}\n UNSTABLE_portalContainer={container}\n >\n <Modal\n className={cx(\n styles.modal,\n styles[size],\n fullScreenOnPhone && styles.fullScreenOnPhone,\n )}\n >\n {/* React bubbles events through portals to the components around the dialog: a\n form in the dialog must not submit a form of the page (#146). */}\n <div className={styles.boundary} onSubmit={stopPropagation}>\n <AriaDialog\n role={role}\n className={cx('panneau-dialog', styles.dialog, className)}\n >\n {({ close }) => (\n <>\n <div className={cx(styles.header, headerClassName)}>\n <Heading slot=\"title\" className={styles.title}>\n {title}\n </Heading>\n {headerContent !== undefined && headerContent !== null ? (\n <div className={styles.headerContent}>\n {typeof headerContent === 'function'\n ? headerContent(close)\n : headerContent}\n </div>\n ) : null}\n {isDismissable ? (\n <IconButton\n icon={X}\n size=\"sm\"\n label={intl.formatMessage(messages.close)}\n showTooltip={false}\n onPress={close}\n />\n ) : null}\n </div>\n <div className={cx(styles.body, bodyClassName)}>\n {typeof children === 'function' ? children(close) : children}\n </div>\n {footer !== undefined && footer !== null ? (\n <div className={cx(styles.footer, footerClassName)}>\n {typeof footer === 'function' ? footer(close) : footer}\n </div>\n ) : null}\n </>\n )}\n </AriaDialog>\n </div>\n </Modal>\n </ModalOverlay>\n );\n}\n\nexport { DialogTrigger } from 'react-aria-components';\n"],"mappings":"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"}
|
|
@@ -1,30 +1,38 @@
|
|
|
1
1
|
import "./Dialog.css";
|
|
2
2
|
//#region src/dialog/Dialog.module.css
|
|
3
|
-
var overlay = "panneau-overlay
|
|
4
|
-
var fade = "panneau-fade
|
|
5
|
-
var modal = "panneau-modal
|
|
6
|
-
var sm = "panneau-sm
|
|
7
|
-
var lg = "panneau-lg
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
3
|
+
var overlay = "panneau-dialog-overlay";
|
|
4
|
+
var fade = "panneau-dialog-fade";
|
|
5
|
+
var modal = "panneau-dialog-modal";
|
|
6
|
+
var sm = "panneau-dialog-sm";
|
|
7
|
+
var lg = "panneau-dialog-lg";
|
|
8
|
+
var xl = "panneau-dialog-xl";
|
|
9
|
+
var rise = "panneau-dialog-rise";
|
|
10
|
+
var dialog = "panneau-dialog";
|
|
11
|
+
var header = "panneau-dialog-header";
|
|
12
|
+
var headerContent = "panneau-dialog-header-content";
|
|
13
|
+
var title = "panneau-dialog-title";
|
|
14
|
+
var body = "panneau-dialog-body";
|
|
15
|
+
var footer = "panneau-dialog-footer";
|
|
16
|
+
var fullScreenOnPhone = "panneau-dialog-full-screen-on-phone";
|
|
17
|
+
var boundary = "panneau-dialog-boundary";
|
|
14
18
|
var Dialog_module_default = {
|
|
15
19
|
overlay,
|
|
16
20
|
fade,
|
|
17
21
|
modal,
|
|
18
22
|
sm,
|
|
19
23
|
lg,
|
|
24
|
+
xl,
|
|
20
25
|
rise,
|
|
21
26
|
dialog,
|
|
22
27
|
header,
|
|
28
|
+
headerContent,
|
|
23
29
|
title,
|
|
24
30
|
body,
|
|
25
|
-
footer
|
|
31
|
+
footer,
|
|
32
|
+
fullScreenOnPhone,
|
|
33
|
+
boundary
|
|
26
34
|
};
|
|
27
35
|
//#endregion
|
|
28
|
-
export { body, Dialog_module_default as default, dialog, fade, footer, header, lg, modal, overlay, rise, sm, title };
|
|
36
|
+
export { body, boundary, Dialog_module_default as default, dialog, fade, footer, fullScreenOnPhone, header, headerContent, lg, modal, overlay, rise, sm, title, xl };
|
|
29
37
|
|
|
30
38
|
//# sourceMappingURL=Dialog.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.module.js","names":[],"sources":["../../src/dialog/Dialog.module.css"],"sourcesContent":[".overlay {\n position: fixed;\n inset: 0;\n z-index: var(--panneau-z-overlay);\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100dvh;\n padding: var(--panneau-space-4);\n background-color: var(--panneau-color-backdrop);\n}\n\n.overlay[data-entering] {\n animation: fade var(--panneau-duration) ease-out;\n}\n\n.overlay[data-exiting] {\n animation: fade var(--panneau-duration) ease-in reverse;\n}\n\n.modal {\n display: flex;\n width: 100%;\n max-width: 32rem;\n max-height: calc(100dvh - 2 * var(--panneau-space-4));\n outline: none;\n}\n\n.sm {\n max-width: 24rem;\n}\n\n.lg {\n max-width: 48rem;\n}\n\n.modal[data-entering] {\n animation: rise var(--panneau-duration) ease-out;\n}\n\n.dialog {\n display: flex;\n flex-direction: column;\n width: 100%;\n max-height: inherit;\n color: var(--panneau-color-text);\n background-color: var(--panneau-color-surface-raised);\n border-radius: var(--panneau-radius-lg);\n box-shadow: var(--panneau-shadow-lg);\n outline: none;\n}\n\n.header {\n display: flex;\n align-items: flex-start;\n gap: var(--panneau-space-3);\n padding: var(--panneau-space-4) var(--panneau-space-4) 0 var(--panneau-space-5);\n}\n\n.title {\n flex: 1 1
|
|
1
|
+
{"version":3,"file":"Dialog.module.js","names":[],"sources":["../../src/dialog/Dialog.module.css"],"sourcesContent":[".overlay {\n position: fixed;\n inset: 0;\n z-index: var(--panneau-z-overlay);\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100dvh;\n padding: var(--panneau-space-4);\n background-color: var(--panneau-dialog-backdrop, var(--panneau-color-backdrop));\n}\n\n.overlay[data-entering] {\n animation: fade var(--panneau-duration) ease-out;\n}\n\n.overlay[data-exiting] {\n animation: fade var(--panneau-duration) ease-in reverse;\n}\n\n.modal {\n display: flex;\n width: 100%;\n max-width: var(--panneau-dialog-width, 32rem);\n max-height: calc(100dvh - 2 * var(--panneau-space-4));\n outline: none;\n}\n\n.sm {\n max-width: var(--panneau-dialog-width-sm, 24rem);\n}\n\n.lg {\n max-width: var(--panneau-dialog-width-lg, 48rem);\n}\n\n.xl {\n max-width: var(--panneau-dialog-width-xl, 72rem);\n}\n\n.modal[data-entering] {\n animation: rise var(--panneau-duration) ease-out;\n}\n\n.dialog {\n display: flex;\n flex-direction: column;\n width: 100%;\n max-height: inherit;\n color: var(--panneau-color-text);\n background-color: var(--panneau-dialog-bg, var(--panneau-color-surface-raised));\n border-radius: var(--panneau-dialog-radius, var(--panneau-radius-lg));\n box-shadow: var(--panneau-dialog-shadow, var(--panneau-shadow-lg));\n outline: none;\n}\n\n.header {\n display: flex;\n align-items: flex-start;\n gap: var(--panneau-space-3);\n padding: var(--panneau-space-4) var(--panneau-space-4) 0\n var(--panneau-dialog-padding-x, var(--panneau-space-5));\n}\n\n.headerContent {\n display: flex;\n flex: 0 1 auto;\n align-items: center;\n gap: var(--panneau-space-2);\n min-width: 0;\n}\n\n.title {\n flex: 1 1 12rem;\n min-width: 0;\n padding-top: var(--panneau-space-1);\n font-size: var(--panneau-dialog-title-font-size, var(--panneau-font-size-lg));\n font-weight: var(--panneau-dialog-title-font-weight, var(--panneau-font-weight-bold));\n line-height: var(--panneau-line-height-tight);\n overflow-wrap: anywhere;\n margin: 0;\n}\n\n.body {\n flex: 1 1 auto;\n min-height: 0;\n padding: var(--panneau-space-3) var(--panneau-dialog-padding-x, var(--panneau-space-5))\n var(--panneau-space-4);\n overflow-y: auto;\n}\n\n.footer {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: var(--panneau-space-2);\n padding: var(--panneau-space-3) var(--panneau-dialog-padding-x, var(--panneau-space-5))\n var(--panneau-space-4);\n border-top: var(--panneau-border-width) solid var(--panneau-color-border);\n}\n\n/* Phones: the dialog is a sheet at the bottom, with full-width buttons. */\n@media (max-width: 30rem) {\n .overlay {\n align-items: flex-end;\n padding: 0;\n }\n\n .modal,\n .sm,\n .lg,\n .xl {\n max-width: none;\n max-height: calc(100dvh - var(--panneau-space-8));\n }\n\n .dialog {\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n padding-bottom: env(safe-area-inset-bottom);\n }\n\n /* The whole screen, under the notch. */\n .fullScreenOnPhone {\n height: 100dvh;\n max-height: 100dvh;\n }\n\n .fullScreenOnPhone .dialog {\n border-radius: 0;\n padding-top: env(safe-area-inset-top);\n }\n\n /* The header's content goes under the title and the close button. */\n .header {\n flex-wrap: wrap;\n }\n\n .headerContent {\n flex: 1 1 100%;\n order: 1;\n }\n\n .footer {\n flex-direction: column-reverse;\n }\n\n .footer > * {\n width: 100%;\n }\n}\n\n@keyframes fade {\n from {\n opacity: 0;\n }\n}\n\n@keyframes rise {\n from {\n opacity: 0;\n transform: translateY(0.5rem);\n }\n}\n\n/* Stops the events that React bubbles out of the overlay, without a box of its own. */\n.boundary {\n display: contents;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of Dialog. */
|
|
2
|
+
export declare const dialogTokens: import("../index.js").ComponentTokens<"dialog", "panneau-dialog-width" | "panneau-dialog-radius" | "panneau-dialog-padding-x" | "panneau-dialog-title-font-weight" | "panneau-dialog-bg" | "panneau-dialog-shadow" | "panneau-dialog-title-font-size" | "panneau-dialog-width-sm" | "panneau-dialog-width-lg" | "panneau-dialog-width-xl" | "panneau-dialog-backdrop">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/dialog/tokens.ts"],"names":[],"mappings":"AAEA,wBAAwB;AACxB,eAAO,MAAM,YAAY,+VAuBvB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/dialog/tokens.ts
|
|
3
|
+
/** Tokens of Dialog. */
|
|
4
|
+
var dialogTokens = defineComponentTokens("dialog", {
|
|
5
|
+
/** Color of the backdrop. */
|
|
6
|
+
backdrop: "var(--panneau-color-backdrop)",
|
|
7
|
+
/** Maximum width of the default size. */
|
|
8
|
+
width: "32rem",
|
|
9
|
+
/** Maximum width of the small size. */
|
|
10
|
+
"width-sm": "24rem",
|
|
11
|
+
/** Maximum width of the large size. */
|
|
12
|
+
"width-lg": "48rem",
|
|
13
|
+
/** Maximum width of the extra large size, for pickers and editors. */
|
|
14
|
+
"width-xl": "72rem",
|
|
15
|
+
/** Background. */
|
|
16
|
+
bg: "var(--panneau-color-surface-raised)",
|
|
17
|
+
/** Corner radius. */
|
|
18
|
+
radius: "var(--panneau-radius-lg)",
|
|
19
|
+
/** Shadow. */
|
|
20
|
+
shadow: "var(--panneau-shadow-lg)",
|
|
21
|
+
/** Horizontal padding. */
|
|
22
|
+
"padding-x": "var(--panneau-space-5)",
|
|
23
|
+
/** Font size of the title. */
|
|
24
|
+
"title-font-size": "var(--panneau-font-size-lg)",
|
|
25
|
+
/** Font weight of the title. */
|
|
26
|
+
"title-font-weight": "var(--panneau-font-weight-bold)"
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { dialogTokens };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","dialogTokens","backdrop","width","bg","radius","shadow"],"sources":["../../src/dialog/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Dialog. */\nexport const dialogTokens = defineComponentTokens('dialog', {\n /** Color of the backdrop. */\n backdrop: 'var(--panneau-color-backdrop)',\n /** Maximum width of the default size. */\n width: '32rem',\n /** Maximum width of the small size. */\n 'width-sm': '24rem',\n /** Maximum width of the large size. */\n 'width-lg': '48rem',\n /** Maximum width of the extra large size, for pickers and editors. */\n 'width-xl': '72rem',\n /** Background. */\n bg: 'var(--panneau-color-surface-raised)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-lg)',\n /** Shadow. */\n shadow: 'var(--panneau-shadow-lg)',\n /** Horizontal padding. */\n 'padding-x': 'var(--panneau-space-5)',\n /** Font size of the title. */\n 'title-font-size': 'var(--panneau-font-size-lg)',\n /** Font weight of the title. */\n 'title-font-weight': 'var(--panneau-font-weight-bold)',\n});\n"],"mappings":";;;AAGA,IAAaC,eAAeD,sBAAsB,UAAU;;CAExDE,UAAU;;CAEVC,OAAO;;CAEP,YAAY;;CAEZ,YAAY;;CAEZ,YAAY;;CAEZC,IAAI;;CAEJC,QAAQ;;CAERC,QAAQ;;CAER,aAAa;;CAEb,mBAAmB;;CAEnB,qBAAqB;AACzB,CAAC"}
|