@proyecto-viviana/solidaria-components 0.5.0 → 0.7.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-APACHE-2.0 +201 -0
- package/NOTICE +91 -0
- package/README.md +4 -7
- package/dist/ActionBar.d.ts +2 -10
- package/dist/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar.js +95 -59
- package/dist/ActionBar.js.map +1 -1
- package/dist/ActionBar.jsx +42 -15
- package/dist/ActionBar.jsx.map +1 -1
- package/dist/ActionGroup.d.ts +1 -12
- package/dist/ActionGroup.d.ts.map +1 -1
- package/dist/ActionGroup.js +66 -44
- package/dist/ActionGroup.js.map +1 -1
- package/dist/ActionGroup.jsx +25 -10
- package/dist/ActionGroup.jsx.map +1 -1
- package/dist/Alert.d.ts +4 -1
- package/dist/Alert.d.ts.map +1 -1
- package/dist/Alert.js +25 -17
- package/dist/Alert.js.map +1 -1
- package/dist/Alert.jsx +9 -5
- package/dist/Alert.jsx.map +1 -1
- package/dist/Autocomplete.d.ts +2 -9
- package/dist/Autocomplete.d.ts.map +1 -1
- package/dist/Autocomplete.js +18 -5
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Autocomplete.jsx +20 -7
- package/dist/Autocomplete.jsx.map +1 -1
- package/dist/Breadcrumbs.d.ts +2 -7
- package/dist/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs.js +71 -51
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Breadcrumbs.jsx +25 -12
- package/dist/Breadcrumbs.jsx.map +1 -1
- package/dist/Button.d.ts +1 -7
- package/dist/Button.d.ts.map +1 -1
- package/dist/Button.js +125 -72
- package/dist/Button.js.map +1 -1
- package/dist/Button.jsx +105 -43
- package/dist/Button.jsx.map +1 -1
- package/dist/Calendar.d.ts +1 -7
- package/dist/Calendar.d.ts.map +1 -1
- package/dist/Calendar.js +297 -221
- package/dist/Calendar.js.map +1 -1
- package/dist/Calendar.jsx +52 -32
- package/dist/Calendar.jsx.map +1 -1
- package/dist/CalendarPicker.d.ts +1 -10
- package/dist/CalendarPicker.d.ts.map +1 -1
- package/dist/CalendarPicker.js +12 -0
- package/dist/CalendarPicker.js.map +1 -1
- package/dist/CalendarPicker.jsx +12 -0
- package/dist/CalendarPicker.jsx.map +1 -1
- package/dist/Checkbox.d.ts +2 -7
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox.js +332 -270
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.jsx +70 -77
- package/dist/Checkbox.jsx.map +1 -1
- package/dist/Collection.d.ts +33 -7
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +128 -74
- package/dist/Collection.js.map +1 -1
- package/dist/Collection.jsx +46 -7
- package/dist/Collection.jsx.map +1 -1
- package/dist/Color.d.ts +15 -20
- package/dist/Color.d.ts.map +1 -1
- package/dist/Color.js +572 -334
- package/dist/Color.js.map +1 -1
- package/dist/Color.jsx +205 -85
- package/dist/Color.jsx.map +1 -1
- package/dist/ColorEditor.d.ts +3 -1
- package/dist/ColorEditor.d.ts.map +1 -1
- package/dist/ColorEditor.js +147 -124
- package/dist/ColorEditor.js.map +1 -1
- package/dist/ColorEditor.jsx +4 -1
- package/dist/ColorEditor.jsx.map +1 -1
- package/dist/ComboBox.d.ts +31 -10
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/ComboBox.js +539 -274
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBox.jsx +213 -70
- package/dist/ComboBox.jsx.map +1 -1
- package/dist/ContextualHelpTrigger.d.ts +1 -7
- package/dist/ContextualHelpTrigger.d.ts.map +1 -1
- package/dist/ContextualHelpTrigger.js +102 -72
- package/dist/ContextualHelpTrigger.js.map +1 -1
- package/dist/ContextualHelpTrigger.jsx +36 -16
- package/dist/ContextualHelpTrigger.jsx.map +1 -1
- package/dist/DateField.d.ts +2 -7
- package/dist/DateField.d.ts.map +1 -1
- package/dist/DateField.js +0 -2
- package/dist/DateField.jsx +0 -2
- package/dist/DateField2.js +194 -179
- package/dist/DateField2.js.map +1 -1
- package/dist/DateField2.jsx +58 -55
- package/dist/DateField2.jsx.map +1 -1
- package/dist/DatePicker.d.ts +7 -7
- package/dist/DatePicker.d.ts.map +1 -1
- package/dist/DatePicker.js +2 -2
- package/dist/DatePicker.jsx +2 -2
- package/dist/DatePicker2.js +357 -435
- package/dist/DatePicker2.js.map +1 -1
- package/dist/DatePicker2.jsx +109 -178
- package/dist/DatePicker2.jsx.map +1 -1
- package/dist/DateRangePickerContext.d.ts +7 -0
- package/dist/DateRangePickerContext.d.ts.map +1 -1
- package/dist/Dialog.d.ts +4 -9
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +168 -101
- package/dist/Dialog.js.map +1 -1
- package/dist/Dialog.jsx +75 -27
- package/dist/Dialog.jsx.map +1 -1
- package/dist/Disclosure.d.ts +1 -9
- package/dist/Disclosure.d.ts.map +1 -1
- package/dist/Disclosure.js +121 -79
- package/dist/Disclosure.js.map +1 -1
- package/dist/Disclosure.jsx +32 -19
- package/dist/Disclosure.jsx.map +1 -1
- package/dist/DragAndDrop.d.ts +9 -6
- package/dist/DragAndDrop.d.ts.map +1 -1
- package/dist/DragAndDrop.js +37 -22
- package/dist/DragAndDrop.js.map +1 -1
- package/dist/DragAndDrop.jsx +20 -4
- package/dist/DragAndDrop.jsx.map +1 -1
- package/dist/DragPreview.d.ts +1 -1
- package/dist/DragPreview.d.ts.map +1 -1
- package/dist/DropZone.d.ts +1 -7
- package/dist/DropZone.d.ts.map +1 -1
- package/dist/DropZone.js +74 -40
- package/dist/DropZone.js.map +1 -1
- package/dist/DropZone.jsx +24 -8
- package/dist/DropZone.jsx.map +1 -1
- package/dist/ElementTag.d.ts +9 -20
- package/dist/ElementTag.d.ts.map +1 -1
- package/dist/ElementTag.js +8 -210
- package/dist/ElementTag.js.map +1 -1
- package/dist/ElementTag.jsx +8 -57
- package/dist/ElementTag.jsx.map +1 -1
- package/dist/FieldError.d.ts +8 -7
- package/dist/FieldError.d.ts.map +1 -1
- package/dist/FieldError.js +33 -13
- package/dist/FieldError.js.map +1 -1
- package/dist/FieldError.jsx +20 -5
- package/dist/FieldError.jsx.map +1 -1
- package/dist/FileTrigger.d.ts +1 -7
- package/dist/FileTrigger.d.ts.map +1 -1
- package/dist/FileTrigger.js +30 -12
- package/dist/FileTrigger.js.map +1 -1
- package/dist/FileTrigger.jsx +15 -2
- package/dist/FileTrigger.jsx.map +1 -1
- package/dist/Focusable.d.ts +2 -8
- package/dist/Focusable.d.ts.map +1 -1
- package/dist/Focusable.js +23 -6
- package/dist/Focusable.js.map +1 -1
- package/dist/Focusable.jsx +22 -5
- package/dist/Focusable.jsx.map +1 -1
- package/dist/Form.d.ts +9 -8
- package/dist/Form.d.ts.map +1 -1
- package/dist/Form.js +66 -43
- package/dist/Form.js.map +1 -1
- package/dist/Form.jsx +36 -16
- package/dist/Form.jsx.map +1 -1
- package/dist/GridList.d.ts +5 -10
- package/dist/GridList.d.ts.map +1 -1
- package/dist/GridList.js +372 -243
- package/dist/GridList.js.map +1 -1
- package/dist/GridList.jsx +177 -99
- package/dist/GridList.jsx.map +1 -1
- package/dist/HiddenDateInput.d.ts +1 -7
- package/dist/HiddenDateInput.d.ts.map +1 -1
- package/dist/Icon.d.ts +4 -1
- package/dist/Icon.d.ts.map +1 -1
- package/dist/Icon.js +41 -37
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.jsx +7 -3
- package/dist/Icon.jsx.map +1 -1
- package/dist/Keyboard.d.ts +1 -7
- package/dist/Keyboard.d.ts.map +1 -1
- package/dist/Keyboard.js +24 -11
- package/dist/Keyboard.js.map +1 -1
- package/dist/Keyboard.jsx +15 -2
- package/dist/Keyboard.jsx.map +1 -1
- package/dist/Label.d.ts +20 -0
- package/dist/Label.d.ts.map +1 -0
- package/dist/Label.js +60 -0
- package/dist/Label.js.map +1 -0
- package/dist/Label.jsx +47 -0
- package/dist/Label.jsx.map +1 -0
- package/dist/Landmark.d.ts +4 -1
- package/dist/Landmark.d.ts.map +1 -1
- package/dist/Landmark.js +10 -4
- package/dist/Landmark.js.map +1 -1
- package/dist/Landmark.jsx +5 -1
- package/dist/Landmark.jsx.map +1 -1
- package/dist/Link.d.ts +2 -7
- package/dist/Link.d.ts.map +1 -1
- package/dist/Link.js +56 -36
- package/dist/Link.js.map +1 -1
- package/dist/Link.jsx +52 -10
- package/dist/Link.jsx.map +1 -1
- package/dist/ListBox.d.ts +17 -13
- package/dist/ListBox.d.ts.map +1 -1
- package/dist/ListBox.js +647 -348
- package/dist/ListBox.js.map +1 -1
- package/dist/ListBox.jsx +339 -236
- package/dist/ListBox.jsx.map +1 -1
- package/dist/ListDropTargetDelegate.d.ts +3 -0
- package/dist/ListDropTargetDelegate.d.ts.map +1 -1
- package/dist/Menu.d.ts +39 -30
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Menu.js +547 -368
- package/dist/Menu.js.map +1 -1
- package/dist/Menu.jsx +328 -230
- package/dist/Menu.jsx.map +1 -1
- package/dist/Meter.d.ts +6 -13
- package/dist/Meter.d.ts.map +1 -1
- package/dist/Meter.js +55 -18
- package/dist/Meter.js.map +1 -1
- package/dist/Meter.jsx +33 -8
- package/dist/Meter.jsx.map +1 -1
- package/dist/Modal.d.ts +1 -7
- package/dist/Modal.d.ts.map +1 -1
- package/dist/Modal.js +104 -56
- package/dist/Modal.js.map +1 -1
- package/dist/Modal.jsx +68 -38
- package/dist/Modal.jsx.map +1 -1
- package/dist/NumberField.d.ts +4 -7
- package/dist/NumberField.d.ts.map +1 -1
- package/dist/NumberField.js +243 -124
- package/dist/NumberField.js.map +1 -1
- package/dist/NumberField.jsx +115 -26
- package/dist/NumberField.jsx.map +1 -1
- package/dist/Popover.d.ts +15 -7
- package/dist/Popover.d.ts.map +1 -1
- package/dist/Popover.js +370 -181
- package/dist/Popover.js.map +1 -1
- package/dist/Popover.jsx +215 -82
- package/dist/Popover.jsx.map +1 -1
- package/dist/Pressable.d.ts +2 -8
- package/dist/Pressable.d.ts.map +1 -1
- package/dist/Pressable.js +23 -6
- package/dist/Pressable.js.map +1 -1
- package/dist/Pressable.jsx +22 -5
- package/dist/Pressable.jsx.map +1 -1
- package/dist/PreviewTrigger.d.ts +24 -0
- package/dist/PreviewTrigger.d.ts.map +1 -0
- package/dist/PreviewTrigger.js +128 -0
- package/dist/PreviewTrigger.js.map +1 -0
- package/dist/PreviewTrigger.jsx +117 -0
- package/dist/PreviewTrigger.jsx.map +1 -0
- package/dist/ProgressBar.d.ts +1 -7
- package/dist/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar.js +34 -14
- package/dist/ProgressBar.js.map +1 -1
- package/dist/ProgressBar.jsx +17 -3
- package/dist/ProgressBar.jsx.map +1 -1
- package/dist/RadioGroup.d.ts +2 -7
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +388 -269
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.jsx +110 -99
- package/dist/RadioGroup.jsx.map +1 -1
- package/dist/RangeCalendar.d.ts +3 -7
- package/dist/RangeCalendar.d.ts.map +1 -1
- package/dist/RangeCalendar.js +271 -202
- package/dist/RangeCalendar.js.map +1 -1
- package/dist/RangeCalendar.jsx +56 -37
- package/dist/RangeCalendar.jsx.map +1 -1
- package/dist/RouterProvider.d.ts +3 -9
- package/dist/RouterProvider.d.ts.map +1 -1
- package/dist/RouterProvider.js +15 -14
- package/dist/RouterProvider.js.map +1 -1
- package/dist/RouterProvider.jsx +14 -13
- package/dist/RouterProvider.jsx.map +1 -1
- package/dist/SearchField.d.ts +4 -7
- package/dist/SearchField.d.ts.map +1 -1
- package/dist/SearchField.js +191 -164
- package/dist/SearchField.js.map +1 -1
- package/dist/SearchField.jsx +69 -62
- package/dist/SearchField.jsx.map +1 -1
- package/dist/Select.d.ts +5 -10
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +565 -359
- package/dist/Select.js.map +1 -1
- package/dist/Select.jsx +281 -161
- package/dist/Select.jsx.map +1 -1
- package/dist/SelectionIndicator.d.ts +1 -4
- package/dist/SelectionIndicator.d.ts.map +1 -1
- package/dist/SelectionIndicator.js +29 -13
- package/dist/SelectionIndicator.js.map +1 -1
- package/dist/SelectionIndicator.jsx +18 -4
- package/dist/SelectionIndicator.jsx.map +1 -1
- package/dist/Separator.d.ts +1 -7
- package/dist/Separator.d.ts.map +1 -1
- package/dist/Separator.js +22 -6
- package/dist/Separator.js.map +1 -1
- package/dist/Separator.jsx +16 -3
- package/dist/Separator.jsx.map +1 -1
- package/dist/SharedElementTransition.d.ts +1 -10
- package/dist/SharedElementTransition.d.ts.map +1 -1
- package/dist/SharedElementTransition.js +68 -40
- package/dist/SharedElementTransition.js.map +1 -1
- package/dist/SharedElementTransition.jsx +49 -25
- package/dist/SharedElementTransition.jsx.map +1 -1
- package/dist/Slider.d.ts +2 -8
- package/dist/Slider.d.ts.map +1 -1
- package/dist/Slider.js +155 -97
- package/dist/Slider.js.map +1 -1
- package/dist/Slider.jsx +25 -12
- package/dist/Slider.jsx.map +1 -1
- package/dist/StepList.d.ts +1 -7
- package/dist/StepList.d.ts.map +1 -1
- package/dist/StepList.js +112 -68
- package/dist/StepList.js.map +1 -1
- package/dist/StepList.jsx +58 -20
- package/dist/StepList.jsx.map +1 -1
- package/dist/Switch.d.ts +2 -9
- package/dist/Switch.d.ts.map +1 -1
- package/dist/Switch.js +164 -114
- package/dist/Switch.js.map +1 -1
- package/dist/Switch.jsx +26 -13
- package/dist/Switch.jsx.map +1 -1
- package/dist/Table.d.ts +2 -1
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +689 -592
- package/dist/Table.js.map +1 -1
- package/dist/Table.jsx +317 -237
- package/dist/Table.jsx.map +1 -1
- package/dist/Tabs.d.ts +2 -7
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/Tabs.js +278 -293
- package/dist/Tabs.js.map +1 -1
- package/dist/Tabs.jsx +68 -66
- package/dist/Tabs.jsx.map +1 -1
- package/dist/TagGroup.d.ts +4 -11
- package/dist/TagGroup.d.ts.map +1 -1
- package/dist/TagGroup.js +153 -115
- package/dist/TagGroup.js.map +1 -1
- package/dist/TagGroup.jsx +37 -24
- package/dist/TagGroup.jsx.map +1 -1
- package/dist/Text.d.ts +3 -3
- package/dist/Text.d.ts.map +1 -1
- package/dist/Text.js +24 -7
- package/dist/Text.js.map +1 -1
- package/dist/Text.jsx +17 -5
- package/dist/Text.jsx.map +1 -1
- package/dist/TextField.d.ts +3 -16
- package/dist/TextField.d.ts.map +1 -1
- package/dist/TextField.js +104 -129
- package/dist/TextField.js.map +1 -1
- package/dist/TextField.jsx +76 -102
- package/dist/TextField.jsx.map +1 -1
- package/dist/TimeField.d.ts +2 -15
- package/dist/TimeField.d.ts.map +1 -1
- package/dist/TimeField.js +86 -102
- package/dist/TimeField.js.map +1 -1
- package/dist/TimeField.jsx +32 -49
- package/dist/TimeField.jsx.map +1 -1
- package/dist/Toast.d.ts +10 -13
- package/dist/Toast.d.ts.map +1 -1
- package/dist/Toast.js +209 -108
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.jsx +127 -22
- package/dist/Toast.jsx.map +1 -1
- package/dist/ToggleButton.d.ts +1 -7
- package/dist/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton.js +57 -35
- package/dist/ToggleButton.js.map +1 -1
- package/dist/ToggleButton.jsx +26 -12
- package/dist/ToggleButton.jsx.map +1 -1
- package/dist/ToggleButtonGroup.d.ts +1 -7
- package/dist/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/ToggleButtonGroup.js +59 -44
- package/dist/ToggleButtonGroup.js.map +1 -1
- package/dist/ToggleButtonGroup.jsx +25 -12
- package/dist/ToggleButtonGroup.jsx.map +1 -1
- package/dist/TokenField.d.ts +52 -0
- package/dist/TokenField.d.ts.map +1 -0
- package/dist/TokenField.js +301 -0
- package/dist/TokenField.js.map +1 -0
- package/dist/TokenField.jsx +197 -0
- package/dist/TokenField.jsx.map +1 -0
- package/dist/Toolbar.d.ts +2 -7
- package/dist/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar.js +35 -16
- package/dist/Toolbar.js.map +1 -1
- package/dist/Toolbar.jsx +15 -2
- package/dist/Toolbar.jsx.map +1 -1
- package/dist/Tooltip.d.ts +2 -7
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip.js +105 -68
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tooltip.jsx +60 -36
- package/dist/Tooltip.jsx.map +1 -1
- package/dist/Tree.d.ts +8 -11
- package/dist/Tree.d.ts.map +1 -1
- package/dist/Tree.js +486 -339
- package/dist/Tree.js.map +1 -1
- package/dist/Tree.jsx +155 -107
- package/dist/Tree.jsx.map +1 -1
- package/dist/Virtualizer.d.ts +39 -9
- package/dist/Virtualizer.d.ts.map +1 -1
- package/dist/Virtualizer.js +2 -2
- package/dist/Virtualizer.jsx +2 -2
- package/dist/Virtualizer2.js +491 -136
- package/dist/Virtualizer2.js.map +1 -1
- package/dist/Virtualizer2.jsx +455 -122
- package/dist/Virtualizer2.jsx.map +1 -1
- package/dist/VirtualizerLayouts.d.ts +55 -2
- package/dist/VirtualizerLayouts.d.ts.map +1 -1
- package/dist/VisuallyHidden.d.ts +4 -3
- package/dist/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden.js +18 -11
- package/dist/VisuallyHidden.js.map +1 -1
- package/dist/VisuallyHidden.jsx +15 -9
- package/dist/VisuallyHidden.jsx.map +1 -1
- package/dist/contexts.d.ts +25 -0
- package/dist/contexts.d.ts.map +1 -1
- package/dist/contexts.js +3 -0
- package/dist/contexts.js.map +1 -1
- package/dist/contexts.jsx +3 -0
- package/dist/contexts.jsx.map +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -11
- package/dist/index.jsx +14 -11
- package/dist/intl/index.d.ts +16 -0
- package/dist/intl/index.d.ts.map +1 -0
- package/dist/intl.js +212 -0
- package/dist/intl.js.map +1 -0
- package/dist/intl.jsx +212 -0
- package/dist/intl.jsx.map +1 -0
- package/dist/useDragAndDrop.d.ts +4 -2
- package/dist/useDragAndDrop.d.ts.map +1 -1
- package/dist/useDragAndDrop2.js +39 -21
- package/dist/useDragAndDrop2.js.map +1 -1
- package/dist/useDragAndDrop2.jsx +39 -21
- package/dist/useDragAndDrop2.jsx.map +1 -1
- package/dist/utils.d.ts +28 -9
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +96 -24
- package/dist/utils.js.map +1 -1
- package/dist/utils.jsx +81 -24
- package/dist/utils.jsx.map +1 -1
- package/dist/virtualizer/Layout.d.ts +9 -0
- package/dist/virtualizer/Layout.d.ts.map +1 -1
- package/dist/virtualizer/Layout.js +23 -2
- package/dist/virtualizer/Layout.js.map +1 -1
- package/dist/virtualizer/Layout.jsx +23 -2
- package/dist/virtualizer/Layout.jsx.map +1 -1
- package/package.json +29 -10
- package/src/ActionBar.tsx +50 -24
- package/src/ActionGroup.tsx +31 -19
- package/src/Alert.tsx +10 -4
- package/src/Autocomplete.tsx +24 -15
- package/src/Breadcrumbs.tsx +32 -16
- package/src/Button.tsx +182 -67
- package/src/Calendar.tsx +65 -47
- package/src/CalendarPicker.tsx +16 -1
- package/src/Checkbox.tsx +84 -116
- package/src/Collection.tsx +84 -3
- package/src/Color.tsx +282 -104
- package/src/ColorEditor.tsx +5 -1
- package/src/ComboBox.tsx +384 -109
- package/src/ContextualHelpTrigger.tsx +47 -41
- package/src/DateField.tsx +74 -106
- package/src/DatePicker.tsx +156 -352
- package/src/DateRangePickerContext.tsx +8 -0
- package/src/Dialog.tsx +105 -38
- package/src/Disclosure.tsx +29 -19
- package/src/DragAndDrop.tsx +43 -8
- package/src/DragPreview.tsx +20 -1
- package/src/DropZone.tsx +32 -18
- package/src/ElementTag.tsx +14 -104
- package/src/FieldError.tsx +39 -7
- package/src/FileTrigger.tsx +18 -3
- package/src/Focusable.tsx +27 -6
- package/src/Form.tsx +57 -11
- package/src/GridList.tsx +233 -141
- package/src/HiddenDateInput.tsx +19 -3
- package/src/Icon.tsx +8 -2
- package/src/Keyboard.tsx +18 -2
- package/src/Label.tsx +77 -0
- package/src/Landmark.tsx +6 -1
- package/src/Link.tsx +65 -19
- package/src/ListBox.tsx +645 -468
- package/src/ListDropTargetDelegate.ts +4 -0
- package/src/Menu.tsx +512 -349
- package/src/Meter.tsx +42 -8
- package/src/Modal.tsx +85 -42
- package/src/NumberField.tsx +161 -48
- package/src/Popover.tsx +424 -148
- package/src/Pressable.tsx +27 -6
- package/src/PreviewTrigger.tsx +171 -0
- package/src/ProgressBar.tsx +25 -3
- package/src/RadioGroup.tsx +230 -161
- package/src/RangeCalendar.tsx +75 -63
- package/src/RouterProvider.tsx +24 -14
- package/src/SearchField.tsx +118 -121
- package/src/Select.tsx +454 -274
- package/src/SelectionIndicator.tsx +21 -3
- package/src/Separator.tsx +17 -1
- package/src/SharedElementTransition.tsx +115 -97
- package/src/Slider.tsx +35 -17
- package/src/StepList.tsx +71 -32
- package/src/Switch.tsx +45 -29
- package/src/Table.tsx +446 -380
- package/src/Tabs.tsx +132 -155
- package/src/TagGroup.tsx +53 -40
- package/src/Text.tsx +23 -6
- package/src/TextField.tsx +118 -159
- package/src/TimeField.tsx +34 -95
- package/src/Toast.tsx +141 -67
- package/src/ToggleButton.tsx +33 -15
- package/src/ToggleButtonGroup.tsx +27 -9
- package/src/TokenField.tsx +379 -0
- package/src/Toolbar.tsx +19 -9
- package/src/Tooltip.tsx +126 -84
- package/src/Tree.tsx +233 -173
- package/src/Virtualizer.tsx +400 -138
- package/src/VirtualizerLayouts.ts +211 -26
- package/src/VisuallyHidden.tsx +22 -8
- package/src/contexts.ts +13 -0
- package/src/index.ts +32 -11
- package/src/intl/ar-AE.json +6 -0
- package/src/intl/bg-BG.json +6 -0
- package/src/intl/cs-CZ.json +6 -0
- package/src/intl/da-DK.json +6 -0
- package/src/intl/de-DE.json +6 -0
- package/src/intl/el-GR.json +6 -0
- package/src/intl/en-US.json +6 -0
- package/src/intl/es-ES.json +6 -0
- package/src/intl/et-EE.json +6 -0
- package/src/intl/fi-FI.json +6 -0
- package/src/intl/fr-FR.json +6 -0
- package/src/intl/he-IL.json +6 -0
- package/src/intl/hr-HR.json +6 -0
- package/src/intl/hu-HU.json +6 -0
- package/src/intl/index.ts +125 -0
- package/src/intl/it-IT.json +6 -0
- package/src/intl/ja-JP.json +6 -0
- package/src/intl/ko-KR.json +6 -0
- package/src/intl/lt-LT.json +6 -0
- package/src/intl/lv-LV.json +6 -0
- package/src/intl/nb-NO.json +6 -0
- package/src/intl/nl-NL.json +6 -0
- package/src/intl/pl-PL.json +6 -0
- package/src/intl/pt-BR.json +6 -0
- package/src/intl/pt-PT.json +6 -0
- package/src/intl/ro-RO.json +6 -0
- package/src/intl/ru-RU.json +6 -0
- package/src/intl/sk-SK.json +6 -0
- package/src/intl/sl-SI.json +6 -0
- package/src/intl/sr-SP.json +6 -0
- package/src/intl/sv-SE.json +6 -0
- package/src/intl/tr-TR.json +6 -0
- package/src/intl/uk-UA.json +6 -0
- package/src/intl/zh-CN.json +6 -0
- package/src/intl/zh-TW.json +6 -0
- package/src/useDragAndDrop.ts +30 -32
- package/src/utils.tsx +124 -68
- package/src/virtualizer/Layout.ts +29 -0
package/dist/Checkbox.jsx
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/Checkbox.tsx
|
|
13
|
+
import { Provider, dataAttr, filterDOMProps, isAriaTrue, useRenderProps } from "./utils.jsx";
|
|
2
14
|
import { VisuallyHidden } from "./VisuallyHidden.jsx";
|
|
3
|
-
import { FieldErrorContext } from "./FieldError.jsx";
|
|
4
15
|
import { TextContext } from "./Text.jsx";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
16
|
+
import { FieldErrorContext } from "./FieldError.jsx";
|
|
17
|
+
import { FormContext, resolveValidationBehavior } from "./Form.jsx";
|
|
18
|
+
import { Show, createContext, createMemo, createSignal, createUniqueId, useContext } from "solid-js";
|
|
19
|
+
import { createCheckbox, createCheckboxGroup, createCheckboxGroupItem, createFocusRing, createHover, mergeProps } from "@proyecto-viviana/solidaria";
|
|
20
|
+
import { splitProps } from "@proyecto-viviana/solidaria/utils";
|
|
8
21
|
import { VALID_VALIDITY_STATE, createCheckboxGroupState, createToggleState } from "@proyecto-viviana/solid-stately";
|
|
9
22
|
//#region src/Checkbox.tsx
|
|
10
23
|
/**
|
|
@@ -13,7 +26,7 @@ import { VALID_VALIDITY_STATE, createCheckboxGroupState, createToggleState } fro
|
|
|
13
26
|
* Pre-wired headless checkbox components that combine state + aria hooks.
|
|
14
27
|
* Port of react-aria-components/src/Checkbox.tsx
|
|
15
28
|
*/
|
|
16
|
-
function assignRef(ref, el) {
|
|
29
|
+
function assignRef$1(ref, el) {
|
|
17
30
|
if (!ref) return;
|
|
18
31
|
if (typeof ref === "function") ref(el);
|
|
19
32
|
else ref.current = el;
|
|
@@ -21,33 +34,6 @@ function assignRef(ref, el) {
|
|
|
21
34
|
const CheckboxGroupContext = createContext(null);
|
|
22
35
|
const CheckboxGroupStateContext = createContext(null);
|
|
23
36
|
const CheckboxContext = createContext(null);
|
|
24
|
-
function withFormValidationBehavior(props, formContext) {
|
|
25
|
-
if (!formContext?.validationBehavior) return props;
|
|
26
|
-
return new Proxy(props, {
|
|
27
|
-
get(target, property, receiver) {
|
|
28
|
-
const localValue = Reflect.get(target, property, receiver);
|
|
29
|
-
if (property === "validationBehavior" && localValue === void 0) return formContext.validationBehavior;
|
|
30
|
-
return localValue;
|
|
31
|
-
},
|
|
32
|
-
has(target, property) {
|
|
33
|
-
return Reflect.has(target, property) || property === "validationBehavior" && formContext.validationBehavior !== void 0;
|
|
34
|
-
},
|
|
35
|
-
ownKeys(target) {
|
|
36
|
-
const keys = new Set(Reflect.ownKeys(target));
|
|
37
|
-
if (formContext.validationBehavior !== void 0) keys.add("validationBehavior");
|
|
38
|
-
return Array.from(keys);
|
|
39
|
-
},
|
|
40
|
-
getOwnPropertyDescriptor(target, property) {
|
|
41
|
-
const descriptor = Reflect.getOwnPropertyDescriptor(target, property);
|
|
42
|
-
if (descriptor) return descriptor;
|
|
43
|
-
if (property === "validationBehavior" && formContext.validationBehavior !== void 0) return {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
configurable: true,
|
|
46
|
-
get: () => formContext.validationBehavior
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
37
|
/**
|
|
52
38
|
* A checkbox group allows a user to select multiple items from a list of options.
|
|
53
39
|
*
|
|
@@ -60,7 +46,8 @@ function withFormValidationBehavior(props, formContext) {
|
|
|
60
46
|
* ```
|
|
61
47
|
*/
|
|
62
48
|
function CheckboxGroup(props) {
|
|
63
|
-
const
|
|
49
|
+
const formContext = useContext(FormContext);
|
|
50
|
+
const [local, ariaProps] = splitProps(props, [
|
|
64
51
|
"class",
|
|
65
52
|
"style",
|
|
66
53
|
"slot",
|
|
@@ -80,11 +67,12 @@ function CheckboxGroup(props) {
|
|
|
80
67
|
isInvalid: ariaProps.isInvalid,
|
|
81
68
|
validationState: ariaProps.validationState,
|
|
82
69
|
validate: ariaProps.validate,
|
|
83
|
-
validationBehavior: ariaProps.validationBehavior,
|
|
70
|
+
validationBehavior: resolveValidationBehavior(ariaProps.validationBehavior, formContext),
|
|
84
71
|
name: ariaProps.name
|
|
85
72
|
}));
|
|
86
73
|
const groupAria = createCheckboxGroup(() => ({
|
|
87
74
|
...ariaProps,
|
|
75
|
+
validationBehavior: resolveValidationBehavior(ariaProps.validationBehavior, formContext),
|
|
88
76
|
description: local.description,
|
|
89
77
|
errorMessage: local.errorMessage
|
|
90
78
|
}), state);
|
|
@@ -109,7 +97,7 @@ function CheckboxGroup(props) {
|
|
|
109
97
|
return rest;
|
|
110
98
|
};
|
|
111
99
|
const setGroupRef = (el) => {
|
|
112
|
-
assignRef(local.ref, el);
|
|
100
|
+
assignRef$1(local.ref, el);
|
|
113
101
|
};
|
|
114
102
|
const groupDescribedBy = () => {
|
|
115
103
|
const ids = [
|
|
@@ -144,8 +132,8 @@ function CheckboxGroup(props) {
|
|
|
144
132
|
});
|
|
145
133
|
return <>{renderedChildren()}</>;
|
|
146
134
|
};
|
|
147
|
-
return <CheckboxGroupStateContext
|
|
148
|
-
<div {...domProps()} {...cleanGroupProps()} ref={setGroupRef} aria-describedby={groupDescribedBy()} class={renderProps.class()} style={renderProps.style()} data-disabled={state.isDisabled
|
|
135
|
+
return <CheckboxGroupStateContext value={state}>
|
|
136
|
+
<div {...domProps()} {...cleanGroupProps()} ref={setGroupRef} aria-describedby={groupDescribedBy()} class={renderProps.class()} style={renderProps.style()} data-disabled={dataAttr(state.isDisabled)} data-readonly={dataAttr(state.isReadOnly)} data-required={dataAttr(ariaProps.isRequired)} data-invalid={dataAttr(groupAria.isInvalid)}>
|
|
149
137
|
<GroupChildren />
|
|
150
138
|
{}
|
|
151
139
|
<Show when={(local.renderHelpText ?? true) && local.description}>
|
|
@@ -159,7 +147,7 @@ function CheckboxGroup(props) {
|
|
|
159
147
|
</div>
|
|
160
148
|
</Show>
|
|
161
149
|
</div>
|
|
162
|
-
</CheckboxGroupStateContext
|
|
150
|
+
</CheckboxGroupStateContext>;
|
|
163
151
|
}
|
|
164
152
|
/**
|
|
165
153
|
* A checkbox allows a user to select multiple items from a list of individual items,
|
|
@@ -183,20 +171,19 @@ function Checkbox(props) {
|
|
|
183
171
|
const [inputElement, setInputElement] = createSignal(null);
|
|
184
172
|
const formContext = useContext(FormContext);
|
|
185
173
|
const contextProps = useContext(CheckboxContext);
|
|
186
|
-
const contextSlotProps = contextProps?.slots?.[props.slot
|
|
174
|
+
const contextSlotProps = contextProps?.slots?.[typeof props.slot === "string" ? props.slot : "default"];
|
|
187
175
|
const contextBaseProps = createMemo(() => {
|
|
188
176
|
if (!contextProps) return {};
|
|
189
177
|
const { slots: _slots, ...rest } = contextProps;
|
|
190
178
|
return rest;
|
|
191
179
|
});
|
|
192
|
-
const mergedProps = contextProps ? mergeProps
|
|
193
|
-
const propsWithFormBehavior = withFormValidationBehavior(mergedProps, formContext);
|
|
180
|
+
const mergedProps = contextProps ? mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) : props;
|
|
194
181
|
const inputRefs = createMemo(() => [
|
|
195
182
|
contextBaseProps().inputRef,
|
|
196
183
|
contextSlotProps?.inputRef,
|
|
197
184
|
props.inputRef
|
|
198
185
|
].filter(Boolean));
|
|
199
|
-
const [local, ariaProps] = splitProps(
|
|
186
|
+
const [local, ariaProps] = splitProps(mergedProps, [
|
|
200
187
|
"class",
|
|
201
188
|
"style",
|
|
202
189
|
"render",
|
|
@@ -228,6 +215,7 @@ function Checkbox(props) {
|
|
|
228
215
|
if (groupState) {
|
|
229
216
|
const itemAria = createCheckboxGroupItem(() => ({
|
|
230
217
|
...inputAriaProps(),
|
|
218
|
+
validationBehavior: ariaProps.validationBehavior ?? formContext?.validationBehavior,
|
|
231
219
|
value: inputAriaProps().value ?? "",
|
|
232
220
|
children: typeof mergedProps.children === "function" ? true : mergedProps.children
|
|
233
221
|
}), groupState, inputElement);
|
|
@@ -236,31 +224,34 @@ function Checkbox(props) {
|
|
|
236
224
|
labelProps = itemAria.labelProps;
|
|
237
225
|
inputProps = () => itemAria.inputProps;
|
|
238
226
|
} else {
|
|
239
|
-
const
|
|
240
|
-
...inputAriaProps(),
|
|
241
|
-
isIndeterminate: local.isIndeterminate,
|
|
242
|
-
children: typeof mergedProps.children === "function" ? true : mergedProps.children
|
|
243
|
-
}), createToggleState(() => ({
|
|
227
|
+
const state = createToggleState(() => ({
|
|
244
228
|
isSelected: ariaProps.isSelected,
|
|
245
229
|
defaultSelected: ariaProps.defaultSelected,
|
|
246
230
|
onChange: ariaProps.onChange,
|
|
247
231
|
isReadOnly: ariaProps.isReadOnly
|
|
248
|
-
}))
|
|
232
|
+
}));
|
|
233
|
+
const checkboxAria = createCheckbox(() => ({
|
|
234
|
+
...inputAriaProps(),
|
|
235
|
+
validationBehavior: resolveValidationBehavior(ariaProps.validationBehavior, formContext),
|
|
236
|
+
isIndeterminate: local.isIndeterminate,
|
|
237
|
+
children: typeof mergedProps.children === "function" ? true : mergedProps.children
|
|
238
|
+
}), state, inputElement);
|
|
249
239
|
isSelected = checkboxAria.isSelected;
|
|
250
240
|
isPressed = checkboxAria.isPressed;
|
|
251
241
|
labelProps = checkboxAria.labelProps;
|
|
252
242
|
inputProps = () => checkboxAria.inputProps;
|
|
253
243
|
}
|
|
254
244
|
isDisabled = () => inputProps().disabled === true;
|
|
255
|
-
isReadOnly = () => inputProps()["aria-readonly"]
|
|
256
|
-
isInvalid = () => inputProps()["aria-invalid"]
|
|
245
|
+
isReadOnly = () => isAriaTrue(inputProps()["aria-readonly"]);
|
|
246
|
+
isInvalid = () => isAriaTrue(inputProps()["aria-invalid"]);
|
|
257
247
|
const describedBy = () => {
|
|
258
248
|
const ids = [
|
|
249
|
+
inputProps()["aria-describedby"],
|
|
259
250
|
ariaProps["aria-describedby"],
|
|
260
251
|
local.description ? descriptionId : void 0,
|
|
261
252
|
isInvalid() && local.errorMessage ? errorMessageId : void 0
|
|
262
|
-
].filter(Boolean);
|
|
263
|
-
return ids.length ? ids.join(" ") : void 0;
|
|
253
|
+
].filter(Boolean).join(" ").split(" ").filter(Boolean);
|
|
254
|
+
return ids.length ? Array.from(new Set(ids)).join(" ") : void 0;
|
|
264
255
|
};
|
|
265
256
|
const { isFocused, isFocusVisible, focusProps } = createFocusRing();
|
|
266
257
|
const { isHovered, hoverProps } = createHover({
|
|
@@ -356,11 +347,11 @@ function Checkbox(props) {
|
|
|
356
347
|
focusProps.onBlur?.(event);
|
|
357
348
|
};
|
|
358
349
|
const setLabelRef = (el) => {
|
|
359
|
-
assignRef(local.ref, el);
|
|
350
|
+
assignRef$1(local.ref, el);
|
|
360
351
|
};
|
|
361
352
|
const setInputRef = (el) => {
|
|
362
353
|
setInputElement(el);
|
|
363
|
-
for (const ref of inputRefs()) assignRef(ref, el);
|
|
354
|
+
for (const ref of inputRefs()) assignRef$1(ref, el);
|
|
364
355
|
};
|
|
365
356
|
const hiddenInput = <VisuallyHidden>
|
|
366
357
|
<input ref={setInputRef} {...cleanInputProps()} {...cleanFocusProps()} onFocus={handleInputFocus} onBlur={handleInputBlur} aria-describedby={describedBy()} />
|
|
@@ -402,7 +393,7 @@ function Checkbox(props) {
|
|
|
402
393
|
ref: setLabelRef,
|
|
403
394
|
children: labelChildren()
|
|
404
395
|
});
|
|
405
|
-
return local.render ? local.render(customRootProps(), renderValues()) : <label {...domProps()} {...cleanLabelProps()} {...cleanHoverProps()} ref={setLabelRef} class={renderProps.class()} style={renderProps.style()} slot={local.slot} data-selected={isSelected()
|
|
396
|
+
return local.render ? local.render(customRootProps(), renderValues()) : <label {...domProps()} {...cleanLabelProps()} {...cleanHoverProps()} ref={setLabelRef} class={renderProps.class()} style={renderProps.style()} slot={local.slot} data-selected={dataAttr(isSelected())} data-indeterminate={dataAttr(local.isIndeterminate)} data-pressed={dataAttr(isPressed())} data-hovered={dataAttr(isHovered())} data-focused={dataAttr(isFocused())} data-focus-visible={dataAttr(isFocusVisible())} data-disabled={dataAttr(isDisabled())} data-readonly={dataAttr(isReadOnly())} data-invalid={dataAttr(isInvalid())} data-required={dataAttr(ariaProps.isRequired)}>
|
|
406
397
|
{labelChildren()}
|
|
407
398
|
</label>;
|
|
408
399
|
}
|
|
@@ -424,20 +415,19 @@ function CheckboxField(props) {
|
|
|
424
415
|
const [inputElement, setInputElement] = createSignal(null);
|
|
425
416
|
const formContext = useContext(FormContext);
|
|
426
417
|
const contextProps = useContext(CheckboxFieldContext);
|
|
427
|
-
const contextSlotProps = contextProps?.slots?.[props.slot
|
|
418
|
+
const contextSlotProps = contextProps?.slots?.[typeof props.slot === "string" ? props.slot : "default"];
|
|
428
419
|
const contextBaseProps = createMemo(() => {
|
|
429
420
|
if (!contextProps) return {};
|
|
430
421
|
const { slots: _slots, ...rest } = contextProps;
|
|
431
422
|
return rest;
|
|
432
423
|
});
|
|
433
|
-
const mergedProps = contextProps ? mergeProps
|
|
434
|
-
const propsWithFormBehavior = withFormValidationBehavior(mergedProps, formContext);
|
|
424
|
+
const mergedProps = contextProps ? mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) : props;
|
|
435
425
|
const inputRefs = createMemo(() => [
|
|
436
426
|
contextBaseProps().inputRef,
|
|
437
427
|
contextSlotProps?.inputRef,
|
|
438
428
|
props.inputRef
|
|
439
429
|
].filter(Boolean));
|
|
440
|
-
const [local, ariaProps] = splitProps(
|
|
430
|
+
const [local, ariaProps] = splitProps(mergedProps, [
|
|
441
431
|
"class",
|
|
442
432
|
"style",
|
|
443
433
|
"ref",
|
|
@@ -461,6 +451,7 @@ function CheckboxField(props) {
|
|
|
461
451
|
if (groupState) {
|
|
462
452
|
const itemAria = createCheckboxGroupItem(() => ({
|
|
463
453
|
...inputAriaProps(),
|
|
454
|
+
validationBehavior: ariaProps.validationBehavior ?? formContext?.validationBehavior,
|
|
464
455
|
value: inputAriaProps().value ?? "",
|
|
465
456
|
children: true
|
|
466
457
|
}), groupState, inputElement);
|
|
@@ -471,16 +462,18 @@ function CheckboxField(props) {
|
|
|
471
462
|
getDescriptionProps = () => itemAria.descriptionProps;
|
|
472
463
|
getErrorMessageProps = () => itemAria.errorMessageProps;
|
|
473
464
|
} else {
|
|
474
|
-
const
|
|
475
|
-
...inputAriaProps(),
|
|
476
|
-
isIndeterminate: local.isIndeterminate,
|
|
477
|
-
children: true
|
|
478
|
-
}), createToggleState(() => ({
|
|
465
|
+
const state = createToggleState(() => ({
|
|
479
466
|
isSelected: ariaProps.isSelected,
|
|
480
467
|
defaultSelected: ariaProps.defaultSelected,
|
|
481
468
|
onChange: ariaProps.onChange,
|
|
482
469
|
isReadOnly: ariaProps.isReadOnly
|
|
483
|
-
}))
|
|
470
|
+
}));
|
|
471
|
+
const checkboxAria = createCheckbox(() => ({
|
|
472
|
+
...inputAriaProps(),
|
|
473
|
+
validationBehavior: resolveValidationBehavior(ariaProps.validationBehavior, formContext),
|
|
474
|
+
isIndeterminate: local.isIndeterminate,
|
|
475
|
+
children: true
|
|
476
|
+
}), state, inputElement);
|
|
484
477
|
isSelected = checkboxAria.isSelected;
|
|
485
478
|
isPressed = checkboxAria.isPressed;
|
|
486
479
|
labelProps = checkboxAria.labelProps;
|
|
@@ -489,16 +482,16 @@ function CheckboxField(props) {
|
|
|
489
482
|
getErrorMessageProps = () => checkboxAria.errorMessageProps;
|
|
490
483
|
}
|
|
491
484
|
const isDisabled = () => inputProps().disabled === true;
|
|
492
|
-
const isReadOnly = () => inputProps()["aria-readonly"]
|
|
493
|
-
const isInvalid = () => inputProps()["aria-invalid"]
|
|
485
|
+
const isReadOnly = () => isAriaTrue(inputProps()["aria-readonly"]);
|
|
486
|
+
const isInvalid = () => isAriaTrue(inputProps()["aria-invalid"]);
|
|
494
487
|
const isIndeterminate = () => local.isIndeterminate ?? false;
|
|
495
488
|
const isRequired = () => ariaProps.isRequired ?? false;
|
|
496
489
|
const setInputRef = (el) => {
|
|
497
490
|
setInputElement(el);
|
|
498
|
-
for (const ref of inputRefs()) assignRef(ref, el);
|
|
491
|
+
for (const ref of inputRefs()) assignRef$1(ref, el);
|
|
499
492
|
};
|
|
500
493
|
const setFieldRef = (el) => {
|
|
501
|
-
assignRef(local.ref, el);
|
|
494
|
+
assignRef$1(local.ref, el);
|
|
502
495
|
};
|
|
503
496
|
const internalContext = {
|
|
504
497
|
isSelected,
|
|
@@ -580,16 +573,16 @@ function CheckboxField(props) {
|
|
|
580
573
|
});
|
|
581
574
|
return <>{renderedChildren()}</>;
|
|
582
575
|
};
|
|
583
|
-
return <div {...domProps()} ref={setFieldRef} class={renderProps.class()} style={renderProps.style()} slot={local.slot} data-selected={isSelected()
|
|
584
|
-
<InternalCheckboxContext
|
|
576
|
+
return <div {...domProps()} ref={setFieldRef} class={renderProps.class()} style={renderProps.style()} slot={local.slot} data-selected={dataAttr(isSelected())} data-indeterminate={dataAttr(isIndeterminate())} data-disabled={dataAttr(isDisabled())} data-readonly={dataAttr(isReadOnly())} data-invalid={dataAttr(isInvalid())} data-required={dataAttr(isRequired())}>
|
|
577
|
+
<InternalCheckboxContext value={internalContext}>
|
|
585
578
|
<Provider values={[[TextContext, textSlots]]}>
|
|
586
579
|
<Show when={fieldErrorContext} fallback={<FieldChildren />} keyed>
|
|
587
|
-
{(ctx) => <FieldErrorContext
|
|
580
|
+
{(ctx) => <FieldErrorContext value={ctx}>
|
|
588
581
|
<FieldChildren />
|
|
589
|
-
</FieldErrorContext
|
|
582
|
+
</FieldErrorContext>}
|
|
590
583
|
</Show>
|
|
591
584
|
</Provider>
|
|
592
|
-
</InternalCheckboxContext
|
|
585
|
+
</InternalCheckboxContext>
|
|
593
586
|
</div>;
|
|
594
587
|
}
|
|
595
588
|
/**
|
|
@@ -688,13 +681,13 @@ function CheckboxButtonImpl(props) {
|
|
|
688
681
|
focusProps.onBlur?.(event);
|
|
689
682
|
};
|
|
690
683
|
const setButtonRef = (el) => {
|
|
691
|
-
assignRef(props.buttonProps.ref, el);
|
|
684
|
+
assignRef$1(props.buttonProps.ref, el);
|
|
692
685
|
};
|
|
693
686
|
const buttonChildren = () => {
|
|
694
687
|
const children = props.buttonProps.children;
|
|
695
688
|
return typeof children === "function" ? children(childRenderValues) : children;
|
|
696
689
|
};
|
|
697
|
-
return <label {...cleanLabelProps()} {...cleanHoverProps()} ref={setButtonRef} class={renderProps.class()} style={renderProps.style()} slot={props.buttonProps.slot} data-selected={ctx.isSelected()
|
|
690
|
+
return <label {...cleanLabelProps()} {...cleanHoverProps()} ref={setButtonRef} class={renderProps.class()} style={renderProps.style()} slot={props.buttonProps.slot} data-selected={dataAttr(ctx.isSelected())} data-indeterminate={dataAttr(ctx.isIndeterminate())} data-pressed={dataAttr(ctx.isPressed())} data-hovered={dataAttr(isHovered())} data-focused={dataAttr(isFocused())} data-focus-visible={dataAttr(isFocusVisible())} data-disabled={dataAttr(ctx.isDisabled())} data-readonly={dataAttr(ctx.isReadOnly())} data-invalid={dataAttr(ctx.isInvalid())} data-required={dataAttr(ctx.isRequired())}>
|
|
698
691
|
<VisuallyHidden>
|
|
699
692
|
<input ref={ctx.setInputRef} {...cleanInputProps()} {...cleanFocusProps()} onFocus={handleInputFocus} onBlur={handleInputBlur} />
|
|
700
693
|
</VisuallyHidden>
|
package/dist/Checkbox.jsx.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.jsx","names":["mergeProps"],"sources":["../src/Checkbox.tsx"],"sourcesContent":["/**\n * Checkbox and CheckboxGroup components for solidaria-components\n *\n * Pre-wired headless checkbox components that combine state + aria hooks.\n * Port of react-aria-components/src/Checkbox.tsx\n */\n\nimport {\n type JSX,\n type Context,\n type Accessor,\n createContext,\n useContext,\n createMemo,\n createSignal,\n createUniqueId,\n splitProps,\n Show,\n} from \"solid-js\";\nimport {\n createCheckbox,\n createCheckboxGroup,\n createCheckboxGroupItem,\n createFocusRing,\n createHover,\n mergeProps,\n type AriaCheckboxProps,\n type AriaCheckboxGroupProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createToggleState,\n createCheckboxGroupState,\n VALID_VALIDITY_STATE,\n type CheckboxGroupState,\n type ValidationResult,\n} from \"@proyecto-viviana/solid-stately\";\nimport { VisuallyHidden } from \"./VisuallyHidden\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n Provider,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\nimport { FormContext, type FormProps } from \"./Form\";\nimport { FieldErrorContext, type FieldErrorContextValue } from \"./FieldError\";\nimport { TextContext } from \"./Text\";\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\nexport interface CheckboxGroupRenderProps {\n /** Whether the checkbox group is disabled. */\n isDisabled: boolean;\n /** Whether the checkbox group is read only. */\n isReadOnly: boolean;\n /** Whether the checkbox group is required. */\n isRequired: boolean;\n /** Whether the checkbox group is invalid. */\n isInvalid: boolean;\n /** State of the checkbox group. */\n state: CheckboxGroupState;\n}\n\nexport interface CheckboxRenderProps {\n /** Whether the checkbox is selected. */\n isSelected: boolean;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate: boolean;\n /** Whether the checkbox is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the checkbox is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the checkbox is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the checkbox is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the checkbox is disabled. */\n isDisabled: boolean;\n /** Whether the checkbox is read only. */\n isReadOnly: boolean;\n /** Whether the checkbox is invalid. */\n isInvalid: boolean;\n /** Whether the checkbox is required. */\n isRequired: boolean;\n}\n\nexport interface CheckboxGroupProps\n extends Omit<AriaCheckboxGroupProps, \"children\" | \"label\">, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CheckboxGroupRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxGroupRenderProps>;\n /** Ref for the checkbox group root element. */\n ref?: RefLike<HTMLDivElement>;\n /**\n * Whether this component renders its own description/error-message elements.\n * A styled layer (e.g. solid-spectrum) that renders its own HelpText via a\n * `<Text slot>` sets this to `false`: the wiring stays here — the single source\n * of truth that mints the description/error ids and threads them onto the group\n * and every item's `aria-describedby` — while the visible node is owned by the\n * styled layer. Mirrors RAC, where the group provides a `TextContext` slot and\n * never renders its own description node.\n * @default true\n */\n renderHelpText?: boolean;\n}\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, \"children\">, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CheckboxRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxRenderProps>;\n /** Custom renderer for the outer label element. */\n render?: (\n props: JSX.LabelHTMLAttributes<HTMLLabelElement>,\n renderProps: CheckboxRenderProps,\n ) => JSX.Element;\n /** Ref for the outer label element. */\n ref?: RefLike<HTMLLabelElement>;\n /** Ref for the underlying input element. */\n inputRef?: RefLike<HTMLInputElement>;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate?: boolean;\n /** A description for the checkbox. */\n description?: JSX.Element;\n /** An error message for the checkbox. */\n errorMessage?: JSX.Element;\n /** Handler called when hover starts. */\n onHoverStart?: () => void;\n /** Handler called when hover ends. */\n onHoverEnd?: () => void;\n /** Handler called when hover state changes. */\n onHoverChange?: (isHovered: boolean) => void;\n}\n\nexport const CheckboxGroupContext = createContext<CheckboxGroupProps | null>(null);\nexport const CheckboxGroupStateContext = createContext<CheckboxGroupState | null>(null);\nexport interface CheckboxContextValue extends CheckboxProps {\n slots?: Record<string, CheckboxProps>;\n}\nexport const CheckboxContext = createContext<CheckboxContextValue | null>(null);\n\ntype PropsWithValidationBehavior = {\n validationBehavior?: \"aria\" | \"native\";\n};\n\nfunction withFormValidationBehavior<T extends PropsWithValidationBehavior>(\n props: T,\n formContext: FormProps | null,\n): T {\n if (!formContext?.validationBehavior) {\n return props;\n }\n\n return new Proxy(props, {\n get(target, property, receiver) {\n const localValue = Reflect.get(target, property, receiver);\n if (property === \"validationBehavior\" && localValue === undefined) {\n return formContext.validationBehavior;\n }\n\n return localValue;\n },\n has(target, property) {\n return (\n Reflect.has(target, property) ||\n (property === \"validationBehavior\" && formContext.validationBehavior !== undefined)\n );\n },\n ownKeys(target) {\n const keys = new Set(Reflect.ownKeys(target));\n if (formContext.validationBehavior !== undefined) {\n keys.add(\"validationBehavior\");\n }\n\n return Array.from(keys);\n },\n getOwnPropertyDescriptor(target, property) {\n const descriptor = Reflect.getOwnPropertyDescriptor(target, property);\n if (descriptor) {\n return descriptor;\n }\n\n if (property === \"validationBehavior\" && formContext.validationBehavior !== undefined) {\n return {\n enumerable: true,\n configurable: true,\n get: () => formContext.validationBehavior,\n };\n }\n\n return undefined;\n },\n });\n}\n\n/**\n * A checkbox group allows a user to select multiple items from a list of options.\n *\n * @example\n * ```tsx\n * <CheckboxGroup>\n * <Checkbox value=\"one\">Option 1</Checkbox>\n * <Checkbox value=\"two\">Option 2</Checkbox>\n * </CheckboxGroup>\n * ```\n */\nexport function CheckboxGroup(props: CheckboxGroupProps): JSX.Element {\n const formContext = useContext(FormContext);\n const mergedProps = withFormValidationBehavior(props, formContext);\n const [local, ariaProps] = splitProps(mergedProps, [\n \"class\",\n \"style\",\n \"slot\",\n \"ref\",\n \"description\",\n \"errorMessage\",\n \"renderHelpText\",\n \"children\",\n ]);\n\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createCheckboxGroupState(() => ({\n value: ariaProps.value,\n defaultValue: ariaProps.defaultValue,\n onChange: ariaProps.onChange,\n isDisabled: ariaProps.isDisabled,\n isReadOnly: ariaProps.isReadOnly,\n isRequired: ariaProps.isRequired,\n isInvalid: ariaProps.isInvalid,\n validationState: ariaProps.validationState,\n validate: ariaProps.validate,\n validationBehavior: ariaProps.validationBehavior,\n name: ariaProps.name,\n }));\n\n const groupAria = createCheckboxGroup(\n () => ({\n ...ariaProps,\n description: local.description,\n errorMessage: local.errorMessage,\n }),\n state,\n );\n\n const renderValues = createMemo<CheckboxGroupRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: ariaProps.isRequired ?? false,\n isInvalid: groupAria.isInvalid,\n state,\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-CheckboxGroup\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = groupAria.groupProps as Record<string, unknown>;\n return rest;\n };\n const setGroupRef = (el: HTMLDivElement) => {\n assignRef(local.ref, el);\n };\n const groupDescribedBy = () => {\n const ids = [\n (cleanGroupProps() as { \"aria-describedby\"?: string })[\"aria-describedby\"],\n local.description ? groupAria.descriptionProps.id : undefined,\n groupAria.isInvalid && local.errorMessage ? groupAria.errorMessageProps.id : 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\n const GroupChildren = () => {\n const childRenderValues: CheckboxGroupRenderProps = {\n get isDisabled() {\n return state.isDisabled;\n },\n get isReadOnly() {\n return state.isReadOnly;\n },\n get isRequired() {\n return state.isRequired();\n },\n get isInvalid() {\n return groupAria.isInvalid;\n },\n get state() {\n return state;\n },\n };\n const renderedChildren = createMemo(() => {\n const children = local.children;\n if (typeof children === \"function\") {\n return children.length > 0\n ? children(childRenderValues)\n : (children as unknown as () => JSX.Element)();\n }\n return children;\n });\n\n return <>{renderedChildren()}</>;\n };\n\n return (\n <CheckboxGroupStateContext.Provider value={state}>\n <div\n {...domProps()}\n {...cleanGroupProps()}\n ref={setGroupRef}\n aria-describedby={groupDescribedBy()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-invalid={groupAria.isInvalid || undefined}\n >\n <GroupChildren />\n {/* A styled layer can own the visible HelpText (renderHelpText={false});\n the id wiring above still runs so the group and its items stay\n associated. Default true keeps the bare headless self-sufficient. */}\n <Show when={(local.renderHelpText ?? true) && local.description}>\n <div {...(groupAria.descriptionProps as unknown as JSX.HTMLAttributes<HTMLDivElement>)}>\n {local.description}\n </div>\n </Show>\n <Show when={(local.renderHelpText ?? true) && groupAria.isInvalid && local.errorMessage}>\n <div {...(groupAria.errorMessageProps as unknown as JSX.HTMLAttributes<HTMLDivElement>)}>\n {local.errorMessage}\n </div>\n </Show>\n </div>\n </CheckboxGroupStateContext.Provider>\n );\n}\n\n/**\n * A checkbox allows a user to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n *\n * @example\n * ```tsx\n * <Checkbox>\n * {({ isSelected }) => (\n * <>\n * <span class={`checkbox ${isSelected ? 'checked' : ''}`}>\n * {isSelected && '✓'}\n * </span>\n * <span>Accept terms</span>\n * </>\n * )}\n * </Checkbox>\n * ```\n */\nexport function Checkbox(props: CheckboxProps): JSX.Element {\n const [inputElement, setInputElement] = createSignal<HTMLInputElement | null>(null);\n const formContext = useContext(FormContext);\n const contextProps = useContext(CheckboxContext);\n const contextSlotProps = contextProps?.slots?.[props.slot ?? \"default\"];\n const contextBaseProps = createMemo<CheckboxProps>(() => {\n if (!contextProps) return {};\n const { slots: _slots, ...rest } = contextProps;\n return rest;\n });\n const mergedProps = contextProps\n ? (mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) as CheckboxProps)\n : props;\n const propsWithFormBehavior = withFormValidationBehavior(mergedProps, formContext);\n const inputRefs = createMemo(\n () =>\n [contextBaseProps().inputRef, contextSlotProps?.inputRef, props.inputRef].filter(\n Boolean,\n ) as RefLike<HTMLInputElement>[],\n );\n\n const [local, ariaProps] = splitProps(propsWithFormBehavior, [\n \"class\",\n \"style\",\n \"render\",\n \"ref\",\n \"inputRef\",\n \"slot\",\n \"isIndeterminate\",\n \"description\",\n \"errorMessage\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onHoverChange\",\n ]);\n const descriptionId = createUniqueId();\n const errorMessageId = createUniqueId();\n\n const inputAriaProps = 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 groupState = useContext(CheckboxGroupStateContext);\n\n let isSelected: Accessor<boolean>;\n let isPressed: Accessor<boolean>;\n let isDisabled: Accessor<boolean>;\n let isReadOnly: Accessor<boolean>;\n let isInvalid: Accessor<boolean>;\n let labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n let inputProps: () => JSX.InputHTMLAttributes<HTMLInputElement>;\n\n if (groupState) {\n const itemAria = createCheckboxGroupItem(\n () => ({\n ...inputAriaProps(),\n value: inputAriaProps().value ?? \"\",\n children: typeof mergedProps.children === \"function\" ? true : mergedProps.children,\n }),\n groupState,\n inputElement,\n );\n isSelected = itemAria.isSelected;\n isPressed = itemAria.isPressed;\n labelProps = itemAria.labelProps;\n inputProps = () => itemAria.inputProps;\n } else {\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createToggleState(() => ({\n isSelected: ariaProps.isSelected,\n defaultSelected: ariaProps.defaultSelected,\n onChange: ariaProps.onChange,\n isReadOnly: ariaProps.isReadOnly,\n }));\n\n const checkboxAria = createCheckbox(\n () => ({\n ...inputAriaProps(),\n isIndeterminate: local.isIndeterminate,\n children: typeof mergedProps.children === \"function\" ? true : mergedProps.children,\n }),\n state,\n inputElement,\n );\n isSelected = checkboxAria.isSelected;\n isPressed = checkboxAria.isPressed;\n labelProps = checkboxAria.labelProps;\n inputProps = () => checkboxAria.inputProps;\n }\n isDisabled = () => inputProps().disabled === true;\n isReadOnly = () => inputProps()[\"aria-readonly\"] === true;\n isInvalid = () => inputProps()[\"aria-invalid\"] === true;\n const describedBy = () => {\n const ids = [\n ariaProps[\"aria-describedby\"],\n local.description ? descriptionId : undefined,\n isInvalid() && local.errorMessage ? errorMessageId : undefined,\n ].filter(Boolean);\n return ids.length ? ids.join(\" \") : undefined;\n };\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled() || isReadOnly();\n },\n onHoverStart: local.onHoverStart,\n onHoverEnd: local.onHoverEnd,\n onHoverChange: local.onHoverChange,\n });\n\n const renderValues = createMemo<CheckboxRenderProps>(() => ({\n isSelected: isSelected(),\n isIndeterminate: local.isIndeterminate ?? false,\n isHovered: isHovered(),\n isPressed: isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: isDisabled(),\n isReadOnly: isReadOnly(),\n isInvalid: isInvalid(),\n isRequired: ariaProps.isRequired ?? false,\n }));\n\n const renderProps = useRenderProps(\n {\n children: mergedProps.children,\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Checkbox\",\n },\n renderValues,\n );\n const childRenderValues: CheckboxRenderProps = {\n get isSelected() {\n return isSelected();\n },\n get isIndeterminate() {\n return local.isIndeterminate ?? false;\n },\n get isHovered() {\n return isHovered();\n },\n get isPressed() {\n return isPressed();\n },\n get isFocused() {\n return isFocused();\n },\n get isFocusVisible() {\n return isFocusVisible();\n },\n get isDisabled() {\n return isDisabled();\n },\n get isReadOnly() {\n return isReadOnly();\n },\n get isInvalid() {\n return isInvalid();\n },\n get isRequired() {\n return ariaProps.isRequired ?? false;\n },\n };\n const checkboxChildren = () => {\n const children = mergedProps.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n };\n\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = labelProps 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 cleanInputProps = () => {\n const {\n ref: _ref3,\n onFocus: _onFocus,\n onBlur: _onBlur,\n ...rest\n } = inputProps() as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const {\n ref: _ref4,\n onFocus: _onFocus,\n onBlur: _onBlur,\n ...rest\n } = focusProps as Record<string, unknown>;\n return rest;\n };\n const handleInputFocus: JSX.EventHandler<HTMLInputElement, FocusEvent> = (event) => {\n (\n inputProps() as unknown as { onFocus?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onFocus?.(event);\n (\n focusProps as unknown as { onFocus?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onFocus?.(event);\n };\n const handleInputBlur: JSX.EventHandler<HTMLInputElement, FocusEvent> = (event) => {\n (\n inputProps() as unknown as { onBlur?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onBlur?.(event);\n (focusProps as unknown as { onBlur?: JSX.EventHandler<HTMLInputElement, FocusEvent> }).onBlur?.(\n event,\n );\n };\n const setLabelRef = (el: HTMLLabelElement) => {\n assignRef(local.ref, el);\n };\n const setInputRef = (el: HTMLInputElement) => {\n setInputElement(el);\n for (const ref of inputRefs()) {\n assignRef(ref, el);\n }\n };\n const hiddenInput = (\n <VisuallyHidden>\n <input\n ref={setInputRef}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n onFocus={handleInputFocus}\n onBlur={handleInputBlur}\n aria-describedby={describedBy()}\n />\n </VisuallyHidden>\n );\n const labelChildren = () => (\n <>\n {hiddenInput}\n {checkboxChildren()}\n <Show when={local.description}>\n <span id={descriptionId} slot=\"description\">\n {local.description}\n </span>\n </Show>\n <Show when={isInvalid() && local.errorMessage}>\n <span id={errorMessageId} slot=\"errorMessage\">\n {local.errorMessage}\n </span>\n </Show>\n </>\n );\n const rootProps = createMemo(\n () =>\n ({\n ...domProps(),\n ...cleanLabelProps(),\n ...cleanHoverProps(),\n class: renderProps.class(),\n style: renderProps.style(),\n slot: local.slot,\n \"data-selected\": isSelected() || undefined,\n \"data-indeterminate\": local.isIndeterminate || undefined,\n \"data-pressed\": isPressed() || undefined,\n \"data-hovered\": isHovered() || undefined,\n \"data-focused\": isFocused() || undefined,\n \"data-focus-visible\": isFocusVisible() || undefined,\n \"data-disabled\": isDisabled() || undefined,\n \"data-readonly\": isReadOnly() || undefined,\n \"data-invalid\": isInvalid() || undefined,\n \"data-required\": ariaProps.isRequired || undefined,\n }) as JSX.LabelHTMLAttributes<HTMLLabelElement>,\n );\n const customRootProps = () =>\n ({\n ...rootProps(),\n ref: setLabelRef,\n children: labelChildren(),\n }) as JSX.LabelHTMLAttributes<HTMLLabelElement>;\n\n return local.render ? (\n local.render(customRootProps(), renderValues())\n ) : (\n <label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n ref={setLabelRef}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n data-selected={isSelected() || undefined}\n data-indeterminate={local.isIndeterminate || undefined}\n data-pressed={isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={isDisabled() || undefined}\n data-readonly={isReadOnly() || undefined}\n data-invalid={isInvalid() || undefined}\n data-required={ariaProps.isRequired || undefined}\n >\n {labelChildren()}\n </label>\n );\n}\n\n// ============================================================================\n// CheckboxField + CheckboxButton — the RAC form-field split (RAC 1.19)\n// ----------------------------------------------------------------------------\n// Upstream split the monolithic Checkbox into a CheckboxField wrapper (owns\n// state, validation, and help text) containing a CheckboxButton control (the\n// clickable indicator + label). Mirrors react-aria-components/src/Checkbox.tsx.\n// The legacy `Checkbox` above stays as the deprecated monolith for back-compat.\n//\n// Help text wiring mirrors upstream exactly: CheckboxField has NO description /\n// errorMessage props. createCheckbox (via createToggle) mints descriptionProps /\n// errorMessageProps (slot ids) and bakes the combined aria-describedby into\n// inputProps; the field provides those ids through TextContext slots. Consumers\n// render the help text themselves with `<Text slot=\"description\">` / `<FieldError>`.\n// The field/button handoff still uses a native InternalCheckboxContext (read inside\n// the provider via `Show … keyed`), but the slot wiring is now faithful.\n// ============================================================================\n\nexport interface CheckboxFieldRenderProps {\n /** Whether the checkbox is selected. */\n isSelected: boolean;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate: boolean;\n /** Whether the checkbox is disabled. */\n isDisabled: boolean;\n /** Whether the checkbox is read only. */\n isReadOnly: boolean;\n /** Whether the checkbox is invalid. */\n isInvalid: boolean;\n /** Whether the checkbox is required. */\n isRequired: boolean;\n}\n\nexport interface CheckboxButtonRenderProps extends CheckboxRenderProps {}\n\nexport interface CheckboxFieldProps\n extends Omit<AriaCheckboxProps, \"children\" | \"validationState\">, SlotProps {\n /** The children of the component (typically a `CheckboxButton`). A function may receive render props. */\n children?: RenderChildren<CheckboxFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxFieldRenderProps>;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate?: boolean;\n /** Ref for the checkbox field root element. */\n ref?: RefLike<HTMLDivElement>;\n /** Ref for the underlying input element. */\n inputRef?: RefLike<HTMLInputElement>;\n}\n\nexport interface CheckboxButtonProps extends SlotProps {\n /** The children of the component. A function may receive render props. */\n children?: RenderChildren<CheckboxButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxButtonRenderProps>;\n /** Ref for the outer label element. */\n ref?: RefLike<HTMLLabelElement>;\n /** Handler called when hover starts. */\n onHoverStart?: () => void;\n /** Handler called when hover ends. */\n onHoverEnd?: () => void;\n /** Handler called when hover state changes. */\n onHoverChange?: (isHovered: boolean) => void;\n}\n\nexport interface CheckboxFieldContextValue extends CheckboxFieldProps {\n slots?: Record<string, CheckboxFieldProps>;\n}\nexport const CheckboxFieldContext = createContext<CheckboxFieldContextValue | null>(null);\n\n/** Carries the checkbox aria + state from a CheckboxField/Checkbox wrapper to its CheckboxButton. */\ninterface InternalCheckboxContextValue {\n isSelected: Accessor<boolean>;\n isPressed: Accessor<boolean>;\n isDisabled: Accessor<boolean>;\n isReadOnly: Accessor<boolean>;\n isInvalid: Accessor<boolean>;\n isIndeterminate: Accessor<boolean>;\n isRequired: Accessor<boolean>;\n labelProps: () => JSX.LabelHTMLAttributes<HTMLLabelElement>;\n inputProps: () => JSX.InputHTMLAttributes<HTMLInputElement>;\n setInputRef: (el: HTMLInputElement) => void;\n defaultClassName: string;\n}\nconst InternalCheckboxContext = createContext<InternalCheckboxContextValue | null>(null);\n\n/**\n * A checkbox allows a user to select an item, with support for validation and help text.\n * Wraps a `CheckboxButton` and provides description/error wiring.\n *\n * @example\n * ```tsx\n * <CheckboxField>\n * <CheckboxButton>Accept terms</CheckboxButton>\n * <Text slot=\"description\">Required to continue</Text>\n * </CheckboxField>\n * ```\n */\nexport function CheckboxField(props: CheckboxFieldProps): JSX.Element {\n const [inputElement, setInputElement] = createSignal<HTMLInputElement | null>(null);\n const formContext = useContext(FormContext);\n const contextProps = useContext(CheckboxFieldContext);\n const contextSlotProps = contextProps?.slots?.[props.slot ?? \"default\"];\n const contextBaseProps = createMemo<CheckboxFieldProps>(() => {\n if (!contextProps) return {};\n const { slots: _slots, ...rest } = contextProps;\n return rest;\n });\n const mergedProps = contextProps\n ? (mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) as CheckboxFieldProps)\n : props;\n const propsWithFormBehavior = withFormValidationBehavior(mergedProps, formContext);\n const inputRefs = createMemo(\n () =>\n [contextBaseProps().inputRef, contextSlotProps?.inputRef, props.inputRef].filter(\n Boolean,\n ) as RefLike<HTMLInputElement>[],\n );\n\n // `children` is split out of ariaProps so neither the inputAriaProps key-copy\n // loop nor the hook accessor spread eagerly reads it — reading a Solid\n // `children` getter instantiates the nested CheckboxButton, and doing so\n // OUTSIDE InternalCheckboxContext both breaks its binding and recurses.\n const [local, ariaProps] = splitProps(propsWithFormBehavior, [\n \"class\",\n \"style\",\n \"ref\",\n \"inputRef\",\n \"slot\",\n \"isIndeterminate\",\n \"children\",\n ]);\n\n const inputAriaProps = 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 groupState = useContext(CheckboxGroupStateContext);\n\n let isSelected: Accessor<boolean>;\n let isPressed: Accessor<boolean>;\n let labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n let inputProps: () => JSX.InputHTMLAttributes<HTMLInputElement>;\n let getDescriptionProps: () => JSX.HTMLAttributes<HTMLElement>;\n let getErrorMessageProps: () => JSX.HTMLAttributes<HTMLElement>;\n\n if (groupState) {\n const itemAria = createCheckboxGroupItem(\n () => ({\n ...inputAriaProps(),\n value: inputAriaProps().value ?? \"\",\n // The hook reads `children` only to decide if an aria-label is needed;\n // the visible label lives in the CheckboxButton, so report presence.\n children: true,\n }),\n groupState,\n inputElement,\n );\n isSelected = itemAria.isSelected;\n isPressed = itemAria.isPressed;\n labelProps = itemAria.labelProps;\n inputProps = () => itemAria.inputProps;\n getDescriptionProps = () => itemAria.descriptionProps;\n getErrorMessageProps = () => itemAria.errorMessageProps;\n } else {\n const state = createToggleState(() => ({\n isSelected: ariaProps.isSelected,\n defaultSelected: ariaProps.defaultSelected,\n onChange: ariaProps.onChange,\n isReadOnly: ariaProps.isReadOnly,\n }));\n\n const checkboxAria = createCheckbox(\n () => ({\n ...inputAriaProps(),\n isIndeterminate: local.isIndeterminate,\n children: true,\n }),\n state,\n inputElement,\n );\n isSelected = checkboxAria.isSelected;\n isPressed = checkboxAria.isPressed;\n labelProps = checkboxAria.labelProps;\n inputProps = () => checkboxAria.inputProps;\n getDescriptionProps = () => checkboxAria.descriptionProps;\n getErrorMessageProps = () => checkboxAria.errorMessageProps;\n }\n const isDisabled = () => inputProps().disabled === true;\n const isReadOnly = () => inputProps()[\"aria-readonly\"] === true;\n const isInvalid = () => inputProps()[\"aria-invalid\"] === true;\n const isIndeterminate = () => local.isIndeterminate ?? false;\n const isRequired = () => ariaProps.isRequired ?? false;\n\n const setInputRef = (el: HTMLInputElement) => {\n setInputElement(el);\n for (const ref of inputRefs()) {\n assignRef(ref, el);\n }\n };\n const setFieldRef = (el: HTMLDivElement) => {\n assignRef(local.ref, el);\n };\n\n const internalContext: InternalCheckboxContextValue = {\n isSelected,\n isPressed,\n isDisabled,\n isReadOnly,\n isInvalid,\n isIndeterminate,\n isRequired,\n labelProps: () => labelProps,\n inputProps,\n setInputRef,\n defaultClassName: \"solidaria-CheckboxButton\",\n };\n\n // Slot the description/error message ids onto a TextContext so a child\n // `<Text slot=\"description\">` / `<FieldError>` resolves the id the input's\n // baked aria-describedby references — mirrors upstream CheckboxField.\n const textSlots = {\n slots: {\n get description() {\n return getDescriptionProps();\n },\n get errorMessage() {\n return getErrorMessageProps();\n },\n },\n };\n\n const renderValues = createMemo<CheckboxFieldRenderProps>(() => ({\n isSelected: isSelected(),\n isIndeterminate: isIndeterminate(),\n isDisabled: isDisabled(),\n isReadOnly: isReadOnly(),\n isInvalid: isInvalid(),\n isRequired: isRequired(),\n }));\n\n const renderProps = useRenderProps(\n {\n children: mergedProps.children,\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-CheckboxField\",\n },\n renderValues,\n );\n\n // In a CheckboxGroup, validation is handled at the group level — mirror\n // upstream and provide no per-field FieldErrorContext there.\n const fieldErrorContext: FieldErrorContextValue | null = groupState\n ? null\n : {\n get validation(): ValidationResult {\n return {\n isInvalid: isInvalid(),\n validationDetails: VALID_VALIDITY_STATE,\n validationErrors: [],\n };\n },\n get errorMessageProps() {\n return getErrorMessageProps() as JSX.HTMLAttributes<HTMLElement>;\n },\n };\n\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n // Children are accessed inside the providers (component-execution owner) so a\n // nested CheckboxButton's useContext binds to InternalCheckboxContext.\n const FieldChildren = () => {\n const childRenderValues: CheckboxFieldRenderProps = {\n get isSelected() {\n return isSelected();\n },\n get isIndeterminate() {\n return isIndeterminate();\n },\n get isDisabled() {\n return isDisabled();\n },\n get isReadOnly() {\n return isReadOnly();\n },\n get isInvalid() {\n return isInvalid();\n },\n get isRequired() {\n return isRequired();\n },\n };\n const renderedChildren = createMemo(() => {\n const children = mergedProps.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n });\n return <>{renderedChildren()}</>;\n };\n\n const fieldDiv = (\n <div\n {...domProps()}\n ref={setFieldRef}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n data-selected={isSelected() || undefined}\n data-indeterminate={isIndeterminate() || undefined}\n data-disabled={isDisabled() || undefined}\n data-readonly={isReadOnly() || undefined}\n data-invalid={isInvalid() || undefined}\n data-required={isRequired() || undefined}\n >\n <InternalCheckboxContext.Provider value={internalContext}>\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n <Show when={fieldErrorContext} fallback={<FieldChildren />} keyed>\n {(ctx) => (\n <FieldErrorContext.Provider value={ctx}>\n <FieldChildren />\n </FieldErrorContext.Provider>\n )}\n </Show>\n </Provider>\n </InternalCheckboxContext.Provider>\n </div>\n );\n\n return fieldDiv;\n}\n\n/**\n * A checkbox button is the clickable area of a checkbox, including the indicator and label.\n * Must be rendered inside a `CheckboxField` (or the legacy `Checkbox`).\n */\nexport function CheckboxButton(props: CheckboxButtonProps): JSX.Element {\n const getCtx = createMemo(() => useContext(InternalCheckboxContext));\n return (\n <Show when={getCtx()} fallback={null} keyed>\n {(ctx) => <CheckboxButtonImpl buttonProps={props} ctx={ctx} />}\n </Show>\n );\n}\n\nfunction CheckboxButtonImpl(props: {\n buttonProps: CheckboxButtonProps;\n ctx: InternalCheckboxContextValue;\n}): JSX.Element {\n const { ctx } = props;\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ctx.isDisabled() || ctx.isReadOnly();\n },\n onHoverStart: props.buttonProps.onHoverStart,\n onHoverEnd: props.buttonProps.onHoverEnd,\n onHoverChange: props.buttonProps.onHoverChange,\n });\n\n const renderValues = createMemo<CheckboxButtonRenderProps>(() => ({\n isSelected: ctx.isSelected(),\n isIndeterminate: ctx.isIndeterminate(),\n isHovered: isHovered(),\n isPressed: ctx.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ctx.isDisabled(),\n isReadOnly: ctx.isReadOnly(),\n isInvalid: ctx.isInvalid(),\n isRequired: ctx.isRequired(),\n }));\n\n const renderProps = useRenderProps(\n {\n children: props.buttonProps.children,\n class: props.buttonProps.class,\n style: props.buttonProps.style,\n defaultClassName: ctx.defaultClassName,\n },\n renderValues,\n );\n\n const childRenderValues: CheckboxButtonRenderProps = {\n get isSelected() {\n return ctx.isSelected();\n },\n get isIndeterminate() {\n return ctx.isIndeterminate();\n },\n get isHovered() {\n return isHovered();\n },\n get isPressed() {\n return ctx.isPressed();\n },\n get isFocused() {\n return isFocused();\n },\n get isFocusVisible() {\n return isFocusVisible();\n },\n get isDisabled() {\n return ctx.isDisabled();\n },\n get isReadOnly() {\n return ctx.isReadOnly();\n },\n get isInvalid() {\n return ctx.isInvalid();\n },\n get isRequired() {\n return ctx.isRequired();\n },\n };\n\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = ctx.labelProps() 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 cleanInputProps = () => {\n const {\n ref: _ref3,\n onFocus: _onFocus,\n onBlur: _onBlur,\n ...rest\n } = ctx.inputProps() as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const {\n ref: _ref4,\n onFocus: _onFocus,\n onBlur: _onBlur,\n ...rest\n } = focusProps as Record<string, unknown>;\n return rest;\n };\n const handleInputFocus: JSX.EventHandler<HTMLInputElement, FocusEvent> = (event) => {\n (\n ctx.inputProps() as unknown as { onFocus?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onFocus?.(event);\n (\n focusProps as unknown as { onFocus?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onFocus?.(event);\n };\n const handleInputBlur: JSX.EventHandler<HTMLInputElement, FocusEvent> = (event) => {\n (\n ctx.inputProps() as unknown as { onBlur?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onBlur?.(event);\n (focusProps as unknown as { onBlur?: JSX.EventHandler<HTMLInputElement, FocusEvent> }).onBlur?.(\n event,\n );\n };\n const setButtonRef = (el: HTMLLabelElement) => {\n assignRef(props.buttonProps.ref, el);\n };\n\n const buttonChildren = () => {\n const children = props.buttonProps.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n };\n\n return (\n <label\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n ref={setButtonRef}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={props.buttonProps.slot}\n data-selected={ctx.isSelected() || undefined}\n data-indeterminate={ctx.isIndeterminate() || undefined}\n data-pressed={ctx.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={ctx.isDisabled() || undefined}\n data-readonly={ctx.isReadOnly() || undefined}\n data-invalid={ctx.isInvalid() || undefined}\n data-required={ctx.isRequired() || undefined}\n >\n <VisuallyHidden>\n <input\n ref={ctx.setInputRef}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n onFocus={handleInputFocus}\n onBlur={handleInputBlur}\n />\n </VisuallyHidden>\n {buttonChildren()}\n </label>\n );\n}\n"],"mappings":";;;;;;;;;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AM,WAAW,MAAM,YAAY;EACnC,OAAO,OAAO,aAAa,aAAa,SAAS,iBAAiB,IAAI;CACxE;CAEA,OACE,CAAC,UACK,gBAAgB,OAChB,gBAAgB,GACpB,KAAK,cACL,OAAO,YAAY,MAAM,GACzB,OAAO,YAAY,MAAM,GACzB,MAAM,MAAM,YAAY,MACxB,eAAe,IAAI,WAAW,KAAK,KAAA,GACnC,oBAAoB,IAAI,gBAAgB,KAAK,KAAA,GAC7C,cAAc,IAAI,UAAU,KAAK,KAAA,GACjC,cAAc,UAAU,KAAK,KAAA,GAC7B,cAAc,UAAU,KAAK,KAAA,GAC7B,oBAAoB,eAAe,KAAK,KAAA,GACxC,eAAe,IAAI,WAAW,KAAK,KAAA,GACnC,eAAe,IAAI,WAAW,KAAK,KAAA,GACnC,cAAc,IAAI,UAAU,KAAK,KAAA,GACjC,eAAe,IAAI,WAAW,KAAK,KAAA,GACpC;MACC,CAAC,eAAe;QACd,CAAC,MACC,KAAK,IAAI,iBACL,gBAAgB,OAChB,gBAAgB,GACpB,SAAS,kBACT,QAAQ,mBACR;MACJ,EAAE,eAAe;OAChB,eAAe,EAAE;IACpB,EAAE;AAEN"}
|
|
1
|
+
{"version":3,"file":"Checkbox.jsx","names":["assignRef"],"sources":["../src/Checkbox.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/Checkbox.tsx\n\n/**\n * Checkbox and CheckboxGroup components for solidaria-components\n *\n * Pre-wired headless checkbox components that combine state + aria hooks.\n * Port of react-aria-components/src/Checkbox.tsx\n */\n\nimport {\n createContext,\n useContext,\n createMemo,\n createSignal,\n createUniqueId,\n Show,\n} from \"solid-js\";\nimport type { Context, Accessor } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n createCheckbox,\n createCheckboxGroup,\n createCheckboxGroupItem,\n createFocusRing,\n createHover,\n mergeProps,\n type AriaCheckboxProps,\n type AriaCheckboxGroupProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createToggleState,\n createCheckboxGroupState,\n VALID_VALIDITY_STATE,\n type CheckboxGroupState,\n type ValidationResult,\n} from \"@proyecto-viviana/solid-stately\";\nimport { VisuallyHidden } from \"./VisuallyHidden\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n Provider,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n isAriaTrue,\n} from \"./utils\";\nimport { FormContext, resolveValidationBehavior } from \"./Form\";\nimport { FieldErrorContext, type FieldErrorContextValue } from \"./FieldError\";\nimport { TextContext } from \"./Text\";\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\nexport interface CheckboxGroupRenderProps {\n /** Whether the checkbox group is disabled. */\n isDisabled: boolean;\n /** Whether the checkbox group is read only. */\n isReadOnly: boolean;\n /** Whether the checkbox group is required. */\n isRequired: boolean;\n /** Whether the checkbox group is invalid. */\n isInvalid: boolean;\n /** State of the checkbox group. */\n state: CheckboxGroupState;\n}\n\nexport interface CheckboxRenderProps {\n /** Whether the checkbox is selected. */\n isSelected: boolean;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate: boolean;\n /** Whether the checkbox is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the checkbox is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the checkbox is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the checkbox is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the checkbox is disabled. */\n isDisabled: boolean;\n /** Whether the checkbox is read only. */\n isReadOnly: boolean;\n /** Whether the checkbox is invalid. */\n isInvalid: boolean;\n /** Whether the checkbox is required. */\n isRequired: boolean;\n}\n\nexport interface CheckboxGroupProps\n extends Omit<AriaCheckboxGroupProps, \"children\" | \"label\">, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CheckboxGroupRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxGroupRenderProps>;\n /** Ref for the checkbox group root element. */\n ref?: RefLike<HTMLDivElement>;\n /**\n * Whether this component renders its own description/error-message elements.\n * A styled layer (e.g. solid-spectrum) that renders its own HelpText via a\n * `<Text slot>` sets this to `false`: the wiring stays here — the single source\n * of truth that mints the description/error ids and threads them onto the group\n * and every item's `aria-describedby` — while the visible node is owned by the\n * styled layer. Mirrors RAC, where the group provides a `TextContext` slot and\n * never renders its own description node.\n * @default true\n */\n renderHelpText?: boolean;\n}\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, \"children\">, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CheckboxRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxRenderProps>;\n /** Custom renderer for the outer label element. */\n render?: (\n props: JSX.LabelHTMLAttributes<HTMLLabelElement>,\n renderProps: CheckboxRenderProps,\n ) => JSX.Element;\n /** Ref for the outer label element. */\n ref?: RefLike<HTMLLabelElement>;\n /** Ref for the underlying input element. */\n inputRef?: RefLike<HTMLInputElement>;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate?: boolean;\n /** A description for the checkbox. */\n description?: JSX.Element;\n /** An error message for the checkbox. */\n errorMessage?: JSX.Element;\n /** Handler called when hover starts. */\n onHoverStart?: () => void;\n /** Handler called when hover ends. */\n onHoverEnd?: () => void;\n /** Handler called when hover state changes. */\n onHoverChange?: (isHovered: boolean) => void;\n}\n\nexport const CheckboxGroupContext = createContext<CheckboxGroupProps | null>(null);\nexport const CheckboxGroupStateContext = createContext<CheckboxGroupState | null>(null);\nexport interface CheckboxContextValue extends CheckboxProps {\n slots?: Record<string, CheckboxProps>;\n}\nexport const CheckboxContext = createContext<CheckboxContextValue | null>(null);\n\n/**\n * A checkbox group allows a user to select multiple items from a list of options.\n *\n * @example\n * ```tsx\n * <CheckboxGroup>\n * <Checkbox value=\"one\">Option 1</Checkbox>\n * <Checkbox value=\"two\">Option 2</Checkbox>\n * </CheckboxGroup>\n * ```\n */\nexport function CheckboxGroup(props: CheckboxGroupProps): JSX.Element {\n const formContext = useContext(FormContext);\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"ref\",\n \"description\",\n \"errorMessage\",\n \"renderHelpText\",\n \"children\",\n ]);\n\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createCheckboxGroupState(() => ({\n value: ariaProps.value,\n defaultValue: ariaProps.defaultValue,\n onChange: ariaProps.onChange,\n isDisabled: ariaProps.isDisabled,\n isReadOnly: ariaProps.isReadOnly,\n isRequired: ariaProps.isRequired,\n isInvalid: ariaProps.isInvalid,\n validationState: ariaProps.validationState,\n validate: ariaProps.validate,\n validationBehavior: resolveValidationBehavior(ariaProps.validationBehavior, formContext),\n name: ariaProps.name,\n }));\n\n const groupAria = createCheckboxGroup(\n () => ({\n ...ariaProps,\n validationBehavior: resolveValidationBehavior(ariaProps.validationBehavior, formContext),\n description: local.description,\n errorMessage: local.errorMessage,\n }),\n state,\n );\n\n const renderValues = createMemo<CheckboxGroupRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: ariaProps.isRequired ?? false,\n isInvalid: groupAria.isInvalid,\n state,\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-CheckboxGroup\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = groupAria.groupProps as Record<string, unknown>;\n return rest;\n };\n const setGroupRef = (el: HTMLDivElement) => {\n assignRef(local.ref, el);\n };\n const groupDescribedBy = () => {\n const ids = [\n (cleanGroupProps() as { \"aria-describedby\"?: string })[\"aria-describedby\"],\n local.description ? groupAria.descriptionProps.id : undefined,\n groupAria.isInvalid && local.errorMessage ? groupAria.errorMessageProps.id : 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\n const GroupChildren = () => {\n const childRenderValues: CheckboxGroupRenderProps = {\n get isDisabled() {\n return state.isDisabled;\n },\n get isReadOnly() {\n return state.isReadOnly;\n },\n get isRequired() {\n return state.isRequired();\n },\n get isInvalid() {\n return groupAria.isInvalid;\n },\n get state() {\n return state;\n },\n };\n const renderedChildren = createMemo(() => {\n const children = local.children;\n if (typeof children === \"function\") {\n return children.length > 0\n ? children(childRenderValues)\n : (children as unknown as () => JSX.Element)();\n }\n return children;\n });\n\n return <>{renderedChildren()}</>;\n };\n\n return (\n <CheckboxGroupStateContext value={state}>\n <div\n {...domProps()}\n {...cleanGroupProps()}\n ref={setGroupRef}\n aria-describedby={groupDescribedBy()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled)}\n data-readonly={dataAttr(state.isReadOnly)}\n data-required={dataAttr(ariaProps.isRequired)}\n data-invalid={dataAttr(groupAria.isInvalid)}\n >\n <GroupChildren />\n {/* A styled layer can own the visible HelpText (renderHelpText={false});\n the id wiring above still runs so the group and its items stay\n associated. Default true keeps the bare headless self-sufficient. */}\n <Show when={(local.renderHelpText ?? true) && local.description}>\n <div {...(groupAria.descriptionProps as unknown as JSX.HTMLAttributes<HTMLDivElement>)}>\n {local.description}\n </div>\n </Show>\n <Show when={(local.renderHelpText ?? true) && groupAria.isInvalid && local.errorMessage}>\n <div {...(groupAria.errorMessageProps as unknown as JSX.HTMLAttributes<HTMLDivElement>)}>\n {local.errorMessage}\n </div>\n </Show>\n </div>\n </CheckboxGroupStateContext>\n );\n}\n\n/**\n * A checkbox allows a user to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n *\n * @example\n * ```tsx\n * <Checkbox>\n * {({ isSelected }) => (\n * <>\n * <span class={`checkbox ${isSelected ? 'checked' : ''}`}>\n * {isSelected && '✓'}\n * </span>\n * <span>Accept terms</span>\n * </>\n * )}\n * </Checkbox>\n * ```\n */\nexport function Checkbox(props: CheckboxProps): JSX.Element {\n const [inputElement, setInputElement] = createSignal<HTMLInputElement | null>(null);\n const formContext = useContext(FormContext);\n const contextProps = useContext(CheckboxContext);\n const contextSlotProps =\n contextProps?.slots?.[typeof props.slot === \"string\" ? props.slot : \"default\"];\n const contextBaseProps = createMemo<CheckboxProps>(() => {\n if (!contextProps) return {};\n const { slots: _slots, ...rest } = contextProps;\n return rest;\n });\n const mergedProps = contextProps\n ? (mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) as CheckboxProps)\n : props;\n const inputRefs = createMemo(\n () =>\n [contextBaseProps().inputRef, contextSlotProps?.inputRef, props.inputRef].filter(\n Boolean,\n ) as RefLike<HTMLInputElement>[],\n );\n const [local, ariaProps] = splitProps(mergedProps, [\n \"class\",\n \"style\",\n \"render\",\n \"ref\",\n \"inputRef\",\n \"slot\",\n \"isIndeterminate\",\n \"description\",\n \"errorMessage\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onHoverChange\",\n ]);\n const descriptionId = createUniqueId();\n const errorMessageId = createUniqueId();\n\n const inputAriaProps = 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 groupState = useContext(CheckboxGroupStateContext);\n\n let isSelected: Accessor<boolean>;\n let isPressed: Accessor<boolean>;\n let isDisabled: Accessor<boolean>;\n let isReadOnly: Accessor<boolean>;\n let isInvalid: Accessor<boolean>;\n let labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n let inputProps: () => JSX.InputHTMLAttributes<HTMLInputElement>;\n\n if (groupState) {\n const itemAria = createCheckboxGroupItem(\n () => ({\n ...inputAriaProps(),\n // Item native default would shadow CheckboxGroup's aria (createCheckboxGroupItem:\n // props ?? group ?? native). Form fallback only.\n validationBehavior: ariaProps.validationBehavior ?? formContext?.validationBehavior,\n value: inputAriaProps().value ?? \"\",\n children: typeof mergedProps.children === \"function\" ? true : mergedProps.children,\n }),\n groupState,\n inputElement,\n );\n isSelected = itemAria.isSelected;\n isPressed = itemAria.isPressed;\n labelProps = itemAria.labelProps;\n inputProps = () => itemAria.inputProps;\n } else {\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createToggleState(() => ({\n isSelected: ariaProps.isSelected,\n defaultSelected: ariaProps.defaultSelected,\n onChange: ariaProps.onChange,\n isReadOnly: ariaProps.isReadOnly,\n }));\n\n const checkboxAria = createCheckbox(\n () => ({\n ...inputAriaProps(),\n validationBehavior: resolveValidationBehavior(ariaProps.validationBehavior, formContext),\n isIndeterminate: local.isIndeterminate,\n children: typeof mergedProps.children === \"function\" ? true : mergedProps.children,\n }),\n state,\n inputElement,\n );\n isSelected = checkboxAria.isSelected;\n isPressed = checkboxAria.isPressed;\n labelProps = checkboxAria.labelProps;\n inputProps = () => checkboxAria.inputProps;\n }\n isDisabled = () => inputProps().disabled === true;\n isReadOnly = () => isAriaTrue(inputProps()[\"aria-readonly\"]);\n isInvalid = () => isAriaTrue(inputProps()[\"aria-invalid\"]);\n const describedBy = () => {\n const ids = [\n (inputProps() as { \"aria-describedby\"?: string })[\"aria-describedby\"],\n ariaProps[\"aria-describedby\"],\n local.description ? descriptionId : undefined,\n isInvalid() && local.errorMessage ? 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\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled() || isReadOnly();\n },\n onHoverStart: local.onHoverStart,\n onHoverEnd: local.onHoverEnd,\n onHoverChange: local.onHoverChange,\n });\n\n const renderValues = createMemo<CheckboxRenderProps>(() => ({\n isSelected: isSelected(),\n isIndeterminate: local.isIndeterminate ?? false,\n isHovered: isHovered(),\n isPressed: isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: isDisabled(),\n isReadOnly: isReadOnly(),\n isInvalid: isInvalid(),\n isRequired: ariaProps.isRequired ?? false,\n }));\n\n const renderProps = useRenderProps(\n {\n children: mergedProps.children,\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Checkbox\",\n },\n renderValues,\n );\n const childRenderValues: CheckboxRenderProps = {\n get isSelected() {\n return isSelected();\n },\n get isIndeterminate() {\n return local.isIndeterminate ?? false;\n },\n get isHovered() {\n return isHovered();\n },\n get isPressed() {\n return isPressed();\n },\n get isFocused() {\n return isFocused();\n },\n get isFocusVisible() {\n return isFocusVisible();\n },\n get isDisabled() {\n return isDisabled();\n },\n get isReadOnly() {\n return isReadOnly();\n },\n get isInvalid() {\n return isInvalid();\n },\n get isRequired() {\n return ariaProps.isRequired ?? false;\n },\n };\n const checkboxChildren = () => {\n const children = mergedProps.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n };\n\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = labelProps 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 cleanInputProps = () => {\n const {\n ref: _ref3,\n onFocus: _onFocus,\n onBlur: _onBlur,\n ...rest\n } = inputProps() as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const {\n ref: _ref4,\n onFocus: _onFocus,\n onBlur: _onBlur,\n ...rest\n } = focusProps as Record<string, unknown>;\n return rest;\n };\n const handleInputFocus: JSX.EventHandler<HTMLInputElement, FocusEvent> = (event) => {\n (\n inputProps() as unknown as { onFocus?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onFocus?.(event);\n (\n focusProps as unknown as { onFocus?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onFocus?.(event);\n };\n const handleInputBlur: JSX.EventHandler<HTMLInputElement, FocusEvent> = (event) => {\n (\n inputProps() as unknown as { onBlur?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onBlur?.(event);\n (focusProps as unknown as { onBlur?: JSX.EventHandler<HTMLInputElement, FocusEvent> }).onBlur?.(\n event,\n );\n };\n const setLabelRef = (el: HTMLLabelElement) => {\n assignRef(local.ref, el);\n };\n const setInputRef = (el: HTMLInputElement) => {\n setInputElement(el);\n for (const ref of inputRefs()) {\n assignRef(ref, el);\n }\n };\n const hiddenInput = (\n <VisuallyHidden>\n <input\n ref={setInputRef}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n onFocus={handleInputFocus}\n onBlur={handleInputBlur}\n aria-describedby={describedBy()}\n />\n </VisuallyHidden>\n );\n const labelChildren = () => (\n <>\n {hiddenInput}\n {checkboxChildren()}\n <Show when={local.description}>\n <span id={descriptionId} slot=\"description\">\n {local.description}\n </span>\n </Show>\n <Show when={isInvalid() && local.errorMessage}>\n <span id={errorMessageId} slot=\"errorMessage\">\n {local.errorMessage}\n </span>\n </Show>\n </>\n );\n const rootProps = createMemo(\n () =>\n ({\n ...domProps(),\n ...cleanLabelProps(),\n ...cleanHoverProps(),\n class: renderProps.class(),\n style: renderProps.style(),\n slot: local.slot,\n \"data-selected\": isSelected() || undefined,\n \"data-indeterminate\": local.isIndeterminate || undefined,\n \"data-pressed\": isPressed() || undefined,\n \"data-hovered\": isHovered() || undefined,\n \"data-focused\": isFocused() || undefined,\n \"data-focus-visible\": isFocusVisible() || undefined,\n \"data-disabled\": isDisabled() || undefined,\n \"data-readonly\": isReadOnly() || undefined,\n \"data-invalid\": isInvalid() || undefined,\n \"data-required\": ariaProps.isRequired || undefined,\n }) as JSX.LabelHTMLAttributes<HTMLLabelElement>,\n );\n const customRootProps = () =>\n ({\n ...rootProps(),\n ref: setLabelRef,\n children: labelChildren(),\n }) as JSX.LabelHTMLAttributes<HTMLLabelElement>;\n\n return local.render ? (\n local.render(customRootProps(), renderValues())\n ) : (\n <label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n ref={setLabelRef}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n data-selected={dataAttr(isSelected())}\n data-indeterminate={dataAttr(local.isIndeterminate)}\n data-pressed={dataAttr(isPressed())}\n data-hovered={dataAttr(isHovered())}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n data-disabled={dataAttr(isDisabled())}\n data-readonly={dataAttr(isReadOnly())}\n data-invalid={dataAttr(isInvalid())}\n data-required={dataAttr(ariaProps.isRequired)}\n >\n {labelChildren()}\n </label>\n );\n}\n\n// ============================================================================\n// CheckboxField + CheckboxButton — the RAC form-field split (RAC 1.19)\n// ----------------------------------------------------------------------------\n// Upstream split the monolithic Checkbox into a CheckboxField wrapper (owns\n// state, validation, and help text) containing a CheckboxButton control (the\n// clickable indicator + label). Mirrors react-aria-components/src/Checkbox.tsx.\n// The legacy `Checkbox` above stays as the deprecated monolith for back-compat.\n//\n// Help text wiring mirrors upstream exactly: CheckboxField has NO description /\n// errorMessage props. createCheckbox (via createToggle) mints descriptionProps /\n// errorMessageProps (slot ids) and bakes the combined aria-describedby into\n// inputProps; the field provides those ids through TextContext slots. Consumers\n// render the help text themselves with `<Text slot=\"description\">` / `<FieldError>`.\n// The field/button handoff still uses a native InternalCheckboxContext (read inside\n// the provider via `Show … keyed`), but the slot wiring is now faithful.\n// ============================================================================\n\nexport interface CheckboxFieldRenderProps {\n /** Whether the checkbox is selected. */\n isSelected: boolean;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate: boolean;\n /** Whether the checkbox is disabled. */\n isDisabled: boolean;\n /** Whether the checkbox is read only. */\n isReadOnly: boolean;\n /** Whether the checkbox is invalid. */\n isInvalid: boolean;\n /** Whether the checkbox is required. */\n isRequired: boolean;\n}\n\nexport interface CheckboxButtonRenderProps extends CheckboxRenderProps {}\n\nexport interface CheckboxFieldProps\n extends Omit<AriaCheckboxProps, \"children\" | \"validationState\">, SlotProps {\n /** The children of the component (typically a `CheckboxButton`). A function may receive render props. */\n children?: RenderChildren<CheckboxFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxFieldRenderProps>;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate?: boolean;\n /** Ref for the checkbox field root element. */\n ref?: RefLike<HTMLDivElement>;\n /** Ref for the underlying input element. */\n inputRef?: RefLike<HTMLInputElement>;\n}\n\nexport interface CheckboxButtonProps extends SlotProps {\n /** The children of the component. A function may receive render props. */\n children?: RenderChildren<CheckboxButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxButtonRenderProps>;\n /** Ref for the outer label element. */\n ref?: RefLike<HTMLLabelElement>;\n /** Handler called when hover starts. */\n onHoverStart?: () => void;\n /** Handler called when hover ends. */\n onHoverEnd?: () => void;\n /** Handler called when hover state changes. */\n onHoverChange?: (isHovered: boolean) => void;\n}\n\nexport interface CheckboxFieldContextValue extends CheckboxFieldProps {\n slots?: Record<string, CheckboxFieldProps>;\n}\nexport const CheckboxFieldContext = createContext<CheckboxFieldContextValue | null>(null);\n\n/** Carries the checkbox aria + state from a CheckboxField/Checkbox wrapper to its CheckboxButton. */\ninterface InternalCheckboxContextValue {\n isSelected: Accessor<boolean>;\n isPressed: Accessor<boolean>;\n isDisabled: Accessor<boolean>;\n isReadOnly: Accessor<boolean>;\n isInvalid: Accessor<boolean>;\n isIndeterminate: Accessor<boolean>;\n isRequired: Accessor<boolean>;\n labelProps: () => JSX.LabelHTMLAttributes<HTMLLabelElement>;\n inputProps: () => JSX.InputHTMLAttributes<HTMLInputElement>;\n setInputRef: (el: HTMLInputElement) => void;\n defaultClassName: string;\n}\nconst InternalCheckboxContext = createContext<InternalCheckboxContextValue | null>(null);\n\n/**\n * A checkbox allows a user to select an item, with support for validation and help text.\n * Wraps a `CheckboxButton` and provides description/error wiring.\n *\n * @example\n * ```tsx\n * <CheckboxField>\n * <CheckboxButton>Accept terms</CheckboxButton>\n * <Text slot=\"description\">Required to continue</Text>\n * </CheckboxField>\n * ```\n */\nexport function CheckboxField(props: CheckboxFieldProps): JSX.Element {\n const [inputElement, setInputElement] = createSignal<HTMLInputElement | null>(null);\n const formContext = useContext(FormContext);\n const contextProps = useContext(CheckboxFieldContext);\n const contextSlotProps =\n contextProps?.slots?.[typeof props.slot === \"string\" ? props.slot : \"default\"];\n const contextBaseProps = createMemo<CheckboxFieldProps>(() => {\n if (!contextProps) return {};\n const { slots: _slots, ...rest } = contextProps;\n return rest;\n });\n const mergedProps = contextProps\n ? (mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) as CheckboxFieldProps)\n : props;\n const inputRefs = createMemo(\n () =>\n [contextBaseProps().inputRef, contextSlotProps?.inputRef, props.inputRef].filter(\n Boolean,\n ) as RefLike<HTMLInputElement>[],\n );\n const [local, ariaProps] = splitProps(mergedProps, [\n \"class\",\n \"style\",\n \"ref\",\n \"inputRef\",\n \"slot\",\n \"isIndeterminate\",\n \"children\",\n ]);\n\n const inputAriaProps = 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 groupState = useContext(CheckboxGroupStateContext);\n\n let isSelected: Accessor<boolean>;\n let isPressed: Accessor<boolean>;\n let labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n let inputProps: () => JSX.InputHTMLAttributes<HTMLInputElement>;\n let getDescriptionProps: () => JSX.HTMLAttributes<HTMLElement>;\n let getErrorMessageProps: () => JSX.HTMLAttributes<HTMLElement>;\n\n if (groupState) {\n const itemAria = createCheckboxGroupItem(\n () => ({\n ...inputAriaProps(),\n // Item native default would shadow CheckboxGroup's aria (createCheckboxGroupItem:\n // props ?? group ?? native). Form fallback only.\n validationBehavior: ariaProps.validationBehavior ?? formContext?.validationBehavior,\n value: inputAriaProps().value ?? \"\",\n // The hook reads `children` only to decide if an aria-label is needed;\n // the visible label lives in the CheckboxButton, so report presence.\n children: true,\n }),\n groupState,\n inputElement,\n );\n isSelected = itemAria.isSelected;\n isPressed = itemAria.isPressed;\n labelProps = itemAria.labelProps;\n inputProps = () => itemAria.inputProps;\n getDescriptionProps = () => itemAria.descriptionProps;\n getErrorMessageProps = () => itemAria.errorMessageProps;\n } else {\n const state = createToggleState(() => ({\n isSelected: ariaProps.isSelected,\n defaultSelected: ariaProps.defaultSelected,\n onChange: ariaProps.onChange,\n isReadOnly: ariaProps.isReadOnly,\n }));\n\n const checkboxAria = createCheckbox(\n () => ({\n ...inputAriaProps(),\n validationBehavior: resolveValidationBehavior(ariaProps.validationBehavior, formContext),\n isIndeterminate: local.isIndeterminate,\n children: true,\n }),\n state,\n inputElement,\n );\n isSelected = checkboxAria.isSelected;\n isPressed = checkboxAria.isPressed;\n labelProps = checkboxAria.labelProps;\n inputProps = () => checkboxAria.inputProps;\n getDescriptionProps = () => checkboxAria.descriptionProps;\n getErrorMessageProps = () => checkboxAria.errorMessageProps;\n }\n const isDisabled = () => inputProps().disabled === true;\n const isReadOnly = () => isAriaTrue(inputProps()[\"aria-readonly\"]);\n const isInvalid = () => isAriaTrue(inputProps()[\"aria-invalid\"]);\n const isIndeterminate = () => local.isIndeterminate ?? false;\n const isRequired = () => ariaProps.isRequired ?? false;\n\n const setInputRef = (el: HTMLInputElement) => {\n setInputElement(el);\n for (const ref of inputRefs()) {\n assignRef(ref, el);\n }\n };\n const setFieldRef = (el: HTMLDivElement) => {\n assignRef(local.ref, el);\n };\n\n const internalContext: InternalCheckboxContextValue = {\n isSelected,\n isPressed,\n isDisabled,\n isReadOnly,\n isInvalid,\n isIndeterminate,\n isRequired,\n labelProps: () => labelProps,\n inputProps,\n setInputRef,\n defaultClassName: \"solidaria-CheckboxButton\",\n };\n\n // Slot the description/error message ids onto a TextContext so a child\n // `<Text slot=\"description\">` / `<FieldError>` resolves the id the input's\n // baked aria-describedby references — mirrors upstream CheckboxField.\n const textSlots = {\n slots: {\n get description() {\n return getDescriptionProps();\n },\n get errorMessage() {\n return getErrorMessageProps();\n },\n },\n };\n\n const renderValues = createMemo<CheckboxFieldRenderProps>(() => ({\n isSelected: isSelected(),\n isIndeterminate: isIndeterminate(),\n isDisabled: isDisabled(),\n isReadOnly: isReadOnly(),\n isInvalid: isInvalid(),\n isRequired: isRequired(),\n }));\n\n const renderProps = useRenderProps(\n {\n children: mergedProps.children,\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-CheckboxField\",\n },\n renderValues,\n );\n\n // In a CheckboxGroup, validation is handled at the group level — mirror\n // upstream and provide no per-field FieldErrorContext there.\n const fieldErrorContext: FieldErrorContextValue | null = groupState\n ? null\n : {\n get validation(): ValidationResult {\n return {\n isInvalid: isInvalid(),\n validationDetails: VALID_VALIDITY_STATE,\n validationErrors: [],\n };\n },\n get errorMessageProps() {\n return getErrorMessageProps() as JSX.HTMLAttributes<HTMLElement>;\n },\n };\n\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n // Children are accessed inside the providers (component-execution owner) so a\n // nested CheckboxButton's useContext binds to InternalCheckboxContext.\n const FieldChildren = () => {\n const childRenderValues: CheckboxFieldRenderProps = {\n get isSelected() {\n return isSelected();\n },\n get isIndeterminate() {\n return isIndeterminate();\n },\n get isDisabled() {\n return isDisabled();\n },\n get isReadOnly() {\n return isReadOnly();\n },\n get isInvalid() {\n return isInvalid();\n },\n get isRequired() {\n return isRequired();\n },\n };\n const renderedChildren = createMemo(() => {\n const children = mergedProps.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n });\n return <>{renderedChildren()}</>;\n };\n\n const fieldDiv = (\n <div\n {...domProps()}\n ref={setFieldRef}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n data-selected={dataAttr(isSelected())}\n data-indeterminate={dataAttr(isIndeterminate())}\n data-disabled={dataAttr(isDisabled())}\n data-readonly={dataAttr(isReadOnly())}\n data-invalid={dataAttr(isInvalid())}\n data-required={dataAttr(isRequired())}\n >\n <InternalCheckboxContext value={internalContext}>\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n <Show when={fieldErrorContext} fallback={<FieldChildren />} keyed>\n {(ctx) => (\n <FieldErrorContext value={ctx}>\n <FieldChildren />\n </FieldErrorContext>\n )}\n </Show>\n </Provider>\n </InternalCheckboxContext>\n </div>\n );\n\n return fieldDiv;\n}\n\n/**\n * A checkbox button is the clickable area of a checkbox, including the indicator and label.\n * Must be rendered inside a `CheckboxField` (or the legacy `Checkbox`).\n */\nexport function CheckboxButton(props: CheckboxButtonProps): JSX.Element {\n const getCtx = createMemo(() => useContext(InternalCheckboxContext));\n return (\n <Show when={getCtx()} fallback={null} keyed>\n {(ctx) => <CheckboxButtonImpl buttonProps={props} ctx={ctx} />}\n </Show>\n );\n}\n\nfunction CheckboxButtonImpl(props: {\n buttonProps: CheckboxButtonProps;\n ctx: InternalCheckboxContextValue;\n}): JSX.Element {\n const { ctx } = props;\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ctx.isDisabled() || ctx.isReadOnly();\n },\n onHoverStart: props.buttonProps.onHoverStart,\n onHoverEnd: props.buttonProps.onHoverEnd,\n onHoverChange: props.buttonProps.onHoverChange,\n });\n\n const renderValues = createMemo<CheckboxButtonRenderProps>(() => ({\n isSelected: ctx.isSelected(),\n isIndeterminate: ctx.isIndeterminate(),\n isHovered: isHovered(),\n isPressed: ctx.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ctx.isDisabled(),\n isReadOnly: ctx.isReadOnly(),\n isInvalid: ctx.isInvalid(),\n isRequired: ctx.isRequired(),\n }));\n\n const renderProps = useRenderProps(\n {\n children: props.buttonProps.children,\n class: props.buttonProps.class,\n style: props.buttonProps.style,\n defaultClassName: ctx.defaultClassName,\n },\n renderValues,\n );\n\n const childRenderValues: CheckboxButtonRenderProps = {\n get isSelected() {\n return ctx.isSelected();\n },\n get isIndeterminate() {\n return ctx.isIndeterminate();\n },\n get isHovered() {\n return isHovered();\n },\n get isPressed() {\n return ctx.isPressed();\n },\n get isFocused() {\n return isFocused();\n },\n get isFocusVisible() {\n return isFocusVisible();\n },\n get isDisabled() {\n return ctx.isDisabled();\n },\n get isReadOnly() {\n return ctx.isReadOnly();\n },\n get isInvalid() {\n return ctx.isInvalid();\n },\n get isRequired() {\n return ctx.isRequired();\n },\n };\n\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = ctx.labelProps() 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 cleanInputProps = () => {\n const {\n ref: _ref3,\n onFocus: _onFocus,\n onBlur: _onBlur,\n ...rest\n } = ctx.inputProps() as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const {\n ref: _ref4,\n onFocus: _onFocus,\n onBlur: _onBlur,\n ...rest\n } = focusProps as Record<string, unknown>;\n return rest;\n };\n const handleInputFocus: JSX.EventHandler<HTMLInputElement, FocusEvent> = (event) => {\n (\n ctx.inputProps() as unknown as { onFocus?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onFocus?.(event);\n (\n focusProps as unknown as { onFocus?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onFocus?.(event);\n };\n const handleInputBlur: JSX.EventHandler<HTMLInputElement, FocusEvent> = (event) => {\n (\n ctx.inputProps() as unknown as { onBlur?: JSX.EventHandler<HTMLInputElement, FocusEvent> }\n ).onBlur?.(event);\n (focusProps as unknown as { onBlur?: JSX.EventHandler<HTMLInputElement, FocusEvent> }).onBlur?.(\n event,\n );\n };\n const setButtonRef = (el: HTMLLabelElement) => {\n assignRef(props.buttonProps.ref, el);\n };\n\n const buttonChildren = () => {\n const children = props.buttonProps.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n };\n\n return (\n <label\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n ref={setButtonRef}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={props.buttonProps.slot}\n data-selected={dataAttr(ctx.isSelected())}\n data-indeterminate={dataAttr(ctx.isIndeterminate())}\n data-pressed={dataAttr(ctx.isPressed())}\n data-hovered={dataAttr(isHovered())}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n data-disabled={dataAttr(ctx.isDisabled())}\n data-readonly={dataAttr(ctx.isReadOnly())}\n data-invalid={dataAttr(ctx.isInvalid())}\n data-required={dataAttr(ctx.isRequired())}\n >\n <VisuallyHidden>\n <input\n ref={ctx.setInputRef}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n onFocus={handleInputF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