@proyecto-viviana/solidaria-components 0.5.1 → 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 -39
- package/dist/Form.js.map +1 -1
- package/dist/Form.jsx +36 -14
- 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 +312 -209
- 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 +27 -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 +69 -99
- package/src/DatePicker.tsx +146 -342
- 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 +41 -12
- 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 +587 -409
- 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 -119
- package/src/Select.tsx +454 -274
- package/src/SelectionIndicator.tsx +21 -3
- package/src/Separator.tsx +17 -1
- package/src/SharedElementTransition.tsx +67 -46
- 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 +32 -86
- 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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.jsx","names":["mergeProps"],"sources":["../src/Select.tsx"],"sourcesContent":["/**\n * Select component for solidaria-components\n *\n * A pre-wired headless select that combines state + aria hooks.\n * Port of react-aria-components/src/Select.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n createContext,\n createEffect,\n createMemo,\n createSignal,\n createUniqueId,\n splitProps,\n useContext,\n For,\n Show,\n untrack,\n} from \"solid-js\";\nimport {\n createSelect,\n createHiddenSelect,\n createListBox,\n createOption,\n createHover,\n createInteractOutside,\n FocusScope,\n focusSafely,\n mergeProps,\n type AriaSelectProps,\n type AriaListBoxProps,\n type AriaOptionProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createSelectState,\n type ListState,\n type SelectState,\n type Key,\n type CollectionNode,\n DEFAULT_VALIDATION_RESULT,\n type ValidationResult,\n} from \"@proyecto-viviana/solid-stately\";\nimport { FieldErrorContext, type FieldErrorContextValue } from \"./FieldError\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\nimport {\n SelectionIndicatorContext,\n type SelectionIndicatorContextValue,\n} from \"./SelectionIndicator\";\nimport { ListBoxLoadMoreItem } from \"./ListBox\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nfunction getNativeSelectValidation(select: HTMLSelectElement): ValidationResult {\n return {\n isInvalid: !select.validity.valid,\n validationDetails: {\n badInput: select.validity.badInput,\n customError: select.validity.customError,\n patternMismatch: select.validity.patternMismatch,\n rangeOverflow: select.validity.rangeOverflow,\n rangeUnderflow: select.validity.rangeUnderflow,\n stepMismatch: select.validity.stepMismatch,\n tooLong: select.validity.tooLong,\n tooShort: select.validity.tooShort,\n typeMismatch: select.validity.typeMismatch,\n valueMissing: select.validity.valueMissing,\n valid: select.validity.valid,\n },\n validationErrors: select.validationMessage ? [select.validationMessage] : [],\n };\n}\n\nexport interface SelectRenderProps {\n /** Whether the select is open. */\n isOpen: boolean;\n /** Whether the select is focused. */\n isFocused: boolean;\n /** Whether the select has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the select is disabled. */\n isDisabled: boolean;\n /** Whether the select is required. */\n isRequired: boolean;\n /** Whether a value is selected. */\n isSelected: boolean;\n}\n\nexport interface SelectProps<T> extends Omit<AriaSelectProps, \"children\">, SlotProps {\n /** The items to render in the select. */\n items: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Selection mode. */\n selectionMode?: \"single\" | \"multiple\";\n /** The currently selected key (controlled). */\n selectedKey?: Key | null;\n /** The default selected key (uncontrolled). */\n defaultSelectedKey?: Key | null;\n /** Currently selected keys (controlled, for multiple selection). */\n selectedKeys?: \"all\" | Iterable<Key>;\n /** Default selected keys (uncontrolled, for multiple selection). */\n defaultSelectedKeys?: \"all\" | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n /** Handler called when selected keys change. */\n onSelectionChangeKeys?: (keys: \"all\" | Set<Key>) => void;\n /** Whether the select is open (controlled). */\n isOpen?: boolean;\n /** Whether the select is open by default (uncontrolled). */\n defaultOpen?: boolean;\n /** Handler called when the open state changes. */\n onOpenChange?: (isOpen: boolean) => void;\n /** Placeholder text when no option is selected. */\n placeholder?: string;\n /** The name of the select, used when submitting an HTML form. */\n name?: string;\n /** The children of the component (compound components: SelectTrigger, SelectListBox). */\n children: RenderChildren<SelectRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectRenderProps>;\n /** Custom renderer for the outer select element. */\n render?: (\n props: JSX.HTMLAttributes<HTMLDivElement>,\n renderProps: SelectRenderProps,\n ) => JSX.Element;\n /** Ref for the outer select element. */\n ref?: RefLike<HTMLDivElement>;\n}\n\nexport interface SelectValueRenderProps<T> {\n /** The selected item. */\n selectedItem: CollectionNode<T> | null;\n /** The selected items. */\n selectedItems: CollectionNode<T>[];\n /** The text value of the selected item. */\n selectedText: string | null;\n /** Whether a value is selected. */\n isSelected: boolean;\n /** The placeholder text. */\n placeholder: string | undefined;\n}\n\nexport interface SelectValueProps<T> extends SlotProps {\n /** The children of the value. A function may be provided to receive render props. */\n children?: RenderChildren<SelectValueRenderProps<T>>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectValueRenderProps<T>>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectValueRenderProps<T>>;\n /** Placeholder text when no option is selected. Overrides the placeholder from Select. */\n placeholder?: string;\n}\n\nexport interface SelectTriggerRenderProps {\n /** Whether the select is open. */\n isOpen: boolean;\n /** Whether the trigger is focused. */\n isFocused: boolean;\n /** Whether the trigger has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the trigger is hovered. */\n isHovered: boolean;\n /** Whether the trigger is pressed. */\n isPressed: boolean;\n /** Whether the trigger is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SelectTriggerProps extends SlotProps {\n /** A ref callback/object for the underlying trigger button element. */\n ref?: RefLike<HTMLButtonElement>;\n /** The children of the trigger. A function may be provided to receive render props. */\n children?: RenderChildren<SelectTriggerRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectTriggerRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectTriggerRenderProps>;\n}\n\nexport interface SelectListBoxRenderProps {\n /** Whether the listbox is focused. */\n isFocused: boolean;\n}\n\nexport interface SelectListBoxProps<T> extends SlotProps {\n /** The children of the listbox. A function may be provided to render each item. */\n children?: (item: T) => JSX.Element;\n /** Content to display when the listbox has no items. */\n renderEmptyState?: () => JSX.Element;\n /** Called when the load more sentinel becomes visible. */\n onLoadMore?: () => void | Promise<void>;\n /** Whether additional items are currently loading. */\n isLoading?: boolean;\n /** Content to display in the load more sentinel row. */\n renderLoadMore?: () => JSX.Element | undefined;\n /** CSS class for the load more sentinel row. */\n loadMoreClass?: ClassNameOrFunction<{ isLoading: boolean }>;\n /** Whether the listbox is rendered inside an overlay popover. */\n isInPopover?: boolean;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectListBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectListBoxRenderProps>;\n}\n\nexport interface SelectOptionRenderProps {\n /** Whether the option is selected. */\n isSelected: boolean;\n /** Whether the option is focused. */\n isFocused: boolean;\n /** Whether the option has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the option is pressed. */\n isPressed: boolean;\n /** Whether the option is hovered. */\n isHovered: boolean;\n /** Whether the option is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SelectOptionProps<T> extends Omit<AriaOptionProps, \"children\" | \"key\">, SlotProps {\n /** A ref callback/object for the underlying option element. */\n ref?: RefLike<HTMLDivElement>;\n /** The unique key for the option. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the option. A function may be provided to receive render props. */\n children?: RenderChildren<SelectOptionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectOptionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectOptionRenderProps>;\n /** The text value of the option (for typeahead). */\n textValue?: string;\n}\n\ninterface SelectContextValue<T> {\n state: SelectState<T>;\n rootRef: Accessor<HTMLElement | null>;\n triggerRef: Accessor<HTMLElement | null>;\n setTriggerRef: (el: HTMLElement | null) => void;\n triggerProps: JSX.HTMLAttributes<HTMLElement>;\n valueProps: JSX.HTMLAttributes<HTMLElement>;\n labelProps: JSX.HTMLAttributes<HTMLElement>;\n menuProps: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps?: JSX.HTMLAttributes<HTMLElement>;\n validation?: ValidationResult;\n isOpen: Accessor<boolean>;\n isFocused: Accessor<boolean>;\n isFocusVisible: Accessor<boolean>;\n isPressed: Accessor<boolean>;\n isDisabled: Accessor<boolean>;\n placeholder?: string;\n items: T[];\n renderItem?: (item: T) => JSX.Element;\n slots?: Record<string, Partial<SelectProps<T>>>;\n autoFocus?: boolean;\n}\n\nexport const SelectContext = createContext<SelectContextValue<unknown> | null>(null);\nexport const SelectStateContext = createContext<SelectState<unknown> | null>(null);\nexport const SelectValueContext = SelectContext;\n\nconst selectRootLabelProps = new Set([\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"aria-details\",\n]);\n\n/**\n * A select displays a collapsible list of options and allows a user to select one of them.\n */\nexport function Select<T>(props: SelectProps<T>): JSX.Element {\n const parentContext = useContext(SelectContext) as SelectContextValue<T> | null;\n const contextSlotProps = parentContext?.slots?.[props.slot ?? \"default\"] as\n | Partial<SelectProps<T>>\n | undefined;\n const mergedSelectProps = (\n contextSlotProps ? mergeProps(contextSlotProps, props) : props\n ) as SelectProps<T>;\n const [local, stateProps, ariaProps] = splitProps(\n mergedSelectProps,\n [\"class\", \"style\", \"render\", \"ref\", \"slot\", \"children\"],\n [\n \"items\",\n \"getKey\",\n \"getTextValue\",\n \"getDisabled\",\n \"disabledKeys\",\n \"selectionMode\",\n \"selectedKey\",\n \"defaultSelectedKey\",\n \"selectedKeys\",\n \"defaultSelectedKeys\",\n \"onSelectionChange\",\n \"onSelectionChangeKeys\",\n \"isOpen\",\n \"defaultOpen\",\n \"onOpenChange\",\n \"name\",\n ],\n );\n let rootRef: HTMLDivElement | undefined;\n const [selectValidation, setSelectValidation] =\n createSignal<ValidationResult>(DEFAULT_VALIDATION_RESULT);\n const errorMessageId = createUniqueId();\n\n const resolveDisabled = (): boolean => {\n const disabled = ariaProps.isDisabled;\n if (typeof disabled === \"function\") {\n return (disabled as () => boolean)();\n }\n return !!disabled;\n };\n\n const state = createSelectState<T>({\n get items() {\n return stateProps.items;\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectionMode() {\n return stateProps.selectionMode;\n },\n get selectedKey() {\n return stateProps.selectedKey;\n },\n get defaultSelectedKey() {\n return stateProps.defaultSelectedKey;\n },\n get selectedKeys() {\n return stateProps.selectedKeys;\n },\n get defaultSelectedKeys() {\n return stateProps.defaultSelectedKeys;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n get onSelectionChangeKeys() {\n return stateProps.onSelectionChangeKeys;\n },\n get isOpen() {\n return stateProps.isOpen;\n },\n get defaultOpen() {\n return stateProps.defaultOpen;\n },\n get onOpenChange() {\n return stateProps.onOpenChange;\n },\n get isDisabled() {\n return resolveDisabled();\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n });\n\n const selectAriaProps = createMemo(() => {\n const clean: Record<string, unknown> = {};\n for (const key in ariaProps as Record<string, unknown>) {\n if (!key.startsWith(\"data-\")) {\n clean[key] = (ariaProps as Record<string, unknown>)[key];\n }\n }\n return clean as typeof ariaProps;\n });\n\n const {\n labelProps,\n triggerProps,\n valueProps,\n menuProps,\n isFocused,\n isFocusVisible,\n isOpen,\n isPressed,\n } = createSelect<T>(selectAriaProps, state);\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return resolveDisabled();\n },\n });\n\n const renderValues = createMemo<SelectRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: resolveDisabled(),\n isRequired: !!ariaProps.isRequired,\n isSelected:\n state.selectionMode() === \"multiple\"\n ? state.selectedKeys() === \"all\" || (state.selectedKeys() as Set<Key>).size > 0\n : state.selectedKey() != null,\n }));\n const childRenderValues: SelectRenderProps = {\n get isOpen() {\n return isOpen();\n },\n get isFocused() {\n return isFocused();\n },\n get isFocusVisible() {\n return isFocusVisible();\n },\n get isDisabled() {\n return resolveDisabled();\n },\n get isRequired() {\n return !!ariaProps.isRequired;\n },\n get isSelected() {\n return hasSelection();\n },\n };\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Select\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n for (const key of selectRootLabelProps) {\n delete filtered[key];\n }\n return filtered;\n });\n\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanLabelProps = () => {\n const { ref: _ref, ...rest } = labelProps as Record<string, unknown>;\n return rest;\n };\n const setRootRef = (el: HTMLDivElement) => {\n rootRef = el;\n assignRef(local.ref, el);\n };\n const validation = createMemo<ValidationResult>(() => {\n const current = selectValidation();\n if (current.isInvalid || !ariaProps.isInvalid) {\n return current;\n }\n\n return {\n ...DEFAULT_VALIDATION_RESULT,\n isInvalid: true,\n };\n });\n const isInvalid = createMemo(() => validation().isInvalid);\n const triggerDescribedBy = () => {\n const ids = [\n (triggerProps as { \"aria-describedby\"?: string })[\"aria-describedby\"],\n isInvalid() ? errorMessageId : undefined,\n ]\n .filter(Boolean)\n .join(\" \")\n .split(\" \")\n .filter(Boolean);\n return ids.length ? Array.from(new Set(ids)).join(\" \") : undefined;\n };\n const triggerPropsWithValidation = () =>\n ({\n ...triggerProps,\n \"aria-describedby\": triggerDescribedBy(),\n }) as JSX.HTMLAttributes<HTMLElement>;\n const fieldErrorContext: FieldErrorContextValue = {\n get validation() {\n return validation();\n },\n get errorMessageProps() {\n return { id: errorMessageId };\n },\n };\n const focusTrigger = () => {\n triggerRef?.focus();\n };\n const hasSelection = () =>\n state.selectionMode() === \"multiple\"\n ? state.selectedKeys() === \"all\" || (state.selectedKeys() as Set<Key>).size > 0\n : state.selectedKey() != null;\n const hasNativeValidation = () => (ariaProps.validationBehavior ?? \"native\") === \"native\";\n const getSelectValidation = (select: HTMLSelectElement): ValidationResult => {\n if (ariaProps.isRequired && !hasSelection()) {\n return {\n isInvalid: true,\n validationDetails: {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valueMissing: true,\n valid: false,\n },\n validationErrors: [select.validationMessage || \"Constraints not satisfied\"],\n };\n }\n return getNativeSelectValidation(select);\n };\n\n const { containerProps, selectProps: hiddenSelectProps } = createHiddenSelect({\n state,\n name: stateProps.name,\n form: ariaProps.form,\n isRequired: ariaProps.isRequired,\n validationBehavior: ariaProps.validationBehavior ?? \"native\",\n get isDisabled() {\n return resolveDisabled();\n },\n });\n const handleHiddenSelectInvalid: JSX.EventHandler<HTMLSelectElement, Event> = (event) => {\n setSelectValidation(getSelectValidation(event.currentTarget));\n focusTrigger();\n event.preventDefault();\n };\n const handleHiddenSelectChange: JSX.EventHandler<HTMLSelectElement, Event> = (event) => {\n (hiddenSelectProps as { onChange?: JSX.EventHandler<HTMLSelectElement, Event> }).onChange?.(\n event,\n );\n setSelectValidation(\n hasSelection() && event.currentTarget.validity.valid\n ? DEFAULT_VALIDATION_RESULT\n : getSelectValidation(event.currentTarget),\n );\n };\n createEffect(() => {\n if (hasSelection() && selectValidation().isInvalid) {\n setSelectValidation(DEFAULT_VALIDATION_RESULT);\n }\n });\n let triggerRef: HTMLElement | null = null;\n const setTriggerRef = (el: HTMLElement | null) => {\n triggerRef = el;\n };\n\n const RootChildren = () => {\n const selectChildren = untrack(() =>\n typeof local.children === \"function\"\n ? (local.children as (values: SelectRenderProps) => JSX.Element)(childRenderValues)\n : local.children,\n );\n\n return (\n <>\n <Show when={ariaProps.label}>\n <span {...cleanLabelProps()}>{ariaProps.label as JSX.Element}</span>\n </Show>\n {selectChildren}\n {/*\n The HiddenSelect (native `<select>` for form autofill/submission) renders\n AFTER the trigger button, mirroring upstream RAC `Select` which emits\n `{renderProps.children}` then `<HiddenSelect>` (Select.tsx:288-289). Order\n matters for the DOM tab/focus trail: the visible button must precede the\n form-only hidden control.\n */}\n <div {...containerProps}>\n <select\n {...hiddenSelectProps}\n name={hasSelection() ? undefined : stateProps.name}\n required={\n (hasNativeValidation() && ariaProps.isRequired && !hasSelection()) || undefined\n }\n onInvalid={handleHiddenSelectInvalid}\n onChange={handleHiddenSelectChange}\n >\n <Show when={state.selectionMode() !== \"multiple\"}>\n <option selected={state.selectedKey() == null} />\n </Show>\n <For each={stateProps.items}>\n {(item) => {\n const itemRecord = isObjectRecord(item) ? item : null;\n const fallbackKey =\n itemRecord != null ? (toKey(itemRecord.key) ?? toKey(itemRecord.id)) : undefined;\n const key = stateProps.getKey?.(item) ?? fallbackKey ?? String(item);\n // This hidden <select> re-derives each option's label straight\n // from the raw items array, bypassing the collection's textValue.\n // Mirror createListState's derivation: read the conventional\n // display fields (textValue/label/name/title) and, for an object\n // item with none of them, fall back to the key rather than\n // String(item) — which would render the useless \"[object Object]\".\n const fallbackTextValue =\n itemRecord != null\n ? (toTextValue(itemRecord.textValue) ??\n toTextValue(itemRecord.label) ??\n toTextValue(itemRecord.name) ??\n toTextValue(itemRecord.title))\n : undefined;\n const textValue =\n stateProps.getTextValue?.(item) ??\n fallbackTextValue ??\n (itemRecord != null ? String(key) : String(item));\n const selectedKeys = state.selectedKeys();\n const isSelected =\n state.selectionMode() === \"multiple\"\n ? selectedKeys === \"all\"\n ? true\n : (selectedKeys as Set<Key>).has(key)\n : key === state.selectedKey();\n return (\n <option value={String(key)} selected={isSelected}>\n {textValue}\n </option>\n );\n }}\n </For>\n </select>\n <Show when={state.selectionMode() === \"multiple\" && stateProps.name}>\n <For\n each={\n state.selectedKeys() === \"all\"\n ? Array.from(state.collection()).map((item) => item.key)\n : Array.from(state.selectedKeys() as Set<Key>)\n }\n >\n {(key) => (\n <input\n type=\"hidden\"\n name={stateProps.name}\n form={ariaProps.form}\n value={String(key)}\n disabled={resolveDisabled()}\n />\n )}\n </For>\n </Show>\n <Show\n when={\n state.selectionMode() !== \"multiple\" && stateProps.name && state.selectedKey() != null\n }\n >\n <input\n type=\"hidden\"\n name={stateProps.name}\n form={ariaProps.form}\n value={String(state.selectedKey())}\n disabled={resolveDisabled()}\n />\n </Show>\n </div>\n </>\n );\n };\n const baseRootProps = () =>\n ({\n ...domProps(),\n ...cleanHoverProps(),\n ref: setRootRef,\n class: renderProps.class(),\n style: renderProps.style(),\n slot: local.slot,\n \"data-open\": isOpen() || undefined,\n \"data-disabled\": resolveDisabled() || undefined,\n \"data-required\": ariaProps.isRequired || undefined,\n \"data-invalid\": isInvalid() || undefined,\n \"data-hovered\": isHovered() || undefined,\n }) as JSX.HTMLAttributes<HTMLDivElement>;\n const RootContent = () => {\n const renderedRootChildren = <RootChildren />;\n const rootProps = () =>\n ({\n ...baseRootProps(),\n children: renderedRootChildren,\n }) as JSX.HTMLAttributes<HTMLDivElement>;\n\n return local.render ? (\n local.render(rootProps(), renderValues())\n ) : (\n <div {...baseRootProps()}>{renderedRootChildren}</div>\n );\n };\n\n return (\n <SelectContext.Provider\n value={\n {\n state,\n rootRef: () => rootRef ?? null,\n triggerRef: () => triggerRef,\n setTriggerRef,\n get triggerProps() {\n return triggerPropsWithValidation();\n },\n valueProps,\n labelProps,\n menuProps,\n get errorMessageProps() {\n return { id: errorMessageId };\n },\n get validation() {\n return validation();\n },\n isOpen,\n isFocused,\n isFocusVisible,\n isPressed,\n isDisabled: resolveDisabled,\n placeholder: ariaProps.placeholder,\n items: stateProps.items,\n autoFocus: !!ariaProps.autoFocus,\n } as SelectContextValue<unknown>\n }\n >\n <SelectStateContext.Provider value={state}>\n <FieldErrorContext.Provider value={fieldErrorContext}>\n <RootContent />\n </FieldErrorContext.Provider>\n </SelectStateContext.Provider>\n </SelectContext.Provider>\n );\n}\n\n/**\n * The trigger button for a select.\n */\nexport function SelectTrigger(props: SelectTriggerProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\", \"ref\"]);\n\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error(\"SelectTrigger must be used within a Select\");\n }\n const { isOpen, isFocused, isFocusVisible, isPressed, state } = context;\n let triggerRef: HTMLButtonElement | undefined;\n const setTriggerRef = (el: HTMLButtonElement) => {\n triggerRef = el;\n context.setTriggerRef(el);\n assignRef(local.ref, el);\n };\n\n createEffect(() => {\n if (context.autoFocus) {\n triggerRef?.focus();\n }\n });\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n const renderValues = createMemo<SelectTriggerRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isPressed: isPressed(),\n isDisabled: state.isDisabled,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Select-trigger\",\n },\n renderValues,\n );\n\n const cleanTriggerProps = () => {\n const { ref: _ref1, ...rest } = context.triggerProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const triggerAriaProps = () => context.triggerProps as Record<string, unknown>;\n const menuAriaProps = () => context.menuProps as Record<string, unknown>;\n return (\n <button\n ref={setTriggerRef}\n {...domProps}\n {...cleanTriggerProps()}\n {...cleanHoverProps()}\n type=\"button\"\n id={triggerAriaProps().id as string | undefined}\n tabIndex={state.isDisabled ? undefined : 0}\n aria-label={triggerAriaProps()[\"aria-label\"] as string | undefined}\n aria-labelledby={triggerAriaProps()[\"aria-labelledby\"] as string | undefined}\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen()}\n aria-controls={isOpen() ? (menuAriaProps().id as string | undefined) : undefined}\n aria-disabled={state.isDisabled || undefined}\n aria-required={triggerAriaProps()[\"aria-required\"] as boolean | undefined}\n aria-describedby={triggerAriaProps()[\"aria-describedby\"] as string | undefined}\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={state.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n// Default children function for SelectValue - defined at module level for SSR stability\nfunction defaultSelectValueChildren<T>(values: SelectValueRenderProps<T>) {\n return values.selectedText ?? values.placeholder ?? \"\";\n}\n\n/**\n * Displays the selected value in a select.\n */\nexport function SelectValue<T>(props: SelectValueProps<T>): JSX.Element {\n const [local, domProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"placeholder\",\n \"children\",\n ]);\n\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error(\"SelectValue must be used within a Select\");\n }\n const { valueProps, placeholder: contextPlaceholder } = context;\n const state = context.state as SelectState<T>;\n\n const placeholder = () => local.placeholder ?? contextPlaceholder;\n\n const renderValues = createMemo<SelectValueRenderProps<T>>(() => {\n const collection = state.collection();\n const selectedItem =\n state.selectedKey() == null ? null : collection.getItem(state.selectedKey() as Key);\n const selectedKeys = state.selectedKeys();\n const selectedItems =\n selectedKeys === \"all\"\n ? Array.from(collection)\n : Array.from(selectedKeys as Set<Key>)\n .map((key) => collection.getItem(key))\n .filter((item): item is CollectionNode<T> => item != null);\n const selectedText =\n state.selectionMode() === \"multiple\"\n ? selectedItems.length > 0\n ? new Intl.ListFormat(undefined, { style: \"long\", type: \"conjunction\" }).format(\n selectedItems.map((item) => item.textValue),\n )\n : null\n : (selectedItem?.textValue ?? null);\n return {\n selectedItem,\n selectedItems,\n selectedText,\n isSelected:\n state.selectionMode() === \"multiple\" ? selectedItems.length > 0 : selectedItem != null,\n placeholder: placeholder(),\n };\n });\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children ?? defaultSelectValueChildren;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Select-value\",\n },\n renderValues,\n );\n\n return (\n <span\n {...domProps}\n {...valueProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-placeholder={!renderValues().isSelected || undefined}\n >\n {props.children == null\n ? (renderValues().selectedText ?? renderValues().placeholder ?? \"\")\n : renderProps.renderChildren()}\n </span>\n );\n}\n\n/**\n * The listbox popup for a select.\n */\nexport function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {\n const [local, domProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"children\",\n \"renderEmptyState\",\n \"onLoadMore\",\n \"isLoading\",\n \"renderLoadMore\",\n \"loadMoreClass\",\n \"isInPopover\",\n ]);\n\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error(\"SelectListBox must be used within a Select\");\n }\n const { menuProps, rootRef, state: selectState, isOpen } = context;\n const state = selectState as SelectState<T>;\n\n createEffect(() => {\n if (!isOpen()) {\n return;\n }\n // On open the listbox takes collection focus. Upstream `useSelect` sets\n // `menuProps.autoFocus = state.focusStrategy || true`, so the ListBox's\n // `useSelectableCollection` auto-focuses on mount — setting the selection\n // manager's `isFocused` true and focusing the selected option. Our\n // `createListBox` reimplements keyboard nav inline (no `autoFocus` effect),\n // so we set the manager focus here to match. Without it the selected option\n // never paints its focus-visible background (`data-focused` stays unset).\n state.selectionManager.setFocused(true);\n if (state.focusedKey() != null) {\n return;\n }\n const selectedKey = state.selectedKey();\n if (selectedKey != null && !state.collection().getItem(selectedKey)?.isDisabled) {\n state.setFocusedKey(selectedKey);\n }\n });\n\n let listBoxRef: HTMLDivElement | undefined;\n\n createInteractOutside({\n ref: () => rootRef() ?? listBoxRef ?? null,\n onInteractOutside: () => {\n if (isOpen()) {\n state.close();\n }\n },\n get isDisabled() {\n return !isOpen() || local.isInPopover === true;\n },\n });\n\n // Keep the hook result intact — destructuring `{ listBoxProps }` invokes the\n // `get listBoxProps()` getter ONCE and freezes it (the Solid \"destructuring a\n // get-prop freezes reactivity\" gotcha). The listbox `tabIndex` is computed from\n // `focusedKey` (`focusedKey != null ? -1 : 0`); on open the effect above sets a\n // focused key, so a frozen snapshot would leave the listbox tabbable (`0`) when\n // upstream flips it to `-1`. Reading `listBoxHook.listBoxProps` per access keeps\n // it reactive.\n const listBoxHook = createListBox(\n {\n ...(menuProps as unknown as AriaListBoxProps),\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n shouldSelectOnFocus: local.isInPopover === true ? false : undefined,\n get isDisabled() {\n return state.isDisabled;\n },\n },\n createSelectListStateAdapter(state),\n );\n\n const renderValues = createMemo<SelectListBoxRenderProps>(() => ({\n // Focus within the listbox itself (the selection manager's focus state),\n // not the select-level trigger focus.\n isFocused: state.selectionManager.isFocused,\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Select-listbox\",\n },\n renderValues,\n );\n\n const cleanMenuProps = () => {\n const { ref: _ref1, ...rest } = menuProps as Record<string, unknown>;\n return rest;\n };\n const cleanListBoxProps = () => {\n const {\n ref: _ref2,\n \"aria-activedescendant\": _activeDescendant,\n onFocus: _onFocus,\n ...rest\n } = listBoxHook.listBoxProps as Record<string, unknown>;\n // Faithful Select listbox focus model: the focused option receives REAL DOM\n // focus (the open effect above + `createSelectableItem`'s self-focus move\n // `document.activeElement` onto it), mirroring upstream `useSelect`. So the\n // listbox must (a) leave the tab sequence once an option is focused —\n // `useSelectableCollection` uses `tabIndex = focusedKey == null ? 0 : -1`\n // (useSelectableCollection.ts:687-690) — and (b) NOT expose\n // `aria-activedescendant`, which is the virtual-focus channel upstream Select\n // never uses. These are overridden here, not in the shared `createListBox`,\n // because the standalone `ListBox` keeps its container-focus model (focus\n // stays on the listbox, `aria-activedescendant` is its AT channel).\n //\n // We also drop `createListBox`'s container-focus TRAMPOLINE (`onFocus`): it\n // marshals the first key when the container is focused with `focusedKey ==\n // null`, which is exactly Select's deliberate click-open state (the open\n // effect sets `isFocused` true but leaves `focusedKey` null when nothing is\n // selected, so the first arrow enters the first item). Upstream's own\n // trampoline no-ops in this case because it guards on `manager.isFocused`\n // (already true); our shared guard uses `focusedKey == null` for the\n // standalone ListBox, so we strip it here to preserve Select's faithful\n // model. (Auto-selecting on focus under replace behavior would also toggle\n // the first item selected on open — the bug this override prevents.)\n return {\n ...rest,\n tabIndex: state.isDisabled ? undefined : state.focusedKey() != null ? -1 : 0,\n };\n };\n\n const items = () => Array.from(state.collection());\n createEffect(() => {\n if (!isOpen()) return;\n const focusedKey = state.focusedKey();\n if (focusedKey == null) return;\n\n queueMicrotask(() => {\n const option = Array.from(\n listBoxRef?.querySelectorAll<HTMLElement>(\"[role='option']\") ?? [],\n ).find((element) => element.id === String(focusedKey));\n if (option && document.activeElement !== option) {\n focusSafely(option);\n }\n });\n });\n\n const listBox = () => (\n // Upstream RAC ListBox (and our own Menu.tsx) render a `<div role=\"listbox\">`\n // over `<div role=\"option\">` rows, NOT `<ul>`/`<li>` — the collection is\n // div-based for virtualization parity. `<ul>`/`<li>` here was a self-inflicted\n // structural divergence surfaced by the Picker recertification (D5/D6/D8 saw\n // `li[option]`/`ul[listbox]` where the React oracle sees `div`).\n <div\n ref={(el) => (listBoxRef = el)}\n {...domProps}\n {...cleanMenuProps()}\n {...cleanListBoxProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.selectionManager.isFocused || undefined}\n data-empty={state.collection().size === 0 || undefined}\n >\n {state.collection().size === 0 && local.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }} data-empty-state>\n {local.renderEmptyState()}\n </div>\n ) : (\n <Show\n when={local.children}\n fallback={\n <For each={items()}>\n {(node) => <SelectOption id={node.key}>{node.textValue}</SelectOption>}\n </For>\n }\n >\n <For each={items()}>\n {(node) => (node.value != null ? local.children!(node.value) : null)}\n </For>\n </Show>\n )}\n <Show when={local.onLoadMore}>\n <ListBoxLoadMoreItem\n onLoadMore={local.onLoadMore!}\n isLoading={local.isLoading}\n class={local.loadMoreClass}\n >\n {local.renderLoadMore?.()}\n </ListBoxLoadMoreItem>\n </Show>\n </div>\n );\n\n return (\n <Show when={isOpen()}>\n <Show\n when={local.isInPopover}\n fallback={\n <FocusScope restoreFocus autoFocus>\n {listBox()}\n </FocusScope>\n }\n >\n {listBox()}\n </Show>\n </Show>\n );\n}\n\n/**\n * An option in a select listbox.\n */\nexport function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"id\",\n \"item\",\n \"textValue\",\n \"ref\",\n ]);\n\n const context = useContext(SelectStateContext);\n if (!context) {\n throw new Error(\"SelectOption must be used within a Select\");\n }\n const state = context as SelectState<T>;\n const selectContext = useContext(SelectContext) as SelectContextValue<T> | null;\n const [ref, setRefSignal] = createSignal<HTMLDivElement | null>(null);\n const setRef = (el: HTMLDivElement | null) => {\n setRefSignal(el);\n assignRef(local.ref, el as HTMLDivElement);\n };\n\n const optionAria = createOption<T>(\n {\n key: local.id,\n get isDisabled() {\n return Boolean(ariaProps.isDisabled || selectContext?.isDisabled());\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"] ?? local.textValue;\n },\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n get onHoverStart() {\n return ariaProps.onHoverStart;\n },\n get onHoverEnd() {\n return ariaProps.onHoverEnd;\n },\n get onHoverChange() {\n return ariaProps.onHoverChange;\n },\n },\n {\n ...createSelectListStateAdapter(state),\n select: (key: Key) => {\n if (state.selectionMode() === \"multiple\") {\n const keys = state.selectedKeys();\n if (keys === \"all\") return;\n state.setSelectedKeys(new Set([...keys, key]));\n return;\n }\n state.setSelectedKey(key);\n state.close();\n },\n toggleSelection: (key: Key) => {\n if (state.selectionMode() === \"multiple\") {\n const keys = state.selectedKeys();\n if (keys === \"all\") return;\n const next = new Set(keys);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n state.setSelectedKeys(next);\n return;\n }\n state.setSelectedKey(key);\n state.close();\n },\n replaceSelection: (key: Key) => {\n state.setSelectedKey(key);\n if (state.selectionMode() !== \"multiple\") {\n state.close();\n }\n },\n },\n () => ref(),\n );\n const isOptionFocusVisible = () =>\n optionAria.isFocused() && (selectContext?.isFocusVisible() ?? optionAria.isFocusVisible());\n\n const renderValues = createMemo<SelectOptionRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: isOptionFocusVisible(),\n isPressed: optionAria.isPressed(),\n isHovered: optionAria.isHovered(),\n isDisabled: optionAria.isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Select-option\",\n },\n renderValues,\n );\n const hasPrimitiveLabel = () => {\n return typeof props.children === \"string\" || typeof props.children === \"number\";\n };\n\n const selectionIndicatorContext = createMemo<SelectionIndicatorContextValue>(() => ({\n isSelected: optionAria.isSelected,\n }));\n\n const cleanOptionProps = () => {\n const {\n ref: _ref1,\n \"aria-describedby\": _ariaDescribedby,\n ...rest\n } = optionAria.optionProps as Record<string, unknown>;\n if (!hasPrimitiveLabel() && rest[\"aria-label\"] == null) {\n delete rest[\"aria-labelledby\"];\n }\n const onClick = rest.onClick as ((event: MouseEvent) => void) | undefined;\n rest.onClick = ((event: MouseEvent) => {\n const wasSelected = optionAria.isSelected();\n onClick?.(event);\n if (typeof PointerEvent === \"undefined\") {\n return;\n }\n queueMicrotask(() => {\n if (state.selectionMode() !== \"multiple\" || optionAria.isSelected() === wasSelected) {\n selectOption();\n }\n });\n }) as JSX.EventHandler<HTMLDivElement, MouseEvent>;\n return rest;\n };\n const selectOption = () => {\n if (optionAria.isDisabled()) {\n return;\n }\n if (state.selectionMode() === \"multiple\") {\n const keys = state.selectedKeys();\n if (keys === \"all\") return;\n const next = new Set(keys);\n if (next.has(local.id)) next.delete(local.id);\n else next.add(local.id);\n state.setSelectedKeys(next);\n return;\n }\n state.setSelectedKey(local.id);\n state.close();\n };\n\n return (\n <SelectionIndicatorContext.Provider value={selectionIndicatorContext()}>\n {/* `<div role=\"option\">`, not `<li>` — see the SelectListBox note; upstream\n RAC options are div-based. */}\n <div\n ref={setRef}\n {...cleanOptionProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={optionAria.isSelected() || undefined}\n data-focused={optionAria.isFocused() || undefined}\n data-focus-visible={isOptionFocusVisible() || undefined}\n data-pressed={optionAria.isPressed() || undefined}\n data-hovered={optionAria.isHovered() || undefined}\n data-disabled={optionAria.isDisabled() || undefined}\n >\n {hasPrimitiveLabel() ? (\n <span {...optionAria.labelProps}>{renderProps.renderChildren()}</span>\n ) : (\n renderProps.renderChildren()\n )}\n </div>\n </SelectionIndicatorContext.Provider>\n );\n}\n\nfunction isObjectRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\nfunction toKey(value: unknown): Key | undefined {\n if (typeof value === \"string\" || typeof value === \"number\") {\n return value;\n }\n return undefined;\n}\n\nfunction toTextValue(value: unknown): string | undefined {\n if (typeof value === \"string\" || typeof value === \"number\") {\n return String(value);\n }\n return undefined;\n}\n\nfunction createSelectListStateAdapter<T>(state: SelectState<T>): ListState<T> {\n const selectedKeys = createMemo(() => {\n const keys = state.selectedKeys();\n return keys === \"all\" ? new Set(Array.from(state.collection()).map((item) => item.key)) : keys;\n });\n\n const disabledKeys = createMemo(() => {\n const keys = new Set<Key>();\n for (const node of state.collection()) {\n if (node.isDisabled) keys.add(node.key);\n }\n return keys;\n });\n\n return {\n collection: state.collection,\n selectionManager: state.selectionManager,\n // Collection-level focus (the selection manager's), not the select-level\n // trigger focus — upstream listbox internals only ever read\n // state.selectionManager.isFocused.\n isFocused: () => state.selectionManager.isFocused,\n setFocused: (isFocused) => state.selectionManager.setFocused(isFocused),\n focusedKey: state.focusedKey,\n setFocusedKey: (key) => state.setFocusedKey(key ?? null),\n childFocusStrategy: () => null,\n selectionMode: () => state.selectionMode(),\n selectionBehavior: () => \"replace\",\n disallowEmptySelection: () => true,\n selectedKeys,\n disabledKeys,\n disabledBehavior: () => \"all\",\n isEmpty: () => selectedKeys().size === 0,\n isSelectAll: () => state.selectedKeys() === \"all\",\n isSelected: (key) => selectedKeys().has(key),\n isDisabled: state.isKeyDisabled,\n setSelectionBehavior: () => {},\n toggleSelection: (key) => {\n if (state.selectionMode() !== \"multiple\") {\n state.setSelectedKey(key);\n return;\n }\n const keys = state.selectedKeys();\n if (keys === \"all\") return;\n const next = new Set(keys);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n state.setSelectedKeys(next);\n },\n replaceSelection: (key) => state.setSelectedKey(key),\n setSelectedKeys: (keys) => state.setSelectedKeys(keys),\n selectAll: () => {},\n clearSelection: () =>\n state.selectionMode() === \"multiple\" ? state.setSelectedKeys([]) : state.setSelectedKey(null),\n toggleSelectAll: () => {},\n extendSelection: (toKey) => state.setSelectedKey(toKey),\n select: (key) =>\n state.selectionMode() === \"multiple\"\n ? state.setSelectedKeys([\n ...(state.selectedKeys() === \"all\" ? [] : (state.selectedKeys() as Set<Key>)),\n key,\n ])\n : state.setSelectedKey(key),\n };\n}\n\nSelect.Trigger = SelectTrigger;\nSelect.Value = SelectValue;\nSelect.ListBox = SelectListBox;\nSelect.Option = SelectOption;\n"],"mappings":";;;;;;;;;;;;;;AA6DA,SAAS,UAAa,KAAiB,IAAa;CAClD,IAAI,CAAC,KAAK;CACV,IAAI,OAAO,QAAQ,YACjB,IAAI,EAAE;MAEN,IAAI,UAAU;AAElB;AAEA,SAAS,0BAA0B,QAA6C;CAC9E,OAAO;EACL,WAAW,CAAC,OAAO,SAAS;EAC5B,mBAAmB;GACjB,UAAU,OAAO,SAAS;GAC1B,aAAa,OAAO,SAAS;GAC7B,iBAAiB,OAAO,SAAS;GACjC,eAAe,OAAO,SAAS;GAC/B,gBAAgB,OAAO,SAAS;GAChC,cAAc,OAAO,SAAS;GAC9B,SAAS,OAAO,SAAS;GACzB,UAAU,OAAO,SAAS;GAC1B,cAAc,OAAO,SAAS;GAC9B,cAAc,OAAO,SAAS;GAC9B,OAAO,OAAO,SAAS;EACzB;EACA,kBAAkB,OAAO,oBAAoB,CAAC,OAAO,iBAAiB,IAAI,CAAC;CAC7E;AACF;AAsMA,MAAa,gBAAgB,cAAkD,IAAI;AACnF,MAAa,qBAAqB,cAA2C,IAAI;AACjF,MAAa,qBAAqB;AAElC,MAAM,uBAAuB,IAAI,IAAI;CACnC;CACA;CACA;CACA;AACF,CAAC;;;;AAKD,SAAgB,OAAU,OAAoC;CAE5D,MAAM,mBADgB,WAAW,aACI,CAAC,EAAE,QAAQ,MAAM,QAAQ;CAM9D,MAAM,CAAC,OAAO,YAAY,aAAa,WAFrC,mBAAmBA,aAAW,kBAAkB,KAAK,IAAI,OAIzD;EAAC;EAA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,aAAa;GAChC,IAAI,SAAS,OAAO;GACpB,MAAM,OAAO,IAAI,IAAI,IAAI;GACzB,IAAI,KAAK,IAAI,GAAG,GAAG,KAAK,OAAO,GAAG;QAC7B,KAAK,IAAI,GAAG;GACjB,MAAM,gBAAgB,IAAI;EAC5B;EACA,mBAAmB,QAAQ,MAAM,eAAe,GAAG;EACnD,kBAAkB,SAAS,MAAM,gBAAgB,IAAI;EACrD,iBAAiB,CAAC;EAClB,sBACE,MAAM,cAAc,MAAM,aAAa,MAAM,gBAAgB,CAAC,CAAC,IAAI,MAAM,eAAe,IAAI;EAC9F,uBAAuB,CAAC;EACxB,kBAAkB,UAAU,MAAM,eAAe,KAAK;EACtD,SAAS,QACP,MAAM,cAAc,MAAM,aACtB,MAAM,gBAAgB,CACpB,GAAI,MAAM,aAAa,MAAM,QAAQ,CAAC,IAAK,MAAM,aAAa,GAC9D,GACF,CAAC,IACD,MAAM,eAAe,GAAG;CAChC;AACF;AAEA,OAAO,UAAU;AACjB,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,SAAS"}
|
|
1
|
+
{"version":3,"file":"Select.jsx","names":["assignRef"],"sources":["../src/Select.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/Select.tsx\n\n/**\n * Select component for solidaria-components\n *\n * A pre-wired headless select that combines state + aria hooks.\n * Port of react-aria-components/src/Select.tsx\n */\n\nimport {\n createContext,\n createEffect,\n createMemo,\n createRenderEffect,\n createSignal,\n useContext,\n For,\n Show,\n untrack,\n createTrackedEffect,\n} from \"solid-js\";\nimport type { Accessor, Context } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n createSelect,\n createHiddenSelect,\n createListBox,\n createOption,\n createHover,\n createInteractOutside,\n createFocusRing,\n FocusScope,\n focusSafely,\n getInteractionModality,\n mergeProps,\n type AriaSelectProps,\n type AriaListBoxProps,\n type AriaOptionProps,\n createStringFormatter,\n createListFormatter,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createSelectState,\n type ListState,\n type SelectState,\n type Key,\n type CollectionNode,\n DEFAULT_VALIDATION_RESULT,\n type ValidationResult,\n} from \"@proyecto-viviana/solid-stately\";\nimport { FieldErrorContext, type FieldErrorContextValue } from \"./FieldError\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n DEFAULT_SLOT,\n OptionContent,\n Provider,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n ariaTrueFalse,\n attrTrue,\n coerceDomRecord,\n} from \"./utils\";\nimport {\n SelectionIndicatorContext,\n type SelectionIndicatorContextValue,\n} from \"./SelectionIndicator\";\nimport { ListBoxLoadMoreItem } from \"./ListBox\";\nimport { VirtualizerItem } from \"./Virtualizer\";\nimport { TextContext } from \"./Text\";\nimport { useCollectionRenderer, useCollectionRoot } from \"./Collection\";\nimport { racIntlStrings } from \"./intl\";\nimport { splitProps } from \"@proyecto-viviana/solidaria/utils\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nfunction getNativeSelectValidation(select: HTMLSelectElement | HTMLInputElement): ValidationResult {\n return {\n isInvalid: !select.validity.valid,\n validationDetails: {\n badInput: select.validity.badInput,\n customError: select.validity.customError,\n patternMismatch: select.validity.patternMismatch,\n rangeOverflow: select.validity.rangeOverflow,\n rangeUnderflow: select.validity.rangeUnderflow,\n stepMismatch: select.validity.stepMismatch,\n tooLong: select.validity.tooLong,\n tooShort: select.validity.tooShort,\n typeMismatch: select.validity.typeMismatch,\n valueMissing: select.validity.valueMissing,\n valid: select.validity.valid,\n },\n validationErrors: select.validationMessage ? [select.validationMessage] : [],\n };\n}\n\nexport interface SelectRenderProps {\n /** Whether the select is open. */\n isOpen: boolean;\n /** Whether the select is focused. */\n isFocused: boolean;\n /** Whether the select has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the select is disabled. */\n isDisabled: boolean;\n /** Whether the select is required. */\n isRequired: boolean;\n /** Whether a value is selected. */\n isSelected: boolean;\n}\n\nexport interface SelectProps<T> extends Omit<AriaSelectProps, \"children\">, SlotProps {\n /** The items to render in the select. */\n items: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Selection mode. */\n selectionMode?: \"single\" | \"multiple\";\n /** The currently selected key (controlled). */\n selectedKey?: Key | null;\n /** The default selected key (uncontrolled). */\n defaultSelectedKey?: Key | null;\n /** Currently selected keys (controlled, for multiple selection). */\n selectedKeys?: \"all\" | Iterable<Key>;\n /** Default selected keys (uncontrolled, for multiple selection). */\n defaultSelectedKeys?: \"all\" | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n /** Handler called when selected keys change. */\n onSelectionChangeKeys?: (keys: \"all\" | Set<Key>) => void;\n /** Whether the select is open (controlled). */\n isOpen?: boolean;\n /** Whether the select is open by default (uncontrolled). */\n defaultOpen?: boolean;\n /** Handler called when the open state changes. */\n onOpenChange?: (isOpen: boolean) => void;\n /** Placeholder text when no option is selected. */\n placeholder?: string;\n /** The name of the select, used when submitting an HTML form. */\n name?: string;\n /** The children of the component (compound components: SelectTrigger, SelectListBox). */\n children: RenderChildren<SelectRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectRenderProps>;\n /** Custom renderer for the outer select element. */\n render?: (\n props: JSX.HTMLAttributes<HTMLDivElement>,\n renderProps: SelectRenderProps,\n ) => JSX.Element;\n /** Ref for the outer select element. */\n ref?: RefLike<HTMLDivElement>;\n}\n\nexport interface SelectValueRenderProps<T> {\n /** The selected item. */\n selectedItem: CollectionNode<T> | null;\n /** The selected items. */\n selectedItems: CollectionNode<T>[];\n /** The text value of the selected item. */\n selectedText: string | null;\n /** Whether a value is selected. */\n isSelected: boolean;\n /** The placeholder text. */\n placeholder: string | undefined;\n}\n\nexport interface SelectValueProps<T> extends SlotProps {\n /** The children of the value. A function may be provided to receive render props. */\n children?: RenderChildren<SelectValueRenderProps<T>>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectValueRenderProps<T>>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectValueRenderProps<T>>;\n /** Placeholder text when no option is selected. Overrides the placeholder from Select. */\n placeholder?: string;\n}\n\nexport interface SelectTriggerRenderProps {\n /** Whether the select is open. */\n isOpen: boolean;\n /** Whether the trigger is focused. */\n isFocused: boolean;\n /** Whether the trigger has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the trigger is hovered. */\n isHovered: boolean;\n /** Whether the trigger is pressed. */\n isPressed: boolean;\n /** Whether the trigger is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SelectTriggerProps extends SlotProps {\n /** A ref callback/object for the underlying trigger button element. */\n ref?: RefLike<HTMLButtonElement>;\n /** The children of the trigger. A function may be provided to receive render props. */\n children?: RenderChildren<SelectTriggerRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectTriggerRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectTriggerRenderProps>;\n}\n\nexport interface SelectListBoxRenderProps {\n /** Whether the listbox is focused. */\n isFocused: boolean;\n}\n\nexport interface SelectListBoxProps<T> extends SlotProps {\n /** The children of the listbox. A function may be provided to render each item. */\n children?: (item: T) => JSX.Element;\n /** Content to display when the listbox has no items. */\n renderEmptyState?: () => JSX.Element;\n /** Called when the load more sentinel becomes visible. */\n onLoadMore?: () => void | Promise<void>;\n /** Whether additional items are currently loading. */\n isLoading?: boolean;\n /** Content to display in the load more sentinel row. */\n renderLoadMore?: () => JSX.Element | undefined;\n /** CSS class for the load more sentinel row. */\n loadMoreClass?: ClassNameOrFunction<{ isLoading: boolean }>;\n /** Whether the listbox is rendered inside an overlay popover. */\n isInPopover?: boolean;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectListBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectListBoxRenderProps>;\n}\n\nexport interface SelectOptionRenderProps {\n /** Whether the option is selected. */\n isSelected: boolean;\n /** Whether the option is focused. */\n isFocused: boolean;\n /** Whether the option has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the option is pressed. */\n isPressed: boolean;\n /** Whether the option is hovered. */\n isHovered: boolean;\n /** Whether the option is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SelectOptionProps<T> extends Omit<AriaOptionProps, \"children\" | \"key\">, SlotProps {\n /** A ref callback/object for the underlying option element. */\n ref?: RefLike<HTMLDivElement>;\n /** The unique key for the option. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the option. A function may be provided to receive render props. */\n children?: RenderChildren<SelectOptionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectOptionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectOptionRenderProps>;\n /** The text value of the option (for typeahead). */\n textValue?: string;\n}\n\ninterface SelectContextValue<T> {\n state: SelectState<T>;\n rootRef: Accessor<HTMLElement | null>;\n triggerRef: Accessor<HTMLElement | null>;\n setTriggerRef: (el: HTMLElement | null) => void;\n triggerProps: JSX.HTMLAttributes<HTMLElement>;\n valueProps: JSX.HTMLAttributes<HTMLElement>;\n labelProps: JSX.HTMLAttributes<HTMLElement>;\n menuProps: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps?: JSX.HTMLAttributes<HTMLElement>;\n validation?: ValidationResult;\n isOpen: Accessor<boolean>;\n isFocused: Accessor<boolean>;\n isFocusVisible: Accessor<boolean>;\n isPressed: Accessor<boolean>;\n isDisabled: Accessor<boolean>;\n placeholder?: string;\n items: T[];\n renderItem?: (item: T) => JSX.Element;\n slots?: Record<string, Partial<SelectProps<T>>>;\n autoFocus?: boolean;\n}\n\nexport const SelectContext = createContext<SelectContextValue<unknown> | null>(null);\nexport const SelectStateContext = createContext<SelectState<unknown> | null>(null);\nexport const SelectValueContext = SelectContext;\n\n/** True when this SelectListBox is the overlay list (Picker / Popover). */\nconst SelectListBoxInPopoverContext = createContext(false);\n\nfunction noopOptionFocus() {}\n\nconst selectRootLabelProps = new Set([\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"aria-details\",\n]);\n\n/**\n * A select displays a collapsible list of options and allows a user to select one of them.\n */\nexport function Select<T>(props: SelectProps<T>): JSX.Element {\n const parentContext = useContext(SelectContext) as SelectContextValue<T> | null;\n const contextSlotProps = parentContext?.slots?.[\n typeof props.slot === \"string\" ? props.slot : \"default\"\n ] as Partial<SelectProps<T>> | undefined;\n const mergedSelectProps = (\n contextSlotProps ? mergeProps(contextSlotProps, props) : props\n ) as SelectProps<T>;\n const [local, stateProps, ariaProps] = splitProps(\n mergedSelectProps,\n [\"class\", \"style\", \"render\", \"ref\", \"slot\", \"children\"],\n [\n \"items\",\n \"getKey\",\n \"getTextValue\",\n \"getDisabled\",\n \"disabledKeys\",\n \"selectionMode\",\n \"selectedKey\",\n \"defaultSelectedKey\",\n \"selectedKeys\",\n \"defaultSelectedKeys\",\n \"onSelectionChange\",\n \"onSelectionChangeKeys\",\n \"isOpen\",\n \"defaultOpen\",\n \"onOpenChange\",\n \"name\",\n ],\n );\n let rootRef: HTMLDivElement | undefined;\n const [selectValidation, setSelectValidation] =\n createSignal<ValidationResult>(DEFAULT_VALIDATION_RESULT);\n\n const resolveDisabled = (): boolean => {\n const disabled = ariaProps.isDisabled;\n if (typeof disabled === \"function\") {\n return (disabled as () => boolean)();\n }\n return !!disabled;\n };\n\n const state = createSelectState<T>({\n get items() {\n return stateProps.items;\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectionMode() {\n return stateProps.selectionMode;\n },\n get selectedKey() {\n return stateProps.selectedKey;\n },\n get defaultSelectedKey() {\n return stateProps.defaultSelectedKey;\n },\n get selectedKeys() {\n return stateProps.selectedKeys;\n },\n get defaultSelectedKeys() {\n return stateProps.defaultSelectedKeys;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n get onSelectionChangeKeys() {\n return stateProps.onSelectionChangeKeys;\n },\n get isOpen() {\n return stateProps.isOpen;\n },\n get defaultOpen() {\n return stateProps.defaultOpen;\n },\n get onOpenChange() {\n return stateProps.onOpenChange;\n },\n get isDisabled() {\n return resolveDisabled();\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n get isInvalid() {\n return ariaProps.isInvalid;\n },\n get validationState() {\n return ariaProps.validationState;\n },\n get validate() {\n return ariaProps.validate;\n },\n get name() {\n return stateProps.name;\n },\n get validationBehavior() {\n return ariaProps.validationBehavior;\n },\n });\n\n const selectAriaProps = createMemo(() => {\n const clean: Record<string, unknown> = {};\n for (const key in ariaProps as Record<string, unknown>) {\n if (!key.startsWith(\"data-\")) {\n clean[key] = (ariaProps as Record<string, unknown>)[key];\n }\n }\n return clean as typeof ariaProps;\n });\n\n const isInvalid = createMemo(\n () => state.displayValidation().isInvalid || selectValidation().isInvalid,\n );\n const composedValidation = createMemo<ValidationResult>(() => {\n const fromState = state.displayValidation();\n if (fromState.isInvalid) return fromState;\n return selectValidation();\n });\n\n // Keep the hook result intact. Its DOM prop surfaces are getters; destructuring\n // them freezes the initial closed-state attributes and event composition.\n // RAC `useSelect` feeds `state.displayValidation.isInvalid` into `useField`;\n // pass the composed invalid flag so `createSlotId` re-probes when native\n // validation mounts the error slot.\n const selectHook = createSelect<T>(\n () => ({\n ...selectAriaProps(),\n isInvalid: isInvalid(),\n }),\n state,\n );\n const { isFocused, isFocusVisible, isOpen, isPressed } = selectHook;\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return resolveDisabled();\n },\n });\n\n // RAC SelectInner: useFocusRing({within: true}) on the host (Select.tsx:187).\n // data-focused stamps state.isFocused; data-focus-visible comes from this ring.\n // SelectContext / SelectTrigger keep createSelect's trigger-ring accessors.\n const { isFocusVisible: isFocusVisibleWithin, focusProps } = createFocusRing({\n within: true,\n });\n\n const renderValues = createMemo<SelectRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisibleWithin(),\n isDisabled: resolveDisabled(),\n isRequired: !!ariaProps.isRequired,\n isSelected:\n state.selectionMode() === \"multiple\"\n ? state.selectedKeys() === \"all\" || (state.selectedKeys() as Set<Key>).size > 0\n : state.selectedKey() != null,\n }));\n const childRenderValues: SelectRenderProps = {\n get isOpen() {\n return isOpen();\n },\n get isFocused() {\n return isFocused();\n },\n get isFocusVisible() {\n return isFocusVisibleWithin();\n },\n get isDisabled() {\n return resolveDisabled();\n },\n get isRequired() {\n return !!ariaProps.isRequired;\n },\n get isSelected() {\n return hasSelection();\n },\n };\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Select\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n for (const key of selectRootLabelProps) {\n delete filtered[key];\n }\n return filtered;\n });\n\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, onFocus, onBlur, ...rest } = focusProps as Record<string, unknown>;\n // Solid's onFocus/onBlur do not bubble. RAC's container ring listens for\n // descendant focus via React's bubbling onFocus (Select.tsx:278-287).\n return {\n ...rest,\n onFocusIn: onFocus,\n onFocusOut: onBlur,\n };\n };\n const cleanLabelProps = () => {\n const { ref: _ref, ...rest } = selectHook.labelProps as Record<string, unknown>;\n return rest;\n };\n const setRootRef = (el: HTMLDivElement) => {\n rootRef = el;\n assignRef(local.ref, el);\n };\n const triggerPropsWithValidation = () =>\n selectHook.triggerProps as JSX.HTMLAttributes<HTMLElement>;\n const fieldErrorContext: FieldErrorContextValue = {\n get validation() {\n return composedValidation();\n },\n get errorMessageProps() {\n return selectHook.errorMessageProps;\n },\n };\n const focusTrigger = () => {\n triggerRef?.focus();\n };\n const hasSelection = () =>\n state.selectionMode() === \"multiple\"\n ? state.selectedKeys() === \"all\" || (state.selectedKeys() as Set<Key>).size > 0\n : state.selectedKey() != null;\n const hasNativeValidation = () => (ariaProps.validationBehavior ?? \"native\") === \"native\";\n const getSelectValidation = (select: HTMLSelectElement | HTMLInputElement): ValidationResult => {\n if (ariaProps.isRequired && !hasSelection()) {\n return {\n isInvalid: true,\n validationDetails: {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valueMissing: true,\n valid: false,\n },\n validationErrors: [select.validationMessage || \"Constraints not satisfied\"],\n };\n }\n return getNativeSelectValidation(select);\n };\n\n let triggerRef: HTMLElement | null = null;\n const setTriggerRef = (el: HTMLElement | null) => {\n triggerRef = el;\n };\n\n const {\n containerProps,\n selectProps: hiddenSelectProps,\n inputProps: hiddenInputProps,\n } = createHiddenSelect({\n state,\n name: stateProps.name,\n form: ariaProps.form,\n isRequired: ariaProps.isRequired,\n validationBehavior: ariaProps.validationBehavior ?? \"native\",\n triggerRef: () => triggerRef,\n get isDisabled() {\n return resolveDisabled();\n },\n });\n const handleHiddenSelectInvalid: JSX.EventHandler<HTMLSelectElement | HTMLInputElement, Event> = (\n event,\n ) => {\n setSelectValidation(getSelectValidation(event.currentTarget));\n focusTrigger();\n event.preventDefault();\n };\n const handleHiddenSelectChange: JSX.EventHandler<HTMLSelectElement, Event> = (event) => {\n (hiddenSelectProps as { onChange?: JSX.EventHandler<HTMLSelectElement, Event> }).onChange?.(\n event,\n );\n setSelectValidation(\n hasSelection() && event.currentTarget.validity.valid\n ? DEFAULT_VALIDATION_RESULT\n : getSelectValidation(event.currentTarget),\n );\n };\n // RAC HiddenSelect binds `value` on the <select> (HiddenSelect.tsx:144), not\n // `selected` on each <option>. Spreading selectProps once snapshots the key.\n const hiddenSelectItemNodes = () =>\n Array.from(state.collection()).filter((item) => item.type === \"item\");\n const nativeSelectValue = (): string | string[] => {\n if (state.selectionMode() === \"multiple\") {\n const selectedKeys = state.selectedKeys();\n if (selectedKeys === \"all\") {\n return hiddenSelectItemNodes().map((item) => String(item.key));\n }\n return Array.from(selectedKeys as Set<Key>).map(String);\n }\n const key = state.selectedKey();\n return key != null ? String(key) : \"\";\n };\n const hiddenSelectFallbackValues = (): Array<Key | null> => {\n if (state.selectionMode() === \"multiple\") {\n const keys = state.selectedKeys();\n if (keys === \"all\") {\n return hiddenSelectItemNodes().map((item) => item.key);\n }\n const listed = Array.from(keys as Set<Key>);\n return listed.length === 0 ? [null] : listed;\n }\n return [state.selectedKey()];\n };\n createTrackedEffect(() => {\n if (hasSelection() && selectValidation().isInvalid) {\n setSelectValidation(DEFAULT_VALIDATION_RESULT);\n }\n if (hasSelection() && !ariaProps.isInvalid && state.displayValidation().isInvalid) {\n state.resetValidation();\n }\n });\n\n const RootChildren = () => {\n const selectChildren = untrack(() =>\n typeof local.children === \"function\"\n ? (local.children as (values: SelectRenderProps) => JSX.Element)(childRenderValues)\n : local.children,\n );\n\n return (\n <>\n <Show when={ariaProps.label}>\n <span {...cleanLabelProps()}>{ariaProps.label as JSX.Element}</span>\n </Show>\n {selectChildren}\n {/*\n The HiddenSelect (native `<select>` for form autofill/submission) renders\n AFTER the trigger button, mirroring upstream RAC `Select` which emits\n `{renderProps.children}` then `<HiddenSelect>` (Select.tsx:288-289). Order\n matters for the DOM tab/focus trail: the visible button must precede the\n form-only hidden control.\n\n RAC HiddenSelect.tsx:172-244: ≤300 items render a <select> inside a\n <label> inside the visually hidden container — never an extra <input>.\n Hidden <input>s exist only when the collection is larger than 300.\n */}\n <Show\n when={state.collection().size <= 300}\n fallback={\n <Show when={stateProps.name}>\n <For\n each={(() => {\n // RAC HiddenSelect.tsx:205-208: always render at least one\n // hidden input so a required empty field still participates\n // in native form validation / FormData.\n const keys =\n state.selectionMode() === \"multiple\"\n ? state.selectedKeys() === \"all\"\n ? Array.from(state.collection()).map((item) => item.key)\n : Array.from(state.selectedKeys() as Set<Key>)\n : [state.selectedKey()];\n return keys.length === 0 ? [null] : keys;\n })()}\n >\n {(key) => (\n <input\n {...hiddenInputProps}\n name={stateProps.name}\n form={ariaProps.form}\n value={key != null ? String(key) : \"\"}\n disabled={resolveDisabled()}\n onInvalid={handleHiddenSelectInvalid}\n />\n )}\n </For>\n </Show>\n }\n >\n <div\n {...coerceDomRecord(containerProps as Record<string, unknown>)}\n data-testid=\"hidden-select-container\"\n >\n <label>\n {ariaProps.label}\n <select\n {...hiddenSelectProps}\n name={stateProps.name}\n required={\n (hasNativeValidation() && ariaProps.isRequired && !hasSelection()) || undefined\n }\n value={nativeSelectValue()}\n onInvalid={handleHiddenSelectInvalid}\n onChange={handleHiddenSelectChange}\n onInput={handleHiddenSelectChange}\n >\n <option value=\"\" label={\"\\u00A0\"}>\n {\"\\u00A0\"}\n </option>\n <For each={hiddenSelectItemNodes()}>\n {(item) => <option value={String(item.key)}>{item.textValue}</option>}\n </For>\n <Show when={state.collection().size === 0 && stateProps.name}>\n <For each={hiddenSelectFallbackValues()}>\n {(value) => <option value={value != null ? String(value) : \"\"} />}\n </For>\n </Show>\n </select>\n </label>\n </div>\n </Show>\n </>\n );\n };\n const baseRootProps = () =>\n ({\n ...domProps(),\n ...cleanHoverProps(),\n ...cleanFocusProps(),\n ref: setRootRef,\n class: renderProps.class(),\n style: renderProps.style(),\n slot: local.slot,\n \"data-focused\": dataAttr(isFocused()),\n \"data-focus-visible\": dataAttr(isFocusVisibleWithin()),\n \"data-open\": dataAttr(isOpen()),\n \"data-disabled\": dataAttr(resolveDisabled()),\n \"data-required\": dataAttr(ariaProps.isRequired),\n \"data-invalid\": dataAttr(isInvalid()),\n \"data-hovered\": dataAttr(isHovered()),\n }) as JSX.HTMLAttributes<HTMLDivElement>;\n const RootContent = () => {\n const textSlots = {\n slots: {\n get description() {\n return selectHook.descriptionProps;\n },\n get errorMessage() {\n return selectHook.errorMessageProps;\n },\n },\n };\n const renderedRootChildren = (\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n <RootChildren />\n </Provider>\n );\n const rootProps = () =>\n ({\n ...baseRootProps(),\n children: renderedRootChildren,\n }) as JSX.HTMLAttributes<HTMLDivElement>;\n\n return local.render ? (\n local.render(rootProps(), renderValues())\n ) : (\n <div {...baseRootProps()}>{renderedRootChildren}</div>\n );\n };\n\n return (\n <SelectContext\n value={\n {\n state,\n rootRef: () => rootRef ?? null,\n triggerRef: () => triggerRef,\n setTriggerRef,\n get triggerProps() {\n return triggerPropsWithValidation();\n },\n get valueProps() {\n return selectHook.valueProps;\n },\n get labelProps() {\n return selectHook.labelProps;\n },\n get menuProps() {\n return selectHook.menuProps;\n },\n get errorMessageProps() {\n return selectHook.errorMessageProps;\n },\n get validation() {\n return composedValidation();\n },\n isOpen,\n isFocused,\n isFocusVisible,\n isPressed,\n isDisabled: resolveDisabled,\n placeholder: ariaProps.placeholder,\n items: stateProps.items,\n autoFocus: !!ariaProps.autoFocus,\n } as SelectContextValue<unknown>\n }\n >\n <SelectStateContext value={state}>\n <FieldErrorContext value={fieldErrorContext}>\n <RootContent />\n </FieldErrorContext>\n </SelectStateContext>\n </SelectContext>\n );\n}\n\n/**\n * The trigger button for a select.\n */\nexport function SelectTrigger(props: SelectTriggerProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\", \"ref\"]);\n\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error(\"SelectTrigger must be used within a Select\");\n }\n const { isOpen, isFocusVisible, isPressed, state } = context;\n // RAC renders the trigger as a Button with its own focus ring, so its\n // data-focused follows the button and clears once the listbox takes focus.\n // The Select's own isFocused (state-level) stays on the root.\n const { isFocused, focusProps: triggerFocusProps } = createFocusRing();\n let triggerRef: HTMLButtonElement | undefined;\n const setTriggerRef = (el: HTMLButtonElement) => {\n triggerRef = el;\n context.setTriggerRef(el);\n assignRef(local.ref, el);\n };\n\n createTrackedEffect(() => {\n if (context.autoFocus) {\n triggerRef?.focus();\n }\n });\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n const renderValues = createMemo<SelectTriggerRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isPressed: isPressed(),\n isDisabled: state.isDisabled,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Select-trigger\",\n },\n renderValues,\n );\n\n const cleanTriggerProps = () => {\n // createSelect also stamps data-open on the trigger; react-aria's useSelect\n // does not, and RAC renders data-open on the Select root only.\n const {\n ref: _ref1,\n \"aria-disabled\": _ariaDisabled,\n \"data-open\": _dataOpen,\n ...rest\n } = context.triggerProps as Record<string, unknown>;\n return mergeProps(rest, triggerFocusProps as Record<string, unknown>);\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const triggerAriaProps = () => context.triggerProps as Record<string, unknown>;\n const menuAriaProps = () => context.menuProps as Record<string, unknown>;\n return (\n <button\n ref={setTriggerRef}\n {...domProps}\n {...cleanTriggerProps()}\n {...cleanHoverProps()}\n type=\"button\"\n id={triggerAriaProps().id as string | undefined}\n tabindex={state.isDisabled ? undefined : 0}\n disabled={state.isDisabled || undefined}\n aria-label={triggerAriaProps()[\"aria-label\"] as string | undefined}\n aria-labelledby={triggerAriaProps()[\"aria-labelledby\"] as string | undefined}\n aria-haspopup=\"listbox\"\n aria-expanded={ariaTrueFalse(isOpen())}\n aria-controls={isOpen() ? (menuAriaProps().id as string | undefined) : undefined}\n aria-required={attrTrue(Boolean(triggerAriaProps()[\"aria-required\"]))}\n aria-describedby={triggerAriaProps()[\"aria-describedby\"] as string | undefined}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n data-hovered={dataAttr(isHovered())}\n data-disabled={dataAttr(state.isDisabled)}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n// Default children function for SelectValue - defined at module level for SSR stability\nfunction defaultSelectValueChildren<T>(values: SelectValueRenderProps<T>) {\n return values.selectedText ?? values.placeholder ?? \"\";\n}\n\n/**\n * Displays the selected value in a select.\n */\nexport function SelectValue<T>(props: SelectValueProps<T>): JSX.Element {\n const [local, domProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"placeholder\",\n \"children\",\n ]);\n\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error(\"SelectValue must be used within a Select\");\n }\n const { valueProps, placeholder: contextPlaceholder } = context;\n const state = context.state as SelectState<T>;\n const stringFormatter = createStringFormatter(racIntlStrings, \"react-aria-components\");\n const listFormatter = createListFormatter({ style: \"long\", type: \"conjunction\" });\n\n const placeholder = () =>\n local.placeholder ?? contextPlaceholder ?? stringFormatter().format(\"selectPlaceholder\");\n\n const renderValues = createMemo<SelectValueRenderProps<T>>(() => {\n const collection = state.collection();\n const selectedItem =\n state.selectedKey() == null ? null : collection.getItem(state.selectedKey() as Key);\n const selectedKeys = state.selectedKeys();\n const selectedItems =\n selectedKeys === \"all\"\n ? Array.from(collection)\n : Array.from(selectedKeys as Set<Key>)\n .map((key) => collection.getItem(key))\n .filter((item): item is CollectionNode<T> => item != null);\n const selectedText =\n state.selectionMode() === \"multiple\"\n ? selectedItems.length > 0\n ? listFormatter().format(selectedItems.map((item) => item.textValue))\n : null\n : (selectedItem?.textValue ?? null);\n return {\n selectedItem,\n selectedItems,\n selectedText,\n isSelected:\n state.selectionMode() === \"multiple\" ? selectedItems.length > 0 : selectedItem != null,\n placeholder: placeholder(),\n };\n });\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children ?? defaultSelectValueChildren;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Select-value\",\n },\n renderValues,\n );\n\n return (\n <span\n {...domProps}\n {...valueProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-placeholder={dataAttr(!renderValues().isSelected)}\n >\n {props.children == null\n ? (renderValues().selectedText ?? renderValues().placeholder ?? \"\")\n : renderProps.renderChildren()}\n </span>\n );\n}\n\n/**\n * The listbox popup for a select.\n */\nexport function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {\n const [local, domProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"children\",\n \"renderEmptyState\",\n \"onLoadMore\",\n \"isLoading\",\n \"renderLoadMore\",\n \"loadMoreClass\",\n \"isInPopover\",\n ]);\n\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error(\"SelectListBox must be used within a Select\");\n }\n const { menuProps, rootRef, state: selectState, isOpen } = context;\n const state = selectState as SelectState<T>;\n\n createTrackedEffect(() => {\n if (!isOpen()) {\n return;\n }\n // On open the listbox takes collection focus. Upstream `useSelect` sets\n // `menuProps.autoFocus = state.focusStrategy || true`, so the ListBox's\n // `useSelectableCollection` auto-focuses on mount — setting the selection\n // manager's `isFocused` true and focusing the selected option. Our\n // `createListBox` reimplements keyboard nav inline (no `autoFocus` effect),\n // so we set the manager focus here to match. Without it the selected option\n // never paints its focus-visible background (`data-focused` stays unset).\n state.selectionManager.setFocused(true);\n if (state.focusedKey() != null) {\n return;\n }\n const selectedKey = state.selectedKey();\n if (selectedKey != null && !state.collection().getItem(selectedKey)?.isDisabled) {\n state.setFocusedKey(selectedKey);\n }\n });\n\n let listBoxRef: HTMLDivElement | undefined;\n const [listBoxEl, setListBoxEl] = createSignal<HTMLDivElement | null>(null, {\n ownedWrite: true,\n });\n // RAC Picker's list is a ListBox under Virtualizer, so CollectionRoot wraps\n // every row in VirtualizerItem and ListLayout insets it (`padding: 8`). Same\n // wiring as ComboBoxListBox; without it the rows stack in flow, edge to edge.\n const CollectionRoot = useCollectionRoot<unknown>();\n const isVirtualized = () => parentCollectionRenderer?.isVirtualized === true;\n\n createInteractOutside({\n ref: () => rootRef() ?? listBoxRef ?? null,\n onInteractOutside: () => {\n if (isOpen()) {\n state.close();\n }\n },\n get isDisabled() {\n return !isOpen() || local.isInPopover === true;\n },\n });\n\n // Keep the hook result intact — destructuring `{ listBoxProps }` invokes the\n // `get listBoxProps()` getter ONCE and freezes it (the Solid \"destructuring a\n // get-prop freezes reactivity\" gotcha). The listbox `tabIndex` is computed from\n // `focusedKey` (`focusedKey != null ? -1 : 0`); on open the effect above sets a\n // focused key, so a frozen snapshot would leave the listbox tabbable (`0`) when\n // upstream flips it to `-1`. Reading `listBoxHook.listBoxProps` per access keeps\n // it reactive.\n const parentCollectionRenderer = useCollectionRenderer<unknown>();\n const listBoxHook = createListBox(\n {\n ...(menuProps as unknown as AriaListBoxProps),\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n // Upstream useSelect keeps Escape for closing the popup even though a\n // multiple Select may toggle its final selected option off.\n disallowEmptySelection: true,\n shouldSelectOnFocus: local.isInPopover === true ? false : undefined,\n get isDisabled() {\n return state.isDisabled;\n },\n get isVirtualized() {\n return parentCollectionRenderer?.isVirtualized;\n },\n },\n createSelectListStateAdapter(state),\n );\n\n const {\n isFocused: isListBoxFocused,\n isFocusVisible: isListBoxFocusVisible,\n focusProps: listBoxFocusProps,\n } = createFocusRing();\n\n const renderValues = createMemo<SelectListBoxRenderProps>(() => ({\n // RAC ListBox.tsx:366 — data-focused comes from useFocusRing on the listbox\n // element, not the selection manager.\n isFocused: isListBoxFocused(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Select-listbox\",\n },\n renderValues,\n );\n\n const cleanMenuProps = () => {\n const { ref: _ref1, ...rest } = menuProps as Record<string, unknown>;\n return rest;\n };\n const cleanListBoxProps = () => {\n const {\n ref: _ref2,\n \"aria-activedescendant\": _activeDescendant,\n onFocus: _onFocus,\n ...rest\n } = listBoxHook.listBoxProps as Record<string, unknown>;\n // Faithful Select listbox focus model: the focused option receives REAL DOM\n // focus (the open effect above + `createSelectableItem`'s self-focus move\n // `document.activeElement` onto it), mirroring upstream `useSelect`. So the\n // listbox must (a) leave the tab sequence once an option is focused —\n // `useSelectableCollection` uses `tabIndex = focusedKey == null ? 0 : -1`\n // (useSelectableCollection.ts:687-690) — and (b) NOT expose\n // `aria-activedescendant`, which is the virtual-focus channel upstream Select\n // never uses. These are overridden here, not in the shared `createListBox`,\n // because the standalone `ListBox` keeps its container-focus model (focus\n // stays on the listbox, `aria-activedescendant` is its AT channel).\n //\n // We also drop `createListBox`'s container-focus TRAMPOLINE (`onFocus`): it\n // marshals the first key when the container is focused with `focusedKey ==\n // null`, which is exactly Select's deliberate click-open state (the open\n // effect sets `isFocused` true but leaves `focusedKey` null when nothing is\n // selected, so the first arrow enters the first item). Upstream's own\n // trampoline no-ops in this case because it guards on `manager.isFocused`\n // (already true); our shared guard uses `focusedKey == null` for the\n // standalone ListBox, so we strip it here to preserve Select's faithful\n // model. (Auto-selecting on focus under replace behavior would also toggle\n // the first item selected on open — the bug this override prevents.)\n return {\n ...rest,\n tabindex: state.isDisabled ? undefined : state.focusedKey() != null ? -1 : 0,\n };\n };\n const cleanListBoxFocusProps = () => {\n const { ref: _ref3, ...rest } = listBoxFocusProps as Record<string, unknown>;\n return rest;\n };\n\n const items = () => Array.from(state.collection());\n createTrackedEffect(() => {\n if (!isOpen()) return;\n const focusedKey = state.focusedKey();\n if (focusedKey == null) return;\n // Overlay non-keyboard-open: keep manager `isFocused` + selected `focusedKey`\n // (roving tabindex / `data-focused`) but do not `focusSafely` the option.\n // Keyboard-open must hand real focus to that option for subsequent navigation.\n if (local.isInPopover === true && getInteractionModality() !== \"keyboard\") return;\n\n queueMicrotask(() => {\n const option = Array.from(\n listBoxRef?.querySelectorAll<HTMLElement>(\"[role='option']\") ?? [],\n ).find((element) => element.id === String(focusedKey));\n if (option && document.activeElement !== option) {\n focusSafely(option);\n }\n });\n });\n\n const listBox = () => (\n // Upstream RAC ListBox (and our own Menu.tsx) render a `<div role=\"listbox\">`\n // over `<div role=\"option\">` rows, NOT `<ul>`/`<li>` — the collection is\n // div-based for virtualization parity. `<ul>`/`<li>` here was a self-inflicted\n // structural divergence surfaced by the Picker recertification (D5/D6/D8 saw\n // `li[option]`/`ul[listbox]` where the React oracle sees `div`).\n <SelectListBoxInPopoverContext value={local.isInPopover === true}>\n <div\n ref={(el) => {\n listBoxRef = el;\n setListBoxEl(el);\n }}\n {...domProps}\n {...cleanMenuProps()}\n {...cleanListBoxProps()}\n {...cleanListBoxFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={dataAttr(isListBoxFocused())}\n data-focus-visible={dataAttr(isListBoxFocusVisible())}\n data-empty={dataAttr(state.collection().size === 0)}\n data-layout=\"stack\"\n data-orientation=\"vertical\"\n >\n <CollectionRoot collection={items()} scrollRef={() => listBoxEl()}>\n <Show\n when={local.children}\n fallback={\n <For each={items()}>\n {(node, index) => {\n const item = <SelectOption id={node.key}>{node.textValue}</SelectOption>;\n return isVirtualized() ? (\n <VirtualizerItem index={index()}>{item}</VirtualizerItem>\n ) : (\n item\n );\n }}\n </For>\n }\n >\n <For each={items()}>\n {(node, index) => {\n const child = node.value != null ? local.children!(node.value) : null;\n return isVirtualized() ? (\n <VirtualizerItem index={index()}>{child}</VirtualizerItem>\n ) : (\n child\n );\n }}\n </For>\n </Show>\n </CollectionRoot>\n {state.collection().size === 0 && local.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }} data-empty-state>\n {local.renderEmptyState()}\n </div>\n ) : null}\n <Show when={local.onLoadMore}>\n <ListBoxLoadMoreItem\n onLoadMore={local.onLoadMore!}\n isLoading={local.isLoading}\n class={local.loadMoreClass}\n >\n {local.renderLoadMore?.()}\n </ListBoxLoadMoreItem>\n </Show>\n </div>\n </SelectListBoxInPopoverContext>\n );\n\n return (\n <Show when={isOpen()}>\n <Show\n when={local.isInPopover}\n fallback={\n <FocusScope restoreFocus autoFocus>\n {listBox()}\n </FocusScope>\n }\n >\n {listBox()}\n </Show>\n </Show>\n );\n}\n\n/**\n * An option in a select listbox.\n */\nexport function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"id\",\n \"item\",\n \"textValue\",\n \"ref\",\n ]);\n\n const context = useContext(SelectStateContext);\n if (!context) {\n throw new Error(\"SelectOption must be used within a Select\");\n }\n const state = context as SelectState<T>;\n const selectContext = useContext(SelectContext) as SelectContextValue<T> | null;\n const [ref, setRefSignal] = createSignal<HTMLDivElement | null>(null);\n const setRef = (el: HTMLDivElement | null) => {\n setRefSignal(el);\n assignRef(local.ref, el as HTMLDivElement);\n };\n\n // SelectOption allocates its own list-state adapter, so `createOption` cannot\n // find `isVirtualized` in the listbox data keyed by SelectListBox's adapter\n // (RAC reads it from `listData`, useOption.ts:130-131). Pass it explicitly\n // from the same CollectionRenderer a parent Virtualizer publishes.\n const parentCollectionRenderer = useCollectionRenderer<unknown>();\n const isInPopover = useContext(SelectListBoxInPopoverContext);\n const optionAria = createOption<T>(\n {\n key: local.id,\n get focus() {\n return ariaProps.focus ?? (isInPopover ? noopOptionFocus : undefined);\n },\n get isVirtualized() {\n return parentCollectionRenderer?.isVirtualized;\n },\n get isDisabled() {\n return Boolean(ariaProps.isDisabled || selectContext?.isDisabled());\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n get onHoverStart() {\n return ariaProps.onHoverStart;\n },\n get onHoverEnd() {\n return ariaProps.onHoverEnd;\n },\n get onHoverChange() {\n return ariaProps.onHoverChange;\n },\n },\n {\n ...createSelectListStateAdapter(state),\n select: (key: Key) => {\n if (state.selectionMode() === \"multiple\") {\n const keys = state.selectedKeys();\n if (keys === \"all\") return;\n state.setSelectedKeys(new Set([...keys, key]));\n return;\n }\n state.setSelectedKey(key);\n state.close();\n },\n toggleSelection: (key: Key) => {\n if (state.selectionMode() === \"multiple\") {\n const keys = state.selectedKeys();\n if (keys === \"all\") return;\n const next = new Set(keys);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n state.setSelectedKeys(next);\n return;\n }\n state.setSelectedKey(key);\n state.close();\n },\n replaceSelection: (key: Key) => {\n state.setSelectedKey(key);\n if (state.selectionMode() !== \"multiple\") {\n state.close();\n }\n },\n },\n () => ref(),\n );\n const isOptionFocusVisible = () =>\n // RAC useOption: the option's own ring, not the trigger's, which blurs\n // once the option takes focus.\n optionAria.isFocusVisible();\n\n const renderValues = createMemo<SelectOptionRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: isOptionFocusVisible(),\n isPressed: optionAria.isPressed(),\n isHovered: optionAria.isHovered(),\n isDisabled: optionAria.isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Select-option\",\n },\n renderValues,\n );\n const selectionIndicatorContext = createMemo<SelectionIndicatorContextValue>(() => ({\n isSelected: optionAria.isSelected,\n }));\n\n const cleanOptionProps = () => {\n const { ref: _ref1, ...rest } = optionAria.optionProps as Record<string, unknown>;\n const onClick = rest.onClick as ((event: MouseEvent) => void) | undefined;\n rest.onClick = ((event: MouseEvent) => {\n const wasSelected = optionAria.isSelected();\n onClick?.(event);\n if (typeof PointerEvent === \"undefined\") {\n return;\n }\n queueMicrotask(() => {\n if (state.selectionMode() !== \"multiple\" || optionAria.isSelected() === wasSelected) {\n selectOption();\n }\n });\n }) as JSX.EventHandler<HTMLDivElement, MouseEvent>;\n return rest;\n };\n\n const optionTextSlots = {\n slots: {\n get [DEFAULT_SLOT]() {\n return optionAria.labelProps;\n },\n get label() {\n return optionAria.labelProps;\n },\n get description() {\n return optionAria.descriptionProps;\n },\n },\n };\n\n createRenderEffect(\n () => ({\n el: ref(),\n labelId: optionAria.labelProps.id,\n descriptionId: optionAria.descriptionProps.id,\n }),\n ({ el, labelId, descriptionId }) => {\n if (!el) return;\n if (labelId) {\n const label = el.querySelector(\"[slot='label']\");\n if (label && !label.id) label.id = labelId;\n }\n if (descriptionId) {\n const description = el.querySelector(\"[slot='description']\");\n if (description && !description.id) description.id = descriptionId;\n }\n },\n );\n const selectOption = () => {\n if (optionAria.isDisabled()) {\n return;\n }\n if (state.selectionMode() === \"multiple\") {\n const keys = state.selectedKeys();\n if (keys === \"all\") return;\n const next = new Set(keys);\n if (next.has(local.id)) next.delete(local.id);\n else next.add(local.id);\n state.setSelectedKeys(next);\n return;\n }\n state.setSelectedKey(local.id);\n state.close();\n };\n\n return (\n <SelectionIndicatorContext value={selectionIndicatorContext()}>\n {/* `<div role=\"option\">`, not `<li>` — see the SelectListBox note; upstream\n RAC options are div-based. */}\n <div\n ref={setRef}\n {...cleanOptionProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(optionAria.isSelected())}\n data-focused={dataAttr(optionAria.isFocused())}\n data-focus-visible={dataAttr(isOptionFocusVisible())}\n data-pressed={dataAttr(optionAria.isPressed())}\n data-hovered={dataAttr(optionAria.isHovered())}\n data-disabled={dataAttr(optionAria.isDisabled())}\n data-selection-mode={state.selectionMode()}\n >\n <Provider values={[[TextContext, optionTextSlots] as [Context<unknown>, unknown]]}>\n <OptionContent\n render={renderProps.renderChildrenStable}\n labelProps={optionAria.labelProps}\n />\n </Provider>\n </div>\n </SelectionIndicatorContext>\n );\n}\n\nfunction isObjectRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\nfunction toKey(value: unknown): Key | undefined {\n if (typeof value === \"string\" || typeof value === \"number\") {\n return value;\n }\n return undefined;\n}\n\nfunction toTextValue(value: unknown): string | undefined {\n if (typeof value === \"string\" || typeof value === \"number\") {\n return String(value);\n }\n return undefined;\n}\n\nfunction createSelectListStateAdapter<T>(state: SelectState<T>): ListState<T> {\n const selectedKeys = createMemo(() => {\n const keys = state.selectedKeys();\n return keys === \"all\" ? new Set(Array.from(state.collection()).map((item) => item.key)) : keys;\n });\n\n const disabledKeys = createMemo(() => {\n const keys = new Set<Key>();\n for (const node of state.collection()) {\n if (node.isDisabled) keys.add(node.key);\n }\n return keys;\n });\n\n return {\n collection: state.collection,\n selectionManager: state.selectionManager,\n // Collection-level focus (the selection manager's), not the select-level\n // trigger focus — upstream listbox internals only ever read\n // state.selectionManager.isFocused.\n isFocused: () => state.selectionManager.isFocused,\n setFocused: (isFocused) => state.selectionManager.setFocused(isFocused),\n focusedKey: state.focusedKey,\n setFocusedKey: (key) => state.setFocusedKey(key ?? null),\n childFocusStrategy: () => null,\n selectionMode: () => state.selectionManager.selectionMode,\n selectionBehavior: () => state.selectionManager.selectionBehavior,\n disallowEmptySelection: () => state.selectionManager.disallowEmptySelection,\n selectedKeys,\n disabledKeys,\n disabledBehavior: () => \"all\",\n isEmpty: () => selectedKeys().size === 0,\n isSelectAll: () => state.selectedKeys() === \"all\",\n isSelected: (key) => selectedKeys().has(key),\n isDisabled: state.isKeyDisabled,\n setSelectionBehavior: (behavior) => state.selectionManager.setSelectionBehavior(behavior),\n toggleSelection: (key) => state.selectionManager.toggleSelection(key),\n replaceSelection: (key) => state.selectionManager.replaceSelection(key),\n setSelectedKeys: (keys) => state.selectionManager.setSelectedKeys(keys),\n selectAll: () => state.selectionManager.selectAll(),\n clearSelection: () => state.selectionManager.clearSelection(),\n toggleSelectAll: () => state.selectionManager.toggleSelectAll(),\n extendSelection: (toKey) => state.selectionManager.extendSelection(toKey),\n select: (key, event) => state.selectionManager.select(key, event),\n };\n}\n\nSelect.Trigger = SelectTrigger;\nSelect.Value = SelectValue;\nSelect.ListBox = SelectListBox;\nSelect.Option = SelectOption;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2FA,SAASA,YAAa,KAAiB,IAAa;CAClD,IAAI,CAAC,KAAK;CACV,IAAI,OAAO,QAAQ,YACjB,IAAI,EAAE;MAEN,IAAI,UAAU;AAElB;AAEA,SAAS,0BAA0B,QAAgE;CACjG,OAAO;EACL,WAAW,CAAC,OAAO,SAAS;EAC5B,mBAAmB;GACjB,UAAU,OAAO,SAAS;GAC1B,aAAa,OAAO,SAAS;GAC7B,iBAAiB,OAAO,SAAS;GACjC,eAAe,OAAO,SAAS;GAC/B,gBAAgB,OAAO,SAAS;GAChC,cAAc,OAAO,SAAS;GAC9B,SAAS,OAAO,SAAS;GACzB,UAAU,OAAO,SAAS;GAC1B,cAAc,OAAO,SAAS;GAC9B,cAAc,OAAO,SAAS;GAC9B,OAAO,OAAO,SAAS;EACzB;EACA,kBAAkB,OAAO,oBAAoB,CAAC,OAAO,iBAAiB,IAAI,CAAC;CAC7E;AACF;AAsMA,MAAa,gBAAgB,cAAkD,IAAI;AACnF,MAAa,qBAAqB,cAA2C,IAAI;AACjF,MAAa,qBAAqB;;AAGlC,MAAM,gCAAgC,cAAc,KAAK;AAEzD,SAAS,kBAAkB,CAAC;AAE5B,MAAM,uCAAuB,IAAI,IAAI;CACnC;CACA;CACA;CACA;AACF,CAAC;;;;AAKD,SAAgB,OAAU,OAAoC;CAE5D,MAAM,mBADgB,WAAW,aACI,CAAC,EAAE,QACtC,OAAO,MAAM,SAAS,WAAW,MAAM,OAAO;CAEhD,MAAM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BAAmB,QAAQ,MAAM,iBAAiB,iBAAiB,GAAG;EACtE,kBAAkB,SAAS,MAAM,iBAAiB,gBAAgB,IAAI;EACtE,iBAAiB,MAAM,iBAAiB,UAAU;EAClD,sBAAsB,MAAM,iBAAiB,eAAe;EAC5D,uBAAuB,MAAM,iBAAiB,gBAAgB;EAC9D,kBAAkB,UAAU,MAAM,iBAAiB,gBAAgB,KAAK;EACxE,SAAS,KAAK,UAAU,MAAM,iBAAiB,OAAO,KAAK,KAAK;CAClE;AACF;AAEA,OAAO,UAAU;AACjB,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,SAAS"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Shared SelectionIndicator primitive for selected collection items.
|
|
3
|
-
*/
|
|
4
|
-
import { type JSX } from "solid-js";
|
|
1
|
+
import type { JSX } from "@solidjs/web";
|
|
5
2
|
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
6
3
|
export interface SelectionIndicatorContextValue {
|
|
7
4
|
isSelected: () => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionIndicator.d.ts","sourceRoot":"","sources":["../src/SelectionIndicator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectionIndicator.d.ts","sourceRoot":"","sources":["../src/SelectionIndicator.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAIjB,MAAM,WAAW,8BAA8B;IAC7C,UAAU,EAAE,MAAM,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,yBAAyB,mEAA6D,CAAC;AAEpG,MAAM,WAAW,6BAA6B;IAC5C,2CAA2C;IAC3C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,uBACf,SAAQ,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;IAC5F,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,cAAc,CAAC,6BAA6B,CAAC,CAAC;IACzD,yCAAyC;IACzC,KAAK,CAAC,EAAE,mBAAmB,CAAC,6BAA6B,CAAC,CAAC;IAC3D,wCAAwC;IACxC,KAAK,CAAC,EAAE,eAAe,CAAC,6BAA6B,CAAC,CAAC;CACxD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAmE9E"}
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 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/SelectionIndicator.tsx
|
|
13
|
+
import { dataAttr, useRenderProps } from "./utils.js";
|
|
2
14
|
import { SharedElement, useHasSharedElementTransitionScope } from "./SharedElementTransition.js";
|
|
3
|
-
import { createComponent, getNextElement, insert, mergeProps, runHydrationEvents, spread, template } from "
|
|
4
|
-
import { Show, createContext, createMemo,
|
|
15
|
+
import { createComponent, getNextElement, insert, mergeProps, runHydrationEvents, scope, spread, template } from "@solidjs/web";
|
|
16
|
+
import { Show, createContext, createMemo, useContext } from "solid-js";
|
|
17
|
+
import { splitProps } from "@proyecto-viviana/solidaria/utils";
|
|
5
18
|
//#region src/SelectionIndicator.tsx
|
|
6
19
|
/**
|
|
7
20
|
* Shared SelectionIndicator primitive for selected collection items.
|
|
21
|
+
* Based on packages/react-aria-components/src/SelectionIndicator.tsx.
|
|
8
22
|
*/
|
|
9
|
-
var _tmpl$ =
|
|
23
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
10
24
|
const SelectionIndicatorContext = createContext(null);
|
|
11
25
|
/**
|
|
12
26
|
* SelectionIndicator renders when its parent item is selected.
|
|
@@ -43,14 +57,14 @@ function SelectionIndicator(props) {
|
|
|
43
57
|
return isVisible();
|
|
44
58
|
},
|
|
45
59
|
"aria-hidden": "true",
|
|
46
|
-
get
|
|
60
|
+
get "class"() {
|
|
47
61
|
return renderProps.class();
|
|
48
62
|
},
|
|
49
63
|
get style() {
|
|
50
64
|
return renderProps.style();
|
|
51
65
|
},
|
|
52
|
-
get
|
|
53
|
-
return isSelected()
|
|
66
|
+
get "data-selected"() {
|
|
67
|
+
return dataAttr(isSelected());
|
|
54
68
|
},
|
|
55
69
|
get children() {
|
|
56
70
|
return renderProps.renderChildren();
|
|
@@ -62,19 +76,21 @@ function SelectionIndicator(props) {
|
|
|
62
76
|
},
|
|
63
77
|
get children() {
|
|
64
78
|
var _el$ = getNextElement(_tmpl$);
|
|
65
|
-
spread(_el$,
|
|
79
|
+
spread(_el$, [domProps, {
|
|
66
80
|
"aria-hidden": "true",
|
|
67
|
-
get
|
|
81
|
+
get "class"() {
|
|
68
82
|
return renderProps.class();
|
|
69
83
|
},
|
|
70
84
|
get style() {
|
|
71
85
|
return renderProps.style();
|
|
72
86
|
},
|
|
73
|
-
get
|
|
74
|
-
return isSelected()
|
|
87
|
+
get "data-selected"() {
|
|
88
|
+
return dataAttr(isSelected());
|
|
75
89
|
}
|
|
76
|
-
}
|
|
77
|
-
insert(_el$, () =>
|
|
90
|
+
}], true);
|
|
91
|
+
insert(_el$, scope(() => {
|
|
92
|
+
return renderProps.renderChildren();
|
|
93
|
+
}));
|
|
78
94
|
runHydrationEvents();
|
|
79
95
|
return _el$;
|
|
80
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionIndicator.js","names":["
|
|
1
|
+
{"version":3,"file":"SelectionIndicator.js","names":["<SharedElement\n {...sharedElementProps()}\n name=\"SelectionIndicator\"\n isVisible={isVisible()}\n aria-hidden=\"true\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(isSelected())}\n >\n {renderProps.renderChildren()}\n </SharedElement>","name=\"SelectionIndicator\"","<Show when={isVisible()}>\n <span\n {...domProps}\n aria-hidden=\"true\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(isSelected())}\n >\n {renderProps.renderChildren()}\n </span>\n </Show>","{renderProps.renderChildren()}","<span\n {...domProps}\n aria-hidden=\"true\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(isSelected())}\n >\n {renderProps.renderChildren()}\n </span>"],"sources":["../src/SelectionIndicator.tsx"],"sourcesContent":["/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/SelectionIndicator.tsx\n\n/**\n * Shared SelectionIndicator primitive for selected collection items.\n * Based on packages/react-aria-components/src/SelectionIndicator.tsx.\n */\n\nimport { createContext, createMemo, useContext, Show } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n} from \"./utils\";\nimport { SharedElement, useHasSharedElementTransitionScope } from \"./SharedElementTransition\";\nimport { splitProps } from \"@proyecto-viviana/solidaria/utils\";\n\nexport interface SelectionIndicatorContextValue {\n isSelected: () => boolean;\n}\n\nexport const SelectionIndicatorContext = createContext<SelectionIndicatorContextValue | null>(null);\n\nexport interface SelectionIndicatorRenderProps {\n /** Whether the parent item is selected. */\n isSelected: boolean;\n}\n\nexport interface SelectionIndicatorProps\n extends SlotProps, Omit<JSX.HTMLAttributes<HTMLSpanElement>, \"class\" | \"style\" | \"children\"> {\n /** Optional controlled selected state override. */\n isSelected?: boolean;\n /** Whether to keep mounted when not selected. */\n shouldForceMount?: boolean;\n /** The children content. */\n children?: RenderChildren<SelectionIndicatorRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectionIndicatorRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectionIndicatorRenderProps>;\n}\n\n/**\n * SelectionIndicator renders when its parent item is selected.\n */\nexport function SelectionIndicator(props: SelectionIndicatorProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\n \"isSelected\",\n \"shouldForceMount\",\n \"children\",\n \"class\",\n \"style\",\n \"slot\",\n ]);\n\n const context = useContext(SelectionIndicatorContext);\n const hasSharedElementScope = useHasSharedElementTransitionScope();\n const isSelected = () => local.isSelected ?? context?.isSelected() ?? false;\n const isVisible = () => local.shouldForceMount || isSelected();\n\n const renderValues = createMemo<SelectionIndicatorRenderProps>(() => ({\n isSelected: isSelected(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return local.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-SelectionIndicator\",\n },\n renderValues,\n );\n\n const sharedElementProps = createMemo(() => {\n const { ref: _ref, ...rest } = domProps as JSX.HTMLAttributes<HTMLSpanElement> & {\n ref?: unknown;\n };\n return rest;\n });\n\n if (hasSharedElementScope) {\n return (\n <SharedElement\n {...sharedElementProps()}\n name=\"SelectionIndicator\"\n isVisible={isVisible()}\n aria-hidden=\"true\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(isSelected())}\n >\n {renderProps.renderChildren()}\n </SharedElement>\n );\n }\n\n return (\n <Show when={isVisible()}>\n <span\n {...domProps}\n aria-hidden=\"true\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(isSelected())}\n >\n {renderProps.renderChildren()}\n </span>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAa,4BAA4B,cAAqD,IAAI;;;;AAwBlG,SAAgB,mBAAmB,OAA6C;CAC9E,MAAM,CAAC,OAAO,YAAY,WAAW,OAAO;EAC1C;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,UAAU,WAAW,yBAAyB;CACpD,MAAM,wBAAwB,mCAAmC;CACjE,MAAM,mBAAmB,MAAM,cAAc,SAAS,WAAW,KAAK;CACtE,MAAM,kBAAkB,MAAM,oBAAoB,WAAW;CAE7D,MAAM,eAAe,kBAAiD,EACpE,YAAY,WAAW,EACzB,EAAE;CAEF,MAAM,cAAc,eAClB;EACE,IAAI,WAAW;GACb,OAAO,MAAM;EACf;EACA,OAAO,MAAM;EACb,OAAO,MAAM;EACb,kBAAkB;CACpB,GACA,YACF;CAEA,MAAM,qBAAqB,iBAAiB;EAC1C,MAAM,EAAE,KAAK,MAAM,GAAG,SAAS;EAG/B,OAAO;CACT,CAAC;CAED,IAAI,uBACF,OACEA,gBAAAA,eAAAA,WACM,oBADN;EAEEC,MAAK;EACL,IAAA,YAAA;GAAW,OAAA,UAAU;EAAC;EACtB,eAAY;EACZ,IAAA,UAAA;GAAO,OAAA,YAAY,MAAM;EAAC;EAC1B,IAAA,QAAA;GAAO,OAAA,YAAY,MAAM;EAAC;EAC1B,IAAA,kBAAA;GAAe,OAAA,SAAS,WAAW,CAAC;EAAC;EAPvC,IAAA,WAAA;GASG,OAAA,YAAY,eAAe;EACf;;CAInB,OACEC,gBAAAA,MAAAA;EAAM,IAAA,OAAA;GAAM,OAAA,UAAU;EAAC;EAAvB,IAAA,WAAA;GACE,IAAA,OAAA,eAAA,MAQM;GAPA,OAAA,MAAA,CAAA,UAAA;IACJ,eAAA;IACA,IAAA,UAAA;KAAO,OAAA,YAAY,MAAM;IAAC;IAC1B,IAAA,QAAA;KAAO,OAAA,YAAY,MAAM;IAAC;IAC1B,IAAA,kBAAA;KAAe,OAAA,SAAS,WAAW,CAAC;IAAC;;GALvC,OAAA,MAOEC,YAAAA;IAAC,OAAA,YAAY,eAAe;GAAC,CAAA,CACzB;GARN,mBAQM;GATR,OACEC;EASI;;AAEV"}
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 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/SelectionIndicator.tsx
|
|
13
|
+
import { dataAttr, useRenderProps } from "./utils.jsx";
|
|
2
14
|
import { SharedElement, useHasSharedElementTransitionScope } from "./SharedElementTransition.jsx";
|
|
3
|
-
import { Show, createContext, createMemo,
|
|
15
|
+
import { Show, createContext, createMemo, useContext } from "solid-js";
|
|
16
|
+
import { splitProps } from "@proyecto-viviana/solidaria/utils";
|
|
4
17
|
//#region src/SelectionIndicator.tsx
|
|
5
18
|
/**
|
|
6
19
|
* Shared SelectionIndicator primitive for selected collection items.
|
|
20
|
+
* Based on packages/react-aria-components/src/SelectionIndicator.tsx.
|
|
7
21
|
*/
|
|
8
22
|
const SelectionIndicatorContext = createContext(null);
|
|
9
23
|
/**
|
|
@@ -35,11 +49,11 @@ function SelectionIndicator(props) {
|
|
|
35
49
|
const { ref: _ref, ...rest } = domProps;
|
|
36
50
|
return rest;
|
|
37
51
|
});
|
|
38
|
-
if (hasSharedElementScope) return <SharedElement {...sharedElementProps()} name="SelectionIndicator" isVisible={isVisible()} aria-hidden="true" class={renderProps.class()} style={renderProps.style()} data-selected={isSelected()
|
|
52
|
+
if (hasSharedElementScope) return <SharedElement {...sharedElementProps()} name="SelectionIndicator" isVisible={isVisible()} aria-hidden="true" class={renderProps.class()} style={renderProps.style()} data-selected={dataAttr(isSelected())}>
|
|
39
53
|
{renderProps.renderChildren()}
|
|
40
54
|
</SharedElement>;
|
|
41
55
|
return <Show when={isVisible()}>
|
|
42
|
-
<span {...domProps} aria-hidden="true" class={renderProps.class()} style={renderProps.style()} data-selected={isSelected()
|
|
56
|
+
<span {...domProps} aria-hidden="true" class={renderProps.class()} style={renderProps.style()} data-selected={dataAttr(isSelected())}>
|
|
43
57
|
{renderProps.renderChildren()}
|
|
44
58
|
</span>
|
|
45
59
|
</Show>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionIndicator.jsx","names":[],"sources":["../src/SelectionIndicator.tsx"],"sourcesContent":["/**\n * Shared SelectionIndicator primitive for selected collection items.\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"SelectionIndicator.jsx","names":[],"sources":["../src/SelectionIndicator.tsx"],"sourcesContent":["/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/SelectionIndicator.tsx\n\n/**\n * Shared SelectionIndicator primitive for selected collection items.\n * Based on packages/react-aria-components/src/SelectionIndicator.tsx.\n */\n\nimport { createContext, createMemo, useContext, Show } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n} from \"./utils\";\nimport { SharedElement, useHasSharedElementTransitionScope } from \"./SharedElementTransition\";\nimport { splitProps } from \"@proyecto-viviana/solidaria/utils\";\n\nexport interface SelectionIndicatorContextValue {\n isSelected: () => boolean;\n}\n\nexport const SelectionIndicatorContext = createContext<SelectionIndicatorContextValue | null>(null);\n\nexport interface SelectionIndicatorRenderProps {\n /** Whether the parent item is selected. */\n isSelected: boolean;\n}\n\nexport interface SelectionIndicatorProps\n extends SlotProps, Omit<JSX.HTMLAttributes<HTMLSpanElement>, \"class\" | \"style\" | \"children\"> {\n /** Optional controlled selected state override. */\n isSelected?: boolean;\n /** Whether to keep mounted when not selected. */\n shouldForceMount?: boolean;\n /** The children content. */\n children?: RenderChildren<SelectionIndicatorRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectionIndicatorRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectionIndicatorRenderProps>;\n}\n\n/**\n * SelectionIndicator renders when its parent item is selected.\n */\nexport function SelectionIndicator(props: SelectionIndicatorProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\n \"isSelected\",\n \"shouldForceMount\",\n \"children\",\n \"class\",\n \"style\",\n \"slot\",\n ]);\n\n const context = useContext(SelectionIndicatorContext);\n const hasSharedElementScope = useHasSharedElementTransitionScope();\n const isSelected = () => local.isSelected ?? context?.isSelected() ?? false;\n const isVisible = () => local.shouldForceMount || isSelected();\n\n const renderValues = createMemo<SelectionIndicatorRenderProps>(() => ({\n isSelected: isSelected(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return local.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-SelectionIndicator\",\n },\n renderValues,\n );\n\n const sharedElementProps = createMemo(() => {\n const { ref: _ref, ...rest } = domProps as JSX.HTMLAttributes<HTMLSpanElement> & {\n ref?: unknown;\n };\n return rest;\n });\n\n if (hasSharedElementScope) {\n return (\n <SharedElement\n {...sharedElementProps()}\n name=\"SelectionIndicator\"\n isVisible={isVisible()}\n aria-hidden=\"true\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(isSelected())}\n >\n {renderProps.renderChildren()}\n </SharedElement>\n );\n }\n\n return (\n <Show when={isVisible()}>\n <span\n {...domProps}\n aria-hidden=\"true\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(isSelected())}\n >\n {renderProps.renderChildren()}\n </span>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoCA,MAAa,4BAA4B,cAAqD,IAAI;;;;AAwBlG,SAAgB,mBAAmB,OAA6C;CAC9E,MAAM,CAAC,OAAO,YAAY,WAAW,OAAO;EAC1C;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,UAAU,WAAW,yBAAyB;CACpD,MAAM,wBAAwB,mCAAmC;CACjE,MAAM,mBAAmB,MAAM,cAAc,SAAS,WAAW,KAAK;CACtE,MAAM,kBAAkB,MAAM,oBAAoB,WAAW;CAE7D,MAAM,eAAe,kBAAiD,EACpE,YAAY,WAAW,EACzB,EAAE;CAEF,MAAM,cAAc,eAClB;EACE,IAAI,WAAW;GACb,OAAO,MAAM;EACf;EACA,OAAO,MAAM;EACb,OAAO,MAAM;EACb,kBAAkB;CACpB,GACA,YACF;CAEA,MAAM,qBAAqB,iBAAiB;EAC1C,MAAM,EAAE,KAAK,MAAM,GAAG,SAAS;EAG/B,OAAO;CACT,CAAC;CAED,IAAI,uBACF,OACE,CAAC,kBACK,mBAAmB,GACvB,0BACA,WAAW,UAAU,GACrB,mBACA,OAAO,YAAY,MAAM,GACzB,OAAO,YAAY,MAAM,GACzB,eAAe,SAAS,WAAW,CAAC,GACrC;SACE,YAAY,eAAe,EAAE;MAChC,EAAE;CAIN,OACE,CAAC,KAAK,MAAM,UAAU,GAAG;MACvB,CAAC,SACK,UACJ,mBACA,OAAO,YAAY,MAAM,GACzB,OAAO,YAAY,MAAM,GACzB,eAAe,SAAS,WAAW,CAAC,GACrC;SACE,YAAY,eAAe,EAAE;MAChC,EAAE,KAAK;IACT,EAAE;AAEN"}
|
package/dist/Separator.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Separator component for solidaria-components
|
|
3
|
-
*
|
|
4
|
-
* Pre-wired headless separator component that combines aria hooks.
|
|
5
|
-
* Port of react-aria-components/src/Separator.tsx
|
|
6
|
-
*/
|
|
7
|
-
import { type JSX } from "solid-js";
|
|
1
|
+
import type { JSX } from "@solidjs/web";
|
|
8
2
|
import { type AriaSeparatorProps, type Orientation } from "@proyecto-viviana/solidaria";
|
|
9
3
|
import { type SlotProps } from "./utils";
|
|
10
4
|
type RefLike<T> = ((el: T) => void) | {
|
package/dist/Separator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,SAAS,CAAC;AAGzD,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG,SAAS,CAAC;AAWzE,MAAM,WAAW,oBAAoB;IACnC,wCAAwC;IACxC,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,WAAW,cAAe,SAAQ,kBAAkB,EAAE,SAAS;IACnE,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,WAAW,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAC;IACjE,4FAA4F;IAC5F,KAAK,CAAC,EAAE,GAAG,CAAC,aAAa,GAAG,CAAC,CAAC,WAAW,EAAE,oBAAoB,KAAK,GAAG,CAAC,aAAa,CAAC,CAAC;IACvF,gDAAgD;IAChD,GAAG,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,mDAA6C,CAAC;AAE3E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAqE5D"}
|