@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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.CONTROL_GAP_SIZES = exports.CONTAINER_SIZES = void 0;
|
|
6
7
|
Object.defineProperty(exports, "DEFAULT_SIZE", {
|
|
7
8
|
enumerable: true,
|
|
8
9
|
get: function () {
|
|
@@ -12,10 +13,28 @@ Object.defineProperty(exports, "DEFAULT_SIZE", {
|
|
|
12
13
|
Object.defineProperty(exports, "FOCUS_RING", {
|
|
13
14
|
enumerable: true,
|
|
14
15
|
get: function () {
|
|
15
|
-
return
|
|
16
|
+
return _focusRing.FOCUS_RING;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "FOCUS_WITHIN_RING", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _focusRing.FOCUS_WITHIN_RING;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
exports.SQUARE_ROUNDED_SIZES = exports.SLIDER_TRACK_SIZES = exports.SLIDER_THUMB_SIZES = exports.PROGRESS_THICKNESS = exports.PRESS_SCALE = exports.PANEL_WIDTH = exports.MODAL_SIZES = void 0;
|
|
26
|
+
Object.defineProperty(exports, "VARIANT_COLOR_LADDER", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return _variantColors.VARIANT_COLOR_LADDER;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "VARIANT_CONTROL", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _variantColors.VARIANT_CONTROL;
|
|
16
36
|
}
|
|
17
37
|
});
|
|
18
|
-
exports.PRESS_SCALE = void 0;
|
|
19
38
|
Object.defineProperty(exports, "VARIANT_FILL", {
|
|
20
39
|
enumerable: true,
|
|
21
40
|
get: function () {
|
|
@@ -46,23 +65,52 @@ Object.defineProperty(exports, "VARIANT_KEYS", {
|
|
|
46
65
|
return _variantColors.VARIANT_KEYS;
|
|
47
66
|
}
|
|
48
67
|
});
|
|
49
|
-
exports.fieldHeightVariant = exports.endRadiusVariant = exports.controlVariant = exports.controlTextColorVariant = exports.controlGapVariant = exports.controlFontVariant = exports.controlColorVariant = exports.containerSizeVariant = exports.
|
|
68
|
+
exports.fieldHeightVariant = exports.endRadiusVariant = exports.controlVariant = exports.controlTextColorVariant = exports.controlGapVariant = exports.controlFontVariant = exports.controlColorVariant = exports.containerSizeVariant = exports.alignVariant = exports.WEB_BUTTON_TEXT_RESET = exports.WEB_BUTTON_PROPS = void 0;
|
|
69
|
+
Object.defineProperty(exports, "focusRingResetStyle", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: function () {
|
|
72
|
+
return _focusRing.focusRingResetStyle;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
50
75
|
Object.defineProperty(exports, "focusRingStyle", {
|
|
51
76
|
enumerable: true,
|
|
52
77
|
get: function () {
|
|
53
|
-
return
|
|
78
|
+
return _focusRing.focusRingStyle;
|
|
54
79
|
}
|
|
55
80
|
});
|
|
56
|
-
exports.
|
|
81
|
+
exports.heightVariant = exports.gapVariant = exports.fontWeightVariant = exports.fontSizeVariant = exports.fontSizePassthroughVariant = exports.fontSizeOf = void 0;
|
|
82
|
+
exports.hoverProps = hoverProps;
|
|
83
|
+
exports.panelWidthVariant = exports.overflowVariant = exports.mutedTextColorVariant = exports.modalSizeVariant = exports.maxWidthVariant = exports.kbdSizeVariant = exports.justifyVariant = exports.isVariantKey = void 0;
|
|
84
|
+
exports.passthroughVariant = passthroughVariant;
|
|
85
|
+
exports.surfaceColorVariant = exports.squareSizeVariantFallthrough = exports.squareSizeVariant = exports.squareSizeRoundedVariant = exports.squareSizeOf = exports.sliderTrackVariant = exports.sliderThumbVariant = exports.shadowVariant = exports.scopeTransition = exports.resolveTransition = exports.radiusVariant = exports.progressThicknessVariant = exports.pressScaleStyle = exports.presetDurationMs = exports.pickVariants = void 0;
|
|
86
|
+
exports.tableVariant = tableVariant;
|
|
87
|
+
exports.wrapVariant = exports.withTransitionProperties = exports.webCursorStyle = exports.webCursor = exports.webButtonTextReset = exports.webButtonOrLink = exports.webButton = exports.transitionProps = exports.toTransitionProperties = exports.timedTransition = exports.textWrapVariant = exports.textTransformVariant = exports.textAlignVariant = void 0;
|
|
57
88
|
var _core = require("@knitui/core");
|
|
58
89
|
var _controlMetrics = require("./control-metrics");
|
|
59
90
|
var _variantColors = require("./variant-colors");
|
|
91
|
+
var _focusRing = require("./focus-ring");
|
|
60
92
|
/**
|
|
61
|
-
* Shared
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
93
|
+
* Shared variant helpers that map Mantine's NAMED props onto Tamagui style props
|
|
94
|
+
* — the kit's v3 variant vocabulary (docs/v3/conventions.md §5, "Internal helpers").
|
|
95
|
+
*
|
|
96
|
+
* Two shapes, picked by what the prop accepts:
|
|
97
|
+
*
|
|
98
|
+
* - **Static exact-key maps** (`controlVariant`, `controlFontVariant`,
|
|
99
|
+
* `squareSizeVariant`, `fontSizeVariant`, `shadowVariant`, the colour ladders):
|
|
100
|
+
* plain literal objects generated from `controlMetrics` / `variant-colors`.
|
|
101
|
+
* Compiler-extractable, and they still work per clause (`size="sm md:lg"`).
|
|
102
|
+
* Spread them at MODULE scope only (`{ ...controlVariant.md, gap: "xs" }`).
|
|
103
|
+
* - **`styled.dynamic` variants** for an OPEN domain — a size key OR a raw
|
|
104
|
+
* number / CSS value (`radiusVariant`, `squareSizeVariantFallthrough`,
|
|
105
|
+
* `fontSizePassthroughVariant`, …). v3 runs a dynamic once per clause payload,
|
|
106
|
+
* so `radius="sm md:lg"` works. Use them AS the variant (`radius: radiusVariant`),
|
|
107
|
+
* NEVER spread them: spreading a dynamic copies only its brand symbol and turns
|
|
108
|
+
* the variant into a style-less "bare" dynamic. To extend a table with extra
|
|
109
|
+
* keys, build a new one with {@link tableVariant}.
|
|
110
|
+
*
|
|
111
|
+
* v2's `":string"` / `":number"` / `"...size"` catch-all keys are gone (v3 treats
|
|
112
|
+
* them as literal keys that never match), and so are the `$`-sigil helpers
|
|
113
|
+
* (`toRadius` & co.): a string is a token lookup, a number a raw value.
|
|
66
114
|
*/
|
|
67
115
|
|
|
68
116
|
/**
|
|
@@ -72,99 +120,154 @@ var _variantColors = require("./variant-colors");
|
|
|
72
120
|
* `DEFAULT_SIZE` live in `control-metrics.ts` next to the table they describe.
|
|
73
121
|
*/
|
|
74
122
|
|
|
75
|
-
|
|
123
|
+
/* -------------------------------------------------------------------------- */
|
|
124
|
+
/* Dynamic-variant infrastructure */
|
|
125
|
+
/* -------------------------------------------------------------------------- */
|
|
126
|
+
|
|
127
|
+
/** A style fragment a variant emits (style props, token names, clause strings). */
|
|
128
|
+
|
|
129
|
+
/** An open-ended CSS string (`"10px"`, `"50%"`) that keeps literal autocomplete. */
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* A v3 `styled.dynamic` variant accepting `V` — the type every open-domain helper
|
|
133
|
+
* below returns. `GetProps` of the frame widens it to `FlatStyleValue<V>`, so the
|
|
134
|
+
* prop also takes clause programs (`"sm md:lg"`).
|
|
135
|
+
*
|
|
136
|
+
* The brand intersection is load-bearing for the lib build: v3 does not export its
|
|
137
|
+
* `StyledDynamicFn` interface, so a bare `ReturnType<…>` resolves to a type the
|
|
138
|
+
* declaration emitter cannot name (TS2883). An intersection keeps THIS alias as the
|
|
139
|
+
* printed name, so every exported variant emits as `DynamicVariant<…>`.
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
const makeDynamic = fn => _core.styled.dynamic(fn);
|
|
76
143
|
|
|
77
|
-
/**
|
|
78
|
-
const
|
|
144
|
+
/** Output cache cap per dynamic: open domains (arbitrary px) must not grow forever. */
|
|
145
|
+
const CACHE_LIMIT = 256;
|
|
79
146
|
|
|
80
147
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
148
|
+
* Memoise a value → fragment mapping per primitive value, so a re-render with the
|
|
149
|
+
* same prop hands Tamagui the SAME fragment object (no per-render allocation, and
|
|
150
|
+
* Tamagui's own identity caches hit). Bounded by {@link CACHE_LIMIT}.
|
|
83
151
|
*/
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
152
|
+
const memoFragment = build => {
|
|
153
|
+
const cache = new Map();
|
|
154
|
+
return value => {
|
|
155
|
+
const primitive = typeof value === "string" || typeof value === "number";
|
|
156
|
+
if (primitive) {
|
|
157
|
+
const hit = cache.get(value);
|
|
158
|
+
if (hit !== undefined || cache.has(value)) return hit;
|
|
159
|
+
}
|
|
160
|
+
const out = build(value);
|
|
161
|
+
if (primitive) {
|
|
162
|
+
if (cache.size >= CACHE_LIMIT) cache.clear();
|
|
163
|
+
cache.set(value, out);
|
|
164
|
+
}
|
|
165
|
+
return out;
|
|
166
|
+
};
|
|
91
167
|
};
|
|
92
168
|
|
|
169
|
+
/**
|
|
170
|
+
* A `styled.dynamic` variant that maps one value straight onto one or more style
|
|
171
|
+
* props (`passthroughVariant<RadiusValue>("borderRadius")` →
|
|
172
|
+
* `radius="md"` ⇒ `{ borderRadius: "md" }`, `radius={6}` ⇒ `{ borderRadius: 6 }`).
|
|
173
|
+
* Token names resolve per property at the style layer; numbers are px.
|
|
174
|
+
*/
|
|
175
|
+
function passthroughVariant(...props) {
|
|
176
|
+
const fragment = memoFragment(value => {
|
|
177
|
+
const out = {};
|
|
178
|
+
for (const prop of props) out[prop] = value;
|
|
179
|
+
return out;
|
|
180
|
+
});
|
|
181
|
+
return makeDynamic(fragment);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Build a `styled.dynamic` variant from a STATIC key table plus an optional
|
|
186
|
+
* fallthrough for any other value — the v3 replacement for v2's
|
|
187
|
+
* `{ xs: {...}, md: {...}, ":number": fn, ":string": fn }` maps. A table hit
|
|
188
|
+
* returns the table's own (static, shared) fragment; anything else goes to
|
|
189
|
+
* `fallback` (memoised per value). Runs per clause, so `size="sm md:lg"` works.
|
|
190
|
+
*
|
|
191
|
+
* ```ts
|
|
192
|
+
* size: tableVariant(
|
|
193
|
+
* { ...fontSizeVariant, h1: { fontSize: "xxl" } },
|
|
194
|
+
* (value: number | CssString) => ({ fontSize: value }),
|
|
195
|
+
* )
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
function tableVariant(table, fallback) {
|
|
200
|
+
const fall = fallback ? memoFragment(fallback) : undefined;
|
|
201
|
+
return makeDynamic(value => {
|
|
202
|
+
if (typeof value === "string" && Object.prototype.hasOwnProperty.call(table, value)) {
|
|
203
|
+
return table[value];
|
|
204
|
+
}
|
|
205
|
+
return fall?.(value);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* -------------------------------------------------------------------------- */
|
|
210
|
+
/* Shape / layout variants */
|
|
211
|
+
/* -------------------------------------------------------------------------- */
|
|
212
|
+
|
|
213
|
+
/** What a `radius` prop accepts: a radius token, a number (px), or a CSS length. */
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Mantine-style `radius` prop. Accepts a size key (`"md"`, a radius token), a
|
|
217
|
+
* number (px), or an arbitrary CSS value (`"10px"`). Use as the variant
|
|
218
|
+
* (`radius: radiusVariant`), never spread it.
|
|
219
|
+
*/
|
|
220
|
+
const radiusVariant = exports.radiusVariant = passthroughVariant("borderRadius");
|
|
221
|
+
|
|
93
222
|
/**
|
|
94
223
|
* Like `radiusVariant`, but rounds only the two INLINE-END corners (top-right +
|
|
95
224
|
* bottom-right). Used where one edge carries a solid border that should stay
|
|
96
225
|
* square — e.g. `Blockquote`'s start border.
|
|
97
226
|
*/
|
|
98
|
-
const endRadiusVariant = exports.endRadiusVariant =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
":number": val => ({
|
|
104
|
-
borderTopRightRadius: val,
|
|
105
|
-
borderBottomRightRadius: val
|
|
106
|
-
})
|
|
107
|
-
};
|
|
227
|
+
const endRadiusVariant = exports.endRadiusVariant = passthroughVariant("borderTopRightRadius", "borderBottomRightRadius");
|
|
228
|
+
|
|
229
|
+
/** Flexbox cross-axis alignment values. */
|
|
230
|
+
|
|
231
|
+
/** Flexbox main-axis distribution values. */
|
|
108
232
|
|
|
109
233
|
/** Map a flexbox alignment prop name onto its Tamagui style prop. */
|
|
110
|
-
const alignVariant = exports.alignVariant =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
})
|
|
114
|
-
};
|
|
115
|
-
const justifyVariant = exports.justifyVariant = {
|
|
116
|
-
":string": val => ({
|
|
117
|
-
justifyContent: val
|
|
118
|
-
})
|
|
119
|
-
};
|
|
120
|
-
const wrapVariant = exports.wrapVariant = {
|
|
121
|
-
":string": val => ({
|
|
122
|
-
flexWrap: val
|
|
123
|
-
})
|
|
124
|
-
};
|
|
234
|
+
const alignVariant = exports.alignVariant = passthroughVariant("alignItems");
|
|
235
|
+
const justifyVariant = exports.justifyVariant = passthroughVariant("justifyContent");
|
|
236
|
+
const wrapVariant = exports.wrapVariant = passthroughVariant("flexWrap");
|
|
125
237
|
|
|
126
238
|
/**
|
|
127
|
-
* Mantine-style `spacing`/`gap` prop. A space token (`"
|
|
128
|
-
* value, or number maps onto `gap`. Used by `List`'s `spacing`.
|
|
239
|
+
* Mantine-style `spacing`/`gap` prop. A space token (`"sm"`), arbitrary CSS
|
|
240
|
+
* value, or number maps onto `gap`. Used by `List`'s `spacing`, `PinInput`'s `gap`.
|
|
129
241
|
*/
|
|
130
|
-
const gapVariant = exports.gapVariant =
|
|
131
|
-
":number": val => ({
|
|
132
|
-
gap: val
|
|
133
|
-
}),
|
|
134
|
-
":string": val => ({
|
|
135
|
-
gap: val
|
|
136
|
-
})
|
|
137
|
-
};
|
|
242
|
+
const gapVariant = exports.gapVariant = passthroughVariant("gap");
|
|
138
243
|
|
|
139
244
|
/** Open-ended `overflow` prop (`"hidden"`, `"scroll"`, …). Used by `Grid`. */
|
|
140
|
-
const overflowVariant = exports.overflowVariant =
|
|
141
|
-
":string": val => ({
|
|
142
|
-
overflow: val
|
|
143
|
-
})
|
|
144
|
-
};
|
|
245
|
+
const overflowVariant = exports.overflowVariant = passthroughVariant("overflow");
|
|
145
246
|
|
|
146
247
|
/**
|
|
147
|
-
* Mantine-style `maxWidth
|
|
148
|
-
*
|
|
248
|
+
* Mantine-style `maxWidth` cap. A number is a raw pixel width; a string is a
|
|
249
|
+
* token or arbitrary CSS value.
|
|
149
250
|
*/
|
|
150
|
-
const maxWidthVariant = exports.maxWidthVariant =
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
251
|
+
const maxWidthVariant = exports.maxWidthVariant = passthroughVariant("maxWidth");
|
|
252
|
+
|
|
253
|
+
/** A raw width / height escape hatch: px number or CSS length. */
|
|
254
|
+
|
|
255
|
+
const maxWidthOf = value => ({
|
|
256
|
+
maxWidth: value
|
|
257
|
+
});
|
|
258
|
+
const widthOf = value => ({
|
|
259
|
+
width: value
|
|
260
|
+
});
|
|
261
|
+
const heightOf = value => ({
|
|
262
|
+
height: value
|
|
263
|
+
});
|
|
158
264
|
|
|
159
265
|
/**
|
|
160
|
-
* Named content-width scale for overlay panels (`Modal`, etc.)
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* only, so named keys silently fall through to an invalid `maxWidth: "md"`) and
|
|
164
|
-
* UNLIKE `Container`'s viewport-`breakpoints` caps, these are dialog-scale widths
|
|
165
|
-
* tuned after Mantine's modal sizes (xs 320 → xl 780).
|
|
266
|
+
* Named content-width scale for overlay panels (`Modal`, etc.): dialog-scale
|
|
267
|
+
* `maxWidth`s tuned after Mantine's modal sizes (xs 320 → xl 780). Any other
|
|
268
|
+
* number / CSS value passes through as the `maxWidth`.
|
|
166
269
|
*/
|
|
167
|
-
const
|
|
270
|
+
const MODAL_SIZES = exports.MODAL_SIZES = {
|
|
168
271
|
xxs: {
|
|
169
272
|
maxWidth: 240
|
|
170
273
|
},
|
|
@@ -185,25 +288,16 @@ const modalSizeVariant = exports.modalSizeVariant = {
|
|
|
185
288
|
},
|
|
186
289
|
xxl: {
|
|
187
290
|
maxWidth: 1040
|
|
188
|
-
}
|
|
189
|
-
":number": val => ({
|
|
190
|
-
maxWidth: val
|
|
191
|
-
}),
|
|
192
|
-
":string": val => ({
|
|
193
|
-
maxWidth: val
|
|
194
|
-
})
|
|
291
|
+
}
|
|
195
292
|
};
|
|
293
|
+
const modalSizeVariant = exports.modalSizeVariant = tableVariant(MODAL_SIZES, maxWidthOf);
|
|
196
294
|
|
|
197
295
|
/**
|
|
198
|
-
* Named content-width scale for `Container
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
* only — named keys would silently fall through to an invalid `maxWidth: "md"`),
|
|
202
|
-
* and UNLIKE `modalSizeVariant` (dialog-card scale), these are page-column
|
|
203
|
-
* widths tuned after Mantine's container sizes (xs 540 → xl 1320), extended to
|
|
204
|
-
* the kit's full seven-step scale.
|
|
296
|
+
* Named content-width scale for `Container`: page-column `maxWidth`s tuned after
|
|
297
|
+
* Mantine's container sizes (xs 540 → xl 1320), on the kit's seven-step scale.
|
|
298
|
+
* Any other number / CSS value passes through as the `maxWidth`.
|
|
205
299
|
*/
|
|
206
|
-
const
|
|
300
|
+
const CONTAINER_SIZES = exports.CONTAINER_SIZES = {
|
|
207
301
|
xxs: {
|
|
208
302
|
maxWidth: 420
|
|
209
303
|
},
|
|
@@ -224,26 +318,16 @@ const containerSizeVariant = exports.containerSizeVariant = {
|
|
|
224
318
|
},
|
|
225
319
|
xxl: {
|
|
226
320
|
maxWidth: 1608
|
|
227
|
-
}
|
|
228
|
-
":number": val => ({
|
|
229
|
-
maxWidth: val
|
|
230
|
-
}),
|
|
231
|
-
":string": val => ({
|
|
232
|
-
maxWidth: val
|
|
233
|
-
})
|
|
321
|
+
}
|
|
234
322
|
};
|
|
323
|
+
const containerSizeVariant = exports.containerSizeVariant = tableVariant(CONTAINER_SIZES, maxWidthOf);
|
|
235
324
|
|
|
236
325
|
/**
|
|
237
|
-
* Square `size`
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
* ```ts
|
|
243
|
-
* size: { xs: { width: "$xs", height: "$xs" }, …, ...squareSizeVariant }
|
|
244
|
-
* ```
|
|
245
|
-
*
|
|
246
|
-
* Used by `ActionIcon`, `AngleSlider`, `Avatar`, and `ColorSwatch`.
|
|
326
|
+
* Square `size` ladder — maps a size key onto BOTH `width` and `height` (+
|
|
327
|
+
* `minWidth`) from the canonical control heights. A static exact-key map; use
|
|
328
|
+
* {@link squareSizeVariantFallthrough} when the prop also takes a number / CSS
|
|
329
|
+
* value. Used by `Radio`, `Stepper` (spread into their own size map) and read as
|
|
330
|
+
* data by `PinInput` / `ColorPicker`.
|
|
247
331
|
*/
|
|
248
332
|
const squareSizeVariant = exports.squareSizeVariant = {
|
|
249
333
|
xxs: {
|
|
@@ -283,86 +367,77 @@ const squareSizeVariant = exports.squareSizeVariant = {
|
|
|
283
367
|
}
|
|
284
368
|
};
|
|
285
369
|
|
|
370
|
+
/**
|
|
371
|
+
* The square fallthrough body — a raw px / CSS size onto `minWidth` + `width` +
|
|
372
|
+
* `height`. Exported for frames that build their own {@link tableVariant} on top
|
|
373
|
+
* of it (Pagination).
|
|
374
|
+
*/
|
|
375
|
+
const squareSizeOf = value => ({
|
|
376
|
+
minWidth: value,
|
|
377
|
+
width: value,
|
|
378
|
+
height: value
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* {@link squareSizeVariant} plus the raw escape hatch: `size={44}` / `size="3rem"`
|
|
383
|
+
* size the square directly. Used by `ActionIcon`-likes, `Avatar`, `ColorSwatch`,
|
|
384
|
+
* `Loader`, `Burger`, `Rating`, `AngleSlider`, `Indicator`.
|
|
385
|
+
*/
|
|
386
|
+
exports.squareSizeOf = squareSizeOf;
|
|
387
|
+
const squareSizeVariantFallthrough = exports.squareSizeVariantFallthrough = tableVariant(squareSizeVariant, squareSizeOf);
|
|
388
|
+
|
|
286
389
|
/**
|
|
287
390
|
* The corner a square control (`ActionIcon`, `ThemeIcon`) takes from `sm` to `xl`
|
|
288
|
-
* —
|
|
289
|
-
* `controlMetrics.borderRadius` (4 at sm/md), so an icon button beside a labelled
|
|
290
|
-
* one at the same height was visibly squarer than it. The tiny steps keep the
|
|
391
|
+
* — `md` (8), the SAME corner `Button` uses at every size. The tiny steps keep the
|
|
291
392
|
* table's 2px (an 8px corner on an 18–24px square reads as a circle); `xxl` keeps
|
|
292
393
|
* its 16.
|
|
293
394
|
*/
|
|
294
|
-
const SQUARE_CONTROL_RADIUS = "
|
|
295
|
-
|
|
395
|
+
const SQUARE_CONTROL_RADIUS = "md";
|
|
396
|
+
|
|
397
|
+
/** Square control sizes WITH the matching corner, per size key. */
|
|
398
|
+
const SQUARE_ROUNDED_SIZES = exports.SQUARE_ROUNDED_SIZES = {
|
|
296
399
|
xxs: {
|
|
297
|
-
|
|
298
|
-
width: _controlMetrics.controlMetrics.xxs.height,
|
|
299
|
-
height: _controlMetrics.controlMetrics.xxs.height,
|
|
400
|
+
...squareSizeVariant.xxs,
|
|
300
401
|
borderRadius: _controlMetrics.controlMetrics.xxs.borderRadius
|
|
301
402
|
},
|
|
302
403
|
xs: {
|
|
303
|
-
|
|
304
|
-
width: _controlMetrics.controlMetrics.xs.height,
|
|
305
|
-
height: _controlMetrics.controlMetrics.xs.height,
|
|
404
|
+
...squareSizeVariant.xs,
|
|
306
405
|
borderRadius: _controlMetrics.controlMetrics.xs.borderRadius
|
|
307
406
|
},
|
|
308
407
|
sm: {
|
|
309
|
-
|
|
310
|
-
width: _controlMetrics.controlMetrics.sm.height,
|
|
311
|
-
height: _controlMetrics.controlMetrics.sm.height,
|
|
408
|
+
...squareSizeVariant.sm,
|
|
312
409
|
borderRadius: SQUARE_CONTROL_RADIUS
|
|
313
410
|
},
|
|
314
411
|
md: {
|
|
315
|
-
|
|
316
|
-
width: _controlMetrics.controlMetrics.md.height,
|
|
317
|
-
height: _controlMetrics.controlMetrics.md.height,
|
|
412
|
+
...squareSizeVariant.md,
|
|
318
413
|
borderRadius: SQUARE_CONTROL_RADIUS
|
|
319
414
|
},
|
|
320
415
|
lg: {
|
|
321
|
-
|
|
322
|
-
width: _controlMetrics.controlMetrics.lg.height,
|
|
323
|
-
height: _controlMetrics.controlMetrics.lg.height,
|
|
416
|
+
...squareSizeVariant.lg,
|
|
324
417
|
borderRadius: SQUARE_CONTROL_RADIUS
|
|
325
418
|
},
|
|
326
419
|
xl: {
|
|
327
|
-
|
|
328
|
-
width: _controlMetrics.controlMetrics.xl.height,
|
|
329
|
-
height: _controlMetrics.controlMetrics.xl.height,
|
|
420
|
+
...squareSizeVariant.xl,
|
|
330
421
|
borderRadius: SQUARE_CONTROL_RADIUS
|
|
331
422
|
},
|
|
332
423
|
xxl: {
|
|
333
|
-
|
|
334
|
-
width: _controlMetrics.controlMetrics.xxl.height,
|
|
335
|
-
height: _controlMetrics.controlMetrics.xxl.height,
|
|
424
|
+
...squareSizeVariant.xxl,
|
|
336
425
|
borderRadius: _controlMetrics.controlMetrics.xxl.borderRadius
|
|
337
|
-
}
|
|
338
|
-
":string": val => ({
|
|
339
|
-
borderRadius: toRadius(val)
|
|
340
|
-
}),
|
|
341
|
-
":number": val => ({
|
|
342
|
-
borderRadius: val
|
|
343
|
-
})
|
|
344
|
-
};
|
|
345
|
-
const squareSizeVariantFallthrough = exports.squareSizeVariantFallthrough = {
|
|
346
|
-
...squareSizeVariant,
|
|
347
|
-
":string": val => ({
|
|
348
|
-
minWidth: val,
|
|
349
|
-
width: val,
|
|
350
|
-
height: val
|
|
351
|
-
}),
|
|
352
|
-
":number": val => ({
|
|
353
|
-
minWidth: val,
|
|
354
|
-
width: val,
|
|
355
|
-
height: val
|
|
356
|
-
})
|
|
426
|
+
}
|
|
357
427
|
};
|
|
358
428
|
|
|
429
|
+
/**
|
|
430
|
+
* Square control `size` (ActionIcon, ThemeIcon): a size key sizes the square AND
|
|
431
|
+
* picks its corner; a raw number / CSS value sizes the square only (the corner
|
|
432
|
+
* comes from the frame's `radius`).
|
|
433
|
+
*/
|
|
434
|
+
const squareSizeRoundedVariant = exports.squareSizeRoundedVariant = tableVariant(SQUARE_ROUNDED_SIZES, squareSizeOf);
|
|
435
|
+
|
|
359
436
|
/**
|
|
360
437
|
* Mantine-style `size` prop for a text-bearing control (Button, etc.): each key
|
|
361
|
-
* maps to a `height` (from the `size` token scale)
|
|
362
|
-
* the `space` scale)
|
|
363
|
-
*
|
|
364
|
-
* the ladder inline. Token groups resolve by property: `$md` is size.md on
|
|
365
|
-
* `height`, space.md on `paddingHorizontal`, radius.md on `borderRadius`.
|
|
438
|
+
* maps to a `height` (from the `size` token scale) and `paddingHorizontal` (from
|
|
439
|
+
* the `space` scale). Token names resolve by property: `md` is size.md on
|
|
440
|
+
* `height`, space.md on `paddingHorizontal`. Static exact-key map.
|
|
366
441
|
*
|
|
367
442
|
* Used by `Button`, `Button.GroupSection`, `SegmentedControl.Control`.
|
|
368
443
|
*/
|
|
@@ -400,10 +475,8 @@ const controlVariant = exports.controlVariant = {
|
|
|
400
475
|
/**
|
|
401
476
|
* Balanced control-text font ladder — the `fontSize` column of `controlMetrics`.
|
|
402
477
|
* UNLIKE `fontSizeVariant` (which maps each key to its same-key font token), this
|
|
403
|
-
* CLAMPS the two smallest steps (xxs/xs →
|
|
404
|
-
* dominated by its label.
|
|
405
|
-
* input hosts) should size their label/value text with this so control text stays
|
|
406
|
-
* proportional to control height; standalone typography keeps `fontSizeVariant`.
|
|
478
|
+
* CLAMPS the two smallest steps (xxs/xs → `xxs`) so a tiny control isn't
|
|
479
|
+
* dominated by its label. Static exact-key map.
|
|
407
480
|
*/
|
|
408
481
|
const controlFontVariant = exports.controlFontVariant = {
|
|
409
482
|
xxs: {
|
|
@@ -429,16 +502,8 @@ const controlFontVariant = exports.controlFontVariant = {
|
|
|
429
502
|
}
|
|
430
503
|
};
|
|
431
504
|
|
|
432
|
-
/**
|
|
433
|
-
|
|
434
|
-
* `borderRadius` (e.g. `borderRadius: 9999`) and lays out inline children with a
|
|
435
|
-
* `gap`: each key maps `height` + `paddingHorizontal` (identical to
|
|
436
|
-
* `controlVariant`) + `gap` (from the `space` scale), with NO `borderRadius`. A
|
|
437
|
-
* `:number` passes a raw pixel size through to a proportional height/padding/gap.
|
|
438
|
-
*
|
|
439
|
-
* Used by `Badge`, `Chip`, `Pill` so the three stay in lockstep.
|
|
440
|
-
*/
|
|
441
|
-
const controlGapVariant = exports.controlGapVariant = {
|
|
505
|
+
/** Pill-control sizes: height + pill padding + gap, NO borderRadius. */
|
|
506
|
+
const CONTROL_GAP_SIZES = exports.CONTROL_GAP_SIZES = {
|
|
442
507
|
xxs: {
|
|
443
508
|
height: _controlMetrics.controlMetrics.xxs.height,
|
|
444
509
|
paddingHorizontal: _controlMetrics.controlMetrics.xxs.paddingHorizontalPill,
|
|
@@ -473,26 +538,33 @@ const controlGapVariant = exports.controlGapVariant = {
|
|
|
473
538
|
height: _controlMetrics.controlMetrics.xxl.height,
|
|
474
539
|
paddingHorizontal: _controlMetrics.controlMetrics.xxl.paddingHorizontalPill,
|
|
475
540
|
gap: _controlMetrics.controlMetrics.xxl.gap
|
|
476
|
-
}
|
|
477
|
-
":number": val => ({
|
|
478
|
-
height: val,
|
|
479
|
-
paddingHorizontal: Math.round(val * 0.5),
|
|
480
|
-
gap: Math.max(4, Math.round(val * 0.25))
|
|
481
|
-
})
|
|
541
|
+
}
|
|
482
542
|
};
|
|
483
543
|
|
|
544
|
+
/**
|
|
545
|
+
* Like `controlVariant`, but for a pill-shaped control that pins its own
|
|
546
|
+
* `borderRadius` and lays out inline children with a `gap`. A number passes a raw
|
|
547
|
+
* pixel height through to a proportional height/padding/gap.
|
|
548
|
+
*
|
|
549
|
+
* Used by `Badge`, `Chip`, `Pill` so the three stay in lockstep.
|
|
550
|
+
*/
|
|
551
|
+
const controlGapVariant = exports.controlGapVariant = tableVariant(CONTROL_GAP_SIZES, value => ({
|
|
552
|
+
height: value,
|
|
553
|
+
paddingHorizontal: Math.round(value * 0.5),
|
|
554
|
+
gap: Math.max(4, Math.round(value * 0.25))
|
|
555
|
+
}));
|
|
556
|
+
|
|
484
557
|
/* -------------------------------------------------------------------------- */
|
|
485
|
-
/* Variant COLOR builders — the color twin of the size builders above.
|
|
486
|
-
/*
|
|
487
|
-
/*
|
|
488
|
-
/* inline. Re-tune a ramp token in `variant-colors.ts` and every consumer moves */
|
|
489
|
-
/* together (the same contract `controlMetrics` gives the size builders). */
|
|
558
|
+
/* Variant COLOR builders — the color twin of the size builders above. Static */
|
|
559
|
+
/* exact-key maps generated from `variant-colors.ts`, so a component puts one */
|
|
560
|
+
/* in its `variant` variant instead of re-declaring the palette ladder inline. */
|
|
490
561
|
/* -------------------------------------------------------------------------- */
|
|
491
562
|
|
|
492
563
|
/**
|
|
493
|
-
* Keep only `keys` from a variant
|
|
494
|
-
*
|
|
495
|
-
*
|
|
564
|
+
* Keep only `keys` from a variant map — lets a component expose a SUBSET of the
|
|
565
|
+
* canonical vocabulary (e.g. Badge wants `dot` but not `subtle`) while still
|
|
566
|
+
* sourcing every value from the shared ladder. Module-scope use only (it
|
|
567
|
+
* allocates). Unknown keys are ignored.
|
|
496
568
|
*/
|
|
497
569
|
const pickVariants = (map, keys) => {
|
|
498
570
|
const out = {};
|
|
@@ -501,87 +573,47 @@ const pickVariants = (map, keys) => {
|
|
|
501
573
|
};
|
|
502
574
|
|
|
503
575
|
/**
|
|
504
|
-
* INTERACTIVE control fill — background + border
|
|
505
|
-
*
|
|
576
|
+
* INTERACTIVE control fill — background (+ border) with hover/press clauses per
|
|
577
|
+
* variant (`filled → { backgroundColor: "color9 hover:color10 press:color8" }`).
|
|
578
|
+
* The frame ladder for `Button` and `ActionIcon`. Use as (or spread into, at
|
|
579
|
+
* module scope) `variants.variant`. `gradient` has no hover/press colour: its
|
|
580
|
+
* runtime gradient would hide it; the press-dip still gives tactile feedback.
|
|
506
581
|
*/
|
|
507
582
|
exports.pickVariants = pickVariants;
|
|
508
|
-
const controlColorVariant = exports.controlColorVariant =
|
|
509
|
-
filled: {
|
|
510
|
-
..._variantColors.VARIANT_FILL.filled,
|
|
511
|
-
..._variantColors.VARIANT_INTERACTION.filled
|
|
512
|
-
},
|
|
513
|
-
light: {
|
|
514
|
-
..._variantColors.VARIANT_FILL.light,
|
|
515
|
-
..._variantColors.VARIANT_INTERACTION.light
|
|
516
|
-
},
|
|
517
|
-
outline: {
|
|
518
|
-
..._variantColors.VARIANT_FILL.outline,
|
|
519
|
-
..._variantColors.VARIANT_INTERACTION.outline
|
|
520
|
-
},
|
|
521
|
-
subtle: {
|
|
522
|
-
..._variantColors.VARIANT_FILL.subtle,
|
|
523
|
-
..._variantColors.VARIANT_INTERACTION.subtle
|
|
524
|
-
},
|
|
525
|
-
default: {
|
|
526
|
-
..._variantColors.VARIANT_FILL.default,
|
|
527
|
-
..._variantColors.VARIANT_INTERACTION.default
|
|
528
|
-
},
|
|
529
|
-
white: {
|
|
530
|
-
..._variantColors.VARIANT_FILL.white,
|
|
531
|
-
..._variantColors.VARIANT_INTERACTION.white
|
|
532
|
-
},
|
|
533
|
-
transparent: {
|
|
534
|
-
..._variantColors.VARIANT_FILL.transparent,
|
|
535
|
-
..._variantColors.VARIANT_INTERACTION.transparent
|
|
536
|
-
},
|
|
537
|
-
// No hover/press color: the runtime gradient sits in `backgroundImage` (web) or
|
|
538
|
-
// an SVG layer (native), so a hover/press `backgroundColor` would be invisible
|
|
539
|
-
// beneath it. The shared press-dip (`pressScaleStyle`) still gives tactile feedback.
|
|
540
|
-
gradient: {
|
|
541
|
-
..._variantColors.VARIANT_FILL.gradient
|
|
542
|
-
}
|
|
543
|
-
};
|
|
583
|
+
const controlColorVariant = exports.controlColorVariant = _variantColors.VARIANT_CONTROL;
|
|
544
584
|
|
|
545
585
|
/**
|
|
546
|
-
* STATIC surface fill — background + border only, no
|
|
547
|
-
* ladder for non-interactive surfaces (`Badge`, `Alert`). Includes the
|
|
548
|
-
* `dot
|
|
586
|
+
* STATIC surface fill — background + border only, no interaction clauses. The
|
|
587
|
+
* frame ladder for non-interactive surfaces (`Badge`, `Alert`). Includes the
|
|
588
|
+
* pill-only `dot`; `pickVariants` to expose just the subset a component supports.
|
|
549
589
|
*/
|
|
550
|
-
const surfaceColorVariant = exports.surfaceColorVariant =
|
|
551
|
-
..._variantColors.VARIANT_FILL
|
|
552
|
-
};
|
|
590
|
+
const surfaceColorVariant = exports.surfaceColorVariant = _variantColors.VARIANT_FILL;
|
|
553
591
|
|
|
554
592
|
/**
|
|
555
593
|
* EMPHASIS text color per variant — labels, titles, glyphs sitting on the fill.
|
|
556
594
|
* The text ladder for `Button`/`ActionIcon` labels, `Badge` text, `Alert.Title`.
|
|
557
595
|
*/
|
|
558
|
-
const controlTextColorVariant = exports.controlTextColorVariant =
|
|
559
|
-
..._variantColors.VARIANT_FOREGROUND_EMPHASIS
|
|
560
|
-
};
|
|
596
|
+
const controlTextColorVariant = exports.controlTextColorVariant = _variantColors.VARIANT_FOREGROUND_EMPHASIS;
|
|
561
597
|
|
|
562
598
|
/**
|
|
563
599
|
* MUTED text color per variant — softer body copy (e.g. `Alert.Message`). Only
|
|
564
|
-
* `filled` inverts to sit on the strong fill; the rest resolve to
|
|
600
|
+
* `filled` inverts to sit on the strong fill; the rest resolve to `color12`.
|
|
565
601
|
*/
|
|
566
|
-
const mutedTextColorVariant = exports.mutedTextColorVariant =
|
|
567
|
-
..._variantColors.VARIANT_FOREGROUND_MUTED
|
|
568
|
-
};
|
|
602
|
+
const mutedTextColorVariant = exports.mutedTextColorVariant = _variantColors.VARIANT_FOREGROUND_MUTED;
|
|
569
603
|
|
|
570
|
-
/** The canonical variant keys,
|
|
604
|
+
/** The canonical variant keys, as a Set for cheap membership checks. */
|
|
571
605
|
const VARIANT_KEY_SET = new Set(["filled", "light", "outline", "subtle", "default", "white", "transparent", "dot", "gradient"]);
|
|
572
606
|
|
|
573
607
|
/** True when `value` is one of the canonical variant keys. */
|
|
574
608
|
const isVariantKey = value => VARIANT_KEY_SET.has(value);
|
|
575
609
|
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
* Used by `Loader` (frame) and `Progress` (track).
|
|
582
|
-
*/
|
|
610
|
+
/* -------------------------------------------------------------------------- */
|
|
611
|
+
/* Thickness / extent ladders */
|
|
612
|
+
/* -------------------------------------------------------------------------- */
|
|
613
|
+
|
|
614
|
+
/** Height-only sizes from the canonical control heights. */
|
|
583
615
|
exports.isVariantKey = isVariantKey;
|
|
584
|
-
const
|
|
616
|
+
const HEIGHT_SIZES = {
|
|
585
617
|
xxs: {
|
|
586
618
|
height: _controlMetrics.controlMetrics.xxs.height
|
|
587
619
|
},
|
|
@@ -602,58 +634,31 @@ const heightVariant = exports.heightVariant = {
|
|
|
602
634
|
},
|
|
603
635
|
xxl: {
|
|
604
636
|
height: _controlMetrics.controlMetrics.xxl.height
|
|
605
|
-
}
|
|
606
|
-
":number": val => ({
|
|
607
|
-
height: val
|
|
608
|
-
})
|
|
637
|
+
}
|
|
609
638
|
};
|
|
610
639
|
|
|
640
|
+
/**
|
|
641
|
+
* Thickness/height-only `size` prop — a size key onto `height` (from the `size`
|
|
642
|
+
* scale), or a number straight through. Used by `Loader` (frame).
|
|
643
|
+
*/
|
|
644
|
+
const heightVariant = exports.heightVariant = tableVariant(HEIGHT_SIZES, value => ({
|
|
645
|
+
height: value
|
|
646
|
+
}));
|
|
647
|
+
|
|
611
648
|
/**
|
|
612
649
|
* The input root frame's per-size HEIGHT (a `md` field is 40px, matching a `md`
|
|
613
|
-
* Button), with
|
|
614
|
-
* `heightVariant` but with the extra `:string` pass-through. It lives HERE — not in
|
|
650
|
+
* Button), with a number / CSS value escape hatch. It lives HERE — not in
|
|
615
651
|
* `Input/shared.tsx` — so the styled input frame's `size` variant doesn't create a
|
|
616
|
-
* circular TYPE reference back through its own props
|
|
617
|
-
* frame-props → frame). Derived from the canonical control heights.
|
|
652
|
+
* circular TYPE reference back through its own props.
|
|
618
653
|
*/
|
|
619
|
-
const fieldHeightVariant = exports.fieldHeightVariant =
|
|
620
|
-
xxs: {
|
|
621
|
-
height: _controlMetrics.controlMetrics.xxs.height
|
|
622
|
-
},
|
|
623
|
-
xs: {
|
|
624
|
-
height: _controlMetrics.controlMetrics.xs.height
|
|
625
|
-
},
|
|
626
|
-
sm: {
|
|
627
|
-
height: _controlMetrics.controlMetrics.sm.height
|
|
628
|
-
},
|
|
629
|
-
md: {
|
|
630
|
-
height: _controlMetrics.controlMetrics.md.height
|
|
631
|
-
},
|
|
632
|
-
lg: {
|
|
633
|
-
height: _controlMetrics.controlMetrics.lg.height
|
|
634
|
-
},
|
|
635
|
-
xl: {
|
|
636
|
-
height: _controlMetrics.controlMetrics.xl.height
|
|
637
|
-
},
|
|
638
|
-
xxl: {
|
|
639
|
-
height: _controlMetrics.controlMetrics.xxl.height
|
|
640
|
-
},
|
|
641
|
-
":string": val => ({
|
|
642
|
-
height: val
|
|
643
|
-
}),
|
|
644
|
-
":number": val => ({
|
|
645
|
-
height: val
|
|
646
|
-
})
|
|
647
|
-
};
|
|
654
|
+
const fieldHeightVariant = exports.fieldHeightVariant = tableVariant(HEIGHT_SIZES, heightOf);
|
|
648
655
|
|
|
649
656
|
/**
|
|
650
|
-
* Track-thickness
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
* variant (reviewed as a set, `:number` escape hatch preserved) instead of an
|
|
654
|
-
* inline magic-number map. Used by `Progress`.
|
|
657
|
+
* Track-thickness ladder for thin horizontal bars (Progress) — far thinner than a
|
|
658
|
+
* control height, so its own small px ladder. Read as data by `Progress` for the
|
|
659
|
+
* vertical orientation.
|
|
655
660
|
*/
|
|
656
|
-
const
|
|
661
|
+
const PROGRESS_THICKNESS = exports.PROGRESS_THICKNESS = {
|
|
657
662
|
xxs: {
|
|
658
663
|
height: 2
|
|
659
664
|
},
|
|
@@ -674,17 +679,14 @@ const progressThicknessVariant = exports.progressThicknessVariant = {
|
|
|
674
679
|
},
|
|
675
680
|
xxl: {
|
|
676
681
|
height: 20
|
|
677
|
-
}
|
|
678
|
-
":number": val => ({
|
|
679
|
-
height: val
|
|
680
|
-
})
|
|
682
|
+
}
|
|
681
683
|
};
|
|
684
|
+
const progressThicknessVariant = exports.progressThicknessVariant = tableVariant(PROGRESS_THICKNESS, value => ({
|
|
685
|
+
height: value
|
|
686
|
+
}));
|
|
682
687
|
|
|
683
|
-
/**
|
|
684
|
-
|
|
685
|
-
* draggable track. Maps a size key onto the track `height`. Used by `Slider`.
|
|
686
|
-
*/
|
|
687
|
-
const sliderTrackVariant = exports.sliderTrackVariant = {
|
|
688
|
+
/** Slider track-thickness ladder — tuned for a draggable track. Used by `Slider`. */
|
|
689
|
+
const SLIDER_TRACK_SIZES = exports.SLIDER_TRACK_SIZES = {
|
|
688
690
|
xxs: {
|
|
689
691
|
height: 3
|
|
690
692
|
},
|
|
@@ -705,17 +707,14 @@ const sliderTrackVariant = exports.sliderTrackVariant = {
|
|
|
705
707
|
},
|
|
706
708
|
xxl: {
|
|
707
709
|
height: 12
|
|
708
|
-
}
|
|
709
|
-
":number": val => ({
|
|
710
|
-
height: val
|
|
711
|
-
})
|
|
710
|
+
}
|
|
712
711
|
};
|
|
712
|
+
const sliderTrackVariant = exports.sliderTrackVariant = tableVariant(SLIDER_TRACK_SIZES, value => ({
|
|
713
|
+
height: value
|
|
714
|
+
}));
|
|
713
715
|
|
|
714
|
-
/**
|
|
715
|
-
|
|
716
|
-
* proportionally above the track of the same key. Used by `Slider`.
|
|
717
|
-
*/
|
|
718
|
-
const sliderThumbVariant = exports.sliderThumbVariant = {
|
|
716
|
+
/** Slider thumb ladder — square handle tuned above the same-key track. Used by `Slider`. */
|
|
717
|
+
const SLIDER_THUMB_SIZES = exports.SLIDER_THUMB_SIZES = {
|
|
719
718
|
xxs: {
|
|
720
719
|
width: 12,
|
|
721
720
|
height: 12
|
|
@@ -743,20 +742,18 @@ const sliderThumbVariant = exports.sliderThumbVariant = {
|
|
|
743
742
|
xxl: {
|
|
744
743
|
width: 32,
|
|
745
744
|
height: 32
|
|
746
|
-
}
|
|
747
|
-
":number": val => ({
|
|
748
|
-
width: val,
|
|
749
|
-
height: val
|
|
750
|
-
})
|
|
745
|
+
}
|
|
751
746
|
};
|
|
747
|
+
const sliderThumbVariant = exports.sliderThumbVariant = tableVariant(SLIDER_THUMB_SIZES, value => ({
|
|
748
|
+
width: value,
|
|
749
|
+
height: value
|
|
750
|
+
}));
|
|
752
751
|
|
|
753
752
|
/**
|
|
754
|
-
* Fixed content-WIDTH ladder for panels (Dialog, Drawer width axis)
|
|
755
|
-
*
|
|
756
|
-
* passes an arbitrary px/CSS width through. Distinct from `maxWidthVariant`, which
|
|
757
|
-
* sets a max-width cap rather than a fixed width.
|
|
753
|
+
* Fixed content-WIDTH ladder for panels (Dialog, Drawer width axis), so a `md` of
|
|
754
|
+
* any panel is the same width. Read as data by `Drawer`.
|
|
758
755
|
*/
|
|
759
|
-
const
|
|
756
|
+
const PANEL_WIDTH = exports.PANEL_WIDTH = {
|
|
760
757
|
xxs: {
|
|
761
758
|
width: 160
|
|
762
759
|
},
|
|
@@ -777,15 +774,12 @@ const panelWidthVariant = exports.panelWidthVariant = {
|
|
|
777
774
|
},
|
|
778
775
|
xxl: {
|
|
779
776
|
width: 560
|
|
780
|
-
}
|
|
781
|
-
":number": val => ({
|
|
782
|
-
width: val
|
|
783
|
-
}),
|
|
784
|
-
":string": val => ({
|
|
785
|
-
width: val
|
|
786
|
-
})
|
|
777
|
+
}
|
|
787
778
|
};
|
|
788
779
|
|
|
780
|
+
/** {@link PANEL_WIDTH} as a variant; a number / CSS value passes through as `width`. */
|
|
781
|
+
const panelWidthVariant = exports.panelWidthVariant = tableVariant(PANEL_WIDTH, widthOf);
|
|
782
|
+
|
|
789
783
|
/**
|
|
790
784
|
* Cursor is a web affordance in this kit. Passing it as a Tamagui style prop on
|
|
791
785
|
* native can leak to React Native's host node as a top-level prop and trigger
|
|
@@ -873,35 +867,64 @@ const webButtonTextReset = () => WEB_BUTTON_TEXT_RESET;
|
|
|
873
867
|
* styleable wrapper that maps `direction` → `flexDirection` instead (see `Flex`).
|
|
874
868
|
*/
|
|
875
869
|
|
|
870
|
+
/* -------------------------------------------------------------------------- */
|
|
871
|
+
/* Transitions (v3 `transition` prop values) */
|
|
872
|
+
/* -------------------------------------------------------------------------- */
|
|
873
|
+
|
|
876
874
|
/**
|
|
877
|
-
*
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
|
|
875
|
+
* The named presets registered in `@knitui/core`'s animation drivers — the keys
|
|
876
|
+
* of the one `MOTION_PRESETS` table both drivers are built from (`fast`,
|
|
877
|
+
* `medium`, `slow`, `bouncy`, `pulse`, `spin`, `stripe`, and the easing-curve
|
|
878
|
+
* keys `linear` / `ease` / `ease-in` / `ease-out` / `ease-in-out`). v2's
|
|
879
|
+
* `"100ms"` key is gone: a duration is plain CSS in v3.
|
|
880
|
+
*/
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* The object form of a v3 transition — the subset of Tamagui's `TransitionConfig`
|
|
884
|
+
* the kit authors. `properties` scopes the transition (v2's `animateOnly`, as a
|
|
885
|
+
* CSS `transition-property` list: `"transform, opacity"`).
|
|
886
|
+
*/
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* A kit transition value: a preset name, an object, or `null` (keep the
|
|
890
|
+
* `transition` key present but animate nothing — Tamagui's rule for animated
|
|
891
|
+
* views, so hook order never changes).
|
|
883
892
|
*/
|
|
884
893
|
exports.webButtonTextReset = webButtonTextReset;
|
|
894
|
+
/** `["transform", "opacity"]` / `"transform, opacity"` → `"transform, opacity"`. */
|
|
895
|
+
const toTransitionProperties = properties => typeof properties === "string" ? properties : properties.join(", ");
|
|
896
|
+
|
|
885
897
|
/**
|
|
886
|
-
*
|
|
887
|
-
*
|
|
888
|
-
*
|
|
889
|
-
*
|
|
890
|
-
* picks the *shape*. An arbitrary `cubic-bezier(...)` can't be a static config
|
|
891
|
-
* key, so it approximates to `bouncy` (its overshoot curve) — the one lossy case
|
|
892
|
-
* on web; `CollapseBox.native` parses the bezier exactly off the shared
|
|
893
|
-
* `CSS_EASING_BEZIER` table (`@knitui/core`).
|
|
894
|
-
* Unknown values fall back to `ease`, the library-wide default.
|
|
895
|
-
*
|
|
896
|
-
* This is the single source of truth — `CollapseBox` (web), `RollingNumber`, and
|
|
897
|
-
* the native `Transition` all import it instead of re-deriving the mapping.
|
|
898
|
+
* Scope a transition to `properties` (the v3 home of v2's `animateOnly`): a preset
|
|
899
|
+
* name becomes `{ preset, properties }`, an object gains `properties`, `null` stays
|
|
900
|
+
* `null`. Without it a plain `transition="fast"` animates EVERY changing property,
|
|
901
|
+
* which slides floating elements across the screen on each re-measure.
|
|
898
902
|
*/
|
|
903
|
+
exports.toTransitionProperties = toTransitionProperties;
|
|
904
|
+
const withTransitionProperties = (value, properties) => {
|
|
905
|
+
if (value == null || properties === undefined) return value;
|
|
906
|
+
const list = toTransitionProperties(properties);
|
|
907
|
+
return typeof value === "string" ? {
|
|
908
|
+
preset: value,
|
|
909
|
+
properties: list
|
|
910
|
+
} : {
|
|
911
|
+
...value,
|
|
912
|
+
properties: list
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* Map a CSS `transition-timing-function` onto the registered easing preset that
|
|
918
|
+
* reproduces it (`"ease-out"` → `"ease-out"`; unknown → `"ease"`; a
|
|
919
|
+
* `cubic-bezier(…)` → `"ease"`). v3 accepts any CSS easing in the object form,
|
|
920
|
+
* so prefer {@link timedTransition}, which keeps the curve EXACT; this stays for
|
|
921
|
+
* callers that need a preset NAME.
|
|
922
|
+
*/
|
|
923
|
+
exports.withTransitionProperties = withTransitionProperties;
|
|
899
924
|
const resolveTransition = (timingFunction = "ease") => {
|
|
900
925
|
switch (timingFunction.trim().toLowerCase()) {
|
|
901
926
|
case "linear":
|
|
902
927
|
return "linear";
|
|
903
|
-
case "ease":
|
|
904
|
-
return "ease";
|
|
905
928
|
case "ease-in":
|
|
906
929
|
return "ease-in";
|
|
907
930
|
case "ease-out":
|
|
@@ -909,150 +932,198 @@ const resolveTransition = (timingFunction = "ease") => {
|
|
|
909
932
|
case "ease-in-out":
|
|
910
933
|
return "ease-in-out";
|
|
911
934
|
default:
|
|
912
|
-
return
|
|
935
|
+
return "ease";
|
|
913
936
|
}
|
|
914
937
|
};
|
|
915
938
|
|
|
916
939
|
/**
|
|
917
|
-
*
|
|
918
|
-
*
|
|
919
|
-
* `
|
|
920
|
-
*
|
|
921
|
-
* idiom the size/height-clip components all repeat.
|
|
940
|
+
* A timed (non-spring) transition: exact `duration` (ms) and exact CSS easing
|
|
941
|
+
* curve, as the v3 object form `{ duration, easing }` — both drivers take any CSS
|
|
942
|
+
* timing function (`cubic-bezier(…)` included), so nothing approximates any more.
|
|
943
|
+
* Pass `properties` to scope it.
|
|
922
944
|
*/
|
|
923
945
|
exports.resolveTransition = resolveTransition;
|
|
924
|
-
const timedTransition = (duration, timingFunction = "ease") =>
|
|
925
|
-
duration
|
|
926
|
-
|
|
946
|
+
const timedTransition = (duration, timingFunction = "ease", properties) => properties === undefined ? {
|
|
947
|
+
duration,
|
|
948
|
+
easing: timingFunction
|
|
949
|
+
} : {
|
|
950
|
+
duration,
|
|
951
|
+
easing: timingFunction,
|
|
952
|
+
properties: toTransitionProperties(properties)
|
|
953
|
+
};
|
|
927
954
|
|
|
928
955
|
/**
|
|
929
956
|
* Build a precisely-typed `{ transition }` object to spread onto a styled
|
|
930
|
-
* component
|
|
931
|
-
*
|
|
957
|
+
* component (or a `styled()` base), optionally scoped to `properties`. Keep the
|
|
958
|
+
* prop present and pass `null` when disabled (Tamagui's animated-view rule).
|
|
959
|
+
*
|
|
960
|
+
* ```ts
|
|
961
|
+
* styled(Box, { ...transitionProps("fast", ["backgroundColor"]) })
|
|
962
|
+
* ```
|
|
932
963
|
*/
|
|
933
964
|
exports.timedTransition = timedTransition;
|
|
934
|
-
const transitionProps = transition => ({
|
|
935
|
-
transition
|
|
965
|
+
const transitionProps = (transition, properties) => ({
|
|
966
|
+
transition: withTransitionProperties(transition, properties)
|
|
936
967
|
});
|
|
968
|
+
exports.transitionProps = transitionProps;
|
|
969
|
+
const scopedCache = new WeakMap();
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* Scope an existing `{ transition }` result (e.g. from `useReducedTransition`) to
|
|
973
|
+
* `properties` — the v3 replacement for the v2 pair
|
|
974
|
+
* `{...fade} {...animateOnlyProps(["opacity"])}` → `{...scopeTransition(fade, ["opacity"])}`.
|
|
975
|
+
* Cached per (result object, property list), so a memoised `fade` yields the same
|
|
976
|
+
* object every render.
|
|
977
|
+
*/
|
|
978
|
+
const scopeTransition = (result, properties) => {
|
|
979
|
+
const list = toTransitionProperties(properties);
|
|
980
|
+
let byList = scopedCache.get(result);
|
|
981
|
+
if (!byList) scopedCache.set(result, byList = new Map());
|
|
982
|
+
let hit = byList.get(list);
|
|
983
|
+
if (!hit) byList.set(list, hit = {
|
|
984
|
+
transition: withTransitionProperties(result.transition, list)
|
|
985
|
+
});
|
|
986
|
+
return hit;
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
/** The base duration (ms) of a timed preset, or `undefined` for a spring. */
|
|
990
|
+
exports.scopeTransition = scopeTransition;
|
|
991
|
+
const presetDurationMs = name => {
|
|
992
|
+
const preset = _core.MOTION_PRESETS[name];
|
|
993
|
+
return typeof preset.duration === "number" ? preset.duration : undefined;
|
|
994
|
+
};
|
|
995
|
+
|
|
996
|
+
/* -------------------------------------------------------------------------- */
|
|
997
|
+
/* Press feedback */
|
|
998
|
+
/* -------------------------------------------------------------------------- */
|
|
937
999
|
|
|
938
1000
|
/**
|
|
939
1001
|
* Fraction an interactive control scales DOWN to while pressed — the tactile
|
|
940
1002
|
* "dip" shared by `Button`, `ActionIcon`, `Chip`, … `0.97` is a 3% shrink: clearly
|
|
941
|
-
* felt without looking broken on the smallest controls.
|
|
942
|
-
* once for the whole kit.
|
|
1003
|
+
* felt without looking broken on the smallest controls.
|
|
943
1004
|
*/
|
|
944
|
-
exports.
|
|
1005
|
+
exports.presetDurationMs = presetDurationMs;
|
|
945
1006
|
const PRESS_SCALE = exports.PRESS_SCALE = 0.97;
|
|
946
1007
|
|
|
947
1008
|
/**
|
|
948
|
-
* Tactile "shrink on press" feedback. Spread onto a pressable
|
|
949
|
-
* (`...pressScaleStyle`)
|
|
950
|
-
*
|
|
951
|
-
*
|
|
952
|
-
*
|
|
953
|
-
*
|
|
954
|
-
* native, using the kit's own animation/press internals end to end.
|
|
1009
|
+
* Tactile "shrink on press" feedback as a v3 flat clause. Spread onto a pressable
|
|
1010
|
+
* frame's BASE style (`...pressScaleStyle`). v3 merges clause slots per (property,
|
|
1011
|
+
* condition) across tiers, so this base `scale: "press:0.97"` composes with a
|
|
1012
|
+
* variant's `bg: "… press:color8"` (different properties) — on press the control
|
|
1013
|
+
* both darkens (variant) and dips (this). Pair the frame with `usePressScale()` at
|
|
1014
|
+
* render so the dip EASES (and collapses under reduced motion).
|
|
955
1015
|
*/
|
|
956
1016
|
const pressScaleStyle = exports.pressScaleStyle = {
|
|
957
|
-
|
|
958
|
-
scale: PRESS_SCALE
|
|
959
|
-
}
|
|
1017
|
+
scale: `press:${PRESS_SCALE}`
|
|
960
1018
|
};
|
|
961
1019
|
|
|
962
|
-
/**
|
|
963
|
-
* Build a precisely-typed `{ animateOnly }` object to spread onto a styled
|
|
964
|
-
* component. `animateOnly` scopes the CSS animation driver's `transition` to ONLY
|
|
965
|
-
* the listed properties (see `@tamagui/animations-css`); without it a plain
|
|
966
|
-
* `transition="fast"` expands to `transition: all …`, which animates `top`/`left`
|
|
967
|
-
* too. Floating elements (Tooltip/Popover) position via `top`/`left` from
|
|
968
|
-
* floating-ui and must NOT transition those — otherwise the element visibly slides
|
|
969
|
-
* across the screen on every re-measure. Restricting to `["transform", "opacity"]`
|
|
970
|
-
* keeps the enter/exit fade + scale/slide while positioning stays instant. Like
|
|
971
|
-
* `transitionProps`, this dodges the excess-property check WITHOUT widening to `any`.
|
|
972
|
-
*/
|
|
973
|
-
const animateOnlyProps = properties => ({
|
|
974
|
-
animateOnly: properties
|
|
975
|
-
});
|
|
1020
|
+
/** Hover handlers as spread by {@link hoverProps}: web keys OR native keys. */
|
|
976
1021
|
|
|
977
1022
|
/**
|
|
978
|
-
*
|
|
979
|
-
*
|
|
980
|
-
*
|
|
981
|
-
*
|
|
982
|
-
*
|
|
983
|
-
* `
|
|
1023
|
+
* Pointer-hover handlers for a Tamagui frame, per platform. Spread the result:
|
|
1024
|
+
* `<Frame {...hoverProps({ onHoverIn, onHoverOut })} />`. The platform event is
|
|
1025
|
+
* forwarded to the handler (typed `unknown` unless `E` is given).
|
|
1026
|
+
*
|
|
1027
|
+
* v3 (3.0.18) only attaches its web mouse listeners when the element has
|
|
1028
|
+
* `onMouseEnter`/`onMouseLeave` (or a `hover:` style): `onHoverIn`/`onHoverOut`
|
|
1029
|
+
* ALONE are never wired on web (`createComponent` → `attachHover`), so a frame that
|
|
1030
|
+
* only declared them silently ignored the pointer. Web therefore gets the mouse
|
|
1031
|
+
* handlers; native keeps Tamagui's `onHoverIn`/`onHoverOut` (pointer devices on
|
|
1032
|
+
* iPad / Android). Absent handlers stay absent (no `undefined` keys).
|
|
984
1033
|
*/
|
|
985
|
-
|
|
986
|
-
const
|
|
1034
|
+
function hoverProps(handlers) {
|
|
1035
|
+
const {
|
|
1036
|
+
onHoverIn,
|
|
1037
|
+
onHoverOut
|
|
1038
|
+
} = handlers;
|
|
1039
|
+
const out = {};
|
|
1040
|
+
if (_core.isWeb) {
|
|
1041
|
+
if (onHoverIn) out.onMouseEnter = onHoverIn;
|
|
1042
|
+
if (onHoverOut) out.onMouseLeave = onHoverOut;
|
|
1043
|
+
} else {
|
|
1044
|
+
if (onHoverIn) out.onHoverIn = onHoverIn;
|
|
1045
|
+
if (onHoverOut) out.onHoverOut = onHoverOut;
|
|
1046
|
+
}
|
|
1047
|
+
return out;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/* -------------------------------------------------------------------------- */
|
|
1051
|
+
/* Shadows */
|
|
1052
|
+
/* -------------------------------------------------------------------------- */
|
|
987
1053
|
|
|
988
1054
|
/**
|
|
989
1055
|
* Mantine-style `shadow` scale (xxs→xxl). Elevation rises with the key; colour
|
|
990
|
-
* comes from the
|
|
1056
|
+
* comes from the `dropShadowColor` theme key so it adapts to light/dark.
|
|
991
1057
|
*
|
|
992
1058
|
* Expressed as the cross-platform `boxShadow` style prop (`"{x}px {y}px {blur}px
|
|
993
|
-
* {spread}px {color}"`) rather than legacy RN `shadow*` props: `
|
|
994
|
-
*
|
|
995
|
-
*
|
|
996
|
-
*
|
|
997
|
-
*
|
|
998
|
-
*
|
|
1059
|
+
* {spread}px {color}"`) rather than legacy RN `shadow*` props: `boxShadow` works
|
|
1060
|
+
* on web + iOS + Android 9+ (RN New Arch). v3 resolves the bare theme name
|
|
1061
|
+
* embedded in the shadow recipe on every platform (`getSplitStyles`
|
|
1062
|
+
* `configuredValue` → `grammar.embeddedTokens`, where a recipe word that is not a
|
|
1063
|
+
* token is resolved as a COLOR against the active theme): web emits
|
|
1064
|
+
* `var(--dropShadowColor)`, native the theme's raw rgba. So these stay static
|
|
1065
|
+
* strings — no runtime theme read. Verified by `shadow.test.tsx`.
|
|
999
1066
|
*
|
|
1000
|
-
* The
|
|
1001
|
-
*
|
|
1002
|
-
*
|
|
1067
|
+
* The key is deliberately NOT named `shadowColor`: that collides with React
|
|
1068
|
+
* Native's reserved legacy `shadowColor` style prop, which makes the native
|
|
1069
|
+
* pipeline drop the token's alpha on iOS (shadows render washed-out).
|
|
1003
1070
|
*/
|
|
1004
|
-
exports.hoverProps = hoverProps;
|
|
1005
1071
|
const shadowVariant = exports.shadowVariant = {
|
|
1006
1072
|
xxs: {
|
|
1007
|
-
boxShadow: "0px 1px 1px 0px
|
|
1073
|
+
boxShadow: "0px 1px 1px 0px dropShadowColor"
|
|
1008
1074
|
},
|
|
1009
1075
|
xs: {
|
|
1010
|
-
boxShadow: "0px 1px 3px 0px
|
|
1076
|
+
boxShadow: "0px 1px 3px 0px dropShadowColor"
|
|
1011
1077
|
},
|
|
1012
1078
|
sm: {
|
|
1013
|
-
boxShadow: "0px 3px 6px 0px
|
|
1079
|
+
boxShadow: "0px 3px 6px 0px dropShadowColor"
|
|
1014
1080
|
},
|
|
1015
1081
|
md: {
|
|
1016
|
-
boxShadow: "0px 5px 12px 0px
|
|
1082
|
+
boxShadow: "0px 5px 12px 0px dropShadowColor"
|
|
1017
1083
|
},
|
|
1018
1084
|
lg: {
|
|
1019
|
-
boxShadow: "0px 8px 20px 0px
|
|
1085
|
+
boxShadow: "0px 8px 20px 0px dropShadowColor"
|
|
1020
1086
|
},
|
|
1021
1087
|
xl: {
|
|
1022
|
-
boxShadow: "0px 12px 28px 0px
|
|
1088
|
+
boxShadow: "0px 12px 28px 0px dropShadowColor"
|
|
1023
1089
|
},
|
|
1024
1090
|
xxl: {
|
|
1025
|
-
boxShadow: "0px 16px 40px 0px
|
|
1091
|
+
boxShadow: "0px 16px 40px 0px dropShadowColor"
|
|
1026
1092
|
}
|
|
1027
1093
|
};
|
|
1028
1094
|
|
|
1095
|
+
/** The shadow scale's keys (`shadow` prop values). */
|
|
1096
|
+
|
|
1097
|
+
/* -------------------------------------------------------------------------- */
|
|
1098
|
+
/* Typography */
|
|
1099
|
+
/* -------------------------------------------------------------------------- */
|
|
1100
|
+
|
|
1029
1101
|
/**
|
|
1030
1102
|
* Mantine-style `size` prop for text: a size key (`"md"`) maps to the matching
|
|
1031
|
-
* font-size token
|
|
1032
|
-
*
|
|
1033
|
-
* font config's per-fontSize line-height mapping.
|
|
1103
|
+
* font-size token. Line height is intentionally left unset so it derives from
|
|
1104
|
+
* the font config's per-fontSize line-height mapping. Static exact-key map.
|
|
1034
1105
|
*/
|
|
1035
1106
|
const fontSizeVariant = exports.fontSizeVariant = {
|
|
1036
1107
|
xxs: {
|
|
1037
|
-
fontSize: "
|
|
1108
|
+
fontSize: "xxs"
|
|
1038
1109
|
},
|
|
1039
1110
|
xs: {
|
|
1040
|
-
fontSize: "
|
|
1111
|
+
fontSize: "xs"
|
|
1041
1112
|
},
|
|
1042
1113
|
sm: {
|
|
1043
|
-
fontSize: "
|
|
1114
|
+
fontSize: "sm"
|
|
1044
1115
|
},
|
|
1045
1116
|
md: {
|
|
1046
|
-
fontSize: "
|
|
1117
|
+
fontSize: "md"
|
|
1047
1118
|
},
|
|
1048
1119
|
lg: {
|
|
1049
|
-
fontSize: "
|
|
1120
|
+
fontSize: "lg"
|
|
1050
1121
|
},
|
|
1051
1122
|
xl: {
|
|
1052
|
-
fontSize: "
|
|
1123
|
+
fontSize: "xl"
|
|
1053
1124
|
},
|
|
1054
1125
|
xxl: {
|
|
1055
|
-
fontSize: "
|
|
1126
|
+
fontSize: "xxl"
|
|
1056
1127
|
}
|
|
1057
1128
|
};
|
|
1058
1129
|
|
|
@@ -1110,58 +1181,33 @@ const kbdSizeVariant = exports.kbdSizeVariant = {
|
|
|
1110
1181
|
}
|
|
1111
1182
|
};
|
|
1112
1183
|
|
|
1184
|
+
/** The plain `fontSize` fallthrough body: a raw px / font token / CSS value. */
|
|
1185
|
+
const fontSizeOf = value => ({
|
|
1186
|
+
fontSize: value
|
|
1187
|
+
});
|
|
1188
|
+
|
|
1113
1189
|
/**
|
|
1114
|
-
*
|
|
1115
|
-
*
|
|
1116
|
-
*
|
|
1117
|
-
*
|
|
1118
|
-
* ```ts
|
|
1119
|
-
* size: { xs: { fontSize: "$xs" }, …, ...fontSizePassthroughVariant }
|
|
1120
|
-
* ```
|
|
1190
|
+
* {@link fontSizeVariant} plus the escape hatch: a number / font token / CSS value
|
|
1191
|
+
* flows straight to `fontSize`. To add keys (Title's `h1`…), build a new one:
|
|
1192
|
+
* `tableVariant({ ...fontSizeVariant, h1: { fontSize: "xxl" } }, fontSizeOf)`.
|
|
1121
1193
|
*/
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
":string": val => ({
|
|
1125
|
-
fontSize: val
|
|
1126
|
-
}),
|
|
1127
|
-
":number": val => ({
|
|
1128
|
-
fontSize: val
|
|
1129
|
-
})
|
|
1130
|
-
};
|
|
1194
|
+
exports.fontSizeOf = fontSizeOf;
|
|
1195
|
+
const fontSizePassthroughVariant = exports.fontSizePassthroughVariant = tableVariant(fontSizeVariant, fontSizeOf);
|
|
1131
1196
|
|
|
1132
1197
|
/** Open-ended `fontWeight` prop (`"700"`, `600`, `"bold"`, …). */
|
|
1133
|
-
const fontWeightVariant = exports.fontWeightVariant =
|
|
1134
|
-
":string": val => ({
|
|
1135
|
-
fontWeight: val
|
|
1136
|
-
}),
|
|
1137
|
-
":number": val => ({
|
|
1138
|
-
fontWeight: val
|
|
1139
|
-
})
|
|
1140
|
-
};
|
|
1198
|
+
const fontWeightVariant = exports.fontWeightVariant = passthroughVariant("fontWeight");
|
|
1141
1199
|
|
|
1142
1200
|
/** Open-ended `textAlign` prop (`"left"`, `"center"`, `"justify"`, …). */
|
|
1143
|
-
const textAlignVariant = exports.textAlignVariant =
|
|
1144
|
-
":string": val => ({
|
|
1145
|
-
textAlign: val
|
|
1146
|
-
})
|
|
1147
|
-
};
|
|
1201
|
+
const textAlignVariant = exports.textAlignVariant = passthroughVariant("textAlign");
|
|
1148
1202
|
|
|
1149
1203
|
/** Open-ended `textTransform` prop (`"uppercase"`, `"capitalize"`, …). */
|
|
1150
|
-
const textTransformVariant = exports.textTransformVariant =
|
|
1151
|
-
":string": val => ({
|
|
1152
|
-
textTransform: val
|
|
1153
|
-
})
|
|
1154
|
-
};
|
|
1204
|
+
const textTransformVariant = exports.textTransformVariant = passthroughVariant("textTransform");
|
|
1155
1205
|
|
|
1156
1206
|
/**
|
|
1157
1207
|
* CSS `text-wrap` values (`"balance"`, `"pretty"`, …) — web-only and not modeled
|
|
1158
|
-
* by Tamagui's style props
|
|
1208
|
+
* by Tamagui's style props.
|
|
1159
1209
|
*/
|
|
1160
1210
|
|
|
1161
1211
|
/** Mantine-style `textWrap` prop. Web-only; a no-op on native. Used by `Title`. */
|
|
1162
|
-
const textWrapVariant = exports.textWrapVariant =
|
|
1163
|
-
":string": val => ({
|
|
1164
|
-
textWrap: val
|
|
1165
|
-
})
|
|
1166
|
-
};
|
|
1212
|
+
const textWrapVariant = exports.textWrapVariant = passthroughVariant("textWrap");
|
|
1167
1213
|
//# sourceMappingURL=style-props.js.map
|