@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
+
import { styleable } from "@knitui/core";
|
|
3
4
|
import { assignRef, useCallbackRef, useUncontrolled } from "@knitui/hooks";
|
|
4
5
|
|
|
5
6
|
import { InputBase, type InputBaseProps } from "../InputBase";
|
|
@@ -81,7 +82,7 @@ export interface MaskInputProps extends MaskInputBaseProps {
|
|
|
81
82
|
* comes from the Tamagui `theme` prop + palette ramp — never a Mantine `color`
|
|
82
83
|
* prop.
|
|
83
84
|
*/
|
|
84
|
-
export const MaskInput =
|
|
85
|
+
export const MaskInput = styleable<MaskInputProps>(InputBase, function MaskInput(props, ref) {
|
|
85
86
|
const {
|
|
86
87
|
mask,
|
|
87
88
|
tokens,
|
package/src/Menu/Menu.tsx
CHANGED
|
@@ -4,12 +4,13 @@ import {
|
|
|
4
4
|
type GetProps,
|
|
5
5
|
isWeb,
|
|
6
6
|
type RadiusTokens,
|
|
7
|
+
styleable,
|
|
7
8
|
styled,
|
|
8
9
|
type TamaguiElement,
|
|
9
10
|
Theme,
|
|
10
11
|
withStaticProperties,
|
|
11
12
|
} from "@knitui/core";
|
|
12
|
-
import { useMergedRef, useUncontrolled } from "@knitui/hooks";
|
|
13
|
+
import { useId, useMergedRef, useUncontrolled } from "@knitui/hooks";
|
|
13
14
|
|
|
14
15
|
import { Box } from "../Box";
|
|
15
16
|
import { ControlIconProvider } from "../internal/ControlIconProvider";
|
|
@@ -123,6 +124,10 @@ interface MenuContextValue {
|
|
|
123
124
|
* (first item, when `manageFocus`).
|
|
124
125
|
*/
|
|
125
126
|
pendingFocus: React.MutableRefObject<"first" | "last" | null>;
|
|
127
|
+
/** Id of the trigger (the dropdown's `aria-labelledby`). */
|
|
128
|
+
targetId: string;
|
|
129
|
+
/** Id of the `role="menu"` frame (the trigger's `aria-controls`). */
|
|
130
|
+
dropdownId: string;
|
|
126
131
|
/** Resolved per-slot style sugar, distributed onto the parts that read it. */
|
|
127
132
|
slots: {
|
|
128
133
|
dropdown?: GetProps<typeof MenuDropdownFrame>;
|
|
@@ -347,6 +352,9 @@ function MenuRoot(props: MenuProps) {
|
|
|
347
352
|
const resolvedTrapFocus = trapFocus ?? manageFocus;
|
|
348
353
|
const resolvedReturnFocus = returnFocus ?? manageFocus;
|
|
349
354
|
const pendingFocus = React.useRef<"first" | "last" | null>(null);
|
|
355
|
+
const uid = useId();
|
|
356
|
+
const targetId = `${uid}-target`;
|
|
357
|
+
const dropdownId = `${uid}-dropdown`;
|
|
350
358
|
|
|
351
359
|
// Delayed open/close for hover triggers. A single timer is enough since open
|
|
352
360
|
// and close are mutually exclusive intents.
|
|
@@ -391,6 +399,8 @@ function MenuRoot(props: MenuProps) {
|
|
|
391
399
|
loop,
|
|
392
400
|
manageFocus,
|
|
393
401
|
pendingFocus,
|
|
402
|
+
targetId,
|
|
403
|
+
dropdownId,
|
|
394
404
|
slots: {
|
|
395
405
|
dropdown: dropdownSlot,
|
|
396
406
|
item: itemSlot,
|
|
@@ -412,6 +422,8 @@ function MenuRoot(props: MenuProps) {
|
|
|
412
422
|
menuItemTabIndex,
|
|
413
423
|
loop,
|
|
414
424
|
manageFocus,
|
|
425
|
+
targetId,
|
|
426
|
+
dropdownId,
|
|
415
427
|
dropdownSlot,
|
|
416
428
|
itemSlot,
|
|
417
429
|
itemLabelSlot,
|
|
@@ -469,29 +481,37 @@ export interface MenuTargetProps {
|
|
|
469
481
|
refProp?: string;
|
|
470
482
|
}
|
|
471
483
|
|
|
472
|
-
type HoverHandlers = {
|
|
484
|
+
type HoverHandlers = {
|
|
485
|
+
onHoverIn?: () => void;
|
|
486
|
+
onHoverOut?: () => void;
|
|
487
|
+
onMouseEnter?: () => void;
|
|
488
|
+
onMouseLeave?: () => void;
|
|
489
|
+
};
|
|
473
490
|
type KeyHandlers = { onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void };
|
|
474
491
|
|
|
475
492
|
function MenuTarget({ children, refProp = "ref" }: MenuTargetProps) {
|
|
476
493
|
const ctx = useMenuContext();
|
|
477
494
|
const hover = ctx.trigger === "hover" || ctx.trigger === "click-hover";
|
|
478
495
|
|
|
479
|
-
// For hover triggers, open/close on pointer enter/leave
|
|
480
|
-
//
|
|
481
|
-
//
|
|
482
|
-
//
|
|
483
|
-
// `
|
|
496
|
+
// For hover triggers, open/close on pointer enter/leave. Press always toggles
|
|
497
|
+
// via Popover.Target, which keeps the menu keyboard/touch accessible. Compose
|
|
498
|
+
// with the child's own handlers so a consumer's are never dropped: on web the
|
|
499
|
+
// listeners are `onMouseEnter`/`onMouseLeave` (v3 does not wire `onHoverIn`/
|
|
500
|
+
// `onHoverOut` alone — see `hoverProps`), so the child's same-named
|
|
501
|
+
// mouse handler is chained and its own `onHoverIn`/`onHoverOut` stay untouched
|
|
502
|
+
// (Tamagui still fires them); on native the `onHoverIn`/`onHoverOut` pair is
|
|
503
|
+
// chained instead.
|
|
484
504
|
const childProps = children.props as HoverHandlers & KeyHandlers;
|
|
485
505
|
const withHover = hover
|
|
486
506
|
? React.cloneElement(
|
|
487
507
|
children,
|
|
488
508
|
hoverProps({
|
|
489
509
|
onHoverIn: () => {
|
|
490
|
-
childProps.onHoverIn?.();
|
|
510
|
+
(isWeb ? childProps.onMouseEnter : childProps.onHoverIn)?.();
|
|
491
511
|
ctx.openWithDelay();
|
|
492
512
|
},
|
|
493
513
|
onHoverOut: () => {
|
|
494
|
-
childProps.onHoverOut?.();
|
|
514
|
+
(isWeb ? childProps.onMouseLeave : childProps.onHoverOut)?.();
|
|
495
515
|
ctx.closeWithDelay();
|
|
496
516
|
},
|
|
497
517
|
}) as Partial<HoverHandlers> & React.Attributes,
|
|
@@ -517,9 +537,42 @@ function MenuTarget({ children, refProp = "ref" }: MenuTargetProps) {
|
|
|
517
537
|
ctx.open();
|
|
518
538
|
};
|
|
519
539
|
|
|
520
|
-
|
|
540
|
+
// ARIA menu-button wiring: the trigger names the popup kind, its open state and
|
|
541
|
+
// (while open) the menu it controls; the menu points back via `aria-labelledby`.
|
|
542
|
+
const ariaProps = {
|
|
543
|
+
id: ctx.targetId,
|
|
544
|
+
"aria-haspopup": "menu" as const,
|
|
545
|
+
"aria-expanded": ctx.opened,
|
|
546
|
+
...(ctx.opened ? { "aria-controls": ctx.dropdownId } : null),
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
// Hover triggers: a press only OPENS (Mantine's `click-hover` semantics). The
|
|
550
|
+
// pointer's hover-in has already opened the menu by the time the click lands, so
|
|
551
|
+
// a toggling press would shut it again under the cursor. Press-to-open keeps
|
|
552
|
+
// the menu reachable by touch and keyboard (Enter/Space); Escape, an outside
|
|
553
|
+
// press or hovering out close it.
|
|
554
|
+
const childOnPress = (children.props as { onPress?: (event: unknown) => void }).onPress;
|
|
555
|
+
const pressProps = hover
|
|
556
|
+
? {
|
|
557
|
+
onPress: (event: unknown) => {
|
|
558
|
+
childOnPress?.(event);
|
|
559
|
+
ctx.clearTimer();
|
|
560
|
+
if (!ctx.opened) ctx.open();
|
|
561
|
+
},
|
|
562
|
+
}
|
|
563
|
+
: null;
|
|
564
|
+
|
|
565
|
+
const withKeys = React.cloneElement(withHover, {
|
|
566
|
+
onKeyDown,
|
|
567
|
+
...ariaProps,
|
|
568
|
+
...pressProps,
|
|
569
|
+
} as KeyHandlers & typeof ariaProps & React.Attributes);
|
|
521
570
|
|
|
522
|
-
return
|
|
571
|
+
return (
|
|
572
|
+
<Popover.Target refProp={refProp} withPressToggle={!hover}>
|
|
573
|
+
{withKeys}
|
|
574
|
+
</Popover.Target>
|
|
575
|
+
);
|
|
523
576
|
}
|
|
524
577
|
|
|
525
578
|
/* -------------------------------------------------------------------------- */
|
|
@@ -527,25 +580,34 @@ function MenuTarget({ children, refProp = "ref" }: MenuTargetProps) {
|
|
|
527
580
|
/* -------------------------------------------------------------------------- */
|
|
528
581
|
|
|
529
582
|
const MenuDropdownFrame = styled(Box, {
|
|
530
|
-
|
|
583
|
+
displayName: "MenuDropdown",
|
|
531
584
|
flexDirection: "column",
|
|
532
|
-
paddingVertical: "
|
|
533
|
-
paddingHorizontal: "
|
|
585
|
+
paddingVertical: "xs",
|
|
586
|
+
paddingHorizontal: "xs",
|
|
534
587
|
minWidth: 180,
|
|
535
|
-
gap: "
|
|
588
|
+
gap: "xxs",
|
|
536
589
|
});
|
|
537
590
|
|
|
538
591
|
export interface MenuDropdownProps extends GetProps<typeof MenuDropdownFrame> {}
|
|
539
592
|
|
|
540
|
-
const MenuDropdown =
|
|
593
|
+
const MenuDropdown = styleable<MenuDropdownProps>(
|
|
594
|
+
MenuDropdownFrame,
|
|
541
595
|
function MenuDropdown(props, ref) {
|
|
542
596
|
const { children, ...rest } = props;
|
|
543
597
|
const ctx = useMenuContext();
|
|
544
598
|
const hover = ctx.trigger === "hover" || ctx.trigger === "click-hover";
|
|
545
599
|
|
|
546
|
-
// Keep the menu open while the pointer is inside the dropdown (hover triggers)
|
|
600
|
+
// Keep the menu open while the pointer is inside the dropdown (hover triggers):
|
|
601
|
+
// entering cancels the close the trigger's hover-out just scheduled (`open()`
|
|
602
|
+
// alone left that timer armed, so the menu shut under the pointer).
|
|
547
603
|
const hoverHandlers = hover
|
|
548
|
-
? hoverProps({
|
|
604
|
+
? hoverProps({
|
|
605
|
+
onHoverIn: () => {
|
|
606
|
+
ctx.clearTimer();
|
|
607
|
+
ctx.open();
|
|
608
|
+
},
|
|
609
|
+
onHoverOut: ctx.closeWithDelay,
|
|
610
|
+
})
|
|
549
611
|
: undefined;
|
|
550
612
|
|
|
551
613
|
/*
|
|
@@ -603,6 +665,8 @@ const MenuDropdown = MenuDropdownFrame.styleable<MenuDropdownProps>(
|
|
|
603
665
|
{...ctx.slots.dropdown}
|
|
604
666
|
{...rest}
|
|
605
667
|
role="menu"
|
|
668
|
+
id={ctx.dropdownId}
|
|
669
|
+
aria-labelledby={ctx.targetId}
|
|
606
670
|
onKeyDown={onKeyDown}
|
|
607
671
|
>
|
|
608
672
|
{children}
|
|
@@ -617,17 +681,17 @@ const MenuDropdown = MenuDropdownFrame.styleable<MenuDropdownProps>(
|
|
|
617
681
|
/* -------------------------------------------------------------------------- */
|
|
618
682
|
|
|
619
683
|
const MenuItemFrame = styled(Box, {
|
|
620
|
-
|
|
684
|
+
displayName: "MenuItem",
|
|
621
685
|
role: "menuitem",
|
|
622
686
|
flexDirection: "row",
|
|
623
687
|
alignItems: "center",
|
|
624
|
-
gap: "
|
|
625
|
-
paddingVertical: "
|
|
626
|
-
paddingHorizontal: "
|
|
627
|
-
borderRadius: "
|
|
688
|
+
gap: "sm",
|
|
689
|
+
paddingVertical: "xs",
|
|
690
|
+
paddingHorizontal: "sm",
|
|
691
|
+
borderRadius: "xs",
|
|
628
692
|
...webCursor("pointer"),
|
|
629
|
-
|
|
630
|
-
|
|
693
|
+
backgroundColor: "hover:color4 press:color5",
|
|
694
|
+
|
|
631
695
|
...focusRingStyle,
|
|
632
696
|
|
|
633
697
|
variants: {
|
|
@@ -636,7 +700,7 @@ const MenuItemFrame = styled(Box, {
|
|
|
636
700
|
opacity: 0.5,
|
|
637
701
|
pointerEvents: "none",
|
|
638
702
|
...webCursor("default"),
|
|
639
|
-
|
|
703
|
+
backgroundColor: "hover:transparent",
|
|
640
704
|
},
|
|
641
705
|
},
|
|
642
706
|
} as const,
|
|
@@ -645,15 +709,15 @@ const MenuItemFrame = styled(Box, {
|
|
|
645
709
|
});
|
|
646
710
|
|
|
647
711
|
const MenuItemLabel = styled(Text, {
|
|
648
|
-
|
|
712
|
+
displayName: "MenuItemLabel",
|
|
649
713
|
flex: 1,
|
|
650
|
-
fontSize: "
|
|
651
|
-
color: "
|
|
714
|
+
fontSize: "sm",
|
|
715
|
+
color: "color12",
|
|
652
716
|
userSelect: "none",
|
|
653
717
|
});
|
|
654
718
|
|
|
655
719
|
const MenuItemSection = styled(Box, {
|
|
656
|
-
|
|
720
|
+
displayName: "MenuItemSection",
|
|
657
721
|
alignItems: "center",
|
|
658
722
|
justifyContent: "center",
|
|
659
723
|
});
|
|
@@ -675,7 +739,7 @@ export interface MenuItemProps extends MenuItemFrameProps {
|
|
|
675
739
|
onPress?: (event: unknown) => void;
|
|
676
740
|
}
|
|
677
741
|
|
|
678
|
-
const MenuItemComponent =
|
|
742
|
+
const MenuItemComponent = styleable<MenuItemProps>(MenuItemFrame, function MenuItem(props, ref) {
|
|
679
743
|
const ctx = useMenuContext();
|
|
680
744
|
const { children, leftSection, rightSection, disabled, closeMenuOnClick, onPress, ...rest } =
|
|
681
745
|
props;
|
|
@@ -719,11 +783,11 @@ const MenuItemComponent = MenuItemFrame.styleable<MenuItemProps>(function MenuIt
|
|
|
719
783
|
onPress={handlePress}
|
|
720
784
|
>
|
|
721
785
|
{/* Menu items are subtle/text-colored: any `@knitui/icons` icon in a section
|
|
722
|
-
auto-sizes to the
|
|
786
|
+
auto-sizes to the `sm` label font and takes the label's `color12`
|
|
723
787
|
foreground (an explicit `color` here overrides the `subtle` variant fg). */}
|
|
724
788
|
{leftSection ? (
|
|
725
789
|
<MenuItemSection {...sectionSlot}>
|
|
726
|
-
<ControlIconProvider size="sm" variant="subtle" color="
|
|
790
|
+
<ControlIconProvider size="sm" variant="subtle" color="color12">
|
|
727
791
|
{leftSection}
|
|
728
792
|
</ControlIconProvider>
|
|
729
793
|
</MenuItemSection>
|
|
@@ -731,7 +795,7 @@ const MenuItemComponent = MenuItemFrame.styleable<MenuItemProps>(function MenuIt
|
|
|
731
795
|
{renderTextChild(children, LabelWrapper)}
|
|
732
796
|
{rightSection ? (
|
|
733
797
|
<MenuItemSection {...sectionSlot}>
|
|
734
|
-
<ControlIconProvider size="sm" variant="subtle" color="
|
|
798
|
+
<ControlIconProvider size="sm" variant="subtle" color="color12">
|
|
735
799
|
{rightSection}
|
|
736
800
|
</ControlIconProvider>
|
|
737
801
|
</MenuItemSection>
|
|
@@ -745,12 +809,12 @@ const MenuItemComponent = MenuItemFrame.styleable<MenuItemProps>(function MenuIt
|
|
|
745
809
|
/* -------------------------------------------------------------------------- */
|
|
746
810
|
|
|
747
811
|
const MenuLabel = styled(Text, {
|
|
748
|
-
|
|
749
|
-
paddingVertical: "
|
|
750
|
-
paddingHorizontal: "
|
|
751
|
-
fontSize: "
|
|
812
|
+
displayName: "MenuLabel",
|
|
813
|
+
paddingVertical: "xs",
|
|
814
|
+
paddingHorizontal: "sm",
|
|
815
|
+
fontSize: "xs",
|
|
752
816
|
fontWeight: "600",
|
|
753
|
-
color: "
|
|
817
|
+
color: "color11",
|
|
754
818
|
userSelect: "none",
|
|
755
819
|
});
|
|
756
820
|
|
|
@@ -758,23 +822,24 @@ export type MenuLabelProps = GetProps<typeof MenuLabel>;
|
|
|
758
822
|
|
|
759
823
|
// Wrap the styled frame so the `label` slot sugar (carried on context) reaches it;
|
|
760
824
|
// the inline `...rest` props win over the slot ("explicit beats sugar").
|
|
761
|
-
const MenuLabelComponent =
|
|
825
|
+
const MenuLabelComponent = styleable<MenuLabelProps>(MenuLabel, function MenuLabelSlot(props, ref) {
|
|
762
826
|
const ctx = useMenuContext();
|
|
763
827
|
return <MenuLabel ref={ref} {...ctx.slots.label} {...props} />;
|
|
764
828
|
});
|
|
765
829
|
|
|
766
830
|
const MenuDivider = styled(Box, {
|
|
767
|
-
|
|
831
|
+
displayName: "MenuDivider",
|
|
768
832
|
height: 1,
|
|
769
|
-
marginVertical: "
|
|
770
|
-
marginHorizontal:
|
|
771
|
-
backgroundColor: "
|
|
833
|
+
marginVertical: "xs",
|
|
834
|
+
marginHorizontal: 0,
|
|
835
|
+
backgroundColor: "borderColor",
|
|
772
836
|
});
|
|
773
837
|
|
|
774
838
|
export type MenuDividerProps = GetProps<typeof MenuDivider>;
|
|
775
839
|
|
|
776
840
|
// Wrap the styled frame so the `divider` slot sugar (carried on context) reaches it.
|
|
777
|
-
const MenuDividerComponent =
|
|
841
|
+
const MenuDividerComponent = styleable<MenuDividerProps>(
|
|
842
|
+
MenuDivider,
|
|
778
843
|
function MenuDividerSlot(props, ref) {
|
|
779
844
|
const ctx = useMenuContext();
|
|
780
845
|
return <MenuDivider ref={ref} {...ctx.slots.divider} {...props} />;
|
package/src/Modal/Modal.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import { useSharedValue, type WithSpringConfig } from "react-native-reanimated";
|
|
|
5
5
|
import {
|
|
6
6
|
type GetProps,
|
|
7
7
|
isWeb,
|
|
8
|
+
styleable,
|
|
8
9
|
styled,
|
|
9
10
|
type TamaguiElement,
|
|
10
11
|
withStaticProperties,
|
|
@@ -38,6 +39,9 @@ import {
|
|
|
38
39
|
|
|
39
40
|
export type ModalSize = SizeKey;
|
|
40
41
|
|
|
42
|
+
/** The full-screen width override, hoisted so the spread allocates nothing. */
|
|
43
|
+
const FULL_WIDTH = { maxWidth: "100%" } as const;
|
|
44
|
+
|
|
41
45
|
/**
|
|
42
46
|
* Default enter/exit motion for the content panel — a subtle 8px drop-in fade,
|
|
43
47
|
* matching Mantine. Override per instance via the `animation` prop (a preset name,
|
|
@@ -46,9 +50,9 @@ export type ModalSize = SizeKey;
|
|
|
46
50
|
*/
|
|
47
51
|
const DEFAULT_MODAL_MOTION: MotionPreset = {
|
|
48
52
|
transition: "fast",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
enter: { opacity: 0, y: -DISTANCES.nudge },
|
|
54
|
+
exit: { opacity: 0, y: -DISTANCES.nudge },
|
|
55
|
+
properties: "transform, opacity",
|
|
52
56
|
};
|
|
53
57
|
|
|
54
58
|
/* -------------------------------------------------------------------------- */
|
|
@@ -56,11 +60,11 @@ const DEFAULT_MODAL_MOTION: MotionPreset = {
|
|
|
56
60
|
/* -------------------------------------------------------------------------- */
|
|
57
61
|
|
|
58
62
|
const ModalContentFrame = styled(Box, {
|
|
59
|
-
|
|
63
|
+
displayName: "ModalContent",
|
|
60
64
|
position: "relative",
|
|
61
65
|
zIndex: 1,
|
|
62
66
|
width: "100%",
|
|
63
|
-
backgroundColor: "
|
|
67
|
+
backgroundColor: "background",
|
|
64
68
|
overflow: "hidden",
|
|
65
69
|
// Cap the panel at the viewport (minus the layer's offsets) and stack the
|
|
66
70
|
// header + body as a flex column so the header stays pinned while the body
|
|
@@ -73,9 +77,7 @@ const ModalContentFrame = styled(Box, {
|
|
|
73
77
|
variants: {
|
|
74
78
|
radius: radiusVariant,
|
|
75
79
|
shadow: shadowVariant,
|
|
76
|
-
size:
|
|
77
|
-
...modalSizeVariant,
|
|
78
|
-
},
|
|
80
|
+
size: modalSizeVariant,
|
|
79
81
|
fullScreen: {
|
|
80
82
|
// Fill the viewport via flexbox rather than percentage `width`/`height`:
|
|
81
83
|
// `flex: 1` fills the main axis and `alignSelf: "stretch"` the cross axis.
|
|
@@ -96,13 +98,13 @@ const ModalContentFrame = styled(Box, {
|
|
|
96
98
|
});
|
|
97
99
|
|
|
98
100
|
const ModalHeader = styled(Box, {
|
|
99
|
-
|
|
101
|
+
displayName: "ModalHeader",
|
|
100
102
|
flexDirection: "row",
|
|
101
103
|
justifyContent: "space-between",
|
|
102
104
|
alignItems: "center",
|
|
103
|
-
paddingHorizontal: "
|
|
104
|
-
paddingVertical: "
|
|
105
|
-
backgroundColor: "
|
|
105
|
+
paddingHorizontal: "md",
|
|
106
|
+
paddingVertical: "sm",
|
|
107
|
+
backgroundColor: "background",
|
|
106
108
|
// Pinned: never compress when the body's content overflows and scrolls.
|
|
107
109
|
flexShrink: 0,
|
|
108
110
|
|
|
@@ -110,21 +112,21 @@ const ModalHeader = styled(Box, {
|
|
|
110
112
|
// Optional hairline under the header — visually separates the pinned header
|
|
111
113
|
// from the scrolling body. Driven by the `withHeaderDivider` prop.
|
|
112
114
|
withBorder: {
|
|
113
|
-
true: { borderBottomWidth: 1, borderColor: "
|
|
115
|
+
true: { borderBottomWidth: 1, borderColor: "borderColor" },
|
|
114
116
|
},
|
|
115
117
|
} as const,
|
|
116
118
|
});
|
|
117
119
|
|
|
118
120
|
const ModalTitle = styled(Text, {
|
|
119
|
-
|
|
120
|
-
fontSize: "
|
|
121
|
+
displayName: "ModalTitle",
|
|
122
|
+
fontSize: "lg",
|
|
121
123
|
fontWeight: "600",
|
|
122
|
-
color: "
|
|
124
|
+
color: "color",
|
|
123
125
|
});
|
|
124
126
|
|
|
125
127
|
const ModalBody = styled(Box, {
|
|
126
|
-
|
|
127
|
-
padding: "
|
|
128
|
+
displayName: "ModalBody",
|
|
129
|
+
padding: "md",
|
|
128
130
|
});
|
|
129
131
|
|
|
130
132
|
/* -------------------------------------------------------------------------- */
|
|
@@ -137,6 +139,8 @@ type ModalContentFrameProps = Omit<
|
|
|
137
139
|
| "aria-label"
|
|
138
140
|
| "aria-labelledby"
|
|
139
141
|
| "aria-modal"
|
|
142
|
+
// v3 has a CSS `animation` style prop; ours is the enter/exit motion recipe.
|
|
143
|
+
| "animation"
|
|
140
144
|
| "children"
|
|
141
145
|
| "fullScreen"
|
|
142
146
|
| "maxWidth"
|
|
@@ -180,7 +184,7 @@ export interface ModalProps extends ModalBaseSharedProps, ModalContentFrameProps
|
|
|
180
184
|
closeButtonProps?: CloseButtonProps;
|
|
181
185
|
/**
|
|
182
186
|
* Inner spacing applied to the header (horizontal) and the body (all sides).
|
|
183
|
-
* A
|
|
187
|
+
* A space token (`"md"`), number, or CSS string. @default "md"
|
|
184
188
|
*/
|
|
185
189
|
padding?: BoxProps["padding"];
|
|
186
190
|
/** Render a hairline divider under the header. @default false */
|
|
@@ -199,11 +203,11 @@ export interface ModalProps extends ModalBaseSharedProps, ModalContentFrameProps
|
|
|
199
203
|
*/
|
|
200
204
|
shadow?: ModalContentProps["shadow"];
|
|
201
205
|
/**
|
|
202
|
-
* Vertical gap between the content and the viewport edges. @default "
|
|
206
|
+
* Vertical gap between the content and the viewport edges. @default "xl"
|
|
203
207
|
* (a cross-platform theme token; Mantine defaults to the web-only `5dvh`).
|
|
204
208
|
*/
|
|
205
209
|
yOffset?: BoxProps["paddingVertical"];
|
|
206
|
-
/** Horizontal gap between the content and the viewport edges. @default "
|
|
210
|
+
/** Horizontal gap between the content and the viewport edges. @default "xl" */
|
|
207
211
|
xOffset?: BoxProps["paddingHorizontal"];
|
|
208
212
|
/**
|
|
209
213
|
* Enter/exit animation — a motion preset name, an inline {@link MotionPreset},
|
|
@@ -232,7 +236,7 @@ export interface ModalProps extends ModalBaseSharedProps, ModalContentFrameProps
|
|
|
232
236
|
animationConfig?: WithSpringConfig;
|
|
233
237
|
}
|
|
234
238
|
|
|
235
|
-
const ModalBaseComponent =
|
|
239
|
+
const ModalBaseComponent = styleable<ModalProps>(ModalContentFrame, function Modal(props, ref) {
|
|
236
240
|
const {
|
|
237
241
|
"aria-describedby": describedBy,
|
|
238
242
|
"aria-label": ariaLabel,
|
|
@@ -282,7 +286,7 @@ const ModalBaseComponent = ModalContentFrame.styleable<ModalProps>(function Moda
|
|
|
282
286
|
const hasHeader = !!title || withCloseButton;
|
|
283
287
|
|
|
284
288
|
// `padding` overrides the default insets — horizontal on the header (its
|
|
285
|
-
// vertical rhythm stays
|
|
289
|
+
// vertical rhythm stays `sm`) and all sides on the body. Spread BEFORE the
|
|
286
290
|
// per-slot `styles`, so an explicit slot override still wins.
|
|
287
291
|
const headerPadding = padding !== undefined ? { paddingHorizontal: padding } : undefined;
|
|
288
292
|
const bodyPadding = padding !== undefined ? { padding } : undefined;
|
|
@@ -372,11 +376,14 @@ const ModalBaseComponent = ModalContentFrame.styleable<ModalProps>(function Moda
|
|
|
372
376
|
fullScreen={fullScreen}
|
|
373
377
|
size={size}
|
|
374
378
|
// Instance-level override beats the `size` variant's `maxWidth`, letting
|
|
375
|
-
// the full-screen panel span the full width on every platform.
|
|
376
|
-
maxWidth={
|
|
379
|
+
// the full-screen panel span the full width on every platform. Spread
|
|
380
|
+
// conditionally: in v3 an explicit `maxWidth={undefined}` at the call site
|
|
381
|
+
// CLEARS the `size` variant's cap (docs/v3/conventions.md §5).
|
|
382
|
+
{...(fullScreen ? FULL_WIDTH : null)}
|
|
377
383
|
// Concrete px safety cap on native (the styled `maxHeight:"100%"` is a no-op
|
|
378
|
-
// there — Yoga can't resolve the percentage). Web keeps the `"100%"`
|
|
379
|
-
|
|
384
|
+
// there — Yoga can't resolve the percentage). Web keeps the `"100%"` base;
|
|
385
|
+
// spread conditionally for the same explicit-undefined reason.
|
|
386
|
+
{...(useNativeAutosize && availableHeight > 0 ? { maxHeight: availableHeight } : null)}
|
|
380
387
|
radius={fullScreen ? 0 : radius}
|
|
381
388
|
shadow={shadow}
|
|
382
389
|
role="dialog"
|
|
@@ -467,8 +474,8 @@ const ModalBaseComponent = ModalContentFrame.styleable<ModalProps>(function Moda
|
|
|
467
474
|
// width via flex (no percentage sizing); otherwise centre the panel.
|
|
468
475
|
align={fullScreen ? "stretch" : "center"}
|
|
469
476
|
justify={centered ? "center" : "flex-start"}
|
|
470
|
-
paddingVertical={fullScreen ? 0 : (yOffset ?? "
|
|
471
|
-
paddingHorizontal={fullScreen ? 0 : (xOffset ?? "
|
|
477
|
+
paddingVertical={fullScreen ? 0 : (yOffset ?? "xl")}
|
|
478
|
+
paddingHorizontal={fullScreen ? 0 : (xOffset ?? "xl")}
|
|
472
479
|
>
|
|
473
480
|
{/*
|
|
474
481
|
Native height probe: an inert, inset-0 box that fills the positioning
|
|
@@ -511,8 +518,8 @@ const ModalBaseComponent = ModalContentFrame.styleable<ModalProps>(function Moda
|
|
|
511
518
|
flexDirection="column"
|
|
512
519
|
alignItems={fullScreen ? "stretch" : "center"}
|
|
513
520
|
justifyContent={centered ? "center" : "flex-start"}
|
|
514
|
-
paddingVertical={fullScreen ? 0 : (yOffset ?? "
|
|
515
|
-
paddingHorizontal={fullScreen ? 0 : (xOffset ?? "
|
|
521
|
+
paddingVertical={fullScreen ? 0 : (yOffset ?? "xl")}
|
|
522
|
+
paddingHorizontal={fullScreen ? 0 : (xOffset ?? "xl")}
|
|
516
523
|
>
|
|
517
524
|
{withOverlay !== false ? (
|
|
518
525
|
<DragDismissOverlay
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import Animated, { useAnimatedStyle } from "react-native-reanimated";
|
|
3
|
+
import { isWeb } from "@knitui/core";
|
|
3
4
|
|
|
4
5
|
import type { DragDismissHostProps } from "./types";
|
|
5
6
|
|
|
@@ -14,11 +15,15 @@ import type { DragDismissHostProps } from "./types";
|
|
|
14
15
|
*/
|
|
15
16
|
export const DragDismissHost = React.forwardRef<Animated.View, DragDismissHostProps>(
|
|
16
17
|
function DragDismissHost({ offset, axis, sign, style, pointerEvents, children }, ref) {
|
|
17
|
-
const animatedStyle = useAnimatedStyle(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const animatedStyle = useAnimatedStyle(
|
|
19
|
+
() => {
|
|
20
|
+
"worklet";
|
|
21
|
+
const t = sign * offset.value;
|
|
22
|
+
return { transform: axis === "x" ? [{ translateX: t }] : [{ translateY: t }] };
|
|
23
|
+
},
|
|
24
|
+
// Web-only deps: Reanimated 4.7 ignores them on native and warns when given.
|
|
25
|
+
isWeb ? [axis, sign] : undefined,
|
|
26
|
+
);
|
|
22
27
|
|
|
23
28
|
return (
|
|
24
29
|
<Animated.View ref={ref} style={[style, animatedStyle]} pointerEvents={pointerEvents}>
|
|
@@ -45,7 +45,8 @@ export const DragDismissHost = React.forwardRef<unknown, DragDismissHostProps>(
|
|
|
45
45
|
}, [offset, paint]);
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
|
-
|
|
48
|
+
// The layout is spread as Tamagui style props (flattenable, no inline style).
|
|
49
|
+
<Box ref={setRef as never} {...style} pointerEvents={pointerEvents}>
|
|
49
50
|
{children}
|
|
50
51
|
</Box>
|
|
51
52
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import Animated, { useAnimatedStyle } from "react-native-reanimated";
|
|
3
3
|
|
|
4
|
-
import type
|
|
4
|
+
import { isWeb, type ViewStyle } from "@knitui/core";
|
|
5
5
|
|
|
6
6
|
import { Overlay } from "../../Overlay";
|
|
7
7
|
import { dragOverlayOpacity } from "./engine";
|
|
@@ -22,10 +22,14 @@ export function DragDismissOverlay({
|
|
|
22
22
|
onPress,
|
|
23
23
|
overlayProps,
|
|
24
24
|
}: DragDismissOverlayProps) {
|
|
25
|
-
const style = useAnimatedStyle(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const style = useAnimatedStyle(
|
|
26
|
+
() => {
|
|
27
|
+
"worklet";
|
|
28
|
+
return { opacity: dragOverlayOpacity(offset.value, extent, maxOpacity) };
|
|
29
|
+
},
|
|
30
|
+
// Web-only deps: Reanimated 4.7 ignores them on native and warns when given.
|
|
31
|
+
isWeb ? [extent, maxOpacity] : undefined,
|
|
32
|
+
);
|
|
29
33
|
|
|
30
34
|
return (
|
|
31
35
|
<Animated.View style={[FILL, { zIndex: 0 }, style]} pointerEvents="box-none">
|
|
@@ -39,7 +39,12 @@ export function DragDismissOverlay({
|
|
|
39
39
|
<Box
|
|
40
40
|
ref={ref as never}
|
|
41
41
|
pointerEvents="box-none"
|
|
42
|
-
|
|
42
|
+
position="absolute"
|
|
43
|
+
top={0}
|
|
44
|
+
left={0}
|
|
45
|
+
right={0}
|
|
46
|
+
bottom={0}
|
|
47
|
+
zIndex={0}
|
|
43
48
|
>
|
|
44
49
|
<Overlay onPress={onPress} zIndex={0} {...overlayProps} />
|
|
45
50
|
</Box>
|
package/src/Modal/drag/index.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Drag-to-dismiss primitive (reanimated + RNGH), ported from `@knitui/sheet`'s
|
|
3
3
|
* gesture/animation approach and simplified to a single dismiss threshold.
|
|
4
4
|
*
|
|
5
|
-
* Lives in the `Modal` folder and is shared by `Modal` (axis `y`, sign
|
|
5
|
+
* Lives in the `Modal` folder and is shared by `Modal` (axis `y`, sign `-1`: it drags UP) and
|
|
6
6
|
* `Drawer` (per-edge axis/sign, imported via `../Modal/drag`). The pure math is in
|
|
7
7
|
* `./engine`; the gesture in `./useDragDismiss`; the animated translate host and
|
|
8
8
|
* the offset-driven scrim are platform-split (`*.tsx` native / `*.web.tsx`).
|
|
@@ -10,7 +10,12 @@
|
|
|
10
10
|
export { DragDismissHost } from "./DragDismissHost";
|
|
11
11
|
export { DragDismissOverlay } from "./DragDismissOverlay";
|
|
12
12
|
export { type DismissDecisionInput, dragOverlayOpacity, shouldDismiss } from "./engine";
|
|
13
|
-
export type {
|
|
13
|
+
export type {
|
|
14
|
+
DragDismissHostProps,
|
|
15
|
+
DragDismissOverlayProps,
|
|
16
|
+
DragHostLayout,
|
|
17
|
+
PointerEventsMode,
|
|
18
|
+
} from "./types";
|
|
14
19
|
export {
|
|
15
20
|
DEFAULT_DISMISS_SPRING,
|
|
16
21
|
type DragAxis,
|