@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/Modal/drag/types.ts
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import type * as React from "react";
|
|
2
2
|
import type { SharedValue } from "react-native-reanimated";
|
|
3
3
|
|
|
4
|
-
import type { ViewStyle } from "@knitui/core";
|
|
5
|
-
|
|
6
4
|
import type { OverlayProps } from "../../Overlay";
|
|
7
5
|
import type { DragAxis } from "./useDragDismiss";
|
|
8
6
|
|
|
9
7
|
/** Pointer-events modes the host accepts (RN/RNW shared subset). */
|
|
10
8
|
export type PointerEventsMode = "auto" | "none" | "box-none" | "box-only";
|
|
11
9
|
|
|
10
|
+
/**
|
|
11
|
+
* The flex layout a drag host re-creates (see {@link DragDismissHostProps.style}).
|
|
12
|
+
* Deliberately narrow: plain literals assignable to BOTH a React Native style (the
|
|
13
|
+
* native `Animated.View` host) and Tamagui style props (the web `Box` host spreads
|
|
14
|
+
* them as props), so neither host needs a cast.
|
|
15
|
+
*/
|
|
16
|
+
export interface DragHostLayout {
|
|
17
|
+
flex?: number;
|
|
18
|
+
alignSelf?: "auto" | "stretch" | "center" | "flex-start" | "flex-end";
|
|
19
|
+
flexDirection?: "row" | "column";
|
|
20
|
+
alignItems?: "stretch" | "center" | "flex-start" | "flex-end";
|
|
21
|
+
justifyContent?: "center" | "flex-start" | "flex-end" | "space-between";
|
|
22
|
+
}
|
|
23
|
+
|
|
12
24
|
/** Props for the animated drag host (carries the panel's dismiss translation). */
|
|
13
25
|
export interface DragDismissHostProps {
|
|
14
26
|
/** Travel toward the dismiss edge (px). */
|
|
@@ -22,7 +34,7 @@ export interface DragDismissHostProps {
|
|
|
22
34
|
* wraps a panel that relies on it (e.g. Modal's centred, `maxHeight:100%`
|
|
23
35
|
* panel), so the panel keeps sizing/centring correctly inside the host.
|
|
24
36
|
*/
|
|
25
|
-
style?:
|
|
37
|
+
style?: DragHostLayout;
|
|
26
38
|
/**
|
|
27
39
|
* `box-none` lets the host's empty area (the margin around a centred panel) pass
|
|
28
40
|
* clicks through to the scrim behind it while children still receive events.
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
type PanGesture,
|
|
4
|
+
type PanGestureConfig,
|
|
5
|
+
usePanGesture,
|
|
6
|
+
} from "react-native-gesture-handler";
|
|
3
7
|
import {
|
|
4
8
|
cancelAnimation,
|
|
5
9
|
type SharedValue,
|
|
@@ -61,12 +65,12 @@ export interface DragDismissParams {
|
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
/**
|
|
64
|
-
* A single-axis drag-to-dismiss `
|
|
68
|
+
* A single-axis drag-to-dismiss pan (RNGH 3 `usePanGesture`), shared by `Modal` (axis `y`,
|
|
65
69
|
* sign `-1` — drag up) and `Drawer` (per-edge axis/sign). Tracks the finger toward the
|
|
66
70
|
* dismiss edge into `offset` (rubber-banding the wrong way), and on release runs
|
|
67
71
|
* the pure {@link shouldDismiss} on the UI thread: dismiss → spring off-screen
|
|
68
72
|
* then `onDismiss`; otherwise spring back to rest. Works on web and native (RNGH
|
|
69
|
-
* `
|
|
73
|
+
* `usePanGesture` supports both). Returns the gesture for a `<GestureDetector>`.
|
|
70
74
|
*/
|
|
71
75
|
export function useDragDismiss(params: DragDismissParams): PanGesture {
|
|
72
76
|
const { offset, axis, sign, extent, dismissTravel, enabled, threshold, spring, onDismiss } =
|
|
@@ -75,7 +79,7 @@ export function useDragDismiss(params: DragDismissParams): PanGesture {
|
|
|
75
79
|
// Whether this cycle activated (crossed the threshold into a real drag). A bare
|
|
76
80
|
// tap begins + finalizes without activating, so this stays false.
|
|
77
81
|
const active = useSharedValue(false);
|
|
78
|
-
// Whether `
|
|
82
|
+
// Whether `onDeactivate` already committed a settle, so the `onFinalize` safety net only
|
|
79
83
|
// runs for an activated drag that was cancelled/interrupted before a clean end.
|
|
80
84
|
const settled = useSharedValue(false);
|
|
81
85
|
const config = spring ?? DEFAULT_DISMISS_SPRING;
|
|
@@ -84,25 +88,26 @@ export function useDragDismiss(params: DragDismissParams): PanGesture {
|
|
|
84
88
|
// only the settle target differs (see `dismissTravel`).
|
|
85
89
|
const exitTo = dismissTravel != null && dismissTravel > extent ? dismissTravel : extent;
|
|
86
90
|
|
|
87
|
-
|
|
91
|
+
// Config identity drives RNGH's re-configuration (`usePanGesture` re-sends the
|
|
92
|
+
// config to the native handler whenever the object changes), so memoize it on
|
|
93
|
+
// exactly the inputs the callbacks close over.
|
|
94
|
+
const panConfig = React.useMemo((): PanGestureConfig => {
|
|
88
95
|
// Only claim the touch once it has travelled along the drag axis — taps,
|
|
89
96
|
// control presses, and cross-axis swipes are left to their own handlers.
|
|
90
97
|
const threshold2: [number, number] = [-ACTIVATION_THRESHOLD, ACTIVATION_THRESHOLD];
|
|
91
|
-
const gesture =
|
|
92
|
-
axis === "x"
|
|
93
|
-
? Gesture.Pan().enabled(enabled).activeOffsetX(threshold2)
|
|
94
|
-
: Gesture.Pan().enabled(enabled).activeOffsetY(threshold2);
|
|
95
98
|
|
|
96
|
-
return
|
|
97
|
-
|
|
99
|
+
return {
|
|
100
|
+
enabled,
|
|
101
|
+
...(axis === "x" ? { activeOffsetX: threshold2 } : { activeOffsetY: threshold2 }),
|
|
102
|
+
onBegin: () => {
|
|
98
103
|
"worklet";
|
|
99
104
|
// Touch-down (may still be a tap). Reset the cycle flags but leave any
|
|
100
105
|
// running settle spring alone — cancelling here would freeze a mid-flight
|
|
101
106
|
// panel under a tap that never becomes a drag.
|
|
102
107
|
active.value = false;
|
|
103
108
|
settled.value = false;
|
|
104
|
-
}
|
|
105
|
-
|
|
109
|
+
},
|
|
110
|
+
onActivate: () => {
|
|
106
111
|
"worklet";
|
|
107
112
|
// Activation (a real drag crossed the threshold). Catch the panel wherever
|
|
108
113
|
// its spring currently is and hand it to the finger with no jump — grabbing
|
|
@@ -111,8 +116,8 @@ export function useDragDismiss(params: DragDismissParams): PanGesture {
|
|
|
111
116
|
panStart.value = offset.value;
|
|
112
117
|
cancelAnimation(offset);
|
|
113
118
|
active.value = true;
|
|
114
|
-
}
|
|
115
|
-
|
|
119
|
+
},
|
|
120
|
+
onUpdate: (e) => {
|
|
116
121
|
"worklet";
|
|
117
122
|
const raw = axis === "x" ? e.translationX : e.translationY;
|
|
118
123
|
// Map screen translation into dismiss-direction travel. Hard-clamp the
|
|
@@ -120,8 +125,8 @@ export function useDragDismiss(params: DragDismissParams): PanGesture {
|
|
|
120
125
|
// TOWARD the edge — never further into the screen than its open position.
|
|
121
126
|
const d = panStart.value + raw * sign;
|
|
122
127
|
offset.value = d > 0 ? d : 0;
|
|
123
|
-
}
|
|
124
|
-
|
|
128
|
+
},
|
|
129
|
+
onDeactivate: (e) => {
|
|
125
130
|
"worklet";
|
|
126
131
|
const velocity = (axis === "x" ? e.velocityX : e.velocityY) * sign;
|
|
127
132
|
settled.value = true;
|
|
@@ -140,15 +145,16 @@ export function useDragDismiss(params: DragDismissParams): PanGesture {
|
|
|
140
145
|
} else {
|
|
141
146
|
offset.value = withSpring(0, { ...config, velocity });
|
|
142
147
|
}
|
|
143
|
-
}
|
|
144
|
-
|
|
148
|
+
},
|
|
149
|
+
onFinalize: () => {
|
|
145
150
|
"worklet";
|
|
146
151
|
// Safety net for an activated drag interrupted/cancelled before a clean
|
|
147
|
-
// `
|
|
152
|
+
// `onDeactivate` (e.g. the OS stole the gesture) — spring back to rest. Never
|
|
148
153
|
// dismisses: only a real release may close the panel.
|
|
149
154
|
if (!active.value || settled.value) return;
|
|
150
155
|
offset.value = withSpring(0, config);
|
|
151
|
-
}
|
|
156
|
+
},
|
|
157
|
+
};
|
|
152
158
|
}, [
|
|
153
159
|
offset,
|
|
154
160
|
panStart,
|
|
@@ -163,4 +169,6 @@ export function useDragDismiss(params: DragDismissParams): PanGesture {
|
|
|
163
169
|
config,
|
|
164
170
|
onDismiss,
|
|
165
171
|
]);
|
|
172
|
+
|
|
173
|
+
return usePanGesture(panConfig);
|
|
166
174
|
}
|
|
@@ -16,10 +16,11 @@ import { type GetProps, styled } from "@knitui/core";
|
|
|
16
16
|
* The keyboard default is baked in here (not passed by the shared `ModalBase`),
|
|
17
17
|
* so the web build stays a plain `Box` that never sees the native-only prop.
|
|
18
18
|
* `styled()` over the keyboard-avoiding view keeps the kit's token-aware style
|
|
19
|
-
* props (`paddingVertical="
|
|
19
|
+
* props (`paddingVertical="xl"`, `alignItems`, …) working.
|
|
20
20
|
*/
|
|
21
21
|
const Frame = styled(KeyboardAvoidingView, {
|
|
22
|
-
name
|
|
22
|
+
// A raw RN parent takes no theme `name` in v3's `StyledOptions`.
|
|
23
|
+
displayName: "ModalBaseInner",
|
|
23
24
|
top: 0,
|
|
24
25
|
left: 0,
|
|
25
26
|
right: 0,
|
package/src/Modal/modal-base.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import type { CloseButtonProps } from "../CloseButton";
|
|
|
8
8
|
import { type MotionPreset, type MotionPresetName, useMotionPreset } from "../internal/motion";
|
|
9
9
|
import { slotStyles, type SlotStyles } from "../internal/styles";
|
|
10
10
|
import { Overlay, type OverlayProps } from "../Overlay";
|
|
11
|
-
import {
|
|
11
|
+
import { OverlayPortal, useOverlayHost } from "../Portal";
|
|
12
12
|
import { ModalBaseInner } from "./modal-base-inner";
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -17,7 +17,7 @@ import { ModalBaseInner } from "./modal-base-inner";
|
|
|
17
17
|
* describe how their content frame is positioned:
|
|
18
18
|
*
|
|
19
19
|
* - portals the layer (the `Portal` re-applies the active `Theme` across the
|
|
20
|
-
* DOM boundary, so
|
|
20
|
+
* DOM boundary, so `background`/ramp theme keys keep resolving),
|
|
21
21
|
* - paints a full-cover `Overlay` scrim BEHIND the content (content frames carry
|
|
22
22
|
* `position:"relative", zIndex:1`; the scrim sits at `zIndex:0`), so a click on
|
|
23
23
|
* the empty area around the content hits the scrim and closes,
|
|
@@ -29,7 +29,7 @@ import { ModalBaseInner } from "./modal-base-inner";
|
|
|
29
29
|
* class of deferral as `Overlay`'s web-only `blur`/`gradient`). Both entrance AND
|
|
30
30
|
* exit are animated: the whole layer is wrapped in `AnimatePresence`, which holds
|
|
31
31
|
* it mounted through its exit before unmounting, so the scrim fade and the content
|
|
32
|
-
* frame's `
|
|
32
|
+
* frame's `exit:` clauses (supplied by the consumer) play on close. `keepMounted`
|
|
33
33
|
* opts out (the node never leaves, so it only toggles `display`).
|
|
34
34
|
*/
|
|
35
35
|
/** Props every public overlay (`Modal`/`Drawer`) shares, mirroring Mantine names. */
|
|
@@ -278,11 +278,13 @@ export function ModalBase(props: ModalBaseProps) {
|
|
|
278
278
|
// box never swallows clicks meant for the page behind a closed layer.
|
|
279
279
|
pointerEvents="box-none"
|
|
280
280
|
flexDirection={direction}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
281
|
+
// Optional layout props are spread only when set: in v3 an explicit
|
|
282
|
+
// `prop={undefined}` claims the call-site slot (docs/v3/conventions.md §5).
|
|
283
|
+
{...(align !== undefined ? { alignItems: align } : null)}
|
|
284
|
+
{...(justify !== undefined ? { justifyContent: justify } : null)}
|
|
285
|
+
{...(padding !== undefined ? { padding } : null)}
|
|
286
|
+
{...(paddingVertical !== undefined ? { paddingVertical } : null)}
|
|
287
|
+
{...(paddingHorizontal !== undefined ? { paddingHorizontal } : null)}
|
|
286
288
|
>
|
|
287
289
|
{withOverlay ? (
|
|
288
290
|
<Overlay
|
|
@@ -300,21 +302,21 @@ export function ModalBase(props: ModalBaseProps) {
|
|
|
300
302
|
// `keepMounted` stays in the tree and toggles `display` — entrance animates but
|
|
301
303
|
// there is no exit (the node never leaves), mirroring `Dialog`/`Popover`.
|
|
302
304
|
if (keepMounted) {
|
|
303
|
-
return <
|
|
305
|
+
return <OverlayPortal hostName={withinPortal ? overlayHost : undefined}>{layer}</OverlayPortal>;
|
|
304
306
|
}
|
|
305
307
|
|
|
306
308
|
// Default: `AnimatePresence` holds the whole layer (scrim + content) in the tree
|
|
307
309
|
// through its EXIT animation, then unmounts it. The keyed `Portal` child becoming
|
|
308
310
|
// `null` on close is what triggers the exit; the scrim's `overlayMotion` and the
|
|
309
|
-
// content frame's `
|
|
311
|
+
// content frame's `exit:` clauses both play. `AnimatePresence` sits OUTSIDE the
|
|
310
312
|
// `Portal` so the parent/child relationship its presence protocol relies on
|
|
311
313
|
// survives the teleport re-parent (the same constraint `Dialog` documents).
|
|
312
314
|
return (
|
|
313
315
|
<AnimatePresence>
|
|
314
316
|
{opened ? (
|
|
315
|
-
<
|
|
317
|
+
<OverlayPortal key="modal-layer" hostName={withinPortal ? overlayHost : undefined}>
|
|
316
318
|
{layer}
|
|
317
|
-
</
|
|
319
|
+
</OverlayPortal>
|
|
318
320
|
) : null}
|
|
319
321
|
</AnimatePresence>
|
|
320
322
|
);
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
composeTriggerRightSection,
|
|
21
21
|
defaultOptionsFilter,
|
|
22
22
|
flattenComboboxOptions,
|
|
23
|
+
getComboboxOptionId,
|
|
23
24
|
getOptionsLockup,
|
|
24
25
|
getParsedComboboxData,
|
|
25
26
|
isComboboxGroup,
|
|
@@ -48,7 +49,7 @@ type MultiSelectInputProps = Omit<
|
|
|
48
49
|
/**
|
|
49
50
|
* Named style slots (Pillar B / `internal/styles.ts`), keyed 1:1 with the
|
|
50
51
|
* MultiSelect part surface. Each key maps to the props of the part it targets, so
|
|
51
|
-
* `styles={{ option: { bg: "
|
|
52
|
+
* `styles={{ option: { bg: "color3" } }}` is sugar for `<MultiSelect.Option bg="color3" />`.
|
|
52
53
|
*/
|
|
53
54
|
export interface MultiSelectStyles {
|
|
54
55
|
/** Props for the state-machine root (`MultiSelect.Root` → `<Combobox>`). */
|
|
@@ -818,6 +819,9 @@ const MultiSelectTrigger = React.forwardRef<MultiSelectRef, MultiSelectTriggerPr
|
|
|
818
819
|
aria-autocomplete={ctx.searchable ? "list" : "none"}
|
|
819
820
|
aria-controls={ctx.dropdownId}
|
|
820
821
|
aria-expanded={ctx.combobox.opened}
|
|
822
|
+
{...(ctx.combobox.opened && ctx.activeValue != null
|
|
823
|
+
? { "aria-activedescendant": getComboboxOptionId(ctx.dropdownId, ctx.activeValue) }
|
|
824
|
+
: null)}
|
|
821
825
|
placeholder={placeholder}
|
|
822
826
|
value={ctx.search}
|
|
823
827
|
disabled={ctx.disabled}
|
|
@@ -911,6 +915,7 @@ function MultiSelectOptions(props: MultiSelectOptionsProps) {
|
|
|
911
915
|
withScrollArea={ctx.withScrollArea}
|
|
912
916
|
maxDropdownHeight={ctx.maxDropdownHeight}
|
|
913
917
|
renderOption={ctx.renderOption}
|
|
918
|
+
optionIdPrefix={ctx.dropdownId}
|
|
914
919
|
// The `option`/`group`/`empty` slots reach each rendered row through OptionsDropdown.
|
|
915
920
|
optionProps={s.get("option")}
|
|
916
921
|
groupProps={s.get("group")}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { registerFocusable, styled, type TamaguiElement, useWebRef } from "@knitui/core";
|
|
4
|
+
import { useCallbackRef } from "@knitui/hooks";
|
|
4
5
|
|
|
5
6
|
import { Combobox } from "../Combobox";
|
|
6
7
|
import {
|
|
@@ -52,32 +53,22 @@ type WebSelectChangeEvent = React.ChangeEvent<HTMLSelectElement>;
|
|
|
52
53
|
type NativeSelectControlProps = Omit<NativeSelectProps, "label" | "description" | "withAsterisk">;
|
|
53
54
|
|
|
54
55
|
const SelectInput = styled(Text, {
|
|
55
|
-
|
|
56
|
+
displayName: "NativeSelectInput",
|
|
56
57
|
render: "select",
|
|
57
58
|
flex: 1,
|
|
58
59
|
minWidth: 0,
|
|
59
60
|
height: "100%",
|
|
61
|
+
// The wrapper (`InputChrome`) owns border, background and the focus border, so
|
|
62
|
+
// the host only resets the UA chrome (no condition clauses needed: nothing else
|
|
63
|
+
// sets these under focus).
|
|
60
64
|
outlineWidth: 0,
|
|
65
|
+
outlineStyle: "none",
|
|
61
66
|
borderWidth: 0,
|
|
62
67
|
borderColor: "transparent",
|
|
63
68
|
backgroundColor: "transparent",
|
|
64
69
|
boxShadow: "none",
|
|
65
|
-
color: "
|
|
66
|
-
fontFamily: "
|
|
67
|
-
|
|
68
|
-
focusStyle: {
|
|
69
|
-
outlineWidth: 0,
|
|
70
|
-
borderWidth: 0,
|
|
71
|
-
borderColor: "transparent",
|
|
72
|
-
boxShadow: "none",
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
focusVisibleStyle: {
|
|
76
|
-
outlineWidth: 0,
|
|
77
|
-
borderWidth: 0,
|
|
78
|
-
borderColor: "transparent",
|
|
79
|
-
boxShadow: "none",
|
|
80
|
-
},
|
|
70
|
+
color: "color",
|
|
71
|
+
fontFamily: "body",
|
|
81
72
|
|
|
82
73
|
variants: {
|
|
83
74
|
size: inputHostSizeVariant,
|
|
@@ -88,6 +79,9 @@ const SelectInput = styled(Text, {
|
|
|
88
79
|
},
|
|
89
80
|
});
|
|
90
81
|
|
|
82
|
+
/** Drops the UA select arrow (the kit renders its own chevron section). */
|
|
83
|
+
const APPEARANCE_NONE = { appearance: "none" } as const;
|
|
84
|
+
|
|
91
85
|
function NativeSelectOption({ data }: { data: ComboboxParsedItem }) {
|
|
92
86
|
if (isComboboxGroup(data)) {
|
|
93
87
|
return (
|
|
@@ -174,20 +168,20 @@ const NativeSelectControl = React.forwardRef<NativeSelectRef, NativeSelectContro
|
|
|
174
168
|
};
|
|
175
169
|
}, [disabled, inputId, ref]);
|
|
176
170
|
|
|
177
|
-
const handleFocus = (event: React.FocusEvent<HTMLSelectElement>) => {
|
|
171
|
+
const handleFocus = useCallbackRef((event: React.FocusEvent<HTMLSelectElement>) => {
|
|
178
172
|
setFocused(true);
|
|
179
173
|
onFocus?.(event);
|
|
180
|
-
};
|
|
174
|
+
});
|
|
181
175
|
|
|
182
|
-
const handleBlur = (event: React.FocusEvent<HTMLSelectElement>) => {
|
|
176
|
+
const handleBlur = useCallbackRef((event: React.FocusEvent<HTMLSelectElement>) => {
|
|
183
177
|
setFocused(false);
|
|
184
178
|
onBlur?.(event);
|
|
185
|
-
};
|
|
179
|
+
});
|
|
186
180
|
|
|
187
|
-
const handleChange = (event: WebSelectChangeEvent) => {
|
|
181
|
+
const handleChange = useCallbackRef((event: WebSelectChangeEvent) => {
|
|
188
182
|
onChangeText?.(event.target.value);
|
|
189
183
|
onChange?.(event);
|
|
190
|
-
};
|
|
184
|
+
});
|
|
191
185
|
|
|
192
186
|
const options = getParsedComboboxData(data).map((item, index) => (
|
|
193
187
|
<NativeSelectOption key={isComboboxGroup(item) ? `group-${index}` : item.value} data={item} />
|
|
@@ -204,14 +198,12 @@ const NativeSelectControl = React.forwardRef<NativeSelectRef, NativeSelectContro
|
|
|
204
198
|
onInput,
|
|
205
199
|
onKeyDown,
|
|
206
200
|
onChange: onChangeText || onChange ? handleChange : undefined,
|
|
207
|
-
style,
|
|
208
201
|
...rest,
|
|
202
|
+
// This entry is web-only (`.native.tsx` is the RN sibling).
|
|
203
|
+
style:
|
|
204
|
+
style && typeof style === "object" ? { ...APPEARANCE_NONE, ...style } : APPEARANCE_NONE,
|
|
209
205
|
};
|
|
210
206
|
|
|
211
|
-
const mergedStyle = isWeb
|
|
212
|
-
? { appearance: "none" as const, ...(typeof style === "object" ? style : {}) }
|
|
213
|
-
: style;
|
|
214
|
-
|
|
215
207
|
return (
|
|
216
208
|
<InputChrome
|
|
217
209
|
size={effectiveSize}
|
|
@@ -245,8 +237,6 @@ const NativeSelectControl = React.forwardRef<NativeSelectRef, NativeSelectContro
|
|
|
245
237
|
>
|
|
246
238
|
<SelectInput
|
|
247
239
|
ref={composedRef as React.Ref<TamaguiElement>}
|
|
248
|
-
flex={1}
|
|
249
|
-
minWidth={0}
|
|
250
240
|
size={effectiveSize}
|
|
251
241
|
{...getInputSectionInsets({
|
|
252
242
|
leftSection,
|
|
@@ -260,7 +250,6 @@ const NativeSelectControl = React.forwardRef<NativeSelectRef, NativeSelectContro
|
|
|
260
250
|
__defaultRightSection: true,
|
|
261
251
|
})}
|
|
262
252
|
{...selectHostProps}
|
|
263
|
-
style={mergedStyle}
|
|
264
253
|
>
|
|
265
254
|
{children ?? options}
|
|
266
255
|
</SelectInput>
|
package/src/NavLink/NavLink.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import { type GetProps, styled, withStaticProperties } from "@knitui/core";
|
|
3
|
+
import { type GetProps, styleable, styled, withStaticProperties } from "@knitui/core";
|
|
4
4
|
import { useKeyboardActions, useUncontrolled } from "@knitui/hooks";
|
|
5
5
|
|
|
6
6
|
import { Box } from "../Box";
|
|
@@ -16,34 +16,39 @@ export type NavLinkVariant = "filled" | "light" | "subtle";
|
|
|
16
16
|
/* -------------------------------------------------------------------------- */
|
|
17
17
|
|
|
18
18
|
const NavLinkRoot = styled(Box, {
|
|
19
|
-
|
|
19
|
+
displayName: "NavLink",
|
|
20
20
|
flexDirection: "row",
|
|
21
21
|
alignItems: "center",
|
|
22
|
-
paddingHorizontal: "
|
|
23
|
-
paddingVertical: "
|
|
24
|
-
borderRadius: "
|
|
25
|
-
gap: "
|
|
22
|
+
paddingHorizontal: "sm",
|
|
23
|
+
paddingVertical: "xs",
|
|
24
|
+
borderRadius: "xs",
|
|
25
|
+
gap: "xs",
|
|
26
26
|
...webCursor("pointer"),
|
|
27
27
|
userSelect: "none",
|
|
28
28
|
|
|
29
29
|
variants: {
|
|
30
30
|
variant: {
|
|
31
31
|
filled: {
|
|
32
|
-
|
|
33
|
-
pressStyle: { backgroundColor: "$color5" },
|
|
32
|
+
backgroundColor: "hover:color4 press:color5",
|
|
34
33
|
},
|
|
35
34
|
light: {
|
|
36
|
-
|
|
37
|
-
pressStyle: { backgroundColor: "$color4" },
|
|
35
|
+
backgroundColor: "hover:color3 press:color4",
|
|
38
36
|
},
|
|
39
37
|
subtle: {
|
|
40
|
-
|
|
41
|
-
pressStyle: { backgroundColor: "$color4" },
|
|
38
|
+
backgroundColor: "hover:color3 press:color4",
|
|
42
39
|
},
|
|
43
40
|
},
|
|
44
41
|
active: {
|
|
45
42
|
true: {},
|
|
46
43
|
},
|
|
44
|
+
// The active fill per variant, a static body each (the render passes
|
|
45
|
+
// `activeFill={active ? variant : undefined}`). Declared after `variant`, so
|
|
46
|
+
// its clauses replace that variant's hover/press slots.
|
|
47
|
+
activeFill: {
|
|
48
|
+
filled: { backgroundColor: "color9 hover:color10 press:color8" },
|
|
49
|
+
light: { backgroundColor: "color4 hover:color5 press:color6" },
|
|
50
|
+
subtle: { backgroundColor: "transparent" },
|
|
51
|
+
},
|
|
47
52
|
disabled: {
|
|
48
53
|
true: { opacity: 0.4, pointerEvents: "none" },
|
|
49
54
|
},
|
|
@@ -54,30 +59,40 @@ const NavLinkRoot = styled(Box, {
|
|
|
54
59
|
});
|
|
55
60
|
|
|
56
61
|
const NavLinkBody = styled(Box, {
|
|
57
|
-
|
|
62
|
+
displayName: "NavLinkBody",
|
|
58
63
|
flex: 1,
|
|
59
64
|
flexDirection: "column",
|
|
60
65
|
justifyContent: "center",
|
|
61
66
|
});
|
|
62
67
|
|
|
63
68
|
const NavLinkLabel = styled(Text, {
|
|
64
|
-
|
|
65
|
-
fontSize: "
|
|
69
|
+
displayName: "NavLinkLabel",
|
|
70
|
+
fontSize: "sm",
|
|
71
|
+
color: "color",
|
|
66
72
|
userSelect: "none",
|
|
67
|
-
|
|
73
|
+
|
|
74
|
+
variants: {
|
|
75
|
+
// Label text on the filled accent background.
|
|
76
|
+
onAccent: {
|
|
77
|
+
true: { color: "color1" },
|
|
78
|
+
},
|
|
79
|
+
} as const,
|
|
68
80
|
});
|
|
69
81
|
|
|
82
|
+
/** `noWrap`: truncate the label / description to one line. */
|
|
83
|
+
const NO_WRAP = { numberOfLines: 1 } as const;
|
|
84
|
+
|
|
70
85
|
const NavLinkDescription = styled(Text, {
|
|
71
|
-
|
|
72
|
-
fontSize: "
|
|
73
|
-
color: "
|
|
86
|
+
displayName: "NavLinkDescription",
|
|
87
|
+
fontSize: "xs",
|
|
88
|
+
color: "color",
|
|
74
89
|
opacity: 0.65,
|
|
75
90
|
userSelect: "none",
|
|
76
91
|
numberOfLines: 2,
|
|
77
92
|
});
|
|
78
93
|
|
|
79
94
|
const NavLinkSection = styled(Box, {
|
|
80
|
-
|
|
95
|
+
displayName: "NavLinkSection",
|
|
81
96
|
alignItems: "center",
|
|
82
97
|
justifyContent: "center",
|
|
83
98
|
flexShrink: 0,
|
|
@@ -85,16 +100,16 @@ const NavLinkSection = styled(Box, {
|
|
|
85
100
|
|
|
86
101
|
/** The chevron indicator — rotates when the nav link is expanded. */
|
|
87
102
|
const NavLinkChevron = styled(Text, {
|
|
88
|
-
|
|
89
|
-
fontSize: "
|
|
90
|
-
color: "
|
|
103
|
+
displayName: "NavLinkChevron",
|
|
104
|
+
fontSize: "xs",
|
|
105
|
+
color: "color",
|
|
91
106
|
userSelect: "none",
|
|
92
107
|
});
|
|
93
108
|
|
|
94
109
|
const NavLinkChildren = styled(Box, {
|
|
95
|
-
|
|
110
|
+
displayName: "NavLinkChildren",
|
|
96
111
|
flexDirection: "column",
|
|
97
|
-
paddingLeft: "
|
|
112
|
+
paddingLeft: "lg",
|
|
98
113
|
});
|
|
99
114
|
|
|
100
115
|
/* -------------------------------------------------------------------------- */
|
|
@@ -103,8 +118,8 @@ const NavLinkChildren = styled(Box, {
|
|
|
103
118
|
|
|
104
119
|
/**
|
|
105
120
|
* Named style slots (Pillar B / `internal/styles.ts`). Each key maps to the props
|
|
106
|
-
* of the styled part it targets, so `styles={{ label: { color: "
|
|
107
|
-
* sugar for `<NavLink.Label color="
|
|
121
|
+
* of the styled part it targets, so `styles={{ label: { color: "red9" } }}` is
|
|
122
|
+
* sugar for `<NavLink.Label color="red9" />`. The `leftSection`/`rightSection`
|
|
108
123
|
* keys both target the `NavLink.Section` part (the two positional sections share
|
|
109
124
|
* one styled part); `chevron` targets the auto-chevron shown when children exist.
|
|
110
125
|
*/
|
|
@@ -145,6 +160,7 @@ type NavLinkRootProps = Omit<
|
|
|
145
160
|
GetProps<typeof NavLinkRoot>,
|
|
146
161
|
| "variant"
|
|
147
162
|
| "active"
|
|
163
|
+
| "activeFill"
|
|
148
164
|
| "children"
|
|
149
165
|
| "disabled"
|
|
150
166
|
| "onChange"
|
|
@@ -179,7 +195,7 @@ export interface NavLinkProps extends NavLinkRootProps {
|
|
|
179
195
|
disableRightSectionRotation?: boolean;
|
|
180
196
|
/** Keep nested children mounted when collapsed. @default true */
|
|
181
197
|
keepMounted?: boolean;
|
|
182
|
-
/** Left indentation applied to nested children. @default '
|
|
198
|
+
/** Left indentation applied to nested children. @default 'lg' */
|
|
183
199
|
childrenOffset?: GetProps<typeof NavLinkChildren>["paddingLeft"];
|
|
184
200
|
/** Disables the link. @default false */
|
|
185
201
|
disabled?: boolean;
|
|
@@ -187,7 +203,7 @@ export interface NavLinkProps extends NavLinkRootProps {
|
|
|
187
203
|
styles?: SlotStyles<NavLinkStyles>;
|
|
188
204
|
}
|
|
189
205
|
|
|
190
|
-
const NavLinkComponent =
|
|
206
|
+
const NavLinkComponent = styleable<NavLinkProps>(NavLinkRoot, function NavLink(props, ref) {
|
|
191
207
|
const {
|
|
192
208
|
label,
|
|
193
209
|
description,
|
|
@@ -202,7 +218,7 @@ const NavLinkComponent = NavLinkRoot.styleable<NavLinkProps>(function NavLink(pr
|
|
|
202
218
|
onChange,
|
|
203
219
|
disableRightSectionRotation = false,
|
|
204
220
|
keepMounted = true,
|
|
205
|
-
childrenOffset = "
|
|
221
|
+
childrenOffset = "lg",
|
|
206
222
|
disabled = false,
|
|
207
223
|
onPress,
|
|
208
224
|
styles,
|
|
@@ -237,23 +253,16 @@ const NavLinkComponent = NavLinkRoot.styleable<NavLinkProps>(function NavLink(pr
|
|
|
237
253
|
// makes it focusable + activatable on web (tabIndex + Space/Enter → onActivate)
|
|
238
254
|
// and maps to accessibility actions on native; `disabled` drops it from the tab
|
|
239
255
|
// order. See the focus contract in `internal/variant-colors.ts` (`FOCUS_RING`).
|
|
256
|
+
//
|
|
240
257
|
const focusProps = useKeyboardActions({ onActivate: handlePress }, { disabled });
|
|
241
258
|
|
|
242
|
-
// Active-variant inline styles
|
|
243
|
-
const activeStyle: object = active
|
|
244
|
-
? variant === "filled"
|
|
245
|
-
? { backgroundColor: "$color9" }
|
|
246
|
-
: variant === "light"
|
|
247
|
-
? { backgroundColor: "$color4" }
|
|
248
|
-
: { backgroundColor: "transparent" }
|
|
249
|
-
: {};
|
|
250
|
-
|
|
251
259
|
return (
|
|
252
260
|
<Box {...s.get("wrapper")}>
|
|
253
261
|
<NavLinkRoot
|
|
254
262
|
ref={ref}
|
|
255
263
|
variant={variant}
|
|
256
264
|
active={active}
|
|
265
|
+
activeFill={active ? variant : undefined}
|
|
257
266
|
disabled={disabled}
|
|
258
267
|
onPress={handlePress}
|
|
259
268
|
// NavLinkRoot is a plain Box, so it owns link semantics by default.
|
|
@@ -261,8 +270,9 @@ const NavLinkComponent = NavLinkRoot.styleable<NavLinkProps>(function NavLink(pr
|
|
|
261
270
|
role="link"
|
|
262
271
|
aria-expanded={hasChildren ? isOpen : undefined}
|
|
263
272
|
aria-disabled={disabled || undefined}
|
|
273
|
+
// The active link is the current location (WAI-ARIA `aria-current`).
|
|
274
|
+
aria-current={active ? "page" : undefined}
|
|
264
275
|
{...s.get("root")}
|
|
265
|
-
{...(activeStyle as GetProps<typeof NavLinkRoot>)}
|
|
266
276
|
{...rest}
|
|
267
277
|
{...focusProps}
|
|
268
278
|
>
|
|
@@ -273,18 +283,15 @@ const NavLinkComponent = NavLinkRoot.styleable<NavLinkProps>(function NavLink(pr
|
|
|
273
283
|
<NavLinkBody {...s.get("body")}>
|
|
274
284
|
{label != null ? (
|
|
275
285
|
<NavLinkLabel
|
|
276
|
-
{
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
})}
|
|
286
|
+
onAccent={active && variant === "filled"}
|
|
287
|
+
{...(noWrap ? NO_WRAP : null)}
|
|
288
|
+
{...s.get("label")}
|
|
280
289
|
>
|
|
281
290
|
{label}
|
|
282
291
|
</NavLinkLabel>
|
|
283
292
|
) : null}
|
|
284
293
|
{description != null ? (
|
|
285
|
-
<NavLinkDescription
|
|
286
|
-
{...s.merge("description", { numberOfLines: noWrap ? 1 : undefined })}
|
|
287
|
-
>
|
|
294
|
+
<NavLinkDescription {...(noWrap ? NO_WRAP : null)} {...s.get("description")}>
|
|
288
295
|
{description}
|
|
289
296
|
</NavLinkDescription>
|
|
290
297
|
) : null}
|