@mitcsutt/kiln-ui 0.1.0
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/LICENSE +21 -0
- package/README.md +73 -0
- package/dist/assets/fonts/big-shoulders-latin-ext-standard-normal.woff2 +0 -0
- package/dist/assets/fonts/big-shoulders-latin-standard-normal.woff2 +0 -0
- package/dist/assets/fonts/bricolage-grotesque-latin-ext-standard-normal.woff2 +0 -0
- package/dist/assets/fonts/bricolage-grotesque-latin-standard-normal.woff2 +0 -0
- package/dist/assets/fonts/licenses/big-shoulders.txt +93 -0
- package/dist/assets/fonts/licenses/bricolage-grotesque.txt +93 -0
- package/dist/assets/fonts/licenses/martian-mono.txt +93 -0
- package/dist/assets/fonts/licenses/newsreader.txt +93 -0
- package/dist/assets/fonts/licenses/schibsted-grotesk.txt +93 -0
- package/dist/assets/fonts/martian-mono-latin-ext-standard-normal.woff2 +0 -0
- package/dist/assets/fonts/martian-mono-latin-standard-normal.woff2 +0 -0
- package/dist/assets/fonts/newsreader-latin-ext-standard-italic.woff2 +0 -0
- package/dist/assets/fonts/newsreader-latin-ext-standard-normal.woff2 +0 -0
- package/dist/assets/fonts/newsreader-latin-standard-italic.woff2 +0 -0
- package/dist/assets/fonts/newsreader-latin-standard-normal.woff2 +0 -0
- package/dist/assets/fonts/schibsted-grotesk-latin-ext-wght-italic.woff2 +0 -0
- package/dist/assets/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2 +0 -0
- package/dist/assets/fonts/schibsted-grotesk-latin-wght-italic.woff2 +0 -0
- package/dist/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2 +0 -0
- package/dist/components/actions/Button/Button.d.ts +26 -0
- package/dist/components/actions/Button/Button.js +47 -0
- package/dist/components/actions/Button/Button.js.map +1 -0
- package/dist/components/actions/Button/Button.module.js +10 -0
- package/dist/components/actions/Button/Button.module.js.map +1 -0
- package/dist/components/actions/Button/index.d.ts +2 -0
- package/dist/components/actions/ChipGroup/ChipGroup.d.ts +50 -0
- package/dist/components/actions/ChipGroup/ChipGroup.js +104 -0
- package/dist/components/actions/ChipGroup/ChipGroup.js.map +1 -0
- package/dist/components/actions/ChipGroup/ChipGroup.module.js +6 -0
- package/dist/components/actions/ChipGroup/ChipGroup.module.js.map +1 -0
- package/dist/components/actions/ChipGroup/index.d.ts +2 -0
- package/dist/components/actions/IconButton/IconButton.d.ts +28 -0
- package/dist/components/actions/IconButton/IconButton.js +28 -0
- package/dist/components/actions/IconButton/IconButton.js.map +1 -0
- package/dist/components/actions/IconButton/IconButton.module.js +9 -0
- package/dist/components/actions/IconButton/IconButton.module.js.map +1 -0
- package/dist/components/actions/IconButton/index.d.ts +2 -0
- package/dist/components/actions/ModeToggle/ModeToggle.d.ts +28 -0
- package/dist/components/actions/ModeToggle/ModeToggle.js +63 -0
- package/dist/components/actions/ModeToggle/ModeToggle.js.map +1 -0
- package/dist/components/actions/ModeToggle/index.d.ts +2 -0
- package/dist/components/actions/SegmentedControl/SegmentedControl.d.ts +46 -0
- package/dist/components/actions/SegmentedControl/SegmentedControl.js +109 -0
- package/dist/components/actions/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/components/actions/SegmentedControl/SegmentedControl.module.js +13 -0
- package/dist/components/actions/SegmentedControl/SegmentedControl.module.js.map +1 -0
- package/dist/components/actions/SegmentedControl/index.d.ts +2 -0
- package/dist/components/actions/ToggleChip/ToggleChip.d.ts +19 -0
- package/dist/components/actions/ToggleChip/ToggleChip.js +34 -0
- package/dist/components/actions/ToggleChip/ToggleChip.js.map +1 -0
- package/dist/components/actions/ToggleChip/chip.module.js +10 -0
- package/dist/components/actions/ToggleChip/chip.module.js.map +1 -0
- package/dist/components/actions/ToggleChip/index.d.ts +2 -0
- package/dist/components/display/Avatar/Avatar.d.ts +27 -0
- package/dist/components/display/Avatar/Avatar.js +39 -0
- package/dist/components/display/Avatar/Avatar.js.map +1 -0
- package/dist/components/display/Avatar/Avatar.module.js +10 -0
- package/dist/components/display/Avatar/Avatar.module.js.map +1 -0
- package/dist/components/display/Avatar/AvatarContext.d.ts +3 -0
- package/dist/components/display/Avatar/AvatarContext.js +7 -0
- package/dist/components/display/Avatar/AvatarContext.js.map +1 -0
- package/dist/components/display/Avatar/avatarUtils.d.ts +10 -0
- package/dist/components/display/Avatar/avatarUtils.js +14 -0
- package/dist/components/display/Avatar/avatarUtils.js.map +1 -0
- package/dist/components/display/Avatar/index.d.ts +5 -0
- package/dist/components/display/AvatarGroup/AvatarGroup.d.ts +16 -0
- package/dist/components/display/AvatarGroup/AvatarGroup.js +33 -0
- package/dist/components/display/AvatarGroup/AvatarGroup.js.map +1 -0
- package/dist/components/display/AvatarGroup/AvatarGroup.module.js +9 -0
- package/dist/components/display/AvatarGroup/AvatarGroup.module.js.map +1 -0
- package/dist/components/display/AvatarGroup/index.d.ts +2 -0
- package/dist/components/display/Badge/Badge.d.ts +18 -0
- package/dist/components/display/Badge/Badge.js +23 -0
- package/dist/components/display/Badge/Badge.js.map +1 -0
- package/dist/components/display/Badge/Badge.module.js +9 -0
- package/dist/components/display/Badge/Badge.module.js.map +1 -0
- package/dist/components/display/Badge/index.d.ts +2 -0
- package/dist/components/display/Card/Card.d.ts +46 -0
- package/dist/components/display/Card/Card.js +78 -0
- package/dist/components/display/Card/Card.js.map +1 -0
- package/dist/components/display/Card/Card.module.js +15 -0
- package/dist/components/display/Card/Card.module.js.map +1 -0
- package/dist/components/display/Card/index.d.ts +2 -0
- package/dist/components/display/CodeBlock/CodeBlock.d.ts +26 -0
- package/dist/components/display/CodeBlock/CodeBlock.js +85 -0
- package/dist/components/display/CodeBlock/CodeBlock.js.map +1 -0
- package/dist/components/display/CodeBlock/CodeBlock.module.js +16 -0
- package/dist/components/display/CodeBlock/CodeBlock.module.js.map +1 -0
- package/dist/components/display/CodeBlock/index.d.ts +2 -0
- package/dist/components/display/DataList/DataList.d.ts +19 -0
- package/dist/components/display/DataList/DataList.js +31 -0
- package/dist/components/display/DataList/DataList.js.map +1 -0
- package/dist/components/display/DataList/DataList.module.js +11 -0
- package/dist/components/display/DataList/DataList.module.js.map +1 -0
- package/dist/components/display/DataList/index.d.ts +2 -0
- package/dist/components/display/Delta/Delta.d.ts +23 -0
- package/dist/components/display/Delta/Delta.js +42 -0
- package/dist/components/display/Delta/Delta.js.map +1 -0
- package/dist/components/display/Delta/Delta.module.js +9 -0
- package/dist/components/display/Delta/Delta.module.js.map +1 -0
- package/dist/components/display/Delta/index.d.ts +2 -0
- package/dist/components/display/EmptyState/EmptyState.d.ts +28 -0
- package/dist/components/display/EmptyState/EmptyState.js +42 -0
- package/dist/components/display/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/display/EmptyState/EmptyState.module.js +14 -0
- package/dist/components/display/EmptyState/EmptyState.module.js.map +1 -0
- package/dist/components/display/EmptyState/index.d.ts +2 -0
- package/dist/components/display/List/List.d.ts +33 -0
- package/dist/components/display/List/List.js +64 -0
- package/dist/components/display/List/List.js.map +1 -0
- package/dist/components/display/List/List.module.js +14 -0
- package/dist/components/display/List/List.module.js.map +1 -0
- package/dist/components/display/List/index.d.ts +2 -0
- package/dist/components/display/Marquee/Marquee.d.ts +46 -0
- package/dist/components/display/Marquee/Marquee.js +95 -0
- package/dist/components/display/Marquee/Marquee.js.map +1 -0
- package/dist/components/display/Marquee/Marquee.module.js +19 -0
- package/dist/components/display/Marquee/Marquee.module.js.map +1 -0
- package/dist/components/display/Marquee/index.d.ts +2 -0
- package/dist/components/display/Media/Media.d.ts +30 -0
- package/dist/components/display/Media/Media.js +47 -0
- package/dist/components/display/Media/Media.js.map +1 -0
- package/dist/components/display/Media/Media.module.js +12 -0
- package/dist/components/display/Media/Media.module.js.map +1 -0
- package/dist/components/display/Media/index.d.ts +2 -0
- package/dist/components/display/Meter/Meter.d.ts +32 -0
- package/dist/components/display/Meter/Meter.js +56 -0
- package/dist/components/display/Meter/Meter.js.map +1 -0
- package/dist/components/display/Meter/Meter.module.js +14 -0
- package/dist/components/display/Meter/Meter.module.js.map +1 -0
- package/dist/components/display/Meter/index.d.ts +4 -0
- package/dist/components/display/Meter/meterTone.d.ts +15 -0
- package/dist/components/display/Meter/meterTone.js +9 -0
- package/dist/components/display/Meter/meterTone.js.map +1 -0
- package/dist/components/display/Progress/Progress.d.ts +27 -0
- package/dist/components/display/Progress/Progress.js +45 -0
- package/dist/components/display/Progress/Progress.js.map +1 -0
- package/dist/components/display/Progress/Progress.module.js +14 -0
- package/dist/components/display/Progress/Progress.module.js.map +1 -0
- package/dist/components/display/Progress/index.d.ts +2 -0
- package/dist/components/display/Skeleton/Skeleton.d.ts +31 -0
- package/dist/components/display/Skeleton/Skeleton.js +60 -0
- package/dist/components/display/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/display/Skeleton/Skeleton.module.js +12 -0
- package/dist/components/display/Skeleton/Skeleton.module.js.map +1 -0
- package/dist/components/display/Skeleton/index.d.ts +2 -0
- package/dist/components/display/Stamp/Stamp.d.ts +25 -0
- package/dist/components/display/Stamp/Stamp.js +21 -0
- package/dist/components/display/Stamp/Stamp.js.map +1 -0
- package/dist/components/display/Stamp/Stamp.module.js +6 -0
- package/dist/components/display/Stamp/Stamp.module.js.map +1 -0
- package/dist/components/display/Stamp/index.d.ts +2 -0
- package/dist/components/display/Stat/Stat.d.ts +40 -0
- package/dist/components/display/Stat/Stat.js +46 -0
- package/dist/components/display/Stat/Stat.js.map +1 -0
- package/dist/components/display/Stat/Stat.module.js +13 -0
- package/dist/components/display/Stat/Stat.module.js.map +1 -0
- package/dist/components/display/Stat/index.d.ts +2 -0
- package/dist/components/display/Table/Table.d.ts +64 -0
- package/dist/components/display/Table/Table.js +124 -0
- package/dist/components/display/Table/Table.js.map +1 -0
- package/dist/components/display/Table/Table.module.js +18 -0
- package/dist/components/display/Table/Table.module.js.map +1 -0
- package/dist/components/display/Table/index.d.ts +2 -0
- package/dist/components/display/Tag/Tag.d.ts +21 -0
- package/dist/components/display/Tag/Tag.js +36 -0
- package/dist/components/display/Tag/Tag.js.map +1 -0
- package/dist/components/display/Tag/Tag.module.js +10 -0
- package/dist/components/display/Tag/Tag.module.js.map +1 -0
- package/dist/components/display/Tag/index.d.ts +2 -0
- package/dist/components/feedback/Alert/Alert.d.ts +33 -0
- package/dist/components/feedback/Alert/Alert.js +62 -0
- package/dist/components/feedback/Alert/Alert.js.map +1 -0
- package/dist/components/feedback/Alert/Alert.module.js +14 -0
- package/dist/components/feedback/Alert/Alert.module.js.map +1 -0
- package/dist/components/feedback/Alert/index.d.ts +2 -0
- package/dist/components/feedback/LiveIndicator/LiveIndicator.d.ts +22 -0
- package/dist/components/feedback/LiveIndicator/LiveIndicator.js +27 -0
- package/dist/components/feedback/LiveIndicator/LiveIndicator.js.map +1 -0
- package/dist/components/feedback/LiveIndicator/LiveIndicator.module.js +10 -0
- package/dist/components/feedback/LiveIndicator/LiveIndicator.module.js.map +1 -0
- package/dist/components/feedback/LiveIndicator/index.d.ts +2 -0
- package/dist/components/feedback/RelativeTime/RelativeTime.d.ts +24 -0
- package/dist/components/feedback/RelativeTime/RelativeTime.js +38 -0
- package/dist/components/feedback/RelativeTime/RelativeTime.js.map +1 -0
- package/dist/components/feedback/RelativeTime/RelativeTime.module.js +6 -0
- package/dist/components/feedback/RelativeTime/RelativeTime.module.js.map +1 -0
- package/dist/components/feedback/RelativeTime/format.d.ts +10 -0
- package/dist/components/feedback/RelativeTime/format.js +57 -0
- package/dist/components/feedback/RelativeTime/format.js.map +1 -0
- package/dist/components/feedback/RelativeTime/index.d.ts +4 -0
- package/dist/components/feedback/Spinner/Spinner.d.ts +8 -0
- package/dist/components/feedback/Spinner/Spinner.js +25 -0
- package/dist/components/feedback/Spinner/Spinner.js.map +1 -0
- package/dist/components/feedback/Spinner/Spinner.module.js +10 -0
- package/dist/components/feedback/Spinner/Spinner.module.js.map +1 -0
- package/dist/components/feedback/Spinner/index.d.ts +2 -0
- package/dist/components/feedback/StatusDot/StatusDot.d.ts +13 -0
- package/dist/components/feedback/StatusDot/StatusDot.js +26 -0
- package/dist/components/feedback/StatusDot/StatusDot.js.map +1 -0
- package/dist/components/feedback/StatusDot/StatusDot.module.js +11 -0
- package/dist/components/feedback/StatusDot/StatusDot.module.js.map +1 -0
- package/dist/components/feedback/StatusDot/index.d.ts +2 -0
- package/dist/components/inputs/AmountField/AmountField.d.ts +11 -0
- package/dist/components/inputs/AmountField/AmountField.js +26 -0
- package/dist/components/inputs/AmountField/AmountField.js.map +1 -0
- package/dist/components/inputs/AmountField/index.d.ts +2 -0
- package/dist/components/inputs/AmountInput/AmountInput.d.ts +38 -0
- package/dist/components/inputs/AmountInput/AmountInput.js +99 -0
- package/dist/components/inputs/AmountInput/AmountInput.js.map +1 -0
- package/dist/components/inputs/AmountInput/amountFormat.d.ts +5 -0
- package/dist/components/inputs/AmountInput/amountFormat.js +15 -0
- package/dist/components/inputs/AmountInput/amountFormat.js.map +1 -0
- package/dist/components/inputs/AmountInput/index.d.ts +2 -0
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +18 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +42 -0
- package/dist/components/inputs/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.module.js +12 -0
- package/dist/components/inputs/Checkbox/Checkbox.module.js.map +1 -0
- package/dist/components/inputs/Checkbox/index.d.ts +2 -0
- package/dist/components/inputs/CheckboxField/CheckboxField.d.ts +19 -0
- package/dist/components/inputs/CheckboxField/CheckboxField.js +69 -0
- package/dist/components/inputs/CheckboxField/CheckboxField.js.map +1 -0
- package/dist/components/inputs/CheckboxField/CheckboxField.module.js +12 -0
- package/dist/components/inputs/CheckboxField/CheckboxField.module.js.map +1 -0
- package/dist/components/inputs/CheckboxField/index.d.ts +2 -0
- package/dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +43 -0
- package/dist/components/inputs/CheckboxGroup/CheckboxGroup.js +159 -0
- package/dist/components/inputs/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/dist/components/inputs/CheckboxGroup/CheckboxGroup.module.js +13 -0
- package/dist/components/inputs/CheckboxGroup/CheckboxGroup.module.js.map +1 -0
- package/dist/components/inputs/CheckboxGroup/choice.d.ts +33 -0
- package/dist/components/inputs/CheckboxGroup/choice.js +41 -0
- package/dist/components/inputs/CheckboxGroup/choice.js.map +1 -0
- package/dist/components/inputs/CheckboxGroup/index.d.ts +2 -0
- package/dist/components/inputs/CheckboxGroupField/CheckboxGroupField.d.ts +12 -0
- package/dist/components/inputs/CheckboxGroupField/CheckboxGroupField.js +24 -0
- package/dist/components/inputs/CheckboxGroupField/CheckboxGroupField.js.map +1 -0
- package/dist/components/inputs/CheckboxGroupField/index.d.ts +2 -0
- package/dist/components/inputs/ChipGroupField/ChipGroupField.d.ts +12 -0
- package/dist/components/inputs/ChipGroupField/ChipGroupField.js +24 -0
- package/dist/components/inputs/ChipGroupField/ChipGroupField.js.map +1 -0
- package/dist/components/inputs/ChipGroupField/index.d.ts +2 -0
- package/dist/components/inputs/ChoiceCards/ChoiceCards.d.ts +50 -0
- package/dist/components/inputs/ChoiceCards/ChoiceCards.js +130 -0
- package/dist/components/inputs/ChoiceCards/ChoiceCards.js.map +1 -0
- package/dist/components/inputs/ChoiceCards/ChoiceCards.module.js +15 -0
- package/dist/components/inputs/ChoiceCards/ChoiceCards.module.js.map +1 -0
- package/dist/components/inputs/ChoiceCards/index.d.ts +2 -0
- package/dist/components/inputs/ChoiceCardsField/ChoiceCardsField.d.ts +12 -0
- package/dist/components/inputs/ChoiceCardsField/ChoiceCardsField.js +24 -0
- package/dist/components/inputs/ChoiceCardsField/ChoiceCardsField.js.map +1 -0
- package/dist/components/inputs/ChoiceCardsField/index.d.ts +2 -0
- package/dist/components/inputs/ColorField/ColorField.d.ts +12 -0
- package/dist/components/inputs/ColorField/ColorField.js +26 -0
- package/dist/components/inputs/ColorField/ColorField.js.map +1 -0
- package/dist/components/inputs/ColorField/index.d.ts +2 -0
- package/dist/components/inputs/ColorInput/ColorInput.d.ts +30 -0
- package/dist/components/inputs/ColorInput/ColorInput.js +149 -0
- package/dist/components/inputs/ColorInput/ColorInput.js.map +1 -0
- package/dist/components/inputs/ColorInput/ColorInput.module.js +13 -0
- package/dist/components/inputs/ColorInput/ColorInput.module.js.map +1 -0
- package/dist/components/inputs/ColorInput/colorFormat.d.ts +2 -0
- package/dist/components/inputs/ColorInput/colorFormat.js +10 -0
- package/dist/components/inputs/ColorInput/colorFormat.js.map +1 -0
- package/dist/components/inputs/ColorInput/index.d.ts +2 -0
- package/dist/components/inputs/Combobox/Combobox.d.ts +74 -0
- package/dist/components/inputs/Combobox/Combobox.js +394 -0
- package/dist/components/inputs/Combobox/Combobox.js.map +1 -0
- package/dist/components/inputs/Combobox/Combobox.module.js +28 -0
- package/dist/components/inputs/Combobox/Combobox.module.js.map +1 -0
- package/dist/components/inputs/Combobox/index.d.ts +2 -0
- package/dist/components/inputs/Combobox/storyData.d.ts +7 -0
- package/dist/components/inputs/Combobox/useControllableState.d.ts +8 -0
- package/dist/components/inputs/Combobox/useControllableState.js +13 -0
- package/dist/components/inputs/Combobox/useControllableState.js.map +1 -0
- package/dist/components/inputs/ComboboxField/ComboboxField.d.ts +17 -0
- package/dist/components/inputs/ComboboxField/ComboboxField.js +26 -0
- package/dist/components/inputs/ComboboxField/ComboboxField.js.map +1 -0
- package/dist/components/inputs/ComboboxField/index.d.ts +2 -0
- package/dist/components/inputs/DateRangeField/DateRangeField.d.ts +37 -0
- package/dist/components/inputs/DateRangeField/DateRangeField.js +87 -0
- package/dist/components/inputs/DateRangeField/DateRangeField.js.map +1 -0
- package/dist/components/inputs/DateRangeField/DateRangeField.module.js +10 -0
- package/dist/components/inputs/DateRangeField/DateRangeField.module.js.map +1 -0
- package/dist/components/inputs/DateRangeField/index.d.ts +2 -0
- package/dist/components/inputs/Field/Field.d.ts +79 -0
- package/dist/components/inputs/Field/Field.js +100 -0
- package/dist/components/inputs/Field/Field.js.map +1 -0
- package/dist/components/inputs/Field/Field.module.js +12 -0
- package/dist/components/inputs/Field/Field.module.js.map +1 -0
- package/dist/components/inputs/Field/index.d.ts +4 -0
- package/dist/components/inputs/Fieldset/Fieldset.d.ts +48 -0
- package/dist/components/inputs/Fieldset/Fieldset.js +83 -0
- package/dist/components/inputs/Fieldset/Fieldset.js.map +1 -0
- package/dist/components/inputs/Fieldset/Fieldset.module.js +12 -0
- package/dist/components/inputs/Fieldset/Fieldset.module.js.map +1 -0
- package/dist/components/inputs/Fieldset/index.d.ts +2 -0
- package/dist/components/inputs/FileDrop/FileDrop.d.ts +60 -0
- package/dist/components/inputs/FileDrop/FileDrop.js +189 -0
- package/dist/components/inputs/FileDrop/FileDrop.js.map +1 -0
- package/dist/components/inputs/FileDrop/FileDrop.module.js +21 -0
- package/dist/components/inputs/FileDrop/FileDrop.module.js.map +1 -0
- package/dist/components/inputs/FileDrop/fileUtils.d.ts +11 -0
- package/dist/components/inputs/FileDrop/fileUtils.js +38 -0
- package/dist/components/inputs/FileDrop/fileUtils.js.map +1 -0
- package/dist/components/inputs/FileDrop/index.d.ts +2 -0
- package/dist/components/inputs/FileField/FileField.d.ts +12 -0
- package/dist/components/inputs/FileField/FileField.js +26 -0
- package/dist/components/inputs/FileField/FileField.js.map +1 -0
- package/dist/components/inputs/FileField/index.d.ts +2 -0
- package/dist/components/inputs/Input/Input.d.ts +25 -0
- package/dist/components/inputs/Input/Input.js +62 -0
- package/dist/components/inputs/Input/Input.js.map +1 -0
- package/dist/components/inputs/Input/Input.module.js +10 -0
- package/dist/components/inputs/Input/Input.module.js.map +1 -0
- package/dist/components/inputs/Input/index.d.ts +2 -0
- package/dist/components/inputs/NumberField/NumberField.d.ts +11 -0
- package/dist/components/inputs/NumberField/NumberField.js +26 -0
- package/dist/components/inputs/NumberField/NumberField.js.map +1 -0
- package/dist/components/inputs/NumberField/index.d.ts +2 -0
- package/dist/components/inputs/NumberInput/NumberInput.d.ts +35 -0
- package/dist/components/inputs/NumberInput/NumberInput.js +139 -0
- package/dist/components/inputs/NumberInput/NumberInput.js.map +1 -0
- package/dist/components/inputs/NumberInput/NumberInput.module.js +6 -0
- package/dist/components/inputs/NumberInput/NumberInput.module.js.map +1 -0
- package/dist/components/inputs/NumberInput/index.d.ts +2 -0
- package/dist/components/inputs/NumberInput/numberFormat.d.ts +24 -0
- package/dist/components/inputs/NumberInput/numberFormat.js +48 -0
- package/dist/components/inputs/NumberInput/numberFormat.js.map +1 -0
- package/dist/components/inputs/OneTimeCodeField/OneTimeCodeField.d.ts +12 -0
- package/dist/components/inputs/OneTimeCodeField/OneTimeCodeField.js +26 -0
- package/dist/components/inputs/OneTimeCodeField/OneTimeCodeField.js.map +1 -0
- package/dist/components/inputs/OneTimeCodeField/index.d.ts +2 -0
- package/dist/components/inputs/OneTimeCodeInput/OneTimeCodeInput.d.ts +35 -0
- package/dist/components/inputs/OneTimeCodeInput/OneTimeCodeInput.js +56 -0
- package/dist/components/inputs/OneTimeCodeInput/OneTimeCodeInput.js.map +1 -0
- package/dist/components/inputs/OneTimeCodeInput/OneTimeCodeInput.module.js +9 -0
- package/dist/components/inputs/OneTimeCodeInput/OneTimeCodeInput.module.js.map +1 -0
- package/dist/components/inputs/OneTimeCodeInput/index.d.ts +2 -0
- package/dist/components/inputs/PasswordField/PasswordField.d.ts +13 -0
- package/dist/components/inputs/PasswordField/PasswordField.js +29 -0
- package/dist/components/inputs/PasswordField/PasswordField.js.map +1 -0
- package/dist/components/inputs/PasswordField/index.d.ts +2 -0
- package/dist/components/inputs/PasswordInput/PasswordInput.d.ts +22 -0
- package/dist/components/inputs/PasswordInput/PasswordInput.js +75 -0
- package/dist/components/inputs/PasswordInput/PasswordInput.js.map +1 -0
- package/dist/components/inputs/PasswordInput/PasswordInput.module.js +6 -0
- package/dist/components/inputs/PasswordInput/PasswordInput.module.js.map +1 -0
- package/dist/components/inputs/PasswordInput/index.d.ts +2 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +19 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.js +68 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.module.js +15 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.module.js.map +1 -0
- package/dist/components/inputs/RadioGroup/index.d.ts +2 -0
- package/dist/components/inputs/RadioGroupField/RadioGroupField.d.ts +16 -0
- package/dist/components/inputs/RadioGroupField/RadioGroupField.js +33 -0
- package/dist/components/inputs/RadioGroupField/RadioGroupField.js.map +1 -0
- package/dist/components/inputs/RadioGroupField/index.d.ts +2 -0
- package/dist/components/inputs/RangeSlider/RangeSlider.d.ts +23 -0
- package/dist/components/inputs/RangeSlider/RangeSlider.js +63 -0
- package/dist/components/inputs/RangeSlider/RangeSlider.js.map +1 -0
- package/dist/components/inputs/RangeSlider/index.d.ts +2 -0
- package/dist/components/inputs/RangeSliderField/RangeSliderField.d.ts +12 -0
- package/dist/components/inputs/RangeSliderField/RangeSliderField.js +24 -0
- package/dist/components/inputs/RangeSliderField/RangeSliderField.js.map +1 -0
- package/dist/components/inputs/RangeSliderField/index.d.ts +2 -0
- package/dist/components/inputs/Rating/Rating.d.ts +31 -0
- package/dist/components/inputs/Rating/Rating.js +66 -0
- package/dist/components/inputs/Rating/Rating.js.map +1 -0
- package/dist/components/inputs/Rating/Rating.module.js +10 -0
- package/dist/components/inputs/Rating/Rating.module.js.map +1 -0
- package/dist/components/inputs/Rating/index.d.ts +2 -0
- package/dist/components/inputs/RatingField/RatingField.d.ts +12 -0
- package/dist/components/inputs/RatingField/RatingField.js +24 -0
- package/dist/components/inputs/RatingField/RatingField.js.map +1 -0
- package/dist/components/inputs/RatingField/index.d.ts +2 -0
- package/dist/components/inputs/SegmentedField/SegmentedField.d.ts +12 -0
- package/dist/components/inputs/SegmentedField/SegmentedField.js +24 -0
- package/dist/components/inputs/SegmentedField/SegmentedField.js.map +1 -0
- package/dist/components/inputs/SegmentedField/index.d.ts +2 -0
- package/dist/components/inputs/Select/Select.d.ts +66 -0
- package/dist/components/inputs/Select/Select.js +165 -0
- package/dist/components/inputs/Select/Select.js.map +1 -0
- package/dist/components/inputs/Select/Select.module.js +19 -0
- package/dist/components/inputs/Select/Select.module.js.map +1 -0
- package/dist/components/inputs/Select/index.d.ts +2 -0
- package/dist/components/inputs/SelectField/SelectField.d.ts +13 -0
- package/dist/components/inputs/SelectField/SelectField.js +26 -0
- package/dist/components/inputs/SelectField/SelectField.js.map +1 -0
- package/dist/components/inputs/SelectField/index.d.ts +2 -0
- package/dist/components/inputs/Slider/Slider.d.ts +40 -0
- package/dist/components/inputs/Slider/Slider.js +51 -0
- package/dist/components/inputs/Slider/Slider.js.map +1 -0
- package/dist/components/inputs/Slider/Slider.module.js +15 -0
- package/dist/components/inputs/Slider/Slider.module.js.map +1 -0
- package/dist/components/inputs/Slider/SliderBase.d.ts +37 -0
- package/dist/components/inputs/Slider/SliderBase.js +85 -0
- package/dist/components/inputs/Slider/SliderBase.js.map +1 -0
- package/dist/components/inputs/Slider/index.d.ts +2 -0
- package/dist/components/inputs/SliderField/SliderField.d.ts +12 -0
- package/dist/components/inputs/SliderField/SliderField.js +24 -0
- package/dist/components/inputs/SliderField/SliderField.js.map +1 -0
- package/dist/components/inputs/SliderField/index.d.ts +2 -0
- package/dist/components/inputs/Switch/Switch.d.ts +18 -0
- package/dist/components/inputs/Switch/Switch.js +46 -0
- package/dist/components/inputs/Switch/Switch.js.map +1 -0
- package/dist/components/inputs/Switch/Switch.module.js +11 -0
- package/dist/components/inputs/Switch/Switch.module.js.map +1 -0
- package/dist/components/inputs/Switch/index.d.ts +2 -0
- package/dist/components/inputs/SwitchField/SwitchField.d.ts +13 -0
- package/dist/components/inputs/SwitchField/SwitchField.js +73 -0
- package/dist/components/inputs/SwitchField/SwitchField.js.map +1 -0
- package/dist/components/inputs/SwitchField/SwitchField.module.js +12 -0
- package/dist/components/inputs/SwitchField/SwitchField.module.js.map +1 -0
- package/dist/components/inputs/SwitchField/index.d.ts +2 -0
- package/dist/components/inputs/TagsField/TagsField.d.ts +12 -0
- package/dist/components/inputs/TagsField/TagsField.js +26 -0
- package/dist/components/inputs/TagsField/TagsField.js.map +1 -0
- package/dist/components/inputs/TagsField/index.d.ts +2 -0
- package/dist/components/inputs/TagsInput/TagsInput.d.ts +35 -0
- package/dist/components/inputs/TagsInput/TagsInput.js +155 -0
- package/dist/components/inputs/TagsInput/TagsInput.js.map +1 -0
- package/dist/components/inputs/TagsInput/TagsInput.module.js +13 -0
- package/dist/components/inputs/TagsInput/TagsInput.module.js.map +1 -0
- package/dist/components/inputs/TagsInput/index.d.ts +2 -0
- package/dist/components/inputs/TextField/TextField.d.ts +18 -0
- package/dist/components/inputs/TextField/TextField.js +40 -0
- package/dist/components/inputs/TextField/TextField.js.map +1 -0
- package/dist/components/inputs/TextField/index.d.ts +2 -0
- package/dist/components/inputs/Textarea/Textarea.d.ts +20 -0
- package/dist/components/inputs/Textarea/Textarea.js +61 -0
- package/dist/components/inputs/Textarea/Textarea.js.map +1 -0
- package/dist/components/inputs/Textarea/Textarea.module.js +6 -0
- package/dist/components/inputs/Textarea/Textarea.module.js.map +1 -0
- package/dist/components/inputs/Textarea/index.d.ts +2 -0
- package/dist/components/inputs/TextareaField/TextareaField.d.ts +18 -0
- package/dist/components/inputs/TextareaField/TextareaField.js +40 -0
- package/dist/components/inputs/TextareaField/TextareaField.js.map +1 -0
- package/dist/components/inputs/TextareaField/index.d.ts +2 -0
- package/dist/components/inputs/internal/FieldContext.d.ts +60 -0
- package/dist/components/inputs/internal/FieldContext.js +32 -0
- package/dist/components/inputs/internal/FieldContext.js.map +1 -0
- package/dist/components/inputs/internal/control.module.js +6 -0
- package/dist/components/inputs/internal/control.module.js.map +1 -0
- package/dist/components/inputs/internal/errors.d.ts +5 -0
- package/dist/components/inputs/internal/errors.js +11 -0
- package/dist/components/inputs/internal/errors.js.map +1 -0
- package/dist/components/inputs/internal/fieldProps.d.ts +12 -0
- package/dist/components/inputs/internal/fieldProps.js +25 -0
- package/dist/components/inputs/internal/fieldProps.js.map +1 -0
- package/dist/components/inputs/internal/filterOptions.d.ts +23 -0
- package/dist/components/inputs/internal/filterOptions.js +28 -0
- package/dist/components/inputs/internal/filterOptions.js.map +1 -0
- package/dist/components/inputs/internal/messages.d.ts +40 -0
- package/dist/components/inputs/internal/messages.js +58 -0
- package/dist/components/inputs/internal/messages.js.map +1 -0
- package/dist/components/inputs/internal/messages.module.js +18 -0
- package/dist/components/inputs/internal/messages.module.js.map +1 -0
- package/dist/components/inputs/internal/refs.d.ts +7 -0
- package/dist/components/inputs/internal/refs.js +19 -0
- package/dist/components/inputs/internal/refs.js.map +1 -0
- package/dist/components/inputs/internal/storyData.d.ts +4 -0
- package/dist/components/inputs/internal/useLatest.d.ts +7 -0
- package/dist/components/inputs/internal/useLatest.js +13 -0
- package/dist/components/inputs/internal/useLatest.js.map +1 -0
- package/dist/components/layout/ActionBar/ActionBar.d.ts +30 -0
- package/dist/components/layout/ActionBar/ActionBar.js +25 -0
- package/dist/components/layout/ActionBar/ActionBar.js.map +1 -0
- package/dist/components/layout/ActionBar/ActionBar.module.js +6 -0
- package/dist/components/layout/ActionBar/ActionBar.module.js.map +1 -0
- package/dist/components/layout/ActionBar/index.d.ts +2 -0
- package/dist/components/layout/AppShell/AppShell.d.ts +33 -0
- package/dist/components/layout/AppShell/AppShell.js +70 -0
- package/dist/components/layout/AppShell/AppShell.js.map +1 -0
- package/dist/components/layout/AppShell/AppShell.module.js +14 -0
- package/dist/components/layout/AppShell/AppShell.module.js.map +1 -0
- package/dist/components/layout/AppShell/index.d.ts +2 -0
- package/dist/components/layout/AspectRatio/AspectRatio.d.ts +14 -0
- package/dist/components/layout/AspectRatio/AspectRatio.js +18 -0
- package/dist/components/layout/AspectRatio/AspectRatio.js.map +1 -0
- package/dist/components/layout/AspectRatio/AspectRatio.module.js +6 -0
- package/dist/components/layout/AspectRatio/AspectRatio.module.js.map +1 -0
- package/dist/components/layout/AspectRatio/index.d.ts +2 -0
- package/dist/components/layout/Box/Box.d.ts +29 -0
- package/dist/components/layout/Box/Box.js +26 -0
- package/dist/components/layout/Box/Box.js.map +1 -0
- package/dist/components/layout/Box/Box.module.js +6 -0
- package/dist/components/layout/Box/Box.module.js.map +1 -0
- package/dist/components/layout/Box/index.d.ts +2 -0
- package/dist/components/layout/Container/Container.d.ts +21 -0
- package/dist/components/layout/Container/Container.js +22 -0
- package/dist/components/layout/Container/Container.js.map +1 -0
- package/dist/components/layout/Container/Container.module.js +6 -0
- package/dist/components/layout/Container/Container.module.js.map +1 -0
- package/dist/components/layout/Container/index.d.ts +2 -0
- package/dist/components/layout/Divider/Divider.d.ts +28 -0
- package/dist/components/layout/Divider/Divider.js +35 -0
- package/dist/components/layout/Divider/Divider.js.map +1 -0
- package/dist/components/layout/Divider/Divider.module.js +9 -0
- package/dist/components/layout/Divider/Divider.module.js.map +1 -0
- package/dist/components/layout/Divider/index.d.ts +2 -0
- package/dist/components/layout/Grid/Grid.d.ts +50 -0
- package/dist/components/layout/Grid/Grid.js +35 -0
- package/dist/components/layout/Grid/Grid.js.map +1 -0
- package/dist/components/layout/Grid/Grid.module.js +9 -0
- package/dist/components/layout/Grid/Grid.module.js.map +1 -0
- package/dist/components/layout/Grid/index.d.ts +2 -0
- package/dist/components/layout/Inline/Inline.d.ts +24 -0
- package/dist/components/layout/Inline/Inline.js +25 -0
- package/dist/components/layout/Inline/Inline.js.map +1 -0
- package/dist/components/layout/Inline/Inline.module.js +6 -0
- package/dist/components/layout/Inline/Inline.module.js.map +1 -0
- package/dist/components/layout/Inline/index.d.ts +2 -0
- package/dist/components/layout/Section/Section.d.ts +30 -0
- package/dist/components/layout/Section/Section.js +25 -0
- package/dist/components/layout/Section/Section.js.map +1 -0
- package/dist/components/layout/Section/Section.module.js +6 -0
- package/dist/components/layout/Section/Section.module.js.map +1 -0
- package/dist/components/layout/Section/index.d.ts +2 -0
- package/dist/components/layout/Split/Split.d.ts +32 -0
- package/dist/components/layout/Split/Split.js +26 -0
- package/dist/components/layout/Split/Split.js.map +1 -0
- package/dist/components/layout/Split/Split.module.js +6 -0
- package/dist/components/layout/Split/Split.module.js.map +1 -0
- package/dist/components/layout/Split/index.d.ts +2 -0
- package/dist/components/layout/Stack/Stack.d.ts +21 -0
- package/dist/components/layout/Stack/Stack.js +25 -0
- package/dist/components/layout/Stack/Stack.js.map +1 -0
- package/dist/components/layout/Stack/Stack.module.js +6 -0
- package/dist/components/layout/Stack/Stack.module.js.map +1 -0
- package/dist/components/layout/Stack/index.d.ts +2 -0
- package/dist/components/layout/VisuallyHidden/VisuallyHidden.d.ts +20 -0
- package/dist/components/layout/VisuallyHidden/VisuallyHidden.js +17 -0
- package/dist/components/layout/VisuallyHidden/VisuallyHidden.js.map +1 -0
- package/dist/components/layout/VisuallyHidden/VisuallyHidden.module.js +6 -0
- package/dist/components/layout/VisuallyHidden/VisuallyHidden.module.js.map +1 -0
- package/dist/components/layout/VisuallyHidden/index.d.ts +2 -0
- package/dist/components/navigation/Accordion/Accordion.d.ts +35 -0
- package/dist/components/navigation/Accordion/Accordion.js +68 -0
- package/dist/components/navigation/Accordion/Accordion.js.map +1 -0
- package/dist/components/navigation/Accordion/Accordion.module.js +17 -0
- package/dist/components/navigation/Accordion/Accordion.module.js.map +1 -0
- package/dist/components/navigation/Accordion/index.d.ts +2 -0
- package/dist/components/navigation/BottomNav/BottomNav.d.ts +42 -0
- package/dist/components/navigation/BottomNav/BottomNav.js +67 -0
- package/dist/components/navigation/BottomNav/BottomNav.js.map +1 -0
- package/dist/components/navigation/BottomNav/BottomNav.module.js +16 -0
- package/dist/components/navigation/BottomNav/BottomNav.module.js.map +1 -0
- package/dist/components/navigation/BottomNav/index.d.ts +2 -0
- package/dist/components/navigation/NavLinks/NavLinks.d.ts +32 -0
- package/dist/components/navigation/NavLinks/NavLinks.js +57 -0
- package/dist/components/navigation/NavLinks/NavLinks.js.map +1 -0
- package/dist/components/navigation/NavLinks/NavLinks.module.js +11 -0
- package/dist/components/navigation/NavLinks/NavLinks.module.js.map +1 -0
- package/dist/components/navigation/NavLinks/index.d.ts +2 -0
- package/dist/components/navigation/Stepper/Stepper.d.ts +45 -0
- package/dist/components/navigation/Stepper/Stepper.js +93 -0
- package/dist/components/navigation/Stepper/Stepper.js.map +1 -0
- package/dist/components/navigation/Stepper/Stepper.module.js +19 -0
- package/dist/components/navigation/Stepper/Stepper.module.js.map +1 -0
- package/dist/components/navigation/Stepper/index.d.ts +2 -0
- package/dist/components/navigation/Tabs/Tabs.d.ts +31 -0
- package/dist/components/navigation/Tabs/Tabs.js +47 -0
- package/dist/components/navigation/Tabs/Tabs.js.map +1 -0
- package/dist/components/navigation/Tabs/Tabs.module.js +11 -0
- package/dist/components/navigation/Tabs/Tabs.module.js.map +1 -0
- package/dist/components/navigation/Tabs/index.d.ts +2 -0
- package/dist/components/overlays/Dialog/Dialog.d.ts +49 -0
- package/dist/components/overlays/Dialog/Dialog.js +97 -0
- package/dist/components/overlays/Dialog/Dialog.js.map +1 -0
- package/dist/components/overlays/Dialog/Dialog.module.js +17 -0
- package/dist/components/overlays/Dialog/Dialog.module.js.map +1 -0
- package/dist/components/overlays/Dialog/index.d.ts +2 -0
- package/dist/components/overlays/DropdownMenu/DropdownMenu.d.ts +62 -0
- package/dist/components/overlays/DropdownMenu/DropdownMenu.js +172 -0
- package/dist/components/overlays/DropdownMenu/DropdownMenu.js.map +1 -0
- package/dist/components/overlays/DropdownMenu/DropdownMenu.module.js +19 -0
- package/dist/components/overlays/DropdownMenu/DropdownMenu.module.js.map +1 -0
- package/dist/components/overlays/DropdownMenu/index.d.ts +2 -0
- package/dist/components/overlays/OverlayClose.d.ts +7 -0
- package/dist/components/overlays/OverlayClose.js +20 -0
- package/dist/components/overlays/OverlayClose.js.map +1 -0
- package/dist/components/overlays/OverlayClose.module.js +6 -0
- package/dist/components/overlays/OverlayClose.module.js.map +1 -0
- package/dist/components/overlays/Popover/Popover.d.ts +31 -0
- package/dist/components/overlays/Popover/Popover.js +75 -0
- package/dist/components/overlays/Popover/Popover.js.map +1 -0
- package/dist/components/overlays/Popover/Popover.module.js +13 -0
- package/dist/components/overlays/Popover/Popover.module.js.map +1 -0
- package/dist/components/overlays/Popover/index.d.ts +2 -0
- package/dist/components/overlays/Sheet/Sheet.d.ts +56 -0
- package/dist/components/overlays/Sheet/Sheet.js +105 -0
- package/dist/components/overlays/Sheet/Sheet.js.map +1 -0
- package/dist/components/overlays/Sheet/Sheet.module.js +20 -0
- package/dist/components/overlays/Sheet/Sheet.module.js.map +1 -0
- package/dist/components/overlays/Sheet/index.d.ts +2 -0
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +35 -0
- package/dist/components/overlays/Tooltip/Tooltip.js +64 -0
- package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/overlays/Tooltip/Tooltip.module.js +11 -0
- package/dist/components/overlays/Tooltip/Tooltip.module.js.map +1 -0
- package/dist/components/overlays/Tooltip/index.d.ts +2 -0
- package/dist/components/overlays/usePortalTheme.d.ts +44 -0
- package/dist/components/overlays/usePortalTheme.js +62 -0
- package/dist/components/overlays/usePortalTheme.js.map +1 -0
- package/dist/components/typography/Amount/Amount.d.ts +27 -0
- package/dist/components/typography/Amount/Amount.js +67 -0
- package/dist/components/typography/Amount/Amount.js.map +1 -0
- package/dist/components/typography/Amount/Amount.module.js +6 -0
- package/dist/components/typography/Amount/Amount.module.js.map +1 -0
- package/dist/components/typography/Amount/index.d.ts +2 -0
- package/dist/components/typography/Code/Code.d.ts +13 -0
- package/dist/components/typography/Code/Code.js +18 -0
- package/dist/components/typography/Code/Code.js.map +1 -0
- package/dist/components/typography/Code/Code.module.js +6 -0
- package/dist/components/typography/Code/Code.module.js.map +1 -0
- package/dist/components/typography/Code/index.d.ts +2 -0
- package/dist/components/typography/Heading/Heading.d.ts +34 -0
- package/dist/components/typography/Heading/Heading.js +46 -0
- package/dist/components/typography/Heading/Heading.js.map +1 -0
- package/dist/components/typography/Heading/Heading.module.js +6 -0
- package/dist/components/typography/Heading/Heading.module.js.map +1 -0
- package/dist/components/typography/Heading/index.d.ts +4 -0
- package/dist/components/typography/Heading/sizes.d.ts +4 -0
- package/dist/components/typography/Heading/sizes.js +13 -0
- package/dist/components/typography/Heading/sizes.js.map +1 -0
- package/dist/components/typography/Kbd/Kbd.d.ts +11 -0
- package/dist/components/typography/Kbd/Kbd.js +18 -0
- package/dist/components/typography/Kbd/Kbd.js.map +1 -0
- package/dist/components/typography/Kbd/Kbd.module.js +6 -0
- package/dist/components/typography/Kbd/Kbd.module.js.map +1 -0
- package/dist/components/typography/Kbd/index.d.ts +2 -0
- package/dist/components/typography/Link/Link.d.ts +26 -0
- package/dist/components/typography/Link/Link.js +32 -0
- package/dist/components/typography/Link/Link.js.map +1 -0
- package/dist/components/typography/Link/Link.module.js +11 -0
- package/dist/components/typography/Link/Link.module.js.map +1 -0
- package/dist/components/typography/Link/index.d.ts +2 -0
- package/dist/components/typography/Numeral/Numeral.d.ts +29 -0
- package/dist/components/typography/Numeral/Numeral.js +41 -0
- package/dist/components/typography/Numeral/Numeral.js.map +1 -0
- package/dist/components/typography/Numeral/Numeral.module.js +9 -0
- package/dist/components/typography/Numeral/Numeral.module.js.map +1 -0
- package/dist/components/typography/Numeral/format.d.ts +16 -0
- package/dist/components/typography/Numeral/format.js +30 -0
- package/dist/components/typography/Numeral/format.js.map +1 -0
- package/dist/components/typography/Numeral/index.d.ts +4 -0
- package/dist/components/typography/Prose/Prose.d.ts +16 -0
- package/dist/components/typography/Prose/Prose.js +17 -0
- package/dist/components/typography/Prose/Prose.js.map +1 -0
- package/dist/components/typography/Prose/Prose.module.js +6 -0
- package/dist/components/typography/Prose/Prose.module.js.map +1 -0
- package/dist/components/typography/Prose/index.d.ts +2 -0
- package/dist/components/typography/Quote/Quote.d.ts +20 -0
- package/dist/components/typography/Quote/Quote.js +34 -0
- package/dist/components/typography/Quote/Quote.js.map +1 -0
- package/dist/components/typography/Quote/Quote.module.js +11 -0
- package/dist/components/typography/Quote/Quote.module.js.map +1 -0
- package/dist/components/typography/Quote/index.d.ts +2 -0
- package/dist/components/typography/SectionHeader/SectionHeader.d.ts +33 -0
- package/dist/components/typography/SectionHeader/SectionHeader.js +42 -0
- package/dist/components/typography/SectionHeader/SectionHeader.js.map +1 -0
- package/dist/components/typography/SectionHeader/SectionHeader.module.js +13 -0
- package/dist/components/typography/SectionHeader/SectionHeader.module.js.map +1 -0
- package/dist/components/typography/SectionHeader/index.d.ts +2 -0
- package/dist/components/typography/Text/Text.d.ts +35 -0
- package/dist/components/typography/Text/Text.js +27 -0
- package/dist/components/typography/Text/Text.js.map +1 -0
- package/dist/components/typography/Text/Text.module.js +6 -0
- package/dist/components/typography/Text/Text.module.js.map +1 -0
- package/dist/components/typography/Text/index.d.ts +2 -0
- package/dist/icons/Icon.d.ts +14 -0
- package/dist/icons/Icon.js +30 -0
- package/dist/icons/Icon.js.map +1 -0
- package/dist/icons/Icon.module.js +6 -0
- package/dist/icons/Icon.module.js.map +1 -0
- package/dist/icons/icons.d.ts +26 -0
- package/dist/icons/icons.js +63 -0
- package/dist/icons/icons.js.map +1 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/index.d.ts +225 -0
- package/dist/index.js +117 -0
- package/dist/styles.css +2 -0
- package/dist/stylesheets.d.ts +10 -0
- package/dist/theme/ThemeProvider.d.ts +52 -0
- package/dist/theme/ThemeProvider.js +86 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/context.d.ts +20 -0
- package/dist/theme/context.js +19 -0
- package/dist/theme/context.js.map +1 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/themes.d.ts +31 -0
- package/dist/theme/themes.js +36 -0
- package/dist/theme/themes.js.map +1 -0
- package/dist/themes/fiesta.css +1 -0
- package/dist/themes/ledger.css +1 -0
- package/dist/themes/monograph.css +1 -0
- package/dist/utils/cx.d.ts +5 -0
- package/dist/utils/cx.js +8 -0
- package/dist/utils/cx.js.map +1 -0
- package/dist/utils/heading.d.ts +13 -0
- package/dist/utils/heading.js +16 -0
- package/dist/utils/heading.js.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/responsive.d.ts +28 -0
- package/dist/utils/responsive.js +40 -0
- package/dist/utils/responsive.js.map +1 -0
- package/dist/utils/tokens.d.ts +18 -0
- package/dist/utils/tokens.js +6 -0
- package/dist/utils/tokens.js.map +1 -0
- package/dist/utils/visibility.d.ts +14 -0
- package/dist/utils/visibility.js +21 -0
- package/dist/utils/visibility.js.map +1 -0
- package/dist/utils/visibility.module.js +16 -0
- package/dist/utils/visibility.module.js.map +1 -0
- package/package.json +91 -0
- package/skills/custom-theme/SKILL.md +293 -0
- package/skills/custom-theme/references/colour.md +55 -0
- package/skills/custom-theme/references/motion.md +39 -0
- package/skills/custom-theme/references/tokens.md +199 -0
- package/skills/custom-theme/references/type.md +61 -0
- package/skills/design-rules/SKILL.md +74 -0
- package/skills/layout-composition/SKILL.md +498 -0
- package/skills/layout-composition/references/action-bar.md +59 -0
- package/skills/layout-composition/references/app-shell.md +141 -0
- package/skills/layout-composition/references/aspect-ratio.md +49 -0
- package/skills/layout-composition/references/box.md +49 -0
- package/skills/layout-composition/references/checkout.md +124 -0
- package/skills/layout-composition/references/container.md +59 -0
- package/skills/layout-composition/references/dashboard.md +163 -0
- package/skills/layout-composition/references/divider.md +59 -0
- package/skills/layout-composition/references/settings.md +134 -0
- package/skills/layout-composition/references/visually-hidden.md +41 -0
- package/skills/setup-and-theming/SKILL.md +197 -0
- package/skills/setup-and-theming/references/fiesta.md +32 -0
- package/skills/setup-and-theming/references/ledger.md +32 -0
- package/skills/setup-and-theming/references/monograph.md +39 -0
- package/skills/setup-and-theming/references/paper.md +35 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { cx as e } from "../../../utils/cx.js";
|
|
2
|
+
import { CheckIcon as t, ChevronRightIcon as n } from "../../../icons/icons.js";
|
|
3
|
+
import { PortalAnchorContext as r, composeRefs as i, usePortalAnchor as a, usePortalAnchorRef as o, usePortalTheme as s } from "../usePortalTheme.js";
|
|
4
|
+
import c from "./DropdownMenu.module.js";
|
|
5
|
+
import { forwardRef as l } from "react";
|
|
6
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
+
import { DropdownMenu as f } from "radix-ui";
|
|
8
|
+
//#region src/components/overlays/DropdownMenu/DropdownMenu.tsx
|
|
9
|
+
function p(e) {
|
|
10
|
+
let t = o();
|
|
11
|
+
return /* @__PURE__ */ u(r.Provider, {
|
|
12
|
+
value: t,
|
|
13
|
+
children: /* @__PURE__ */ u(f.Root, { ...e })
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
var m = l(function(e, t) {
|
|
17
|
+
let n = a();
|
|
18
|
+
return /* @__PURE__ */ u(f.Trigger, {
|
|
19
|
+
ref: i(t, n),
|
|
20
|
+
...e
|
|
21
|
+
});
|
|
22
|
+
}), h = l(function({ container: t, align: n = "start", sideOffset: r = 6, className: i, ...a }, o) {
|
|
23
|
+
let l = s(t);
|
|
24
|
+
return /* @__PURE__ */ u(f.Content, {
|
|
25
|
+
ref: o,
|
|
26
|
+
className: e(c.content, i),
|
|
27
|
+
align: n,
|
|
28
|
+
sideOffset: r,
|
|
29
|
+
collisionPadding: 8,
|
|
30
|
+
...l,
|
|
31
|
+
...a
|
|
32
|
+
});
|
|
33
|
+
}), g = l(function({ container: e, forceMount: t, ...n }, r) {
|
|
34
|
+
return /* @__PURE__ */ u(f.Portal, {
|
|
35
|
+
container: e,
|
|
36
|
+
forceMount: t,
|
|
37
|
+
children: /* @__PURE__ */ u(h, {
|
|
38
|
+
ref: r,
|
|
39
|
+
container: e,
|
|
40
|
+
forceMount: t,
|
|
41
|
+
...n
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}), _ = l(function({ tone: t = "neutral", leadingIcon: n, shortcut: r, className: i, children: a, ...o }, s) {
|
|
45
|
+
return /* @__PURE__ */ d(f.Item, {
|
|
46
|
+
ref: s,
|
|
47
|
+
className: e(c.item, i),
|
|
48
|
+
"data-tone": t,
|
|
49
|
+
...o,
|
|
50
|
+
children: [
|
|
51
|
+
n ? /* @__PURE__ */ u("span", {
|
|
52
|
+
className: c.icon,
|
|
53
|
+
children: n
|
|
54
|
+
}) : null,
|
|
55
|
+
/* @__PURE__ */ u("span", {
|
|
56
|
+
className: c.label,
|
|
57
|
+
children: a
|
|
58
|
+
}),
|
|
59
|
+
r ? /* @__PURE__ */ u("kbd", {
|
|
60
|
+
className: c.shortcut,
|
|
61
|
+
children: r
|
|
62
|
+
}) : null
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
}), v = l(function({ shortcut: n, className: r, children: i, ...a }, o) {
|
|
66
|
+
return /* @__PURE__ */ d(f.CheckboxItem, {
|
|
67
|
+
ref: o,
|
|
68
|
+
className: e(c.item, r),
|
|
69
|
+
"data-selectable": "",
|
|
70
|
+
...a,
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ u("span", {
|
|
73
|
+
className: c.indicator,
|
|
74
|
+
children: /* @__PURE__ */ u(f.ItemIndicator, { children: /* @__PURE__ */ u(t, {}) })
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ u("span", {
|
|
77
|
+
className: c.label,
|
|
78
|
+
children: i
|
|
79
|
+
}),
|
|
80
|
+
n ? /* @__PURE__ */ u("kbd", {
|
|
81
|
+
className: c.shortcut,
|
|
82
|
+
children: n
|
|
83
|
+
}) : null
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
}), y = f.RadioGroup, b = l(function({ className: t, children: n, ...r }, i) {
|
|
87
|
+
return /* @__PURE__ */ d(f.RadioItem, {
|
|
88
|
+
ref: i,
|
|
89
|
+
className: e(c.item, t),
|
|
90
|
+
"data-selectable": "",
|
|
91
|
+
...r,
|
|
92
|
+
children: [/* @__PURE__ */ u("span", {
|
|
93
|
+
className: c.indicator,
|
|
94
|
+
children: /* @__PURE__ */ u(f.ItemIndicator, { className: c.dot })
|
|
95
|
+
}), /* @__PURE__ */ u("span", {
|
|
96
|
+
className: c.label,
|
|
97
|
+
children: n
|
|
98
|
+
})]
|
|
99
|
+
});
|
|
100
|
+
}), x = l(function({ className: t, ...n }, r) {
|
|
101
|
+
return /* @__PURE__ */ u(f.Label, {
|
|
102
|
+
ref: r,
|
|
103
|
+
className: e(c.menuLabel, t),
|
|
104
|
+
...n
|
|
105
|
+
});
|
|
106
|
+
}), S = l(function({ className: t, ...n }, r) {
|
|
107
|
+
return /* @__PURE__ */ u(f.Separator, {
|
|
108
|
+
ref: r,
|
|
109
|
+
className: e(c.separator, t),
|
|
110
|
+
...n
|
|
111
|
+
});
|
|
112
|
+
}), C = f.Group, w = f.Sub, T = l(function({ leadingIcon: t, className: r, children: i, ...a }, o) {
|
|
113
|
+
return /* @__PURE__ */ d(f.SubTrigger, {
|
|
114
|
+
ref: o,
|
|
115
|
+
className: e(c.item, r),
|
|
116
|
+
"data-tone": "neutral",
|
|
117
|
+
...a,
|
|
118
|
+
children: [
|
|
119
|
+
t ? /* @__PURE__ */ u("span", {
|
|
120
|
+
className: c.icon,
|
|
121
|
+
children: t
|
|
122
|
+
}) : null,
|
|
123
|
+
/* @__PURE__ */ u("span", {
|
|
124
|
+
className: c.label,
|
|
125
|
+
children: i
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ u("span", {
|
|
128
|
+
className: c.chevron,
|
|
129
|
+
children: /* @__PURE__ */ u(n, {})
|
|
130
|
+
})
|
|
131
|
+
]
|
|
132
|
+
});
|
|
133
|
+
}), E = l(function({ container: t, sideOffset: n = 4, className: r, ...i }, a) {
|
|
134
|
+
let o = s(t);
|
|
135
|
+
return /* @__PURE__ */ u(f.SubContent, {
|
|
136
|
+
ref: a,
|
|
137
|
+
className: e(c.content, r),
|
|
138
|
+
sideOffset: n,
|
|
139
|
+
collisionPadding: 8,
|
|
140
|
+
...o,
|
|
141
|
+
...i
|
|
142
|
+
});
|
|
143
|
+
}), D = l(function({ container: e, forceMount: t, ...n }, r) {
|
|
144
|
+
return /* @__PURE__ */ u(f.Portal, {
|
|
145
|
+
container: e,
|
|
146
|
+
forceMount: t,
|
|
147
|
+
children: /* @__PURE__ */ u(E, {
|
|
148
|
+
ref: r,
|
|
149
|
+
container: e,
|
|
150
|
+
forceMount: t,
|
|
151
|
+
...n
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
}), O = Object.assign(p, {
|
|
155
|
+
Root: p,
|
|
156
|
+
Trigger: m,
|
|
157
|
+
Content: g,
|
|
158
|
+
Item: _,
|
|
159
|
+
CheckboxItem: v,
|
|
160
|
+
RadioGroup: y,
|
|
161
|
+
RadioItem: b,
|
|
162
|
+
Label: x,
|
|
163
|
+
Separator: S,
|
|
164
|
+
Group: C,
|
|
165
|
+
Sub: w,
|
|
166
|
+
SubTrigger: T,
|
|
167
|
+
SubContent: D
|
|
168
|
+
});
|
|
169
|
+
//#endregion
|
|
170
|
+
export { O as DropdownMenu };
|
|
171
|
+
|
|
172
|
+
//# sourceMappingURL=DropdownMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.js","names":["MenuPrimitive","styles","DropdownMenu","DropdownMenu_module_default","DropdownMenuRoot","anchor","usePortalAnchorRef","PortalAnchorContext","DropdownMenu","props","DropdownMenuTrigger","forwardRef","usePortalAnchor","composeRefs","ref","ContentInner","rest","theme","usePortalTheme","container","cx","className","DropdownMenuContent","DropdownMenuItem","tone","leadingIcon","shortcut","DropdownMenuCheckboxItem","CheckIcon","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuGroup","DropdownMenuSub","DropdownMenuSubTrigger","ChevronRightIcon","SubContentInner","DropdownMenuSubContent","DropdownMenu$1"],"sources":["../../../../src/components/overlays/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ComponentRef, type ReactNode } from 'react'\nimport { DropdownMenu as MenuPrimitive } from 'radix-ui'\nimport { CheckIcon, ChevronRightIcon } from '#icons'\nimport { cx } from '#utils/cx'\nimport {\n PortalAnchorContext,\n composeRefs,\n usePortalAnchor,\n usePortalAnchorRef,\n usePortalTheme,\n} from '#components/overlays/usePortalTheme'\nimport styles from './DropdownMenu.module.css'\n\nexport type DropdownMenuProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Root>\n\n/**\n * A list of commands behind a button: row actions, a member's options, sort order.\n * Full keyboard support (arrows, typeahead, Home/End, Escape) from Radix.\n *\n * <DropdownMenu>\n * <DropdownMenu.Trigger asChild><Button>Options</Button></DropdownMenu.Trigger>\n * <DropdownMenu.Content>\n * <DropdownMenu.Item shortcut=\"⌘E\">Edit</DropdownMenu.Item>\n * <DropdownMenu.Separator />\n * <DropdownMenu.Item tone=\"critical\">Remove</DropdownMenu.Item>\n * </DropdownMenu.Content>\n * </DropdownMenu>\n */\nfunction DropdownMenuRoot(props: DropdownMenuProps) {\n const anchor = usePortalAnchorRef()\n return (\n <PortalAnchorContext.Provider value={anchor}>\n <MenuPrimitive.Root {...props} />\n </PortalAnchorContext.Provider>\n )\n}\n\nexport type DropdownMenuTriggerProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Trigger>\n\nconst DropdownMenuTrigger = forwardRef<\n ComponentRef<typeof MenuPrimitive.Trigger>,\n DropdownMenuTriggerProps\n>(function DropdownMenuTrigger(props, ref) {\n const anchor = usePortalAnchor()\n return <MenuPrimitive.Trigger ref={composeRefs(ref, anchor)} {...props} />\n})\n\nexport interface DropdownMenuContentProps extends ComponentPropsWithoutRef<\n typeof MenuPrimitive.Content\n> {\n /** Portal target. Defaults to `document.body`; its theme scope is also used. */\n container?: HTMLElement | null\n}\n\nconst ContentInner = forwardRef<HTMLDivElement, DropdownMenuContentProps>(function ContentInner(\n { container, align = 'start', sideOffset = 6, className, ...rest },\n ref,\n) {\n const theme = usePortalTheme(container)\n return (\n <MenuPrimitive.Content\n ref={ref}\n className={cx(styles.content, className)}\n align={align}\n sideOffset={sideOffset}\n collisionPadding={8}\n {...theme}\n {...rest}\n />\n )\n})\n\n/** The menu panel. Aligns to the trigger's start edge by default and flips to stay on screen. */\nconst DropdownMenuContent = forwardRef<HTMLDivElement, DropdownMenuContentProps>(\n function DropdownMenuContent({ container, forceMount, ...rest }, ref) {\n return (\n <MenuPrimitive.Portal container={container} forceMount={forceMount}>\n <ContentInner ref={ref} container={container} forceMount={forceMount} {...rest} />\n </MenuPrimitive.Portal>\n )\n },\n)\n\nexport type DropdownMenuItemTone = 'neutral' | 'critical'\n\nexport interface DropdownMenuItemProps extends ComponentPropsWithoutRef<typeof MenuPrimitive.Item> {\n /** `critical` for destructive commands. Put them last, after a separator. */\n tone?: DropdownMenuItemTone\n /** Icon before the label. Use sparingly — one menu, icons on all items or none. */\n leadingIcon?: ReactNode\n /** Keyboard shortcut hint, shown right-aligned. Display only; wire the shortcut yourself. */\n shortcut?: ReactNode\n}\n\nconst DropdownMenuItem = forwardRef<ComponentRef<typeof MenuPrimitive.Item>, DropdownMenuItemProps>(\n function DropdownMenuItem(\n { tone = 'neutral', leadingIcon, shortcut, className, children, ...rest },\n ref,\n ) {\n return (\n <MenuPrimitive.Item\n ref={ref}\n className={cx(styles.item, className)}\n data-tone={tone}\n {...rest}\n >\n {leadingIcon ? <span className={styles.icon}>{leadingIcon}</span> : null}\n <span className={styles.label}>{children}</span>\n {shortcut ? <kbd className={styles.shortcut}>{shortcut}</kbd> : null}\n </MenuPrimitive.Item>\n )\n },\n)\n\nexport interface DropdownMenuCheckboxItemProps extends ComponentPropsWithoutRef<\n typeof MenuPrimitive.CheckboxItem\n> {\n shortcut?: ReactNode\n}\n\n/** A toggle. Controlled with `checked` + `onCheckedChange`. Stays open on select only if you `preventDefault`. */\nconst DropdownMenuCheckboxItem = forwardRef<\n ComponentRef<typeof MenuPrimitive.CheckboxItem>,\n DropdownMenuCheckboxItemProps\n>(function DropdownMenuCheckboxItem({ shortcut, className, children, ...rest }, ref) {\n return (\n <MenuPrimitive.CheckboxItem\n ref={ref}\n className={cx(styles.item, className)}\n data-selectable=\"\"\n {...rest}\n >\n <span className={styles.indicator}>\n <MenuPrimitive.ItemIndicator>\n <CheckIcon />\n </MenuPrimitive.ItemIndicator>\n </span>\n <span className={styles.label}>{children}</span>\n {shortcut ? <kbd className={styles.shortcut}>{shortcut}</kbd> : null}\n </MenuPrimitive.CheckboxItem>\n )\n})\n\nexport type DropdownMenuRadioGroupProps = ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>\n\n/** One-of-many choice. `value` + `onValueChange`. */\nconst DropdownMenuRadioGroup = MenuPrimitive.RadioGroup\n\nexport type DropdownMenuRadioItemProps = ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>\n\nconst DropdownMenuRadioItem = forwardRef<\n ComponentRef<typeof MenuPrimitive.RadioItem>,\n DropdownMenuRadioItemProps\n>(function DropdownMenuRadioItem({ className, children, ...rest }, ref) {\n return (\n <MenuPrimitive.RadioItem\n ref={ref}\n className={cx(styles.item, className)}\n data-selectable=\"\"\n {...rest}\n >\n <span className={styles.indicator}>\n <MenuPrimitive.ItemIndicator className={styles.dot} />\n </span>\n <span className={styles.label}>{children}</span>\n </MenuPrimitive.RadioItem>\n )\n})\n\nexport type DropdownMenuLabelProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Label>\n\n/** A non-interactive heading for the group below it. */\nconst DropdownMenuLabel = forwardRef<\n ComponentRef<typeof MenuPrimitive.Label>,\n DropdownMenuLabelProps\n>(function DropdownMenuLabel({ className, ...rest }, ref) {\n return <MenuPrimitive.Label ref={ref} className={cx(styles.menuLabel, className)} {...rest} />\n})\n\nexport type DropdownMenuSeparatorProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>\n\nconst DropdownMenuSeparator = forwardRef<\n ComponentRef<typeof MenuPrimitive.Separator>,\n DropdownMenuSeparatorProps\n>(function DropdownMenuSeparator({ className, ...rest }, ref) {\n return <MenuPrimitive.Separator ref={ref} className={cx(styles.separator, className)} {...rest} />\n})\n\nexport type DropdownMenuGroupProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Group>\n\nconst DropdownMenuGroup = MenuPrimitive.Group\n\nexport type DropdownMenuSubProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Sub>\n\nconst DropdownMenuSub = MenuPrimitive.Sub\n\nexport interface DropdownMenuSubTriggerProps extends ComponentPropsWithoutRef<\n typeof MenuPrimitive.SubTrigger\n> {\n leadingIcon?: ReactNode\n}\n\n/** Opens a submenu on hover, click, or → . */\nconst DropdownMenuSubTrigger = forwardRef<\n ComponentRef<typeof MenuPrimitive.SubTrigger>,\n DropdownMenuSubTriggerProps\n>(function DropdownMenuSubTrigger({ leadingIcon, className, children, ...rest }, ref) {\n return (\n <MenuPrimitive.SubTrigger\n ref={ref}\n className={cx(styles.item, className)}\n data-tone=\"neutral\"\n {...rest}\n >\n {leadingIcon ? <span className={styles.icon}>{leadingIcon}</span> : null}\n <span className={styles.label}>{children}</span>\n <span className={styles.chevron}>\n <ChevronRightIcon />\n </span>\n </MenuPrimitive.SubTrigger>\n )\n})\n\nexport interface DropdownMenuSubContentProps extends ComponentPropsWithoutRef<\n typeof MenuPrimitive.SubContent\n> {\n container?: HTMLElement | null\n}\n\nconst SubContentInner = forwardRef<HTMLDivElement, DropdownMenuSubContentProps>(\n function SubContentInner({ container, sideOffset = 4, className, ...rest }, ref) {\n const theme = usePortalTheme(container)\n return (\n <MenuPrimitive.SubContent\n ref={ref}\n className={cx(styles.content, className)}\n sideOffset={sideOffset}\n collisionPadding={8}\n {...theme}\n {...rest}\n />\n )\n },\n)\n\nconst DropdownMenuSubContent = forwardRef<HTMLDivElement, DropdownMenuSubContentProps>(\n function DropdownMenuSubContent({ container, forceMount, ...rest }, ref) {\n return (\n <MenuPrimitive.Portal container={container} forceMount={forceMount}>\n <SubContentInner ref={ref} container={container} forceMount={forceMount} {...rest} />\n </MenuPrimitive.Portal>\n )\n },\n)\n\nexport const DropdownMenu = Object.assign(DropdownMenuRoot, {\n Root: DropdownMenuRoot,\n Trigger: DropdownMenuTrigger,\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n CheckboxItem: DropdownMenuCheckboxItem,\n RadioGroup: DropdownMenuRadioGroup,\n RadioItem: DropdownMenuRadioItem,\n Label: DropdownMenuLabel,\n Separator: DropdownMenuSeparator,\n Group: DropdownMenuGroup,\n Sub: DropdownMenuSub,\n SubTrigger: DropdownMenuSubTrigger,\n SubContent: DropdownMenuSubContent,\n})\n"],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/components/overlays/DropdownMenu/DropdownMenu.module.css
|
|
2
|
+
var e = "kiln-DropdownMenu__content", t = "kiln-DropdownMenu__item", n = "kiln-DropdownMenu__label", r = "kiln-DropdownMenu__icon", i = "kiln-DropdownMenu__chevron", a = "kiln-DropdownMenu__indicator", o = "kiln-DropdownMenu__dot", s = "kiln-DropdownMenu__shortcut", c = "kiln-DropdownMenu__menuLabel", l = "kiln-DropdownMenu__separator", u = {
|
|
3
|
+
content: e,
|
|
4
|
+
"menu-in": "kiln-DropdownMenu__menu-in",
|
|
5
|
+
"menu-out": "kiln-DropdownMenu__menu-out",
|
|
6
|
+
item: t,
|
|
7
|
+
label: n,
|
|
8
|
+
icon: r,
|
|
9
|
+
chevron: i,
|
|
10
|
+
indicator: a,
|
|
11
|
+
dot: o,
|
|
12
|
+
shortcut: s,
|
|
13
|
+
menuLabel: c,
|
|
14
|
+
separator: l
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { i as chevron, e as content, u as default, o as dot, r as icon, a as indicator, t as item, n as label, c as menuLabel, l as separator, s as shortcut };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=DropdownMenu.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.module.js","names":["content","item","label","icon","chevron","indicator","dot","shortcut","menuLabel","separator","DropdownMenu_module_default"],"sources":["../../../../src/components/overlays/DropdownMenu/DropdownMenu.module.css"],"sourcesContent":["/*\n * Component tokens (themes may set any of these on [data-theme]):\n * --menu-radius default var(--radius-field) (items nest inside: radius − padding)\n * --menu-shadow default var(--shadow-float)\n * --menu-border default var(--color-line-strong)\n * --menu-surface default var(--color-surface-raised)\n * --menu-highlight default var(--color-surface-sunken) (keyboard/pointer highlight — a fill, never a ring)\n */\n.content {\n z-index: var(--z-popover);\n min-inline-size: max(\n calc(var(--width-narrow) * 0.375),\n var(--radix-dropdown-menu-trigger-width, 0px)\n );\n max-inline-size: min(\n calc(var(--width-narrow) * 0.75),\n var(--radix-dropdown-menu-content-available-width, 100vw)\n );\n max-block-size: var(--radix-dropdown-menu-content-available-height);\n overflow-y: auto;\n padding: var(--space-1);\n border: var(--border-width) solid var(--menu-border, var(--color-line-strong));\n border-radius: var(--menu-radius, var(--radius-field));\n background: var(--menu-surface, var(--color-surface-raised));\n box-shadow: var(--menu-shadow, var(--shadow-float));\n color: var(--color-ink);\n font-family: var(--font-text);\n font-size: var(--text-sm);\n line-height: var(--leading-snug);\n transform-origin: var(--radix-dropdown-menu-content-transform-origin);\n}\n.content:focus {\n outline: none;\n}\n.content[data-state='open'] {\n animation: menu-in var(--dur-2) var(--ease-spring);\n}\n.content[data-state='closed'] {\n animation: menu-out var(--dur-1) var(--ease-out);\n}\n\n.item {\n --_radius: max(0px, calc(var(--menu-radius, var(--radius-field)) - var(--space-1)));\n\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--space-2);\n min-block-size: var(--control-sm);\n padding-inline: var(--space-3);\n border-radius: var(--_radius);\n color: var(--color-ink);\n cursor: default;\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n.item[data-highlighted],\n.item[data-state='open'] {\n background: var(--menu-highlight, var(--color-surface-sunken));\n}\n.item[data-tone='critical'] {\n color: var(--tone-critical-text);\n}\n.item[data-tone='critical'][data-highlighted] {\n background: var(--tone-critical-soft);\n}\n.item[data-disabled] {\n color: var(--color-ink-subtle);\n opacity: 0.6;\n}\n/* Checkbox/radio rows reserve the indicator column so labels line up. */\n.item[data-selectable] {\n padding-inline-start: var(--space-2);\n}\n\n.label {\n flex: 1 1 auto;\n min-inline-size: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.icon,\n.chevron {\n display: inline-flex;\n flex: none;\n font-size: var(--text-md);\n color: var(--color-ink-muted);\n}\n.item[data-tone='critical'] .icon {\n color: inherit;\n}\n.chevron {\n margin-inline-end: calc(-1 * var(--space-1));\n color: var(--color-ink-subtle);\n}\n\n.indicator {\n display: inline-grid;\n place-items: center;\n flex: none;\n inline-size: 1.25em;\n block-size: 1.25em;\n font-size: var(--text-md);\n color: var(--color-accent-text);\n}\n.dot {\n display: block;\n inline-size: 0.4em;\n block-size: 0.4em;\n border-radius: 50%;\n background: currentColor;\n}\n\n.shortcut {\n flex: none;\n margin-inline-start: var(--space-4);\n font-family: var(--font-text);\n font-size: var(--text-xs);\n font-variant-numeric: tabular-nums;\n letter-spacing: 0.02em;\n color: var(--color-ink-subtle);\n}\n.item[data-tone='critical'] .shortcut {\n color: inherit;\n opacity: 0.75;\n}\n\n.menuLabel {\n padding: var(--space-2) var(--space-3) var(--space-1);\n font-size: var(--text-xs);\n font-weight: var(--label-weight);\n letter-spacing: var(--label-tracking);\n text-transform: var(--label-transform);\n color: var(--color-ink-subtle);\n}\n\n.separator {\n block-size: 1px;\n margin: var(--space-1) calc(-1 * var(--space-1));\n background: var(--color-line);\n}\n\n@keyframes menu-in {\n from {\n opacity: 0;\n scale: 0.97;\n }\n}\n@keyframes menu-out {\n to {\n opacity: 0;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .content[data-state] {\n animation: none;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { DropdownMenu } from './DropdownMenu.js';
|
|
2
|
+
export type { DropdownMenuProps, DropdownMenuTriggerProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuItemTone, DropdownMenuCheckboxItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuLabelProps, DropdownMenuSeparatorProps, DropdownMenuGroupProps, DropdownMenuSubProps, DropdownMenuSubTriggerProps, DropdownMenuSubContentProps, } from './DropdownMenu.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes } from 'react';
|
|
2
|
+
export interface OverlayCloseProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
/** Accessible name. Default "Close". */
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
/** Icon-only close control shared by Dialog and Sheet. Must render inside a Radix Dialog. */
|
|
7
|
+
export declare const OverlayClose: import("react").ForwardRefExoticComponent<OverlayCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cx as e } from "../../utils/cx.js";
|
|
2
|
+
import { CloseIcon as t } from "../../icons/icons.js";
|
|
3
|
+
import n from "./OverlayClose.module.js";
|
|
4
|
+
import { forwardRef as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
import { Dialog as a } from "radix-ui";
|
|
7
|
+
//#region src/components/overlays/OverlayClose.tsx
|
|
8
|
+
var o = r(function({ label: r = "Close", className: o, ...s }, c) {
|
|
9
|
+
return /* @__PURE__ */ i(a.Close, {
|
|
10
|
+
ref: c,
|
|
11
|
+
className: e(n.close, o),
|
|
12
|
+
"aria-label": r,
|
|
13
|
+
...s,
|
|
14
|
+
children: /* @__PURE__ */ i(t, {})
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { o as OverlayClose };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=OverlayClose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayClose.js","names":["DialogPrimitive","styles","OverlayClose_module_default","OverlayClose","forwardRef","rest","Dialog","cx","className","label","CloseIcon"],"sources":["../../../src/components/overlays/OverlayClose.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes } from 'react'\nimport { Dialog as DialogPrimitive } from 'radix-ui'\nimport { CloseIcon } from '#icons'\nimport { cx } from '#utils/cx'\nimport styles from './OverlayClose.module.css'\n\nexport interface OverlayCloseProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Accessible name. Default \"Close\". */\n label?: string\n}\n\n/** Icon-only close control shared by Dialog and Sheet. Must render inside a Radix Dialog. */\nexport const OverlayClose = forwardRef<HTMLButtonElement, OverlayCloseProps>(function OverlayClose(\n { label = 'Close', className, ...rest },\n ref,\n) {\n return (\n <DialogPrimitive.Close\n ref={ref}\n className={cx(styles.close, className)}\n aria-label={label}\n {...rest}\n >\n <CloseIcon />\n </DialogPrimitive.Close>\n )\n})\n"],"mappings":";;;;;;;AAYA,IAAaG,IAAeC,EAAiD,SAC3E,EAAE,WAAQ,SAAS,cAAW,GAAGC,KACjC,GACA;CACA,OACE,kBAACL,EAAgB,OAAjB;EACO;EACL,WAAWO,EAAGN,EAAO,OAAOO,CAAS;EACrC,cAAYC;EACZ,GAAIJ;EAEJ,UAAA,kBAACK,GAAD,CAAY,CAAA;CACS,CAAA;AAE3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayClose.module.js","names":["close","OverlayClose_module_default"],"sources":["../../../src/components/overlays/OverlayClose.module.css"],"sourcesContent":["/*\n * The small \"×\" in the corner of a Dialog or Sheet. Internal to the overlays group.\n *\n * Component tokens:\n * --overlay-close-radius default var(--radius-action)\n */\n.close {\n display: inline-grid;\n place-items: center;\n flex: none;\n inline-size: var(--control-sm);\n block-size: var(--control-sm);\n padding: 0;\n border: 0;\n border-radius: var(--overlay-close-radius, var(--radius-action));\n background: transparent;\n color: var(--color-ink-muted);\n font-size: var(--text-lg);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n transition:\n background-color var(--dur-1) var(--ease-out),\n color var(--dur-1) var(--ease-out);\n}\n\n@media (hover: hover) {\n .close:hover {\n background: var(--color-surface-sunken);\n color: var(--color-ink);\n }\n}\n\n.close:active {\n background: var(--color-surface-sunken);\n}\n\n.close:focus-visible {\n outline: 2px solid var(--color-focus);\n outline-offset: 2px;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { Popover as PopoverPrimitive } from 'radix-ui';
|
|
3
|
+
export type PopoverProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>;
|
|
4
|
+
/**
|
|
5
|
+
* Non-modal floating panel anchored to a trigger: invoice details, a filter, a small
|
|
6
|
+
* form. Opens on click, closes on Escape or an outside click, returns focus. For
|
|
7
|
+
* hover-only hints use `Tooltip`; for a list of commands use `DropdownMenu`.
|
|
8
|
+
*
|
|
9
|
+
* <Popover>
|
|
10
|
+
* <Popover.Trigger asChild><Button>Invoice details</Button></Popover.Trigger>
|
|
11
|
+
* <Popover.Content aria-label="Invoice details">…</Popover.Content>
|
|
12
|
+
* </Popover>
|
|
13
|
+
*/
|
|
14
|
+
declare function PopoverRoot(props: PopoverProps): import("react").JSX.Element;
|
|
15
|
+
export type PopoverTriggerProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>;
|
|
16
|
+
export type PopoverAnchorProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>;
|
|
17
|
+
export interface PopoverContentProps extends ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
|
|
18
|
+
/** Draw a small pointer toward the trigger. Default `false`. */
|
|
19
|
+
arrow?: boolean;
|
|
20
|
+
/** Portal target. Defaults to `document.body`; its theme scope is also used. */
|
|
21
|
+
container?: HTMLElement | null;
|
|
22
|
+
}
|
|
23
|
+
export type PopoverCloseProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Close>;
|
|
24
|
+
export declare const Popover: typeof PopoverRoot & {
|
|
25
|
+
Root: typeof PopoverRoot;
|
|
26
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
Anchor: import("react").ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverAnchorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
Content: import("react").ForwardRefExoticComponent<PopoverContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
|
+
Close: import("react").ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { cx as e } from "../../../utils/cx.js";
|
|
2
|
+
import { PortalAnchorContext as t, composeRefs as n, usePortalAnchor as r, usePortalAnchorRef as i, usePortalTheme as a } from "../usePortalTheme.js";
|
|
3
|
+
import o from "./Popover.module.js";
|
|
4
|
+
import { forwardRef as s } from "react";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { Popover as u } from "radix-ui";
|
|
7
|
+
//#region src/components/overlays/Popover/Popover.tsx
|
|
8
|
+
function d(e) {
|
|
9
|
+
let n = i();
|
|
10
|
+
return /* @__PURE__ */ c(t.Provider, {
|
|
11
|
+
value: n,
|
|
12
|
+
children: /* @__PURE__ */ c(u.Root, { ...e })
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
var f = s(function(e, t) {
|
|
16
|
+
let i = r();
|
|
17
|
+
return /* @__PURE__ */ c(u.Trigger, {
|
|
18
|
+
ref: n(t, i),
|
|
19
|
+
...e
|
|
20
|
+
});
|
|
21
|
+
}), p = s(function(e, t) {
|
|
22
|
+
let i = r();
|
|
23
|
+
return /* @__PURE__ */ c(u.Anchor, {
|
|
24
|
+
ref: n(t, i),
|
|
25
|
+
...e
|
|
26
|
+
});
|
|
27
|
+
}), m = s(function({ arrow: t = !1, container: n, sideOffset: r, className: i, children: s, ...d }, f) {
|
|
28
|
+
let p = a(n);
|
|
29
|
+
return /* @__PURE__ */ l(u.Content, {
|
|
30
|
+
ref: f,
|
|
31
|
+
className: e(o.content, i),
|
|
32
|
+
sideOffset: r ?? (t ? 4 : 6),
|
|
33
|
+
collisionPadding: 8,
|
|
34
|
+
...p,
|
|
35
|
+
...d,
|
|
36
|
+
children: [s, t ? /* @__PURE__ */ c(u.Arrow, {
|
|
37
|
+
asChild: !0,
|
|
38
|
+
width: 18,
|
|
39
|
+
height: 9,
|
|
40
|
+
children: /* @__PURE__ */ l("svg", {
|
|
41
|
+
className: o.arrow,
|
|
42
|
+
viewBox: "0 0 18 9",
|
|
43
|
+
"aria-hidden": !0,
|
|
44
|
+
children: [/* @__PURE__ */ c("path", {
|
|
45
|
+
className: o.arrowFill,
|
|
46
|
+
d: "M0 0 L9 9 L18 0 Z"
|
|
47
|
+
}), /* @__PURE__ */ c("path", {
|
|
48
|
+
className: o.arrowEdge,
|
|
49
|
+
d: "M0 0 L9 9 L18 0"
|
|
50
|
+
})]
|
|
51
|
+
})
|
|
52
|
+
}) : null]
|
|
53
|
+
});
|
|
54
|
+
}), h = s(function({ container: e, forceMount: t, ...n }, r) {
|
|
55
|
+
return /* @__PURE__ */ c(u.Portal, {
|
|
56
|
+
container: e,
|
|
57
|
+
forceMount: t,
|
|
58
|
+
children: /* @__PURE__ */ c(m, {
|
|
59
|
+
ref: r,
|
|
60
|
+
container: e,
|
|
61
|
+
forceMount: t,
|
|
62
|
+
...n
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
}), g = u.Close, _ = Object.assign(d, {
|
|
66
|
+
Root: d,
|
|
67
|
+
Trigger: f,
|
|
68
|
+
Anchor: p,
|
|
69
|
+
Content: h,
|
|
70
|
+
Close: g
|
|
71
|
+
});
|
|
72
|
+
//#endregion
|
|
73
|
+
export { _ as Popover };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=Popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.js","names":["PopoverPrimitive","styles","Popover","Popover_module_default","PopoverRoot","anchor","usePortalAnchorRef","PortalAnchorContext","Popover","props","PopoverTrigger","forwardRef","usePortalAnchor","composeRefs","ref","PopoverAnchor","ContentInner","rest","theme","usePortalTheme","container","cx","className","sideOffset","arrow","children","PopoverContent","PopoverClose","Popover$1"],"sources":["../../../../src/components/overlays/Popover/Popover.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ComponentRef } from 'react'\nimport { Popover as PopoverPrimitive } from 'radix-ui'\nimport { cx } from '#utils/cx'\nimport {\n PortalAnchorContext,\n composeRefs,\n usePortalAnchor,\n usePortalAnchorRef,\n usePortalTheme,\n} from '#components/overlays/usePortalTheme'\nimport styles from './Popover.module.css'\n\nexport type PopoverProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>\n\n/**\n * Non-modal floating panel anchored to a trigger: invoice details, a filter, a small\n * form. Opens on click, closes on Escape or an outside click, returns focus. For\n * hover-only hints use `Tooltip`; for a list of commands use `DropdownMenu`.\n *\n * <Popover>\n * <Popover.Trigger asChild><Button>Invoice details</Button></Popover.Trigger>\n * <Popover.Content aria-label=\"Invoice details\">…</Popover.Content>\n * </Popover>\n */\nfunction PopoverRoot(props: PopoverProps) {\n const anchor = usePortalAnchorRef()\n return (\n <PortalAnchorContext.Provider value={anchor}>\n <PopoverPrimitive.Root {...props} />\n </PortalAnchorContext.Provider>\n )\n}\n\nexport type PopoverTriggerProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>\n\nconst PopoverTrigger = forwardRef<\n ComponentRef<typeof PopoverPrimitive.Trigger>,\n PopoverTriggerProps\n>(function PopoverTrigger(props, ref) {\n const anchor = usePortalAnchor()\n return <PopoverPrimitive.Trigger ref={composeRefs(ref, anchor)} {...props} />\n})\n\nexport type PopoverAnchorProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>\n\n/** Position against something other than the trigger. Also becomes the theme source. */\nconst PopoverAnchor = forwardRef<ComponentRef<typeof PopoverPrimitive.Anchor>, PopoverAnchorProps>(\n function PopoverAnchor(props, ref) {\n const anchor = usePortalAnchor()\n return <PopoverPrimitive.Anchor ref={composeRefs(ref, anchor)} {...props} />\n },\n)\n\nexport interface PopoverContentProps extends ComponentPropsWithoutRef<\n typeof PopoverPrimitive.Content\n> {\n /** Draw a small pointer toward the trigger. Default `false`. */\n arrow?: boolean\n /** Portal target. Defaults to `document.body`; its theme scope is also used. */\n container?: HTMLElement | null\n}\n\nconst ContentInner = forwardRef<HTMLDivElement, PopoverContentProps>(function ContentInner(\n { arrow = false, container, sideOffset, className, children, ...rest },\n ref,\n) {\n const theme = usePortalTheme(container)\n return (\n <PopoverPrimitive.Content\n ref={ref}\n className={cx(styles.content, className)}\n sideOffset={sideOffset ?? (arrow ? 4 : 6)}\n collisionPadding={8}\n {...theme}\n {...rest}\n >\n {children}\n {arrow ? (\n <PopoverPrimitive.Arrow asChild width={18} height={9}>\n <svg className={styles.arrow} viewBox=\"0 0 18 9\" aria-hidden>\n <path className={styles.arrowFill} d=\"M0 0 L9 9 L18 0 Z\" />\n <path className={styles.arrowEdge} d=\"M0 0 L9 9 L18 0\" />\n </svg>\n </PopoverPrimitive.Arrow>\n ) : null}\n </PopoverPrimitive.Content>\n )\n})\n\n/** The floating panel. `side`, `align` and `sideOffset` follow Radix; it flips to stay on screen. */\nconst PopoverContent = forwardRef<HTMLDivElement, PopoverContentProps>(function PopoverContent(\n { container, forceMount, ...rest },\n ref,\n) {\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <ContentInner ref={ref} container={container} forceMount={forceMount} {...rest} />\n </PopoverPrimitive.Portal>\n )\n})\n\nexport type PopoverCloseProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Close>\n\nconst PopoverClose = PopoverPrimitive.Close\n\nexport const Popover = Object.assign(PopoverRoot, {\n Root: PopoverRoot,\n Trigger: PopoverTrigger,\n Anchor: PopoverAnchor,\n Content: PopoverContent,\n Close: PopoverClose,\n})\n"],"mappings":";;;;;;;AAwBA,SAASI,EAAY,GAAqB;CACxC,IAAMC,IAASC,EAAmB;CAClC,OACE,kBAACC,EAAoB,UAArB;EAA8B,OAAOF;EACnC,UAAA,kBAACL,EAAiB,MAAlB,EAAuB,GAAIS,EAAQ,CAAA;CACP,CAAA;AAElC;AAIA,IAAMC,IAAiBC,EAGrB,SAAwB,GAAO,GAAK;CACpC,IAAMN,IAASO,EAAgB;CAC/B,OAAO,kBAACZ,EAAiB,SAAlB;EAA0B,KAAKa,EAAYC,GAAKT,CAAM;EAAG,GAAII;CAAQ,CAAA;AAC9E,CAAC,GAKKM,IAAgBJ,EACpB,SAAuB,GAAO,GAAK;CACjC,IAAMN,IAASO,EAAgB;CAC/B,OAAO,kBAACZ,EAAiB,QAAlB;EAAyB,KAAKa,EAAYC,GAAKT,CAAM;EAAG,GAAII;CAAQ,CAAA;AAC7E,CACF,GAWMO,IAAeL,EAAgD,SACnE,EAAE,WAAQ,IAAO,cAAW,eAAY,cAAW,aAAU,GAAGM,KAChE,GACA;CACA,IAAMC,IAAQC,EAAeC,CAAS;CACtC,OACE,kBAACpB,EAAiB,SAAlB;EACO;EACL,WAAWqB,EAAGpB,EAAO,SAASqB,CAAS;EACvC,YAAYC,MAAeC,IAAQ,IAAI;EACvC,kBAAkB;EAClB,GAAIN;EACJ,GAAID;EANN,UAAA,CAQGQ,GACAD,IACC,kBAACxB,EAAiB,OAAlB;GAAwB,SAAA;GAAQ,OAAO;GAAI,QAAQ;GACjD,UAAA,kBAAC,OAAD;IAAK,WAAWC,EAAO;IAAO,SAAQ;IAAW,eAAA;IAAjD,UAAA,CACE,kBAAC,QAAD;KAAM,WAAWA,EAAO;KAAW,GAAE;IAAqB,CAAA,GAC1D,kBAAC,QAAD;KAAM,WAAWA,EAAO;KAAW,GAAE;IAAmB,CAAA,CACrD;;EACiB,CAAA,IACtB,IACoB;;AAE9B,CAAC,GAGKyB,IAAiBf,EAAgD,SACrE,EAAE,cAAW,eAAY,GAAGM,KAC5B,GACA;CACA,OACE,kBAACjB,EAAiB,QAAlB;EAAoC;EAAuB;EACzD,UAAA,kBAACgB,GAAD;GAAmB;GAAgB;GAAuB;GAAY,GAAIC;EAAO,CAAA;CAC1D,CAAA;AAE7B,CAAC,GAIKU,IAAe3B,EAAiB,OAEzBE,IAAU,OAAO,OAAOE,GAAa;CAChD,MAAMA;CACN,SAASM;CACT,QAAQK;CACR,SAASW;CACT,OAAOC;AACT,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/components/overlays/Popover/Popover.module.css
|
|
2
|
+
var e = "kiln-Popover__content", t = "kiln-Popover__arrow", n = "kiln-Popover__arrowFill", r = "kiln-Popover__arrowEdge", i = {
|
|
3
|
+
content: e,
|
|
4
|
+
"pop-in": "kiln-Popover__pop-in",
|
|
5
|
+
"pop-out": "kiln-Popover__pop-out",
|
|
6
|
+
arrow: t,
|
|
7
|
+
arrowFill: n,
|
|
8
|
+
arrowEdge: r
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as arrow, r as arrowEdge, n as arrowFill, e as content, i as default };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=Popover.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.module.js","names":["content","arrow","arrowFill","arrowEdge","Popover_module_default"],"sources":["../../../../src/components/overlays/Popover/Popover.module.css"],"sourcesContent":["/*\n * Component tokens (themes may set any of these on [data-theme]):\n * --popover-radius default var(--radius-surface)\n * --popover-shadow default var(--shadow-float)\n * --popover-border default var(--color-line-strong)\n * --popover-surface default var(--color-surface-raised)\n */\n.content {\n --_border: var(--popover-border, var(--color-line-strong));\n --_surface: var(--popover-surface, var(--color-surface-raised));\n\n z-index: var(--z-popover);\n max-inline-size: min(\n calc(var(--width-narrow) * 0.625),\n var(--radix-popover-content-available-width, 100vw)\n );\n max-block-size: var(--radix-popover-content-available-height);\n overflow-y: auto;\n padding: var(--space-4);\n border: var(--border-width) solid var(--_border);\n border-radius: var(--popover-radius, var(--radius-surface));\n background: var(--_surface);\n box-shadow: var(--popover-shadow, var(--shadow-float));\n color: var(--color-ink);\n font-family: var(--font-text);\n font-size: var(--text-sm);\n line-height: var(--leading-body);\n transform-origin: var(--radix-popover-content-transform-origin);\n}\n/* Radix focuses the panel itself on open; it's a container, not a control. */\n.content:focus {\n outline: none;\n}\n\n.content[data-state='open'] {\n animation: pop-in var(--dur-2) var(--ease-spring);\n}\n.content[data-state='closed'] {\n animation: pop-out var(--dur-1) var(--ease-out);\n}\n\n/* Custom arrow: surface fill + keyline on the two outer edges, tucked over the border. */\n.arrow {\n display: block;\n overflow: visible;\n translate: 0 calc(-1 * var(--border-width));\n}\n.arrowFill {\n fill: var(--popover-surface, var(--color-surface-raised));\n}\n.arrowEdge {\n fill: none;\n stroke: var(--popover-border, var(--color-line-strong));\n stroke-width: var(--border-width);\n stroke-linejoin: round;\n}\n\n@keyframes pop-in {\n from {\n opacity: 0;\n scale: 0.96;\n }\n}\n@keyframes pop-out {\n to {\n opacity: 0;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .content[data-state] {\n animation: none;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { Dialog as DialogPrimitive } from 'radix-ui';
|
|
3
|
+
export type SheetSide = 'right' | 'left' | 'bottom';
|
|
4
|
+
export type SheetSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
/** A side per breakpoint: `{ base: 'bottom', md: 'right' }` — a bottom sheet on phones, a drawer from 48em. */
|
|
6
|
+
export interface SheetResponsiveSide {
|
|
7
|
+
base: SheetSide;
|
|
8
|
+
md?: SheetSide;
|
|
9
|
+
lg?: SheetSide;
|
|
10
|
+
}
|
|
11
|
+
export type SheetProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
|
|
12
|
+
/**
|
|
13
|
+
* A panel that slides in from an edge: side drawers on desktop, a bottom sheet on a
|
|
14
|
+
* phone. Built on the Radix Dialog, so it traps focus, closes on Escape or a scrim tap,
|
|
15
|
+
* locks page scroll and returns focus to its trigger.
|
|
16
|
+
*
|
|
17
|
+
* <Sheet>
|
|
18
|
+
* <Sheet.Trigger asChild><Button>Your order</Button></Sheet.Trigger>
|
|
19
|
+
* <Sheet.Content side={{ base: 'bottom', md: 'right' }} title="Your order">…</Sheet.Content>
|
|
20
|
+
* </Sheet>
|
|
21
|
+
*/
|
|
22
|
+
declare function SheetRoot(props: SheetProps): import("react").JSX.Element;
|
|
23
|
+
export type SheetTriggerProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
|
|
24
|
+
export interface SheetContentProps extends Omit<ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, 'title'> {
|
|
25
|
+
/**
|
|
26
|
+
* Edge it slides from. `bottom` is the phone pattern and shows a grab handle. Default
|
|
27
|
+
* `right`. Responsive: `{ base: 'bottom', md: 'right' }` (breakpoints `md` 48em, `lg` 64em).
|
|
28
|
+
*/
|
|
29
|
+
side?: SheetSide | SheetResponsiveSide;
|
|
30
|
+
/** Width for side sheets, maximum height for bottom sheets. Default `md`. */
|
|
31
|
+
size?: SheetSize;
|
|
32
|
+
/** Heading and accessible title. If omitted, render a `<Sheet.Title>` yourself. */
|
|
33
|
+
title?: ReactNode;
|
|
34
|
+
/** Supporting sentence under the title, wired to `aria-describedby`. */
|
|
35
|
+
description?: ReactNode;
|
|
36
|
+
/** Hide the corner close button. */
|
|
37
|
+
hideClose?: boolean;
|
|
38
|
+
/** Accessible name of the corner close button. Default "Close". */
|
|
39
|
+
closeLabel?: string;
|
|
40
|
+
/** Portal target. Defaults to `document.body`; its theme scope is also used. */
|
|
41
|
+
container?: HTMLElement | null;
|
|
42
|
+
}
|
|
43
|
+
export type SheetFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
44
|
+
export type SheetTitleProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
45
|
+
export type SheetDescriptionProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
46
|
+
export type SheetCloseProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;
|
|
47
|
+
export declare const Sheet: typeof SheetRoot & {
|
|
48
|
+
Root: typeof SheetRoot;
|
|
49
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
50
|
+
Content: import("react").ForwardRefExoticComponent<SheetContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
51
|
+
Footer: import("react").ForwardRefExoticComponent<SheetFooterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
52
|
+
Title: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
53
|
+
Description: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
54
|
+
Close: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
55
|
+
};
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { cx as e } from "../../../utils/cx.js";
|
|
2
|
+
import { PortalAnchorContext as t, composeRefs as n, usePortalAnchor as r, usePortalAnchorRef as i, usePortalTheme as a } from "../usePortalTheme.js";
|
|
3
|
+
import { OverlayClose as o } from "../OverlayClose.js";
|
|
4
|
+
import s from "./Sheet.module.js";
|
|
5
|
+
import { forwardRef as c } from "react";
|
|
6
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
+
import { Dialog as d } from "radix-ui";
|
|
8
|
+
//#region src/components/overlays/Sheet/Sheet.tsx
|
|
9
|
+
function f(e) {
|
|
10
|
+
let n = i();
|
|
11
|
+
return /* @__PURE__ */ l(t.Provider, {
|
|
12
|
+
value: n,
|
|
13
|
+
children: /* @__PURE__ */ l(d.Root, { ...e })
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
var p = c(function(e, t) {
|
|
17
|
+
let i = r();
|
|
18
|
+
return /* @__PURE__ */ l(d.Trigger, {
|
|
19
|
+
ref: n(t, i),
|
|
20
|
+
...e
|
|
21
|
+
});
|
|
22
|
+
}), m = c(function({ container: e }, t) {
|
|
23
|
+
let n = a(e);
|
|
24
|
+
return /* @__PURE__ */ l(d.Overlay, {
|
|
25
|
+
ref: t,
|
|
26
|
+
className: s.overlay,
|
|
27
|
+
...n
|
|
28
|
+
});
|
|
29
|
+
}), h = c(function({ side: t = "right", size: n = "md", title: r, description: i, hideClose: c = !1, closeLabel: f, container: p, className: m, children: h, ...g }, _) {
|
|
30
|
+
let v = a(p), y = r !== void 0 || i !== void 0 || !c, b = typeof t == "string" ? { base: t } : t, x = b.base === "bottom" || b.md === "bottom" || b.lg === "bottom";
|
|
31
|
+
return /* @__PURE__ */ u(d.Content, {
|
|
32
|
+
ref: _,
|
|
33
|
+
className: e(s.content, m),
|
|
34
|
+
"data-side": b.base,
|
|
35
|
+
"data-side-md": b.md,
|
|
36
|
+
"data-side-lg": b.lg,
|
|
37
|
+
"data-size": n,
|
|
38
|
+
...v,
|
|
39
|
+
...g,
|
|
40
|
+
children: [
|
|
41
|
+
x ? /* @__PURE__ */ l("div", {
|
|
42
|
+
className: s.handle,
|
|
43
|
+
"aria-hidden": !0
|
|
44
|
+
}) : null,
|
|
45
|
+
y ? /* @__PURE__ */ u("div", {
|
|
46
|
+
className: s.header,
|
|
47
|
+
children: [/* @__PURE__ */ u("div", {
|
|
48
|
+
className: s.heading,
|
|
49
|
+
children: [r === void 0 ? null : /* @__PURE__ */ l(d.Title, {
|
|
50
|
+
className: s.title,
|
|
51
|
+
children: r
|
|
52
|
+
}), i === void 0 ? null : /* @__PURE__ */ l(d.Description, {
|
|
53
|
+
className: s.description,
|
|
54
|
+
children: i
|
|
55
|
+
})]
|
|
56
|
+
}), c ? null : /* @__PURE__ */ l(o, { label: f })]
|
|
57
|
+
}) : null,
|
|
58
|
+
/* @__PURE__ */ l("div", {
|
|
59
|
+
className: s.body,
|
|
60
|
+
children: h
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
64
|
+
}), g = c(function({ container: e, forceMount: t, ...n }, r) {
|
|
65
|
+
return /* @__PURE__ */ u(d.Portal, {
|
|
66
|
+
container: e,
|
|
67
|
+
forceMount: t,
|
|
68
|
+
children: [/* @__PURE__ */ l(m, { container: e }), /* @__PURE__ */ l(h, {
|
|
69
|
+
ref: r,
|
|
70
|
+
container: e,
|
|
71
|
+
forceMount: t,
|
|
72
|
+
...n
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
}), _ = c(function({ className: t, ...n }, r) {
|
|
76
|
+
return /* @__PURE__ */ l("div", {
|
|
77
|
+
ref: r,
|
|
78
|
+
className: e(s.footer, t),
|
|
79
|
+
...n
|
|
80
|
+
});
|
|
81
|
+
}), v = c(function({ className: t, ...n }, r) {
|
|
82
|
+
return /* @__PURE__ */ l(d.Title, {
|
|
83
|
+
ref: r,
|
|
84
|
+
className: e(s.title, t),
|
|
85
|
+
...n
|
|
86
|
+
});
|
|
87
|
+
}), y = c(function({ className: t, ...n }, r) {
|
|
88
|
+
return /* @__PURE__ */ l(d.Description, {
|
|
89
|
+
ref: r,
|
|
90
|
+
className: e(s.description, t),
|
|
91
|
+
...n
|
|
92
|
+
});
|
|
93
|
+
}), b = d.Close, x = Object.assign(f, {
|
|
94
|
+
Root: f,
|
|
95
|
+
Trigger: p,
|
|
96
|
+
Content: g,
|
|
97
|
+
Footer: _,
|
|
98
|
+
Title: v,
|
|
99
|
+
Description: y,
|
|
100
|
+
Close: b
|
|
101
|
+
});
|
|
102
|
+
//#endregion
|
|
103
|
+
export { x as Sheet };
|
|
104
|
+
|
|
105
|
+
//# sourceMappingURL=Sheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sheet.js","names":["DialogPrimitive","styles","Sheet_module_default","SheetRoot","anchor","usePortalAnchorRef","PortalAnchorContext","Dialog","props","SheetTrigger","forwardRef","usePortalAnchor","composeRefs","ref","Overlay","theme","usePortalTheme","container","ContentInner","rest","hasHeader","title","description","hideClose","sides","side","anyBottom","cx","className","size","OverlayClose","closeLabel","SheetContent","SheetFooter","SheetTitle","SheetDescription","SheetClose","Sheet"],"sources":["../../../../src/components/overlays/Sheet/Sheet.tsx"],"sourcesContent":["import {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { Dialog as DialogPrimitive } from 'radix-ui'\nimport { cx } from '#utils/cx'\nimport {\n PortalAnchorContext,\n composeRefs,\n usePortalAnchor,\n usePortalAnchorRef,\n usePortalTheme,\n} from '#components/overlays/usePortalTheme'\nimport { OverlayClose } from '#components/overlays/OverlayClose'\nimport styles from './Sheet.module.css'\n\nexport type SheetSide = 'right' | 'left' | 'bottom'\nexport type SheetSize = 'sm' | 'md' | 'lg'\n/** A side per breakpoint: `{ base: 'bottom', md: 'right' }` — a bottom sheet on phones, a drawer from 48em. */\nexport interface SheetResponsiveSide {\n base: SheetSide\n md?: SheetSide\n lg?: SheetSide\n}\n\nexport type SheetProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Root>\n\n/**\n * A panel that slides in from an edge: side drawers on desktop, a bottom sheet on a\n * phone. Built on the Radix Dialog, so it traps focus, closes on Escape or a scrim tap,\n * locks page scroll and returns focus to its trigger.\n *\n * <Sheet>\n * <Sheet.Trigger asChild><Button>Your order</Button></Sheet.Trigger>\n * <Sheet.Content side={{ base: 'bottom', md: 'right' }} title=\"Your order\">…</Sheet.Content>\n * </Sheet>\n */\nfunction SheetRoot(props: SheetProps) {\n const anchor = usePortalAnchorRef()\n return (\n <PortalAnchorContext.Provider value={anchor}>\n <DialogPrimitive.Root {...props} />\n </PortalAnchorContext.Provider>\n )\n}\n\nexport type SheetTriggerProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>\n\nconst SheetTrigger = forwardRef<ComponentRef<typeof DialogPrimitive.Trigger>, SheetTriggerProps>(\n function SheetTrigger(props, ref) {\n const anchor = usePortalAnchor()\n return <DialogPrimitive.Trigger ref={composeRefs(ref, anchor)} {...props} />\n },\n)\n\nconst Overlay = forwardRef<HTMLDivElement, { container?: HTMLElement | null }>(function Overlay(\n { container },\n ref,\n) {\n const theme = usePortalTheme(container)\n return <DialogPrimitive.Overlay ref={ref} className={styles.overlay} {...theme} />\n})\n\nexport interface SheetContentProps extends Omit<\n ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,\n 'title'\n> {\n /**\n * Edge it slides from. `bottom` is the phone pattern and shows a grab handle. Default\n * `right`. Responsive: `{ base: 'bottom', md: 'right' }` (breakpoints `md` 48em, `lg` 64em).\n */\n side?: SheetSide | SheetResponsiveSide\n /** Width for side sheets, maximum height for bottom sheets. Default `md`. */\n size?: SheetSize\n /** Heading and accessible title. If omitted, render a `<Sheet.Title>` yourself. */\n title?: ReactNode\n /** Supporting sentence under the title, wired to `aria-describedby`. */\n description?: ReactNode\n /** Hide the corner close button. */\n hideClose?: boolean\n /** Accessible name of the corner close button. Default \"Close\". */\n closeLabel?: string\n /** Portal target. Defaults to `document.body`; its theme scope is also used. */\n container?: HTMLElement | null\n}\n\nconst ContentInner = forwardRef<HTMLDivElement, SheetContentProps>(function ContentInner(\n {\n side = 'right',\n size = 'md',\n title,\n description,\n hideClose = false,\n closeLabel,\n container,\n className,\n children,\n ...rest\n },\n ref,\n) {\n const theme = usePortalTheme(container)\n const hasHeader = title !== undefined || description !== undefined || !hideClose\n const sides: SheetResponsiveSide = typeof side === 'string' ? { base: side } : side\n const anyBottom = sides.base === 'bottom' || sides.md === 'bottom' || sides.lg === 'bottom'\n return (\n <DialogPrimitive.Content\n ref={ref}\n className={cx(styles.content, className)}\n data-side={sides.base}\n data-side-md={sides.md}\n data-side-lg={sides.lg}\n data-size={size}\n {...theme}\n {...rest}\n >\n {/* Rendered whenever any breakpoint is `bottom`; CSS shows it only where it is. */}\n {anyBottom ? <div className={styles.handle} aria-hidden /> : null}\n {hasHeader ? (\n <div className={styles.header}>\n <div className={styles.heading}>\n {title !== undefined ? (\n <DialogPrimitive.Title className={styles.title}>{title}</DialogPrimitive.Title>\n ) : null}\n {description !== undefined ? (\n <DialogPrimitive.Description className={styles.description}>\n {description}\n </DialogPrimitive.Description>\n ) : null}\n </div>\n {hideClose ? null : <OverlayClose label={closeLabel} />}\n </div>\n ) : null}\n <div className={styles.body}>{children}</div>\n </DialogPrimitive.Content>\n )\n})\n\n/** The panel, its scrim and the portal. The body scrolls; header and footer stay put. */\nconst SheetContent = forwardRef<HTMLDivElement, SheetContentProps>(function SheetContent(\n { container, forceMount, ...rest },\n ref,\n) {\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <Overlay container={container} />\n <ContentInner ref={ref} container={container} forceMount={forceMount} {...rest} />\n </DialogPrimitive.Portal>\n )\n})\n\nexport type SheetFooterProps = HTMLAttributes<HTMLDivElement>\n\n/** Actions pinned to the bottom of the sheet (sticky inside the scrolling body). */\nconst SheetFooter = forwardRef<HTMLDivElement, SheetFooterProps>(function SheetFooter(\n { className, ...rest },\n ref,\n) {\n return <div ref={ref} className={cx(styles.footer, className)} {...rest} />\n})\n\nexport type SheetTitleProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n\nconst SheetTitle = forwardRef<ComponentRef<typeof DialogPrimitive.Title>, SheetTitleProps>(\n function SheetTitle({ className, ...rest }, ref) {\n return <DialogPrimitive.Title ref={ref} className={cx(styles.title, className)} {...rest} />\n },\n)\n\nexport type SheetDescriptionProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n\nconst SheetDescription = forwardRef<\n ComponentRef<typeof DialogPrimitive.Description>,\n SheetDescriptionProps\n>(function SheetDescription({ className, ...rest }, ref) {\n return (\n <DialogPrimitive.Description\n ref={ref}\n className={cx(styles.description, className)}\n {...rest}\n />\n )\n})\n\nexport type SheetCloseProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Close>\n\nconst SheetClose = DialogPrimitive.Close\n\nexport const Sheet = Object.assign(SheetRoot, {\n Root: SheetRoot,\n Trigger: SheetTrigger,\n Content: SheetContent,\n Footer: SheetFooter,\n Title: SheetTitle,\n Description: SheetDescription,\n Close: SheetClose,\n})\n"],"mappings":"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"}
|