@proyecto-viviana/solidaria-components 0.5.0 → 0.7.0-rc.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/LICENSE-APACHE-2.0 +201 -0
- package/NOTICE +91 -0
- package/README.md +4 -7
- package/dist/ActionBar.d.ts +2 -10
- package/dist/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar.js +95 -59
- package/dist/ActionBar.js.map +1 -1
- package/dist/ActionBar.jsx +42 -15
- package/dist/ActionBar.jsx.map +1 -1
- package/dist/ActionGroup.d.ts +1 -12
- package/dist/ActionGroup.d.ts.map +1 -1
- package/dist/ActionGroup.js +66 -44
- package/dist/ActionGroup.js.map +1 -1
- package/dist/ActionGroup.jsx +25 -10
- package/dist/ActionGroup.jsx.map +1 -1
- package/dist/Alert.d.ts +4 -1
- package/dist/Alert.d.ts.map +1 -1
- package/dist/Alert.js +25 -17
- package/dist/Alert.js.map +1 -1
- package/dist/Alert.jsx +9 -5
- package/dist/Alert.jsx.map +1 -1
- package/dist/Autocomplete.d.ts +2 -9
- package/dist/Autocomplete.d.ts.map +1 -1
- package/dist/Autocomplete.js +18 -5
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Autocomplete.jsx +20 -7
- package/dist/Autocomplete.jsx.map +1 -1
- package/dist/Breadcrumbs.d.ts +2 -7
- package/dist/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs.js +71 -51
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Breadcrumbs.jsx +25 -12
- package/dist/Breadcrumbs.jsx.map +1 -1
- package/dist/Button.d.ts +1 -7
- package/dist/Button.d.ts.map +1 -1
- package/dist/Button.js +125 -72
- package/dist/Button.js.map +1 -1
- package/dist/Button.jsx +105 -43
- package/dist/Button.jsx.map +1 -1
- package/dist/Calendar.d.ts +1 -7
- package/dist/Calendar.d.ts.map +1 -1
- package/dist/Calendar.js +297 -221
- package/dist/Calendar.js.map +1 -1
- package/dist/Calendar.jsx +52 -32
- package/dist/Calendar.jsx.map +1 -1
- package/dist/CalendarPicker.d.ts +1 -10
- package/dist/CalendarPicker.d.ts.map +1 -1
- package/dist/CalendarPicker.js +12 -0
- package/dist/CalendarPicker.js.map +1 -1
- package/dist/CalendarPicker.jsx +12 -0
- package/dist/CalendarPicker.jsx.map +1 -1
- package/dist/Checkbox.d.ts +2 -7
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox.js +332 -270
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.jsx +70 -77
- package/dist/Checkbox.jsx.map +1 -1
- package/dist/Collection.d.ts +33 -7
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +128 -74
- package/dist/Collection.js.map +1 -1
- package/dist/Collection.jsx +46 -7
- package/dist/Collection.jsx.map +1 -1
- package/dist/Color.d.ts +15 -20
- package/dist/Color.d.ts.map +1 -1
- package/dist/Color.js +572 -334
- package/dist/Color.js.map +1 -1
- package/dist/Color.jsx +205 -85
- package/dist/Color.jsx.map +1 -1
- package/dist/ColorEditor.d.ts +3 -1
- package/dist/ColorEditor.d.ts.map +1 -1
- package/dist/ColorEditor.js +147 -124
- package/dist/ColorEditor.js.map +1 -1
- package/dist/ColorEditor.jsx +4 -1
- package/dist/ColorEditor.jsx.map +1 -1
- package/dist/ComboBox.d.ts +31 -10
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/ComboBox.js +539 -274
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBox.jsx +213 -70
- package/dist/ComboBox.jsx.map +1 -1
- package/dist/ContextualHelpTrigger.d.ts +1 -7
- package/dist/ContextualHelpTrigger.d.ts.map +1 -1
- package/dist/ContextualHelpTrigger.js +102 -72
- package/dist/ContextualHelpTrigger.js.map +1 -1
- package/dist/ContextualHelpTrigger.jsx +36 -16
- package/dist/ContextualHelpTrigger.jsx.map +1 -1
- package/dist/DateField.d.ts +2 -7
- package/dist/DateField.d.ts.map +1 -1
- package/dist/DateField.js +0 -2
- package/dist/DateField.jsx +0 -2
- package/dist/DateField2.js +194 -179
- package/dist/DateField2.js.map +1 -1
- package/dist/DateField2.jsx +58 -55
- package/dist/DateField2.jsx.map +1 -1
- package/dist/DatePicker.d.ts +7 -7
- package/dist/DatePicker.d.ts.map +1 -1
- package/dist/DatePicker.js +2 -2
- package/dist/DatePicker.jsx +2 -2
- package/dist/DatePicker2.js +357 -435
- package/dist/DatePicker2.js.map +1 -1
- package/dist/DatePicker2.jsx +109 -178
- package/dist/DatePicker2.jsx.map +1 -1
- package/dist/DateRangePickerContext.d.ts +7 -0
- package/dist/DateRangePickerContext.d.ts.map +1 -1
- package/dist/Dialog.d.ts +4 -9
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +168 -101
- package/dist/Dialog.js.map +1 -1
- package/dist/Dialog.jsx +75 -27
- package/dist/Dialog.jsx.map +1 -1
- package/dist/Disclosure.d.ts +1 -9
- package/dist/Disclosure.d.ts.map +1 -1
- package/dist/Disclosure.js +121 -79
- package/dist/Disclosure.js.map +1 -1
- package/dist/Disclosure.jsx +32 -19
- package/dist/Disclosure.jsx.map +1 -1
- package/dist/DragAndDrop.d.ts +9 -6
- package/dist/DragAndDrop.d.ts.map +1 -1
- package/dist/DragAndDrop.js +37 -22
- package/dist/DragAndDrop.js.map +1 -1
- package/dist/DragAndDrop.jsx +20 -4
- package/dist/DragAndDrop.jsx.map +1 -1
- package/dist/DragPreview.d.ts +1 -1
- package/dist/DragPreview.d.ts.map +1 -1
- package/dist/DropZone.d.ts +1 -7
- package/dist/DropZone.d.ts.map +1 -1
- package/dist/DropZone.js +74 -40
- package/dist/DropZone.js.map +1 -1
- package/dist/DropZone.jsx +24 -8
- package/dist/DropZone.jsx.map +1 -1
- package/dist/ElementTag.d.ts +9 -20
- package/dist/ElementTag.d.ts.map +1 -1
- package/dist/ElementTag.js +8 -210
- package/dist/ElementTag.js.map +1 -1
- package/dist/ElementTag.jsx +8 -57
- package/dist/ElementTag.jsx.map +1 -1
- package/dist/FieldError.d.ts +8 -7
- package/dist/FieldError.d.ts.map +1 -1
- package/dist/FieldError.js +33 -13
- package/dist/FieldError.js.map +1 -1
- package/dist/FieldError.jsx +20 -5
- package/dist/FieldError.jsx.map +1 -1
- package/dist/FileTrigger.d.ts +1 -7
- package/dist/FileTrigger.d.ts.map +1 -1
- package/dist/FileTrigger.js +30 -12
- package/dist/FileTrigger.js.map +1 -1
- package/dist/FileTrigger.jsx +15 -2
- package/dist/FileTrigger.jsx.map +1 -1
- package/dist/Focusable.d.ts +2 -8
- package/dist/Focusable.d.ts.map +1 -1
- package/dist/Focusable.js +23 -6
- package/dist/Focusable.js.map +1 -1
- package/dist/Focusable.jsx +22 -5
- package/dist/Focusable.jsx.map +1 -1
- package/dist/Form.d.ts +9 -8
- package/dist/Form.d.ts.map +1 -1
- package/dist/Form.js +66 -43
- package/dist/Form.js.map +1 -1
- package/dist/Form.jsx +36 -16
- package/dist/Form.jsx.map +1 -1
- package/dist/GridList.d.ts +5 -10
- package/dist/GridList.d.ts.map +1 -1
- package/dist/GridList.js +372 -243
- package/dist/GridList.js.map +1 -1
- package/dist/GridList.jsx +177 -99
- package/dist/GridList.jsx.map +1 -1
- package/dist/HiddenDateInput.d.ts +1 -7
- package/dist/HiddenDateInput.d.ts.map +1 -1
- package/dist/Icon.d.ts +4 -1
- package/dist/Icon.d.ts.map +1 -1
- package/dist/Icon.js +41 -37
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.jsx +7 -3
- package/dist/Icon.jsx.map +1 -1
- package/dist/Keyboard.d.ts +1 -7
- package/dist/Keyboard.d.ts.map +1 -1
- package/dist/Keyboard.js +24 -11
- package/dist/Keyboard.js.map +1 -1
- package/dist/Keyboard.jsx +15 -2
- package/dist/Keyboard.jsx.map +1 -1
- package/dist/Label.d.ts +20 -0
- package/dist/Label.d.ts.map +1 -0
- package/dist/Label.js +60 -0
- package/dist/Label.js.map +1 -0
- package/dist/Label.jsx +47 -0
- package/dist/Label.jsx.map +1 -0
- package/dist/Landmark.d.ts +4 -1
- package/dist/Landmark.d.ts.map +1 -1
- package/dist/Landmark.js +10 -4
- package/dist/Landmark.js.map +1 -1
- package/dist/Landmark.jsx +5 -1
- package/dist/Landmark.jsx.map +1 -1
- package/dist/Link.d.ts +2 -7
- package/dist/Link.d.ts.map +1 -1
- package/dist/Link.js +56 -36
- package/dist/Link.js.map +1 -1
- package/dist/Link.jsx +52 -10
- package/dist/Link.jsx.map +1 -1
- package/dist/ListBox.d.ts +17 -13
- package/dist/ListBox.d.ts.map +1 -1
- package/dist/ListBox.js +647 -348
- package/dist/ListBox.js.map +1 -1
- package/dist/ListBox.jsx +339 -236
- package/dist/ListBox.jsx.map +1 -1
- package/dist/ListDropTargetDelegate.d.ts +3 -0
- package/dist/ListDropTargetDelegate.d.ts.map +1 -1
- package/dist/Menu.d.ts +39 -30
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Menu.js +547 -368
- package/dist/Menu.js.map +1 -1
- package/dist/Menu.jsx +328 -230
- package/dist/Menu.jsx.map +1 -1
- package/dist/Meter.d.ts +6 -13
- package/dist/Meter.d.ts.map +1 -1
- package/dist/Meter.js +55 -18
- package/dist/Meter.js.map +1 -1
- package/dist/Meter.jsx +33 -8
- package/dist/Meter.jsx.map +1 -1
- package/dist/Modal.d.ts +1 -7
- package/dist/Modal.d.ts.map +1 -1
- package/dist/Modal.js +104 -56
- package/dist/Modal.js.map +1 -1
- package/dist/Modal.jsx +68 -38
- package/dist/Modal.jsx.map +1 -1
- package/dist/NumberField.d.ts +4 -7
- package/dist/NumberField.d.ts.map +1 -1
- package/dist/NumberField.js +243 -124
- package/dist/NumberField.js.map +1 -1
- package/dist/NumberField.jsx +115 -26
- package/dist/NumberField.jsx.map +1 -1
- package/dist/Popover.d.ts +15 -7
- package/dist/Popover.d.ts.map +1 -1
- package/dist/Popover.js +370 -181
- package/dist/Popover.js.map +1 -1
- package/dist/Popover.jsx +215 -82
- package/dist/Popover.jsx.map +1 -1
- package/dist/Pressable.d.ts +2 -8
- package/dist/Pressable.d.ts.map +1 -1
- package/dist/Pressable.js +23 -6
- package/dist/Pressable.js.map +1 -1
- package/dist/Pressable.jsx +22 -5
- package/dist/Pressable.jsx.map +1 -1
- package/dist/PreviewTrigger.d.ts +24 -0
- package/dist/PreviewTrigger.d.ts.map +1 -0
- package/dist/PreviewTrigger.js +128 -0
- package/dist/PreviewTrigger.js.map +1 -0
- package/dist/PreviewTrigger.jsx +117 -0
- package/dist/PreviewTrigger.jsx.map +1 -0
- package/dist/ProgressBar.d.ts +1 -7
- package/dist/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar.js +34 -14
- package/dist/ProgressBar.js.map +1 -1
- package/dist/ProgressBar.jsx +17 -3
- package/dist/ProgressBar.jsx.map +1 -1
- package/dist/RadioGroup.d.ts +2 -7
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +388 -269
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.jsx +110 -99
- package/dist/RadioGroup.jsx.map +1 -1
- package/dist/RangeCalendar.d.ts +3 -7
- package/dist/RangeCalendar.d.ts.map +1 -1
- package/dist/RangeCalendar.js +271 -202
- package/dist/RangeCalendar.js.map +1 -1
- package/dist/RangeCalendar.jsx +56 -37
- package/dist/RangeCalendar.jsx.map +1 -1
- package/dist/RouterProvider.d.ts +3 -9
- package/dist/RouterProvider.d.ts.map +1 -1
- package/dist/RouterProvider.js +15 -14
- package/dist/RouterProvider.js.map +1 -1
- package/dist/RouterProvider.jsx +14 -13
- package/dist/RouterProvider.jsx.map +1 -1
- package/dist/SearchField.d.ts +4 -7
- package/dist/SearchField.d.ts.map +1 -1
- package/dist/SearchField.js +191 -164
- package/dist/SearchField.js.map +1 -1
- package/dist/SearchField.jsx +69 -62
- package/dist/SearchField.jsx.map +1 -1
- package/dist/Select.d.ts +5 -10
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +565 -359
- package/dist/Select.js.map +1 -1
- package/dist/Select.jsx +281 -161
- package/dist/Select.jsx.map +1 -1
- package/dist/SelectionIndicator.d.ts +1 -4
- package/dist/SelectionIndicator.d.ts.map +1 -1
- package/dist/SelectionIndicator.js +29 -13
- package/dist/SelectionIndicator.js.map +1 -1
- package/dist/SelectionIndicator.jsx +18 -4
- package/dist/SelectionIndicator.jsx.map +1 -1
- package/dist/Separator.d.ts +1 -7
- package/dist/Separator.d.ts.map +1 -1
- package/dist/Separator.js +22 -6
- package/dist/Separator.js.map +1 -1
- package/dist/Separator.jsx +16 -3
- package/dist/Separator.jsx.map +1 -1
- package/dist/SharedElementTransition.d.ts +1 -10
- package/dist/SharedElementTransition.d.ts.map +1 -1
- package/dist/SharedElementTransition.js +68 -40
- package/dist/SharedElementTransition.js.map +1 -1
- package/dist/SharedElementTransition.jsx +49 -25
- package/dist/SharedElementTransition.jsx.map +1 -1
- package/dist/Slider.d.ts +2 -8
- package/dist/Slider.d.ts.map +1 -1
- package/dist/Slider.js +155 -97
- package/dist/Slider.js.map +1 -1
- package/dist/Slider.jsx +25 -12
- package/dist/Slider.jsx.map +1 -1
- package/dist/StepList.d.ts +1 -7
- package/dist/StepList.d.ts.map +1 -1
- package/dist/StepList.js +112 -68
- package/dist/StepList.js.map +1 -1
- package/dist/StepList.jsx +58 -20
- package/dist/StepList.jsx.map +1 -1
- package/dist/Switch.d.ts +2 -9
- package/dist/Switch.d.ts.map +1 -1
- package/dist/Switch.js +164 -114
- package/dist/Switch.js.map +1 -1
- package/dist/Switch.jsx +26 -13
- package/dist/Switch.jsx.map +1 -1
- package/dist/Table.d.ts +2 -1
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +689 -592
- package/dist/Table.js.map +1 -1
- package/dist/Table.jsx +317 -237
- package/dist/Table.jsx.map +1 -1
- package/dist/Tabs.d.ts +2 -7
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/Tabs.js +278 -293
- package/dist/Tabs.js.map +1 -1
- package/dist/Tabs.jsx +68 -66
- package/dist/Tabs.jsx.map +1 -1
- package/dist/TagGroup.d.ts +4 -11
- package/dist/TagGroup.d.ts.map +1 -1
- package/dist/TagGroup.js +153 -115
- package/dist/TagGroup.js.map +1 -1
- package/dist/TagGroup.jsx +37 -24
- package/dist/TagGroup.jsx.map +1 -1
- package/dist/Text.d.ts +3 -3
- package/dist/Text.d.ts.map +1 -1
- package/dist/Text.js +24 -7
- package/dist/Text.js.map +1 -1
- package/dist/Text.jsx +17 -5
- package/dist/Text.jsx.map +1 -1
- package/dist/TextField.d.ts +3 -16
- package/dist/TextField.d.ts.map +1 -1
- package/dist/TextField.js +104 -129
- package/dist/TextField.js.map +1 -1
- package/dist/TextField.jsx +76 -102
- package/dist/TextField.jsx.map +1 -1
- package/dist/TimeField.d.ts +2 -15
- package/dist/TimeField.d.ts.map +1 -1
- package/dist/TimeField.js +86 -102
- package/dist/TimeField.js.map +1 -1
- package/dist/TimeField.jsx +32 -49
- package/dist/TimeField.jsx.map +1 -1
- package/dist/Toast.d.ts +10 -13
- package/dist/Toast.d.ts.map +1 -1
- package/dist/Toast.js +209 -108
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.jsx +127 -22
- package/dist/Toast.jsx.map +1 -1
- package/dist/ToggleButton.d.ts +1 -7
- package/dist/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton.js +57 -35
- package/dist/ToggleButton.js.map +1 -1
- package/dist/ToggleButton.jsx +26 -12
- package/dist/ToggleButton.jsx.map +1 -1
- package/dist/ToggleButtonGroup.d.ts +1 -7
- package/dist/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/ToggleButtonGroup.js +59 -44
- package/dist/ToggleButtonGroup.js.map +1 -1
- package/dist/ToggleButtonGroup.jsx +25 -12
- package/dist/ToggleButtonGroup.jsx.map +1 -1
- package/dist/TokenField.d.ts +52 -0
- package/dist/TokenField.d.ts.map +1 -0
- package/dist/TokenField.js +301 -0
- package/dist/TokenField.js.map +1 -0
- package/dist/TokenField.jsx +197 -0
- package/dist/TokenField.jsx.map +1 -0
- package/dist/Toolbar.d.ts +2 -7
- package/dist/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar.js +35 -16
- package/dist/Toolbar.js.map +1 -1
- package/dist/Toolbar.jsx +15 -2
- package/dist/Toolbar.jsx.map +1 -1
- package/dist/Tooltip.d.ts +2 -7
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip.js +105 -68
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tooltip.jsx +60 -36
- package/dist/Tooltip.jsx.map +1 -1
- package/dist/Tree.d.ts +8 -11
- package/dist/Tree.d.ts.map +1 -1
- package/dist/Tree.js +486 -339
- package/dist/Tree.js.map +1 -1
- package/dist/Tree.jsx +155 -107
- package/dist/Tree.jsx.map +1 -1
- package/dist/Virtualizer.d.ts +39 -9
- package/dist/Virtualizer.d.ts.map +1 -1
- package/dist/Virtualizer.js +2 -2
- package/dist/Virtualizer.jsx +2 -2
- package/dist/Virtualizer2.js +491 -136
- package/dist/Virtualizer2.js.map +1 -1
- package/dist/Virtualizer2.jsx +455 -122
- package/dist/Virtualizer2.jsx.map +1 -1
- package/dist/VirtualizerLayouts.d.ts +55 -2
- package/dist/VirtualizerLayouts.d.ts.map +1 -1
- package/dist/VisuallyHidden.d.ts +4 -3
- package/dist/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden.js +18 -11
- package/dist/VisuallyHidden.js.map +1 -1
- package/dist/VisuallyHidden.jsx +15 -9
- package/dist/VisuallyHidden.jsx.map +1 -1
- package/dist/contexts.d.ts +25 -0
- package/dist/contexts.d.ts.map +1 -1
- package/dist/contexts.js +3 -0
- package/dist/contexts.js.map +1 -1
- package/dist/contexts.jsx +3 -0
- package/dist/contexts.jsx.map +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -11
- package/dist/index.jsx +14 -11
- package/dist/intl/index.d.ts +16 -0
- package/dist/intl/index.d.ts.map +1 -0
- package/dist/intl.js +212 -0
- package/dist/intl.js.map +1 -0
- package/dist/intl.jsx +212 -0
- package/dist/intl.jsx.map +1 -0
- package/dist/useDragAndDrop.d.ts +4 -2
- package/dist/useDragAndDrop.d.ts.map +1 -1
- package/dist/useDragAndDrop2.js +39 -21
- package/dist/useDragAndDrop2.js.map +1 -1
- package/dist/useDragAndDrop2.jsx +39 -21
- package/dist/useDragAndDrop2.jsx.map +1 -1
- package/dist/utils.d.ts +28 -9
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +96 -24
- package/dist/utils.js.map +1 -1
- package/dist/utils.jsx +81 -24
- package/dist/utils.jsx.map +1 -1
- package/dist/virtualizer/Layout.d.ts +9 -0
- package/dist/virtualizer/Layout.d.ts.map +1 -1
- package/dist/virtualizer/Layout.js +23 -2
- package/dist/virtualizer/Layout.js.map +1 -1
- package/dist/virtualizer/Layout.jsx +23 -2
- package/dist/virtualizer/Layout.jsx.map +1 -1
- package/package.json +29 -10
- package/src/ActionBar.tsx +50 -24
- package/src/ActionGroup.tsx +31 -19
- package/src/Alert.tsx +10 -4
- package/src/Autocomplete.tsx +24 -15
- package/src/Breadcrumbs.tsx +32 -16
- package/src/Button.tsx +182 -67
- package/src/Calendar.tsx +65 -47
- package/src/CalendarPicker.tsx +16 -1
- package/src/Checkbox.tsx +84 -116
- package/src/Collection.tsx +84 -3
- package/src/Color.tsx +282 -104
- package/src/ColorEditor.tsx +5 -1
- package/src/ComboBox.tsx +384 -109
- package/src/ContextualHelpTrigger.tsx +47 -41
- package/src/DateField.tsx +74 -106
- package/src/DatePicker.tsx +156 -352
- package/src/DateRangePickerContext.tsx +8 -0
- package/src/Dialog.tsx +105 -38
- package/src/Disclosure.tsx +29 -19
- package/src/DragAndDrop.tsx +43 -8
- package/src/DragPreview.tsx +20 -1
- package/src/DropZone.tsx +32 -18
- package/src/ElementTag.tsx +14 -104
- package/src/FieldError.tsx +39 -7
- package/src/FileTrigger.tsx +18 -3
- package/src/Focusable.tsx +27 -6
- package/src/Form.tsx +57 -11
- package/src/GridList.tsx +233 -141
- package/src/HiddenDateInput.tsx +19 -3
- package/src/Icon.tsx +8 -2
- package/src/Keyboard.tsx +18 -2
- package/src/Label.tsx +77 -0
- package/src/Landmark.tsx +6 -1
- package/src/Link.tsx +65 -19
- package/src/ListBox.tsx +645 -468
- package/src/ListDropTargetDelegate.ts +4 -0
- package/src/Menu.tsx +512 -349
- package/src/Meter.tsx +42 -8
- package/src/Modal.tsx +85 -42
- package/src/NumberField.tsx +161 -48
- package/src/Popover.tsx +424 -148
- package/src/Pressable.tsx +27 -6
- package/src/PreviewTrigger.tsx +171 -0
- package/src/ProgressBar.tsx +25 -3
- package/src/RadioGroup.tsx +230 -161
- package/src/RangeCalendar.tsx +75 -63
- package/src/RouterProvider.tsx +24 -14
- package/src/SearchField.tsx +118 -121
- package/src/Select.tsx +454 -274
- package/src/SelectionIndicator.tsx +21 -3
- package/src/Separator.tsx +17 -1
- package/src/SharedElementTransition.tsx +115 -97
- package/src/Slider.tsx +35 -17
- package/src/StepList.tsx +71 -32
- package/src/Switch.tsx +45 -29
- package/src/Table.tsx +446 -380
- package/src/Tabs.tsx +132 -155
- package/src/TagGroup.tsx +53 -40
- package/src/Text.tsx +23 -6
- package/src/TextField.tsx +118 -159
- package/src/TimeField.tsx +34 -95
- package/src/Toast.tsx +141 -67
- package/src/ToggleButton.tsx +33 -15
- package/src/ToggleButtonGroup.tsx +27 -9
- package/src/TokenField.tsx +379 -0
- package/src/Toolbar.tsx +19 -9
- package/src/Tooltip.tsx +126 -84
- package/src/Tree.tsx +233 -173
- package/src/Virtualizer.tsx +400 -138
- package/src/VirtualizerLayouts.ts +211 -26
- package/src/VisuallyHidden.tsx +22 -8
- package/src/contexts.ts +13 -0
- package/src/index.ts +32 -11
- package/src/intl/ar-AE.json +6 -0
- package/src/intl/bg-BG.json +6 -0
- package/src/intl/cs-CZ.json +6 -0
- package/src/intl/da-DK.json +6 -0
- package/src/intl/de-DE.json +6 -0
- package/src/intl/el-GR.json +6 -0
- package/src/intl/en-US.json +6 -0
- package/src/intl/es-ES.json +6 -0
- package/src/intl/et-EE.json +6 -0
- package/src/intl/fi-FI.json +6 -0
- package/src/intl/fr-FR.json +6 -0
- package/src/intl/he-IL.json +6 -0
- package/src/intl/hr-HR.json +6 -0
- package/src/intl/hu-HU.json +6 -0
- package/src/intl/index.ts +125 -0
- package/src/intl/it-IT.json +6 -0
- package/src/intl/ja-JP.json +6 -0
- package/src/intl/ko-KR.json +6 -0
- package/src/intl/lt-LT.json +6 -0
- package/src/intl/lv-LV.json +6 -0
- package/src/intl/nb-NO.json +6 -0
- package/src/intl/nl-NL.json +6 -0
- package/src/intl/pl-PL.json +6 -0
- package/src/intl/pt-BR.json +6 -0
- package/src/intl/pt-PT.json +6 -0
- package/src/intl/ro-RO.json +6 -0
- package/src/intl/ru-RU.json +6 -0
- package/src/intl/sk-SK.json +6 -0
- package/src/intl/sl-SI.json +6 -0
- package/src/intl/sr-SP.json +6 -0
- package/src/intl/sv-SE.json +6 -0
- package/src/intl/tr-TR.json +6 -0
- package/src/intl/uk-UA.json +6 -0
- package/src/intl/zh-CN.json +6 -0
- package/src/intl/zh-TW.json +6 -0
- package/src/useDragAndDrop.ts +30 -32
- package/src/utils.tsx +124 -68
- package/src/virtualizer/Layout.ts +29 -0
package/dist/Select.jsx
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/Select.tsx
|
|
13
|
+
import { DEFAULT_SLOT, OptionContent, Provider, ariaTrueFalse, attrTrue, coerceDomRecord, dataAttr, filterDOMProps, useRenderProps } from "./utils.jsx";
|
|
14
|
+
import { TextContext } from "./Text.jsx";
|
|
2
15
|
import { FieldErrorContext } from "./FieldError.jsx";
|
|
3
16
|
import { SelectionIndicatorContext } from "./SelectionIndicator.jsx";
|
|
17
|
+
import { t as racIntlStrings } from "./intl.jsx";
|
|
18
|
+
import { useCollectionRenderer, useCollectionRoot } from "./Collection.jsx";
|
|
19
|
+
import { i as VirtualizerItem } from "./Virtualizer2.jsx";
|
|
4
20
|
import { ListBoxLoadMoreItem } from "./ListBox.jsx";
|
|
5
|
-
import { For, Show, createContext,
|
|
6
|
-
import { FocusScope, createHiddenSelect, createHover, createInteractOutside, createListBox, createOption, createSelect, focusSafely,
|
|
21
|
+
import { For, Show, createContext, createMemo, createRenderEffect, createSignal, createTrackedEffect, untrack, useContext } from "solid-js";
|
|
22
|
+
import { FocusScope, createFocusRing, createHiddenSelect, createHover, createInteractOutside, createListBox, createListFormatter, createOption, createSelect, createStringFormatter, focusSafely, getInteractionModality, mergeProps } from "@proyecto-viviana/solidaria";
|
|
23
|
+
import { splitProps } from "@proyecto-viviana/solidaria/utils";
|
|
7
24
|
import { DEFAULT_VALIDATION_RESULT, createSelectState } from "@proyecto-viviana/solid-stately";
|
|
8
25
|
//#region src/Select.tsx
|
|
9
26
|
/**
|
|
@@ -12,7 +29,7 @@ import { DEFAULT_VALIDATION_RESULT, createSelectState } from "@proyecto-viviana/
|
|
|
12
29
|
* A pre-wired headless select that combines state + aria hooks.
|
|
13
30
|
* Port of react-aria-components/src/Select.tsx
|
|
14
31
|
*/
|
|
15
|
-
function assignRef(ref, el) {
|
|
32
|
+
function assignRef$1(ref, el) {
|
|
16
33
|
if (!ref) return;
|
|
17
34
|
if (typeof ref === "function") ref(el);
|
|
18
35
|
else ref.current = el;
|
|
@@ -39,7 +56,10 @@ function getNativeSelectValidation(select) {
|
|
|
39
56
|
const SelectContext = createContext(null);
|
|
40
57
|
const SelectStateContext = createContext(null);
|
|
41
58
|
const SelectValueContext = SelectContext;
|
|
42
|
-
|
|
59
|
+
/** True when this SelectListBox is the overlay list (Picker / Popover). */
|
|
60
|
+
const SelectListBoxInPopoverContext = createContext(false);
|
|
61
|
+
function noopOptionFocus() {}
|
|
62
|
+
const selectRootLabelProps = /* @__PURE__ */ new Set([
|
|
43
63
|
"aria-label",
|
|
44
64
|
"aria-labelledby",
|
|
45
65
|
"aria-describedby",
|
|
@@ -49,8 +69,9 @@ const selectRootLabelProps = new Set([
|
|
|
49
69
|
* A select displays a collapsible list of options and allows a user to select one of them.
|
|
50
70
|
*/
|
|
51
71
|
function Select(props) {
|
|
52
|
-
const contextSlotProps = useContext(SelectContext)?.slots?.[props.slot
|
|
53
|
-
const
|
|
72
|
+
const contextSlotProps = useContext(SelectContext)?.slots?.[typeof props.slot === "string" ? props.slot : "default"];
|
|
73
|
+
const mergedSelectProps = contextSlotProps ? mergeProps(contextSlotProps, props) : props;
|
|
74
|
+
const [local, stateProps, ariaProps] = splitProps(mergedSelectProps, [
|
|
54
75
|
"class",
|
|
55
76
|
"style",
|
|
56
77
|
"render",
|
|
@@ -77,7 +98,6 @@ function Select(props) {
|
|
|
77
98
|
]);
|
|
78
99
|
let rootRef;
|
|
79
100
|
const [selectValidation, setSelectValidation] = createSignal(DEFAULT_VALIDATION_RESULT);
|
|
80
|
-
const errorMessageId = createUniqueId();
|
|
81
101
|
const resolveDisabled = () => {
|
|
82
102
|
const disabled = ariaProps.isDisabled;
|
|
83
103
|
if (typeof disabled === "function") return disabled();
|
|
@@ -134,20 +154,47 @@ function Select(props) {
|
|
|
134
154
|
},
|
|
135
155
|
get isRequired() {
|
|
136
156
|
return ariaProps.isRequired;
|
|
157
|
+
},
|
|
158
|
+
get isInvalid() {
|
|
159
|
+
return ariaProps.isInvalid;
|
|
160
|
+
},
|
|
161
|
+
get validationState() {
|
|
162
|
+
return ariaProps.validationState;
|
|
163
|
+
},
|
|
164
|
+
get validate() {
|
|
165
|
+
return ariaProps.validate;
|
|
166
|
+
},
|
|
167
|
+
get name() {
|
|
168
|
+
return stateProps.name;
|
|
169
|
+
},
|
|
170
|
+
get validationBehavior() {
|
|
171
|
+
return ariaProps.validationBehavior;
|
|
137
172
|
}
|
|
138
173
|
});
|
|
139
|
-
const
|
|
174
|
+
const selectAriaProps = createMemo(() => {
|
|
140
175
|
const clean = {};
|
|
141
176
|
for (const key in ariaProps) if (!key.startsWith("data-")) clean[key] = ariaProps[key];
|
|
142
177
|
return clean;
|
|
178
|
+
});
|
|
179
|
+
const isInvalid = createMemo(() => state.displayValidation().isInvalid || selectValidation().isInvalid);
|
|
180
|
+
const composedValidation = createMemo(() => {
|
|
181
|
+
const fromState = state.displayValidation();
|
|
182
|
+
if (fromState.isInvalid) return fromState;
|
|
183
|
+
return selectValidation();
|
|
184
|
+
});
|
|
185
|
+
const selectHook = createSelect(() => ({
|
|
186
|
+
...selectAriaProps(),
|
|
187
|
+
isInvalid: isInvalid()
|
|
143
188
|
}), state);
|
|
189
|
+
const { isFocused, isFocusVisible, isOpen, isPressed } = selectHook;
|
|
144
190
|
const { isHovered, hoverProps } = createHover({ get isDisabled() {
|
|
145
191
|
return resolveDisabled();
|
|
146
192
|
} });
|
|
193
|
+
const { isFocusVisible: isFocusVisibleWithin, focusProps } = createFocusRing({ within: true });
|
|
147
194
|
const renderValues = createMemo(() => ({
|
|
148
195
|
isOpen: isOpen(),
|
|
149
196
|
isFocused: isFocused(),
|
|
150
|
-
isFocusVisible:
|
|
197
|
+
isFocusVisible: isFocusVisibleWithin(),
|
|
151
198
|
isDisabled: resolveDisabled(),
|
|
152
199
|
isRequired: !!ariaProps.isRequired,
|
|
153
200
|
isSelected: state.selectionMode() === "multiple" ? state.selectedKeys() === "all" || state.selectedKeys().size > 0 : state.selectedKey() != null
|
|
@@ -160,7 +207,7 @@ function Select(props) {
|
|
|
160
207
|
return isFocused();
|
|
161
208
|
},
|
|
162
209
|
get isFocusVisible() {
|
|
163
|
-
return
|
|
210
|
+
return isFocusVisibleWithin();
|
|
164
211
|
},
|
|
165
212
|
get isDisabled() {
|
|
166
213
|
return resolveDisabled();
|
|
@@ -186,37 +233,29 @@ function Select(props) {
|
|
|
186
233
|
const { ref: _ref, ...rest } = hoverProps;
|
|
187
234
|
return rest;
|
|
188
235
|
};
|
|
236
|
+
const cleanFocusProps = () => {
|
|
237
|
+
const { ref: _ref, onFocus, onBlur, ...rest } = focusProps;
|
|
238
|
+
return {
|
|
239
|
+
...rest,
|
|
240
|
+
onFocusIn: onFocus,
|
|
241
|
+
onFocusOut: onBlur
|
|
242
|
+
};
|
|
243
|
+
};
|
|
189
244
|
const cleanLabelProps = () => {
|
|
190
|
-
const { ref: _ref, ...rest } = labelProps;
|
|
245
|
+
const { ref: _ref, ...rest } = selectHook.labelProps;
|
|
191
246
|
return rest;
|
|
192
247
|
};
|
|
193
248
|
const setRootRef = (el) => {
|
|
194
249
|
rootRef = el;
|
|
195
|
-
assignRef(local.ref, el);
|
|
196
|
-
};
|
|
197
|
-
const validation = createMemo(() => {
|
|
198
|
-
const current = selectValidation();
|
|
199
|
-
if (current.isInvalid || !ariaProps.isInvalid) return current;
|
|
200
|
-
return {
|
|
201
|
-
...DEFAULT_VALIDATION_RESULT,
|
|
202
|
-
isInvalid: true
|
|
203
|
-
};
|
|
204
|
-
});
|
|
205
|
-
const isInvalid = createMemo(() => validation().isInvalid);
|
|
206
|
-
const triggerDescribedBy = () => {
|
|
207
|
-
const ids = [triggerProps["aria-describedby"], isInvalid() ? errorMessageId : void 0].filter(Boolean).join(" ").split(" ").filter(Boolean);
|
|
208
|
-
return ids.length ? Array.from(new Set(ids)).join(" ") : void 0;
|
|
250
|
+
assignRef$1(local.ref, el);
|
|
209
251
|
};
|
|
210
|
-
const triggerPropsWithValidation = () =>
|
|
211
|
-
...triggerProps,
|
|
212
|
-
"aria-describedby": triggerDescribedBy()
|
|
213
|
-
});
|
|
252
|
+
const triggerPropsWithValidation = () => selectHook.triggerProps;
|
|
214
253
|
const fieldErrorContext = {
|
|
215
254
|
get validation() {
|
|
216
|
-
return
|
|
255
|
+
return composedValidation();
|
|
217
256
|
},
|
|
218
257
|
get errorMessageProps() {
|
|
219
|
-
return
|
|
258
|
+
return selectHook.errorMessageProps;
|
|
220
259
|
}
|
|
221
260
|
};
|
|
222
261
|
const focusTrigger = () => {
|
|
@@ -244,12 +283,17 @@ function Select(props) {
|
|
|
244
283
|
};
|
|
245
284
|
return getNativeSelectValidation(select);
|
|
246
285
|
};
|
|
247
|
-
|
|
286
|
+
let triggerRef = null;
|
|
287
|
+
const setTriggerRef = (el) => {
|
|
288
|
+
triggerRef = el;
|
|
289
|
+
};
|
|
290
|
+
const { containerProps, selectProps: hiddenSelectProps, inputProps: hiddenInputProps } = createHiddenSelect({
|
|
248
291
|
state,
|
|
249
292
|
name: stateProps.name,
|
|
250
293
|
form: ariaProps.form,
|
|
251
294
|
isRequired: ariaProps.isRequired,
|
|
252
295
|
validationBehavior: ariaProps.validationBehavior ?? "native",
|
|
296
|
+
triggerRef: () => triggerRef,
|
|
253
297
|
get isDisabled() {
|
|
254
298
|
return resolveDisabled();
|
|
255
299
|
}
|
|
@@ -263,13 +307,29 @@ function Select(props) {
|
|
|
263
307
|
hiddenSelectProps.onChange?.(event);
|
|
264
308
|
setSelectValidation(hasSelection() && event.currentTarget.validity.valid ? DEFAULT_VALIDATION_RESULT : getSelectValidation(event.currentTarget));
|
|
265
309
|
};
|
|
266
|
-
|
|
310
|
+
const hiddenSelectItemNodes = () => Array.from(state.collection()).filter((item) => item.type === "item");
|
|
311
|
+
const nativeSelectValue = () => {
|
|
312
|
+
if (state.selectionMode() === "multiple") {
|
|
313
|
+
const selectedKeys = state.selectedKeys();
|
|
314
|
+
if (selectedKeys === "all") return hiddenSelectItemNodes().map((item) => String(item.key));
|
|
315
|
+
return Array.from(selectedKeys).map(String);
|
|
316
|
+
}
|
|
317
|
+
const key = state.selectedKey();
|
|
318
|
+
return key != null ? String(key) : "";
|
|
319
|
+
};
|
|
320
|
+
const hiddenSelectFallbackValues = () => {
|
|
321
|
+
if (state.selectionMode() === "multiple") {
|
|
322
|
+
const keys = state.selectedKeys();
|
|
323
|
+
if (keys === "all") return hiddenSelectItemNodes().map((item) => item.key);
|
|
324
|
+
const listed = Array.from(keys);
|
|
325
|
+
return listed.length === 0 ? [null] : listed;
|
|
326
|
+
}
|
|
327
|
+
return [state.selectedKey()];
|
|
328
|
+
};
|
|
329
|
+
createTrackedEffect(() => {
|
|
267
330
|
if (hasSelection() && selectValidation().isInvalid) setSelectValidation(DEFAULT_VALIDATION_RESULT);
|
|
331
|
+
if (hasSelection() && !ariaProps.isInvalid && state.displayValidation().isInvalid) state.resetValidation();
|
|
268
332
|
});
|
|
269
|
-
let triggerRef = null;
|
|
270
|
-
const setTriggerRef = (el) => {
|
|
271
|
-
triggerRef = el;
|
|
272
|
-
};
|
|
273
333
|
const RootChildren = () => {
|
|
274
334
|
const selectChildren = untrack(() => typeof local.children === "function" ? local.children(childRenderValues) : local.children);
|
|
275
335
|
return <>
|
|
@@ -278,59 +338,70 @@ function Select(props) {
|
|
|
278
338
|
</Show>
|
|
279
339
|
{selectChildren}
|
|
280
340
|
{}
|
|
281
|
-
<
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
</option
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
</Show>
|
|
309
|
-
</div>
|
|
341
|
+
<Show when={state.collection().size <= 300} fallback={<Show when={stateProps.name}>
|
|
342
|
+
<For each={(() => {
|
|
343
|
+
const keys = state.selectionMode() === "multiple" ? state.selectedKeys() === "all" ? Array.from(state.collection()).map((item) => item.key) : Array.from(state.selectedKeys()) : [state.selectedKey()];
|
|
344
|
+
return keys.length === 0 ? [null] : keys;
|
|
345
|
+
})()}>
|
|
346
|
+
{(key) => <input {...hiddenInputProps} name={stateProps.name} form={ariaProps.form} value={key != null ? String(key) : ""} disabled={resolveDisabled()} onInvalid={handleHiddenSelectInvalid} />}
|
|
347
|
+
</For>
|
|
348
|
+
</Show>}>
|
|
349
|
+
<div {...coerceDomRecord(containerProps)} data-testid="hidden-select-container">
|
|
350
|
+
<label>
|
|
351
|
+
{ariaProps.label}
|
|
352
|
+
<select {...hiddenSelectProps} name={stateProps.name} required={hasNativeValidation() && ariaProps.isRequired && !hasSelection() || void 0} value={nativeSelectValue()} onInvalid={handleHiddenSelectInvalid} onChange={handleHiddenSelectChange} onInput={handleHiddenSelectChange}>
|
|
353
|
+
<option value="" label={"\xA0"}>
|
|
354
|
+
{"\xA0"}
|
|
355
|
+
</option>
|
|
356
|
+
<For each={hiddenSelectItemNodes()}>
|
|
357
|
+
{(item) => <option value={String(item.key)}>{item.textValue}</option>}
|
|
358
|
+
</For>
|
|
359
|
+
<Show when={state.collection().size === 0 && stateProps.name}>
|
|
360
|
+
<For each={hiddenSelectFallbackValues()}>
|
|
361
|
+
{(value) => <option value={value != null ? String(value) : ""} />}
|
|
362
|
+
</For>
|
|
363
|
+
</Show>
|
|
364
|
+
</select>
|
|
365
|
+
</label>
|
|
366
|
+
</div>
|
|
367
|
+
</Show>
|
|
310
368
|
</>;
|
|
311
369
|
};
|
|
312
370
|
const baseRootProps = () => ({
|
|
313
371
|
...domProps(),
|
|
314
372
|
...cleanHoverProps(),
|
|
373
|
+
...cleanFocusProps(),
|
|
315
374
|
ref: setRootRef,
|
|
316
375
|
class: renderProps.class(),
|
|
317
376
|
style: renderProps.style(),
|
|
318
377
|
slot: local.slot,
|
|
319
|
-
"data-
|
|
320
|
-
"data-
|
|
321
|
-
"data-
|
|
322
|
-
"data-
|
|
323
|
-
"data-
|
|
378
|
+
"data-focused": dataAttr(isFocused()),
|
|
379
|
+
"data-focus-visible": dataAttr(isFocusVisibleWithin()),
|
|
380
|
+
"data-open": dataAttr(isOpen()),
|
|
381
|
+
"data-disabled": dataAttr(resolveDisabled()),
|
|
382
|
+
"data-required": dataAttr(ariaProps.isRequired),
|
|
383
|
+
"data-invalid": dataAttr(isInvalid()),
|
|
384
|
+
"data-hovered": dataAttr(isHovered())
|
|
324
385
|
});
|
|
325
386
|
const RootContent = () => {
|
|
326
|
-
const
|
|
387
|
+
const textSlots = { slots: {
|
|
388
|
+
get description() {
|
|
389
|
+
return selectHook.descriptionProps;
|
|
390
|
+
},
|
|
391
|
+
get errorMessage() {
|
|
392
|
+
return selectHook.errorMessageProps;
|
|
393
|
+
}
|
|
394
|
+
} };
|
|
395
|
+
const renderedRootChildren = <Provider values={[[TextContext, textSlots]]}>
|
|
396
|
+
<RootChildren />
|
|
397
|
+
</Provider>;
|
|
327
398
|
const rootProps = () => ({
|
|
328
399
|
...baseRootProps(),
|
|
329
400
|
children: renderedRootChildren
|
|
330
401
|
});
|
|
331
402
|
return local.render ? local.render(rootProps(), renderValues()) : <div {...baseRootProps()}>{renderedRootChildren}</div>;
|
|
332
403
|
};
|
|
333
|
-
return <SelectContext
|
|
404
|
+
return <SelectContext value={{
|
|
334
405
|
state,
|
|
335
406
|
rootRef: () => rootRef ?? null,
|
|
336
407
|
triggerRef: () => triggerRef,
|
|
@@ -338,14 +409,20 @@ function Select(props) {
|
|
|
338
409
|
get triggerProps() {
|
|
339
410
|
return triggerPropsWithValidation();
|
|
340
411
|
},
|
|
341
|
-
valueProps
|
|
342
|
-
|
|
343
|
-
|
|
412
|
+
get valueProps() {
|
|
413
|
+
return selectHook.valueProps;
|
|
414
|
+
},
|
|
415
|
+
get labelProps() {
|
|
416
|
+
return selectHook.labelProps;
|
|
417
|
+
},
|
|
418
|
+
get menuProps() {
|
|
419
|
+
return selectHook.menuProps;
|
|
420
|
+
},
|
|
344
421
|
get errorMessageProps() {
|
|
345
|
-
return
|
|
422
|
+
return selectHook.errorMessageProps;
|
|
346
423
|
},
|
|
347
424
|
get validation() {
|
|
348
|
-
return
|
|
425
|
+
return composedValidation();
|
|
349
426
|
},
|
|
350
427
|
isOpen,
|
|
351
428
|
isFocused,
|
|
@@ -356,12 +433,12 @@ function Select(props) {
|
|
|
356
433
|
items: stateProps.items,
|
|
357
434
|
autoFocus: !!ariaProps.autoFocus
|
|
358
435
|
}}>
|
|
359
|
-
<SelectStateContext
|
|
360
|
-
<FieldErrorContext
|
|
436
|
+
<SelectStateContext value={state}>
|
|
437
|
+
<FieldErrorContext value={fieldErrorContext}>
|
|
361
438
|
<RootContent />
|
|
362
|
-
</FieldErrorContext
|
|
363
|
-
</SelectStateContext
|
|
364
|
-
</SelectContext
|
|
439
|
+
</FieldErrorContext>
|
|
440
|
+
</SelectStateContext>
|
|
441
|
+
</SelectContext>;
|
|
365
442
|
}
|
|
366
443
|
/**
|
|
367
444
|
* The trigger button for a select.
|
|
@@ -376,14 +453,15 @@ function SelectTrigger(props) {
|
|
|
376
453
|
]);
|
|
377
454
|
const context = useContext(SelectContext);
|
|
378
455
|
if (!context) throw new Error("SelectTrigger must be used within a Select");
|
|
379
|
-
const { isOpen,
|
|
456
|
+
const { isOpen, isFocusVisible, isPressed, state } = context;
|
|
457
|
+
const { isFocused, focusProps: triggerFocusProps } = createFocusRing();
|
|
380
458
|
let triggerRef;
|
|
381
459
|
const setTriggerRef = (el) => {
|
|
382
460
|
triggerRef = el;
|
|
383
461
|
context.setTriggerRef(el);
|
|
384
|
-
assignRef(local.ref, el);
|
|
462
|
+
assignRef$1(local.ref, el);
|
|
385
463
|
};
|
|
386
|
-
|
|
464
|
+
createTrackedEffect(() => {
|
|
387
465
|
if (context.autoFocus) triggerRef?.focus();
|
|
388
466
|
});
|
|
389
467
|
const { isHovered, hoverProps } = createHover({ get isDisabled() {
|
|
@@ -406,8 +484,8 @@ function SelectTrigger(props) {
|
|
|
406
484
|
defaultClassName: "solidaria-Select-trigger"
|
|
407
485
|
}, renderValues);
|
|
408
486
|
const cleanTriggerProps = () => {
|
|
409
|
-
const { ref: _ref1, ...rest } = context.triggerProps;
|
|
410
|
-
return rest;
|
|
487
|
+
const { ref: _ref1, "aria-disabled": _ariaDisabled, "data-open": _dataOpen, ...rest } = context.triggerProps;
|
|
488
|
+
return mergeProps(rest, triggerFocusProps);
|
|
411
489
|
};
|
|
412
490
|
const cleanHoverProps = () => {
|
|
413
491
|
const { ref: _ref2, ...rest } = hoverProps;
|
|
@@ -415,7 +493,7 @@ function SelectTrigger(props) {
|
|
|
415
493
|
};
|
|
416
494
|
const triggerAriaProps = () => context.triggerProps;
|
|
417
495
|
const menuAriaProps = () => context.menuProps;
|
|
418
|
-
return <button ref={setTriggerRef} {...domProps} {...cleanTriggerProps()} {...cleanHoverProps()} type="button" id={triggerAriaProps().id}
|
|
496
|
+
return <button ref={setTriggerRef} {...domProps} {...cleanTriggerProps()} {...cleanHoverProps()} type="button" id={triggerAriaProps().id} tabindex={state.isDisabled ? void 0 : 0} disabled={state.isDisabled || void 0} aria-label={triggerAriaProps()["aria-label"]} aria-labelledby={triggerAriaProps()["aria-labelledby"]} aria-haspopup="listbox" aria-expanded={ariaTrueFalse(isOpen())} aria-controls={isOpen() ? menuAriaProps().id : void 0} aria-required={attrTrue(Boolean(triggerAriaProps()["aria-required"]))} aria-describedby={triggerAriaProps()["aria-describedby"]} class={renderProps.class()} style={renderProps.style()} data-focused={dataAttr(isFocused())} data-focus-visible={dataAttr(isFocusVisible())} data-hovered={dataAttr(isHovered())} data-disabled={dataAttr(state.isDisabled)}>
|
|
419
497
|
{renderProps.renderChildren()}
|
|
420
498
|
</button>;
|
|
421
499
|
}
|
|
@@ -437,7 +515,12 @@ function SelectValue(props) {
|
|
|
437
515
|
if (!context) throw new Error("SelectValue must be used within a Select");
|
|
438
516
|
const { valueProps, placeholder: contextPlaceholder } = context;
|
|
439
517
|
const state = context.state;
|
|
440
|
-
const
|
|
518
|
+
const stringFormatter = createStringFormatter(racIntlStrings, "react-aria-components");
|
|
519
|
+
const listFormatter = createListFormatter({
|
|
520
|
+
style: "long",
|
|
521
|
+
type: "conjunction"
|
|
522
|
+
});
|
|
523
|
+
const placeholder = () => local.placeholder ?? contextPlaceholder ?? stringFormatter().format("selectPlaceholder");
|
|
441
524
|
const renderValues = createMemo(() => {
|
|
442
525
|
const collection = state.collection();
|
|
443
526
|
const selectedItem = state.selectedKey() == null ? null : collection.getItem(state.selectedKey());
|
|
@@ -446,10 +529,7 @@ function SelectValue(props) {
|
|
|
446
529
|
return {
|
|
447
530
|
selectedItem,
|
|
448
531
|
selectedItems,
|
|
449
|
-
selectedText: state.selectionMode() === "multiple" ? selectedItems.length > 0 ?
|
|
450
|
-
style: "long",
|
|
451
|
-
type: "conjunction"
|
|
452
|
-
}).format(selectedItems.map((item) => item.textValue)) : null : selectedItem?.textValue ?? null,
|
|
532
|
+
selectedText: state.selectionMode() === "multiple" ? selectedItems.length > 0 ? listFormatter().format(selectedItems.map((item) => item.textValue)) : null : selectedItem?.textValue ?? null,
|
|
453
533
|
isSelected: state.selectionMode() === "multiple" ? selectedItems.length > 0 : selectedItem != null,
|
|
454
534
|
placeholder: placeholder()
|
|
455
535
|
};
|
|
@@ -462,7 +542,7 @@ function SelectValue(props) {
|
|
|
462
542
|
style: local.style,
|
|
463
543
|
defaultClassName: "solidaria-Select-value"
|
|
464
544
|
}, renderValues);
|
|
465
|
-
return <span {...domProps} {...valueProps} class={renderProps.class()} style={renderProps.style()} data-placeholder={!renderValues().isSelected
|
|
545
|
+
return <span {...domProps} {...valueProps} class={renderProps.class()} style={renderProps.style()} data-placeholder={dataAttr(!renderValues().isSelected)}>
|
|
466
546
|
{props.children == null ? renderValues().selectedText ?? renderValues().placeholder ?? "" : renderProps.renderChildren()}
|
|
467
547
|
</span>;
|
|
468
548
|
}
|
|
@@ -486,7 +566,7 @@ function SelectListBox(props) {
|
|
|
486
566
|
if (!context) throw new Error("SelectListBox must be used within a Select");
|
|
487
567
|
const { menuProps, rootRef, state: selectState, isOpen } = context;
|
|
488
568
|
const state = selectState;
|
|
489
|
-
|
|
569
|
+
createTrackedEffect(() => {
|
|
490
570
|
if (!isOpen()) return;
|
|
491
571
|
state.selectionManager.setFocused(true);
|
|
492
572
|
if (state.focusedKey() != null) return;
|
|
@@ -494,6 +574,9 @@ function SelectListBox(props) {
|
|
|
494
574
|
if (selectedKey != null && !state.collection().getItem(selectedKey)?.isDisabled) state.setFocusedKey(selectedKey);
|
|
495
575
|
});
|
|
496
576
|
let listBoxRef;
|
|
577
|
+
const [listBoxEl, setListBoxEl] = createSignal(null, { ownedWrite: true });
|
|
578
|
+
const CollectionRoot = useCollectionRoot();
|
|
579
|
+
const isVirtualized = () => parentCollectionRenderer?.isVirtualized === true;
|
|
497
580
|
createInteractOutside({
|
|
498
581
|
ref: () => rootRef() ?? listBoxRef ?? null,
|
|
499
582
|
onInteractOutside: () => {
|
|
@@ -503,16 +586,22 @@ function SelectListBox(props) {
|
|
|
503
586
|
return !isOpen() || local.isInPopover === true;
|
|
504
587
|
}
|
|
505
588
|
});
|
|
589
|
+
const parentCollectionRenderer = useCollectionRenderer();
|
|
506
590
|
const listBoxHook = createListBox({
|
|
507
591
|
...menuProps,
|
|
508
592
|
shouldSelectOnPressUp: true,
|
|
509
593
|
shouldFocusOnHover: true,
|
|
594
|
+
disallowEmptySelection: true,
|
|
510
595
|
shouldSelectOnFocus: local.isInPopover === true ? false : void 0,
|
|
511
596
|
get isDisabled() {
|
|
512
597
|
return state.isDisabled;
|
|
598
|
+
},
|
|
599
|
+
get isVirtualized() {
|
|
600
|
+
return parentCollectionRenderer?.isVirtualized;
|
|
513
601
|
}
|
|
514
602
|
}, createSelectListStateAdapter(state));
|
|
515
|
-
const
|
|
603
|
+
const { isFocused: isListBoxFocused, isFocusVisible: isListBoxFocusVisible, focusProps: listBoxFocusProps } = createFocusRing();
|
|
604
|
+
const renderValues = createMemo(() => ({ isFocused: isListBoxFocused() }));
|
|
516
605
|
const renderProps = useRenderProps({
|
|
517
606
|
class: local.class,
|
|
518
607
|
style: local.style,
|
|
@@ -526,35 +615,54 @@ function SelectListBox(props) {
|
|
|
526
615
|
const { ref: _ref2, "aria-activedescendant": _activeDescendant, onFocus: _onFocus, ...rest } = listBoxHook.listBoxProps;
|
|
527
616
|
return {
|
|
528
617
|
...rest,
|
|
529
|
-
|
|
618
|
+
tabindex: state.isDisabled ? void 0 : state.focusedKey() != null ? -1 : 0
|
|
530
619
|
};
|
|
531
620
|
};
|
|
621
|
+
const cleanListBoxFocusProps = () => {
|
|
622
|
+
const { ref: _ref3, ...rest } = listBoxFocusProps;
|
|
623
|
+
return rest;
|
|
624
|
+
};
|
|
532
625
|
const items = () => Array.from(state.collection());
|
|
533
|
-
|
|
626
|
+
createTrackedEffect(() => {
|
|
534
627
|
if (!isOpen()) return;
|
|
535
628
|
const focusedKey = state.focusedKey();
|
|
536
629
|
if (focusedKey == null) return;
|
|
630
|
+
if (local.isInPopover === true && getInteractionModality() !== "keyboard") return;
|
|
537
631
|
queueMicrotask(() => {
|
|
538
632
|
const option = Array.from(listBoxRef?.querySelectorAll("[role='option']") ?? []).find((element) => element.id === String(focusedKey));
|
|
539
633
|
if (option && document.activeElement !== option) focusSafely(option);
|
|
540
634
|
});
|
|
541
635
|
});
|
|
542
|
-
const listBox = () => <
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
<For each={items()}>
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
636
|
+
const listBox = () => <SelectListBoxInPopoverContext value={local.isInPopover === true}>
|
|
637
|
+
<div ref={(el) => {
|
|
638
|
+
listBoxRef = el;
|
|
639
|
+
setListBoxEl(el);
|
|
640
|
+
}} {...domProps} {...cleanMenuProps()} {...cleanListBoxProps()} {...cleanListBoxFocusProps()} class={renderProps.class()} style={renderProps.style()} data-focused={dataAttr(isListBoxFocused())} data-focus-visible={dataAttr(isListBoxFocusVisible())} data-empty={dataAttr(state.collection().size === 0)} data-layout="stack" data-orientation="vertical">
|
|
641
|
+
<CollectionRoot collection={items()} scrollRef={() => listBoxEl()}>
|
|
642
|
+
<Show when={local.children} fallback={<For each={items()}>
|
|
643
|
+
{(node, index) => {
|
|
644
|
+
const item = <SelectOption id={node.key}>{node.textValue}</SelectOption>;
|
|
645
|
+
return isVirtualized() ? <VirtualizerItem index={index()}>{item}</VirtualizerItem> : item;
|
|
646
|
+
}}
|
|
647
|
+
</For>}>
|
|
648
|
+
<For each={items()}>
|
|
649
|
+
{(node, index) => {
|
|
650
|
+
const child = node.value != null ? local.children(node.value) : null;
|
|
651
|
+
return isVirtualized() ? <VirtualizerItem index={index()}>{child}</VirtualizerItem> : child;
|
|
652
|
+
}}
|
|
653
|
+
</For>
|
|
654
|
+
</Show>
|
|
655
|
+
</CollectionRoot>
|
|
656
|
+
{state.collection().size === 0 && local.renderEmptyState ? <div role="option" style={{ display: "contents" }} data-empty-state>
|
|
657
|
+
{local.renderEmptyState()}
|
|
658
|
+
</div> : null}
|
|
659
|
+
<Show when={local.onLoadMore}>
|
|
660
|
+
<ListBoxLoadMoreItem onLoadMore={local.onLoadMore} isLoading={local.isLoading} class={local.loadMoreClass}>
|
|
661
|
+
{local.renderLoadMore?.()}
|
|
662
|
+
</ListBoxLoadMoreItem>
|
|
663
|
+
</Show>
|
|
664
|
+
</div>
|
|
665
|
+
</SelectListBoxInPopoverContext>;
|
|
558
666
|
return <Show when={isOpen()}>
|
|
559
667
|
<Show when={local.isInPopover} fallback={<FocusScope restoreFocus autoFocus>
|
|
560
668
|
{listBox()}
|
|
@@ -583,15 +691,23 @@ function SelectOption(props) {
|
|
|
583
691
|
const [ref, setRefSignal] = createSignal(null);
|
|
584
692
|
const setRef = (el) => {
|
|
585
693
|
setRefSignal(el);
|
|
586
|
-
assignRef(local.ref, el);
|
|
694
|
+
assignRef$1(local.ref, el);
|
|
587
695
|
};
|
|
696
|
+
const parentCollectionRenderer = useCollectionRenderer();
|
|
697
|
+
const isInPopover = useContext(SelectListBoxInPopoverContext);
|
|
588
698
|
const optionAria = createOption({
|
|
589
699
|
key: local.id,
|
|
700
|
+
get focus() {
|
|
701
|
+
return ariaProps.focus ?? (isInPopover ? noopOptionFocus : void 0);
|
|
702
|
+
},
|
|
703
|
+
get isVirtualized() {
|
|
704
|
+
return parentCollectionRenderer?.isVirtualized;
|
|
705
|
+
},
|
|
590
706
|
get isDisabled() {
|
|
591
707
|
return Boolean(ariaProps.isDisabled || selectContext?.isDisabled());
|
|
592
708
|
},
|
|
593
709
|
get "aria-label"() {
|
|
594
|
-
return ariaProps["aria-label"]
|
|
710
|
+
return ariaProps["aria-label"];
|
|
595
711
|
},
|
|
596
712
|
shouldSelectOnPressUp: true,
|
|
597
713
|
shouldFocusOnHover: true,
|
|
@@ -610,7 +726,7 @@ function SelectOption(props) {
|
|
|
610
726
|
if (state.selectionMode() === "multiple") {
|
|
611
727
|
const keys = state.selectedKeys();
|
|
612
728
|
if (keys === "all") return;
|
|
613
|
-
state.setSelectedKeys(new Set([...keys, key]));
|
|
729
|
+
state.setSelectedKeys(/* @__PURE__ */ new Set([...keys, key]));
|
|
614
730
|
return;
|
|
615
731
|
}
|
|
616
732
|
state.setSelectedKey(key);
|
|
@@ -634,7 +750,7 @@ function SelectOption(props) {
|
|
|
634
750
|
if (state.selectionMode() !== "multiple") state.close();
|
|
635
751
|
}
|
|
636
752
|
}, () => ref());
|
|
637
|
-
const isOptionFocusVisible = () => optionAria.
|
|
753
|
+
const isOptionFocusVisible = () => optionAria.isFocusVisible();
|
|
638
754
|
const renderValues = createMemo(() => ({
|
|
639
755
|
isSelected: optionAria.isSelected(),
|
|
640
756
|
isFocused: optionAria.isFocused(),
|
|
@@ -651,13 +767,9 @@ function SelectOption(props) {
|
|
|
651
767
|
style: local.style,
|
|
652
768
|
defaultClassName: "solidaria-Select-option"
|
|
653
769
|
}, renderValues);
|
|
654
|
-
const hasPrimitiveLabel = () => {
|
|
655
|
-
return typeof props.children === "string" || typeof props.children === "number";
|
|
656
|
-
};
|
|
657
770
|
const selectionIndicatorContext = createMemo(() => ({ isSelected: optionAria.isSelected }));
|
|
658
771
|
const cleanOptionProps = () => {
|
|
659
|
-
const { ref: _ref1,
|
|
660
|
-
if (!hasPrimitiveLabel() && rest["aria-label"] == null) delete rest["aria-labelledby"];
|
|
772
|
+
const { ref: _ref1, ...rest } = optionAria.optionProps;
|
|
661
773
|
const onClick = rest.onClick;
|
|
662
774
|
rest.onClick = ((event) => {
|
|
663
775
|
const wasSelected = optionAria.isSelected();
|
|
@@ -669,6 +781,32 @@ function SelectOption(props) {
|
|
|
669
781
|
});
|
|
670
782
|
return rest;
|
|
671
783
|
};
|
|
784
|
+
const optionTextSlots = { slots: {
|
|
785
|
+
get [DEFAULT_SLOT]() {
|
|
786
|
+
return optionAria.labelProps;
|
|
787
|
+
},
|
|
788
|
+
get label() {
|
|
789
|
+
return optionAria.labelProps;
|
|
790
|
+
},
|
|
791
|
+
get description() {
|
|
792
|
+
return optionAria.descriptionProps;
|
|
793
|
+
}
|
|
794
|
+
} };
|
|
795
|
+
createRenderEffect(() => ({
|
|
796
|
+
el: ref(),
|
|
797
|
+
labelId: optionAria.labelProps.id,
|
|
798
|
+
descriptionId: optionAria.descriptionProps.id
|
|
799
|
+
}), ({ el, labelId, descriptionId }) => {
|
|
800
|
+
if (!el) return;
|
|
801
|
+
if (labelId) {
|
|
802
|
+
const label = el.querySelector("[slot='label']");
|
|
803
|
+
if (label && !label.id) label.id = labelId;
|
|
804
|
+
}
|
|
805
|
+
if (descriptionId) {
|
|
806
|
+
const description = el.querySelector("[slot='description']");
|
|
807
|
+
if (description && !description.id) description.id = descriptionId;
|
|
808
|
+
}
|
|
809
|
+
});
|
|
672
810
|
const selectOption = () => {
|
|
673
811
|
if (optionAria.isDisabled()) return;
|
|
674
812
|
if (state.selectionMode() === "multiple") {
|
|
@@ -683,21 +821,14 @@ function SelectOption(props) {
|
|
|
683
821
|
state.setSelectedKey(local.id);
|
|
684
822
|
state.close();
|
|
685
823
|
};
|
|
686
|
-
return <SelectionIndicatorContext
|
|
824
|
+
return <SelectionIndicatorContext value={selectionIndicatorContext()}>
|
|
687
825
|
{}
|
|
688
|
-
<div ref={setRef} {...cleanOptionProps()} class={renderProps.class()} style={renderProps.style()} data-selected={optionAria.isSelected()
|
|
689
|
-
|
|
826
|
+
<div ref={setRef} {...cleanOptionProps()} class={renderProps.class()} style={renderProps.style()} data-selected={dataAttr(optionAria.isSelected())} data-focused={dataAttr(optionAria.isFocused())} data-focus-visible={dataAttr(isOptionFocusVisible())} data-pressed={dataAttr(optionAria.isPressed())} data-hovered={dataAttr(optionAria.isHovered())} data-disabled={dataAttr(optionAria.isDisabled())} data-selection-mode={state.selectionMode()}>
|
|
827
|
+
<Provider values={[[TextContext, optionTextSlots]]}>
|
|
828
|
+
<OptionContent render={renderProps.renderChildrenStable} labelProps={optionAria.labelProps} />
|
|
829
|
+
</Provider>
|
|
690
830
|
</div>
|
|
691
|
-
</SelectionIndicatorContext
|
|
692
|
-
}
|
|
693
|
-
function isObjectRecord(value) {
|
|
694
|
-
return typeof value === "object" && value !== null;
|
|
695
|
-
}
|
|
696
|
-
function toKey(value) {
|
|
697
|
-
if (typeof value === "string" || typeof value === "number") return value;
|
|
698
|
-
}
|
|
699
|
-
function toTextValue(value) {
|
|
700
|
-
if (typeof value === "string" || typeof value === "number") return String(value);
|
|
831
|
+
</SelectionIndicatorContext>;
|
|
701
832
|
}
|
|
702
833
|
function createSelectListStateAdapter(state) {
|
|
703
834
|
const selectedKeys = createMemo(() => {
|
|
@@ -717,9 +848,9 @@ function createSelectListStateAdapter(state) {
|
|
|
717
848
|
focusedKey: state.focusedKey,
|
|
718
849
|
setFocusedKey: (key) => state.setFocusedKey(key ?? null),
|
|
719
850
|
childFocusStrategy: () => null,
|
|
720
|
-
selectionMode: () => state.selectionMode
|
|
721
|
-
selectionBehavior: () =>
|
|
722
|
-
disallowEmptySelection: () =>
|
|
851
|
+
selectionMode: () => state.selectionManager.selectionMode,
|
|
852
|
+
selectionBehavior: () => state.selectionManager.selectionBehavior,
|
|
853
|
+
disallowEmptySelection: () => state.selectionManager.disallowEmptySelection,
|
|
723
854
|
selectedKeys,
|
|
724
855
|
disabledKeys,
|
|
725
856
|
disabledBehavior: () => "all",
|
|
@@ -727,26 +858,15 @@ function createSelectListStateAdapter(state) {
|
|
|
727
858
|
isSelectAll: () => state.selectedKeys() === "all",
|
|
728
859
|
isSelected: (key) => selectedKeys().has(key),
|
|
729
860
|
isDisabled: state.isKeyDisabled,
|
|
730
|
-
setSelectionBehavior: () =>
|
|
731
|
-
toggleSelection: (key) =>
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
if (next.has(key)) next.delete(key);
|
|
740
|
-
else next.add(key);
|
|
741
|
-
state.setSelectedKeys(next);
|
|
742
|
-
},
|
|
743
|
-
replaceSelection: (key) => state.setSelectedKey(key),
|
|
744
|
-
setSelectedKeys: (keys) => state.setSelectedKeys(keys),
|
|
745
|
-
selectAll: () => {},
|
|
746
|
-
clearSelection: () => state.selectionMode() === "multiple" ? state.setSelectedKeys([]) : state.setSelectedKey(null),
|
|
747
|
-
toggleSelectAll: () => {},
|
|
748
|
-
extendSelection: (toKey) => state.setSelectedKey(toKey),
|
|
749
|
-
select: (key) => state.selectionMode() === "multiple" ? state.setSelectedKeys([...state.selectedKeys() === "all" ? [] : state.selectedKeys(), key]) : state.setSelectedKey(key)
|
|
861
|
+
setSelectionBehavior: (behavior) => state.selectionManager.setSelectionBehavior(behavior),
|
|
862
|
+
toggleSelection: (key) => state.selectionManager.toggleSelection(key),
|
|
863
|
+
replaceSelection: (key) => state.selectionManager.replaceSelection(key),
|
|
864
|
+
setSelectedKeys: (keys) => state.selectionManager.setSelectedKeys(keys),
|
|
865
|
+
selectAll: () => state.selectionManager.selectAll(),
|
|
866
|
+
clearSelection: () => state.selectionManager.clearSelection(),
|
|
867
|
+
toggleSelectAll: () => state.selectionManager.toggleSelectAll(),
|
|
868
|
+
extendSelection: (toKey) => state.selectionManager.extendSelection(toKey),
|
|
869
|
+
select: (key, event) => state.selectionManager.select(key, event)
|
|
750
870
|
};
|
|
751
871
|
}
|
|
752
872
|
Select.Trigger = SelectTrigger;
|