@knitui/components 0.14.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/commonjs/Accordion/Accordion.js +78 -96
- package/lib/commonjs/Accordion/Accordion.js.map +1 -1
- package/lib/commonjs/ActionIcon/ActionIcon.js +128 -62
- package/lib/commonjs/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/commonjs/Affix/Affix.js +17 -21
- package/lib/commonjs/Affix/Affix.js.map +1 -1
- package/lib/commonjs/Alert/Alert.js +54 -54
- package/lib/commonjs/Alert/Alert.js.map +1 -1
- package/lib/commonjs/Anchor/Anchor.js +12 -15
- package/lib/commonjs/Anchor/Anchor.js.map +1 -1
- package/lib/commonjs/AngleSlider/AngleSlider.js +65 -37
- package/lib/commonjs/AngleSlider/AngleSlider.js.map +1 -1
- package/lib/commonjs/AspectRatio/AspectRatio.js +12 -15
- package/lib/commonjs/AspectRatio/AspectRatio.js.map +1 -1
- package/lib/commonjs/Autocomplete/Autocomplete.js +7 -3
- package/lib/commonjs/Autocomplete/Autocomplete.js.map +1 -1
- package/lib/commonjs/Avatar/Avatar.js +28 -25
- package/lib/commonjs/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/BackgroundImage/BackgroundImage.js +15 -6
- package/lib/commonjs/BackgroundImage/BackgroundImage.js.map +1 -1
- package/lib/commonjs/Badge/Badge.js +60 -49
- package/lib/commonjs/Badge/Badge.js.map +1 -1
- package/lib/commonjs/Blockquote/Blockquote.js +80 -79
- package/lib/commonjs/Blockquote/Blockquote.js.map +1 -1
- package/lib/commonjs/Box/Box.js +2 -2
- package/lib/commonjs/Box/Box.js.map +1 -1
- package/lib/commonjs/Breadcrumbs/Breadcrumbs.js +9 -9
- package/lib/commonjs/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/commonjs/Burger/Burger.js +31 -20
- package/lib/commonjs/Burger/Burger.js.map +1 -1
- package/lib/commonjs/Button/Button.js +105 -63
- package/lib/commonjs/Button/Button.js.map +1 -1
- package/lib/commonjs/Card/Card.js +49 -37
- package/lib/commonjs/Card/Card.js.map +1 -1
- package/lib/commonjs/Center/Center.js +2 -2
- package/lib/commonjs/Center/Center.js.map +1 -1
- package/lib/commonjs/Checkbox/CheckIcon.js +5 -4
- package/lib/commonjs/Checkbox/CheckIcon.js.map +1 -1
- package/lib/commonjs/Checkbox/Checkbox.js +98 -68
- package/lib/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/Chip/Chip.js +34 -67
- package/lib/commonjs/Chip/Chip.js.map +1 -1
- package/lib/commonjs/CloseButton/CloseButton.js +12 -5
- package/lib/commonjs/CloseButton/CloseButton.js.map +1 -1
- package/lib/commonjs/Code/Code.js +14 -10
- package/lib/commonjs/Code/Code.js.map +1 -1
- package/lib/commonjs/Collapse/Collapse.js +10 -4
- package/lib/commonjs/Collapse/Collapse.js.map +1 -1
- package/lib/commonjs/ColorInput/ColorInput.js +25 -20
- package/lib/commonjs/ColorInput/ColorInput.js.map +1 -1
- package/lib/commonjs/ColorPicker/ColorPicker.js +95 -83
- package/lib/commonjs/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/commonjs/ColorSwatch/ColorSwatch.js +12 -14
- package/lib/commonjs/ColorSwatch/ColorSwatch.js.map +1 -1
- package/lib/commonjs/Combobox/Combobox.js +194 -187
- package/lib/commonjs/Combobox/Combobox.js.map +1 -1
- package/lib/commonjs/Combobox/OptionsDropdown.js +12 -6
- package/lib/commonjs/Combobox/OptionsDropdown.js.map +1 -1
- package/lib/commonjs/Combobox/index.js +6 -0
- package/lib/commonjs/Combobox/index.js.map +1 -1
- package/lib/commonjs/Container/Container.js +12 -19
- package/lib/commonjs/Container/Container.js.map +1 -1
- package/lib/commonjs/Dialog/Dialog.js +15 -14
- package/lib/commonjs/Dialog/Dialog.js.map +1 -1
- package/lib/commonjs/Drawer/Drawer.js +51 -32
- package/lib/commonjs/Drawer/Drawer.js.map +1 -1
- package/lib/commonjs/Fieldset/Fieldset.js +26 -18
- package/lib/commonjs/Fieldset/Fieldset.js.map +1 -1
- package/lib/commonjs/FileButton/FileButton.js +5 -3
- package/lib/commonjs/FileButton/FileButton.js.map +1 -1
- package/lib/commonjs/Flex/Flex.js +24 -27
- package/lib/commonjs/Flex/Flex.js.map +1 -1
- package/lib/commonjs/FocusTrap/FocusTrap.js +4 -3
- package/lib/commonjs/FocusTrap/FocusTrap.js.map +1 -1
- package/lib/commonjs/Grid/Grid.js +21 -18
- package/lib/commonjs/Grid/Grid.js.map +1 -1
- package/lib/commonjs/Group/Group.js +3 -3
- package/lib/commonjs/Group/Group.js.map +1 -1
- package/lib/commonjs/Highlight/Highlight.js +2 -1
- package/lib/commonjs/Highlight/Highlight.js.map +1 -1
- package/lib/commonjs/HoverCard/HoverCard.js +6 -23
- package/lib/commonjs/HoverCard/HoverCard.js.map +1 -1
- package/lib/commonjs/Image/Image.native.js +1 -1
- package/lib/commonjs/Image/createImage.js +88 -56
- package/lib/commonjs/Image/createImage.js.map +1 -1
- package/lib/commonjs/Indicator/Indicator.js +36 -29
- package/lib/commonjs/Indicator/Indicator.js.map +1 -1
- package/lib/commonjs/Input/Input.js +87 -119
- package/lib/commonjs/Input/Input.js.map +1 -1
- package/lib/commonjs/Input/Input.native.js +54 -35
- package/lib/commonjs/Input/Input.native.js.map +1 -1
- package/lib/commonjs/Input/shared.js +148 -225
- package/lib/commonjs/Input/shared.js.map +1 -1
- package/lib/commonjs/InputBase/InputBase.js +2 -1
- package/lib/commonjs/InputBase/InputBase.js.map +1 -1
- package/lib/commonjs/Kbd/Kbd.js +12 -18
- package/lib/commonjs/Kbd/Kbd.js.map +1 -1
- package/lib/commonjs/KeyboardAvoidingView/KeyboardAvoidingView.native.js +2 -2
- package/lib/commonjs/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -1
- package/lib/commonjs/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js +1 -1
- package/lib/commonjs/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js.map +1 -1
- package/lib/commonjs/List/List.js +10 -10
- package/lib/commonjs/List/List.js.map +1 -1
- package/lib/commonjs/Loader/Loader.js +31 -37
- package/lib/commonjs/Loader/Loader.js.map +1 -1
- package/lib/commonjs/LoadingOverlay/LoadingOverlay.js +2 -1
- package/lib/commonjs/LoadingOverlay/LoadingOverlay.js.map +1 -1
- package/lib/commonjs/Mark/Mark.js +12 -15
- package/lib/commonjs/Mark/Mark.js.map +1 -1
- package/lib/commonjs/Marquee/Marquee.js +66 -48
- package/lib/commonjs/Marquee/Marquee.js.map +1 -1
- package/lib/commonjs/MaskInput/MaskInput.js +2 -1
- package/lib/commonjs/MaskInput/MaskInput.js.map +1 -1
- package/lib/commonjs/Menu/Menu.js +84 -48
- package/lib/commonjs/Menu/Menu.js.map +1 -1
- package/lib/commonjs/Modal/Modal.js +34 -30
- package/lib/commonjs/Modal/Modal.js.map +1 -1
- package/lib/commonjs/Modal/drag/DragDismissHost.js +4 -1
- package/lib/commonjs/Modal/drag/DragDismissHost.js.map +1 -1
- package/lib/commonjs/Modal/drag/DragDismissHost.web.js +10 -6
- package/lib/commonjs/Modal/drag/DragDismissHost.web.js.map +1 -1
- package/lib/commonjs/Modal/drag/DragDismissOverlay.js +4 -1
- package/lib/commonjs/Modal/drag/DragDismissOverlay.js.map +1 -1
- package/lib/commonjs/Modal/drag/DragDismissOverlay.web.js +6 -8
- package/lib/commonjs/Modal/drag/DragDismissOverlay.web.js.map +1 -1
- package/lib/commonjs/Modal/drag/index.js.map +1 -1
- package/lib/commonjs/Modal/drag/useDragDismiss.js +83 -67
- package/lib/commonjs/Modal/drag/useDragDismiss.js.map +1 -1
- package/lib/commonjs/Modal/modal-base-inner.js +1 -1
- package/lib/commonjs/Modal/modal-base-inner.js.map +1 -1
- package/lib/commonjs/Modal/modal-base-inner.native.js +3 -2
- package/lib/commonjs/Modal/modal-base-inner.native.js.map +1 -1
- package/lib/commonjs/Modal/modal-base.js +24 -11
- package/lib/commonjs/Modal/modal-base.js.map +1 -1
- package/lib/commonjs/MultiSelect/MultiSelect.js +6 -2
- package/lib/commonjs/MultiSelect/MultiSelect.js.map +1 -1
- package/lib/commonjs/NativeSelect/NativeSelect.js +25 -30
- package/lib/commonjs/NativeSelect/NativeSelect.js.map +1 -1
- package/lib/commonjs/NavLink/NavLink.js +63 -58
- package/lib/commonjs/NavLink/NavLink.js.map +1 -1
- package/lib/commonjs/Notification/Notification.js +28 -28
- package/lib/commonjs/Notification/Notification.js.map +1 -1
- package/lib/commonjs/NumberFormatter/NumberFormatter.js +2 -2
- package/lib/commonjs/NumberFormatter/NumberFormatter.js.map +1 -1
- package/lib/commonjs/NumberInput/NumberInput.js +46 -43
- package/lib/commonjs/NumberInput/NumberInput.js.map +1 -1
- package/lib/commonjs/Overlay/Overlay.js +18 -11
- package/lib/commonjs/Overlay/Overlay.js.map +1 -1
- package/lib/commonjs/Pagination/Pagination.js +125 -120
- package/lib/commonjs/Pagination/Pagination.js.map +1 -1
- package/lib/commonjs/Paper/Paper.js +7 -8
- package/lib/commonjs/Paper/Paper.js.map +1 -1
- package/lib/commonjs/Paragraph/Paragraph.js +7 -10
- package/lib/commonjs/Paragraph/Paragraph.js.map +1 -1
- package/lib/commonjs/PasswordInput/PasswordInput.js +3 -3
- package/lib/commonjs/PasswordInput/PasswordInput.js.map +1 -1
- package/lib/commonjs/Pill/Pill.js +40 -34
- package/lib/commonjs/Pill/Pill.js.map +1 -1
- package/lib/commonjs/PillsInput/PillsInput.js +58 -31
- package/lib/commonjs/PillsInput/PillsInput.js.map +1 -1
- package/lib/commonjs/PinInput/PinInput.js +26 -20
- package/lib/commonjs/PinInput/PinInput.js.map +1 -1
- package/lib/commonjs/Popover/Popover.native.js +6 -2
- package/lib/commonjs/Popover/Popover.native.js.map +1 -1
- package/lib/commonjs/Popover/Popover.shared.js +34 -23
- package/lib/commonjs/Popover/Popover.shared.js.map +1 -1
- package/lib/commonjs/Portal/OverlayHost.js.map +1 -1
- package/lib/commonjs/Portal/OverlayPortal.js +33 -0
- package/lib/commonjs/Portal/OverlayPortal.js.map +1 -0
- package/lib/commonjs/Portal/index.js +7 -0
- package/lib/commonjs/Portal/index.js.map +1 -1
- package/lib/commonjs/Progress/Progress.js +37 -26
- package/lib/commonjs/Progress/Progress.js.map +1 -1
- package/lib/commonjs/Radio/Radio.js +81 -93
- package/lib/commonjs/Radio/Radio.js.map +1 -1
- package/lib/commonjs/Radio/RadioIcon.js +4 -6
- package/lib/commonjs/Radio/RadioIcon.js.map +1 -1
- package/lib/commonjs/Rating/Rating.js +48 -38
- package/lib/commonjs/Rating/Rating.js.map +1 -1
- package/lib/commonjs/RollingNumber/RollingNumber.js +48 -24
- package/lib/commonjs/RollingNumber/RollingNumber.js.map +1 -1
- package/lib/commonjs/ScrollArea/ScrollArea.js +40 -37
- package/lib/commonjs/ScrollArea/ScrollArea.js.map +1 -1
- package/lib/commonjs/ScrollArea/ScrollArea.native.js +46 -41
- package/lib/commonjs/ScrollArea/ScrollArea.native.js.map +1 -1
- package/lib/commonjs/SegmentedControl/SegmentedControl.js +106 -55
- package/lib/commonjs/SegmentedControl/SegmentedControl.js.map +1 -1
- package/lib/commonjs/Select/Select.js +7 -3
- package/lib/commonjs/Select/Select.js.map +1 -1
- package/lib/commonjs/Separator/Separator.js +47 -39
- package/lib/commonjs/Separator/Separator.js.map +1 -1
- package/lib/commonjs/SimpleGrid/SimpleGrid.js +12 -14
- package/lib/commonjs/SimpleGrid/SimpleGrid.js.map +1 -1
- package/lib/commonjs/Skeleton/Skeleton.js +39 -24
- package/lib/commonjs/Skeleton/Skeleton.js.map +1 -1
- package/lib/commonjs/Slider/Slider.js +308 -257
- package/lib/commonjs/Slider/Slider.js.map +1 -1
- package/lib/commonjs/Spacer/Spacer.js +15 -29
- package/lib/commonjs/Spacer/Spacer.js.map +1 -1
- package/lib/commonjs/Spoiler/Spoiler.js +16 -16
- package/lib/commonjs/Spoiler/Spoiler.js.map +1 -1
- package/lib/commonjs/Stack/Stack.js +3 -3
- package/lib/commonjs/Stack/Stack.js.map +1 -1
- package/lib/commonjs/Stepper/Stepper.js +96 -71
- package/lib/commonjs/Stepper/Stepper.js.map +1 -1
- package/lib/commonjs/Switch/Switch.js +71 -67
- package/lib/commonjs/Switch/Switch.js.map +1 -1
- package/lib/commonjs/Table/Table.js +96 -82
- package/lib/commonjs/Table/Table.js.map +1 -1
- package/lib/commonjs/TableOfContents/TableOfContents.js +94 -95
- package/lib/commonjs/TableOfContents/TableOfContents.js.map +1 -1
- package/lib/commonjs/Tabs/Tabs.js +71 -73
- package/lib/commonjs/Tabs/Tabs.js.map +1 -1
- package/lib/commonjs/TagsInput/TagsInput.js +19 -3
- package/lib/commonjs/TagsInput/TagsInput.js.map +1 -1
- package/lib/commonjs/Text/Text.js +29 -14
- package/lib/commonjs/Text/Text.js.map +1 -1
- package/lib/commonjs/TextInput/TextInput.js +2 -1
- package/lib/commonjs/TextInput/TextInput.js.map +1 -1
- package/lib/commonjs/Textarea/Textarea.js +1 -1
- package/lib/commonjs/Textarea/Textarea.js.map +1 -1
- package/lib/commonjs/ThemeIcon/ThemeIcon.js +10 -6
- package/lib/commonjs/ThemeIcon/ThemeIcon.js.map +1 -1
- package/lib/commonjs/Title/Title.js +49 -32
- package/lib/commonjs/Title/Title.js.map +1 -1
- package/lib/commonjs/Tooltip/Tooltip.js +44 -28
- package/lib/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/lib/commonjs/Transition/Transition.native.js +11 -10
- package/lib/commonjs/Transition/Transition.native.js.map +1 -1
- package/lib/commonjs/Transition/use-overlay-transition.native.js +2 -5
- package/lib/commonjs/Transition/use-overlay-transition.native.js.map +1 -1
- package/lib/commonjs/Tree/Tree.js +30 -34
- package/lib/commonjs/Tree/Tree.js.map +1 -1
- package/lib/commonjs/TreeSelect/TreeSelect.js +50 -26
- package/lib/commonjs/TreeSelect/TreeSelect.js.map +1 -1
- package/lib/commonjs/Typography/Typography.js +5 -7
- package/lib/commonjs/Typography/Typography.js.map +1 -1
- package/lib/commonjs/UnstyledButton/UnstyledButton.js +4 -4
- package/lib/commonjs/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/commonjs/VirtualList/VirtualList.js +23 -7
- package/lib/commonjs/VirtualList/VirtualList.js.map +1 -1
- package/lib/commonjs/VisuallyHidden/VisuallyHidden.js +7 -10
- package/lib/commonjs/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/lib/commonjs/control-system.js +7 -0
- package/lib/commonjs/control-system.js.map +1 -1
- package/lib/commonjs/index.js +12 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/ControlIconProvider.js +1 -1
- package/lib/commonjs/internal/ControlIconProvider.js.map +1 -1
- package/lib/commonjs/internal/InlineControl.js +24 -29
- package/lib/commonjs/internal/InlineControl.js.map +1 -1
- package/lib/commonjs/internal/collapse-box.js +12 -10
- package/lib/commonjs/internal/collapse-box.js.map +1 -1
- package/lib/commonjs/internal/control-icon-size.js +5 -8
- package/lib/commonjs/internal/control-icon-size.js.map +1 -1
- package/lib/commonjs/internal/control-metrics.js +51 -51
- package/lib/commonjs/internal/control-metrics.js.map +1 -1
- package/lib/commonjs/internal/floating-arrow.js +43 -29
- package/lib/commonjs/internal/floating-arrow.js.map +1 -1
- package/lib/commonjs/internal/focus-ring.js +99 -0
- package/lib/commonjs/internal/focus-ring.js.map +1 -0
- package/lib/commonjs/internal/gradient-shared.js +18 -8
- package/lib/commonjs/internal/gradient-shared.js.map +1 -1
- package/lib/commonjs/internal/gradient.js +6 -0
- package/lib/commonjs/internal/gradient.js.map +1 -1
- package/lib/commonjs/internal/gradient.native.js +7 -1
- package/lib/commonjs/internal/gradient.native.js.map +1 -1
- package/lib/commonjs/internal/motion.js +247 -359
- package/lib/commonjs/internal/motion.js.map +1 -1
- package/lib/commonjs/internal/resolve-theme-color.js +10 -10
- package/lib/commonjs/internal/resolve-theme-color.js.map +1 -1
- package/lib/commonjs/internal/style-props.js +510 -464
- package/lib/commonjs/internal/style-props.js.map +1 -1
- package/lib/commonjs/internal/theme-color-web.js +44 -26
- package/lib/commonjs/internal/theme-color-web.js.map +1 -1
- package/lib/commonjs/internal/use-icon-color.js +1 -1
- package/lib/commonjs/internal/use-icon-color.native.js +1 -1
- package/lib/commonjs/internal/use-looping-animation.native.js +1 -1
- package/lib/commonjs/internal/use-looping-animation.native.js.map +1 -1
- package/lib/commonjs/internal/use-slot-text-wrapper.js +1 -1
- package/lib/commonjs/internal/variant-colors.js +163 -229
- package/lib/commonjs/internal/variant-colors.js.map +1 -1
- package/lib/module/Accordion/Accordion.js +80 -98
- package/lib/module/Accordion/Accordion.js.map +1 -1
- package/lib/module/ActionIcon/ActionIcon.js +130 -64
- package/lib/module/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/module/Affix/Affix.js +19 -23
- package/lib/module/Affix/Affix.js.map +1 -1
- package/lib/module/Alert/Alert.js +56 -56
- package/lib/module/Alert/Alert.js.map +1 -1
- package/lib/module/Anchor/Anchor.js +13 -16
- package/lib/module/Anchor/Anchor.js.map +1 -1
- package/lib/module/AngleSlider/AngleSlider.js +66 -38
- package/lib/module/AngleSlider/AngleSlider.js.map +1 -1
- package/lib/module/AspectRatio/AspectRatio.js +10 -14
- package/lib/module/AspectRatio/AspectRatio.js.map +1 -1
- package/lib/module/Autocomplete/Autocomplete.js +8 -4
- package/lib/module/Autocomplete/Autocomplete.js.map +1 -1
- package/lib/module/Avatar/Avatar.js +31 -28
- package/lib/module/Avatar/Avatar.js.map +1 -1
- package/lib/module/BackgroundImage/BackgroundImage.js +16 -7
- package/lib/module/BackgroundImage/BackgroundImage.js.map +1 -1
- package/lib/module/Badge/Badge.js +63 -52
- package/lib/module/Badge/Badge.js.map +1 -1
- package/lib/module/Blockquote/Blockquote.js +82 -81
- package/lib/module/Blockquote/Blockquote.js.map +1 -1
- package/lib/module/Box/Box.js +2 -2
- package/lib/module/Box/Box.js.map +1 -1
- package/lib/module/Breadcrumbs/Breadcrumbs.js +10 -10
- package/lib/module/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/module/Burger/Burger.js +32 -21
- package/lib/module/Burger/Burger.js.map +1 -1
- package/lib/module/Button/Button.js +107 -65
- package/lib/module/Button/Button.js.map +1 -1
- package/lib/module/Card/Card.js +51 -39
- package/lib/module/Card/Card.js.map +1 -1
- package/lib/module/Center/Center.js +3 -3
- package/lib/module/Center/Center.js.map +1 -1
- package/lib/module/Checkbox/CheckIcon.js +5 -4
- package/lib/module/Checkbox/CheckIcon.js.map +1 -1
- package/lib/module/Checkbox/Checkbox.js +100 -70
- package/lib/module/Checkbox/Checkbox.js.map +1 -1
- package/lib/module/Chip/Chip.js +35 -68
- package/lib/module/Chip/Chip.js.map +1 -1
- package/lib/module/CloseButton/CloseButton.js +14 -7
- package/lib/module/CloseButton/CloseButton.js.map +1 -1
- package/lib/module/Code/Code.js +15 -11
- package/lib/module/Code/Code.js.map +1 -1
- package/lib/module/Collapse/Collapse.js +11 -5
- package/lib/module/Collapse/Collapse.js.map +1 -1
- package/lib/module/ColorInput/ColorInput.js +26 -21
- package/lib/module/ColorInput/ColorInput.js.map +1 -1
- package/lib/module/ColorPicker/ColorPicker.js +96 -84
- package/lib/module/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/module/ColorSwatch/ColorSwatch.js +13 -15
- package/lib/module/ColorSwatch/ColorSwatch.js.map +1 -1
- package/lib/module/Combobox/Combobox.js +194 -188
- package/lib/module/Combobox/Combobox.js.map +1 -1
- package/lib/module/Combobox/OptionsDropdown.js +13 -7
- package/lib/module/Combobox/OptionsDropdown.js.map +1 -1
- package/lib/module/Combobox/index.js +1 -1
- package/lib/module/Combobox/index.js.map +1 -1
- package/lib/module/Container/Container.js +12 -19
- package/lib/module/Container/Container.js.map +1 -1
- package/lib/module/Dialog/Dialog.js +16 -15
- package/lib/module/Dialog/Dialog.js.map +1 -1
- package/lib/module/Drawer/Drawer.js +53 -34
- package/lib/module/Drawer/Drawer.js.map +1 -1
- package/lib/module/Fieldset/Fieldset.js +27 -19
- package/lib/module/Fieldset/Fieldset.js.map +1 -1
- package/lib/module/FileButton/FileButton.js +5 -3
- package/lib/module/FileButton/FileButton.js.map +1 -1
- package/lib/module/Flex/Flex.js +24 -28
- package/lib/module/Flex/Flex.js.map +1 -1
- package/lib/module/FocusTrap/FocusTrap.js +4 -3
- package/lib/module/FocusTrap/FocusTrap.js.map +1 -1
- package/lib/module/Grid/Grid.js +22 -19
- package/lib/module/Grid/Grid.js.map +1 -1
- package/lib/module/Group/Group.js +4 -4
- package/lib/module/Group/Group.js.map +1 -1
- package/lib/module/Highlight/Highlight.js +2 -1
- package/lib/module/Highlight/Highlight.js.map +1 -1
- package/lib/module/HoverCard/HoverCard.js +8 -25
- package/lib/module/HoverCard/HoverCard.js.map +1 -1
- package/lib/module/Image/Image.native.js +1 -1
- package/lib/module/Image/createImage.js +88 -56
- package/lib/module/Image/createImage.js.map +1 -1
- package/lib/module/Indicator/Indicator.js +37 -30
- package/lib/module/Indicator/Indicator.js.map +1 -1
- package/lib/module/Input/Input.js +89 -121
- package/lib/module/Input/Input.js.map +1 -1
- package/lib/module/Input/Input.native.js +56 -37
- package/lib/module/Input/Input.native.js.map +1 -1
- package/lib/module/Input/shared.js +148 -225
- package/lib/module/Input/shared.js.map +1 -1
- package/lib/module/InputBase/InputBase.js +2 -1
- package/lib/module/InputBase/InputBase.js.map +1 -1
- package/lib/module/Kbd/Kbd.js +12 -18
- package/lib/module/Kbd/Kbd.js.map +1 -1
- package/lib/module/KeyboardAvoidingView/KeyboardAvoidingView.native.js +2 -2
- package/lib/module/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -1
- package/lib/module/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js +1 -1
- package/lib/module/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js.map +1 -1
- package/lib/module/List/List.js +11 -11
- package/lib/module/List/List.js.map +1 -1
- package/lib/module/Loader/Loader.js +33 -39
- package/lib/module/Loader/Loader.js.map +1 -1
- package/lib/module/LoadingOverlay/LoadingOverlay.js +2 -1
- package/lib/module/LoadingOverlay/LoadingOverlay.js.map +1 -1
- package/lib/module/Mark/Mark.js +11 -15
- package/lib/module/Mark/Mark.js.map +1 -1
- package/lib/module/Marquee/Marquee.js +66 -48
- package/lib/module/Marquee/Marquee.js.map +1 -1
- package/lib/module/MaskInput/MaskInput.js +2 -1
- package/lib/module/MaskInput/MaskInput.js.map +1 -1
- package/lib/module/Menu/Menu.js +86 -50
- package/lib/module/Menu/Menu.js.map +1 -1
- package/lib/module/Modal/Modal.js +35 -31
- package/lib/module/Modal/Modal.js.map +1 -1
- package/lib/module/Modal/drag/DragDismissHost.js +4 -1
- package/lib/module/Modal/drag/DragDismissHost.js.map +1 -1
- package/lib/module/Modal/drag/DragDismissHost.web.js +10 -6
- package/lib/module/Modal/drag/DragDismissHost.web.js.map +1 -1
- package/lib/module/Modal/drag/DragDismissOverlay.js +4 -1
- package/lib/module/Modal/drag/DragDismissOverlay.js.map +1 -1
- package/lib/module/Modal/drag/DragDismissOverlay.web.js +6 -8
- package/lib/module/Modal/drag/DragDismissOverlay.web.js.map +1 -1
- package/lib/module/Modal/drag/index.js +1 -1
- package/lib/module/Modal/drag/index.js.map +1 -1
- package/lib/module/Modal/drag/useDragDismiss.js +84 -68
- package/lib/module/Modal/drag/useDragDismiss.js.map +1 -1
- package/lib/module/Modal/modal-base-inner.js +1 -1
- package/lib/module/Modal/modal-base-inner.js.map +1 -1
- package/lib/module/Modal/modal-base-inner.native.js +3 -2
- package/lib/module/Modal/modal-base-inner.native.js.map +1 -1
- package/lib/module/Modal/modal-base.js +25 -12
- package/lib/module/Modal/modal-base.js.map +1 -1
- package/lib/module/MultiSelect/MultiSelect.js +7 -3
- package/lib/module/MultiSelect/MultiSelect.js.map +1 -1
- package/lib/module/NativeSelect/NativeSelect.js +26 -31
- package/lib/module/NativeSelect/NativeSelect.js.map +1 -1
- package/lib/module/NavLink/NavLink.js +64 -59
- package/lib/module/NavLink/NavLink.js.map +1 -1
- package/lib/module/Notification/Notification.js +29 -29
- package/lib/module/Notification/Notification.js.map +1 -1
- package/lib/module/NumberFormatter/NumberFormatter.js +3 -3
- package/lib/module/NumberFormatter/NumberFormatter.js.map +1 -1
- package/lib/module/NumberInput/NumberInput.js +49 -46
- package/lib/module/NumberInput/NumberInput.js.map +1 -1
- package/lib/module/Overlay/Overlay.js +19 -12
- package/lib/module/Overlay/Overlay.js.map +1 -1
- package/lib/module/Pagination/Pagination.js +127 -122
- package/lib/module/Pagination/Pagination.js.map +1 -1
- package/lib/module/Paper/Paper.js +8 -9
- package/lib/module/Paper/Paper.js.map +1 -1
- package/lib/module/Paragraph/Paragraph.js +6 -10
- package/lib/module/Paragraph/Paragraph.js.map +1 -1
- package/lib/module/PasswordInput/PasswordInput.js +4 -4
- package/lib/module/PasswordInput/PasswordInput.js.map +1 -1
- package/lib/module/Pill/Pill.js +42 -36
- package/lib/module/Pill/Pill.js.map +1 -1
- package/lib/module/PillsInput/PillsInput.js +59 -32
- package/lib/module/PillsInput/PillsInput.js.map +1 -1
- package/lib/module/PinInput/PinInput.js +27 -21
- package/lib/module/PinInput/PinInput.js.map +1 -1
- package/lib/module/Popover/Popover.native.js +6 -2
- package/lib/module/Popover/Popover.native.js.map +1 -1
- package/lib/module/Popover/Popover.shared.js +36 -25
- package/lib/module/Popover/Popover.shared.js.map +1 -1
- package/lib/module/Portal/OverlayHost.js.map +1 -1
- package/lib/module/Portal/OverlayPortal.js +28 -0
- package/lib/module/Portal/OverlayPortal.js.map +1 -0
- package/lib/module/Portal/index.js +4 -0
- package/lib/module/Portal/index.js.map +1 -1
- package/lib/module/Progress/Progress.js +39 -28
- package/lib/module/Progress/Progress.js.map +1 -1
- package/lib/module/Radio/Radio.js +83 -95
- package/lib/module/Radio/Radio.js.map +1 -1
- package/lib/module/Radio/RadioIcon.js +4 -6
- package/lib/module/Radio/RadioIcon.js.map +1 -1
- package/lib/module/Rating/Rating.js +50 -40
- package/lib/module/Rating/Rating.js.map +1 -1
- package/lib/module/RollingNumber/RollingNumber.js +49 -25
- package/lib/module/RollingNumber/RollingNumber.js.map +1 -1
- package/lib/module/ScrollArea/ScrollArea.js +41 -38
- package/lib/module/ScrollArea/ScrollArea.js.map +1 -1
- package/lib/module/ScrollArea/ScrollArea.native.js +48 -43
- package/lib/module/ScrollArea/ScrollArea.native.js.map +1 -1
- package/lib/module/SegmentedControl/SegmentedControl.js +108 -57
- package/lib/module/SegmentedControl/SegmentedControl.js.map +1 -1
- package/lib/module/Select/Select.js +8 -4
- package/lib/module/Select/Select.js.map +1 -1
- package/lib/module/Separator/Separator.js +49 -41
- package/lib/module/Separator/Separator.js.map +1 -1
- package/lib/module/SimpleGrid/SimpleGrid.js +14 -16
- package/lib/module/SimpleGrid/SimpleGrid.js.map +1 -1
- package/lib/module/Skeleton/Skeleton.js +40 -25
- package/lib/module/Skeleton/Skeleton.js.map +1 -1
- package/lib/module/Slider/Slider.js +309 -258
- package/lib/module/Slider/Slider.js.map +1 -1
- package/lib/module/Spacer/Spacer.js +16 -29
- package/lib/module/Spacer/Spacer.js.map +1 -1
- package/lib/module/Spoiler/Spoiler.js +17 -17
- package/lib/module/Spoiler/Spoiler.js.map +1 -1
- package/lib/module/Stack/Stack.js +3 -3
- package/lib/module/Stack/Stack.js.map +1 -1
- package/lib/module/Stepper/Stepper.js +97 -72
- package/lib/module/Stepper/Stepper.js.map +1 -1
- package/lib/module/Switch/Switch.js +73 -69
- package/lib/module/Switch/Switch.js.map +1 -1
- package/lib/module/Table/Table.js +99 -85
- package/lib/module/Table/Table.js.map +1 -1
- package/lib/module/TableOfContents/TableOfContents.js +96 -97
- package/lib/module/TableOfContents/TableOfContents.js.map +1 -1
- package/lib/module/Tabs/Tabs.js +72 -74
- package/lib/module/Tabs/Tabs.js.map +1 -1
- package/lib/module/TagsInput/TagsInput.js +21 -5
- package/lib/module/TagsInput/TagsInput.js.map +1 -1
- package/lib/module/Text/Text.js +29 -14
- package/lib/module/Text/Text.js.map +1 -1
- package/lib/module/TextInput/TextInput.js +2 -1
- package/lib/module/TextInput/TextInput.js.map +1 -1
- package/lib/module/Textarea/Textarea.js +2 -2
- package/lib/module/Textarea/Textarea.js.map +1 -1
- package/lib/module/ThemeIcon/ThemeIcon.js +12 -8
- package/lib/module/ThemeIcon/ThemeIcon.js.map +1 -1
- package/lib/module/Title/Title.js +51 -34
- package/lib/module/Title/Title.js.map +1 -1
- package/lib/module/Tooltip/Tooltip.js +46 -30
- package/lib/module/Tooltip/Tooltip.js.map +1 -1
- package/lib/module/Transition/Transition.native.js +12 -11
- package/lib/module/Transition/Transition.native.js.map +1 -1
- package/lib/module/Transition/use-overlay-transition.native.js +3 -6
- package/lib/module/Transition/use-overlay-transition.native.js.map +1 -1
- package/lib/module/Tree/Tree.js +31 -35
- package/lib/module/Tree/Tree.js.map +1 -1
- package/lib/module/TreeSelect/TreeSelect.js +52 -28
- package/lib/module/TreeSelect/TreeSelect.js.map +1 -1
- package/lib/module/Typography/Typography.js +5 -7
- package/lib/module/Typography/Typography.js.map +1 -1
- package/lib/module/UnstyledButton/UnstyledButton.js +5 -5
- package/lib/module/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/module/VirtualList/VirtualList.js +23 -7
- package/lib/module/VirtualList/VirtualList.js.map +1 -1
- package/lib/module/VisuallyHidden/VisuallyHidden.js +6 -10
- package/lib/module/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/lib/module/control-system.js +5 -0
- package/lib/module/control-system.js.map +1 -1
- package/lib/module/index.js +9 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/ControlIconProvider.js +1 -1
- package/lib/module/internal/ControlIconProvider.js.map +1 -1
- package/lib/module/internal/InlineControl.js +25 -30
- package/lib/module/internal/InlineControl.js.map +1 -1
- package/lib/module/internal/collapse-box.js +13 -11
- package/lib/module/internal/collapse-box.js.map +1 -1
- package/lib/module/internal/control-icon-size.js +5 -8
- package/lib/module/internal/control-icon-size.js.map +1 -1
- package/lib/module/internal/control-metrics.js +52 -52
- package/lib/module/internal/control-metrics.js.map +1 -1
- package/lib/module/internal/floating-arrow.js +44 -30
- package/lib/module/internal/floating-arrow.js.map +1 -1
- package/lib/module/internal/focus-ring.js +95 -0
- package/lib/module/internal/focus-ring.js.map +1 -0
- package/lib/module/internal/gradient-shared.js +16 -7
- package/lib/module/internal/gradient-shared.js.map +1 -1
- package/lib/module/internal/gradient.js +2 -0
- package/lib/module/internal/gradient.js.map +1 -1
- package/lib/module/internal/gradient.native.js +3 -1
- package/lib/module/internal/gradient.native.js.map +1 -1
- package/lib/module/internal/motion.js +245 -359
- package/lib/module/internal/motion.js.map +1 -1
- package/lib/module/internal/resolve-theme-color.js +10 -10
- package/lib/module/internal/resolve-theme-color.js.map +1 -1
- package/lib/module/internal/style-props.js +471 -459
- package/lib/module/internal/style-props.js.map +1 -1
- package/lib/module/internal/theme-color-web.js +45 -27
- package/lib/module/internal/theme-color-web.js.map +1 -1
- package/lib/module/internal/use-icon-color.js +1 -1
- package/lib/module/internal/use-icon-color.native.js +1 -1
- package/lib/module/internal/use-looping-animation.native.js +1 -1
- package/lib/module/internal/use-looping-animation.native.js.map +1 -1
- package/lib/module/internal/use-slot-text-wrapper.js +1 -1
- package/lib/module/internal/variant-colors.js +150 -228
- package/lib/module/internal/variant-colors.js.map +1 -1
- package/lib/typescript/Accordion/Accordion.d.ts +120 -74
- package/lib/typescript/Accordion/Accordion.d.ts.map +1 -1
- package/lib/typescript/ActionIcon/ActionIcon.d.ts +236 -94
- package/lib/typescript/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/lib/typescript/Affix/Affix.d.ts +12 -7
- package/lib/typescript/Affix/Affix.d.ts.map +1 -1
- package/lib/typescript/Alert/Alert.d.ts +228 -68
- package/lib/typescript/Alert/Alert.d.ts.map +1 -1
- package/lib/typescript/Anchor/Anchor.d.ts +33 -24
- package/lib/typescript/Anchor/Anchor.d.ts.map +1 -1
- package/lib/typescript/AngleSlider/AngleSlider.d.ts +224 -66
- package/lib/typescript/AngleSlider/AngleSlider.d.ts.map +1 -1
- package/lib/typescript/AspectRatio/AspectRatio.d.ts +34 -14
- package/lib/typescript/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/lib/typescript/Autocomplete/Autocomplete.d.ts +30 -42
- package/lib/typescript/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/lib/typescript/Avatar/Avatar.d.ts +174 -198
- package/lib/typescript/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/BackgroundImage/BackgroundImage.d.ts +15 -10
- package/lib/typescript/BackgroundImage/BackgroundImage.d.ts.map +1 -1
- package/lib/typescript/Badge/Badge.d.ts +138 -62
- package/lib/typescript/Badge/Badge.d.ts.map +1 -1
- package/lib/typescript/Blockquote/Blockquote.d.ts +148 -50
- package/lib/typescript/Blockquote/Blockquote.d.ts.map +1 -1
- package/lib/typescript/Box/Box.d.ts +11 -3
- package/lib/typescript/Box/Box.d.ts.map +1 -1
- package/lib/typescript/Breadcrumbs/Breadcrumbs.d.ts +115 -35
- package/lib/typescript/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/typescript/Burger/Burger.d.ts +124 -41
- package/lib/typescript/Burger/Burger.d.ts.map +1 -1
- package/lib/typescript/Button/Button.d.ts +236 -107
- package/lib/typescript/Button/Button.d.ts.map +1 -1
- package/lib/typescript/Card/Card.d.ts +79 -47
- package/lib/typescript/Card/Card.d.ts.map +1 -1
- package/lib/typescript/Center/Center.d.ts +13 -9
- package/lib/typescript/Center/Center.d.ts.map +1 -1
- package/lib/typescript/Checkbox/CheckIcon.d.ts +7 -3
- package/lib/typescript/Checkbox/CheckIcon.d.ts.map +1 -1
- package/lib/typescript/Checkbox/Checkbox.d.ts +79 -60
- package/lib/typescript/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/Chip/Chip.d.ts +140 -57
- package/lib/typescript/Chip/Chip.d.ts.map +1 -1
- package/lib/typescript/CloseButton/CloseButton.d.ts +85 -50
- package/lib/typescript/CloseButton/CloseButton.d.ts.map +1 -1
- package/lib/typescript/Code/Code.d.ts +31 -23
- package/lib/typescript/Code/Code.d.ts.map +1 -1
- package/lib/typescript/Collapse/Collapse.d.ts +44 -20
- package/lib/typescript/Collapse/Collapse.d.ts.map +1 -1
- package/lib/typescript/ColorInput/ColorInput.d.ts +15 -5
- package/lib/typescript/ColorInput/ColorInput.d.ts.map +1 -1
- package/lib/typescript/ColorPicker/ColorPicker.d.ts +72 -16
- package/lib/typescript/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/lib/typescript/ColorSwatch/ColorSwatch.d.ts +59 -38
- package/lib/typescript/ColorSwatch/ColorSwatch.d.ts.map +1 -1
- package/lib/typescript/Combobox/Combobox.d.ts +183 -100
- package/lib/typescript/Combobox/Combobox.d.ts.map +1 -1
- package/lib/typescript/Combobox/OptionsDropdown.d.ts +6 -0
- package/lib/typescript/Combobox/OptionsDropdown.d.ts.map +1 -1
- package/lib/typescript/Combobox/index.d.ts +66 -86
- package/lib/typescript/Combobox/index.d.ts.map +1 -1
- package/lib/typescript/Container/Container.d.ts +3 -41
- package/lib/typescript/Container/Container.d.ts.map +1 -1
- package/lib/typescript/Dialog/Dialog.d.ts +79 -76
- package/lib/typescript/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/Drawer/Drawer.d.ts +115 -40
- package/lib/typescript/Drawer/Drawer.d.ts.map +1 -1
- package/lib/typescript/Fieldset/Fieldset.d.ts +91 -46
- package/lib/typescript/Fieldset/Fieldset.d.ts.map +1 -1
- package/lib/typescript/FileButton/FileButton.d.ts.map +1 -1
- package/lib/typescript/FileInput/FileInput.d.ts +1 -1
- package/lib/typescript/FileInput/FileInput.d.ts.map +1 -1
- package/lib/typescript/Flex/Flex.d.ts +28 -26
- package/lib/typescript/Flex/Flex.d.ts.map +1 -1
- package/lib/typescript/FocusTrap/FocusTrap.d.ts.map +1 -1
- package/lib/typescript/Grid/Grid.d.ts +56 -48
- package/lib/typescript/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/Group/Group.d.ts +21 -16
- package/lib/typescript/Group/Group.d.ts.map +1 -1
- package/lib/typescript/Highlight/Highlight.d.ts +1 -15
- package/lib/typescript/Highlight/Highlight.d.ts.map +1 -1
- package/lib/typescript/HoverCard/HoverCard.d.ts +9 -9
- package/lib/typescript/HoverCard/HoverCard.d.ts.map +1 -1
- package/lib/typescript/Image/Image.d.ts +53 -121
- package/lib/typescript/Image/Image.d.ts.map +1 -1
- package/lib/typescript/Image/Image.native.d.ts +54 -122
- package/lib/typescript/Image/Image.native.d.ts.map +1 -1
- package/lib/typescript/Image/createImage.d.ts +56 -364
- package/lib/typescript/Image/createImage.d.ts.map +1 -1
- package/lib/typescript/Image/types.d.ts +4 -1
- package/lib/typescript/Image/types.d.ts.map +1 -1
- package/lib/typescript/Indicator/Indicator.d.ts +122 -43
- package/lib/typescript/Indicator/Indicator.d.ts.map +1 -1
- package/lib/typescript/Input/Input.d.ts +131 -328
- package/lib/typescript/Input/Input.d.ts.map +1 -1
- package/lib/typescript/Input/Input.native.d.ts +150 -472
- package/lib/typescript/Input/Input.native.d.ts.map +1 -1
- package/lib/typescript/Input/shared.d.ts +290 -490
- package/lib/typescript/Input/shared.d.ts.map +1 -1
- package/lib/typescript/Input/types.d.ts +14 -1
- package/lib/typescript/Input/types.d.ts.map +1 -1
- package/lib/typescript/InputBase/InputBase.d.ts +1 -52
- package/lib/typescript/InputBase/InputBase.d.ts.map +1 -1
- package/lib/typescript/Kbd/Kbd.d.ts +21 -65
- package/lib/typescript/Kbd/Kbd.d.ts.map +1 -1
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.d.ts +2 -6
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts +7 -3
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts.map +1 -1
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +2 -6
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts.map +1 -1
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.native.d.ts +13 -15
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.native.d.ts.map +1 -1
- package/lib/typescript/List/List.d.ts +165 -63
- package/lib/typescript/List/List.d.ts.map +1 -1
- package/lib/typescript/Loader/Loader.d.ts +58 -28
- package/lib/typescript/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/LoadingOverlay/LoadingOverlay.d.ts +1 -9
- package/lib/typescript/LoadingOverlay/LoadingOverlay.d.ts.map +1 -1
- package/lib/typescript/Mark/Mark.d.ts +21 -65
- package/lib/typescript/Mark/Mark.d.ts.map +1 -1
- package/lib/typescript/Marquee/Marquee.d.ts +127 -44
- package/lib/typescript/Marquee/Marquee.d.ts.map +1 -1
- package/lib/typescript/MaskInput/MaskInput.d.ts +1 -51
- package/lib/typescript/MaskInput/MaskInput.d.ts.map +1 -1
- package/lib/typescript/Menu/Menu.d.ts +93 -105
- package/lib/typescript/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/Modal/Modal.d.ts +166 -91
- package/lib/typescript/Modal/Modal.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/DragDismissHost.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/DragDismissHost.web.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/DragDismissOverlay.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/DragDismissOverlay.web.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/index.d.ts +2 -2
- package/lib/typescript/Modal/drag/index.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/types.d.ts +14 -2
- package/lib/typescript/Modal/drag/types.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/useDragDismiss.d.ts +2 -2
- package/lib/typescript/Modal/drag/useDragDismiss.d.ts.map +1 -1
- package/lib/typescript/Modal/modal-base-inner.d.ts +6 -2
- package/lib/typescript/Modal/modal-base-inner.d.ts.map +1 -1
- package/lib/typescript/Modal/modal-base-inner.native.d.ts +7 -3
- package/lib/typescript/Modal/modal-base-inner.native.d.ts.map +1 -1
- package/lib/typescript/Modal/modal-base.d.ts +2 -2
- package/lib/typescript/Modal/modal-base.d.ts.map +1 -1
- package/lib/typescript/MultiSelect/MultiSelect.d.ts +30 -50
- package/lib/typescript/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/lib/typescript/NativeSelect/NativeSelect.d.ts.map +1 -1
- package/lib/typescript/NativeSelect/NativeSelect.native.d.ts +1 -1
- package/lib/typescript/NativeSelect/NativeSelect.native.d.ts.map +1 -1
- package/lib/typescript/NavLink/NavLink.d.ts +245 -72
- package/lib/typescript/NavLink/NavLink.d.ts.map +1 -1
- package/lib/typescript/Notification/Notification.d.ts +230 -69
- package/lib/typescript/Notification/Notification.d.ts.map +1 -1
- package/lib/typescript/NumberFormatter/NumberFormatter.d.ts +24 -19
- package/lib/typescript/NumberFormatter/NumberFormatter.d.ts.map +1 -1
- package/lib/typescript/NumberInput/NumberInput.d.ts +91 -150
- package/lib/typescript/NumberInput/NumberInput.d.ts.map +1 -1
- package/lib/typescript/Overlay/Overlay.d.ts +17 -12
- package/lib/typescript/Overlay/Overlay.d.ts.map +1 -1
- package/lib/typescript/Pagination/Pagination.d.ts +43 -65
- package/lib/typescript/Pagination/Pagination.d.ts.map +1 -1
- package/lib/typescript/Paper/Paper.d.ts +19 -7
- package/lib/typescript/Paper/Paper.d.ts.map +1 -1
- package/lib/typescript/Paragraph/Paragraph.d.ts +23 -19
- package/lib/typescript/Paragraph/Paragraph.d.ts.map +1 -1
- package/lib/typescript/PasswordInput/PasswordInput.d.ts +110 -207
- package/lib/typescript/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/lib/typescript/Pill/Pill.d.ts +133 -95
- package/lib/typescript/Pill/Pill.d.ts.map +1 -1
- package/lib/typescript/PillsInput/PillsInput.d.ts +2 -2
- package/lib/typescript/PillsInput/PillsInput.d.ts.map +1 -1
- package/lib/typescript/PinInput/PinInput.d.ts +148 -297
- package/lib/typescript/PinInput/PinInput.d.ts.map +1 -1
- package/lib/typescript/Popover/Popover.native.d.ts.map +1 -1
- package/lib/typescript/Popover/Popover.shared.d.ts +15 -11
- package/lib/typescript/Popover/Popover.shared.d.ts.map +1 -1
- package/lib/typescript/Portal/OverlayHost.d.ts +2 -2
- package/lib/typescript/Portal/OverlayHost.d.ts.map +1 -1
- package/lib/typescript/Portal/OverlayPortal.d.ts +19 -0
- package/lib/typescript/Portal/OverlayPortal.d.ts.map +1 -0
- package/lib/typescript/Portal/index.d.ts +4 -0
- package/lib/typescript/Portal/index.d.ts.map +1 -1
- package/lib/typescript/Progress/Progress.d.ts +114 -65
- package/lib/typescript/Progress/Progress.d.ts.map +1 -1
- package/lib/typescript/Radio/Radio.d.ts +69 -80
- package/lib/typescript/Radio/Radio.d.ts.map +1 -1
- package/lib/typescript/Radio/RadioIcon.d.ts +5 -0
- package/lib/typescript/Radio/RadioIcon.d.ts.map +1 -1
- package/lib/typescript/Rating/Rating.d.ts +94 -44
- package/lib/typescript/Rating/Rating.d.ts.map +1 -1
- package/lib/typescript/RollingNumber/RollingNumber.d.ts +112 -32
- package/lib/typescript/RollingNumber/RollingNumber.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.d.ts +50 -10
- package/lib/typescript/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.native.d.ts +40 -8
- package/lib/typescript/ScrollArea/ScrollArea.native.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.shared.d.ts +2 -2
- package/lib/typescript/SegmentedControl/SegmentedControl.d.ts +148 -56
- package/lib/typescript/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/lib/typescript/Select/Select.d.ts +31 -51
- package/lib/typescript/Select/Select.d.ts.map +1 -1
- package/lib/typescript/Separator/Separator.d.ts +124 -61
- package/lib/typescript/Separator/Separator.d.ts.map +1 -1
- package/lib/typescript/SimpleGrid/SimpleGrid.d.ts +15 -13
- package/lib/typescript/SimpleGrid/SimpleGrid.d.ts.map +1 -1
- package/lib/typescript/Skeleton/Skeleton.d.ts +18 -14
- package/lib/typescript/Skeleton/Skeleton.d.ts.map +1 -1
- package/lib/typescript/Slider/Slider.d.ts +425 -129
- package/lib/typescript/Slider/Slider.d.ts.map +1 -1
- package/lib/typescript/Spacer/Spacer.d.ts +10 -17
- package/lib/typescript/Spacer/Spacer.d.ts.map +1 -1
- package/lib/typescript/Spoiler/Spoiler.d.ts +88 -28
- package/lib/typescript/Spoiler/Spoiler.d.ts.map +1 -1
- package/lib/typescript/Stack/Stack.d.ts +17 -5
- package/lib/typescript/Stack/Stack.d.ts.map +1 -1
- package/lib/typescript/Stepper/Stepper.d.ts +433 -101
- package/lib/typescript/Stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/Switch/Switch.d.ts +157 -69
- package/lib/typescript/Switch/Switch.d.ts.map +1 -1
- package/lib/typescript/Table/Table.d.ts +151 -201
- package/lib/typescript/Table/Table.d.ts.map +1 -1
- package/lib/typescript/TableOfContents/TableOfContents.d.ts +116 -46
- package/lib/typescript/TableOfContents/TableOfContents.d.ts.map +1 -1
- package/lib/typescript/Tabs/Tabs.d.ts +138 -88
- package/lib/typescript/Tabs/Tabs.d.ts.map +1 -1
- package/lib/typescript/TagsInput/TagsInput.d.ts +30 -42
- package/lib/typescript/TagsInput/TagsInput.d.ts.map +1 -1
- package/lib/typescript/Text/Text.d.ts +22 -4
- package/lib/typescript/Text/Text.d.ts.map +1 -1
- package/lib/typescript/TextInput/TextInput.d.ts +1 -51
- package/lib/typescript/TextInput/TextInput.d.ts.map +1 -1
- package/lib/typescript/Textarea/Textarea.d.ts +1 -51
- package/lib/typescript/Textarea/Textarea.d.ts.map +1 -1
- package/lib/typescript/ThemeIcon/ThemeIcon.d.ts +52 -39
- package/lib/typescript/ThemeIcon/ThemeIcon.d.ts.map +1 -1
- package/lib/typescript/Title/Title.d.ts +40 -25
- package/lib/typescript/Title/Title.d.ts.map +1 -1
- package/lib/typescript/Tooltip/Tooltip.d.ts +97 -41
- package/lib/typescript/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/typescript/Transition/Transition.native.d.ts.map +1 -1
- package/lib/typescript/Transition/use-overlay-transition.d.ts +1 -2
- package/lib/typescript/Transition/use-overlay-transition.d.ts.map +1 -1
- package/lib/typescript/Transition/use-overlay-transition.native.d.ts +3 -4
- package/lib/typescript/Transition/use-overlay-transition.native.d.ts.map +1 -1
- package/lib/typescript/Tree/Tree.d.ts +180 -50
- package/lib/typescript/Tree/Tree.d.ts.map +1 -1
- package/lib/typescript/TreeSelect/TreeSelect.d.ts +141 -182
- package/lib/typescript/TreeSelect/TreeSelect.d.ts.map +1 -1
- package/lib/typescript/Typography/Typography.d.ts +13 -7
- package/lib/typescript/Typography/Typography.d.ts.map +1 -1
- package/lib/typescript/UnstyledButton/UnstyledButton.d.ts +27 -20
- package/lib/typescript/UnstyledButton/UnstyledButton.d.ts.map +1 -1
- package/lib/typescript/VirtualList/VirtualList.d.ts.map +1 -1
- package/lib/typescript/VirtualList/VirtualList.shared.d.ts +1 -1
- package/lib/typescript/VirtualList/VirtualList.shared.d.ts.map +1 -1
- package/lib/typescript/VisuallyHidden/VisuallyHidden.d.ts +23 -19
- package/lib/typescript/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/lib/typescript/control-system.d.ts +3 -0
- package/lib/typescript/control-system.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +3 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/internal/InlineControl.d.ts +80 -22
- package/lib/typescript/internal/InlineControl.d.ts.map +1 -1
- package/lib/typescript/internal/collapse-box.d.ts +3 -3
- package/lib/typescript/internal/collapse-box.d.ts.map +1 -1
- package/lib/typescript/internal/collapse-box.shared.d.ts +1 -1
- package/lib/typescript/internal/control-icon-size.d.ts +4 -3
- package/lib/typescript/internal/control-icon-size.d.ts.map +1 -1
- package/lib/typescript/internal/control-metrics.d.ts +50 -50
- package/lib/typescript/internal/floating-arrow.d.ts +6 -7
- package/lib/typescript/internal/floating-arrow.d.ts.map +1 -1
- package/lib/typescript/internal/focus-ring.d.ts +94 -0
- package/lib/typescript/internal/focus-ring.d.ts.map +1 -0
- package/lib/typescript/internal/gradient-shared.d.ts +9 -8
- package/lib/typescript/internal/gradient-shared.d.ts.map +1 -1
- package/lib/typescript/internal/gradient.d.ts +1 -0
- package/lib/typescript/internal/gradient.d.ts.map +1 -1
- package/lib/typescript/internal/gradient.native.d.ts +1 -0
- package/lib/typescript/internal/gradient.native.d.ts.map +1 -1
- package/lib/typescript/internal/motion.d.ts +77 -67
- package/lib/typescript/internal/motion.d.ts.map +1 -1
- package/lib/typescript/internal/resolve-theme-color.d.ts +9 -8
- package/lib/typescript/internal/resolve-theme-color.d.ts.map +1 -1
- package/lib/typescript/internal/style-props.d.ts +490 -664
- package/lib/typescript/internal/style-props.d.ts.map +1 -1
- package/lib/typescript/internal/theme-color-web.d.ts.map +1 -1
- package/lib/typescript/internal/use-icon-color.d.ts +1 -1
- package/lib/typescript/internal/use-icon-color.native.d.ts +1 -1
- package/lib/typescript/internal/use-looping-animation.d.ts +10 -2
- package/lib/typescript/internal/use-looping-animation.d.ts.map +1 -1
- package/lib/typescript/internal/use-looping-animation.native.d.ts +2 -2
- package/lib/typescript/internal/use-looping-animation.native.d.ts.map +1 -1
- package/lib/typescript/internal/variant-colors.d.ts +191 -199
- package/lib/typescript/internal/variant-colors.d.ts.map +1 -1
- package/package.json +14 -13
- package/src/Accordion/Accordion.tsx +55 -47
- package/src/ActionIcon/ActionIcon.tsx +116 -59
- package/src/Affix/Affix.tsx +16 -27
- package/src/Alert/Alert.tsx +57 -44
- package/src/Anchor/Anchor.tsx +13 -12
- package/src/AngleSlider/AngleSlider.tsx +87 -63
- package/src/AspectRatio/AspectRatio.tsx +9 -12
- package/src/Autocomplete/Autocomplete.tsx +7 -2
- package/src/Avatar/Avatar.tsx +44 -36
- package/src/BackgroundImage/BackgroundImage.tsx +9 -6
- package/src/Badge/Badge.tsx +55 -30
- package/src/Blockquote/Blockquote.tsx +55 -45
- package/src/Box/Box.tsx +2 -2
- package/src/Breadcrumbs/Breadcrumbs.tsx +13 -11
- package/src/Burger/Burger.tsx +33 -24
- package/src/Button/Button.tsx +106 -80
- package/src/Card/Card.tsx +52 -44
- package/src/Center/Center.tsx +3 -3
- package/src/Checkbox/CheckIcon.tsx +8 -5
- package/src/Checkbox/Checkbox.tsx +97 -62
- package/src/Chip/Chip.tsx +50 -45
- package/src/CloseButton/CloseButton.tsx +32 -13
- package/src/Code/Code.tsx +15 -11
- package/src/Collapse/Collapse.tsx +11 -6
- package/src/ColorInput/ColorInput.tsx +30 -24
- package/src/ColorPicker/ColorPicker.tsx +78 -79
- package/src/ColorSwatch/ColorSwatch.tsx +11 -14
- package/src/Combobox/Combobox.tsx +174 -153
- package/src/Combobox/OptionsDropdown.tsx +15 -2
- package/src/Combobox/index.ts +1 -0
- package/src/Container/Container.tsx +11 -15
- package/src/Dialog/Dialog.tsx +26 -16
- package/src/Drawer/Drawer.tsx +51 -33
- package/src/Fieldset/Fieldset.tsx +25 -17
- package/src/FileButton/FileButton.tsx +4 -1
- package/src/Flex/Flex.tsx +24 -21
- package/src/FocusTrap/FocusTrap.tsx +4 -3
- package/src/Grid/Grid.tsx +24 -27
- package/src/Group/Group.tsx +4 -4
- package/src/Highlight/Highlight.tsx +2 -2
- package/src/HoverCard/HoverCard.tsx +17 -32
- package/src/Image/Image.native.tsx +1 -1
- package/src/Image/createImage.tsx +96 -63
- package/src/Image/types.ts +5 -1
- package/src/Indicator/Indicator.tsx +41 -32
- package/src/Input/Input.native.tsx +536 -501
- package/src/Input/Input.tsx +110 -156
- package/src/Input/shared.tsx +198 -291
- package/src/Input/types.ts +15 -0
- package/src/InputBase/InputBase.tsx +3 -1
- package/src/Kbd/Kbd.tsx +13 -15
- package/src/KeyboardAvoidingView/KeyboardAvoidingView.native.tsx +2 -2
- package/src/KeyboardAwareScrollView/KeyboardAwareScrollView.native.tsx +34 -33
- package/src/List/List.tsx +17 -11
- package/src/Loader/Loader.tsx +33 -37
- package/src/LoadingOverlay/LoadingOverlay.tsx +3 -2
- package/src/Mark/Mark.tsx +12 -12
- package/src/Marquee/Marquee.tsx +58 -46
- package/src/MaskInput/MaskInput.tsx +2 -1
- package/src/Menu/Menu.tsx +110 -45
- package/src/Modal/Modal.tsx +38 -31
- package/src/Modal/drag/DragDismissHost.tsx +10 -5
- package/src/Modal/drag/DragDismissHost.web.tsx +2 -1
- package/src/Modal/drag/DragDismissOverlay.tsx +9 -5
- package/src/Modal/drag/DragDismissOverlay.web.tsx +6 -1
- package/src/Modal/drag/index.ts +7 -2
- package/src/Modal/drag/types.ts +15 -3
- package/src/Modal/drag/useDragDismiss.ts +29 -21
- package/src/Modal/modal-base-inner.native.tsx +3 -2
- package/src/Modal/modal-base-inner.tsx +1 -1
- package/src/Modal/modal-base.tsx +14 -12
- package/src/MultiSelect/MultiSelect.tsx +6 -1
- package/src/NativeSelect/NativeSelect.tsx +21 -32
- package/src/NavLink/NavLink.tsx +54 -47
- package/src/Notification/Notification.tsx +31 -30
- package/src/NumberFormatter/NumberFormatter.tsx +4 -3
- package/src/NumberInput/NumberInput.tsx +52 -42
- package/src/Overlay/Overlay.tsx +18 -14
- package/src/Pagination/Pagination.tsx +142 -123
- package/src/Paper/Paper.tsx +8 -9
- package/src/Paragraph/Paragraph.tsx +7 -7
- package/src/PasswordInput/PasswordInput.tsx +67 -67
- package/src/Pill/Pill.tsx +44 -32
- package/src/PillsInput/PillsInput.tsx +60 -31
- package/src/PinInput/PinInput.tsx +31 -23
- package/src/Popover/Popover.native.tsx +3 -4
- package/src/Popover/Popover.shared.tsx +32 -27
- package/src/Portal/OverlayHost.tsx +4 -4
- package/src/Portal/OverlayPortal.tsx +26 -0
- package/src/Portal/index.ts +4 -0
- package/src/Progress/Progress.tsx +77 -64
- package/src/Radio/Radio.tsx +128 -122
- package/src/Radio/RadioIcon.tsx +4 -10
- package/src/Rating/Rating.tsx +63 -42
- package/src/RollingNumber/RollingNumber.tsx +60 -28
- package/src/ScrollArea/ScrollArea.native.tsx +66 -59
- package/src/ScrollArea/ScrollArea.shared.ts +2 -2
- package/src/ScrollArea/ScrollArea.tsx +35 -33
- package/src/SegmentedControl/SegmentedControl.tsx +98 -53
- package/src/Select/Select.tsx +7 -2
- package/src/Separator/Separator.tsx +43 -36
- package/src/SimpleGrid/SimpleGrid.tsx +23 -24
- package/src/Skeleton/Skeleton.tsx +35 -16
- package/src/Slider/Slider.tsx +303 -227
- package/src/Spacer/Spacer.tsx +17 -41
- package/src/Spoiler/Spoiler.tsx +19 -13
- package/src/Stack/Stack.tsx +3 -3
- package/src/Stepper/Stepper.tsx +89 -73
- package/src/Switch/Switch.tsx +87 -73
- package/src/Table/Table.tsx +100 -77
- package/src/TableOfContents/TableOfContents.tsx +80 -74
- package/src/Tabs/Tabs.tsx +78 -66
- package/src/TagsInput/TagsInput.tsx +35 -4
- package/src/Text/Text.tsx +25 -10
- package/src/TextInput/TextInput.tsx +3 -1
- package/src/Textarea/Textarea.tsx +2 -2
- package/src/ThemeIcon/ThemeIcon.tsx +38 -23
- package/src/Title/Title.tsx +48 -23
- package/src/Tooltip/Tooltip.tsx +53 -32
- package/src/Transition/Transition.native.tsx +16 -19
- package/src/Transition/use-overlay-transition.native.ts +6 -12
- package/src/Transition/use-overlay-transition.ts +2 -2
- package/src/Tree/Tree.tsx +39 -44
- package/src/TreeSelect/TreeSelect.tsx +49 -24
- package/src/Typography/Typography.tsx +5 -7
- package/src/UnstyledButton/UnstyledButton.tsx +6 -5
- package/src/VirtualList/VirtualList.shared.ts +1 -1
- package/src/VirtualList/VirtualList.tsx +18 -6
- package/src/VisuallyHidden/VisuallyHidden.tsx +7 -9
- package/src/control-system.ts +5 -0
- package/src/index.ts +32 -12
- package/src/internal/ControlIconProvider.tsx +1 -1
- package/src/internal/InlineControl.tsx +23 -27
- package/src/internal/collapse-box.shared.ts +1 -1
- package/src/internal/collapse-box.tsx +15 -11
- package/src/internal/control-icon-size.ts +5 -8
- package/src/internal/control-metrics.ts +52 -52
- package/src/internal/floating-arrow.tsx +48 -40
- package/src/internal/focus-ring.ts +92 -0
- package/src/internal/gradient-shared.ts +23 -10
- package/src/internal/gradient.native.tsx +2 -1
- package/src/internal/gradient.tsx +1 -0
- package/src/internal/motion.ts +204 -244
- package/src/internal/resolve-theme-color.ts +10 -10
- package/src/internal/style-props.ts +545 -390
- package/src/internal/theme-color-web.ts +47 -27
- package/src/internal/use-icon-color.native.ts +1 -1
- package/src/internal/use-icon-color.ts +1 -1
- package/src/internal/use-looping-animation.native.tsx +2 -2
- package/src/internal/use-slot-text-wrapper.tsx +1 -1
- package/src/internal/variant-colors.ts +187 -151
package/src/Pill/Pill.tsx
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
createStyledContext,
|
|
5
|
+
type GetProps,
|
|
6
|
+
styleable,
|
|
7
|
+
styled,
|
|
8
|
+
withStaticProperties,
|
|
9
|
+
} from "@knitui/core";
|
|
4
10
|
|
|
5
11
|
import { Box } from "../Box";
|
|
6
12
|
import { CloseButton, type CloseButtonProps } from "../CloseButton";
|
|
7
|
-
import { type GradientValue, useGradient } from "../internal/gradient";
|
|
13
|
+
import { gradientForVariant, type GradientValue, useGradient } from "../internal/gradient";
|
|
8
14
|
import { renderTextChild } from "../internal/render-text-child";
|
|
9
15
|
import {
|
|
10
16
|
controlFontVariant,
|
|
@@ -39,35 +45,35 @@ const REMOVE_BUTTON_SIZE: Record<PillSize, CloseButtonSize> = {
|
|
|
39
45
|
};
|
|
40
46
|
|
|
41
47
|
const REMOVE_ICON_SIZE: Record<PillSize, CloseButtonIconSize> = {
|
|
42
|
-
xxs: "
|
|
43
|
-
xs: "
|
|
44
|
-
sm: "
|
|
45
|
-
md: "
|
|
46
|
-
lg: "
|
|
47
|
-
xl: "
|
|
48
|
-
xxl: "
|
|
48
|
+
xxs: "xxs",
|
|
49
|
+
xs: "xs",
|
|
50
|
+
sm: "sm",
|
|
51
|
+
md: "md",
|
|
52
|
+
lg: "lg",
|
|
53
|
+
xl: "xl",
|
|
54
|
+
xxl: "xxl",
|
|
49
55
|
};
|
|
50
56
|
|
|
51
57
|
/**
|
|
52
58
|
* Mirrors Mantine's `Pill` — a small rounded label, optionally with a remove
|
|
53
59
|
* button. Inside a `Pill.Group` it inherits `size`/`disabled`. The `contrast`
|
|
54
|
-
* variant uses the active theme's solid accent (
|
|
60
|
+
* variant uses the active theme's solid accent (`color9`); colour comes from the
|
|
55
61
|
* `theme` prop + palette ramp, never a Mantine `color` prop.
|
|
56
62
|
*/
|
|
57
63
|
const PillFrame = styled(Box, {
|
|
58
|
-
|
|
64
|
+
displayName: "Pill",
|
|
59
65
|
context: PillContext,
|
|
60
66
|
flexDirection: "row",
|
|
61
67
|
alignItems: "center",
|
|
62
68
|
alignSelf: "flex-start",
|
|
63
|
-
gap: "
|
|
69
|
+
gap: "xs",
|
|
64
70
|
borderRadius: 9999,
|
|
65
71
|
overflow: "hidden",
|
|
66
72
|
|
|
67
73
|
variants: {
|
|
68
74
|
variant: {
|
|
69
|
-
default: { backgroundColor: "
|
|
70
|
-
contrast: { backgroundColor: "
|
|
75
|
+
default: { backgroundColor: "color4" },
|
|
76
|
+
contrast: { backgroundColor: "color9" },
|
|
71
77
|
// Base stays transparent; the gradient is painted at render by `useGradient`.
|
|
72
78
|
gradient: { backgroundColor: "transparent" },
|
|
73
79
|
},
|
|
@@ -82,16 +88,16 @@ const PillFrame = styled(Box, {
|
|
|
82
88
|
});
|
|
83
89
|
|
|
84
90
|
const PillLabel = styled(Text, {
|
|
85
|
-
|
|
91
|
+
displayName: "PillLabel",
|
|
86
92
|
context: PillContext,
|
|
87
93
|
numberOfLines: 1,
|
|
88
94
|
userSelect: "none",
|
|
89
95
|
|
|
90
96
|
variants: {
|
|
91
97
|
variant: {
|
|
92
|
-
default: { color: "
|
|
93
|
-
contrast: { color: "
|
|
94
|
-
gradient: { color: "
|
|
98
|
+
default: { color: "color12" },
|
|
99
|
+
contrast: { color: "color1" },
|
|
100
|
+
gradient: { color: "white" },
|
|
95
101
|
},
|
|
96
102
|
size: {
|
|
97
103
|
...controlFontVariant,
|
|
@@ -99,6 +105,13 @@ const PillLabel = styled(Text, {
|
|
|
99
105
|
} as const,
|
|
100
106
|
});
|
|
101
107
|
|
|
108
|
+
/**
|
|
109
|
+
* On a gradient pill the label is white, so the remove glyph defaults to white
|
|
110
|
+
* too (a transparent CloseButton would otherwise show a dark `✕`). A module
|
|
111
|
+
* constant: spread on every gradient render, never re-allocated.
|
|
112
|
+
*/
|
|
113
|
+
const GRADIENT_REMOVE_PROPS = { styles: { icon: { color: "white" } } } as const;
|
|
114
|
+
|
|
102
115
|
// --- Pill.Group ------------------------------------------------------------
|
|
103
116
|
|
|
104
117
|
interface PillGroupContextValue {
|
|
@@ -115,7 +128,7 @@ export interface PillGroupProps extends Omit<GetProps<typeof Box>, "gap"> {
|
|
|
115
128
|
* @default "sm"
|
|
116
129
|
*/
|
|
117
130
|
size?: PillSize;
|
|
118
|
-
/** Gap between pills — token string or px number. @default "
|
|
131
|
+
/** Gap between pills — token string or px number. @default "xs" */
|
|
119
132
|
gap?: GetProps<typeof Box>["gap"];
|
|
120
133
|
/** Disable all child pills. */
|
|
121
134
|
disabled?: boolean;
|
|
@@ -124,15 +137,15 @@ export interface PillGroupProps extends Omit<GetProps<typeof Box>, "gap"> {
|
|
|
124
137
|
}
|
|
125
138
|
|
|
126
139
|
const PillGroupFrame = styled(Box, {
|
|
127
|
-
|
|
140
|
+
displayName: "PillGroup",
|
|
128
141
|
flexDirection: "row",
|
|
129
142
|
flexWrap: "wrap",
|
|
130
143
|
alignItems: "center",
|
|
131
|
-
gap: "
|
|
144
|
+
gap: "xs",
|
|
132
145
|
});
|
|
133
146
|
|
|
134
|
-
const PillGroup =
|
|
135
|
-
const { size, gap = "
|
|
147
|
+
const PillGroup = styleable<PillGroupProps>(PillGroupFrame, function PillGroup(props, ref) {
|
|
148
|
+
const { size, gap = "xs", disabled, children, ...rest } = props;
|
|
136
149
|
// Inherit size/disabled from an enclosing provider (e.g. a `PillsInput`, which
|
|
137
150
|
// provides a field-relative pill size) when this group doesn't set its own.
|
|
138
151
|
const parentGroup = React.useContext(PillGroupContext);
|
|
@@ -156,8 +169,8 @@ const PillGroup = PillGroupFrame.styleable<PillGroupProps>(function PillGroup(pr
|
|
|
156
169
|
/**
|
|
157
170
|
* Named style slots (Pillar B / `internal/styles.ts`) for `Pill`. Each key maps
|
|
158
171
|
* to the props of the styled part it targets, so
|
|
159
|
-
* `styles={{ removeButton: { backgroundColor: "
|
|
160
|
-
* `<Pill.RemoveButton backgroundColor="
|
|
172
|
+
* `styles={{ removeButton: { backgroundColor: "color5" } }}` is sugar for
|
|
173
|
+
* `<Pill.RemoveButton backgroundColor="color5" />`.
|
|
161
174
|
*/
|
|
162
175
|
export interface PillStyles {
|
|
163
176
|
/** Props for the label text (`Pill.Label`). */
|
|
@@ -194,12 +207,12 @@ export interface PillProps extends Omit<
|
|
|
194
207
|
/**
|
|
195
208
|
* Gradient fill for `variant="gradient"` (ignored otherwise). Two-color
|
|
196
209
|
* shorthand `{ from, to, deg }` or multi-step `{ stops, deg }`; colors accept
|
|
197
|
-
*
|
|
210
|
+
* `colorN` ramp names or any CSS color. Defaults to the active theme ramp.
|
|
198
211
|
*/
|
|
199
212
|
gradient?: GradientValue;
|
|
200
213
|
}
|
|
201
214
|
|
|
202
|
-
const PillComponent =
|
|
215
|
+
const PillComponent = styleable<PillProps>(PillFrame, function Pill(props, ref) {
|
|
203
216
|
const {
|
|
204
217
|
variant = "default",
|
|
205
218
|
size,
|
|
@@ -217,7 +230,7 @@ const PillComponent = PillFrame.styleable<PillProps>(function Pill(props, ref) {
|
|
|
217
230
|
|
|
218
231
|
// Gradient fill (only when `variant="gradient"`): web paints a CSS
|
|
219
232
|
// `backgroundImage`; native renders the `layer` (an SVG fill) behind the label.
|
|
220
|
-
const grad = useGradient(variant
|
|
233
|
+
const grad = useGradient(gradientForVariant(variant, gradient));
|
|
221
234
|
const group = React.useContext(PillGroupContext);
|
|
222
235
|
const resolvedSize: PillSize = size ?? group?.size ?? "sm";
|
|
223
236
|
const isDisabled = disabled ?? group?.disabled ?? false;
|
|
@@ -256,10 +269,9 @@ const PillComponent = PillFrame.styleable<PillProps>(function Pill(props, ref) {
|
|
|
256
269
|
variant="transparent"
|
|
257
270
|
size={REMOVE_BUTTON_SIZE[resolvedSize]}
|
|
258
271
|
iconSize={REMOVE_ICON_SIZE[resolvedSize]}
|
|
259
|
-
//
|
|
260
|
-
//
|
|
261
|
-
|
|
262
|
-
{...(variant === "gradient" ? { styles: { icon: { color: "$white" } } } : null)}
|
|
272
|
+
// Gradient pills default the glyph to white; spread first so an explicit
|
|
273
|
+
// `removeButton` slot / props still win.
|
|
274
|
+
{...(variant === "gradient" ? GRADIENT_REMOVE_PROPS : null)}
|
|
263
275
|
// Precedence (low → high): the `removeButton` slot sugar, then the
|
|
264
276
|
// deprecated `removeButtonProps` alias, then the forced per-part props
|
|
265
277
|
// (resolved aria-label / press handler that fold in the alias).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { type TamaguiElement, withStaticProperties } from "@knitui/core";
|
|
4
|
-
import { useMergedRef } from "@knitui/hooks";
|
|
4
|
+
import { useCallbackRef, useMergedRef } from "@knitui/hooks";
|
|
5
5
|
|
|
6
6
|
import { type __BaseInputProps, Input, type InputProps } from "../Input";
|
|
7
7
|
import {
|
|
@@ -28,7 +28,7 @@ interface PillsInputContextValue {
|
|
|
28
28
|
variant?: InputVariant;
|
|
29
29
|
/**
|
|
30
30
|
* Field focus/blur reported up from `PillsInput.Field` so the shell can show
|
|
31
|
-
* the same
|
|
31
|
+
* the same `focusRingColor` border every other text field gets — the field
|
|
32
32
|
* is a SEPARATE child, so the shell can't read its focus state directly.
|
|
33
33
|
*/
|
|
34
34
|
setFocused: (focused: boolean) => void;
|
|
@@ -38,6 +38,14 @@ type InputFieldElement = React.ComponentRef<typeof Input>;
|
|
|
38
38
|
|
|
39
39
|
const PillsInputContext = React.createContext<PillsInputContextValue | null>(null);
|
|
40
40
|
|
|
41
|
+
/** The shell lays the pills + field out as a wrapping row. */
|
|
42
|
+
const SHELL_ROOT = {
|
|
43
|
+
flexWrap: "wrap",
|
|
44
|
+
alignItems: "flex-start",
|
|
45
|
+
padding: "xs",
|
|
46
|
+
gap: "xs",
|
|
47
|
+
} as const;
|
|
48
|
+
|
|
41
49
|
/* -------------------------------------------------------------------------- */
|
|
42
50
|
/* PillsInput shell */
|
|
43
51
|
/* -------------------------------------------------------------------------- */
|
|
@@ -120,6 +128,12 @@ const PillsInputComponent = React.forwardRef<InputRootRef, PillsInputProps>(
|
|
|
120
128
|
[size, disabled],
|
|
121
129
|
);
|
|
122
130
|
|
|
131
|
+
const shellWrapperProps = React.useMemo(
|
|
132
|
+
() => (wrapperProps ? { ...SHELL_ROOT, ...wrapperProps } : SHELL_ROOT),
|
|
133
|
+
[wrapperProps],
|
|
134
|
+
);
|
|
135
|
+
const focusField = React.useCallback(() => fieldRef.current?.focus?.(), []);
|
|
136
|
+
|
|
123
137
|
return (
|
|
124
138
|
<PillsInputContext.Provider value={ctx}>
|
|
125
139
|
<InputWrapper
|
|
@@ -158,14 +172,8 @@ const PillsInputComponent = React.forwardRef<InputRootRef, PillsInputProps>(
|
|
|
158
172
|
rightSectionPointerEvents={rightSectionPointerEvents}
|
|
159
173
|
loading={loading}
|
|
160
174
|
loadingPosition={loadingPosition}
|
|
161
|
-
wrapperProps={
|
|
162
|
-
|
|
163
|
-
alignItems: "flex-start",
|
|
164
|
-
padding: "$xs",
|
|
165
|
-
gap: "$xs",
|
|
166
|
-
...wrapperProps,
|
|
167
|
-
}}
|
|
168
|
-
onRootPress={() => fieldRef.current?.focus?.()}
|
|
175
|
+
wrapperProps={shellWrapperProps}
|
|
176
|
+
onRootPress={focusField}
|
|
169
177
|
>
|
|
170
178
|
<PillGroupContext.Provider value={pillGroupValue}>{children}</PillGroupContext.Provider>
|
|
171
179
|
</InputChrome>
|
|
@@ -209,6 +217,31 @@ const PillsInputField = React.forwardRef<InputFieldElement, PillsInputFieldProps
|
|
|
209
217
|
const isDisabled = disabled ?? ctx?.disabled;
|
|
210
218
|
const hidden = type === "hidden";
|
|
211
219
|
|
|
220
|
+
// Report focus up to the shell so its border lights up like any text field.
|
|
221
|
+
// Stable identities (latest-closure) so the memoized `Input` below isn't
|
|
222
|
+
// handed fresh handlers on every keystroke in the field.
|
|
223
|
+
const handleFocus = useCallbackRef((event: FieldFocusEvent) => {
|
|
224
|
+
ctx?.setFocused(true);
|
|
225
|
+
onFocus?.(event);
|
|
226
|
+
});
|
|
227
|
+
const handleBlur = useCallbackRef((event: FieldFocusEvent) => {
|
|
228
|
+
ctx?.setFocused(false);
|
|
229
|
+
onBlur?.(event);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
// The field sits bare inside the shell: no own height/inset, it flexes into
|
|
233
|
+
// the free space after the pills. Static per `hidden` unless the caller adds
|
|
234
|
+
// `wrapperProps`, so it never allocates on a keystroke.
|
|
235
|
+
const fieldWrapperProps = React.useMemo(
|
|
236
|
+
() =>
|
|
237
|
+
wrapperProps
|
|
238
|
+
? { ...wrapperProps, ...(hidden ? HIDDEN_FIELD_ROOT : VISIBLE_FIELD_ROOT) }
|
|
239
|
+
: hidden
|
|
240
|
+
? HIDDEN_FIELD_ROOT
|
|
241
|
+
: VISIBLE_FIELD_ROOT,
|
|
242
|
+
[wrapperProps, hidden],
|
|
243
|
+
);
|
|
244
|
+
|
|
212
245
|
return (
|
|
213
246
|
<Input
|
|
214
247
|
{...rest}
|
|
@@ -218,33 +251,29 @@ const PillsInputField = React.forwardRef<InputFieldElement, PillsInputFieldProps
|
|
|
218
251
|
size={ctx?.size}
|
|
219
252
|
disabled={isDisabled}
|
|
220
253
|
pointer={pointer}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
ctx?.setFocused(true);
|
|
224
|
-
onFocus?.(event);
|
|
225
|
-
}}
|
|
226
|
-
onBlur={(event) => {
|
|
227
|
-
ctx?.setFocused(false);
|
|
228
|
-
onBlur?.(event);
|
|
229
|
-
}}
|
|
254
|
+
onFocus={handleFocus}
|
|
255
|
+
onBlur={handleBlur}
|
|
230
256
|
opacity={hidden ? 0 : 1}
|
|
231
|
-
wrapperProps={
|
|
232
|
-
...wrapperProps,
|
|
233
|
-
flex: 1,
|
|
234
|
-
minWidth: hidden ? 1 : "$xxl",
|
|
235
|
-
width: hidden ? 1 : "auto",
|
|
236
|
-
height: "auto",
|
|
237
|
-
minHeight: "$0",
|
|
238
|
-
paddingHorizontal: "$0",
|
|
239
|
-
paddingVertical: "$0",
|
|
240
|
-
backgroundColor: "transparent",
|
|
241
|
-
alignSelf: "center",
|
|
242
|
-
}}
|
|
257
|
+
wrapperProps={fieldWrapperProps}
|
|
243
258
|
/>
|
|
244
259
|
);
|
|
245
260
|
},
|
|
246
261
|
);
|
|
247
262
|
|
|
263
|
+
type FieldFocusEvent = Parameters<NonNullable<InputProps["onFocus"]>>[0];
|
|
264
|
+
|
|
265
|
+
const FIELD_ROOT = {
|
|
266
|
+
flex: 1,
|
|
267
|
+
height: "auto",
|
|
268
|
+
minHeight: 0,
|
|
269
|
+
paddingHorizontal: 0,
|
|
270
|
+
paddingVertical: 0,
|
|
271
|
+
backgroundColor: "transparent",
|
|
272
|
+
alignSelf: "center",
|
|
273
|
+
} as const;
|
|
274
|
+
const VISIBLE_FIELD_ROOT = { ...FIELD_ROOT, minWidth: "xxl", width: "auto" } as const;
|
|
275
|
+
const HIDDEN_FIELD_ROOT = { ...FIELD_ROOT, minWidth: 1, width: 1 } as const;
|
|
276
|
+
|
|
248
277
|
export const PillsInput = withStaticProperties(PillsInputComponent, {
|
|
249
278
|
Field: PillsInputField,
|
|
250
279
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import { type GetProps, isAndroid, styled, withStaticProperties } from "@knitui/core";
|
|
3
|
+
import { type GetProps, isAndroid, styleable, styled, withStaticProperties } from "@knitui/core";
|
|
4
4
|
import { useCallbackRef, useId, useMergedRef, useUncontrolled } from "@knitui/hooks";
|
|
5
5
|
|
|
6
6
|
import { Box } from "../Box";
|
|
@@ -67,7 +67,7 @@ function createPinArray(length: number, value: string): string[] {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
const PinInputRow = styled(Box, {
|
|
70
|
-
|
|
70
|
+
displayName: "PinInput",
|
|
71
71
|
role: "group",
|
|
72
72
|
flexDirection: "row",
|
|
73
73
|
alignItems: "center",
|
|
@@ -75,7 +75,7 @@ const PinInputRow = styled(Box, {
|
|
|
75
75
|
gap: gapVariant,
|
|
76
76
|
} as const,
|
|
77
77
|
defaultVariants: {
|
|
78
|
-
gap: "
|
|
78
|
+
gap: "xs",
|
|
79
79
|
},
|
|
80
80
|
});
|
|
81
81
|
|
|
@@ -84,7 +84,7 @@ type PinInputRowProps = GetProps<typeof PinInputRow>;
|
|
|
84
84
|
/**
|
|
85
85
|
* Named style slots (Pillar B / `internal/styles.ts`) for `PinInput`. The
|
|
86
86
|
* `field` slot is spread onto every per-character `Input`, so
|
|
87
|
-
* `styles={{ field: { borderColor: "
|
|
87
|
+
* `styles={{ field: { borderColor: "color8" } }}` styles all fields at once —
|
|
88
88
|
* sugar over the functional `getInputProps(index)` escape hatch (which still
|
|
89
89
|
* works and, being per-index and more explicit, wins where they overlap).
|
|
90
90
|
*/
|
|
@@ -149,7 +149,7 @@ export interface PinInputProps extends Omit<
|
|
|
149
149
|
/** Border radius of each input. */
|
|
150
150
|
radius?: InputProps["radius"];
|
|
151
151
|
|
|
152
|
-
/** Gap between inputs. Token, CSS value or number. @default "
|
|
152
|
+
/** Gap between inputs. Token, CSS value or number. @default "xs" */
|
|
153
153
|
gap?: PinInputRowProps["gap"];
|
|
154
154
|
|
|
155
155
|
/** Disables every input. */
|
|
@@ -204,7 +204,7 @@ export interface PinInputProps extends Omit<
|
|
|
204
204
|
* Multi-field paste distribution is deferred; single-field paste of a full code is
|
|
205
205
|
* handled.
|
|
206
206
|
*/
|
|
207
|
-
const PinInputComponent =
|
|
207
|
+
const PinInputComponent = styleable<PinInputProps>(PinInputRow, function PinInput(props, ref) {
|
|
208
208
|
const {
|
|
209
209
|
value,
|
|
210
210
|
defaultValue,
|
|
@@ -218,7 +218,7 @@ const PinInputComponent = PinInputRow.styleable<PinInputProps>(function PinInput
|
|
|
218
218
|
placeholder = "○",
|
|
219
219
|
size = "md",
|
|
220
220
|
radius,
|
|
221
|
-
gap = "
|
|
221
|
+
gap = "xs",
|
|
222
222
|
disabled,
|
|
223
223
|
error,
|
|
224
224
|
readOnly,
|
|
@@ -345,6 +345,14 @@ const PinInputComponent = PinInputRow.styleable<PinInputProps>(function PinInput
|
|
|
345
345
|
}
|
|
346
346
|
});
|
|
347
347
|
|
|
348
|
+
// Reads the LATEST `getInputProps` at call time, so the memoized per-field
|
|
349
|
+
// handlers below never go stale and never need rebuilding.
|
|
350
|
+
const callFieldHandler = useCallbackRef(
|
|
351
|
+
(index: number, key: "onFocus" | "onBlur", event: unknown) => {
|
|
352
|
+
(getInputProps?.(index)?.[key] as ((e: unknown) => void) | undefined)?.(event);
|
|
353
|
+
},
|
|
354
|
+
);
|
|
355
|
+
|
|
348
356
|
// Per-field props (ref + handlers) are memoized so React only attaches/detaches
|
|
349
357
|
// refs and rebinds listeners when `length` changes — not on every keystroke.
|
|
350
358
|
const fields = React.useMemo(
|
|
@@ -357,10 +365,20 @@ const PinInputComponent = PinInputRow.styleable<PinInputProps>(function PinInput
|
|
|
357
365
|
},
|
|
358
366
|
onChangeText: (text: string) => handleChange(text, index),
|
|
359
367
|
onKeyDown: (event: { key: string }) => handleKeyDown(event.key, index),
|
|
360
|
-
onFocus
|
|
361
|
-
|
|
368
|
+
// A consumer's `onFocus`/`onBlur` (via `getInputProps`) is CALLED, never a
|
|
369
|
+
// replacement: the row needs its own to know which field has the caret.
|
|
370
|
+
focusHandlers: {
|
|
371
|
+
onFocus: (event: unknown) => {
|
|
372
|
+
setFocusedIndex(index);
|
|
373
|
+
callFieldHandler(index, "onFocus", event);
|
|
374
|
+
},
|
|
375
|
+
onBlur: (event: unknown) => {
|
|
376
|
+
setFocusedIndex(-1);
|
|
377
|
+
callFieldHandler(index, "onBlur", event);
|
|
378
|
+
},
|
|
379
|
+
},
|
|
362
380
|
})),
|
|
363
|
-
[length, uuid, setFirstRef, handleChange, handleKeyDown],
|
|
381
|
+
[length, uuid, setFirstRef, handleChange, handleKeyDown, callFieldHandler],
|
|
364
382
|
);
|
|
365
383
|
|
|
366
384
|
const fieldSize = React.useMemo(() => toFieldSize(size), [size]);
|
|
@@ -377,8 +395,6 @@ const PinInputComponent = PinInputRow.styleable<PinInputProps>(function PinInput
|
|
|
377
395
|
[inputMode, type],
|
|
378
396
|
);
|
|
379
397
|
|
|
380
|
-
const perField = (index: number) => getInputProps?.(index);
|
|
381
|
-
|
|
382
398
|
return (
|
|
383
399
|
<PinInputRow gap={gap} {...others}>
|
|
384
400
|
{fields.map((field, index) => (
|
|
@@ -409,17 +425,9 @@ const PinInputComponent = PinInputRow.styleable<PinInputProps>(function PinInput
|
|
|
409
425
|
// The `field` style slot is sugar under the per-index `getInputProps`,
|
|
410
426
|
// which is more explicit and wins where the two overlap.
|
|
411
427
|
{...s.get("field")}
|
|
412
|
-
{...
|
|
413
|
-
// After the spreads
|
|
414
|
-
|
|
415
|
-
onFocus={(event: unknown) => {
|
|
416
|
-
field.onFocus();
|
|
417
|
-
(perField(index)?.onFocus as ((e: unknown) => void) | undefined)?.(event);
|
|
418
|
-
}}
|
|
419
|
-
onBlur={(event: unknown) => {
|
|
420
|
-
field.onBlur();
|
|
421
|
-
(perField(index)?.onBlur as ((e: unknown) => void) | undefined)?.(event);
|
|
422
|
-
}}
|
|
428
|
+
{...getInputProps?.(index)}
|
|
429
|
+
// After the spreads (see `fields`): wraps the consumer's handlers.
|
|
430
|
+
{...(field.focusHandlers as object)}
|
|
423
431
|
/>
|
|
424
432
|
))}
|
|
425
433
|
<HiddenInput
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import type { LayoutChangeEvent } from "react-native";
|
|
3
2
|
|
|
4
|
-
import { type TamaguiElement, withStaticProperties } from "@knitui/core";
|
|
3
|
+
import { type LayoutChangeEvent, type TamaguiElement, withStaticProperties } from "@knitui/core";
|
|
5
4
|
import { useDismissOnScroll } from "@knitui/hooks";
|
|
6
5
|
|
|
7
6
|
import { dismissKeyboard } from "../internal/dismiss-keyboard";
|
|
@@ -89,8 +88,8 @@ const PopoverDropdown = React.forwardRef<TamaguiElement, PopoverDropdownProps>(
|
|
|
89
88
|
// absolute scrim inside the portal host.
|
|
90
89
|
fixed={false}
|
|
91
90
|
zIndex={ctx.zIndex - 1}
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
{...(ctx.withOverlay ? null : { backgroundOpacity: 0 })}
|
|
92
|
+
{...(closeOnClickOutside ? { onPress: dismissFromScrim } : null)}
|
|
94
93
|
{...ctx.overlayProps}
|
|
95
94
|
/>
|
|
96
95
|
) : null;
|
|
@@ -2,10 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
type GetProps,
|
|
5
|
-
getTokenValue,
|
|
6
5
|
isWeb,
|
|
7
6
|
type RadiusTokens,
|
|
7
|
+
resolveToken,
|
|
8
8
|
type SpaceTokens,
|
|
9
|
+
styleable,
|
|
9
10
|
styled,
|
|
10
11
|
type TamaguiElement,
|
|
11
12
|
Theme,
|
|
@@ -38,7 +39,7 @@ import { useOverlayChrome } from "../internal/overlay-chrome";
|
|
|
38
39
|
import { shadowVariant } from "../internal/style-props";
|
|
39
40
|
import { type SlotStyles } from "../internal/styles";
|
|
40
41
|
import { type OverlayProps } from "../Overlay";
|
|
41
|
-
import {
|
|
42
|
+
import { OverlayPortal, useOverlayHost } from "../Portal";
|
|
42
43
|
import {
|
|
43
44
|
type OverlayTransitionConfig,
|
|
44
45
|
useOverlayTransition,
|
|
@@ -66,13 +67,12 @@ export type PopoverOffset = PopoverAxisOffset | PopoverAxesOffsets;
|
|
|
66
67
|
|
|
67
68
|
/** The vendored `useFloating` return — carries the typed reference/floating refs. */
|
|
68
69
|
export type FloatingReturn = ReturnType<typeof useFloating>;
|
|
69
|
-
type TokenValueInput = Parameters<typeof getTokenValue>[0];
|
|
70
70
|
|
|
71
|
-
const DEFAULT_OFFSET: SpaceTokens = "
|
|
71
|
+
const DEFAULT_OFFSET: SpaceTokens = "xs";
|
|
72
72
|
/** Stable empty transition config so an unset `transitionProps` keeps context identity. */
|
|
73
73
|
const EMPTY_TRANSITION: OverlayTransitionConfig = {};
|
|
74
|
-
const DEFAULT_SHIFT_PADDING: SpaceTokens = "
|
|
75
|
-
const DEFAULT_ARROW_OFFSET: SpaceTokens = "
|
|
74
|
+
const DEFAULT_SHIFT_PADDING: SpaceTokens = "xxs";
|
|
75
|
+
const DEFAULT_ARROW_OFFSET: SpaceTokens = "xxs";
|
|
76
76
|
|
|
77
77
|
/* -------------------------------------------------------------------------- */
|
|
78
78
|
/* Context */
|
|
@@ -145,15 +145,15 @@ export const useDropdownDismiss = (ctx: PopoverContextValue): (() => void) => {
|
|
|
145
145
|
/* -------------------------------------------------------------------------- */
|
|
146
146
|
|
|
147
147
|
export const PopoverDropdownFrame = styled(Box, {
|
|
148
|
-
|
|
148
|
+
displayName: "PopoverDropdown",
|
|
149
149
|
// `fixed` is viewport-relative positioning that only exists on web; React
|
|
150
150
|
// Native supports `absolute`/`relative`/`static` only. The instance overrides
|
|
151
151
|
// this with the platform-correct value (`fixed` on web, `absolute` on native).
|
|
152
152
|
position: isWeb ? ("fixed" as const) : ("absolute" as const),
|
|
153
|
-
backgroundColor: "
|
|
153
|
+
backgroundColor: "background",
|
|
154
154
|
borderWidth: 1,
|
|
155
|
-
borderColor: "
|
|
156
|
-
borderRadius: "
|
|
155
|
+
borderColor: "borderColor",
|
|
156
|
+
borderRadius: "sm",
|
|
157
157
|
|
|
158
158
|
variants: {
|
|
159
159
|
hidden: { true: { display: "none" } },
|
|
@@ -220,7 +220,7 @@ export interface PopoverProps {
|
|
|
220
220
|
/**
|
|
221
221
|
* Gap between target and dropdown. A space token or `number` sets the main-axis
|
|
222
222
|
* gutter; object form skids per axis (`{ mainAxis; crossAxis; alignmentAxis }`).
|
|
223
|
-
* @default '
|
|
223
|
+
* @default 'xs'
|
|
224
224
|
*/
|
|
225
225
|
offset?: PopoverOffset;
|
|
226
226
|
/** Dropdown width; `'target'` matches the target width. @default 'max-content' */
|
|
@@ -292,7 +292,7 @@ export interface PopoverProps {
|
|
|
292
292
|
withArrow?: boolean;
|
|
293
293
|
/** Arrow square edge length in px. @default 7 */
|
|
294
294
|
arrowSize?: number;
|
|
295
|
-
/** Arrow distance from the start/end edge when `arrowPosition="side"`. @default '
|
|
295
|
+
/** Arrow distance from the start/end edge when `arrowPosition="side"`. @default 'xxs' */
|
|
296
296
|
arrowOffset?: PopoverArrowOffset;
|
|
297
297
|
/** Corner radius of the arrow's outward corner in px. @default 0 */
|
|
298
298
|
arrowRadius?: number;
|
|
@@ -309,7 +309,7 @@ const referenceWidthMiddleware: Middleware = {
|
|
|
309
309
|
};
|
|
310
310
|
|
|
311
311
|
const resolveSpaceOffset = (value: SpaceTokens): number => {
|
|
312
|
-
const resolved =
|
|
312
|
+
const resolved = resolveToken(value, "space");
|
|
313
313
|
return typeof resolved === "number" ? resolved : 0;
|
|
314
314
|
};
|
|
315
315
|
|
|
@@ -413,7 +413,7 @@ export function PopoverRoot(props: PopoverProps) {
|
|
|
413
413
|
position: arrowPosition,
|
|
414
414
|
offset: resolvedArrowOffset,
|
|
415
415
|
padding: resolvedArrowOffset,
|
|
416
|
-
// The dropdown frame's default radius is
|
|
416
|
+
// The dropdown frame's default radius is `sm` (see PopoverDropdownFrame).
|
|
417
417
|
cornerRadius: resolveRadiusPx(radius),
|
|
418
418
|
}),
|
|
419
419
|
]
|
|
@@ -576,7 +576,8 @@ export function PopoverTarget({
|
|
|
576
576
|
}: PopoverTargetProps) {
|
|
577
577
|
const ctx = usePopoverContext();
|
|
578
578
|
const { setReference } = ctx.floating.refs;
|
|
579
|
-
|
|
579
|
+
// React 19 carries `ref` as a regular prop; the removed `element.ref` getter warns.
|
|
580
|
+
const childRef = (children.props as { ref?: React.Ref<TamaguiElement> }).ref;
|
|
580
581
|
// floating-ui's web `setReference` is typed for DOM nodes (`ReferenceType`),
|
|
581
582
|
// while Tamagui refs carry `TamaguiElement` (`HTMLElement | View`). On web the
|
|
582
583
|
// mounted node is always the DOM element, so narrow to the setter's own param
|
|
@@ -681,7 +682,8 @@ export interface PopoverDropdownViewProps extends PopoverDropdownProps {
|
|
|
681
682
|
* (`Popover.tsx` / `Popover.native.tsx`) own only the close/dismiss wiring and
|
|
682
683
|
* feed it a `scrim` + `frameProps`, so the presentation stays in one place.
|
|
683
684
|
*/
|
|
684
|
-
export const PopoverDropdownView =
|
|
685
|
+
export const PopoverDropdownView = styleable<PopoverDropdownViewProps>(
|
|
686
|
+
PopoverDropdownFrame,
|
|
685
687
|
function PopoverDropdownView({ hidden, children, scrim, frameProps, ...rest }, ref) {
|
|
686
688
|
const ctx = usePopoverContext();
|
|
687
689
|
const open = ctx.opened;
|
|
@@ -709,7 +711,7 @@ export const PopoverDropdownView = PopoverDropdownFrame.styleable<PopoverDropdow
|
|
|
709
711
|
|
|
710
712
|
// Re-apply the active theme inside the portal: portaling to `document.body`
|
|
711
713
|
// moves the dropdown out of the theme's DOM ancestor on web, so its CSS theme
|
|
712
|
-
// variables (
|
|
714
|
+
// variables (`background`/`color`/…) would otherwise resolve to the root theme.
|
|
713
715
|
// (Mirrors `@tamagui/portal` wrapping its portal in `<TamaguiRoot theme={…}>`.)
|
|
714
716
|
const themeName = useThemeName();
|
|
715
717
|
// The nearest scoped `OverlayHost` (a native modal screen), else "root".
|
|
@@ -735,13 +737,13 @@ export const PopoverDropdownView = PopoverDropdownFrame.styleable<PopoverDropdow
|
|
|
735
737
|
|
|
736
738
|
// The transition style wins on opacity/transform; consumer/slot styles apply
|
|
737
739
|
// underneath. `top`/`left` come from floating-ui as props and stay instant —
|
|
738
|
-
// the transition only animates the
|
|
739
|
-
// `transitionProperty` (web), never position.
|
|
740
|
+
// the transition only animates the scoped `transition.properties` (native) /
|
|
741
|
+
// the inline `transitionProperty` (web), never position.
|
|
740
742
|
const { style: restStyle, ...frameRest } = rest;
|
|
741
743
|
const transitionStyle = waitingForPosition ? { ...t.style, opacity: 0 } : t.style;
|
|
742
744
|
|
|
743
745
|
return (
|
|
744
|
-
<
|
|
746
|
+
<OverlayPortal hostName={ctx.withinPortal ? overlayHost : undefined}>
|
|
745
747
|
<Theme name={themeName}>
|
|
746
748
|
{/* Keep the scrim and the dropdown frame as direct siblings (rather
|
|
747
749
|
than hoisting the scrim above `<Theme>`) so their z-indices compare
|
|
@@ -754,9 +756,9 @@ export const PopoverDropdownView = PopoverDropdownFrame.styleable<PopoverDropdow
|
|
|
754
756
|
<PopoverDropdownFrame
|
|
755
757
|
ref={dropdownRef}
|
|
756
758
|
hidden={hidden || t.hidden}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
759
|
+
// Conditional spreads, never `prop={undefined}`: an explicit undefined
|
|
760
|
+
// style prop CLEARS the base value in v3 (the frame's `borderRadius: "sm"`).
|
|
761
|
+
{...(ctx.resolvedWidth !== undefined ? { width: ctx.resolvedWidth } : null)}
|
|
760
762
|
// The teleport host is `pointer-events: none` so its full-screen box
|
|
761
763
|
// never swallows page clicks — re-enable events on the dropdown itself
|
|
762
764
|
// so it stays interactive (disabled while pre-measuring and while it
|
|
@@ -764,7 +766,7 @@ export const PopoverDropdownView = PopoverDropdownFrame.styleable<PopoverDropdow
|
|
|
764
766
|
pointerEvents={open && !waitingForPosition ? "auto" : "none"}
|
|
765
767
|
zIndex={ctx.zIndex}
|
|
766
768
|
shadow={ctx.shadow}
|
|
767
|
-
|
|
769
|
+
{...(ctx.radius !== undefined ? { borderRadius: ctx.radius } : null)}
|
|
768
770
|
{...roleProps}
|
|
769
771
|
// `dropdown` slot sugar layers UNDER the explicit `frameProps`/`rest`.
|
|
770
772
|
{...ctx.slots.dropdown}
|
|
@@ -774,7 +776,10 @@ export const PopoverDropdownView = PopoverDropdownFrame.styleable<PopoverDropdow
|
|
|
774
776
|
// last so positioning stays instant and consumer styles can't clobber
|
|
775
777
|
// the transition. Styles merge left→right: slot < consumer < transition.
|
|
776
778
|
{...t.animation}
|
|
777
|
-
|
|
779
|
+
// `top`/`left` track the floating engine continuously (scroll, resize):
|
|
780
|
+
// inline style, because a style PROP injects one CSS rule per value on
|
|
781
|
+
// v3 web. Positioning beats consumer styles; the transition wins last.
|
|
782
|
+
style={[ctx.slots.dropdown?.style, restStyle, { top: y, left: x }, transitionStyle]}
|
|
778
783
|
>
|
|
779
784
|
{children}
|
|
780
785
|
{ctx.withArrow ? (
|
|
@@ -784,7 +789,7 @@ export const PopoverDropdownView = PopoverDropdownFrame.styleable<PopoverDropdow
|
|
|
784
789
|
offset={ctx.arrowOffset}
|
|
785
790
|
position={ctx.arrowPosition}
|
|
786
791
|
radius={ctx.arrowRadius}
|
|
787
|
-
background="
|
|
792
|
+
background="background"
|
|
788
793
|
arrowX={middlewareData.arrow?.x}
|
|
789
794
|
arrowY={middlewareData.arrow?.y}
|
|
790
795
|
// Appearance sugar overrides the defaults above; the slot type
|
|
@@ -795,7 +800,7 @@ export const PopoverDropdownView = PopoverDropdownFrame.styleable<PopoverDropdow
|
|
|
795
800
|
) : null}
|
|
796
801
|
</PopoverDropdownFrame>
|
|
797
802
|
</Theme>
|
|
798
|
-
</
|
|
803
|
+
</OverlayPortal>
|
|
799
804
|
);
|
|
800
805
|
},
|
|
801
806
|
);
|