@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/TagGroup.d.ts
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* TagGroup component for solidaria-components
|
|
3
|
-
*
|
|
4
|
-
* Pre-wired headless tag group component that combines aria hooks.
|
|
5
|
-
* Port of react-aria-components/src/TagGroup.tsx
|
|
6
|
-
*
|
|
7
|
-
* A tag group is a focusable list of labels, categories, keywords, filters, or other items,
|
|
8
|
-
* with support for keyboard navigation, selection, and removal.
|
|
9
|
-
*/
|
|
10
|
-
import { type JSX } from "solid-js";
|
|
1
|
+
import type { JSX } from "@solidjs/web";
|
|
11
2
|
import { type AriaTagGroupProps } from "@proyecto-viviana/solidaria";
|
|
12
3
|
import { type ListState, type Key, type SelectionMode, type SelectionBehavior } from "@proyecto-viviana/solid-stately";
|
|
13
4
|
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps, type RefLike } from "./utils";
|
|
@@ -17,7 +8,7 @@ export interface TagGroupRenderProps {
|
|
|
17
8
|
/** Whether the tag list is empty. */
|
|
18
9
|
isEmpty: boolean;
|
|
19
10
|
}
|
|
20
|
-
export interface TagGroupProps extends Omit<AriaTagGroupProps, "id">, SlotProps, Omit<JSX.HTMLAttributes<HTMLDivElement>, "class" | "style" | "children"> {
|
|
11
|
+
export interface TagGroupProps extends Omit<AriaTagGroupProps, "id">, SlotProps, Omit<JSX.HTMLAttributes<HTMLDivElement>, "class" | "style" | "children" | "aria-label" | "aria-labelledby" | "aria-describedby"> {
|
|
21
12
|
/** The children of the component. */
|
|
22
13
|
children?: JSX.Element;
|
|
23
14
|
/** The CSS className for the element. */
|
|
@@ -76,6 +67,8 @@ export interface TagRenderProps {
|
|
|
76
67
|
isDisabled: boolean;
|
|
77
68
|
/** Whether the tag is focused. */
|
|
78
69
|
isFocused: boolean;
|
|
70
|
+
/** Whether the tag is keyboard focused. */
|
|
71
|
+
isFocusVisible: boolean;
|
|
79
72
|
/** Whether the tag is pressed. */
|
|
80
73
|
isPressed: boolean;
|
|
81
74
|
/** Whether the tag allows removal. */
|
package/dist/TagGroup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../src/TagGroup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../src/TagGroup.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,aAAa,EAClB,KAAK,iBAA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GAYG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAc1D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS;IAAE,EAAE,CAAC,EAAE,GAAG,CAAC;IAAC,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA4J9F;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,GAAG,GAAG,CAAC,OAAO,CAkHhD;AAED,MAAM,WAAW,oBAAoB;IACnC,sDAAsD;IACtD,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,KAAK,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC;IAC1B,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CA0CxE;AAED,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/TagGroup.js
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
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/TagGroup.tsx
|
|
1
13
|
import { dataAttr, filterDOMProps, mergeRefs, useRenderProps } from "./utils.js";
|
|
2
14
|
import { SharedElementTransition } from "./SharedElementTransition.js";
|
|
3
15
|
import { SelectionIndicatorContext } from "./SelectionIndicator.js";
|
|
4
|
-
import { className, createComponent, delegateEvents, effect, getNextElement, insert,
|
|
5
|
-
import { For, Show, createContext, createMemo, createSignal,
|
|
16
|
+
import { className, createComponent, delegateEvents, effect, getNextElement, insert, readShallow, ref, runHydrationEvents, scope, setAttribute, spread, style, template } from "@solidjs/web";
|
|
17
|
+
import { For, Show, createContext, createMemo, createSignal, useContext } from "solid-js";
|
|
6
18
|
import { createTag, createTagGroup, useLocale } from "@proyecto-viviana/solidaria";
|
|
19
|
+
import { splitProps } from "@proyecto-viviana/solidaria/utils";
|
|
7
20
|
import { createListState } from "@proyecto-viviana/solid-stately";
|
|
8
21
|
//#region src/TagGroup.tsx
|
|
9
22
|
/**
|
|
@@ -15,7 +28,9 @@ import { createListState } from "@proyecto-viviana/solid-stately";
|
|
|
15
28
|
* A tag group is a focusable list of labels, categories, keywords, filters, or other items,
|
|
16
29
|
* with support for keyboard navigation, selection, and removal.
|
|
17
30
|
*/
|
|
18
|
-
var _tmpl$ =
|
|
31
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
32
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div><div>`);
|
|
33
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<button type=button>`);
|
|
19
34
|
const TagGroupContext = createContext(null);
|
|
20
35
|
const TagListStateContext = createContext(null);
|
|
21
36
|
const TagContext = createContext(null);
|
|
@@ -42,23 +57,23 @@ function TagGroup(props) {
|
|
|
42
57
|
"slot",
|
|
43
58
|
"children"
|
|
44
59
|
]);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
var _el$ = getNextElement(_tmpl$);
|
|
61
|
+
spread(_el$, [domProps, {
|
|
62
|
+
get "class"() {
|
|
63
|
+
return typeof local.class === "string" ? local.class : "solidaria-TagGroup";
|
|
64
|
+
},
|
|
65
|
+
get style() {
|
|
66
|
+
return typeof local.style === "object" ? local.style : void 0;
|
|
67
|
+
},
|
|
68
|
+
get slot() {
|
|
69
|
+
return local.slot;
|
|
70
|
+
}
|
|
71
|
+
}], true);
|
|
72
|
+
insert(_el$, scope(() => {
|
|
73
|
+
return props.children;
|
|
74
|
+
}));
|
|
75
|
+
runHydrationEvents();
|
|
76
|
+
return _el$;
|
|
62
77
|
}
|
|
63
78
|
/**
|
|
64
79
|
* TagList contains the list of tags within a TagGroup.
|
|
@@ -117,6 +132,7 @@ function TagList(props) {
|
|
|
117
132
|
}
|
|
118
133
|
});
|
|
119
134
|
const locale = useLocale();
|
|
135
|
+
const onRemove = () => local.onRemove;
|
|
120
136
|
const tagGroupAria = createTagGroup({
|
|
121
137
|
get "aria-label"() {
|
|
122
138
|
return local["aria-label"] ?? (!local["aria-labelledby"] ? local.label : void 0);
|
|
@@ -131,7 +147,7 @@ function TagList(props) {
|
|
|
131
147
|
return local.isDisabled;
|
|
132
148
|
},
|
|
133
149
|
get onRemove() {
|
|
134
|
-
return
|
|
150
|
+
return onRemove();
|
|
135
151
|
},
|
|
136
152
|
get direction() {
|
|
137
153
|
return locale().direction;
|
|
@@ -147,45 +163,52 @@ function TagList(props) {
|
|
|
147
163
|
style: local.style,
|
|
148
164
|
defaultClassName: "solidaria-TagList"
|
|
149
165
|
}, renderValues);
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
166
|
+
return createComponent(TagGroupContext, {
|
|
167
|
+
value: {
|
|
168
|
+
state,
|
|
169
|
+
get onRemove() {
|
|
170
|
+
return onRemove();
|
|
171
|
+
},
|
|
172
|
+
get isDisabled() {
|
|
173
|
+
return local.isDisabled;
|
|
174
|
+
}
|
|
154
175
|
},
|
|
155
|
-
get isDisabled() {
|
|
156
|
-
return local.isDisabled;
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
return createComponent(TagGroupContext.Provider, {
|
|
160
|
-
value: contextValue,
|
|
161
176
|
get children() {
|
|
162
|
-
return createComponent(TagListStateContext
|
|
177
|
+
return createComponent(TagListStateContext, {
|
|
163
178
|
value: state,
|
|
164
179
|
get children() {
|
|
165
180
|
var _el$2 = getNextElement(_tmpl$);
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return
|
|
173
|
-
},
|
|
174
|
-
"onFocusIn": () => {
|
|
175
|
-
setIsFocused(true);
|
|
181
|
+
ref(() => {
|
|
182
|
+
return setGridRef;
|
|
183
|
+
}, _el$2);
|
|
184
|
+
spread(_el$2, [
|
|
185
|
+
domProps,
|
|
186
|
+
() => {
|
|
187
|
+
return tagGroupAria.gridProps;
|
|
176
188
|
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
189
|
+
{
|
|
190
|
+
get "class"() {
|
|
191
|
+
return renderProps.class();
|
|
192
|
+
},
|
|
193
|
+
get style() {
|
|
194
|
+
return renderProps.style();
|
|
195
|
+
},
|
|
196
|
+
onFocusIn: () => {
|
|
197
|
+
setIsFocused(true);
|
|
198
|
+
},
|
|
199
|
+
onFocusOut: (e) => {
|
|
200
|
+
const nextTarget = e.relatedTarget;
|
|
201
|
+
if (nextTarget && e.currentTarget.contains(nextTarget)) return;
|
|
202
|
+
setIsFocused(false);
|
|
203
|
+
},
|
|
204
|
+
get "data-empty"() {
|
|
205
|
+
return dataAttr(local.items.length === 0);
|
|
206
|
+
},
|
|
207
|
+
get "data-focused"() {
|
|
208
|
+
return dataAttr(isFocused());
|
|
209
|
+
}
|
|
187
210
|
}
|
|
188
|
-
|
|
211
|
+
], true);
|
|
189
212
|
insert(_el$2, createComponent(SharedElementTransition, { get children() {
|
|
190
213
|
return createComponent(Show, {
|
|
191
214
|
get when() {
|
|
@@ -238,6 +261,9 @@ function Tag(props) {
|
|
|
238
261
|
},
|
|
239
262
|
get textValue() {
|
|
240
263
|
return local.textValue;
|
|
264
|
+
},
|
|
265
|
+
get onAction() {
|
|
266
|
+
return local.onAction ? () => local.onAction?.(local.id) : void 0;
|
|
241
267
|
}
|
|
242
268
|
}, state, tagRef);
|
|
243
269
|
const normalizedRemoveButtonProps = createMemo(() => {
|
|
@@ -246,20 +272,18 @@ function Tag(props) {
|
|
|
246
272
|
return {
|
|
247
273
|
...raw,
|
|
248
274
|
onPress: () => {
|
|
249
|
-
if (!tagAria.isDisabled && groupContext?.onRemove) {
|
|
250
|
-
groupContext.onRemove(new Set([local.id]));
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
275
|
rawHandler?.();
|
|
254
276
|
}
|
|
255
277
|
};
|
|
256
278
|
});
|
|
279
|
+
const allowsRemoving = createMemo(() => Boolean(tagAria.allowsRemoving) || Boolean(groupContext?.onRemove));
|
|
257
280
|
const renderValues = createMemo(() => ({
|
|
258
281
|
isSelected: tagAria.isSelected,
|
|
259
282
|
isDisabled: tagAria.isDisabled,
|
|
260
283
|
isFocused: tagAria.isFocused,
|
|
284
|
+
isFocusVisible: tagAria.isFocusVisible,
|
|
261
285
|
isPressed: tagAria.isPressed,
|
|
262
|
-
allowsRemoving:
|
|
286
|
+
allowsRemoving: allowsRemoving(),
|
|
263
287
|
selectionMode: state?.selectionMode() ?? "none",
|
|
264
288
|
removeButtonProps: normalizedRemoveButtonProps()
|
|
265
289
|
}));
|
|
@@ -273,54 +297,65 @@ function Tag(props) {
|
|
|
273
297
|
}, renderValues);
|
|
274
298
|
const selectionIndicatorContext = createMemo(() => ({ isSelected: () => tagAria.isSelected }));
|
|
275
299
|
const domProps = createMemo(() => filterDOMProps(rest, { global: true }));
|
|
276
|
-
return createComponent(SelectionIndicatorContext
|
|
300
|
+
return createComponent(SelectionIndicatorContext, {
|
|
277
301
|
get value() {
|
|
278
302
|
return selectionIndicatorContext();
|
|
279
303
|
},
|
|
280
304
|
get children() {
|
|
281
|
-
return createComponent(TagContext
|
|
305
|
+
return createComponent(TagContext, {
|
|
282
306
|
value: {
|
|
283
307
|
get removeButtonProps() {
|
|
284
308
|
return normalizedRemoveButtonProps();
|
|
285
309
|
},
|
|
286
310
|
get allowsRemoving() {
|
|
287
|
-
return
|
|
311
|
+
return allowsRemoving();
|
|
288
312
|
}
|
|
289
313
|
},
|
|
290
314
|
get children() {
|
|
291
|
-
var _el$3 = getNextElement(_tmpl$2)
|
|
315
|
+
var _el$3 = getNextElement(_tmpl$2);
|
|
316
|
+
var _el$4 = _el$3.firstChild;
|
|
292
317
|
var _ref$ = mergeRefs(setTagRef, local.ref);
|
|
293
|
-
typeof _ref$ === "function"
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return
|
|
318
|
+
(typeof _ref$ === "function" || Array.isArray(_ref$)) && ref(() => {
|
|
319
|
+
return _ref$;
|
|
320
|
+
}, _el$3);
|
|
321
|
+
spread(_el$3, [
|
|
322
|
+
domProps,
|
|
323
|
+
() => {
|
|
324
|
+
return tagAria.rowProps;
|
|
300
325
|
},
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
326
|
+
{
|
|
327
|
+
get "class"() {
|
|
328
|
+
return renderProps.class();
|
|
329
|
+
},
|
|
330
|
+
get style() {
|
|
331
|
+
return renderProps.style();
|
|
332
|
+
},
|
|
333
|
+
get "data-selected"() {
|
|
334
|
+
return dataAttr(tagAria.isSelected);
|
|
335
|
+
},
|
|
336
|
+
get "data-disabled"() {
|
|
337
|
+
return dataAttr(tagAria.isDisabled);
|
|
338
|
+
},
|
|
339
|
+
get "data-focused"() {
|
|
340
|
+
return dataAttr(tagAria.isFocused);
|
|
341
|
+
},
|
|
342
|
+
get "data-focus-visible"() {
|
|
343
|
+
return dataAttr(tagAria.isFocusVisible);
|
|
344
|
+
},
|
|
345
|
+
get "data-pressed"() {
|
|
346
|
+
return dataAttr(tagAria.isPressed);
|
|
347
|
+
},
|
|
348
|
+
get "data-allows-removing"() {
|
|
349
|
+
return dataAttr(allowsRemoving());
|
|
350
|
+
}
|
|
320
351
|
}
|
|
321
|
-
|
|
322
|
-
spread(_el$4,
|
|
323
|
-
|
|
352
|
+
], true);
|
|
353
|
+
spread(_el$4, [() => {
|
|
354
|
+
return tagAria.gridCellProps;
|
|
355
|
+
}, { style: { display: "contents" } }], true);
|
|
356
|
+
insert(_el$4, scope(() => {
|
|
357
|
+
return renderProps.renderChildrenStable();
|
|
358
|
+
}));
|
|
324
359
|
runHydrationEvents();
|
|
325
360
|
return _el$3;
|
|
326
361
|
}
|
|
@@ -339,9 +374,11 @@ function TagRemoveButton(props) {
|
|
|
339
374
|
const rawId = getRemoveButtonProps().id;
|
|
340
375
|
const rawAriaLabel = getRemoveButtonProps()["aria-label"];
|
|
341
376
|
const rawAriaLabelledBy = getRemoveButtonProps()["aria-labelledby"];
|
|
377
|
+
const rawTabIndex = getRemoveButtonProps().tabIndex;
|
|
342
378
|
const buttonId = typeof rawId === "string" ? rawId : void 0;
|
|
343
379
|
const ariaLabel = typeof rawAriaLabel === "string" ? rawAriaLabel : "Remove";
|
|
344
380
|
const ariaLabelledBy = typeof rawAriaLabelledBy === "string" ? rawAriaLabelledBy : void 0;
|
|
381
|
+
const tabindex = typeof rawTabIndex === "number" ? rawTabIndex : void 0;
|
|
345
382
|
const handleClick = (event) => {
|
|
346
383
|
event.stopPropagation();
|
|
347
384
|
const handler = getRemoveButtonProps().onPress;
|
|
@@ -350,30 +387,31 @@ function TagRemoveButton(props) {
|
|
|
350
387
|
const stopRowPress = (event) => {
|
|
351
388
|
event.stopPropagation();
|
|
352
389
|
};
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
390
|
+
var _el$5 = getNextElement(_tmpl$3);
|
|
391
|
+
_el$5._$$click = handleClick;
|
|
392
|
+
_el$5._$$pointerdown = stopRowPress;
|
|
393
|
+
setAttribute(_el$5, "id", buttonId);
|
|
394
|
+
setAttribute(_el$5, "aria-label", ariaLabel);
|
|
395
|
+
setAttribute(_el$5, "aria-labelledby", ariaLabelledBy);
|
|
396
|
+
setAttribute(_el$5, "tabindex", tabindex);
|
|
397
|
+
insert(_el$5, () => {
|
|
398
|
+
return props.children ?? "×";
|
|
399
|
+
});
|
|
400
|
+
effect(() => {
|
|
401
|
+
return {
|
|
402
|
+
e: readShallow(props.class ?? "solidaria-TagRemoveButton"),
|
|
403
|
+
t: readShallow(props.style),
|
|
404
|
+
a: getIsDisabled(),
|
|
405
|
+
o: dataAttr(tagContext?.allowsRemoving ?? false)
|
|
406
|
+
};
|
|
407
|
+
}, ({ e, t, a, o }, _p$) => {
|
|
408
|
+
className(_el$5, e, _p$?.e);
|
|
409
|
+
style(_el$5, t, _p$?.t);
|
|
410
|
+
a !== _p$?.a && setAttribute(_el$5, "disabled", a);
|
|
411
|
+
o !== _p$?.o && setAttribute(_el$5, "data-allows-removing", o);
|
|
412
|
+
});
|
|
413
|
+
runHydrationEvents();
|
|
414
|
+
return _el$5;
|
|
377
415
|
}
|
|
378
416
|
delegateEvents(["pointerdown", "click"]);
|
|
379
417
|
//#endregion
|
package/dist/TagGroup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagGroup.js","names":["JSX","createContext","createMemo","createSignal","splitProps","useContext","For","Show","createTagGroup","createTag","useLocale","AriaTagGroupProps","createListState","ListState","Key","SelectionMode","SelectionBehavior","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","RefLike","useRenderProps","filterDOMProps","dataAttr","mergeRefs","SharedElementTransition","SelectionIndicatorContext","SelectionIndicatorContextValue","TagGroupRenderProps","isDisabled","isEmpty","TagGroupProps","Omit","HTMLAttributes","HTMLDivElement","children","Element","class","style","TagListRenderProps","isFocused","TagListProps","items","T","item","renderEmptyState","selectionMode","selectionBehavior","selectedKeys","Iterable","defaultSelectedKeys","onSelectionChange","keys","Set","disabledKeys","getKey","label","onRemove","TagRenderProps","isSelected","isPressed","allowsRemoving","removeButtonProps","Record","TagProps","id","textValue","ref","onAction","key","TagGroupContextValue","state","TagContextValue","TagGroupContext","TagListStateContext","TagContext","useTagGroupContext","TagGroup","props","local","domProps","_el$","_$getNextElement","_tmpl$","_$spread","_$mergeProps","_$memo","undefined","slot","_$insert","_$runHydrationEvents","TagList","gridRef","setGridRef","String","locale","tagGroupAria","aria-label","aria-labelledby","aria-describedby","direction","setIsFocused","renderValues","length","renderProps","defaultClassName","contextValue","_$createComponent","Provider","value","_el$2","_$use","gridProps","onFocusIn","e","nextTarget","relatedTarget","Node","currentTarget","contains","data-empty","data-focused","when","fallback","each","Tag","rest","groupContext","tagRef","setTagRef","tagAria","role","normalizedRemoveButtonProps","raw","rawHandler","onPress","selectionIndicatorContext","global","_el$3","_tmpl$2","_el$4","firstChild","_ref$","rowProps","event","rowClick","onClick","EventHandler","MouseEvent","target","closest","data-selected","data-disabled","data-pressed","data-allows-removing","gridCellProps","display","renderChildren","TagRemoveButtonProps","CSSProperties","buttonProps","TagRemoveButton","tagContext","getRemoveButtonProps","getIsDisabled","Boolean","rawId","rawAriaLabel","rawAriaLabelledBy","buttonId","ariaLabel","ariaLabelledBy","handleClick","HTMLButtonElement","stopPropagation","handler","stopRowPress","PointerEvent","_el$5","_tmpl$3","$$click","$$pointerdown","_$setAttribute","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_$className","t","_$style","a","_$setProperty","o","_$delegateEvents"],"sources":["../src/TagGroup.tsx"],"sourcesContent":["/**\n * TagGroup component for solidaria-components\n *\n * Pre-wired headless tag group component that combines aria hooks.\n * Port of react-aria-components/src/TagGroup.tsx\n *\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items,\n * with support for keyboard navigation, selection, and removal.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from \"solid-js\";\nimport {\n createTagGroup,\n createTag,\n useLocale,\n type AriaTagGroupProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createListState,\n type ListState,\n type Key,\n type SelectionMode,\n type SelectionBehavior,\n} from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n type RefLike,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n mergeRefs,\n} from \"./utils\";\nimport { SharedElementTransition } from \"./SharedElementTransition\";\nimport {\n SelectionIndicatorContext,\n type SelectionIndicatorContextValue,\n} from \"./SelectionIndicator\";\n\nexport interface TagGroupRenderProps {\n /** Whether the tag group is disabled. */\n isDisabled: boolean;\n /** Whether the tag list is empty. */\n isEmpty: boolean;\n}\n\nexport interface TagGroupProps\n extends\n Omit<AriaTagGroupProps, \"id\">,\n SlotProps,\n Omit<JSX.HTMLAttributes<HTMLDivElement>, \"class\" | \"style\" | \"children\"> {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagGroupRenderProps>;\n}\n\nexport interface TagListRenderProps {\n /** Whether the tag list is empty. */\n isEmpty: boolean;\n /** Whether the tag list is focused. */\n isFocused: boolean;\n}\n\nexport interface TagListProps<T>\n extends\n SlotProps,\n Omit<JSX.HTMLAttributes<HTMLDivElement>, \"class\" | \"style\" | \"children\" | \"onSelectionChange\"> {\n /** The items to display in the tag list. */\n items: T[];\n /** Function to render each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagListRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagListRenderProps>;\n /** Content to render when the list is empty. */\n renderEmptyState?: () => JSX.Element;\n /** The selection mode for the tag list. */\n selectionMode?: SelectionMode;\n /** How selection behaves in the collection. */\n selectionBehavior?: SelectionBehavior;\n /** The currently selected keys (controlled). */\n selectedKeys?: Iterable<Key>;\n /** The default selected keys (uncontrolled). */\n defaultSelectedKeys?: Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: \"all\" | Set<Key>) => void;\n /** Keys that are disabled. */\n disabledKeys?: Iterable<Key>;\n /** Function to get a unique key from an item. */\n getKey?: (item: T) => Key;\n /** Accessibility label. */\n label?: string;\n /** Custom aria-label. */\n \"aria-label\"?: string;\n /** Reference to external label element. */\n \"aria-labelledby\"?: string;\n /** Reference to description element. */\n \"aria-describedby\"?: string;\n /** Whether the tag list is disabled. */\n isDisabled?: boolean;\n /** Handler called when tags are removed. */\n onRemove?: (keys: Set<Key>) => void;\n}\n\nexport interface TagRenderProps {\n /** Whether the tag is selected. */\n isSelected: boolean;\n /** Whether the tag is disabled. */\n isDisabled: boolean;\n /** Whether the tag is focused. */\n isFocused: boolean;\n /** Whether the tag is pressed. */\n isPressed: boolean;\n /** Whether the tag allows removal. */\n allowsRemoving: boolean;\n /** The selection mode. */\n selectionMode: SelectionMode;\n /** Props for the remove button when removal is allowed. */\n removeButtonProps: Record<string, unknown>;\n}\n\nexport interface TagProps extends SlotProps {\n /** A unique key for this tag. */\n id: Key;\n /** Whether the tag is disabled. */\n isDisabled?: boolean;\n /** A text value for accessibility. */\n textValue?: string;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<TagRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagRenderProps>;\n /** A ref to the tag's DOM element (merged with the internal collection ref). */\n ref?: RefLike<HTMLDivElement>;\n /** Handler called when the tag is activated. */\n onAction?: (key: Key) => void;\n}\n\ninterface TagGroupContextValue {\n state: ListState;\n onRemove?: (keys: Set<Key>) => void;\n isDisabled?: boolean;\n}\n\ninterface TagContextValue {\n removeButtonProps: Record<string, unknown>;\n allowsRemoving: boolean;\n}\n\nexport const TagGroupContext = createContext<TagGroupContextValue | null>(null);\nexport const TagListStateContext = createContext<ListState | null>(null);\nexport const TagContext = createContext<TagContextValue | null>(null);\n\nexport function useTagGroupContext(): TagGroupContextValue | null {\n return useContext(TagGroupContext);\n}\n\n/**\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items,\n * with support for keyboard navigation, selection, and removal.\n *\n * @example\n * ```tsx\n * <TagGroup label=\"Categories\" onRemove={(keys) => removeItems(keys)}>\n * <TagList items={items}>\n * {(item) => <Tag id={item.id}>{item.name}</Tag>}\n * </TagList>\n * </TagGroup>\n * ```\n */\nexport function TagGroup(props: TagGroupProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\"]);\n\n // We need TagList to provide the state, so TagGroup just provides context\n return (\n <div\n {...domProps}\n class={typeof local.class === \"string\" ? local.class : \"solidaria-TagGroup\"}\n style={typeof local.style === \"object\" ? local.style : undefined}\n slot={local.slot}\n >\n {props.children}\n </div>\n );\n}\n\n/**\n * TagList contains the list of tags within a TagGroup.\n */\nexport function TagList<T extends { id?: Key; key?: Key }>(props: TagListProps<T>): JSX.Element {\n const [local, domProps] = splitProps(props, [\n \"items\",\n \"class\",\n \"style\",\n \"slot\",\n \"renderEmptyState\",\n \"children\",\n \"selectionMode\",\n \"selectionBehavior\",\n \"selectedKeys\",\n \"defaultSelectedKeys\",\n \"onSelectionChange\",\n \"disabledKeys\",\n \"getKey\",\n \"label\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"isDisabled\",\n \"onRemove\",\n ]);\n\n // Create a ref for the grid\n const [gridRef, setGridRef] = createSignal<HTMLDivElement | null>(null);\n\n // Default getKey function\n const getKey = (item: T): Key => {\n if (local.getKey) return local.getKey(item);\n if (item.id !== undefined) return item.id;\n if (item.key !== undefined) return item.key;\n return String(item);\n };\n\n const state = createListState({\n get items() {\n return local.items;\n },\n getKey,\n get selectionMode() {\n return local.selectionMode ?? \"none\";\n },\n get selectionBehavior() {\n return local.selectionBehavior ?? \"toggle\";\n },\n get selectedKeys() {\n return local.selectedKeys;\n },\n get defaultSelectedKeys() {\n return local.defaultSelectedKeys;\n },\n get onSelectionChange() {\n return local.onSelectionChange;\n },\n get disabledKeys() {\n return local.disabledKeys;\n },\n });\n\n // The tag group navigates on the inline axis, so ArrowLeft/ArrowRight flip\n // under RTL. Thread the resolved layout direction into the hook (mirrors\n // ListBox, and useTagGroup passing `direction` to the ListKeyboardDelegate).\n const locale = useLocale();\n\n // Create tag group accessibility props\n const tagGroupAria = createTagGroup(\n {\n get \"aria-label\"() {\n return local[\"aria-label\"] ?? (!local[\"aria-labelledby\"] ? local.label : undefined);\n },\n get \"aria-labelledby\"() {\n return local[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return local[\"aria-describedby\"];\n },\n get isDisabled() {\n return local.isDisabled;\n },\n get onRemove() {\n return local.onRemove;\n },\n get direction() {\n return locale().direction;\n },\n },\n state,\n gridRef,\n );\n\n const [isFocused, setIsFocused] = createSignal(false);\n\n const renderValues = createMemo<TagListRenderProps>(() => ({\n isEmpty: local.items.length === 0,\n isFocused: isFocused(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-TagList\",\n },\n renderValues,\n );\n\n const contextValue: TagGroupContextValue = {\n state,\n get onRemove() {\n return local.onRemove;\n },\n get isDisabled() {\n return local.isDisabled;\n },\n };\n\n return (\n <TagGroupContext.Provider value={contextValue}>\n <TagListStateContext.Provider value={state}>\n <div\n ref={setGridRef}\n {...domProps}\n {...tagGroupAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n // Track focus-within via the BUBBLING focusin/focusout pair (not the\n // non-bubbling focus/blur the hook's trampoline uses) so this render-prop\n // signal never clobbers `gridProps.onFocus` — the container focus\n // trampoline that marshals entry onto the first/last row.\n onFocusIn={() => {\n setIsFocused(true);\n }}\n onFocusOut={(e) => {\n const nextTarget = e.relatedTarget as Node | null;\n if (nextTarget && e.currentTarget.contains(nextTarget)) {\n return;\n }\n\n setIsFocused(false);\n }}\n data-empty={dataAttr(local.items.length === 0)}\n data-focused={dataAttr(isFocused())}\n >\n <SharedElementTransition>\n <Show when={local.items.length > 0} fallback={local.renderEmptyState?.()}>\n <For each={local.items}>{(item) => props.children(item)}</For>\n </Show>\n </SharedElementTransition>\n </div>\n </TagListStateContext.Provider>\n </TagGroupContext.Provider>\n );\n}\n\n/**\n * A Tag is an individual item within a TagList.\n */\nexport function Tag(props: TagProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"id\",\n \"class\",\n \"style\",\n \"slot\",\n \"isDisabled\",\n \"textValue\",\n \"onAction\",\n \"ref\",\n ]);\n\n const state = useContext(TagListStateContext);\n const groupContext = useContext(TagGroupContext);\n\n // Create a ref for the tag\n const [tagRef, setTagRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create tag accessibility props\n const tagAria = createTag(\n {\n get key() {\n return local.id;\n },\n role: \"row\",\n get isDisabled() {\n return local.isDisabled || groupContext?.isDisabled;\n },\n get textValue() {\n return local.textValue;\n },\n },\n state!,\n tagRef,\n );\n\n const normalizedRemoveButtonProps = createMemo<Record<string, unknown>>(() => {\n const raw = tagAria.removeButtonProps;\n const rawHandler = typeof raw.onPress === \"function\" ? (raw.onPress as () => void) : undefined;\n return {\n ...raw,\n onPress: () => {\n if (!tagAria.isDisabled && groupContext?.onRemove) {\n groupContext.onRemove(new Set([local.id]));\n return;\n }\n rawHandler?.();\n },\n };\n });\n\n const renderValues = createMemo<TagRenderProps>(() => ({\n isSelected: tagAria.isSelected,\n isDisabled: tagAria.isDisabled,\n isFocused: tagAria.isFocused,\n isPressed: tagAria.isPressed,\n allowsRemoving: tagAria.allowsRemoving,\n selectionMode: state?.selectionMode() ?? \"none\",\n removeButtonProps: normalizedRemoveButtonProps(),\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-Tag\",\n },\n renderValues,\n );\n\n const selectionIndicatorContext = createMemo<SelectionIndicatorContextValue>(() => ({\n isSelected: () => tagAria.isSelected,\n }));\n\n const domProps = createMemo(() => filterDOMProps(rest, { global: true }));\n\n return (\n <SelectionIndicatorContext.Provider value={selectionIndicatorContext()}>\n <TagContext.Provider\n value={{\n get removeButtonProps() {\n return normalizedRemoveButtonProps();\n },\n get allowsRemoving() {\n return tagAria.allowsRemoving;\n },\n }}\n >\n <div\n ref={mergeRefs(setTagRef, local.ref)}\n {...domProps()}\n {...tagAria.rowProps}\n class={renderProps.class()}\n style={renderProps.style()}\n onClick={(event) => {\n const rowClick = tagAria.rowProps.onClick;\n if (typeof rowClick === \"function\") {\n (rowClick as JSX.EventHandler<HTMLDivElement, MouseEvent>)(event);\n }\n\n if (!tagAria.isDisabled && !(event.target as Element | null)?.closest(\"button\")) {\n local.onAction?.(local.id);\n }\n }}\n data-selected={dataAttr(tagAria.isSelected)}\n data-disabled={dataAttr(tagAria.isDisabled)}\n data-focused={dataAttr(tagAria.isFocused)}\n data-pressed={dataAttr(tagAria.isPressed)}\n data-allows-removing={dataAttr(tagAria.allowsRemoving)}\n >\n <div {...tagAria.gridCellProps} style={{ display: \"contents\" }}>\n {renderProps.renderChildren()}\n </div>\n </div>\n </TagContext.Provider>\n </SelectionIndicatorContext.Provider>\n );\n}\n\nexport interface TagRemoveButtonProps {\n /** The children of the button (usually an X icon). */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n /** Explicit button props from Tag render props. */\n buttonProps?: Record<string, unknown>;\n}\n\n/**\n * TagRemoveButton is the button used to remove a tag.\n * It should be placed inside a Tag component.\n */\nexport function TagRemoveButton(props: TagRemoveButtonProps): JSX.Element {\n const tagContext = useContext(TagContext);\n const getRemoveButtonProps = () => props.buttonProps ?? tagContext?.removeButtonProps ?? {};\n const getIsDisabled = () => Boolean(getRemoveButtonProps().isDisabled);\n const rawId = getRemoveButtonProps().id;\n const rawAriaLabel = getRemoveButtonProps()[\"aria-label\"];\n const rawAriaLabelledBy = getRemoveButtonProps()[\"aria-labelledby\"];\n const buttonId: string | undefined = typeof rawId === \"string\" ? rawId : undefined;\n const ariaLabel: string = typeof rawAriaLabel === \"string\" ? rawAriaLabel : \"Remove\";\n const ariaLabelledBy: string | undefined =\n typeof rawAriaLabelledBy === \"string\" ? rawAriaLabelledBy : undefined;\n\n const handleClick: JSX.EventHandler<HTMLButtonElement, MouseEvent> = (event) => {\n event.stopPropagation();\n const handler = getRemoveButtonProps().onPress;\n if (typeof handler === \"function\" && !getIsDisabled()) {\n (handler as () => void)();\n }\n };\n const stopRowPress: JSX.EventHandler<HTMLButtonElement, PointerEvent> = (event) => {\n event.stopPropagation();\n };\n\n return (\n <button\n type=\"button\"\n class={props.class ?? \"solidaria-TagRemoveButton\"}\n style={props.style}\n id={buttonId}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n disabled={getIsDisabled()}\n data-allows-removing={dataAttr(tagContext?.allowsRemoving ?? false)}\n onPointerDown={stopRowPress}\n onClick={handleClick}\n >\n {props.children ?? \"×\"}\n </button>\n );\n}\n\nexport type { Key, SelectionMode, SelectionBehavior };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsKA,MAAa0E,kBAAkBzE,cAA2C,IAAI;AAC9E,MAAa0E,sBAAsB1E,cAAgC,IAAI;AACvE,MAAa2E,aAAa3E,cAAsC,IAAI;AAEpE,SAAgB4E,qBAAkD;CAChE,OAAOxE,WAAWqE,eAAe;AACnC;;;;;;;;;;;;;;AAeA,SAAgBI,SAASC,OAAmC;CAC1D,MAAM,CAACC,OAAOC,YAAY7E,WAAW2E,OAAO;EAAC;EAAS;EAAS;EAAQ;CAAU,CAAC;CAGlF,cAAA;EAAA,IAAAG,OAAAC,eAAAC,MAAA;EAAAC,OAAAH,MAAAI,WAEQL,UAAQ;GAAA,KAAA,WAAA;IAAA,OACLM,WAAA,OAAOP,MAAM1C,UAAU,QAAQ,CAAA,CAAA,IAAG0C,MAAM1C,QAAQ;GAAoB;GAAA,IAC3EC,QAAK;IAAA,OAAEgD,WAAA,OAAOP,MAAMzC,UAAU,QAAQ,CAAA,CAAA,IAAGyC,MAAMzC,QAAQiD,KAAAA;GAAS;GAAA,IAChEC,OAAI;IAAA,OAAET,MAAMS;GAAI;EAAA,CAAA,GAAA,OAAA,IAAA;EAAAC,OAAAR,YAEfH,MAAM3C,QAAQ;EAAAuD,mBAAA;EAAA,OAAAT;CAAA,EAAA,CAAA;AAGrB;;;;AAKA,SAAgBU,QAA2Cb,OAAqC;CAC9F,MAAM,CAACC,OAAOC,YAAY7E,WAAW2E,OAAO;EAC1C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CAGD,MAAM,CAACc,SAASC,cAAc3F,aAAoC,IAAI;CAGtE,MAAMqD,UAAUX,SAAiB;EAC/B,IAAImC,MAAMxB,QAA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AA,MALvBT,QAAQ;EAAAa,aAAAJ,OAAA,cACAR,SAAS;EAAAY,aAAAJ,OAAA,mBACJP,cAAc;EAAAlF,OAAAyF,aAM9BpG,MAAM3C,YAAY,GAAG;EAAAoJ,QAAAC,QAAA;GAAA,IAAAC,MAVf3G,MAAMzC,SAAS,6BAA2BqJ,OAC1C5G,MAAMxC,OAAKqJ,OAIRvB,cAAc,GAACwB,OACHrK,SAAS2I,YAAYrG,kBAAkB,KAAK;GAAC4H,QAAAD,IAAAtE,KAAA2E,UAAAX,OAAAM,IAAAtE,IAAAuE,GAAA;GAAAD,IAAAM,IAAAC,MAAAb,OAAAQ,MAAAF,IAAAM,CAAA;GAAAH,SAAAH,IAAAQ,KAAAC,YAAAf,OAAA,YAAAM,IAAAQ,IAAAL,IAAA;GAAAC,SAAAJ,IAAAU,KAAAZ,aAAAJ,OAAA,wBAAAM,IAAAU,IAAAN,IAAA;GAAA,OAAAJ;EAAA,GAAA;GAAAtE,GAAA3B,KAAAA;GAAAuG,GAAAvG,KAAAA;GAAAyG,GAAAzG,KAAAA;GAAA2G,GAAA3G,KAAAA;EAAA,CAAA;EAAAG,mBAAA;EAAA,OAAAwF;CAAA,EAAA,CAAA;AAOzE;AAEsDiB,eAAA,CAAA,eAAA,OAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"TagGroup.js","names":["{props.children}","<div\n {...domProps}\n class={typeof local.class === \"string\" ? local.class : \"solidaria-TagGroup\"}\n style={typeof local.style === \"object\" ? local.style : undefined}\n slot={local.slot}\n >\n {props.children}\n </div>","<TagGroupContext value={contextValue}>\n <TagListStateContext value={state}>\n <div\n ref={setGridRef}\n {...domProps}\n {...tagGroupAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n // Track focus-within via the BUBBLING focusin/focusout pair (not the\n // non-bubbling focus/blur the hook's trampoline uses) so this render-prop\n // signal never clobbers `gridProps.onFocus` — the container focus\n // trampoline that marshals entry onto the first/last row.\n onFocusIn={() => {\n setIsFocused(true);\n }}\n onFocusOut={(e) => {\n const nextTarget = e.relatedTarget as Node | null;\n if (nextTarget && e.currentTarget.contains(nextTarget)) {\n return;\n }\n\n setIsFocused(false);\n }}\n data-empty={dataAttr(local.items.length === 0)}\n data-focused={dataAttr(isFocused())}\n >\n <SharedElementTransition>\n <Show when={local.items.length > 0} fallback={local.renderEmptyState?.()}>\n <For each={local.items}>{(item) => props.children(item)}</For>\n </Show>\n </SharedElementTransition>\n </div>\n </TagListStateContext>\n </TagGroupContext>","value={contextValue}","<TagListStateContext value={state}>\n <div\n ref={setGridRef}\n {...domProps}\n {...tagGroupAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n // Track focus-within via the BUBBLING focusin/focusout pair (not the\n // non-bubbling focus/blur the hook's trampoline uses) so this render-prop\n // signal never clobbers `gridProps.onFocus` — the container focus\n // trampoline that marshals entry onto the first/last row.\n onFocusIn={() => {\n setIsFocused(true);\n }}\n onFocusOut={(e) => {\n const nextTarget = e.relatedTarget as Node | null;\n if (nextTarget && e.currentTarget.contains(nextTarget)) {\n return;\n }\n\n setIsFocused(false);\n }}\n data-empty={dataAttr(local.items.length === 0)}\n data-focused={dataAttr(isFocused())}\n >\n <SharedElementTransition>\n <Show when={local.items.length > 0} fallback={local.renderEmptyState?.()}>\n <For each={local.items}>{(item) => props.children(item)}</For>\n </Show>\n </SharedElementTransition>\n </div>\n </TagListStateContext>","value={state}","ref={setGridRef}","onFocusIn={() => {\n setIsFocused(true);\n }}","onFocusOut={(e) => {\n const nextTarget = e.relatedTarget as Node | null;\n if (nextTarget && e.currentTarget.contains(nextTarget)) {\n return;\n }\n\n setIsFocused(false);\n }}","<SharedElementTransition>\n <Show when={local.items.length > 0} fallback={local.renderEmptyState?.()}>\n <For each={local.items}>{(item) => props.children(item)}</For>\n </Show>\n </SharedElementTransition>","<Show when={local.items.length > 0} fallback={local.renderEmptyState?.()}>\n <For each={local.items}>{(item) => props.children(item)}</For>\n </Show>","<For each={local.items}>{(item) => props.children(item)}</For>","<div\n ref={setGridRef}\n {...domProps}\n {...tagGroupAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n // Track focus-within via the BUBBLING focusin/focusout pair (not the\n // non-bubbling focus/blur the hook's trampoline uses) so this render-prop\n // signal never clobbers `gridProps.onFocus` — the container focus\n // trampoline that marshals entry onto the first/last row.\n onFocusIn={() => {\n setIsFocused(true);\n }}\n onFocusOut={(e) => {\n const nextTarget = e.relatedTarget as Node | null;\n if (nextTarget && e.currentTarget.contains(nextTarget)) {\n return;\n }\n\n setIsFocused(false);\n }}\n data-empty={dataAttr(local.items.length === 0)}\n data-focused={dataAttr(isFocused())}\n >\n <SharedElementTransition>\n <Show when={local.items.length > 0} fallback={local.renderEmptyState?.()}>\n <For each={local.items}>{(item) => props.children(item)}</For>\n </Show>\n </SharedElementTransition>\n </div>","<SelectionIndicatorContext value={selectionIndicatorContext()}>\n <TagContext\n value={{\n get removeButtonProps() {\n return normalizedRemoveButtonProps();\n },\n get allowsRemoving() {\n return allowsRemoving();\n },\n }}\n >\n <div\n ref={mergeRefs(setTagRef, local.ref)}\n {...domProps()}\n {...tagAria.rowProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(tagAria.isSelected)}\n data-disabled={dataAttr(tagAria.isDisabled)}\n data-focused={dataAttr(tagAria.isFocused)}\n data-focus-visible={dataAttr(tagAria.isFocusVisible)}\n data-pressed={dataAttr(tagAria.isPressed)}\n data-allows-removing={dataAttr(allowsRemoving())}\n >\n <div {...tagAria.gridCellProps} style={{ display: \"contents\" }}>\n {renderProps.renderChildrenStable()}\n </div>\n </div>\n </TagContext>\n </SelectionIndicatorContext>","<TagContext\n value={{\n get removeButtonProps() {\n return normalizedRemoveButtonProps();\n },\n get allowsRemoving() {\n return allowsRemoving();\n },\n }}\n >\n <div\n ref={mergeRefs(setTagRef, local.ref)}\n {...domProps()}\n {...tagAria.rowProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(tagAria.isSelected)}\n data-disabled={dataAttr(tagAria.isDisabled)}\n data-focused={dataAttr(tagAria.isFocused)}\n data-focus-visible={dataAttr(tagAria.isFocusVisible)}\n data-pressed={dataAttr(tagAria.isPressed)}\n data-allows-removing={dataAttr(allowsRemoving())}\n >\n <div {...tagAria.gridCellProps} style={{ display: \"contents\" }}>\n {renderProps.renderChildrenStable()}\n </div>\n </div>\n </TagContext>","value={{\n get removeButtonProps() {\n return normalizedRemoveButtonProps();\n },\n get allowsRemoving() {\n return allowsRemoving();\n },\n }}","ref={mergeRefs(setTagRef, local.ref)}","style={{ display: \"contents\" }}","{renderProps.renderChildrenStable()}","<div\n ref={mergeRefs(setTagRef, local.ref)}\n {...domProps()}\n {...tagAria.rowProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(tagAria.isSelected)}\n data-disabled={dataAttr(tagAria.isDisabled)}\n data-focused={dataAttr(tagAria.isFocused)}\n data-focus-visible={dataAttr(tagAria.isFocusVisible)}\n data-pressed={dataAttr(tagAria.isPressed)}\n data-allows-removing={dataAttr(allowsRemoving())}\n >\n <div {...tagAria.gridCellProps} style={{ display: \"contents\" }}>\n {renderProps.renderChildrenStable()}\n </div>\n </div>","style={props.style}","disabled={getIsDisabled()}","data-allows-removing={dataAttr(tagContext?.allowsRemoving ?? false)}","<button\n type=\"button\"\n class={props.class ?? \"solidaria-TagRemoveButton\"}\n style={props.style}\n id={buttonId}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n tabindex={tabindex}\n disabled={getIsDisabled()}\n data-allows-removing={dataAttr(tagContext?.allowsRemoving ?? false)}\n onPointerDown={stopRowPress}\n onClick={handleClick}\n >\n {props.children ?? \"×\"}\n </button>"],"sources":["../src/TagGroup.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/TagGroup.tsx\n\n/**\n * TagGroup component for solidaria-components\n *\n * Pre-wired headless tag group component that combines aria hooks.\n * Port of react-aria-components/src/TagGroup.tsx\n *\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items,\n * with support for keyboard navigation, selection, and removal.\n */\n\nimport { createContext, createMemo, createSignal, useContext, For, Show } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n createTagGroup,\n createTag,\n useLocale,\n type AriaTagGroupProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createListState,\n type ListState,\n type Key,\n type SelectionMode,\n type SelectionBehavior,\n} from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n type RefLike,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n mergeRefs,\n} from \"./utils\";\nimport { SharedElementTransition } from \"./SharedElementTransition\";\nimport { splitProps } from \"@proyecto-viviana/solidaria/utils\";\nimport {\n SelectionIndicatorContext,\n type SelectionIndicatorContextValue,\n} from \"./SelectionIndicator\";\n\nexport interface TagGroupRenderProps {\n /** Whether the tag group is disabled. */\n isDisabled: boolean;\n /** Whether the tag list is empty. */\n isEmpty: boolean;\n}\n\nexport interface TagGroupProps\n extends\n Omit<AriaTagGroupProps, \"id\">,\n SlotProps,\n Omit<\n JSX.HTMLAttributes<HTMLDivElement>,\n \"class\" | \"style\" | \"children\" | \"aria-label\" | \"aria-labelledby\" | \"aria-describedby\"\n > {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagGroupRenderProps>;\n}\n\nexport interface TagListRenderProps {\n /** Whether the tag list is empty. */\n isEmpty: boolean;\n /** Whether the tag list is focused. */\n isFocused: boolean;\n}\n\nexport interface TagListProps<T>\n extends\n SlotProps,\n Omit<JSX.HTMLAttributes<HTMLDivElement>, \"class\" | \"style\" | \"children\" | \"onSelectionChange\"> {\n /** The items to display in the tag list. */\n items: T[];\n /** Function to render each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagListRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagListRenderProps>;\n /** Content to render when the list is empty. */\n renderEmptyState?: () => JSX.Element;\n /** The selection mode for the tag list. */\n selectionMode?: SelectionMode;\n /** How selection behaves in the collection. */\n selectionBehavior?: SelectionBehavior;\n /** The currently selected keys (controlled). */\n selectedKeys?: Iterable<Key>;\n /** The default selected keys (uncontrolled). */\n defaultSelectedKeys?: Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: \"all\" | Set<Key>) => void;\n /** Keys that are disabled. */\n disabledKeys?: Iterable<Key>;\n /** Function to get a unique key from an item. */\n getKey?: (item: T) => Key;\n /** Accessibility label. */\n label?: string;\n /** Custom aria-label. */\n \"aria-label\"?: string;\n /** Reference to external label element. */\n \"aria-labelledby\"?: string;\n /** Reference to description element. */\n \"aria-describedby\"?: string;\n /** Whether the tag list is disabled. */\n isDisabled?: boolean;\n /** Handler called when tags are removed. */\n onRemove?: (keys: Set<Key>) => void;\n}\n\nexport interface TagRenderProps {\n /** Whether the tag is selected. */\n isSelected: boolean;\n /** Whether the tag is disabled. */\n isDisabled: boolean;\n /** Whether the tag is focused. */\n isFocused: boolean;\n /** Whether the tag is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the tag is pressed. */\n isPressed: boolean;\n /** Whether the tag allows removal. */\n allowsRemoving: boolean;\n /** The selection mode. */\n selectionMode: SelectionMode;\n /** Props for the remove button when removal is allowed. */\n removeButtonProps: Record<string, unknown>;\n}\n\nexport interface TagProps extends SlotProps {\n /** A unique key for this tag. */\n id: Key;\n /** Whether the tag is disabled. */\n isDisabled?: boolean;\n /** A text value for accessibility. */\n textValue?: string;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<TagRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagRenderProps>;\n /** A ref to the tag's DOM element (merged with the internal collection ref). */\n ref?: RefLike<HTMLDivElement>;\n /** Handler called when the tag is activated. */\n onAction?: (key: Key) => void;\n}\n\ninterface TagGroupContextValue {\n state: ListState;\n onRemove?: (keys: Set<Key>) => void;\n isDisabled?: boolean;\n}\n\ninterface TagContextValue {\n removeButtonProps: Record<string, unknown>;\n allowsRemoving: boolean;\n}\n\nexport const TagGroupContext = createContext<TagGroupContextValue | null>(null);\nexport const TagListStateContext = createContext<ListState | null>(null);\nexport const TagContext = createContext<TagContextValue | null>(null);\n\nexport function useTagGroupContext(): TagGroupContextValue | null {\n return useContext(TagGroupContext);\n}\n\n/**\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items,\n * with support for keyboard navigation, selection, and removal.\n *\n * @example\n * ```tsx\n * <TagGroup label=\"Categories\" onRemove={(keys) => removeItems(keys)}>\n * <TagList items={items}>\n * {(item) => <Tag id={item.id}>{item.name}</Tag>}\n * </TagList>\n * </TagGroup>\n * ```\n */\nexport function TagGroup(props: TagGroupProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\"]);\n\n // We need TagList to provide the state, so TagGroup just provides context\n return (\n <div\n {...domProps}\n class={typeof local.class === \"string\" ? local.class : \"solidaria-TagGroup\"}\n style={typeof local.style === \"object\" ? local.style : undefined}\n slot={local.slot}\n >\n {props.children}\n </div>\n );\n}\n\n/**\n * TagList contains the list of tags within a TagGroup.\n */\nexport function TagList<T extends { id?: Key; key?: Key }>(props: TagListProps<T>): JSX.Element {\n const [local, domProps] = splitProps(props, [\n \"items\",\n \"class\",\n \"style\",\n \"slot\",\n \"renderEmptyState\",\n \"children\",\n \"selectionMode\",\n \"selectionBehavior\",\n \"selectedKeys\",\n \"defaultSelectedKeys\",\n \"onSelectionChange\",\n \"disabledKeys\",\n \"getKey\",\n \"label\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"isDisabled\",\n \"onRemove\",\n ]);\n\n // Create a ref for the grid\n const [gridRef, setGridRef] = createSignal<HTMLDivElement | null>(null);\n\n // Default getKey function\n const getKey = (item: T): Key => {\n if (local.getKey) return local.getKey(item);\n if (item.id !== undefined) return item.id;\n if (item.key !== undefined) return item.key;\n return String(item);\n };\n\n const state = createListState({\n get items() {\n return local.items;\n },\n getKey,\n get selectionMode() {\n return local.selectionMode ?? \"none\";\n },\n get selectionBehavior() {\n return local.selectionBehavior ?? \"toggle\";\n },\n get selectedKeys() {\n return local.selectedKeys;\n },\n get defaultSelectedKeys() {\n return local.defaultSelectedKeys;\n },\n get onSelectionChange() {\n return local.onSelectionChange;\n },\n get disabledKeys() {\n return local.disabledKeys;\n },\n });\n\n // The tag group navigates on the inline axis, so ArrowLeft/ArrowRight flip\n // under RTL. Thread the resolved layout direction into the hook (mirrors\n // ListBox, and useTagGroup passing `direction` to the ListKeyboardDelegate).\n const locale = useLocale();\n\n // Callback-valued props must not go through createMemo — a memo that\n // stores a function is easy to unwrap/call, and the live getter\n // `onRemove={handler()}` must re-read on each access.\n const onRemove = () => local.onRemove;\n\n const tagGroupAria = createTagGroup(\n {\n get \"aria-label\"() {\n return local[\"aria-label\"] ?? (!local[\"aria-labelledby\"] ? local.label : undefined);\n },\n get \"aria-labelledby\"() {\n return local[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return local[\"aria-describedby\"];\n },\n get isDisabled() {\n return local.isDisabled;\n },\n get onRemove() {\n return onRemove();\n },\n get direction() {\n return locale().direction;\n },\n },\n state,\n gridRef,\n );\n\n const [isFocused, setIsFocused] = createSignal(false);\n\n const renderValues = createMemo<TagListRenderProps>(() => ({\n isEmpty: local.items.length === 0,\n isFocused: isFocused(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-TagList\",\n },\n renderValues,\n );\n\n const contextValue: TagGroupContextValue = {\n state,\n get onRemove() {\n return onRemove();\n },\n get isDisabled() {\n return local.isDisabled;\n },\n };\n\n return (\n <TagGroupContext value={contextValue}>\n <TagListStateContext value={state}>\n <div\n ref={setGridRef}\n {...domProps}\n {...tagGroupAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n // Track focus-within via the BUBBLING focusin/focusout pair (not the\n // non-bubbling focus/blur the hook's trampoline uses) so this render-prop\n // signal never clobbers `gridProps.onFocus` — the container focus\n // trampoline that marshals entry onto the first/last row.\n onFocusIn={() => {\n setIsFocused(true);\n }}\n onFocusOut={(e) => {\n const nextTarget = e.relatedTarget as Node | null;\n if (nextTarget && e.currentTarget.contains(nextTarget)) {\n return;\n }\n\n setIsFocused(false);\n }}\n data-empty={dataAttr(local.items.length === 0)}\n data-focused={dataAttr(isFocused())}\n >\n <SharedElementTransition>\n <Show when={local.items.length > 0} fallback={local.renderEmptyState?.()}>\n <For each={local.items}>{(item) => props.children(item)}</For>\n </Show>\n </SharedElementTransition>\n </div>\n </TagListStateContext>\n </TagGroupContext>\n );\n}\n\n/**\n * A Tag is an individual item within a TagList.\n */\nexport function Tag(props: TagProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"id\",\n \"class\",\n \"style\",\n \"slot\",\n \"isDisabled\",\n \"textValue\",\n \"onAction\",\n \"ref\",\n ]);\n\n const state = useContext(TagListStateContext);\n const groupContext = useContext(TagGroupContext);\n\n // Create a ref for the tag\n const [tagRef, setTagRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create tag accessibility props\n const tagAria = createTag(\n {\n get key() {\n return local.id;\n },\n role: \"row\",\n get isDisabled() {\n return local.isDisabled || groupContext?.isDisabled;\n },\n get textValue() {\n return local.textValue;\n },\n get onAction() {\n return local.onAction ? () => local.onAction?.(local.id) : undefined;\n },\n },\n state!,\n tagRef,\n );\n\n const normalizedRemoveButtonProps = createMemo<Record<string, unknown>>(() => {\n const raw = tagAria.removeButtonProps;\n const rawHandler = typeof raw.onPress === \"function\" ? (raw.onPress as () => void) : undefined;\n return {\n ...raw,\n onPress: () => {\n rawHandler?.();\n },\n };\n });\n\n const allowsRemoving = createMemo(\n () => Boolean(tagAria.allowsRemoving) || Boolean(groupContext?.onRemove),\n );\n const renderValues = createMemo<TagRenderProps>(() => ({\n isSelected: tagAria.isSelected,\n isDisabled: tagAria.isDisabled,\n isFocused: tagAria.isFocused,\n isFocusVisible: tagAria.isFocusVisible,\n isPressed: tagAria.isPressed,\n allowsRemoving: allowsRemoving(),\n selectionMode: state?.selectionMode() ?? \"none\",\n removeButtonProps: normalizedRemoveButtonProps(),\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-Tag\",\n },\n renderValues,\n );\n\n const selectionIndicatorContext = createMemo<SelectionIndicatorContextValue>(() => ({\n isSelected: () => tagAria.isSelected,\n }));\n\n const domProps = createMemo(() => filterDOMProps(rest, { global: true }));\n\n return (\n <SelectionIndicatorContext value={selectionIndicatorContext()}>\n <TagContext\n value={{\n get removeButtonProps() {\n return normalizedRemoveButtonProps();\n },\n get allowsRemoving() {\n return allowsRemoving();\n },\n }}\n >\n <div\n ref={mergeRefs(setTagRef, local.ref)}\n {...domProps()}\n {...tagAria.rowProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(tagAria.isSelected)}\n data-disabled={dataAttr(tagAria.isDisabled)}\n data-focused={dataAttr(tagAria.isFocused)}\n data-focus-visible={dataAttr(tagAria.isFocusVisible)}\n data-pressed={dataAttr(tagAria.isPressed)}\n data-allows-removing={dataAttr(allowsRemoving())}\n >\n <div {...tagAria.gridCellProps} style={{ display: \"contents\" }}>\n {renderProps.renderChildrenStable()}\n </div>\n </div>\n </TagContext>\n </SelectionIndicatorContext>\n );\n}\n\nexport interface TagRemoveButtonProps {\n /** The children of the button (usually an X icon). */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n /** Explicit button props from Tag render props. */\n buttonProps?: Record<string, unknown>;\n}\n\n/**\n * TagRemoveButton is the button used to remove a tag.\n * It should be placed inside a Tag component.\n */\nexport function TagRemoveButton(props: TagRemoveButtonProps): JSX.Element {\n const tagContext = useContext(TagContext);\n const getRemoveButtonProps = () => props.buttonProps ?? tagContext?.removeButtonProps ?? {};\n const getIsDisabled = () => Boolean(getRemoveButtonProps().isDisabled);\n const rawId = getRemoveButtonProps().id;\n const rawAriaLabel = getRemoveButtonProps()[\"aria-label\"];\n const rawAriaLabelledBy = getRemoveButtonProps()[\"aria-labelledby\"];\n const rawTabIndex = getRemoveButtonProps().tabIndex;\n const buttonId: string | undefined = typeof rawId === \"string\" ? rawId : undefined;\n const ariaLabel: string = typeof rawAriaLabel === \"string\" ? rawAriaLabel : \"Remove\";\n const ariaLabelledBy: string | undefined =\n typeof rawAriaLabelledBy === \"string\" ? rawAriaLabelledBy : undefined;\n const tabindex: number | undefined = typeof rawTabIndex === \"number\" ? rawTabIndex : undefined;\n\n const handleClick: JSX.EventHandler<HTMLButtonElement, MouseEvent> = (event) => {\n event.stopPropagation();\n const handler = getRemoveButtonProps().onPress;\n if (typeof handler === \"function\" && !getIsDisabled()) {\n (handler as () => void)();\n }\n };\n const stopRowPress: JSX.EventHandler<HTMLButtonElement, PointerEvent> = (event) => {\n event.stopPropagation();\n };\n\n return (\n <button\n type=\"button\"\n class={props.class ?? \"solidaria-TagRemoveButton\"}\n style={props.style}\n id={buttonId}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n tabindex={tabindex}\n disabled={getIsDisabled()}\n data-allows-removing={dataAttr(tagContext?.allowsRemoving ?? false)}\n onPointerDown={stopRowPress}\n onClick={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