@knitui/components 0.13.0 → 1.0.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 +127 -61
- package/lib/commonjs/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/commonjs/Affix/Affix.js +16 -20
- package/lib/commonjs/Affix/Affix.js.map +1 -1
- package/lib/commonjs/Alert/Alert.js +53 -53
- 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 +27 -24
- 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 +59 -48
- 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 +104 -62
- 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 +11 -4
- 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.js +197 -22
- package/lib/commonjs/Image/Image.js.map +1 -1
- package/lib/commonjs/Image/Image.native.js +41 -0
- package/lib/commonjs/Image/Image.native.js.map +1 -0
- package/lib/commonjs/Image/createImage.js +92 -59
- 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 +40 -30
- 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.web.js +10 -6
- package/lib/commonjs/Modal/drag/DragDismissHost.web.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/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 +22 -9
- 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 +39 -33
- 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 +33 -22
- package/lib/commonjs/Popover/Popover.shared.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 +21 -26
- 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 +9 -5
- 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 +43 -27
- 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 +6 -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 +7 -7
- package/lib/commonjs/internal/gradient-shared.js.map +1 -1
- package/lib/commonjs/internal/gradient.native.js +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-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 +128 -62
- package/lib/module/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/module/Affix/Affix.js +17 -21
- package/lib/module/Affix/Affix.js.map +1 -1
- package/lib/module/Alert/Alert.js +54 -54
- 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 +29 -26
- 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 +61 -50
- 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 +105 -63
- 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 +12 -5
- 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.js +195 -23
- package/lib/module/Image/Image.js.map +1 -1
- package/lib/module/Image/Image.native.js +38 -0
- package/lib/module/Image/Image.native.js.map +1 -0
- package/lib/module/Image/createImage.js +92 -59
- 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 +42 -32
- 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.web.js +10 -6
- package/lib/module/Modal/drag/DragDismissHost.web.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/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 +22 -9
- 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 +40 -34
- 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 +34 -23
- package/lib/module/Popover/Popover.shared.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 +22 -27
- 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 +10 -6
- 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 +44 -28
- 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 +8 -4
- 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 +7 -7
- package/lib/module/internal/gradient-shared.js.map +1 -1
- package/lib/module/internal/gradient.native.js +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-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 +167 -191
- 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 +76 -158
- package/lib/typescript/Image/Image.d.ts.map +1 -1
- package/lib/typescript/Image/Image.native.d.ts +327 -0
- package/lib/typescript/Image/Image.native.d.ts.map +1 -0
- package/lib/typescript/Image/createImage.d.ts +49 -357
- 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 +6 -2
- 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.web.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/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/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 +2 -1
- 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 +8 -8
- package/lib/typescript/internal/gradient-shared.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/variant-colors.d.ts +191 -199
- package/lib/typescript/internal/variant-colors.d.ts.map +1 -1
- package/package.json +7 -6
- package/src/Accordion/Accordion.tsx +55 -47
- package/src/ActionIcon/ActionIcon.tsx +114 -57
- package/src/Affix/Affix.tsx +14 -25
- package/src/Alert/Alert.tsx +55 -42
- 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 +42 -34
- package/src/BackgroundImage/BackgroundImage.tsx +9 -6
- package/src/Badge/Badge.tsx +53 -28
- 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 +104 -78
- 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 +30 -11
- 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 +36 -0
- package/src/Image/Image.tsx +240 -23
- package/src/Image/createImage.tsx +103 -67
- package/src/Image/types.ts +5 -1
- package/src/Indicator/Indicator.tsx +41 -32
- package/src/Input/Input.native.tsx +521 -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 +1 -1
- 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.web.tsx +2 -1
- 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/modal-base-inner.native.tsx +3 -2
- package/src/Modal/modal-base-inner.tsx +1 -1
- package/src/Modal/modal-base.tsx +10 -8
- 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 +42 -30
- 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 +29 -24
- 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 +28 -27
- 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 +37 -22
- package/src/Title/Title.tsx +48 -23
- package/src/Tooltip/Tooltip.tsx +50 -29
- 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 +30 -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 +10 -10
- package/src/internal/gradient.native.tsx +1 -1
- 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-slot-text-wrapper.tsx +1 -1
- package/src/internal/variant-colors.ts +187 -151
package/src/Card/Card.tsx
CHANGED
|
@@ -2,22 +2,27 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
type GetProps,
|
|
5
|
-
|
|
5
|
+
resolveToken,
|
|
6
6
|
type SpaceTokens,
|
|
7
|
+
styleable,
|
|
7
8
|
styled,
|
|
8
9
|
withStaticProperties,
|
|
9
10
|
} from "@knitui/core";
|
|
10
11
|
|
|
11
12
|
import { Box, type BoxProps } from "../Box";
|
|
12
|
-
import { radiusVariant
|
|
13
|
+
import { radiusVariant } from "../internal/style-props";
|
|
13
14
|
import { slotStyles, type SlotStyles } from "../internal/styles";
|
|
14
15
|
|
|
15
|
-
const DEFAULT_PADDING: SpaceTokens = "
|
|
16
|
+
const DEFAULT_PADDING: SpaceTokens = "lg";
|
|
16
17
|
|
|
17
|
-
/**
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Resolve a padding prop (a space token or a number) to px for the Section bleed
|
|
20
|
+
* math. A clause program (`"md lg:xl"`) or an unknown name has no single px
|
|
21
|
+
* value, so it bleeds by 0 rather than guessing.
|
|
22
|
+
*/
|
|
23
|
+
const resolvePadding = (p: unknown): number => {
|
|
19
24
|
if (typeof p === "number") return p;
|
|
20
|
-
const value =
|
|
25
|
+
const value = resolveToken(p, "space");
|
|
21
26
|
return typeof value === "number" ? value : 0;
|
|
22
27
|
};
|
|
23
28
|
|
|
@@ -40,22 +45,19 @@ const useCardContext = (): CardContextValue =>
|
|
|
40
45
|
};
|
|
41
46
|
|
|
42
47
|
const CardFrame = styled(Box, {
|
|
43
|
-
|
|
48
|
+
displayName: "Card",
|
|
44
49
|
flexDirection: "column",
|
|
45
|
-
// Pinned ramp steps, NOT
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
borderColor: "$color5",
|
|
54
|
-
borderRadius: "$md",
|
|
50
|
+
// Pinned ramp steps, NOT `background`/`borderColor`: a card must read as a
|
|
51
|
+
// raised surface ABOVE the page background (`color1`), which `background`
|
|
52
|
+
// alone would not. (v2's `<scheme>_Card` component theme used to provide this
|
|
53
|
+
// offset; component themes are off — `componentThemes: false` — and v3 no
|
|
54
|
+
// longer resolves them, so the offset is stated here.)
|
|
55
|
+
backgroundColor: "color2",
|
|
56
|
+
borderColor: "color5",
|
|
57
|
+
borderRadius: "md",
|
|
55
58
|
padding: DEFAULT_PADDING,
|
|
56
|
-
gap: "
|
|
59
|
+
gap: "sm",
|
|
57
60
|
variants: {
|
|
58
|
-
shadow: shadowVariant,
|
|
59
61
|
radius: radiusVariant,
|
|
60
62
|
withBorder: {
|
|
61
63
|
true: { borderWidth: 1 },
|
|
@@ -71,7 +73,7 @@ const CardFrame = styled(Box, {
|
|
|
71
73
|
});
|
|
72
74
|
|
|
73
75
|
const CardSectionFrame = styled(Box, {
|
|
74
|
-
|
|
76
|
+
displayName: "CardSection",
|
|
75
77
|
});
|
|
76
78
|
|
|
77
79
|
export interface CardSectionProps extends GetProps<typeof CardSectionFrame> {
|
|
@@ -100,13 +102,16 @@ type SectionBleed = Pick<
|
|
|
100
102
|
| "paddingVertical"
|
|
101
103
|
>;
|
|
102
104
|
|
|
105
|
+
const V_BORDER = { borderTopWidth: 1, borderBottomWidth: 1, borderColor: "color5" } as const;
|
|
106
|
+
const H_BORDER = { borderLeftWidth: 1, borderRightWidth: 1, borderColor: "color5" } as const;
|
|
107
|
+
|
|
103
108
|
/**
|
|
104
109
|
* Full-bleed card region — mirrors Mantine's `Card.Section`. It negates the
|
|
105
110
|
* card's padding so it spans edge-to-edge; the first/last sections also cancel
|
|
106
111
|
* the card's leading/trailing padding (flagged by `Card` via `__first`/`__last`).
|
|
107
112
|
* `inheritPadding` re-insets the content; `withBorder` adds dividers.
|
|
108
113
|
*/
|
|
109
|
-
const CardSection =
|
|
114
|
+
const CardSection = styleable<CardSectionProps>(CardSectionFrame, function CardSection(props, ref) {
|
|
110
115
|
const { withBorder, inheritPadding, __first, __last, ...rest } = props;
|
|
111
116
|
const { padding, orientation } = useCardContext();
|
|
112
117
|
const isHorizontal = orientation === "horizontal";
|
|
@@ -128,34 +133,27 @@ const CardSection = CardSectionFrame.styleable<CardSectionProps>(function CardSe
|
|
|
128
133
|
...(inheritPadding ? { paddingHorizontal: padding } : null),
|
|
129
134
|
};
|
|
130
135
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
borderRightWidth={withBorder && isHorizontal ? 1 : undefined}
|
|
138
|
-
// `$color5` (not `$borderColor`) to match `CardFrame` — see the note there.
|
|
139
|
-
borderColor={withBorder ? "$color5" : undefined}
|
|
140
|
-
{...bleed}
|
|
141
|
-
{...rest}
|
|
142
|
-
/>
|
|
143
|
-
);
|
|
136
|
+
// Spread conditionally: an explicit `prop={undefined}` would still claim the
|
|
137
|
+
// call-site slot in v3 and clear a base/`styles` value (conventions §5).
|
|
138
|
+
// `color5` (not `borderColor`) to match `CardFrame` — see the note there.
|
|
139
|
+
const border = withBorder ? (isHorizontal ? H_BORDER : V_BORDER) : null;
|
|
140
|
+
|
|
141
|
+
return <CardSectionFrame ref={ref} {...border} {...bleed} {...rest} />;
|
|
144
142
|
});
|
|
145
143
|
|
|
146
|
-
const CardHeader = styled(Box, {
|
|
144
|
+
const CardHeader = styled(Box, { displayName: "CardHeader", flexDirection: "column", gap: "xs" });
|
|
147
145
|
const CardFooter = styled(Box, {
|
|
148
|
-
|
|
146
|
+
displayName: "CardFooter",
|
|
149
147
|
flexDirection: "row",
|
|
150
148
|
alignItems: "center",
|
|
151
|
-
gap: "
|
|
152
|
-
marginTop: "
|
|
149
|
+
gap: "sm",
|
|
150
|
+
marginTop: "sm",
|
|
153
151
|
});
|
|
154
152
|
|
|
155
153
|
/**
|
|
156
154
|
* Named style slots (Pillar B / `styles.ts`). Each key maps to the props of the
|
|
157
|
-
* styled part it targets, so `styles={{ header: { gap: "
|
|
158
|
-
* `<Card.Header gap="
|
|
155
|
+
* styled part it targets, so `styles={{ header: { gap: "md" } }}` is sugar for
|
|
156
|
+
* `<Card.Header gap="md" />`. Distributed onto the matching child parts; a
|
|
159
157
|
* part's own props win over the `styles` map.
|
|
160
158
|
*/
|
|
161
159
|
export interface CardStyles {
|
|
@@ -173,14 +171,19 @@ const CARD_SLOT_KEYS = [
|
|
|
173
171
|
"section",
|
|
174
172
|
] as const satisfies readonly (keyof CardStyles)[];
|
|
175
173
|
|
|
176
|
-
export interface CardProps extends GetProps<typeof CardFrame> {
|
|
174
|
+
export interface CardProps extends Omit<GetProps<typeof CardFrame>, "orientation"> {
|
|
175
|
+
/**
|
|
176
|
+
* Main-axis layout of the card's children. A single value (not a clause
|
|
177
|
+
* program): `Card.Section` reads it to pick its bleed axis. @default "vertical"
|
|
178
|
+
*/
|
|
179
|
+
orientation?: "horizontal" | "vertical";
|
|
177
180
|
/** Per-slot style sugar — props spread onto the matching child parts. */
|
|
178
181
|
styles?: SlotStyles<CardStyles>;
|
|
179
182
|
}
|
|
180
183
|
|
|
181
|
-
const CardComponent =
|
|
184
|
+
const CardComponent = styleable<CardProps>(CardFrame, function Card(props, ref) {
|
|
182
185
|
const { padding = DEFAULT_PADDING, orientation = "vertical", styles, children, ...rest } = props;
|
|
183
|
-
const paddingValue = resolvePadding(padding
|
|
186
|
+
const paddingValue = resolvePadding(padding);
|
|
184
187
|
const s = slotStyles<CardStyles>(styles, CARD_SLOT_KEYS, "Card");
|
|
185
188
|
|
|
186
189
|
// Flag the first/last card children that are Sections so they can negate the
|
|
@@ -213,8 +216,13 @@ const CardComponent = CardFrame.styleable<CardProps>(function Card(props, ref) {
|
|
|
213
216
|
return child;
|
|
214
217
|
});
|
|
215
218
|
|
|
219
|
+
const context = React.useMemo(
|
|
220
|
+
() => ({ padding: paddingValue, orientation }),
|
|
221
|
+
[paddingValue, orientation],
|
|
222
|
+
);
|
|
223
|
+
|
|
216
224
|
return (
|
|
217
|
-
<CardContext.Provider value={
|
|
225
|
+
<CardContext.Provider value={context}>
|
|
218
226
|
<CardFrame ref={ref} padding={padding} orientation={orientation} {...rest}>
|
|
219
227
|
{content}
|
|
220
228
|
</CardFrame>
|
package/src/Center/Center.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type GetProps, styled } from "@knitui/core";
|
|
1
|
+
import { type GetProps, styleable, styled } from "@knitui/core";
|
|
2
2
|
|
|
3
3
|
import { Box } from "../Box";
|
|
4
4
|
import { renderTextChild } from "../internal/render-text-child";
|
|
@@ -9,7 +9,7 @@ import { Text } from "../Text";
|
|
|
9
9
|
* to `inline-flex` so it sits inline with surrounding text.
|
|
10
10
|
*/
|
|
11
11
|
const CenterFrame = styled(Box, {
|
|
12
|
-
|
|
12
|
+
displayName: "Center",
|
|
13
13
|
alignItems: "center",
|
|
14
14
|
justifyContent: "center",
|
|
15
15
|
variants: {
|
|
@@ -23,7 +23,7 @@ const CenterFrame = styled(Box, {
|
|
|
23
23
|
|
|
24
24
|
export interface CenterProps extends GetProps<typeof CenterFrame> {}
|
|
25
25
|
|
|
26
|
-
export const Center =
|
|
26
|
+
export const Center = styleable<CenterProps>(CenterFrame, function Center(props, ref) {
|
|
27
27
|
const { children, ...rest } = props;
|
|
28
28
|
|
|
29
29
|
return (
|
|
@@ -14,9 +14,12 @@ export type CheckboxIconSize = SizeKey;
|
|
|
14
14
|
* Extra style props (e.g. `testID`, layout overrides) accepted by the glyph and
|
|
15
15
|
* spread onto its root element. The `icon` slot of `Checkbox` targets these, so
|
|
16
16
|
* a slot value reaches the rendered glyph. `color`/`size`/`indeterminate` are
|
|
17
|
-
* the glyph's own controls; `children` is owned by the glyph.
|
|
17
|
+
* the glyph's own controls; `children` is owned by the glyph. Typed off the SVG
|
|
18
|
+
* icon's own props (the glyph is an `@knitui/icons` SVG, not a Tamagui Text).
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
|
+
type IconProps = React.ComponentProps<typeof IconCheck>;
|
|
21
|
+
|
|
22
|
+
export interface CheckboxIconProps extends Omit<IconProps, "color" | "children" | "size"> {
|
|
20
23
|
/** Render the indeterminate (dash) glyph instead of the check mark. */
|
|
21
24
|
indeterminate?: boolean;
|
|
22
25
|
/** Glyph size key (the parent sizes this from the control `size`). */
|
|
@@ -30,7 +33,7 @@ export type CheckboxIconComponent = React.ComponentType<CheckboxIconProps>;
|
|
|
30
33
|
|
|
31
34
|
/**
|
|
32
35
|
* Default checkbox glyph. Renders an `@knitui/icons` `IconCheck` (checked) or
|
|
33
|
-
* `IconMinus` (indeterminate). The `color`
|
|
36
|
+
* `IconMinus` (indeterminate). The `color` theme key (default `color1`, which sits
|
|
34
37
|
* on the filled box) is resolved to a concrete colour for `react-native-svg`,
|
|
35
38
|
* and `size` is mapped from the control key to px via `controlIconSize`. A
|
|
36
39
|
* slightly heavier stroke keeps the check crisp at small sizes.
|
|
@@ -38,7 +41,7 @@ export type CheckboxIconComponent = React.ComponentType<CheckboxIconProps>;
|
|
|
38
41
|
export function CheckboxIcon({
|
|
39
42
|
indeterminate,
|
|
40
43
|
size = "xs",
|
|
41
|
-
color = "
|
|
44
|
+
color = "color1",
|
|
42
45
|
...rest
|
|
43
46
|
}: CheckboxIconProps) {
|
|
44
47
|
// `useIconColor` instead of `useTheme()` + `resolveThemeColor`: on web the token
|
|
@@ -46,7 +49,7 @@ export function CheckboxIcon({
|
|
|
46
49
|
// theme subscription at all (one per checkbox, plus the dep-less `useEffect`
|
|
47
50
|
// `useThemeWithState` fires after every render). Native still reads the theme,
|
|
48
51
|
// where `react-native-svg` needs a concrete colour. See `use-icon-color.ts`.
|
|
49
|
-
const resolvedColor = useIconColor(typeof color === "string" ? color : "
|
|
52
|
+
const resolvedColor = useIconColor(typeof color === "string" ? color : "color1");
|
|
50
53
|
const iconSize = controlIconSize(size);
|
|
51
54
|
|
|
52
55
|
const Icon = indeterminate ? IconMinus : IconCheck;
|
|
@@ -2,23 +2,26 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
type GetProps,
|
|
5
|
+
styleable,
|
|
5
6
|
styled,
|
|
6
7
|
type TamaguiElement,
|
|
7
|
-
Theme,
|
|
8
8
|
withStaticProperties,
|
|
9
9
|
} from "@knitui/core";
|
|
10
10
|
import { useId, useKeyboardActions, useUncontrolled } from "@knitui/hooks";
|
|
11
11
|
|
|
12
|
-
import { Box
|
|
12
|
+
import { Box } from "../Box";
|
|
13
13
|
import {
|
|
14
14
|
INLINE_CONTROL_SLOTS,
|
|
15
15
|
InlineControl,
|
|
16
16
|
type InlineControlProps,
|
|
17
17
|
type InlineControlSlots,
|
|
18
18
|
} from "../internal/InlineControl";
|
|
19
|
+
import { useReducedTransition } from "../internal/motion";
|
|
19
20
|
import {
|
|
20
21
|
FOCUS_RING,
|
|
22
|
+
focusRingStyle,
|
|
21
23
|
radiusVariant,
|
|
24
|
+
scopeTransition,
|
|
22
25
|
shadowVariant,
|
|
23
26
|
type SizeKey,
|
|
24
27
|
squareSizeVariant,
|
|
@@ -54,8 +57,24 @@ const CheckboxCardContext = React.createContext<CheckboxCardContextValue | null>
|
|
|
54
57
|
/* Shared visual (box + glyph) — used by Checkbox and Checkbox.Indicator */
|
|
55
58
|
/* -------------------------------------------------------------------------- */
|
|
56
59
|
|
|
60
|
+
/**
|
|
61
|
+
* The square box. Its colours are a STATIC `tone` variant (resolved once per
|
|
62
|
+
* render from variant + checked + error), so the fill/border are compiler-known
|
|
63
|
+
* variant bodies instead of per-render JSX colour props:
|
|
64
|
+
*
|
|
65
|
+
* tone fill border glyph
|
|
66
|
+
* off color3 color6 — (faint fill + a border that reads as a target)
|
|
67
|
+
* filled color9 color9 color1
|
|
68
|
+
* outline transparent color9 color9
|
|
69
|
+
* error red3 red8 — (unchecked + `error`; base-theme red keys,
|
|
70
|
+
* so it stays red under any accent theme)
|
|
71
|
+
*
|
|
72
|
+
* The focus ring is NOT in this base: `Checkbox.Indicator` reuses the box and is
|
|
73
|
+
* not focusable, so the ring is spread only where the box is focusable (two-layer
|
|
74
|
+
* focus contract).
|
|
75
|
+
*/
|
|
57
76
|
const CheckboxBox = styled(Box, {
|
|
58
|
-
|
|
77
|
+
displayName: "Checkbox",
|
|
59
78
|
borderWidth: 1,
|
|
60
79
|
alignItems: "center",
|
|
61
80
|
justifyContent: "center",
|
|
@@ -66,16 +85,21 @@ const CheckboxBox = styled(Box, {
|
|
|
66
85
|
...squareSizeVariant,
|
|
67
86
|
},
|
|
68
87
|
radius: radiusVariant,
|
|
88
|
+
tone: {
|
|
89
|
+
off: { backgroundColor: "color3", borderColor: "color6" },
|
|
90
|
+
filled: { backgroundColor: "color9", borderColor: "color9" },
|
|
91
|
+
outline: { backgroundColor: "transparent", borderColor: "color9" },
|
|
92
|
+
error: { backgroundColor: "red3", borderColor: "red8" },
|
|
93
|
+
},
|
|
94
|
+
disabled: {
|
|
95
|
+
true: { opacity: 0.6 },
|
|
96
|
+
},
|
|
69
97
|
} as const,
|
|
70
98
|
|
|
71
|
-
defaultVariants: { size: "md" },
|
|
99
|
+
defaultVariants: { size: "md", tone: "off" },
|
|
72
100
|
});
|
|
73
101
|
|
|
74
|
-
type
|
|
75
|
-
background: BoxProps["backgroundColor"];
|
|
76
|
-
border: BoxProps["borderColor"];
|
|
77
|
-
icon: TextProps["color"];
|
|
78
|
-
};
|
|
102
|
+
type CheckboxTone = "off" | "filled" | "outline" | "error";
|
|
79
103
|
|
|
80
104
|
type CheckboxAriaProps = {
|
|
81
105
|
role: "checkbox";
|
|
@@ -86,25 +110,17 @@ type CheckboxAriaProps = {
|
|
|
86
110
|
"aria-labelledby"?: string;
|
|
87
111
|
};
|
|
88
112
|
|
|
89
|
-
/**
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
// Pinned ramp steps, NOT `$background`/`$borderColor`. `CheckboxBox` is
|
|
93
|
-
// `name: "Checkbox"`, which used to collide with Tamagui's (deprecated)
|
|
94
|
-
// `defaultComponentThemes` and nest into a `<scheme>_Checkbox` theme whose
|
|
95
|
-
// `surface2` template offset `$background` → `$color3` and `$borderColor` →
|
|
96
|
-
// `$color6`. Component themes are now off (`core/config/themes.ts` →
|
|
97
|
-
// `componentThemes: false`), so the unchecked box states its own steps: it
|
|
98
|
-
// needs a faint fill + a border strong enough to read as an empty target.
|
|
99
|
-
return { background: "$color3", border: "$color6", icon: "$color1" };
|
|
100
|
-
}
|
|
101
|
-
if (variant === "outline") {
|
|
102
|
-
return { background: "transparent", border: "$color9", icon: "$color9" };
|
|
103
|
-
}
|
|
104
|
-
return { background: "$color9", border: "$color9", icon: "$color1" };
|
|
105
|
-
}
|
|
113
|
+
/** The box tone for variant + active (checked / indeterminate) + error. */
|
|
114
|
+
const checkboxTone = (variant: CheckboxVariant, active: boolean, error: boolean): CheckboxTone =>
|
|
115
|
+
active ? variant : error ? "error" : "off";
|
|
106
116
|
|
|
107
|
-
|
|
117
|
+
/** Glyph colour on each active tone. */
|
|
118
|
+
const ICON_COLOR = { filled: "color1", outline: "color9" } as const;
|
|
119
|
+
|
|
120
|
+
/** Only the box colours ease between checked states. */
|
|
121
|
+
const BOX_TRANSITION_PROPERTIES = ["backgroundColor", "borderColor"] as const;
|
|
122
|
+
|
|
123
|
+
interface CheckboxVisualProps extends Omit<GetProps<typeof CheckboxBox>, "size" | "tone"> {
|
|
108
124
|
checked?: boolean;
|
|
109
125
|
indeterminate?: boolean;
|
|
110
126
|
size?: CheckboxSize;
|
|
@@ -117,7 +133,8 @@ interface CheckboxVisualProps extends Omit<GetProps<typeof CheckboxBox>, "size">
|
|
|
117
133
|
withErrorStyles?: boolean;
|
|
118
134
|
}
|
|
119
135
|
|
|
120
|
-
const CheckboxVisual =
|
|
136
|
+
const CheckboxVisual = styleable<CheckboxVisualProps>(
|
|
137
|
+
CheckboxBox,
|
|
121
138
|
function CheckboxVisual(props, ref) {
|
|
122
139
|
const {
|
|
123
140
|
checked,
|
|
@@ -133,30 +150,30 @@ const CheckboxVisual = CheckboxBox.styleable<CheckboxVisualProps>(
|
|
|
133
150
|
} = props;
|
|
134
151
|
|
|
135
152
|
const active = !!(checked || indeterminate);
|
|
136
|
-
|
|
137
|
-
const
|
|
153
|
+
// Reduced-motion aware; memoised, and `scopeTransition` caches per result.
|
|
154
|
+
const fade = useReducedTransition("fast");
|
|
138
155
|
|
|
139
|
-
|
|
156
|
+
// No `<Theme name="red">` wrapper for the error state: switching the tree
|
|
157
|
+
// shape would remount the (focused) box. The `error` tone reads the base
|
|
158
|
+
// theme's red keys directly.
|
|
159
|
+
return (
|
|
140
160
|
<CheckboxBox
|
|
141
161
|
ref={ref}
|
|
142
162
|
size={size}
|
|
143
|
-
|
|
144
|
-
|
|
163
|
+
tone={checkboxTone(variant, active, !!error && withErrorStyles)}
|
|
164
|
+
{...scopeTransition(fade, BOX_TRANSITION_PROPERTIES)}
|
|
145
165
|
{...rest}
|
|
146
166
|
>
|
|
147
167
|
{active ? (
|
|
148
168
|
<Icon
|
|
149
169
|
indeterminate={indeterminate}
|
|
150
170
|
size={size}
|
|
151
|
-
color={iconColor ??
|
|
171
|
+
color={iconColor ?? ICON_COLOR[variant]}
|
|
152
172
|
{...iconProps}
|
|
153
173
|
/>
|
|
154
174
|
) : null}
|
|
155
175
|
</CheckboxBox>
|
|
156
176
|
);
|
|
157
|
-
|
|
158
|
-
// Error border uses the red theme so it stays red under every accent theme.
|
|
159
|
-
return showErrorBorder ? <Theme name="red">{box}</Theme> : box;
|
|
160
177
|
},
|
|
161
178
|
);
|
|
162
179
|
|
|
@@ -173,8 +190,8 @@ const CheckboxVisual = CheckboxBox.styleable<CheckboxVisualProps>(
|
|
|
173
190
|
* check / indeterminate glyph component.
|
|
174
191
|
*/
|
|
175
192
|
export interface CheckboxStyles extends InlineControlSlots {
|
|
176
|
-
/** Props for the square `CheckboxBox
|
|
177
|
-
box: Partial<GetProps<typeof CheckboxBox>>;
|
|
193
|
+
/** Props for the square `CheckboxBox` (size / tone stay owned by the Checkbox). */
|
|
194
|
+
box: Partial<Omit<GetProps<typeof CheckboxBox>, "size" | "tone">>;
|
|
178
195
|
/** Props for the check / indeterminate glyph (`Checkbox.icon`). */
|
|
179
196
|
icon: Partial<CheckboxIconProps>;
|
|
180
197
|
}
|
|
@@ -191,7 +208,7 @@ const CHECKBOX_SLOTS = [
|
|
|
191
208
|
|
|
192
209
|
export interface CheckboxProps
|
|
193
210
|
extends
|
|
194
|
-
Omit<GetProps<typeof CheckboxBox>, "size" | "onChange">,
|
|
211
|
+
Omit<GetProps<typeof CheckboxBox>, "size" | "tone" | "onChange" | "role">,
|
|
195
212
|
Pick<InlineControlProps, "label" | "description" | "error" | "labelPosition"> {
|
|
196
213
|
/** Controlled checked state. */
|
|
197
214
|
checked?: boolean;
|
|
@@ -237,7 +254,7 @@ export interface CheckboxProps
|
|
|
237
254
|
"aria-describedby"?: string;
|
|
238
255
|
}
|
|
239
256
|
|
|
240
|
-
const CheckboxComponent =
|
|
257
|
+
const CheckboxComponent = styleable<CheckboxProps>(CheckboxBox, function Checkbox(props, ref) {
|
|
241
258
|
const {
|
|
242
259
|
checked,
|
|
243
260
|
defaultChecked,
|
|
@@ -260,7 +277,6 @@ const CheckboxComponent = CheckboxBox.styleable<CheckboxProps>(function Checkbox
|
|
|
260
277
|
value,
|
|
261
278
|
disabled,
|
|
262
279
|
rootRef,
|
|
263
|
-
role: _role,
|
|
264
280
|
"aria-label": ariaLabel,
|
|
265
281
|
"aria-labelledby": ariaLabelledBy,
|
|
266
282
|
"aria-describedby": ariaDescribedByProp,
|
|
@@ -329,7 +345,7 @@ const CheckboxComponent = CheckboxBox.styleable<CheckboxProps>(function Checkbox
|
|
|
329
345
|
onPress={toggle}
|
|
330
346
|
{...ariaProps}
|
|
331
347
|
{...focusProps}
|
|
332
|
-
|
|
348
|
+
{...FOCUS_RING}
|
|
333
349
|
{...s.get("box")}
|
|
334
350
|
{...rest}
|
|
335
351
|
/>
|
|
@@ -359,22 +375,26 @@ const CheckboxComponent = CheckboxBox.styleable<CheckboxProps>(function Checkbox
|
|
|
359
375
|
/* -------------------------------------------------------------------------- */
|
|
360
376
|
|
|
361
377
|
const GroupFrame = styled(Box, {
|
|
362
|
-
|
|
378
|
+
displayName: "CheckboxGroup",
|
|
363
379
|
flexDirection: "column",
|
|
364
|
-
gap: "
|
|
380
|
+
gap: "xs",
|
|
365
381
|
});
|
|
366
382
|
|
|
367
383
|
const GroupItems = styled(Box, {
|
|
368
|
-
|
|
384
|
+
displayName: "CheckboxGroupItems",
|
|
369
385
|
role: "group",
|
|
370
386
|
flexDirection: "column",
|
|
371
|
-
gap: "
|
|
387
|
+
gap: "sm",
|
|
372
388
|
});
|
|
373
389
|
|
|
374
|
-
const GroupLabel = styled(Text, {
|
|
390
|
+
const GroupLabel = styled(Text, {
|
|
391
|
+
displayName: "CheckboxGroupLabel",
|
|
392
|
+
fontWeight: "600",
|
|
393
|
+
color: "color",
|
|
394
|
+
});
|
|
375
395
|
const GroupDescription = styled(Text, {
|
|
376
|
-
|
|
377
|
-
color: "
|
|
396
|
+
displayName: "CheckboxGroupDescription",
|
|
397
|
+
color: "color",
|
|
378
398
|
opacity: 0.65,
|
|
379
399
|
});
|
|
380
400
|
|
|
@@ -406,7 +426,7 @@ export interface CheckboxGroupProps extends Omit<GetProps<typeof GroupFrame>, "o
|
|
|
406
426
|
name?: string;
|
|
407
427
|
}
|
|
408
428
|
|
|
409
|
-
const CheckboxGroup =
|
|
429
|
+
const CheckboxGroup = styleable<CheckboxGroupProps>(GroupFrame, function CheckboxGroup(props, ref) {
|
|
410
430
|
const {
|
|
411
431
|
children,
|
|
412
432
|
value,
|
|
@@ -476,7 +496,10 @@ const CheckboxGroup = GroupFrame.styleable<CheckboxGroupProps>(function Checkbox
|
|
|
476
496
|
/* Checkbox.Indicator — presentational, no input */
|
|
477
497
|
/* -------------------------------------------------------------------------- */
|
|
478
498
|
|
|
479
|
-
export interface CheckboxIndicatorProps extends Omit<
|
|
499
|
+
export interface CheckboxIndicatorProps extends Omit<
|
|
500
|
+
GetProps<typeof CheckboxBox>,
|
|
501
|
+
"size" | "tone" | "disabled"
|
|
502
|
+
> {
|
|
480
503
|
/** Determines whether the indicator shows the checked styles. */
|
|
481
504
|
checked?: boolean;
|
|
482
505
|
/** Indeterminate state; when set, `checked` is ignored for display. */
|
|
@@ -493,7 +516,8 @@ export interface CheckboxIndicatorProps extends Omit<GetProps<typeof CheckboxBox
|
|
|
493
516
|
disabled?: boolean;
|
|
494
517
|
}
|
|
495
518
|
|
|
496
|
-
const CheckboxIndicator =
|
|
519
|
+
const CheckboxIndicator = styleable<CheckboxIndicatorProps>(
|
|
520
|
+
CheckboxBox,
|
|
497
521
|
function CheckboxIndicator(props, ref) {
|
|
498
522
|
const {
|
|
499
523
|
checked,
|
|
@@ -522,7 +546,7 @@ const CheckboxIndicator = CheckboxBox.styleable<CheckboxIndicatorProps>(
|
|
|
522
546
|
variant={variant}
|
|
523
547
|
icon={icon}
|
|
524
548
|
iconColor={iconColor}
|
|
525
|
-
|
|
549
|
+
disabled={!!disabled}
|
|
526
550
|
{...rest}
|
|
527
551
|
/>
|
|
528
552
|
);
|
|
@@ -534,16 +558,22 @@ const CheckboxIndicator = CheckboxBox.styleable<CheckboxIndicatorProps>(
|
|
|
534
558
|
/* -------------------------------------------------------------------------- */
|
|
535
559
|
|
|
536
560
|
const CheckboxCardFrame = styled(Box, {
|
|
537
|
-
|
|
538
|
-
padding: "
|
|
561
|
+
displayName: "CheckboxCard",
|
|
562
|
+
padding: "md",
|
|
539
563
|
...webCursor("pointer"),
|
|
564
|
+
// The card is always keyboard-focusable (`useKeyboardActions`), so the ring
|
|
565
|
+
// lives on its base.
|
|
566
|
+
...focusRingStyle,
|
|
540
567
|
|
|
541
568
|
variants: {
|
|
542
569
|
withBorder: {
|
|
543
|
-
true: { borderWidth: 1, borderColor: "
|
|
570
|
+
true: { borderWidth: 1, borderColor: "borderColor" },
|
|
544
571
|
},
|
|
545
572
|
checked: {
|
|
546
|
-
true: { borderColor: "
|
|
573
|
+
true: { borderColor: "color9" },
|
|
574
|
+
},
|
|
575
|
+
disabled: {
|
|
576
|
+
true: { opacity: 0.6, pointerEvents: "none" },
|
|
547
577
|
},
|
|
548
578
|
radius: radiusVariant,
|
|
549
579
|
shadow: shadowVariant,
|
|
@@ -552,7 +582,10 @@ const CheckboxCardFrame = styled(Box, {
|
|
|
552
582
|
defaultVariants: { withBorder: true },
|
|
553
583
|
});
|
|
554
584
|
|
|
555
|
-
export interface CheckboxCardProps extends Omit<
|
|
585
|
+
export interface CheckboxCardProps extends Omit<
|
|
586
|
+
GetProps<typeof CheckboxCardFrame>,
|
|
587
|
+
"onChange" | "checked" | "withBorder" | "disabled" | "role"
|
|
588
|
+
> {
|
|
556
589
|
/** Controlled checked state. */
|
|
557
590
|
checked?: boolean;
|
|
558
591
|
/** Initial checked state for the uncontrolled case. @default false */
|
|
@@ -569,7 +602,8 @@ export interface CheckboxCardProps extends Omit<GetProps<typeof CheckboxCardFram
|
|
|
569
602
|
disabled?: boolean;
|
|
570
603
|
}
|
|
571
604
|
|
|
572
|
-
const CheckboxCard =
|
|
605
|
+
const CheckboxCard = styleable<CheckboxCardProps>(
|
|
606
|
+
CheckboxCardFrame,
|
|
573
607
|
function CheckboxCard(props, ref) {
|
|
574
608
|
const {
|
|
575
609
|
checked,
|
|
@@ -579,7 +613,6 @@ const CheckboxCard = CheckboxCardFrame.styleable<CheckboxCardProps>(
|
|
|
579
613
|
value,
|
|
580
614
|
children,
|
|
581
615
|
disabled,
|
|
582
|
-
role: _role,
|
|
583
616
|
"aria-label": ariaLabel,
|
|
584
617
|
...rest
|
|
585
618
|
} = props;
|
|
@@ -613,13 +646,15 @@ const CheckboxCard = CheckboxCardFrame.styleable<CheckboxCardProps>(
|
|
|
613
646
|
}, [resolvedDisabled, inGroup, ctx, value, setOn, isOn]);
|
|
614
647
|
|
|
615
648
|
const focusProps = useKeyboardActions({ onActivate: toggle }, { disabled: resolvedDisabled });
|
|
649
|
+
const cardContext = React.useMemo(() => ({ checked: isOn }), [isOn]);
|
|
616
650
|
|
|
617
651
|
return (
|
|
618
|
-
<CheckboxCardContext.Provider value={
|
|
652
|
+
<CheckboxCardContext.Provider value={cardContext}>
|
|
619
653
|
<CheckboxCardFrame
|
|
620
654
|
ref={ref}
|
|
621
655
|
withBorder={withBorder}
|
|
622
656
|
checked={isOn}
|
|
657
|
+
disabled={resolvedDisabled}
|
|
623
658
|
onPress={toggle}
|
|
624
659
|
{...ariaProps}
|
|
625
660
|
{...focusProps}
|