@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/Switch.js
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/Switch.tsx
|
|
13
|
+
import { Provider, dataAttr, filterDOMProps, useRenderProps } from "./utils.js";
|
|
2
14
|
import { VisuallyHidden } from "./VisuallyHidden.js";
|
|
3
|
-
import { FieldErrorContext } from "./FieldError.js";
|
|
4
15
|
import { TextContext } from "./Text.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
16
|
+
import { FieldErrorContext } from "./FieldError.js";
|
|
17
|
+
import { createComponent, getNextElement, getNextMarker, insert, memo, ref, runHydrationEvents, setAttribute, spread, template } from "@solidjs/web";
|
|
18
|
+
import { Show, createContext, createMemo, createSignal, createUniqueId, untrack, useContext } from "solid-js";
|
|
19
|
+
import { createFocusRing, createHover, createSwitch, mergeProps as mergeProps$1 } from "@proyecto-viviana/solidaria";
|
|
20
|
+
import { splitProps } from "@proyecto-viviana/solidaria/utils";
|
|
8
21
|
import { VALID_VALIDITY_STATE, createToggleState } from "@proyecto-viviana/solid-stately";
|
|
9
22
|
//#region src/Switch.tsx
|
|
10
23
|
/**
|
|
@@ -15,7 +28,12 @@ import { VALID_VALIDITY_STATE, createToggleState } from "@proyecto-viviana/solid
|
|
|
15
28
|
*
|
|
16
29
|
* Named "ToggleSwitch" to avoid conflict with SolidJS's built-in Switch component.
|
|
17
30
|
*/
|
|
18
|
-
var _tmpl$ =
|
|
31
|
+
var _tmpl$ = /* @__PURE__ */ template(`<input>`);
|
|
32
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<span slot=description>`);
|
|
33
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<span slot=errorMessage>`);
|
|
34
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<label><!$><!/><!$><!/><!$><!/><!$><!/>`);
|
|
35
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<label><!$><!/><!$><!/>`);
|
|
36
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
|
|
19
37
|
const ToggleSwitchContext = createContext(null);
|
|
20
38
|
/**
|
|
21
39
|
* A switch allows a user to turn a setting on or off.
|
|
@@ -146,72 +164,95 @@ function ToggleSwitch(props) {
|
|
|
146
164
|
const children = props.children;
|
|
147
165
|
return typeof children === "function" ? children(childRenderValues) : children;
|
|
148
166
|
});
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
167
|
+
var _el$ = getNextElement(_tmpl$4);
|
|
168
|
+
var _el$3 = _el$.firstChild;
|
|
169
|
+
var [_el$4, _el$5] = getNextMarker(_el$3.nextSibling);
|
|
170
|
+
var _el$6 = _el$4.nextSibling;
|
|
171
|
+
var [_el$7, _el$8] = getNextMarker(_el$6.nextSibling);
|
|
172
|
+
var _el$10 = _el$7.nextSibling;
|
|
173
|
+
var [_el$11, _el$12] = getNextMarker(_el$10.nextSibling);
|
|
174
|
+
var _el$14 = _el$11.nextSibling;
|
|
175
|
+
var [_el$15, _el$16] = getNextMarker(_el$14.nextSibling);
|
|
176
|
+
spread(_el$, [
|
|
177
|
+
domProps,
|
|
178
|
+
cleanLabelProps,
|
|
179
|
+
cleanHoverProps,
|
|
180
|
+
{
|
|
181
|
+
get "class"() {
|
|
153
182
|
return renderProps.class();
|
|
154
183
|
},
|
|
155
184
|
get style() {
|
|
156
185
|
return renderProps.style();
|
|
157
186
|
},
|
|
158
|
-
get
|
|
159
|
-
return switchAria.isSelected()
|
|
187
|
+
get "data-selected"() {
|
|
188
|
+
return dataAttr(switchAria.isSelected());
|
|
160
189
|
},
|
|
161
|
-
get
|
|
162
|
-
return switchAria.isPressed()
|
|
190
|
+
get "data-pressed"() {
|
|
191
|
+
return dataAttr(switchAria.isPressed());
|
|
163
192
|
},
|
|
164
|
-
get
|
|
165
|
-
return isHovered()
|
|
193
|
+
get "data-hovered"() {
|
|
194
|
+
return dataAttr(isHovered());
|
|
166
195
|
},
|
|
167
|
-
get
|
|
168
|
-
return isFocused()
|
|
196
|
+
get "data-focused"() {
|
|
197
|
+
return dataAttr(isFocused());
|
|
169
198
|
},
|
|
170
|
-
get
|
|
171
|
-
return isFocusVisible()
|
|
199
|
+
get "data-focus-visible"() {
|
|
200
|
+
return dataAttr(isFocusVisible());
|
|
172
201
|
},
|
|
173
|
-
get
|
|
174
|
-
return switchAria.isDisabled
|
|
202
|
+
get "data-disabled"() {
|
|
203
|
+
return dataAttr(switchAria.isDisabled);
|
|
175
204
|
},
|
|
176
|
-
get
|
|
177
|
-
return switchAria.isReadOnly
|
|
205
|
+
get "data-readonly"() {
|
|
206
|
+
return dataAttr(switchAria.isReadOnly);
|
|
178
207
|
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
208
|
+
}
|
|
209
|
+
], true);
|
|
210
|
+
insert(_el$, createComponent(VisuallyHidden, { get children() {
|
|
211
|
+
var _el$2 = getNextElement(_tmpl$);
|
|
212
|
+
ref(() => {
|
|
213
|
+
return setInputElement;
|
|
214
|
+
}, _el$2);
|
|
215
|
+
spread(_el$2, [
|
|
216
|
+
cleanInputProps,
|
|
217
|
+
cleanFocusProps,
|
|
218
|
+
{ get "aria-describedby"() {
|
|
184
219
|
return describedBy();
|
|
185
|
-
} }
|
|
186
|
-
|
|
187
|
-
return _el$2;
|
|
188
|
-
} }), _el$6, _co$);
|
|
189
|
-
insert(_el$, switchChildren, _el$8, _co$2);
|
|
190
|
-
insert(_el$, createComponent(Show, {
|
|
191
|
-
get when() {
|
|
192
|
-
return local.description;
|
|
193
|
-
},
|
|
194
|
-
get children() {
|
|
195
|
-
var _el$3 = getNextElement(_tmpl$2);
|
|
196
|
-
setAttribute(_el$3, "id", descriptionId);
|
|
197
|
-
insert(_el$3, () => local.description);
|
|
198
|
-
return _el$3;
|
|
199
|
-
}
|
|
200
|
-
}), _el$0, _co$3);
|
|
201
|
-
insert(_el$, createComponent(Show, {
|
|
202
|
-
get when() {
|
|
203
|
-
return memo(() => !!switchAria.isInvalid)() && local.errorMessage;
|
|
204
|
-
},
|
|
205
|
-
get children() {
|
|
206
|
-
var _el$4 = getNextElement(_tmpl$3);
|
|
207
|
-
setAttribute(_el$4, "id", errorMessageId);
|
|
208
|
-
insert(_el$4, () => local.errorMessage);
|
|
209
|
-
return _el$4;
|
|
210
|
-
}
|
|
211
|
-
}), _el$10, _co$4);
|
|
220
|
+
} }
|
|
221
|
+
], false);
|
|
212
222
|
runHydrationEvents();
|
|
213
|
-
return _el
|
|
214
|
-
})
|
|
223
|
+
return _el$2;
|
|
224
|
+
} }), _el$4, _el$5);
|
|
225
|
+
insert(_el$, switchChildren, _el$7, _el$8);
|
|
226
|
+
insert(_el$, createComponent(Show, {
|
|
227
|
+
get when() {
|
|
228
|
+
return local.description;
|
|
229
|
+
},
|
|
230
|
+
get children() {
|
|
231
|
+
var _el$9 = getNextElement(_tmpl$2);
|
|
232
|
+
setAttribute(_el$9, "id", descriptionId);
|
|
233
|
+
insert(_el$9, () => {
|
|
234
|
+
return local.description;
|
|
235
|
+
});
|
|
236
|
+
return _el$9;
|
|
237
|
+
}
|
|
238
|
+
}), _el$11, _el$12);
|
|
239
|
+
insert(_el$, createComponent(Show, {
|
|
240
|
+
get when() {
|
|
241
|
+
return memo(() => {
|
|
242
|
+
return !!switchAria.isInvalid;
|
|
243
|
+
})() ? local.errorMessage : switchAria.isInvalid;
|
|
244
|
+
},
|
|
245
|
+
get children() {
|
|
246
|
+
var _el$13 = getNextElement(_tmpl$3);
|
|
247
|
+
setAttribute(_el$13, "id", errorMessageId);
|
|
248
|
+
insert(_el$13, () => {
|
|
249
|
+
return local.errorMessage;
|
|
250
|
+
});
|
|
251
|
+
return _el$13;
|
|
252
|
+
}
|
|
253
|
+
}), _el$15, _el$16);
|
|
254
|
+
runHydrationEvents();
|
|
255
|
+
return _el$;
|
|
215
256
|
}
|
|
216
257
|
const SwitchFieldContext = createContext(null);
|
|
217
258
|
const InternalSwitchContext = createContext(null);
|
|
@@ -315,10 +356,16 @@ function SwitchButtonImpl(props) {
|
|
|
315
356
|
const children = props.buttonProps.children;
|
|
316
357
|
return typeof children === "function" ? children(childRenderValues) : children;
|
|
317
358
|
});
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
359
|
+
var _el$17 = getNextElement(_tmpl$5);
|
|
360
|
+
var _el$19 = _el$17.firstChild;
|
|
361
|
+
var [_el$20, _el$21] = getNextMarker(_el$19.nextSibling);
|
|
362
|
+
var _el$22 = _el$20.nextSibling;
|
|
363
|
+
var [_el$23, _el$24] = getNextMarker(_el$22.nextSibling);
|
|
364
|
+
spread(_el$17, [
|
|
365
|
+
cleanLabelProps,
|
|
366
|
+
cleanHoverProps,
|
|
367
|
+
{
|
|
368
|
+
get "class"() {
|
|
322
369
|
return renderProps.class();
|
|
323
370
|
},
|
|
324
371
|
get style() {
|
|
@@ -327,46 +374,48 @@ function SwitchButtonImpl(props) {
|
|
|
327
374
|
get slot() {
|
|
328
375
|
return props.buttonProps.slot;
|
|
329
376
|
},
|
|
330
|
-
get
|
|
331
|
-
return switchAria.isSelected()
|
|
377
|
+
get "data-selected"() {
|
|
378
|
+
return dataAttr(switchAria.isSelected());
|
|
332
379
|
},
|
|
333
|
-
get
|
|
334
|
-
return switchAria.isPressed()
|
|
380
|
+
get "data-pressed"() {
|
|
381
|
+
return dataAttr(switchAria.isPressed());
|
|
335
382
|
},
|
|
336
|
-
get
|
|
337
|
-
return isHovered()
|
|
383
|
+
get "data-hovered"() {
|
|
384
|
+
return dataAttr(isHovered());
|
|
338
385
|
},
|
|
339
|
-
get
|
|
340
|
-
return isFocused()
|
|
386
|
+
get "data-focused"() {
|
|
387
|
+
return dataAttr(isFocused());
|
|
341
388
|
},
|
|
342
|
-
get
|
|
343
|
-
return isFocusVisible()
|
|
389
|
+
get "data-focus-visible"() {
|
|
390
|
+
return dataAttr(isFocusVisible());
|
|
344
391
|
},
|
|
345
|
-
get
|
|
346
|
-
return switchAria.isDisabled
|
|
392
|
+
get "data-disabled"() {
|
|
393
|
+
return dataAttr(switchAria.isDisabled);
|
|
347
394
|
},
|
|
348
|
-
get
|
|
349
|
-
return switchAria.isReadOnly
|
|
395
|
+
get "data-readonly"() {
|
|
396
|
+
return dataAttr(switchAria.isReadOnly);
|
|
350
397
|
},
|
|
351
|
-
get
|
|
352
|
-
return switchAria.isInvalid
|
|
398
|
+
get "data-invalid"() {
|
|
399
|
+
return dataAttr(switchAria.isInvalid);
|
|
353
400
|
},
|
|
354
|
-
get
|
|
355
|
-
return ctx.isRequired
|
|
401
|
+
get "data-required"() {
|
|
402
|
+
return dataAttr(ctx.isRequired);
|
|
356
403
|
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
insert(_el$11, switchChildren, _el$16, _co$6);
|
|
404
|
+
}
|
|
405
|
+
], true);
|
|
406
|
+
insert(_el$17, createComponent(VisuallyHidden, { get children() {
|
|
407
|
+
var _el$18 = getNextElement(_tmpl$);
|
|
408
|
+
var _ref$ = ctx.setInputElement;
|
|
409
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => {
|
|
410
|
+
return _ref$;
|
|
411
|
+
}, _el$18) : ctx.setInputElement = _el$18;
|
|
412
|
+
spread(_el$18, [cleanInputProps, cleanFocusProps], false);
|
|
367
413
|
runHydrationEvents();
|
|
368
|
-
return _el$
|
|
369
|
-
})
|
|
414
|
+
return _el$18;
|
|
415
|
+
} }), _el$20, _el$21);
|
|
416
|
+
insert(_el$17, switchChildren, _el$23, _el$24);
|
|
417
|
+
runHydrationEvents();
|
|
418
|
+
return _el$17;
|
|
370
419
|
}
|
|
371
420
|
/**
|
|
372
421
|
* A switch allows a user to turn a setting on or off, with support for validation and help text.
|
|
@@ -383,13 +432,13 @@ function SwitchButtonImpl(props) {
|
|
|
383
432
|
*/
|
|
384
433
|
function SwitchField(props) {
|
|
385
434
|
const contextProps = useContext(SwitchFieldContext);
|
|
386
|
-
const contextSlotProps = contextProps?.slots?.[props.slot
|
|
435
|
+
const contextSlotProps = contextProps?.slots?.[typeof props.slot === "string" ? props.slot : "default"];
|
|
387
436
|
const contextBaseProps = createMemo(() => {
|
|
388
437
|
if (!contextProps) return {};
|
|
389
438
|
const { slots: _slots, ...rest } = contextProps;
|
|
390
439
|
return rest;
|
|
391
440
|
});
|
|
392
|
-
const merged = contextProps ? mergeProps$
|
|
441
|
+
const merged = contextProps ? mergeProps$1(contextBaseProps(), contextSlotProps ?? {}, props) : props;
|
|
393
442
|
const [inputElement, setInputElement] = createSignal(null);
|
|
394
443
|
const [local, ariaProps] = splitProps(merged, [
|
|
395
444
|
"class",
|
|
@@ -477,20 +526,21 @@ function SwitchField(props) {
|
|
|
477
526
|
return state;
|
|
478
527
|
}
|
|
479
528
|
};
|
|
480
|
-
|
|
529
|
+
const renderedChildren = createMemo(() => {
|
|
481
530
|
const children = merged.children;
|
|
482
531
|
return typeof children === "function" ? children(childRenderValues) : children;
|
|
483
|
-
})
|
|
532
|
+
});
|
|
533
|
+
return memo(renderedChildren);
|
|
484
534
|
};
|
|
485
|
-
return createComponent(InternalSwitchContext
|
|
535
|
+
return createComponent(InternalSwitchContext, {
|
|
486
536
|
value: internalContext,
|
|
487
537
|
get children() {
|
|
488
|
-
return createComponent(FieldErrorContext
|
|
538
|
+
return createComponent(FieldErrorContext, {
|
|
489
539
|
value: fieldErrorContext,
|
|
490
540
|
get children() {
|
|
491
|
-
var _el$
|
|
492
|
-
spread(_el$
|
|
493
|
-
get
|
|
541
|
+
var _el$25 = getNextElement(_tmpl$6);
|
|
542
|
+
spread(_el$25, [domProps, {
|
|
543
|
+
get "class"() {
|
|
494
544
|
return renderProps.class();
|
|
495
545
|
},
|
|
496
546
|
get style() {
|
|
@@ -499,30 +549,30 @@ function SwitchField(props) {
|
|
|
499
549
|
get slot() {
|
|
500
550
|
return local.slot;
|
|
501
551
|
},
|
|
502
|
-
get
|
|
503
|
-
return switchAria.isSelected()
|
|
552
|
+
get "data-selected"() {
|
|
553
|
+
return dataAttr(switchAria.isSelected());
|
|
504
554
|
},
|
|
505
|
-
get
|
|
506
|
-
return switchAria.isDisabled
|
|
555
|
+
get "data-disabled"() {
|
|
556
|
+
return dataAttr(switchAria.isDisabled);
|
|
507
557
|
},
|
|
508
|
-
get
|
|
509
|
-
return switchAria.isReadOnly
|
|
558
|
+
get "data-readonly"() {
|
|
559
|
+
return dataAttr(switchAria.isReadOnly);
|
|
510
560
|
},
|
|
511
|
-
get
|
|
512
|
-
return switchAria.isInvalid
|
|
561
|
+
get "data-invalid"() {
|
|
562
|
+
return dataAttr(switchAria.isInvalid);
|
|
513
563
|
},
|
|
514
|
-
get
|
|
515
|
-
return ariaProps.isRequired ||
|
|
564
|
+
get "data-required"() {
|
|
565
|
+
return dataAttr(ariaProps.isRequired || false);
|
|
516
566
|
}
|
|
517
|
-
}
|
|
518
|
-
insert(_el$
|
|
567
|
+
}], true);
|
|
568
|
+
insert(_el$25, createComponent(Provider, {
|
|
519
569
|
values: [[TextContext, textSlots]],
|
|
520
570
|
get children() {
|
|
521
571
|
return createComponent(FieldChildren, {});
|
|
522
572
|
}
|
|
523
573
|
}));
|
|
524
574
|
runHydrationEvents();
|
|
525
|
-
return _el$
|
|
575
|
+
return _el$25;
|
|
526
576
|
}
|
|
527
577
|
});
|
|
528
578
|
}
|
package/dist/Switch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","names":["JSX","Context","createContext","createMemo","createSignal","createUniqueId","splitProps","untrack","useContext","Show","createSwitch","createFocusRing","createHover","mergeProps","AriaSwitchProps","SwitchAria","createToggleState","VALID_VALIDITY_STATE","ToggleState","ValidationResult","VisuallyHidden","FieldErrorContext","FieldErrorContextValue","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","Provider","useRenderProps","filterDOMProps","TextContext","ToggleSwitchRenderProps","isSelected","isHovered","isPressed","isFocused","isFocusVisible","isDisabled","isReadOnly","isInvalid","state","ToggleSwitchProps","Omit","children","class","style","description","Element","errorMessage","ToggleSwitchContext","ToggleSwitch","props","inputElement","setInputElement","HTMLInputElement","local","ariaProps","descriptionId","errorMessageId","defaultSelected","onChange","switchAria","describedBy","ids","undefined","filter","Boolean","length","join","focusProps","hoverProps","renderValues","renderProps","defaultClassName","childRenderValues","domProps","filtered","global","Record","id","onClick","cleanLabelProps","ref","_ref1","rest","labelProps","cleanHoverProps","_ref2","cleanInputProps","_ref3","inputProps","cleanFocusProps","_ref4","switchChildren","_el$","_$getNextElement","_tmpl$4","_el$5","firstChild","_el$6","_co$","_$getNextMarker","nextSibling","_el$7","_el$8","_co$2","_el$9","_el$0","_co$3","_el$1","_el$10","_co$4","_$spread","_$mergeProps","data-selected","data-pressed","data-hovered","data-focused","data-focus-visible","data-disabled","data-readonly","_$insert","_$createComponent","_el$2","_tmpl$","_$use","aria-describedby","_$runHydrationEvents","when","_el$3","_tmpl$2","_$setAttribute","_$memo","_el$4","_tmpl$3","SwitchFieldRenderProps","isRequired","SwitchButtonRenderProps","SwitchFieldProps","SwitchButtonProps","onHoverStart","onHoverEnd","onHoverChange","SwitchFieldContextValue","slots","SwitchFieldContext","InternalSwitchContextValue","el","InternalSwitchContext","SwitchButton","getCtx","fallback","keyed","ctx","SwitchButtonImpl","buttonProps","_el$11","_tmpl$5","_el$13","_el$14","_co$5","_el$15","_el$16","_co$6","slot","data-invalid","data-required","_el$12","_ref$","SwitchField","contextProps","contextSlotProps","contextBaseProps","_slots","merged","internalContext","textSlots","descriptionProps","errorMessageProps","fieldErrorContext","validation","validationDetails","validationErrors","HTMLAttributes","HTMLElement","FieldChildren","renderedChildren","value","_el$17","_tmpl$6","values","Array"],"sources":["../src/Switch.tsx"],"sourcesContent":["/**\n * ToggleSwitch component for solidaria-components\n *\n * A pre-wired headless switch that combines state + aria hooks.\n * Port of react-aria-components/src/Switch.tsx\n *\n * Named \"ToggleSwitch\" to avoid conflict with SolidJS's built-in Switch component.\n */\n\nimport {\n type JSX,\n type Context,\n createContext,\n createMemo,\n createSignal,\n createUniqueId,\n splitProps,\n untrack,\n useContext,\n Show,\n} from \"solid-js\";\nimport {\n createSwitch,\n createFocusRing,\n createHover,\n mergeProps,\n type AriaSwitchProps,\n type SwitchAria,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createToggleState,\n VALID_VALIDITY_STATE,\n type ToggleState,\n type ValidationResult,\n} from \"@proyecto-viviana/solid-stately\";\nimport { VisuallyHidden } from \"./VisuallyHidden\";\nimport { FieldErrorContext, type FieldErrorContextValue } from \"./FieldError\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n Provider,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\n\nexport interface ToggleSwitchRenderProps {\n /** Whether the switch is selected. */\n isSelected: boolean;\n /** Whether the switch is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the switch is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the switch is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the switch is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the switch is disabled. */\n isDisabled: boolean;\n /** Whether the switch is read only. */\n isReadOnly: boolean;\n /** Whether the switch is invalid. */\n isInvalid: boolean;\n /** State of the switch. */\n state: ToggleState;\n}\n\nexport interface ToggleSwitchProps extends Omit<AriaSwitchProps, \"children\">, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<ToggleSwitchRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ToggleSwitchRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ToggleSwitchRenderProps>;\n /** A description for the switch. */\n description?: JSX.Element;\n /** An error message for the switch. */\n errorMessage?: JSX.Element;\n}\n\nexport const ToggleSwitchContext = createContext<ToggleSwitchProps | null>(null);\n\n/**\n * A switch allows a user to turn a setting on or off.\n *\n * This is a headless component that provides accessibility and state management.\n * Style it using the render props pattern or data attributes.\n *\n * Named \"ToggleSwitch\" to avoid conflict with SolidJS's built-in Switch component.\n *\n * @example\n * ```tsx\n * <ToggleSwitch>\n * {({ isSelected }) => (\n * <>\n * <span class={`switch-track ${isSelected ? 'bg-blue-500' : 'bg-gray-300'}`}>\n * <span class={`switch-thumb ${isSelected ? 'translate-x-5' : 'translate-x-0'}`} />\n * </span>\n * <span>Enable notifications</span>\n * </>\n * )}\n * </ToggleSwitch>\n * ```\n */\nexport function ToggleSwitch(props: ToggleSwitchProps): JSX.Element {\n const [inputElement, setInputElement] = createSignal<HTMLInputElement | null>(null);\n\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"description\",\n \"errorMessage\",\n ]);\n const descriptionId = createUniqueId();\n const errorMessageId = createUniqueId();\n\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 switchAria = createSwitch(\n () => ({\n ...ariaProps,\n children: typeof props.children === \"function\" ? true : props.children,\n }),\n state,\n inputElement,\n );\n const describedBy = () => {\n const ids = [\n ariaProps[\"aria-describedby\"],\n local.description ? descriptionId : undefined,\n switchAria.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 ariaProps.isDisabled || ariaProps.isReadOnly;\n },\n });\n\n const renderValues = createMemo<ToggleSwitchRenderProps>(() => ({\n isSelected: switchAria.isSelected(),\n isHovered: isHovered(),\n isPressed: switchAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: switchAria.isDisabled,\n isReadOnly: switchAria.isReadOnly,\n isInvalid: switchAria.isInvalid,\n state,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-ToggleSwitch\",\n },\n renderValues,\n );\n const childRenderValues: ToggleSwitchRenderProps = {\n get isSelected() {\n return switchAria.isSelected();\n },\n get isHovered() {\n return isHovered();\n },\n get isPressed() {\n return switchAria.isPressed();\n },\n get isFocused() {\n return isFocused();\n },\n get isFocusVisible() {\n return isFocusVisible();\n },\n get isDisabled() {\n return switchAria.isDisabled;\n },\n get isReadOnly() {\n return switchAria.isReadOnly;\n },\n get isInvalid() {\n return switchAria.isInvalid;\n },\n get state() {\n return state;\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 const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = switchAria.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 { ref: _ref3, ...rest } = switchAria.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref4, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n // Resolve the render-prop children ONCE (untracked) — see TextField. Re-invoking\n // it on a reactive update re-clones its templates and, mid-hydration, throws a\n // Hydration Mismatch. The children keep fine-grained reactivity via the\n // childRenderValues getters + <Show>s.\n const switchChildren = untrack(() => {\n const children = props.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n });\n\n return (\n <label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={switchAria.isSelected() || undefined}\n data-pressed={switchAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={switchAria.isDisabled || undefined}\n data-readonly={switchAria.isReadOnly || undefined}\n >\n <VisuallyHidden>\n <input\n ref={setInputElement}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n aria-describedby={describedBy()}\n />\n </VisuallyHidden>\n {switchChildren}\n <Show when={local.description}>\n <span id={descriptionId} slot=\"description\">\n {local.description}\n </span>\n </Show>\n <Show when={switchAria.isInvalid && local.errorMessage}>\n <span id={errorMessageId} slot=\"errorMessage\">\n {local.errorMessage}\n </span>\n </Show>\n </label>\n );\n}\n\n// ============================================================================\n// SwitchField + SwitchButton — the RAC form-field split (RAC 1.19)\n// ----------------------------------------------------------------------------\n// Upstream split the monolithic Switch into a SwitchField wrapper (owns state,\n// validation, and help text) containing a SwitchButton control (the clickable\n// label + indicator). Mirrors react-aria-components/src/Switch.tsx. The legacy\n// `ToggleSwitch` above stays as the deprecated monolith for back-compat.\n//\n// Help text wiring mirrors upstream exactly: SwitchField has NO description /\n// errorMessage props. createSwitch mints descriptionProps / errorMessageProps\n// (slot ids) and bakes the combined aria-describedby into inputProps, and the\n// field provides those ids through TextContext slots. Consumers render the help\n// text themselves with `<Text slot=\"description\">` / `<FieldError>`.\n// ============================================================================\n\nexport interface SwitchFieldRenderProps {\n /** Whether the switch is selected. */\n isSelected: boolean;\n /** Whether the switch is disabled. */\n isDisabled: boolean;\n /** Whether the switch is read only. */\n isReadOnly: boolean;\n /** Whether the switch is invalid. */\n isInvalid: boolean;\n /** Whether the switch is required. */\n isRequired: boolean;\n /** State of the switch. */\n state: ToggleState;\n}\n\nexport interface SwitchButtonRenderProps extends ToggleSwitchRenderProps {\n /** Whether the switch is required. */\n isRequired: boolean;\n}\n\nexport interface SwitchFieldProps extends Omit<AriaSwitchProps, \"children\">, SlotProps {\n /** The children of the component (typically a `SwitchButton`). A function may receive render props. */\n children?: RenderChildren<SwitchFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SwitchFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SwitchFieldRenderProps>;\n}\n\nexport interface SwitchButtonProps extends SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<SwitchButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SwitchButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SwitchButtonRenderProps>;\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 SwitchFieldContextValue extends SwitchFieldProps {\n slots?: Record<string, SwitchFieldProps>;\n}\nexport const SwitchFieldContext = createContext<SwitchFieldContextValue | null>(null);\n\n/** Carries the switch aria + state from a SwitchField/Switch wrapper to its SwitchButton. */\ninterface InternalSwitchContextValue {\n switchAria: SwitchAria;\n state: ToggleState;\n setInputElement: (el: HTMLInputElement | null) => void;\n defaultClassName: string;\n isRequired: boolean;\n}\nconst InternalSwitchContext = createContext<InternalSwitchContextValue | null>(null);\n\n/**\n * A switch button is the clickable area of a switch, including the indicator and label.\n * Must be rendered inside a `SwitchField` (or the legacy `ToggleSwitch`).\n */\nexport function SwitchButton(props: SwitchButtonProps): JSX.Element {\n // Accessed reactively so it resolves once the parent provider mounts (HMR-safe).\n const getCtx = createMemo(() => useContext(InternalSwitchContext));\n return (\n <Show when={getCtx()} fallback={null} keyed>\n {(ctx) => <SwitchButtonImpl buttonProps={props} ctx={ctx} />}\n </Show>\n );\n}\n\nfunction SwitchButtonImpl(props: {\n buttonProps: SwitchButtonProps;\n ctx: InternalSwitchContextValue;\n}): JSX.Element {\n const { ctx } = props;\n const switchAria = ctx.switchAria;\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return switchAria.isDisabled || switchAria.isReadOnly;\n },\n onHoverStart: props.buttonProps.onHoverStart,\n onHoverEnd: props.buttonProps.onHoverEnd,\n onHoverChange: props.buttonProps.onHoverChange,\n });\n\n const renderValues = createMemo<SwitchButtonRenderProps>(() => ({\n isSelected: switchAria.isSelected(),\n isHovered: isHovered(),\n isPressed: switchAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: switchAria.isDisabled,\n isReadOnly: switchAria.isReadOnly,\n isInvalid: switchAria.isInvalid,\n isRequired: ctx.isRequired,\n state: ctx.state,\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: SwitchButtonRenderProps = {\n get isSelected() {\n return switchAria.isSelected();\n },\n get isHovered() {\n return isHovered();\n },\n get isPressed() {\n return switchAria.isPressed();\n },\n get isFocused() {\n return isFocused();\n },\n get isFocusVisible() {\n return isFocusVisible();\n },\n get isDisabled() {\n return switchAria.isDisabled;\n },\n get isReadOnly() {\n return switchAria.isReadOnly;\n },\n get isInvalid() {\n return switchAria.isInvalid;\n },\n get isRequired() {\n return ctx.isRequired;\n },\n get state() {\n return ctx.state;\n },\n };\n\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = switchAria.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 { ref: _ref3, ...rest } = switchAria.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref4, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n // Resolve the render-prop children ONCE (untracked) — see ToggleSwitch above.\n // The button's own children are leaf visuals (they don't consume context), so\n // untrack is safe and keeps fine-grained reactivity via the getters + <Show>s.\n const switchChildren = untrack(() => {\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 class={renderProps.class()}\n style={renderProps.style()}\n slot={props.buttonProps.slot}\n data-selected={switchAria.isSelected() || undefined}\n data-pressed={switchAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={switchAria.isDisabled || undefined}\n data-readonly={switchAria.isReadOnly || undefined}\n data-invalid={switchAria.isInvalid || undefined}\n data-required={ctx.isRequired || undefined}\n >\n <VisuallyHidden>\n <input ref={ctx.setInputElement} {...cleanInputProps()} {...cleanFocusProps()} />\n </VisuallyHidden>\n {switchChildren}\n </label>\n );\n}\n\n/**\n * A switch allows a user to turn a setting on or off, with support for validation and help text.\n * Wraps a `SwitchButton` and provides description/error wiring through\n * TextContext slots — render help text with `<Text slot=\"description\">`.\n *\n * @example\n * ```tsx\n * <SwitchField>\n * <SwitchButton>Enable sync</SwitchButton>\n * <Text slot=\"description\">Sync across devices</Text>\n * </SwitchField>\n * ```\n */\nexport function SwitchField(props: SwitchFieldProps): JSX.Element {\n const contextProps = useContext(SwitchFieldContext);\n const contextSlotProps = contextProps?.slots?.[props.slot ?? \"default\"];\n const contextBaseProps = createMemo<SwitchFieldProps>(() => {\n if (!contextProps) return {};\n const { slots: _slots, ...rest } = contextProps;\n return rest;\n });\n const merged = contextProps\n ? (mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) as SwitchFieldProps)\n : props;\n\n const [inputElement, setInputElement] = createSignal<HTMLInputElement | null>(null);\n // `children` is split out of ariaProps so the hook accessor's `...ariaProps`\n // spread does not eagerly read it — reading a Solid `children` getter\n // instantiates the nested SwitchButton, and doing so OUTSIDE the\n // InternalSwitchContext provider both breaks its context binding and recurses.\n const [local, ariaProps] = splitProps(merged, [\"class\", \"style\", \"slot\", \"children\"]);\n\n const state = createToggleState(() => ({\n isSelected: ariaProps.isSelected,\n defaultSelected: ariaProps.defaultSelected,\n onChange: ariaProps.onChange,\n isReadOnly: ariaProps.isReadOnly,\n }));\n\n const switchAria = createSwitch(\n () => ({\n ...ariaProps,\n // The hook reads `children` only to decide if an aria-label is needed; the\n // visible label lives in the SwitchButton, so report presence as a literal.\n children: true,\n }),\n state,\n inputElement,\n );\n\n const internalContext: InternalSwitchContextValue = {\n switchAria,\n state,\n setInputElement,\n defaultClassName: \"solidaria-SwitchButton\",\n get isRequired() {\n return ariaProps.isRequired || false;\n },\n };\n\n // The hook mints the description/error slot ids and bakes the combined\n // aria-describedby into the input; the field exposes those ids through\n // TextContext so a `<Text slot=\"description\">` / `<FieldError>` child resolves\n // them. Mirrors react-aria-components' Switch Provider value list.\n const textSlots = {\n slots: {\n get description() {\n return switchAria.descriptionProps;\n },\n get errorMessage() {\n return switchAria.errorMessageProps;\n },\n },\n };\n\n const renderValues = createMemo<SwitchFieldRenderProps>(() => ({\n isSelected: switchAria.isSelected(),\n isDisabled: switchAria.isDisabled,\n isReadOnly: switchAria.isReadOnly,\n isInvalid: switchAria.isInvalid,\n isRequired: ariaProps.isRequired || false,\n state,\n }));\n\n const renderProps = useRenderProps(\n {\n children: merged.children,\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-SwitchField\",\n },\n renderValues,\n );\n\n const fieldErrorContext: FieldErrorContextValue = {\n get validation(): ValidationResult {\n return {\n isInvalid: switchAria.isInvalid,\n validationDetails: VALID_VALIDITY_STATE,\n validationErrors: [],\n };\n },\n get errorMessageProps() {\n return switchAria.errorMessageProps 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 SwitchButton's useContext binds to InternalSwitchContext. Mirrors\n // RadioGroup's GroupChildren — do NOT pre-resolve outside the provider.\n const FieldChildren = () => {\n const childRenderValues: SwitchFieldRenderProps = {\n get isSelected() {\n return switchAria.isSelected();\n },\n get isDisabled() {\n return switchAria.isDisabled;\n },\n get isReadOnly() {\n return switchAria.isReadOnly;\n },\n get isInvalid() {\n return switchAria.isInvalid;\n },\n get isRequired() {\n return ariaProps.isRequired || false;\n },\n get state() {\n return state;\n },\n };\n const renderedChildren = createMemo(() => {\n const children = merged.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n });\n return <>{renderedChildren()}</>;\n };\n\n return (\n <InternalSwitchContext.Provider value={internalContext}>\n <FieldErrorContext.Provider value={fieldErrorContext}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n data-selected={switchAria.isSelected() || undefined}\n data-disabled={switchAria.isDisabled || undefined}\n data-readonly={switchAria.isReadOnly || undefined}\n data-invalid={switchAria.isInvalid || undefined}\n data-required={ariaProps.isRequired || false || undefined}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n <FieldChildren />\n </Provider>\n </div>\n </FieldErrorContext.Provider>\n </InternalSwitchContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkFA,MAAaiD,sBAAsB/C,cAAwC,IAAI;;;;;;;;;;;;;;;;;;;;;;;AAwB/E,SAAgBgD,aAAaC,OAAuC;CAClE,MAAM,CAACC,cAAcC,mBAAmBjD,aAAsC,IAAI;CAElF,MAAM,CAACmD,OAAOC,aAAalD,WAAW6C,OAAO;EAC3C;EACA;EACA;EACA;EACA;CAAc,CACf;CACD,MAAMM,gBAAgBpD,eAAe;CACrC,MAAMqD,iBAAiBrD,eAAe;CAGtC,MAAMmC,QAAQxB,yBAAyB;EACrCgB,YAAYwB,UAAUxB;EACtB2B,iBAAiBH,UAAUG;EAC3BC,UAAUJ,UAAUI;EACpBtB,YAAYkB,UAAUlB;CACxB,EAAE;CAEF,MAAMuB,aAAanD,oBACV;EACL,GAAG8C;EACHb,UAAU,OAAOQ,MAAMR,aAAa,aAAa,OAAOQ,MAAMR;CAChE,IACAH,OACAY,YACF;CACA,MAAMU,oBAAoB;EACxB,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7E,OAAA4E,QAAA3E,WAE5CtC,UAAQ;MAAA,KAAA,WAAA;OAAA,OACLH,YAAY5B,MAAM;MAAC;MAAA,IAC1BC,QAAK;OAAA,OAAE2B,YAAY3B,MAAM;MAAC;MAAA,IAC1BuH,OAAI;OAAA,OAAE7G,MAAM6G;MAAI;MAAA,KAAA,mBAAA;OAAA,OACDvG,WAAW7B,WAAW,KAAKgC,KAAAA;MAAS;MAAA,KAAA,mBAAA;OAAA,OACpCH,WAAWxB,cAAc2B,KAAAA;MAAS;MAAA,KAAA,mBAAA;OAAA,OAClCH,WAAWvB,cAAc0B,KAAAA;MAAS;MAAA,KAAA,kBAAA;OAAA,OACnCH,WAAWtB,aAAayB,KAAAA;MAAS;MAAA,KAAA,mBAAA;OAAA,OAChCR,UAAUgF,cAAuBxE,KAAAA;MAAS;KAAA,CAAA,GAAA,OAAA,IAAA;KAAAyD,OAAAmE,QAAAlE,gBAExD/F,UAAQ;MAACmK,QAAQ,CAAC,CAAChK,aAAakJ,SAAS,CAAC;MAAuC,IAAArI,WAAA;OAAA,OAAA+E,gBAC/E+D,eAAa,CAAA,CAAA;MAAA;KAAA,CAAA,CAAA;KAAA1D,mBAAA;KAAA,OAAA6D;IAAA;GAAA,CAAA;EAAA;CAAA,CAAA;AAM1B"}
|
|
1
|
+
{"version":3,"file":"Switch.js","names":["<VisuallyHidden>\n <input\n ref={setInputElement}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n aria-describedby={describedBy()}\n />\n </VisuallyHidden>","ref={setInputElement}","<input\n ref={setInputElement}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n aria-describedby={describedBy()}\n />","<label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(switchAria.isSelected())}\n data-pressed={dataAttr(switchAria.isPressed())}\n data-hovered={dataAttr(isHovered())}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n data-disabled={dataAttr(switchAria.isDisabled)}\n data-readonly={dataAttr(switchAria.isReadOnly)}\n >\n <VisuallyHidden>\n <input\n ref={setInputElement}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n aria-describedby={describedBy()}\n />\n </VisuallyHidden>\n {switchChildren}\n <Show when={local.description}>\n <span id={descriptionId} slot=\"description\">\n {local.description}\n </span>\n </Show>\n <Show when={switchAria.isInvalid && local.errorMessage}>\n <span id={errorMessageId} slot=\"errorMessage\">\n {local.errorMessage}\n </span>\n </Show>\n </label>","<Show when={local.description}>\n <span id={descriptionId} slot=\"description\">\n {local.description}\n </span>\n </Show>","<span id={descriptionId} slot=\"description\">\n {local.description}\n </span>","<Show when={switchAria.isInvalid && local.errorMessage}>\n <span id={errorMessageId} slot=\"errorMessage\">\n {local.errorMessage}\n </span>\n </Show>","switchAria.isInvalid && local.errorMessage","<span id={errorMessageId} slot=\"errorMessage\">\n {local.errorMessage}\n </span>","<Show when={getCtx()} fallback={null} keyed>\n {(ctx) => <SwitchButtonImpl buttonProps={props} ctx={ctx} />}\n </Show>","fallback={null}","<SwitchButtonImpl buttonProps={props} ctx={ctx} />","buttonProps={props}","<VisuallyHidden>\n <input ref={ctx.setInputElement} {...cleanInputProps()} {...cleanFocusProps()} />\n </VisuallyHidden>","ref={ctx.setInputElement}","<input ref={ctx.setInputElement} {...cleanInputProps()} {...cleanFocusProps()} />","<label\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={props.buttonProps.slot}\n data-selected={dataAttr(switchAria.isSelected())}\n data-pressed={dataAttr(switchAria.isPressed())}\n data-hovered={dataAttr(isHovered())}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n data-disabled={dataAttr(switchAria.isDisabled)}\n data-readonly={dataAttr(switchAria.isReadOnly)}\n data-invalid={dataAttr(switchAria.isInvalid)}\n data-required={dataAttr(ctx.isRequired)}\n >\n <VisuallyHidden>\n <input ref={ctx.setInputElement} {...cleanInputProps()} {...cleanFocusProps()} />\n </VisuallyHidden>\n {switchChildren}\n </label>","{renderedChildren()}","<InternalSwitchContext value={internalContext}>\n <FieldErrorContext value={fieldErrorContext}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n data-selected={dataAttr(switchAria.isSelected())}\n data-disabled={dataAttr(switchAria.isDisabled)}\n data-readonly={dataAttr(switchAria.isReadOnly)}\n data-invalid={dataAttr(switchAria.isInvalid)}\n data-required={dataAttr(ariaProps.isRequired || false)}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n <FieldChildren />\n </Provider>\n </div>\n </FieldErrorContext>\n </InternalSwitchContext>","value={internalContext}","<FieldErrorContext value={fieldErrorContext}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n data-selected={dataAttr(switchAria.isSelected())}\n data-disabled={dataAttr(switchAria.isDisabled)}\n data-readonly={dataAttr(switchAria.isReadOnly)}\n data-invalid={dataAttr(switchAria.isInvalid)}\n data-required={dataAttr(ariaProps.isRequired || false)}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n <FieldChildren />\n </Provider>\n </div>\n </FieldErrorContext>","value={fieldErrorContext}","<Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n <FieldChildren />\n </Provider>","values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}","<FieldChildren />","<div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n data-selected={dataAttr(switchAria.isSelected())}\n data-disabled={dataAttr(switchAria.isDisabled)}\n data-readonly={dataAttr(switchAria.isReadOnly)}\n data-invalid={dataAttr(switchAria.isInvalid)}\n data-required={dataAttr(ariaProps.isRequired || false)}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n <FieldChildren />\n </Provider>\n </div>"],"sources":["../src/Switch.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/Switch.tsx\n\n/**\n * ToggleSwitch component for solidaria-components\n *\n * A pre-wired headless switch that combines state + aria hooks.\n * Port of react-aria-components/src/Switch.tsx\n *\n * Named \"ToggleSwitch\" to avoid conflict with SolidJS's built-in Switch component.\n */\n\nimport {\n createContext,\n createMemo,\n createSignal,\n createUniqueId,\n untrack,\n useContext,\n Show,\n} from \"solid-js\";\nimport type { Context } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n createSwitch,\n createFocusRing,\n createHover,\n mergeProps,\n type AriaSwitchProps,\n type SwitchAria,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createToggleState,\n VALID_VALIDITY_STATE,\n type ToggleState,\n type ValidationResult,\n} from \"@proyecto-viviana/solid-stately\";\nimport { VisuallyHidden } from \"./VisuallyHidden\";\nimport { FieldErrorContext, type FieldErrorContextValue } from \"./FieldError\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n Provider,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\nimport { splitProps } from \"@proyecto-viviana/solidaria/utils\";\n\nexport interface ToggleSwitchRenderProps {\n /** Whether the switch is selected. */\n isSelected: boolean;\n /** Whether the switch is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the switch is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the switch is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the switch is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the switch is disabled. */\n isDisabled: boolean;\n /** Whether the switch is read only. */\n isReadOnly: boolean;\n /** Whether the switch is invalid. */\n isInvalid: boolean;\n /** State of the switch. */\n state: ToggleState;\n}\n\nexport interface ToggleSwitchProps extends Omit<AriaSwitchProps, \"children\">, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<ToggleSwitchRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ToggleSwitchRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ToggleSwitchRenderProps>;\n /** A description for the switch. */\n description?: JSX.Element;\n /** An error message for the switch. */\n errorMessage?: JSX.Element;\n}\n\nexport const ToggleSwitchContext = createContext<ToggleSwitchProps | null>(null);\n\n/**\n * A switch allows a user to turn a setting on or off.\n *\n * This is a headless component that provides accessibility and state management.\n * Style it using the render props pattern or data attributes.\n *\n * Named \"ToggleSwitch\" to avoid conflict with SolidJS's built-in Switch component.\n *\n * @example\n * ```tsx\n * <ToggleSwitch>\n * {({ isSelected }) => (\n * <>\n * <span class={`switch-track ${isSelected ? 'bg-blue-500' : 'bg-gray-300'}`}>\n * <span class={`switch-thumb ${isSelected ? 'translate-x-5' : 'translate-x-0'}`} />\n * </span>\n * <span>Enable notifications</span>\n * </>\n * )}\n * </ToggleSwitch>\n * ```\n */\nexport function ToggleSwitch(props: ToggleSwitchProps): JSX.Element {\n const [inputElement, setInputElement] = createSignal<HTMLInputElement | null>(null);\n\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"description\",\n \"errorMessage\",\n ]);\n const descriptionId = createUniqueId();\n const errorMessageId = createUniqueId();\n\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 switchAria = createSwitch(\n () => ({\n ...ariaProps,\n children: typeof props.children === \"function\" ? true : props.children,\n }),\n state,\n inputElement,\n );\n const describedBy = () => {\n const ids = [\n ariaProps[\"aria-describedby\"],\n local.description ? descriptionId : undefined,\n switchAria.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 ariaProps.isDisabled || ariaProps.isReadOnly;\n },\n });\n\n const renderValues = createMemo<ToggleSwitchRenderProps>(() => ({\n isSelected: switchAria.isSelected(),\n isHovered: isHovered(),\n isPressed: switchAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: switchAria.isDisabled,\n isReadOnly: switchAria.isReadOnly,\n isInvalid: switchAria.isInvalid,\n state,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-ToggleSwitch\",\n },\n renderValues,\n );\n const childRenderValues: ToggleSwitchRenderProps = {\n get isSelected() {\n return switchAria.isSelected();\n },\n get isHovered() {\n return isHovered();\n },\n get isPressed() {\n return switchAria.isPressed();\n },\n get isFocused() {\n return isFocused();\n },\n get isFocusVisible() {\n return isFocusVisible();\n },\n get isDisabled() {\n return switchAria.isDisabled;\n },\n get isReadOnly() {\n return switchAria.isReadOnly;\n },\n get isInvalid() {\n return switchAria.isInvalid;\n },\n get state() {\n return state;\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 const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = switchAria.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 { ref: _ref3, ...rest } = switchAria.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref4, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n // Resolve the render-prop children ONCE (untracked) — see TextField. Re-invoking\n // it on a reactive update re-clones its templates and, mid-hydration, throws a\n // Hydration Mismatch. The children keep fine-grained reactivity via the\n // childRenderValues getters + <Show>s.\n const switchChildren = untrack(() => {\n const children = props.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n });\n\n return (\n <label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(switchAria.isSelected())}\n data-pressed={dataAttr(switchAria.isPressed())}\n data-hovered={dataAttr(isHovered())}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n data-disabled={dataAttr(switchAria.isDisabled)}\n data-readonly={dataAttr(switchAria.isReadOnly)}\n >\n <VisuallyHidden>\n <input\n ref={setInputElement}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n aria-describedby={describedBy()}\n />\n </VisuallyHidden>\n {switchChildren}\n <Show when={local.description}>\n <span id={descriptionId} slot=\"description\">\n {local.description}\n </span>\n </Show>\n <Show when={switchAria.isInvalid && local.errorMessage}>\n <span id={errorMessageId} slot=\"errorMessage\">\n {local.errorMessage}\n </span>\n </Show>\n </label>\n );\n}\n\n// ============================================================================\n// SwitchField + SwitchButton — the RAC form-field split (RAC 1.19)\n// ----------------------------------------------------------------------------\n// Upstream split the monolithic Switch into a SwitchField wrapper (owns state,\n// validation, and help text) containing a SwitchButton control (the clickable\n// label + indicator). Mirrors react-aria-components/src/Switch.tsx. The legacy\n// `ToggleSwitch` above stays as the deprecated monolith for back-compat.\n//\n// Help text wiring mirrors upstream exactly: SwitchField has NO description /\n// errorMessage props. createSwitch mints descriptionProps / errorMessageProps\n// (slot ids) and bakes the combined aria-describedby into inputProps, and the\n// field provides those ids through TextContext slots. Consumers render the help\n// text themselves with `<Text slot=\"description\">` / `<FieldError>`.\n// ============================================================================\n\nexport interface SwitchFieldRenderProps {\n /** Whether the switch is selected. */\n isSelected: boolean;\n /** Whether the switch is disabled. */\n isDisabled: boolean;\n /** Whether the switch is read only. */\n isReadOnly: boolean;\n /** Whether the switch is invalid. */\n isInvalid: boolean;\n /** Whether the switch is required. */\n isRequired: boolean;\n /** State of the switch. */\n state: ToggleState;\n}\n\nexport interface SwitchButtonRenderProps extends ToggleSwitchRenderProps {\n /** Whether the switch is required. */\n isRequired: boolean;\n}\n\nexport interface SwitchFieldProps extends Omit<AriaSwitchProps, \"children\">, SlotProps {\n /** The children of the component (typically a `SwitchButton`). A function may receive render props. */\n children?: RenderChildren<SwitchFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SwitchFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SwitchFieldRenderProps>;\n}\n\nexport interface SwitchButtonProps extends SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<SwitchButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SwitchButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SwitchButtonRenderProps>;\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 SwitchFieldContextValue extends SwitchFieldProps {\n slots?: Record<string, SwitchFieldProps>;\n}\nexport const SwitchFieldContext = createContext<SwitchFieldContextValue | null>(null);\n\n/** Carries the switch aria + state from a SwitchField/Switch wrapper to its SwitchButton. */\ninterface InternalSwitchContextValue {\n switchAria: SwitchAria;\n state: ToggleState;\n setInputElement: (el: HTMLInputElement | null) => void;\n defaultClassName: string;\n isRequired: boolean;\n}\nconst InternalSwitchContext = createContext<InternalSwitchContextValue | null>(null);\n\n/**\n * A switch button is the clickable area of a switch, including the indicator and label.\n * Must be rendered inside a `SwitchField` (or the legacy `ToggleSwitch`).\n */\nexport function SwitchButton(props: SwitchButtonProps): JSX.Element {\n // Accessed reactively so it resolves once the parent provider mounts (HMR-safe).\n const getCtx = createMemo(() => useContext(InternalSwitchContext));\n return (\n <Show when={getCtx()} fallback={null} keyed>\n {(ctx) => <SwitchButtonImpl buttonProps={props} ctx={ctx} />}\n </Show>\n );\n}\n\nfunction SwitchButtonImpl(props: {\n buttonProps: SwitchButtonProps;\n ctx: InternalSwitchContextValue;\n}): JSX.Element {\n const { ctx } = props;\n const switchAria = ctx.switchAria;\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return switchAria.isDisabled || switchAria.isReadOnly;\n },\n onHoverStart: props.buttonProps.onHoverStart,\n onHoverEnd: props.buttonProps.onHoverEnd,\n onHoverChange: props.buttonProps.onHoverChange,\n });\n\n const renderValues = createMemo<SwitchButtonRenderProps>(() => ({\n isSelected: switchAria.isSelected(),\n isHovered: isHovered(),\n isPressed: switchAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: switchAria.isDisabled,\n isReadOnly: switchAria.isReadOnly,\n isInvalid: switchAria.isInvalid,\n isRequired: ctx.isRequired,\n state: ctx.state,\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: SwitchButtonRenderProps = {\n get isSelected() {\n return switchAria.isSelected();\n },\n get isHovered() {\n return isHovered();\n },\n get isPressed() {\n return switchAria.isPressed();\n },\n get isFocused() {\n return isFocused();\n },\n get isFocusVisible() {\n return isFocusVisible();\n },\n get isDisabled() {\n return switchAria.isDisabled;\n },\n get isReadOnly() {\n return switchAria.isReadOnly;\n },\n get isInvalid() {\n return switchAria.isInvalid;\n },\n get isRequired() {\n return ctx.isRequired;\n },\n get state() {\n return ctx.state;\n },\n };\n\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = switchAria.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 { ref: _ref3, ...rest } = switchAria.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref4, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n // Resolve the render-prop children ONCE (untracked) — see ToggleSwitch above.\n // The button's own children are leaf visuals (they don't consume context), so\n // untrack is safe and keeps fine-grained reactivity via the getters + <Show>s.\n const switchChildren = untrack(() => {\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 class={renderProps.class()}\n style={renderProps.style()}\n slot={props.buttonProps.slot}\n data-selected={dataAttr(switchAria.isSelected())}\n data-pressed={dataAttr(switchAria.isPressed())}\n data-hovered={dataAttr(isHovered())}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n data-disabled={dataAttr(switchAria.isDisabled)}\n data-readonly={dataAttr(switchAria.isReadOnly)}\n data-invalid={dataAttr(switchAria.isInvalid)}\n data-required={dataAttr(ctx.isRequired)}\n >\n <VisuallyHidden>\n <input ref={ctx.setInputElement} {...cleanInputProps()} {...cleanFocusProps()} />\n </VisuallyHidden>\n {switchChildren}\n </label>\n );\n}\n\n/**\n * A switch allows a user to turn a setting on or off, with support for validation and help text.\n * Wraps a `SwitchButton` and provides description/error wiring through\n * TextContext slots — render help text with `<Text slot=\"description\">`.\n *\n * @example\n * ```tsx\n * <SwitchField>\n * <SwitchButton>Enable sync</SwitchButton>\n * <Text slot=\"description\">Sync across devices</Text>\n * </SwitchField>\n * ```\n */\nexport function SwitchField(props: SwitchFieldProps): JSX.Element {\n const contextProps = useContext(SwitchFieldContext);\n const contextSlotProps =\n contextProps?.slots?.[typeof props.slot === \"string\" ? props.slot : \"default\"];\n const contextBaseProps = createMemo<SwitchFieldProps>(() => {\n if (!contextProps) return {};\n const { slots: _slots, ...rest } = contextProps;\n return rest;\n });\n const merged = contextProps\n ? (mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) as SwitchFieldProps)\n : props;\n\n const [inputElement, setInputElement] = createSignal<HTMLInputElement | null>(null);\n // `children` is split out of ariaProps so the hook accessor's `...ariaProps`\n // spread does not eagerly read it — reading a Solid `children` getter\n // instantiates the nested SwitchButton, and doing so OUTSIDE the\n // InternalSwitchContext provider both breaks its context binding and recurses.\n const [local, ariaProps] = splitProps(merged, [\"class\", \"style\", \"slot\", \"children\"]);\n\n const state = createToggleState(() => ({\n isSelected: ariaProps.isSelected,\n defaultSelected: ariaProps.defaultSelected,\n onChange: ariaProps.onChange,\n isReadOnly: ariaProps.isReadOnly,\n }));\n\n const switchAria = createSwitch(\n () => ({\n ...ariaProps,\n // The hook reads `children` only to decide if an aria-label is needed; the\n // visible label lives in the SwitchButton, so report presence as a literal.\n children: true,\n }),\n state,\n inputElement,\n );\n\n const internalContext: InternalSwitchContextValue = {\n switchAria,\n state,\n setInputElement,\n defaultClassName: \"solidaria-SwitchButton\",\n get isRequired() {\n return ariaProps.isRequired || false;\n },\n };\n\n // The hook mints the description/error slot ids and bakes the combined\n // aria-describedby into the input; the field exposes those ids through\n // TextContext so a `<Text slot=\"description\">` / `<FieldError>` child resolves\n // them. Mirrors react-aria-components' Switch Provider value list.\n const textSlots = {\n slots: {\n get description() {\n return switchAria.descriptionProps;\n },\n get errorMessage() {\n return switchAria.errorMessageProps;\n },\n },\n };\n\n const renderValues = createMemo<SwitchFieldRenderProps>(() => ({\n isSelected: switchAria.isSelected(),\n isDisabled: switchAria.isDisabled,\n isReadOnly: switchAria.isReadOnly,\n isInvalid: switchAria.isInvalid,\n isRequired: ariaProps.isRequired || false,\n state,\n }));\n\n const renderProps = useRenderProps(\n {\n children: merged.children,\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-SwitchField\",\n },\n renderValues,\n );\n\n const fieldErrorContext: FieldErrorContextValue = {\n get validation(): ValidationResult {\n return {\n isInvalid: switchAria.isInvalid,\n validationDetails: VALID_VALIDITY_STATE,\n validationErrors: [],\n };\n },\n get errorMessageProps() {\n return switchAria.errorMessageProps 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 SwitchButton's useContext binds to InternalSwitchContext. Mirrors\n // RadioGroup's GroupChildren — do NOT pre-resolve outside the provider.\n const FieldChildren = () => {\n const childRenderValues: SwitchFieldRenderProps = {\n get isSelected() {\n return switchAria.isSelected();\n },\n get isDisabled() {\n return switchAria.isDisabled;\n },\n get isReadOnly() {\n return switchAria.isReadOnly;\n },\n get isInvalid() {\n return switchAria.isInvalid;\n },\n get isRequired() {\n return ariaProps.isRequired || false;\n },\n get state() {\n return state;\n },\n };\n const renderedChildren = createMemo(() => {\n const children = merged.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n });\n return <>{renderedChildren()}</>;\n };\n\n return (\n <InternalSwitchContext value={internalContext}>\n <FieldErrorContext value={fieldErrorContext}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n data-selected={dataAttr(switchAria.isSelected())}\n data-disabled={dataAttr(switchAria.isDisabled)}\n data-readonly={dataAttr(switchAria.isReadOnly)}\n data-invalid={dataAttr(switchAria.isInvalid)}\n data-required={dataAttr(ariaProps.isRequired || false)}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n <FieldChildren />\n </Provider>\n </div>\n </FieldErrorContext>\n </InternalSwitchContext>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