react-aria-components 1.17.0 → 1.18.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/dist/exports/Autocomplete.cjs.map +1 -1
- package/dist/exports/Autocomplete.js.map +1 -1
- package/dist/exports/Autocomplete.mjs.map +1 -1
- package/dist/exports/Calendar.cjs +3 -0
- package/dist/exports/Calendar.cjs.map +1 -1
- package/dist/exports/Calendar.js +2 -2
- package/dist/exports/Calendar.js.map +1 -1
- package/dist/exports/Calendar.mjs +2 -2
- package/dist/exports/Calendar.mjs.map +1 -1
- package/dist/exports/Checkbox.cjs +8 -0
- package/dist/exports/Checkbox.cjs.map +1 -1
- package/dist/exports/Checkbox.js +6 -2
- package/dist/exports/Checkbox.js.map +1 -1
- package/dist/exports/Checkbox.mjs +6 -2
- package/dist/exports/Checkbox.mjs.map +1 -1
- package/dist/exports/CheckboxGroup.cjs.map +1 -1
- package/dist/exports/CheckboxGroup.js.map +1 -1
- package/dist/exports/CheckboxGroup.mjs.map +1 -1
- package/dist/exports/CollectionBuilder.cjs.map +1 -1
- package/dist/exports/CollectionBuilder.js.map +1 -1
- package/dist/exports/CollectionBuilder.mjs.map +1 -1
- package/dist/exports/ColorArea.cjs.map +1 -1
- package/dist/exports/ColorArea.js.map +1 -1
- package/dist/exports/ColorArea.mjs.map +1 -1
- package/dist/exports/ColorField.cjs.map +1 -1
- package/dist/exports/ColorField.js.map +1 -1
- package/dist/exports/ColorField.mjs.map +1 -1
- package/dist/exports/ColorPicker.cjs.map +1 -1
- package/dist/exports/ColorPicker.js.map +1 -1
- package/dist/exports/ColorPicker.mjs.map +1 -1
- package/dist/exports/ColorSlider.cjs.map +1 -1
- package/dist/exports/ColorSlider.js.map +1 -1
- package/dist/exports/ColorSlider.mjs.map +1 -1
- package/dist/exports/ColorSwatch.cjs.map +1 -1
- package/dist/exports/ColorSwatch.js.map +1 -1
- package/dist/exports/ColorSwatch.mjs.map +1 -1
- package/dist/exports/ColorSwatchPicker.cjs.map +1 -1
- package/dist/exports/ColorSwatchPicker.js.map +1 -1
- package/dist/exports/ColorSwatchPicker.mjs.map +1 -1
- package/dist/exports/ColorThumb.cjs.map +1 -1
- package/dist/exports/ColorThumb.js.map +1 -1
- package/dist/exports/ColorThumb.mjs.map +1 -1
- package/dist/exports/ColorWheel.cjs.map +1 -1
- package/dist/exports/ColorWheel.js.map +1 -1
- package/dist/exports/ColorWheel.mjs.map +1 -1
- package/dist/exports/ComboBox.cjs.map +1 -1
- package/dist/exports/ComboBox.js.map +1 -1
- package/dist/exports/ComboBox.mjs.map +1 -1
- package/dist/exports/DateField.cjs.map +1 -1
- package/dist/exports/DateField.js.map +1 -1
- package/dist/exports/DateField.mjs.map +1 -1
- package/dist/exports/DatePicker.cjs.map +1 -1
- package/dist/exports/DatePicker.js.map +1 -1
- package/dist/exports/DatePicker.mjs.map +1 -1
- package/dist/exports/DateRangePicker.cjs.map +1 -1
- package/dist/exports/DateRangePicker.js.map +1 -1
- package/dist/exports/DateRangePicker.mjs.map +1 -1
- package/dist/exports/Disclosure.cjs.map +1 -1
- package/dist/exports/Disclosure.js.map +1 -1
- package/dist/exports/Disclosure.mjs.map +1 -1
- package/dist/exports/DisclosureGroup.cjs.map +1 -1
- package/dist/exports/DisclosureGroup.js.map +1 -1
- package/dist/exports/DisclosureGroup.mjs.map +1 -1
- package/dist/exports/GridList.cjs.map +1 -1
- package/dist/exports/GridList.js.map +1 -1
- package/dist/exports/GridList.mjs.map +1 -1
- package/dist/exports/ListBox.cjs.map +1 -1
- package/dist/exports/ListBox.js.map +1 -1
- package/dist/exports/ListBox.mjs.map +1 -1
- package/dist/exports/Menu.cjs.map +1 -1
- package/dist/exports/Menu.js.map +1 -1
- package/dist/exports/Menu.mjs.map +1 -1
- package/dist/exports/RadioGroup.cjs +3 -0
- package/dist/exports/RadioGroup.cjs.map +1 -1
- package/dist/exports/RadioGroup.js +2 -2
- package/dist/exports/RadioGroup.js.map +1 -1
- package/dist/exports/RadioGroup.mjs +2 -2
- package/dist/exports/RadioGroup.mjs.map +1 -1
- package/dist/exports/RangeCalendar.cjs +3 -0
- package/dist/exports/RangeCalendar.cjs.map +1 -1
- package/dist/exports/RangeCalendar.js +2 -2
- package/dist/exports/RangeCalendar.js.map +1 -1
- package/dist/exports/RangeCalendar.mjs +2 -2
- package/dist/exports/RangeCalendar.mjs.map +1 -1
- package/dist/exports/Select.cjs.map +1 -1
- package/dist/exports/Select.js.map +1 -1
- package/dist/exports/Select.mjs.map +1 -1
- package/dist/exports/SharedElementTransition.cjs.map +1 -1
- package/dist/exports/SharedElementTransition.js.map +1 -1
- package/dist/exports/SharedElementTransition.mjs.map +1 -1
- package/dist/exports/Slider.cjs +2 -0
- package/dist/exports/Slider.cjs.map +1 -1
- package/dist/exports/Slider.js +2 -2
- package/dist/exports/Slider.js.map +1 -1
- package/dist/exports/Slider.mjs +2 -2
- package/dist/exports/Slider.mjs.map +1 -1
- package/dist/exports/Switch.cjs +8 -0
- package/dist/exports/Switch.cjs.map +1 -1
- package/dist/exports/Switch.js +6 -2
- package/dist/exports/Switch.js.map +1 -1
- package/dist/exports/Switch.mjs +6 -2
- package/dist/exports/Switch.mjs.map +1 -1
- package/dist/exports/Table.cjs +1 -0
- package/dist/exports/Table.cjs.map +1 -1
- package/dist/exports/Table.js +2 -2
- package/dist/exports/Table.js.map +1 -1
- package/dist/exports/Table.mjs +2 -2
- package/dist/exports/Table.mjs.map +1 -1
- package/dist/exports/Tabs.cjs.map +1 -1
- package/dist/exports/Tabs.js.map +1 -1
- package/dist/exports/Tabs.mjs.map +1 -1
- package/dist/exports/TagGroup.cjs.map +1 -1
- package/dist/exports/TagGroup.js.map +1 -1
- package/dist/exports/TagGroup.mjs.map +1 -1
- package/dist/exports/TimeField.cjs.map +1 -1
- package/dist/exports/TimeField.js.map +1 -1
- package/dist/exports/TimeField.mjs.map +1 -1
- package/dist/exports/Toast.cjs.map +1 -1
- package/dist/exports/Toast.js.map +1 -1
- package/dist/exports/Toast.mjs.map +1 -1
- package/dist/exports/ToggleButtonGroup.cjs.map +1 -1
- package/dist/exports/ToggleButtonGroup.js.map +1 -1
- package/dist/exports/ToggleButtonGroup.mjs.map +1 -1
- package/dist/exports/Tree.cjs.map +1 -1
- package/dist/exports/Tree.js.map +1 -1
- package/dist/exports/Tree.mjs.map +1 -1
- package/dist/exports/Virtualizer.cjs.map +1 -1
- package/dist/exports/Virtualizer.js.map +1 -1
- package/dist/exports/Virtualizer.mjs.map +1 -1
- package/dist/exports/index.cjs +19 -1
- package/dist/exports/index.cjs.map +1 -1
- package/dist/exports/index.js +11 -8
- package/dist/exports/index.js.map +1 -1
- package/dist/exports/index.mjs +11 -8
- package/dist/exports/index.mjs.map +1 -1
- package/dist/exports/useAsyncList.cjs.map +1 -1
- package/dist/exports/useAsyncList.js.map +1 -1
- package/dist/exports/useAsyncList.mjs.map +1 -1
- package/dist/exports/useDragAndDrop.cjs.map +1 -1
- package/dist/exports/useDragAndDrop.js.map +1 -1
- package/dist/exports/useDragAndDrop.mjs.map +1 -1
- package/dist/exports/useDrop.cjs.map +1 -1
- package/dist/exports/useDrop.js.map +1 -1
- package/dist/exports/useDrop.mjs.map +1 -1
- package/dist/private/Autocomplete.cjs.map +1 -1
- package/dist/private/Autocomplete.js.map +1 -1
- package/dist/private/Autocomplete.mjs.map +1 -1
- package/dist/private/Breadcrumbs.cjs.map +1 -1
- package/dist/private/Breadcrumbs.js.map +1 -1
- package/dist/private/Breadcrumbs.mjs.map +1 -1
- package/dist/private/Button.cjs.map +1 -1
- package/dist/private/Button.js.map +1 -1
- package/dist/private/Button.mjs.map +1 -1
- package/dist/private/Calendar.cjs +34 -2
- package/dist/private/Calendar.cjs.map +1 -1
- package/dist/private/Calendar.js +34 -5
- package/dist/private/Calendar.js.map +1 -1
- package/dist/private/Calendar.mjs +34 -5
- package/dist/private/Calendar.mjs.map +1 -1
- package/dist/private/Checkbox.cjs +104 -17
- package/dist/private/Checkbox.cjs.map +1 -1
- package/dist/private/Checkbox.js +102 -18
- package/dist/private/Checkbox.js.map +1 -1
- package/dist/private/Checkbox.mjs +102 -18
- package/dist/private/Checkbox.mjs.map +1 -1
- package/dist/private/Collection.cjs.map +1 -1
- package/dist/private/Collection.js.map +1 -1
- package/dist/private/Collection.mjs.map +1 -1
- package/dist/private/ColorArea.cjs.map +1 -1
- package/dist/private/ColorArea.js.map +1 -1
- package/dist/private/ColorArea.mjs.map +1 -1
- package/dist/private/ColorField.cjs.map +1 -1
- package/dist/private/ColorField.js.map +1 -1
- package/dist/private/ColorField.mjs.map +1 -1
- package/dist/private/ColorPicker.cjs.map +1 -1
- package/dist/private/ColorPicker.js.map +1 -1
- package/dist/private/ColorPicker.mjs.map +1 -1
- package/dist/private/ColorSlider.cjs.map +1 -1
- package/dist/private/ColorSlider.js.map +1 -1
- package/dist/private/ColorSlider.mjs.map +1 -1
- package/dist/private/ColorSwatch.cjs.map +1 -1
- package/dist/private/ColorSwatch.js.map +1 -1
- package/dist/private/ColorSwatch.mjs.map +1 -1
- package/dist/private/ColorSwatchPicker.cjs.map +1 -1
- package/dist/private/ColorSwatchPicker.js.map +1 -1
- package/dist/private/ColorSwatchPicker.mjs.map +1 -1
- package/dist/private/ColorThumb.cjs.map +1 -1
- package/dist/private/ColorThumb.js.map +1 -1
- package/dist/private/ColorThumb.mjs.map +1 -1
- package/dist/private/ColorWheel.cjs.map +1 -1
- package/dist/private/ColorWheel.js.map +1 -1
- package/dist/private/ColorWheel.mjs.map +1 -1
- package/dist/private/ComboBox.cjs +15 -3
- package/dist/private/ComboBox.cjs.map +1 -1
- package/dist/private/ComboBox.js +16 -4
- package/dist/private/ComboBox.js.map +1 -1
- package/dist/private/ComboBox.mjs +16 -4
- package/dist/private/ComboBox.mjs.map +1 -1
- package/dist/private/DateField.cjs.map +1 -1
- package/dist/private/DateField.js.map +1 -1
- package/dist/private/DateField.mjs.map +1 -1
- package/dist/private/DatePicker.cjs +0 -26
- package/dist/private/DatePicker.cjs.map +1 -1
- package/dist/private/DatePicker.js +1 -27
- package/dist/private/DatePicker.js.map +1 -1
- package/dist/private/DatePicker.mjs +1 -27
- package/dist/private/DatePicker.mjs.map +1 -1
- package/dist/private/Dialog.cjs +1 -17
- package/dist/private/Dialog.cjs.map +1 -1
- package/dist/private/Dialog.js +2 -18
- package/dist/private/Dialog.js.map +1 -1
- package/dist/private/Dialog.mjs +2 -18
- package/dist/private/Dialog.mjs.map +1 -1
- package/dist/private/Disclosure.cjs.map +1 -1
- package/dist/private/Disclosure.js.map +1 -1
- package/dist/private/Disclosure.mjs.map +1 -1
- package/dist/private/DragAndDrop.cjs +3 -3
- package/dist/private/DragAndDrop.cjs.map +1 -1
- package/dist/private/DragAndDrop.js +3 -3
- package/dist/private/DragAndDrop.js.map +1 -1
- package/dist/private/DragAndDrop.mjs +3 -3
- package/dist/private/DragAndDrop.mjs.map +1 -1
- package/dist/private/DropZone.cjs.map +1 -1
- package/dist/private/DropZone.js.map +1 -1
- package/dist/private/DropZone.mjs.map +1 -1
- package/dist/private/FieldError.cjs.map +1 -1
- package/dist/private/FieldError.js.map +1 -1
- package/dist/private/FieldError.mjs.map +1 -1
- package/dist/private/FileTrigger.cjs.map +1 -1
- package/dist/private/FileTrigger.js.map +1 -1
- package/dist/private/FileTrigger.mjs.map +1 -1
- package/dist/private/Form.cjs.map +1 -1
- package/dist/private/Form.js.map +1 -1
- package/dist/private/Form.mjs.map +1 -1
- package/dist/private/GridLayout.cjs +37 -0
- package/dist/private/GridLayout.cjs.map +1 -0
- package/dist/private/GridLayout.js +32 -0
- package/dist/private/GridLayout.js.map +1 -0
- package/dist/private/GridLayout.mjs +32 -0
- package/dist/private/GridLayout.mjs.map +1 -0
- package/dist/private/GridList.cjs +19 -2
- package/dist/private/GridList.cjs.map +1 -1
- package/dist/private/GridList.js +20 -3
- package/dist/private/GridList.js.map +1 -1
- package/dist/private/GridList.mjs +20 -3
- package/dist/private/GridList.mjs.map +1 -1
- package/dist/private/Group.cjs.map +1 -1
- package/dist/private/Group.js.map +1 -1
- package/dist/private/Group.mjs.map +1 -1
- package/dist/private/Header.cjs.map +1 -1
- package/dist/private/Header.js.map +1 -1
- package/dist/private/Header.mjs.map +1 -1
- package/dist/private/Heading.cjs.map +1 -1
- package/dist/private/Heading.js.map +1 -1
- package/dist/private/Heading.mjs.map +1 -1
- package/dist/private/HiddenDateInput.cjs +3 -3
- package/dist/private/HiddenDateInput.cjs.map +1 -1
- package/dist/private/HiddenDateInput.js +3 -3
- package/dist/private/HiddenDateInput.js.map +1 -1
- package/dist/private/HiddenDateInput.mjs +3 -3
- package/dist/private/HiddenDateInput.mjs.map +1 -1
- package/dist/private/Input.cjs.map +1 -1
- package/dist/private/Input.js.map +1 -1
- package/dist/private/Input.mjs.map +1 -1
- package/dist/private/Keyboard.cjs.map +1 -1
- package/dist/private/Keyboard.js.map +1 -1
- package/dist/private/Keyboard.mjs.map +1 -1
- package/dist/private/Label.cjs.map +1 -1
- package/dist/private/Label.js.map +1 -1
- package/dist/private/Label.mjs.map +1 -1
- package/dist/private/Link.cjs.map +1 -1
- package/dist/private/Link.js.map +1 -1
- package/dist/private/Link.mjs.map +1 -1
- package/dist/private/ListBox.cjs +6 -5
- package/dist/private/ListBox.cjs.map +1 -1
- package/dist/private/ListBox.js +6 -5
- package/dist/private/ListBox.js.map +1 -1
- package/dist/private/ListBox.mjs +6 -5
- package/dist/private/ListBox.mjs.map +1 -1
- package/dist/private/Menu.cjs +5 -15
- package/dist/private/Menu.cjs.map +1 -1
- package/dist/private/Menu.js +6 -16
- package/dist/private/Menu.js.map +1 -1
- package/dist/private/Menu.mjs +6 -16
- package/dist/private/Menu.mjs.map +1 -1
- package/dist/private/Meter.cjs.map +1 -1
- package/dist/private/Meter.js.map +1 -1
- package/dist/private/Meter.mjs.map +1 -1
- package/dist/private/Modal.cjs.map +1 -1
- package/dist/private/Modal.js.map +1 -1
- package/dist/private/Modal.mjs.map +1 -1
- package/dist/private/NumberField.cjs.map +1 -1
- package/dist/private/NumberField.js.map +1 -1
- package/dist/private/NumberField.mjs.map +1 -1
- package/dist/private/OverlayArrow.cjs.map +1 -1
- package/dist/private/OverlayArrow.js.map +1 -1
- package/dist/private/OverlayArrow.mjs.map +1 -1
- package/dist/private/Popover.cjs +17 -1
- package/dist/private/Popover.cjs.map +1 -1
- package/dist/private/Popover.js +19 -2
- package/dist/private/Popover.js.map +1 -1
- package/dist/private/Popover.mjs +18 -2
- package/dist/private/Popover.mjs.map +1 -1
- package/dist/private/ProgressBar.cjs.map +1 -1
- package/dist/private/ProgressBar.js.map +1 -1
- package/dist/private/ProgressBar.mjs.map +1 -1
- package/dist/private/RadioGroup.cjs +87 -7
- package/dist/private/RadioGroup.cjs.map +1 -1
- package/dist/private/RadioGroup.js +86 -9
- package/dist/private/RadioGroup.js.map +1 -1
- package/dist/private/RadioGroup.mjs +86 -9
- package/dist/private/RadioGroup.mjs.map +1 -1
- package/dist/private/SearchField.cjs.map +1 -1
- package/dist/private/SearchField.js.map +1 -1
- package/dist/private/SearchField.mjs.map +1 -1
- package/dist/private/Select.cjs +1 -17
- package/dist/private/Select.cjs.map +1 -1
- package/dist/private/Select.js +2 -18
- package/dist/private/Select.js.map +1 -1
- package/dist/private/Select.mjs +2 -18
- package/dist/private/Select.mjs.map +1 -1
- package/dist/private/SelectionIndicator.cjs.map +1 -1
- package/dist/private/SelectionIndicator.js.map +1 -1
- package/dist/private/SelectionIndicator.mjs.map +1 -1
- package/dist/private/Separator.cjs.map +1 -1
- package/dist/private/Separator.js.map +1 -1
- package/dist/private/Separator.mjs.map +1 -1
- package/dist/private/SharedElementTransition.cjs.map +1 -1
- package/dist/private/SharedElementTransition.js.map +1 -1
- package/dist/private/SharedElementTransition.mjs.map +1 -1
- package/dist/private/Slider.cjs +51 -1
- package/dist/private/Slider.cjs.map +1 -1
- package/dist/private/Slider.js +50 -2
- package/dist/private/Slider.js.map +1 -1
- package/dist/private/Slider.mjs +50 -2
- package/dist/private/Slider.mjs.map +1 -1
- package/dist/private/Switch.cjs +118 -4
- package/dist/private/Switch.cjs.map +1 -1
- package/dist/private/Switch.js +119 -7
- package/dist/private/Switch.js.map +1 -1
- package/dist/private/Switch.mjs +118 -7
- package/dist/private/Switch.mjs.map +1 -1
- package/dist/private/Table.cjs +115 -24
- package/dist/private/Table.cjs.map +1 -1
- package/dist/private/Table.js +116 -26
- package/dist/private/Table.js.map +1 -1
- package/dist/private/Table.mjs +116 -26
- package/dist/private/Table.mjs.map +1 -1
- package/dist/private/TableLayout.cjs.map +1 -1
- package/dist/private/TableLayout.js.map +1 -1
- package/dist/private/TableLayout.mjs.map +1 -1
- package/dist/private/Tabs.cjs +4 -3
- package/dist/private/Tabs.cjs.map +1 -1
- package/dist/private/Tabs.js +4 -3
- package/dist/private/Tabs.js.map +1 -1
- package/dist/private/Tabs.mjs +4 -3
- package/dist/private/Tabs.mjs.map +1 -1
- package/dist/private/TagGroup.cjs.map +1 -1
- package/dist/private/TagGroup.js.map +1 -1
- package/dist/private/TagGroup.mjs.map +1 -1
- package/dist/private/Text.cjs.map +1 -1
- package/dist/private/Text.js.map +1 -1
- package/dist/private/Text.mjs.map +1 -1
- package/dist/private/TextArea.cjs.map +1 -1
- package/dist/private/TextArea.js.map +1 -1
- package/dist/private/TextArea.mjs.map +1 -1
- package/dist/private/TextField.cjs.map +1 -1
- package/dist/private/TextField.js.map +1 -1
- package/dist/private/TextField.mjs.map +1 -1
- package/dist/private/Toast.cjs +2 -1
- package/dist/private/Toast.cjs.map +1 -1
- package/dist/private/Toast.js +2 -1
- package/dist/private/Toast.js.map +1 -1
- package/dist/private/Toast.mjs +2 -1
- package/dist/private/Toast.mjs.map +1 -1
- package/dist/private/ToggleButton.cjs.map +1 -1
- package/dist/private/ToggleButton.js.map +1 -1
- package/dist/private/ToggleButton.mjs.map +1 -1
- package/dist/private/ToggleButtonGroup.cjs.map +1 -1
- package/dist/private/ToggleButtonGroup.js.map +1 -1
- package/dist/private/ToggleButtonGroup.mjs.map +1 -1
- package/dist/private/Toolbar.cjs.map +1 -1
- package/dist/private/Toolbar.js.map +1 -1
- package/dist/private/Toolbar.mjs.map +1 -1
- package/dist/private/Tooltip.cjs.map +1 -1
- package/dist/private/Tooltip.js.map +1 -1
- package/dist/private/Tooltip.mjs.map +1 -1
- package/dist/private/Tree.cjs +18 -6
- package/dist/private/Tree.cjs.map +1 -1
- package/dist/private/Tree.js +19 -7
- package/dist/private/Tree.js.map +1 -1
- package/dist/private/Tree.mjs +19 -7
- package/dist/private/Tree.mjs.map +1 -1
- package/dist/private/TreeDropTargetDelegate.cjs +9 -4
- package/dist/private/TreeDropTargetDelegate.cjs.map +1 -1
- package/dist/private/TreeDropTargetDelegate.js +10 -4
- package/dist/private/TreeDropTargetDelegate.js.map +1 -1
- package/dist/private/TreeDropTargetDelegate.mjs +9 -4
- package/dist/private/TreeDropTargetDelegate.mjs.map +1 -1
- package/dist/private/Virtualizer.cjs.map +1 -1
- package/dist/private/Virtualizer.js.map +1 -1
- package/dist/private/Virtualizer.mjs.map +1 -1
- package/dist/private/useDragAndDrop.cjs.map +1 -1
- package/dist/private/useDragAndDrop.js.map +1 -1
- package/dist/private/useDragAndDrop.mjs.map +1 -1
- package/dist/private/utils.cjs.map +1 -1
- package/dist/private/utils.js.map +1 -1
- package/dist/private/utils.mjs.map +1 -1
- package/dist/types/exports/Calendar.d.ts +4 -3
- package/dist/types/exports/Checkbox.d.ts +7 -2
- package/dist/types/exports/RadioGroup.d.ts +2 -2
- package/dist/types/exports/RangeCalendar.d.ts +3 -2
- package/dist/types/exports/Slider.d.ts +2 -2
- package/dist/types/exports/Switch.d.ts +7 -2
- package/dist/types/exports/Table.d.ts +2 -2
- package/dist/types/exports/index.d.ts +15 -13
- package/dist/types/exports/useDragAndDrop.d.ts +1 -1
- package/dist/types/src/Autocomplete.d.ts +1 -1
- package/dist/types/src/Breadcrumbs.d.ts +13 -4
- package/dist/types/src/Button.d.ts +9 -1
- package/dist/types/src/Calendar.d.ts +93 -33
- package/dist/types/src/Checkbox.d.ts +93 -2
- package/dist/types/src/Collection.d.ts +17 -4
- package/dist/types/src/ColorArea.d.ts +6 -2
- package/dist/types/src/ColorField.d.ts +8 -1
- package/dist/types/src/ColorPicker.d.ts +4 -1
- package/dist/types/src/ColorSlider.d.ts +5 -1
- package/dist/types/src/ColorSwatch.d.ts +3 -1
- package/dist/types/src/ColorSwatchPicker.d.ts +7 -2
- package/dist/types/src/ColorThumb.d.ts +10 -2
- package/dist/types/src/ColorWheel.d.ts +7 -2
- package/dist/types/src/ComboBox.d.ts +24 -11
- package/dist/types/src/DateField.d.ts +29 -4
- package/dist/types/src/DatePicker.d.ts +15 -3
- package/dist/types/src/Dialog.d.ts +3 -1
- package/dist/types/src/Disclosure.d.ts +21 -5
- package/dist/types/src/DragAndDrop.d.ts +6 -2
- package/dist/types/src/DropZone.d.ts +8 -1
- package/dist/types/src/FieldError.d.ts +4 -1
- package/dist/types/src/FileTrigger.d.ts +2 -1
- package/dist/types/src/Form.d.ts +4 -1
- package/dist/types/src/GridLayout.d.ts +5 -0
- package/dist/types/src/GridList.d.ts +44 -13
- package/dist/types/src/Group.d.ts +9 -1
- package/dist/types/src/Heading.d.ts +12 -0
- package/dist/types/src/HiddenDateInput.d.ts +2 -1
- package/dist/types/src/Input.d.ts +8 -1
- package/dist/types/src/Link.d.ts +9 -1
- package/dist/types/src/ListBox.d.ts +35 -12
- package/dist/types/src/Menu.d.ts +22 -10
- package/dist/types/src/Meter.d.ts +4 -1
- package/dist/types/src/Modal.d.ts +9 -3
- package/dist/types/src/NumberField.d.ts +9 -2
- package/dist/types/src/OverlayArrow.d.ts +4 -1
- package/dist/types/src/Popover.d.ts +12 -3
- package/dist/types/src/ProgressBar.d.ts +5 -1
- package/dist/types/src/RadioGroup.d.ts +88 -2
- package/dist/types/src/SearchField.d.ts +8 -1
- package/dist/types/src/Select.d.ts +19 -6
- package/dist/types/src/SelectionIndicator.d.ts +7 -2
- package/dist/types/src/Separator.d.ts +5 -2
- package/dist/types/src/SharedElementTransition.d.ts +2 -0
- package/dist/types/src/Slider.d.ts +48 -4
- package/dist/types/src/Switch.d.ts +100 -3
- package/dist/types/src/Table.d.ts +138 -31
- package/dist/types/src/Tabs.d.ts +37 -12
- package/dist/types/src/TagGroup.d.ts +18 -7
- package/dist/types/src/TextArea.d.ts +3 -1
- package/dist/types/src/TextField.d.ts +7 -1
- package/dist/types/src/Toast.d.ts +13 -3
- package/dist/types/src/ToggleButton.d.ts +10 -3
- package/dist/types/src/ToggleButtonGroup.d.ts +7 -2
- package/dist/types/src/Toolbar.d.ts +6 -3
- package/dist/types/src/Tooltip.d.ts +13 -4
- package/dist/types/src/Tree.d.ts +52 -16
- package/dist/types/src/useDragAndDrop.d.ts +10 -4
- package/dist/types/src/utils.d.ts +109 -17
- package/package.json +9 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAQM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAA2B;
|
|
1
|
+
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAQM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAA2B;AAwBjE,MAAM,0DAAa,CAAA,GAAA,iBAAS,EAAE,SAAS,WAC5C,KAAsB,EACtB,GAA8B;IAE9B,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,CAAC,YAAY,WACf,OAAO;IAGT,qBAAO,gCAAC;QAAiB,GAAG,KAAK;QAAE,KAAK;;AAC1C;AAEA,MAAM,sDAAkB,CAAA,GAAA,iBAAS,EAAE,CAAC,OAAwB;IAC1D,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,eAAC,WAAW,EAAE,GAAG,WAAU,GAAG;IAClC,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,WAAW;QAAC,QAAQ;IAAI;IACtD,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,SAAS;QACZ,kBAAkB;QAClB,iBACE,WAAW,gBAAgB,CAAC,MAAM,KAAK,IAAI,YAAY,WAAW,gBAAgB,CAAC,IAAI,CAAC;QAC1F,QAAQ;IACV;IAEA,IAAI,YAAY,QAAQ,IAAI,MAC1B,OAAO;IAGT,qBACE,gCAAC,CAAA,GAAA,yCAAG;QAAE,MAAK;QAAe,aAAa;QAAc,GAAG,QAAQ;QAAG,GAAG,WAAW;QAAE,KAAK;;AAE5F","sources":["packages/react-aria-components/src/FieldError.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nimport {ClassNameOrFunction, RenderProps, useRenderProps} from './utils';\nimport {DOMProps, GlobalDOMAttributes, ValidationResult} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';\nimport {Text} from './Text';\n\nexport const FieldErrorContext = createContext<ValidationResult | null>(null);\n\nexport interface FieldErrorRenderProps extends ValidationResult {}\nexport interface FieldErrorProps\n extends RenderProps<FieldErrorRenderProps>, DOMProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-FieldError'\n */\n className?: ClassNameOrFunction<FieldErrorRenderProps>;\n /**\n * The HTML element type to render. Defaults to `'span'`.\n * Set to `'div'` when using block-level children (e.g. `<ul>`) to avoid invalid HTML.\n *\n * @default 'span'\n */\n elementType?: string;\n}\n\n/**\n * A FieldError displays validation errors for a form field.\n */\nexport const FieldError = forwardRef(function FieldError(\n props: FieldErrorProps,\n ref: ForwardedRef<HTMLElement>\n) {\n let validation = useContext(FieldErrorContext);\n if (!validation?.isInvalid) {\n return null;\n }\n\n return <FieldErrorInner {...props} ref={ref} />;\n});\n\nconst FieldErrorInner = forwardRef((props: FieldErrorProps, ref: ForwardedRef<HTMLElement>) => {\n let validation = useContext(FieldErrorContext)!;\n let {elementType, ...restProps} = props;\n let domProps = filterDOMProps(restProps, {global: true})!;\n let renderProps = useRenderProps({\n ...restProps,\n defaultClassName: 'react-aria-FieldError',\n defaultChildren:\n validation.validationErrors.length === 0 ? undefined : validation.validationErrors.join(' '),\n values: validation\n });\n\n if (renderProps.children == null) {\n return null;\n }\n\n return (\n <Text slot=\"errorMessage\" elementType={elementType} {...domProps} {...renderProps} ref={ref} />\n );\n});\n"],"names":[],"version":3,"file":"FieldError.mjs.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AA0CM,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAC7C,KAAuB,EACvB,GAAmC;IAEnC,IAAI,YACF,QAAQ,qBACR,iBAAiB,kBACjB,cAAc,iBACd,aAAa,YACb,QAAQ,mBACR,eAAe,EACf,GAAG,MACJ,GAAG;IACJ,IAAI,WAAW,CAAA,GAAA,yCAAW,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,MAAM;QAAC,QAAQ;IAAI;IAEjD,qBACE,oIACE,0DAAC,CAAA,GAAA,gEAAa;QACZ,SAAS;YACP,IAAI,SAAS,OAAO,EAAE,OACpB,SAAS,OAAO,CAAC,KAAK,GAAG;YAE3B,SAAS,OAAO,EAAE;QACpB;OACC,yBAEH,0DAAC,CAAA,GAAA,+BAAI;QACF,GAAG,QAAQ;QACZ,WAAU;QACV,MAAK;QACL,KAAK;QACL,OAAO;YAAC,SAAS;QAAM;QACvB,QAAQ,mBAAmB;QAC3B,UAAU,CAAA,IAAK,WAAW,CAAA,GAAA,gEAAa,EAAE,GAAG,KAAK;QACjD,SAAS;QACT,UAAU;QACV,mBAAmB;QACnB,iBAAiB,kBAAkB,KAAK;;AAIhD","sources":["packages/react-aria-components/src/FileTrigger.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\n\nimport {getEventTarget} from 'react-aria/private/utils/shadowdom/DOMFunctions';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {Input} from './Input';\nimport {PressResponder} from 'react-aria/private/interactions/PressResponder';\nimport React, {ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {useObjectRef} from 'react-aria/useObjectRef';\n\nexport interface FileTriggerProps extends GlobalDOMAttributes<HTMLInputElement> {\n /**\n * Specifies what mime type of files are allowed.\n */\n acceptedFileTypes?: ReadonlyArray<string>;\n /**\n * Whether multiple files can be selected.\n */\n allowsMultiple?: boolean;\n /**\n * Specifies the use of a media capture mechanism to capture the media on the spot.\n */\n defaultCamera?: 'user' | 'environment';\n /**\n * Handler when a user selects a file.\n */\n onSelect?: (files: FileList | null) => void;\n /**\n * The children of the component.\n */\n children?: ReactNode;\n /**\n * Enables the selection of directories instead of individual files.\n */\n acceptDirectory?: boolean;\n}\n\n/**\n * A FileTrigger allows a user to access the file system with any pressable React Aria or React\n * Spectrum component, or custom components built with usePress.\n */\nexport const FileTrigger = forwardRef(function FileTrigger(\n props: FileTriggerProps,\n ref: ForwardedRef<HTMLInputElement>\n) {\n let {\n onSelect,\n acceptedFileTypes,\n allowsMultiple,\n defaultCamera,\n children,\n acceptDirectory,\n ...rest\n } = props;\n let inputRef = useObjectRef(ref);\n let domProps = filterDOMProps(rest, {global: true});\n\n return (\n <>\n <PressResponder\n onPress={() => {\n if (inputRef.current?.value) {\n inputRef.current.value = '';\n }\n inputRef.current?.click();\n }}>\n {children}\n </PressResponder>\n <Input\n {...domProps}\n className=\"\"\n type=\"file\"\n ref={inputRef}\n style={{display: 'none'}}\n accept={acceptedFileTypes?.toString()}\n onChange={e => onSelect?.(getEventTarget(e).files)}\n capture={defaultCamera}\n multiple={allowsMultiple}\n // @ts-expect-error\n webkitdirectory={acceptDirectory ? '' : undefined}\n />\n </>\n );\n});\n"],"names":[],"version":3,"file":"FileTrigger.cjs.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AA0CM,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAC7C,KAAuB,EACvB,GAAmC;IAEnC,IAAI,YACF,QAAQ,qBACR,iBAAiB,kBACjB,cAAc,iBACd,aAAa,YACb,QAAQ,mBACR,eAAe,EACf,GAAG,MACJ,GAAG;IACJ,IAAI,WAAW,CAAA,GAAA,mBAAW,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,MAAM;QAAC,QAAQ;IAAI;IAEjD,qBACE,gFACE,gCAAC,CAAA,GAAA,qBAAa;QACZ,SAAS;gBACH,mBAGJ;YAHA,KAAI,oBAAA,SAAS,OAAO,cAAhB,wCAAA,kBAAkB,KAAK,EACzB,SAAS,OAAO,CAAC,KAAK,GAAG;aAE3B,qBAAA,SAAS,OAAO,cAAhB,yCAAA,mBAAkB,KAAK;QACzB;OACC,yBAEH,gCAAC,CAAA,GAAA,yCAAI;QACF,GAAG,QAAQ;QACZ,WAAU;QACV,MAAK;QACL,KAAK;QACL,OAAO;YAAC,SAAS;QAAM;QACvB,MAAM,EAAE,8BAAA,wCAAA,kBAAmB,QAAQ;QACnC,UAAU,CAAA,IAAK,qBAAA,+BAAA,SAAW,CAAA,GAAA,qBAAa,EAAE,GAAG,KAAK;QACjD,SAAS;QACT,UAAU;QACV,mBAAmB;QACnB,iBAAiB,kBAAkB,KAAK;;AAIhD","sources":["packages/react-aria-components/src/FileTrigger.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\n\nimport {getEventTarget} from 'react-aria/private/utils/shadowdom/DOMFunctions';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {Input} from './Input';\nimport {PressResponder} from 'react-aria/private/interactions/PressResponder';\nimport React, {ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {useObjectRef} from 'react-aria/useObjectRef';\n\nexport interface FileTriggerProps extends GlobalDOMAttributes<HTMLInputElement> {\n /**\n * Specifies what mime type of files are allowed.\n */\n acceptedFileTypes?: ReadonlyArray<string>;\n /**\n * Whether multiple files can be selected.\n */\n allowsMultiple?: boolean;\n /**\n * Specifies the use of a media capture mechanism to capture the media on the spot.\n */\n defaultCamera?: 'user' | 'environment';\n /**\n * Handler when a user selects a file.\n */\n onSelect?: (files: FileList | null) => void;\n /**\n * The children of the component.\n */\n children?: ReactNode;\n /**\n * Enables the selection of directories instead of individual files.\n */\n acceptDirectory?: boolean;\n}\n\n/**\n * A FileTrigger allows a user to access the file system with any pressable React Aria or React\n * Spectrum component, or custom components built with usePress.\n */\nexport const FileTrigger = forwardRef(function FileTrigger(\n props: FileTriggerProps,\n ref: ForwardedRef<HTMLInputElement>\n) {\n let {\n onSelect,\n acceptedFileTypes,\n allowsMultiple,\n defaultCamera,\n children,\n acceptDirectory,\n ...rest\n } = props;\n let inputRef = useObjectRef(ref);\n let domProps = filterDOMProps(rest, {global: true});\n\n return (\n <>\n <PressResponder\n onPress={() => {\n if (inputRef.current?.value) {\n inputRef.current.value = '';\n }\n inputRef.current?.click();\n }}>\n {children}\n </PressResponder>\n <Input\n {...domProps}\n className=\"\"\n type=\"file\"\n ref={inputRef}\n style={{display: 'none'}}\n accept={acceptedFileTypes?.toString()}\n onChange={e => onSelect?.(getEventTarget(e).files)}\n capture={defaultCamera}\n multiple={allowsMultiple}\n // @ts-expect-error\n webkitdirectory={acceptDirectory ? '' : undefined}\n />\n </>\n );\n});\n"],"names":[],"version":3,"file":"FileTrigger.js.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AA0CM,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAC7C,KAAuB,EACvB,GAAmC;IAEnC,IAAI,YACF,QAAQ,qBACR,iBAAiB,kBACjB,cAAc,iBACd,aAAa,YACb,QAAQ,mBACR,eAAe,EACf,GAAG,MACJ,GAAG;IACJ,IAAI,WAAW,CAAA,GAAA,mBAAW,EAAE;IAC5B,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,MAAM;QAAC,QAAQ;IAAI;IAEjD,qBACE,gFACE,gCAAC,CAAA,GAAA,qBAAa;QACZ,SAAS;YACP,IAAI,SAAS,OAAO,EAAE,OACpB,SAAS,OAAO,CAAC,KAAK,GAAG;YAE3B,SAAS,OAAO,EAAE;QACpB;OACC,yBAEH,gCAAC,CAAA,GAAA,yCAAI;QACF,GAAG,QAAQ;QACZ,WAAU;QACV,MAAK;QACL,KAAK;QACL,OAAO;YAAC,SAAS;QAAM;QACvB,QAAQ,mBAAmB;QAC3B,UAAU,CAAA,IAAK,WAAW,CAAA,GAAA,qBAAa,EAAE,GAAG,KAAK;QACjD,SAAS;QACT,UAAU;QACV,mBAAmB;QACnB,iBAAiB,kBAAkB,KAAK;;AAIhD","sources":["packages/react-aria-components/src/FileTrigger.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\n\nimport {getEventTarget} from 'react-aria/private/utils/shadowdom/DOMFunctions';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport {Input} from './Input';\nimport {PressResponder} from 'react-aria/private/interactions/PressResponder';\nimport React, {ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {useObjectRef} from 'react-aria/useObjectRef';\n\nexport interface FileTriggerProps extends GlobalDOMAttributes<HTMLInputElement> {\n /**\n * Specifies what mime type of files are allowed.\n */\n acceptedFileTypes?: ReadonlyArray<string>;\n /**\n * Whether multiple files can be selected.\n */\n allowsMultiple?: boolean;\n /**\n * Specifies the use of a media capture mechanism to capture the media on the spot.\n */\n defaultCamera?: 'user' | 'environment';\n /**\n * Handler when a user selects a file.\n */\n onSelect?: (files: FileList | null) => void;\n /**\n * The children of the component.\n */\n children?: ReactNode;\n /**\n * Enables the selection of directories instead of individual files.\n */\n acceptDirectory?: boolean;\n}\n\n/**\n * A FileTrigger allows a user to access the file system with any pressable React Aria or React\n * Spectrum component, or custom components built with usePress.\n */\nexport const FileTrigger = forwardRef(function FileTrigger(\n props: FileTriggerProps,\n ref: ForwardedRef<HTMLInputElement>\n) {\n let {\n onSelect,\n acceptedFileTypes,\n allowsMultiple,\n defaultCamera,\n children,\n acceptDirectory,\n ...rest\n } = props;\n let inputRef = useObjectRef(ref);\n let domProps = filterDOMProps(rest, {global: true});\n\n return (\n <>\n <PressResponder\n onPress={() => {\n if (inputRef.current?.value) {\n inputRef.current.value = '';\n }\n inputRef.current?.click();\n }}>\n {children}\n </PressResponder>\n <Input\n {...domProps}\n className=\"\"\n type=\"file\"\n ref={inputRef}\n style={{display: 'none'}}\n accept={acceptedFileTypes?.toString()}\n onChange={e => onSelect?.(getEventTarget(e).files)}\n capture={defaultCamera}\n multiple={allowsMultiple}\n // @ts-expect-error\n webkitdirectory={acceptDirectory ? '' : undefined}\n />\n </>\n );\n});\n"],"names":[],"version":3,"file":"FileTrigger.mjs.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AA8BM,MAAM,0DAAc,CAAA,GAAA,0BAAY,EAA4C;AAM5E,MAAM,0DAAO,CAAA,GAAA,uBAAS,EAAE,SAAS,KAAK,KAAgB,EAAE,GAAkC;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,sBAAE,qBAAqB,oBAAU,QAAQ,aAAE,SAAS,EAAE,GAAG,UAAS,GAAG;IAC1F,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,IAAI;QACP,YAAY,uBAAuB;QAClC,GAAG,QAAQ;QACZ,KAAK;QACL,WAAW,aAAa;qBACxB,0DAAC,0CAAY,QAAQ;QAAC,OAAO;YAAC,GAAG,KAAK;gCAAE;QAAkB;qBACxD,0DAAC,CAAA,GAAA,0EAAoB,EAAE,QAAQ;QAAC,OAAO,oBAAoB,CAAC;OACzD;AAKX","sources":["packages/react-aria-components/src/Form.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nimport {ContextValue, dom, DOMProps, DOMRenderProps, useContextProps} from './utils';\nimport {FormValidationContext} from 'react-stately/private/form/useFormValidationState';\nimport {GlobalDOMAttributes, FormProps as SharedFormProps} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface FormProps\n extends\n SharedFormProps,\n DOMProps,\n DOMRenderProps<'form', undefined>,\n GlobalDOMAttributes<HTMLFormElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-Form'\n */\n className?: string;\n /**\n * Whether to use native HTML form validation to prevent form submission\n * when a field value is missing or invalid, or mark fields as required\n * or invalid via ARIA.\n *\n * @default 'native'\n */\n validationBehavior?: 'aria' | 'native';\n}\n\nexport const FormContext = createContext<ContextValue<FormProps, HTMLFormElement>>(null);\n\n/**\n * A form is a group of inputs that allows users to submit data to a server,\n * with support for providing field validation errors.\n */\nexport const Form = forwardRef(function Form(props: FormProps, ref: ForwardedRef<HTMLFormElement>) {\n [props, ref] = useContextProps(props, ref, FormContext);\n let {validationErrors, validationBehavior = 'native', children, className, ...domProps} = props;\n return (\n <dom.form\n noValidate={validationBehavior !== 'native'}\n {...domProps}\n ref={ref}\n className={className || 'react-aria-Form'}>\n <FormContext.Provider value={{...props, validationBehavior}}>\n <FormValidationContext.Provider value={validationErrors ?? {}}>\n {children}\n </FormValidationContext.Provider>\n </FormContext.Provider>\n </dom.form>\n );\n});\n"],"names":[],"version":3,"file":"Form.cjs.map"}
|
package/dist/private/Form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AA8BM,MAAM,0DAAc,CAAA,GAAA,oBAAY,EAA4C;AAM5E,MAAM,0DAAO,CAAA,GAAA,iBAAS,EAAE,SAAS,KAAK,KAAgB,EAAE,GAAkC;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,sBAAE,qBAAqB,oBAAU,QAAQ,aAAE,SAAS,EAAE,GAAG,UAAS,GAAG;IAC1F,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,IAAI;QACP,YAAY,uBAAuB;QAClC,GAAG,QAAQ;QACZ,KAAK;QACL,WAAW,aAAa;qBACxB,gCAAC,0CAAY,QAAQ;QAAC,OAAO;YAAC,GAAG,KAAK;gCAAE;QAAkB;qBACxD,gCAAC,CAAA,GAAA,4BAAoB,EAAE,QAAQ;QAAC,OAAO,6BAAA,8BAAA,mBAAoB,CAAC;OACzD;AAKX","sources":["packages/react-aria-components/src/Form.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nimport {ContextValue, dom, DOMProps, DOMRenderProps, useContextProps} from './utils';\nimport {FormValidationContext} from 'react-stately/private/form/useFormValidationState';\nimport {GlobalDOMAttributes, FormProps as SharedFormProps} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface FormProps\n extends\n SharedFormProps,\n DOMProps,\n DOMRenderProps<'form', undefined>,\n GlobalDOMAttributes<HTMLFormElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-Form'\n */\n className?: string;\n /**\n * Whether to use native HTML form validation to prevent form submission\n * when a field value is missing or invalid, or mark fields as required\n * or invalid via ARIA.\n *\n * @default 'native'\n */\n validationBehavior?: 'aria' | 'native';\n}\n\nexport const FormContext = createContext<ContextValue<FormProps, HTMLFormElement>>(null);\n\n/**\n * A form is a group of inputs that allows users to submit data to a server,\n * with support for providing field validation errors.\n */\nexport const Form = forwardRef(function Form(props: FormProps, ref: ForwardedRef<HTMLFormElement>) {\n [props, ref] = useContextProps(props, ref, FormContext);\n let {validationErrors, validationBehavior = 'native', children, className, ...domProps} = props;\n return (\n <dom.form\n noValidate={validationBehavior !== 'native'}\n {...domProps}\n ref={ref}\n className={className || 'react-aria-Form'}>\n <FormContext.Provider value={{...props, validationBehavior}}>\n <FormValidationContext.Provider value={validationErrors ?? {}}>\n {children}\n </FormValidationContext.Provider>\n </FormContext.Provider>\n </dom.form>\n );\n});\n"],"names":[],"version":3,"file":"Form.js.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AA8BM,MAAM,0DAAc,CAAA,GAAA,oBAAY,EAA4C;AAM5E,MAAM,0DAAO,CAAA,GAAA,iBAAS,EAAE,SAAS,KAAK,KAAgB,EAAE,GAAkC;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,oBAAC,gBAAgB,sBAAE,qBAAqB,oBAAU,QAAQ,aAAE,SAAS,EAAE,GAAG,UAAS,GAAG;IAC1F,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,IAAI;QACP,YAAY,uBAAuB;QAClC,GAAG,QAAQ;QACZ,KAAK;QACL,WAAW,aAAa;qBACxB,gCAAC,0CAAY,QAAQ;QAAC,OAAO;YAAC,GAAG,KAAK;gCAAE;QAAkB;qBACxD,gCAAC,CAAA,GAAA,4BAAoB,EAAE,QAAQ;QAAC,OAAO,oBAAoB,CAAC;OACzD;AAKX","sources":["packages/react-aria-components/src/Form.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nimport {ContextValue, dom, DOMProps, DOMRenderProps, useContextProps} from './utils';\nimport {FormValidationContext} from 'react-stately/private/form/useFormValidationState';\nimport {GlobalDOMAttributes, FormProps as SharedFormProps} from '@react-types/shared';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface FormProps\n extends\n SharedFormProps,\n DOMProps,\n DOMRenderProps<'form', undefined>,\n GlobalDOMAttributes<HTMLFormElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-Form'\n */\n className?: string;\n /**\n * Whether to use native HTML form validation to prevent form submission\n * when a field value is missing or invalid, or mark fields as required\n * or invalid via ARIA.\n *\n * @default 'native'\n */\n validationBehavior?: 'aria' | 'native';\n}\n\nexport const FormContext = createContext<ContextValue<FormProps, HTMLFormElement>>(null);\n\n/**\n * A form is a group of inputs that allows users to submit data to a server,\n * with support for providing field validation errors.\n */\nexport const Form = forwardRef(function Form(props: FormProps, ref: ForwardedRef<HTMLFormElement>) {\n [props, ref] = useContextProps(props, ref, FormContext);\n let {validationErrors, validationBehavior = 'native', children, className, ...domProps} = props;\n return (\n <dom.form\n noValidate={validationBehavior !== 'native'}\n {...domProps}\n ref={ref}\n className={className || 'react-aria-Form'}>\n <FormContext.Provider value={{...props, validationBehavior}}>\n <FormValidationContext.Provider value={validationErrors ?? {}}>\n {children}\n </FormValidationContext.Provider>\n </FormContext.Provider>\n </dom.form>\n );\n});\n"],"names":[],"version":3,"file":"Form.mjs.map"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var $kMpTT$reactstatelyuseVirtualizerState = require("react-stately/useVirtualizerState");
|
|
2
|
+
var $kMpTT$reactariaI18nProvider = require("react-aria/I18nProvider");
|
|
3
|
+
var $kMpTT$react = require("react");
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function $parcel$export(e, n, v, s) {
|
|
7
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
$parcel$export(module.exports, "GridLayout", function () { return $b0f63132ddc5a7cf$export$7d2b12578154a735; });
|
|
11
|
+
/*
|
|
12
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
13
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
15
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
18
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
19
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
20
|
+
* governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class $b0f63132ddc5a7cf$export$7d2b12578154a735 extends (0, $kMpTT$reactstatelyuseVirtualizerState.GridLayout) {
|
|
25
|
+
// Automatically determine the layout direction from the current locale.
|
|
26
|
+
useLayoutOptions() {
|
|
27
|
+
/* eslint-disable react-hooks/rules-of-hooks */ let { direction: direction } = (0, $kMpTT$reactariaI18nProvider.useLocale)();
|
|
28
|
+
return (0, $kMpTT$react.useMemo)(()=>({
|
|
29
|
+
direction: direction
|
|
30
|
+
}), [
|
|
31
|
+
direction
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=GridLayout.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAOM,MAAM,kDACH,CAAA,GAAA,iDAAa;IAGrB,wEAAwE;IACxE,mBAAsC;QACpC,6CAA6C,GAC7C,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,sCAAQ;QAC1B,OAAO,CAAA,GAAA,oBAAM,EAAE,IAAO,CAAA;2BAAC;YAAS,CAAA,GAAI;YAAC;SAAU;IACjD;AACF","sources":["packages/react-aria-components/src/GridLayout.ts"],"sourcesContent":["/*\n * Copyright 2024 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\nimport {GridLayout as BaseGridLayout, GridLayoutOptions} from 'react-stately/useVirtualizerState';\nimport {LayoutOptionsDelegate} from './Virtualizer';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useMemo} from 'react';\n\nexport class GridLayout<T, O extends GridLayoutOptions = GridLayoutOptions>\n extends BaseGridLayout<T, O>\n implements LayoutOptionsDelegate<GridLayoutOptions>\n{\n // Automatically determine the layout direction from the current locale.\n useLayoutOptions(): GridLayoutOptions {\n /* eslint-disable react-hooks/rules-of-hooks */\n let {direction} = useLocale();\n return useMemo(() => ({direction}), [direction]);\n }\n}\n"],"names":[],"version":3,"file":"GridLayout.cjs.map"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {GridLayout as $86kX2$GridLayout} from "react-stately/useVirtualizerState";
|
|
2
|
+
import {useLocale as $86kX2$useLocale} from "react-aria/I18nProvider";
|
|
3
|
+
import {useMemo as $86kX2$useMemo} from "react";
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
7
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
+
* governing permissions and limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class $b4dd74abacc8f75e$export$7d2b12578154a735 extends (0, $86kX2$GridLayout) {
|
|
19
|
+
// Automatically determine the layout direction from the current locale.
|
|
20
|
+
useLayoutOptions() {
|
|
21
|
+
/* eslint-disable react-hooks/rules-of-hooks */ let { direction: direction } = (0, $86kX2$useLocale)();
|
|
22
|
+
return (0, $86kX2$useMemo)(()=>({
|
|
23
|
+
direction: direction
|
|
24
|
+
}), [
|
|
25
|
+
direction
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export {$b4dd74abacc8f75e$export$7d2b12578154a735 as GridLayout};
|
|
32
|
+
//# sourceMappingURL=GridLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAOM,MAAM,kDACH,CAAA,GAAA,iBAAa;IAGrB,wEAAwE;IACxE,mBAAsC;QACpC,6CAA6C,GAC7C,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;QAC1B,OAAO,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;2BAAC;YAAS,CAAA,GAAI;YAAC;SAAU;IACjD;AACF","sources":["packages/react-aria-components/src/GridLayout.ts"],"sourcesContent":["/*\n * Copyright 2024 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\nimport {GridLayout as BaseGridLayout, GridLayoutOptions} from 'react-stately/useVirtualizerState';\nimport {LayoutOptionsDelegate} from './Virtualizer';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useMemo} from 'react';\n\nexport class GridLayout<T, O extends GridLayoutOptions = GridLayoutOptions>\n extends BaseGridLayout<T, O>\n implements LayoutOptionsDelegate<GridLayoutOptions>\n{\n // Automatically determine the layout direction from the current locale.\n useLayoutOptions(): GridLayoutOptions {\n /* eslint-disable react-hooks/rules-of-hooks */\n let {direction} = useLocale();\n return useMemo(() => ({direction}), [direction]);\n }\n}\n"],"names":[],"version":3,"file":"GridLayout.js.map"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {GridLayout as $drfXP$GridLayout} from "react-stately/useVirtualizerState";
|
|
2
|
+
import {useLocale as $drfXP$useLocale} from "react-aria/I18nProvider";
|
|
3
|
+
import {useMemo as $drfXP$useMemo} from "react";
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
7
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
+
* governing permissions and limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class $4619d02c7d841f48$export$7d2b12578154a735 extends (0, $drfXP$GridLayout) {
|
|
19
|
+
// Automatically determine the layout direction from the current locale.
|
|
20
|
+
useLayoutOptions() {
|
|
21
|
+
/* eslint-disable react-hooks/rules-of-hooks */ let { direction: direction } = (0, $drfXP$useLocale)();
|
|
22
|
+
return (0, $drfXP$useMemo)(()=>({
|
|
23
|
+
direction: direction
|
|
24
|
+
}), [
|
|
25
|
+
direction
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export {$4619d02c7d841f48$export$7d2b12578154a735 as GridLayout};
|
|
32
|
+
//# sourceMappingURL=GridLayout.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAOM,MAAM,kDACH,CAAA,GAAA,iBAAa;IAGrB,wEAAwE;IACxE,mBAAsC;QACpC,6CAA6C,GAC7C,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;QAC1B,OAAO,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;2BAAC;YAAS,CAAA,GAAI;YAAC;SAAU;IACjD;AACF","sources":["packages/react-aria-components/src/GridLayout.ts"],"sourcesContent":["/*\n * Copyright 2024 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\nimport {GridLayout as BaseGridLayout, GridLayoutOptions} from 'react-stately/useVirtualizerState';\nimport {LayoutOptionsDelegate} from './Virtualizer';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useMemo} from 'react';\n\nexport class GridLayout<T, O extends GridLayoutOptions = GridLayoutOptions>\n extends BaseGridLayout<T, O>\n implements LayoutOptionsDelegate<GridLayoutOptions>\n{\n // Automatically determine the layout direction from the current locale.\n useLayoutOptions(): GridLayoutOptions {\n /* eslint-disable react-hooks/rules-of-hooks */\n let {direction} = useLocale();\n return useMemo(() => ({direction}), [direction]);\n }\n}\n"],"names":[],"version":3,"file":"GridLayout.mjs.map"}
|
|
@@ -273,18 +273,24 @@ const $baa7ef94f966d95f$export$e96fc9a8407faa6b = /*#__PURE__*/ (0, $lEvRe$react
|
|
|
273
273
|
let { dragAndDropHooks: dragAndDropHooks, dragState: dragState, dropState: dropState } = (0, $lEvRe$react.useContext)((0, $d3d8871226fc64f2$exports.DragAndDropContext));
|
|
274
274
|
let ref = (0, $lEvRe$reactariauseObjectRef.useObjectRef)(forwardedRef);
|
|
275
275
|
let { isVirtualized: isVirtualized } = (0, $lEvRe$react.useContext)((0, $f7b82bedbb70abac$exports.CollectionRendererContext));
|
|
276
|
+
let isDraggable = dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));
|
|
276
277
|
let { rowProps: rowProps, gridCellProps: gridCellProps, descriptionProps: descriptionProps, ...states } = (0, $lEvRe$reactariauseGridList.useGridListItem)({
|
|
277
278
|
node: item,
|
|
278
279
|
shouldSelectOnPressUp: !!dragState,
|
|
279
280
|
isVirtualized: isVirtualized
|
|
280
281
|
}, state, ref);
|
|
281
282
|
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $lEvRe$reactariauseHover.useHover)({
|
|
282
|
-
|
|
283
|
+
// because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable
|
|
284
|
+
// results in hover styles sticking around after a reorder/drop operation...
|
|
285
|
+
isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,
|
|
283
286
|
onHoverStart: item.props.onHoverStart,
|
|
284
287
|
onHoverChange: item.props.onHoverChange,
|
|
285
288
|
onHoverEnd: item.props.onHoverEnd
|
|
286
289
|
});
|
|
287
290
|
let { isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $lEvRe$reactariauseFocusRing.useFocusRing)();
|
|
291
|
+
let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $lEvRe$reactariauseFocusRing.useFocusRing)({
|
|
292
|
+
within: true
|
|
293
|
+
});
|
|
288
294
|
let { checkboxProps: checkboxProps } = (0, $lEvRe$reactariauseGridList.useGridListSelectionCheckbox)({
|
|
289
295
|
key: item.key
|
|
290
296
|
}, state);
|
|
@@ -316,6 +322,7 @@ const $baa7ef94f966d95f$export$e96fc9a8407faa6b = /*#__PURE__*/ (0, $lEvRe$react
|
|
|
316
322
|
...states,
|
|
317
323
|
isHovered: isHovered,
|
|
318
324
|
isFocusVisible: isFocusVisible,
|
|
325
|
+
isFocusVisibleWithin: isFocusVisibleWithin,
|
|
319
326
|
selectionMode: state.selectionManager.selectionMode,
|
|
320
327
|
selectionBehavior: state.selectionManager.selectionBehavior,
|
|
321
328
|
allowsDragging: !!dragState,
|
|
@@ -353,13 +360,14 @@ const $baa7ef94f966d95f$export$e96fc9a8407faa6b = /*#__PURE__*/ (0, $lEvRe$react
|
|
|
353
360
|
...dropIndicator?.dropIndicatorProps,
|
|
354
361
|
ref: dropIndicatorRef
|
|
355
362
|
}))), /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $048d76b84370f141$exports.dom).div, {
|
|
356
|
-
...(0, $lEvRe$reactariamergeProps.mergeProps)(DOMProps, renderProps, rowProps, focusProps, hoverProps, draggableItem?.dragProps),
|
|
363
|
+
...(0, $lEvRe$reactariamergeProps.mergeProps)(DOMProps, renderProps, rowProps, focusProps, focusWithinProps, hoverProps, draggableItem?.dragProps),
|
|
357
364
|
ref: ref,
|
|
358
365
|
"data-selected": states.isSelected || undefined,
|
|
359
366
|
"data-disabled": states.isDisabled || undefined,
|
|
360
367
|
"data-hovered": isHovered || undefined,
|
|
361
368
|
"data-focused": states.isFocused || undefined,
|
|
362
369
|
"data-focus-visible": isFocusVisible || undefined,
|
|
370
|
+
"data-focus-visible-within": isFocusVisibleWithin || undefined,
|
|
363
371
|
"data-pressed": states.isPressed || undefined,
|
|
364
372
|
"data-allows-dragging": !!dragState || undefined,
|
|
365
373
|
"data-dragging": isDragging || undefined,
|
|
@@ -381,6 +389,15 @@ const $baa7ef94f966d95f$export$e96fc9a8407faa6b = /*#__PURE__*/ (0, $lEvRe$react
|
|
|
381
389
|
}
|
|
382
390
|
}
|
|
383
391
|
],
|
|
392
|
+
[
|
|
393
|
+
(0, $365d89633c2041bc$exports.CheckboxFieldContext),
|
|
394
|
+
{
|
|
395
|
+
slots: {
|
|
396
|
+
[(0, $048d76b84370f141$exports.DEFAULT_SLOT)]: {},
|
|
397
|
+
selection: checkboxProps
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
],
|
|
384
401
|
[
|
|
385
402
|
(0, $16c7f9b22cce3838$exports.ButtonContext),
|
|
386
403
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiIM,MAAM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,GAAG,CAAA,GAAA,qDAAkB,EAAE,CAAA,GAAA,2DAAS,GAAG,SAAS,OAAO,KAA0B,EAAE,GAAiC;IACvJ,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,iBAAiB,CAAA,GAAA,uBAAS,EAAE;IAEhC,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QAAC,QAAQ,MAAM,MAAM;QAAE,WAAU;QAA4B,KAAK;QAAM,GAAG,KAAK;qBACtF,0DAAC;QAAK,GAAG,cAAc;QAAE,OAAO;YAAC,SAAS;QAAU;OACjD,MAAM,QAAQ;AAIvB","sources":["packages/react-aria-components/src/GridList.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 */\nimport {\n AriaGridListProps,\n useGridList,\n useGridListItem,\n useGridListSection,\n useGridListSelectionCheckbox\n} from 'react-aria/useGridList';\n\nimport {ButtonContext} from './Button';\nimport {CheckboxContext} from './Checkbox';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {CollectionBuilder, createBranchComponent, createLeafComponent} from 'react-aria/CollectionBuilder';\nimport {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, ItemRenderProps, SectionProps} from './Collection';\nimport {DragAndDropContext, DropIndicatorContext, DropIndicatorProps, useDndPersistedKeys, useRenderDropIndicator} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {DragPreviewRenderer} from '@react-types/shared';\nimport {DropIndicatorAria, DroppableCollectionResult} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {FieldInputContext, SelectableCollectionContext, SelectableCollectionContextValue} from './Autocomplete';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, Orientation, PressEvents, RefObject} from '@react-types/shared';\nimport {HeaderNode, ItemNode, LoaderNode, SectionNode} from 'react-aria/private/collections/BaseCollection';\nimport {Collection as ICollection, Node, SelectionBehavior} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {ListState, UNSTABLE_useFilteredListState, useListState} from 'react-stately/useListState';\nimport {ListStateContext} from './ListBox';\nimport {LoadMoreSentinelProps, useLoadMoreSentinel} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, JSX, ReactNode, useContext, useEffect, useMemo, useRef} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface GridListRenderProps {\n /**\n * Whether the list has no items and should display its empty state.\n * @selector [data-empty]\n */\n isEmpty: boolean,\n /**\n * Whether the grid list is currently focused.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the grid list is currently keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the grid list is currently the active drop target.\n * @selector [data-drop-target]\n */\n isDropTarget: boolean,\n /**\n * Whether the items are arranged in a stack or grid.\n * @selector [data-layout=\"stack | grid\"]\n */\n layout: 'stack' | 'grid',\n /**\n * The primary orientation of the items.\n * @selector [data-orientation=\"vertical | horizontal\"]\n */\n orientation: Orientation,\n /**\n * State of the grid list.\n */\n state: ListState<unknown>\n}\n\nexport interface GridListProps<T> extends Omit<AriaGridListProps<T>, 'children'>, CollectionProps<T>, StyleRenderProps<GridListRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-GridList'\n */\n className?: ClassNameOrFunction<GridListRenderProps>,\n /**\n * Whether typeahead navigation is disabled.\n * @default false\n */\n disallowTypeAhead?: boolean,\n /**\n * How multiple selection should behave in the collection.\n * @default \"toggle\"\n */\n selectionBehavior?: SelectionBehavior,\n /** The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the GridList. */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>,\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: GridListRenderProps) => ReactNode,\n /**\n * Whether the items are arranged in a stack or grid.\n * @default 'stack'\n */\n layout?: 'stack' | 'grid',\n /**\n * The primary orientation of the items. Usually this is the direction that the collection scrolls.\n * @default 'vertical'\n */\n orientation?: Orientation\n}\n\n\nexport const GridListContext = createContext<ContextValue<GridListProps<any>, HTMLDivElement>>(null);\n\n/**\n * A grid list displays a list of interactive items, with support for keyboard navigation,\n * single or multiple selection, and row actions.\n */\nexport const GridList = /*#__PURE__*/ (forwardRef as forwardRefType)(function GridList<T extends object>(props: GridListProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, GridListContext);\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => <GridListInner props={props} collection={collection} gridListRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface GridListInnerProps<T extends object> {\n props: GridListProps<T> & SelectableCollectionContextValue<T>,\n collection: ICollection<Node<object>>,\n gridListRef: RefObject<HTMLElement | null>\n}\n\nfunction GridListInner<T extends object>({props, collection, gridListRef: ref}: GridListInnerProps<T>) {\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {shouldUseVirtualFocus, filter, disallowTypeAhead, ...DOMCollectionProps} = props;\n let {dragAndDropHooks, keyboardNavigationBehavior = 'arrow', layout = 'stack', orientation = 'vertical'} = props;\n let {CollectionRoot, isVirtualized, layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate} = useContext(CollectionRendererContext);\n let gridlistState = useListState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n layoutDelegate\n });\n\n let filteredState = UNSTABLE_useFilteredListState(gridlistState as ListState<T>, filter);\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let {disabledBehavior, disabledKeys} = filteredState.selectionManager;\n let {direction} = useLocale();\n let keyboardDelegate = useMemo(() => (\n new ListKeyboardDelegate({\n collection: filteredState.collection,\n collator,\n ref,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n layout,\n orientation,\n direction\n })\n ), [filteredState.collection, ref, layout, orientation, disabledKeys, disabledBehavior, layoutDelegate, collator, direction]);\n\n let {gridProps} = useGridList({\n ...DOMCollectionProps,\n keyboardDelegate,\n // Only tab navigation is supported in grid layout.\n keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,\n isVirtualized,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n disallowTypeAhead\n }, filteredState, ref);\n\n let selectionManager = filteredState.selectionManager;\n let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isListDraggable);\n let dropHooksProvided = useRef(isListDroppable);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== isListDraggable) {\n console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');\n }\n if (dropHooksProvided.current !== isListDroppable) {\n console.warn('Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');\n }\n }, [isListDraggable, isListDroppable]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (isListDraggable && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview\n ? <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n : null;\n }\n\n if (isListDroppable && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let dropTargetDelegate = dragAndDropHooks.dropTargetDelegate || ctxDropTargetDelegate || new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {layout, direction, orientation});\n droppableCollection = dragAndDropHooks.useDroppableCollection!({\n keyboardDelegate,\n dropTargetDelegate\n }, dropState, ref);\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let isEmpty = filteredState.collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n orientation,\n isEmpty,\n isFocused,\n isFocusVisible,\n layout,\n state: filteredState\n };\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-GridList',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n let emptyStatePropOverrides: HTMLAttributes<HTMLElement> | null = null;\n\n if (isEmpty && props.renderEmptyState) {\n let content = props.renderEmptyState(renderValues);\n emptyState = (\n <div role=\"row\" aria-rowindex={1} style={{display: 'contents'}}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <FocusScope>\n <dom.div\n {...mergeProps(DOMProps, renderProps, gridProps, focusProps, droppableCollection?.collectionProps, emptyStatePropOverrides)}\n ref={ref as RefObject<HTMLDivElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-drop-target={isRootDropTarget || undefined}\n data-empty={isEmpty || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-layout={layout}\n data-orientation={orientation}>\n <Provider\n values={[\n [ListStateContext, filteredState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: GridListDropIndicatorWrapper}]\n ]}>\n {isListDroppable && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)} />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n {dragPreview}\n </dom.div>\n </FocusScope>\n );\n}\n\nexport interface GridListItemRenderProps extends ItemRenderProps {\n /** The unique id of the item. */\n id?: Key,\n /**\n * State of the grid list.\n */\n state: ListState<unknown>\n}\n\nexport interface GridListItemProps<T = object> extends RenderProps<GridListItemRenderProps>, LinkDOMProps, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-GridListItem'\n */\n className?: ClassNameOrFunction<GridListItemRenderProps>,\n /** The unique id of the item. */\n id?: Key,\n /** The object value that this item represents. When using dynamic collections, this is set automatically. */\n value?: T,\n /** A string representation of the item's contents, used for features like typeahead. */\n textValue?: string,\n /** Whether the item is disabled. */\n isDisabled?: boolean,\n /**\n * Handler that is called when a user performs an action on the item. The exact user event depends on\n * the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void\n}\n\n/**\n * A GridListItem represents an individual item in a GridList.\n */\nexport const GridListItem = /*#__PURE__*/ createLeafComponent(ItemNode, function GridListItem<T extends object>(props: GridListItemProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let state = useContext(ListStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {rowProps, gridCellProps, descriptionProps, ...states} = useGridListItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n },\n state,\n ref\n );\n\n let {hoverProps, isHovered} = useHover({\n isDisabled: !states.allowsSelection && !states.hasAction,\n onHoverStart: item.props.onHoverStart,\n onHoverChange: item.props.onHoverChange,\n onHoverEnd: item.props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {checkboxProps} = useGridListSelectionCheckbox(\n {key: item.key},\n state\n );\n\n let buttonProps = state.selectionManager.disabledBehavior === 'all' && states.isDisabled ? {isDisabled: true} : {};\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!({key: item.key, hasDragButton: true}, dragState);\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!({\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n }, dropState, dropIndicatorRef);\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListItem',\n values: {\n ...states,\n isHovered,\n isFocusVisible,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n id: item.key,\n state\n }\n });\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current) {\n console.warn('Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.');\n }\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn('A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.');\n }\n }, [item.textValue]);\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden &&\n <div role=\"row\" style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicator?.dropIndicatorProps} ref={dropIndicatorRef} />\n </div>\n </div>\n }\n <dom.div\n {...mergeProps(DOMProps, renderProps, rowProps, focusProps, hoverProps, draggableItem?.dragProps)}\n ref={ref}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-pressed={states.isPressed || undefined}\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={state.selectionManager.selectionMode === 'none' ? undefined : state.selectionManager.selectionMode}>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [CheckboxContext, {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }],\n [ButtonContext, {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }],\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {},\n description: descriptionProps\n }\n }],\n [CollectionRendererContext, DefaultCollectionRenderer],\n [ListStateContext, null],\n [SelectableCollectionContext, null],\n [FieldInputContext, null],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n});\n\nfunction GridListDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <GridListDropIndicatorForwardRef {...props} dropIndicatorProps={dropIndicatorProps} isDropTarget={isDropTarget} buttonRef={buttonRef} ref={ref} />\n );\n}\n\ninterface GridListDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>,\n isDropTarget: boolean,\n buttonRef: RefObject<HTMLDivElement | null>\n}\n\nfunction GridListDropIndicator(props: GridListDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {\n dropIndicatorProps,\n isDropTarget,\n buttonRef,\n ...otherProps\n } = props;\n\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst GridListDropIndicatorForwardRef = forwardRef(GridListDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!({\n target: {type: 'root'}\n }, dropState!, ref);\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListLoadMoreItemProps extends Omit<LoadMoreSentinelProps, 'collection'>, StyleProps, DOMRenderProps<'div', undefined>, GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-GridListLoadMoreItem'\n */\n className?: string,\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode,\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean\n}\n\nexport const GridListLoadMoreItem = createLeafComponent(LoaderNode, function GridListLoadingIndicator(props: GridListLoadMoreItemProps, ref: ForwardedRef<HTMLDivElement>, item: Node<object>) {\n let state = useContext(ListStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(() => ({\n onLoadMore,\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }), [onLoadMore, scrollOffset, state?.collection]);\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListLoadingIndicator',\n values: undefined\n });\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)} >\n <div data-testid=\"loadMoreSentinel\" ref={sentinelRef} style={{position: 'absolute', height: 1, width: 1}} />\n </div>\n {isLoading && renderProps.children && (\n <dom.div\n {...renderProps}\n {...filterDOMProps(props, {global: true})}\n role=\"row\"\n ref={ref}>\n <div\n aria-colindex={isVirtualized ? 1 : undefined}\n role=\"gridcell\">\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n});\n\nexport interface GridListSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-GridListSection'\n */\n className?: string\n}\n\n/**\n * A GridListSection represents a section within a GridList.\n */\nexport const GridListSection = /*#__PURE__*/ createBranchComponent(SectionNode, <T extends object>(props: GridListSectionProps<T>, ref: ForwardedRef<HTMLDivElement>, item: Node<T>) => {\n let state = useContext(ListStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection({\n 'aria-label': props['aria-label'] ?? undefined\n }, state, ref);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-GridListSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div\n {...mergeProps(DOMProps, renderProps, rowGroupProps)}\n ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch\n collection={state.collection}\n parent={item} />\n </Provider>\n </dom.div>\n );\n});\n\nexport interface GridListHeaderProps extends DOMRenderProps<'div', undefined>, DOMProps, GlobalDOMAttributes<HTMLElement> {}\n\nexport const GridListHeaderContext = createContext<ContextValue<GridListHeaderProps, HTMLDivElement>>({});\nexport const GridListHeaderInnerContext = createContext<HTMLAttributes<HTMLElement> | null>(null);\n\nexport const GridListHeader = /*#__PURE__*/ createLeafComponent(HeaderNode, function Header(props: GridListHeaderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, GridListHeaderContext);\n let rowHeaderProps = useContext(GridListHeaderInnerContext);\n\n return (\n <dom.div render={props.render} className=\"react-aria-GridListHeader\" ref={ref} {...props}>\n <div {...rowHeaderProps} style={{display: 'contents'}}>\n {props.children}\n </div>\n </dom.div>\n );\n});\n"],"names":[],"version":3,"file":"GridList.cjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsMM,MAAM,0DACX,CAAA,GAAA,0BAAY,EAAoD;AAM3D,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,SAC5E,KAAuB,EACvB,GAAiC;IAEjC,+FAA+F;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,qBACE,0DAAC,CAAA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AC;AACI,MAAM,0DAA6B,CAAA,GAAA,0BAAY,EAAsC;AAErF,MAAM,4CAAiB,WAAW,GAAG,CAAA,GAAA,qDAAkB,EAC5D,CAAA,GAAA,2DAAS,GACT,SAAS,OAAO,KAA0B,EAAE,GAAiC;IAC3E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,iBAAiB,CAAA,GAAA,uBAAS,EAAE;IAEhC,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QAAC,QAAQ,MAAM,MAAM;QAAE,WAAU;QAA4B,KAAK;QAAM,GAAG,KAAK;qBACtF,0DAAC;QAAK,GAAG,cAAc;QAAE,OAAO;YAAC,SAAS;QAAU;OACjD,MAAM,QAAQ;AAIvB","sources":["packages/react-aria-components/src/GridList.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 */\nimport {\n AriaGridListProps,\n useGridList,\n useGridListItem,\n useGridListSection,\n useGridListSelectionCheckbox\n} from 'react-aria/useGridList';\n\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n DropIndicatorProps,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {DragPreviewRenderer} from '@react-types/shared';\nimport {DropIndicatorAria, DroppableCollectionResult} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {\n FieldInputContext,\n SelectableCollectionContext,\n SelectableCollectionContextValue\n} from './Autocomplete';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n Orientation,\n PressEvents,\n RefObject\n} from '@react-types/shared';\nimport {\n HeaderNode,\n ItemNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {Collection as ICollection, Node, SelectionBehavior} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {ListState, UNSTABLE_useFilteredListState, useListState} from 'react-stately/useListState';\nimport {ListStateContext} from './ListBox';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface GridListRenderProps {\n /**\n * Whether the list has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the grid list is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the grid list is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the grid list is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @selector [data-layout=\"stack | grid\"]\n */\n layout: 'stack' | 'grid';\n /**\n * The primary orientation of the items.\n *\n * @selector [data-orientation=\"vertical | horizontal\"]\n */\n orientation: Orientation;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListProps<T>\n extends\n Omit<AriaGridListProps<T>, 'children'>,\n CollectionProps<T>,\n StyleRenderProps<GridListRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridList'\n */\n className?: ClassNameOrFunction<GridListRenderProps>;\n /**\n * Whether typeahead navigation is disabled.\n *\n * @default false\n */\n disallowTypeAhead?: boolean;\n /**\n * How multiple selection should behave in the collection.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the GridList.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: GridListRenderProps) => ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'stack'\n */\n layout?: 'stack' | 'grid';\n /**\n * The primary orientation of the items. Usually this is the direction that the collection\n * scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n}\n\nexport const GridListContext =\n createContext<ContextValue<GridListProps<any>, HTMLDivElement>>(null);\n\n/**\n * A grid list displays a list of interactive items, with support for keyboard navigation,\n * single or multiple selection, and row actions.\n */\nexport const GridList = /*#__PURE__*/ (forwardRef as forwardRefType)(function GridList<T>(\n props: GridListProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, GridListContext);\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => <GridListInner props={props} collection={collection} gridListRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface GridListInnerProps<T> {\n props: GridListProps<T> & SelectableCollectionContextValue<T>;\n collection: ICollection<Node<any>>;\n gridListRef: RefObject<HTMLElement | null>;\n}\n\nfunction GridListInner<T>({props, collection, gridListRef: ref}: GridListInnerProps<T>) {\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {shouldUseVirtualFocus, filter, disallowTypeAhead, ...DOMCollectionProps} = props;\n let {\n dragAndDropHooks,\n keyboardNavigationBehavior = 'arrow',\n layout = 'stack',\n orientation = 'vertical'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n let gridlistState = useListState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n layoutDelegate\n });\n\n let filteredState = UNSTABLE_useFilteredListState(gridlistState as ListState<T>, filter);\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let {disabledBehavior, disabledKeys} = filteredState.selectionManager;\n let {direction} = useLocale();\n let keyboardDelegate = useMemo(\n () =>\n new ListKeyboardDelegate({\n collection: filteredState.collection,\n collator,\n ref,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n layout,\n orientation,\n direction\n }),\n [\n filteredState.collection,\n ref,\n layout,\n orientation,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n collator,\n direction\n ]\n );\n\n let {gridProps} = useGridList(\n {\n ...DOMCollectionProps,\n keyboardDelegate,\n // Only tab navigation is supported in grid layout.\n keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,\n isVirtualized,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n disallowTypeAhead\n },\n filteredState,\n ref\n );\n\n let selectionManager = filteredState.selectionManager;\n let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isListDraggable);\n let dropHooksProvided = useRef(isListDroppable);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== isListDraggable) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== isListDroppable) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [isListDraggable, isListDroppable]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (isListDraggable && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n if (isListDroppable && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {\n layout,\n direction,\n orientation\n });\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let isEmpty = filteredState.collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n orientation,\n isEmpty,\n isFocused,\n isFocusVisible,\n layout,\n state: filteredState\n };\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-GridList',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n let emptyStatePropOverrides: HTMLAttributes<HTMLElement> | null = null;\n\n if (isEmpty && props.renderEmptyState) {\n let content = props.renderEmptyState(renderValues);\n emptyState = (\n <div role=\"row\" aria-rowindex={1} style={{display: 'contents'}}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps,\n emptyStatePropOverrides\n )}\n ref={ref as RefObject<HTMLDivElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-drop-target={isRootDropTarget || undefined}\n data-empty={isEmpty || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-layout={layout}\n data-orientation={orientation}>\n <Provider\n values={[\n [ListStateContext, filteredState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: GridListDropIndicatorWrapper}]\n ]}>\n {isListDroppable && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n {dragPreview}\n </dom.div>\n </FocusScope>\n );\n}\n\nexport interface GridListItemRenderProps extends ItemRenderProps {\n /** The unique id of the item. */\n id?: Key;\n /**\n * Whether the item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListItemProps<T = object>\n extends\n RenderProps<GridListItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridListItem'\n */\n className?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The unique id of the item. */\n id?: Key;\n /**\n * The object value that this item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the item's contents, used for features like typeahead. */\n textValue?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on the item. The exact user event depends\n * on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n}\n\n/**\n * A GridListItem represents an individual item in a GridList.\n */\nexport const GridListItem = /*#__PURE__*/ createLeafComponent(ItemNode, function GridListItem<\n T\n>(props: GridListItemProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let state = useContext(ListStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n let {isVirtualized} = useContext(CollectionRendererContext);\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n let {rowProps, gridCellProps, descriptionProps, ...states} = useGridListItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n },\n state,\n ref\n );\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: item.props.onHoverStart,\n onHoverChange: item.props.onHoverChange,\n onHoverEnd: item.props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let buttonProps =\n state.selectionManager.disabledBehavior === 'all' && states.isDisabled\n ? {isDisabled: true}\n : {};\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListItem',\n values: {\n ...states,\n isHovered,\n isFocusVisible,\n isFocusVisibleWithin,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n id: item.key,\n state\n }\n });\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current) {\n console.warn(\n 'Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div role=\"row\" style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator?.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n rowProps,\n focusProps,\n focusWithinProps,\n hoverProps,\n draggableItem?.dragProps\n )}\n ref={ref}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}\n data-pressed={states.isPressed || undefined}\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: descriptionProps\n }\n }\n ],\n [CollectionRendererContext, DefaultCollectionRenderer],\n [ListStateContext, null],\n [SelectableCollectionContext, null],\n [FieldInputContext, null],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n});\n\nfunction GridListDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <GridListDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n buttonRef={buttonRef}\n ref={ref}\n />\n );\n}\n\ninterface GridListDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction GridListDropIndicator(props: GridListDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, ...otherProps} = props;\n\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst GridListDropIndicatorForwardRef = forwardRef(GridListDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, 'collection'>,\n StyleProps,\n DOMRenderProps<'div', undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListLoadMoreItem'\n */\n className?: string;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const GridListLoadMoreItem = createLeafComponent(\n LoaderNode,\n function GridListLoadingIndicator(\n props: GridListLoadMoreItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<object>\n ) {\n let state = useContext(ListStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({\n onLoadMore,\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }),\n [onLoadMore, scrollOffset, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListLoadingIndicator',\n values: undefined\n });\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div {...renderProps} {...filterDOMProps(props, {global: true})} role=\"row\" ref={ref}>\n <div aria-colindex={isVirtualized ? 1 : undefined} role=\"gridcell\">\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n }\n);\n\nexport interface GridListSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListSection'\n */\n className?: string;\n}\n\n/**\n * A GridListSection represents a section within a GridList.\n */\nexport const GridListSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(\n props: GridListSectionProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<T>\n ) => {\n let state = useContext(ListStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-GridListSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport interface GridListHeaderProps\n extends DOMRenderProps<'div', undefined>, DOMProps, GlobalDOMAttributes<HTMLElement> {}\n\nexport const GridListHeaderContext = createContext<\n ContextValue<GridListHeaderProps, HTMLDivElement>\n>({});\nexport const GridListHeaderInnerContext = createContext<HTMLAttributes<HTMLElement> | null>(null);\n\nexport const GridListHeader = /*#__PURE__*/ createLeafComponent(\n HeaderNode,\n function Header(props: GridListHeaderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, GridListHeaderContext);\n let rowHeaderProps = useContext(GridListHeaderInnerContext);\n\n return (\n <dom.div render={props.render} className=\"react-aria-GridListHeader\" ref={ref} {...props}>\n <div {...rowHeaderProps} style={{display: 'contents'}}>\n {props.children}\n </div>\n </dom.div>\n );\n }\n);\n"],"names":[],"version":3,"file":"GridList.cjs.map"}
|