@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/src/Table.tsx
CHANGED
|
@@ -6,19 +6,20 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
type JSX,
|
|
10
9
|
createContext,
|
|
11
10
|
createEffect,
|
|
12
11
|
createMemo,
|
|
12
|
+
createRenderEffect,
|
|
13
13
|
createUniqueId,
|
|
14
14
|
createSignal,
|
|
15
15
|
onCleanup,
|
|
16
|
-
splitProps,
|
|
17
16
|
untrack,
|
|
18
17
|
useContext,
|
|
19
18
|
For,
|
|
20
19
|
Show,
|
|
20
|
+
createTrackedEffect,
|
|
21
21
|
} from "solid-js";
|
|
22
|
+
import type { JSX } from "@solidjs/web";
|
|
22
23
|
import {
|
|
23
24
|
createTable,
|
|
24
25
|
createTableColumnHeader,
|
|
@@ -34,6 +35,8 @@ import {
|
|
|
34
35
|
mergeProps,
|
|
35
36
|
type AriaTableProps,
|
|
36
37
|
createTableColumnResize,
|
|
38
|
+
useLocale,
|
|
39
|
+
createStringFormatter,
|
|
37
40
|
} from "@proyecto-viviana/solidaria";
|
|
38
41
|
import {
|
|
39
42
|
createTableState,
|
|
@@ -61,6 +64,7 @@ import {
|
|
|
61
64
|
useRenderProps,
|
|
62
65
|
filterDOMProps,
|
|
63
66
|
} from "./utils";
|
|
67
|
+
import { racIntlStrings } from "./intl";
|
|
64
68
|
import { SharedElementTransition } from "./SharedElementTransition";
|
|
65
69
|
import { type DragAndDropHooks } from "./useDragAndDrop";
|
|
66
70
|
import { ButtonContext, type ButtonContextValue, type ButtonProps } from "./Button";
|
|
@@ -68,8 +72,10 @@ import {
|
|
|
68
72
|
CollectionRendererContext,
|
|
69
73
|
type CollectionRendererContextValue,
|
|
70
74
|
useCollectionRenderer,
|
|
75
|
+
useCollectionRoot,
|
|
76
|
+
renderCollectionDropSlots,
|
|
71
77
|
} from "./Collection";
|
|
72
|
-
import { useVirtualizerContext } from "./Virtualizer";
|
|
78
|
+
import { useVirtualizerContext, PersistedVirtualItem } from "./Virtualizer";
|
|
73
79
|
import {
|
|
74
80
|
type LinkDOMProps,
|
|
75
81
|
type RouterOptions,
|
|
@@ -79,10 +85,13 @@ import {
|
|
|
79
85
|
} from "./RouterProvider";
|
|
80
86
|
import {
|
|
81
87
|
getNormalizedDropTargetKey,
|
|
88
|
+
indexesOutsideRange,
|
|
82
89
|
mergePersistedKeysIntoVirtualRange,
|
|
83
90
|
useDndPersistedKeys,
|
|
84
91
|
useRenderDropIndicator,
|
|
85
92
|
} from "./DragAndDrop";
|
|
93
|
+
import { createTreeDropTargetDelegate } from "./Tree";
|
|
94
|
+
import { splitProps } from "@proyecto-viviana/solidaria/utils";
|
|
86
95
|
|
|
87
96
|
export interface TableRenderProps {
|
|
88
97
|
/** Whether the table has focus. */
|
|
@@ -133,6 +142,37 @@ function resolveItemKey<T>(item: T, getKey: ((item: T) => Key) | undefined, inde
|
|
|
133
142
|
return record.id ?? record.key ?? index;
|
|
134
143
|
}
|
|
135
144
|
|
|
145
|
+
type TableHostTag = "table" | "thead" | "tbody" | "tfoot" | "tr" | "th" | "td";
|
|
146
|
+
|
|
147
|
+
/** RAC Table.tsx TableElementType / THead / TBody / row / cell: div when virtualized. */
|
|
148
|
+
function TableHost(props: {
|
|
149
|
+
hostTag: TableHostTag;
|
|
150
|
+
virtualized?: boolean;
|
|
151
|
+
children?: JSX.Element;
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
}): JSX.Element {
|
|
154
|
+
const [local, rest] = splitProps(props, ["hostTag", "virtualized", "children"]);
|
|
155
|
+
if (local.virtualized) {
|
|
156
|
+
return <div {...rest}>{local.children}</div>;
|
|
157
|
+
}
|
|
158
|
+
switch (local.hostTag) {
|
|
159
|
+
case "table":
|
|
160
|
+
return <table {...rest}>{local.children}</table>;
|
|
161
|
+
case "thead":
|
|
162
|
+
return <thead {...rest}>{local.children}</thead>;
|
|
163
|
+
case "tbody":
|
|
164
|
+
return <tbody {...rest}>{local.children}</tbody>;
|
|
165
|
+
case "tfoot":
|
|
166
|
+
return <tfoot {...rest}>{local.children}</tfoot>;
|
|
167
|
+
case "tr":
|
|
168
|
+
return <tr {...rest}>{local.children}</tr>;
|
|
169
|
+
case "th":
|
|
170
|
+
return <th {...rest}>{local.children}</th>;
|
|
171
|
+
default:
|
|
172
|
+
return <td {...rest}>{local.children}</td>;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
136
176
|
/**
|
|
137
177
|
* Turns the flat `items` into nested {@link RowDefinition}s by recursively expanding each
|
|
138
178
|
* item's children via `getChildItems`. The result feeds the tree-grid collection.
|
|
@@ -505,6 +545,7 @@ interface TableContextValue<T extends object> {
|
|
|
505
545
|
dragState?: unknown;
|
|
506
546
|
dropState?: unknown;
|
|
507
547
|
isVirtualized: boolean;
|
|
548
|
+
getScrollElement: () => HTMLElement | null;
|
|
508
549
|
}
|
|
509
550
|
|
|
510
551
|
export const TableContext = createContext<TableContextValue<object> | null>(null);
|
|
@@ -562,6 +603,7 @@ export function Table<T extends object>(props: TableProps<T>): JSX.Element {
|
|
|
562
603
|
],
|
|
563
604
|
);
|
|
564
605
|
|
|
606
|
+
const locale = useLocale();
|
|
565
607
|
const [ref, setRef] = createSignal<HTMLTableElement | null>(null);
|
|
566
608
|
const normalizedColumns = createMemo(() => normalizeColumnDefinitions(stateProps.columns));
|
|
567
609
|
const rowHeaderColumnKeys = createMemo(() => getRowHeaderColumnKeys(normalizedColumns()));
|
|
@@ -623,7 +665,7 @@ export function Table<T extends object>(props: TableProps<T>): JSX.Element {
|
|
|
623
665
|
showSelectionCheckboxes: stateProps.showSelectionCheckboxes,
|
|
624
666
|
}));
|
|
625
667
|
const collection = () => state.collection;
|
|
626
|
-
const parentCollectionRenderer = useCollectionRenderer<
|
|
668
|
+
const parentCollectionRenderer = useCollectionRenderer<unknown>();
|
|
627
669
|
|
|
628
670
|
// Keep the hook's return object (do NOT destructure `gridProps`): the grid's
|
|
629
671
|
// sort-description `aria-describedby` is emitted via a `createDescription`
|
|
@@ -705,37 +747,33 @@ export function Table<T extends object>(props: TableProps<T>): JSX.Element {
|
|
|
705
747
|
const hooks = local.dragAndDropHooks;
|
|
706
748
|
return Boolean(hooks?.useDraggableCollectionState && hooks.useDraggableCollection);
|
|
707
749
|
});
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
750
|
+
const dragStateValue = hasDraggableDnd()
|
|
751
|
+
? local.dragAndDropHooks?.useDraggableCollectionState?.({
|
|
752
|
+
items: stateProps.items,
|
|
753
|
+
collection: state.collection,
|
|
754
|
+
selectedKeys: state.selectedKeys,
|
|
755
|
+
isSelected: (key) => state.isSelected(key),
|
|
756
|
+
})
|
|
757
|
+
: undefined;
|
|
758
|
+
const dragState = () => dragStateValue;
|
|
759
|
+
const dropStateValue = hasDroppableDnd()
|
|
760
|
+
? local.dragAndDropHooks?.useDroppableCollectionState?.({
|
|
761
|
+
get collection() {
|
|
762
|
+
return state.collection;
|
|
763
|
+
},
|
|
764
|
+
})
|
|
765
|
+
: undefined;
|
|
766
|
+
const dropState = () => dropStateValue;
|
|
767
|
+
if (local.dragAndDropHooks?.useDraggableCollection && dragStateValue) {
|
|
768
|
+
local.dragAndDropHooks.useDraggableCollection({}, dragStateValue, () => ref());
|
|
769
|
+
}
|
|
770
|
+
const droppableCollectionValue = (() => {
|
|
726
771
|
if (!hasDroppableDnd()) return undefined;
|
|
727
772
|
const hooks = local.dragAndDropHooks;
|
|
728
|
-
const activeDropState =
|
|
773
|
+
const activeDropState = dropStateValue;
|
|
729
774
|
if (!hooks?.useDroppableCollection || !activeDropState) return undefined;
|
|
730
|
-
const resolveDirection = (): "ltr" | "rtl" =>
|
|
731
|
-
|
|
732
|
-
if (el && typeof window !== "undefined" && typeof window.getComputedStyle === "function") {
|
|
733
|
-
const dir = window.getComputedStyle(el).direction;
|
|
734
|
-
if (dir === "rtl") return "rtl";
|
|
735
|
-
}
|
|
736
|
-
return typeof document !== "undefined" && document.dir === "rtl" ? "rtl" : "ltr";
|
|
737
|
-
};
|
|
738
|
-
const dropTargetDelegate =
|
|
775
|
+
const resolveDirection = (): "ltr" | "rtl" => locale().direction;
|
|
776
|
+
const baseDropTargetDelegate =
|
|
739
777
|
hooks.dropTargetDelegate ??
|
|
740
778
|
parentCollectionRenderer?.dropTargetDelegate ??
|
|
741
779
|
(hooks.ListDropTargetDelegate
|
|
@@ -745,7 +783,19 @@ export function Table<T extends object>(props: TableProps<T>): JSX.Element {
|
|
|
745
783
|
{ layout: "grid", orientation: "vertical", direction: resolveDirection() },
|
|
746
784
|
)
|
|
747
785
|
: undefined);
|
|
748
|
-
if (!
|
|
786
|
+
if (!baseDropTargetDelegate) return undefined;
|
|
787
|
+
const expandedKeys = state.expandedKeys;
|
|
788
|
+
const dropTargetDelegate = createTreeDropTargetDelegate(
|
|
789
|
+
baseDropTargetDelegate,
|
|
790
|
+
{
|
|
791
|
+
collection: state.collection,
|
|
792
|
+
expandedKeys:
|
|
793
|
+
expandedKeys === "all"
|
|
794
|
+
? new Set(Array.from(state.collection, (node) => node.key))
|
|
795
|
+
: (expandedKeys ?? new Set()),
|
|
796
|
+
} as unknown as Parameters<typeof createTreeDropTargetDelegate>[1],
|
|
797
|
+
resolveDirection(),
|
|
798
|
+
);
|
|
749
799
|
return hooks.useDroppableCollection(
|
|
750
800
|
{
|
|
751
801
|
dropTargetDelegate,
|
|
@@ -786,7 +836,8 @@ export function Table<T extends object>(props: TableProps<T>): JSX.Element {
|
|
|
786
836
|
activeDropState,
|
|
787
837
|
() => ref(),
|
|
788
838
|
);
|
|
789
|
-
});
|
|
839
|
+
})();
|
|
840
|
+
const droppableCollection = () => droppableCollectionValue;
|
|
790
841
|
const isRootDropTarget = createMemo(() => {
|
|
791
842
|
return Boolean(dropState()?.target?.type === "root");
|
|
792
843
|
});
|
|
@@ -826,6 +877,7 @@ export function Table<T extends object>(props: TableProps<T>): JSX.Element {
|
|
|
826
877
|
get isVirtualized() {
|
|
827
878
|
return ariaProps.isVirtualized ?? parentCollectionRenderer?.isVirtualized ?? false;
|
|
828
879
|
},
|
|
880
|
+
getScrollElement: () => ref(),
|
|
829
881
|
};
|
|
830
882
|
const collectionRenderer = createMemo<CollectionRendererContextValue<unknown>>(() => ({
|
|
831
883
|
...parentCollectionRenderer,
|
|
@@ -858,27 +910,27 @@ export function Table<T extends object>(props: TableProps<T>): JSX.Element {
|
|
|
858
910
|
),
|
|
859
911
|
class: renderProps.class(),
|
|
860
912
|
style: renderProps.style(),
|
|
861
|
-
"data-focused": state.isFocused
|
|
862
|
-
"data-focus-visible": isFocusVisible()
|
|
863
|
-
"data-empty": stateProps.items.length === 0
|
|
864
|
-
"data-drop-target": isRootDropTarget()
|
|
913
|
+
"data-focused": dataAttr(state.isFocused),
|
|
914
|
+
"data-focus-visible": dataAttr(isFocusVisible()),
|
|
915
|
+
"data-empty": dataAttr(stateProps.items.length === 0),
|
|
916
|
+
"data-drop-target": dataAttr(isRootDropTarget()),
|
|
865
917
|
slot: local.slot,
|
|
866
918
|
}) as JSX.HTMLAttributes<HTMLTableElement>;
|
|
867
919
|
|
|
868
920
|
return (
|
|
869
|
-
<TableContext
|
|
870
|
-
<TableStateContext
|
|
871
|
-
value={
|
|
872
|
-
>
|
|
873
|
-
<CollectionRendererContext.Provider value={collectionRenderer()}>
|
|
921
|
+
<TableContext value={contextValue as unknown as TableContextValue<object>}>
|
|
922
|
+
<TableStateContext value={state as unknown as TableState<object, TableCollection<object>>}>
|
|
923
|
+
<CollectionRendererContext value={collectionRenderer()}>
|
|
874
924
|
{local.render ? (
|
|
875
925
|
local.render({ ...tableProps(), children: tableChildren() }, renderValues())
|
|
876
926
|
) : (
|
|
877
|
-
<table {...tableProps()}>
|
|
927
|
+
<TableHost hostTag="table" virtualized={contextValue.isVirtualized} {...tableProps()}>
|
|
928
|
+
{tableChildren()}
|
|
929
|
+
</TableHost>
|
|
878
930
|
)}
|
|
879
|
-
</CollectionRendererContext
|
|
880
|
-
</TableStateContext
|
|
881
|
-
</TableContext
|
|
931
|
+
</CollectionRendererContext>
|
|
932
|
+
</TableStateContext>
|
|
933
|
+
</TableContext>
|
|
882
934
|
);
|
|
883
935
|
}
|
|
884
936
|
|
|
@@ -947,26 +999,41 @@ export function TableHeader(props: TableHeaderProps): JSX.Element {
|
|
|
947
999
|
class: renderProps.class(),
|
|
948
1000
|
style: renderProps.style(),
|
|
949
1001
|
"data-hovered": isHovered() || undefined,
|
|
950
|
-
children:
|
|
1002
|
+
children: (
|
|
1003
|
+
<TableHost hostTag="tr" virtualized={context.isVirtualized} role="row">
|
|
1004
|
+
{local.children}
|
|
1005
|
+
</TableHost>
|
|
1006
|
+
),
|
|
951
1007
|
}) as JSX.HTMLAttributes<HTMLTableSectionElement>;
|
|
952
1008
|
|
|
953
1009
|
return local.render ? (
|
|
954
1010
|
local.render(headerProps(), renderValues())
|
|
955
1011
|
) : (
|
|
956
|
-
<
|
|
957
|
-
|
|
1012
|
+
<TableHost
|
|
1013
|
+
hostTag="thead"
|
|
1014
|
+
virtualized={context.isVirtualized}
|
|
1015
|
+
ref={(el: HTMLElement) => assignRef(local.ref, el as HTMLTableSectionElement)}
|
|
958
1016
|
{...domProps}
|
|
959
1017
|
{...cleanRowGroupProps()}
|
|
960
1018
|
{...cleanHoverProps()}
|
|
961
1019
|
class={renderProps.class()}
|
|
962
1020
|
style={renderProps.style()}
|
|
963
|
-
data-hovered={isHovered()
|
|
1021
|
+
data-hovered={dataAttr(isHovered())}
|
|
964
1022
|
>
|
|
965
|
-
<tr role="row">
|
|
966
|
-
|
|
1023
|
+
<TableHost hostTag="tr" virtualized={context.isVirtualized} role="row">
|
|
1024
|
+
{local.children}
|
|
1025
|
+
</TableHost>
|
|
1026
|
+
</TableHost>
|
|
967
1027
|
);
|
|
968
1028
|
}
|
|
969
1029
|
|
|
1030
|
+
const TableColumnDefinitionContext = createContext<{
|
|
1031
|
+
key: Key;
|
|
1032
|
+
width?: ColumnSize;
|
|
1033
|
+
minWidth?: number;
|
|
1034
|
+
maxWidth?: number;
|
|
1035
|
+
} | null>(null);
|
|
1036
|
+
|
|
970
1037
|
/**
|
|
971
1038
|
* A column header in a table.
|
|
972
1039
|
*/
|
|
@@ -1104,9 +1171,11 @@ export function TableColumn(props: TableColumnProps): JSX.Element {
|
|
|
1104
1171
|
return { ...base, ...widthStyle };
|
|
1105
1172
|
});
|
|
1106
1173
|
|
|
1107
|
-
const columnChildren = () =>
|
|
1108
|
-
|
|
1109
|
-
|
|
1174
|
+
const columnChildren = () => {
|
|
1175
|
+
const rawChildren = local.children;
|
|
1176
|
+
return typeof rawChildren === "function" ? rawChildren(renderValues()) : rawChildren;
|
|
1177
|
+
};
|
|
1178
|
+
const columnAttrs = () =>
|
|
1110
1179
|
({
|
|
1111
1180
|
ref: (el: HTMLTableCellElement) => {
|
|
1112
1181
|
setRef(el);
|
|
@@ -1116,38 +1185,42 @@ export function TableColumn(props: TableColumnProps): JSX.Element {
|
|
|
1116
1185
|
...mergeProps(cleanColumnHeaderProps(), cleanHoverProps(), cleanFocusProps()),
|
|
1117
1186
|
class: renderProps.class(),
|
|
1118
1187
|
style: columnStyle(),
|
|
1119
|
-
"data-sortable": local.allowsSorting
|
|
1188
|
+
"data-sortable": dataAttr(!!local.allowsSorting),
|
|
1120
1189
|
"data-sort-direction": sortDirection() || undefined,
|
|
1121
|
-
"data-resizable": local.allowsResizing
|
|
1122
|
-
"data-resizing": isResizing()
|
|
1123
|
-
"data-hovered": isHovered()
|
|
1124
|
-
"data-focused": state.focusedKey === local.id
|
|
1125
|
-
"data-focus-visible": (isFocusVisible() && state.focusedKey === local.id)
|
|
1126
|
-
|
|
1190
|
+
"data-resizable": dataAttr(!!local.allowsResizing),
|
|
1191
|
+
"data-resizing": dataAttr(isResizing()),
|
|
1192
|
+
"data-hovered": dataAttr(isHovered()),
|
|
1193
|
+
"data-focused": dataAttr(state.focusedKey === local.id),
|
|
1194
|
+
"data-focus-visible": dataAttr(isFocusVisible() && state.focusedKey === local.id),
|
|
1195
|
+
"data-key": local.id,
|
|
1127
1196
|
}) as JSX.ThHTMLAttributes<HTMLTableCellElement>;
|
|
1128
1197
|
|
|
1129
|
-
|
|
1130
|
-
local.
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
{
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1198
|
+
const columnDefinition = {
|
|
1199
|
+
key: local.id,
|
|
1200
|
+
width: local.width ?? local.defaultWidth,
|
|
1201
|
+
minWidth: local.minWidth,
|
|
1202
|
+
maxWidth: local.maxWidth,
|
|
1203
|
+
};
|
|
1204
|
+
|
|
1205
|
+
if (local.render) {
|
|
1206
|
+
return (
|
|
1207
|
+
<TableColumnDefinitionContext value={columnDefinition}>
|
|
1208
|
+
{local.render({ ...columnAttrs(), children: columnChildren() }, renderValues())}
|
|
1209
|
+
</TableColumnDefinitionContext>
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
// Children are JSX children of the host, not an eager `children` entry in the
|
|
1214
|
+
// spread object: the DOM build claims the element's hydration key before it
|
|
1215
|
+
// evaluates children, while `ssrElement` receives an already-built props
|
|
1216
|
+
// object, so an eager entry would key the children ahead of the element on
|
|
1217
|
+
// the server and the client would claim the wrong nodes.
|
|
1218
|
+
return (
|
|
1219
|
+
<TableColumnDefinitionContext value={columnDefinition}>
|
|
1220
|
+
<TableHost hostTag="th" virtualized={context.isVirtualized} {...columnAttrs()}>
|
|
1221
|
+
{columnChildren()}
|
|
1222
|
+
</TableHost>
|
|
1223
|
+
</TableColumnDefinitionContext>
|
|
1151
1224
|
);
|
|
1152
1225
|
}
|
|
1153
1226
|
|
|
@@ -1198,7 +1271,7 @@ export function TableBody<T extends object>(props: TableBodyProps<T>): JSX.Eleme
|
|
|
1198
1271
|
|
|
1199
1272
|
const isEmpty = () => items().length === 0;
|
|
1200
1273
|
const virtualizer = useVirtualizerContext();
|
|
1201
|
-
const parentCollectionRenderer = useCollectionRenderer<
|
|
1274
|
+
const parentCollectionRenderer = useCollectionRenderer<unknown>();
|
|
1202
1275
|
const rowNodes = createMemo(() =>
|
|
1203
1276
|
Array.from(context.collection).filter((node) => node.type === "item"),
|
|
1204
1277
|
);
|
|
@@ -1214,14 +1287,8 @@ export function TableBody<T extends object>(props: TableBodyProps<T>): JSX.Eleme
|
|
|
1214
1287
|
if (!virtualizer || !parentCollectionRenderer?.isVirtualized) return null;
|
|
1215
1288
|
const rowCount = items().length;
|
|
1216
1289
|
const baseRange = virtualizer.getVisibleRange(rowCount);
|
|
1217
|
-
const persistedIndexes = Array.from(persistedKeys())
|
|
1218
|
-
.map((key) => rowNodes().findIndex((node) => node.key === key))
|
|
1219
|
-
.filter((index) => index >= 0);
|
|
1220
1290
|
const dropTarget = (context.dropState as { target?: DropTarget | null } | undefined)?.target;
|
|
1221
1291
|
const normalizedDropKey = getNormalizedDropTargetKey(dropTarget, context.collection);
|
|
1222
|
-
const focusedKey = context.state.focusedKey;
|
|
1223
|
-
const focusedIndex =
|
|
1224
|
-
focusedKey != null ? rowNodes().findIndex((node) => node.key === focusedKey) : -1;
|
|
1225
1292
|
const forceIncludeIndexes = [
|
|
1226
1293
|
dropTarget?.type === "item"
|
|
1227
1294
|
? rowNodes().findIndex((node) => node.key === dropTarget.key)
|
|
@@ -1229,21 +1296,23 @@ export function TableBody<T extends object>(props: TableBodyProps<T>): JSX.Eleme
|
|
|
1229
1296
|
normalizedDropKey != null
|
|
1230
1297
|
? rowNodes().findIndex((node) => node.key === normalizedDropKey)
|
|
1231
1298
|
: -1,
|
|
1232
|
-
dropTarget?.type === "item" ? -1 : focusedIndex,
|
|
1233
1299
|
].filter((index) => index >= 0);
|
|
1234
|
-
return mergePersistedKeysIntoVirtualRange(
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
virtualizer,
|
|
1239
|
-
80,
|
|
1240
|
-
{
|
|
1241
|
-
forceIncludeIndexes,
|
|
1242
|
-
forceIncludeMaxSpan: 320,
|
|
1243
|
-
},
|
|
1244
|
-
);
|
|
1300
|
+
return mergePersistedKeysIntoVirtualRange(baseRange, [], rowCount, virtualizer, 80, {
|
|
1301
|
+
forceIncludeIndexes,
|
|
1302
|
+
forceIncludeMaxSpan: 320,
|
|
1303
|
+
});
|
|
1245
1304
|
});
|
|
1246
|
-
|
|
1305
|
+
const persistedOutsideIndexes = createMemo(() => {
|
|
1306
|
+
const range = virtualRange();
|
|
1307
|
+
if (!range) return [] as number[];
|
|
1308
|
+
const persistedIndexes = Array.from(persistedKeys())
|
|
1309
|
+
.map((key) => rowNodes().findIndex((node) => node.key === key))
|
|
1310
|
+
.filter((index) => index >= 0);
|
|
1311
|
+
return indexesOutsideRange(range, persistedIndexes);
|
|
1312
|
+
});
|
|
1313
|
+
createTrackedEffect(() => {
|
|
1314
|
+
const _s2Cleanups: Array<() => void> = [];
|
|
1315
|
+
|
|
1247
1316
|
if (!virtualizer || !parentCollectionRenderer?.isVirtualized) return;
|
|
1248
1317
|
virtualizer.setDropTargetItemCountResolver(() => items().length);
|
|
1249
1318
|
virtualizer.setDropTargetIndexResolver((key) => {
|
|
@@ -1258,11 +1327,15 @@ export function TableBody<T extends object>(props: TableBodyProps<T>): JSX.Eleme
|
|
|
1258
1327
|
key: typeof node.key === "string" || typeof node.key === "number" ? node.key : undefined,
|
|
1259
1328
|
};
|
|
1260
1329
|
});
|
|
1261
|
-
|
|
1330
|
+
_s2Cleanups.push(() => {
|
|
1262
1331
|
virtualizer.setDropTargetIndexResolver(undefined);
|
|
1263
1332
|
virtualizer.setDropTargetItemCountResolver(undefined);
|
|
1264
1333
|
virtualizer.setDropTargetResolver(undefined);
|
|
1265
1334
|
});
|
|
1335
|
+
|
|
1336
|
+
return () => {
|
|
1337
|
+
for (const c of _s2Cleanups) c();
|
|
1338
|
+
};
|
|
1266
1339
|
});
|
|
1267
1340
|
const visibleItems = createMemo(() => {
|
|
1268
1341
|
// Tree grid: render the flattened set of visible rows (top-level + expanded descendants)
|
|
@@ -1275,61 +1348,65 @@ export function TableBody<T extends object>(props: TableBodyProps<T>): JSX.Eleme
|
|
|
1275
1348
|
return items().slice(range.start, range.end);
|
|
1276
1349
|
});
|
|
1277
1350
|
const spacerColSpan = () => context.columns.length + (context.showSelectionCheckboxes ? 1 : 0);
|
|
1351
|
+
const CollectionRoot = useCollectionRoot();
|
|
1352
|
+
|
|
1353
|
+
const collectionRows = () => {
|
|
1354
|
+
const rows = (
|
|
1355
|
+
<For each={visibleItems()}>
|
|
1356
|
+
{(item, index) => {
|
|
1357
|
+
const itemIndex = () => (virtualRange()?.start ?? 0) + index();
|
|
1358
|
+
return renderCollectionDropSlots({
|
|
1359
|
+
index: itemIndex(),
|
|
1360
|
+
lastIndex: rowNodes().length - 1,
|
|
1361
|
+
renderDropIndicator: (i, position) =>
|
|
1362
|
+
parentCollectionRenderer?.renderDropIndicator?.(i, position),
|
|
1363
|
+
children: local.children?.(item),
|
|
1364
|
+
});
|
|
1365
|
+
}}
|
|
1366
|
+
</For>
|
|
1367
|
+
);
|
|
1368
|
+
if (!context.isVirtualized) return rows;
|
|
1369
|
+
return (
|
|
1370
|
+
<CollectionRoot
|
|
1371
|
+
collection={virtualRange() ? items() : []}
|
|
1372
|
+
scrollRef={() => context.getScrollElement()}
|
|
1373
|
+
persistedKeys={persistedKeys()}
|
|
1374
|
+
>
|
|
1375
|
+
{rows}
|
|
1376
|
+
<For each={persistedOutsideIndexes()}>
|
|
1377
|
+
{(index) => (
|
|
1378
|
+
<PersistedVirtualItem index={index}>
|
|
1379
|
+
{renderCollectionDropSlots({
|
|
1380
|
+
index,
|
|
1381
|
+
lastIndex: rowNodes().length - 1,
|
|
1382
|
+
renderDropIndicator: (i, position) =>
|
|
1383
|
+
parentCollectionRenderer?.renderDropIndicator?.(i, position),
|
|
1384
|
+
children: local.children?.(items()[index]),
|
|
1385
|
+
})}
|
|
1386
|
+
</PersistedVirtualItem>
|
|
1387
|
+
)}
|
|
1388
|
+
</For>
|
|
1389
|
+
</CollectionRoot>
|
|
1390
|
+
);
|
|
1391
|
+
};
|
|
1278
1392
|
|
|
1279
1393
|
const bodyChildren = () => (
|
|
1280
1394
|
<>
|
|
1281
1395
|
<SharedElementTransition>
|
|
1282
1396
|
<Show
|
|
1283
1397
|
when={isEmpty() && local.renderEmptyState && !local.isLoading}
|
|
1284
|
-
fallback={
|
|
1285
|
-
<>
|
|
1286
|
-
{virtualRange()?.offsetTop ? (
|
|
1287
|
-
<tr role="presentation" aria-hidden="true" data-virtualizer-spacer="top">
|
|
1288
|
-
<td
|
|
1289
|
-
colSpan={spacerColSpan()}
|
|
1290
|
-
style={{ height: `${virtualRange()!.offsetTop}px`, padding: "0", border: "0" }}
|
|
1291
|
-
/>
|
|
1292
|
-
</tr>
|
|
1293
|
-
) : null}
|
|
1294
|
-
<For each={visibleItems()}>
|
|
1295
|
-
{(item, index) => {
|
|
1296
|
-
const itemIndex = () => (virtualRange()?.start ?? 0) + index();
|
|
1297
|
-
const beforeIndicator = () =>
|
|
1298
|
-
parentCollectionRenderer?.renderDropIndicator?.(itemIndex(), "before");
|
|
1299
|
-
const onIndicator = () =>
|
|
1300
|
-
parentCollectionRenderer?.renderDropIndicator?.(itemIndex(), "on");
|
|
1301
|
-
const afterIndicator = () =>
|
|
1302
|
-
parentCollectionRenderer?.renderDropIndicator?.(itemIndex(), "after");
|
|
1303
|
-
return (
|
|
1304
|
-
<>
|
|
1305
|
-
{beforeIndicator()}
|
|
1306
|
-
{onIndicator()}
|
|
1307
|
-
{local.children?.(item)}
|
|
1308
|
-
{afterIndicator()}
|
|
1309
|
-
</>
|
|
1310
|
-
);
|
|
1311
|
-
}}
|
|
1312
|
-
</For>
|
|
1313
|
-
{virtualRange()?.offsetBottom ? (
|
|
1314
|
-
<tr role="presentation" aria-hidden="true" data-virtualizer-spacer="bottom">
|
|
1315
|
-
<td
|
|
1316
|
-
colSpan={spacerColSpan()}
|
|
1317
|
-
style={{
|
|
1318
|
-
height: `${virtualRange()!.offsetBottom}px`,
|
|
1319
|
-
padding: "0",
|
|
1320
|
-
border: "0",
|
|
1321
|
-
}}
|
|
1322
|
-
/>
|
|
1323
|
-
</tr>
|
|
1324
|
-
) : null}
|
|
1325
|
-
</>
|
|
1326
|
-
}
|
|
1398
|
+
fallback={collectionRows()}
|
|
1327
1399
|
>
|
|
1328
|
-
<tr role="row" data-empty-state>
|
|
1329
|
-
<
|
|
1400
|
+
<TableHost hostTag="tr" virtualized={context.isVirtualized} role="row" data-empty-state>
|
|
1401
|
+
<TableHost
|
|
1402
|
+
hostTag="th"
|
|
1403
|
+
virtualized={context.isVirtualized}
|
|
1404
|
+
role="rowheader"
|
|
1405
|
+
colSpan={spacerColSpan()}
|
|
1406
|
+
>
|
|
1330
1407
|
{local.renderEmptyState?.()}
|
|
1331
|
-
</
|
|
1332
|
-
</
|
|
1408
|
+
</TableHost>
|
|
1409
|
+
</TableHost>
|
|
1333
1410
|
</Show>
|
|
1334
1411
|
</SharedElementTransition>
|
|
1335
1412
|
<Show when={local.hasMore && local.onLoadMore}>
|
|
@@ -1348,83 +1425,25 @@ export function TableBody<T extends object>(props: TableBodyProps<T>): JSX.Eleme
|
|
|
1348
1425
|
...cleanRowGroupProps(),
|
|
1349
1426
|
class: renderProps.class(),
|
|
1350
1427
|
style: renderProps.style(),
|
|
1351
|
-
"data-empty": isEmpty()
|
|
1428
|
+
"data-empty": dataAttr(isEmpty()),
|
|
1352
1429
|
children: bodyChildren(),
|
|
1353
1430
|
}) as JSX.HTMLAttributes<HTMLTableSectionElement>;
|
|
1354
1431
|
|
|
1355
1432
|
return local.render ? (
|
|
1356
1433
|
local.render(bodyProps(), renderValues())
|
|
1357
1434
|
) : (
|
|
1358
|
-
<
|
|
1359
|
-
|
|
1435
|
+
<TableHost
|
|
1436
|
+
hostTag="tbody"
|
|
1437
|
+
virtualized={context.isVirtualized}
|
|
1438
|
+
ref={(el: HTMLElement) => assignRef(local.ref, el as HTMLTableSectionElement)}
|
|
1360
1439
|
{...domProps}
|
|
1361
1440
|
{...cleanRowGroupProps()}
|
|
1362
1441
|
class={renderProps.class()}
|
|
1363
1442
|
style={renderProps.style()}
|
|
1364
|
-
data-empty={isEmpty()
|
|
1443
|
+
data-empty={dataAttr(isEmpty())}
|
|
1365
1444
|
>
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
when={isEmpty() && local.renderEmptyState && !local.isLoading}
|
|
1369
|
-
fallback={
|
|
1370
|
-
<>
|
|
1371
|
-
{virtualRange()?.offsetTop ? (
|
|
1372
|
-
<tr role="presentation" aria-hidden="true" data-virtualizer-spacer="top">
|
|
1373
|
-
<td
|
|
1374
|
-
colSpan={spacerColSpan()}
|
|
1375
|
-
style={{ height: `${virtualRange()!.offsetTop}px`, padding: "0", border: "0" }}
|
|
1376
|
-
/>
|
|
1377
|
-
</tr>
|
|
1378
|
-
) : null}
|
|
1379
|
-
<For each={visibleItems()}>
|
|
1380
|
-
{(item, index) => {
|
|
1381
|
-
const itemIndex = () => (virtualRange()?.start ?? 0) + index();
|
|
1382
|
-
const beforeIndicator = () =>
|
|
1383
|
-
parentCollectionRenderer?.renderDropIndicator?.(itemIndex(), "before");
|
|
1384
|
-
const onIndicator = () =>
|
|
1385
|
-
parentCollectionRenderer?.renderDropIndicator?.(itemIndex(), "on");
|
|
1386
|
-
const afterIndicator = () =>
|
|
1387
|
-
parentCollectionRenderer?.renderDropIndicator?.(itemIndex(), "after");
|
|
1388
|
-
return (
|
|
1389
|
-
<>
|
|
1390
|
-
{beforeIndicator()}
|
|
1391
|
-
{onIndicator()}
|
|
1392
|
-
{local.children?.(item)}
|
|
1393
|
-
{afterIndicator()}
|
|
1394
|
-
</>
|
|
1395
|
-
);
|
|
1396
|
-
}}
|
|
1397
|
-
</For>
|
|
1398
|
-
{virtualRange()?.offsetBottom ? (
|
|
1399
|
-
<tr role="presentation" aria-hidden="true" data-virtualizer-spacer="bottom">
|
|
1400
|
-
<td
|
|
1401
|
-
colSpan={spacerColSpan()}
|
|
1402
|
-
style={{
|
|
1403
|
-
height: `${virtualRange()!.offsetBottom}px`,
|
|
1404
|
-
padding: "0",
|
|
1405
|
-
border: "0",
|
|
1406
|
-
}}
|
|
1407
|
-
/>
|
|
1408
|
-
</tr>
|
|
1409
|
-
) : null}
|
|
1410
|
-
</>
|
|
1411
|
-
}
|
|
1412
|
-
>
|
|
1413
|
-
<tr role="row" data-empty-state>
|
|
1414
|
-
<th role="rowheader" colSpan={spacerColSpan()}>
|
|
1415
|
-
{local.renderEmptyState?.()}
|
|
1416
|
-
</th>
|
|
1417
|
-
</tr>
|
|
1418
|
-
</Show>
|
|
1419
|
-
</SharedElementTransition>
|
|
1420
|
-
<Show when={local.hasMore && local.onLoadMore}>
|
|
1421
|
-
<TableLoadMoreItem
|
|
1422
|
-
onLoadMore={local.onLoadMore!}
|
|
1423
|
-
isLoading={local.isLoading}
|
|
1424
|
-
colSpan={spacerColSpan()}
|
|
1425
|
-
/>
|
|
1426
|
-
</Show>
|
|
1427
|
-
</tbody>
|
|
1445
|
+
{bodyChildren()}
|
|
1446
|
+
</TableHost>
|
|
1428
1447
|
);
|
|
1429
1448
|
}
|
|
1430
1449
|
|
|
@@ -1461,7 +1480,9 @@ export function TableFooter<T extends object>(props: TableFooterProps<T>): JSX.E
|
|
|
1461
1480
|
};
|
|
1462
1481
|
|
|
1463
1482
|
return (
|
|
1464
|
-
<
|
|
1483
|
+
<TableHost
|
|
1484
|
+
hostTag="tfoot"
|
|
1485
|
+
virtualized={context.isVirtualized}
|
|
1465
1486
|
{...domProps}
|
|
1466
1487
|
{...cleanRowGroupProps()}
|
|
1467
1488
|
class={renderProps.class()}
|
|
@@ -1473,14 +1494,16 @@ export function TableFooter<T extends object>(props: TableFooterProps<T>): JSX.E
|
|
|
1473
1494
|
>
|
|
1474
1495
|
<For each={items()}>{(item) => (local.children as (item: T) => JSX.Element)(item)}</For>
|
|
1475
1496
|
</Show>
|
|
1476
|
-
</
|
|
1497
|
+
</TableHost>
|
|
1477
1498
|
);
|
|
1478
1499
|
}
|
|
1479
1500
|
|
|
1480
1501
|
export function TableLoadMoreItem(props: TableLoadMoreItemProps): JSX.Element {
|
|
1481
|
-
|
|
1502
|
+
const [sentinel, setSentinel] = createSignal<HTMLDivElement | undefined>();
|
|
1482
1503
|
const [isPending, setIsPending] = createSignal(false);
|
|
1504
|
+
const scrollOffsetValue = createMemo(() => props.scrollOffset ?? 1);
|
|
1483
1505
|
const isLoading = () => !!props.isLoading || isPending();
|
|
1506
|
+
const tableContext = useContext(TableContext);
|
|
1484
1507
|
|
|
1485
1508
|
const triggerLoadMore = async () => {
|
|
1486
1509
|
if (isPending()) return;
|
|
@@ -1492,21 +1515,26 @@ export function TableLoadMoreItem(props: TableLoadMoreItemProps): JSX.Element {
|
|
|
1492
1515
|
}
|
|
1493
1516
|
};
|
|
1494
1517
|
|
|
1495
|
-
createEffect(
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1518
|
+
createEffect(
|
|
1519
|
+
() => ({
|
|
1520
|
+
current: sentinel(),
|
|
1521
|
+
scrollOffset: scrollOffsetValue(),
|
|
1522
|
+
}),
|
|
1523
|
+
({ current, scrollOffset }) => {
|
|
1524
|
+
if (!current || typeof IntersectionObserver !== "function") return;
|
|
1525
|
+
const margin = `0px 0px ${100 * scrollOffset}% 0px`;
|
|
1526
|
+
const observer = new IntersectionObserver(
|
|
1527
|
+
(entries) => {
|
|
1528
|
+
if (entries[0]?.isIntersecting) {
|
|
1529
|
+
void triggerLoadMore();
|
|
1530
|
+
}
|
|
1531
|
+
},
|
|
1532
|
+
{ rootMargin: margin },
|
|
1533
|
+
);
|
|
1534
|
+
observer.observe(current);
|
|
1535
|
+
return () => observer.disconnect();
|
|
1536
|
+
},
|
|
1537
|
+
);
|
|
1510
1538
|
|
|
1511
1539
|
const renderProps = useRenderProps(
|
|
1512
1540
|
{
|
|
@@ -1522,30 +1550,70 @@ export function TableLoadMoreItem(props: TableLoadMoreItemProps): JSX.Element {
|
|
|
1522
1550
|
|
|
1523
1551
|
return (
|
|
1524
1552
|
<>
|
|
1525
|
-
<
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1553
|
+
<Show
|
|
1554
|
+
when={tableContext?.isVirtualized}
|
|
1555
|
+
fallback={
|
|
1556
|
+
<>
|
|
1557
|
+
<tr style={{ position: "relative", width: 0, height: 0, overflow: "hidden" }} inert>
|
|
1558
|
+
<td>
|
|
1559
|
+
<div
|
|
1560
|
+
ref={setSentinel}
|
|
1561
|
+
data-testid="loadMoreSentinel"
|
|
1562
|
+
style={{ position: "absolute", height: "1px", width: "1px" }}
|
|
1563
|
+
/>
|
|
1564
|
+
</td>
|
|
1565
|
+
</tr>
|
|
1566
|
+
<Show when={isLoading()}>
|
|
1567
|
+
<tr
|
|
1568
|
+
role="row"
|
|
1569
|
+
tabindex={0}
|
|
1570
|
+
onFocus={() => {
|
|
1571
|
+
void triggerLoadMore();
|
|
1572
|
+
}}
|
|
1573
|
+
class={renderProps.class()}
|
|
1574
|
+
style={renderProps.style()}
|
|
1575
|
+
data-loading
|
|
1576
|
+
>
|
|
1577
|
+
<td role="rowheader" colspan={props.colSpan ?? 1}>
|
|
1578
|
+
{renderProps.renderChildren()}
|
|
1579
|
+
</td>
|
|
1580
|
+
</tr>
|
|
1581
|
+
</Show>
|
|
1582
|
+
</>
|
|
1583
|
+
}
|
|
1584
|
+
>
|
|
1585
|
+
<TableHost
|
|
1586
|
+
hostTag="tr"
|
|
1587
|
+
virtualized
|
|
1588
|
+
style={{ position: "relative", width: 0, height: 0, overflow: "hidden" }}
|
|
1589
|
+
inert
|
|
1544
1590
|
>
|
|
1545
|
-
<
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1591
|
+
<TableHost hostTag="td" virtualized>
|
|
1592
|
+
<div
|
|
1593
|
+
ref={setSentinel}
|
|
1594
|
+
data-testid="loadMoreSentinel"
|
|
1595
|
+
style={{ position: "absolute", height: "1px", width: "1px" }}
|
|
1596
|
+
/>
|
|
1597
|
+
</TableHost>
|
|
1598
|
+
</TableHost>
|
|
1599
|
+
<Show when={isLoading()}>
|
|
1600
|
+
<TableHost
|
|
1601
|
+
hostTag="tr"
|
|
1602
|
+
virtualized
|
|
1603
|
+
role="row"
|
|
1604
|
+
tabindex={0}
|
|
1605
|
+
onFocus={() => {
|
|
1606
|
+
void triggerLoadMore();
|
|
1607
|
+
}}
|
|
1608
|
+
class={renderProps.class()}
|
|
1609
|
+
style={renderProps.style()}
|
|
1610
|
+
data-loading
|
|
1611
|
+
>
|
|
1612
|
+
<TableHost hostTag="td" virtualized role="rowheader" colSpan={props.colSpan ?? 1}>
|
|
1613
|
+
{renderProps.renderChildren()}
|
|
1614
|
+
</TableHost>
|
|
1615
|
+
</TableHost>
|
|
1616
|
+
</Show>
|
|
1549
1617
|
</Show>
|
|
1550
1618
|
</>
|
|
1551
1619
|
);
|
|
@@ -1744,8 +1812,12 @@ export function TableRow<T extends object>(props: TableRowProps<T>): JSX.Element
|
|
|
1744
1812
|
};
|
|
1745
1813
|
|
|
1746
1814
|
const rowContextValue: TableRowContextValue = {
|
|
1747
|
-
|
|
1748
|
-
|
|
1815
|
+
get rowKey() {
|
|
1816
|
+
return rowKey();
|
|
1817
|
+
},
|
|
1818
|
+
get rowNode() {
|
|
1819
|
+
return rowNode();
|
|
1820
|
+
},
|
|
1749
1821
|
get isRowDisabled() {
|
|
1750
1822
|
return isDisabled();
|
|
1751
1823
|
},
|
|
@@ -1760,7 +1832,11 @@ export function TableRow<T extends object>(props: TableRowProps<T>): JSX.Element
|
|
|
1760
1832
|
registeredCellIds.push(cellId);
|
|
1761
1833
|
}
|
|
1762
1834
|
|
|
1763
|
-
|
|
1835
|
+
// Selection cells use `id="__selection__"` and never register. Map the
|
|
1836
|
+
// remaining cells onto data columns so a live checkbox column cannot
|
|
1837
|
+
// steal Name's index and drop `role=rowheader` after a collection rebuild.
|
|
1838
|
+
const dataColumns = tableContext.columns.filter((column) => column.key !== "__selection__");
|
|
1839
|
+
return explicitId ?? dataColumns[index]?.key;
|
|
1764
1840
|
},
|
|
1765
1841
|
};
|
|
1766
1842
|
const dragButtonProps = createMemo<ButtonProps>(() => {
|
|
@@ -1834,8 +1910,8 @@ export function TableRow<T extends object>(props: TableRowProps<T>): JSX.Element
|
|
|
1834
1910
|
};
|
|
1835
1911
|
|
|
1836
1912
|
return (
|
|
1837
|
-
<TableRowContext
|
|
1838
|
-
<ButtonContext
|
|
1913
|
+
<TableRowContext value={rowContextValue}>
|
|
1914
|
+
<ButtonContext value={buttonContextValue}>
|
|
1839
1915
|
{(() => {
|
|
1840
1916
|
// Build the row's children HERE — inside BOTH providers — so each cell instantiates under
|
|
1841
1917
|
// this owner. TableCell/EditableCell read TableRowContext, and a slotted
|
|
@@ -1869,6 +1945,12 @@ export function TableRow<T extends object>(props: TableRowProps<T>): JSX.Element
|
|
|
1869
1945
|
ref: (el: HTMLTableRowElement) => {
|
|
1870
1946
|
setRef(el);
|
|
1871
1947
|
assignRef(local.ref, el);
|
|
1948
|
+
const dragRef = (
|
|
1949
|
+
draggableItem()?.dragProps as
|
|
1950
|
+
| { ref?: (el: HTMLTableRowElement) => void }
|
|
1951
|
+
| undefined
|
|
1952
|
+
)?.ref;
|
|
1953
|
+
if (typeof dragRef === "function") dragRef(el);
|
|
1872
1954
|
},
|
|
1873
1955
|
...domProps,
|
|
1874
1956
|
...mergeProps(
|
|
@@ -1882,13 +1964,13 @@ export function TableRow<T extends object>(props: TableRowProps<T>): JSX.Element
|
|
|
1882
1964
|
class: renderProps.class(),
|
|
1883
1965
|
style: rowStyle(),
|
|
1884
1966
|
"data-key": rowKey(),
|
|
1885
|
-
"data-selected": isSelected()
|
|
1886
|
-
"data-focused": isFocused()
|
|
1887
|
-
"data-focus-visible": (isFocusVisible() && isFocused())
|
|
1967
|
+
"data-selected": dataAttr(isSelected()),
|
|
1968
|
+
"data-focused": dataAttr(isFocused()),
|
|
1969
|
+
"data-focus-visible": dataAttr(isFocusVisible() && isFocused()),
|
|
1888
1970
|
"data-focus-visible-within": dataAttr(isFocusWithin() && isGlobalFocusVisible()),
|
|
1889
|
-
"data-pressed": isPressed()
|
|
1890
|
-
"data-hovered": isHovered()
|
|
1891
|
-
"data-disabled": isDisabled()
|
|
1971
|
+
"data-pressed": dataAttr(isPressed()),
|
|
1972
|
+
"data-hovered": dataAttr(isHovered()),
|
|
1973
|
+
"data-disabled": dataAttr(isDisabled()),
|
|
1892
1974
|
"data-href": linkProps().href,
|
|
1893
1975
|
"data-target": linkProps().target,
|
|
1894
1976
|
"data-rel": linkProps().rel,
|
|
@@ -1900,10 +1982,10 @@ export function TableRow<T extends object>(props: TableRowProps<T>): JSX.Element
|
|
|
1900
1982
|
: undefined,
|
|
1901
1983
|
"data-ping": linkProps().ping,
|
|
1902
1984
|
"data-referrer-policy": linkProps().referrerPolicy,
|
|
1903
|
-
"data-dragging": draggableItem()?.isDragging
|
|
1904
|
-
"data-drop-target": droppableItem()?.isDropTarget
|
|
1905
|
-
"data-expanded": (isTreeRow() && isExpanded())
|
|
1906
|
-
"data-has-child-items": (isTreeRow() && hasChildItems())
|
|
1985
|
+
"data-dragging": dataAttr(!!draggableItem()?.isDragging),
|
|
1986
|
+
"data-drop-target": dataAttr(!!droppableItem()?.isDropTarget),
|
|
1987
|
+
"data-expanded": dataAttr(isTreeRow() && isExpanded()),
|
|
1988
|
+
"data-has-child-items": dataAttr(isTreeRow() && hasChildItems()),
|
|
1907
1989
|
"data-level": isTreeRow() ? rowLevel() : undefined,
|
|
1908
1990
|
children: rowChildrenContent,
|
|
1909
1991
|
}) as JSX.HTMLAttributes<HTMLTableRowElement>;
|
|
@@ -1912,61 +1994,19 @@ export function TableRow<T extends object>(props: TableRowProps<T>): JSX.Element
|
|
|
1912
1994
|
<Show
|
|
1913
1995
|
when={local.render}
|
|
1914
1996
|
fallback={
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
setRef(el);
|
|
1921
|
-
assignRef(local.ref, el);
|
|
1922
|
-
}}
|
|
1923
|
-
{...domProps}
|
|
1924
|
-
{...mergeProps(
|
|
1925
|
-
cleanRowProps(),
|
|
1926
|
-
cleanHoverProps(),
|
|
1927
|
-
cleanFocusProps(),
|
|
1928
|
-
focusWithinProps as Record<string, unknown>,
|
|
1929
|
-
(draggableItem()?.dragProps as Record<string, unknown> | undefined) ?? {},
|
|
1930
|
-
(droppableItem()?.dropProps as Record<string, unknown> | undefined) ?? {},
|
|
1931
|
-
)}
|
|
1932
|
-
class={renderProps.class()}
|
|
1933
|
-
style={rowStyle()}
|
|
1934
|
-
data-key={rowKey()}
|
|
1935
|
-
data-selected={isSelected() || undefined}
|
|
1936
|
-
data-focused={isFocused() || undefined}
|
|
1937
|
-
data-focus-visible={(isFocusVisible() && isFocused()) || undefined}
|
|
1938
|
-
data-focus-visible-within={dataAttr(isFocusWithin() && isGlobalFocusVisible())}
|
|
1939
|
-
data-pressed={isPressed() || undefined}
|
|
1940
|
-
data-hovered={isHovered() || undefined}
|
|
1941
|
-
data-disabled={isDisabled() || undefined}
|
|
1942
|
-
data-href={linkProps().href}
|
|
1943
|
-
data-target={linkProps().target}
|
|
1944
|
-
data-rel={linkProps().rel}
|
|
1945
|
-
data-download={
|
|
1946
|
-
typeof linkProps().download === "string"
|
|
1947
|
-
? linkProps().download
|
|
1948
|
-
: linkProps().download
|
|
1949
|
-
? ""
|
|
1950
|
-
: undefined
|
|
1951
|
-
}
|
|
1952
|
-
data-ping={linkProps().ping}
|
|
1953
|
-
data-referrer-policy={linkProps().referrerPolicy}
|
|
1954
|
-
data-dragging={draggableItem()?.isDragging || undefined}
|
|
1955
|
-
data-drop-target={droppableItem()?.isDropTarget || undefined}
|
|
1956
|
-
data-expanded={(isTreeRow() && isExpanded()) || undefined}
|
|
1957
|
-
data-has-child-items={(isTreeRow() && hasChildItems()) || undefined}
|
|
1958
|
-
data-level={isTreeRow() ? rowLevel() : undefined}
|
|
1959
|
-
>
|
|
1960
|
-
{rowChildrenContent}
|
|
1961
|
-
</tr>
|
|
1997
|
+
tableContext.isVirtualized ? (
|
|
1998
|
+
<div {...(tableRowProps() as unknown as JSX.HTMLAttributes<HTMLDivElement>)} />
|
|
1999
|
+
) : (
|
|
2000
|
+
<tr {...tableRowProps()} />
|
|
2001
|
+
)
|
|
1962
2002
|
}
|
|
1963
2003
|
>
|
|
1964
2004
|
{local.render!(tableRowProps(), renderValues())}
|
|
1965
2005
|
</Show>
|
|
1966
2006
|
);
|
|
1967
2007
|
})()}
|
|
1968
|
-
</ButtonContext
|
|
1969
|
-
</TableRowContext
|
|
2008
|
+
</ButtonContext>
|
|
2009
|
+
</TableRowContext>
|
|
1970
2010
|
);
|
|
1971
2011
|
}
|
|
1972
2012
|
|
|
@@ -2004,15 +2044,28 @@ export function TableCell(props: TableCellProps): JSX.Element {
|
|
|
2004
2044
|
|
|
2005
2045
|
const cellNode = createMemo(() => {
|
|
2006
2046
|
const key = columnKey();
|
|
2047
|
+
const collection = state.collection;
|
|
2007
2048
|
if (key != null) {
|
|
2008
2049
|
const cellKey = `${rowKey}-${key}`;
|
|
2009
|
-
const node =
|
|
2050
|
+
const node = collection.getItem(cellKey);
|
|
2010
2051
|
if (node) return node;
|
|
2052
|
+
const isRowHeader = collection.rowHeaderColumnKeys.has(key);
|
|
2053
|
+
return {
|
|
2054
|
+
type: isRowHeader ? ("rowheader" as const) : ("cell" as const),
|
|
2055
|
+
key: cellKey,
|
|
2056
|
+
value: rowNode.value,
|
|
2057
|
+
textValue: "",
|
|
2058
|
+
level: 1,
|
|
2059
|
+
index: 0,
|
|
2060
|
+
parentKey: rowKey,
|
|
2061
|
+
hasChildNodes: false,
|
|
2062
|
+
childNodes: [],
|
|
2063
|
+
} as GridNode<unknown>;
|
|
2011
2064
|
}
|
|
2012
2065
|
|
|
2013
2066
|
return {
|
|
2014
2067
|
type: "cell" as const,
|
|
2015
|
-
key:
|
|
2068
|
+
key: `${rowKey}-cell`,
|
|
2016
2069
|
value: rowNode.value,
|
|
2017
2070
|
textValue: "",
|
|
2018
2071
|
level: 1,
|
|
@@ -2093,9 +2146,11 @@ export function TableCell(props: TableCellProps): JSX.Element {
|
|
|
2093
2146
|
return rest;
|
|
2094
2147
|
};
|
|
2095
2148
|
|
|
2096
|
-
const cellChildren = () =>
|
|
2097
|
-
|
|
2098
|
-
|
|
2149
|
+
const cellChildren = () => {
|
|
2150
|
+
const rawChildren = local.children;
|
|
2151
|
+
return typeof rawChildren === "function" ? rawChildren(renderValues()) : rawChildren;
|
|
2152
|
+
};
|
|
2153
|
+
const cellAttrs = () =>
|
|
2099
2154
|
({
|
|
2100
2155
|
ref: (el: HTMLTableCellElement) => {
|
|
2101
2156
|
setRef(el);
|
|
@@ -2107,44 +2162,28 @@ export function TableCell(props: TableCellProps): JSX.Element {
|
|
|
2107
2162
|
class: renderProps.class(),
|
|
2108
2163
|
style: renderProps.style(),
|
|
2109
2164
|
"data-key": cellNode().key,
|
|
2110
|
-
"data-focused": isFocused()
|
|
2111
|
-
"data-focus-visible": (isFocusVisible() && isFocused())
|
|
2165
|
+
"data-focused": dataAttr(isFocused()),
|
|
2166
|
+
"data-focus-visible": dataAttr(isFocusVisible() && isFocused()),
|
|
2112
2167
|
"data-column-index": cellColumnIndex(),
|
|
2113
|
-
"data-pressed": isPressed()
|
|
2114
|
-
"data-hovered": isHovered()
|
|
2115
|
-
"data-tree-column": isTreeColumn()
|
|
2116
|
-
"data-expanded": (isTreeGridCell() && cellIsExpanded())
|
|
2117
|
-
"data-has-child-items": (isTreeGridCell() && cellHasChildItems())
|
|
2168
|
+
"data-pressed": dataAttr(isPressed()),
|
|
2169
|
+
"data-hovered": dataAttr(isHovered()),
|
|
2170
|
+
"data-tree-column": dataAttr(isTreeColumn()),
|
|
2171
|
+
"data-expanded": dataAttr(isTreeGridCell() && cellIsExpanded()),
|
|
2172
|
+
"data-has-child-items": dataAttr(isTreeGridCell() && cellHasChildItems()),
|
|
2118
2173
|
"data-level": isTreeGridCell() ? cellLevel() : undefined,
|
|
2119
|
-
children: cellChildren(),
|
|
2120
2174
|
}) as JSX.TdHTMLAttributes<HTMLTableCellElement>;
|
|
2121
2175
|
|
|
2122
|
-
|
|
2123
|
-
local.render(
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
{...mergeProps(cleanCellProps(), cleanHoverProps(), cleanFocusProps())}
|
|
2132
|
-
colSpan={local.colSpan}
|
|
2133
|
-
class={renderProps.class()}
|
|
2134
|
-
style={renderProps.style()}
|
|
2135
|
-
data-key={cellNode().key}
|
|
2136
|
-
data-focused={isFocused() || undefined}
|
|
2137
|
-
data-focus-visible={(isFocusVisible() && isFocused()) || undefined}
|
|
2138
|
-
data-column-index={cellColumnIndex()}
|
|
2139
|
-
data-pressed={isPressed() || undefined}
|
|
2140
|
-
data-hovered={isHovered() || undefined}
|
|
2141
|
-
data-tree-column={isTreeColumn() || undefined}
|
|
2142
|
-
data-expanded={(isTreeGridCell() && cellIsExpanded()) || undefined}
|
|
2143
|
-
data-has-child-items={(isTreeGridCell() && cellHasChildItems()) || undefined}
|
|
2144
|
-
data-level={isTreeGridCell() ? cellLevel() : undefined}
|
|
2145
|
-
>
|
|
2176
|
+
if (local.render) {
|
|
2177
|
+
return local.render({ ...cellAttrs(), children: cellChildren() }, renderValues());
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
// JSX children, not an eager `children` entry in the spread object — see
|
|
2181
|
+
// TableColumn: the element's hydration key must precede its children on
|
|
2182
|
+
// both the server and the client.
|
|
2183
|
+
return (
|
|
2184
|
+
<TableHost hostTag="td" virtualized={tableContext.isVirtualized} {...cellAttrs()}>
|
|
2146
2185
|
{cellChildren()}
|
|
2147
|
-
</
|
|
2186
|
+
</TableHost>
|
|
2148
2187
|
);
|
|
2149
2188
|
}
|
|
2150
2189
|
|
|
@@ -2178,7 +2217,7 @@ export function TableSelectionCheckbox(props: TableSelectionCheckboxProps): JSX.
|
|
|
2178
2217
|
{...selectionCheckboxAria.checkboxProps}
|
|
2179
2218
|
class={props.class}
|
|
2180
2219
|
style={props.style}
|
|
2181
|
-
|
|
2220
|
+
tabindex={-1}
|
|
2182
2221
|
aria-label={props["aria-label"] ?? selectionCheckboxAria.checkboxProps["aria-label"]}
|
|
2183
2222
|
onClick={(event) => event.stopPropagation()}
|
|
2184
2223
|
onKeyDown={(event) => event.stopPropagation()}
|
|
@@ -2210,16 +2249,29 @@ export function TableSelectAllCheckbox(props: TableSelectAllCheckboxProps = {}):
|
|
|
2210
2249
|
() => state as TableState<object, TableCollection<object>>,
|
|
2211
2250
|
);
|
|
2212
2251
|
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2252
|
+
const [inputEl, setInputEl] = createSignal<HTMLInputElement | null>(null);
|
|
2253
|
+
|
|
2254
|
+
// Chromium clears the `indeterminate` IDL whenever `checked` is written.
|
|
2255
|
+
// Re-apply after that write so mixed Select All stays mixed in the AX tree.
|
|
2256
|
+
const applyIndeterminate = (input: HTMLInputElement | null) => {
|
|
2257
|
+
if (input) {
|
|
2258
|
+
input.indeterminate = selectAllCheckboxAria.isIndeterminate;
|
|
2217
2259
|
}
|
|
2218
|
-
}
|
|
2260
|
+
};
|
|
2261
|
+
|
|
2262
|
+
createRenderEffect(
|
|
2263
|
+
() => [selectAllCheckboxAria.checkboxProps.checked, inputEl()] as const,
|
|
2264
|
+
([, input]) => {
|
|
2265
|
+
applyIndeterminate(input);
|
|
2266
|
+
},
|
|
2267
|
+
);
|
|
2219
2268
|
|
|
2220
2269
|
return (
|
|
2221
2270
|
<input
|
|
2222
|
-
ref={
|
|
2271
|
+
ref={(el) => {
|
|
2272
|
+
setInputEl(el);
|
|
2273
|
+
applyIndeterminate(el);
|
|
2274
|
+
}}
|
|
2223
2275
|
{...selectAllCheckboxAria.checkboxProps}
|
|
2224
2276
|
class={props.class}
|
|
2225
2277
|
style={props.style}
|
|
@@ -2283,10 +2335,18 @@ export function ColumnResizer(props: ColumnResizerProps): JSX.Element {
|
|
|
2283
2335
|
"children",
|
|
2284
2336
|
]);
|
|
2285
2337
|
|
|
2338
|
+
const stringFormatter = createStringFormatter(racIntlStrings, "react-aria-components");
|
|
2339
|
+
|
|
2286
2340
|
// Register this column with the ResizableTableContainer (auto-collect columns)
|
|
2287
2341
|
const registerColumn = useContext(ResizableTableRegisterContext);
|
|
2342
|
+
const columnDef = useContext(TableColumnDefinitionContext);
|
|
2288
2343
|
if (registerColumn) {
|
|
2289
|
-
registerColumn(local.column.key, {
|
|
2344
|
+
registerColumn(local.column.key, {
|
|
2345
|
+
key: local.column.key,
|
|
2346
|
+
width: columnDef?.width,
|
|
2347
|
+
minWidth: columnDef?.minWidth,
|
|
2348
|
+
maxWidth: columnDef?.maxWidth,
|
|
2349
|
+
});
|
|
2290
2350
|
}
|
|
2291
2351
|
|
|
2292
2352
|
const resizeCtx = useContext(TableColumnResizeStateContext);
|
|
@@ -2319,7 +2379,7 @@ export function ColumnResizer(props: ColumnResizerProps): JSX.Element {
|
|
|
2319
2379
|
const columnResize = createTableColumnResize(
|
|
2320
2380
|
() => ({
|
|
2321
2381
|
column: local.column,
|
|
2322
|
-
"aria-label": local["aria-label"] ?? "
|
|
2382
|
+
"aria-label": local["aria-label"] ?? stringFormatter().format("tableResizer"),
|
|
2323
2383
|
isDisabled: local.isDisabled,
|
|
2324
2384
|
onResizeStart: (widths) => {
|
|
2325
2385
|
resizeCtx?.getCallbacks?.().onResizeStart?.(widths);
|
|
@@ -2365,8 +2425,8 @@ export function ColumnResizer(props: ColumnResizerProps): JSX.Element {
|
|
|
2365
2425
|
{...cleanHoverProps()}
|
|
2366
2426
|
class={renderProps.class()}
|
|
2367
2427
|
style={renderProps.style()}
|
|
2368
|
-
data-hovered={isHovered()
|
|
2369
|
-
data-resizing={columnResize.isResizing()
|
|
2428
|
+
data-hovered={dataAttr(isHovered())}
|
|
2429
|
+
data-resizing={dataAttr(columnResize.isResizing())}
|
|
2370
2430
|
>
|
|
2371
2431
|
<Show when={hasResizeContext}>
|
|
2372
2432
|
<input
|
|
@@ -2415,7 +2475,9 @@ export function ResizableTableContainer(props: ResizableTableContainerProps): JS
|
|
|
2415
2475
|
const [tableWidth, setTableWidth] = createSignal(0);
|
|
2416
2476
|
|
|
2417
2477
|
// Track container width via ResizeObserver
|
|
2418
|
-
|
|
2478
|
+
createTrackedEffect(() => {
|
|
2479
|
+
const _s2Cleanups: Array<() => void> = [];
|
|
2480
|
+
|
|
2419
2481
|
const el = containerRef();
|
|
2420
2482
|
if (!el) return;
|
|
2421
2483
|
|
|
@@ -2429,14 +2491,18 @@ export function ResizableTableContainer(props: ResizableTableContainerProps): JS
|
|
|
2429
2491
|
}
|
|
2430
2492
|
});
|
|
2431
2493
|
observer.observe(el);
|
|
2432
|
-
|
|
2494
|
+
_s2Cleanups.push(() => observer.disconnect());
|
|
2433
2495
|
}
|
|
2496
|
+
|
|
2497
|
+
return () => {
|
|
2498
|
+
for (const c of _s2Cleanups) c();
|
|
2499
|
+
};
|
|
2434
2500
|
});
|
|
2435
2501
|
|
|
2436
2502
|
// Auto-collected columns from ColumnResizer children
|
|
2437
2503
|
const [autoColumns, setAutoColumns] = createSignal<
|
|
2438
2504
|
Map<Key, { key: Key; width?: ColumnSize; minWidth?: number; maxWidth?: number }>
|
|
2439
|
-
>(new Map());
|
|
2505
|
+
>(new Map(), { ownedWrite: true });
|
|
2440
2506
|
|
|
2441
2507
|
const registerColumn = (
|
|
2442
2508
|
key: Key,
|
|
@@ -2483,8 +2549,8 @@ export function ResizableTableContainer(props: ResizableTableContainerProps): JS
|
|
|
2483
2549
|
};
|
|
2484
2550
|
|
|
2485
2551
|
return (
|
|
2486
|
-
<ResizableTableRegisterContext
|
|
2487
|
-
<TableColumnResizeStateContext
|
|
2552
|
+
<ResizableTableRegisterContext value={registerColumn}>
|
|
2553
|
+
<TableColumnResizeStateContext value={contextValue}>
|
|
2488
2554
|
<div
|
|
2489
2555
|
ref={setContainerRef}
|
|
2490
2556
|
{...domProps}
|
|
@@ -2493,8 +2559,8 @@ export function ResizableTableContainer(props: ResizableTableContainerProps): JS
|
|
|
2493
2559
|
>
|
|
2494
2560
|
{local.children}
|
|
2495
2561
|
</div>
|
|
2496
|
-
</TableColumnResizeStateContext
|
|
2497
|
-
</ResizableTableRegisterContext
|
|
2562
|
+
</TableColumnResizeStateContext>
|
|
2563
|
+
</ResizableTableRegisterContext>
|
|
2498
2564
|
);
|
|
2499
2565
|
}
|
|
2500
2566
|
|