@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 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInput.js","names":["PasswordToggleField","styles","PasswordInput_module_default","PasswordInput","markFieldAware","forwardRef","visibleProp","idProp","disabledProp","rest","field","useResolvedField","autoId","useId","inputId","inputRef","useRef","composedRef","useMergedRefs","ref","internalVisible","setInternalVisible","useState","defaultVisible","visible","setVisible","next","onVisibleChange","setVisibleRef","useEffect","formElement","hide","handleBlur","box","event","onBlur","handleToggleBlur","input","keepFocus","unstable_PasswordToggleField","Input","hideLabel","showLabel","IconButton","jsx","EyeOffIcon","EyeIcon"],"sources":["../../../../src/components/inputs/PasswordInput/PasswordInput.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type FocusEvent,\n type MouseEvent,\n} from 'react'\nimport { unstable_PasswordToggleField as PasswordToggleField } from 'radix-ui'\nimport { EyeIcon, EyeOffIcon } from '#icons'\nimport { IconButton } from '#components/actions/IconButton'\nimport { Input, type InputProps } from '#components/inputs/Input'\nimport { markFieldAware, useResolvedField } from '#components/inputs/internal/FieldContext'\nimport { useMergedRefs } from '#components/inputs/internal/refs'\nimport styles from './PasswordInput.module.css'\n\nexport interface PasswordInputProps extends Omit<InputProps, 'type' | 'trailing'> {\n /** Required: tells password managers whether to fill a saved password or offer a new one. */\n autoComplete: 'current-password' | 'new-password'\n /** Whether the password shows as text. Controlled; pair with `onVisibleChange`. */\n visible?: boolean\n defaultVisible?: boolean\n onVisibleChange?: (visible: boolean) => void\n /** Accessible name of the toggle while hidden. Default `'Show password'`. */\n showLabel?: string\n /** Accessible name of the toggle while shown. Default `'Hide password'`. */\n hideLabel?: string\n}\n\n/**\n * A password input with a show/hide toggle at the end of the box (Radix\n * PasswordToggleField). The toggle is an IconButton whose name says what pressing it\n * does; submitting or resetting the form hides the password again. The ref goes to the\n * input; `onBlur` fires only when focus leaves the input *and* its toggle.\n *\n * <PasswordInput autoComplete=\"current-password\" />\n */\nexport const PasswordInput = markFieldAware(\n forwardRef<HTMLInputElement, PasswordInputProps>(function PasswordInput(\n {\n autoComplete,\n visible: visibleProp,\n defaultVisible = false,\n onVisibleChange,\n showLabel = 'Show password',\n hideLabel = 'Hide password',\n size = 'md',\n id: idProp,\n disabled: disabledProp,\n onBlur,\n ...rest\n },\n ref,\n ) {\n const field = useResolvedField({ id: idProp, disabled: disabledProp })\n const autoId = useId()\n const inputId = field.id ?? `${autoId}password`\n const inputRef = useRef<HTMLInputElement>(null)\n const composedRef = useMergedRefs(ref, inputRef)\n const [internalVisible, setInternalVisible] = useState(defaultVisible)\n const visible = visibleProp ?? internalVisible\n const setVisible = (next: boolean) => {\n if (visibleProp === undefined) setInternalVisible(next)\n if (next !== visible) onVisibleChange?.(next)\n }\n const setVisibleRef = useRef(setVisible)\n setVisibleRef.current = setVisible\n\n // Submitting or resetting the form hides the password (a shown password shouldn't\n // survive into the next screen or a reset form).\n useEffect(() => {\n const formElement = inputRef.current?.form\n if (!formElement) return\n const hide = () => {\n setVisibleRef.current(false)\n }\n formElement.addEventListener('submit', hide)\n formElement.addEventListener('reset', hide)\n return () => {\n formElement.removeEventListener('submit', hide)\n formElement.removeEventListener('reset', hide)\n }\n }, [])\n\n // Blur counts only when focus leaves the whole box (input + toggle).\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const box = event.currentTarget.parentElement\n if (box && event.relatedTarget instanceof Node && box.contains(event.relatedTarget)) return\n onBlur?.(event)\n }\n const handleToggleBlur = (event: FocusEvent<HTMLButtonElement>) => {\n const input = inputRef.current\n if (!input || !onBlur) return\n const box = input.parentElement\n if (box && event.relatedTarget instanceof Node && box.contains(event.relatedTarget)) return\n // Same event, typed for the input's handler: the target is the toggle that lost focus.\n onBlur(event as unknown as FocusEvent<HTMLInputElement>)\n }\n\n // A pointer press keeps focus (and the caret) in the input.\n const keepFocus = (event: MouseEvent) => {\n if (document.activeElement === inputRef.current) event.preventDefault()\n }\n\n return (\n <PasswordToggleField.Root visible={visible} onVisibilityChange={setVisible}>\n <Input\n ref={composedRef}\n {...rest}\n id={inputId}\n size={size}\n disabled={disabledProp}\n type={visible ? 'text' : 'password'}\n autoComplete={autoComplete}\n autoCapitalize=\"off\"\n autoCorrect=\"off\"\n spellCheck={false}\n onBlur={handleBlur}\n trailing={\n <PasswordToggleField.Toggle\n asChild\n id={`${inputId}-toggle`}\n aria-controls={inputId}\n aria-label={visible ? hideLabel : showLabel}\n >\n <IconButton\n className={styles.toggle}\n size=\"sm\"\n label={visible ? hideLabel : showLabel}\n icon={visible ? <EyeOffIcon /> : <EyeIcon />}\n disabled={field.disabled}\n onMouseDown={keepFocus}\n onBlur={handleToggleBlur}\n />\n </PasswordToggleField.Toggle>\n }\n />\n </PasswordToggleField.Root>\n )\n }),\n)\n"],"mappings":";;;;;;;;;;AAsCA,IAAaG,IAAgBC,EAC3BC,EAAiD,SAC/C,EACE,iBACA,SAASC,GACT,oBAAiB,IACjB,oBACA,eAAY,iBACZ,eAAY,iBACZ,UAAO,MACP,IAAIC,GACJ,UAAUC,GACV,WACA,GAAGC,KAEL,GACA;CACA,IAAMC,IAAQC,EAAiB;EAAE,IAAIJ;EAAQ,UAAUC;CAAa,CAAC,GAC/DI,IAASC,EAAM,GACfC,IAAUJ,EAAM,MAAM,GAAGE,EAAO,WAChCG,IAAWC,EAAyB,IAAI,GACxCC,IAAcC,EAAcC,GAAKJ,CAAQ,GACzC,CAACK,GAAiBC,KAAsBC,EAASC,CAAc,GAC/DC,IAAUlB,KAAec,GACzBK,KAAc,MAAkB;EAEpC,AADInB,MAAgB,KAAA,KAAWe,EAAmBK,CAAI,GAClDA,MAASF,KAASG,IAAkBD,CAAI;CAC9C,GACME,IAAgBZ,EAAOS,CAAU;CAKvC,AAJA,EAAc,UAAUA,GAIxBI,QAAgB;EACd,IAAMC,IAAcf,EAAS,SAAS;EACtC,IAAI,CAACe,GAAa;EAClB,IAAMC,UAAa;GACjB,EAAc,QAAQ,EAAK;EAC7B;EAGA,OAFAD,EAAY,iBAAiB,UAAUC,CAAI,GAC3CD,EAAY,iBAAiB,SAASC,CAAI,SAC7B;GAEX,AADAD,EAAY,oBAAoB,UAAUC,CAAI,GAC9CD,EAAY,oBAAoB,SAASC,CAAI;EAC/C;CACF,GAAG,CAAC,CAAC;CAGL,IAAMC,KAAc,MAAwC;EAC1D,IAAMC,IAAMC,EAAM,cAAc;EAChC,AAAID,KAAOC,EAAM,yBAAyB,QAAQD,EAAI,SAASC,EAAM,aAAa,KAClFC,IAASD,CAAK;CAChB,GACME,KAAoB,MAAyC;EACjE,IAAMC,IAAQtB,EAAS;EACvB,IAAI,CAACsB,KAAS,CAACF,GAAQ;EACvB,IAAMF,IAAMI,EAAM;EAClB,AAAIJ,KAAOC,EAAM,yBAAyB,QAAQD,EAAI,SAASC,EAAM,aAAa,KAElFC,EAAOD,CAAgD;CACzD,GAGMI,KAAa,MAAsB;EACvC,AAAI,SAAS,kBAAkBvB,EAAS,WAASmB,EAAM,eAAe;CACxE;CAEA,OACE,kBAAClC,EAAoB,MAArB;EAAmC;EAAS,oBAAoByB;EAC9D,UAAA,kBAACe,GAAD;GACE,KAAKvB;GACL,GAAIR;GACJ,IAAIK;GACE;GACN,UAAUN;GACV,MAAMgB,IAAU,SAAS;GACX;GACd,gBAAe;GACf,aAAY;GACZ,YAAY;GACZ,QAAQQ;GACR,UACE,kBAAChC,EAAoB,QAArB;IACE,SAAA;IACA,IAAI,GAAGc,EAAQ;IACf,iBAAeA;IACf,cAAYU,IAAUiB,IAAYC;IAElC,UAAA,kBAACC,GAAD;KACE,WAAW1C,EAAO;KAClB,MAAK;KACL,OAAOuB,IAAUiB,IAAYC;KAC7B,MAAgBE,EAAVpB,IAAWqB,IAAiBC,GAAlB,CAAa,CAAc;KAC3C,UAAUpC,EAAM;KAChB,aAAa4B;KACb,QAAQF;IACT,CAAA;GACyB,CAAA;EAE/B,CAAA;CACuB,CAAA;AAE9B,CAAC,CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInput.module.js","names":["toggle","PasswordInput_module_default"],"sources":["../../../../src/components/inputs/PasswordInput/PasswordInput.module.css"],"sourcesContent":["/*\n * The box is Input's and the toggle is an IconButton; this only seats the toggle in the\n * box's end padding. It is Button's own `sm`, so it overhangs a `sm` box a little —\n * pulled in on the block axis and toward the end edge so it never grows the box.\n */\n.toggle {\n margin-block: calc(var(--space-1) * -1);\n margin-inline-end: calc(var(--space-2) * -1);\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
import { RadioGroup as RadixRadioGroup } from 'radix-ui';
|
|
3
|
+
import type { Size } from '../../../utils/tokens.js';
|
|
4
|
+
export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof RadixRadioGroup.Root>, 'asChild'> {
|
|
5
|
+
size?: Size;
|
|
6
|
+
/** Critical border on every radio + `aria-invalid`. Inside a `<Field error>` this is set for you. */
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
/** Focusable but not editable: sets `aria-readonly` and ignores selection changes. */
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface RadioGroupItemProps extends Omit<ComponentPropsWithoutRef<typeof RadixRadioGroup.Item>, 'asChild'> {
|
|
12
|
+
/** Visible label beside the radio. Omit only if you supply `aria-label`. */
|
|
13
|
+
label?: ReactNode;
|
|
14
|
+
/** Secondary line under the label, linked with `aria-describedby`. */
|
|
15
|
+
description?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
18
|
+
Item: import("react").ForwardRefExoticComponent<RadioGroupItemProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { cx as e } from "../../../utils/cx.js";
|
|
2
|
+
import { joinIds as t } from "../internal/refs.js";
|
|
3
|
+
import { markFieldAware as n, useResolvedField as r } from "../internal/FieldContext.js";
|
|
4
|
+
import i from "../internal/messages.module.js";
|
|
5
|
+
import a from "./RadioGroup.module.js";
|
|
6
|
+
import { forwardRef as o, useId as s } from "react";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
import { RadioGroup as u } from "radix-ui";
|
|
9
|
+
//#region src/components/inputs/RadioGroup/RadioGroup.tsx
|
|
10
|
+
var d = o(function({ size: t = "md", invalid: n, orientation: i = "vertical", disabled: o, readOnly: s, onValueChange: l, className: d, "aria-describedby": f, "aria-invalid": p, "aria-labelledby": m, ...h }, g) {
|
|
11
|
+
let _ = r({
|
|
12
|
+
describedBy: f,
|
|
13
|
+
invalid: n,
|
|
14
|
+
ariaInvalid: p,
|
|
15
|
+
disabled: o,
|
|
16
|
+
readOnly: s
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ c(u.Root, {
|
|
19
|
+
ref: g,
|
|
20
|
+
className: e(a.group, d),
|
|
21
|
+
orientation: i,
|
|
22
|
+
"data-orientation": i,
|
|
23
|
+
"data-size": t,
|
|
24
|
+
"data-invalid": _.invalid || void 0,
|
|
25
|
+
"data-readonly": _.readOnly || void 0,
|
|
26
|
+
disabled: _.disabled,
|
|
27
|
+
"aria-labelledby": m ?? _.groupLabelId,
|
|
28
|
+
"aria-readonly": _.readOnly || void 0,
|
|
29
|
+
"aria-describedby": _.describedBy,
|
|
30
|
+
"aria-invalid": _.invalid || void 0,
|
|
31
|
+
"aria-required": _.required || void 0,
|
|
32
|
+
"aria-busy": _.busy || void 0,
|
|
33
|
+
onValueChange: _.readOnly ? void 0 : l,
|
|
34
|
+
...h
|
|
35
|
+
});
|
|
36
|
+
}), f = o(function({ label: n, description: r, id: o, className: d, "aria-describedby": f, ...p }, m) {
|
|
37
|
+
let h = s(), g = o ?? `${h}radio`, _ = `${g}-description`, v = /* @__PURE__ */ c(u.Item, {
|
|
38
|
+
ref: m,
|
|
39
|
+
id: g,
|
|
40
|
+
className: e(a.radio, d),
|
|
41
|
+
"aria-describedby": t(f, r != null && _),
|
|
42
|
+
...p,
|
|
43
|
+
children: /* @__PURE__ */ c(u.Indicator, { className: a.dot })
|
|
44
|
+
});
|
|
45
|
+
return n == null ? v : /* @__PURE__ */ l("div", {
|
|
46
|
+
className: a.item,
|
|
47
|
+
"data-disabled": p.disabled ? !0 : void 0,
|
|
48
|
+
children: [/* @__PURE__ */ c("span", {
|
|
49
|
+
className: a.slot,
|
|
50
|
+
children: v
|
|
51
|
+
}), /* @__PURE__ */ l("span", {
|
|
52
|
+
className: a.text,
|
|
53
|
+
children: [/* @__PURE__ */ c("label", {
|
|
54
|
+
htmlFor: g,
|
|
55
|
+
className: a.label,
|
|
56
|
+
children: n
|
|
57
|
+
}), r == null ? null : /* @__PURE__ */ c("span", {
|
|
58
|
+
id: _,
|
|
59
|
+
className: i.description,
|
|
60
|
+
children: r
|
|
61
|
+
})]
|
|
62
|
+
})]
|
|
63
|
+
});
|
|
64
|
+
}), p = n(Object.assign(d, { Item: f }));
|
|
65
|
+
//#endregion
|
|
66
|
+
export { p as RadioGroup };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","names":["RadioGroup","RadixRadioGroup","styles","messageStyles","messages_module_default","RadioGroup_module_default","RadioGroupRoot","forwardRef","invalidProp","disabledProp","readOnlyProp","describedByProp","ariaInvalid","labelledByProp","rest","field","useResolvedField","RadioGroup","cx","className","orientation","size","onValueChange","RadioGroupItem","idProp","autoId","useId","id","descriptionId","radio","joinIds","description","label","RadioGroup$1","markFieldAware"],"sources":["../../../../src/components/inputs/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { forwardRef, useId, type ComponentPropsWithoutRef, type ReactNode } from 'react'\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui'\nimport { cx } from '#utils/cx'\nimport type { Size } from '#utils/tokens'\nimport { markFieldAware, useResolvedField } from '#components/inputs/internal/FieldContext'\nimport { joinIds } from '#components/inputs/internal/refs'\nimport messageStyles from '#components/inputs/internal/messages.module.css'\nimport styles from './RadioGroup.module.css'\n\nexport interface RadioGroupProps extends Omit<\n ComponentPropsWithoutRef<typeof RadixRadioGroup.Root>,\n 'asChild'\n> {\n size?: Size\n /** Critical border on every radio + `aria-invalid`. Inside a `<Field error>` this is set for you. */\n invalid?: boolean\n /** Focusable but not editable: sets `aria-readonly` and ignores selection changes. */\n readOnly?: boolean\n}\n\n/**\n * One choice from a short list (Radix RadioGroup: arrow keys move, one tab stop).\n * Label the group with a `<Fieldset legend>`, a `<Field label>` or `aria-label`.\n *\n * <RadioGroup defaultValue=\"20\" orientation=\"horizontal\">\n * <RadioGroup.Item value=\"10\" label=\"$10\" />\n * <RadioGroup.Item value=\"20\" label=\"$20\" />\n * </RadioGroup>\n */\nconst RadioGroupRoot = forwardRef<HTMLDivElement, RadioGroupProps>(function RadioGroup(\n {\n size = 'md',\n invalid: invalidProp,\n orientation = 'vertical',\n disabled: disabledProp,\n readOnly: readOnlyProp,\n onValueChange,\n className,\n 'aria-describedby': describedByProp,\n 'aria-invalid': ariaInvalid,\n 'aria-labelledby': labelledByProp,\n ...rest\n },\n ref,\n) {\n // A group is labelled by reference, so it takes the Field's label id rather than its id.\n const field = useResolvedField({\n describedBy: describedByProp,\n invalid: invalidProp,\n ariaInvalid,\n disabled: disabledProp,\n readOnly: readOnlyProp,\n })\n return (\n <RadixRadioGroup.Root\n ref={ref}\n className={cx(styles.group, className)}\n orientation={orientation}\n data-orientation={orientation}\n data-size={size}\n data-invalid={field.invalid || undefined}\n data-readonly={field.readOnly || undefined}\n disabled={field.disabled}\n aria-labelledby={labelledByProp ?? field.groupLabelId}\n aria-readonly={field.readOnly || undefined}\n aria-describedby={field.describedBy}\n aria-invalid={field.invalid || undefined}\n aria-required={field.required || undefined}\n aria-busy={field.busy || undefined}\n onValueChange={field.readOnly ? undefined : onValueChange}\n {...rest}\n />\n )\n})\n\nexport interface RadioGroupItemProps extends Omit<\n ComponentPropsWithoutRef<typeof RadixRadioGroup.Item>,\n 'asChild'\n> {\n /** Visible label beside the radio. Omit only if you supply `aria-label`. */\n label?: ReactNode\n /** Secondary line under the label, linked with `aria-describedby`. */\n description?: ReactNode\n}\n\n/** One option. The ref and `className` go to the radio button itself. */\nconst RadioGroupItem = forwardRef<HTMLButtonElement, RadioGroupItemProps>(function RadioGroupItem(\n { label, description, id: idProp, className, 'aria-describedby': describedByProp, ...rest },\n ref,\n) {\n const autoId = useId()\n const id = idProp ?? `${autoId}radio`\n const descriptionId = `${id}-description`\n const radio = (\n <RadixRadioGroup.Item\n ref={ref}\n id={id}\n className={cx(styles.radio, className)}\n aria-describedby={joinIds(describedByProp, description != null && descriptionId)}\n {...rest}\n >\n <RadixRadioGroup.Indicator className={styles.dot} />\n </RadixRadioGroup.Item>\n )\n if (label == null) return radio\n return (\n <div className={styles.item} data-disabled={rest.disabled ? true : undefined}>\n <span className={styles.slot}>{radio}</span>\n <span className={styles.text}>\n <label htmlFor={id} className={styles.label}>\n {label}\n </label>\n {description != null ? (\n <span id={descriptionId} className={messageStyles.description}>\n {description}\n </span>\n ) : null}\n </span>\n </div>\n )\n})\n\nexport const RadioGroup = markFieldAware(Object.assign(RadioGroupRoot, { Item: RadioGroupItem }))\n"],"mappings":";;;;;;;;;AA6BA,IAAMM,IAAiBC,EAA4C,SACjE,EACE,UAAO,MACP,SAASC,GACT,iBAAc,YACd,UAAUC,GACV,UAAUC,GACV,kBACA,cACA,oBAAoBC,GACpB,gBAAgBC,GAChB,mBAAmBC,GACnB,GAAGC,KAEL,GACA;CAEA,IAAMC,IAAQC,EAAiB;EAC7B,aAAaL;EACb,SAASH;EACT;EACA,UAAUC;EACV,UAAUC;CACZ,CAAC;CACD,OACE,kBAACT,EAAgB,MAAjB;EACO;EACL,WAAWiB,EAAGhB,EAAO,OAAOiB,CAAS;EACxB;EACb,oBAAkBC;EAClB,aAAWC;EACX,gBAAcN,EAAM,WAAW,KAAA;EAC/B,iBAAeA,EAAM,YAAY,KAAA;EACjC,UAAUA,EAAM;EAChB,mBAAiBF,KAAkBE,EAAM;EACzC,iBAAeA,EAAM,YAAY,KAAA;EACjC,oBAAkBA,EAAM;EACxB,gBAAcA,EAAM,WAAW,KAAA;EAC/B,iBAAeA,EAAM,YAAY,KAAA;EACjC,aAAWA,EAAM,QAAQ,KAAA;EACzB,eAAeA,EAAM,WAAW,KAAA,IAAYO;EAC5C,GAAIR;CACL,CAAA;AAEL,CAAC,GAaKS,IAAiBhB,EAAmD,SACxE,EAAE,UAAO,gBAAa,IAAIiB,GAAQ,cAAW,oBAAoBb,GAAiB,GAAGG,KACrF,GACA;CACA,IAAMW,IAASC,EAAM,GACfC,IAAKH,KAAU,GAAGC,EAAO,QACzBG,IAAgB,GAAGD,EAAG,eACtBE,IACJ,kBAAC5B,EAAgB,MAAjB;EACO;EACD;EACJ,WAAWiB,EAAGhB,EAAO,OAAOiB,CAAS;EACrC,oBAAkBW,EAAQnB,GAAiBoB,KAAe,QAAQH,CAAa;EAC/E,GAAId;EAEJ,UAAA,kBAACb,EAAgB,WAAjB,EAA2B,WAAWC,EAAO,IAAM,CAAA;CAC/B,CAAA;CAGxB,OADI8B,KAAS,OAAaH,IAExB,kBAAC,OAAD;EAAK,WAAW3B,EAAO;EAAM,iBAAeY,EAAK,WAAW,KAAO,KAAA;EAAnE,UAAA,CACE,kBAAC,QAAD;GAAM,WAAWZ,EAAO;GAAO,UAAA2B;EAAY,CAAA,GAC3C,kBAAC,QAAD;GAAM,WAAW3B,EAAO;GAAxB,UAAA,CACE,kBAAC,SAAD;IAAO,SAASyB;IAAI,WAAWzB,EAAO;IACnC,UAAA8B;GACI,CAAA,GACND,KAAe,OAIZ,OAHF,kBAAC,QAAD;IAAM,IAAIH;IAAe,WAAWzB,EAAc;IAC/C,UAAA4B;GACG,CAAA,CAEJ;EACH,CAAA,CAAA;;AAET,CAAC,GAEY/B,IAAakC,EAAe,OAAO,OAAO5B,GAAgB,EAAE,MAAMiB,EAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/components/inputs/RadioGroup/RadioGroup.module.css
|
|
2
|
+
var e = "kiln-RadioGroup__group", t = "kiln-RadioGroup__item", n = "kiln-RadioGroup__slot", r = "kiln-RadioGroup__text", i = "kiln-RadioGroup__label", a = "kiln-RadioGroup__radio", o = "kiln-RadioGroup__dot", s = {
|
|
3
|
+
group: e,
|
|
4
|
+
item: t,
|
|
5
|
+
slot: n,
|
|
6
|
+
text: r,
|
|
7
|
+
label: i,
|
|
8
|
+
radio: a,
|
|
9
|
+
dot: o,
|
|
10
|
+
"dot-in": "kiln-RadioGroup__dot-in"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { s as default, o as dot, e as group, t as item, i as label, a as radio, n as slot, r as text };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=RadioGroup.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.module.js","names":["group","item","slot","text","label","radio","dot","RadioGroup_module_default"],"sources":["../../../../src/components/inputs/RadioGroup/RadioGroup.module.css"],"sourcesContent":["/*\n * Component tokens:\n * --control-checked-bg default var(--color-accent) (shared with Checkbox, Switch)\n * --control-checked-border default var(--color-accent)\n * --control-checked-ink default var(--color-accent-ink) (the centre dot)\n * --control-border default var(--color-line-control) (unchecked edge, ≥ 3:1)\n * --control-shadow default var(--shadow-active)\n */\n.group {\n display: flex;\n flex-direction: column;\n gap: var(--space-3);\n}\n.group[data-orientation='horizontal'] {\n flex-direction: row;\n flex-wrap: wrap;\n column-gap: var(--space-5);\n row-gap: var(--space-3);\n}\n\n.item {\n display: grid;\n grid-template-columns: auto 1fr;\n column-gap: var(--space-3);\n align-items: start;\n font-size: var(--text-md);\n line-height: var(--leading-snug);\n}\n\n/* One line tall, so the radio centres on the label's first line however long it wraps. */\n.slot {\n display: flex;\n align-items: center;\n block-size: 1lh;\n}\n\n.text {\n display: flex;\n flex-direction: column;\n gap: var(--space-1);\n min-inline-size: 0;\n}\n\n.label {\n color: var(--color-ink);\n cursor: pointer;\n}\n.item[data-disabled] .label {\n color: var(--color-ink-subtle);\n cursor: not-allowed;\n}\n\n.radio {\n --_s: calc(var(--control-sm) * 0.5625);\n /* An unchecked box is identified only by its edge, so it needs 3:1 (WCAG 1.4.11):\n line-strong alone is a ~2:1 hairline in the quieter themes. */\n --_border: var(--control-border, var(--color-line-control));\n\n all: unset;\n box-sizing: border-box;\n position: relative;\n display: inline-grid;\n flex: none;\n place-items: center;\n inline-size: var(--_s);\n block-size: var(--_s);\n border: var(--border-width) solid var(--_border);\n border-radius: 50%;\n background-color: var(--color-surface);\n box-shadow: var(--control-shadow, var(--shadow-active));\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n transition:\n background-color var(--dur-1) var(--ease-out),\n border-color var(--dur-1) var(--ease-out),\n box-shadow var(--dur-1) var(--ease-out),\n translate var(--dur-1) var(--ease-spring);\n}\n.group[data-size='sm'] .radio {\n --_s: calc(var(--control-sm) * 0.5);\n}\n.group[data-size='lg'] .radio {\n --_s: calc(var(--control-sm) * 0.6875);\n}\n\n.radio::before {\n content: '';\n position: absolute;\n inset: calc(var(--space-2) * -1);\n}\n\n@media (hover: hover) {\n .radio:hover:not([data-disabled], [data-state='checked']) {\n --_border: color-mix(in oklch, var(--color-line-strong), var(--color-ink) 65%);\n }\n}\n\n.radio[data-state='checked'] {\n --_border: var(--control-checked-border, var(--color-accent));\n background-color: var(--control-checked-bg, var(--color-accent));\n}\n\n.group[data-invalid] .radio:not([data-state='checked']) {\n --_border: var(--tone-critical);\n}\n\n.radio:active:not([data-disabled]) {\n translate: var(--active-shift) var(--active-shift);\n box-shadow: none;\n}\n\n.radio:focus-visible {\n outline: 2px solid var(--color-focus);\n outline-offset: 2px;\n}\n\n.radio[data-disabled] {\n cursor: not-allowed;\n opacity: 0.45;\n box-shadow: none;\n}\n\n.dot {\n display: block;\n inline-size: 38%;\n aspect-ratio: 1;\n border-radius: 50%;\n background-color: var(--control-checked-ink, var(--color-accent-ink));\n animation: dot-in var(--dur-2) var(--ease-spring);\n}\n\n@keyframes dot-in {\n from {\n scale: 0.2;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .dot {\n animation: none;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ChoiceOption } from '../CheckboxGroup/choice.js';
|
|
2
|
+
import type { FieldLabelProps } from '../Field/index.js';
|
|
3
|
+
import { type RadioGroupProps } from '../RadioGroup/index.js';
|
|
4
|
+
export interface RadioGroupFieldProps extends FieldLabelProps, Omit<RadioGroupProps, 'invalid' | 'children' | keyof FieldLabelProps> {
|
|
5
|
+
options: readonly ChoiceOption[];
|
|
6
|
+
/** `vertical` (default) stacks the options; `horizontal` runs them in a wrapping row. */
|
|
7
|
+
orientation?: 'vertical' | 'horizontal';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* One choice from a short list, under a `<Fieldset>` legend. Arrow keys move and select;
|
|
11
|
+
* the group is one tab stop. `className`/`style` go to the fieldset; `ref`, `id`, `name`
|
|
12
|
+
* and the rest go to the radio group (`name` submits the checked value natively).
|
|
13
|
+
*
|
|
14
|
+
* <RadioGroupField label="Billing period" name="period" options={periods} defaultValue="monthly" />
|
|
15
|
+
*/
|
|
16
|
+
export declare const RadioGroupField: import("react").ForwardRefExoticComponent<RadioGroupFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { toFieldsetProps as e, useControllableValue as t, useFocusLeave as n } from "../CheckboxGroup/choice.js";
|
|
2
|
+
import { RadioGroup as r } from "../RadioGroup/RadioGroup.js";
|
|
3
|
+
import { Fieldset as i } from "../Fieldset/Fieldset.js";
|
|
4
|
+
import { splitFieldLabelProps as a } from "../internal/fieldProps.js";
|
|
5
|
+
import { forwardRef as o } from "react";
|
|
6
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/inputs/RadioGroupField/RadioGroupField.tsx
|
|
8
|
+
var c = o(function(o, c) {
|
|
9
|
+
let [l, u] = a(o), { options: d, value: f, defaultValue: p, onValueChange: m, onBlur: h, className: g, style: _, disabled: v, ...y } = u, [b, x] = t(f === null ? "" : f, p ?? "", m, l.readOnly), S = n(h);
|
|
10
|
+
return /* @__PURE__ */ s(i, {
|
|
11
|
+
...e(l),
|
|
12
|
+
disabled: v,
|
|
13
|
+
className: g,
|
|
14
|
+
style: _,
|
|
15
|
+
children: /* @__PURE__ */ s(r, {
|
|
16
|
+
ref: c,
|
|
17
|
+
value: b,
|
|
18
|
+
onValueChange: x,
|
|
19
|
+
onBlur: S,
|
|
20
|
+
...y,
|
|
21
|
+
children: d.map((e) => /* @__PURE__ */ s(r.Item, {
|
|
22
|
+
value: e.value,
|
|
23
|
+
label: e.label,
|
|
24
|
+
description: e.description,
|
|
25
|
+
disabled: e.disabled
|
|
26
|
+
}, e.value))
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { c as RadioGroupField };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=RadioGroupField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroupField.js","names":["RadioGroupField","forwardRef","fieldProps","rest","splitFieldLabelProps","props","groupProps","current","setCurrent","useControllableValue","value","defaultValue","onValueChange","handleBlur","useFocusLeave","onBlur","Fieldset","toFieldsetProps","RadioGroup","options","o"],"sources":["../../../../src/components/inputs/RadioGroupField/RadioGroupField.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport {\n useControllableValue,\n useFocusLeave,\n toFieldsetProps,\n type ChoiceOption,\n} from '#components/inputs/CheckboxGroup/choice'\nimport type { FieldLabelProps } from '#components/inputs/Field'\nimport { Fieldset } from '#components/inputs/Fieldset'\nimport { RadioGroup, type RadioGroupProps } from '#components/inputs/RadioGroup'\nimport { splitFieldLabelProps } from '#components/inputs/internal/fieldProps'\n\nexport interface RadioGroupFieldProps\n extends FieldLabelProps, Omit<RadioGroupProps, 'invalid' | 'children' | keyof FieldLabelProps> {\n options: readonly ChoiceOption[]\n /** `vertical` (default) stacks the options; `horizontal` runs them in a wrapping row. */\n orientation?: 'vertical' | 'horizontal'\n}\n\n/**\n * One choice from a short list, under a `<Fieldset>` legend. Arrow keys move and select;\n * the group is one tab stop. `className`/`style` go to the fieldset; `ref`, `id`, `name`\n * and the rest go to the radio group (`name` submits the checked value natively).\n *\n * <RadioGroupField label=\"Billing period\" name=\"period\" options={periods} defaultValue=\"monthly\" />\n */\nexport const RadioGroupField = forwardRef<HTMLDivElement, RadioGroupFieldProps>(\n function RadioGroupField(props, ref) {\n const [fieldProps, rest] = splitFieldLabelProps(props)\n const {\n options,\n value,\n defaultValue,\n onValueChange,\n onBlur,\n className,\n style,\n disabled,\n ...groupProps\n } = rest\n // Hold the value here so read-only also holds for an uncontrolled group.\n const [current, setCurrent] = useControllableValue(\n value === null ? '' : value,\n defaultValue ?? '',\n onValueChange,\n fieldProps.readOnly,\n )\n const handleBlur = useFocusLeave(onBlur)\n return (\n <Fieldset\n {...toFieldsetProps(fieldProps)}\n disabled={disabled}\n className={className}\n style={style}\n >\n <RadioGroup\n ref={ref}\n value={current}\n onValueChange={setCurrent}\n onBlur={handleBlur}\n {...groupProps}\n >\n {options.map((o) => (\n <RadioGroup.Item\n key={o.value}\n value={o.value}\n label={o.label}\n description={o.description}\n disabled={o.disabled}\n />\n ))}\n </RadioGroup>\n </Fieldset>\n )\n },\n)\n"],"mappings":";;;;;;;AA0BA,IAAaA,IAAkBC,EAC7B,SAAyB,GAAO,GAAK;CACnC,IAAM,CAACC,GAAYC,KAAQC,EAAqBC,CAAK,GAC/C,EACJ,YACA,UACA,iBACA,kBACA,WACA,cACA,UACA,aACA,GAAGC,MACDH,GAEE,CAACI,GAASC,KAAcC,EAC5BC,MAAU,OAAO,KAAKA,GACtBC,KAAgB,IAChBC,GACAV,EAAW,QACb,GACMW,IAAaC,EAAcC,CAAM;CACvC,OACE,kBAACC,GAAD;EACE,GAAIC,EAAgBf,CAAU;EACpB;EACC;EACJ;EAEP,UAAA,kBAACgB,GAAD;GACO;GACL,OAAOX;GACP,eAAeC;GACf,QAAQK;GACR,GAAIP;GAEH,UAAAa,EAAQ,KAAK,MACZ,kBAACD,EAAW,MAAZ;IAEE,OAAOE,EAAE;IACT,OAAOA,EAAE;IACT,aAAaA,EAAE;IACf,UAAUA,EAAE;GACb,GALMA,EAAE,KAKR,CACF;EACS,CAAA;CACJ,CAAA;AAEd,CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SliderProps } from '../Slider/index.js';
|
|
2
|
+
export interface RangeSliderProps extends Omit<SliderProps, 'value' | 'defaultValue' | 'onValueChange' | 'onValueCommit'> {
|
|
3
|
+
/** Controlled `[low, high]`. */
|
|
4
|
+
value?: readonly [number, number];
|
|
5
|
+
/** Initial `[low, high]` when uncontrolled. Defaults to `[min, max]`. */
|
|
6
|
+
defaultValue?: readonly [number, number];
|
|
7
|
+
onValueChange?: (value: [number, number]) => void;
|
|
8
|
+
onValueCommit?: (value: [number, number]) => void;
|
|
9
|
+
/** How many steps the thumbs must stay apart. Default 0 (they may meet). */
|
|
10
|
+
minStepsBetweenThumbs?: number;
|
|
11
|
+
/** Accessible names of the two thumbs. Default `['Minimum', 'Maximum']`. */
|
|
12
|
+
thumbLabels?: readonly [string, string];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A low–high range on one track ("Price range": £500–£5,000). The wrapper is a
|
|
16
|
+
* `role="group"` labelled by the surrounding `<Field>` (see `RangeSliderField`) or
|
|
17
|
+
* `aria-label`; each thumb is a `role="slider"` named by `thumbLabels`. The ref and `id`
|
|
18
|
+
* go to the group. `onBlur` fires once, when focus leaves both thumbs.
|
|
19
|
+
*
|
|
20
|
+
* <RangeSlider aria-label="Price range" min={500} max={5000} step={100} defaultValue={[1000, 2500]} showValue
|
|
21
|
+
* formatOptions={{ style: 'currency', currency: 'GBP', maximumFractionDigits: 0 }} />
|
|
22
|
+
*/
|
|
23
|
+
export declare const RangeSlider: import("react").ForwardRefExoticComponent<RangeSliderProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useControllableValue as e, useFocusLeave as t } from "../CheckboxGroup/choice.js";
|
|
2
|
+
import { markFieldAware as n, useResolvedField as r } from "../internal/FieldContext.js";
|
|
3
|
+
import { SliderBase as i } from "../Slider/SliderBase.js";
|
|
4
|
+
import { forwardRef as a, useId as o } from "react";
|
|
5
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/inputs/RangeSlider/RangeSlider.tsx
|
|
7
|
+
var c = ["Minimum", "Maximum"], l = n(a(function({ value: n, defaultValue: a, onValueChange: l, onValueCommit: u, min: d = 0, max: f = 100, step: p = 1, minStepsBetweenThumbs: m = 0, thumbLabels: h = c, marks: g, showValue: _ = !1, formatOptions: v, locale: y, name: b, disabled: x, readOnly: S, invalid: C, size: w = "md", id: T, onBlur: E, "aria-labelledby": D, "aria-describedby": O, "aria-invalid": k, ...A }, j) {
|
|
8
|
+
let M = o(), N = r({
|
|
9
|
+
id: T,
|
|
10
|
+
describedBy: O,
|
|
11
|
+
invalid: C,
|
|
12
|
+
ariaInvalid: k,
|
|
13
|
+
disabled: x,
|
|
14
|
+
readOnly: S
|
|
15
|
+
}), [P, F] = e(n, a ?? [d, f], l && ((e) => {
|
|
16
|
+
l([e[0], e[1]]);
|
|
17
|
+
}), N.readOnly), I = t(E), L = (e) => [e[0] ?? d, e[1] ?? f], R = {
|
|
18
|
+
"aria-invalid": N.invalid || void 0,
|
|
19
|
+
"aria-readonly": N.readOnly || void 0,
|
|
20
|
+
"aria-busy": N.busy || void 0
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ s(i, {
|
|
23
|
+
ref: j,
|
|
24
|
+
id: N.id,
|
|
25
|
+
role: "group",
|
|
26
|
+
"aria-labelledby": D ?? (A["aria-label"] ? void 0 : N.labelId),
|
|
27
|
+
"aria-describedby": N.describedBy,
|
|
28
|
+
"aria-invalid": N.invalid || void 0,
|
|
29
|
+
...A,
|
|
30
|
+
onBlur: I,
|
|
31
|
+
values: P,
|
|
32
|
+
onValuesChange: (e) => {
|
|
33
|
+
F(L(e));
|
|
34
|
+
},
|
|
35
|
+
onValuesCommit: (e) => u?.(L(e)),
|
|
36
|
+
min: d,
|
|
37
|
+
max: f,
|
|
38
|
+
step: p,
|
|
39
|
+
minStepsBetweenThumbs: m,
|
|
40
|
+
marks: g,
|
|
41
|
+
showValue: _,
|
|
42
|
+
formatOptions: v,
|
|
43
|
+
locale: y,
|
|
44
|
+
name: b,
|
|
45
|
+
disabled: N.disabled,
|
|
46
|
+
readOnly: N.readOnly,
|
|
47
|
+
invalid: N.invalid,
|
|
48
|
+
size: w,
|
|
49
|
+
thumbs: [{
|
|
50
|
+
id: `${M}min`,
|
|
51
|
+
"aria-label": h[0],
|
|
52
|
+
...R
|
|
53
|
+
}, {
|
|
54
|
+
id: `${M}max`,
|
|
55
|
+
"aria-label": h[1],
|
|
56
|
+
...R
|
|
57
|
+
}]
|
|
58
|
+
});
|
|
59
|
+
}));
|
|
60
|
+
//#endregion
|
|
61
|
+
export { l as RangeSlider };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=RangeSlider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangeSlider.js","names":["DEFAULT_THUMB_LABELS","RangeSlider","markFieldAware","forwardRef","disabledProp","readOnlyProp","invalidProp","idProp","labelledByProp","describedByProp","ariaInvalid","rest","autoId","useId","field","useResolvedField","current","setCurrent","useControllableValue","value","defaultValue","min","max","onValueChange","next","handleBlur","useFocusLeave","onBlur","toTuple","thumbState","SliderBase","onValueCommit","thumbLabels"],"sources":["../../../../src/components/inputs/RangeSlider/RangeSlider.tsx"],"sourcesContent":["import { forwardRef, useId } from 'react'\nimport { useControllableValue, useFocusLeave } from '#components/inputs/CheckboxGroup/choice'\nimport { markFieldAware, useResolvedField } from '#components/inputs/internal/FieldContext'\nimport type { SliderProps } from '#components/inputs/Slider'\nimport { SliderBase } from '#components/inputs/Slider/SliderBase'\n\nexport interface RangeSliderProps extends Omit<\n SliderProps,\n 'value' | 'defaultValue' | 'onValueChange' | 'onValueCommit'\n> {\n /** Controlled `[low, high]`. */\n value?: readonly [number, number]\n /** Initial `[low, high]` when uncontrolled. Defaults to `[min, max]`. */\n defaultValue?: readonly [number, number]\n onValueChange?: (value: [number, number]) => void\n onValueCommit?: (value: [number, number]) => void\n /** How many steps the thumbs must stay apart. Default 0 (they may meet). */\n minStepsBetweenThumbs?: number\n /** Accessible names of the two thumbs. Default `['Minimum', 'Maximum']`. */\n thumbLabels?: readonly [string, string]\n}\n\nconst DEFAULT_THUMB_LABELS = ['Minimum', 'Maximum'] as const\n\n/**\n * A low–high range on one track (\"Price range\": £500–£5,000). The wrapper is a\n * `role=\"group\"` labelled by the surrounding `<Field>` (see `RangeSliderField`) or\n * `aria-label`; each thumb is a `role=\"slider\"` named by `thumbLabels`. The ref and `id`\n * go to the group. `onBlur` fires once, when focus leaves both thumbs.\n *\n * <RangeSlider aria-label=\"Price range\" min={500} max={5000} step={100} defaultValue={[1000, 2500]} showValue\n * formatOptions={{ style: 'currency', currency: 'GBP', maximumFractionDigits: 0 }} />\n */\nexport const RangeSlider = markFieldAware(\n forwardRef<HTMLSpanElement, RangeSliderProps>(function RangeSlider(\n {\n value,\n defaultValue,\n onValueChange,\n onValueCommit,\n min = 0,\n max = 100,\n step = 1,\n minStepsBetweenThumbs = 0,\n thumbLabels = DEFAULT_THUMB_LABELS,\n marks,\n showValue = false,\n formatOptions,\n locale,\n name,\n disabled: disabledProp,\n readOnly: readOnlyProp,\n invalid: invalidProp,\n size = 'md',\n id: idProp,\n onBlur,\n 'aria-labelledby': labelledByProp,\n 'aria-describedby': describedByProp,\n 'aria-invalid': ariaInvalid,\n ...rest\n },\n ref,\n ) {\n const autoId = useId()\n const field = useResolvedField({\n id: idProp,\n describedBy: describedByProp,\n invalid: invalidProp,\n ariaInvalid,\n disabled: disabledProp,\n readOnly: readOnlyProp,\n })\n const [current, setCurrent] = useControllableValue<readonly [number, number]>(\n value,\n defaultValue ?? [min, max],\n onValueChange &&\n ((next) => {\n onValueChange([next[0], next[1]])\n }),\n field.readOnly,\n )\n const handleBlur = useFocusLeave(onBlur)\n const toTuple = (next: number[]): [number, number] => [next[0] ?? min, next[1] ?? max]\n\n const thumbState = {\n 'aria-invalid': field.invalid || undefined,\n 'aria-readonly': field.readOnly || undefined,\n 'aria-busy': field.busy || undefined,\n } as const\n\n return (\n // aria-invalid on the group as well as each thumb, like CheckboxGroup: the error belongs to the range.\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <SliderBase\n ref={ref}\n id={field.id}\n role=\"group\"\n aria-labelledby={labelledByProp ?? (rest['aria-label'] ? undefined : field.labelId)}\n aria-describedby={field.describedBy}\n aria-invalid={field.invalid || undefined}\n {...rest}\n onBlur={handleBlur}\n values={current}\n onValuesChange={(next) => {\n setCurrent(toTuple(next))\n }}\n onValuesCommit={(next) => onValueCommit?.(toTuple(next))}\n min={min}\n max={max}\n step={step}\n minStepsBetweenThumbs={minStepsBetweenThumbs}\n marks={marks}\n showValue={showValue}\n formatOptions={formatOptions}\n locale={locale}\n name={name}\n disabled={field.disabled}\n readOnly={field.readOnly}\n invalid={field.invalid}\n size={size}\n thumbs={[\n { id: `${autoId}min`, 'aria-label': thumbLabels[0], ...thumbState },\n { id: `${autoId}max`, 'aria-label': thumbLabels[1], ...thumbState },\n ]}\n />\n )\n }),\n)\n"],"mappings":";;;;;;AAsBA,IAAMA,IAAuB,CAAC,WAAW,SAAS,GAWrCC,IAAcC,EACzBC,EAA8C,SAC5C,EACE,UACA,iBACA,kBACA,kBACA,SAAM,GACN,SAAM,KACN,UAAO,GACP,2BAAwB,GACxB,iBAAcH,GACd,UACA,eAAY,IACZ,kBACA,WACA,SACA,UAAUI,GACV,UAAUC,GACV,SAASC,GACT,UAAO,MACP,IAAIC,GACJ,WACA,mBAAmBC,GACnB,oBAAoBC,GACpB,gBAAgBC,GAChB,GAAGC,KAEL,GACA;CACA,IAAMC,IAASC,EAAM,GACfC,IAAQC,EAAiB;EAC7B,IAAIR;EACJ,aAAaE;EACb,SAASH;EACT;EACA,UAAUF;EACV,UAAUC;CACZ,CAAC,GACK,CAACW,GAASC,KAAcC,EAC5BC,GACAC,KAAgB,CAACC,GAAKC,CAAG,GACzBC,OACI,MAAS;EACT,EAAc,CAACC,EAAK,IAAIA,EAAK,EAAE,CAAC;CAClC,IACFV,EAAM,QACR,GACMW,IAAaC,EAAcC,CAAM,GACjCC,KAAW,MAAqC,CAACJ,EAAK,MAAMH,GAAKG,EAAK,MAAMF,CAAG,GAE/EO,IAAa;EACjB,gBAAgBf,EAAM,WAAW,KAAA;EACjC,iBAAiBA,EAAM,YAAY,KAAA;EACnC,aAAaA,EAAM,QAAQ,KAAA;CAC7B;CAEA,OAGE,kBAACgB,GAAD;EACO;EACL,IAAIhB,EAAM;EACV,MAAK;EACL,mBAAiBN,MAAmBG,EAAK,gBAAgB,KAAA,IAAYG,EAAM;EAC3E,oBAAkBA,EAAM;EACxB,gBAAcA,EAAM,WAAW,KAAA;EAC/B,GAAIH;EACJ,QAAQc;EACR,QAAQT;EACR,iBAAiB,MAAS;GACxB,EAAWY,EAAQJ,CAAI,CAAC;EAC1B;EACA,iBAAiB,MAASO,IAAgBH,EAAQJ,CAAI,CAAC;EAClD;EACA;EACC;EACiB;EAChB;EACI;EACI;EACP;EACF;EACN,UAAUV,EAAM;EAChB,UAAUA,EAAM;EAChB,SAASA,EAAM;EACT;EACN,QAAQ,CACN;GAAE,IAAI,GAAGF,EAAO;GAAM,cAAcoB,EAAY;GAAI,GAAGH;EAAW,GAClE;GAAE,IAAI,GAAGjB,EAAO;GAAM,cAAcoB,EAAY;GAAI,GAAGH;EAAW,CACpE;CACD,CAAA;AAEL,CAAC,CACH"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FieldLabelProps } from '../Field/index.js';
|
|
2
|
+
import { type RangeSliderProps } from '../RangeSlider/index.js';
|
|
3
|
+
export interface RangeSliderFieldProps extends FieldLabelProps, Omit<RangeSliderProps, 'invalid' | keyof FieldLabelProps> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A labelled `RangeSlider`: the Field's label names the group, `thumbLabels` name the two
|
|
7
|
+
* thumbs. `className`/`style` go to the Field; `ref`, `id`, `name` and the rest go to the
|
|
8
|
+
* range slider's group.
|
|
9
|
+
*
|
|
10
|
+
* <RangeSliderField label="Price range" name="price" min={500} max={5000} step={100} showValue />
|
|
11
|
+
*/
|
|
12
|
+
export declare const RangeSliderField: import("react").ForwardRefExoticComponent<RangeSliderFieldProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Field as e } from "../Field/Field.js";
|
|
2
|
+
import { splitFieldLabelProps as t } from "../internal/fieldProps.js";
|
|
3
|
+
import { RangeSlider as n } from "../RangeSlider/RangeSlider.js";
|
|
4
|
+
import { forwardRef as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/inputs/RangeSliderField/RangeSliderField.tsx
|
|
7
|
+
var a = r(function(r, a) {
|
|
8
|
+
let [o, { id: s, disabled: c, className: l, style: u, ...d }] = t(r);
|
|
9
|
+
return /* @__PURE__ */ i(e, {
|
|
10
|
+
...o,
|
|
11
|
+
htmlFor: s,
|
|
12
|
+
disabled: c,
|
|
13
|
+
className: l,
|
|
14
|
+
style: u,
|
|
15
|
+
children: /* @__PURE__ */ i(n, {
|
|
16
|
+
ref: a,
|
|
17
|
+
...d
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { a as RangeSliderField };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=RangeSliderField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangeSliderField.js","names":["RangeSliderField","forwardRef","fieldProps","sliderProps","splitFieldLabelProps","props","Field","id","RangeSlider"],"sources":["../../../../src/components/inputs/RangeSliderField/RangeSliderField.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { Field, type FieldLabelProps } from '#components/inputs/Field'\nimport { splitFieldLabelProps } from '#components/inputs/internal/fieldProps'\nimport { RangeSlider, type RangeSliderProps } from '#components/inputs/RangeSlider'\n\nexport interface RangeSliderFieldProps\n extends FieldLabelProps, Omit<RangeSliderProps, 'invalid' | keyof FieldLabelProps> {}\n\n/**\n * A labelled `RangeSlider`: the Field's label names the group, `thumbLabels` name the two\n * thumbs. `className`/`style` go to the Field; `ref`, `id`, `name` and the rest go to the\n * range slider's group.\n *\n * <RangeSliderField label=\"Price range\" name=\"price\" min={500} max={5000} step={100} showValue />\n */\nexport const RangeSliderField = forwardRef<HTMLSpanElement, RangeSliderFieldProps>(\n function RangeSliderField(props, ref) {\n const [fieldProps, { id, disabled, className, style, ...sliderProps }] =\n splitFieldLabelProps(props)\n return (\n <Field {...fieldProps} htmlFor={id} disabled={disabled} className={className} style={style}>\n <RangeSlider ref={ref} {...sliderProps} />\n </Field>\n )\n },\n)\n"],"mappings":";;;;;;AAeA,IAAaA,IAAmBC,EAC9B,SAA0B,GAAO,GAAK;CACpC,IAAM,CAACC,GAAY,EAAE,OAAI,aAAU,cAAW,UAAO,GAAGC,OACtDC,EAAqBC,CAAK;CAC5B,OACE,kBAACC,GAAD;EAAO,GAAIJ;EAAY,SAASK;EAAc;EAAqB;EAAkB;EACnF,UAAA,kBAACC,GAAD;GAAkB;GAAK,GAAIL;EAAc,CAAA;CACpC,CAAA;AAEX,CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import type { Size } from '../../../utils/tokens.js';
|
|
3
|
+
export interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'dir'> {
|
|
4
|
+
/** Controlled rating, `null` for none. */
|
|
5
|
+
value?: number | null;
|
|
6
|
+
defaultValue?: number | null;
|
|
7
|
+
onValueChange?: (value: number | null) => void;
|
|
8
|
+
/** Number of stars. Default 5. */
|
|
9
|
+
max?: number;
|
|
10
|
+
/** Choosing the current rating again clears it (`null`). */
|
|
11
|
+
clearable?: boolean;
|
|
12
|
+
/** Each star's accessible name. Default `${n} of ${max}`. */
|
|
13
|
+
itemLabel?: (n: number, max: number) => string;
|
|
14
|
+
/** Emits a hidden input with the rating (none when `null`), for native form submission. */
|
|
15
|
+
name?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Focusable but not editable: sets `aria-readonly` and ignores changes. */
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
/** Critical edge on the empty stars + `aria-invalid`. Inside a `<Field error>` this is set for you. */
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
size?: Size;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A star rating — a Radix RadioGroup whose radios are stars, so it's one tab stop and the
|
|
25
|
+
* arrow keys move and choose. Stars up to the rating fill with the accent; hovering
|
|
26
|
+
* previews a rating before you choose it. Label it with a `<Field>` (see `RatingField`) or
|
|
27
|
+
* `aria-label`. `onBlur` fires once, when focus leaves the stars.
|
|
28
|
+
*
|
|
29
|
+
* <Rating aria-label="Rate this release" defaultValue={4} clearable />
|
|
30
|
+
*/
|
|
31
|
+
export declare const Rating: import("react").ForwardRefExoticComponent<RatingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { cx as e } from "../../../utils/cx.js";
|
|
2
|
+
import { StarIcon as t } from "../../../icons/icons.js";
|
|
3
|
+
import { useControllableValue as n, useFocusLeave as r } from "../CheckboxGroup/choice.js";
|
|
4
|
+
import { markFieldAware as i, useResolvedField as a } from "../internal/FieldContext.js";
|
|
5
|
+
import o from "./Rating.module.js";
|
|
6
|
+
import { forwardRef as s, useState as c } from "react";
|
|
7
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
import { RadioGroup as d } from "radix-ui";
|
|
9
|
+
//#region src/components/inputs/Rating/Rating.tsx
|
|
10
|
+
var f = (e, t) => `${String(e)} of ${String(t)}`, p = i(s(function({ value: i, defaultValue: s = null, onValueChange: p, max: m = 5, clearable: h = !1, itemLabel: g = f, name: _, disabled: v, readOnly: y, invalid: b, size: x = "md", id: S, className: C, onBlur: w, onPointerLeave: T, "aria-describedby": E, "aria-invalid": D, "aria-labelledby": O, ...k }, A) {
|
|
11
|
+
let j = a({
|
|
12
|
+
id: S,
|
|
13
|
+
describedBy: E,
|
|
14
|
+
invalid: b,
|
|
15
|
+
ariaInvalid: D,
|
|
16
|
+
disabled: v,
|
|
17
|
+
readOnly: y
|
|
18
|
+
}), [M, N] = n(i, s, p, j.readOnly), [P, F] = c(null), I = r(w), L = !j.disabled && !j.readOnly, R = P ?? M ?? 0, z = Array.from({ length: Math.max(0, Math.floor(m)) }, (e, t) => t + 1);
|
|
19
|
+
return /* @__PURE__ */ u(d.Root, {
|
|
20
|
+
ref: A,
|
|
21
|
+
id: j.id,
|
|
22
|
+
className: e(o.rating, C),
|
|
23
|
+
value: M === null ? "" : String(M),
|
|
24
|
+
onValueChange: (e) => {
|
|
25
|
+
N(e === "" ? null : Number(e));
|
|
26
|
+
},
|
|
27
|
+
disabled: j.disabled,
|
|
28
|
+
"data-size": x,
|
|
29
|
+
"data-invalid": j.invalid || void 0,
|
|
30
|
+
"data-readonly": j.readOnly || void 0,
|
|
31
|
+
"data-previewing": P !== null || void 0,
|
|
32
|
+
"aria-labelledby": O ?? (k["aria-label"] ? void 0 : j.labelId),
|
|
33
|
+
"aria-describedby": j.describedBy,
|
|
34
|
+
"aria-invalid": j.invalid || void 0,
|
|
35
|
+
"aria-required": j.required || void 0,
|
|
36
|
+
"aria-readonly": j.readOnly || void 0,
|
|
37
|
+
"aria-busy": j.busy || void 0,
|
|
38
|
+
onBlur: I,
|
|
39
|
+
onPointerLeave: (e) => {
|
|
40
|
+
F(null), T?.(e);
|
|
41
|
+
},
|
|
42
|
+
...k,
|
|
43
|
+
children: [z.map((e) => /* @__PURE__ */ l(d.Item, {
|
|
44
|
+
value: String(e),
|
|
45
|
+
className: o.star,
|
|
46
|
+
"aria-label": g(e, m),
|
|
47
|
+
"data-filled": e <= R || void 0,
|
|
48
|
+
onPointerEnter: L ? () => {
|
|
49
|
+
F(e);
|
|
50
|
+
} : void 0,
|
|
51
|
+
onClick: h ? () => {
|
|
52
|
+
M === e && N(null);
|
|
53
|
+
} : void 0,
|
|
54
|
+
children: /* @__PURE__ */ l(t, { className: o.glyph })
|
|
55
|
+
}, e)), _ && M !== null ? /* @__PURE__ */ l("input", {
|
|
56
|
+
type: "hidden",
|
|
57
|
+
name: _,
|
|
58
|
+
value: M,
|
|
59
|
+
disabled: j.disabled || void 0
|
|
60
|
+
}) : null]
|
|
61
|
+
});
|
|
62
|
+
}));
|
|
63
|
+
//#endregion
|
|
64
|
+
export { p as Rating };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=Rating.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rating.js","names":["RadixRadioGroup","styles","Rating_module_default","defaultItemLabel","n","max","Rating","markFieldAware","forwardRef","disabledProp","readOnlyProp","invalidProp","idProp","describedByProp","ariaInvalid","labelledByProp","rest","field","useResolvedField","current","setCurrent","useControllableValue","value","defaultValue","onValueChange","preview","setPreview","useState","handleBlur","useFocusLeave","onBlur","interactive","shown","stars","i","RadioGroup","cx","className","v","size","onPointerLeave","event","itemLabel","clearable","StarIcon","name"],"sources":["../../../../src/components/inputs/Rating/Rating.tsx"],"sourcesContent":["import { forwardRef, useState, type HTMLAttributes } from 'react'\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui'\nimport { StarIcon } from '#icons'\nimport { cx } from '#utils/cx'\nimport type { Size } from '#utils/tokens'\nimport { useControllableValue, useFocusLeave } from '#components/inputs/CheckboxGroup/choice'\nimport { markFieldAware, useResolvedField } from '#components/inputs/internal/FieldContext'\nimport styles from './Rating.module.css'\n\nexport interface RatingProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'onChange' | 'defaultValue' | 'dir'\n> {\n /** Controlled rating, `null` for none. */\n value?: number | null\n defaultValue?: number | null\n onValueChange?: (value: number | null) => void\n /** Number of stars. Default 5. */\n max?: number\n /** Choosing the current rating again clears it (`null`). */\n clearable?: boolean\n /** Each star's accessible name. Default `${n} of ${max}`. */\n itemLabel?: (n: number, max: number) => string\n /** Emits a hidden input with the rating (none when `null`), for native form submission. */\n name?: string\n disabled?: boolean\n /** Focusable but not editable: sets `aria-readonly` and ignores changes. */\n readOnly?: boolean\n /** Critical edge on the empty stars + `aria-invalid`. Inside a `<Field error>` this is set for you. */\n invalid?: boolean\n size?: Size\n}\n\nconst defaultItemLabel = (n: number, max: number) => `${String(n)} of ${String(max)}`\n\n/**\n * A star rating — a Radix RadioGroup whose radios are stars, so it's one tab stop and the\n * arrow keys move and choose. Stars up to the rating fill with the accent; hovering\n * previews a rating before you choose it. Label it with a `<Field>` (see `RatingField`) or\n * `aria-label`. `onBlur` fires once, when focus leaves the stars.\n *\n * <Rating aria-label=\"Rate this release\" defaultValue={4} clearable />\n */\nexport const Rating = markFieldAware(\n forwardRef<HTMLDivElement, RatingProps>(function Rating(\n {\n value,\n defaultValue = null,\n onValueChange,\n max = 5,\n clearable = false,\n itemLabel = defaultItemLabel,\n name,\n disabled: disabledProp,\n readOnly: readOnlyProp,\n invalid: invalidProp,\n size = 'md',\n id: idProp,\n className,\n onBlur,\n onPointerLeave,\n 'aria-describedby': describedByProp,\n 'aria-invalid': ariaInvalid,\n 'aria-labelledby': labelledByProp,\n ...rest\n },\n ref,\n ) {\n const field = useResolvedField({\n id: idProp,\n describedBy: describedByProp,\n invalid: invalidProp,\n ariaInvalid,\n disabled: disabledProp,\n readOnly: readOnlyProp,\n })\n const [current, setCurrent] = useControllableValue<number | null>(\n value,\n defaultValue,\n onValueChange,\n field.readOnly,\n )\n const [preview, setPreview] = useState<number | null>(null)\n const handleBlur = useFocusLeave(onBlur)\n const interactive = !field.disabled && !field.readOnly\n const shown = preview ?? current ?? 0\n const stars = Array.from({ length: Math.max(0, Math.floor(max)) }, (_, i) => i + 1)\n\n return (\n <RadixRadioGroup.Root\n ref={ref}\n id={field.id}\n className={cx(styles.rating, className)}\n value={current === null ? '' : String(current)}\n onValueChange={(v) => {\n setCurrent(v === '' ? null : Number(v))\n }}\n disabled={field.disabled}\n data-size={size}\n data-invalid={field.invalid || undefined}\n data-readonly={field.readOnly || undefined}\n data-previewing={preview !== null || undefined}\n aria-labelledby={labelledByProp ?? (rest['aria-label'] ? undefined : field.labelId)}\n aria-describedby={field.describedBy}\n aria-invalid={field.invalid || undefined}\n aria-required={field.required || undefined}\n aria-readonly={field.readOnly || undefined}\n aria-busy={field.busy || undefined}\n onBlur={handleBlur}\n onPointerLeave={(event) => {\n setPreview(null)\n onPointerLeave?.(event)\n }}\n {...rest}\n >\n {stars.map((n) => (\n <RadixRadioGroup.Item\n key={n}\n value={String(n)}\n className={styles.star}\n aria-label={itemLabel(n, max)}\n data-filled={n <= shown || undefined}\n onPointerEnter={\n interactive\n ? () => {\n setPreview(n)\n }\n : undefined\n }\n onClick={\n clearable\n ? () => {\n // Radix ignores a click on the checked radio; clearable turns it into \"none\".\n if (current === n) setCurrent(null)\n }\n : undefined\n }\n >\n <StarIcon className={styles.glyph} />\n </RadixRadioGroup.Item>\n ))}\n {name && current !== null ? (\n <input type=\"hidden\" name={name} value={current} disabled={field.disabled || undefined} />\n ) : null}\n </RadixRadioGroup.Root>\n )\n }),\n)\n"],"mappings":";;;;;;;;;AAiCA,IAAMG,KAAoB,GAAW,MAAgB,GAAG,OAAOC,CAAC,EAAE,MAAM,OAAOC,CAAG,KAUrEC,IAASC,EACpBC,EAAwC,SACtC,EACE,UACA,kBAAe,MACf,kBACA,SAAM,GACN,eAAY,IACZ,eAAYL,GACZ,SACA,UAAUM,GACV,UAAUC,GACV,SAASC,GACT,UAAO,MACP,IAAIC,GACJ,cACA,WACA,mBACA,oBAAoBC,GACpB,gBAAgBC,GAChB,mBAAmBC,GACnB,GAAGC,KAEL,GACA;CACA,IAAMC,IAAQC,EAAiB;EAC7B,IAAIN;EACJ,aAAaC;EACb,SAASF;EACT;EACA,UAAUF;EACV,UAAUC;CACZ,CAAC,GACK,CAACS,GAASC,KAAcC,EAC5BC,GACAC,GACAC,GACAP,EAAM,QACR,GACM,CAACQ,GAASC,KAAcC,EAAwB,IAAI,GACpDC,IAAaC,EAAcC,CAAM,GACjCC,IAAc,CAACd,EAAM,YAAY,CAACA,EAAM,UACxCe,IAAQP,KAAWN,KAAW,GAC9Bc,IAAQ,MAAM,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,KAAK,MAAM5B,CAAG,CAAC,EAAE,IAAI,GAAG,MAAM6B,IAAI,CAAC;CAElF,OACE,kBAAClC,EAAgB,MAAjB;EACO;EACL,IAAIiB,EAAM;EACV,WAAWmB,EAAGnC,EAAO,QAAQoC,CAAS;EACtC,OAAOlB,MAAY,OAAO,KAAK,OAAOA,CAAO;EAC7C,gBAAgB,MAAM;GACpB,EAAWmB,MAAM,KAAK,OAAO,OAAOA,CAAC,CAAC;EACxC;EACA,UAAUrB,EAAM;EAChB,aAAWsB;EACX,gBAActB,EAAM,WAAW,KAAA;EAC/B,iBAAeA,EAAM,YAAY,KAAA;EACjC,mBAAiBQ,MAAY,QAAQ,KAAA;EACrC,mBAAiBV,MAAmBC,EAAK,gBAAgB,KAAA,IAAYC,EAAM;EAC3E,oBAAkBA,EAAM;EACxB,gBAAcA,EAAM,WAAW,KAAA;EAC/B,iBAAeA,EAAM,YAAY,KAAA;EACjC,iBAAeA,EAAM,YAAY,KAAA;EACjC,aAAWA,EAAM,QAAQ,KAAA;EACzB,QAAQW;EACR,iBAAiB,MAAU;GAEzB,AADAF,EAAW,IAAI,GACfc,IAAiBC,CAAK;EACxB;EACA,GAAIzB;EAxBN,UAAA,CA0BGiB,EAAM,KAAK,MACV,kBAACjC,EAAgB,MAAjB;GAEE,OAAO,OAAOI,CAAC;GACf,WAAWH,EAAO;GAClB,cAAYyC,EAAUtC,GAAGC,CAAG;GAC5B,eAAaD,KAAK4B,KAAS,KAAA;GAC3B,gBACED,UACU;IACJ,EAAW3B,CAAC;GACd,IACA,KAAA;GAEN,SACEuC,UACU;IAEJ,AAAIxB,MAAYf,KAAGgB,EAAW,IAAI;GACpC,IACA,KAAA;GAGN,UAAA,kBAACwB,GAAD,EAAU,WAAW3C,EAAO,MAAQ,CAAA;EAChB,GAtBfG,CAsBe,CACvB,GACAyC,KAAQ1B,MAAY,OACnB,kBAAC,SAAD;GAAO,MAAK;GAAe;GAAM,OAAOA;GAAS,UAAUF,EAAM,YAAY,KAAA;EAAY,CAAA,IACvF,IACgB;;AAE1B,CAAC,CACH"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/components/inputs/Rating/Rating.module.css
|
|
2
|
+
var e = "kiln-Rating__rating", t = "kiln-Rating__star", n = "kiln-Rating__glyph", r = {
|
|
3
|
+
rating: e,
|
|
4
|
+
star: t,
|
|
5
|
+
glyph: n
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { r as default, n as glyph, e as rating, t as star };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=Rating.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rating.module.js","names":["rating","star","glyph","Rating_module_default"],"sources":["../../../../src/components/inputs/Rating/Rating.module.css"],"sourcesContent":["/*\n * A row of stars. Stars up to the rating (or the hovered star, while previewing) fill with\n * the accent; the rest are outlines.\n *\n * Component tokens:\n * --rating-fill default var(--color-accent) — filled stars\n * --rating-empty default var(--color-line-control) — empty star outline (≥ 3:1)\n * --rating-gap default var(--space-1)\n */\n.rating {\n --_s: 1.5rem;\n\n display: inline-flex;\n align-items: center;\n gap: var(--rating-gap, var(--space-1));\n vertical-align: middle;\n}\n.rating[data-size='sm'] {\n --_s: 1.25rem;\n}\n.rating[data-size='lg'] {\n --_s: 2rem;\n}\n\n.star {\n --_ink: var(--rating-empty, var(--color-line-control));\n --_fill: transparent;\n\n all: unset;\n box-sizing: border-box;\n position: relative;\n display: inline-grid;\n place-items: center;\n border-radius: var(--radius-chip);\n color: var(--_ink);\n font-size: var(--_s);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n transition: color var(--dur-1) var(--ease-out);\n}\n\n/* Fill the gap between stars into the hit area, so the pointer never falls through. */\n.star::before {\n content: '';\n position: absolute;\n inset: calc(var(--space-1) * -0.5);\n}\n\n.star[data-filled] {\n --_ink: var(--rating-fill, var(--color-accent));\n --_fill: var(--rating-fill, var(--color-accent));\n}\n\n/* While previewing, the stars that would be chosen show at a lighter weight than a real rating. */\n.rating[data-previewing] .star[data-filled] {\n --_fill: color-mix(in oklch, var(--rating-fill, var(--color-accent)) 45%, transparent);\n}\n\n.rating[data-invalid] .star:not([data-filled]) {\n --_ink: var(--tone-critical);\n}\n\n.glyph {\n fill: var(--_fill);\n transition: fill var(--dur-1) var(--ease-out);\n}\n\n.star:focus-visible {\n outline: 2px solid var(--color-focus);\n outline-offset: 2px;\n}\n\n.star[data-disabled] {\n cursor: not-allowed;\n opacity: 0.45;\n}\n.rating[data-readonly] .star {\n cursor: default;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FieldLabelProps } from '../Field/index.js';
|
|
2
|
+
import { type RatingProps } from '../Rating/index.js';
|
|
3
|
+
export interface RatingFieldProps extends FieldLabelProps, Omit<RatingProps, 'invalid' | keyof FieldLabelProps> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A labelled `Rating`. The stars' radiogroup is labelled by the Field's label and described
|
|
7
|
+
* by its help, warning and error. `className`/`style` go to the Field; `ref`, `id`, `name`
|
|
8
|
+
* and the rest go to the radiogroup.
|
|
9
|
+
*
|
|
10
|
+
* <RatingField label="Rate this release" name="rating" clearable />
|
|
11
|
+
*/
|
|
12
|
+
export declare const RatingField: import("react").ForwardRefExoticComponent<RatingFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Field as e } from "../Field/Field.js";
|
|
2
|
+
import { splitFieldLabelProps as t } from "../internal/fieldProps.js";
|
|
3
|
+
import { Rating as n } from "../Rating/Rating.js";
|
|
4
|
+
import { forwardRef as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/inputs/RatingField/RatingField.tsx
|
|
7
|
+
var a = r(function(r, a) {
|
|
8
|
+
let [o, { id: s, disabled: c, className: l, style: u, ...d }] = t(r);
|
|
9
|
+
return /* @__PURE__ */ i(e, {
|
|
10
|
+
...o,
|
|
11
|
+
htmlFor: s,
|
|
12
|
+
disabled: c,
|
|
13
|
+
className: l,
|
|
14
|
+
style: u,
|
|
15
|
+
children: /* @__PURE__ */ i(n, {
|
|
16
|
+
ref: a,
|
|
17
|
+
...d
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { a as RatingField };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=RatingField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RatingField.js","names":["RatingField","forwardRef","fieldProps","ratingProps","splitFieldLabelProps","props","Field","id","Rating"],"sources":["../../../../src/components/inputs/RatingField/RatingField.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { Field, type FieldLabelProps } from '#components/inputs/Field'\nimport { splitFieldLabelProps } from '#components/inputs/internal/fieldProps'\nimport { Rating, type RatingProps } from '#components/inputs/Rating'\n\nexport interface RatingFieldProps\n extends FieldLabelProps, Omit<RatingProps, 'invalid' | keyof FieldLabelProps> {}\n\n/**\n * A labelled `Rating`. The stars' radiogroup is labelled by the Field's label and described\n * by its help, warning and error. `className`/`style` go to the Field; `ref`, `id`, `name`\n * and the rest go to the radiogroup.\n *\n * <RatingField label=\"Rate this release\" name=\"rating\" clearable />\n */\nexport const RatingField = forwardRef<HTMLDivElement, RatingFieldProps>(\n function RatingField(props, ref) {\n const [fieldProps, { id, disabled, className, style, ...ratingProps }] =\n splitFieldLabelProps(props)\n return (\n <Field {...fieldProps} htmlFor={id} disabled={disabled} className={className} style={style}>\n <Rating ref={ref} {...ratingProps} />\n </Field>\n )\n },\n)\n"],"mappings":";;;;;;AAeA,IAAaA,IAAcC,EACzB,SAAqB,GAAO,GAAK;CAC/B,IAAM,CAACC,GAAY,EAAE,OAAI,aAAU,cAAW,UAAO,GAAGC,OACtDC,EAAqBC,CAAK;CAC5B,OACE,kBAACC,GAAD;EAAO,GAAIJ;EAAY,SAASK;EAAc;EAAqB;EAAkB;EACnF,UAAA,kBAACC,GAAD;GAAa;GAAK,GAAIL;EAAc,CAAA;CAC/B,CAAA;AAEX,CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SegmentedControlProps } from '../../actions/SegmentedControl/index.js';
|
|
2
|
+
import { type FieldLabelProps } from '../Field/index.js';
|
|
3
|
+
export interface SegmentedFieldProps extends FieldLabelProps, Omit<SegmentedControlProps, 'children' | 'invalid' | keyof FieldLabelProps> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A labelled `SegmentedControl` — one of 2–5 peers, always one selected. The control is
|
|
7
|
+
* labelled by the Field's label and described by its help, warning and error.
|
|
8
|
+
* `className`/`style` go to the Field; `ref`, `id`, `name` and the rest go to the control.
|
|
9
|
+
*
|
|
10
|
+
* <SegmentedField label="Billing period" name="period" options={periods} layout="horizontal" />
|
|
11
|
+
*/
|
|
12
|
+
export declare const SegmentedField: import("react").ForwardRefExoticComponent<SegmentedFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|