@knitui/components 0.14.0 → 1.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/README.md +2 -2
- package/lib/commonjs/Accordion/Accordion.js +78 -96
- package/lib/commonjs/Accordion/Accordion.js.map +1 -1
- package/lib/commonjs/ActionIcon/ActionIcon.js +128 -62
- package/lib/commonjs/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/commonjs/Affix/Affix.js +17 -21
- package/lib/commonjs/Affix/Affix.js.map +1 -1
- package/lib/commonjs/Alert/Alert.js +54 -54
- package/lib/commonjs/Alert/Alert.js.map +1 -1
- package/lib/commonjs/Anchor/Anchor.js +12 -15
- package/lib/commonjs/Anchor/Anchor.js.map +1 -1
- package/lib/commonjs/AngleSlider/AngleSlider.js +65 -37
- package/lib/commonjs/AngleSlider/AngleSlider.js.map +1 -1
- package/lib/commonjs/AspectRatio/AspectRatio.js +12 -15
- package/lib/commonjs/AspectRatio/AspectRatio.js.map +1 -1
- package/lib/commonjs/Autocomplete/Autocomplete.js +7 -3
- package/lib/commonjs/Autocomplete/Autocomplete.js.map +1 -1
- package/lib/commonjs/Avatar/Avatar.js +28 -25
- package/lib/commonjs/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/BackgroundImage/BackgroundImage.js +15 -6
- package/lib/commonjs/BackgroundImage/BackgroundImage.js.map +1 -1
- package/lib/commonjs/Badge/Badge.js +60 -49
- package/lib/commonjs/Badge/Badge.js.map +1 -1
- package/lib/commonjs/Blockquote/Blockquote.js +80 -79
- package/lib/commonjs/Blockquote/Blockquote.js.map +1 -1
- package/lib/commonjs/Box/Box.js +2 -2
- package/lib/commonjs/Box/Box.js.map +1 -1
- package/lib/commonjs/Breadcrumbs/Breadcrumbs.js +9 -9
- package/lib/commonjs/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/commonjs/Burger/Burger.js +31 -20
- package/lib/commonjs/Burger/Burger.js.map +1 -1
- package/lib/commonjs/Button/Button.js +105 -63
- package/lib/commonjs/Button/Button.js.map +1 -1
- package/lib/commonjs/Card/Card.js +49 -37
- package/lib/commonjs/Card/Card.js.map +1 -1
- package/lib/commonjs/Center/Center.js +2 -2
- package/lib/commonjs/Center/Center.js.map +1 -1
- package/lib/commonjs/Checkbox/CheckIcon.js +5 -4
- package/lib/commonjs/Checkbox/CheckIcon.js.map +1 -1
- package/lib/commonjs/Checkbox/Checkbox.js +98 -68
- package/lib/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/Chip/Chip.js +34 -67
- package/lib/commonjs/Chip/Chip.js.map +1 -1
- package/lib/commonjs/CloseButton/CloseButton.js +12 -5
- package/lib/commonjs/CloseButton/CloseButton.js.map +1 -1
- package/lib/commonjs/Code/Code.js +14 -10
- package/lib/commonjs/Code/Code.js.map +1 -1
- package/lib/commonjs/Collapse/Collapse.js +10 -4
- package/lib/commonjs/Collapse/Collapse.js.map +1 -1
- package/lib/commonjs/ColorInput/ColorInput.js +25 -20
- package/lib/commonjs/ColorInput/ColorInput.js.map +1 -1
- package/lib/commonjs/ColorPicker/ColorPicker.js +95 -83
- package/lib/commonjs/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/commonjs/ColorSwatch/ColorSwatch.js +12 -14
- package/lib/commonjs/ColorSwatch/ColorSwatch.js.map +1 -1
- package/lib/commonjs/Combobox/Combobox.js +194 -187
- package/lib/commonjs/Combobox/Combobox.js.map +1 -1
- package/lib/commonjs/Combobox/OptionsDropdown.js +12 -6
- package/lib/commonjs/Combobox/OptionsDropdown.js.map +1 -1
- package/lib/commonjs/Combobox/index.js +6 -0
- package/lib/commonjs/Combobox/index.js.map +1 -1
- package/lib/commonjs/Container/Container.js +12 -19
- package/lib/commonjs/Container/Container.js.map +1 -1
- package/lib/commonjs/Dialog/Dialog.js +15 -14
- package/lib/commonjs/Dialog/Dialog.js.map +1 -1
- package/lib/commonjs/Drawer/Drawer.js +51 -32
- package/lib/commonjs/Drawer/Drawer.js.map +1 -1
- package/lib/commonjs/Fieldset/Fieldset.js +26 -18
- package/lib/commonjs/Fieldset/Fieldset.js.map +1 -1
- package/lib/commonjs/FileButton/FileButton.js +5 -3
- package/lib/commonjs/FileButton/FileButton.js.map +1 -1
- package/lib/commonjs/Flex/Flex.js +24 -27
- package/lib/commonjs/Flex/Flex.js.map +1 -1
- package/lib/commonjs/FocusTrap/FocusTrap.js +4 -3
- package/lib/commonjs/FocusTrap/FocusTrap.js.map +1 -1
- package/lib/commonjs/Grid/Grid.js +21 -18
- package/lib/commonjs/Grid/Grid.js.map +1 -1
- package/lib/commonjs/Group/Group.js +3 -3
- package/lib/commonjs/Group/Group.js.map +1 -1
- package/lib/commonjs/Highlight/Highlight.js +2 -1
- package/lib/commonjs/Highlight/Highlight.js.map +1 -1
- package/lib/commonjs/HoverCard/HoverCard.js +6 -23
- package/lib/commonjs/HoverCard/HoverCard.js.map +1 -1
- package/lib/commonjs/Image/Image.native.js +1 -1
- package/lib/commonjs/Image/createImage.js +88 -56
- package/lib/commonjs/Image/createImage.js.map +1 -1
- package/lib/commonjs/Indicator/Indicator.js +36 -29
- package/lib/commonjs/Indicator/Indicator.js.map +1 -1
- package/lib/commonjs/Input/Input.js +87 -119
- package/lib/commonjs/Input/Input.js.map +1 -1
- package/lib/commonjs/Input/Input.native.js +54 -35
- package/lib/commonjs/Input/Input.native.js.map +1 -1
- package/lib/commonjs/Input/shared.js +148 -225
- package/lib/commonjs/Input/shared.js.map +1 -1
- package/lib/commonjs/InputBase/InputBase.js +2 -1
- package/lib/commonjs/InputBase/InputBase.js.map +1 -1
- package/lib/commonjs/Kbd/Kbd.js +12 -18
- package/lib/commonjs/Kbd/Kbd.js.map +1 -1
- package/lib/commonjs/KeyboardAvoidingView/KeyboardAvoidingView.native.js +2 -2
- package/lib/commonjs/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -1
- package/lib/commonjs/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js +1 -1
- package/lib/commonjs/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js.map +1 -1
- package/lib/commonjs/List/List.js +10 -10
- package/lib/commonjs/List/List.js.map +1 -1
- package/lib/commonjs/Loader/Loader.js +31 -37
- package/lib/commonjs/Loader/Loader.js.map +1 -1
- package/lib/commonjs/LoadingOverlay/LoadingOverlay.js +2 -1
- package/lib/commonjs/LoadingOverlay/LoadingOverlay.js.map +1 -1
- package/lib/commonjs/Mark/Mark.js +12 -15
- package/lib/commonjs/Mark/Mark.js.map +1 -1
- package/lib/commonjs/Marquee/Marquee.js +66 -48
- package/lib/commonjs/Marquee/Marquee.js.map +1 -1
- package/lib/commonjs/MaskInput/MaskInput.js +2 -1
- package/lib/commonjs/MaskInput/MaskInput.js.map +1 -1
- package/lib/commonjs/Menu/Menu.js +84 -48
- package/lib/commonjs/Menu/Menu.js.map +1 -1
- package/lib/commonjs/Modal/Modal.js +34 -30
- package/lib/commonjs/Modal/Modal.js.map +1 -1
- package/lib/commonjs/Modal/drag/DragDismissHost.js +4 -1
- package/lib/commonjs/Modal/drag/DragDismissHost.js.map +1 -1
- package/lib/commonjs/Modal/drag/DragDismissHost.web.js +10 -6
- package/lib/commonjs/Modal/drag/DragDismissHost.web.js.map +1 -1
- package/lib/commonjs/Modal/drag/DragDismissOverlay.js +4 -1
- package/lib/commonjs/Modal/drag/DragDismissOverlay.js.map +1 -1
- package/lib/commonjs/Modal/drag/DragDismissOverlay.web.js +6 -8
- package/lib/commonjs/Modal/drag/DragDismissOverlay.web.js.map +1 -1
- package/lib/commonjs/Modal/drag/index.js.map +1 -1
- package/lib/commonjs/Modal/drag/useDragDismiss.js +83 -67
- package/lib/commonjs/Modal/drag/useDragDismiss.js.map +1 -1
- package/lib/commonjs/Modal/modal-base-inner.js +1 -1
- package/lib/commonjs/Modal/modal-base-inner.js.map +1 -1
- package/lib/commonjs/Modal/modal-base-inner.native.js +3 -2
- package/lib/commonjs/Modal/modal-base-inner.native.js.map +1 -1
- package/lib/commonjs/Modal/modal-base.js +24 -11
- package/lib/commonjs/Modal/modal-base.js.map +1 -1
- package/lib/commonjs/MultiSelect/MultiSelect.js +6 -2
- package/lib/commonjs/MultiSelect/MultiSelect.js.map +1 -1
- package/lib/commonjs/NativeSelect/NativeSelect.js +25 -30
- package/lib/commonjs/NativeSelect/NativeSelect.js.map +1 -1
- package/lib/commonjs/NavLink/NavLink.js +63 -58
- package/lib/commonjs/NavLink/NavLink.js.map +1 -1
- package/lib/commonjs/Notification/Notification.js +28 -28
- package/lib/commonjs/Notification/Notification.js.map +1 -1
- package/lib/commonjs/NumberFormatter/NumberFormatter.js +2 -2
- package/lib/commonjs/NumberFormatter/NumberFormatter.js.map +1 -1
- package/lib/commonjs/NumberInput/NumberInput.js +46 -43
- package/lib/commonjs/NumberInput/NumberInput.js.map +1 -1
- package/lib/commonjs/Overlay/Overlay.js +18 -11
- package/lib/commonjs/Overlay/Overlay.js.map +1 -1
- package/lib/commonjs/Pagination/Pagination.js +125 -120
- package/lib/commonjs/Pagination/Pagination.js.map +1 -1
- package/lib/commonjs/Paper/Paper.js +7 -8
- package/lib/commonjs/Paper/Paper.js.map +1 -1
- package/lib/commonjs/Paragraph/Paragraph.js +7 -10
- package/lib/commonjs/Paragraph/Paragraph.js.map +1 -1
- package/lib/commonjs/PasswordInput/PasswordInput.js +3 -3
- package/lib/commonjs/PasswordInput/PasswordInput.js.map +1 -1
- package/lib/commonjs/Pill/Pill.js +40 -34
- package/lib/commonjs/Pill/Pill.js.map +1 -1
- package/lib/commonjs/PillsInput/PillsInput.js +58 -31
- package/lib/commonjs/PillsInput/PillsInput.js.map +1 -1
- package/lib/commonjs/PinInput/PinInput.js +26 -20
- package/lib/commonjs/PinInput/PinInput.js.map +1 -1
- package/lib/commonjs/Popover/Popover.native.js +6 -2
- package/lib/commonjs/Popover/Popover.native.js.map +1 -1
- package/lib/commonjs/Popover/Popover.shared.js +34 -23
- package/lib/commonjs/Popover/Popover.shared.js.map +1 -1
- package/lib/commonjs/Portal/OverlayHost.js.map +1 -1
- package/lib/commonjs/Portal/OverlayPortal.js +33 -0
- package/lib/commonjs/Portal/OverlayPortal.js.map +1 -0
- package/lib/commonjs/Portal/index.js +7 -0
- package/lib/commonjs/Portal/index.js.map +1 -1
- package/lib/commonjs/Progress/Progress.js +37 -26
- package/lib/commonjs/Progress/Progress.js.map +1 -1
- package/lib/commonjs/Radio/Radio.js +81 -93
- package/lib/commonjs/Radio/Radio.js.map +1 -1
- package/lib/commonjs/Radio/RadioIcon.js +4 -6
- package/lib/commonjs/Radio/RadioIcon.js.map +1 -1
- package/lib/commonjs/Rating/Rating.js +48 -38
- package/lib/commonjs/Rating/Rating.js.map +1 -1
- package/lib/commonjs/RollingNumber/RollingNumber.js +48 -24
- package/lib/commonjs/RollingNumber/RollingNumber.js.map +1 -1
- package/lib/commonjs/ScrollArea/ScrollArea.js +40 -37
- package/lib/commonjs/ScrollArea/ScrollArea.js.map +1 -1
- package/lib/commonjs/ScrollArea/ScrollArea.native.js +46 -41
- package/lib/commonjs/ScrollArea/ScrollArea.native.js.map +1 -1
- package/lib/commonjs/SegmentedControl/SegmentedControl.js +106 -55
- package/lib/commonjs/SegmentedControl/SegmentedControl.js.map +1 -1
- package/lib/commonjs/Select/Select.js +7 -3
- package/lib/commonjs/Select/Select.js.map +1 -1
- package/lib/commonjs/Separator/Separator.js +47 -39
- package/lib/commonjs/Separator/Separator.js.map +1 -1
- package/lib/commonjs/SimpleGrid/SimpleGrid.js +12 -14
- package/lib/commonjs/SimpleGrid/SimpleGrid.js.map +1 -1
- package/lib/commonjs/Skeleton/Skeleton.js +39 -24
- package/lib/commonjs/Skeleton/Skeleton.js.map +1 -1
- package/lib/commonjs/Slider/Slider.js +308 -257
- package/lib/commonjs/Slider/Slider.js.map +1 -1
- package/lib/commonjs/Spacer/Spacer.js +15 -29
- package/lib/commonjs/Spacer/Spacer.js.map +1 -1
- package/lib/commonjs/Spoiler/Spoiler.js +16 -16
- package/lib/commonjs/Spoiler/Spoiler.js.map +1 -1
- package/lib/commonjs/Stack/Stack.js +3 -3
- package/lib/commonjs/Stack/Stack.js.map +1 -1
- package/lib/commonjs/Stepper/Stepper.js +96 -71
- package/lib/commonjs/Stepper/Stepper.js.map +1 -1
- package/lib/commonjs/Switch/Switch.js +71 -67
- package/lib/commonjs/Switch/Switch.js.map +1 -1
- package/lib/commonjs/Table/Table.js +96 -82
- package/lib/commonjs/Table/Table.js.map +1 -1
- package/lib/commonjs/TableOfContents/TableOfContents.js +94 -95
- package/lib/commonjs/TableOfContents/TableOfContents.js.map +1 -1
- package/lib/commonjs/Tabs/Tabs.js +71 -73
- package/lib/commonjs/Tabs/Tabs.js.map +1 -1
- package/lib/commonjs/TagsInput/TagsInput.js +19 -3
- package/lib/commonjs/TagsInput/TagsInput.js.map +1 -1
- package/lib/commonjs/Text/Text.js +29 -14
- package/lib/commonjs/Text/Text.js.map +1 -1
- package/lib/commonjs/TextInput/TextInput.js +2 -1
- package/lib/commonjs/TextInput/TextInput.js.map +1 -1
- package/lib/commonjs/Textarea/Textarea.js +1 -1
- package/lib/commonjs/Textarea/Textarea.js.map +1 -1
- package/lib/commonjs/ThemeIcon/ThemeIcon.js +10 -6
- package/lib/commonjs/ThemeIcon/ThemeIcon.js.map +1 -1
- package/lib/commonjs/Title/Title.js +49 -32
- package/lib/commonjs/Title/Title.js.map +1 -1
- package/lib/commonjs/Tooltip/Tooltip.js +44 -28
- package/lib/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/lib/commonjs/Transition/Transition.native.js +11 -10
- package/lib/commonjs/Transition/Transition.native.js.map +1 -1
- package/lib/commonjs/Transition/use-overlay-transition.native.js +2 -5
- package/lib/commonjs/Transition/use-overlay-transition.native.js.map +1 -1
- package/lib/commonjs/Tree/Tree.js +30 -34
- package/lib/commonjs/Tree/Tree.js.map +1 -1
- package/lib/commonjs/TreeSelect/TreeSelect.js +50 -26
- package/lib/commonjs/TreeSelect/TreeSelect.js.map +1 -1
- package/lib/commonjs/Typography/Typography.js +5 -7
- package/lib/commonjs/Typography/Typography.js.map +1 -1
- package/lib/commonjs/UnstyledButton/UnstyledButton.js +4 -4
- package/lib/commonjs/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/commonjs/VirtualList/VirtualList.js +23 -7
- package/lib/commonjs/VirtualList/VirtualList.js.map +1 -1
- package/lib/commonjs/VisuallyHidden/VisuallyHidden.js +7 -10
- package/lib/commonjs/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/lib/commonjs/control-system.js +7 -0
- package/lib/commonjs/control-system.js.map +1 -1
- package/lib/commonjs/index.js +12 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/ControlIconProvider.js +1 -1
- package/lib/commonjs/internal/ControlIconProvider.js.map +1 -1
- package/lib/commonjs/internal/InlineControl.js +24 -29
- package/lib/commonjs/internal/InlineControl.js.map +1 -1
- package/lib/commonjs/internal/collapse-box.js +12 -10
- package/lib/commonjs/internal/collapse-box.js.map +1 -1
- package/lib/commonjs/internal/control-icon-size.js +5 -8
- package/lib/commonjs/internal/control-icon-size.js.map +1 -1
- package/lib/commonjs/internal/control-metrics.js +51 -51
- package/lib/commonjs/internal/control-metrics.js.map +1 -1
- package/lib/commonjs/internal/floating-arrow.js +43 -29
- package/lib/commonjs/internal/floating-arrow.js.map +1 -1
- package/lib/commonjs/internal/focus-ring.js +99 -0
- package/lib/commonjs/internal/focus-ring.js.map +1 -0
- package/lib/commonjs/internal/gradient-shared.js +18 -8
- package/lib/commonjs/internal/gradient-shared.js.map +1 -1
- package/lib/commonjs/internal/gradient.js +6 -0
- package/lib/commonjs/internal/gradient.js.map +1 -1
- package/lib/commonjs/internal/gradient.native.js +7 -1
- package/lib/commonjs/internal/gradient.native.js.map +1 -1
- package/lib/commonjs/internal/motion.js +247 -359
- package/lib/commonjs/internal/motion.js.map +1 -1
- package/lib/commonjs/internal/resolve-theme-color.js +10 -10
- package/lib/commonjs/internal/resolve-theme-color.js.map +1 -1
- package/lib/commonjs/internal/style-props.js +510 -464
- package/lib/commonjs/internal/style-props.js.map +1 -1
- package/lib/commonjs/internal/theme-color-web.js +44 -26
- package/lib/commonjs/internal/theme-color-web.js.map +1 -1
- package/lib/commonjs/internal/use-icon-color.js +1 -1
- package/lib/commonjs/internal/use-icon-color.native.js +1 -1
- package/lib/commonjs/internal/use-looping-animation.native.js +1 -1
- package/lib/commonjs/internal/use-looping-animation.native.js.map +1 -1
- package/lib/commonjs/internal/use-slot-text-wrapper.js +1 -1
- package/lib/commonjs/internal/variant-colors.js +163 -229
- package/lib/commonjs/internal/variant-colors.js.map +1 -1
- package/lib/module/Accordion/Accordion.js +80 -98
- package/lib/module/Accordion/Accordion.js.map +1 -1
- package/lib/module/ActionIcon/ActionIcon.js +130 -64
- package/lib/module/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/module/Affix/Affix.js +19 -23
- package/lib/module/Affix/Affix.js.map +1 -1
- package/lib/module/Alert/Alert.js +56 -56
- package/lib/module/Alert/Alert.js.map +1 -1
- package/lib/module/Anchor/Anchor.js +13 -16
- package/lib/module/Anchor/Anchor.js.map +1 -1
- package/lib/module/AngleSlider/AngleSlider.js +66 -38
- package/lib/module/AngleSlider/AngleSlider.js.map +1 -1
- package/lib/module/AspectRatio/AspectRatio.js +10 -14
- package/lib/module/AspectRatio/AspectRatio.js.map +1 -1
- package/lib/module/Autocomplete/Autocomplete.js +8 -4
- package/lib/module/Autocomplete/Autocomplete.js.map +1 -1
- package/lib/module/Avatar/Avatar.js +31 -28
- package/lib/module/Avatar/Avatar.js.map +1 -1
- package/lib/module/BackgroundImage/BackgroundImage.js +16 -7
- package/lib/module/BackgroundImage/BackgroundImage.js.map +1 -1
- package/lib/module/Badge/Badge.js +63 -52
- package/lib/module/Badge/Badge.js.map +1 -1
- package/lib/module/Blockquote/Blockquote.js +82 -81
- package/lib/module/Blockquote/Blockquote.js.map +1 -1
- package/lib/module/Box/Box.js +2 -2
- package/lib/module/Box/Box.js.map +1 -1
- package/lib/module/Breadcrumbs/Breadcrumbs.js +10 -10
- package/lib/module/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/module/Burger/Burger.js +32 -21
- package/lib/module/Burger/Burger.js.map +1 -1
- package/lib/module/Button/Button.js +107 -65
- package/lib/module/Button/Button.js.map +1 -1
- package/lib/module/Card/Card.js +51 -39
- package/lib/module/Card/Card.js.map +1 -1
- package/lib/module/Center/Center.js +3 -3
- package/lib/module/Center/Center.js.map +1 -1
- package/lib/module/Checkbox/CheckIcon.js +5 -4
- package/lib/module/Checkbox/CheckIcon.js.map +1 -1
- package/lib/module/Checkbox/Checkbox.js +100 -70
- package/lib/module/Checkbox/Checkbox.js.map +1 -1
- package/lib/module/Chip/Chip.js +35 -68
- package/lib/module/Chip/Chip.js.map +1 -1
- package/lib/module/CloseButton/CloseButton.js +14 -7
- package/lib/module/CloseButton/CloseButton.js.map +1 -1
- package/lib/module/Code/Code.js +15 -11
- package/lib/module/Code/Code.js.map +1 -1
- package/lib/module/Collapse/Collapse.js +11 -5
- package/lib/module/Collapse/Collapse.js.map +1 -1
- package/lib/module/ColorInput/ColorInput.js +26 -21
- package/lib/module/ColorInput/ColorInput.js.map +1 -1
- package/lib/module/ColorPicker/ColorPicker.js +96 -84
- package/lib/module/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/module/ColorSwatch/ColorSwatch.js +13 -15
- package/lib/module/ColorSwatch/ColorSwatch.js.map +1 -1
- package/lib/module/Combobox/Combobox.js +194 -188
- package/lib/module/Combobox/Combobox.js.map +1 -1
- package/lib/module/Combobox/OptionsDropdown.js +13 -7
- package/lib/module/Combobox/OptionsDropdown.js.map +1 -1
- package/lib/module/Combobox/index.js +1 -1
- package/lib/module/Combobox/index.js.map +1 -1
- package/lib/module/Container/Container.js +12 -19
- package/lib/module/Container/Container.js.map +1 -1
- package/lib/module/Dialog/Dialog.js +16 -15
- package/lib/module/Dialog/Dialog.js.map +1 -1
- package/lib/module/Drawer/Drawer.js +53 -34
- package/lib/module/Drawer/Drawer.js.map +1 -1
- package/lib/module/Fieldset/Fieldset.js +27 -19
- package/lib/module/Fieldset/Fieldset.js.map +1 -1
- package/lib/module/FileButton/FileButton.js +5 -3
- package/lib/module/FileButton/FileButton.js.map +1 -1
- package/lib/module/Flex/Flex.js +24 -28
- package/lib/module/Flex/Flex.js.map +1 -1
- package/lib/module/FocusTrap/FocusTrap.js +4 -3
- package/lib/module/FocusTrap/FocusTrap.js.map +1 -1
- package/lib/module/Grid/Grid.js +22 -19
- package/lib/module/Grid/Grid.js.map +1 -1
- package/lib/module/Group/Group.js +4 -4
- package/lib/module/Group/Group.js.map +1 -1
- package/lib/module/Highlight/Highlight.js +2 -1
- package/lib/module/Highlight/Highlight.js.map +1 -1
- package/lib/module/HoverCard/HoverCard.js +8 -25
- package/lib/module/HoverCard/HoverCard.js.map +1 -1
- package/lib/module/Image/Image.native.js +1 -1
- package/lib/module/Image/createImage.js +88 -56
- package/lib/module/Image/createImage.js.map +1 -1
- package/lib/module/Indicator/Indicator.js +37 -30
- package/lib/module/Indicator/Indicator.js.map +1 -1
- package/lib/module/Input/Input.js +89 -121
- package/lib/module/Input/Input.js.map +1 -1
- package/lib/module/Input/Input.native.js +56 -37
- package/lib/module/Input/Input.native.js.map +1 -1
- package/lib/module/Input/shared.js +148 -225
- package/lib/module/Input/shared.js.map +1 -1
- package/lib/module/InputBase/InputBase.js +2 -1
- package/lib/module/InputBase/InputBase.js.map +1 -1
- package/lib/module/Kbd/Kbd.js +12 -18
- package/lib/module/Kbd/Kbd.js.map +1 -1
- package/lib/module/KeyboardAvoidingView/KeyboardAvoidingView.native.js +2 -2
- package/lib/module/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -1
- package/lib/module/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js +1 -1
- package/lib/module/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js.map +1 -1
- package/lib/module/List/List.js +11 -11
- package/lib/module/List/List.js.map +1 -1
- package/lib/module/Loader/Loader.js +33 -39
- package/lib/module/Loader/Loader.js.map +1 -1
- package/lib/module/LoadingOverlay/LoadingOverlay.js +2 -1
- package/lib/module/LoadingOverlay/LoadingOverlay.js.map +1 -1
- package/lib/module/Mark/Mark.js +11 -15
- package/lib/module/Mark/Mark.js.map +1 -1
- package/lib/module/Marquee/Marquee.js +66 -48
- package/lib/module/Marquee/Marquee.js.map +1 -1
- package/lib/module/MaskInput/MaskInput.js +2 -1
- package/lib/module/MaskInput/MaskInput.js.map +1 -1
- package/lib/module/Menu/Menu.js +86 -50
- package/lib/module/Menu/Menu.js.map +1 -1
- package/lib/module/Modal/Modal.js +35 -31
- package/lib/module/Modal/Modal.js.map +1 -1
- package/lib/module/Modal/drag/DragDismissHost.js +4 -1
- package/lib/module/Modal/drag/DragDismissHost.js.map +1 -1
- package/lib/module/Modal/drag/DragDismissHost.web.js +10 -6
- package/lib/module/Modal/drag/DragDismissHost.web.js.map +1 -1
- package/lib/module/Modal/drag/DragDismissOverlay.js +4 -1
- package/lib/module/Modal/drag/DragDismissOverlay.js.map +1 -1
- package/lib/module/Modal/drag/DragDismissOverlay.web.js +6 -8
- package/lib/module/Modal/drag/DragDismissOverlay.web.js.map +1 -1
- package/lib/module/Modal/drag/index.js +1 -1
- package/lib/module/Modal/drag/index.js.map +1 -1
- package/lib/module/Modal/drag/useDragDismiss.js +84 -68
- package/lib/module/Modal/drag/useDragDismiss.js.map +1 -1
- package/lib/module/Modal/modal-base-inner.js +1 -1
- package/lib/module/Modal/modal-base-inner.js.map +1 -1
- package/lib/module/Modal/modal-base-inner.native.js +3 -2
- package/lib/module/Modal/modal-base-inner.native.js.map +1 -1
- package/lib/module/Modal/modal-base.js +25 -12
- package/lib/module/Modal/modal-base.js.map +1 -1
- package/lib/module/MultiSelect/MultiSelect.js +7 -3
- package/lib/module/MultiSelect/MultiSelect.js.map +1 -1
- package/lib/module/NativeSelect/NativeSelect.js +26 -31
- package/lib/module/NativeSelect/NativeSelect.js.map +1 -1
- package/lib/module/NavLink/NavLink.js +64 -59
- package/lib/module/NavLink/NavLink.js.map +1 -1
- package/lib/module/Notification/Notification.js +29 -29
- package/lib/module/Notification/Notification.js.map +1 -1
- package/lib/module/NumberFormatter/NumberFormatter.js +3 -3
- package/lib/module/NumberFormatter/NumberFormatter.js.map +1 -1
- package/lib/module/NumberInput/NumberInput.js +49 -46
- package/lib/module/NumberInput/NumberInput.js.map +1 -1
- package/lib/module/Overlay/Overlay.js +19 -12
- package/lib/module/Overlay/Overlay.js.map +1 -1
- package/lib/module/Pagination/Pagination.js +127 -122
- package/lib/module/Pagination/Pagination.js.map +1 -1
- package/lib/module/Paper/Paper.js +8 -9
- package/lib/module/Paper/Paper.js.map +1 -1
- package/lib/module/Paragraph/Paragraph.js +6 -10
- package/lib/module/Paragraph/Paragraph.js.map +1 -1
- package/lib/module/PasswordInput/PasswordInput.js +4 -4
- package/lib/module/PasswordInput/PasswordInput.js.map +1 -1
- package/lib/module/Pill/Pill.js +42 -36
- package/lib/module/Pill/Pill.js.map +1 -1
- package/lib/module/PillsInput/PillsInput.js +59 -32
- package/lib/module/PillsInput/PillsInput.js.map +1 -1
- package/lib/module/PinInput/PinInput.js +27 -21
- package/lib/module/PinInput/PinInput.js.map +1 -1
- package/lib/module/Popover/Popover.native.js +6 -2
- package/lib/module/Popover/Popover.native.js.map +1 -1
- package/lib/module/Popover/Popover.shared.js +36 -25
- package/lib/module/Popover/Popover.shared.js.map +1 -1
- package/lib/module/Portal/OverlayHost.js.map +1 -1
- package/lib/module/Portal/OverlayPortal.js +28 -0
- package/lib/module/Portal/OverlayPortal.js.map +1 -0
- package/lib/module/Portal/index.js +4 -0
- package/lib/module/Portal/index.js.map +1 -1
- package/lib/module/Progress/Progress.js +39 -28
- package/lib/module/Progress/Progress.js.map +1 -1
- package/lib/module/Radio/Radio.js +83 -95
- package/lib/module/Radio/Radio.js.map +1 -1
- package/lib/module/Radio/RadioIcon.js +4 -6
- package/lib/module/Radio/RadioIcon.js.map +1 -1
- package/lib/module/Rating/Rating.js +50 -40
- package/lib/module/Rating/Rating.js.map +1 -1
- package/lib/module/RollingNumber/RollingNumber.js +49 -25
- package/lib/module/RollingNumber/RollingNumber.js.map +1 -1
- package/lib/module/ScrollArea/ScrollArea.js +41 -38
- package/lib/module/ScrollArea/ScrollArea.js.map +1 -1
- package/lib/module/ScrollArea/ScrollArea.native.js +48 -43
- package/lib/module/ScrollArea/ScrollArea.native.js.map +1 -1
- package/lib/module/SegmentedControl/SegmentedControl.js +108 -57
- package/lib/module/SegmentedControl/SegmentedControl.js.map +1 -1
- package/lib/module/Select/Select.js +8 -4
- package/lib/module/Select/Select.js.map +1 -1
- package/lib/module/Separator/Separator.js +49 -41
- package/lib/module/Separator/Separator.js.map +1 -1
- package/lib/module/SimpleGrid/SimpleGrid.js +14 -16
- package/lib/module/SimpleGrid/SimpleGrid.js.map +1 -1
- package/lib/module/Skeleton/Skeleton.js +40 -25
- package/lib/module/Skeleton/Skeleton.js.map +1 -1
- package/lib/module/Slider/Slider.js +309 -258
- package/lib/module/Slider/Slider.js.map +1 -1
- package/lib/module/Spacer/Spacer.js +16 -29
- package/lib/module/Spacer/Spacer.js.map +1 -1
- package/lib/module/Spoiler/Spoiler.js +17 -17
- package/lib/module/Spoiler/Spoiler.js.map +1 -1
- package/lib/module/Stack/Stack.js +3 -3
- package/lib/module/Stack/Stack.js.map +1 -1
- package/lib/module/Stepper/Stepper.js +97 -72
- package/lib/module/Stepper/Stepper.js.map +1 -1
- package/lib/module/Switch/Switch.js +73 -69
- package/lib/module/Switch/Switch.js.map +1 -1
- package/lib/module/Table/Table.js +99 -85
- package/lib/module/Table/Table.js.map +1 -1
- package/lib/module/TableOfContents/TableOfContents.js +96 -97
- package/lib/module/TableOfContents/TableOfContents.js.map +1 -1
- package/lib/module/Tabs/Tabs.js +72 -74
- package/lib/module/Tabs/Tabs.js.map +1 -1
- package/lib/module/TagsInput/TagsInput.js +21 -5
- package/lib/module/TagsInput/TagsInput.js.map +1 -1
- package/lib/module/Text/Text.js +29 -14
- package/lib/module/Text/Text.js.map +1 -1
- package/lib/module/TextInput/TextInput.js +2 -1
- package/lib/module/TextInput/TextInput.js.map +1 -1
- package/lib/module/Textarea/Textarea.js +2 -2
- package/lib/module/Textarea/Textarea.js.map +1 -1
- package/lib/module/ThemeIcon/ThemeIcon.js +12 -8
- package/lib/module/ThemeIcon/ThemeIcon.js.map +1 -1
- package/lib/module/Title/Title.js +51 -34
- package/lib/module/Title/Title.js.map +1 -1
- package/lib/module/Tooltip/Tooltip.js +46 -30
- package/lib/module/Tooltip/Tooltip.js.map +1 -1
- package/lib/module/Transition/Transition.native.js +12 -11
- package/lib/module/Transition/Transition.native.js.map +1 -1
- package/lib/module/Transition/use-overlay-transition.native.js +3 -6
- package/lib/module/Transition/use-overlay-transition.native.js.map +1 -1
- package/lib/module/Tree/Tree.js +31 -35
- package/lib/module/Tree/Tree.js.map +1 -1
- package/lib/module/TreeSelect/TreeSelect.js +52 -28
- package/lib/module/TreeSelect/TreeSelect.js.map +1 -1
- package/lib/module/Typography/Typography.js +5 -7
- package/lib/module/Typography/Typography.js.map +1 -1
- package/lib/module/UnstyledButton/UnstyledButton.js +5 -5
- package/lib/module/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/module/VirtualList/VirtualList.js +23 -7
- package/lib/module/VirtualList/VirtualList.js.map +1 -1
- package/lib/module/VisuallyHidden/VisuallyHidden.js +6 -10
- package/lib/module/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/lib/module/control-system.js +5 -0
- package/lib/module/control-system.js.map +1 -1
- package/lib/module/index.js +9 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/ControlIconProvider.js +1 -1
- package/lib/module/internal/ControlIconProvider.js.map +1 -1
- package/lib/module/internal/InlineControl.js +25 -30
- package/lib/module/internal/InlineControl.js.map +1 -1
- package/lib/module/internal/collapse-box.js +13 -11
- package/lib/module/internal/collapse-box.js.map +1 -1
- package/lib/module/internal/control-icon-size.js +5 -8
- package/lib/module/internal/control-icon-size.js.map +1 -1
- package/lib/module/internal/control-metrics.js +52 -52
- package/lib/module/internal/control-metrics.js.map +1 -1
- package/lib/module/internal/floating-arrow.js +44 -30
- package/lib/module/internal/floating-arrow.js.map +1 -1
- package/lib/module/internal/focus-ring.js +95 -0
- package/lib/module/internal/focus-ring.js.map +1 -0
- package/lib/module/internal/gradient-shared.js +16 -7
- package/lib/module/internal/gradient-shared.js.map +1 -1
- package/lib/module/internal/gradient.js +2 -0
- package/lib/module/internal/gradient.js.map +1 -1
- package/lib/module/internal/gradient.native.js +3 -1
- package/lib/module/internal/gradient.native.js.map +1 -1
- package/lib/module/internal/motion.js +245 -359
- package/lib/module/internal/motion.js.map +1 -1
- package/lib/module/internal/resolve-theme-color.js +10 -10
- package/lib/module/internal/resolve-theme-color.js.map +1 -1
- package/lib/module/internal/style-props.js +471 -459
- package/lib/module/internal/style-props.js.map +1 -1
- package/lib/module/internal/theme-color-web.js +45 -27
- package/lib/module/internal/theme-color-web.js.map +1 -1
- package/lib/module/internal/use-icon-color.js +1 -1
- package/lib/module/internal/use-icon-color.native.js +1 -1
- package/lib/module/internal/use-looping-animation.native.js +1 -1
- package/lib/module/internal/use-looping-animation.native.js.map +1 -1
- package/lib/module/internal/use-slot-text-wrapper.js +1 -1
- package/lib/module/internal/variant-colors.js +150 -228
- package/lib/module/internal/variant-colors.js.map +1 -1
- package/lib/typescript/Accordion/Accordion.d.ts +120 -74
- package/lib/typescript/Accordion/Accordion.d.ts.map +1 -1
- package/lib/typescript/ActionIcon/ActionIcon.d.ts +236 -94
- package/lib/typescript/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/lib/typescript/Affix/Affix.d.ts +12 -7
- package/lib/typescript/Affix/Affix.d.ts.map +1 -1
- package/lib/typescript/Alert/Alert.d.ts +228 -68
- package/lib/typescript/Alert/Alert.d.ts.map +1 -1
- package/lib/typescript/Anchor/Anchor.d.ts +33 -24
- package/lib/typescript/Anchor/Anchor.d.ts.map +1 -1
- package/lib/typescript/AngleSlider/AngleSlider.d.ts +224 -66
- package/lib/typescript/AngleSlider/AngleSlider.d.ts.map +1 -1
- package/lib/typescript/AspectRatio/AspectRatio.d.ts +34 -14
- package/lib/typescript/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/lib/typescript/Autocomplete/Autocomplete.d.ts +30 -42
- package/lib/typescript/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/lib/typescript/Avatar/Avatar.d.ts +174 -198
- package/lib/typescript/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/BackgroundImage/BackgroundImage.d.ts +15 -10
- package/lib/typescript/BackgroundImage/BackgroundImage.d.ts.map +1 -1
- package/lib/typescript/Badge/Badge.d.ts +138 -62
- package/lib/typescript/Badge/Badge.d.ts.map +1 -1
- package/lib/typescript/Blockquote/Blockquote.d.ts +148 -50
- package/lib/typescript/Blockquote/Blockquote.d.ts.map +1 -1
- package/lib/typescript/Box/Box.d.ts +11 -3
- package/lib/typescript/Box/Box.d.ts.map +1 -1
- package/lib/typescript/Breadcrumbs/Breadcrumbs.d.ts +115 -35
- package/lib/typescript/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/typescript/Burger/Burger.d.ts +124 -41
- package/lib/typescript/Burger/Burger.d.ts.map +1 -1
- package/lib/typescript/Button/Button.d.ts +236 -107
- package/lib/typescript/Button/Button.d.ts.map +1 -1
- package/lib/typescript/Card/Card.d.ts +79 -47
- package/lib/typescript/Card/Card.d.ts.map +1 -1
- package/lib/typescript/Center/Center.d.ts +13 -9
- package/lib/typescript/Center/Center.d.ts.map +1 -1
- package/lib/typescript/Checkbox/CheckIcon.d.ts +7 -3
- package/lib/typescript/Checkbox/CheckIcon.d.ts.map +1 -1
- package/lib/typescript/Checkbox/Checkbox.d.ts +79 -60
- package/lib/typescript/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/Chip/Chip.d.ts +140 -57
- package/lib/typescript/Chip/Chip.d.ts.map +1 -1
- package/lib/typescript/CloseButton/CloseButton.d.ts +85 -50
- package/lib/typescript/CloseButton/CloseButton.d.ts.map +1 -1
- package/lib/typescript/Code/Code.d.ts +31 -23
- package/lib/typescript/Code/Code.d.ts.map +1 -1
- package/lib/typescript/Collapse/Collapse.d.ts +44 -20
- package/lib/typescript/Collapse/Collapse.d.ts.map +1 -1
- package/lib/typescript/ColorInput/ColorInput.d.ts +15 -5
- package/lib/typescript/ColorInput/ColorInput.d.ts.map +1 -1
- package/lib/typescript/ColorPicker/ColorPicker.d.ts +72 -16
- package/lib/typescript/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/lib/typescript/ColorSwatch/ColorSwatch.d.ts +59 -38
- package/lib/typescript/ColorSwatch/ColorSwatch.d.ts.map +1 -1
- package/lib/typescript/Combobox/Combobox.d.ts +183 -100
- package/lib/typescript/Combobox/Combobox.d.ts.map +1 -1
- package/lib/typescript/Combobox/OptionsDropdown.d.ts +6 -0
- package/lib/typescript/Combobox/OptionsDropdown.d.ts.map +1 -1
- package/lib/typescript/Combobox/index.d.ts +66 -86
- package/lib/typescript/Combobox/index.d.ts.map +1 -1
- package/lib/typescript/Container/Container.d.ts +3 -41
- package/lib/typescript/Container/Container.d.ts.map +1 -1
- package/lib/typescript/Dialog/Dialog.d.ts +79 -76
- package/lib/typescript/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/Drawer/Drawer.d.ts +115 -40
- package/lib/typescript/Drawer/Drawer.d.ts.map +1 -1
- package/lib/typescript/Fieldset/Fieldset.d.ts +91 -46
- package/lib/typescript/Fieldset/Fieldset.d.ts.map +1 -1
- package/lib/typescript/FileButton/FileButton.d.ts.map +1 -1
- package/lib/typescript/FileInput/FileInput.d.ts +1 -1
- package/lib/typescript/FileInput/FileInput.d.ts.map +1 -1
- package/lib/typescript/Flex/Flex.d.ts +28 -26
- package/lib/typescript/Flex/Flex.d.ts.map +1 -1
- package/lib/typescript/FocusTrap/FocusTrap.d.ts.map +1 -1
- package/lib/typescript/Grid/Grid.d.ts +56 -48
- package/lib/typescript/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/Group/Group.d.ts +21 -16
- package/lib/typescript/Group/Group.d.ts.map +1 -1
- package/lib/typescript/Highlight/Highlight.d.ts +1 -15
- package/lib/typescript/Highlight/Highlight.d.ts.map +1 -1
- package/lib/typescript/HoverCard/HoverCard.d.ts +9 -9
- package/lib/typescript/HoverCard/HoverCard.d.ts.map +1 -1
- package/lib/typescript/Image/Image.d.ts +53 -121
- package/lib/typescript/Image/Image.d.ts.map +1 -1
- package/lib/typescript/Image/Image.native.d.ts +54 -122
- package/lib/typescript/Image/Image.native.d.ts.map +1 -1
- package/lib/typescript/Image/createImage.d.ts +56 -364
- package/lib/typescript/Image/createImage.d.ts.map +1 -1
- package/lib/typescript/Image/types.d.ts +4 -1
- package/lib/typescript/Image/types.d.ts.map +1 -1
- package/lib/typescript/Indicator/Indicator.d.ts +122 -43
- package/lib/typescript/Indicator/Indicator.d.ts.map +1 -1
- package/lib/typescript/Input/Input.d.ts +131 -328
- package/lib/typescript/Input/Input.d.ts.map +1 -1
- package/lib/typescript/Input/Input.native.d.ts +150 -472
- package/lib/typescript/Input/Input.native.d.ts.map +1 -1
- package/lib/typescript/Input/shared.d.ts +290 -490
- package/lib/typescript/Input/shared.d.ts.map +1 -1
- package/lib/typescript/Input/types.d.ts +14 -1
- package/lib/typescript/Input/types.d.ts.map +1 -1
- package/lib/typescript/InputBase/InputBase.d.ts +1 -52
- package/lib/typescript/InputBase/InputBase.d.ts.map +1 -1
- package/lib/typescript/Kbd/Kbd.d.ts +21 -65
- package/lib/typescript/Kbd/Kbd.d.ts.map +1 -1
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.d.ts +2 -6
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts +7 -3
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts.map +1 -1
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +2 -6
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts.map +1 -1
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.native.d.ts +13 -15
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.native.d.ts.map +1 -1
- package/lib/typescript/List/List.d.ts +165 -63
- package/lib/typescript/List/List.d.ts.map +1 -1
- package/lib/typescript/Loader/Loader.d.ts +58 -28
- package/lib/typescript/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/LoadingOverlay/LoadingOverlay.d.ts +1 -9
- package/lib/typescript/LoadingOverlay/LoadingOverlay.d.ts.map +1 -1
- package/lib/typescript/Mark/Mark.d.ts +21 -65
- package/lib/typescript/Mark/Mark.d.ts.map +1 -1
- package/lib/typescript/Marquee/Marquee.d.ts +127 -44
- package/lib/typescript/Marquee/Marquee.d.ts.map +1 -1
- package/lib/typescript/MaskInput/MaskInput.d.ts +1 -51
- package/lib/typescript/MaskInput/MaskInput.d.ts.map +1 -1
- package/lib/typescript/Menu/Menu.d.ts +93 -105
- package/lib/typescript/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/Modal/Modal.d.ts +166 -91
- package/lib/typescript/Modal/Modal.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/DragDismissHost.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/DragDismissHost.web.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/DragDismissOverlay.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/DragDismissOverlay.web.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/index.d.ts +2 -2
- package/lib/typescript/Modal/drag/index.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/types.d.ts +14 -2
- package/lib/typescript/Modal/drag/types.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/useDragDismiss.d.ts +2 -2
- package/lib/typescript/Modal/drag/useDragDismiss.d.ts.map +1 -1
- package/lib/typescript/Modal/modal-base-inner.d.ts +6 -2
- package/lib/typescript/Modal/modal-base-inner.d.ts.map +1 -1
- package/lib/typescript/Modal/modal-base-inner.native.d.ts +7 -3
- package/lib/typescript/Modal/modal-base-inner.native.d.ts.map +1 -1
- package/lib/typescript/Modal/modal-base.d.ts +2 -2
- package/lib/typescript/Modal/modal-base.d.ts.map +1 -1
- package/lib/typescript/MultiSelect/MultiSelect.d.ts +30 -50
- package/lib/typescript/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/lib/typescript/NativeSelect/NativeSelect.d.ts.map +1 -1
- package/lib/typescript/NativeSelect/NativeSelect.native.d.ts +1 -1
- package/lib/typescript/NativeSelect/NativeSelect.native.d.ts.map +1 -1
- package/lib/typescript/NavLink/NavLink.d.ts +245 -72
- package/lib/typescript/NavLink/NavLink.d.ts.map +1 -1
- package/lib/typescript/Notification/Notification.d.ts +230 -69
- package/lib/typescript/Notification/Notification.d.ts.map +1 -1
- package/lib/typescript/NumberFormatter/NumberFormatter.d.ts +24 -19
- package/lib/typescript/NumberFormatter/NumberFormatter.d.ts.map +1 -1
- package/lib/typescript/NumberInput/NumberInput.d.ts +91 -150
- package/lib/typescript/NumberInput/NumberInput.d.ts.map +1 -1
- package/lib/typescript/Overlay/Overlay.d.ts +17 -12
- package/lib/typescript/Overlay/Overlay.d.ts.map +1 -1
- package/lib/typescript/Pagination/Pagination.d.ts +43 -65
- package/lib/typescript/Pagination/Pagination.d.ts.map +1 -1
- package/lib/typescript/Paper/Paper.d.ts +19 -7
- package/lib/typescript/Paper/Paper.d.ts.map +1 -1
- package/lib/typescript/Paragraph/Paragraph.d.ts +23 -19
- package/lib/typescript/Paragraph/Paragraph.d.ts.map +1 -1
- package/lib/typescript/PasswordInput/PasswordInput.d.ts +110 -207
- package/lib/typescript/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/lib/typescript/Pill/Pill.d.ts +133 -95
- package/lib/typescript/Pill/Pill.d.ts.map +1 -1
- package/lib/typescript/PillsInput/PillsInput.d.ts +2 -2
- package/lib/typescript/PillsInput/PillsInput.d.ts.map +1 -1
- package/lib/typescript/PinInput/PinInput.d.ts +148 -297
- package/lib/typescript/PinInput/PinInput.d.ts.map +1 -1
- package/lib/typescript/Popover/Popover.native.d.ts.map +1 -1
- package/lib/typescript/Popover/Popover.shared.d.ts +15 -11
- package/lib/typescript/Popover/Popover.shared.d.ts.map +1 -1
- package/lib/typescript/Portal/OverlayHost.d.ts +2 -2
- package/lib/typescript/Portal/OverlayHost.d.ts.map +1 -1
- package/lib/typescript/Portal/OverlayPortal.d.ts +19 -0
- package/lib/typescript/Portal/OverlayPortal.d.ts.map +1 -0
- package/lib/typescript/Portal/index.d.ts +4 -0
- package/lib/typescript/Portal/index.d.ts.map +1 -1
- package/lib/typescript/Progress/Progress.d.ts +114 -65
- package/lib/typescript/Progress/Progress.d.ts.map +1 -1
- package/lib/typescript/Radio/Radio.d.ts +69 -80
- package/lib/typescript/Radio/Radio.d.ts.map +1 -1
- package/lib/typescript/Radio/RadioIcon.d.ts +5 -0
- package/lib/typescript/Radio/RadioIcon.d.ts.map +1 -1
- package/lib/typescript/Rating/Rating.d.ts +94 -44
- package/lib/typescript/Rating/Rating.d.ts.map +1 -1
- package/lib/typescript/RollingNumber/RollingNumber.d.ts +112 -32
- package/lib/typescript/RollingNumber/RollingNumber.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.d.ts +50 -10
- package/lib/typescript/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.native.d.ts +40 -8
- package/lib/typescript/ScrollArea/ScrollArea.native.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.shared.d.ts +2 -2
- package/lib/typescript/SegmentedControl/SegmentedControl.d.ts +148 -56
- package/lib/typescript/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/lib/typescript/Select/Select.d.ts +31 -51
- package/lib/typescript/Select/Select.d.ts.map +1 -1
- package/lib/typescript/Separator/Separator.d.ts +124 -61
- package/lib/typescript/Separator/Separator.d.ts.map +1 -1
- package/lib/typescript/SimpleGrid/SimpleGrid.d.ts +15 -13
- package/lib/typescript/SimpleGrid/SimpleGrid.d.ts.map +1 -1
- package/lib/typescript/Skeleton/Skeleton.d.ts +18 -14
- package/lib/typescript/Skeleton/Skeleton.d.ts.map +1 -1
- package/lib/typescript/Slider/Slider.d.ts +425 -129
- package/lib/typescript/Slider/Slider.d.ts.map +1 -1
- package/lib/typescript/Spacer/Spacer.d.ts +10 -17
- package/lib/typescript/Spacer/Spacer.d.ts.map +1 -1
- package/lib/typescript/Spoiler/Spoiler.d.ts +88 -28
- package/lib/typescript/Spoiler/Spoiler.d.ts.map +1 -1
- package/lib/typescript/Stack/Stack.d.ts +17 -5
- package/lib/typescript/Stack/Stack.d.ts.map +1 -1
- package/lib/typescript/Stepper/Stepper.d.ts +433 -101
- package/lib/typescript/Stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/Switch/Switch.d.ts +157 -69
- package/lib/typescript/Switch/Switch.d.ts.map +1 -1
- package/lib/typescript/Table/Table.d.ts +151 -201
- package/lib/typescript/Table/Table.d.ts.map +1 -1
- package/lib/typescript/TableOfContents/TableOfContents.d.ts +116 -46
- package/lib/typescript/TableOfContents/TableOfContents.d.ts.map +1 -1
- package/lib/typescript/Tabs/Tabs.d.ts +138 -88
- package/lib/typescript/Tabs/Tabs.d.ts.map +1 -1
- package/lib/typescript/TagsInput/TagsInput.d.ts +30 -42
- package/lib/typescript/TagsInput/TagsInput.d.ts.map +1 -1
- package/lib/typescript/Text/Text.d.ts +22 -4
- package/lib/typescript/Text/Text.d.ts.map +1 -1
- package/lib/typescript/TextInput/TextInput.d.ts +1 -51
- package/lib/typescript/TextInput/TextInput.d.ts.map +1 -1
- package/lib/typescript/Textarea/Textarea.d.ts +1 -51
- package/lib/typescript/Textarea/Textarea.d.ts.map +1 -1
- package/lib/typescript/ThemeIcon/ThemeIcon.d.ts +52 -39
- package/lib/typescript/ThemeIcon/ThemeIcon.d.ts.map +1 -1
- package/lib/typescript/Title/Title.d.ts +40 -25
- package/lib/typescript/Title/Title.d.ts.map +1 -1
- package/lib/typescript/Tooltip/Tooltip.d.ts +97 -41
- package/lib/typescript/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/typescript/Transition/Transition.native.d.ts.map +1 -1
- package/lib/typescript/Transition/use-overlay-transition.d.ts +1 -2
- package/lib/typescript/Transition/use-overlay-transition.d.ts.map +1 -1
- package/lib/typescript/Transition/use-overlay-transition.native.d.ts +3 -4
- package/lib/typescript/Transition/use-overlay-transition.native.d.ts.map +1 -1
- package/lib/typescript/Tree/Tree.d.ts +180 -50
- package/lib/typescript/Tree/Tree.d.ts.map +1 -1
- package/lib/typescript/TreeSelect/TreeSelect.d.ts +141 -182
- package/lib/typescript/TreeSelect/TreeSelect.d.ts.map +1 -1
- package/lib/typescript/Typography/Typography.d.ts +13 -7
- package/lib/typescript/Typography/Typography.d.ts.map +1 -1
- package/lib/typescript/UnstyledButton/UnstyledButton.d.ts +27 -20
- package/lib/typescript/UnstyledButton/UnstyledButton.d.ts.map +1 -1
- package/lib/typescript/VirtualList/VirtualList.d.ts.map +1 -1
- package/lib/typescript/VirtualList/VirtualList.shared.d.ts +1 -1
- package/lib/typescript/VirtualList/VirtualList.shared.d.ts.map +1 -1
- package/lib/typescript/VisuallyHidden/VisuallyHidden.d.ts +23 -19
- package/lib/typescript/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/lib/typescript/control-system.d.ts +3 -0
- package/lib/typescript/control-system.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +3 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/internal/InlineControl.d.ts +80 -22
- package/lib/typescript/internal/InlineControl.d.ts.map +1 -1
- package/lib/typescript/internal/collapse-box.d.ts +3 -3
- package/lib/typescript/internal/collapse-box.d.ts.map +1 -1
- package/lib/typescript/internal/collapse-box.shared.d.ts +1 -1
- package/lib/typescript/internal/control-icon-size.d.ts +4 -3
- package/lib/typescript/internal/control-icon-size.d.ts.map +1 -1
- package/lib/typescript/internal/control-metrics.d.ts +50 -50
- package/lib/typescript/internal/floating-arrow.d.ts +6 -7
- package/lib/typescript/internal/floating-arrow.d.ts.map +1 -1
- package/lib/typescript/internal/focus-ring.d.ts +94 -0
- package/lib/typescript/internal/focus-ring.d.ts.map +1 -0
- package/lib/typescript/internal/gradient-shared.d.ts +9 -8
- package/lib/typescript/internal/gradient-shared.d.ts.map +1 -1
- package/lib/typescript/internal/gradient.d.ts +1 -0
- package/lib/typescript/internal/gradient.d.ts.map +1 -1
- package/lib/typescript/internal/gradient.native.d.ts +1 -0
- package/lib/typescript/internal/gradient.native.d.ts.map +1 -1
- package/lib/typescript/internal/motion.d.ts +77 -67
- package/lib/typescript/internal/motion.d.ts.map +1 -1
- package/lib/typescript/internal/resolve-theme-color.d.ts +9 -8
- package/lib/typescript/internal/resolve-theme-color.d.ts.map +1 -1
- package/lib/typescript/internal/style-props.d.ts +490 -664
- package/lib/typescript/internal/style-props.d.ts.map +1 -1
- package/lib/typescript/internal/theme-color-web.d.ts.map +1 -1
- package/lib/typescript/internal/use-icon-color.d.ts +1 -1
- package/lib/typescript/internal/use-icon-color.native.d.ts +1 -1
- package/lib/typescript/internal/use-looping-animation.d.ts +10 -2
- package/lib/typescript/internal/use-looping-animation.d.ts.map +1 -1
- package/lib/typescript/internal/use-looping-animation.native.d.ts +2 -2
- package/lib/typescript/internal/use-looping-animation.native.d.ts.map +1 -1
- package/lib/typescript/internal/variant-colors.d.ts +191 -199
- package/lib/typescript/internal/variant-colors.d.ts.map +1 -1
- package/package.json +14 -13
- package/src/Accordion/Accordion.tsx +55 -47
- package/src/ActionIcon/ActionIcon.tsx +116 -59
- package/src/Affix/Affix.tsx +16 -27
- package/src/Alert/Alert.tsx +57 -44
- package/src/Anchor/Anchor.tsx +13 -12
- package/src/AngleSlider/AngleSlider.tsx +87 -63
- package/src/AspectRatio/AspectRatio.tsx +9 -12
- package/src/Autocomplete/Autocomplete.tsx +7 -2
- package/src/Avatar/Avatar.tsx +44 -36
- package/src/BackgroundImage/BackgroundImage.tsx +9 -6
- package/src/Badge/Badge.tsx +55 -30
- package/src/Blockquote/Blockquote.tsx +55 -45
- package/src/Box/Box.tsx +2 -2
- package/src/Breadcrumbs/Breadcrumbs.tsx +13 -11
- package/src/Burger/Burger.tsx +33 -24
- package/src/Button/Button.tsx +106 -80
- package/src/Card/Card.tsx +52 -44
- package/src/Center/Center.tsx +3 -3
- package/src/Checkbox/CheckIcon.tsx +8 -5
- package/src/Checkbox/Checkbox.tsx +97 -62
- package/src/Chip/Chip.tsx +50 -45
- package/src/CloseButton/CloseButton.tsx +32 -13
- package/src/Code/Code.tsx +15 -11
- package/src/Collapse/Collapse.tsx +11 -6
- package/src/ColorInput/ColorInput.tsx +30 -24
- package/src/ColorPicker/ColorPicker.tsx +78 -79
- package/src/ColorSwatch/ColorSwatch.tsx +11 -14
- package/src/Combobox/Combobox.tsx +174 -153
- package/src/Combobox/OptionsDropdown.tsx +15 -2
- package/src/Combobox/index.ts +1 -0
- package/src/Container/Container.tsx +11 -15
- package/src/Dialog/Dialog.tsx +26 -16
- package/src/Drawer/Drawer.tsx +51 -33
- package/src/Fieldset/Fieldset.tsx +25 -17
- package/src/FileButton/FileButton.tsx +4 -1
- package/src/Flex/Flex.tsx +24 -21
- package/src/FocusTrap/FocusTrap.tsx +4 -3
- package/src/Grid/Grid.tsx +24 -27
- package/src/Group/Group.tsx +4 -4
- package/src/Highlight/Highlight.tsx +2 -2
- package/src/HoverCard/HoverCard.tsx +17 -32
- package/src/Image/Image.native.tsx +1 -1
- package/src/Image/createImage.tsx +96 -63
- package/src/Image/types.ts +5 -1
- package/src/Indicator/Indicator.tsx +41 -32
- package/src/Input/Input.native.tsx +536 -501
- package/src/Input/Input.tsx +110 -156
- package/src/Input/shared.tsx +198 -291
- package/src/Input/types.ts +15 -0
- package/src/InputBase/InputBase.tsx +3 -1
- package/src/Kbd/Kbd.tsx +13 -15
- package/src/KeyboardAvoidingView/KeyboardAvoidingView.native.tsx +2 -2
- package/src/KeyboardAwareScrollView/KeyboardAwareScrollView.native.tsx +34 -33
- package/src/List/List.tsx +17 -11
- package/src/Loader/Loader.tsx +33 -37
- package/src/LoadingOverlay/LoadingOverlay.tsx +3 -2
- package/src/Mark/Mark.tsx +12 -12
- package/src/Marquee/Marquee.tsx +58 -46
- package/src/MaskInput/MaskInput.tsx +2 -1
- package/src/Menu/Menu.tsx +110 -45
- package/src/Modal/Modal.tsx +38 -31
- package/src/Modal/drag/DragDismissHost.tsx +10 -5
- package/src/Modal/drag/DragDismissHost.web.tsx +2 -1
- package/src/Modal/drag/DragDismissOverlay.tsx +9 -5
- package/src/Modal/drag/DragDismissOverlay.web.tsx +6 -1
- package/src/Modal/drag/index.ts +7 -2
- package/src/Modal/drag/types.ts +15 -3
- package/src/Modal/drag/useDragDismiss.ts +29 -21
- package/src/Modal/modal-base-inner.native.tsx +3 -2
- package/src/Modal/modal-base-inner.tsx +1 -1
- package/src/Modal/modal-base.tsx +14 -12
- package/src/MultiSelect/MultiSelect.tsx +6 -1
- package/src/NativeSelect/NativeSelect.tsx +21 -32
- package/src/NavLink/NavLink.tsx +54 -47
- package/src/Notification/Notification.tsx +31 -30
- package/src/NumberFormatter/NumberFormatter.tsx +4 -3
- package/src/NumberInput/NumberInput.tsx +52 -42
- package/src/Overlay/Overlay.tsx +18 -14
- package/src/Pagination/Pagination.tsx +142 -123
- package/src/Paper/Paper.tsx +8 -9
- package/src/Paragraph/Paragraph.tsx +7 -7
- package/src/PasswordInput/PasswordInput.tsx +67 -67
- package/src/Pill/Pill.tsx +44 -32
- package/src/PillsInput/PillsInput.tsx +60 -31
- package/src/PinInput/PinInput.tsx +31 -23
- package/src/Popover/Popover.native.tsx +3 -4
- package/src/Popover/Popover.shared.tsx +32 -27
- package/src/Portal/OverlayHost.tsx +4 -4
- package/src/Portal/OverlayPortal.tsx +26 -0
- package/src/Portal/index.ts +4 -0
- package/src/Progress/Progress.tsx +77 -64
- package/src/Radio/Radio.tsx +128 -122
- package/src/Radio/RadioIcon.tsx +4 -10
- package/src/Rating/Rating.tsx +63 -42
- package/src/RollingNumber/RollingNumber.tsx +60 -28
- package/src/ScrollArea/ScrollArea.native.tsx +66 -59
- package/src/ScrollArea/ScrollArea.shared.ts +2 -2
- package/src/ScrollArea/ScrollArea.tsx +35 -33
- package/src/SegmentedControl/SegmentedControl.tsx +98 -53
- package/src/Select/Select.tsx +7 -2
- package/src/Separator/Separator.tsx +43 -36
- package/src/SimpleGrid/SimpleGrid.tsx +23 -24
- package/src/Skeleton/Skeleton.tsx +35 -16
- package/src/Slider/Slider.tsx +303 -227
- package/src/Spacer/Spacer.tsx +17 -41
- package/src/Spoiler/Spoiler.tsx +19 -13
- package/src/Stack/Stack.tsx +3 -3
- package/src/Stepper/Stepper.tsx +89 -73
- package/src/Switch/Switch.tsx +87 -73
- package/src/Table/Table.tsx +100 -77
- package/src/TableOfContents/TableOfContents.tsx +80 -74
- package/src/Tabs/Tabs.tsx +78 -66
- package/src/TagsInput/TagsInput.tsx +35 -4
- package/src/Text/Text.tsx +25 -10
- package/src/TextInput/TextInput.tsx +3 -1
- package/src/Textarea/Textarea.tsx +2 -2
- package/src/ThemeIcon/ThemeIcon.tsx +38 -23
- package/src/Title/Title.tsx +48 -23
- package/src/Tooltip/Tooltip.tsx +53 -32
- package/src/Transition/Transition.native.tsx +16 -19
- package/src/Transition/use-overlay-transition.native.ts +6 -12
- package/src/Transition/use-overlay-transition.ts +2 -2
- package/src/Tree/Tree.tsx +39 -44
- package/src/TreeSelect/TreeSelect.tsx +49 -24
- package/src/Typography/Typography.tsx +5 -7
- package/src/UnstyledButton/UnstyledButton.tsx +6 -5
- package/src/VirtualList/VirtualList.shared.ts +1 -1
- package/src/VirtualList/VirtualList.tsx +18 -6
- package/src/VisuallyHidden/VisuallyHidden.tsx +7 -9
- package/src/control-system.ts +5 -0
- package/src/index.ts +32 -12
- package/src/internal/ControlIconProvider.tsx +1 -1
- package/src/internal/InlineControl.tsx +23 -27
- package/src/internal/collapse-box.shared.ts +1 -1
- package/src/internal/collapse-box.tsx +15 -11
- package/src/internal/control-icon-size.ts +5 -8
- package/src/internal/control-metrics.ts +52 -52
- package/src/internal/floating-arrow.tsx +48 -40
- package/src/internal/focus-ring.ts +92 -0
- package/src/internal/gradient-shared.ts +23 -10
- package/src/internal/gradient.native.tsx +2 -1
- package/src/internal/gradient.tsx +1 -0
- package/src/internal/motion.ts +204 -244
- package/src/internal/resolve-theme-color.ts +10 -10
- package/src/internal/style-props.ts +545 -390
- package/src/internal/theme-color-web.ts +47 -27
- package/src/internal/use-icon-color.native.ts +1 -1
- package/src/internal/use-icon-color.ts +1 -1
- package/src/internal/use-looping-animation.native.tsx +2 -2
- package/src/internal/use-slot-text-wrapper.tsx +1 -1
- package/src/internal/variant-colors.ts +187 -151
package/src/Avatar/Avatar.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import {
|
|
4
4
|
createStyledContext,
|
|
5
5
|
type GetProps,
|
|
6
|
+
styleable,
|
|
6
7
|
styled,
|
|
7
8
|
Theme,
|
|
8
9
|
withStaticProperties,
|
|
@@ -10,15 +11,17 @@ import {
|
|
|
10
11
|
|
|
11
12
|
import { Box } from "../Box";
|
|
12
13
|
import { Image, type ImageProps } from "../Image";
|
|
13
|
-
import { type GradientValue, useGradient } from "../internal/gradient";
|
|
14
|
+
import { gradientForVariant, type GradientValue, useGradient } from "../internal/gradient";
|
|
14
15
|
import {
|
|
15
16
|
controlTextColorVariant,
|
|
17
|
+
type CssString,
|
|
16
18
|
fontSizePassthroughVariant,
|
|
17
19
|
pickVariants,
|
|
18
20
|
radiusVariant,
|
|
19
21
|
type SizeKey,
|
|
20
22
|
squareSizeVariantFallthrough,
|
|
21
23
|
surfaceColorVariant,
|
|
24
|
+
tableVariant,
|
|
22
25
|
} from "../internal/style-props";
|
|
23
26
|
import { slotStyles, type SlotStyles } from "../internal/styles";
|
|
24
27
|
import { Text } from "../Text";
|
|
@@ -54,7 +57,7 @@ function pickColor(name: string, allowed: readonly string[]): string {
|
|
|
54
57
|
|
|
55
58
|
/**
|
|
56
59
|
* Group context — shared down so each `Avatar` inside an `Avatar.Group` overlaps
|
|
57
|
-
* its neighbour (negative left margin) and draws a
|
|
60
|
+
* its neighbour (negative left margin) and draws a `background` ring so the
|
|
58
61
|
* stacked circles stay visually separated.
|
|
59
62
|
*/
|
|
60
63
|
const AvatarGroupContext = createStyledContext<{ withinGroup: boolean; spacing: number }>({
|
|
@@ -64,14 +67,17 @@ const AvatarGroupContext = createStyledContext<{ withinGroup: boolean; spacing:
|
|
|
64
67
|
|
|
65
68
|
/**
|
|
66
69
|
* Circular avatar — mirrors Mantine's `Avatar`. Built from `Box` + `Text`.
|
|
67
|
-
* Accent comes from the `theme` prop + palette ramp (
|
|
70
|
+
* Accent comes from the `theme` prop + palette ramp (`color1`…`color12`), never a
|
|
68
71
|
* `color` prop; `variant` chooses how the ramp applies, `size` the diameter,
|
|
69
72
|
* `radius` the rounding (defaults to a full circle). When `src` is set the image
|
|
70
73
|
* is rendered (clipped to the frame) and falls back to the themed placeholder —
|
|
71
74
|
* `name` initials or `children` — if it fails to load or is absent.
|
|
72
75
|
*/
|
|
76
|
+
/** `Avatar.Group` overlap: any px → negative left margin (memoised per value). */
|
|
77
|
+
const avatarSpacing = tableVariant({}, (val: number) => ({ marginLeft: -val }));
|
|
78
|
+
|
|
73
79
|
const AvatarFrame = styled(Box, {
|
|
74
|
-
|
|
80
|
+
displayName: "Avatar",
|
|
75
81
|
context: AvatarGroupContext,
|
|
76
82
|
alignItems: "center",
|
|
77
83
|
justifyContent: "center",
|
|
@@ -96,25 +102,21 @@ const AvatarFrame = styled(Box, {
|
|
|
96
102
|
outline: { ...surfaceColorVariant.outline, borderWidth: 1 },
|
|
97
103
|
default: { ...surfaceColorVariant.default, borderWidth: 1 },
|
|
98
104
|
},
|
|
99
|
-
size:
|
|
100
|
-
...squareSizeVariantFallthrough,
|
|
101
|
-
},
|
|
105
|
+
size: squareSizeVariantFallthrough,
|
|
102
106
|
radius: radiusVariant,
|
|
103
107
|
/** Set by `Avatar.Group`: ring + overlap so stacked avatars stay distinct. */
|
|
104
108
|
withinGroup: {
|
|
105
|
-
true: { borderWidth: 2, borderColor: "
|
|
109
|
+
true: { borderWidth: 2, borderColor: "background" },
|
|
106
110
|
},
|
|
107
111
|
/** Set by `Avatar.Group`: negative left margin for the overlap. */
|
|
108
|
-
spacing:
|
|
109
|
-
":number": (val: number) => ({ marginLeft: -val }),
|
|
110
|
-
},
|
|
112
|
+
spacing: avatarSpacing,
|
|
111
113
|
} as const,
|
|
112
114
|
|
|
113
115
|
defaultVariants: { variant: "light", size: "md" },
|
|
114
116
|
});
|
|
115
117
|
|
|
116
118
|
const AvatarText = styled(Text, {
|
|
117
|
-
|
|
119
|
+
displayName: "AvatarText",
|
|
118
120
|
userSelect: "none",
|
|
119
121
|
fontWeight: "600",
|
|
120
122
|
variants: {
|
|
@@ -130,9 +132,7 @@ const AvatarText = styled(Text, {
|
|
|
130
132
|
"gradient",
|
|
131
133
|
]),
|
|
132
134
|
},
|
|
133
|
-
size:
|
|
134
|
-
...fontSizePassthroughVariant,
|
|
135
|
-
},
|
|
135
|
+
size: fontSizePassthroughVariant,
|
|
136
136
|
} as const,
|
|
137
137
|
});
|
|
138
138
|
|
|
@@ -152,7 +152,7 @@ function getInitials(name: string, limit = 2): string {
|
|
|
152
152
|
/**
|
|
153
153
|
* Named slots for {@link AvatarStyles} (Pillar B / `internal/styles.ts`). Each
|
|
154
154
|
* key maps to the props of the styled part it targets, so
|
|
155
|
-
* `styles={{ text: { color: "
|
|
155
|
+
* `styles={{ text: { color: "red9" } }}` is sugar for `<Avatar.Text color="red9" />`.
|
|
156
156
|
*/
|
|
157
157
|
export interface AvatarStyles {
|
|
158
158
|
/** Props spread onto the avatar frame (`.Frame`). */
|
|
@@ -169,7 +169,12 @@ const AVATAR_SLOT_KEYS = [
|
|
|
169
169
|
"text",
|
|
170
170
|
] as const satisfies readonly (keyof AvatarStyles)[];
|
|
171
171
|
|
|
172
|
-
export interface AvatarProps extends GetProps<typeof AvatarFrame> {
|
|
172
|
+
export interface AvatarProps extends Omit<GetProps<typeof AvatarFrame>, "radius"> {
|
|
173
|
+
/**
|
|
174
|
+
* Corner rounding (key, px or CSS value). A single value, not a v3 clause
|
|
175
|
+
* program: it is also handed to the `<Image>` as data. @default full circle
|
|
176
|
+
*/
|
|
177
|
+
radius?: SizeKey | number | CssString;
|
|
173
178
|
/** Per-slot style sugar — props spread onto the matching styled part. */
|
|
174
179
|
styles?: SlotStyles<AvatarStyles>;
|
|
175
180
|
/** User's name. When set (and no `children`), rendered as initials. */
|
|
@@ -195,13 +200,13 @@ export interface AvatarProps extends GetProps<typeof AvatarFrame> {
|
|
|
195
200
|
/**
|
|
196
201
|
* Gradient fill for `variant="gradient"` (ignored otherwise). Two-color
|
|
197
202
|
* shorthand `{ from, to, deg }` or multi-step `{ stops, deg }`; colors accept
|
|
198
|
-
*
|
|
203
|
+
* `colorN` ramp names or any CSS color. Defaults to the active theme ramp.
|
|
199
204
|
* Shown behind the initials/placeholder; an `src` image still covers it.
|
|
200
205
|
*/
|
|
201
206
|
gradient?: GradientValue;
|
|
202
207
|
}
|
|
203
208
|
|
|
204
|
-
const AvatarComponent =
|
|
209
|
+
const AvatarComponent = styleable<AvatarProps>(AvatarFrame, function Avatar(props, ref) {
|
|
205
210
|
const {
|
|
206
211
|
children,
|
|
207
212
|
name,
|
|
@@ -223,12 +228,14 @@ const AvatarComponent = AvatarFrame.styleable<AvatarProps>(function Avatar(props
|
|
|
223
228
|
|
|
224
229
|
// Gradient fill (only when `variant="gradient"`): web paints a CSS
|
|
225
230
|
// `backgroundImage`; native renders the `layer` behind the placeholder.
|
|
226
|
-
const grad = useGradient(variant
|
|
231
|
+
const grad = useGradient(gradientForVariant(variant, gradient));
|
|
227
232
|
|
|
228
233
|
// Reset the load-error state whenever the source changes.
|
|
229
234
|
const [errored, setErrored] = React.useState(false);
|
|
230
235
|
React.useEffect(() => setErrored(false), [src]);
|
|
231
236
|
|
|
237
|
+
const handleImageError = React.useCallback(() => setErrored(true), []);
|
|
238
|
+
|
|
232
239
|
const placeholder = children ?? (name ? getInitials(name) : null);
|
|
233
240
|
const showImage = !!src && !errored;
|
|
234
241
|
|
|
@@ -237,7 +244,8 @@ const AvatarComponent = AvatarFrame.styleable<AvatarProps>(function Avatar(props
|
|
|
237
244
|
ref={ref}
|
|
238
245
|
size={size}
|
|
239
246
|
variant={variant}
|
|
240
|
-
radius={
|
|
247
|
+
// Conditional: an explicit `radius={undefined}` must not reach the frame.
|
|
248
|
+
{...(radius !== undefined ? { radius } : null)}
|
|
241
249
|
theme={theme}
|
|
242
250
|
role="img"
|
|
243
251
|
aria-label={alt ?? name}
|
|
@@ -259,8 +267,8 @@ const AvatarComponent = AvatarFrame.styleable<AvatarProps>(function Avatar(props
|
|
|
259
267
|
width: "100%",
|
|
260
268
|
height: "100%",
|
|
261
269
|
fit: "cover",
|
|
262
|
-
radius,
|
|
263
|
-
onError:
|
|
270
|
+
...(radius !== undefined ? { radius } : null),
|
|
271
|
+
onError: handleImageError,
|
|
264
272
|
})}
|
|
265
273
|
/>
|
|
266
274
|
) : typeof placeholder === "string" ? (
|
|
@@ -284,7 +292,7 @@ const AvatarComponent = AvatarFrame.styleable<AvatarProps>(function Avatar(props
|
|
|
284
292
|
});
|
|
285
293
|
|
|
286
294
|
const AvatarGroupFrame = styled(Box, {
|
|
287
|
-
|
|
295
|
+
displayName: "AvatarGroup",
|
|
288
296
|
role: "group",
|
|
289
297
|
flexDirection: "row",
|
|
290
298
|
alignItems: "center",
|
|
@@ -300,18 +308,18 @@ export interface AvatarGroupProps extends GetProps<typeof AvatarGroupFrame> {
|
|
|
300
308
|
* and ring through context so every child `Avatar` self-positions; the left pad
|
|
301
309
|
* cancels the first child's negative margin so the row stays flush-left.
|
|
302
310
|
*/
|
|
303
|
-
const AvatarGroup =
|
|
304
|
-
|
|
305
|
-
ref
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
</
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
311
|
+
const AvatarGroup = styleable<AvatarGroupProps>(
|
|
312
|
+
AvatarGroupFrame,
|
|
313
|
+
function AvatarGroup({ spacing = 8, children, ...rest }, ref) {
|
|
314
|
+
return (
|
|
315
|
+
<AvatarGroupContext.Provider withinGroup spacing={spacing}>
|
|
316
|
+
<AvatarGroupFrame ref={ref} paddingLeft={spacing} {...rest}>
|
|
317
|
+
{children}
|
|
318
|
+
</AvatarGroupFrame>
|
|
319
|
+
</AvatarGroupContext.Provider>
|
|
320
|
+
);
|
|
321
|
+
},
|
|
322
|
+
);
|
|
315
323
|
|
|
316
324
|
export const Avatar = withStaticProperties(AvatarComponent, {
|
|
317
325
|
Text: AvatarText,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import { type GetProps, isWeb, styled } from "@knitui/core";
|
|
3
|
+
import { type GetProps, isWeb, styleable, styled } from "@knitui/core";
|
|
4
4
|
|
|
5
5
|
import { Box } from "../Box";
|
|
6
6
|
import { Image, type ImageProps } from "../Image";
|
|
@@ -24,7 +24,7 @@ type WebRepeatStyle = {
|
|
|
24
24
|
* Mantine: full width, cover fit, no radius.
|
|
25
25
|
*/
|
|
26
26
|
const BackgroundImageFrame = styled(Box, {
|
|
27
|
-
|
|
27
|
+
displayName: "BackgroundImage",
|
|
28
28
|
position: "relative",
|
|
29
29
|
// Establish a stacking context so the `zIndex: -1` backing image (below) is
|
|
30
30
|
// contained within the frame and paints behind the in-flow `children` rather
|
|
@@ -104,7 +104,8 @@ const getWebRepeatStyle = (src: string): WebRepeatStyle => ({
|
|
|
104
104
|
* full `Box` style surface (width, height, padding, ...) is inherited for sizing
|
|
105
105
|
* the area; the image fills it behind `children`.
|
|
106
106
|
*/
|
|
107
|
-
export const BackgroundImage =
|
|
107
|
+
export const BackgroundImage = styleable<BackgroundImageProps>(
|
|
108
|
+
BackgroundImageFrame,
|
|
108
109
|
function BackgroundImage(props, ref) {
|
|
109
110
|
const { src, fit, objectPosition, resizeMode, imageProps, styles, children, ...rest } = props;
|
|
110
111
|
// `repeat` has no CSS `object-fit` / expo-image equivalent, so it stays a
|
|
@@ -142,9 +143,11 @@ export const BackgroundImage = BackgroundImageFrame.styleable<BackgroundImagePro
|
|
|
142
143
|
{...s.get("image")}
|
|
143
144
|
{...imageProps}
|
|
144
145
|
src={src}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
// Only an explicit value claims these: an absent one must not wipe
|
|
147
|
+
// the `imageProps` / `styles.image` value spread above.
|
|
148
|
+
{...(fit !== undefined ? { fit } : null)}
|
|
149
|
+
{...(objectPosition !== undefined ? { objectPosition } : null)}
|
|
150
|
+
{...(resizeMode !== undefined ? { resizeMode } : null)}
|
|
148
151
|
position="absolute"
|
|
149
152
|
inset={0}
|
|
150
153
|
// Sit one layer behind the in-flow `children`. Without this, the
|
package/src/Badge/Badge.tsx
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
createStyledContext,
|
|
5
|
+
type GetProps,
|
|
6
|
+
styleable,
|
|
7
|
+
styled,
|
|
8
|
+
withStaticProperties,
|
|
9
|
+
} from "@knitui/core";
|
|
4
10
|
|
|
5
11
|
import { Box } from "../Box";
|
|
6
12
|
import { ControlIconProvider } from "../internal/ControlIconProvider";
|
|
7
|
-
import { type GradientValue, useGradient } from "../internal/gradient";
|
|
13
|
+
import { gradientForVariant, type GradientValue, useGradient } from "../internal/gradient";
|
|
8
14
|
import { renderTextChild } from "../internal/render-text-child";
|
|
9
15
|
import {
|
|
10
16
|
controlFontVariant,
|
|
@@ -14,6 +20,7 @@ import {
|
|
|
14
20
|
radiusVariant,
|
|
15
21
|
type SizeKey,
|
|
16
22
|
surfaceColorVariant,
|
|
23
|
+
tableVariant,
|
|
17
24
|
} from "../internal/style-props";
|
|
18
25
|
import { slotStyles, type SlotStyles } from "../internal/styles";
|
|
19
26
|
import { useSlotTextWrapper } from "../internal/use-slot-text-wrapper";
|
|
@@ -28,6 +35,34 @@ const BadgeContext = createStyledContext<{ size: BadgeSize | number; variant: Ba
|
|
|
28
35
|
variant: "light",
|
|
29
36
|
});
|
|
30
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Label font size: the shared control font ladder, plus a numeric fallthrough
|
|
40
|
+
* (`size={40}` → half the px, floored at 10). Built at module scope (§11).
|
|
41
|
+
*/
|
|
42
|
+
const badgeTextSize = tableVariant(controlFontVariant, (val: number) => ({
|
|
43
|
+
fontSize: Math.max(10, Math.round(val * 0.5)),
|
|
44
|
+
}));
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Accent-dot size — intentionally non-1:1: the dot is smaller than the badge
|
|
48
|
+
* size key so it reads as an accent, not a full-height glyph. Numbers fall
|
|
49
|
+
* through to half the px, floored at 16.
|
|
50
|
+
*/
|
|
51
|
+
const BADGE_DOT_SIZES = {
|
|
52
|
+
xxs: { width: "xxs", height: "xxs" },
|
|
53
|
+
xs: { width: "xxs", height: "xxs" },
|
|
54
|
+
sm: { width: "xxs", height: "xxs" },
|
|
55
|
+
md: { width: "xs", height: "xs" },
|
|
56
|
+
lg: { width: "xs", height: "xs" },
|
|
57
|
+
xl: { width: "sm", height: "sm" },
|
|
58
|
+
xxl: { width: "md", height: "md" },
|
|
59
|
+
} as const;
|
|
60
|
+
|
|
61
|
+
const badgeDotSize = tableVariant(BADGE_DOT_SIZES, (val: number) => {
|
|
62
|
+
const px = Math.max(16, Math.round(val * 0.5));
|
|
63
|
+
return { width: px, height: px };
|
|
64
|
+
});
|
|
65
|
+
|
|
31
66
|
/**
|
|
32
67
|
* Compact status label — mirrors Mantine's `Badge`. Accent comes from the
|
|
33
68
|
* `theme` prop (palette ramp), not a `color` prop. `variant` picks the fill,
|
|
@@ -35,7 +70,7 @@ const BadgeContext = createStyledContext<{ size: BadgeSize | number; variant: Ba
|
|
|
35
70
|
* square-aspect badge for a single glyph, plus `leftSection`/`rightSection`.
|
|
36
71
|
*/
|
|
37
72
|
const BadgeFrame = styled(Box, {
|
|
38
|
-
|
|
73
|
+
displayName: "Badge",
|
|
39
74
|
context: BadgeContext,
|
|
40
75
|
flexDirection: "row",
|
|
41
76
|
alignItems: "center",
|
|
@@ -75,7 +110,7 @@ const BadgeFrame = styled(Box, {
|
|
|
75
110
|
});
|
|
76
111
|
|
|
77
112
|
const BadgeText = styled(Text, {
|
|
78
|
-
|
|
113
|
+
displayName: "BadgeText",
|
|
79
114
|
context: BadgeContext,
|
|
80
115
|
fontWeight: "700",
|
|
81
116
|
textTransform: "uppercase",
|
|
@@ -95,41 +130,24 @@ const BadgeText = styled(Text, {
|
|
|
95
130
|
"gradient",
|
|
96
131
|
]),
|
|
97
132
|
},
|
|
98
|
-
size:
|
|
99
|
-
...controlFontVariant,
|
|
100
|
-
":number": (val: number) => ({ fontSize: Math.max(10, Math.round(val * 0.5)) }),
|
|
101
|
-
},
|
|
133
|
+
size: badgeTextSize,
|
|
102
134
|
} as const,
|
|
103
135
|
});
|
|
104
136
|
|
|
105
137
|
const BadgeDot = styled(Box, {
|
|
106
|
-
|
|
138
|
+
displayName: "BadgeDot",
|
|
107
139
|
context: BadgeContext,
|
|
108
140
|
borderRadius: 999,
|
|
109
|
-
backgroundColor: "
|
|
141
|
+
backgroundColor: "color9",
|
|
110
142
|
variants: {
|
|
111
|
-
|
|
112
|
-
// badge size key so it reads as an accent, not a full-height glyph.
|
|
113
|
-
size: {
|
|
114
|
-
xxs: { width: "$xxs", height: "$xxs" },
|
|
115
|
-
xs: { width: "$xxs", height: "$xxs" },
|
|
116
|
-
sm: { width: "$xxs", height: "$xxs" },
|
|
117
|
-
md: { width: "$xs", height: "$xs" },
|
|
118
|
-
lg: { width: "$xs", height: "$xs" },
|
|
119
|
-
xl: { width: "$sm", height: "$sm" },
|
|
120
|
-
xxl: { width: "$md", height: "$md" },
|
|
121
|
-
":number": (val: number) => ({
|
|
122
|
-
width: Math.max(16, Math.round(val * 0.5)),
|
|
123
|
-
height: Math.max(16, Math.round(val * 0.5)),
|
|
124
|
-
}),
|
|
125
|
-
},
|
|
143
|
+
size: badgeDotSize,
|
|
126
144
|
} as const,
|
|
127
145
|
});
|
|
128
146
|
|
|
129
147
|
/**
|
|
130
148
|
* Named slots for {@link BadgeStyles} (Pillar B / `internal/styles.ts`). Each key
|
|
131
149
|
* maps to the props of the styled part it targets, so
|
|
132
|
-
* `styles={{ text: { color: "
|
|
150
|
+
* `styles={{ text: { color: "red9" } }}` is sugar for `<Badge.Text color="red9" />`.
|
|
133
151
|
* Note: `leftSection`/`rightSection` are CONTENT slots (ReactNode), not style
|
|
134
152
|
* slots — they stay on the props API (same family as Button's sections).
|
|
135
153
|
*/
|
|
@@ -144,7 +162,14 @@ export interface BadgeStyles {
|
|
|
144
162
|
|
|
145
163
|
const BADGE_SLOT_KEYS = ["root", "text", "dot"] as const satisfies readonly (keyof BadgeStyles)[];
|
|
146
164
|
|
|
147
|
-
export interface BadgeProps extends GetProps<typeof BadgeFrame> {
|
|
165
|
+
export interface BadgeProps extends Omit<GetProps<typeof BadgeFrame>, "size" | "variant"> {
|
|
166
|
+
/**
|
|
167
|
+
* Size key or px. A single value (not a v3 clause program): the render reads it
|
|
168
|
+
* as DATA for the dot and the section icons. @default "md"
|
|
169
|
+
*/
|
|
170
|
+
size?: BadgeSize | number;
|
|
171
|
+
/** Fill style. @default "light" */
|
|
172
|
+
variant?: BadgeVariant;
|
|
148
173
|
leftSection?: React.ReactNode;
|
|
149
174
|
rightSection?: React.ReactNode;
|
|
150
175
|
/** Per-slot style sugar — props spread onto the matching styled part. */
|
|
@@ -152,12 +177,12 @@ export interface BadgeProps extends GetProps<typeof BadgeFrame> {
|
|
|
152
177
|
/**
|
|
153
178
|
* Gradient fill for `variant="gradient"` (ignored otherwise). Two-color
|
|
154
179
|
* shorthand `{ from, to, deg }` or multi-step `{ stops, deg }`; colors accept
|
|
155
|
-
*
|
|
180
|
+
* `colorN` ramp names or any CSS color. Defaults to the active theme ramp.
|
|
156
181
|
*/
|
|
157
182
|
gradient?: GradientValue;
|
|
158
183
|
}
|
|
159
184
|
|
|
160
|
-
const BadgeComponent =
|
|
185
|
+
const BadgeComponent = styleable<BadgeProps>(BadgeFrame, function Badge(props, ref) {
|
|
161
186
|
const {
|
|
162
187
|
children,
|
|
163
188
|
variant = "light",
|
|
@@ -174,7 +199,7 @@ const BadgeComponent = BadgeFrame.styleable<BadgeProps>(function Badge(props, re
|
|
|
174
199
|
|
|
175
200
|
// Gradient fill (only when `variant="gradient"`): web paints a CSS
|
|
176
201
|
// `backgroundImage`; native renders the `layer` behind the content.
|
|
177
|
-
const grad = useGradient(variant
|
|
202
|
+
const grad = useGradient(gradientForVariant(variant, gradient));
|
|
178
203
|
|
|
179
204
|
// Inject the `text` slot props into the wrapper `renderTextChild` auto-applies
|
|
180
205
|
// around string/number children, so the label slot reaches the auto-wrapped text.
|
|
@@ -3,21 +3,26 @@ import * as React from "react";
|
|
|
3
3
|
import {
|
|
4
4
|
createStyledContext,
|
|
5
5
|
type GetProps,
|
|
6
|
-
|
|
6
|
+
resolveToken,
|
|
7
|
+
styleable,
|
|
7
8
|
styled,
|
|
8
9
|
withStaticProperties,
|
|
9
10
|
} from "@knitui/core";
|
|
10
11
|
|
|
11
12
|
import { Box } from "../Box";
|
|
12
13
|
import { renderTextChild } from "../internal/render-text-child";
|
|
13
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
endRadiusVariant,
|
|
16
|
+
fontSizeVariant,
|
|
17
|
+
type SizeKey,
|
|
18
|
+
tableVariant,
|
|
19
|
+
} from "../internal/style-props";
|
|
14
20
|
import { slotStyles, type SlotStyles } from "../internal/styles";
|
|
15
21
|
import { useSlotTextWrapper } from "../internal/use-slot-text-wrapper";
|
|
16
22
|
import { Text } from "../Text";
|
|
17
23
|
|
|
18
24
|
type BlockquoteSize = SizeKey;
|
|
19
25
|
type BlockquoteIconSize = BlockquoteSize | number;
|
|
20
|
-
type TokenValueInput = Parameters<typeof getTokenValue>[0];
|
|
21
26
|
|
|
22
27
|
const DEFAULT_SIZE: BlockquoteSize = "md";
|
|
23
28
|
const DEFAULT_ICON_SIZE: BlockquoteIconSize = "xl";
|
|
@@ -30,87 +35,90 @@ const BlockquoteContext = createStyledContext<{ size: BlockquoteSize }>({
|
|
|
30
35
|
* Quotation block — mirrors Mantine's `Blockquote`. A solid accent border on the
|
|
31
36
|
* inline-start edge, a subtle tinted surface, an optional `icon` badge floated
|
|
32
37
|
* over the top-left corner, and an optional `cite`. Accent comes from the theme
|
|
33
|
-
* ramp (
|
|
38
|
+
* ramp (`color9` border, `color2` surface, `color11` icon); recolor via the
|
|
34
39
|
* `theme` prop. `radius` rounds the inline-end corners (the bordered edge stays
|
|
35
40
|
* square). Renders a `<blockquote>` element.
|
|
36
41
|
*/
|
|
37
42
|
const BlockquoteFrame = styled(Box, {
|
|
38
|
-
|
|
43
|
+
displayName: "Blockquote",
|
|
39
44
|
context: BlockquoteContext,
|
|
40
45
|
position: "relative",
|
|
41
|
-
backgroundColor: "
|
|
46
|
+
backgroundColor: "color2",
|
|
42
47
|
borderLeftWidth: 3,
|
|
43
|
-
borderLeftColor: "
|
|
48
|
+
borderLeftColor: "color9",
|
|
44
49
|
|
|
45
50
|
variants: {
|
|
46
51
|
radius: endRadiusVariant,
|
|
47
52
|
// Vertical padding stays a step below horizontal so a quote reads as a wide,
|
|
48
53
|
// balanced block (not an over-tall box) — and the progression is smooth.
|
|
49
54
|
size: {
|
|
50
|
-
xxs: { paddingVertical: "
|
|
51
|
-
xs: { paddingVertical: "
|
|
52
|
-
sm: { paddingVertical: "
|
|
53
|
-
md: { paddingVertical: "
|
|
54
|
-
lg: { paddingVertical: "
|
|
55
|
-
xl: { paddingVertical: "
|
|
56
|
-
xxl: { paddingVertical: "
|
|
55
|
+
xxs: { paddingVertical: "xs", paddingHorizontal: "sm" },
|
|
56
|
+
xs: { paddingVertical: "sm", paddingHorizontal: "md" },
|
|
57
|
+
sm: { paddingVertical: "md", paddingHorizontal: "lg" },
|
|
58
|
+
md: { paddingVertical: "lg", paddingHorizontal: "xl" },
|
|
59
|
+
lg: { paddingVertical: "xl", paddingHorizontal: "xl" },
|
|
60
|
+
xl: { paddingVertical: "xl", paddingHorizontal: "xxl" },
|
|
61
|
+
xxl: { paddingVertical: "xxl", paddingHorizontal: "xxl" },
|
|
57
62
|
},
|
|
58
63
|
} as const,
|
|
59
64
|
|
|
60
65
|
defaultVariants: { radius: "md", size: DEFAULT_SIZE },
|
|
61
66
|
});
|
|
62
67
|
|
|
68
|
+
/** The badge square from the `size` token scale, or a raw px number. */
|
|
69
|
+
const iconSizeVariant = tableVariant(
|
|
70
|
+
{
|
|
71
|
+
xxs: { width: "xxs", height: "xxs" },
|
|
72
|
+
xs: { width: "xs", height: "xs" },
|
|
73
|
+
sm: { width: "sm", height: "sm" },
|
|
74
|
+
md: { width: "md", height: "md" },
|
|
75
|
+
lg: { width: "lg", height: "lg" },
|
|
76
|
+
xl: { width: "xl", height: "xl" },
|
|
77
|
+
xxl: { width: "xxl", height: "xxl" },
|
|
78
|
+
},
|
|
79
|
+
(px: number) => ({ width: px, height: px }),
|
|
80
|
+
);
|
|
81
|
+
|
|
63
82
|
/** Circular accent badge floated over the top-left corner. */
|
|
64
83
|
const BlockquoteIcon = styled(Box, {
|
|
65
|
-
|
|
84
|
+
displayName: "BlockquoteIcon",
|
|
66
85
|
position: "absolute",
|
|
67
86
|
alignItems: "center",
|
|
68
87
|
justifyContent: "center",
|
|
69
|
-
backgroundColor: "
|
|
88
|
+
backgroundColor: "background",
|
|
70
89
|
borderRadius: 9999,
|
|
71
90
|
|
|
72
91
|
variants: {
|
|
73
|
-
iconSize:
|
|
74
|
-
xxs: { width: "$xxs", height: "$xxs" },
|
|
75
|
-
xs: { width: "$xs", height: "$xs" },
|
|
76
|
-
sm: { width: "$sm", height: "$sm" },
|
|
77
|
-
md: { width: "$md", height: "$md" },
|
|
78
|
-
lg: { width: "$lg", height: "$lg" },
|
|
79
|
-
xl: { width: "$xl", height: "$xl" },
|
|
80
|
-
xxl: { width: "$xxl", height: "$xxl" },
|
|
81
|
-
":number": (val: number) => ({ width: val, height: val }),
|
|
82
|
-
},
|
|
92
|
+
iconSize: iconSizeVariant,
|
|
83
93
|
} as const,
|
|
84
94
|
|
|
85
95
|
defaultVariants: { iconSize: DEFAULT_ICON_SIZE },
|
|
86
96
|
});
|
|
87
97
|
|
|
88
98
|
const BlockquoteText = styled(Text, {
|
|
89
|
-
|
|
99
|
+
displayName: "BlockquoteText",
|
|
90
100
|
context: BlockquoteContext,
|
|
91
101
|
variants: {
|
|
92
|
-
size:
|
|
93
|
-
...fontSizeVariant,
|
|
94
|
-
},
|
|
102
|
+
size: fontSizeVariant,
|
|
95
103
|
} as const,
|
|
96
104
|
});
|
|
97
105
|
|
|
98
106
|
/** Attribution line beneath the quote — dimmed and slightly smaller. */
|
|
99
107
|
const BlockquoteCite = styled(Text, {
|
|
100
|
-
|
|
108
|
+
displayName: "BlockquoteCite",
|
|
101
109
|
context: BlockquoteContext,
|
|
102
110
|
display: "flex",
|
|
103
111
|
opacity: 0.6,
|
|
104
112
|
|
|
105
113
|
variants: {
|
|
106
114
|
size: {
|
|
107
|
-
xxs: { marginTop: "
|
|
108
|
-
xs: { marginTop: "
|
|
109
|
-
sm: { marginTop: "
|
|
110
|
-
md: { marginTop: "
|
|
111
|
-
lg: { marginTop: "
|
|
112
|
-
xl: { marginTop: "
|
|
113
|
-
xxl: { marginTop: "
|
|
115
|
+
xxs: { marginTop: "xxs", fontSize: "xxs" },
|
|
116
|
+
xs: { marginTop: "xs", fontSize: "xs" },
|
|
117
|
+
sm: { marginTop: "sm", fontSize: "xs" },
|
|
118
|
+
md: { marginTop: "md", fontSize: "sm" },
|
|
119
|
+
lg: { marginTop: "lg", fontSize: "sm" },
|
|
120
|
+
xl: { marginTop: "xl", fontSize: "md" },
|
|
121
|
+
xxl: { marginTop: "xxl", fontSize: "lg" },
|
|
114
122
|
},
|
|
115
123
|
} as const,
|
|
116
124
|
|
|
@@ -121,8 +129,8 @@ type BlockquoteFrameProps = Omit<GetProps<typeof BlockquoteFrame>, "size">;
|
|
|
121
129
|
|
|
122
130
|
/**
|
|
123
131
|
* Named style slots (Pillar B / `internal/styles.ts`). Each key maps to the props
|
|
124
|
-
* of the styled part it targets, so `styles={{ cite: { color: "
|
|
125
|
-
* sugar for `<Blockquote.Cite color="
|
|
132
|
+
* of the styled part it targets, so `styles={{ cite: { color: "red9" } }}` is
|
|
133
|
+
* sugar for `<Blockquote.Cite color="red9" />`. Mirrors the gold-standard `Alert`
|
|
126
134
|
* shape. The root frame is reached via top-level props, so it has no slot.
|
|
127
135
|
*/
|
|
128
136
|
export interface BlockquoteStyles {
|
|
@@ -143,7 +151,7 @@ const BLOCKQUOTE_SLOT_KEYS = [
|
|
|
143
151
|
export interface BlockquoteProps extends BlockquoteFrameProps {
|
|
144
152
|
/** Icon displayed in a badge at the top-left of the quote. */
|
|
145
153
|
icon?: React.ReactNode;
|
|
146
|
-
/** Width/height of the icon badge. Token sizes use the
|
|
154
|
+
/** Width/height of the icon badge. Token sizes use the `size` scale; numbers are px. @default "xl" */
|
|
147
155
|
iconSize?: BlockquoteIconSize;
|
|
148
156
|
/** Attribution for the quote, rendered beneath it. */
|
|
149
157
|
cite?: React.ReactNode;
|
|
@@ -153,13 +161,15 @@ export interface BlockquoteProps extends BlockquoteFrameProps {
|
|
|
153
161
|
styles?: SlotStyles<BlockquoteStyles>;
|
|
154
162
|
}
|
|
155
163
|
|
|
164
|
+
/** Half the badge size, negated: floats the badge centre onto the corner. */
|
|
156
165
|
function resolveIconOffset(iconSize: BlockquoteIconSize): number {
|
|
157
166
|
if (typeof iconSize === "number") return -iconSize / 2;
|
|
158
|
-
const value =
|
|
167
|
+
const value = resolveToken(iconSize, "size");
|
|
159
168
|
return typeof value === "number" ? -value / 2 : -24;
|
|
160
169
|
}
|
|
161
170
|
|
|
162
|
-
const BlockquoteComponent =
|
|
171
|
+
const BlockquoteComponent = styleable<BlockquoteProps>(
|
|
172
|
+
BlockquoteFrame,
|
|
163
173
|
function Blockquote(props, ref) {
|
|
164
174
|
const {
|
|
165
175
|
children,
|
|
@@ -187,8 +197,8 @@ const BlockquoteComponent = BlockquoteFrame.styleable<BlockquoteProps>(
|
|
|
187
197
|
// (`iconSize` + corner offset) wins so the badge stays positioned.
|
|
188
198
|
{...s.get("icon")}
|
|
189
199
|
iconSize={iconSize}
|
|
190
|
-
top=
|
|
191
|
-
left=
|
|
200
|
+
top={0}
|
|
201
|
+
left={0}
|
|
192
202
|
x={offset}
|
|
193
203
|
y={offset}
|
|
194
204
|
>
|
package/src/Box/Box.tsx
CHANGED
|
@@ -16,13 +16,13 @@ import { shadowVariant } from "../internal/style-props";
|
|
|
16
16
|
*
|
|
17
17
|
* `shadow` is the one named VARIANT carried here rather than per-component: the
|
|
18
18
|
* Mantine-style elevation prop (`shadow="md"`, the shared `shadowVariant` ladder
|
|
19
|
-
* xxs→xxl, theme-aware
|
|
19
|
+
* xxs→xxl, theme-aware `dropShadowColor`). Because every kit component is
|
|
20
20
|
* `styled(Box, …)`, declaring it once means they ALL accept `shadow` — it stays
|
|
21
21
|
* opt-in (no shadow unless set). A component may still re-declare `shadow` (e.g.
|
|
22
22
|
* `Drawer` pins `defaultVariants: { shadow: "xl" }`); a local redefinition wins.
|
|
23
23
|
*/
|
|
24
24
|
export const Box = styled(View, {
|
|
25
|
-
|
|
25
|
+
displayName: "Box",
|
|
26
26
|
variants: {
|
|
27
27
|
shadow: shadowVariant,
|
|
28
28
|
} as const,
|