react-aria 3.49.0 → 3.51.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/index.cjs +15 -0
- package/dist/exports/index.cjs.map +1 -1
- package/dist/exports/index.js +9 -1
- package/dist/exports/index.js.map +1 -1
- package/dist/exports/index.mjs +9 -1
- package/dist/exports/index.mjs.map +1 -1
- package/dist/exports/private/utils/domHelpers.cjs +1 -0
- package/dist/exports/private/utils/domHelpers.cjs.map +1 -1
- package/dist/exports/private/utils/domHelpers.js +2 -2
- package/dist/exports/private/utils/domHelpers.js.map +1 -1
- package/dist/exports/private/utils/domHelpers.mjs +2 -2
- package/dist/exports/private/utils/domHelpers.mjs.map +1 -1
- package/dist/exports/private/utils/platform.cjs +1 -0
- package/dist/exports/private/utils/platform.cjs.map +1 -1
- package/dist/exports/private/utils/platform.js +2 -2
- package/dist/exports/private/utils/platform.js.map +1 -1
- package/dist/exports/private/utils/platform.mjs +2 -2
- package/dist/exports/private/utils/platform.mjs.map +1 -1
- package/dist/exports/private/utils/shadowdom/DOMFunctions.cjs +1 -0
- package/dist/exports/private/utils/shadowdom/DOMFunctions.cjs.map +1 -1
- package/dist/exports/private/utils/shadowdom/DOMFunctions.js +2 -2
- package/dist/exports/private/utils/shadowdom/DOMFunctions.js.map +1 -1
- package/dist/exports/private/utils/shadowdom/DOMFunctions.mjs +2 -2
- package/dist/exports/private/utils/shadowdom/DOMFunctions.mjs.map +1 -1
- package/dist/exports/useContextMenu.cjs +22 -0
- package/dist/exports/useContextMenu.cjs.map +1 -0
- package/dist/exports/useContextMenu.js +17 -0
- package/dist/exports/useContextMenu.js.map +1 -0
- package/dist/exports/useContextMenu.mjs +17 -0
- package/dist/exports/useContextMenu.mjs.map +1 -0
- package/dist/exports/usePreviewTrigger.cjs +22 -0
- package/dist/exports/usePreviewTrigger.cjs.map +1 -0
- package/dist/exports/usePreviewTrigger.js +17 -0
- package/dist/exports/usePreviewTrigger.js.map +1 -0
- package/dist/exports/usePreviewTrigger.mjs +17 -0
- package/dist/exports/usePreviewTrigger.mjs.map +1 -0
- package/dist/exports/useTokenField.cjs +27 -0
- package/dist/exports/useTokenField.cjs.map +1 -0
- package/dist/exports/useTokenField.js +19 -0
- package/dist/exports/useTokenField.js.map +1 -0
- package/dist/exports/useTokenField.mjs +19 -0
- package/dist/exports/useTokenField.mjs.map +1 -0
- package/dist/private/actiongroup/useActionGroup.cjs +24 -19
- package/dist/private/actiongroup/useActionGroup.cjs.map +1 -1
- package/dist/private/actiongroup/useActionGroup.js +24 -19
- package/dist/private/actiongroup/useActionGroup.js.map +1 -1
- package/dist/private/actiongroup/useActionGroup.mjs +24 -19
- package/dist/private/actiongroup/useActionGroup.mjs.map +1 -1
- package/dist/private/autocomplete/useAutocomplete.cjs +18 -8
- package/dist/private/autocomplete/useAutocomplete.cjs.map +1 -1
- package/dist/private/autocomplete/useAutocomplete.js +18 -8
- package/dist/private/autocomplete/useAutocomplete.js.map +1 -1
- package/dist/private/autocomplete/useAutocomplete.mjs +18 -8
- package/dist/private/autocomplete/useAutocomplete.mjs.map +1 -1
- package/dist/private/breadcrumbs/useBreadcrumbItem.cjs +2 -0
- package/dist/private/breadcrumbs/useBreadcrumbItem.cjs.map +1 -1
- package/dist/private/breadcrumbs/useBreadcrumbItem.js +2 -0
- package/dist/private/breadcrumbs/useBreadcrumbItem.js.map +1 -1
- package/dist/private/breadcrumbs/useBreadcrumbItem.mjs +2 -0
- package/dist/private/breadcrumbs/useBreadcrumbItem.mjs.map +1 -1
- package/dist/private/breadcrumbs/useBreadcrumbs.cjs.map +1 -1
- package/dist/private/breadcrumbs/useBreadcrumbs.js.map +1 -1
- package/dist/private/breadcrumbs/useBreadcrumbs.mjs.map +1 -1
- package/dist/private/button/useButton.cjs +2 -1
- package/dist/private/button/useButton.cjs.map +1 -1
- package/dist/private/button/useButton.js +2 -1
- package/dist/private/button/useButton.js.map +1 -1
- package/dist/private/button/useButton.mjs +2 -1
- package/dist/private/button/useButton.mjs.map +1 -1
- package/dist/private/button/useToggleButtonGroup.cjs +3 -0
- package/dist/private/button/useToggleButtonGroup.cjs.map +1 -1
- package/dist/private/button/useToggleButtonGroup.js +3 -0
- package/dist/private/button/useToggleButtonGroup.js.map +1 -1
- package/dist/private/button/useToggleButtonGroup.mjs +3 -0
- package/dist/private/button/useToggleButtonGroup.mjs.map +1 -1
- package/dist/private/calendar/useCalendarBase.cjs.map +1 -1
- package/dist/private/calendar/useCalendarBase.js.map +1 -1
- package/dist/private/calendar/useCalendarBase.mjs.map +1 -1
- package/dist/private/calendar/useCalendarCell.cjs +3 -0
- package/dist/private/calendar/useCalendarCell.cjs.map +1 -1
- package/dist/private/calendar/useCalendarCell.js +3 -0
- package/dist/private/calendar/useCalendarCell.js.map +1 -1
- package/dist/private/calendar/useCalendarCell.mjs +3 -0
- package/dist/private/calendar/useCalendarCell.mjs.map +1 -1
- package/dist/private/calendar/useCalendarGrid.cjs +47 -52
- package/dist/private/calendar/useCalendarGrid.cjs.map +1 -1
- package/dist/private/calendar/useCalendarGrid.js +47 -52
- package/dist/private/calendar/useCalendarGrid.js.map +1 -1
- package/dist/private/calendar/useCalendarGrid.mjs +47 -52
- package/dist/private/calendar/useCalendarGrid.mjs.map +1 -1
- package/dist/private/calendar/useCalendarYearPicker.cjs +4 -4
- package/dist/private/calendar/useCalendarYearPicker.cjs.map +1 -1
- package/dist/private/calendar/useCalendarYearPicker.js +4 -4
- package/dist/private/calendar/useCalendarYearPicker.js.map +1 -1
- package/dist/private/calendar/useCalendarYearPicker.mjs +4 -4
- package/dist/private/calendar/useCalendarYearPicker.mjs.map +1 -1
- package/dist/private/calendar/useRangeCalendar.cjs +1 -0
- package/dist/private/calendar/useRangeCalendar.cjs.map +1 -1
- package/dist/private/calendar/useRangeCalendar.js +1 -0
- package/dist/private/calendar/useRangeCalendar.js.map +1 -1
- package/dist/private/calendar/useRangeCalendar.mjs +1 -0
- package/dist/private/calendar/useRangeCalendar.mjs.map +1 -1
- package/dist/private/calendar/utils.cjs.map +1 -1
- package/dist/private/calendar/utils.js.map +1 -1
- package/dist/private/calendar/utils.mjs.map +1 -1
- package/dist/private/collections/CollectionBuilder.cjs +8 -3
- package/dist/private/collections/CollectionBuilder.cjs.map +1 -1
- package/dist/private/collections/CollectionBuilder.js +8 -3
- package/dist/private/collections/CollectionBuilder.js.map +1 -1
- package/dist/private/collections/CollectionBuilder.mjs +8 -3
- package/dist/private/collections/CollectionBuilder.mjs.map +1 -1
- package/dist/private/collections/Document.cjs +4 -0
- package/dist/private/collections/Document.cjs.map +1 -1
- package/dist/private/collections/Document.js +4 -0
- package/dist/private/collections/Document.js.map +1 -1
- package/dist/private/collections/Document.mjs +4 -0
- package/dist/private/collections/Document.mjs.map +1 -1
- package/dist/private/collections/Hidden.cjs +1 -0
- package/dist/private/collections/Hidden.cjs.map +1 -1
- package/dist/private/collections/Hidden.js +1 -0
- package/dist/private/collections/Hidden.js.map +1 -1
- package/dist/private/collections/Hidden.mjs +1 -0
- package/dist/private/collections/Hidden.mjs.map +1 -1
- package/dist/private/collections/useCachedChildren.cjs +1 -0
- package/dist/private/collections/useCachedChildren.cjs.map +1 -1
- package/dist/private/collections/useCachedChildren.js +1 -0
- package/dist/private/collections/useCachedChildren.js.map +1 -1
- package/dist/private/collections/useCachedChildren.mjs +1 -0
- package/dist/private/collections/useCachedChildren.mjs.map +1 -1
- package/dist/private/color/useColorArea.cjs +31 -34
- package/dist/private/color/useColorArea.cjs.map +1 -1
- package/dist/private/color/useColorArea.js +31 -34
- package/dist/private/color/useColorArea.js.map +1 -1
- package/dist/private/color/useColorArea.mjs +31 -34
- package/dist/private/color/useColorArea.mjs.map +1 -1
- package/dist/private/color/useColorSlider.cjs +4 -2
- package/dist/private/color/useColorSlider.cjs.map +1 -1
- package/dist/private/color/useColorSlider.js +4 -2
- package/dist/private/color/useColorSlider.js.map +1 -1
- package/dist/private/color/useColorSlider.mjs +4 -2
- package/dist/private/color/useColorSlider.mjs.map +1 -1
- package/dist/private/color/useColorSwatch.cjs.map +1 -1
- package/dist/private/color/useColorSwatch.js.map +1 -1
- package/dist/private/color/useColorSwatch.mjs.map +1 -1
- package/dist/private/color/useColorWheel.cjs +16 -23
- package/dist/private/color/useColorWheel.cjs.map +1 -1
- package/dist/private/color/useColorWheel.js +16 -23
- package/dist/private/color/useColorWheel.js.map +1 -1
- package/dist/private/color/useColorWheel.mjs +16 -23
- package/dist/private/color/useColorWheel.mjs.map +1 -1
- package/dist/private/combobox/useComboBox.cjs +93 -28
- package/dist/private/combobox/useComboBox.cjs.map +1 -1
- package/dist/private/combobox/useComboBox.js +94 -28
- package/dist/private/combobox/useComboBox.js.map +1 -1
- package/dist/private/combobox/useComboBox.mjs +93 -28
- package/dist/private/combobox/useComboBox.mjs.map +1 -1
- package/dist/private/datepicker/useDateField.cjs +3 -6
- package/dist/private/datepicker/useDateField.cjs.map +1 -1
- package/dist/private/datepicker/useDateField.js +3 -6
- package/dist/private/datepicker/useDateField.js.map +1 -1
- package/dist/private/datepicker/useDateField.mjs +3 -6
- package/dist/private/datepicker/useDateField.mjs.map +1 -1
- package/dist/private/datepicker/useDatePicker.cjs.map +1 -1
- package/dist/private/datepicker/useDatePicker.js.map +1 -1
- package/dist/private/datepicker/useDatePicker.mjs.map +1 -1
- package/dist/private/datepicker/useDatePickerGroup.cjs +48 -27
- package/dist/private/datepicker/useDatePickerGroup.cjs.map +1 -1
- package/dist/private/datepicker/useDatePickerGroup.js +49 -28
- package/dist/private/datepicker/useDatePickerGroup.js.map +1 -1
- package/dist/private/datepicker/useDatePickerGroup.mjs +49 -28
- package/dist/private/datepicker/useDatePickerGroup.mjs.map +1 -1
- package/dist/private/datepicker/useDateRangePicker.cjs.map +1 -1
- package/dist/private/datepicker/useDateRangePicker.js.map +1 -1
- package/dist/private/datepicker/useDateRangePicker.mjs.map +1 -1
- package/dist/private/datepicker/useDateSegment.cjs +21 -16
- package/dist/private/datepicker/useDateSegment.cjs.map +1 -1
- package/dist/private/datepicker/useDateSegment.js +22 -17
- package/dist/private/datepicker/useDateSegment.js.map +1 -1
- package/dist/private/datepicker/useDateSegment.mjs +22 -17
- package/dist/private/datepicker/useDateSegment.mjs.map +1 -1
- package/dist/private/datepicker/useDisplayNames.cjs +1 -2
- package/dist/private/datepicker/useDisplayNames.cjs.map +1 -1
- package/dist/private/datepicker/useDisplayNames.js +1 -2
- package/dist/private/datepicker/useDisplayNames.js.map +1 -1
- package/dist/private/datepicker/useDisplayNames.mjs +1 -2
- package/dist/private/datepicker/useDisplayNames.mjs.map +1 -1
- package/dist/private/dialog/useDialog.cjs +8 -1
- package/dist/private/dialog/useDialog.cjs.map +1 -1
- package/dist/private/dialog/useDialog.js +10 -1
- package/dist/private/dialog/useDialog.js.map +1 -1
- package/dist/private/dialog/useDialog.mjs +8 -1
- package/dist/private/dialog/useDialog.mjs.map +1 -1
- package/dist/private/dnd/DragManager.cjs +7 -2
- package/dist/private/dnd/DragManager.cjs.map +1 -1
- package/dist/private/dnd/DragManager.js +7 -2
- package/dist/private/dnd/DragManager.js.map +1 -1
- package/dist/private/dnd/DragManager.mjs +7 -2
- package/dist/private/dnd/DragManager.mjs.map +1 -1
- package/dist/private/dnd/useAutoScroll.cjs +3 -1
- package/dist/private/dnd/useAutoScroll.cjs.map +1 -1
- package/dist/private/dnd/useAutoScroll.js +3 -1
- package/dist/private/dnd/useAutoScroll.js.map +1 -1
- package/dist/private/dnd/useAutoScroll.mjs +3 -1
- package/dist/private/dnd/useAutoScroll.mjs.map +1 -1
- package/dist/private/dnd/useDrag.cjs +4 -1
- package/dist/private/dnd/useDrag.cjs.map +1 -1
- package/dist/private/dnd/useDrag.js +4 -1
- package/dist/private/dnd/useDrag.js.map +1 -1
- package/dist/private/dnd/useDrag.mjs +4 -1
- package/dist/private/dnd/useDrag.mjs.map +1 -1
- package/dist/private/dnd/useDraggableItem.cjs +4 -0
- package/dist/private/dnd/useDraggableItem.cjs.map +1 -1
- package/dist/private/dnd/useDraggableItem.js +4 -0
- package/dist/private/dnd/useDraggableItem.js.map +1 -1
- package/dist/private/dnd/useDraggableItem.mjs +4 -0
- package/dist/private/dnd/useDraggableItem.mjs.map +1 -1
- package/dist/private/dnd/useDropIndicator.cjs.map +1 -1
- package/dist/private/dnd/useDropIndicator.js.map +1 -1
- package/dist/private/dnd/useDropIndicator.mjs.map +1 -1
- package/dist/private/dnd/useDroppableCollection.cjs +4 -0
- package/dist/private/dnd/useDroppableCollection.cjs.map +1 -1
- package/dist/private/dnd/useDroppableCollection.js +4 -0
- package/dist/private/dnd/useDroppableCollection.js.map +1 -1
- package/dist/private/dnd/useDroppableCollection.mjs +4 -0
- package/dist/private/dnd/useDroppableCollection.mjs.map +1 -1
- package/dist/private/dnd/useVirtualDrop.cjs.map +1 -1
- package/dist/private/dnd/useVirtualDrop.js.map +1 -1
- package/dist/private/dnd/useVirtualDrop.mjs.map +1 -1
- package/dist/private/dnd/utils.cjs +13 -3
- package/dist/private/dnd/utils.cjs.map +1 -1
- package/dist/private/dnd/utils.js +13 -3
- package/dist/private/dnd/utils.js.map +1 -1
- package/dist/private/dnd/utils.mjs +13 -3
- package/dist/private/dnd/utils.mjs.map +1 -1
- package/dist/private/focus/FocusScope.cjs +5 -3
- package/dist/private/focus/FocusScope.cjs.map +1 -1
- package/dist/private/focus/FocusScope.js +5 -4
- package/dist/private/focus/FocusScope.js.map +1 -1
- package/dist/private/focus/FocusScope.mjs +5 -3
- package/dist/private/focus/FocusScope.mjs.map +1 -1
- package/dist/private/focus/useFocusRing.cjs +2 -1
- package/dist/private/focus/useFocusRing.cjs.map +1 -1
- package/dist/private/focus/useFocusRing.js +2 -1
- package/dist/private/focus/useFocusRing.js.map +1 -1
- package/dist/private/focus/useFocusRing.mjs +2 -1
- package/dist/private/focus/useFocusRing.mjs.map +1 -1
- package/dist/private/form/useFormValidation.cjs +7 -1
- package/dist/private/form/useFormValidation.cjs.map +1 -1
- package/dist/private/form/useFormValidation.js +7 -1
- package/dist/private/form/useFormValidation.js.map +1 -1
- package/dist/private/form/useFormValidation.mjs +7 -1
- package/dist/private/form/useFormValidation.mjs.map +1 -1
- package/dist/private/grid/useGrid.cjs +3 -2
- package/dist/private/grid/useGrid.cjs.map +1 -1
- package/dist/private/grid/useGrid.js +3 -2
- package/dist/private/grid/useGrid.js.map +1 -1
- package/dist/private/grid/useGrid.mjs +3 -2
- package/dist/private/grid/useGrid.mjs.map +1 -1
- package/dist/private/grid/useGridCell.cjs +44 -8
- package/dist/private/grid/useGridCell.cjs.map +1 -1
- package/dist/private/grid/useGridCell.js +44 -8
- package/dist/private/grid/useGridCell.js.map +1 -1
- package/dist/private/grid/useGridCell.mjs +44 -8
- package/dist/private/grid/useGridCell.mjs.map +1 -1
- package/dist/private/grid/useGridSelectionAnnouncement.cjs.map +1 -1
- package/dist/private/grid/useGridSelectionAnnouncement.js.map +1 -1
- package/dist/private/grid/useGridSelectionAnnouncement.mjs.map +1 -1
- package/dist/private/grid/useGridSelectionCheckbox.cjs.map +1 -1
- package/dist/private/grid/useGridSelectionCheckbox.js.map +1 -1
- package/dist/private/grid/useGridSelectionCheckbox.mjs.map +1 -1
- package/dist/private/grid/useHighlightSelectionDescription.cjs.map +1 -1
- package/dist/private/grid/useHighlightSelectionDescription.js.map +1 -1
- package/dist/private/grid/useHighlightSelectionDescription.mjs.map +1 -1
- package/dist/private/grid/utils.cjs.map +1 -1
- package/dist/private/grid/utils.js.map +1 -1
- package/dist/private/grid/utils.mjs.map +1 -1
- package/dist/private/gridlist/useGridList.cjs +2 -1
- package/dist/private/gridlist/useGridList.cjs.map +1 -1
- package/dist/private/gridlist/useGridList.js +2 -1
- package/dist/private/gridlist/useGridList.js.map +1 -1
- package/dist/private/gridlist/useGridList.mjs +2 -1
- package/dist/private/gridlist/useGridList.mjs.map +1 -1
- package/dist/private/gridlist/useGridListItem.cjs +74 -25
- package/dist/private/gridlist/useGridListItem.cjs.map +1 -1
- package/dist/private/gridlist/useGridListItem.js +75 -26
- package/dist/private/gridlist/useGridListItem.js.map +1 -1
- package/dist/private/gridlist/useGridListItem.mjs +74 -25
- package/dist/private/gridlist/useGridListItem.mjs.map +1 -1
- package/dist/private/interactions/PressResponder.cjs +1 -0
- package/dist/private/interactions/PressResponder.cjs.map +1 -1
- package/dist/private/interactions/PressResponder.js +1 -0
- package/dist/private/interactions/PressResponder.js.map +1 -1
- package/dist/private/interactions/PressResponder.mjs +1 -0
- package/dist/private/interactions/PressResponder.mjs.map +1 -1
- package/dist/private/interactions/Pressable.cjs +1 -0
- package/dist/private/interactions/Pressable.cjs.map +1 -1
- package/dist/private/interactions/Pressable.js +1 -0
- package/dist/private/interactions/Pressable.js.map +1 -1
- package/dist/private/interactions/Pressable.mjs +1 -0
- package/dist/private/interactions/Pressable.mjs.map +1 -1
- package/dist/private/interactions/createEventHandler.cjs +6 -2
- package/dist/private/interactions/createEventHandler.cjs.map +1 -1
- package/dist/private/interactions/createEventHandler.js +6 -2
- package/dist/private/interactions/createEventHandler.js.map +1 -1
- package/dist/private/interactions/createEventHandler.mjs +6 -2
- package/dist/private/interactions/createEventHandler.mjs.map +1 -1
- package/dist/private/interactions/createKeyboardShortcutHandler.cjs +130 -0
- package/dist/private/interactions/createKeyboardShortcutHandler.cjs.map +1 -0
- package/dist/private/interactions/createKeyboardShortcutHandler.js +125 -0
- package/dist/private/interactions/createKeyboardShortcutHandler.js.map +1 -0
- package/dist/private/interactions/createKeyboardShortcutHandler.mjs +125 -0
- package/dist/private/interactions/createKeyboardShortcutHandler.mjs.map +1 -0
- package/dist/private/interactions/textSelection.cjs +2 -2
- package/dist/private/interactions/textSelection.cjs.map +1 -1
- package/dist/private/interactions/textSelection.js +3 -3
- package/dist/private/interactions/textSelection.js.map +1 -1
- package/dist/private/interactions/textSelection.mjs +3 -3
- package/dist/private/interactions/textSelection.mjs.map +1 -1
- package/dist/private/interactions/useContextMenu.cjs +104 -0
- package/dist/private/interactions/useContextMenu.cjs.map +1 -0
- package/dist/private/interactions/useContextMenu.js +99 -0
- package/dist/private/interactions/useContextMenu.js.map +1 -0
- package/dist/private/interactions/useContextMenu.mjs +99 -0
- package/dist/private/interactions/useContextMenu.mjs.map +1 -0
- package/dist/private/interactions/useFocusVisible.cjs +18 -7
- package/dist/private/interactions/useFocusVisible.cjs.map +1 -1
- package/dist/private/interactions/useFocusVisible.js +18 -7
- package/dist/private/interactions/useFocusVisible.js.map +1 -1
- package/dist/private/interactions/useFocusVisible.mjs +18 -7
- package/dist/private/interactions/useFocusVisible.mjs.map +1 -1
- package/dist/private/interactions/useFocusable.cjs +1 -0
- package/dist/private/interactions/useFocusable.cjs.map +1 -1
- package/dist/private/interactions/useFocusable.js +1 -0
- package/dist/private/interactions/useFocusable.js.map +1 -1
- package/dist/private/interactions/useFocusable.mjs +1 -0
- package/dist/private/interactions/useFocusable.mjs.map +1 -1
- package/dist/private/interactions/useHover.cjs +2 -1
- package/dist/private/interactions/useHover.cjs.map +1 -1
- package/dist/private/interactions/useHover.js +2 -1
- package/dist/private/interactions/useHover.js.map +1 -1
- package/dist/private/interactions/useHover.mjs +2 -1
- package/dist/private/interactions/useHover.mjs.map +1 -1
- package/dist/private/interactions/useKeyboard.cjs +46 -2
- package/dist/private/interactions/useKeyboard.cjs.map +1 -1
- package/dist/private/interactions/useKeyboard.js +48 -2
- package/dist/private/interactions/useKeyboard.js.map +1 -1
- package/dist/private/interactions/useKeyboard.mjs +46 -2
- package/dist/private/interactions/useKeyboard.mjs.map +1 -1
- package/dist/private/interactions/useLongPress.cjs +22 -22
- package/dist/private/interactions/useLongPress.cjs.map +1 -1
- package/dist/private/interactions/useLongPress.js +22 -22
- package/dist/private/interactions/useLongPress.js.map +1 -1
- package/dist/private/interactions/useLongPress.mjs +22 -22
- package/dist/private/interactions/useLongPress.mjs.map +1 -1
- package/dist/private/interactions/useMove.cjs +1 -8
- package/dist/private/interactions/useMove.cjs.map +1 -1
- package/dist/private/interactions/useMove.js +1 -8
- package/dist/private/interactions/useMove.js.map +1 -1
- package/dist/private/interactions/useMove.mjs +1 -8
- package/dist/private/interactions/useMove.mjs.map +1 -1
- package/dist/private/interactions/usePress.cjs +18 -33
- package/dist/private/interactions/usePress.cjs.map +1 -1
- package/dist/private/interactions/usePress.js +18 -33
- package/dist/private/interactions/usePress.js.map +1 -1
- package/dist/private/interactions/usePress.mjs +18 -33
- package/dist/private/interactions/usePress.mjs.map +1 -1
- package/dist/private/interactions/utils.cjs +10 -10
- package/dist/private/interactions/utils.cjs.map +1 -1
- package/dist/private/interactions/utils.js +10 -10
- package/dist/private/interactions/utils.js.map +1 -1
- package/dist/private/interactions/utils.mjs +10 -10
- package/dist/private/interactions/utils.mjs.map +1 -1
- package/dist/private/intl/combobox/fi-FI.cjs +5 -5
- package/dist/private/intl/combobox/fi-FI.cjs.map +1 -1
- package/dist/private/intl/combobox/fi-FI.js +5 -5
- package/dist/private/intl/combobox/fi-FI.js.map +1 -1
- package/dist/private/intl/combobox/fi-FI.mjs +5 -5
- package/dist/private/intl/combobox/fi-FI.mjs.map +1 -1
- package/dist/private/intl/previewtrigger/ar-AE.cjs +6 -0
- package/dist/private/intl/previewtrigger/ar-AE.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/ar-AE.js +8 -0
- package/dist/private/intl/previewtrigger/ar-AE.js.map +1 -0
- package/dist/private/intl/previewtrigger/ar-AE.mjs +8 -0
- package/dist/private/intl/previewtrigger/ar-AE.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/bg-BG.cjs +6 -0
- package/dist/private/intl/previewtrigger/bg-BG.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/bg-BG.js +8 -0
- package/dist/private/intl/previewtrigger/bg-BG.js.map +1 -0
- package/dist/private/intl/previewtrigger/bg-BG.mjs +8 -0
- package/dist/private/intl/previewtrigger/bg-BG.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/cs-CZ.cjs +6 -0
- package/dist/private/intl/previewtrigger/cs-CZ.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/cs-CZ.js +8 -0
- package/dist/private/intl/previewtrigger/cs-CZ.js.map +1 -0
- package/dist/private/intl/previewtrigger/cs-CZ.mjs +8 -0
- package/dist/private/intl/previewtrigger/cs-CZ.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/da-DK.cjs +6 -0
- package/dist/private/intl/previewtrigger/da-DK.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/da-DK.js +8 -0
- package/dist/private/intl/previewtrigger/da-DK.js.map +1 -0
- package/dist/private/intl/previewtrigger/da-DK.mjs +8 -0
- package/dist/private/intl/previewtrigger/da-DK.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/de-DE.cjs +6 -0
- package/dist/private/intl/previewtrigger/de-DE.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/de-DE.js +8 -0
- package/dist/private/intl/previewtrigger/de-DE.js.map +1 -0
- package/dist/private/intl/previewtrigger/de-DE.mjs +8 -0
- package/dist/private/intl/previewtrigger/de-DE.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/el-GR.cjs +6 -0
- package/dist/private/intl/previewtrigger/el-GR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/el-GR.js +8 -0
- package/dist/private/intl/previewtrigger/el-GR.js.map +1 -0
- package/dist/private/intl/previewtrigger/el-GR.mjs +8 -0
- package/dist/private/intl/previewtrigger/el-GR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/en-US.cjs +6 -0
- package/dist/private/intl/previewtrigger/en-US.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/en-US.js +8 -0
- package/dist/private/intl/previewtrigger/en-US.js.map +1 -0
- package/dist/private/intl/previewtrigger/en-US.mjs +8 -0
- package/dist/private/intl/previewtrigger/en-US.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/es-ES.cjs +6 -0
- package/dist/private/intl/previewtrigger/es-ES.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/es-ES.js +8 -0
- package/dist/private/intl/previewtrigger/es-ES.js.map +1 -0
- package/dist/private/intl/previewtrigger/es-ES.mjs +8 -0
- package/dist/private/intl/previewtrigger/es-ES.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/et-EE.cjs +6 -0
- package/dist/private/intl/previewtrigger/et-EE.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/et-EE.js +8 -0
- package/dist/private/intl/previewtrigger/et-EE.js.map +1 -0
- package/dist/private/intl/previewtrigger/et-EE.mjs +8 -0
- package/dist/private/intl/previewtrigger/et-EE.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/fi-FI.cjs +6 -0
- package/dist/private/intl/previewtrigger/fi-FI.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/fi-FI.js +8 -0
- package/dist/private/intl/previewtrigger/fi-FI.js.map +1 -0
- package/dist/private/intl/previewtrigger/fi-FI.mjs +8 -0
- package/dist/private/intl/previewtrigger/fi-FI.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/fr-FR.cjs +6 -0
- package/dist/private/intl/previewtrigger/fr-FR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/fr-FR.js +8 -0
- package/dist/private/intl/previewtrigger/fr-FR.js.map +1 -0
- package/dist/private/intl/previewtrigger/fr-FR.mjs +8 -0
- package/dist/private/intl/previewtrigger/fr-FR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/he-IL.cjs +6 -0
- package/dist/private/intl/previewtrigger/he-IL.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/he-IL.js +8 -0
- package/dist/private/intl/previewtrigger/he-IL.js.map +1 -0
- package/dist/private/intl/previewtrigger/he-IL.mjs +8 -0
- package/dist/private/intl/previewtrigger/he-IL.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/hr-HR.cjs +6 -0
- package/dist/private/intl/previewtrigger/hr-HR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/hr-HR.js +8 -0
- package/dist/private/intl/previewtrigger/hr-HR.js.map +1 -0
- package/dist/private/intl/previewtrigger/hr-HR.mjs +8 -0
- package/dist/private/intl/previewtrigger/hr-HR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/hu-HU.cjs +6 -0
- package/dist/private/intl/previewtrigger/hu-HU.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/hu-HU.js +8 -0
- package/dist/private/intl/previewtrigger/hu-HU.js.map +1 -0
- package/dist/private/intl/previewtrigger/hu-HU.mjs +8 -0
- package/dist/private/intl/previewtrigger/hu-HU.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/it-IT.cjs +6 -0
- package/dist/private/intl/previewtrigger/it-IT.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/it-IT.js +8 -0
- package/dist/private/intl/previewtrigger/it-IT.js.map +1 -0
- package/dist/private/intl/previewtrigger/it-IT.mjs +8 -0
- package/dist/private/intl/previewtrigger/it-IT.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/ja-JP.cjs +6 -0
- package/dist/private/intl/previewtrigger/ja-JP.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/ja-JP.js +8 -0
- package/dist/private/intl/previewtrigger/ja-JP.js.map +1 -0
- package/dist/private/intl/previewtrigger/ja-JP.mjs +8 -0
- package/dist/private/intl/previewtrigger/ja-JP.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/ko-KR.cjs +6 -0
- package/dist/private/intl/previewtrigger/ko-KR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/ko-KR.js +8 -0
- package/dist/private/intl/previewtrigger/ko-KR.js.map +1 -0
- package/dist/private/intl/previewtrigger/ko-KR.mjs +8 -0
- package/dist/private/intl/previewtrigger/ko-KR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/lt-LT.cjs +6 -0
- package/dist/private/intl/previewtrigger/lt-LT.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/lt-LT.js +8 -0
- package/dist/private/intl/previewtrigger/lt-LT.js.map +1 -0
- package/dist/private/intl/previewtrigger/lt-LT.mjs +8 -0
- package/dist/private/intl/previewtrigger/lt-LT.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/lv-LV.cjs +6 -0
- package/dist/private/intl/previewtrigger/lv-LV.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/lv-LV.js +8 -0
- package/dist/private/intl/previewtrigger/lv-LV.js.map +1 -0
- package/dist/private/intl/previewtrigger/lv-LV.mjs +8 -0
- package/dist/private/intl/previewtrigger/lv-LV.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/nb-NO.cjs +6 -0
- package/dist/private/intl/previewtrigger/nb-NO.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/nb-NO.js +8 -0
- package/dist/private/intl/previewtrigger/nb-NO.js.map +1 -0
- package/dist/private/intl/previewtrigger/nb-NO.mjs +8 -0
- package/dist/private/intl/previewtrigger/nb-NO.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/nl-NL.cjs +6 -0
- package/dist/private/intl/previewtrigger/nl-NL.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/nl-NL.js +8 -0
- package/dist/private/intl/previewtrigger/nl-NL.js.map +1 -0
- package/dist/private/intl/previewtrigger/nl-NL.mjs +8 -0
- package/dist/private/intl/previewtrigger/nl-NL.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/pl-PL.cjs +6 -0
- package/dist/private/intl/previewtrigger/pl-PL.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/pl-PL.js +8 -0
- package/dist/private/intl/previewtrigger/pl-PL.js.map +1 -0
- package/dist/private/intl/previewtrigger/pl-PL.mjs +8 -0
- package/dist/private/intl/previewtrigger/pl-PL.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/pt-BR.cjs +6 -0
- package/dist/private/intl/previewtrigger/pt-BR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/pt-BR.js +8 -0
- package/dist/private/intl/previewtrigger/pt-BR.js.map +1 -0
- package/dist/private/intl/previewtrigger/pt-BR.mjs +8 -0
- package/dist/private/intl/previewtrigger/pt-BR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/pt-PT.cjs +6 -0
- package/dist/private/intl/previewtrigger/pt-PT.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/pt-PT.js +8 -0
- package/dist/private/intl/previewtrigger/pt-PT.js.map +1 -0
- package/dist/private/intl/previewtrigger/pt-PT.mjs +8 -0
- package/dist/private/intl/previewtrigger/pt-PT.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/ro-RO.cjs +6 -0
- package/dist/private/intl/previewtrigger/ro-RO.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/ro-RO.js +8 -0
- package/dist/private/intl/previewtrigger/ro-RO.js.map +1 -0
- package/dist/private/intl/previewtrigger/ro-RO.mjs +8 -0
- package/dist/private/intl/previewtrigger/ro-RO.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/ru-RU.cjs +6 -0
- package/dist/private/intl/previewtrigger/ru-RU.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/ru-RU.js +8 -0
- package/dist/private/intl/previewtrigger/ru-RU.js.map +1 -0
- package/dist/private/intl/previewtrigger/ru-RU.mjs +8 -0
- package/dist/private/intl/previewtrigger/ru-RU.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/sk-SK.cjs +6 -0
- package/dist/private/intl/previewtrigger/sk-SK.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/sk-SK.js +8 -0
- package/dist/private/intl/previewtrigger/sk-SK.js.map +1 -0
- package/dist/private/intl/previewtrigger/sk-SK.mjs +8 -0
- package/dist/private/intl/previewtrigger/sk-SK.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/sl-SI.cjs +6 -0
- package/dist/private/intl/previewtrigger/sl-SI.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/sl-SI.js +8 -0
- package/dist/private/intl/previewtrigger/sl-SI.js.map +1 -0
- package/dist/private/intl/previewtrigger/sl-SI.mjs +8 -0
- package/dist/private/intl/previewtrigger/sl-SI.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/sr-SP.cjs +6 -0
- package/dist/private/intl/previewtrigger/sr-SP.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/sr-SP.js +8 -0
- package/dist/private/intl/previewtrigger/sr-SP.js.map +1 -0
- package/dist/private/intl/previewtrigger/sr-SP.mjs +8 -0
- package/dist/private/intl/previewtrigger/sr-SP.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/sv-SE.cjs +6 -0
- package/dist/private/intl/previewtrigger/sv-SE.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/sv-SE.js +8 -0
- package/dist/private/intl/previewtrigger/sv-SE.js.map +1 -0
- package/dist/private/intl/previewtrigger/sv-SE.mjs +8 -0
- package/dist/private/intl/previewtrigger/sv-SE.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/tr-TR.cjs +6 -0
- package/dist/private/intl/previewtrigger/tr-TR.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/tr-TR.js +8 -0
- package/dist/private/intl/previewtrigger/tr-TR.js.map +1 -0
- package/dist/private/intl/previewtrigger/tr-TR.mjs +8 -0
- package/dist/private/intl/previewtrigger/tr-TR.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/uk-UA.cjs +6 -0
- package/dist/private/intl/previewtrigger/uk-UA.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/uk-UA.js +8 -0
- package/dist/private/intl/previewtrigger/uk-UA.js.map +1 -0
- package/dist/private/intl/previewtrigger/uk-UA.mjs +8 -0
- package/dist/private/intl/previewtrigger/uk-UA.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/zh-CN.cjs +6 -0
- package/dist/private/intl/previewtrigger/zh-CN.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/zh-CN.js +8 -0
- package/dist/private/intl/previewtrigger/zh-CN.js.map +1 -0
- package/dist/private/intl/previewtrigger/zh-CN.mjs +8 -0
- package/dist/private/intl/previewtrigger/zh-CN.mjs.map +1 -0
- package/dist/private/intl/previewtrigger/zh-TW.cjs +6 -0
- package/dist/private/intl/previewtrigger/zh-TW.cjs.map +1 -0
- package/dist/private/intl/previewtrigger/zh-TW.js +8 -0
- package/dist/private/intl/previewtrigger/zh-TW.js.map +1 -0
- package/dist/private/intl/previewtrigger/zh-TW.mjs +8 -0
- package/dist/private/intl/previewtrigger/zh-TW.mjs.map +1 -0
- package/dist/private/intl/table/ar-AE.cjs +3 -3
- package/dist/private/intl/table/ar-AE.cjs.map +1 -1
- package/dist/private/intl/table/ar-AE.js +3 -3
- package/dist/private/intl/table/ar-AE.js.map +1 -1
- package/dist/private/intl/table/ar-AE.mjs +3 -3
- package/dist/private/intl/table/ar-AE.mjs.map +1 -1
- package/dist/private/intl/table/bg-BG.cjs +3 -3
- package/dist/private/intl/table/bg-BG.cjs.map +1 -1
- package/dist/private/intl/table/bg-BG.js +3 -3
- package/dist/private/intl/table/bg-BG.js.map +1 -1
- package/dist/private/intl/table/bg-BG.mjs +3 -3
- package/dist/private/intl/table/bg-BG.mjs.map +1 -1
- package/dist/private/intl/table/cs-CZ.cjs +3 -3
- package/dist/private/intl/table/cs-CZ.cjs.map +1 -1
- package/dist/private/intl/table/cs-CZ.js +3 -3
- package/dist/private/intl/table/cs-CZ.js.map +1 -1
- package/dist/private/intl/table/cs-CZ.mjs +3 -3
- package/dist/private/intl/table/cs-CZ.mjs.map +1 -1
- package/dist/private/intl/table/da-DK.cjs +3 -3
- package/dist/private/intl/table/da-DK.cjs.map +1 -1
- package/dist/private/intl/table/da-DK.js +3 -3
- package/dist/private/intl/table/da-DK.js.map +1 -1
- package/dist/private/intl/table/da-DK.mjs +3 -3
- package/dist/private/intl/table/da-DK.mjs.map +1 -1
- package/dist/private/intl/table/de-DE.cjs +3 -3
- package/dist/private/intl/table/de-DE.cjs.map +1 -1
- package/dist/private/intl/table/de-DE.js +3 -3
- package/dist/private/intl/table/de-DE.js.map +1 -1
- package/dist/private/intl/table/de-DE.mjs +3 -3
- package/dist/private/intl/table/de-DE.mjs.map +1 -1
- package/dist/private/intl/table/el-GR.cjs +3 -3
- package/dist/private/intl/table/el-GR.cjs.map +1 -1
- package/dist/private/intl/table/el-GR.js +3 -3
- package/dist/private/intl/table/el-GR.js.map +1 -1
- package/dist/private/intl/table/el-GR.mjs +3 -3
- package/dist/private/intl/table/el-GR.mjs.map +1 -1
- package/dist/private/intl/table/es-ES.cjs +3 -3
- package/dist/private/intl/table/es-ES.cjs.map +1 -1
- package/dist/private/intl/table/es-ES.js +3 -3
- package/dist/private/intl/table/es-ES.js.map +1 -1
- package/dist/private/intl/table/es-ES.mjs +3 -3
- package/dist/private/intl/table/es-ES.mjs.map +1 -1
- package/dist/private/intl/table/et-EE.cjs +3 -3
- package/dist/private/intl/table/et-EE.cjs.map +1 -1
- package/dist/private/intl/table/et-EE.js +3 -3
- package/dist/private/intl/table/et-EE.js.map +1 -1
- package/dist/private/intl/table/et-EE.mjs +3 -3
- package/dist/private/intl/table/et-EE.mjs.map +1 -1
- package/dist/private/intl/table/fi-FI.cjs +3 -3
- package/dist/private/intl/table/fi-FI.cjs.map +1 -1
- package/dist/private/intl/table/fi-FI.js +3 -3
- package/dist/private/intl/table/fi-FI.js.map +1 -1
- package/dist/private/intl/table/fi-FI.mjs +3 -3
- package/dist/private/intl/table/fi-FI.mjs.map +1 -1
- package/dist/private/intl/table/fr-FR.cjs +3 -3
- package/dist/private/intl/table/fr-FR.cjs.map +1 -1
- package/dist/private/intl/table/fr-FR.js +3 -3
- package/dist/private/intl/table/fr-FR.js.map +1 -1
- package/dist/private/intl/table/fr-FR.mjs +3 -3
- package/dist/private/intl/table/fr-FR.mjs.map +1 -1
- package/dist/private/intl/table/he-IL.cjs +3 -3
- package/dist/private/intl/table/he-IL.cjs.map +1 -1
- package/dist/private/intl/table/he-IL.js +3 -3
- package/dist/private/intl/table/he-IL.js.map +1 -1
- package/dist/private/intl/table/he-IL.mjs +3 -3
- package/dist/private/intl/table/he-IL.mjs.map +1 -1
- package/dist/private/intl/table/hr-HR.cjs +3 -3
- package/dist/private/intl/table/hr-HR.cjs.map +1 -1
- package/dist/private/intl/table/hr-HR.js +3 -3
- package/dist/private/intl/table/hr-HR.js.map +1 -1
- package/dist/private/intl/table/hr-HR.mjs +3 -3
- package/dist/private/intl/table/hr-HR.mjs.map +1 -1
- package/dist/private/intl/table/hu-HU.cjs +3 -3
- package/dist/private/intl/table/hu-HU.cjs.map +1 -1
- package/dist/private/intl/table/hu-HU.js +3 -3
- package/dist/private/intl/table/hu-HU.js.map +1 -1
- package/dist/private/intl/table/hu-HU.mjs +3 -3
- package/dist/private/intl/table/hu-HU.mjs.map +1 -1
- package/dist/private/intl/table/it-IT.cjs +3 -3
- package/dist/private/intl/table/it-IT.cjs.map +1 -1
- package/dist/private/intl/table/it-IT.js +3 -3
- package/dist/private/intl/table/it-IT.js.map +1 -1
- package/dist/private/intl/table/it-IT.mjs +3 -3
- package/dist/private/intl/table/it-IT.mjs.map +1 -1
- package/dist/private/intl/table/ja-JP.cjs +3 -3
- package/dist/private/intl/table/ja-JP.cjs.map +1 -1
- package/dist/private/intl/table/ja-JP.js +3 -3
- package/dist/private/intl/table/ja-JP.js.map +1 -1
- package/dist/private/intl/table/ja-JP.mjs +3 -3
- package/dist/private/intl/table/ja-JP.mjs.map +1 -1
- package/dist/private/intl/table/ko-KR.cjs +3 -3
- package/dist/private/intl/table/ko-KR.cjs.map +1 -1
- package/dist/private/intl/table/ko-KR.js +3 -3
- package/dist/private/intl/table/ko-KR.js.map +1 -1
- package/dist/private/intl/table/ko-KR.mjs +3 -3
- package/dist/private/intl/table/ko-KR.mjs.map +1 -1
- package/dist/private/intl/table/lt-LT.cjs +3 -3
- package/dist/private/intl/table/lt-LT.cjs.map +1 -1
- package/dist/private/intl/table/lt-LT.js +3 -3
- package/dist/private/intl/table/lt-LT.js.map +1 -1
- package/dist/private/intl/table/lt-LT.mjs +3 -3
- package/dist/private/intl/table/lt-LT.mjs.map +1 -1
- package/dist/private/intl/table/lv-LV.cjs +3 -3
- package/dist/private/intl/table/lv-LV.cjs.map +1 -1
- package/dist/private/intl/table/lv-LV.js +3 -3
- package/dist/private/intl/table/lv-LV.js.map +1 -1
- package/dist/private/intl/table/lv-LV.mjs +3 -3
- package/dist/private/intl/table/lv-LV.mjs.map +1 -1
- package/dist/private/intl/table/nb-NO.cjs +3 -3
- package/dist/private/intl/table/nb-NO.cjs.map +1 -1
- package/dist/private/intl/table/nb-NO.js +3 -3
- package/dist/private/intl/table/nb-NO.js.map +1 -1
- package/dist/private/intl/table/nb-NO.mjs +3 -3
- package/dist/private/intl/table/nb-NO.mjs.map +1 -1
- package/dist/private/intl/table/nl-NL.cjs +3 -3
- package/dist/private/intl/table/nl-NL.cjs.map +1 -1
- package/dist/private/intl/table/nl-NL.js +3 -3
- package/dist/private/intl/table/nl-NL.js.map +1 -1
- package/dist/private/intl/table/nl-NL.mjs +3 -3
- package/dist/private/intl/table/nl-NL.mjs.map +1 -1
- package/dist/private/intl/table/pl-PL.cjs +3 -3
- package/dist/private/intl/table/pl-PL.cjs.map +1 -1
- package/dist/private/intl/table/pl-PL.js +3 -3
- package/dist/private/intl/table/pl-PL.js.map +1 -1
- package/dist/private/intl/table/pl-PL.mjs +3 -3
- package/dist/private/intl/table/pl-PL.mjs.map +1 -1
- package/dist/private/intl/table/pt-BR.cjs +3 -3
- package/dist/private/intl/table/pt-BR.cjs.map +1 -1
- package/dist/private/intl/table/pt-BR.js +3 -3
- package/dist/private/intl/table/pt-BR.js.map +1 -1
- package/dist/private/intl/table/pt-BR.mjs +3 -3
- package/dist/private/intl/table/pt-BR.mjs.map +1 -1
- package/dist/private/intl/table/pt-PT.cjs +3 -3
- package/dist/private/intl/table/pt-PT.cjs.map +1 -1
- package/dist/private/intl/table/pt-PT.js +3 -3
- package/dist/private/intl/table/pt-PT.js.map +1 -1
- package/dist/private/intl/table/pt-PT.mjs +3 -3
- package/dist/private/intl/table/pt-PT.mjs.map +1 -1
- package/dist/private/intl/table/ro-RO.cjs +3 -3
- package/dist/private/intl/table/ro-RO.cjs.map +1 -1
- package/dist/private/intl/table/ro-RO.js +3 -3
- package/dist/private/intl/table/ro-RO.js.map +1 -1
- package/dist/private/intl/table/ro-RO.mjs +3 -3
- package/dist/private/intl/table/ro-RO.mjs.map +1 -1
- package/dist/private/intl/table/ru-RU.cjs +3 -3
- package/dist/private/intl/table/ru-RU.cjs.map +1 -1
- package/dist/private/intl/table/ru-RU.js +3 -3
- package/dist/private/intl/table/ru-RU.js.map +1 -1
- package/dist/private/intl/table/ru-RU.mjs +3 -3
- package/dist/private/intl/table/ru-RU.mjs.map +1 -1
- package/dist/private/intl/table/sk-SK.cjs +3 -3
- package/dist/private/intl/table/sk-SK.cjs.map +1 -1
- package/dist/private/intl/table/sk-SK.js +3 -3
- package/dist/private/intl/table/sk-SK.js.map +1 -1
- package/dist/private/intl/table/sk-SK.mjs +3 -3
- package/dist/private/intl/table/sk-SK.mjs.map +1 -1
- package/dist/private/intl/table/sl-SI.cjs +3 -3
- package/dist/private/intl/table/sl-SI.cjs.map +1 -1
- package/dist/private/intl/table/sl-SI.js +3 -3
- package/dist/private/intl/table/sl-SI.js.map +1 -1
- package/dist/private/intl/table/sl-SI.mjs +3 -3
- package/dist/private/intl/table/sl-SI.mjs.map +1 -1
- package/dist/private/intl/table/sr-SP.cjs +3 -3
- package/dist/private/intl/table/sr-SP.cjs.map +1 -1
- package/dist/private/intl/table/sr-SP.js +3 -3
- package/dist/private/intl/table/sr-SP.js.map +1 -1
- package/dist/private/intl/table/sr-SP.mjs +3 -3
- package/dist/private/intl/table/sr-SP.mjs.map +1 -1
- package/dist/private/intl/table/sv-SE.cjs +3 -3
- package/dist/private/intl/table/sv-SE.cjs.map +1 -1
- package/dist/private/intl/table/sv-SE.js +3 -3
- package/dist/private/intl/table/sv-SE.js.map +1 -1
- package/dist/private/intl/table/sv-SE.mjs +3 -3
- package/dist/private/intl/table/sv-SE.mjs.map +1 -1
- package/dist/private/intl/table/tr-TR.cjs +3 -3
- package/dist/private/intl/table/tr-TR.cjs.map +1 -1
- package/dist/private/intl/table/tr-TR.js +3 -3
- package/dist/private/intl/table/tr-TR.js.map +1 -1
- package/dist/private/intl/table/tr-TR.mjs +3 -3
- package/dist/private/intl/table/tr-TR.mjs.map +1 -1
- package/dist/private/intl/table/uk-UA.cjs +3 -3
- package/dist/private/intl/table/uk-UA.cjs.map +1 -1
- package/dist/private/intl/table/uk-UA.js +3 -3
- package/dist/private/intl/table/uk-UA.js.map +1 -1
- package/dist/private/intl/table/uk-UA.mjs +3 -3
- package/dist/private/intl/table/uk-UA.mjs.map +1 -1
- package/dist/private/intl/table/zh-CN.cjs +4 -4
- package/dist/private/intl/table/zh-CN.cjs.map +1 -1
- package/dist/private/intl/table/zh-CN.js +4 -4
- package/dist/private/intl/table/zh-CN.js.map +1 -1
- package/dist/private/intl/table/zh-CN.mjs +4 -4
- package/dist/private/intl/table/zh-CN.mjs.map +1 -1
- package/dist/private/intl/table/zh-TW.cjs +3 -3
- package/dist/private/intl/table/zh-TW.cjs.map +1 -1
- package/dist/private/intl/table/zh-TW.js +3 -3
- package/dist/private/intl/table/zh-TW.js.map +1 -1
- package/dist/private/intl/table/zh-TW.mjs +3 -3
- package/dist/private/intl/table/zh-TW.mjs.map +1 -1
- package/dist/private/intl/tree/es-ES.cjs +1 -1
- package/dist/private/intl/tree/es-ES.cjs.map +1 -1
- package/dist/private/intl/tree/es-ES.js +1 -1
- package/dist/private/intl/tree/es-ES.js.map +1 -1
- package/dist/private/intl/tree/es-ES.mjs +1 -1
- package/dist/private/intl/tree/es-ES.mjs.map +1 -1
- package/dist/private/link/useLink.cjs +2 -1
- package/dist/private/link/useLink.cjs.map +1 -1
- package/dist/private/link/useLink.js +2 -1
- package/dist/private/link/useLink.js.map +1 -1
- package/dist/private/link/useLink.mjs +2 -1
- package/dist/private/link/useLink.mjs.map +1 -1
- package/dist/private/menu/useMenu.cjs.map +1 -1
- package/dist/private/menu/useMenu.js.map +1 -1
- package/dist/private/menu/useMenu.mjs.map +1 -1
- package/dist/private/menu/useMenuItem.cjs +34 -34
- package/dist/private/menu/useMenuItem.cjs.map +1 -1
- package/dist/private/menu/useMenuItem.js +34 -34
- package/dist/private/menu/useMenuItem.js.map +1 -1
- package/dist/private/menu/useMenuItem.mjs +34 -34
- package/dist/private/menu/useMenuItem.mjs.map +1 -1
- package/dist/private/menu/useMenuTrigger.cjs +96 -30
- package/dist/private/menu/useMenuTrigger.cjs.map +1 -1
- package/dist/private/menu/useMenuTrigger.js +96 -30
- package/dist/private/menu/useMenuTrigger.js.map +1 -1
- package/dist/private/menu/useMenuTrigger.mjs +96 -30
- package/dist/private/menu/useMenuTrigger.mjs.map +1 -1
- package/dist/private/menu/useSubmenuTrigger.cjs +44 -36
- package/dist/private/menu/useSubmenuTrigger.cjs.map +1 -1
- package/dist/private/menu/useSubmenuTrigger.js +44 -36
- package/dist/private/menu/useSubmenuTrigger.js.map +1 -1
- package/dist/private/menu/useSubmenuTrigger.mjs +44 -36
- package/dist/private/menu/useSubmenuTrigger.mjs.map +1 -1
- package/dist/private/menu/utils.cjs.map +1 -1
- package/dist/private/menu/utils.js.map +1 -1
- package/dist/private/menu/utils.mjs.map +1 -1
- package/dist/private/numberfield/useNumberField.cjs +24 -19
- package/dist/private/numberfield/useNumberField.cjs.map +1 -1
- package/dist/private/numberfield/useNumberField.js +24 -19
- package/dist/private/numberfield/useNumberField.js.map +1 -1
- package/dist/private/numberfield/useNumberField.mjs +24 -19
- package/dist/private/numberfield/useNumberField.mjs.map +1 -1
- package/dist/private/overlays/DismissButton.cjs.map +1 -1
- package/dist/private/overlays/DismissButton.js.map +1 -1
- package/dist/private/overlays/DismissButton.mjs.map +1 -1
- package/dist/private/overlays/Overlay.cjs +5 -1
- package/dist/private/overlays/Overlay.cjs.map +1 -1
- package/dist/private/overlays/Overlay.js +5 -1
- package/dist/private/overlays/Overlay.js.map +1 -1
- package/dist/private/overlays/Overlay.mjs +5 -1
- package/dist/private/overlays/Overlay.mjs.map +1 -1
- package/dist/private/overlays/ariaHideOutside.cjs +12 -8
- package/dist/private/overlays/ariaHideOutside.cjs.map +1 -1
- package/dist/private/overlays/ariaHideOutside.js +13 -9
- package/dist/private/overlays/ariaHideOutside.js.map +1 -1
- package/dist/private/overlays/ariaHideOutside.mjs +13 -9
- package/dist/private/overlays/ariaHideOutside.mjs.map +1 -1
- package/dist/private/overlays/calculatePosition.cjs +7 -7
- package/dist/private/overlays/calculatePosition.cjs.map +1 -1
- package/dist/private/overlays/calculatePosition.js +7 -7
- package/dist/private/overlays/calculatePosition.js.map +1 -1
- package/dist/private/overlays/calculatePosition.mjs +7 -7
- package/dist/private/overlays/calculatePosition.mjs.map +1 -1
- package/dist/private/overlays/useCloseOnScroll.cjs +3 -4
- package/dist/private/overlays/useCloseOnScroll.cjs.map +1 -1
- package/dist/private/overlays/useCloseOnScroll.js +4 -5
- package/dist/private/overlays/useCloseOnScroll.js.map +1 -1
- package/dist/private/overlays/useCloseOnScroll.mjs +4 -5
- package/dist/private/overlays/useCloseOnScroll.mjs.map +1 -1
- package/dist/private/overlays/useOverlay.cjs +13 -7
- package/dist/private/overlays/useOverlay.cjs.map +1 -1
- package/dist/private/overlays/useOverlay.js +13 -7
- package/dist/private/overlays/useOverlay.js.map +1 -1
- package/dist/private/overlays/useOverlay.mjs +13 -7
- package/dist/private/overlays/useOverlay.mjs.map +1 -1
- package/dist/private/overlays/useOverlayPosition.cjs +9 -2
- package/dist/private/overlays/useOverlayPosition.cjs.map +1 -1
- package/dist/private/overlays/useOverlayPosition.js +9 -2
- package/dist/private/overlays/useOverlayPosition.js.map +1 -1
- package/dist/private/overlays/useOverlayPosition.mjs +9 -2
- package/dist/private/overlays/useOverlayPosition.mjs.map +1 -1
- package/dist/private/overlays/usePopover.cjs +6 -2
- package/dist/private/overlays/usePopover.cjs.map +1 -1
- package/dist/private/overlays/usePopover.js +7 -2
- package/dist/private/overlays/usePopover.js.map +1 -1
- package/dist/private/overlays/usePopover.mjs +6 -2
- package/dist/private/overlays/usePopover.mjs.map +1 -1
- package/dist/private/overlays/usePreventScroll.cjs +2 -5
- package/dist/private/overlays/usePreventScroll.cjs.map +1 -1
- package/dist/private/overlays/usePreventScroll.js +3 -6
- package/dist/private/overlays/usePreventScroll.js.map +1 -1
- package/dist/private/overlays/usePreventScroll.mjs +3 -6
- package/dist/private/overlays/usePreventScroll.mjs.map +1 -1
- package/dist/private/progress/useProgressBar.cjs +2 -1
- package/dist/private/progress/useProgressBar.cjs.map +1 -1
- package/dist/private/progress/useProgressBar.js +2 -1
- package/dist/private/progress/useProgressBar.js.map +1 -1
- package/dist/private/progress/useProgressBar.mjs +2 -1
- package/dist/private/progress/useProgressBar.mjs.map +1 -1
- package/dist/private/radio/useRadioGroup.cjs +26 -23
- package/dist/private/radio/useRadioGroup.cjs.map +1 -1
- package/dist/private/radio/useRadioGroup.js +26 -23
- package/dist/private/radio/useRadioGroup.js.map +1 -1
- package/dist/private/radio/useRadioGroup.mjs +26 -23
- package/dist/private/radio/useRadioGroup.mjs.map +1 -1
- package/dist/private/searchfield/useSearchField.cjs +28 -22
- package/dist/private/searchfield/useSearchField.cjs.map +1 -1
- package/dist/private/searchfield/useSearchField.js +28 -22
- package/dist/private/searchfield/useSearchField.js.map +1 -1
- package/dist/private/searchfield/useSearchField.mjs +28 -22
- package/dist/private/searchfield/useSearchField.mjs.map +1 -1
- package/dist/private/select/useSelect.cjs +22 -25
- package/dist/private/select/useSelect.cjs.map +1 -1
- package/dist/private/select/useSelect.js +24 -27
- package/dist/private/select/useSelect.js.map +1 -1
- package/dist/private/select/useSelect.mjs +22 -25
- package/dist/private/select/useSelect.mjs.map +1 -1
- package/dist/private/selection/ListKeyboardDelegate.cjs +31 -3
- package/dist/private/selection/ListKeyboardDelegate.cjs.map +1 -1
- package/dist/private/selection/ListKeyboardDelegate.js +31 -3
- package/dist/private/selection/ListKeyboardDelegate.js.map +1 -1
- package/dist/private/selection/ListKeyboardDelegate.mjs +31 -3
- package/dist/private/selection/ListKeyboardDelegate.mjs.map +1 -1
- package/dist/private/selection/useSelectableCollection.cjs +222 -159
- package/dist/private/selection/useSelectableCollection.cjs.map +1 -1
- package/dist/private/selection/useSelectableCollection.js +232 -168
- package/dist/private/selection/useSelectableCollection.js.map +1 -1
- package/dist/private/selection/useSelectableCollection.mjs +222 -159
- package/dist/private/selection/useSelectableCollection.mjs.map +1 -1
- package/dist/private/selection/useSelectableItem.cjs +58 -13
- package/dist/private/selection/useSelectableItem.cjs.map +1 -1
- package/dist/private/selection/useSelectableItem.js +58 -13
- package/dist/private/selection/useSelectableItem.js.map +1 -1
- package/dist/private/selection/useSelectableItem.mjs +58 -13
- package/dist/private/selection/useSelectableItem.mjs.map +1 -1
- package/dist/private/selection/useTypeSelect.cjs +50 -18
- package/dist/private/selection/useTypeSelect.cjs.map +1 -1
- package/dist/private/selection/useTypeSelect.js +51 -19
- package/dist/private/selection/useTypeSelect.js.map +1 -1
- package/dist/private/selection/useTypeSelect.mjs +51 -19
- package/dist/private/selection/useTypeSelect.mjs.map +1 -1
- package/dist/private/slider/useSlider.cjs.map +1 -1
- package/dist/private/slider/useSlider.js.map +1 -1
- package/dist/private/slider/useSlider.mjs.map +1 -1
- package/dist/private/slider/useSliderThumb.cjs +28 -26
- package/dist/private/slider/useSliderThumb.cjs.map +1 -1
- package/dist/private/slider/useSliderThumb.js +28 -26
- package/dist/private/slider/useSliderThumb.js.map +1 -1
- package/dist/private/slider/useSliderThumb.mjs +28 -26
- package/dist/private/slider/useSliderThumb.mjs.map +1 -1
- package/dist/private/spinbutton/useSpinButton.cjs +49 -34
- package/dist/private/spinbutton/useSpinButton.cjs.map +1 -1
- package/dist/private/spinbutton/useSpinButton.js +49 -34
- package/dist/private/spinbutton/useSpinButton.js.map +1 -1
- package/dist/private/spinbutton/useSpinButton.mjs +49 -34
- package/dist/private/spinbutton/useSpinButton.mjs.map +1 -1
- package/dist/private/ssr/SSRProvider.cjs +12 -3
- package/dist/private/ssr/SSRProvider.cjs.map +1 -1
- package/dist/private/ssr/SSRProvider.js +12 -3
- package/dist/private/ssr/SSRProvider.js.map +1 -1
- package/dist/private/ssr/SSRProvider.mjs +12 -3
- package/dist/private/ssr/SSRProvider.mjs.map +1 -1
- package/dist/private/steplist/useStepList.cjs.map +1 -1
- package/dist/private/steplist/useStepList.js.map +1 -1
- package/dist/private/steplist/useStepList.mjs.map +1 -1
- package/dist/private/steplist/useStepListItem.cjs +0 -9
- package/dist/private/steplist/useStepListItem.cjs.map +1 -1
- package/dist/private/steplist/useStepListItem.js +0 -10
- package/dist/private/steplist/useStepListItem.js.map +1 -1
- package/dist/private/steplist/useStepListItem.mjs +0 -9
- package/dist/private/steplist/useStepListItem.mjs.map +1 -1
- package/dist/private/table/useTable.cjs +4 -2
- package/dist/private/table/useTable.cjs.map +1 -1
- package/dist/private/table/useTable.js +4 -2
- package/dist/private/table/useTable.js.map +1 -1
- package/dist/private/table/useTable.mjs +4 -2
- package/dist/private/table/useTable.mjs.map +1 -1
- package/dist/private/table/useTableCell.cjs +2 -0
- package/dist/private/table/useTableCell.cjs.map +1 -1
- package/dist/private/table/useTableCell.js +2 -0
- package/dist/private/table/useTableCell.js.map +1 -1
- package/dist/private/table/useTableCell.mjs +2 -0
- package/dist/private/table/useTableCell.mjs.map +1 -1
- package/dist/private/table/useTableColumnHeader.cjs +2 -3
- package/dist/private/table/useTableColumnHeader.cjs.map +1 -1
- package/dist/private/table/useTableColumnHeader.js +2 -3
- package/dist/private/table/useTableColumnHeader.js.map +1 -1
- package/dist/private/table/useTableColumnHeader.mjs +2 -3
- package/dist/private/table/useTableColumnHeader.mjs.map +1 -1
- package/dist/private/table/useTableColumnResize.cjs +32 -14
- package/dist/private/table/useTableColumnResize.cjs.map +1 -1
- package/dist/private/table/useTableColumnResize.js +33 -15
- package/dist/private/table/useTableColumnResize.js.map +1 -1
- package/dist/private/table/useTableColumnResize.mjs +33 -15
- package/dist/private/table/useTableColumnResize.mjs.map +1 -1
- package/dist/private/table/useTableRow.cjs +4 -2
- package/dist/private/table/useTableRow.cjs.map +1 -1
- package/dist/private/table/useTableRow.js +4 -2
- package/dist/private/table/useTableRow.js.map +1 -1
- package/dist/private/table/useTableRow.mjs +4 -2
- package/dist/private/table/useTableRow.mjs.map +1 -1
- package/dist/private/table/useTableSelectionCheckbox.cjs.map +1 -1
- package/dist/private/table/useTableSelectionCheckbox.js.map +1 -1
- package/dist/private/table/useTableSelectionCheckbox.mjs.map +1 -1
- package/dist/private/tabs/TabsKeyboardDelegate.cjs +2 -2
- package/dist/private/tabs/TabsKeyboardDelegate.cjs.map +1 -1
- package/dist/private/tabs/TabsKeyboardDelegate.js +2 -2
- package/dist/private/tabs/TabsKeyboardDelegate.js.map +1 -1
- package/dist/private/tabs/TabsKeyboardDelegate.mjs +2 -2
- package/dist/private/tabs/TabsKeyboardDelegate.mjs.map +1 -1
- package/dist/private/tag/useTag.cjs +21 -11
- package/dist/private/tag/useTag.cjs.map +1 -1
- package/dist/private/tag/useTag.js +21 -11
- package/dist/private/tag/useTag.js.map +1 -1
- package/dist/private/tag/useTag.mjs +21 -11
- package/dist/private/tag/useTag.mjs.map +1 -1
- package/dist/private/textfield/useFormattedTextField.cjs +1 -0
- package/dist/private/textfield/useFormattedTextField.cjs.map +1 -1
- package/dist/private/textfield/useFormattedTextField.js +1 -0
- package/dist/private/textfield/useFormattedTextField.js.map +1 -1
- package/dist/private/textfield/useFormattedTextField.mjs +1 -0
- package/dist/private/textfield/useFormattedTextField.mjs.map +1 -1
- package/dist/private/toast/useToast.cjs.map +1 -1
- package/dist/private/toast/useToast.js.map +1 -1
- package/dist/private/toast/useToast.mjs.map +1 -1
- package/dist/private/toast/useToastRegion.cjs +5 -0
- package/dist/private/toast/useToastRegion.cjs.map +1 -1
- package/dist/private/toast/useToastRegion.js +5 -0
- package/dist/private/toast/useToastRegion.js.map +1 -1
- package/dist/private/toast/useToastRegion.mjs +5 -0
- package/dist/private/toast/useToastRegion.mjs.map +1 -1
- package/dist/private/toggle/useToggle.cjs +1 -0
- package/dist/private/toggle/useToggle.cjs.map +1 -1
- package/dist/private/toggle/useToggle.js +1 -0
- package/dist/private/toggle/useToggle.js.map +1 -1
- package/dist/private/toggle/useToggle.mjs +1 -0
- package/dist/private/toggle/useToggle.mjs.map +1 -1
- package/dist/private/tokenfield/useToken.cjs +46 -0
- package/dist/private/tokenfield/useToken.cjs.map +1 -0
- package/dist/private/tokenfield/useToken.js +41 -0
- package/dist/private/tokenfield/useToken.js.map +1 -0
- package/dist/private/tokenfield/useToken.mjs +41 -0
- package/dist/private/tokenfield/useToken.mjs.map +1 -0
- package/dist/private/tokenfield/useTokenField.cjs +587 -0
- package/dist/private/tokenfield/useTokenField.cjs.map +1 -0
- package/dist/private/tokenfield/useTokenField.js +590 -0
- package/dist/private/tokenfield/useTokenField.js.map +1 -0
- package/dist/private/tokenfield/useTokenField.mjs +579 -0
- package/dist/private/tokenfield/useTokenField.mjs.map +1 -0
- package/dist/private/toolbar/useToolbar.cjs +1 -1
- package/dist/private/toolbar/useToolbar.cjs.map +1 -1
- package/dist/private/toolbar/useToolbar.js +1 -1
- package/dist/private/toolbar/useToolbar.js.map +1 -1
- package/dist/private/toolbar/useToolbar.mjs +1 -1
- package/dist/private/toolbar/useToolbar.mjs.map +1 -1
- package/dist/private/tooltip/intlStrings.cjs +108 -0
- package/dist/private/tooltip/intlStrings.cjs.map +1 -0
- package/dist/private/tooltip/intlStrings.js +110 -0
- package/dist/private/tooltip/intlStrings.js.map +1 -0
- package/dist/private/tooltip/intlStrings.mjs +110 -0
- package/dist/private/tooltip/intlStrings.mjs.map +1 -0
- package/dist/private/tooltip/usePreviewTrigger.cjs +212 -0
- package/dist/private/tooltip/usePreviewTrigger.cjs.map +1 -0
- package/dist/private/tooltip/usePreviewTrigger.js +208 -0
- package/dist/private/tooltip/usePreviewTrigger.js.map +1 -0
- package/dist/private/tooltip/usePreviewTrigger.mjs +207 -0
- package/dist/private/tooltip/usePreviewTrigger.mjs.map +1 -0
- package/dist/private/tooltip/useSafeArea.cjs +134 -0
- package/dist/private/tooltip/useSafeArea.cjs.map +1 -0
- package/dist/private/tooltip/useSafeArea.js +130 -0
- package/dist/private/tooltip/useSafeArea.js.map +1 -0
- package/dist/private/tooltip/useSafeArea.mjs +129 -0
- package/dist/private/tooltip/useSafeArea.mjs.map +1 -0
- package/dist/private/tooltip/useTooltipTrigger.cjs +1 -0
- package/dist/private/tooltip/useTooltipTrigger.cjs.map +1 -1
- package/dist/private/tooltip/useTooltipTrigger.js +1 -0
- package/dist/private/tooltip/useTooltipTrigger.js.map +1 -1
- package/dist/private/tooltip/useTooltipTrigger.mjs +1 -0
- package/dist/private/tooltip/useTooltipTrigger.mjs.map +1 -1
- package/dist/private/tree/useTree.cjs +1 -0
- package/dist/private/tree/useTree.cjs.map +1 -1
- package/dist/private/tree/useTree.js +1 -0
- package/dist/private/tree/useTree.js.map +1 -1
- package/dist/private/tree/useTree.mjs +1 -0
- package/dist/private/tree/useTree.mjs.map +1 -1
- package/dist/private/tree/useTreeItem.cjs.map +1 -1
- package/dist/private/tree/useTreeItem.js.map +1 -1
- package/dist/private/tree/useTreeItem.mjs.map +1 -1
- package/dist/private/utils/domHelpers.cjs +43 -12
- package/dist/private/utils/domHelpers.cjs.map +1 -1
- package/dist/private/utils/domHelpers.js +45 -14
- package/dist/private/utils/domHelpers.js.map +1 -1
- package/dist/private/utils/domHelpers.mjs +43 -13
- package/dist/private/utils/domHelpers.mjs.map +1 -1
- package/dist/private/utils/isElementVisible.cjs +1 -1
- package/dist/private/utils/isElementVisible.cjs.map +1 -1
- package/dist/private/utils/isElementVisible.js +1 -1
- package/dist/private/utils/isElementVisible.js.map +1 -1
- package/dist/private/utils/isElementVisible.mjs +1 -1
- package/dist/private/utils/isElementVisible.mjs.map +1 -1
- package/dist/private/utils/isFocusable.cjs +3 -1
- package/dist/private/utils/isFocusable.cjs.map +1 -1
- package/dist/private/utils/isFocusable.js +3 -1
- package/dist/private/utils/isFocusable.js.map +1 -1
- package/dist/private/utils/isFocusable.mjs +3 -1
- package/dist/private/utils/isFocusable.mjs.map +1 -1
- package/dist/private/utils/isVirtualEvent.cjs +1 -1
- package/dist/private/utils/isVirtualEvent.cjs.map +1 -1
- package/dist/private/utils/isVirtualEvent.js +1 -1
- package/dist/private/utils/isVirtualEvent.js.map +1 -1
- package/dist/private/utils/isVirtualEvent.mjs +1 -1
- package/dist/private/utils/isVirtualEvent.mjs.map +1 -1
- package/dist/private/utils/openLink.cjs +4 -2
- package/dist/private/utils/openLink.cjs.map +1 -1
- package/dist/private/utils/openLink.js +4 -2
- package/dist/private/utils/openLink.js.map +1 -1
- package/dist/private/utils/openLink.mjs +4 -2
- package/dist/private/utils/openLink.mjs.map +1 -1
- package/dist/private/utils/platform.cjs +8 -4
- package/dist/private/utils/platform.cjs.map +1 -1
- package/dist/private/utils/platform.js +7 -4
- package/dist/private/utils/platform.js.map +1 -1
- package/dist/private/utils/platform.mjs +7 -4
- package/dist/private/utils/platform.mjs.map +1 -1
- package/dist/private/utils/scrollIntoView.cjs +3 -3
- package/dist/private/utils/scrollIntoView.cjs.map +1 -1
- package/dist/private/utils/scrollIntoView.js +4 -4
- package/dist/private/utils/scrollIntoView.js.map +1 -1
- package/dist/private/utils/scrollIntoView.mjs +4 -4
- package/dist/private/utils/scrollIntoView.mjs.map +1 -1
- package/dist/private/utils/shadowdom/DOMFunctions.cjs +28 -1
- package/dist/private/utils/shadowdom/DOMFunctions.cjs.map +1 -1
- package/dist/private/utils/shadowdom/DOMFunctions.js +30 -2
- package/dist/private/utils/shadowdom/DOMFunctions.js.map +1 -1
- package/dist/private/utils/shadowdom/DOMFunctions.mjs +28 -2
- package/dist/private/utils/shadowdom/DOMFunctions.mjs.map +1 -1
- package/dist/private/utils/useDeepMemo.cjs +4 -1
- package/dist/private/utils/useDeepMemo.cjs.map +1 -1
- package/dist/private/utils/useDeepMemo.js +4 -1
- package/dist/private/utils/useDeepMemo.js.map +1 -1
- package/dist/private/utils/useDeepMemo.mjs +4 -1
- package/dist/private/utils/useDeepMemo.mjs.map +1 -1
- package/dist/private/utils/useDrag1D.cjs +2 -0
- package/dist/private/utils/useDrag1D.cjs.map +1 -1
- package/dist/private/utils/useDrag1D.js +2 -0
- package/dist/private/utils/useDrag1D.js.map +1 -1
- package/dist/private/utils/useDrag1D.mjs +2 -0
- package/dist/private/utils/useDrag1D.mjs.map +1 -1
- package/dist/private/utils/useFormReset.cjs +4 -0
- package/dist/private/utils/useFormReset.cjs.map +1 -1
- package/dist/private/utils/useFormReset.js +4 -0
- package/dist/private/utils/useFormReset.js.map +1 -1
- package/dist/private/utils/useFormReset.mjs +4 -0
- package/dist/private/utils/useFormReset.mjs.map +1 -1
- package/dist/private/utils/useId.cjs +23 -4
- package/dist/private/utils/useId.cjs.map +1 -1
- package/dist/private/utils/useId.js +23 -4
- package/dist/private/utils/useId.js.map +1 -1
- package/dist/private/utils/useId.mjs +23 -4
- package/dist/private/utils/useId.mjs.map +1 -1
- package/dist/private/utils/useLoadMoreSentinel.cjs +7 -3
- package/dist/private/utils/useLoadMoreSentinel.cjs.map +1 -1
- package/dist/private/utils/useLoadMoreSentinel.js +7 -3
- package/dist/private/utils/useLoadMoreSentinel.js.map +1 -1
- package/dist/private/utils/useLoadMoreSentinel.mjs +7 -3
- package/dist/private/utils/useLoadMoreSentinel.mjs.map +1 -1
- package/dist/private/utils/useObjectRef.cjs +3 -1
- package/dist/private/utils/useObjectRef.cjs.map +1 -1
- package/dist/private/utils/useObjectRef.js +3 -1
- package/dist/private/utils/useObjectRef.js.map +1 -1
- package/dist/private/utils/useObjectRef.mjs +3 -1
- package/dist/private/utils/useObjectRef.mjs.map +1 -1
- package/dist/private/utils/useSyncRef.cjs +2 -0
- package/dist/private/utils/useSyncRef.cjs.map +1 -1
- package/dist/private/utils/useSyncRef.js +2 -0
- package/dist/private/utils/useSyncRef.js.map +1 -1
- package/dist/private/utils/useSyncRef.mjs +2 -0
- package/dist/private/utils/useSyncRef.mjs.map +1 -1
- package/dist/private/utils/useViewportSize.cjs +3 -3
- package/dist/private/utils/useViewportSize.cjs.map +1 -1
- package/dist/private/utils/useViewportSize.js +4 -4
- package/dist/private/utils/useViewportSize.js.map +1 -1
- package/dist/private/utils/useViewportSize.mjs +4 -4
- package/dist/private/utils/useViewportSize.mjs.map +1 -1
- package/dist/private/virtualizer/ScrollView.cjs +7 -4
- package/dist/private/virtualizer/ScrollView.cjs.map +1 -1
- package/dist/private/virtualizer/ScrollView.js +8 -5
- package/dist/private/virtualizer/ScrollView.js.map +1 -1
- package/dist/private/virtualizer/ScrollView.mjs +8 -5
- package/dist/private/virtualizer/ScrollView.mjs.map +1 -1
- package/dist/private/virtualizer/VirtualizerItem.cjs +3 -2
- package/dist/private/virtualizer/VirtualizerItem.cjs.map +1 -1
- package/dist/private/virtualizer/VirtualizerItem.js +3 -2
- package/dist/private/virtualizer/VirtualizerItem.js.map +1 -1
- package/dist/private/virtualizer/VirtualizerItem.mjs +3 -2
- package/dist/private/virtualizer/VirtualizerItem.mjs.map +1 -1
- package/dist/private/virtualizer/useVirtualizerItem.cjs +35 -2
- package/dist/private/virtualizer/useVirtualizerItem.cjs.map +1 -1
- package/dist/private/virtualizer/useVirtualizerItem.js +36 -3
- package/dist/private/virtualizer/useVirtualizerItem.js.map +1 -1
- package/dist/private/virtualizer/useVirtualizerItem.mjs +36 -3
- package/dist/private/virtualizer/useVirtualizerItem.mjs.map +1 -1
- package/dist/private/visually-hidden/VisuallyHidden.cjs +2 -1
- package/dist/private/visually-hidden/VisuallyHidden.cjs.map +1 -1
- package/dist/private/visually-hidden/VisuallyHidden.js +2 -1
- package/dist/private/visually-hidden/VisuallyHidden.js.map +1 -1
- package/dist/private/visually-hidden/VisuallyHidden.mjs +2 -1
- package/dist/private/visually-hidden/VisuallyHidden.mjs.map +1 -1
- package/dist/types/exports/index.d.ts +9 -0
- package/dist/types/exports/private/utils/domHelpers.d.ts +1 -1
- package/dist/types/exports/private/utils/platform.d.ts +1 -1
- package/dist/types/exports/private/utils/shadowdom/DOMFunctions.d.ts +1 -1
- package/dist/types/exports/useContextMenu.d.ts +2 -0
- package/dist/types/exports/usePreviewTrigger.d.ts +2 -0
- package/dist/types/exports/useTokenField.d.ts +4 -0
- package/dist/types/src/button/useToggleButtonGroup.d.ts +8 -0
- package/dist/types/src/combobox/useComboBox.d.ts +7 -1
- package/dist/types/src/dialog/useDialog.d.ts +2 -0
- package/dist/types/src/dnd/utils.d.ts +2 -2
- package/dist/types/src/grid/useGrid.d.ts +7 -0
- package/dist/types/src/grid/useGridCell.d.ts +8 -1
- package/dist/types/src/grid/utils.d.ts +1 -0
- package/dist/types/src/gridlist/useGridList.d.ts +7 -0
- package/dist/types/src/gridlist/useGridListItem.d.ts +13 -0
- package/dist/types/src/interactions/createKeyboardShortcutHandler.d.ts +56 -0
- package/dist/types/src/interactions/useContextMenu.d.ts +21 -0
- package/dist/types/src/interactions/useKeyboard.d.ts +7 -0
- package/dist/types/src/interactions/useLongPress.d.ts +2 -0
- package/dist/types/src/menu/useMenu.d.ts +1 -1
- package/dist/types/src/menu/utils.d.ts +1 -1
- package/dist/types/src/overlays/calculatePosition.d.ts +1 -0
- package/dist/types/src/overlays/useOverlayPosition.d.ts +8 -0
- package/dist/types/src/overlays/usePopover.d.ts +2 -1
- package/dist/types/src/selection/ListKeyboardDelegate.d.ts +1 -0
- package/dist/types/src/selection/useSelectableCollection.d.ts +7 -0
- package/dist/types/src/table/useTableCell.d.ts +12 -0
- package/dist/types/src/table/useTableColumnHeader.d.ts +12 -0
- package/dist/types/src/table/useTableColumnResize.d.ts +5 -0
- package/dist/types/src/tokenfield/useToken.d.ts +14 -0
- package/dist/types/src/tokenfield/useTokenField.d.ts +57 -0
- package/dist/types/src/tooltip/usePreviewTrigger.d.ts +27 -0
- package/dist/types/src/tooltip/useSafeArea.d.ts +26 -0
- package/dist/types/src/tree/useTree.d.ts +1 -1
- package/dist/types/src/utils/domHelpers.d.ts +20 -5
- package/dist/types/src/utils/platform.d.ts +1 -0
- package/dist/types/src/utils/shadowdom/DOMFunctions.d.ts +11 -0
- package/dist/types/src/utils/useLoadMoreSentinel.d.ts +7 -0
- package/dist/types/src/virtualizer/VirtualizerItem.d.ts +1 -0
- package/dist/types/src/virtualizer/useVirtualizerItem.d.ts +1 -0
- package/i18n/ar-AE.js +1 -1
- package/i18n/ar-AE.mjs +1 -1
- package/i18n/bg-BG.js +1 -1
- package/i18n/bg-BG.mjs +1 -1
- package/i18n/cs-CZ.js +1 -1
- package/i18n/cs-CZ.mjs +1 -1
- package/i18n/da-DK.js +1 -1
- package/i18n/da-DK.mjs +1 -1
- package/i18n/de-DE.js +1 -1
- package/i18n/de-DE.mjs +1 -1
- package/i18n/el-GR.js +1 -1
- package/i18n/el-GR.mjs +1 -1
- package/i18n/en-US.js +1 -1
- package/i18n/en-US.mjs +1 -1
- package/i18n/es-ES.js +1 -1
- package/i18n/es-ES.mjs +1 -1
- package/i18n/et-EE.js +1 -1
- package/i18n/et-EE.mjs +1 -1
- package/i18n/fi-FI.js +1 -1
- package/i18n/fi-FI.mjs +1 -1
- package/i18n/fr-FR.js +1 -1
- package/i18n/fr-FR.mjs +1 -1
- package/i18n/he-IL.js +1 -1
- package/i18n/he-IL.mjs +1 -1
- package/i18n/hr-HR.js +1 -1
- package/i18n/hr-HR.mjs +1 -1
- package/i18n/hu-HU.js +1 -1
- package/i18n/hu-HU.mjs +1 -1
- package/i18n/it-IT.js +1 -1
- package/i18n/it-IT.mjs +1 -1
- package/i18n/ja-JP.js +1 -1
- package/i18n/ja-JP.mjs +1 -1
- package/i18n/ko-KR.js +1 -1
- package/i18n/ko-KR.mjs +1 -1
- package/i18n/lt-LT.js +1 -1
- package/i18n/lt-LT.mjs +1 -1
- package/i18n/lv-LV.js +1 -1
- package/i18n/lv-LV.mjs +1 -1
- package/i18n/nb-NO.js +1 -1
- package/i18n/nb-NO.mjs +1 -1
- package/i18n/nl-NL.js +1 -1
- package/i18n/nl-NL.mjs +1 -1
- package/i18n/pl-PL.js +1 -1
- package/i18n/pl-PL.mjs +1 -1
- package/i18n/pt-BR.js +1 -1
- package/i18n/pt-BR.mjs +1 -1
- package/i18n/pt-PT.js +1 -1
- package/i18n/pt-PT.mjs +1 -1
- package/i18n/ro-RO.js +1 -1
- package/i18n/ro-RO.mjs +1 -1
- package/i18n/ru-RU.js +1 -1
- package/i18n/ru-RU.mjs +1 -1
- package/i18n/sk-SK.js +1 -1
- package/i18n/sk-SK.mjs +1 -1
- package/i18n/sl-SI.js +1 -1
- package/i18n/sl-SI.mjs +1 -1
- package/i18n/sr-SP.js +1 -1
- package/i18n/sr-SP.mjs +1 -1
- package/i18n/sv-SE.js +1 -1
- package/i18n/sv-SE.mjs +1 -1
- package/i18n/tr-TR.js +1 -1
- package/i18n/tr-TR.mjs +1 -1
- package/i18n/uk-UA.js +1 -1
- package/i18n/uk-UA.mjs +1 -1
- package/i18n/zh-CN.js +1 -1
- package/i18n/zh-CN.mjs +1 -1
- package/i18n/zh-TW.js +1 -1
- package/i18n/zh-TW.mjs +1 -1
- package/package.json +6 -6
- package/useContextMenu/package.json +5 -0
- package/usePreviewTrigger/package.json +5 -0
- package/useTokenField/package.json +5 -0
|
@@ -7,6 +7,7 @@ var $cfe896014413cb8c$exports = require("../interactions/useFocusable.cjs");
|
|
|
7
7
|
var $d07dc266c3dc14c0$exports = require("../gridlist/useGridListItem.cjs");
|
|
8
8
|
var $7ac82d1fee77eb8a$exports = require("../utils/useId.cjs");
|
|
9
9
|
var $d0df89f3abe2c2ca$exports = require("../interactions/useFocusVisible.cjs");
|
|
10
|
+
var $6d2f10bb8b359da5$exports = require("../interactions/useKeyboard.cjs");
|
|
10
11
|
var $d4e8e26182baab6e$exports = require("../i18n/useLocalizedStringFormatter.cjs");
|
|
11
12
|
var $75bd88aab025820b$exports = require("../utils/openLink.cjs");
|
|
12
13
|
|
|
@@ -41,6 +42,7 @@ $parcel$export(module.exports, "useTag", function () { return $e6145a72dc2af01a$
|
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
|
|
45
|
+
|
|
44
46
|
function $e6145a72dc2af01a$export$3f568fff7dff2f03(props, state, ref) {
|
|
45
47
|
let { item: item } = props;
|
|
46
48
|
let stringFormatter = (0, $d4e8e26182baab6e$exports.useLocalizedStringFormatter)((0, ($parcel$interopDefault($a3175550c11b26b5$exports))), '@react-aria/tag');
|
|
@@ -52,16 +54,24 @@ function $e6145a72dc2af01a$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
52
54
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
53
55
|
let { descriptionProps: _, ...stateWithoutDescription } = states;
|
|
54
56
|
let isDisabled = state.disabledKeys.has(item.key) || item.props.isDisabled;
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
let { keyboardProps: keyboardProps } = (0, $6d2f10bb8b359da5$exports.useKeyboard)({
|
|
58
|
+
isDisabled: isDisabled,
|
|
59
|
+
shortcuts: {
|
|
60
|
+
Delete: ()=>{
|
|
61
|
+
if (state.selectionManager.isSelected(item.key)) onRemove?.(new Set(state.selectionManager.selectedKeys));
|
|
62
|
+
else onRemove?.(new Set([
|
|
63
|
+
item.key
|
|
64
|
+
]));
|
|
65
|
+
},
|
|
66
|
+
Backspace: ()=>{
|
|
67
|
+
if (state.selectionManager.isSelected(item.key)) onRemove?.(new Set(state.selectionManager.selectedKeys));
|
|
68
|
+
else onRemove?.(new Set([
|
|
69
|
+
item.key
|
|
70
|
+
]));
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
allowRepeats: true
|
|
74
|
+
});
|
|
65
75
|
let modality = (0, $d0df89f3abe2c2ca$exports.useInteractionModality)();
|
|
66
76
|
if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) modality = 'pointer';
|
|
67
77
|
let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
|
|
@@ -88,7 +98,7 @@ function $e6145a72dc2af01a$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
88
98
|
},
|
|
89
99
|
rowProps: (0, $89b39774f3b79dbb$exports.mergeProps)(focusableProps, rowProps, domProps, linkProps, {
|
|
90
100
|
tabIndex: tabIndex,
|
|
91
|
-
|
|
101
|
+
...onRemove ? keyboardProps : {},
|
|
92
102
|
'aria-describedby': descProps['aria-describedby']
|
|
93
103
|
}),
|
|
94
104
|
gridCellProps: (0, $89b39774f3b79dbb$exports.mergeProps)(gridCellProps, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;AA0CM,SAAS,0CACd,KAAsB,EACtB,KAAmB,EACnB,GAAuC;IAEvC,IAAI,QAAC,IAAI,EAAC,GAAG;IACb,IAAI,kBAAkB,CAAA,GAAA,qDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,WAAW,CAAA,GAAA,+BAAI;IAEnB,IAAI,YAAC,QAAQ,EAAC,GAAG,CAAA,GAAA,kCAAO,EAAE,GAAG,CAAC,UAAU,CAAC;IACzC,IAAI,YAAC,QAAQ,iBAAE,aAAa,EAAE,GAAG,QAAO,GAAG,CAAA,GAAA,yCAAc,EACvD;QACE,MAAM;IACR,GACA,OACA;IAGF,6DAA6D;IAC7D,IAAI,EAAC,kBAAkB,CAAC,EAAE,GAAG,yBAAwB,GAAG;IAExD,IAAI,aAAa,MAAM,YAAY,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,KAAK,KAAK,CAAC,UAAU;IAC1E,IAAI,iBAAC,aAAa,EAAC,GAAG,CAAA,GAAA,qCAAU,EAAE;oBAChC;QACA,WAAW;YACT,QAAQ;gBACN,IAAI,MAAM,gBAAgB,CAAC,UAAU,CAAC,KAAK,GAAG,GAC5C,WAAW,IAAI,IAAI,MAAM,gBAAgB,CAAC,YAAY;qBAEtD,WAAW,IAAI,IAAI;oBAAC,KAAK,GAAG;iBAAC;YAEjC;YACA,WAAW;gBACT,IAAI,MAAM,gB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,KAAK,CAAC,oBAAoB;YAC/C,cAAc,KAAK,CAAC,aAAa;QACnC;QACA,GAAG,uBAAuB;QAC1B,gBAAgB,CAAC,CAAC;IACpB;AACF","sources":["packages/react-aria/src/tag/useTag.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaButtonProps} from '../button/useButton';\nimport {DOMAttributes, FocusableElement, Node, RefObject} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {hookData} from './useTagGroup';\nimport intlMessages from '../../intl/tag/*.json';\nimport type {ListState} from 'react-stately/useListState';\nimport {mergeProps} from '../utils/mergeProps';\nimport {SelectableItemStates} from '../selection/useSelectableItem';\nimport {useDescription} from '../utils/useDescription';\nimport {useFocusable} from '../interactions/useFocusable';\nimport {useGridListItem} from '../gridlist/useGridListItem';\nimport {useId} from '../utils/useId';\nimport {useInteractionModality} from '../interactions/useFocusVisible';\nimport {useKeyboard} from '../interactions/useKeyboard';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\nimport {useSyntheticLinkProps} from '../utils/openLink';\n\nexport interface TagAria extends SelectableItemStates {\n /** Props for the tag row element. */\n rowProps: DOMAttributes;\n /** Props for the tag cell element. */\n gridCellProps: DOMAttributes;\n /** Props for the tag remove button. */\n removeButtonProps: AriaButtonProps;\n /** Whether the tag can be removed. */\n allowsRemoving: boolean;\n}\n\nexport interface AriaTagProps<T> {\n /** An object representing the tag. Contains all the relevant information that makes up the tag. */\n item: Node<T>;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tag component.\n *\n * @param props - Props to be applied to the tag.\n * @param state - State for the tag group, as returned by `useListState`.\n * @param ref - A ref to a DOM element for the tag.\n */\nexport function useTag<T>(\n props: AriaTagProps<T>,\n state: ListState<T>,\n ref: RefObject<FocusableElement | null>\n): TagAria {\n let {item} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/tag');\n let buttonId = useId();\n\n let {onRemove} = hookData.get(state) || {};\n let {rowProps, gridCellProps, ...states} = useGridListItem(\n {\n node: item\n },\n state,\n ref\n );\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {descriptionProps: _, ...stateWithoutDescription} = states;\n\n let isDisabled = state.disabledKeys.has(item.key) || item.props.isDisabled;\n let {keyboardProps} = useKeyboard({\n isDisabled,\n shortcuts: {\n Delete: () => {\n if (state.selectionManager.isSelected(item.key)) {\n onRemove?.(new Set(state.selectionManager.selectedKeys));\n } else {\n onRemove?.(new Set([item.key]));\n }\n },\n Backspace: () => {\n if (state.selectionManager.isSelected(item.key)) {\n onRemove?.(new Set(state.selectionManager.selectedKeys));\n } else {\n onRemove?.(new Set([item.key]));\n }\n }\n },\n allowRepeats: true\n });\n\n let modality = useInteractionModality();\n if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) {\n modality = 'pointer';\n }\n let description =\n onRemove && (modality === 'keyboard' || modality === 'virtual')\n ? stringFormatter.format('removeDescription')\n : '';\n let descProps = useDescription(description);\n\n let isItemFocused = item.key === state.selectionManager.focusedKey;\n let isFocused = state.selectionManager.focusedKey != null;\n let tabIndex = -1;\n if (!isDisabled && (isItemFocused || !isFocused)) {\n tabIndex = 0;\n }\n\n let domProps = filterDOMProps(item.props);\n let linkProps = useSyntheticLinkProps(item.props);\n let {focusableProps} = useFocusable(\n {\n ...item.props,\n isDisabled\n },\n ref\n );\n\n return {\n removeButtonProps: {\n 'aria-label': stringFormatter.format('removeButtonLabel'),\n 'aria-labelledby': `${buttonId} ${rowProps.id}`,\n isDisabled,\n id: buttonId,\n onPress: () => (onRemove ? onRemove(new Set([item.key])) : null)\n },\n rowProps: mergeProps(focusableProps, rowProps, domProps, linkProps, {\n tabIndex,\n ...(onRemove ? keyboardProps : {}),\n 'aria-describedby': descProps['aria-describedby']\n }),\n gridCellProps: mergeProps(gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label']\n }),\n ...stateWithoutDescription,\n allowsRemoving: !!onRemove\n };\n}\n"],"names":[],"version":3,"file":"useTag.cjs.map"}
|
|
@@ -7,6 +7,7 @@ import {useFocusable as $088f27a386bc4a8f$export$4c014de7c8940b4c} from "../inte
|
|
|
7
7
|
import {useGridListItem as $7d08662b45460e3b$export$9610e69494fadfd2} from "../gridlist/useGridListItem.js";
|
|
8
8
|
import {useId as $0292efe68908de6b$export$f680877a34711e37} from "../utils/useId.js";
|
|
9
9
|
import {useInteractionModality as $b50b1cc8a843ace7$export$98e20ec92f614cfe} from "../interactions/useFocusVisible.js";
|
|
10
|
+
import {useKeyboard as $bf74df7506f65576$export$8f71654801c2f7cd} from "../interactions/useKeyboard.js";
|
|
10
11
|
import {useLocalizedStringFormatter as $1adfa757ef3cd864$export$f12b703ca79dfbb1} from "../i18n/useLocalizedStringFormatter.js";
|
|
11
12
|
import {useSyntheticLinkProps as $044d3c97ce5d6621$export$bdc77b0c0a3a85d6} from "../utils/openLink.js";
|
|
12
13
|
|
|
@@ -35,6 +36,7 @@ function $parcel$interopDefault(a) {
|
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
|
|
39
|
+
|
|
38
40
|
function $b13ee33d16055494$export$3f568fff7dff2f03(props, state, ref) {
|
|
39
41
|
let { item: item } = props;
|
|
40
42
|
let stringFormatter = (0, $1adfa757ef3cd864$export$f12b703ca79dfbb1)((0, ($parcel$interopDefault($ecwFx$intlStringsjs))), '@react-aria/tag');
|
|
@@ -46,16 +48,24 @@ function $b13ee33d16055494$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
46
48
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
47
49
|
let { descriptionProps: _, ...stateWithoutDescription } = states;
|
|
48
50
|
let isDisabled = state.disabledKeys.has(item.key) || item.props.isDisabled;
|
|
49
|
-
let
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
let { keyboardProps: keyboardProps } = (0, $bf74df7506f65576$export$8f71654801c2f7cd)({
|
|
52
|
+
isDisabled: isDisabled,
|
|
53
|
+
shortcuts: {
|
|
54
|
+
Delete: ()=>{
|
|
55
|
+
if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
|
|
56
|
+
else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
|
|
57
|
+
item.key
|
|
58
|
+
]));
|
|
59
|
+
},
|
|
60
|
+
Backspace: ()=>{
|
|
61
|
+
if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
|
|
62
|
+
else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
|
|
63
|
+
item.key
|
|
64
|
+
]));
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
allowRepeats: true
|
|
68
|
+
});
|
|
59
69
|
let modality = (0, $b50b1cc8a843ace7$export$98e20ec92f614cfe)();
|
|
60
70
|
if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) modality = 'pointer';
|
|
61
71
|
let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
|
|
@@ -82,7 +92,7 @@ function $b13ee33d16055494$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
82
92
|
},
|
|
83
93
|
rowProps: (0, $64c36edd757dfa16$export$9d1611c77c2fe928)(focusableProps, rowProps, domProps, linkProps, {
|
|
84
94
|
tabIndex: tabIndex,
|
|
85
|
-
|
|
95
|
+
...onRemove ? keyboardProps : {},
|
|
86
96
|
'aria-describedby': descProps['aria-describedby']
|
|
87
97
|
}),
|
|
88
98
|
gridCellProps: (0, $64c36edd757dfa16$export$9d1611c77c2fe928)(gridCellProps, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;AA0CM,SAAS,0CACd,KAAsB,EACtB,KAAmB,EACnB,GAAuC;IAEvC,IAAI,QAAC,IAAI,EAAC,GAAG;IACb,IAAI,kBAAkB,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,8CAAW,GAAG;IAChE,IAAI,WAAW,CAAA,GAAA,yCAAI;IAEnB,IAAI,YAAC,QAAQ,EAAC,GAAG,CAAA,GAAA,yCAAO,EAAE,GAAG,CAAC,UAAU,CAAC;IACzC,IAAI,YAAC,QAAQ,iBAAE,aAAa,EAAE,GAAG,QAAO,GAAG,CAAA,GAAA,yCAAc,EACvD;QACE,MAAM;IACR,GACA,OACA;IAGF,6DAA6D;IAC7D,IAAI,EAAC,kBAAkB,CAAC,EAAE,GAAG,yBAAwB,GAAG;IAExD,IAAI,aAAa,MAAM,YAAY,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,KAAK,KAAK,CAAC,UAAU;IAC1E,IAAI,iBAAC,aAAa,EAAC,GAAG,CAAA,GAAA,yCAAU,EAAE;oBAChC;QACA,WAAW;YACT,QAAQ;gBACN,IAAI,MAAM,gBAAgB,CAAC,UAAU,CAAC,KAAK,GAAG,GAC5C,qBAAA,+BAAA,SAAW,IAAI,IAAI,MAAM,gBAAgB,CAAC,YAAY;qBAEtD,qBAAA,+BAAA,SAAW,IAAI,IAAI;oBAAC,KAAK,GAAG;iBAAC;YAEjC;YACA,WAAW;gBACT,IAAI,MAAM,gBAAgB,CAAC,UAAU,CAAC,KAAK,GAAG,GAC5C,qBAAA,+BAAA,SAAW,IA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AK,CAAC,aAAa;QACnC;QACA,GAAG,uBAAuB;QAC1B,gBAAgB,CAAC,CAAC;IACpB;AACF","sources":["packages/react-aria/src/tag/useTag.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaButtonProps} from '../button/useButton';\nimport {DOMAttributes, FocusableElement, Node, RefObject} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {hookData} from './useTagGroup';\nimport intlMessages from '../../intl/tag/*.json';\nimport type {ListState} from 'react-stately/useListState';\nimport {mergeProps} from '../utils/mergeProps';\nimport {SelectableItemStates} from '../selection/useSelectableItem';\nimport {useDescription} from '../utils/useDescription';\nimport {useFocusable} from '../interactions/useFocusable';\nimport {useGridListItem} from '../gridlist/useGridListItem';\nimport {useId} from '../utils/useId';\nimport {useInteractionModality} from '../interactions/useFocusVisible';\nimport {useKeyboard} from '../interactions/useKeyboard';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\nimport {useSyntheticLinkProps} from '../utils/openLink';\n\nexport interface TagAria extends SelectableItemStates {\n /** Props for the tag row element. */\n rowProps: DOMAttributes;\n /** Props for the tag cell element. */\n gridCellProps: DOMAttributes;\n /** Props for the tag remove button. */\n removeButtonProps: AriaButtonProps;\n /** Whether the tag can be removed. */\n allowsRemoving: boolean;\n}\n\nexport interface AriaTagProps<T> {\n /** An object representing the tag. Contains all the relevant information that makes up the tag. */\n item: Node<T>;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tag component.\n *\n * @param props - Props to be applied to the tag.\n * @param state - State for the tag group, as returned by `useListState`.\n * @param ref - A ref to a DOM element for the tag.\n */\nexport function useTag<T>(\n props: AriaTagProps<T>,\n state: ListState<T>,\n ref: RefObject<FocusableElement | null>\n): TagAria {\n let {item} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/tag');\n let buttonId = useId();\n\n let {onRemove} = hookData.get(state) || {};\n let {rowProps, gridCellProps, ...states} = useGridListItem(\n {\n node: item\n },\n state,\n ref\n );\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {descriptionProps: _, ...stateWithoutDescription} = states;\n\n let isDisabled = state.disabledKeys.has(item.key) || item.props.isDisabled;\n let {keyboardProps} = useKeyboard({\n isDisabled,\n shortcuts: {\n Delete: () => {\n if (state.selectionManager.isSelected(item.key)) {\n onRemove?.(new Set(state.selectionManager.selectedKeys));\n } else {\n onRemove?.(new Set([item.key]));\n }\n },\n Backspace: () => {\n if (state.selectionManager.isSelected(item.key)) {\n onRemove?.(new Set(state.selectionManager.selectedKeys));\n } else {\n onRemove?.(new Set([item.key]));\n }\n }\n },\n allowRepeats: true\n });\n\n let modality = useInteractionModality();\n if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) {\n modality = 'pointer';\n }\n let description =\n onRemove && (modality === 'keyboard' || modality === 'virtual')\n ? stringFormatter.format('removeDescription')\n : '';\n let descProps = useDescription(description);\n\n let isItemFocused = item.key === state.selectionManager.focusedKey;\n let isFocused = state.selectionManager.focusedKey != null;\n let tabIndex = -1;\n if (!isDisabled && (isItemFocused || !isFocused)) {\n tabIndex = 0;\n }\n\n let domProps = filterDOMProps(item.props);\n let linkProps = useSyntheticLinkProps(item.props);\n let {focusableProps} = useFocusable(\n {\n ...item.props,\n isDisabled\n },\n ref\n );\n\n return {\n removeButtonProps: {\n 'aria-label': stringFormatter.format('removeButtonLabel'),\n 'aria-labelledby': `${buttonId} ${rowProps.id}`,\n isDisabled,\n id: buttonId,\n onPress: () => (onRemove ? onRemove(new Set([item.key])) : null)\n },\n rowProps: mergeProps(focusableProps, rowProps, domProps, linkProps, {\n tabIndex,\n ...(onRemove ? keyboardProps : {}),\n 'aria-describedby': descProps['aria-describedby']\n }),\n gridCellProps: mergeProps(gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label']\n }),\n ...stateWithoutDescription,\n allowsRemoving: !!onRemove\n };\n}\n"],"names":[],"version":3,"file":"useTag.js.map"}
|
|
@@ -7,6 +7,7 @@ import {useFocusable as $d1116acdf220c2da$export$4c014de7c8940b4c} from "../inte
|
|
|
7
7
|
import {useGridListItem as $be7bed9611dd7497$export$9610e69494fadfd2} from "../gridlist/useGridListItem.mjs";
|
|
8
8
|
import {useId as $390e54f620492c70$export$f680877a34711e37} from "../utils/useId.mjs";
|
|
9
9
|
import {useInteractionModality as $8f5a2122b0992be3$export$98e20ec92f614cfe} from "../interactions/useFocusVisible.mjs";
|
|
10
|
+
import {useKeyboard as $8296dad1a4c5e0dc$export$8f71654801c2f7cd} from "../interactions/useKeyboard.mjs";
|
|
10
11
|
import {useLocalizedStringFormatter as $cf2482eff2eeeec2$export$f12b703ca79dfbb1} from "../i18n/useLocalizedStringFormatter.mjs";
|
|
11
12
|
import {useSyntheticLinkProps as $caaf0dd3060ed57c$export$bdc77b0c0a3a85d6} from "../utils/openLink.mjs";
|
|
12
13
|
|
|
@@ -35,6 +36,7 @@ function $parcel$interopDefault(a) {
|
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
|
|
39
|
+
|
|
38
40
|
function $8b763916586fd6a6$export$3f568fff7dff2f03(props, state, ref) {
|
|
39
41
|
let { item: item } = props;
|
|
40
42
|
let stringFormatter = (0, $cf2482eff2eeeec2$export$f12b703ca79dfbb1)((0, ($parcel$interopDefault($Egwke$intlStringsmjs))), '@react-aria/tag');
|
|
@@ -46,16 +48,24 @@ function $8b763916586fd6a6$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
46
48
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
47
49
|
let { descriptionProps: _, ...stateWithoutDescription } = states;
|
|
48
50
|
let isDisabled = state.disabledKeys.has(item.key) || item.props.isDisabled;
|
|
49
|
-
let
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
let { keyboardProps: keyboardProps } = (0, $8296dad1a4c5e0dc$export$8f71654801c2f7cd)({
|
|
52
|
+
isDisabled: isDisabled,
|
|
53
|
+
shortcuts: {
|
|
54
|
+
Delete: ()=>{
|
|
55
|
+
if (state.selectionManager.isSelected(item.key)) onRemove?.(new Set(state.selectionManager.selectedKeys));
|
|
56
|
+
else onRemove?.(new Set([
|
|
57
|
+
item.key
|
|
58
|
+
]));
|
|
59
|
+
},
|
|
60
|
+
Backspace: ()=>{
|
|
61
|
+
if (state.selectionManager.isSelected(item.key)) onRemove?.(new Set(state.selectionManager.selectedKeys));
|
|
62
|
+
else onRemove?.(new Set([
|
|
63
|
+
item.key
|
|
64
|
+
]));
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
allowRepeats: true
|
|
68
|
+
});
|
|
59
69
|
let modality = (0, $8f5a2122b0992be3$export$98e20ec92f614cfe)();
|
|
60
70
|
if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) modality = 'pointer';
|
|
61
71
|
let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
|
|
@@ -82,7 +92,7 @@ function $8b763916586fd6a6$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
82
92
|
},
|
|
83
93
|
rowProps: (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(focusableProps, rowProps, domProps, linkProps, {
|
|
84
94
|
tabIndex: tabIndex,
|
|
85
|
-
|
|
95
|
+
...onRemove ? keyboardProps : {},
|
|
86
96
|
'aria-describedby': descProps['aria-describedby']
|
|
87
97
|
}),
|
|
88
98
|
gridCellProps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qB;IACpC,IAAI,aAAa,aAAa,OAAO,WAAW,eAAe,kBAAkB,QAC/E,WAAW;IAEb,IAAI,cACF,YAAa,CAAA,aAAa,cAAc,aAAa,SAAQ,IACzD,gBAAgB,MAAM,CAAC,uBACvB;IACN,IAAI,YAAY,CAAA,GAAA,yCAAa,EAAE;IAE/B,IAAI,gBAAgB,KAAK,GAAG,KAAK,MAAM,gBAAgB,CAAC,UAAU;IAClE,IAAI,YAAY,MAAM,gBAAgB,CAAC,UAAU,IAAI;IACrD,IAAI,WAAW;IACf,IAAI,CAAC,cAAe,CAAA,iBAAiB,CAAC,SAAQ,GAC5C,WAAW;IAGb,IAAI,WAAW,CAAA,GAAA,yCAAa,EAAE,KAAK,KAAK;IACxC,IAAI,YAAY,CAAA,GAAA,yCAAoB,EAAE,KAAK,KAAK;IAChD,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAChC;QACE,GAAG,KAAK,KAAK;oBACb;IACF,GACA;IAGF,OAAO;QACL,mBAAmB;YACjB,cAAc,gBAAgB,MAAM,CAAC;YACrC,mBAAmB,GAAG,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;wBAC/C;YACA,IAAI;YACJ,SAAS,IAAO,WAAW,SAAS,IAAI,IAAI;oBAAC,KAAK,GAAG;iBAAC,KAAK;QAC7D;QACA,UAAU,CAAA,GAAA,yCAAS,EAAE,gBAAgB,UAAU,UAAU,WAAW;sBAClE;YACA,GAAI,WAAW,gBAAgB,CAAC,CAAC;YACjC,oBAAoB,SAAS,CAAC,mBAAmB;QACnD;QACA,eAAe,CAAA,GAAA,yCAAS,EAAE,eAAe;YACvC,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,cAAc,KAAK,CAAC,aAAa;QACnC;QACA,GAAG,uBAAuB;QAC1B,gBAAgB,CAAC,CAAC;IACpB;AACF","sources":["packages/react-aria/src/tag/useTag.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaButtonProps} from '../button/useButton';\nimport {DOMAttributes, FocusableElement, Node, RefObject} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport {hookData} from './useTagGroup';\nimport intlMessages from '../../intl/tag/*.json';\nimport type {ListState} from 'react-stately/useListState';\nimport {mergeProps} from '../utils/mergeProps';\nimport {SelectableItemStates} from '../selection/useSelectableItem';\nimport {useDescription} from '../utils/useDescription';\nimport {useFocusable} from '../interactions/useFocusable';\nimport {useGridListItem} from '../gridlist/useGridListItem';\nimport {useId} from '../utils/useId';\nimport {useInteractionModality} from '../interactions/useFocusVisible';\nimport {useKeyboard} from '../interactions/useKeyboard';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\nimport {useSyntheticLinkProps} from '../utils/openLink';\n\nexport interface TagAria extends SelectableItemStates {\n /** Props for the tag row element. */\n rowProps: DOMAttributes;\n /** Props for the tag cell element. */\n gridCellProps: DOMAttributes;\n /** Props for the tag remove button. */\n removeButtonProps: AriaButtonProps;\n /** Whether the tag can be removed. */\n allowsRemoving: boolean;\n}\n\nexport interface AriaTagProps<T> {\n /** An object representing the tag. Contains all the relevant information that makes up the tag. */\n item: Node<T>;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tag component.\n *\n * @param props - Props to be applied to the tag.\n * @param state - State for the tag group, as returned by `useListState`.\n * @param ref - A ref to a DOM element for the tag.\n */\nexport function useTag<T>(\n props: AriaTagProps<T>,\n state: ListState<T>,\n ref: RefObject<FocusableElement | null>\n): TagAria {\n let {item} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/tag');\n let buttonId = useId();\n\n let {onRemove} = hookData.get(state) || {};\n let {rowProps, gridCellProps, ...states} = useGridListItem(\n {\n node: item\n },\n state,\n ref\n );\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {descriptionProps: _, ...stateWithoutDescription} = states;\n\n let isDisabled = state.disabledKeys.has(item.key) || item.props.isDisabled;\n let {keyboardProps} = useKeyboard({\n isDisabled,\n shortcuts: {\n Delete: () => {\n if (state.selectionManager.isSelected(item.key)) {\n onRemove?.(new Set(state.selectionManager.selectedKeys));\n } else {\n onRemove?.(new Set([item.key]));\n }\n },\n Backspace: () => {\n if (state.selectionManager.isSelected(item.key)) {\n onRemove?.(new Set(state.selectionManager.selectedKeys));\n } else {\n onRemove?.(new Set([item.key]));\n }\n }\n },\n allowRepeats: true\n });\n\n let modality = useInteractionModality();\n if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) {\n modality = 'pointer';\n }\n let description =\n onRemove && (modality === 'keyboard' || modality === 'virtual')\n ? stringFormatter.format('removeDescription')\n : '';\n let descProps = useDescription(description);\n\n let isItemFocused = item.key === state.selectionManager.focusedKey;\n let isFocused = state.selectionManager.focusedKey != null;\n let tabIndex = -1;\n if (!isDisabled && (isItemFocused || !isFocused)) {\n tabIndex = 0;\n }\n\n let domProps = filterDOMProps(item.props);\n let linkProps = useSyntheticLinkProps(item.props);\n let {focusableProps} = useFocusable(\n {\n ...item.props,\n isDisabled\n },\n ref\n );\n\n return {\n removeButtonProps: {\n 'aria-label': stringFormatter.format('removeButtonLabel'),\n 'aria-labelledby': `${buttonId} ${rowProps.id}`,\n isDisabled,\n id: buttonId,\n onPress: () => (onRemove ? onRemove(new Set([item.key])) : null)\n },\n rowProps: mergeProps(focusableProps, rowProps, domProps, linkProps, {\n tabIndex,\n ...(onRemove ? keyboardProps : {}),\n 'aria-describedby': descProps['aria-describedby']\n }),\n gridCellProps: mergeProps(gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label']\n }),\n ...stateWithoutDescription,\n allowsRemoving: !!onRemove\n };\n}\n"],"names":[],"version":3,"file":"useTag.mjs.map"}
|
|
@@ -95,6 +95,7 @@ function $7619b0bd43420560$export$4f384c9210e583c3(props, state, inputRef) {
|
|
|
95
95
|
let { labelProps: labelProps, inputProps: textFieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $262100337fa41653$exports.useTextField)(props, inputRef);
|
|
96
96
|
let compositionStartState = (0, $52OX4$react.useRef)(null);
|
|
97
97
|
return {
|
|
98
|
+
// oxlint-disable-next-line react/react-compiler
|
|
98
99
|
inputProps: (0, $89b39774f3b79dbb$exports.mergeProps)(textFieldProps, {
|
|
99
100
|
onBeforeInput: onBeforeInput,
|
|
100
101
|
onCompositionStart () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcD,SAAS;IACP,OACE,OAAO,WAAW,eAClB,OAAO,UAAU,IACjB,OAAO,WAAW,SAAS,CAAC,eAAe,KAAK;AAEpD;AAEO,SAAS,0CACd,KAAyB,EACzB,KAA8B,EAC9B,QAA4C;IAE5C,yEAAyE;IACzE,wEAAwE;IACxE,yEAAyE;IACzE,8EAA8E;IAC9E,oFAAoF;IACpF,yFAAyF;IACzF,IAAI,wBAAwB,CAAA,GAAA,wCAAa,EAAE,CAAC;QAC1C,IAAI,QAAQ,SAAS,OAAO;QAC5B,IAAI,CAAC,OACH;QAGF,0EAA0E;QAC1E,4GAA4G;QAC5G,IAAI,YAA2B;QAC/B,OAAQ,EAAE,SAAS;YACjB,KAAK;YACL,KAAK;gBACH,4FAA4F;gBAC5F,6EAA6E;gBAC7E;YACF,KAAK;gBACH,4GAA4G;gBAC5G;YACF,KAAK;YACL,KAAK;YACL,KAAK;gBACH,YACE,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,cAAc,IAAK,MAAM,KAAK,CAAC,KAAK,C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BACtB;YACF;QACF;oBACA;0BACA;2BACA;QACA,GAAG,UAAU;IACf;AACF","sources":["packages/react-aria/src/textfield/useFormattedTextField.ts"],"sourcesContent":["/*\n * Copyright 2021 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 {AriaTextFieldProps, TextFieldAria, useTextField} from './useTextField';\nimport {getEventTarget} from '../utils/shadowdom/DOMFunctions';\nimport {InputEventHandler, useEffect, useRef} from 'react';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RefObject} from '@react-types/shared';\nimport {useEffectEvent} from '../utils/useEffectEvent';\n\ninterface FormattedTextFieldState {\n validate: (val: string) => boolean;\n setInputValue: (val: string) => void;\n}\n\nfunction supportsNativeBeforeInputEvent() {\n return (\n typeof window !== 'undefined' &&\n window.InputEvent &&\n typeof InputEvent.prototype.getTargetRanges === 'function'\n );\n}\n\nexport function useFormattedTextField(\n props: AriaTextFieldProps,\n state: FormattedTextFieldState,\n inputRef: RefObject<HTMLInputElement | null>\n): TextFieldAria {\n // All browsers implement the 'beforeinput' event natively except Firefox\n // (currently behind a flag as of Firefox 84). React's polyfill does not\n // run in all cases that the native event fires, e.g. when deleting text.\n // Use the native event if available so that we can prevent invalid deletions.\n // We do not attempt to polyfill this in Firefox since it would be very complicated,\n // the benefit of doing so is fairly minor, and it's going to be natively supported soon.\n let onBeforeInputFallback = useEffectEvent((e: InputEvent) => {\n let input = inputRef.current;\n if (!input) {\n return;\n }\n\n // Compute the next value of the input if the event is allowed to proceed.\n // See https://www.w3.org/TR/input-events-2/#interface-InputEvent-Attributes for a full list of input types.\n let nextValue: string | null = null;\n switch (e.inputType) {\n case 'historyUndo':\n case 'historyRedo':\n // Explicitly allow undo/redo. e.data is null in this case, but there's no need to validate,\n // because presumably the input would have already been validated previously.\n return;\n case 'insertLineBreak':\n // Explicitly allow \"insertLineBreak\" event, to allow onSubmit for \"enter\" key. e.data is null in this case.\n return;\n case 'deleteContent':\n case 'deleteByCut':\n case 'deleteByDrag':\n nextValue =\n input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentForward':\n // This is potentially incorrect, since the browser may actually delete more than a single UTF-16\n // character. In reality, a full Unicode grapheme cluster consisting of multiple UTF-16 characters\n // or code points may be deleted. However, in our currently supported locales, there are no such cases.\n // If we support additional locales in the future, this may need to change.\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart!) +\n input.value.slice(input.selectionEnd! + 1)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentBackward':\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart! - 1) +\n input.value.slice(input.selectionStart!)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteSoftLineBackward':\n case 'deleteHardLineBackward':\n nextValue = input.value.slice(input.selectionStart!);\n break;\n default:\n if (e.data != null) {\n nextValue =\n input.value.slice(0, input.selectionStart!) +\n e.data +\n input.value.slice(input.selectionEnd!);\n }\n break;\n }\n\n // If we did not compute a value, or the new value is invalid, prevent the event\n // so that the browser does not update the input text, move the selection, or add to\n // the undo/redo stack.\n if (nextValue == null || !state.validate(nextValue)) {\n e.preventDefault();\n }\n });\n\n useEffect(() => {\n if (!supportsNativeBeforeInputEvent() || !inputRef.current) {\n return;\n }\n\n let input = inputRef.current;\n input.addEventListener('beforeinput', onBeforeInputFallback, false);\n return () => {\n input.removeEventListener('beforeinput', onBeforeInputFallback, false);\n };\n }, [inputRef]);\n\n let onBeforeInput: InputEventHandler<HTMLInputElement> | null = !supportsNativeBeforeInputEvent()\n ? e => {\n let nextValue =\n getEventTarget(e).value.slice(0, getEventTarget(e).selectionStart!) +\n e.data +\n getEventTarget(e).value.slice(getEventTarget(e).selectionEnd!);\n\n if (!state.validate(nextValue)) {\n e.preventDefault();\n }\n }\n : null;\n\n let {\n labelProps,\n inputProps: textFieldProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useTextField(props, inputRef);\n\n let compositionStartState = useRef<{\n value: string;\n selectionStart: number | null;\n selectionEnd: number | null;\n } | null>(null);\n return {\n inputProps: mergeProps(textFieldProps, {\n onBeforeInput,\n onCompositionStart() {\n // Chrome does not implement Input Events Level 2, which specifies the insertFromComposition\n // and deleteByComposition inputType values for the beforeinput event. These are meant to occur\n // at the end of a composition (e.g. Pinyin IME, Android auto correct, etc.), and crucially, are\n // cancelable. The insertCompositionText and deleteCompositionText input types are not cancelable,\n // nor would we want to cancel them because the input from the user is incomplete at that point.\n // In Safari, insertFromComposition/deleteFromComposition will fire, however, allowing us to cancel\n // the final composition result if it is invalid. As a fallback for Chrome and Firefox, which either\n // don't support Input Events Level 2, or beforeinput at all, we store the state of the input when\n // the compositionstart event fires, and undo the changes in compositionend (below) if it is invalid.\n // Unfortunately, this messes up the undo/redo stack, but until insertFromComposition/deleteByComposition\n // are implemented, there is no other way to prevent composed input.\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=1022204\n let {value, selectionStart, selectionEnd} = inputRef.current!;\n compositionStartState.current = {value, selectionStart, selectionEnd};\n },\n onCompositionEnd() {\n if (inputRef.current && !state.validate(inputRef.current.value)) {\n // Restore the input value in the DOM immediately so we can synchronously update the selection position.\n // But also update the value in React state as well so it is correct for future updates.\n let {value, selectionStart, selectionEnd} = compositionStartState.current!;\n inputRef.current.value = value;\n inputRef.current.setSelectionRange(selectionStart, selectionEnd);\n state.setInputValue(value);\n }\n }\n }),\n labelProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n };\n}\n"],"names":[],"version":3,"file":"useFormattedTextField.cj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AIvB;IACV,OAAO;QACL,gDAAgD;QAChD,YAAY,CAAA,GAAA,oCAAS,EAAE,gBAAgB;2BACrC;YACA;gBACE,4FAA4F;gBAC5F,+FAA+F;gBAC/F,gGAAgG;gBAChG,kGAAkG;gBAClG,gGAAgG;gBAChG,mGAAmG;gBACnG,oGAAoG;gBACpG,kGAAkG;gBAClG,qGAAqG;gBACrG,yGAAyG;gBACzG,oEAAoE;gBACpE,oEAAoE;gBACpE,IAAI,SAAC,KAAK,kBAAE,cAAc,gBAAE,YAAY,EAAC,GAAG,SAAS,OAAO;gBAC5D,sBAAsB,OAAO,GAAG;2BAAC;oCAAO;kCAAgB;gBAAY;YACtE;YACA;gBACE,IAAI,SAAS,OAAO,IAAI,CAAC,MAAM,QAAQ,CAAC,SAAS,OAAO,CAAC,KAAK,GAAG;oBAC/D,wGAAwG;oBACxG,wFAAwF;oBACxF,IAAI,SAAC,KAAK,kBAAE,cAAc,gBAAE,YAAY,EAAC,GAAG,sBAAsB,OAAO;oBACzE,SAAS,OAAO,CAAC,KAAK,GAAG;oBACzB,SAAS,OAAO,CAAC,iBAAiB,CAAC,gBAAgB;oBACnD,MAAM,aAAa,CAAC;gBACtB;YACF;QACF;oBACA;0BACA;2BACA;QACA,GAAG,UAAU;IACf;AACF","sources":["packages/react-aria/src/textfield/useFormattedTextField.ts"],"sourcesContent":["/*\n * Copyright 2021 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 {AriaTextFieldProps, TextFieldAria, useTextField} from './useTextField';\nimport {getEventTarget} from '../utils/shadowdom/DOMFunctions';\nimport {InputEventHandler, useEffect, useRef} from 'react';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RefObject} from '@react-types/shared';\nimport {useEffectEvent} from '../utils/useEffectEvent';\n\ninterface FormattedTextFieldState {\n validate: (val: string) => boolean;\n setInputValue: (val: string) => void;\n}\n\nfunction supportsNativeBeforeInputEvent() {\n return (\n typeof window !== 'undefined' &&\n window.InputEvent &&\n typeof InputEvent.prototype.getTargetRanges === 'function'\n );\n}\n\nexport function useFormattedTextField(\n props: AriaTextFieldProps,\n state: FormattedTextFieldState,\n inputRef: RefObject<HTMLInputElement | null>\n): TextFieldAria {\n // All browsers implement the 'beforeinput' event natively except Firefox\n // (currently behind a flag as of Firefox 84). React's polyfill does not\n // run in all cases that the native event fires, e.g. when deleting text.\n // Use the native event if available so that we can prevent invalid deletions.\n // We do not attempt to polyfill this in Firefox since it would be very complicated,\n // the benefit of doing so is fairly minor, and it's going to be natively supported soon.\n let onBeforeInputFallback = useEffectEvent((e: InputEvent) => {\n let input = inputRef.current;\n if (!input) {\n return;\n }\n\n // Compute the next value of the input if the event is allowed to proceed.\n // See https://www.w3.org/TR/input-events-2/#interface-InputEvent-Attributes for a full list of input types.\n let nextValue: string | null = null;\n switch (e.inputType) {\n case 'historyUndo':\n case 'historyRedo':\n // Explicitly allow undo/redo. e.data is null in this case, but there's no need to validate,\n // because presumably the input would have already been validated previously.\n return;\n case 'insertLineBreak':\n // Explicitly allow \"insertLineBreak\" event, to allow onSubmit for \"enter\" key. e.data is null in this case.\n return;\n case 'deleteContent':\n case 'deleteByCut':\n case 'deleteByDrag':\n nextValue =\n input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentForward':\n // This is potentially incorrect, since the browser may actually delete more than a single UTF-16\n // character. In reality, a full Unicode grapheme cluster consisting of multiple UTF-16 characters\n // or code points may be deleted. However, in our currently supported locales, there are no such cases.\n // If we support additional locales in the future, this may need to change.\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart!) +\n input.value.slice(input.selectionEnd! + 1)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentBackward':\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart! - 1) +\n input.value.slice(input.selectionStart!)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteSoftLineBackward':\n case 'deleteHardLineBackward':\n nextValue = input.value.slice(input.selectionStart!);\n break;\n default:\n if (e.data != null) {\n nextValue =\n input.value.slice(0, input.selectionStart!) +\n e.data +\n input.value.slice(input.selectionEnd!);\n }\n break;\n }\n\n // If we did not compute a value, or the new value is invalid, prevent the event\n // so that the browser does not update the input text, move the selection, or add to\n // the undo/redo stack.\n if (nextValue == null || !state.validate(nextValue)) {\n e.preventDefault();\n }\n });\n\n useEffect(() => {\n if (!supportsNativeBeforeInputEvent() || !inputRef.current) {\n return;\n }\n\n let input = inputRef.current;\n input.addEventListener('beforeinput', onBeforeInputFallback, false);\n return () => {\n input.removeEventListener('beforeinput', onBeforeInputFallback, false);\n };\n }, [inputRef]);\n\n let onBeforeInput: InputEventHandler<HTMLInputElement> | null = !supportsNativeBeforeInputEvent()\n ? e => {\n let nextValue =\n getEventTarget(e).value.slice(0, getEventTarget(e).selectionStart!) +\n e.data +\n getEventTarget(e).value.slice(getEventTarget(e).selectionEnd!);\n\n if (!state.validate(nextValue)) {\n e.preventDefault();\n }\n }\n : null;\n\n let {\n labelProps,\n inputProps: textFieldProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useTextField(props, inputRef);\n\n let compositionStartState = useRef<{\n value: string;\n selectionStart: number | null;\n selectionEnd: number | null;\n } | null>(null);\n return {\n // oxlint-disable-next-line react/react-compiler\n inputProps: mergeProps(textFieldProps, {\n onBeforeInput,\n onCompositionStart() {\n // Chrome does not implement Input Events Level 2, which specifies the insertFromComposition\n // and deleteByComposition inputType values for the beforeinput event. These are meant to occur\n // at the end of a composition (e.g. Pinyin IME, Android auto correct, etc.), and crucially, are\n // cancelable. The insertCompositionText and deleteCompositionText input types are not cancelable,\n // nor would we want to cancel them because the input from the user is incomplete at that point.\n // In Safari, insertFromComposition/deleteFromComposition will fire, however, allowing us to cancel\n // the final composition result if it is invalid. As a fallback for Chrome and Firefox, which either\n // don't support Input Events Level 2, or beforeinput at all, we store the state of the input when\n // the compositionstart event fires, and undo the changes in compositionend (below) if it is invalid.\n // Unfortunately, this messes up the undo/redo stack, but until insertFromComposition/deleteByComposition\n // are implemented, there is no other way to prevent composed input.\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=1022204\n let {value, selectionStart, selectionEnd} = inputRef.current!;\n compositionStartState.current = {value, selectionStart, selectionEnd};\n },\n onCompositionEnd() {\n if (inputRef.current && !state.validate(inputRef.current.value)) {\n // Restore the input value in the DOM immediately so we can synchronously update the selection position.\n // But also update the value in React state as well so it is correct for future updates.\n let {value, selectionStart, selectionEnd} = compositionStartState.current!;\n inputRef.current.value = value;\n inputRef.current.setSelectionRange(selectionStart, selectionEnd);\n state.setInputValue(value);\n }\n }\n }),\n labelProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n };\n}\n"],"names":[],"version":3,"file":"useFormattedTextField.cjs.map"}
|
|
@@ -89,6 +89,7 @@ function $a97100a6dd40f368$export$4f384c9210e583c3(props, state, inputRef) {
|
|
|
89
89
|
let { labelProps: labelProps, inputProps: textFieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $032ede929f47bd98$export$712718f7aec83d5)(props, inputRef);
|
|
90
90
|
let compositionStartState = (0, $1gi5y$useRef)(null);
|
|
91
91
|
return {
|
|
92
|
+
// oxlint-disable-next-line react/react-compiler
|
|
92
93
|
inputProps: (0, $64c36edd757dfa16$export$9d1611c77c2fe928)(textFieldProps, {
|
|
93
94
|
onBeforeInput: onBeforeInput,
|
|
94
95
|
onCompositionStart () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;AAAA;;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AE,gBAAgB;2BACrC;YACA;gBACE,4FAA4F;gBAC5F,+FAA+F;gBAC/F,gGAAgG;gBAChG,kGAAkG;gBAClG,gGAAgG;gBAChG,mGAAmG;gBACnG,oGAAoG;gBACpG,kGAAkG;gBAClG,qGAAqG;gBACrG,yGAAyG;gBACzG,oEAAoE;gBACpE,oEAAoE;gBACpE,IAAI,SAAC,KAAK,kBAAE,cAAc,gBAAE,YAAY,EAAC,GAAG,SAAS,OAAO;gBAC5D,sBAAsB,OAAO,GAAG;2BAAC;oCAAO;kCAAgB;gBAAY;YACtE;YACA;gBACE,IAAI,SAAS,OAAO,IAAI,CAAC,MAAM,QAAQ,CAAC,SAAS,OAAO,CAAC,KAAK,GAAG;oBAC/D,wGAAwG;oBACxG,wFAAwF;oBACxF,IAAI,SAAC,KAAK,kBAAE,cAAc,gBAAE,YAAY,EAAC,GAAG,sBAAsB,OAAO;oBACzE,SAAS,OAAO,CAAC,KAAK,GAAG;oBACzB,SAAS,OAAO,CAAC,iBAAiB,CAAC,gBAAgB;oBACnD,MAAM,aAAa,CAAC;gBACtB;YACF;QACF;oBACA;0BACA;2BACA;QACA,GAAG,UAAU;IACf;AACF","sources":["packages/react-aria/src/textfield/useFormattedTextField.ts"],"sourcesContent":["/*\n * Copyright 2021 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 {AriaTextFieldProps, TextFieldAria, useTextField} from './useTextField';\nimport {getEventTarget} from '../utils/shadowdom/DOMFunctions';\nimport {InputEventHandler, useEffect, useRef} from 'react';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RefObject} from '@react-types/shared';\nimport {useEffectEvent} from '../utils/useEffectEvent';\n\ninterface FormattedTextFieldState {\n validate: (val: string) => boolean;\n setInputValue: (val: string) => void;\n}\n\nfunction supportsNativeBeforeInputEvent() {\n return (\n typeof window !== 'undefined' &&\n window.InputEvent &&\n typeof InputEvent.prototype.getTargetRanges === 'function'\n );\n}\n\nexport function useFormattedTextField(\n props: AriaTextFieldProps,\n state: FormattedTextFieldState,\n inputRef: RefObject<HTMLInputElement | null>\n): TextFieldAria {\n // All browsers implement the 'beforeinput' event natively except Firefox\n // (currently behind a flag as of Firefox 84). React's polyfill does not\n // run in all cases that the native event fires, e.g. when deleting text.\n // Use the native event if available so that we can prevent invalid deletions.\n // We do not attempt to polyfill this in Firefox since it would be very complicated,\n // the benefit of doing so is fairly minor, and it's going to be natively supported soon.\n let onBeforeInputFallback = useEffectEvent((e: InputEvent) => {\n let input = inputRef.current;\n if (!input) {\n return;\n }\n\n // Compute the next value of the input if the event is allowed to proceed.\n // See https://www.w3.org/TR/input-events-2/#interface-InputEvent-Attributes for a full list of input types.\n let nextValue: string | null = null;\n switch (e.inputType) {\n case 'historyUndo':\n case 'historyRedo':\n // Explicitly allow undo/redo. e.data is null in this case, but there's no need to validate,\n // because presumably the input would have already been validated previously.\n return;\n case 'insertLineBreak':\n // Explicitly allow \"insertLineBreak\" event, to allow onSubmit for \"enter\" key. e.data is null in this case.\n return;\n case 'deleteContent':\n case 'deleteByCut':\n case 'deleteByDrag':\n nextValue =\n input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentForward':\n // This is potentially incorrect, since the browser may actually delete more than a single UTF-16\n // character. In reality, a full Unicode grapheme cluster consisting of multiple UTF-16 characters\n // or code points may be deleted. However, in our currently supported locales, there are no such cases.\n // If we support additional locales in the future, this may need to change.\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart!) +\n input.value.slice(input.selectionEnd! + 1)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentBackward':\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart! - 1) +\n input.value.slice(input.selectionStart!)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteSoftLineBackward':\n case 'deleteHardLineBackward':\n nextValue = input.value.slice(input.selectionStart!);\n break;\n default:\n if (e.data != null) {\n nextValue =\n input.value.slice(0, input.selectionStart!) +\n e.data +\n input.value.slice(input.selectionEnd!);\n }\n break;\n }\n\n // If we did not compute a value, or the new value is invalid, prevent the event\n // so that the browser does not update the input text, move the selection, or add to\n // the undo/redo stack.\n if (nextValue == null || !state.validate(nextValue)) {\n e.preventDefault();\n }\n });\n\n useEffect(() => {\n if (!supportsNativeBeforeInputEvent() || !inputRef.current) {\n return;\n }\n\n let input = inputRef.current;\n input.addEventListener('beforeinput', onBeforeInputFallback, false);\n return () => {\n input.removeEventListener('beforeinput', onBeforeInputFallback, false);\n };\n }, [inputRef]);\n\n let onBeforeInput: InputEventHandler<HTMLInputElement> | null = !supportsNativeBeforeInputEvent()\n ? e => {\n let nextValue =\n getEventTarget(e).value.slice(0, getEventTarget(e).selectionStart!) +\n e.data +\n getEventTarget(e).value.slice(getEventTarget(e).selectionEnd!);\n\n if (!state.validate(nextValue)) {\n e.preventDefault();\n }\n }\n : null;\n\n let {\n labelProps,\n inputProps: textFieldProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useTextField(props, inputRef);\n\n let compositionStartState = useRef<{\n value: string;\n selectionStart: number | null;\n selectionEnd: number | null;\n } | null>(null);\n return {\n inputProps: mergeProps(textFieldProps, {\n onBeforeInput,\n onCompositionStart() {\n // Chrome does not implement Input Events Level 2, which specifies the insertFromComposition\n // and deleteByComposition inputType values for the beforeinput event. These are meant to occur\n // at the end of a composition (e.g. Pinyin IME, Android auto correct, etc.), and crucially, are\n // cancelable. The insertCompositionText and deleteCompositionText input types are not cancelable,\n // nor would we want to cancel them because the input from the user is incomplete at that point.\n // In Safari, insertFromComposition/deleteFromComposition will fire, however, allowing us to cancel\n // the final composition result if it is invalid. As a fallback for Chrome and Firefox, which either\n // don't support Input Events Level 2, or beforeinput at all, we store the state of the input when\n // the compositionstart event fires, and undo the changes in compositionend (below) if it is invalid.\n // Unfortunately, this messes up the undo/redo stack, but until insertFromComposition/deleteByComposition\n // are implemented, there is no other way to prevent composed input.\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=1022204\n let {value, selectionStart, selectionEnd} = inputRef.current!;\n compositionStartState.current = {value, selectionStart, selectionEnd};\n },\n onCompositionEnd() {\n if (inputRef.current && !state.validate(inputRef.current.value)) {\n // Restore the input value in the DOM immediately so we can synchronously update the selection position.\n // But also update the value in React state as well so it is correct for future updates.\n let {value, selectionStart, selectionEnd} = compositionStartState.current!;\n inputRef.current.value = value;\n inputRef.current.setSelectionRange(selectionStart, selectionEnd);\n state.setInputValue(value);\n }\n }\n }),\n labelProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n };\n}\n"],"names":[],"version":3,"file":"useFormattedTextField.js.map"}
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcD,SAAS;IACP,OACE,OAAO,WAAW,eAClB,OAAO,UAAU,IACjB,OAAO,WAAW,SAAS,CAAC,eAAe,KAAK;AAEpD;AAEO,SAAS,0CACd,KAAyB,EACzB,KAA8B,EAC9B,QAA4C;IAE5C,yEAAyE;IACzE,wEAAwE;IACxE,yEAAyE;IACzE,8EAA8E;IAC9E,oFAAoF;IACpF,yFAAyF;IACzF,IAAI,wBAAwB,CAAA,GAAA,yCAAa,EAAE,CAAC;QAC1C,IAAI,QAAQ,SAAS,OAAO;QAC5B,IAAI,CAAC,OACH;QAGF,0EAA0E;QAC1E,4GAA4G;QAC5G,IAAI,YAA2B;QAC/B,OAAQ,EAAE,SAAS;YACjB,KAAK;YACL,KAAK;gBACH,4FAA4F;gBAC5F,6EAA6E;gBAC7E;YACF,KAAK;gBACH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c,gBAAE,YAAY,EAAC,GAAG,sBAAsB,OAAO;oBACzE,SAAS,OAAO,CAAC,KAAK,GAAG;oBACzB,SAAS,OAAO,CAAC,iBAAiB,CAAC,gBAAgB;oBACnD,MAAM,aAAa,CAAC;gBACtB;YACF;QACF;oBACA;0BACA;2BACA;QACA,GAAG,UAAU;IACf;AACF","sources":["packages/react-aria/src/textfield/useFormattedTextField.ts"],"sourcesContent":["/*\n * Copyright 2021 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 {AriaTextFieldProps, TextFieldAria, useTextField} from './useTextField';\nimport {getEventTarget} from '../utils/shadowdom/DOMFunctions';\nimport {InputEventHandler, useEffect, useRef} from 'react';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RefObject} from '@react-types/shared';\nimport {useEffectEvent} from '../utils/useEffectEvent';\n\ninterface FormattedTextFieldState {\n validate: (val: string) => boolean;\n setInputValue: (val: string) => void;\n}\n\nfunction supportsNativeBeforeInputEvent() {\n return (\n typeof window !== 'undefined' &&\n window.InputEvent &&\n typeof InputEvent.prototype.getTargetRanges === 'function'\n );\n}\n\nexport function useFormattedTextField(\n props: AriaTextFieldProps,\n state: FormattedTextFieldState,\n inputRef: RefObject<HTMLInputElement | null>\n): TextFieldAria {\n // All browsers implement the 'beforeinput' event natively except Firefox\n // (currently behind a flag as of Firefox 84). React's polyfill does not\n // run in all cases that the native event fires, e.g. when deleting text.\n // Use the native event if available so that we can prevent invalid deletions.\n // We do not attempt to polyfill this in Firefox since it would be very complicated,\n // the benefit of doing so is fairly minor, and it's going to be natively supported soon.\n let onBeforeInputFallback = useEffectEvent((e: InputEvent) => {\n let input = inputRef.current;\n if (!input) {\n return;\n }\n\n // Compute the next value of the input if the event is allowed to proceed.\n // See https://www.w3.org/TR/input-events-2/#interface-InputEvent-Attributes for a full list of input types.\n let nextValue: string | null = null;\n switch (e.inputType) {\n case 'historyUndo':\n case 'historyRedo':\n // Explicitly allow undo/redo. e.data is null in this case, but there's no need to validate,\n // because presumably the input would have already been validated previously.\n return;\n case 'insertLineBreak':\n // Explicitly allow \"insertLineBreak\" event, to allow onSubmit for \"enter\" key. e.data is null in this case.\n return;\n case 'deleteContent':\n case 'deleteByCut':\n case 'deleteByDrag':\n nextValue =\n input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentForward':\n // This is potentially incorrect, since the browser may actually delete more than a single UTF-16\n // character. In reality, a full Unicode grapheme cluster consisting of multiple UTF-16 characters\n // or code points may be deleted. However, in our currently supported locales, there are no such cases.\n // If we support additional locales in the future, this may need to change.\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart!) +\n input.value.slice(input.selectionEnd! + 1)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentBackward':\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart! - 1) +\n input.value.slice(input.selectionStart!)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteSoftLineBackward':\n case 'deleteHardLineBackward':\n nextValue = input.value.slice(input.selectionStart!);\n break;\n default:\n if (e.data != null) {\n nextValue =\n input.value.slice(0, input.selectionStart!) +\n e.data +\n input.value.slice(input.selectionEnd!);\n }\n break;\n }\n\n // If we did not compute a value, or the new value is invalid, prevent the event\n // so that the browser does not update the input text, move the selection, or add to\n // the undo/redo stack.\n if (nextValue == null || !state.validate(nextValue)) {\n e.preventDefault();\n }\n });\n\n useEffect(() => {\n if (!supportsNativeBeforeInputEvent() || !inputRef.current) {\n return;\n }\n\n let input = inputRef.current;\n input.addEventListener('beforeinput', onBeforeInputFallback, false);\n return () => {\n input.removeEventListener('beforeinput', onBeforeInputFallback, false);\n };\n }, [inputRef]);\n\n let onBeforeInput: InputEventHandler<HTMLInputElement> | null = !supportsNativeBeforeInputEvent()\n ? e => {\n let nextValue =\n getEventTarget(e).value.slice(0, getEventTarget(e).selectionStart!) +\n e.data +\n getEventTarget(e).value.slice(getEventTarget(e).selectionEnd!);\n\n if (!state.validate(nextValue)) {\n e.preventDefault();\n }\n }\n : null;\n\n let {\n labelProps,\n inputProps: textFieldProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useTextField(props, inputRef);\n\n let compositionStartState = useRef<{\n value: string;\n selectionStart: number | null;\n selectionEnd: number | null;\n } | null>(null);\n return {\n // oxlint-disable-next-line react/react-compiler\n inputProps: mergeProps(textFieldProps, {\n onBeforeInput,\n onCompositionStart() {\n // Chrome does not implement Input Events Level 2, which specifies the insertFromComposition\n // and deleteByComposition inputType values for the beforeinput event. These are meant to occur\n // at the end of a composition (e.g. Pinyin IME, Android auto correct, etc.), and crucially, are\n // cancelable. The insertCompositionText and deleteCompositionText input types are not cancelable,\n // nor would we want to cancel them because the input from the user is incomplete at that point.\n // In Safari, insertFromComposition/deleteFromComposition will fire, however, allowing us to cancel\n // the final composition result if it is invalid. As a fallback for Chrome and Firefox, which either\n // don't support Input Events Level 2, or beforeinput at all, we store the state of the input when\n // the compositionstart event fires, and undo the changes in compositionend (below) if it is invalid.\n // Unfortunately, this messes up the undo/redo stack, but until insertFromComposition/deleteByComposition\n // are implemented, there is no other way to prevent composed input.\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=1022204\n let {value, selectionStart, selectionEnd} = inputRef.current!;\n compositionStartState.current = {value, selectionStart, selectionEnd};\n },\n onCompositionEnd() {\n if (inputRef.current && !state.validate(inputRef.current.value)) {\n // Restore the input value in the DOM immediately so we can synchronously update the selection position.\n // But also update the value in React state as well so it is correct for future updates.\n let {value, selectionStart, selectionEnd} = compositionStartState.current!;\n inputRef.current.value = value;\n inputRef.current.setSelectionRange(selectionStart, selectionEnd);\n state.setInputValue(value);\n }\n }\n }),\n labelProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n };\n}\n"],"names":[],"version":3,"file":"useFormattedTextField.js.map"}
|
|
@@ -89,6 +89,7 @@ function $62888b2ec35be488$export$4f384c9210e583c3(props, state, inputRef) {
|
|
|
89
89
|
let { labelProps: labelProps, inputProps: textFieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $054f71d2330da2e3$export$712718f7aec83d5)(props, inputRef);
|
|
90
90
|
let compositionStartState = (0, $03lbr$useRef)(null);
|
|
91
91
|
return {
|
|
92
|
+
// oxlint-disable-next-line react/react-compiler
|
|
92
93
|
inputProps: (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(textFieldProps, {
|
|
93
94
|
onBeforeInput: onBeforeInput,
|
|
94
95
|
onCompositionStart () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcD,SAAS;IACP,OACE,OAAO,WAAW,eAClB,OAAO,UAAU,IACjB,OAAO,WAAW,SAAS,CAAC,eAAe,KAAK;AAEpD;AAEO,SAAS,0CACd,KAAyB,EACzB,KAA8B,EAC9B,QAA4C;IAE5C,yEAAyE;IACzE,wEAAwE;IACxE,yEAAyE;IACzE,8EAA8E;IAC9E,oFAAoF;IACpF,yFAAyF;IACzF,IAAI,wBAAwB,CAAA,GAAA,yCAAa,EAAE,CAAC;QAC1C,IAAI,QAAQ,SAAS,OAAO;QAC5B,IAAI,CAAC,OACH;QAGF,0EAA0E;QAC1E,4GAA4G;QAC5G,IAAI,YAA2B;QAC/B,OAAQ,EAAE,SAAS;YACjB,KAAK;YACL,KAAK;gBACH,4FAA4F;gBAC5F,6EAA6E;gBAC7E;YACF,KAAK;gBACH,4GAA4G;gBAC5G;YACF,KAAK;YACL,KAAK;YACL,KAAK;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C,KAAK,GAAG;oBACzB,SAAS,OAAO,CAAC,iBAAiB,CAAC,gBAAgB;oBACnD,MAAM,aAAa,CAAC;gBACtB;YACF;QACF;oBACA;0BACA;2BACA;QACA,GAAG,UAAU;IACf;AACF","sources":["packages/react-aria/src/textfield/useFormattedTextField.ts"],"sourcesContent":["/*\n * Copyright 2021 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 {AriaTextFieldProps, TextFieldAria, useTextField} from './useTextField';\nimport {getEventTarget} from '../utils/shadowdom/DOMFunctions';\nimport {InputEventHandler, useEffect, useRef} from 'react';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RefObject} from '@react-types/shared';\nimport {useEffectEvent} from '../utils/useEffectEvent';\n\ninterface FormattedTextFieldState {\n validate: (val: string) => boolean;\n setInputValue: (val: string) => void;\n}\n\nfunction supportsNativeBeforeInputEvent() {\n return (\n typeof window !== 'undefined' &&\n window.InputEvent &&\n typeof InputEvent.prototype.getTargetRanges === 'function'\n );\n}\n\nexport function useFormattedTextField(\n props: AriaTextFieldProps,\n state: FormattedTextFieldState,\n inputRef: RefObject<HTMLInputElement | null>\n): TextFieldAria {\n // All browsers implement the 'beforeinput' event natively except Firefox\n // (currently behind a flag as of Firefox 84). React's polyfill does not\n // run in all cases that the native event fires, e.g. when deleting text.\n // Use the native event if available so that we can prevent invalid deletions.\n // We do not attempt to polyfill this in Firefox since it would be very complicated,\n // the benefit of doing so is fairly minor, and it's going to be natively supported soon.\n let onBeforeInputFallback = useEffectEvent((e: InputEvent) => {\n let input = inputRef.current;\n if (!input) {\n return;\n }\n\n // Compute the next value of the input if the event is allowed to proceed.\n // See https://www.w3.org/TR/input-events-2/#interface-InputEvent-Attributes for a full list of input types.\n let nextValue: string | null = null;\n switch (e.inputType) {\n case 'historyUndo':\n case 'historyRedo':\n // Explicitly allow undo/redo. e.data is null in this case, but there's no need to validate,\n // because presumably the input would have already been validated previously.\n return;\n case 'insertLineBreak':\n // Explicitly allow \"insertLineBreak\" event, to allow onSubmit for \"enter\" key. e.data is null in this case.\n return;\n case 'deleteContent':\n case 'deleteByCut':\n case 'deleteByDrag':\n nextValue =\n input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentForward':\n // This is potentially incorrect, since the browser may actually delete more than a single UTF-16\n // character. In reality, a full Unicode grapheme cluster consisting of multiple UTF-16 characters\n // or code points may be deleted. However, in our currently supported locales, there are no such cases.\n // If we support additional locales in the future, this may need to change.\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart!) +\n input.value.slice(input.selectionEnd! + 1)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentBackward':\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart! - 1) +\n input.value.slice(input.selectionStart!)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteSoftLineBackward':\n case 'deleteHardLineBackward':\n nextValue = input.value.slice(input.selectionStart!);\n break;\n default:\n if (e.data != null) {\n nextValue =\n input.value.slice(0, input.selectionStart!) +\n e.data +\n input.value.slice(input.selectionEnd!);\n }\n break;\n }\n\n // If we did not compute a value, or the new value is invalid, prevent the event\n // so that the browser does not update the input text, move the selection, or add to\n // the undo/redo stack.\n if (nextValue == null || !state.validate(nextValue)) {\n e.preventDefault();\n }\n });\n\n useEffect(() => {\n if (!supportsNativeBeforeInputEvent() || !inputRef.current) {\n return;\n }\n\n let input = inputRef.current;\n input.addEventListener('beforeinput', onBeforeInputFallback, false);\n return () => {\n input.removeEventListener('beforeinput', onBeforeInputFallback, false);\n };\n }, [inputRef]);\n\n let onBeforeInput: InputEventHandler<HTMLInputElement> | null = !supportsNativeBeforeInputEvent()\n ? e => {\n let nextValue =\n getEventTarget(e).value.slice(0, getEventTarget(e).selectionStart!) +\n e.data +\n getEventTarget(e).value.slice(getEventTarget(e).selectionEnd!);\n\n if (!state.validate(nextValue)) {\n e.preventDefault();\n }\n }\n : null;\n\n let {\n labelProps,\n inputProps: textFieldProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useTextField(props, inputRef);\n\n let compositionStartState = useRef<{\n value: string;\n selectionStart: number | null;\n selectionEnd: number | null;\n } | null>(null);\n return {\n inputProps: mergeProps(textFieldProps, {\n onBeforeInput,\n onCompositionStart() {\n // Chrome does not implement Input Events Level 2, which specifies the insertFromComposition\n // and deleteByComposition inputType values for the beforeinput event. These are meant to occur\n // at the end of a composition (e.g. Pinyin IME, Android auto correct, etc.), and crucially, are\n // cancelable. The insertCompositionText and deleteCompositionText input types are not cancelable,\n // nor would we want to cancel them because the input from the user is incomplete at that point.\n // In Safari, insertFromComposition/deleteFromComposition will fire, however, allowing us to cancel\n // the final composition result if it is invalid. As a fallback for Chrome and Firefox, which either\n // don't support Input Events Level 2, or beforeinput at all, we store the state of the input when\n // the compositionstart event fires, and undo the changes in compositionend (below) if it is invalid.\n // Unfortunately, this messes up the undo/redo stack, but until insertFromComposition/deleteByComposition\n // are implemented, there is no other way to prevent composed input.\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=1022204\n let {value, selectionStart, selectionEnd} = inputRef.current!;\n compositionStartState.current = {value, selectionStart, selectionEnd};\n },\n onCompositionEnd() {\n if (inputRef.current && !state.validate(inputRef.current.value)) {\n // Restore the input value in the DOM immediately so we can synchronously update the selection position.\n // But also update the value in React state as well so it is correct for future updates.\n let {value, selectionStart, selectionEnd} = compositionStartState.current!;\n inputRef.current.value = value;\n inputRef.current.setSelectionRange(selectionStart, selectionEnd);\n state.setInputValue(value);\n }\n }\n }),\n labelProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n };\n}\n"],"names":[],"version":3,"file":"useFormattedTextField.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcD,SAAS;IACP,OACE,OAAO,WAAW,eAClB,OAAO,UAAU,IACjB,OAAO,WAAW,SAAS,CAAC,eAAe,KAAK;AAEpD;AAEO,SAAS,0CACd,KAAyB,EACzB,KAA8B,EAC9B,QAA4C;IAE5C,yEAAyE;IACzE,wEAAwE;IACxE,yEAAyE;IACzE,8EAA8E;IAC9E,oFAAoF;IACpF,yFAAyF;IACzF,IAAI,wBAAwB,CAAA,GAAA,yCAAa,EAAE,CAAC;QAC1C,IAAI,QAAQ,SAAS,OAAO;QAC5B,IAAI,CAAC,OACH;QAGF,0EAA0E;QAC1E,4GAA4G;QAC5G,IAAI,YAA2B;QAC/B,OAAQ,EAAE,SAAS;YACjB,KAAK;YACL,KAAK;gBACH,4FAA4F;gBAC5F,6EAA6E;gBAC7E;YACF,KAAK;gBACH,4GAA4G;gBAC5G;YACF,KAAK;YACL,KAAK;YACL,KAAK;gBACH,YACE,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,cAAc,IAAK,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,YAAY;gBACpF;YACF,KAAK;gBACH,iGAAiG;gBACjG,kGAAkG;gBAClG,uGAAuG;gBACvG,2EAA2E;gBAC3E,YACE,MAAM,YAAY,KAAK,MAAM,cAAc,GACvC,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,cAAc,IACzC,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,YAAY,GAAI,KACxC,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,cAAc,IAAK,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,YAAY;gBACxF;YACF,KAAK;gBACH,YACE,MAAM,YAAY,KAAK,MAAM,cAAc,GACvC,MAAM,KAAK,CAAC,K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J,GAAG,CAAA,GAAA,wCAAW,EAAE,OAAO;IAExB,IAAI,wBAAwB,CAAA,GAAA,aAAK,EAIvB;IACV,OAAO;QACL,gDAAgD;QAChD,YAAY,CAAA,GAAA,yCAAS,EAAE,gBAAgB;2BACrC;YACA;gBACE,4FAA4F;gBAC5F,+FAA+F;gBAC/F,gGAAgG;gBAChG,kGAAkG;gBAClG,gGAAgG;gBAChG,mGAAmG;gBACnG,oGAAoG;gBACpG,kGAAkG;gBAClG,qGAAqG;gBACrG,yGAAyG;gBACzG,oEAAoE;gBACpE,oEAAoE;gBACpE,IAAI,SAAC,KAAK,kBAAE,cAAc,gBAAE,YAAY,EAAC,GAAG,SAAS,OAAO;gBAC5D,sBAAsB,OAAO,GAAG;2BAAC;oCAAO;kCAAgB;gBAAY;YACtE;YACA;gBACE,IAAI,SAAS,OAAO,IAAI,CAAC,MAAM,QAAQ,CAAC,SAAS,OAAO,CAAC,KAAK,GAAG;oBAC/D,wGAAwG;oBACxG,wFAAwF;oBACxF,IAAI,SAAC,KAAK,kBAAE,cAAc,gBAAE,YAAY,EAAC,GAAG,sBAAsB,OAAO;oBACzE,SAAS,OAAO,CAAC,KAAK,GAAG;oBACzB,SAAS,OAAO,CAAC,iBAAiB,CAAC,gBAAgB;oBACnD,MAAM,aAAa,CAAC;gBACtB;YACF;QACF;oBACA;0BACA;2BACA;QACA,GAAG,UAAU;IACf;AACF","sources":["packages/react-aria/src/textfield/useFormattedTextField.ts"],"sourcesContent":["/*\n * Copyright 2021 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 {AriaTextFieldProps, TextFieldAria, useTextField} from './useTextField';\nimport {getEventTarget} from '../utils/shadowdom/DOMFunctions';\nimport {InputEventHandler, useEffect, useRef} from 'react';\nimport {mergeProps} from '../utils/mergeProps';\nimport {RefObject} from '@react-types/shared';\nimport {useEffectEvent} from '../utils/useEffectEvent';\n\ninterface FormattedTextFieldState {\n validate: (val: string) => boolean;\n setInputValue: (val: string) => void;\n}\n\nfunction supportsNativeBeforeInputEvent() {\n return (\n typeof window !== 'undefined' &&\n window.InputEvent &&\n typeof InputEvent.prototype.getTargetRanges === 'function'\n );\n}\n\nexport function useFormattedTextField(\n props: AriaTextFieldProps,\n state: FormattedTextFieldState,\n inputRef: RefObject<HTMLInputElement | null>\n): TextFieldAria {\n // All browsers implement the 'beforeinput' event natively except Firefox\n // (currently behind a flag as of Firefox 84). React's polyfill does not\n // run in all cases that the native event fires, e.g. when deleting text.\n // Use the native event if available so that we can prevent invalid deletions.\n // We do not attempt to polyfill this in Firefox since it would be very complicated,\n // the benefit of doing so is fairly minor, and it's going to be natively supported soon.\n let onBeforeInputFallback = useEffectEvent((e: InputEvent) => {\n let input = inputRef.current;\n if (!input) {\n return;\n }\n\n // Compute the next value of the input if the event is allowed to proceed.\n // See https://www.w3.org/TR/input-events-2/#interface-InputEvent-Attributes for a full list of input types.\n let nextValue: string | null = null;\n switch (e.inputType) {\n case 'historyUndo':\n case 'historyRedo':\n // Explicitly allow undo/redo. e.data is null in this case, but there's no need to validate,\n // because presumably the input would have already been validated previously.\n return;\n case 'insertLineBreak':\n // Explicitly allow \"insertLineBreak\" event, to allow onSubmit for \"enter\" key. e.data is null in this case.\n return;\n case 'deleteContent':\n case 'deleteByCut':\n case 'deleteByDrag':\n nextValue =\n input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentForward':\n // This is potentially incorrect, since the browser may actually delete more than a single UTF-16\n // character. In reality, a full Unicode grapheme cluster consisting of multiple UTF-16 characters\n // or code points may be deleted. However, in our currently supported locales, there are no such cases.\n // If we support additional locales in the future, this may need to change.\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart!) +\n input.value.slice(input.selectionEnd! + 1)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteContentBackward':\n nextValue =\n input.selectionEnd === input.selectionStart\n ? input.value.slice(0, input.selectionStart! - 1) +\n input.value.slice(input.selectionStart!)\n : input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);\n break;\n case 'deleteSoftLineBackward':\n case 'deleteHardLineBackward':\n nextValue = input.value.slice(input.selectionStart!);\n break;\n default:\n if (e.data != null) {\n nextValue =\n input.value.slice(0, input.selectionStart!) +\n e.data +\n input.value.slice(input.selectionEnd!);\n }\n break;\n }\n\n // If we did not compute a value, or the new value is invalid, prevent the event\n // so that the browser does not update the input text, move the selection, or add to\n // the undo/redo stack.\n if (nextValue == null || !state.validate(nextValue)) {\n e.preventDefault();\n }\n });\n\n useEffect(() => {\n if (!supportsNativeBeforeInputEvent() || !inputRef.current) {\n return;\n }\n\n let input = inputRef.current;\n input.addEventListener('beforeinput', onBeforeInputFallback, false);\n return () => {\n input.removeEventListener('beforeinput', onBeforeInputFallback, false);\n };\n }, [inputRef]);\n\n let onBeforeInput: InputEventHandler<HTMLInputElement> | null = !supportsNativeBeforeInputEvent()\n ? e => {\n let nextValue =\n getEventTarget(e).value.slice(0, getEventTarget(e).selectionStart!) +\n e.data +\n getEventTarget(e).value.slice(getEventTarget(e).selectionEnd!);\n\n if (!state.validate(nextValue)) {\n e.preventDefault();\n }\n }\n : null;\n\n let {\n labelProps,\n inputProps: textFieldProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useTextField(props, inputRef);\n\n let compositionStartState = useRef<{\n value: string;\n selectionStart: number | null;\n selectionEnd: number | null;\n } | null>(null);\n return {\n // oxlint-disable-next-line react/react-compiler\n inputProps: mergeProps(textFieldProps, {\n onBeforeInput,\n onCompositionStart() {\n // Chrome does not implement Input Events Level 2, which specifies the insertFromComposition\n // and deleteByComposition inputType values for the beforeinput event. These are meant to occur\n // at the end of a composition (e.g. Pinyin IME, Android auto correct, etc.), and crucially, are\n // cancelable. The insertCompositionText and deleteCompositionText input types are not cancelable,\n // nor would we want to cancel them because the input from the user is incomplete at that point.\n // In Safari, insertFromComposition/deleteFromComposition will fire, however, allowing us to cancel\n // the final composition result if it is invalid. As a fallback for Chrome and Firefox, which either\n // don't support Input Events Level 2, or beforeinput at all, we store the state of the input when\n // the compositionstart event fires, and undo the changes in compositionend (below) if it is invalid.\n // Unfortunately, this messes up the undo/redo stack, but until insertFromComposition/deleteByComposition\n // are implemented, there is no other way to prevent composed input.\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=1022204\n let {value, selectionStart, selectionEnd} = inputRef.current!;\n compositionStartState.current = {value, selectionStart, selectionEnd};\n },\n onCompositionEnd() {\n if (inputRef.current && !state.validate(inputRef.current.value)) {\n // Restore the input value in the DOM immediately so we can synchronously update the selection position.\n // But also update the value in React state as well so it is correct for future updates.\n let {value, selectionStart, selectionEnd} = compositionStartState.current!;\n inputRef.current.value = value;\n inputRef.current.setSelectionRange(selectionStart, selectionEnd);\n state.setInputValue(value);\n }\n }\n }),\n labelProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n };\n}\n"],"names":[],"version":3,"file":"useFormattedTextField.mjs.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAkCM,SAAS,0CACd,KAAwB,EACxB,KAAoB,EACpB,6DAA6D;AAC7D,GAAuC;IAEvC,IAAI,OAAC,GAAG,SAAE,KAAK,WAAE,OAAO,EAAC,GAAG,MAAM,KAAK;IAEvC,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,SAAS,QAAQ,WAAW,MAC9B;QAGF,MAAM,KAAK,CAAC;QACZ,OAAO;YACL,MAAM,KAAK;QACb;IACF,GAAG;QAAC;QAAO;KAAQ;IAEnB,IAAI,UAAU,CAAA,GAAA,+BAAI;IAClB,IAAI,gBAAgB,CAAA,GAAA,mCAAQ;IAC5B,IAAI,kBAAkB,CAAA,GAAA,qDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,wGAAwG;IACxG,mJAAmJ;IACnJ,2CAA2C;IAC3C,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,qBAAO,EAAE;IACzC,CAAA,GAAA,yCAAc,EAAE;QACd,aAAa;IACf,GAAG,EAAE;IAEL,IAAI,aAAa,CAAA,GAAA,wCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAEvD,OAAO;QACL,YAAY;YACV,GAAG,UAAU;YACb,MAAM;YACN,cAAc;YACd,mBAAmB,KAAK,CAAC,kBAAkB,IAAI;YAC/C,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;YACjD,UAAU;QACZ;QACA,cAAc;YACZ,MAAM;YACN,eAAe;YACf,eAAe,YAAY,YAAY;QACzC;QACA,YAAY;YACV,IAAI;QACN;QACA,kBAAkB;YAChB,IAAI;QACN;QACA,kBAAkB;YAChB,cAAc,gBAAgB,MAAM,CAAC;YACrC,SAAS,IAAM,MAAM,KAAK,CAAC;QAC7B;IACF;AACF","sources":["packages/react-aria/src/toast/useToast.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaButtonProps} from '../button/useButton';\nimport {AriaLabelingProps, DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport intlMessages from '../../intl/toast/*.json';\nimport {QueuedToast, ToastState} from 'react-stately/useToastState';\nimport {useEffect, useState} from 'react';\nimport {useId, useSlotId} from '../utils/useId';\nimport {useLayoutEffect} from '../utils/useLayoutEffect';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\n\nexport interface AriaToastProps<T> extends AriaLabelingProps {\n /** The toast object. */\n toast: QueuedToast<T>;\n}\n\nexport interface ToastAria {\n /** Props for the toast container, non-modal dialog element. */\n toastProps: DOMAttributes;\n /** Props for the toast content alert message. */\n contentProps: DOMAttributes;\n /** Props for the toast title element. */\n titleProps: DOMAttributes;\n /** Props for the toast description element, if any. */\n descriptionProps: DOMAttributes;\n /** Props for the toast close button. */\n closeButtonProps: AriaButtonProps;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toast component. Toasts display\n * brief, temporary notifications of actions, errors, or other events in an application.\n */\nexport function useToast<T>(\n props: AriaToastProps<T>,\n state: ToastState<T>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ref: RefObject<FocusableElement | null>\n): ToastAria {\n let {key, timer, timeout} = props.toast;\n\n useEffect(() => {\n if (timer == null || timeout == null) {\n return;\n }\n\n timer.reset(timeout);\n return () => {\n timer.pause();\n };\n }, [timer, timeout]);\n\n let titleId = useId();\n let descriptionId = useSlotId();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/toast');\n\n // This is required for NVDA announcements, without it NVDA will NOT announce the toast when it appears.\n // Originally was tied to animationStart/End via https://github.com/adobe/react-spectrum/pull/6223/commits/e22e319df64958e822ab7cd9685e96818cae9ba5\n // but toasts don't always have animations.\n let [isVisible, setIsVisible] = useState(false);\n useLayoutEffect(() => {\n setIsVisible(true);\n }, []);\n\n let toastProps = filterDOMProps(props, {labelable: true});\n\n return {\n toastProps: {\n ...toastProps,\n role: 'alertdialog',\n 'aria-modal': 'false',\n 'aria-labelledby': props['aria-labelledby'] || titleId,\n 'aria-describedby': props['aria-describedby'] || descriptionId,\n tabIndex: 0\n },\n contentProps: {\n role: 'alert',\n 'aria-atomic': 'true',\n 'aria-hidden': isVisible ? undefined : 'true'\n },\n titleProps: {\n id: titleId\n },\n descriptionProps: {\n id: descriptionId\n },\n closeButtonProps: {\n 'aria-label': stringFormatter.format('close'),\n onPress: () => state.close(key)\n }\n };\n}\n"],"names":[],"version":3,"file":"useToast.cjs.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAkCM,SAAS,0CACd,KAAwB,EACxB,KAAoB,EACpB,6DAA6D;AAC7D,GAAuC;IAEvC,IAAI,OAAC,GAAG,SAAE,KAAK,WAAE,OAAO,EAAC,GAAG,MAAM,KAAK;IAEvC,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,SAAS,QAAQ,WAAW,MAC9B;QAGF,MAAM,KAAK,CAAC;QACZ,OAAO;YACL,MAAM,KAAK;QACb;IACF,GAAG;QAAC;QAAO;KAAQ;IAEnB,IAAI,UAAU,CAAA,GAAA,yCAAI;IAClB,IAAI,gBAAgB,CAAA,GAAA,yCAAQ;IAC5B,IAAI,kBAAkB,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,8CAAW,GAAG;IAEhE,wGAAwG;IACxG,mJAAmJ;IACnJ,2CAA2C;IAC3C,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,eAAO,EAAE;IACzC,CAAA,GAAA,yCAAc,EAAE;QACd,aAAa;IACf,GAAG,EAAE;IAEL,IAAI,aAAa,CAAA,GAAA,yCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAEvD,OAAO;QACL,YAAY;YACV,GAAG,UAAU;YACb,MAAM;YACN,cAAc;YACd,mBAAmB,KAAK,CAAC,kBAAkB,IAAI;YAC/C,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;YACjD,UAAU;QACZ;QACA,cAAc;YACZ,MAAM;YACN,eAAe;YACf,eAAe,YAAY,YAAY;QACzC;QACA,YAAY;YACV,IAAI;QACN;QACA,kBAAkB;YAChB,IAAI;QACN;QACA,kBAAkB;YAChB,cAAc,gBAAgB,MAAM,CAAC;YACrC,SAAS,IAAM,MAAM,KAAK,CAAC;QAC7B;IACF;AACF","sources":["packages/react-aria/src/toast/useToast.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaButtonProps} from '../button/useButton';\nimport {AriaLabelingProps, DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport intlMessages from '../../intl/toast/*.json';\nimport {QueuedToast, ToastState} from 'react-stately/useToastState';\nimport {useEffect, useState} from 'react';\nimport {useId, useSlotId} from '../utils/useId';\nimport {useLayoutEffect} from '../utils/useLayoutEffect';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\n\nexport interface AriaToastProps<T> extends AriaLabelingProps {\n /** The toast object. */\n toast: QueuedToast<T>;\n}\n\nexport interface ToastAria {\n /** Props for the toast container, non-modal dialog element. */\n toastProps: DOMAttributes;\n /** Props for the toast content alert message. */\n contentProps: DOMAttributes;\n /** Props for the toast title element. */\n titleProps: DOMAttributes;\n /** Props for the toast description element, if any. */\n descriptionProps: DOMAttributes;\n /** Props for the toast close button. */\n closeButtonProps: AriaButtonProps;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toast component. Toasts display\n * brief, temporary notifications of actions, errors, or other events in an application.\n */\nexport function useToast<T>(\n props: AriaToastProps<T>,\n state: ToastState<T>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ref: RefObject<FocusableElement | null>\n): ToastAria {\n let {key, timer, timeout} = props.toast;\n\n useEffect(() => {\n if (timer == null || timeout == null) {\n return;\n }\n\n timer.reset(timeout);\n return () => {\n timer.pause();\n };\n }, [timer, timeout]);\n\n let titleId = useId();\n let descriptionId = useSlotId();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/toast');\n\n // This is required for NVDA announcements, without it NVDA will NOT announce the toast when it appears.\n // Originally was tied to animationStart/End via https://github.com/adobe/react-spectrum/pull/6223/commits/e22e319df64958e822ab7cd9685e96818cae9ba5\n // but toasts don't always have animations.\n let [isVisible, setIsVisible] = useState(false);\n useLayoutEffect(() => {\n setIsVisible(true);\n }, []);\n\n let toastProps = filterDOMProps(props, {labelable: true});\n\n return {\n toastProps: {\n ...toastProps,\n role: 'alertdialog',\n 'aria-modal': 'false',\n 'aria-labelledby': props['aria-labelledby'] || titleId,\n 'aria-describedby': props['aria-describedby'] || descriptionId,\n tabIndex: 0\n },\n contentProps: {\n role: 'alert',\n 'aria-atomic': 'true',\n 'aria-hidden': isVisible ? undefined : 'true'\n },\n titleProps: {\n id: titleId\n },\n descriptionProps: {\n id: descriptionId\n },\n closeButtonProps: {\n 'aria-label': stringFormatter.format('close'),\n onPress: () => state.close(key)\n }\n };\n}\n"],"names":[],"version":3,"file":"useToast.js.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAkCM,SAAS,0CACd,KAAwB,EACxB,KAAoB,EACpB,6DAA6D;AAC7D,GAAuC;IAEvC,IAAI,OAAC,GAAG,SAAE,KAAK,WAAE,OAAO,EAAC,GAAG,MAAM,KAAK;IAEvC,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,SAAS,QAAQ,WAAW,MAC9B;QAGF,MAAM,KAAK,CAAC;QACZ,OAAO;YACL,MAAM,KAAK;QACb;IACF,GAAG;QAAC;QAAO;KAAQ;IAEnB,IAAI,UAAU,CAAA,GAAA,yCAAI;IAClB,IAAI,gBAAgB,CAAA,GAAA,yCAAQ;IAC5B,IAAI,kBAAkB,CAAA,GAAA,yCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAEhE,wGAAwG;IACxG,mJAAmJ;IACnJ,2CAA2C;IAC3C,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,eAAO,EAAE;IACzC,CAAA,GAAA,yCAAc,EAAE;QACd,aAAa;IACf,GAAG,EAAE;IAEL,IAAI,aAAa,CAAA,GAAA,yCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAEvD,OAAO;QACL,YAAY;YACV,GAAG,UAAU;YACb,MAAM;YACN,cAAc;YACd,mBAAmB,KAAK,CAAC,kBAAkB,IAAI;YAC/C,oBAAoB,KAAK,CAAC,mBAAmB,IAAI;YACjD,UAAU;QACZ;QACA,cAAc;YACZ,MAAM;YACN,eAAe;YACf,eAAe,YAAY,YAAY;QACzC;QACA,YAAY;YACV,IAAI;QACN;QACA,kBAAkB;YAChB,IAAI;QACN;QACA,kBAAkB;YAChB,cAAc,gBAAgB,MAAM,CAAC;YACrC,SAAS,IAAM,MAAM,KAAK,CAAC;QAC7B;IACF;AACF","sources":["packages/react-aria/src/toast/useToast.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaButtonProps} from '../button/useButton';\nimport {AriaLabelingProps, DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';\nimport {filterDOMProps} from '../utils/filterDOMProps';\nimport intlMessages from '../../intl/toast/*.json';\nimport {QueuedToast, ToastState} from 'react-stately/useToastState';\nimport {useEffect, useState} from 'react';\nimport {useId, useSlotId} from '../utils/useId';\nimport {useLayoutEffect} from '../utils/useLayoutEffect';\nimport {useLocalizedStringFormatter} from '../i18n/useLocalizedStringFormatter';\n\nexport interface AriaToastProps<T> extends AriaLabelingProps {\n /** The toast object. */\n toast: QueuedToast<T>;\n}\n\nexport interface ToastAria {\n /** Props for the toast container, non-modal dialog element. */\n toastProps: DOMAttributes;\n /** Props for the toast content alert message. */\n contentProps: DOMAttributes;\n /** Props for the toast title element. */\n titleProps: DOMAttributes;\n /** Props for the toast description element, if any. */\n descriptionProps: DOMAttributes;\n /** Props for the toast close button. */\n closeButtonProps: AriaButtonProps;\n}\n\n/**\n * Provides the behavior and accessibility implementation for a toast component. Toasts display\n * brief, temporary notifications of actions, errors, or other events in an application.\n */\nexport function useToast<T>(\n props: AriaToastProps<T>,\n state: ToastState<T>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ref: RefObject<FocusableElement | null>\n): ToastAria {\n let {key, timer, timeout} = props.toast;\n\n useEffect(() => {\n if (timer == null || timeout == null) {\n return;\n }\n\n timer.reset(timeout);\n return () => {\n timer.pause();\n };\n }, [timer, timeout]);\n\n let titleId = useId();\n let descriptionId = useSlotId();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/toast');\n\n // This is required for NVDA announcements, without it NVDA will NOT announce the toast when it appears.\n // Originally was tied to animationStart/End via https://github.com/adobe/react-spectrum/pull/6223/commits/e22e319df64958e822ab7cd9685e96818cae9ba5\n // but toasts don't always have animations.\n let [isVisible, setIsVisible] = useState(false);\n useLayoutEffect(() => {\n setIsVisible(true);\n }, []);\n\n let toastProps = filterDOMProps(props, {labelable: true});\n\n return {\n toastProps: {\n ...toastProps,\n role: 'alertdialog',\n 'aria-modal': 'false',\n 'aria-labelledby': props['aria-labelledby'] || titleId,\n 'aria-describedby': props['aria-describedby'] || descriptionId,\n tabIndex: 0\n },\n contentProps: {\n role: 'alert',\n 'aria-atomic': 'true',\n 'aria-hidden': isVisible ? undefined : 'true'\n },\n titleProps: {\n id: titleId\n },\n descriptionProps: {\n id: descriptionId\n },\n closeButtonProps: {\n 'aria-label': stringFormatter.format('close'),\n onPress: () => state.close(key)\n }\n };\n}\n"],"names":[],"version":3,"file":"useToast.mjs.map"}
|