@knitui/components 0.13.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/commonjs/Accordion/Accordion.js +78 -96
- package/lib/commonjs/Accordion/Accordion.js.map +1 -1
- package/lib/commonjs/ActionIcon/ActionIcon.js +127 -61
- package/lib/commonjs/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/commonjs/Affix/Affix.js +16 -20
- package/lib/commonjs/Affix/Affix.js.map +1 -1
- package/lib/commonjs/Alert/Alert.js +53 -53
- package/lib/commonjs/Alert/Alert.js.map +1 -1
- package/lib/commonjs/Anchor/Anchor.js +12 -15
- package/lib/commonjs/Anchor/Anchor.js.map +1 -1
- package/lib/commonjs/AngleSlider/AngleSlider.js +65 -37
- package/lib/commonjs/AngleSlider/AngleSlider.js.map +1 -1
- package/lib/commonjs/AspectRatio/AspectRatio.js +12 -15
- package/lib/commonjs/AspectRatio/AspectRatio.js.map +1 -1
- package/lib/commonjs/Autocomplete/Autocomplete.js +7 -3
- package/lib/commonjs/Autocomplete/Autocomplete.js.map +1 -1
- package/lib/commonjs/Avatar/Avatar.js +27 -24
- package/lib/commonjs/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/BackgroundImage/BackgroundImage.js +15 -6
- package/lib/commonjs/BackgroundImage/BackgroundImage.js.map +1 -1
- package/lib/commonjs/Badge/Badge.js +59 -48
- package/lib/commonjs/Badge/Badge.js.map +1 -1
- package/lib/commonjs/Blockquote/Blockquote.js +80 -79
- package/lib/commonjs/Blockquote/Blockquote.js.map +1 -1
- package/lib/commonjs/Box/Box.js +2 -2
- package/lib/commonjs/Box/Box.js.map +1 -1
- package/lib/commonjs/Breadcrumbs/Breadcrumbs.js +9 -9
- package/lib/commonjs/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/commonjs/Burger/Burger.js +31 -20
- package/lib/commonjs/Burger/Burger.js.map +1 -1
- package/lib/commonjs/Button/Button.js +104 -62
- package/lib/commonjs/Button/Button.js.map +1 -1
- package/lib/commonjs/Card/Card.js +49 -37
- package/lib/commonjs/Card/Card.js.map +1 -1
- package/lib/commonjs/Center/Center.js +2 -2
- package/lib/commonjs/Center/Center.js.map +1 -1
- package/lib/commonjs/Checkbox/CheckIcon.js +5 -4
- package/lib/commonjs/Checkbox/CheckIcon.js.map +1 -1
- package/lib/commonjs/Checkbox/Checkbox.js +98 -68
- package/lib/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/Chip/Chip.js +34 -67
- package/lib/commonjs/Chip/Chip.js.map +1 -1
- package/lib/commonjs/CloseButton/CloseButton.js +11 -4
- package/lib/commonjs/CloseButton/CloseButton.js.map +1 -1
- package/lib/commonjs/Code/Code.js +14 -10
- package/lib/commonjs/Code/Code.js.map +1 -1
- package/lib/commonjs/Collapse/Collapse.js +10 -4
- package/lib/commonjs/Collapse/Collapse.js.map +1 -1
- package/lib/commonjs/ColorInput/ColorInput.js +25 -20
- package/lib/commonjs/ColorInput/ColorInput.js.map +1 -1
- package/lib/commonjs/ColorPicker/ColorPicker.js +95 -83
- package/lib/commonjs/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/commonjs/ColorSwatch/ColorSwatch.js +12 -14
- package/lib/commonjs/ColorSwatch/ColorSwatch.js.map +1 -1
- package/lib/commonjs/Combobox/Combobox.js +194 -187
- package/lib/commonjs/Combobox/Combobox.js.map +1 -1
- package/lib/commonjs/Combobox/OptionsDropdown.js +12 -6
- package/lib/commonjs/Combobox/OptionsDropdown.js.map +1 -1
- package/lib/commonjs/Combobox/index.js +6 -0
- package/lib/commonjs/Combobox/index.js.map +1 -1
- package/lib/commonjs/Container/Container.js +12 -19
- package/lib/commonjs/Container/Container.js.map +1 -1
- package/lib/commonjs/Dialog/Dialog.js +15 -14
- package/lib/commonjs/Dialog/Dialog.js.map +1 -1
- package/lib/commonjs/Drawer/Drawer.js +51 -32
- package/lib/commonjs/Drawer/Drawer.js.map +1 -1
- package/lib/commonjs/Fieldset/Fieldset.js +26 -18
- package/lib/commonjs/Fieldset/Fieldset.js.map +1 -1
- package/lib/commonjs/FileButton/FileButton.js +5 -3
- package/lib/commonjs/FileButton/FileButton.js.map +1 -1
- package/lib/commonjs/Flex/Flex.js +24 -27
- package/lib/commonjs/Flex/Flex.js.map +1 -1
- package/lib/commonjs/FocusTrap/FocusTrap.js +4 -3
- package/lib/commonjs/FocusTrap/FocusTrap.js.map +1 -1
- package/lib/commonjs/Grid/Grid.js +21 -18
- package/lib/commonjs/Grid/Grid.js.map +1 -1
- package/lib/commonjs/Group/Group.js +3 -3
- package/lib/commonjs/Group/Group.js.map +1 -1
- package/lib/commonjs/Highlight/Highlight.js +2 -1
- package/lib/commonjs/Highlight/Highlight.js.map +1 -1
- package/lib/commonjs/HoverCard/HoverCard.js +6 -23
- package/lib/commonjs/HoverCard/HoverCard.js.map +1 -1
- package/lib/commonjs/Image/Image.js +197 -22
- package/lib/commonjs/Image/Image.js.map +1 -1
- package/lib/commonjs/Image/Image.native.js +41 -0
- package/lib/commonjs/Image/Image.native.js.map +1 -0
- package/lib/commonjs/Image/createImage.js +92 -59
- package/lib/commonjs/Image/createImage.js.map +1 -1
- package/lib/commonjs/Indicator/Indicator.js +36 -29
- package/lib/commonjs/Indicator/Indicator.js.map +1 -1
- package/lib/commonjs/Input/Input.js +87 -119
- package/lib/commonjs/Input/Input.js.map +1 -1
- package/lib/commonjs/Input/Input.native.js +40 -30
- package/lib/commonjs/Input/Input.native.js.map +1 -1
- package/lib/commonjs/Input/shared.js +148 -225
- package/lib/commonjs/Input/shared.js.map +1 -1
- package/lib/commonjs/InputBase/InputBase.js +2 -1
- package/lib/commonjs/InputBase/InputBase.js.map +1 -1
- package/lib/commonjs/Kbd/Kbd.js +12 -18
- package/lib/commonjs/Kbd/Kbd.js.map +1 -1
- package/lib/commonjs/KeyboardAvoidingView/KeyboardAvoidingView.native.js +2 -2
- package/lib/commonjs/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -1
- package/lib/commonjs/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js +1 -1
- package/lib/commonjs/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js.map +1 -1
- package/lib/commonjs/List/List.js +10 -10
- package/lib/commonjs/List/List.js.map +1 -1
- package/lib/commonjs/Loader/Loader.js +31 -37
- package/lib/commonjs/Loader/Loader.js.map +1 -1
- package/lib/commonjs/LoadingOverlay/LoadingOverlay.js +2 -1
- package/lib/commonjs/LoadingOverlay/LoadingOverlay.js.map +1 -1
- package/lib/commonjs/Mark/Mark.js +12 -15
- package/lib/commonjs/Mark/Mark.js.map +1 -1
- package/lib/commonjs/Marquee/Marquee.js +66 -48
- package/lib/commonjs/Marquee/Marquee.js.map +1 -1
- package/lib/commonjs/MaskInput/MaskInput.js +2 -1
- package/lib/commonjs/MaskInput/MaskInput.js.map +1 -1
- package/lib/commonjs/Menu/Menu.js +84 -48
- package/lib/commonjs/Menu/Menu.js.map +1 -1
- package/lib/commonjs/Modal/Modal.js +34 -30
- package/lib/commonjs/Modal/Modal.js.map +1 -1
- package/lib/commonjs/Modal/drag/DragDismissHost.web.js +10 -6
- package/lib/commonjs/Modal/drag/DragDismissHost.web.js.map +1 -1
- package/lib/commonjs/Modal/drag/DragDismissOverlay.web.js +6 -8
- package/lib/commonjs/Modal/drag/DragDismissOverlay.web.js.map +1 -1
- package/lib/commonjs/Modal/drag/index.js.map +1 -1
- package/lib/commonjs/Modal/modal-base-inner.js +1 -1
- package/lib/commonjs/Modal/modal-base-inner.js.map +1 -1
- package/lib/commonjs/Modal/modal-base-inner.native.js +3 -2
- package/lib/commonjs/Modal/modal-base-inner.native.js.map +1 -1
- package/lib/commonjs/Modal/modal-base.js +22 -9
- package/lib/commonjs/Modal/modal-base.js.map +1 -1
- package/lib/commonjs/MultiSelect/MultiSelect.js +6 -2
- package/lib/commonjs/MultiSelect/MultiSelect.js.map +1 -1
- package/lib/commonjs/NativeSelect/NativeSelect.js +25 -30
- package/lib/commonjs/NativeSelect/NativeSelect.js.map +1 -1
- package/lib/commonjs/NavLink/NavLink.js +63 -58
- package/lib/commonjs/NavLink/NavLink.js.map +1 -1
- package/lib/commonjs/Notification/Notification.js +28 -28
- package/lib/commonjs/Notification/Notification.js.map +1 -1
- package/lib/commonjs/NumberFormatter/NumberFormatter.js +2 -2
- package/lib/commonjs/NumberFormatter/NumberFormatter.js.map +1 -1
- package/lib/commonjs/NumberInput/NumberInput.js +46 -43
- package/lib/commonjs/NumberInput/NumberInput.js.map +1 -1
- package/lib/commonjs/Overlay/Overlay.js +18 -11
- package/lib/commonjs/Overlay/Overlay.js.map +1 -1
- package/lib/commonjs/Pagination/Pagination.js +125 -120
- package/lib/commonjs/Pagination/Pagination.js.map +1 -1
- package/lib/commonjs/Paper/Paper.js +7 -8
- package/lib/commonjs/Paper/Paper.js.map +1 -1
- package/lib/commonjs/Paragraph/Paragraph.js +7 -10
- package/lib/commonjs/Paragraph/Paragraph.js.map +1 -1
- package/lib/commonjs/PasswordInput/PasswordInput.js +3 -3
- package/lib/commonjs/PasswordInput/PasswordInput.js.map +1 -1
- package/lib/commonjs/Pill/Pill.js +39 -33
- package/lib/commonjs/Pill/Pill.js.map +1 -1
- package/lib/commonjs/PillsInput/PillsInput.js +58 -31
- package/lib/commonjs/PillsInput/PillsInput.js.map +1 -1
- package/lib/commonjs/PinInput/PinInput.js +26 -20
- package/lib/commonjs/PinInput/PinInput.js.map +1 -1
- package/lib/commonjs/Popover/Popover.native.js +6 -2
- package/lib/commonjs/Popover/Popover.native.js.map +1 -1
- package/lib/commonjs/Popover/Popover.shared.js +33 -22
- package/lib/commonjs/Popover/Popover.shared.js.map +1 -1
- package/lib/commonjs/Progress/Progress.js +37 -26
- package/lib/commonjs/Progress/Progress.js.map +1 -1
- package/lib/commonjs/Radio/Radio.js +81 -93
- package/lib/commonjs/Radio/Radio.js.map +1 -1
- package/lib/commonjs/Radio/RadioIcon.js +4 -6
- package/lib/commonjs/Radio/RadioIcon.js.map +1 -1
- package/lib/commonjs/Rating/Rating.js +48 -38
- package/lib/commonjs/Rating/Rating.js.map +1 -1
- package/lib/commonjs/RollingNumber/RollingNumber.js +48 -24
- package/lib/commonjs/RollingNumber/RollingNumber.js.map +1 -1
- package/lib/commonjs/ScrollArea/ScrollArea.js +40 -37
- package/lib/commonjs/ScrollArea/ScrollArea.js.map +1 -1
- package/lib/commonjs/ScrollArea/ScrollArea.native.js +21 -26
- package/lib/commonjs/ScrollArea/ScrollArea.native.js.map +1 -1
- package/lib/commonjs/SegmentedControl/SegmentedControl.js +106 -55
- package/lib/commonjs/SegmentedControl/SegmentedControl.js.map +1 -1
- package/lib/commonjs/Select/Select.js +7 -3
- package/lib/commonjs/Select/Select.js.map +1 -1
- package/lib/commonjs/Separator/Separator.js +47 -39
- package/lib/commonjs/Separator/Separator.js.map +1 -1
- package/lib/commonjs/SimpleGrid/SimpleGrid.js +12 -14
- package/lib/commonjs/SimpleGrid/SimpleGrid.js.map +1 -1
- package/lib/commonjs/Skeleton/Skeleton.js +39 -24
- package/lib/commonjs/Skeleton/Skeleton.js.map +1 -1
- package/lib/commonjs/Slider/Slider.js +308 -257
- package/lib/commonjs/Slider/Slider.js.map +1 -1
- package/lib/commonjs/Spacer/Spacer.js +15 -29
- package/lib/commonjs/Spacer/Spacer.js.map +1 -1
- package/lib/commonjs/Spoiler/Spoiler.js +16 -16
- package/lib/commonjs/Spoiler/Spoiler.js.map +1 -1
- package/lib/commonjs/Stack/Stack.js +3 -3
- package/lib/commonjs/Stack/Stack.js.map +1 -1
- package/lib/commonjs/Stepper/Stepper.js +96 -71
- package/lib/commonjs/Stepper/Stepper.js.map +1 -1
- package/lib/commonjs/Switch/Switch.js +71 -67
- package/lib/commonjs/Switch/Switch.js.map +1 -1
- package/lib/commonjs/Table/Table.js +96 -82
- package/lib/commonjs/Table/Table.js.map +1 -1
- package/lib/commonjs/TableOfContents/TableOfContents.js +94 -95
- package/lib/commonjs/TableOfContents/TableOfContents.js.map +1 -1
- package/lib/commonjs/Tabs/Tabs.js +71 -73
- package/lib/commonjs/Tabs/Tabs.js.map +1 -1
- package/lib/commonjs/TagsInput/TagsInput.js +19 -3
- package/lib/commonjs/TagsInput/TagsInput.js.map +1 -1
- package/lib/commonjs/Text/Text.js +29 -14
- package/lib/commonjs/Text/Text.js.map +1 -1
- package/lib/commonjs/TextInput/TextInput.js +2 -1
- package/lib/commonjs/TextInput/TextInput.js.map +1 -1
- package/lib/commonjs/Textarea/Textarea.js +1 -1
- package/lib/commonjs/Textarea/Textarea.js.map +1 -1
- package/lib/commonjs/ThemeIcon/ThemeIcon.js +9 -5
- package/lib/commonjs/ThemeIcon/ThemeIcon.js.map +1 -1
- package/lib/commonjs/Title/Title.js +49 -32
- package/lib/commonjs/Title/Title.js.map +1 -1
- package/lib/commonjs/Tooltip/Tooltip.js +43 -27
- package/lib/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/lib/commonjs/Transition/Transition.native.js +11 -10
- package/lib/commonjs/Transition/Transition.native.js.map +1 -1
- package/lib/commonjs/Transition/use-overlay-transition.native.js +2 -5
- package/lib/commonjs/Transition/use-overlay-transition.native.js.map +1 -1
- package/lib/commonjs/Tree/Tree.js +30 -34
- package/lib/commonjs/Tree/Tree.js.map +1 -1
- package/lib/commonjs/TreeSelect/TreeSelect.js +50 -26
- package/lib/commonjs/TreeSelect/TreeSelect.js.map +1 -1
- package/lib/commonjs/Typography/Typography.js +5 -7
- package/lib/commonjs/Typography/Typography.js.map +1 -1
- package/lib/commonjs/UnstyledButton/UnstyledButton.js +4 -4
- package/lib/commonjs/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/commonjs/VirtualList/VirtualList.js +23 -7
- package/lib/commonjs/VirtualList/VirtualList.js.map +1 -1
- package/lib/commonjs/VisuallyHidden/VisuallyHidden.js +7 -10
- package/lib/commonjs/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/lib/commonjs/control-system.js +7 -0
- package/lib/commonjs/control-system.js.map +1 -1
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/ControlIconProvider.js +1 -1
- package/lib/commonjs/internal/ControlIconProvider.js.map +1 -1
- package/lib/commonjs/internal/InlineControl.js +24 -29
- package/lib/commonjs/internal/InlineControl.js.map +1 -1
- package/lib/commonjs/internal/collapse-box.js +12 -10
- package/lib/commonjs/internal/collapse-box.js.map +1 -1
- package/lib/commonjs/internal/control-icon-size.js +5 -8
- package/lib/commonjs/internal/control-icon-size.js.map +1 -1
- package/lib/commonjs/internal/control-metrics.js +51 -51
- package/lib/commonjs/internal/control-metrics.js.map +1 -1
- package/lib/commonjs/internal/floating-arrow.js +43 -29
- package/lib/commonjs/internal/floating-arrow.js.map +1 -1
- package/lib/commonjs/internal/focus-ring.js +99 -0
- package/lib/commonjs/internal/focus-ring.js.map +1 -0
- package/lib/commonjs/internal/gradient-shared.js +7 -7
- package/lib/commonjs/internal/gradient-shared.js.map +1 -1
- package/lib/commonjs/internal/gradient.native.js +1 -1
- package/lib/commonjs/internal/motion.js +247 -359
- package/lib/commonjs/internal/motion.js.map +1 -1
- package/lib/commonjs/internal/resolve-theme-color.js +10 -10
- package/lib/commonjs/internal/resolve-theme-color.js.map +1 -1
- package/lib/commonjs/internal/style-props.js +510 -464
- package/lib/commonjs/internal/style-props.js.map +1 -1
- package/lib/commonjs/internal/theme-color-web.js +44 -26
- package/lib/commonjs/internal/theme-color-web.js.map +1 -1
- package/lib/commonjs/internal/use-icon-color.js +1 -1
- package/lib/commonjs/internal/use-icon-color.native.js +1 -1
- package/lib/commonjs/internal/use-slot-text-wrapper.js +1 -1
- package/lib/commonjs/internal/variant-colors.js +163 -229
- package/lib/commonjs/internal/variant-colors.js.map +1 -1
- package/lib/module/Accordion/Accordion.js +80 -98
- package/lib/module/Accordion/Accordion.js.map +1 -1
- package/lib/module/ActionIcon/ActionIcon.js +128 -62
- package/lib/module/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/module/Affix/Affix.js +17 -21
- package/lib/module/Affix/Affix.js.map +1 -1
- package/lib/module/Alert/Alert.js +54 -54
- package/lib/module/Alert/Alert.js.map +1 -1
- package/lib/module/Anchor/Anchor.js +13 -16
- package/lib/module/Anchor/Anchor.js.map +1 -1
- package/lib/module/AngleSlider/AngleSlider.js +66 -38
- package/lib/module/AngleSlider/AngleSlider.js.map +1 -1
- package/lib/module/AspectRatio/AspectRatio.js +10 -14
- package/lib/module/AspectRatio/AspectRatio.js.map +1 -1
- package/lib/module/Autocomplete/Autocomplete.js +8 -4
- package/lib/module/Autocomplete/Autocomplete.js.map +1 -1
- package/lib/module/Avatar/Avatar.js +29 -26
- package/lib/module/Avatar/Avatar.js.map +1 -1
- package/lib/module/BackgroundImage/BackgroundImage.js +16 -7
- package/lib/module/BackgroundImage/BackgroundImage.js.map +1 -1
- package/lib/module/Badge/Badge.js +61 -50
- package/lib/module/Badge/Badge.js.map +1 -1
- package/lib/module/Blockquote/Blockquote.js +82 -81
- package/lib/module/Blockquote/Blockquote.js.map +1 -1
- package/lib/module/Box/Box.js +2 -2
- package/lib/module/Box/Box.js.map +1 -1
- package/lib/module/Breadcrumbs/Breadcrumbs.js +10 -10
- package/lib/module/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/module/Burger/Burger.js +32 -21
- package/lib/module/Burger/Burger.js.map +1 -1
- package/lib/module/Button/Button.js +105 -63
- package/lib/module/Button/Button.js.map +1 -1
- package/lib/module/Card/Card.js +51 -39
- package/lib/module/Card/Card.js.map +1 -1
- package/lib/module/Center/Center.js +3 -3
- package/lib/module/Center/Center.js.map +1 -1
- package/lib/module/Checkbox/CheckIcon.js +5 -4
- package/lib/module/Checkbox/CheckIcon.js.map +1 -1
- package/lib/module/Checkbox/Checkbox.js +100 -70
- package/lib/module/Checkbox/Checkbox.js.map +1 -1
- package/lib/module/Chip/Chip.js +35 -68
- package/lib/module/Chip/Chip.js.map +1 -1
- package/lib/module/CloseButton/CloseButton.js +12 -5
- package/lib/module/CloseButton/CloseButton.js.map +1 -1
- package/lib/module/Code/Code.js +15 -11
- package/lib/module/Code/Code.js.map +1 -1
- package/lib/module/Collapse/Collapse.js +11 -5
- package/lib/module/Collapse/Collapse.js.map +1 -1
- package/lib/module/ColorInput/ColorInput.js +26 -21
- package/lib/module/ColorInput/ColorInput.js.map +1 -1
- package/lib/module/ColorPicker/ColorPicker.js +96 -84
- package/lib/module/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/module/ColorSwatch/ColorSwatch.js +13 -15
- package/lib/module/ColorSwatch/ColorSwatch.js.map +1 -1
- package/lib/module/Combobox/Combobox.js +194 -188
- package/lib/module/Combobox/Combobox.js.map +1 -1
- package/lib/module/Combobox/OptionsDropdown.js +13 -7
- package/lib/module/Combobox/OptionsDropdown.js.map +1 -1
- package/lib/module/Combobox/index.js +1 -1
- package/lib/module/Combobox/index.js.map +1 -1
- package/lib/module/Container/Container.js +12 -19
- package/lib/module/Container/Container.js.map +1 -1
- package/lib/module/Dialog/Dialog.js +16 -15
- package/lib/module/Dialog/Dialog.js.map +1 -1
- package/lib/module/Drawer/Drawer.js +53 -34
- package/lib/module/Drawer/Drawer.js.map +1 -1
- package/lib/module/Fieldset/Fieldset.js +27 -19
- package/lib/module/Fieldset/Fieldset.js.map +1 -1
- package/lib/module/FileButton/FileButton.js +5 -3
- package/lib/module/FileButton/FileButton.js.map +1 -1
- package/lib/module/Flex/Flex.js +24 -28
- package/lib/module/Flex/Flex.js.map +1 -1
- package/lib/module/FocusTrap/FocusTrap.js +4 -3
- package/lib/module/FocusTrap/FocusTrap.js.map +1 -1
- package/lib/module/Grid/Grid.js +22 -19
- package/lib/module/Grid/Grid.js.map +1 -1
- package/lib/module/Group/Group.js +4 -4
- package/lib/module/Group/Group.js.map +1 -1
- package/lib/module/Highlight/Highlight.js +2 -1
- package/lib/module/Highlight/Highlight.js.map +1 -1
- package/lib/module/HoverCard/HoverCard.js +8 -25
- package/lib/module/HoverCard/HoverCard.js.map +1 -1
- package/lib/module/Image/Image.js +195 -23
- package/lib/module/Image/Image.js.map +1 -1
- package/lib/module/Image/Image.native.js +38 -0
- package/lib/module/Image/Image.native.js.map +1 -0
- package/lib/module/Image/createImage.js +92 -59
- package/lib/module/Image/createImage.js.map +1 -1
- package/lib/module/Indicator/Indicator.js +37 -30
- package/lib/module/Indicator/Indicator.js.map +1 -1
- package/lib/module/Input/Input.js +89 -121
- package/lib/module/Input/Input.js.map +1 -1
- package/lib/module/Input/Input.native.js +42 -32
- package/lib/module/Input/Input.native.js.map +1 -1
- package/lib/module/Input/shared.js +148 -225
- package/lib/module/Input/shared.js.map +1 -1
- package/lib/module/InputBase/InputBase.js +2 -1
- package/lib/module/InputBase/InputBase.js.map +1 -1
- package/lib/module/Kbd/Kbd.js +12 -18
- package/lib/module/Kbd/Kbd.js.map +1 -1
- package/lib/module/KeyboardAvoidingView/KeyboardAvoidingView.native.js +2 -2
- package/lib/module/KeyboardAvoidingView/KeyboardAvoidingView.native.js.map +1 -1
- package/lib/module/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js +1 -1
- package/lib/module/KeyboardAwareScrollView/KeyboardAwareScrollView.native.js.map +1 -1
- package/lib/module/List/List.js +11 -11
- package/lib/module/List/List.js.map +1 -1
- package/lib/module/Loader/Loader.js +33 -39
- package/lib/module/Loader/Loader.js.map +1 -1
- package/lib/module/LoadingOverlay/LoadingOverlay.js +2 -1
- package/lib/module/LoadingOverlay/LoadingOverlay.js.map +1 -1
- package/lib/module/Mark/Mark.js +11 -15
- package/lib/module/Mark/Mark.js.map +1 -1
- package/lib/module/Marquee/Marquee.js +66 -48
- package/lib/module/Marquee/Marquee.js.map +1 -1
- package/lib/module/MaskInput/MaskInput.js +2 -1
- package/lib/module/MaskInput/MaskInput.js.map +1 -1
- package/lib/module/Menu/Menu.js +86 -50
- package/lib/module/Menu/Menu.js.map +1 -1
- package/lib/module/Modal/Modal.js +35 -31
- package/lib/module/Modal/Modal.js.map +1 -1
- package/lib/module/Modal/drag/DragDismissHost.web.js +10 -6
- package/lib/module/Modal/drag/DragDismissHost.web.js.map +1 -1
- package/lib/module/Modal/drag/DragDismissOverlay.web.js +6 -8
- package/lib/module/Modal/drag/DragDismissOverlay.web.js.map +1 -1
- package/lib/module/Modal/drag/index.js +1 -1
- package/lib/module/Modal/drag/index.js.map +1 -1
- package/lib/module/Modal/modal-base-inner.js +1 -1
- package/lib/module/Modal/modal-base-inner.js.map +1 -1
- package/lib/module/Modal/modal-base-inner.native.js +3 -2
- package/lib/module/Modal/modal-base-inner.native.js.map +1 -1
- package/lib/module/Modal/modal-base.js +22 -9
- package/lib/module/Modal/modal-base.js.map +1 -1
- package/lib/module/MultiSelect/MultiSelect.js +7 -3
- package/lib/module/MultiSelect/MultiSelect.js.map +1 -1
- package/lib/module/NativeSelect/NativeSelect.js +26 -31
- package/lib/module/NativeSelect/NativeSelect.js.map +1 -1
- package/lib/module/NavLink/NavLink.js +64 -59
- package/lib/module/NavLink/NavLink.js.map +1 -1
- package/lib/module/Notification/Notification.js +29 -29
- package/lib/module/Notification/Notification.js.map +1 -1
- package/lib/module/NumberFormatter/NumberFormatter.js +3 -3
- package/lib/module/NumberFormatter/NumberFormatter.js.map +1 -1
- package/lib/module/NumberInput/NumberInput.js +49 -46
- package/lib/module/NumberInput/NumberInput.js.map +1 -1
- package/lib/module/Overlay/Overlay.js +19 -12
- package/lib/module/Overlay/Overlay.js.map +1 -1
- package/lib/module/Pagination/Pagination.js +127 -122
- package/lib/module/Pagination/Pagination.js.map +1 -1
- package/lib/module/Paper/Paper.js +8 -9
- package/lib/module/Paper/Paper.js.map +1 -1
- package/lib/module/Paragraph/Paragraph.js +6 -10
- package/lib/module/Paragraph/Paragraph.js.map +1 -1
- package/lib/module/PasswordInput/PasswordInput.js +4 -4
- package/lib/module/PasswordInput/PasswordInput.js.map +1 -1
- package/lib/module/Pill/Pill.js +40 -34
- package/lib/module/Pill/Pill.js.map +1 -1
- package/lib/module/PillsInput/PillsInput.js +59 -32
- package/lib/module/PillsInput/PillsInput.js.map +1 -1
- package/lib/module/PinInput/PinInput.js +27 -21
- package/lib/module/PinInput/PinInput.js.map +1 -1
- package/lib/module/Popover/Popover.native.js +6 -2
- package/lib/module/Popover/Popover.native.js.map +1 -1
- package/lib/module/Popover/Popover.shared.js +34 -23
- package/lib/module/Popover/Popover.shared.js.map +1 -1
- package/lib/module/Progress/Progress.js +39 -28
- package/lib/module/Progress/Progress.js.map +1 -1
- package/lib/module/Radio/Radio.js +83 -95
- package/lib/module/Radio/Radio.js.map +1 -1
- package/lib/module/Radio/RadioIcon.js +4 -6
- package/lib/module/Radio/RadioIcon.js.map +1 -1
- package/lib/module/Rating/Rating.js +50 -40
- package/lib/module/Rating/Rating.js.map +1 -1
- package/lib/module/RollingNumber/RollingNumber.js +49 -25
- package/lib/module/RollingNumber/RollingNumber.js.map +1 -1
- package/lib/module/ScrollArea/ScrollArea.js +41 -38
- package/lib/module/ScrollArea/ScrollArea.js.map +1 -1
- package/lib/module/ScrollArea/ScrollArea.native.js +22 -27
- package/lib/module/ScrollArea/ScrollArea.native.js.map +1 -1
- package/lib/module/SegmentedControl/SegmentedControl.js +108 -57
- package/lib/module/SegmentedControl/SegmentedControl.js.map +1 -1
- package/lib/module/Select/Select.js +8 -4
- package/lib/module/Select/Select.js.map +1 -1
- package/lib/module/Separator/Separator.js +49 -41
- package/lib/module/Separator/Separator.js.map +1 -1
- package/lib/module/SimpleGrid/SimpleGrid.js +14 -16
- package/lib/module/SimpleGrid/SimpleGrid.js.map +1 -1
- package/lib/module/Skeleton/Skeleton.js +40 -25
- package/lib/module/Skeleton/Skeleton.js.map +1 -1
- package/lib/module/Slider/Slider.js +309 -258
- package/lib/module/Slider/Slider.js.map +1 -1
- package/lib/module/Spacer/Spacer.js +16 -29
- package/lib/module/Spacer/Spacer.js.map +1 -1
- package/lib/module/Spoiler/Spoiler.js +17 -17
- package/lib/module/Spoiler/Spoiler.js.map +1 -1
- package/lib/module/Stack/Stack.js +3 -3
- package/lib/module/Stack/Stack.js.map +1 -1
- package/lib/module/Stepper/Stepper.js +97 -72
- package/lib/module/Stepper/Stepper.js.map +1 -1
- package/lib/module/Switch/Switch.js +73 -69
- package/lib/module/Switch/Switch.js.map +1 -1
- package/lib/module/Table/Table.js +99 -85
- package/lib/module/Table/Table.js.map +1 -1
- package/lib/module/TableOfContents/TableOfContents.js +96 -97
- package/lib/module/TableOfContents/TableOfContents.js.map +1 -1
- package/lib/module/Tabs/Tabs.js +72 -74
- package/lib/module/Tabs/Tabs.js.map +1 -1
- package/lib/module/TagsInput/TagsInput.js +21 -5
- package/lib/module/TagsInput/TagsInput.js.map +1 -1
- package/lib/module/Text/Text.js +29 -14
- package/lib/module/Text/Text.js.map +1 -1
- package/lib/module/TextInput/TextInput.js +2 -1
- package/lib/module/TextInput/TextInput.js.map +1 -1
- package/lib/module/Textarea/Textarea.js +2 -2
- package/lib/module/Textarea/Textarea.js.map +1 -1
- package/lib/module/ThemeIcon/ThemeIcon.js +10 -6
- package/lib/module/ThemeIcon/ThemeIcon.js.map +1 -1
- package/lib/module/Title/Title.js +51 -34
- package/lib/module/Title/Title.js.map +1 -1
- package/lib/module/Tooltip/Tooltip.js +44 -28
- package/lib/module/Tooltip/Tooltip.js.map +1 -1
- package/lib/module/Transition/Transition.native.js +12 -11
- package/lib/module/Transition/Transition.native.js.map +1 -1
- package/lib/module/Transition/use-overlay-transition.native.js +3 -6
- package/lib/module/Transition/use-overlay-transition.native.js.map +1 -1
- package/lib/module/Tree/Tree.js +31 -35
- package/lib/module/Tree/Tree.js.map +1 -1
- package/lib/module/TreeSelect/TreeSelect.js +52 -28
- package/lib/module/TreeSelect/TreeSelect.js.map +1 -1
- package/lib/module/Typography/Typography.js +5 -7
- package/lib/module/Typography/Typography.js.map +1 -1
- package/lib/module/UnstyledButton/UnstyledButton.js +5 -5
- package/lib/module/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/module/VirtualList/VirtualList.js +23 -7
- package/lib/module/VirtualList/VirtualList.js.map +1 -1
- package/lib/module/VisuallyHidden/VisuallyHidden.js +6 -10
- package/lib/module/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/lib/module/control-system.js +5 -0
- package/lib/module/control-system.js.map +1 -1
- package/lib/module/index.js +8 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/ControlIconProvider.js +1 -1
- package/lib/module/internal/ControlIconProvider.js.map +1 -1
- package/lib/module/internal/InlineControl.js +25 -30
- package/lib/module/internal/InlineControl.js.map +1 -1
- package/lib/module/internal/collapse-box.js +13 -11
- package/lib/module/internal/collapse-box.js.map +1 -1
- package/lib/module/internal/control-icon-size.js +5 -8
- package/lib/module/internal/control-icon-size.js.map +1 -1
- package/lib/module/internal/control-metrics.js +52 -52
- package/lib/module/internal/control-metrics.js.map +1 -1
- package/lib/module/internal/floating-arrow.js +44 -30
- package/lib/module/internal/floating-arrow.js.map +1 -1
- package/lib/module/internal/focus-ring.js +95 -0
- package/lib/module/internal/focus-ring.js.map +1 -0
- package/lib/module/internal/gradient-shared.js +7 -7
- package/lib/module/internal/gradient-shared.js.map +1 -1
- package/lib/module/internal/gradient.native.js +1 -1
- package/lib/module/internal/motion.js +245 -359
- package/lib/module/internal/motion.js.map +1 -1
- package/lib/module/internal/resolve-theme-color.js +10 -10
- package/lib/module/internal/resolve-theme-color.js.map +1 -1
- package/lib/module/internal/style-props.js +471 -459
- package/lib/module/internal/style-props.js.map +1 -1
- package/lib/module/internal/theme-color-web.js +45 -27
- package/lib/module/internal/theme-color-web.js.map +1 -1
- package/lib/module/internal/use-icon-color.js +1 -1
- package/lib/module/internal/use-icon-color.native.js +1 -1
- package/lib/module/internal/use-slot-text-wrapper.js +1 -1
- package/lib/module/internal/variant-colors.js +150 -228
- package/lib/module/internal/variant-colors.js.map +1 -1
- package/lib/typescript/Accordion/Accordion.d.ts +120 -74
- package/lib/typescript/Accordion/Accordion.d.ts.map +1 -1
- package/lib/typescript/ActionIcon/ActionIcon.d.ts +236 -94
- package/lib/typescript/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/lib/typescript/Affix/Affix.d.ts +12 -7
- package/lib/typescript/Affix/Affix.d.ts.map +1 -1
- package/lib/typescript/Alert/Alert.d.ts +228 -68
- package/lib/typescript/Alert/Alert.d.ts.map +1 -1
- package/lib/typescript/Anchor/Anchor.d.ts +33 -24
- package/lib/typescript/Anchor/Anchor.d.ts.map +1 -1
- package/lib/typescript/AngleSlider/AngleSlider.d.ts +224 -66
- package/lib/typescript/AngleSlider/AngleSlider.d.ts.map +1 -1
- package/lib/typescript/AspectRatio/AspectRatio.d.ts +34 -14
- package/lib/typescript/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/lib/typescript/Autocomplete/Autocomplete.d.ts +30 -42
- package/lib/typescript/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/lib/typescript/Avatar/Avatar.d.ts +167 -191
- package/lib/typescript/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/BackgroundImage/BackgroundImage.d.ts +15 -10
- package/lib/typescript/BackgroundImage/BackgroundImage.d.ts.map +1 -1
- package/lib/typescript/Badge/Badge.d.ts +138 -62
- package/lib/typescript/Badge/Badge.d.ts.map +1 -1
- package/lib/typescript/Blockquote/Blockquote.d.ts +148 -50
- package/lib/typescript/Blockquote/Blockquote.d.ts.map +1 -1
- package/lib/typescript/Box/Box.d.ts +11 -3
- package/lib/typescript/Box/Box.d.ts.map +1 -1
- package/lib/typescript/Breadcrumbs/Breadcrumbs.d.ts +115 -35
- package/lib/typescript/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/typescript/Burger/Burger.d.ts +124 -41
- package/lib/typescript/Burger/Burger.d.ts.map +1 -1
- package/lib/typescript/Button/Button.d.ts +236 -107
- package/lib/typescript/Button/Button.d.ts.map +1 -1
- package/lib/typescript/Card/Card.d.ts +79 -47
- package/lib/typescript/Card/Card.d.ts.map +1 -1
- package/lib/typescript/Center/Center.d.ts +13 -9
- package/lib/typescript/Center/Center.d.ts.map +1 -1
- package/lib/typescript/Checkbox/CheckIcon.d.ts +7 -3
- package/lib/typescript/Checkbox/CheckIcon.d.ts.map +1 -1
- package/lib/typescript/Checkbox/Checkbox.d.ts +79 -60
- package/lib/typescript/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/Chip/Chip.d.ts +140 -57
- package/lib/typescript/Chip/Chip.d.ts.map +1 -1
- package/lib/typescript/CloseButton/CloseButton.d.ts +85 -50
- package/lib/typescript/CloseButton/CloseButton.d.ts.map +1 -1
- package/lib/typescript/Code/Code.d.ts +31 -23
- package/lib/typescript/Code/Code.d.ts.map +1 -1
- package/lib/typescript/Collapse/Collapse.d.ts +44 -20
- package/lib/typescript/Collapse/Collapse.d.ts.map +1 -1
- package/lib/typescript/ColorInput/ColorInput.d.ts +15 -5
- package/lib/typescript/ColorInput/ColorInput.d.ts.map +1 -1
- package/lib/typescript/ColorPicker/ColorPicker.d.ts +72 -16
- package/lib/typescript/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/lib/typescript/ColorSwatch/ColorSwatch.d.ts +59 -38
- package/lib/typescript/ColorSwatch/ColorSwatch.d.ts.map +1 -1
- package/lib/typescript/Combobox/Combobox.d.ts +183 -100
- package/lib/typescript/Combobox/Combobox.d.ts.map +1 -1
- package/lib/typescript/Combobox/OptionsDropdown.d.ts +6 -0
- package/lib/typescript/Combobox/OptionsDropdown.d.ts.map +1 -1
- package/lib/typescript/Combobox/index.d.ts +66 -86
- package/lib/typescript/Combobox/index.d.ts.map +1 -1
- package/lib/typescript/Container/Container.d.ts +3 -41
- package/lib/typescript/Container/Container.d.ts.map +1 -1
- package/lib/typescript/Dialog/Dialog.d.ts +79 -76
- package/lib/typescript/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/Drawer/Drawer.d.ts +115 -40
- package/lib/typescript/Drawer/Drawer.d.ts.map +1 -1
- package/lib/typescript/Fieldset/Fieldset.d.ts +91 -46
- package/lib/typescript/Fieldset/Fieldset.d.ts.map +1 -1
- package/lib/typescript/FileButton/FileButton.d.ts.map +1 -1
- package/lib/typescript/FileInput/FileInput.d.ts +1 -1
- package/lib/typescript/FileInput/FileInput.d.ts.map +1 -1
- package/lib/typescript/Flex/Flex.d.ts +28 -26
- package/lib/typescript/Flex/Flex.d.ts.map +1 -1
- package/lib/typescript/FocusTrap/FocusTrap.d.ts.map +1 -1
- package/lib/typescript/Grid/Grid.d.ts +56 -48
- package/lib/typescript/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/Group/Group.d.ts +21 -16
- package/lib/typescript/Group/Group.d.ts.map +1 -1
- package/lib/typescript/Highlight/Highlight.d.ts +1 -15
- package/lib/typescript/Highlight/Highlight.d.ts.map +1 -1
- package/lib/typescript/HoverCard/HoverCard.d.ts +9 -9
- package/lib/typescript/HoverCard/HoverCard.d.ts.map +1 -1
- package/lib/typescript/Image/Image.d.ts +76 -158
- package/lib/typescript/Image/Image.d.ts.map +1 -1
- package/lib/typescript/Image/Image.native.d.ts +327 -0
- package/lib/typescript/Image/Image.native.d.ts.map +1 -0
- package/lib/typescript/Image/createImage.d.ts +49 -357
- package/lib/typescript/Image/createImage.d.ts.map +1 -1
- package/lib/typescript/Image/types.d.ts +4 -1
- package/lib/typescript/Image/types.d.ts.map +1 -1
- package/lib/typescript/Indicator/Indicator.d.ts +122 -43
- package/lib/typescript/Indicator/Indicator.d.ts.map +1 -1
- package/lib/typescript/Input/Input.d.ts +131 -328
- package/lib/typescript/Input/Input.d.ts.map +1 -1
- package/lib/typescript/Input/Input.native.d.ts +150 -472
- package/lib/typescript/Input/Input.native.d.ts.map +1 -1
- package/lib/typescript/Input/shared.d.ts +290 -490
- package/lib/typescript/Input/shared.d.ts.map +1 -1
- package/lib/typescript/Input/types.d.ts +14 -1
- package/lib/typescript/Input/types.d.ts.map +1 -1
- package/lib/typescript/InputBase/InputBase.d.ts +1 -52
- package/lib/typescript/InputBase/InputBase.d.ts.map +1 -1
- package/lib/typescript/Kbd/Kbd.d.ts +21 -65
- package/lib/typescript/Kbd/Kbd.d.ts.map +1 -1
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.d.ts +2 -6
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts +7 -3
- package/lib/typescript/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts.map +1 -1
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +2 -6
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts.map +1 -1
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.native.d.ts +6 -2
- package/lib/typescript/KeyboardAwareScrollView/KeyboardAwareScrollView.native.d.ts.map +1 -1
- package/lib/typescript/List/List.d.ts +165 -63
- package/lib/typescript/List/List.d.ts.map +1 -1
- package/lib/typescript/Loader/Loader.d.ts +58 -28
- package/lib/typescript/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/LoadingOverlay/LoadingOverlay.d.ts +1 -9
- package/lib/typescript/LoadingOverlay/LoadingOverlay.d.ts.map +1 -1
- package/lib/typescript/Mark/Mark.d.ts +21 -65
- package/lib/typescript/Mark/Mark.d.ts.map +1 -1
- package/lib/typescript/Marquee/Marquee.d.ts +127 -44
- package/lib/typescript/Marquee/Marquee.d.ts.map +1 -1
- package/lib/typescript/MaskInput/MaskInput.d.ts +1 -51
- package/lib/typescript/MaskInput/MaskInput.d.ts.map +1 -1
- package/lib/typescript/Menu/Menu.d.ts +93 -105
- package/lib/typescript/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/Modal/Modal.d.ts +166 -91
- package/lib/typescript/Modal/Modal.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/DragDismissHost.web.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/DragDismissOverlay.web.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/index.d.ts +2 -2
- package/lib/typescript/Modal/drag/index.d.ts.map +1 -1
- package/lib/typescript/Modal/drag/types.d.ts +14 -2
- package/lib/typescript/Modal/drag/types.d.ts.map +1 -1
- package/lib/typescript/Modal/modal-base-inner.d.ts +6 -2
- package/lib/typescript/Modal/modal-base-inner.d.ts.map +1 -1
- package/lib/typescript/Modal/modal-base-inner.native.d.ts +7 -3
- package/lib/typescript/Modal/modal-base-inner.native.d.ts.map +1 -1
- package/lib/typescript/Modal/modal-base.d.ts +2 -2
- package/lib/typescript/Modal/modal-base.d.ts.map +1 -1
- package/lib/typescript/MultiSelect/MultiSelect.d.ts +30 -50
- package/lib/typescript/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/lib/typescript/NativeSelect/NativeSelect.d.ts.map +1 -1
- package/lib/typescript/NativeSelect/NativeSelect.native.d.ts +1 -1
- package/lib/typescript/NativeSelect/NativeSelect.native.d.ts.map +1 -1
- package/lib/typescript/NavLink/NavLink.d.ts +245 -72
- package/lib/typescript/NavLink/NavLink.d.ts.map +1 -1
- package/lib/typescript/Notification/Notification.d.ts +230 -69
- package/lib/typescript/Notification/Notification.d.ts.map +1 -1
- package/lib/typescript/NumberFormatter/NumberFormatter.d.ts +24 -19
- package/lib/typescript/NumberFormatter/NumberFormatter.d.ts.map +1 -1
- package/lib/typescript/NumberInput/NumberInput.d.ts +91 -150
- package/lib/typescript/NumberInput/NumberInput.d.ts.map +1 -1
- package/lib/typescript/Overlay/Overlay.d.ts +17 -12
- package/lib/typescript/Overlay/Overlay.d.ts.map +1 -1
- package/lib/typescript/Pagination/Pagination.d.ts +43 -65
- package/lib/typescript/Pagination/Pagination.d.ts.map +1 -1
- package/lib/typescript/Paper/Paper.d.ts +19 -7
- package/lib/typescript/Paper/Paper.d.ts.map +1 -1
- package/lib/typescript/Paragraph/Paragraph.d.ts +23 -19
- package/lib/typescript/Paragraph/Paragraph.d.ts.map +1 -1
- package/lib/typescript/PasswordInput/PasswordInput.d.ts +110 -207
- package/lib/typescript/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/lib/typescript/Pill/Pill.d.ts +133 -95
- package/lib/typescript/Pill/Pill.d.ts.map +1 -1
- package/lib/typescript/PillsInput/PillsInput.d.ts +2 -2
- package/lib/typescript/PillsInput/PillsInput.d.ts.map +1 -1
- package/lib/typescript/PinInput/PinInput.d.ts +148 -297
- package/lib/typescript/PinInput/PinInput.d.ts.map +1 -1
- package/lib/typescript/Popover/Popover.native.d.ts.map +1 -1
- package/lib/typescript/Popover/Popover.shared.d.ts +15 -11
- package/lib/typescript/Popover/Popover.shared.d.ts.map +1 -1
- package/lib/typescript/Progress/Progress.d.ts +114 -65
- package/lib/typescript/Progress/Progress.d.ts.map +1 -1
- package/lib/typescript/Radio/Radio.d.ts +69 -80
- package/lib/typescript/Radio/Radio.d.ts.map +1 -1
- package/lib/typescript/Radio/RadioIcon.d.ts +5 -0
- package/lib/typescript/Radio/RadioIcon.d.ts.map +1 -1
- package/lib/typescript/Rating/Rating.d.ts +94 -44
- package/lib/typescript/Rating/Rating.d.ts.map +1 -1
- package/lib/typescript/RollingNumber/RollingNumber.d.ts +112 -32
- package/lib/typescript/RollingNumber/RollingNumber.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.d.ts +50 -10
- package/lib/typescript/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.native.d.ts +40 -8
- package/lib/typescript/ScrollArea/ScrollArea.native.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.shared.d.ts +2 -2
- package/lib/typescript/SegmentedControl/SegmentedControl.d.ts +148 -56
- package/lib/typescript/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/lib/typescript/Select/Select.d.ts +31 -51
- package/lib/typescript/Select/Select.d.ts.map +1 -1
- package/lib/typescript/Separator/Separator.d.ts +124 -61
- package/lib/typescript/Separator/Separator.d.ts.map +1 -1
- package/lib/typescript/SimpleGrid/SimpleGrid.d.ts +15 -13
- package/lib/typescript/SimpleGrid/SimpleGrid.d.ts.map +1 -1
- package/lib/typescript/Skeleton/Skeleton.d.ts +18 -14
- package/lib/typescript/Skeleton/Skeleton.d.ts.map +1 -1
- package/lib/typescript/Slider/Slider.d.ts +425 -129
- package/lib/typescript/Slider/Slider.d.ts.map +1 -1
- package/lib/typescript/Spacer/Spacer.d.ts +10 -17
- package/lib/typescript/Spacer/Spacer.d.ts.map +1 -1
- package/lib/typescript/Spoiler/Spoiler.d.ts +88 -28
- package/lib/typescript/Spoiler/Spoiler.d.ts.map +1 -1
- package/lib/typescript/Stack/Stack.d.ts +17 -5
- package/lib/typescript/Stack/Stack.d.ts.map +1 -1
- package/lib/typescript/Stepper/Stepper.d.ts +433 -101
- package/lib/typescript/Stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/Switch/Switch.d.ts +157 -69
- package/lib/typescript/Switch/Switch.d.ts.map +1 -1
- package/lib/typescript/Table/Table.d.ts +151 -201
- package/lib/typescript/Table/Table.d.ts.map +1 -1
- package/lib/typescript/TableOfContents/TableOfContents.d.ts +116 -46
- package/lib/typescript/TableOfContents/TableOfContents.d.ts.map +1 -1
- package/lib/typescript/Tabs/Tabs.d.ts +138 -88
- package/lib/typescript/Tabs/Tabs.d.ts.map +1 -1
- package/lib/typescript/TagsInput/TagsInput.d.ts +30 -42
- package/lib/typescript/TagsInput/TagsInput.d.ts.map +1 -1
- package/lib/typescript/Text/Text.d.ts +22 -4
- package/lib/typescript/Text/Text.d.ts.map +1 -1
- package/lib/typescript/TextInput/TextInput.d.ts +1 -51
- package/lib/typescript/TextInput/TextInput.d.ts.map +1 -1
- package/lib/typescript/Textarea/Textarea.d.ts +1 -51
- package/lib/typescript/Textarea/Textarea.d.ts.map +1 -1
- package/lib/typescript/ThemeIcon/ThemeIcon.d.ts +52 -39
- package/lib/typescript/ThemeIcon/ThemeIcon.d.ts.map +1 -1
- package/lib/typescript/Title/Title.d.ts +40 -25
- package/lib/typescript/Title/Title.d.ts.map +1 -1
- package/lib/typescript/Tooltip/Tooltip.d.ts +97 -41
- package/lib/typescript/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/typescript/Transition/Transition.native.d.ts.map +1 -1
- package/lib/typescript/Transition/use-overlay-transition.d.ts +1 -2
- package/lib/typescript/Transition/use-overlay-transition.d.ts.map +1 -1
- package/lib/typescript/Transition/use-overlay-transition.native.d.ts +3 -4
- package/lib/typescript/Transition/use-overlay-transition.native.d.ts.map +1 -1
- package/lib/typescript/Tree/Tree.d.ts +180 -50
- package/lib/typescript/Tree/Tree.d.ts.map +1 -1
- package/lib/typescript/TreeSelect/TreeSelect.d.ts +141 -182
- package/lib/typescript/TreeSelect/TreeSelect.d.ts.map +1 -1
- package/lib/typescript/Typography/Typography.d.ts +13 -7
- package/lib/typescript/Typography/Typography.d.ts.map +1 -1
- package/lib/typescript/UnstyledButton/UnstyledButton.d.ts +27 -20
- package/lib/typescript/UnstyledButton/UnstyledButton.d.ts.map +1 -1
- package/lib/typescript/VirtualList/VirtualList.d.ts.map +1 -1
- package/lib/typescript/VirtualList/VirtualList.shared.d.ts +1 -1
- package/lib/typescript/VirtualList/VirtualList.shared.d.ts.map +1 -1
- package/lib/typescript/VisuallyHidden/VisuallyHidden.d.ts +23 -19
- package/lib/typescript/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/lib/typescript/control-system.d.ts +3 -0
- package/lib/typescript/control-system.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/internal/InlineControl.d.ts +80 -22
- package/lib/typescript/internal/InlineControl.d.ts.map +1 -1
- package/lib/typescript/internal/collapse-box.d.ts +3 -3
- package/lib/typescript/internal/collapse-box.d.ts.map +1 -1
- package/lib/typescript/internal/collapse-box.shared.d.ts +1 -1
- package/lib/typescript/internal/control-icon-size.d.ts +4 -3
- package/lib/typescript/internal/control-icon-size.d.ts.map +1 -1
- package/lib/typescript/internal/control-metrics.d.ts +50 -50
- package/lib/typescript/internal/floating-arrow.d.ts +6 -7
- package/lib/typescript/internal/floating-arrow.d.ts.map +1 -1
- package/lib/typescript/internal/focus-ring.d.ts +94 -0
- package/lib/typescript/internal/focus-ring.d.ts.map +1 -0
- package/lib/typescript/internal/gradient-shared.d.ts +8 -8
- package/lib/typescript/internal/gradient-shared.d.ts.map +1 -1
- package/lib/typescript/internal/motion.d.ts +77 -67
- package/lib/typescript/internal/motion.d.ts.map +1 -1
- package/lib/typescript/internal/resolve-theme-color.d.ts +9 -8
- package/lib/typescript/internal/resolve-theme-color.d.ts.map +1 -1
- package/lib/typescript/internal/style-props.d.ts +490 -664
- package/lib/typescript/internal/style-props.d.ts.map +1 -1
- package/lib/typescript/internal/theme-color-web.d.ts.map +1 -1
- package/lib/typescript/internal/use-icon-color.d.ts +1 -1
- package/lib/typescript/internal/use-icon-color.native.d.ts +1 -1
- package/lib/typescript/internal/use-looping-animation.d.ts +10 -2
- package/lib/typescript/internal/use-looping-animation.d.ts.map +1 -1
- package/lib/typescript/internal/variant-colors.d.ts +191 -199
- package/lib/typescript/internal/variant-colors.d.ts.map +1 -1
- package/package.json +7 -6
- package/src/Accordion/Accordion.tsx +55 -47
- package/src/ActionIcon/ActionIcon.tsx +114 -57
- package/src/Affix/Affix.tsx +14 -25
- package/src/Alert/Alert.tsx +55 -42
- package/src/Anchor/Anchor.tsx +13 -12
- package/src/AngleSlider/AngleSlider.tsx +87 -63
- package/src/AspectRatio/AspectRatio.tsx +9 -12
- package/src/Autocomplete/Autocomplete.tsx +7 -2
- package/src/Avatar/Avatar.tsx +42 -34
- package/src/BackgroundImage/BackgroundImage.tsx +9 -6
- package/src/Badge/Badge.tsx +53 -28
- package/src/Blockquote/Blockquote.tsx +55 -45
- package/src/Box/Box.tsx +2 -2
- package/src/Breadcrumbs/Breadcrumbs.tsx +13 -11
- package/src/Burger/Burger.tsx +33 -24
- package/src/Button/Button.tsx +104 -78
- package/src/Card/Card.tsx +52 -44
- package/src/Center/Center.tsx +3 -3
- package/src/Checkbox/CheckIcon.tsx +8 -5
- package/src/Checkbox/Checkbox.tsx +97 -62
- package/src/Chip/Chip.tsx +50 -45
- package/src/CloseButton/CloseButton.tsx +30 -11
- package/src/Code/Code.tsx +15 -11
- package/src/Collapse/Collapse.tsx +11 -6
- package/src/ColorInput/ColorInput.tsx +30 -24
- package/src/ColorPicker/ColorPicker.tsx +78 -79
- package/src/ColorSwatch/ColorSwatch.tsx +11 -14
- package/src/Combobox/Combobox.tsx +174 -153
- package/src/Combobox/OptionsDropdown.tsx +15 -2
- package/src/Combobox/index.ts +1 -0
- package/src/Container/Container.tsx +11 -15
- package/src/Dialog/Dialog.tsx +26 -16
- package/src/Drawer/Drawer.tsx +51 -33
- package/src/Fieldset/Fieldset.tsx +25 -17
- package/src/FileButton/FileButton.tsx +4 -1
- package/src/Flex/Flex.tsx +24 -21
- package/src/FocusTrap/FocusTrap.tsx +4 -3
- package/src/Grid/Grid.tsx +24 -27
- package/src/Group/Group.tsx +4 -4
- package/src/Highlight/Highlight.tsx +2 -2
- package/src/HoverCard/HoverCard.tsx +17 -32
- package/src/Image/Image.native.tsx +36 -0
- package/src/Image/Image.tsx +240 -23
- package/src/Image/createImage.tsx +103 -67
- package/src/Image/types.ts +5 -1
- package/src/Indicator/Indicator.tsx +41 -32
- package/src/Input/Input.native.tsx +521 -501
- package/src/Input/Input.tsx +110 -156
- package/src/Input/shared.tsx +198 -291
- package/src/Input/types.ts +15 -0
- package/src/InputBase/InputBase.tsx +3 -1
- package/src/Kbd/Kbd.tsx +13 -15
- package/src/KeyboardAvoidingView/KeyboardAvoidingView.native.tsx +2 -2
- package/src/KeyboardAwareScrollView/KeyboardAwareScrollView.native.tsx +1 -1
- package/src/List/List.tsx +17 -11
- package/src/Loader/Loader.tsx +33 -37
- package/src/LoadingOverlay/LoadingOverlay.tsx +3 -2
- package/src/Mark/Mark.tsx +12 -12
- package/src/Marquee/Marquee.tsx +58 -46
- package/src/MaskInput/MaskInput.tsx +2 -1
- package/src/Menu/Menu.tsx +110 -45
- package/src/Modal/Modal.tsx +38 -31
- package/src/Modal/drag/DragDismissHost.web.tsx +2 -1
- package/src/Modal/drag/DragDismissOverlay.web.tsx +6 -1
- package/src/Modal/drag/index.ts +7 -2
- package/src/Modal/drag/types.ts +15 -3
- package/src/Modal/modal-base-inner.native.tsx +3 -2
- package/src/Modal/modal-base-inner.tsx +1 -1
- package/src/Modal/modal-base.tsx +10 -8
- package/src/MultiSelect/MultiSelect.tsx +6 -1
- package/src/NativeSelect/NativeSelect.tsx +21 -32
- package/src/NavLink/NavLink.tsx +54 -47
- package/src/Notification/Notification.tsx +31 -30
- package/src/NumberFormatter/NumberFormatter.tsx +4 -3
- package/src/NumberInput/NumberInput.tsx +52 -42
- package/src/Overlay/Overlay.tsx +18 -14
- package/src/Pagination/Pagination.tsx +142 -123
- package/src/Paper/Paper.tsx +8 -9
- package/src/Paragraph/Paragraph.tsx +7 -7
- package/src/PasswordInput/PasswordInput.tsx +67 -67
- package/src/Pill/Pill.tsx +42 -30
- package/src/PillsInput/PillsInput.tsx +60 -31
- package/src/PinInput/PinInput.tsx +31 -23
- package/src/Popover/Popover.native.tsx +3 -4
- package/src/Popover/Popover.shared.tsx +29 -24
- package/src/Progress/Progress.tsx +77 -64
- package/src/Radio/Radio.tsx +128 -122
- package/src/Radio/RadioIcon.tsx +4 -10
- package/src/Rating/Rating.tsx +63 -42
- package/src/RollingNumber/RollingNumber.tsx +60 -28
- package/src/ScrollArea/ScrollArea.native.tsx +28 -27
- package/src/ScrollArea/ScrollArea.shared.ts +2 -2
- package/src/ScrollArea/ScrollArea.tsx +35 -33
- package/src/SegmentedControl/SegmentedControl.tsx +98 -53
- package/src/Select/Select.tsx +7 -2
- package/src/Separator/Separator.tsx +43 -36
- package/src/SimpleGrid/SimpleGrid.tsx +23 -24
- package/src/Skeleton/Skeleton.tsx +35 -16
- package/src/Slider/Slider.tsx +303 -227
- package/src/Spacer/Spacer.tsx +17 -41
- package/src/Spoiler/Spoiler.tsx +19 -13
- package/src/Stack/Stack.tsx +3 -3
- package/src/Stepper/Stepper.tsx +89 -73
- package/src/Switch/Switch.tsx +87 -73
- package/src/Table/Table.tsx +100 -77
- package/src/TableOfContents/TableOfContents.tsx +80 -74
- package/src/Tabs/Tabs.tsx +78 -66
- package/src/TagsInput/TagsInput.tsx +35 -4
- package/src/Text/Text.tsx +25 -10
- package/src/TextInput/TextInput.tsx +3 -1
- package/src/Textarea/Textarea.tsx +2 -2
- package/src/ThemeIcon/ThemeIcon.tsx +37 -22
- package/src/Title/Title.tsx +48 -23
- package/src/Tooltip/Tooltip.tsx +50 -29
- package/src/Transition/Transition.native.tsx +16 -19
- package/src/Transition/use-overlay-transition.native.ts +6 -12
- package/src/Transition/use-overlay-transition.ts +2 -2
- package/src/Tree/Tree.tsx +39 -44
- package/src/TreeSelect/TreeSelect.tsx +49 -24
- package/src/Typography/Typography.tsx +5 -7
- package/src/UnstyledButton/UnstyledButton.tsx +6 -5
- package/src/VirtualList/VirtualList.shared.ts +1 -1
- package/src/VirtualList/VirtualList.tsx +18 -6
- package/src/VisuallyHidden/VisuallyHidden.tsx +7 -9
- package/src/control-system.ts +5 -0
- package/src/index.ts +30 -12
- package/src/internal/ControlIconProvider.tsx +1 -1
- package/src/internal/InlineControl.tsx +23 -27
- package/src/internal/collapse-box.shared.ts +1 -1
- package/src/internal/collapse-box.tsx +15 -11
- package/src/internal/control-icon-size.ts +5 -8
- package/src/internal/control-metrics.ts +52 -52
- package/src/internal/floating-arrow.tsx +48 -40
- package/src/internal/focus-ring.ts +92 -0
- package/src/internal/gradient-shared.ts +10 -10
- package/src/internal/gradient.native.tsx +1 -1
- package/src/internal/motion.ts +204 -244
- package/src/internal/resolve-theme-color.ts +10 -10
- package/src/internal/style-props.ts +545 -390
- package/src/internal/theme-color-web.ts +47 -27
- package/src/internal/use-icon-color.native.ts +1 -1
- package/src/internal/use-icon-color.ts +1 -1
- package/src/internal/use-slot-text-wrapper.tsx +1 -1
- package/src/internal/variant-colors.ts +187 -151
|
@@ -3,7 +3,9 @@ import { type TextInputProps as RNTextInputProps, TextInput } from "react-native
|
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
getLineHeight,
|
|
6
|
+
type GetProps,
|
|
6
7
|
registerFocusable,
|
|
8
|
+
styleable,
|
|
7
9
|
styled,
|
|
8
10
|
useNativeInputRef,
|
|
9
11
|
withStaticProperties,
|
|
@@ -14,11 +16,11 @@ import { controlMetrics as M } from "../internal/control-metrics";
|
|
|
14
16
|
import { pick } from "../internal/styles";
|
|
15
17
|
import type { InputNativeProps } from "./InputNativeProps";
|
|
16
18
|
import {
|
|
17
|
-
DEFAULT_PLACEHOLDER_COLOR,
|
|
18
|
-
DEFAULT_SELECTION_COLOR,
|
|
19
19
|
getInputSectionInsets,
|
|
20
20
|
getTextareaPaddingVertical,
|
|
21
21
|
INPUT_CHROME_SLOTS,
|
|
22
|
+
INPUT_HOST_CONFIG,
|
|
23
|
+
INPUT_HOST_STATIC,
|
|
22
24
|
InputChrome,
|
|
23
25
|
InputClearButton,
|
|
24
26
|
InputDescription,
|
|
@@ -28,7 +30,6 @@ import {
|
|
|
28
30
|
InputWrapper,
|
|
29
31
|
InputWrapperContext,
|
|
30
32
|
registerInputFocusable,
|
|
31
|
-
styledBody,
|
|
32
33
|
} from "./shared";
|
|
33
34
|
import type {
|
|
34
35
|
InputKeyDownPayload,
|
|
@@ -39,11 +40,15 @@ import type {
|
|
|
39
40
|
|
|
40
41
|
// The native host is `styled(TextInput, …)` rendered directly — the same
|
|
41
42
|
// pattern Tamagui's own `Input` uses. The wrapper-owned chrome (border, sections,
|
|
42
|
-
// states) lives in `InputChrome`; this host
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
// stays stable across renders, so the controlled input is state-safe.
|
|
46
|
-
const InputHostStyle = styled(TextInput,
|
|
43
|
+
// states) lives in `InputChrome`; this host carries only the bare text skin
|
|
44
|
+
// (`INPUT_HOST_CONFIG`). `isInput` makes `placeholderTextColor` / `selectionColor`
|
|
45
|
+
// / `cursorColor` theme-resolved colour props, and the underlying RN TextInput
|
|
46
|
+
// identity stays stable across renders, so the controlled input is state-safe.
|
|
47
|
+
const InputHostStyle = styled(TextInput, INPUT_HOST_CONFIG, INPUT_HOST_STATIC);
|
|
48
|
+
|
|
49
|
+
const FILL_HEIGHT = { height: "100%" } as const;
|
|
50
|
+
const NO_FONT_PADDING = { includeFontPadding: false } as const;
|
|
51
|
+
const NO_POINTER_EVENTS = { pointerEvents: "none" } as const;
|
|
47
52
|
|
|
48
53
|
// Native key payloads have no DOM event to defer to; consumers still call
|
|
49
54
|
// `preventDefault`/`stopPropagation`, so hand them a no-op.
|
|
@@ -57,10 +62,22 @@ type NativeFocusEvent = Parameters<NonNullable<RNTextInputProps["onFocus"]>>[0];
|
|
|
57
62
|
type NativeBlurEvent = Parameters<NonNullable<RNTextInputProps["onBlur"]>>[0];
|
|
58
63
|
type NativeChangeKey = NativeKeyPressEvent["nativeEvent"]["key"];
|
|
59
64
|
type OverlappingNativeProps = "autoCorrect" | "autoCapitalize" | "spellCheck";
|
|
60
|
-
type
|
|
65
|
+
type NativeInputOwnProps = InputSharedProps &
|
|
61
66
|
Omit<InputNativeProps, OverlappingNativeProps> & {
|
|
62
67
|
dirname?: string;
|
|
68
|
+
/** `"textarea"` renders the multiline host (web parity with `render`). */
|
|
69
|
+
render?: "input" | "textarea" | "select" | "button";
|
|
70
|
+
/** Host tag override (web); native always renders a `TextInput`. */
|
|
71
|
+
component?: "input" | "textarea" | "select" | "button";
|
|
72
|
+
inputMode?: RNTextInputProps["inputMode"];
|
|
73
|
+
onFocus?: RNTextInputProps["onFocus"];
|
|
74
|
+
onBlur?: RNTextInputProps["onBlur"];
|
|
75
|
+
onPress?: RNTextInputProps["onPress"];
|
|
76
|
+
children?: React.ReactNode;
|
|
63
77
|
};
|
|
78
|
+
/** The host frame's style props (padding, text styles, input colours) stay public. */
|
|
79
|
+
type NativeInputProps = Omit<GetProps<typeof InputHostStyle>, keyof NativeInputOwnProps> &
|
|
80
|
+
NativeInputOwnProps;
|
|
64
81
|
// The host is a bare RN TextInput. Keep the prop object constrained to RN's
|
|
65
82
|
// TextInput surface plus Tamagui v2's normalized ARIA state props.
|
|
66
83
|
type NativeInputHostProps = RNTextInputProps & {
|
|
@@ -88,507 +105,510 @@ const getNativeLineHeight = (size: InputSharedProps["size"]) => {
|
|
|
88
105
|
* A cross-platform input component for React Native.
|
|
89
106
|
* @see — Docs https://tamagui.dev/ui/inputs#input
|
|
90
107
|
*/
|
|
91
|
-
const InputComponent =
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
switch (type) {
|
|
238
|
-
case "password":
|
|
239
|
-
return { secureTextEntry: true, keyboardType: "default" as const, inputMode: undefined };
|
|
240
|
-
case "email":
|
|
241
|
-
return {
|
|
242
|
-
secureTextEntry: false,
|
|
243
|
-
keyboardType: "email-address" as const,
|
|
244
|
-
inputMode: "email" as const,
|
|
245
|
-
};
|
|
246
|
-
case "tel":
|
|
108
|
+
const InputComponent = styleable<NativeInputProps>(
|
|
109
|
+
InputHostStyle,
|
|
110
|
+
function Input(props, forwardedRef) {
|
|
111
|
+
const {
|
|
112
|
+
// Cross-platform props we need to convert
|
|
113
|
+
type,
|
|
114
|
+
disabled,
|
|
115
|
+
readOnly,
|
|
116
|
+
id,
|
|
117
|
+
error,
|
|
118
|
+
required,
|
|
119
|
+
size = "md",
|
|
120
|
+
variant = "default",
|
|
121
|
+
radius,
|
|
122
|
+
pointer,
|
|
123
|
+
withAria: _withAria = true,
|
|
124
|
+
wrapperProps,
|
|
125
|
+
styles,
|
|
126
|
+
rootRef,
|
|
127
|
+
leftSection,
|
|
128
|
+
leftSectionWidth,
|
|
129
|
+
leftSectionProps,
|
|
130
|
+
leftSectionPointerEvents = "none",
|
|
131
|
+
rightSection,
|
|
132
|
+
rightSectionWidth,
|
|
133
|
+
rightSectionProps,
|
|
134
|
+
rightSectionPointerEvents = "none",
|
|
135
|
+
inputSize,
|
|
136
|
+
__clearSection,
|
|
137
|
+
__clearable,
|
|
138
|
+
__clearSectionMode,
|
|
139
|
+
__defaultRightSection,
|
|
140
|
+
loading = false,
|
|
141
|
+
loadingPosition = "right",
|
|
142
|
+
rows,
|
|
143
|
+
autosize,
|
|
144
|
+
minRows,
|
|
145
|
+
maxRows,
|
|
146
|
+
autoComplete,
|
|
147
|
+
autoFocus,
|
|
148
|
+
enterKeyHint,
|
|
149
|
+
value,
|
|
150
|
+
defaultValue,
|
|
151
|
+
|
|
152
|
+
// Callbacks
|
|
153
|
+
onChange,
|
|
154
|
+
onInput,
|
|
155
|
+
onKeyDown,
|
|
156
|
+
onChangeText,
|
|
157
|
+
onSubmitEditing,
|
|
158
|
+
onSelectionChange,
|
|
159
|
+
onEndEditing,
|
|
160
|
+
onContentSizeChange,
|
|
161
|
+
onFocus,
|
|
162
|
+
onBlur,
|
|
163
|
+
onScroll,
|
|
164
|
+
onKeyPress: onKeyPressProp,
|
|
165
|
+
onPress: onPressProp,
|
|
166
|
+
selection,
|
|
167
|
+
|
|
168
|
+
// Native-only props (pass through directly)
|
|
169
|
+
keyboardAppearance,
|
|
170
|
+
returnKeyType: returnKeyTypeProp,
|
|
171
|
+
submitBehavior,
|
|
172
|
+
blurOnSubmit,
|
|
173
|
+
caretHidden,
|
|
174
|
+
contextMenuHidden,
|
|
175
|
+
selectTextOnFocus,
|
|
176
|
+
secureTextEntry: secureTextEntryProp,
|
|
177
|
+
maxFontSizeMultiplier,
|
|
178
|
+
allowFontScaling,
|
|
179
|
+
multiline: multilineProp,
|
|
180
|
+
keyboardType: keyboardTypeProp,
|
|
181
|
+
inputMode: inputModeProp,
|
|
182
|
+
autoCapitalize: autoCapitalizeProp,
|
|
183
|
+
autoCorrect: autoCorrectProp,
|
|
184
|
+
autoFocusNative,
|
|
185
|
+
textContentType,
|
|
186
|
+
|
|
187
|
+
// iOS-only props
|
|
188
|
+
clearButtonMode,
|
|
189
|
+
clearTextOnFocus,
|
|
190
|
+
enablesReturnKeyAutomatically,
|
|
191
|
+
dataDetectorTypes,
|
|
192
|
+
scrollEnabled,
|
|
193
|
+
passwordRules,
|
|
194
|
+
rejectResponderTermination,
|
|
195
|
+
spellCheck,
|
|
196
|
+
lineBreakStrategyIOS,
|
|
197
|
+
lineBreakModeIOS,
|
|
198
|
+
smartInsertDelete,
|
|
199
|
+
inputAccessoryViewID,
|
|
200
|
+
inputAccessoryViewButtonLabel,
|
|
201
|
+
disableKeyboardShortcuts,
|
|
202
|
+
|
|
203
|
+
// Android-only props
|
|
204
|
+
importantForAutofill,
|
|
205
|
+
disableFullscreenUI,
|
|
206
|
+
inlineImageLeft,
|
|
207
|
+
inlineImagePadding,
|
|
208
|
+
returnKeyLabel,
|
|
209
|
+
textBreakStrategy,
|
|
210
|
+
textAlignVertical,
|
|
211
|
+
verticalAlign,
|
|
212
|
+
showSoftInputOnFocus,
|
|
213
|
+
numberOfLines: numberOfLinesProp,
|
|
214
|
+
|
|
215
|
+
// Host props to filter out on native
|
|
216
|
+
dirname: _dirname,
|
|
217
|
+
min: _min,
|
|
218
|
+
max: _max,
|
|
219
|
+
minLength: _minLength,
|
|
220
|
+
multiple: _multiple,
|
|
221
|
+
name: _name,
|
|
222
|
+
pattern: _pattern,
|
|
223
|
+
step: _step,
|
|
224
|
+
render,
|
|
225
|
+
component: _component,
|
|
226
|
+
style,
|
|
227
|
+
|
|
228
|
+
// Removes the host chrome so the input renders bare (composite inputs).
|
|
229
|
+
unstyled,
|
|
230
|
+
|
|
231
|
+
...rest
|
|
232
|
+
} = props;
|
|
233
|
+
|
|
234
|
+
const { ref, composedRef } = useNativeInputRef(forwardedRef);
|
|
235
|
+
const [focused, setFocused] = React.useState(false);
|
|
236
|
+
const wrapperContext = React.useContext(InputWrapperContext);
|
|
237
|
+
const inputId = wrapperContext?.inputId || id;
|
|
238
|
+
const inputError = error ?? wrapperContext?.error;
|
|
239
|
+
const effectiveSize = size || wrapperContext?.size || "md";
|
|
240
|
+
|
|
241
|
+
void inputSize;
|
|
242
|
+
void required;
|
|
243
|
+
// Destructured purely to keep it out of `rest` (and thus off the host) — it is
|
|
244
|
+
// not a valid TextInput prop, so it must never leak onto the native element.
|
|
245
|
+
void inputAccessoryViewButtonLabel;
|
|
246
|
+
|
|
247
|
+
// Convert string input `type` to native keyboard props, but only when the
|
|
248
|
+
// explicit native props weren't set. Memoized so a keystroke-driven re-render
|
|
249
|
+
// doesn't rebuild the switch or hand the host a fresh value object.
|
|
250
|
+
const { secureTextEntry, keyboardType, inputMode } = React.useMemo(() => {
|
|
251
|
+
if (secureTextEntryProp || keyboardTypeProp || inputModeProp) {
|
|
247
252
|
return {
|
|
248
|
-
secureTextEntry: false,
|
|
249
|
-
keyboardType: "
|
|
250
|
-
inputMode:
|
|
253
|
+
secureTextEntry: secureTextEntryProp ?? false,
|
|
254
|
+
keyboardType: keyboardTypeProp ?? ("default" as RNTextInputProps["keyboardType"]),
|
|
255
|
+
inputMode: inputModeProp,
|
|
251
256
|
};
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
keyboardType: "
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
//
|
|
312
|
-
//
|
|
313
|
-
//
|
|
314
|
-
//
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
257
|
+
}
|
|
258
|
+
switch (type) {
|
|
259
|
+
case "password":
|
|
260
|
+
return { secureTextEntry: true, keyboardType: "default" as const, inputMode: undefined };
|
|
261
|
+
case "email":
|
|
262
|
+
return {
|
|
263
|
+
secureTextEntry: false,
|
|
264
|
+
keyboardType: "email-address" as const,
|
|
265
|
+
inputMode: "email" as const,
|
|
266
|
+
};
|
|
267
|
+
case "tel":
|
|
268
|
+
return {
|
|
269
|
+
secureTextEntry: false,
|
|
270
|
+
keyboardType: "phone-pad" as const,
|
|
271
|
+
inputMode: "tel" as const,
|
|
272
|
+
};
|
|
273
|
+
case "number":
|
|
274
|
+
return {
|
|
275
|
+
secureTextEntry: false,
|
|
276
|
+
keyboardType: "numeric" as const,
|
|
277
|
+
inputMode: "numeric" as const,
|
|
278
|
+
};
|
|
279
|
+
case "url":
|
|
280
|
+
return {
|
|
281
|
+
secureTextEntry: false,
|
|
282
|
+
keyboardType: "url" as const,
|
|
283
|
+
inputMode: "url" as const,
|
|
284
|
+
};
|
|
285
|
+
case "search":
|
|
286
|
+
return {
|
|
287
|
+
secureTextEntry: false,
|
|
288
|
+
keyboardType: "default" as const,
|
|
289
|
+
inputMode: "search" as const,
|
|
290
|
+
};
|
|
291
|
+
default:
|
|
292
|
+
return { secureTextEntry: false, keyboardType: "default" as const, inputMode: undefined };
|
|
293
|
+
}
|
|
294
|
+
}, [type, secureTextEntryProp, keyboardTypeProp, inputModeProp]);
|
|
295
|
+
|
|
296
|
+
// Use explicit returnKeyType if provided, otherwise convert enterKeyHint.
|
|
297
|
+
const returnKeyType = React.useMemo<RNTextInputProps["returnKeyType"]>(() => {
|
|
298
|
+
if (returnKeyTypeProp) return returnKeyTypeProp;
|
|
299
|
+
switch (enterKeyHint) {
|
|
300
|
+
case "done":
|
|
301
|
+
return "done";
|
|
302
|
+
case "go":
|
|
303
|
+
return "go";
|
|
304
|
+
case "next":
|
|
305
|
+
return "next";
|
|
306
|
+
case "search":
|
|
307
|
+
return "search";
|
|
308
|
+
case "send":
|
|
309
|
+
return "send";
|
|
310
|
+
default:
|
|
311
|
+
return undefined;
|
|
312
|
+
}
|
|
313
|
+
}, [returnKeyTypeProp, enterKeyHint]);
|
|
314
|
+
|
|
315
|
+
const multiline = multilineProp ?? (render === "textarea" || !!(rows && rows > 1));
|
|
316
|
+
// Multiline height is controlled entirely via style (minHeight/maxHeight bounds
|
|
317
|
+
// below) on BOTH platforms, so DON'T auto-derive `numberOfLines` from
|
|
318
|
+
// `rows`/`minRows`: on Android `numberOfLines` calls `EditText.setLines()`, which
|
|
319
|
+
// pins the line count and fights the style height (iOS ignores it for multiline)
|
|
320
|
+
// — that conflict makes a "fixed N rows" textarea render broken on Android while
|
|
321
|
+
// working on iOS. Only forward an explicitly consumer-provided value.
|
|
322
|
+
const numberOfLines = numberOfLinesProp;
|
|
323
|
+
|
|
324
|
+
// Row counts → pixel bounds via the per-size font line height. The multiline host
|
|
325
|
+
// is sized with minHeight/maxHeight ONLY (never an explicit `height`), letting the
|
|
326
|
+
// native TextInput size itself to its content between those bounds — the reliable
|
|
327
|
+
// cross-platform approach. Driving `height` from `onContentSizeChange` instead
|
|
328
|
+
// collapses/oscillates on Android, because the reported contentSize feeds back
|
|
329
|
+
// into the height we set (iOS tolerates it, which is why it only broke on Android).
|
|
330
|
+
// • autosize → grow from minRows (minHeight) up to maxRows (maxHeight), then scroll
|
|
331
|
+
// • fixed rows → pinned to minRows (minHeight === maxHeight); content scrolls
|
|
332
|
+
const { multilineMinHeight, multilineMaxHeight } = React.useMemo(() => {
|
|
333
|
+
if (!multiline) return { multilineMinHeight: undefined, multilineMaxHeight: undefined };
|
|
334
|
+
const lineHeight = getNativeLineHeight(effectiveSize);
|
|
335
|
+
// React Native uses the border-box model, so the host's vertical padding is
|
|
336
|
+
// SUBTRACTED from minHeight/maxHeight to get the text area. Add it back (top +
|
|
337
|
+
// bottom) so `minRows`/`maxRows` count FULL text lines — matching the web
|
|
338
|
+
// autosize hook, which likewise adds the padding to its row-count height.
|
|
339
|
+
// Without this a 2-row field's padding eats into the rows and shows ~1 line.
|
|
340
|
+
const chrome = getTextareaPaddingVertical(effectiveSize) * 2;
|
|
341
|
+
const minH = typeof minRows === "number" ? lineHeight * minRows + chrome : undefined;
|
|
342
|
+
const maxH = typeof maxRows === "number" ? lineHeight * maxRows + chrome : undefined;
|
|
343
|
+
return {
|
|
344
|
+
multilineMinHeight: minH,
|
|
345
|
+
// Autosize caps at maxRows (unbounded when maxRows is unset). A non-autosize
|
|
346
|
+
// field with a row count is FIXED to that height and scrolls its overflow.
|
|
347
|
+
multilineMaxHeight: autosize ? maxH : minH,
|
|
348
|
+
};
|
|
349
|
+
}, [multiline, effectiveSize, minRows, maxRows, autosize]);
|
|
350
|
+
|
|
351
|
+
// Normalize the string `autoCorrect`/`autoCapitalize` props to native values.
|
|
352
|
+
const autoCorrect =
|
|
353
|
+
autoCorrectProp === "on" ? true : autoCorrectProp === "off" ? false : autoCorrectProp;
|
|
354
|
+
const autoCapitalize =
|
|
355
|
+
autoCapitalizeProp === "on"
|
|
356
|
+
? "sentences"
|
|
357
|
+
: autoCapitalizeProp === "off"
|
|
358
|
+
? "none"
|
|
359
|
+
: autoCapitalizeProp;
|
|
360
|
+
|
|
361
|
+
// Register focusable
|
|
362
|
+
React.useEffect(() => {
|
|
363
|
+
if (!inputId || disabled) return;
|
|
364
|
+
const focusable = {
|
|
365
|
+
focusAndSelect: () => ref.current?.focus(),
|
|
366
|
+
focus: () => ref.current?.focus(),
|
|
367
|
+
};
|
|
368
|
+
const unregisterTamaguiFocusable = registerFocusable(inputId, focusable);
|
|
369
|
+
const unregisterInputFocusable = registerInputFocusable(inputId, focusable);
|
|
345
370
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
371
|
+
return () => {
|
|
372
|
+
unregisterTamaguiFocusable?.();
|
|
373
|
+
unregisterInputFocusable();
|
|
374
|
+
};
|
|
375
|
+
}, [inputId, disabled, ref]);
|
|
376
|
+
|
|
377
|
+
// Every handler below is wrapped in `useCallbackRef`: a stable identity that
|
|
378
|
+
// always invokes the latest closure. The native `TextInput` therefore keeps the
|
|
379
|
+
// SAME listener props across every keystroke-driven re-render, so the controlled
|
|
380
|
+
// value stays state-safe and PinInput's memoized per-field props never churn.
|
|
381
|
+
const focusInput = useCallbackRef(() => {
|
|
382
|
+
if (!disabled) {
|
|
383
|
+
ref.current?.focus();
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
// Bridge cross-platform onChange/onInput callbacks to native onChangeText.
|
|
388
|
+
const handleChangeText = useCallbackRef((text: string) => {
|
|
389
|
+
onChangeText?.(text);
|
|
390
|
+
onChange?.({
|
|
391
|
+
target: { value: text },
|
|
392
|
+
currentTarget: { value: text },
|
|
393
|
+
type: "change",
|
|
394
|
+
} satisfies InputValueChangePayload);
|
|
395
|
+
onInput?.({
|
|
396
|
+
target: { value: text },
|
|
397
|
+
currentTarget: { value: text },
|
|
398
|
+
type: "input",
|
|
399
|
+
} satisfies InputValueInputPayload);
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
// Bridge onKeyDown via onKeyPress for Backspace + printable keys. Enter is
|
|
403
|
+
// emitted ONLY from onSubmitEditing — emitting it here too would fire onKeyDown
|
|
404
|
+
// twice for a single return press (one keypress + one submit).
|
|
405
|
+
const handleKeyPress = useCallbackRef((e: NativeKeyPressEvent) => {
|
|
406
|
+
onKeyPressProp?.(e);
|
|
407
|
+
if (!onKeyDown) return;
|
|
408
|
+
const key: NativeChangeKey = e.nativeEvent.key;
|
|
409
|
+
// RN reports named keys ("Enter"/"Backspace") and the literal typed character
|
|
410
|
+
// (length 1, including " "). Anything else is a non-text key we don't bridge.
|
|
411
|
+
if (key === "Backspace" || key.length === 1) {
|
|
412
|
+
onKeyDown({
|
|
413
|
+
key,
|
|
414
|
+
type: "keydown",
|
|
415
|
+
preventDefault: noop,
|
|
416
|
+
stopPropagation: noop,
|
|
417
|
+
} satisfies InputKeyDownPayload);
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
const handleSubmitEditing = useCallbackRef((e: NativeSubmitEvent) => {
|
|
422
|
+
onKeyDown?.({
|
|
423
|
+
key: "Enter",
|
|
389
424
|
type: "keydown",
|
|
390
425
|
preventDefault: noop,
|
|
391
426
|
stopPropagation: noop,
|
|
392
427
|
} satisfies InputKeyDownPayload);
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
inlineImagePadding,
|
|
505
|
-
returnKeyLabel,
|
|
506
|
-
textBreakStrategy,
|
|
507
|
-
// Top-align multiline text by default so the explicit vertical padding is
|
|
508
|
-
// measured from the top edge consistently (Android otherwise centers it). A
|
|
509
|
-
// consumer-passed `textAlignVertical` still wins.
|
|
510
|
-
textAlignVertical: textAlignVertical ?? (multiline ? "top" : undefined),
|
|
511
|
-
verticalAlign,
|
|
512
|
-
showSoftInputOnFocus,
|
|
513
|
-
};
|
|
428
|
+
onSubmitEditing?.(e);
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
const handleSelectionChange = useCallbackRef((e: NativeSelectionEvent) => {
|
|
432
|
+
onSelectionChange?.(e);
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
// Pure passthrough — height is no longer derived from content size (see the
|
|
436
|
+
// multilineMinHeight/multilineMaxHeight note above).
|
|
437
|
+
const handleContentSizeChange = useCallbackRef((e: NativeContentSizeEvent) => {
|
|
438
|
+
onContentSizeChange?.(e);
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
const handleFocus = useCallbackRef((e: NativeFocusEvent) => {
|
|
442
|
+
setFocused(true);
|
|
443
|
+
onFocus?.(e);
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
const handleBlur = useCallbackRef((e: NativeBlurEvent) => {
|
|
447
|
+
setFocused(false);
|
|
448
|
+
onBlur?.(e);
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
// Press-trigger mode: a readOnly input used as a press target (the picker
|
|
452
|
+
// trigger pattern — `Popover.Target` clones an `onPress` onto the field) can't
|
|
453
|
+
// take its press on the TextInput host. Android maps `editable={false}` to
|
|
454
|
+
// `setEnabled(false)`, and RN demotes a disabled view's pointer events to
|
|
455
|
+
// `box-none` (`TouchTargetHelper`), so the host can never be the touch target
|
|
456
|
+
// and the press would silently never fire there. Route the press to the root
|
|
457
|
+
// frame instead (a plain View, always pressable) and make the host transparent
|
|
458
|
+
// to touches so the whole field is one uniform tap target on both platforms.
|
|
459
|
+
const isPressTrigger = !!readOnly && !disabled && typeof onPressProp === "function";
|
|
460
|
+
|
|
461
|
+
const handleRootPress = useCallbackRef((event: unknown) => {
|
|
462
|
+
focusInput();
|
|
463
|
+
if (isPressTrigger) {
|
|
464
|
+
(onPressProp as (e: unknown) => void)(event);
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
const nativeInputProps: NativeInputHostProps = {
|
|
469
|
+
editable: !disabled && !readOnly,
|
|
470
|
+
value: value == null ? undefined : String(value),
|
|
471
|
+
defaultValue: defaultValue == null ? undefined : String(defaultValue),
|
|
472
|
+
secureTextEntry,
|
|
473
|
+
keyboardType,
|
|
474
|
+
keyboardAppearance,
|
|
475
|
+
inputMode,
|
|
476
|
+
returnKeyType,
|
|
477
|
+
multiline,
|
|
478
|
+
numberOfLines,
|
|
479
|
+
selection,
|
|
480
|
+
autoComplete: autoComplete as RNTextInputProps["autoComplete"],
|
|
481
|
+
autoFocus: autoFocusNative ?? autoFocus,
|
|
482
|
+
"aria-disabled": disabled || undefined,
|
|
483
|
+
"aria-invalid": _withAria && inputError ? true : undefined,
|
|
484
|
+
"aria-describedby": _withAria ? wrapperContext?.describedBy : undefined,
|
|
485
|
+
|
|
486
|
+
// callbacks
|
|
487
|
+
onChangeText: handleChangeText,
|
|
488
|
+
onKeyPress: onKeyPressProp || onKeyDown ? handleKeyPress : undefined,
|
|
489
|
+
onSubmitEditing: onKeyDown || onSubmitEditing ? handleSubmitEditing : undefined,
|
|
490
|
+
onSelectionChange: onSelectionChange ? handleSelectionChange : undefined,
|
|
491
|
+
onFocus: handleFocus,
|
|
492
|
+
onBlur: handleBlur,
|
|
493
|
+
onEndEditing,
|
|
494
|
+
onContentSizeChange: onContentSizeChange ? handleContentSizeChange : undefined,
|
|
495
|
+
onScroll,
|
|
496
|
+
|
|
497
|
+
// cross-platform native props
|
|
498
|
+
submitBehavior,
|
|
499
|
+
blurOnSubmit,
|
|
500
|
+
caretHidden,
|
|
501
|
+
contextMenuHidden,
|
|
502
|
+
selectTextOnFocus,
|
|
503
|
+
maxFontSizeMultiplier,
|
|
504
|
+
allowFontScaling,
|
|
505
|
+
autoCapitalize,
|
|
506
|
+
autoCorrect,
|
|
507
|
+
textContentType,
|
|
508
|
+
|
|
509
|
+
// iOS-only props
|
|
510
|
+
clearButtonMode,
|
|
511
|
+
clearTextOnFocus,
|
|
512
|
+
enablesReturnKeyAutomatically,
|
|
513
|
+
dataDetectorTypes,
|
|
514
|
+
scrollEnabled,
|
|
515
|
+
passwordRules,
|
|
516
|
+
rejectResponderTermination,
|
|
517
|
+
spellCheck,
|
|
518
|
+
lineBreakStrategyIOS,
|
|
519
|
+
lineBreakModeIOS,
|
|
520
|
+
smartInsertDelete,
|
|
521
|
+
inputAccessoryViewID,
|
|
522
|
+
// inputAccessoryViewButtonLabel is NOT a TextInput prop — never forwarded.
|
|
523
|
+
disableKeyboardShortcuts,
|
|
524
|
+
|
|
525
|
+
// Android-only props
|
|
526
|
+
importantForAutofill,
|
|
527
|
+
disableFullscreenUI,
|
|
528
|
+
inlineImageLeft,
|
|
529
|
+
inlineImagePadding,
|
|
530
|
+
returnKeyLabel,
|
|
531
|
+
textBreakStrategy,
|
|
532
|
+
// Top-align multiline text by default so the explicit vertical padding is
|
|
533
|
+
// measured from the top edge consistently (Android otherwise centers it). A
|
|
534
|
+
// consumer-passed `textAlignVertical` still wins.
|
|
535
|
+
textAlignVertical: textAlignVertical ?? (multiline ? "top" : undefined),
|
|
536
|
+
verticalAlign,
|
|
537
|
+
showSoftInputOnFocus,
|
|
538
|
+
};
|
|
514
539
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
size={effectiveSize}
|
|
518
|
-
variant={unstyled ? "unstyled" : variant}
|
|
519
|
-
radius={radius}
|
|
520
|
-
error={inputError}
|
|
521
|
-
disabled={disabled}
|
|
522
|
-
pointer={pointer}
|
|
523
|
-
focused={focused}
|
|
524
|
-
multiline={multiline}
|
|
525
|
-
onRootPress={handleRootPress}
|
|
526
|
-
rootRef={rootRef}
|
|
527
|
-
wrapperProps={wrapperProps}
|
|
528
|
-
styles={pick(styles, INPUT_CHROME_SLOTS)}
|
|
529
|
-
leftSection={leftSection}
|
|
530
|
-
leftSectionWidth={leftSectionWidth}
|
|
531
|
-
leftSectionProps={leftSectionProps}
|
|
532
|
-
leftSectionPointerEvents={leftSectionPointerEvents}
|
|
533
|
-
rightSection={rightSection}
|
|
534
|
-
rightSectionWidth={rightSectionWidth}
|
|
535
|
-
rightSectionProps={rightSectionProps}
|
|
536
|
-
rightSectionPointerEvents={rightSectionPointerEvents}
|
|
537
|
-
loading={loading}
|
|
538
|
-
loadingPosition={loadingPosition}
|
|
539
|
-
__clearSection={__clearSection}
|
|
540
|
-
__clearable={__clearable}
|
|
541
|
-
__clearSectionMode={__clearSectionMode}
|
|
542
|
-
__defaultRightSection={__defaultRightSection}
|
|
543
|
-
>
|
|
544
|
-
<InputHostStyle
|
|
545
|
-
ref={composedRef}
|
|
546
|
-
flex={1}
|
|
547
|
-
// Single-line fills the chrome height; multiline sets NO explicit height and
|
|
548
|
-
// is bounded by minHeight/maxHeight so the native TextInput sizes itself.
|
|
549
|
-
height={multiline ? undefined : "100%"}
|
|
550
|
-
minHeight={multilineMinHeight}
|
|
551
|
-
maxHeight={multilineMaxHeight}
|
|
552
|
-
minWidth={0}
|
|
553
|
-
paddingVertical={multiline ? getTextareaPaddingVertical(effectiveSize) : 0}
|
|
554
|
-
// Android's TextInput adds asymmetric font padding (extra space above
|
|
555
|
-
// ascenders / below descenders) that iOS doesn't, making top/bottom look
|
|
556
|
-
// uneven across platforms. Disabling it (no-op on iOS) lets the explicit
|
|
557
|
-
// `paddingVertical` above be the single source of vertical inset on both.
|
|
558
|
-
includeFontPadding={false}
|
|
559
|
-
unstyled
|
|
540
|
+
return (
|
|
541
|
+
<InputChrome
|
|
560
542
|
size={effectiveSize}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
{
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
}
|
|
543
|
+
variant={unstyled ? "unstyled" : variant}
|
|
544
|
+
radius={radius}
|
|
545
|
+
error={inputError}
|
|
546
|
+
disabled={disabled}
|
|
547
|
+
pointer={pointer}
|
|
548
|
+
focused={focused}
|
|
549
|
+
multiline={multiline}
|
|
550
|
+
onRootPress={handleRootPress}
|
|
551
|
+
rootRef={rootRef}
|
|
552
|
+
wrapperProps={wrapperProps}
|
|
553
|
+
styles={pick(styles, INPUT_CHROME_SLOTS)}
|
|
554
|
+
leftSection={leftSection}
|
|
555
|
+
leftSectionWidth={leftSectionWidth}
|
|
556
|
+
leftSectionProps={leftSectionProps}
|
|
557
|
+
leftSectionPointerEvents={leftSectionPointerEvents}
|
|
558
|
+
rightSection={rightSection}
|
|
559
|
+
rightSectionWidth={rightSectionWidth}
|
|
560
|
+
rightSectionProps={rightSectionProps}
|
|
561
|
+
rightSectionPointerEvents={rightSectionPointerEvents}
|
|
562
|
+
loading={loading}
|
|
563
|
+
loadingPosition={loadingPosition}
|
|
564
|
+
__clearSection={__clearSection}
|
|
565
|
+
__clearable={__clearable}
|
|
566
|
+
__clearSectionMode={__clearSectionMode}
|
|
567
|
+
__defaultRightSection={__defaultRightSection}
|
|
568
|
+
>
|
|
569
|
+
<InputHostStyle
|
|
570
|
+
ref={composedRef as React.Ref<TextInput>}
|
|
571
|
+
flex={1}
|
|
572
|
+
minWidth={0}
|
|
573
|
+
paddingVertical={multiline ? getTextareaPaddingVertical(effectiveSize) : 0}
|
|
574
|
+
// Single-line fills the chrome height; multiline sets NO explicit height and
|
|
575
|
+
// is bounded by minHeight/maxHeight so the native TextInput sizes itself.
|
|
576
|
+
// Conditional spreads, never `prop={undefined}` (that clears in v3).
|
|
577
|
+
{...(multiline ? null : FILL_HEIGHT)}
|
|
578
|
+
{...(multilineMinHeight !== undefined ? { minHeight: multilineMinHeight } : null)}
|
|
579
|
+
{...(multilineMaxHeight !== undefined ? { maxHeight: multilineMaxHeight } : null)}
|
|
580
|
+
size={effectiveSize}
|
|
581
|
+
// After `size` so it beats the variant's `paddingHorizontal`; before
|
|
582
|
+
// `{...rest}` so a consumer-passed padding still wins.
|
|
583
|
+
{...getInputSectionInsets({
|
|
584
|
+
leftSection,
|
|
585
|
+
rightSection,
|
|
586
|
+
loading,
|
|
587
|
+
loadingPosition,
|
|
588
|
+
__clearSection,
|
|
589
|
+
__clearable,
|
|
590
|
+
__clearSectionMode,
|
|
591
|
+
__defaultRightSection,
|
|
592
|
+
})}
|
|
593
|
+
underlineColorAndroid="transparent"
|
|
594
|
+
// Trigger mode: the root frame owns the press (see `handleRootPress`);
|
|
595
|
+
// otherwise forward the consumer's press to the host as before.
|
|
596
|
+
onPress={isPressTrigger ? undefined : onPressProp}
|
|
597
|
+
{...(isPressTrigger ? NO_POINTER_EVENTS : null)}
|
|
598
|
+
{...(rest as object)}
|
|
599
|
+
{...(nativeInputProps as object)}
|
|
600
|
+
// Android's TextInput adds asymmetric font padding (extra space above
|
|
601
|
+
// ascenders / below descenders) that iOS doesn't, making top/bottom look
|
|
602
|
+
// uneven across platforms. Disabling it (no-op on iOS) lets the explicit
|
|
603
|
+
// `paddingVertical` above be the single source of vertical inset on both.
|
|
604
|
+
// `includeFontPadding` is an RN text STYLE, so it rides `style` (merged
|
|
605
|
+
// under a consumer-passed style).
|
|
606
|
+
style={style ? [NO_FONT_PADDING, style] : NO_FONT_PADDING}
|
|
607
|
+
/>
|
|
608
|
+
</InputChrome>
|
|
609
|
+
);
|
|
610
|
+
},
|
|
611
|
+
);
|
|
592
612
|
|
|
593
613
|
export const Input = withStaticProperties(InputComponent, {
|
|
594
614
|
Wrapper: InputWrapper,
|