@knitui/components 0.5.0 → 0.6.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/lib/commonjs/Accordion/Accordion.js +10 -6
- package/lib/commonjs/Accordion/Accordion.js.map +1 -1
- package/lib/commonjs/Alert/Alert.js +31 -11
- package/lib/commonjs/Alert/Alert.js.map +1 -1
- package/lib/commonjs/AngleSlider/AngleSlider.js +55 -17
- package/lib/commonjs/AngleSlider/AngleSlider.js.map +1 -1
- package/lib/commonjs/Autocomplete/Autocomplete.js +53 -33
- package/lib/commonjs/Autocomplete/Autocomplete.js.map +1 -1
- package/lib/commonjs/Badge/Badge.js +6 -9
- package/lib/commonjs/Badge/Badge.js.map +1 -1
- package/lib/commonjs/Button/Button.js +22 -6
- package/lib/commonjs/Button/Button.js.map +1 -1
- package/lib/commonjs/Card/Card.js +13 -4
- package/lib/commonjs/Card/Card.js.map +1 -1
- package/lib/commonjs/Checkbox/CheckIcon.js +10 -6
- package/lib/commonjs/Checkbox/CheckIcon.js.map +1 -1
- package/lib/commonjs/Checkbox/Checkbox.js +9 -2
- package/lib/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/Chip/Chip.js +15 -16
- package/lib/commonjs/Chip/Chip.js.map +1 -1
- package/lib/commonjs/CloseButton/CloseButton.js +2 -2
- package/lib/commonjs/CloseButton/CloseButton.js.map +1 -1
- package/lib/commonjs/ColorInput/ColorInput.js +12 -4
- package/lib/commonjs/ColorInput/ColorInput.js.map +1 -1
- package/lib/commonjs/ColorPicker/ColorPicker.js +32 -24
- package/lib/commonjs/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/commonjs/Combobox/Combobox.js +11 -6
- package/lib/commonjs/Combobox/Combobox.js.map +1 -1
- package/lib/commonjs/Combobox/OptionsDropdown.js +6 -2
- package/lib/commonjs/Combobox/OptionsDropdown.js.map +1 -1
- package/lib/commonjs/Group/Group.js +19 -11
- package/lib/commonjs/Group/Group.js.map +1 -1
- package/lib/commonjs/Highlight/Highlight.js +30 -10
- package/lib/commonjs/Highlight/Highlight.js.map +1 -1
- package/lib/commonjs/HoverCard/HoverCard.js +23 -10
- package/lib/commonjs/HoverCard/HoverCard.js.map +1 -1
- package/lib/commonjs/Indicator/Indicator.js +5 -1
- package/lib/commonjs/Indicator/Indicator.js.map +1 -1
- package/lib/commonjs/Input/Input.js +30 -12
- package/lib/commonjs/Input/Input.js.map +1 -1
- package/lib/commonjs/Input/shared.js +18 -8
- package/lib/commonjs/Input/shared.js.map +1 -1
- package/lib/commonjs/Loader/Loader.js +18 -10
- package/lib/commonjs/Loader/Loader.js.map +1 -1
- package/lib/commonjs/Menu/Menu.js +6 -7
- package/lib/commonjs/Menu/Menu.js.map +1 -1
- package/lib/commonjs/MultiSelect/MultiSelect.js +112 -47
- package/lib/commonjs/MultiSelect/MultiSelect.js.map +1 -1
- package/lib/commonjs/Notification/Notification.js +31 -11
- package/lib/commonjs/Notification/Notification.js.map +1 -1
- package/lib/commonjs/NumberFormatter/NumberFormatter.js +48 -11
- package/lib/commonjs/NumberFormatter/NumberFormatter.js.map +1 -1
- package/lib/commonjs/Paper/Paper.js +8 -8
- package/lib/commonjs/Paper/Paper.js.map +1 -1
- package/lib/commonjs/Pill/Pill.js +6 -8
- package/lib/commonjs/Pill/Pill.js.map +1 -1
- package/lib/commonjs/Progress/Progress.js +4 -1
- package/lib/commonjs/Progress/Progress.js.map +1 -1
- package/lib/commonjs/RollingNumber/RollingNumber.js +30 -13
- package/lib/commonjs/RollingNumber/RollingNumber.js.map +1 -1
- package/lib/commonjs/RollingNumber/rolling-number-utils.js +27 -5
- package/lib/commonjs/RollingNumber/rolling-number-utils.js.map +1 -1
- package/lib/commonjs/ScrollArea/ScrollArea.js +131 -41
- package/lib/commonjs/ScrollArea/ScrollArea.js.map +1 -1
- package/lib/commonjs/ScrollArea/ScrollArea.native.js +128 -40
- package/lib/commonjs/ScrollArea/ScrollArea.native.js.map +1 -1
- package/lib/commonjs/SegmentedControl/SegmentedControl.js +4 -1
- package/lib/commonjs/SegmentedControl/SegmentedControl.js.map +1 -1
- package/lib/commonjs/Select/Select.js +64 -35
- package/lib/commonjs/Select/Select.js.map +1 -1
- package/lib/commonjs/Skeleton/Skeleton.js +6 -2
- package/lib/commonjs/Skeleton/Skeleton.js.map +1 -1
- package/lib/commonjs/Slider/Slider.js +136 -83
- package/lib/commonjs/Slider/Slider.js.map +1 -1
- package/lib/commonjs/Spoiler/Spoiler.js +22 -2
- package/lib/commonjs/Spoiler/Spoiler.js.map +1 -1
- package/lib/commonjs/Stepper/Stepper.js +2 -2
- package/lib/commonjs/Stepper/Stepper.js.map +1 -1
- package/lib/commonjs/Switch/Switch.js +18 -7
- package/lib/commonjs/Switch/Switch.js.map +1 -1
- package/lib/commonjs/Table/Table.js +91 -28
- package/lib/commonjs/Table/Table.js.map +1 -1
- package/lib/commonjs/TableOfContents/TableOfContents.js +4 -1
- package/lib/commonjs/TableOfContents/TableOfContents.js.map +1 -1
- package/lib/commonjs/TagsInput/TagsInput.js +138 -55
- package/lib/commonjs/TagsInput/TagsInput.js.map +1 -1
- package/lib/commonjs/Tooltip/Tooltip.js +27 -5
- package/lib/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/lib/commonjs/Tree/Tree.js +4 -1
- package/lib/commonjs/Tree/Tree.js.map +1 -1
- package/lib/commonjs/Tree/tree-data.js +58 -23
- package/lib/commonjs/Tree/tree-data.js.map +1 -1
- package/lib/commonjs/Tree/use-tree.js +33 -4
- package/lib/commonjs/Tree/use-tree.js.map +1 -1
- package/lib/commonjs/TreeSelect/TreeSelect.js +70 -30
- package/lib/commonjs/TreeSelect/TreeSelect.js.map +1 -1
- package/lib/commonjs/Typography/Typography.js +10 -10
- package/lib/commonjs/Typography/Typography.js.map +1 -1
- package/lib/commonjs/UnstyledButton/UnstyledButton.js +8 -3
- package/lib/commonjs/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/commonjs/VirtualList/VirtualList.js +71 -13
- package/lib/commonjs/VirtualList/VirtualList.js.map +1 -1
- package/lib/commonjs/floating/platform.js +28 -1
- package/lib/commonjs/floating/platform.js.map +1 -1
- package/lib/commonjs/floating/use-position.js +33 -1
- package/lib/commonjs/floating/use-position.js.map +1 -1
- package/lib/commonjs/internal/ControlIconProvider.js +20 -15
- package/lib/commonjs/internal/ControlIconProvider.js.map +1 -1
- package/lib/commonjs/internal/gradient-shared.js +9 -5
- package/lib/commonjs/internal/gradient-shared.js.map +1 -1
- package/lib/commonjs/internal/gradient.js +21 -9
- package/lib/commonjs/internal/gradient.js.map +1 -1
- package/lib/commonjs/internal/gradient.native.js +36 -10
- package/lib/commonjs/internal/gradient.native.js.map +1 -1
- package/lib/commonjs/internal/render-text-child.js +30 -2
- package/lib/commonjs/internal/render-text-child.js.map +1 -1
- package/lib/commonjs/internal/style-props.js +17 -5
- package/lib/commonjs/internal/style-props.js.map +1 -1
- package/lib/commonjs/internal/theme-color-web.js +46 -0
- package/lib/commonjs/internal/theme-color-web.js.map +1 -0
- package/lib/commonjs/internal/use-icon-color.js +33 -0
- package/lib/commonjs/internal/use-icon-color.js.map +1 -0
- package/lib/commonjs/internal/use-icon-color.native.js +23 -0
- package/lib/commonjs/internal/use-icon-color.native.js.map +1 -0
- package/lib/commonjs/internal/use-looping-animation.js +7 -3
- package/lib/commonjs/internal/use-looping-animation.js.map +1 -1
- package/lib/commonjs/internal/use-looping-animation.native.js +9 -1
- package/lib/commonjs/internal/use-looping-animation.native.js.map +1 -1
- package/lib/commonjs/internal/use-looping-animation.shared.js +33 -0
- package/lib/commonjs/internal/use-looping-animation.shared.js.map +1 -1
- package/lib/commonjs/internal/use-slot-text-wrapper.js +36 -5
- package/lib/commonjs/internal/use-slot-text-wrapper.js.map +1 -1
- package/lib/module/Accordion/Accordion.js +9 -5
- package/lib/module/Accordion/Accordion.js.map +1 -1
- package/lib/module/Alert/Alert.js +31 -11
- package/lib/module/Alert/Alert.js.map +1 -1
- package/lib/module/AngleSlider/AngleSlider.js +55 -17
- package/lib/module/AngleSlider/AngleSlider.js.map +1 -1
- package/lib/module/Autocomplete/Autocomplete.js +54 -34
- package/lib/module/Autocomplete/Autocomplete.js.map +1 -1
- package/lib/module/Badge/Badge.js +6 -9
- package/lib/module/Badge/Badge.js.map +1 -1
- package/lib/module/Button/Button.js +23 -7
- package/lib/module/Button/Button.js.map +1 -1
- package/lib/module/Card/Card.js +13 -4
- package/lib/module/Card/Card.js.map +1 -1
- package/lib/module/Checkbox/CheckIcon.js +9 -5
- package/lib/module/Checkbox/CheckIcon.js.map +1 -1
- package/lib/module/Checkbox/Checkbox.js +9 -2
- package/lib/module/Checkbox/Checkbox.js.map +1 -1
- package/lib/module/Chip/Chip.js +15 -16
- package/lib/module/Chip/Chip.js.map +1 -1
- package/lib/module/CloseButton/CloseButton.js +1 -1
- package/lib/module/CloseButton/CloseButton.js.map +1 -1
- package/lib/module/ColorInput/ColorInput.js +12 -4
- package/lib/module/ColorInput/ColorInput.js.map +1 -1
- package/lib/module/ColorPicker/ColorPicker.js +32 -24
- package/lib/module/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/module/Combobox/Combobox.js +11 -6
- package/lib/module/Combobox/Combobox.js.map +1 -1
- package/lib/module/Combobox/OptionsDropdown.js +6 -2
- package/lib/module/Combobox/OptionsDropdown.js.map +1 -1
- package/lib/module/Group/Group.js +19 -11
- package/lib/module/Group/Group.js.map +1 -1
- package/lib/module/Highlight/Highlight.js +30 -10
- package/lib/module/Highlight/Highlight.js.map +1 -1
- package/lib/module/HoverCard/HoverCard.js +23 -10
- package/lib/module/HoverCard/HoverCard.js.map +1 -1
- package/lib/module/Indicator/Indicator.js +5 -1
- package/lib/module/Indicator/Indicator.js.map +1 -1
- package/lib/module/Input/Input.js +32 -14
- package/lib/module/Input/Input.js.map +1 -1
- package/lib/module/Input/shared.js +19 -9
- package/lib/module/Input/shared.js.map +1 -1
- package/lib/module/Loader/Loader.js +18 -10
- package/lib/module/Loader/Loader.js.map +1 -1
- package/lib/module/Menu/Menu.js +6 -7
- package/lib/module/Menu/Menu.js.map +1 -1
- package/lib/module/MultiSelect/MultiSelect.js +113 -48
- package/lib/module/MultiSelect/MultiSelect.js.map +1 -1
- package/lib/module/Notification/Notification.js +31 -11
- package/lib/module/Notification/Notification.js.map +1 -1
- package/lib/module/NumberFormatter/NumberFormatter.js +48 -11
- package/lib/module/NumberFormatter/NumberFormatter.js.map +1 -1
- package/lib/module/Paper/Paper.js +7 -8
- package/lib/module/Paper/Paper.js.map +1 -1
- package/lib/module/Pill/Pill.js +6 -8
- package/lib/module/Pill/Pill.js.map +1 -1
- package/lib/module/Progress/Progress.js +4 -1
- package/lib/module/Progress/Progress.js.map +1 -1
- package/lib/module/RollingNumber/RollingNumber.js +30 -13
- package/lib/module/RollingNumber/RollingNumber.js.map +1 -1
- package/lib/module/RollingNumber/rolling-number-utils.js +27 -5
- package/lib/module/RollingNumber/rolling-number-utils.js.map +1 -1
- package/lib/module/ScrollArea/ScrollArea.js +133 -43
- package/lib/module/ScrollArea/ScrollArea.js.map +1 -1
- package/lib/module/ScrollArea/ScrollArea.native.js +128 -40
- package/lib/module/ScrollArea/ScrollArea.native.js.map +1 -1
- package/lib/module/SegmentedControl/SegmentedControl.js +4 -1
- package/lib/module/SegmentedControl/SegmentedControl.js.map +1 -1
- package/lib/module/Select/Select.js +65 -36
- package/lib/module/Select/Select.js.map +1 -1
- package/lib/module/Skeleton/Skeleton.js +6 -2
- package/lib/module/Skeleton/Skeleton.js.map +1 -1
- package/lib/module/Slider/Slider.js +137 -84
- package/lib/module/Slider/Slider.js.map +1 -1
- package/lib/module/Spoiler/Spoiler.js +23 -3
- package/lib/module/Spoiler/Spoiler.js.map +1 -1
- package/lib/module/Stepper/Stepper.js +1 -1
- package/lib/module/Stepper/Stepper.js.map +1 -1
- package/lib/module/Switch/Switch.js +18 -7
- package/lib/module/Switch/Switch.js.map +1 -1
- package/lib/module/Table/Table.js +91 -28
- package/lib/module/Table/Table.js.map +1 -1
- package/lib/module/TableOfContents/TableOfContents.js +5 -2
- package/lib/module/TableOfContents/TableOfContents.js.map +1 -1
- package/lib/module/TagsInput/TagsInput.js +140 -57
- package/lib/module/TagsInput/TagsInput.js.map +1 -1
- package/lib/module/Tooltip/Tooltip.js +27 -5
- package/lib/module/Tooltip/Tooltip.js.map +1 -1
- package/lib/module/Tree/Tree.js +4 -1
- package/lib/module/Tree/Tree.js.map +1 -1
- package/lib/module/Tree/tree-data.js +57 -23
- package/lib/module/Tree/tree-data.js.map +1 -1
- package/lib/module/Tree/use-tree.js +34 -5
- package/lib/module/Tree/use-tree.js.map +1 -1
- package/lib/module/TreeSelect/TreeSelect.js +72 -32
- package/lib/module/TreeSelect/TreeSelect.js.map +1 -1
- package/lib/module/Typography/Typography.js +9 -10
- package/lib/module/Typography/Typography.js.map +1 -1
- package/lib/module/UnstyledButton/UnstyledButton.js +9 -4
- package/lib/module/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/module/VirtualList/VirtualList.js +71 -13
- package/lib/module/VirtualList/VirtualList.js.map +1 -1
- package/lib/module/floating/platform.js +28 -1
- package/lib/module/floating/platform.js.map +1 -1
- package/lib/module/floating/use-position.js +33 -1
- package/lib/module/floating/use-position.js.map +1 -1
- package/lib/module/internal/ControlIconProvider.js +18 -13
- package/lib/module/internal/ControlIconProvider.js.map +1 -1
- package/lib/module/internal/gradient-shared.js +9 -5
- package/lib/module/internal/gradient-shared.js.map +1 -1
- package/lib/module/internal/gradient.js +22 -9
- package/lib/module/internal/gradient.js.map +1 -1
- package/lib/module/internal/gradient.native.js +36 -10
- package/lib/module/internal/gradient.native.js.map +1 -1
- package/lib/module/internal/render-text-child.js +30 -2
- package/lib/module/internal/render-text-child.js.map +1 -1
- package/lib/module/internal/style-props.js +16 -4
- package/lib/module/internal/style-props.js.map +1 -1
- package/lib/module/internal/theme-color-web.js +42 -0
- package/lib/module/internal/theme-color-web.js.map +1 -0
- package/lib/module/internal/use-icon-color.js +29 -0
- package/lib/module/internal/use-icon-color.js.map +1 -0
- package/lib/module/internal/use-icon-color.native.js +19 -0
- package/lib/module/internal/use-icon-color.native.js.map +1 -0
- package/lib/module/internal/use-looping-animation.js +8 -4
- package/lib/module/internal/use-looping-animation.js.map +1 -1
- package/lib/module/internal/use-looping-animation.native.js +10 -2
- package/lib/module/internal/use-looping-animation.native.js.map +1 -1
- package/lib/module/internal/use-looping-animation.shared.js +31 -0
- package/lib/module/internal/use-looping-animation.shared.js.map +1 -1
- package/lib/module/internal/use-slot-text-wrapper.js +37 -5
- package/lib/module/internal/use-slot-text-wrapper.js.map +1 -1
- package/lib/typescript/Accordion/Accordion.d.ts +11 -11
- package/lib/typescript/Accordion/Accordion.d.ts.map +1 -1
- package/lib/typescript/ActionIcon/ActionIcon.d.ts +7 -7
- package/lib/typescript/Alert/Alert.d.ts +7 -7
- package/lib/typescript/Alert/Alert.d.ts.map +1 -1
- package/lib/typescript/Anchor/Anchor.d.ts +3 -3
- package/lib/typescript/AngleSlider/AngleSlider.d.ts.map +1 -1
- package/lib/typescript/Autocomplete/Autocomplete.d.ts +16 -42
- package/lib/typescript/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/lib/typescript/Avatar/Avatar.d.ts +21 -21
- package/lib/typescript/Badge/Badge.d.ts +7 -7
- package/lib/typescript/Badge/Badge.d.ts.map +1 -1
- package/lib/typescript/Button/Button.d.ts +7 -7
- package/lib/typescript/Button/Button.d.ts.map +1 -1
- package/lib/typescript/Card/Card.d.ts.map +1 -1
- package/lib/typescript/Checkbox/CheckIcon.d.ts.map +1 -1
- package/lib/typescript/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/Chip/Chip.d.ts.map +1 -1
- package/lib/typescript/CloseButton/CloseButton.d.ts +7 -7
- package/lib/typescript/ColorInput/ColorInput.d.ts.map +1 -1
- package/lib/typescript/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/lib/typescript/Combobox/Combobox.d.ts +2 -2
- package/lib/typescript/Combobox/Combobox.d.ts.map +1 -1
- package/lib/typescript/Combobox/OptionsDropdown.d.ts.map +1 -1
- package/lib/typescript/Combobox/index.d.ts +2 -2
- package/lib/typescript/Dialog/Dialog.d.ts +6 -6
- package/lib/typescript/Fieldset/Fieldset.d.ts +7 -7
- package/lib/typescript/Flex/Flex.d.ts +3 -3
- package/lib/typescript/Group/Group.d.ts +3 -3
- package/lib/typescript/Group/Group.d.ts.map +1 -1
- package/lib/typescript/Highlight/Highlight.d.ts.map +1 -1
- package/lib/typescript/HoverCard/HoverCard.d.ts +1 -1
- package/lib/typescript/HoverCard/HoverCard.d.ts.map +1 -1
- package/lib/typescript/Image/Image.d.ts +14 -14
- package/lib/typescript/Image/createImage.d.ts +17 -17
- package/lib/typescript/Indicator/Indicator.d.ts.map +1 -1
- package/lib/typescript/Input/Input.d.ts +13 -13
- package/lib/typescript/Input/Input.d.ts.map +1 -1
- package/lib/typescript/Input/Input.native.d.ts +16 -16
- package/lib/typescript/Input/shared.d.ts +10 -10
- package/lib/typescript/Input/shared.d.ts.map +1 -1
- package/lib/typescript/InputBase/InputBase.d.ts +2 -2
- package/lib/typescript/Kbd/Kbd.d.ts +1 -1
- package/lib/typescript/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/Mark/Mark.d.ts +1 -1
- package/lib/typescript/MaskInput/MaskInput.d.ts +2 -2
- package/lib/typescript/Menu/Menu.d.ts +1 -1
- package/lib/typescript/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/Modal/Modal.d.ts +6 -6
- package/lib/typescript/MultiSelect/MultiSelect.d.ts +15 -60
- package/lib/typescript/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/lib/typescript/NavLink/NavLink.d.ts +7 -7
- package/lib/typescript/Notification/Notification.d.ts.map +1 -1
- package/lib/typescript/NumberFormatter/NumberFormatter.d.ts.map +1 -1
- package/lib/typescript/NumberInput/NumberInput.d.ts +5 -5
- package/lib/typescript/Paper/Paper.d.ts +8 -40
- package/lib/typescript/Paper/Paper.d.ts.map +1 -1
- package/lib/typescript/PasswordInput/PasswordInput.d.ts +11 -11
- package/lib/typescript/Pill/Pill.d.ts +15 -15
- package/lib/typescript/Pill/Pill.d.ts.map +1 -1
- package/lib/typescript/PinInput/PinInput.d.ts +13 -13
- package/lib/typescript/Popover/Popover.shared.d.ts +3 -3
- package/lib/typescript/Progress/Progress.d.ts.map +1 -1
- package/lib/typescript/Radio/Radio.d.ts +8 -8
- package/lib/typescript/RollingNumber/RollingNumber.d.ts.map +1 -1
- package/lib/typescript/RollingNumber/rolling-number-utils.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/lib/typescript/ScrollArea/ScrollArea.native.d.ts.map +1 -1
- package/lib/typescript/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/lib/typescript/Select/Select.d.ts +20 -49
- package/lib/typescript/Select/Select.d.ts.map +1 -1
- package/lib/typescript/Separator/Separator.d.ts +9 -9
- package/lib/typescript/Skeleton/Skeleton.d.ts.map +1 -1
- package/lib/typescript/Slider/Slider.d.ts.map +1 -1
- package/lib/typescript/Spoiler/Spoiler.d.ts.map +1 -1
- package/lib/typescript/Switch/Switch.d.ts +14 -3
- package/lib/typescript/Switch/Switch.d.ts.map +1 -1
- package/lib/typescript/Table/Table.d.ts +18 -12
- package/lib/typescript/Table/Table.d.ts.map +1 -1
- package/lib/typescript/TableOfContents/TableOfContents.d.ts.map +1 -1
- package/lib/typescript/Tabs/Tabs.d.ts +12 -12
- package/lib/typescript/TagsInput/TagsInput.d.ts +13 -47
- package/lib/typescript/TagsInput/TagsInput.d.ts.map +1 -1
- package/lib/typescript/TextInput/TextInput.d.ts +2 -2
- package/lib/typescript/Textarea/Textarea.d.ts +2 -2
- package/lib/typescript/ThemeIcon/ThemeIcon.d.ts +7 -7
- package/lib/typescript/Title/Title.d.ts +3 -3
- package/lib/typescript/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/typescript/Tree/Tree.d.ts.map +1 -1
- package/lib/typescript/Tree/tree-data.d.ts +7 -0
- package/lib/typescript/Tree/tree-data.d.ts.map +1 -1
- package/lib/typescript/Tree/use-tree.d.ts +5 -0
- package/lib/typescript/Tree/use-tree.d.ts.map +1 -1
- package/lib/typescript/TreeSelect/TreeSelect.d.ts +21 -47
- package/lib/typescript/TreeSelect/TreeSelect.d.ts.map +1 -1
- package/lib/typescript/Typography/Typography.d.ts +8 -8
- package/lib/typescript/Typography/Typography.d.ts.map +1 -1
- package/lib/typescript/UnstyledButton/UnstyledButton.d.ts.map +1 -1
- package/lib/typescript/VirtualList/VirtualList.d.ts.map +1 -1
- package/lib/typescript/floating/platform.d.ts +11 -0
- package/lib/typescript/floating/platform.d.ts.map +1 -1
- package/lib/typescript/floating/use-position.d.ts.map +1 -1
- package/lib/typescript/internal/ControlIconProvider.d.ts +1 -1
- package/lib/typescript/internal/ControlIconProvider.d.ts.map +1 -1
- package/lib/typescript/internal/gradient-shared.d.ts +7 -4
- package/lib/typescript/internal/gradient-shared.d.ts.map +1 -1
- package/lib/typescript/internal/gradient.d.ts +18 -0
- package/lib/typescript/internal/gradient.d.ts.map +1 -1
- package/lib/typescript/internal/gradient.native.d.ts.map +1 -1
- package/lib/typescript/internal/render-text-child.d.ts +11 -0
- package/lib/typescript/internal/render-text-child.d.ts.map +1 -1
- package/lib/typescript/internal/style-props.d.ts +17 -0
- package/lib/typescript/internal/style-props.d.ts.map +1 -1
- package/lib/typescript/internal/theme-color-web.d.ts +2 -0
- package/lib/typescript/internal/theme-color-web.d.ts.map +1 -0
- package/lib/typescript/internal/use-icon-color.d.ts +25 -0
- package/lib/typescript/internal/use-icon-color.d.ts.map +1 -0
- package/lib/typescript/internal/use-icon-color.native.d.ts +11 -0
- package/lib/typescript/internal/use-icon-color.native.d.ts.map +1 -0
- package/lib/typescript/internal/use-looping-animation.d.ts.map +1 -1
- package/lib/typescript/internal/use-looping-animation.native.d.ts.map +1 -1
- package/lib/typescript/internal/use-looping-animation.shared.d.ts +30 -3
- package/lib/typescript/internal/use-looping-animation.shared.d.ts.map +1 -1
- package/lib/typescript/internal/use-slot-text-wrapper.d.ts +0 -20
- package/lib/typescript/internal/use-slot-text-wrapper.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/Accordion/Accordion.tsx +6 -2
- package/src/Alert/Alert.tsx +43 -22
- package/src/AngleSlider/AngleSlider.tsx +73 -21
- package/src/Autocomplete/Autocomplete.tsx +74 -55
- package/src/Badge/Badge.tsx +6 -8
- package/src/Button/Button.tsx +17 -3
- package/src/Card/Card.tsx +11 -3
- package/src/Checkbox/CheckIcon.tsx +9 -5
- package/src/Checkbox/Checkbox.tsx +8 -1
- package/src/Chip/Chip.tsx +15 -22
- package/src/CloseButton/CloseButton.tsx +1 -1
- package/src/ColorInput/ColorInput.tsx +15 -4
- package/src/ColorPicker/ColorPicker.tsx +38 -25
- package/src/Combobox/Combobox.tsx +10 -6
- package/src/Combobox/OptionsDropdown.tsx +6 -1
- package/src/Group/Group.tsx +21 -10
- package/src/Highlight/Highlight.tsx +42 -7
- package/src/HoverCard/HoverCard.tsx +48 -31
- package/src/Indicator/Indicator.tsx +4 -0
- package/src/Input/Input.tsx +31 -16
- package/src/Input/shared.tsx +20 -4
- package/src/Loader/Loader.tsx +14 -4
- package/src/Menu/Menu.tsx +6 -8
- package/src/MultiSelect/MultiSelect.tsx +140 -85
- package/src/Notification/Notification.tsx +43 -22
- package/src/NumberFormatter/NumberFormatter.tsx +66 -11
- package/src/Paper/Paper.tsx +8 -6
- package/src/Pill/Pill.tsx +6 -9
- package/src/Progress/Progress.tsx +3 -0
- package/src/RollingNumber/RollingNumber.tsx +43 -21
- package/src/RollingNumber/rolling-number-utils.ts +28 -5
- package/src/ScrollArea/ScrollArea.native.tsx +142 -49
- package/src/ScrollArea/ScrollArea.tsx +140 -47
- package/src/SegmentedControl/SegmentedControl.tsx +12 -1
- package/src/Select/Select.tsx +90 -67
- package/src/Skeleton/Skeleton.tsx +5 -1
- package/src/Slider/Slider.tsx +157 -61
- package/src/Spoiler/Spoiler.tsx +22 -10
- package/src/Stepper/Stepper.tsx +1 -1
- package/src/Switch/Switch.tsx +20 -9
- package/src/Table/Table.tsx +89 -33
- package/src/TableOfContents/TableOfContents.tsx +5 -1
- package/src/TagsInput/TagsInput.tsx +193 -141
- package/src/Tooltip/Tooltip.tsx +33 -7
- package/src/Tree/Tree.tsx +4 -1
- package/src/Tree/tree-data.ts +74 -26
- package/src/Tree/use-tree.ts +52 -7
- package/src/TreeSelect/TreeSelect.tsx +96 -64
- package/src/Typography/Typography.tsx +9 -8
- package/src/UnstyledButton/UnstyledButton.tsx +12 -5
- package/src/VirtualList/VirtualList.tsx +82 -18
- package/src/floating/platform.ts +29 -1
- package/src/floating/use-position.tsx +38 -1
- package/src/internal/ControlIconProvider.tsx +17 -12
- package/src/internal/gradient-shared.ts +9 -5
- package/src/internal/gradient.native.tsx +29 -5
- package/src/internal/gradient.tsx +22 -7
- package/src/internal/render-text-child.tsx +30 -2
- package/src/internal/style-props.ts +20 -4
- package/src/internal/theme-color-web.ts +40 -0
- package/src/internal/use-icon-color.native.ts +17 -0
- package/src/internal/use-icon-color.ts +26 -0
- package/src/internal/use-looping-animation.native.tsx +10 -2
- package/src/internal/use-looping-animation.shared.ts +38 -3
- package/src/internal/use-looping-animation.tsx +8 -4
- package/src/internal/use-slot-text-wrapper.tsx +39 -5
|
@@ -339,48 +339,65 @@ type HoverHandlers = {
|
|
|
339
339
|
};
|
|
340
340
|
|
|
341
341
|
function HoverCardTarget({ children, refProp = "ref" }: HoverCardTargetProps) {
|
|
342
|
-
|
|
342
|
+
// Destructured so the memo dependency lists below name plain locals — the
|
|
343
|
+
// exhaustive-deps rule can't narrow `ctx.x` member expressions here.
|
|
344
|
+
const { openDropdown, closeDropdown, targetSlot } = useHoverCardContext();
|
|
343
345
|
|
|
344
346
|
const child = children as React.ReactElement<HoverHandlers>;
|
|
345
347
|
const childProps = child.props;
|
|
346
348
|
|
|
347
349
|
// Hover-intent handlers — HoverCard's reason to exist. Web uses mouse events,
|
|
348
350
|
// native uses Tamagui's `onHoverIn`/`onHoverOut`.
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
351
|
+
//
|
|
352
|
+
// Memoised, together with the clone below: a HoverCard re-renders on open /
|
|
353
|
+
// close and on every position update while open, and each of those rebuilt two
|
|
354
|
+
// closures and cloned a NEW trigger element, re-rendering the whole trigger
|
|
355
|
+
// subtree. `children` is a prop, so its identity survives HoverCard's own state
|
|
356
|
+
// churn; when nothing changed the memo returns the SAME element and React skips
|
|
357
|
+
// the subtree.
|
|
358
|
+
const handlers = React.useMemo<HoverHandlers>(
|
|
359
|
+
() =>
|
|
360
|
+
isWeb
|
|
361
|
+
? {
|
|
362
|
+
onMouseEnter: (e) => {
|
|
363
|
+
childProps.onMouseEnter?.(e);
|
|
364
|
+
childProps.onHoverIn?.(e);
|
|
365
|
+
openDropdown();
|
|
366
|
+
},
|
|
367
|
+
onMouseLeave: (e) => {
|
|
368
|
+
childProps.onMouseLeave?.(e);
|
|
369
|
+
childProps.onHoverOut?.(e);
|
|
370
|
+
closeDropdown();
|
|
371
|
+
},
|
|
372
|
+
}
|
|
373
|
+
: {
|
|
374
|
+
onHoverIn: (e) => {
|
|
375
|
+
childProps.onHoverIn?.(e);
|
|
376
|
+
openDropdown();
|
|
377
|
+
},
|
|
378
|
+
onHoverOut: (e) => {
|
|
379
|
+
childProps.onHoverOut?.(e);
|
|
380
|
+
closeDropdown();
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
[childProps, openDropdown, closeDropdown],
|
|
384
|
+
);
|
|
372
385
|
|
|
373
386
|
// Clone the child with the hover handlers + `target` slot sugar, then hand it to
|
|
374
387
|
// `Popover.Target` (with `withPressToggle={false}` so it only attaches the
|
|
375
388
|
// positioning reference ref, never a press toggle). The reference ref + width
|
|
376
389
|
// handling all come from Popover's engine now.
|
|
377
|
-
const hovered = React.
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
390
|
+
const hovered = React.useMemo(
|
|
391
|
+
() =>
|
|
392
|
+
React.cloneElement(child, {
|
|
393
|
+
// `target` slot sugar layers UNDER the child's own props (the child's inline
|
|
394
|
+
// props win — "explicit beats sugar").
|
|
395
|
+
...targetSlot,
|
|
396
|
+
...childProps,
|
|
397
|
+
...handlers,
|
|
398
|
+
} as Partial<HoverHandlers> & React.Attributes),
|
|
399
|
+
[child, childProps, targetSlot, handlers],
|
|
400
|
+
);
|
|
384
401
|
|
|
385
402
|
return (
|
|
386
403
|
<Popover.Target refProp={refProp} withPressToggle={false}>
|
|
@@ -282,6 +282,10 @@ const IndicatorBase = IndicatorContainer.styleable<IndicatorProps>(function Indi
|
|
|
282
282
|
kind: "pulse",
|
|
283
283
|
durationMs: DURATIONS.ambient,
|
|
284
284
|
minOpacity: 0.45,
|
|
285
|
+
// Only a `processing` indicator pulses; without this gate every (static)
|
|
286
|
+
// indicator on screen scheduled a permanent compositor/UI-thread animation
|
|
287
|
+
// whose style is never spread.
|
|
288
|
+
enabled: Boolean(processing),
|
|
285
289
|
});
|
|
286
290
|
// One-shot scale-in entrance for the processing dot, via the shared `scale`
|
|
287
291
|
// preset (`{ opacity: 0, scale: 0 }` + easing). `false` when not processing →
|
package/src/Input/Input.tsx
CHANGED
|
@@ -5,16 +5,15 @@ import {
|
|
|
5
5
|
registerFocusable,
|
|
6
6
|
styled,
|
|
7
7
|
type TamaguiElement,
|
|
8
|
-
useTheme,
|
|
9
8
|
useWebRef,
|
|
10
|
-
variableToString,
|
|
11
9
|
withStaticProperties,
|
|
12
10
|
} from "@knitui/core";
|
|
13
|
-
import { useId } from "@knitui/hooks";
|
|
11
|
+
import { useCallbackRef, useId } from "@knitui/hooks";
|
|
14
12
|
|
|
15
13
|
import { Box } from "../Box";
|
|
16
14
|
import { webCursor } from "../internal/style-props";
|
|
17
15
|
import { pick } from "../internal/styles";
|
|
16
|
+
import { themeColorToCssVar } from "../internal/theme-color-web";
|
|
18
17
|
import { Text } from "../Text";
|
|
19
18
|
import {
|
|
20
19
|
DEFAULT_PLACEHOLDER_COLOR,
|
|
@@ -117,12 +116,20 @@ const StyledButtonInput = styled(Text, {
|
|
|
117
116
|
type StyledInputProps = GetProps<typeof StyledInput>;
|
|
118
117
|
type InputStyle = StyledInputProps["style"] & Record<`--${string}`, string | undefined>;
|
|
119
118
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Placeholder / selection colours as CSS custom properties, resolved ONCE at
|
|
121
|
+
* module scope.
|
|
122
|
+
*
|
|
123
|
+
* Both inputs are module constants (`"$color8"` / `"$blue5"`), and on web a
|
|
124
|
+
* `$token` maps to its CSS variable by pure string transform (see
|
|
125
|
+
* `theme-color-web.ts`) — the `var()` tracks the active theme by itself. So this
|
|
126
|
+
* needed no theme object, yet every `Input` used to call `useTheme()` for it,
|
|
127
|
+
* paying a `useThemeWithState` (useId + useRef + useReducer + a DEP-LESS
|
|
128
|
+
* `useEffect` that fires after EVERY render) plus a global theme-subscriber
|
|
129
|
+
* registration per mounted field — on every keystroke-driven re-render.
|
|
130
|
+
*/
|
|
131
|
+
const PLACEHOLDER_COLOR_VAR = themeColorToCssVar(DEFAULT_PLACEHOLDER_COLOR);
|
|
132
|
+
const SELECTION_COLOR_VAR = themeColorToCssVar(DEFAULT_SELECTION_COLOR);
|
|
126
133
|
|
|
127
134
|
const InputComponent = StyledInput.styleable<WebInputProps>((props, _forwardedRef) => {
|
|
128
135
|
const {
|
|
@@ -187,7 +194,6 @@ const InputComponent = StyledInput.styleable<WebInputProps>((props, _forwardedRe
|
|
|
187
194
|
|
|
188
195
|
const { ref, composedRef } = useWebRef<WebInputElement>(_forwardedRef);
|
|
189
196
|
const [focused, setFocused] = React.useState(false);
|
|
190
|
-
const theme = useTheme();
|
|
191
197
|
const wrapperContext = React.useContext(InputWrapperContext);
|
|
192
198
|
const generatedInputId = useId(id);
|
|
193
199
|
const inputId = wrapperContext?.inputId || generatedInputId;
|
|
@@ -212,15 +218,24 @@ const InputComponent = StyledInput.styleable<WebInputProps>((props, _forwardedRe
|
|
|
212
218
|
? "off"
|
|
213
219
|
: autoCapitalizeProp;
|
|
214
220
|
|
|
215
|
-
// Handle selection changes
|
|
221
|
+
// Handle selection changes.
|
|
222
|
+
//
|
|
223
|
+
// `onSelectionChange` is held in a `useCallbackRef` (stable identity, always
|
|
224
|
+
// calls the latest version) and deliberately kept OUT of the effect deps:
|
|
225
|
+
// callers pass an inline arrow, so a fresh identity every render used to tear
|
|
226
|
+
// the DOM listener down and re-attach it on EVERY keystroke. `hasSelectionChange`
|
|
227
|
+
// gates attaching at all, so the "no handler = no listener" behaviour is kept
|
|
228
|
+
// while the listener itself now attaches once.
|
|
229
|
+
const selectionChangeRef = useCallbackRef(onSelectionChange);
|
|
230
|
+
const hasSelectionChange = Boolean(onSelectionChange);
|
|
216
231
|
React.useEffect(() => {
|
|
217
|
-
if (!
|
|
232
|
+
if (!hasSelectionChange) return;
|
|
218
233
|
|
|
219
234
|
const node = ref.current;
|
|
220
235
|
if (!node) return;
|
|
221
236
|
|
|
222
237
|
const handleSelectionChange = () => {
|
|
223
|
-
|
|
238
|
+
selectionChangeRef({
|
|
224
239
|
nativeEvent: {
|
|
225
240
|
selection: {
|
|
226
241
|
start: "selectionStart" in node ? (node.selectionStart ?? 0) : 0,
|
|
@@ -232,7 +247,7 @@ const InputComponent = StyledInput.styleable<WebInputProps>((props, _forwardedRe
|
|
|
232
247
|
|
|
233
248
|
node.addEventListener("select", handleSelectionChange);
|
|
234
249
|
return () => node.removeEventListener("select", handleSelectionChange);
|
|
235
|
-
}, [
|
|
250
|
+
}, [hasSelectionChange, selectionChangeRef, ref]);
|
|
236
251
|
|
|
237
252
|
// Sync selection prop
|
|
238
253
|
React.useEffect(() => {
|
|
@@ -307,8 +322,8 @@ const InputComponent = StyledInput.styleable<WebInputProps>((props, _forwardedRe
|
|
|
307
322
|
style && typeof style === "object" && !Array.isArray(style) ? style : undefined;
|
|
308
323
|
const inputStyle: InputStyle = {
|
|
309
324
|
...(incomingStyle as object),
|
|
310
|
-
"--t_placeholderColor":
|
|
311
|
-
"--t_selectionColor":
|
|
325
|
+
"--t_placeholderColor": PLACEHOLDER_COLOR_VAR,
|
|
326
|
+
"--t_selectionColor": SELECTION_COLOR_VAR,
|
|
312
327
|
};
|
|
313
328
|
|
|
314
329
|
const inputHostProps = {
|
package/src/Input/shared.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
import type { GetProps, TamaguiElement } from "@knitui/core";
|
|
4
4
|
import { getLineHeight, getTokenValue, styled, Theme } from "@knitui/core";
|
|
5
|
-
import { useId } from "@knitui/hooks";
|
|
5
|
+
import { useCallbackRef, useId } from "@knitui/hooks";
|
|
6
6
|
|
|
7
7
|
import { Box } from "../Box";
|
|
8
8
|
import { CloseButton, type CloseButtonProps } from "../CloseButton";
|
|
@@ -817,10 +817,15 @@ export const InputWrapper = InputWrapperFrame.styleable<InputWrapperProps>(
|
|
|
817
817
|
.join(" ") || undefined;
|
|
818
818
|
const isRequired = typeof withAsterisk === "boolean" ? withAsterisk : required;
|
|
819
819
|
const { onPress: labelOnPress, ...restLabelProps } = labelProps ?? {};
|
|
820
|
-
|
|
820
|
+
// Stable identity (latest-callback pattern) so the memoized `InputLabel` isn't
|
|
821
|
+
// handed a fresh `onPress` on every keystroke in the field.
|
|
822
|
+
const handleLabelPress = useCallbackRef<
|
|
823
|
+
Parameters<NonNullable<InputLabelProps["onPress"]>>,
|
|
824
|
+
void
|
|
825
|
+
>((event) => {
|
|
821
826
|
labelOnPress?.(event);
|
|
822
827
|
focusInputById(inputId);
|
|
823
|
-
};
|
|
828
|
+
});
|
|
824
829
|
|
|
825
830
|
const nodes: Record<InputWrapperOrderItem, React.ReactNode> = {
|
|
826
831
|
label: label ? (
|
|
@@ -857,8 +862,19 @@ export const InputWrapper = InputWrapperFrame.styleable<InputWrapperProps>(
|
|
|
857
862
|
) : null,
|
|
858
863
|
};
|
|
859
864
|
|
|
865
|
+
// The consumers of this context are the actual input elements of EVERY wrapped
|
|
866
|
+
// field in the kit (`Input`, `PillsInput`, `NativeSelect`, …), and context
|
|
867
|
+
// propagation walks straight past `React.memo` — so a fresh value object here
|
|
868
|
+
// re-rendered each of them on every render of the wrapper. Note `error` is a
|
|
869
|
+
// `ReactNode`: a consumer passing an inline element still gets a new value each
|
|
870
|
+
// render, which is honest (the value really did change identity).
|
|
871
|
+
const wrapperContext = React.useMemo<InputWrapperContextValue>(
|
|
872
|
+
() => ({ inputId, describedBy, size, error }),
|
|
873
|
+
[inputId, describedBy, size, error],
|
|
874
|
+
);
|
|
875
|
+
|
|
860
876
|
return (
|
|
861
|
-
<InputWrapperContext.Provider value={
|
|
877
|
+
<InputWrapperContext.Provider value={wrapperContext}>
|
|
862
878
|
<InputWrapperFrame ref={ref} {...s.get("wrapper")} {...rest}>
|
|
863
879
|
{inputWrapperOrder.map((part) => nodes[part])}
|
|
864
880
|
</InputWrapperFrame>
|
package/src/Loader/Loader.tsx
CHANGED
|
@@ -145,10 +145,20 @@ const LoaderComponent = LoaderFrame.styleable<LoaderProps>(function Loader(props
|
|
|
145
145
|
// user's reduced-motion preference internally — they return a static first
|
|
146
146
|
// frame with no animation and no timer — so the loader stays accessible (the
|
|
147
147
|
// `progressbar` role + label are always present) without any motion churn.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
// `enabled` gates SCHEDULING to the rendition actually rendered: a loop is a
|
|
149
|
+
// permanent animation (compositor keyframes / a reanimated `withRepeat` on the UI
|
|
150
|
+
// thread), so the three unused pulses of an `oval` loader — or the unused spin of
|
|
151
|
+
// a `dots`/`bars` one — would otherwise animate forever behind nothing.
|
|
152
|
+
const spinning = type === "oval";
|
|
153
|
+
const spin = useLoopingAnimation({
|
|
154
|
+
kind: "spin",
|
|
155
|
+
durationMs: DURATIONS.loop,
|
|
156
|
+
enabled: spinning,
|
|
157
|
+
});
|
|
158
|
+
const pulseProps = { kind: "pulse", minOpacity: 0.3, enabled: !spinning } as const;
|
|
159
|
+
const pulse0 = useLoopingAnimation({ ...pulseProps, durationMs: PULSE_MS[0] });
|
|
160
|
+
const pulse1 = useLoopingAnimation({ ...pulseProps, durationMs: PULSE_MS[1] });
|
|
161
|
+
const pulse2 = useLoopingAnimation({ ...pulseProps, durationMs: PULSE_MS[2] });
|
|
152
162
|
const pulses = [pulse0, pulse1, pulse2] as const;
|
|
153
163
|
|
|
154
164
|
// The animated `style` must ride on `LoopView` — a `Box` on web (forwards the
|
package/src/Menu/Menu.tsx
CHANGED
|
@@ -15,6 +15,7 @@ import { useOverlayChrome } from "../internal/overlay-chrome";
|
|
|
15
15
|
import { renderTextChild } from "../internal/render-text-child";
|
|
16
16
|
import { focusRingStyle, hoverProps, type shadowVariant, webCursor } from "../internal/style-props";
|
|
17
17
|
import { type SlotStyles } from "../internal/styles";
|
|
18
|
+
import { useSlotTextWrapper } from "../internal/use-slot-text-wrapper";
|
|
18
19
|
import {
|
|
19
20
|
Popover,
|
|
20
21
|
type PopoverArrowPosition,
|
|
@@ -502,14 +503,11 @@ const MenuItemComponent = MenuItemFrame.styleable<MenuItemProps>(function MenuIt
|
|
|
502
503
|
|
|
503
504
|
// Bind the `itemLabel` slot onto the text wrapper so `renderTextChild` (which
|
|
504
505
|
// only passes `children`) carries the sugar onto the auto-wrapped label text.
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
},
|
|
511
|
-
[itemLabelSlot],
|
|
512
|
-
);
|
|
506
|
+
// The shared hook compares the slot props by VALUE — the slot arrives off menu
|
|
507
|
+
// context, whose `slots` object is rebuilt whenever the caller passes an inline
|
|
508
|
+
// `styles` literal, so an identity-keyed memo handed every item a new component
|
|
509
|
+
// TYPE and remounted every item label on each menu render.
|
|
510
|
+
const LabelWrapper = useSlotTextWrapper(MenuItemLabel, ctx.slots.itemLabel);
|
|
513
511
|
|
|
514
512
|
const sectionSlot = ctx.slots.itemSection;
|
|
515
513
|
|