@depup/react-aria-components 1.16.0-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +31 -0
- package/changes.json +10 -0
- package/dist/Autocomplete.main.js +78 -0
- package/dist/Autocomplete.main.js.map +1 -0
- package/dist/Autocomplete.mjs +67 -0
- package/dist/Autocomplete.module.js +67 -0
- package/dist/Autocomplete.module.js.map +1 -0
- package/dist/Breadcrumbs.main.js +103 -0
- package/dist/Breadcrumbs.main.js.map +1 -0
- package/dist/Breadcrumbs.mjs +92 -0
- package/dist/Breadcrumbs.module.js +92 -0
- package/dist/Breadcrumbs.module.js.map +1 -0
- package/dist/Button.main.js +123 -0
- package/dist/Button.main.js.map +1 -0
- package/dist/Button.mjs +113 -0
- package/dist/Button.module.js +113 -0
- package/dist/Button.module.js.map +1 -0
- package/dist/Calendar.main.js +364 -0
- package/dist/Calendar.main.js.map +1 -0
- package/dist/Calendar.mjs +345 -0
- package/dist/Calendar.module.js +345 -0
- package/dist/Calendar.module.js.map +1 -0
- package/dist/Checkbox.main.js +188 -0
- package/dist/Checkbox.main.js.map +1 -0
- package/dist/Checkbox.mjs +176 -0
- package/dist/Checkbox.module.js +176 -0
- package/dist/Checkbox.module.js.map +1 -0
- package/dist/Collection.main.js +105 -0
- package/dist/Collection.main.js.map +1 -0
- package/dist/Collection.mjs +91 -0
- package/dist/Collection.module.js +91 -0
- package/dist/Collection.module.js.map +1 -0
- package/dist/ColorArea.main.js +80 -0
- package/dist/ColorArea.main.js.map +1 -0
- package/dist/ColorArea.mjs +70 -0
- package/dist/ColorArea.module.js +70 -0
- package/dist/ColorArea.module.js.map +1 -0
- package/dist/ColorField.main.js +168 -0
- package/dist/ColorField.main.js.map +1 -0
- package/dist/ColorField.mjs +158 -0
- package/dist/ColorField.module.js +158 -0
- package/dist/ColorField.module.js.map +1 -0
- package/dist/ColorPicker.main.js +102 -0
- package/dist/ColorPicker.main.js.map +1 -0
- package/dist/ColorPicker.mjs +91 -0
- package/dist/ColorPicker.module.js +91 -0
- package/dist/ColorPicker.module.js.map +1 -0
- package/dist/ColorSlider.main.js +112 -0
- package/dist/ColorSlider.main.js.map +1 -0
- package/dist/ColorSlider.mjs +102 -0
- package/dist/ColorSlider.module.js +102 -0
- package/dist/ColorSlider.module.js.map +1 -0
- package/dist/ColorSwatch.main.js +44 -0
- package/dist/ColorSwatch.main.js.map +1 -0
- package/dist/ColorSwatch.mjs +34 -0
- package/dist/ColorSwatch.module.js +34 -0
- package/dist/ColorSwatch.module.js.map +1 -0
- package/dist/ColorSwatchPicker.main.js +102 -0
- package/dist/ColorSwatchPicker.main.js.map +1 -0
- package/dist/ColorSwatchPicker.mjs +95 -0
- package/dist/ColorSwatchPicker.module.js +95 -0
- package/dist/ColorSwatchPicker.module.js.map +1 -0
- package/dist/ColorThumb.main.js +67 -0
- package/dist/ColorThumb.main.js.map +1 -0
- package/dist/ColorThumb.mjs +57 -0
- package/dist/ColorThumb.module.js +57 -0
- package/dist/ColorThumb.module.js.map +1 -0
- package/dist/ColorWheel.main.js +102 -0
- package/dist/ColorWheel.main.js.map +1 -0
- package/dist/ColorWheel.mjs +90 -0
- package/dist/ColorWheel.module.js +90 -0
- package/dist/ColorWheel.module.js.map +1 -0
- package/dist/ComboBox.main.js +322 -0
- package/dist/ComboBox.main.js.map +1 -0
- package/dist/ComboBox.mjs +309 -0
- package/dist/ComboBox.module.js +309 -0
- package/dist/ComboBox.module.js.map +1 -0
- package/dist/DateField.main.js +361 -0
- package/dist/DateField.main.js.map +1 -0
- package/dist/DateField.mjs +345 -0
- package/dist/DateField.module.js +345 -0
- package/dist/DateField.module.js.map +1 -0
- package/dist/DatePicker.main.js +342 -0
- package/dist/DatePicker.main.js.map +1 -0
- package/dist/DatePicker.mjs +328 -0
- package/dist/DatePicker.module.js +328 -0
- package/dist/DatePicker.module.js.map +1 -0
- package/dist/Dialog.main.js +167 -0
- package/dist/Dialog.main.js.map +1 -0
- package/dist/Dialog.mjs +155 -0
- package/dist/Dialog.module.js +155 -0
- package/dist/Dialog.module.js.map +1 -0
- package/dist/Disclosure.main.js +171 -0
- package/dist/Disclosure.main.js.map +1 -0
- package/dist/Disclosure.mjs +157 -0
- package/dist/Disclosure.module.js +157 -0
- package/dist/Disclosure.module.js.map +1 -0
- package/dist/DragAndDrop.main.js +103 -0
- package/dist/DragAndDrop.main.js.map +1 -0
- package/dist/DragAndDrop.mjs +90 -0
- package/dist/DragAndDrop.module.js +90 -0
- package/dist/DragAndDrop.module.js.map +1 -0
- package/dist/DropZone.main.js +127 -0
- package/dist/DropZone.main.js.map +1 -0
- package/dist/DropZone.mjs +121 -0
- package/dist/DropZone.module.js +121 -0
- package/dist/DropZone.module.js.map +1 -0
- package/dist/FieldError.main.js +61 -0
- package/dist/FieldError.main.js.map +1 -0
- package/dist/FieldError.mjs +51 -0
- package/dist/FieldError.module.js +51 -0
- package/dist/FieldError.module.js.map +1 -0
- package/dist/FileTrigger.main.js +60 -0
- package/dist/FileTrigger.main.js.map +1 -0
- package/dist/FileTrigger.mjs +51 -0
- package/dist/FileTrigger.module.js +51 -0
- package/dist/FileTrigger.module.js.map +1 -0
- package/dist/Form.main.js +49 -0
- package/dist/Form.main.js.map +1 -0
- package/dist/Form.mjs +39 -0
- package/dist/Form.module.js +39 -0
- package/dist/Form.module.js.map +1 -0
- package/dist/GridList.main.js +589 -0
- package/dist/GridList.main.js.map +1 -0
- package/dist/GridList.mjs +573 -0
- package/dist/GridList.module.js +573 -0
- package/dist/GridList.module.js.map +1 -0
- package/dist/Group.main.js +72 -0
- package/dist/Group.main.js.map +1 -0
- package/dist/Group.mjs +62 -0
- package/dist/Group.module.js +62 -0
- package/dist/Group.module.js.map +1 -0
- package/dist/Header.main.js +40 -0
- package/dist/Header.main.js.map +1 -0
- package/dist/Header.mjs +30 -0
- package/dist/Header.module.js +30 -0
- package/dist/Header.module.js.map +1 -0
- package/dist/Heading.main.js +40 -0
- package/dist/Heading.main.js.map +1 -0
- package/dist/Heading.mjs +31 -0
- package/dist/Heading.module.js +31 -0
- package/dist/Heading.module.js.map +1 -0
- package/dist/HiddenDateInput.main.js +126 -0
- package/dist/HiddenDateInput.main.js.map +1 -0
- package/dist/HiddenDateInput.mjs +117 -0
- package/dist/HiddenDateInput.module.js +117 -0
- package/dist/HiddenDateInput.module.js.map +1 -0
- package/dist/Input.main.js +72 -0
- package/dist/Input.main.js.map +1 -0
- package/dist/Input.mjs +62 -0
- package/dist/Input.module.js +62 -0
- package/dist/Input.module.js.map +1 -0
- package/dist/Keyboard.main.js +38 -0
- package/dist/Keyboard.main.js.map +1 -0
- package/dist/Keyboard.mjs +28 -0
- package/dist/Keyboard.module.js +28 -0
- package/dist/Keyboard.module.js.map +1 -0
- package/dist/Label.main.js +43 -0
- package/dist/Label.main.js.map +1 -0
- package/dist/Label.mjs +33 -0
- package/dist/Label.module.js +33 -0
- package/dist/Label.module.js.map +1 -0
- package/dist/Link.main.js +72 -0
- package/dist/Link.main.js.map +1 -0
- package/dist/Link.mjs +62 -0
- package/dist/Link.module.js +62 -0
- package/dist/Link.module.js.map +1 -0
- package/dist/ListBox.main.js +477 -0
- package/dist/ListBox.main.js.map +1 -0
- package/dist/ListBox.mjs +463 -0
- package/dist/ListBox.module.js +463 -0
- package/dist/ListBox.module.js.map +1 -0
- package/dist/Menu.main.js +459 -0
- package/dist/Menu.main.js.map +1 -0
- package/dist/Menu.mjs +443 -0
- package/dist/Menu.module.js +443 -0
- package/dist/Menu.module.js.map +1 -0
- package/dist/Meter.main.js +72 -0
- package/dist/Meter.main.js.map +1 -0
- package/dist/Meter.mjs +62 -0
- package/dist/Meter.module.js +62 -0
- package/dist/Meter.module.js.map +1 -0
- package/dist/Modal.main.js +191 -0
- package/dist/Modal.main.js.map +1 -0
- package/dist/Modal.mjs +180 -0
- package/dist/Modal.module.js +180 -0
- package/dist/Modal.module.js.map +1 -0
- package/dist/NumberField.main.js +147 -0
- package/dist/NumberField.main.js.map +1 -0
- package/dist/NumberField.mjs +136 -0
- package/dist/NumberField.module.js +136 -0
- package/dist/NumberField.module.js.map +1 -0
- package/dist/OverlayArrow.main.js +64 -0
- package/dist/OverlayArrow.main.js.map +1 -0
- package/dist/OverlayArrow.mjs +54 -0
- package/dist/OverlayArrow.module.js +54 -0
- package/dist/OverlayArrow.module.js.map +1 -0
- package/dist/Popover.main.js +196 -0
- package/dist/Popover.main.js.map +1 -0
- package/dist/Popover.mjs +186 -0
- package/dist/Popover.module.js +186 -0
- package/dist/Popover.module.js.map +1 -0
- package/dist/ProgressBar.main.js +73 -0
- package/dist/ProgressBar.main.js.map +1 -0
- package/dist/ProgressBar.mjs +63 -0
- package/dist/ProgressBar.module.js +63 -0
- package/dist/ProgressBar.module.js.map +1 -0
- package/dist/RSPContexts.main.js +37 -0
- package/dist/RSPContexts.main.js.map +1 -0
- package/dist/RSPContexts.mjs +25 -0
- package/dist/RSPContexts.module.js +25 -0
- package/dist/RSPContexts.module.js.map +1 -0
- package/dist/RadioGroup.main.js +184 -0
- package/dist/RadioGroup.main.js.map +1 -0
- package/dist/RadioGroup.mjs +171 -0
- package/dist/RadioGroup.module.js +171 -0
- package/dist/RadioGroup.module.js.map +1 -0
- package/dist/SearchField.main.js +140 -0
- package/dist/SearchField.main.js.map +1 -0
- package/dist/SearchField.mjs +130 -0
- package/dist/SearchField.module.js +130 -0
- package/dist/SearchField.module.js.map +1 -0
- package/dist/Select.main.js +324 -0
- package/dist/Select.main.js.map +1 -0
- package/dist/Select.mjs +315 -0
- package/dist/Select.module.js +315 -0
- package/dist/Select.module.js.map +1 -0
- package/dist/SelectionIndicator.main.js +45 -0
- package/dist/SelectionIndicator.main.js.map +1 -0
- package/dist/SelectionIndicator.mjs +35 -0
- package/dist/SelectionIndicator.module.js +35 -0
- package/dist/SelectionIndicator.module.js.map +1 -0
- package/dist/Separator.main.js +71 -0
- package/dist/Separator.main.js.map +1 -0
- package/dist/Separator.mjs +61 -0
- package/dist/Separator.module.js +61 -0
- package/dist/Separator.module.js.map +1 -0
- package/dist/SharedElementTransition.main.js +140 -0
- package/dist/SharedElementTransition.main.js.map +1 -0
- package/dist/SharedElementTransition.mjs +130 -0
- package/dist/SharedElementTransition.module.js +130 -0
- package/dist/SharedElementTransition.module.js.map +1 -0
- package/dist/Slider.main.js +220 -0
- package/dist/Slider.main.js.map +1 -0
- package/dist/Slider.mjs +204 -0
- package/dist/Slider.module.js +204 -0
- package/dist/Slider.module.js.map +1 -0
- package/dist/Switch.main.js +89 -0
- package/dist/Switch.main.js.map +1 -0
- package/dist/Switch.mjs +79 -0
- package/dist/Switch.module.js +79 -0
- package/dist/Switch.module.js.map +1 -0
- package/dist/Table.main.js +1171 -0
- package/dist/Table.main.js.map +1 -0
- package/dist/Table.mjs +1154 -0
- package/dist/Table.module.js +1154 -0
- package/dist/Table.module.js.map +1 -0
- package/dist/TableLayout.main.js +38 -0
- package/dist/TableLayout.main.js.map +1 -0
- package/dist/TableLayout.mjs +33 -0
- package/dist/TableLayout.module.js +33 -0
- package/dist/TableLayout.module.js.map +1 -0
- package/dist/Tabs.main.js +330 -0
- package/dist/Tabs.main.js.map +1 -0
- package/dist/Tabs.mjs +315 -0
- package/dist/Tabs.module.js +315 -0
- package/dist/Tabs.module.js.map +1 -0
- package/dist/TagGroup.main.js +255 -0
- package/dist/TagGroup.main.js.map +1 -0
- package/dist/TagGroup.mjs +242 -0
- package/dist/TagGroup.module.js +242 -0
- package/dist/TagGroup.module.js.map +1 -0
- package/dist/Text.main.js +41 -0
- package/dist/Text.main.js.map +1 -0
- package/dist/Text.mjs +31 -0
- package/dist/Text.module.js +31 -0
- package/dist/Text.module.js.map +1 -0
- package/dist/TextArea.main.js +57 -0
- package/dist/TextArea.main.js.map +1 -0
- package/dist/TextArea.mjs +47 -0
- package/dist/TextArea.module.js +47 -0
- package/dist/TextArea.module.js.map +1 -0
- package/dist/TextField.main.js +145 -0
- package/dist/TextField.main.js.map +1 -0
- package/dist/TextField.mjs +135 -0
- package/dist/TextField.module.js +135 -0
- package/dist/TextField.module.js.map +1 -0
- package/dist/Toast.main.js +183 -0
- package/dist/Toast.main.js.map +1 -0
- package/dist/Toast.mjs +170 -0
- package/dist/Toast.module.js +170 -0
- package/dist/Toast.module.js.map +1 -0
- package/dist/ToggleButton.main.js +96 -0
- package/dist/ToggleButton.main.js.map +1 -0
- package/dist/ToggleButton.mjs +86 -0
- package/dist/ToggleButton.module.js +86 -0
- package/dist/ToggleButton.module.js.map +1 -0
- package/dist/ToggleButtonGroup.main.js +66 -0
- package/dist/ToggleButtonGroup.main.js.map +1 -0
- package/dist/ToggleButtonGroup.mjs +55 -0
- package/dist/ToggleButtonGroup.module.js +55 -0
- package/dist/ToggleButtonGroup.module.js.map +1 -0
- package/dist/Toolbar.main.js +55 -0
- package/dist/Toolbar.main.js.map +1 -0
- package/dist/Toolbar.mjs +45 -0
- package/dist/Toolbar.module.js +45 -0
- package/dist/Toolbar.module.js.map +1 -0
- package/dist/Tooltip.main.js +132 -0
- package/dist/Tooltip.main.js.map +1 -0
- package/dist/Tooltip.mjs +120 -0
- package/dist/Tooltip.module.js +120 -0
- package/dist/Tooltip.module.js.map +1 -0
- package/dist/Tree.main.js +834 -0
- package/dist/Tree.main.js.map +1 -0
- package/dist/Tree.mjs +818 -0
- package/dist/Tree.module.js +818 -0
- package/dist/Tree.module.js.map +1 -0
- package/dist/TreeDropTargetDelegate.main.js +216 -0
- package/dist/TreeDropTargetDelegate.main.js.map +1 -0
- package/dist/TreeDropTargetDelegate.mjs +211 -0
- package/dist/TreeDropTargetDelegate.module.js +211 -0
- package/dist/TreeDropTargetDelegate.module.js.map +1 -0
- package/dist/Virtualizer.main.js +135 -0
- package/dist/Virtualizer.main.js.map +1 -0
- package/dist/Virtualizer.mjs +126 -0
- package/dist/Virtualizer.module.js +126 -0
- package/dist/Virtualizer.module.js.map +1 -0
- package/dist/ar-AE.main.js +9 -0
- package/dist/ar-AE.main.js.map +1 -0
- package/dist/ar-AE.mjs +11 -0
- package/dist/ar-AE.module.js +11 -0
- package/dist/ar-AE.module.js.map +1 -0
- package/dist/bg-BG.main.js +9 -0
- package/dist/bg-BG.main.js.map +1 -0
- package/dist/bg-BG.mjs +11 -0
- package/dist/bg-BG.module.js +11 -0
- package/dist/bg-BG.module.js.map +1 -0
- package/dist/cs-CZ.main.js +9 -0
- package/dist/cs-CZ.main.js.map +1 -0
- package/dist/cs-CZ.mjs +11 -0
- package/dist/cs-CZ.module.js +11 -0
- package/dist/cs-CZ.module.js.map +1 -0
- package/dist/da-DK.main.js +9 -0
- package/dist/da-DK.main.js.map +1 -0
- package/dist/da-DK.mjs +11 -0
- package/dist/da-DK.module.js +11 -0
- package/dist/da-DK.module.js.map +1 -0
- package/dist/de-DE.main.js +9 -0
- package/dist/de-DE.main.js.map +1 -0
- package/dist/de-DE.mjs +11 -0
- package/dist/de-DE.module.js +11 -0
- package/dist/de-DE.module.js.map +1 -0
- package/dist/el-GR.main.js +9 -0
- package/dist/el-GR.main.js.map +1 -0
- package/dist/el-GR.mjs +11 -0
- package/dist/el-GR.module.js +11 -0
- package/dist/el-GR.module.js.map +1 -0
- package/dist/en-US.main.js +9 -0
- package/dist/en-US.main.js.map +1 -0
- package/dist/en-US.mjs +11 -0
- package/dist/en-US.module.js +11 -0
- package/dist/en-US.module.js.map +1 -0
- package/dist/es-ES.main.js +9 -0
- package/dist/es-ES.main.js.map +1 -0
- package/dist/es-ES.mjs +11 -0
- package/dist/es-ES.module.js +11 -0
- package/dist/es-ES.module.js.map +1 -0
- package/dist/et-EE.main.js +9 -0
- package/dist/et-EE.main.js.map +1 -0
- package/dist/et-EE.mjs +11 -0
- package/dist/et-EE.module.js +11 -0
- package/dist/et-EE.module.js.map +1 -0
- package/dist/fi-FI.main.js +9 -0
- package/dist/fi-FI.main.js.map +1 -0
- package/dist/fi-FI.mjs +11 -0
- package/dist/fi-FI.module.js +11 -0
- package/dist/fi-FI.module.js.map +1 -0
- package/dist/fr-FR.main.js +9 -0
- package/dist/fr-FR.main.js.map +1 -0
- package/dist/fr-FR.mjs +11 -0
- package/dist/fr-FR.module.js +11 -0
- package/dist/fr-FR.module.js.map +1 -0
- package/dist/he-IL.main.js +9 -0
- package/dist/he-IL.main.js.map +1 -0
- package/dist/he-IL.mjs +11 -0
- package/dist/he-IL.module.js +11 -0
- package/dist/he-IL.module.js.map +1 -0
- package/dist/hr-HR.main.js +9 -0
- package/dist/hr-HR.main.js.map +1 -0
- package/dist/hr-HR.mjs +11 -0
- package/dist/hr-HR.module.js +11 -0
- package/dist/hr-HR.module.js.map +1 -0
- package/dist/hu-HU.main.js +9 -0
- package/dist/hu-HU.main.js.map +1 -0
- package/dist/hu-HU.mjs +11 -0
- package/dist/hu-HU.module.js +11 -0
- package/dist/hu-HU.module.js.map +1 -0
- package/dist/import.mjs +161 -0
- package/dist/intlStrings.main.js +108 -0
- package/dist/intlStrings.main.js.map +1 -0
- package/dist/intlStrings.mjs +110 -0
- package/dist/intlStrings.module.js +110 -0
- package/dist/intlStrings.module.js.map +1 -0
- package/dist/it-IT.main.js +9 -0
- package/dist/it-IT.main.js.map +1 -0
- package/dist/it-IT.mjs +11 -0
- package/dist/it-IT.module.js +11 -0
- package/dist/it-IT.module.js.map +1 -0
- package/dist/ja-JP.main.js +9 -0
- package/dist/ja-JP.main.js.map +1 -0
- package/dist/ja-JP.mjs +11 -0
- package/dist/ja-JP.module.js +11 -0
- package/dist/ja-JP.module.js.map +1 -0
- package/dist/ko-KR.main.js +9 -0
- package/dist/ko-KR.main.js.map +1 -0
- package/dist/ko-KR.mjs +11 -0
- package/dist/ko-KR.module.js +11 -0
- package/dist/ko-KR.module.js.map +1 -0
- package/dist/lt-LT.main.js +9 -0
- package/dist/lt-LT.main.js.map +1 -0
- package/dist/lt-LT.mjs +11 -0
- package/dist/lt-LT.module.js +11 -0
- package/dist/lt-LT.module.js.map +1 -0
- package/dist/lv-LV.main.js +9 -0
- package/dist/lv-LV.main.js.map +1 -0
- package/dist/lv-LV.mjs +11 -0
- package/dist/lv-LV.module.js +11 -0
- package/dist/lv-LV.module.js.map +1 -0
- package/dist/main.js +430 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +161 -0
- package/dist/module.js.map +1 -0
- package/dist/nb-NO.main.js +9 -0
- package/dist/nb-NO.main.js.map +1 -0
- package/dist/nb-NO.mjs +11 -0
- package/dist/nb-NO.module.js +11 -0
- package/dist/nb-NO.module.js.map +1 -0
- package/dist/nl-NL.main.js +9 -0
- package/dist/nl-NL.main.js.map +1 -0
- package/dist/nl-NL.mjs +11 -0
- package/dist/nl-NL.module.js +11 -0
- package/dist/nl-NL.module.js.map +1 -0
- package/dist/pl-PL.main.js +9 -0
- package/dist/pl-PL.main.js.map +1 -0
- package/dist/pl-PL.mjs +11 -0
- package/dist/pl-PL.module.js +11 -0
- package/dist/pl-PL.module.js.map +1 -0
- package/dist/pt-BR.main.js +9 -0
- package/dist/pt-BR.main.js.map +1 -0
- package/dist/pt-BR.mjs +11 -0
- package/dist/pt-BR.module.js +11 -0
- package/dist/pt-BR.module.js.map +1 -0
- package/dist/pt-PT.main.js +9 -0
- package/dist/pt-PT.main.js.map +1 -0
- package/dist/pt-PT.mjs +11 -0
- package/dist/pt-PT.module.js +11 -0
- package/dist/pt-PT.module.js.map +1 -0
- package/dist/ro-RO.main.js +9 -0
- package/dist/ro-RO.main.js.map +1 -0
- package/dist/ro-RO.mjs +11 -0
- package/dist/ro-RO.module.js +11 -0
- package/dist/ro-RO.module.js.map +1 -0
- package/dist/ru-RU.main.js +9 -0
- package/dist/ru-RU.main.js.map +1 -0
- package/dist/ru-RU.mjs +11 -0
- package/dist/ru-RU.module.js +11 -0
- package/dist/ru-RU.module.js.map +1 -0
- package/dist/sk-SK.main.js +9 -0
- package/dist/sk-SK.main.js.map +1 -0
- package/dist/sk-SK.mjs +11 -0
- package/dist/sk-SK.module.js +11 -0
- package/dist/sk-SK.module.js.map +1 -0
- package/dist/sl-SI.main.js +9 -0
- package/dist/sl-SI.main.js.map +1 -0
- package/dist/sl-SI.mjs +11 -0
- package/dist/sl-SI.module.js +11 -0
- package/dist/sl-SI.module.js.map +1 -0
- package/dist/sr-SP.main.js +9 -0
- package/dist/sr-SP.main.js.map +1 -0
- package/dist/sr-SP.mjs +11 -0
- package/dist/sr-SP.module.js +11 -0
- package/dist/sr-SP.module.js.map +1 -0
- package/dist/sv-SE.main.js +9 -0
- package/dist/sv-SE.main.js.map +1 -0
- package/dist/sv-SE.mjs +11 -0
- package/dist/sv-SE.module.js +11 -0
- package/dist/sv-SE.module.js.map +1 -0
- package/dist/tr-TR.main.js +9 -0
- package/dist/tr-TR.main.js.map +1 -0
- package/dist/tr-TR.mjs +11 -0
- package/dist/tr-TR.module.js +11 -0
- package/dist/tr-TR.module.js.map +1 -0
- package/dist/types.d.ts +3764 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/uk-UA.main.js +9 -0
- package/dist/uk-UA.main.js.map +1 -0
- package/dist/uk-UA.mjs +11 -0
- package/dist/uk-UA.module.js +11 -0
- package/dist/uk-UA.module.js.map +1 -0
- package/dist/useDragAndDrop.main.js +74 -0
- package/dist/useDragAndDrop.main.js.map +1 -0
- package/dist/useDragAndDrop.mjs +69 -0
- package/dist/useDragAndDrop.module.js +69 -0
- package/dist/useDragAndDrop.module.js.map +1 -0
- package/dist/utils.main.js +205 -0
- package/dist/utils.main.js.map +1 -0
- package/dist/utils.mjs +188 -0
- package/dist/utils.module.js +188 -0
- package/dist/utils.module.js.map +1 -0
- package/dist/zh-CN.main.js +9 -0
- package/dist/zh-CN.main.js.map +1 -0
- package/dist/zh-CN.mjs +11 -0
- package/dist/zh-CN.module.js +11 -0
- package/dist/zh-CN.module.js.map +1 -0
- package/dist/zh-TW.main.js +9 -0
- package/dist/zh-TW.main.js.map +1 -0
- package/dist/zh-TW.mjs +11 -0
- package/dist/zh-TW.module.js +11 -0
- package/dist/zh-TW.module.js.map +1 -0
- package/i18n/ar-AE.js +1 -0
- package/i18n/ar-AE.mjs +1 -0
- package/i18n/bg-BG.js +1 -0
- package/i18n/bg-BG.mjs +1 -0
- package/i18n/cs-CZ.js +1 -0
- package/i18n/cs-CZ.mjs +1 -0
- package/i18n/da-DK.js +1 -0
- package/i18n/da-DK.mjs +1 -0
- package/i18n/de-DE.js +1 -0
- package/i18n/de-DE.mjs +1 -0
- package/i18n/el-GR.js +1 -0
- package/i18n/el-GR.mjs +1 -0
- package/i18n/en-US.js +1 -0
- package/i18n/en-US.mjs +1 -0
- package/i18n/es-ES.js +1 -0
- package/i18n/es-ES.mjs +1 -0
- package/i18n/et-EE.js +1 -0
- package/i18n/et-EE.mjs +1 -0
- package/i18n/fi-FI.js +1 -0
- package/i18n/fi-FI.mjs +1 -0
- package/i18n/fr-FR.js +1 -0
- package/i18n/fr-FR.mjs +1 -0
- package/i18n/he-IL.js +1 -0
- package/i18n/he-IL.mjs +1 -0
- package/i18n/hr-HR.js +1 -0
- package/i18n/hr-HR.mjs +1 -0
- package/i18n/hu-HU.js +1 -0
- package/i18n/hu-HU.mjs +1 -0
- package/i18n/index.d.ts +13 -0
- package/i18n/index.js +118 -0
- package/i18n/index.mjs +115 -0
- package/i18n/it-IT.js +1 -0
- package/i18n/it-IT.mjs +1 -0
- package/i18n/ja-JP.js +1 -0
- package/i18n/ja-JP.mjs +1 -0
- package/i18n/ko-KR.js +1 -0
- package/i18n/ko-KR.mjs +1 -0
- package/i18n/lang.d.ts +7 -0
- package/i18n/lt-LT.js +1 -0
- package/i18n/lt-LT.mjs +1 -0
- package/i18n/lv-LV.js +1 -0
- package/i18n/lv-LV.mjs +1 -0
- package/i18n/nb-NO.js +1 -0
- package/i18n/nb-NO.mjs +1 -0
- package/i18n/nl-NL.js +1 -0
- package/i18n/nl-NL.mjs +1 -0
- package/i18n/pl-PL.js +1 -0
- package/i18n/pl-PL.mjs +1 -0
- package/i18n/pt-BR.js +1 -0
- package/i18n/pt-BR.mjs +1 -0
- package/i18n/pt-PT.js +1 -0
- package/i18n/pt-PT.mjs +1 -0
- package/i18n/ro-RO.js +1 -0
- package/i18n/ro-RO.mjs +1 -0
- package/i18n/ru-RU.js +1 -0
- package/i18n/ru-RU.mjs +1 -0
- package/i18n/sk-SK.js +1 -0
- package/i18n/sk-SK.mjs +1 -0
- package/i18n/sl-SI.js +1 -0
- package/i18n/sl-SI.mjs +1 -0
- package/i18n/sr-SP.js +1 -0
- package/i18n/sr-SP.mjs +1 -0
- package/i18n/sv-SE.js +1 -0
- package/i18n/sv-SE.mjs +1 -0
- package/i18n/tr-TR.js +1 -0
- package/i18n/tr-TR.mjs +1 -0
- package/i18n/uk-UA.js +1 -0
- package/i18n/uk-UA.mjs +1 -0
- package/i18n/zh-CN.js +1 -0
- package/i18n/zh-CN.mjs +1 -0
- package/i18n/zh-TW.js +1 -0
- package/i18n/zh-TW.mjs +1 -0
- package/package.json +105 -0
- package/src/Autocomplete.tsx +64 -0
- package/src/Breadcrumbs.tsx +137 -0
- package/src/Button.tsx +185 -0
- package/src/Calendar.tsx +620 -0
- package/src/Checkbox.tsx +282 -0
- package/src/Collection.tsx +225 -0
- package/src/ColorArea.tsx +89 -0
- package/src/ColorField.tsx +243 -0
- package/src/ColorPicker.tsx +63 -0
- package/src/ColorSlider.tsx +110 -0
- package/src/ColorSwatch.tsx +54 -0
- package/src/ColorSwatchPicker.tsx +125 -0
- package/src/ColorThumb.tsx +108 -0
- package/src/ColorWheel.tsx +122 -0
- package/src/ComboBox.tsx +325 -0
- package/src/DateField.tsx +425 -0
- package/src/DatePicker.tsx +334 -0
- package/src/Dialog.tsx +159 -0
- package/src/Disclosure.tsx +259 -0
- package/src/DragAndDrop.tsx +115 -0
- package/src/DropZone.tsx +145 -0
- package/src/FieldError.tsx +57 -0
- package/src/FileTrigger.tsx +79 -0
- package/src/Form.tsx +52 -0
- package/src/GridList.tsx +678 -0
- package/src/Group.tsx +114 -0
- package/src/Header.tsx +28 -0
- package/src/Heading.tsx +31 -0
- package/src/HiddenDateInput.tsx +152 -0
- package/src/Input.tsx +113 -0
- package/src/Keyboard.tsx +23 -0
- package/src/Label.tsx +29 -0
- package/src/Link.tsx +115 -0
- package/src/ListBox.tsx +577 -0
- package/src/Menu.tsx +496 -0
- package/src/Meter.tsx +93 -0
- package/src/Modal.tsx +262 -0
- package/src/NumberField.tsx +152 -0
- package/src/OverlayArrow.tsx +91 -0
- package/src/Popover.tsx +267 -0
- package/src/ProgressBar.tsx +101 -0
- package/src/RSPContexts.ts +52 -0
- package/src/RadioGroup.tsx +273 -0
- package/src/SearchField.tsx +152 -0
- package/src/Select.tsx +356 -0
- package/src/SelectionIndicator.tsx +46 -0
- package/src/Separator.tsx +76 -0
- package/src/SharedElementTransition.tsx +186 -0
- package/src/Slider.tsx +310 -0
- package/src/Switch.tsx +146 -0
- package/src/Table.tsx +1597 -0
- package/src/TableLayout.ts +28 -0
- package/src/Tabs.tsx +495 -0
- package/src/TagGroup.tsx +310 -0
- package/src/Text.tsx +28 -0
- package/src/TextArea.tsx +65 -0
- package/src/TextField.tsx +148 -0
- package/src/Toast.tsx +248 -0
- package/src/ToggleButton.tsx +103 -0
- package/src/ToggleButtonGroup.tsx +90 -0
- package/src/Toolbar.tsx +69 -0
- package/src/Tooltip.tsx +187 -0
- package/src/Tree.tsx +1066 -0
- package/src/TreeDropTargetDelegate.ts +308 -0
- package/src/Virtualizer.tsx +174 -0
- package/src/index.ts +160 -0
- package/src/useDragAndDrop.tsx +150 -0
- package/src/utils.tsx +351 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var $c5ccf687772c0422$exports = require("./utils.main.js");
|
|
2
|
+
var $2d10bc562fea46b3$exports = require("./SharedElementTransition.main.js");
|
|
3
|
+
var $lAR0I$react = require("react");
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function $parcel$interopDefault(a) {
|
|
7
|
+
return a && a.__esModule ? a.default : a;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function $parcel$export(e, n, v, s) {
|
|
11
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
$parcel$export(module.exports, "SelectionIndicatorContext", () => $54e872c96e6d295b$export$c9549807523555e0);
|
|
15
|
+
$parcel$export(module.exports, "SelectionIndicator", () => $54e872c96e6d295b$export$17f80983afe4e444);
|
|
16
|
+
/*
|
|
17
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
18
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
+
*
|
|
22
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
+
* governing permissions and limitations under the License.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
const $54e872c96e6d295b$export$c9549807523555e0 = /*#__PURE__*/ (0, $lAR0I$react.createContext)({
|
|
30
|
+
isSelected: false
|
|
31
|
+
});
|
|
32
|
+
const $54e872c96e6d295b$export$17f80983afe4e444 = /*#__PURE__*/ (0, $lAR0I$react.forwardRef)(function SelectionIndicator(props, ref) {
|
|
33
|
+
[props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $54e872c96e6d295b$export$c9549807523555e0);
|
|
34
|
+
let { isSelected: isSelected, ...otherProps } = props;
|
|
35
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($lAR0I$react))).createElement((0, $2d10bc562fea46b3$exports.SharedElement), {
|
|
36
|
+
...otherProps,
|
|
37
|
+
ref: ref,
|
|
38
|
+
className: props.className || 'react-aria-SelectionIndicator',
|
|
39
|
+
name: "SelectionIndicator",
|
|
40
|
+
isVisible: isSelected
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=SelectionIndicator.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAgBM,MAAM,0DAA4B,CAAA,GAAA,0BAAY,EAAyD;IAC5G,YAAY;AACd;AAMO,MAAM,0DAAqB,CAAA,GAAA,uBAAS,EAAE,SAAS,mBAAmB,KAA8B,EAAE,GAAiC;IACxI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,cAAC,UAAU,EAAE,GAAG,YAAW,GAAG;IAClC,qBACE,0DAAC,CAAA,GAAA,uCAAY;QACV,GAAG,UAAU;QACd,KAAK;QACL,WAAW,MAAM,SAAS,IAAI;QAC9B,MAAK;QACL,WAAW;;AAEjB","sources":["packages/react-aria-components/src/SelectionIndicator.tsx"],"sourcesContent":["/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ClassNameOrFunction, ContextValue, useContextProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SharedElement, SharedElementPropsBase, SharedElementRenderProps} from './SharedElementTransition';\n\nexport interface SelectionIndicatorProps extends SharedElementPropsBase {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-SelectionIndicator'\n */\n className?: ClassNameOrFunction<SharedElementRenderProps>,\n /** Whether the SelectionIndicator is visible. This is usually set automatically by the parent component. */\n isSelected?: boolean\n}\n\nexport const SelectionIndicatorContext = createContext<ContextValue<SelectionIndicatorProps, HTMLDivElement>>({\n isSelected: false\n});\n\n\n/**\n * An animated indicator of selection state within a group of items.\n */\nexport const SelectionIndicator = forwardRef(function SelectionIndicator(props: SelectionIndicatorProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, SelectionIndicatorContext);\n let {isSelected, ...otherProps} = props;\n return (\n <SharedElement\n {...otherProps}\n ref={ref}\n className={props.className || 'react-aria-SelectionIndicator'}\n name=\"SelectionIndicator\"\n isVisible={isSelected} />\n );\n});\n"],"names":[],"version":3,"file":"SelectionIndicator.main.js.map"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415} from "./utils.mjs";
|
|
2
|
+
import {SharedElement as $c8a5a149f625efcf$export$c34620ff8881d89f} from "./SharedElementTransition.mjs";
|
|
3
|
+
import $4GgyL$react, {createContext as $4GgyL$createContext, forwardRef as $4GgyL$forwardRef} from "react";
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
7
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
+
* governing permissions and limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
const $1d5b8b8664671ef2$export$c9549807523555e0 = /*#__PURE__*/ (0, $4GgyL$createContext)({
|
|
19
|
+
isSelected: false
|
|
20
|
+
});
|
|
21
|
+
const $1d5b8b8664671ef2$export$17f80983afe4e444 = /*#__PURE__*/ (0, $4GgyL$forwardRef)(function SelectionIndicator(props, ref) {
|
|
22
|
+
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $1d5b8b8664671ef2$export$c9549807523555e0);
|
|
23
|
+
let { isSelected: isSelected, ...otherProps } = props;
|
|
24
|
+
return /*#__PURE__*/ (0, $4GgyL$react).createElement((0, $c8a5a149f625efcf$export$c34620ff8881d89f), {
|
|
25
|
+
...otherProps,
|
|
26
|
+
ref: ref,
|
|
27
|
+
className: props.className || 'react-aria-SelectionIndicator',
|
|
28
|
+
name: "SelectionIndicator",
|
|
29
|
+
isVisible: isSelected
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export {$1d5b8b8664671ef2$export$c9549807523555e0 as SelectionIndicatorContext, $1d5b8b8664671ef2$export$17f80983afe4e444 as SelectionIndicator};
|
|
35
|
+
//# sourceMappingURL=SelectionIndicator.module.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415} from "./utils.module.js";
|
|
2
|
+
import {SharedElement as $c8a5a149f625efcf$export$c34620ff8881d89f} from "./SharedElementTransition.module.js";
|
|
3
|
+
import $4GgyL$react, {createContext as $4GgyL$createContext, forwardRef as $4GgyL$forwardRef} from "react";
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
7
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
+
* governing permissions and limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
const $1d5b8b8664671ef2$export$c9549807523555e0 = /*#__PURE__*/ (0, $4GgyL$createContext)({
|
|
19
|
+
isSelected: false
|
|
20
|
+
});
|
|
21
|
+
const $1d5b8b8664671ef2$export$17f80983afe4e444 = /*#__PURE__*/ (0, $4GgyL$forwardRef)(function SelectionIndicator(props, ref) {
|
|
22
|
+
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $1d5b8b8664671ef2$export$c9549807523555e0);
|
|
23
|
+
let { isSelected: isSelected, ...otherProps } = props;
|
|
24
|
+
return /*#__PURE__*/ (0, $4GgyL$react).createElement((0, $c8a5a149f625efcf$export$c34620ff8881d89f), {
|
|
25
|
+
...otherProps,
|
|
26
|
+
ref: ref,
|
|
27
|
+
className: props.className || 'react-aria-SelectionIndicator',
|
|
28
|
+
name: "SelectionIndicator",
|
|
29
|
+
isVisible: isSelected
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export {$1d5b8b8664671ef2$export$c9549807523555e0 as SelectionIndicatorContext, $1d5b8b8664671ef2$export$17f80983afe4e444 as SelectionIndicator};
|
|
35
|
+
//# sourceMappingURL=SelectionIndicator.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAgBM,MAAM,0DAA4B,CAAA,GAAA,oBAAY,EAAyD;IAC5G,YAAY;AACd;AAMO,MAAM,0DAAqB,CAAA,GAAA,iBAAS,EAAE,SAAS,mBAAmB,KAA8B,EAAE,GAAiC;IACxI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,cAAC,UAAU,EAAE,GAAG,YAAW,GAAG;IAClC,qBACE,gCAAC,CAAA,GAAA,yCAAY;QACV,GAAG,UAAU;QACd,KAAK;QACL,WAAW,MAAM,SAAS,IAAI;QAC9B,MAAK;QACL,WAAW;;AAEjB","sources":["packages/react-aria-components/src/SelectionIndicator.tsx"],"sourcesContent":["/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ClassNameOrFunction, ContextValue, useContextProps} from './utils';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\nimport {SharedElement, SharedElementPropsBase, SharedElementRenderProps} from './SharedElementTransition';\n\nexport interface SelectionIndicatorProps extends SharedElementPropsBase {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n * @default 'react-aria-SelectionIndicator'\n */\n className?: ClassNameOrFunction<SharedElementRenderProps>,\n /** Whether the SelectionIndicator is visible. This is usually set automatically by the parent component. */\n isSelected?: boolean\n}\n\nexport const SelectionIndicatorContext = createContext<ContextValue<SelectionIndicatorProps, HTMLDivElement>>({\n isSelected: false\n});\n\n\n/**\n * An animated indicator of selection state within a group of items.\n */\nexport const SelectionIndicator = forwardRef(function SelectionIndicator(props: SelectionIndicatorProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, SelectionIndicatorContext);\n let {isSelected, ...otherProps} = props;\n return (\n <SharedElement\n {...otherProps}\n ref={ref}\n className={props.className || 'react-aria-SelectionIndicator'}\n name=\"SelectionIndicator\"\n isVisible={isSelected} />\n );\n});\n"],"names":[],"version":3,"file":"SelectionIndicator.module.js.map"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var $c5ccf687772c0422$exports = require("./utils.main.js");
|
|
2
|
+
var $6jQ43$reactaria = require("react-aria");
|
|
3
|
+
var $6jQ43$reactariacollections = require("@react-aria/collections");
|
|
4
|
+
var $6jQ43$reactariautils = require("@react-aria/utils");
|
|
5
|
+
var $6jQ43$react = require("react");
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
function $parcel$interopDefault(a) {
|
|
9
|
+
return a && a.__esModule ? a.default : a;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function $parcel$export(e, n, v, s) {
|
|
13
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
$parcel$export(module.exports, "SeparatorContext", () => $54b202ace195eaa4$export$6615d83f6de245ce);
|
|
17
|
+
$parcel$export(module.exports, "Separator", () => $54b202ace195eaa4$export$1ff3c3f08ae963c0);
|
|
18
|
+
/*
|
|
19
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
20
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
22
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
25
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
26
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
27
|
+
* governing permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
const $54b202ace195eaa4$export$6615d83f6de245ce = /*#__PURE__*/ (0, $6jQ43$react.createContext)({});
|
|
34
|
+
class $54b202ace195eaa4$export$7750289ca694c0b5 extends (0, $6jQ43$reactariacollections.CollectionNode) {
|
|
35
|
+
filter(collection, newCollection) {
|
|
36
|
+
let prevItem = newCollection.getItem(this.prevKey);
|
|
37
|
+
if (prevItem && prevItem.type !== 'separator') {
|
|
38
|
+
let clone = this.clone();
|
|
39
|
+
newCollection.addDescendants(clone, collection);
|
|
40
|
+
return clone;
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
$54b202ace195eaa4$export$7750289ca694c0b5.type = 'separator';
|
|
46
|
+
const $54b202ace195eaa4$export$1ff3c3f08ae963c0 = /*#__PURE__*/ (0, $6jQ43$reactariacollections.createLeafComponent)($54b202ace195eaa4$export$7750289ca694c0b5, function Separator(props, ref) {
|
|
47
|
+
[props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $54b202ace195eaa4$export$6615d83f6de245ce);
|
|
48
|
+
let { elementType: elementType, orientation: orientation, style: style, className: className, slot: slot, ...otherProps } = props;
|
|
49
|
+
let Element = elementType || 'hr';
|
|
50
|
+
if (Element === 'hr' && orientation === 'vertical') Element = 'div';
|
|
51
|
+
let ElementType = (0, $c5ccf687772c0422$exports.dom)[Element];
|
|
52
|
+
let { separatorProps: separatorProps } = (0, $6jQ43$reactaria.useSeparator)({
|
|
53
|
+
...otherProps,
|
|
54
|
+
elementType: elementType,
|
|
55
|
+
orientation: orientation
|
|
56
|
+
});
|
|
57
|
+
let DOMProps = (0, $6jQ43$reactariautils.filterDOMProps)(props, {
|
|
58
|
+
global: true
|
|
59
|
+
});
|
|
60
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6jQ43$react))).createElement(ElementType, {
|
|
61
|
+
render: props.render,
|
|
62
|
+
...(0, $6jQ43$reactariautils.mergeProps)(DOMProps, separatorProps),
|
|
63
|
+
style: style,
|
|
64
|
+
className: className !== null && className !== void 0 ? className : 'react-aria-Separator',
|
|
65
|
+
ref: ref,
|
|
66
|
+
slot: slot || undefined
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=Separator.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAiBM,MAAM,0DAAmB,CAAA,GAAA,0BAAY,EAA6C,CAAC;AAEnF,MAAM,kDAAsB,CAAA,GAAA,0CAAa;IAG9C,OAAO,UAA+B,EAAE,aAAkC,EAA8B;QACtG,IAAI,WAAW,cAAc,OAAO,CAAC,IAAI,CAAC,OAAO;QACjD,IAAI,YAAY,SAAS,IAAI,KAAK,aAAa;YAC7C,IAAI,QAAQ,IAAI,CAAC,KAAK;YACtB,cAAc,cAAc,CAAC,OAAO;YACpC,OAAO;QACT;QAEA,OAAO;IACT;AACF;AAba,0CACK,OAAO;AAiBlB,MAAM,4CAAY,WAAW,GAAG,CAAA,GAAA,+CAAkB,EAAE,2CAAe,SAAS,UAAU,KAAqB,EAAE,GAA8B;IAChJ,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,IAAI,eAAC,WAAW,eAAE,WAAW,SAAE,KAAK,aAAE,SAAS,QAAE,IAAI,EAAE,GAAG,YAAW,GAAG;IACxE,IAAI,UAAU,eAAe;IAC7B,IAAI,YAAY,QAAQ,gBAAgB,YACtC,UAAU;IAGZ,IAAI,cAAc,CAAA,GAAA,6BAAE,CAAC,CAAC,QAAQ;IAE9B,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,6BAAW,EAAE;QAClC,GAAG,UAAU;qBACb;qBACA;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,0DAAC;QACC,QAAQ,MAAM,MAAM;QACnB,GAAG,CAAA,GAAA,gCAAS,EAAE,UAAU,eAAe;QACxC,OAAO;QACP,WAAW,sBAAA,uBAAA,YAAa;QACxB,KAAK;QACL,MAAM,QAAQ;;AAEpB","sources":["packages/react-aria-components/src/Separator.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {SeparatorProps as AriaSeparatorProps, useSeparator} from 'react-aria';\nimport {BaseCollection, CollectionNode, createLeafComponent} from '@react-aria/collections';\nimport {ContextValue, dom, DOMRenderProps, SlotProps, StyleProps, useContextProps} from './utils';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport React, {createContext, ForwardedRef} from 'react';\n\nexport interface SeparatorProps extends AriaSeparatorProps, StyleProps, SlotProps, DOMRenderProps<'hr' | 'div', undefined>, GlobalDOMAttributes<HTMLElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-Separator'\n */\n className?: string\n}\n\nexport const SeparatorContext = createContext<ContextValue<SeparatorProps, HTMLElement>>({});\n\nexport class SeparatorNode extends CollectionNode<any> {\n static readonly type = 'separator';\n\n filter(collection: BaseCollection<any>, newCollection: BaseCollection<any>): CollectionNode<any> | null {\n let prevItem = newCollection.getItem(this.prevKey!);\n if (prevItem && prevItem.type !== 'separator') {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n\n return null;\n }\n}\n\n/**\n * A separator is a visual divider between two groups of content, e.g. groups of menu items or sections of a page.\n */\nexport const Separator = /*#__PURE__*/ createLeafComponent(SeparatorNode, function Separator(props: SeparatorProps, ref: ForwardedRef<HTMLElement>) {\n [props, ref] = useContextProps(props, ref, SeparatorContext);\n\n let {elementType, orientation, style, className, slot, ...otherProps} = props;\n let Element = elementType || 'hr';\n if (Element === 'hr' && orientation === 'vertical') {\n Element = 'div';\n }\n\n let ElementType = dom[Element];\n\n let {separatorProps} = useSeparator({\n ...otherProps,\n elementType,\n orientation\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <ElementType\n render={props.render}\n {...mergeProps(DOMProps, separatorProps)}\n style={style}\n className={className ?? 'react-aria-Separator'}\n ref={ref}\n slot={slot || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"Separator.main.js.map"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415} from "./utils.mjs";
|
|
2
|
+
import {useSeparator as $i9JCE$useSeparator} from "react-aria";
|
|
3
|
+
import {CollectionNode as $i9JCE$CollectionNode, createLeafComponent as $i9JCE$createLeafComponent} from "@react-aria/collections";
|
|
4
|
+
import {filterDOMProps as $i9JCE$filterDOMProps, mergeProps as $i9JCE$mergeProps} from "@react-aria/utils";
|
|
5
|
+
import $i9JCE$react, {createContext as $i9JCE$createContext} from "react";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
9
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
15
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
|
+
* governing permissions and limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const $431f98aba6844401$export$6615d83f6de245ce = /*#__PURE__*/ (0, $i9JCE$createContext)({});
|
|
23
|
+
class $431f98aba6844401$export$7750289ca694c0b5 extends (0, $i9JCE$CollectionNode) {
|
|
24
|
+
filter(collection, newCollection) {
|
|
25
|
+
let prevItem = newCollection.getItem(this.prevKey);
|
|
26
|
+
if (prevItem && prevItem.type !== 'separator') {
|
|
27
|
+
let clone = this.clone();
|
|
28
|
+
newCollection.addDescendants(clone, collection);
|
|
29
|
+
return clone;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
$431f98aba6844401$export$7750289ca694c0b5.type = 'separator';
|
|
35
|
+
const $431f98aba6844401$export$1ff3c3f08ae963c0 = /*#__PURE__*/ (0, $i9JCE$createLeafComponent)($431f98aba6844401$export$7750289ca694c0b5, function Separator(props, ref) {
|
|
36
|
+
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $431f98aba6844401$export$6615d83f6de245ce);
|
|
37
|
+
let { elementType: elementType, orientation: orientation, style: style, className: className, slot: slot, ...otherProps } = props;
|
|
38
|
+
let Element = elementType || 'hr';
|
|
39
|
+
if (Element === 'hr' && orientation === 'vertical') Element = 'div';
|
|
40
|
+
let ElementType = (0, $64fa3d84918910a7$export$df3a06d6289f983e)[Element];
|
|
41
|
+
let { separatorProps: separatorProps } = (0, $i9JCE$useSeparator)({
|
|
42
|
+
...otherProps,
|
|
43
|
+
elementType: elementType,
|
|
44
|
+
orientation: orientation
|
|
45
|
+
});
|
|
46
|
+
let DOMProps = (0, $i9JCE$filterDOMProps)(props, {
|
|
47
|
+
global: true
|
|
48
|
+
});
|
|
49
|
+
return /*#__PURE__*/ (0, $i9JCE$react).createElement(ElementType, {
|
|
50
|
+
render: props.render,
|
|
51
|
+
...(0, $i9JCE$mergeProps)(DOMProps, separatorProps),
|
|
52
|
+
style: style,
|
|
53
|
+
className: className !== null && className !== void 0 ? className : 'react-aria-Separator',
|
|
54
|
+
ref: ref,
|
|
55
|
+
slot: slot || undefined
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
export {$431f98aba6844401$export$6615d83f6de245ce as SeparatorContext, $431f98aba6844401$export$7750289ca694c0b5 as SeparatorNode, $431f98aba6844401$export$1ff3c3f08ae963c0 as Separator};
|
|
61
|
+
//# sourceMappingURL=Separator.module.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415} from "./utils.module.js";
|
|
2
|
+
import {useSeparator as $i9JCE$useSeparator} from "react-aria";
|
|
3
|
+
import {CollectionNode as $i9JCE$CollectionNode, createLeafComponent as $i9JCE$createLeafComponent} from "@react-aria/collections";
|
|
4
|
+
import {filterDOMProps as $i9JCE$filterDOMProps, mergeProps as $i9JCE$mergeProps} from "@react-aria/utils";
|
|
5
|
+
import $i9JCE$react, {createContext as $i9JCE$createContext} from "react";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
9
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
15
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
|
+
* governing permissions and limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const $431f98aba6844401$export$6615d83f6de245ce = /*#__PURE__*/ (0, $i9JCE$createContext)({});
|
|
23
|
+
class $431f98aba6844401$export$7750289ca694c0b5 extends (0, $i9JCE$CollectionNode) {
|
|
24
|
+
filter(collection, newCollection) {
|
|
25
|
+
let prevItem = newCollection.getItem(this.prevKey);
|
|
26
|
+
if (prevItem && prevItem.type !== 'separator') {
|
|
27
|
+
let clone = this.clone();
|
|
28
|
+
newCollection.addDescendants(clone, collection);
|
|
29
|
+
return clone;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
$431f98aba6844401$export$7750289ca694c0b5.type = 'separator';
|
|
35
|
+
const $431f98aba6844401$export$1ff3c3f08ae963c0 = /*#__PURE__*/ (0, $i9JCE$createLeafComponent)($431f98aba6844401$export$7750289ca694c0b5, function Separator(props, ref) {
|
|
36
|
+
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $431f98aba6844401$export$6615d83f6de245ce);
|
|
37
|
+
let { elementType: elementType, orientation: orientation, style: style, className: className, slot: slot, ...otherProps } = props;
|
|
38
|
+
let Element = elementType || 'hr';
|
|
39
|
+
if (Element === 'hr' && orientation === 'vertical') Element = 'div';
|
|
40
|
+
let ElementType = (0, $64fa3d84918910a7$export$df3a06d6289f983e)[Element];
|
|
41
|
+
let { separatorProps: separatorProps } = (0, $i9JCE$useSeparator)({
|
|
42
|
+
...otherProps,
|
|
43
|
+
elementType: elementType,
|
|
44
|
+
orientation: orientation
|
|
45
|
+
});
|
|
46
|
+
let DOMProps = (0, $i9JCE$filterDOMProps)(props, {
|
|
47
|
+
global: true
|
|
48
|
+
});
|
|
49
|
+
return /*#__PURE__*/ (0, $i9JCE$react).createElement(ElementType, {
|
|
50
|
+
render: props.render,
|
|
51
|
+
...(0, $i9JCE$mergeProps)(DOMProps, separatorProps),
|
|
52
|
+
style: style,
|
|
53
|
+
className: className !== null && className !== void 0 ? className : 'react-aria-Separator',
|
|
54
|
+
ref: ref,
|
|
55
|
+
slot: slot || undefined
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
export {$431f98aba6844401$export$6615d83f6de245ce as SeparatorContext, $431f98aba6844401$export$7750289ca694c0b5 as SeparatorNode, $431f98aba6844401$export$1ff3c3f08ae963c0 as Separator};
|
|
61
|
+
//# sourceMappingURL=Separator.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAiBM,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAA6C,CAAC;AAEnF,MAAM,kDAAsB,CAAA,GAAA,qBAAa;IAG9C,OAAO,UAA+B,EAAE,aAAkC,EAA8B;QACtG,IAAI,WAAW,cAAc,OAAO,CAAC,IAAI,CAAC,OAAO;QACjD,IAAI,YAAY,SAAS,IAAI,KAAK,aAAa;YAC7C,IAAI,QAAQ,IAAI,CAAC,KAAK;YACtB,cAAc,cAAc,CAAC,OAAO;YACpC,OAAO;QACT;QAEA,OAAO;IACT;AACF;AAba,0CACK,OAAO;AAiBlB,MAAM,4CAAY,WAAW,GAAG,CAAA,GAAA,0BAAkB,EAAE,2CAAe,SAAS,UAAU,KAAqB,EAAE,GAA8B;IAChJ,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,IAAI,eAAC,WAAW,eAAE,WAAW,SAAE,KAAK,aAAE,SAAS,QAAE,IAAI,EAAE,GAAG,YAAW,GAAG;IACxE,IAAI,UAAU,eAAe;IAC7B,IAAI,YAAY,QAAQ,gBAAgB,YACtC,UAAU;IAGZ,IAAI,cAAc,CAAA,GAAA,yCAAE,CAAC,CAAC,QAAQ;IAE9B,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;QAClC,GAAG,UAAU;qBACb;qBACA;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,gCAAC;QACC,QAAQ,MAAM,MAAM;QACnB,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,eAAe;QACxC,OAAO;QACP,WAAW,sBAAA,uBAAA,YAAa;QACxB,KAAK;QACL,MAAM,QAAQ;;AAEpB","sources":["packages/react-aria-components/src/Separator.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {SeparatorProps as AriaSeparatorProps, useSeparator} from 'react-aria';\nimport {BaseCollection, CollectionNode, createLeafComponent} from '@react-aria/collections';\nimport {ContextValue, dom, DOMRenderProps, SlotProps, StyleProps, useContextProps} from './utils';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport React, {createContext, ForwardedRef} from 'react';\n\nexport interface SeparatorProps extends AriaSeparatorProps, StyleProps, SlotProps, DOMRenderProps<'hr' | 'div', undefined>, GlobalDOMAttributes<HTMLElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.\n * @default 'react-aria-Separator'\n */\n className?: string\n}\n\nexport const SeparatorContext = createContext<ContextValue<SeparatorProps, HTMLElement>>({});\n\nexport class SeparatorNode extends CollectionNode<any> {\n static readonly type = 'separator';\n\n filter(collection: BaseCollection<any>, newCollection: BaseCollection<any>): CollectionNode<any> | null {\n let prevItem = newCollection.getItem(this.prevKey!);\n if (prevItem && prevItem.type !== 'separator') {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n\n return null;\n }\n}\n\n/**\n * A separator is a visual divider between two groups of content, e.g. groups of menu items or sections of a page.\n */\nexport const Separator = /*#__PURE__*/ createLeafComponent(SeparatorNode, function Separator(props: SeparatorProps, ref: ForwardedRef<HTMLElement>) {\n [props, ref] = useContextProps(props, ref, SeparatorContext);\n\n let {elementType, orientation, style, className, slot, ...otherProps} = props;\n let Element = elementType || 'hr';\n if (Element === 'hr' && orientation === 'vertical') {\n Element = 'div';\n }\n\n let ElementType = dom[Element];\n\n let {separatorProps} = useSeparator({\n ...otherProps,\n elementType,\n orientation\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <ElementType\n render={props.render}\n {...mergeProps(DOMProps, separatorProps)}\n style={style}\n className={className ?? 'react-aria-Separator'}\n ref={ref}\n slot={slot || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"Separator.module.js.map"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
var $c5ccf687772c0422$exports = require("./utils.main.js");
|
|
2
|
+
var $aakJU$reactdom = require("react-dom");
|
|
3
|
+
var $aakJU$react = require("react");
|
|
4
|
+
var $aakJU$reactariautils = require("@react-aria/utils");
|
|
5
|
+
var $aakJU$reactaria = require("react-aria");
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
function $parcel$interopDefault(a) {
|
|
9
|
+
return a && a.__esModule ? a.default : a;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function $parcel$export(e, n, v, s) {
|
|
13
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
$parcel$export(module.exports, "SharedElementTransition", () => $2d10bc562fea46b3$export$758399f318e6385a);
|
|
17
|
+
$parcel$export(module.exports, "SharedElement", () => $2d10bc562fea46b3$export$c34620ff8881d89f);
|
|
18
|
+
/*
|
|
19
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
20
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
22
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
25
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
26
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
27
|
+
* governing permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
const $2d10bc562fea46b3$var$SharedElementContext = /*#__PURE__*/ (0, $aakJU$react.createContext)(null);
|
|
34
|
+
function $2d10bc562fea46b3$export$758399f318e6385a(props) {
|
|
35
|
+
let ref = (0, $aakJU$react.useRef)({});
|
|
36
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($aakJU$react))).createElement($2d10bc562fea46b3$var$SharedElementContext.Provider, {
|
|
37
|
+
value: ref
|
|
38
|
+
}, props.children);
|
|
39
|
+
}
|
|
40
|
+
const $2d10bc562fea46b3$export$c34620ff8881d89f = /*#__PURE__*/ (0, $aakJU$react.forwardRef)(function SharedElement(props, ref) {
|
|
41
|
+
let { name: name, isVisible: isVisible = true, children: children, className: className, style: style, render: render, ...divProps } = props;
|
|
42
|
+
let [state, setState] = (0, $aakJU$react.useState)(isVisible ? 'visible' : 'hidden');
|
|
43
|
+
let scopeRef = (0, $aakJU$react.useContext)($2d10bc562fea46b3$var$SharedElementContext);
|
|
44
|
+
if (!scopeRef) throw new Error('<SharedElement> must be rendered inside a <SharedElementTransition>');
|
|
45
|
+
if (isVisible && state === 'hidden') setState('visible');
|
|
46
|
+
ref = (0, $aakJU$reactaria.useObjectRef)(ref);
|
|
47
|
+
(0, $aakJU$reactariautils.useLayoutEffect)(()=>{
|
|
48
|
+
let element = ref.current;
|
|
49
|
+
let scope = scopeRef.current;
|
|
50
|
+
let prevSnapshot = scope[name];
|
|
51
|
+
let frame = null;
|
|
52
|
+
if (element && isVisible && prevSnapshot) {
|
|
53
|
+
// Element is transitioning from a previous instance.
|
|
54
|
+
setState('visible');
|
|
55
|
+
let animations = element.getAnimations();
|
|
56
|
+
// Set properties to animate from.
|
|
57
|
+
let values = prevSnapshot.style.map(([property, prevValue])=>{
|
|
58
|
+
let value = element.style[property];
|
|
59
|
+
if (property === 'translate') {
|
|
60
|
+
let prevRect = prevSnapshot.rect;
|
|
61
|
+
let currentItem = element.getBoundingClientRect();
|
|
62
|
+
let deltaX = prevRect.left - (currentItem === null || currentItem === void 0 ? void 0 : currentItem.left);
|
|
63
|
+
let deltaY = prevRect.top - (currentItem === null || currentItem === void 0 ? void 0 : currentItem.top);
|
|
64
|
+
element.style.translate = `${deltaX}px ${deltaY}px`;
|
|
65
|
+
} else element.style[property] = prevValue;
|
|
66
|
+
return [
|
|
67
|
+
property,
|
|
68
|
+
value
|
|
69
|
+
];
|
|
70
|
+
});
|
|
71
|
+
// Cancel any new animations triggered by these properties.
|
|
72
|
+
for (let a of element.getAnimations())if (!animations.includes(a)) a.cancel();
|
|
73
|
+
// Remove overrides after one frame to animate to the current values.
|
|
74
|
+
frame = requestAnimationFrame(()=>{
|
|
75
|
+
frame = null;
|
|
76
|
+
for (let [property, value] of values)element.style[property] = value;
|
|
77
|
+
});
|
|
78
|
+
delete scope[name];
|
|
79
|
+
} else if (element && isVisible && !prevSnapshot) {
|
|
80
|
+
// No previous instance exists, apply the entering state.
|
|
81
|
+
queueMicrotask(()=>(0, $aakJU$reactdom.flushSync)(()=>setState('entering')));
|
|
82
|
+
frame = requestAnimationFrame(()=>{
|
|
83
|
+
frame = null;
|
|
84
|
+
setState('visible');
|
|
85
|
+
});
|
|
86
|
+
} else if (element && !isVisible) // Wait until layout effects finish, and check if a snapshot still exists.
|
|
87
|
+
// If so, no new SharedElement consumed it, so enter the exiting state.
|
|
88
|
+
queueMicrotask(()=>{
|
|
89
|
+
if (scope[name]) {
|
|
90
|
+
delete scope[name];
|
|
91
|
+
(0, $aakJU$reactdom.flushSync)(()=>setState('exiting'));
|
|
92
|
+
Promise.all(element.getAnimations().map((a)=>a.finished)).then(()=>setState('hidden')).catch(()=>{});
|
|
93
|
+
} else // Snapshot was consumed by another instance, unmount.
|
|
94
|
+
setState('hidden');
|
|
95
|
+
});
|
|
96
|
+
return ()=>{
|
|
97
|
+
if (frame != null) cancelAnimationFrame(frame);
|
|
98
|
+
if (element && element.isConnected && !element.hasAttribute('data-exiting')) {
|
|
99
|
+
// On unmount, store a snapshot of the rectangle and computed style for transitioning properties.
|
|
100
|
+
let style = window.getComputedStyle(element);
|
|
101
|
+
if (style.transitionProperty !== 'none') {
|
|
102
|
+
let transitionProperty = style.transitionProperty.split(/\s*,\s*/);
|
|
103
|
+
scope[name] = {
|
|
104
|
+
rect: element.getBoundingClientRect(),
|
|
105
|
+
style: transitionProperty.map((p)=>[
|
|
106
|
+
p,
|
|
107
|
+
style[p]
|
|
108
|
+
])
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}, [
|
|
114
|
+
ref,
|
|
115
|
+
scopeRef,
|
|
116
|
+
name,
|
|
117
|
+
isVisible
|
|
118
|
+
]);
|
|
119
|
+
let renderProps = (0, $c5ccf687772c0422$exports.useRenderProps)({
|
|
120
|
+
children: children,
|
|
121
|
+
className: className,
|
|
122
|
+
style: style,
|
|
123
|
+
render: render,
|
|
124
|
+
values: {
|
|
125
|
+
isEntering: state === 'entering',
|
|
126
|
+
isExiting: state === 'exiting'
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
if (state === 'hidden') return null;
|
|
130
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($aakJU$react))).createElement((0, $c5ccf687772c0422$exports.dom).div, {
|
|
131
|
+
...divProps,
|
|
132
|
+
...renderProps,
|
|
133
|
+
ref: ref,
|
|
134
|
+
"data-entering": state === 'entering' || undefined,
|
|
135
|
+
"data-exiting": state === 'exiting' || undefined
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
//# sourceMappingURL=SharedElementTransition.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAaD,MAAM,2DAAuB,CAAA,GAAA,0BAAY,EAAgD;AASlF,SAAS,0CAAwB,KAAmC;IACzE,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAE,CAAC;IAClB,qBACE,0DAAC,2CAAqB,QAAQ;QAAC,OAAO;OACnC,MAAM,QAAQ;AAGrB;AAyBO,MAAM,0DAAgB,CAAA,GAAA,uBAAS,EAAE,SAAS,cAAc,KAAyB,EAAE,GAAiC;IACzH,IAAI,QAAC,IAAI,aAAE,YAAY,gBAAM,QAAQ,aAAE,SAAS,SAAE,KAAK,UAAE,MAAM,EAAE,GAAG,UAAS,GAAG;IAChF,IAAI,CAAC,OAAO,SAAS,GAAG,CAAA,GAAA,qBAAO,EAAE,YAAY,YAAY;IACzD,IAAI,WAAW,CAAA,GAAA,uBAAS,EAAE;IAC1B,IAAI,CAAC,UACH,MAAM,IAAI,MAAM;IAGlB,IAAI,aAAa,UAAU,UACzB,SAAS;IAGX,MAAM,CAAA,GAAA,6BAAW,EAAE;IACnB,CAAA,GAAA,qCAAc,EAAE;QACd,IAAI,UAAU,IAAI,OAAO;QACzB,IAAI,QAAQ,SAAS,OAAO;QAC5B,IAAI,eAAe,KAAK,CAAC,KAAK;QAC9B,IAAI,QAAuB;QAE3B,IAAI,WAAW,aAAa,cAAc;YACxC,qDAAqD;YACrD,SAAS;YACT,IAAI,aAAa,QAAQ,aAAa;YAEtC,kCAAkC;YAClC,IAAI,SAAS,aAAa,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,UAAU;gBACxD,IAAI,QAAQ,QAAQ,KAAK,CAAC,SAAS;gBACnC,IAAI,aAAa,aAAa;oBAC5B,IAAI,WAAW,aAAa,IAAI;oBAChC,IAAI,cAAc,QAAQ,qBAAqB;oBAC/C,IAAI,SAAS,SAAS,IAAI,IAAG,wBAAA,kCAAA,YAAa,IAAI;oBAC9C,IAAI,SAAS,SAAS,GAAG,IAAG,wBAAA,kCAAA,YAAa,GAAG;oBAC5C,QAAQ,KAAK,CAAC,SAAS,GAAG,GAAG,OAAO,GAAG,EAAE,OAAO,EAAE,CAAC;gBACrD,OACE,QAAQ,KAAK,CAAC,SAAS,GAAG;gBAE5B,OAAO;oBAAC;oBAAU;iBAAM;YAC1B;YAEA,2DAA2D;YAC3D,KAAK,IAAI,KAAK,QAAQ,aAAa,GACjC,IAAI,CAAC,WAAW,QAAQ,CAAC,IACvB,EAAE,MAAM;YAIZ,qEAAqE;YACrE,QAAQ,sBAAsB;gBAC5B,QAAQ;gBACR,KAAK,IAAI,CAAC,UAAU,MAAM,IAAI,OAC5B,QAAQ,KAAK,CAAC,SAAS,GAAG;YAE9B;YAEA,OAAO,KAAK,CAAC,KAAK;QACpB,OAAO,IAAI,WAAW,aAAa,CAAC,cAAc;YAChD,yDAAyD;YACzD,eAAe,IAAM,CAAA,GAAA,yBAAQ,EAAE,IAAM,SAAS;YAC9C,QAAQ,sBAAsB;gBAC5B,QAAQ;gBACR,SAAS;YACX;QACF,OAAO,IAAI,WAAW,CAAC,WACrB,0EAA0E;QAC1E,uEAAuE;QACvE,eAAe;YACb,IAAI,KAAK,CAAC,KAAK,EAAE;gBACf,OAAO,KAAK,CAAC,KAAK;gBAClB,CAAA,GAAA,yBAAQ,EAAE,IAAM,SAAS;gBACzB,QAAQ,GAAG,CAAC,QAAQ,aAAa,GAAG,GAAG,CAAC,CAAA,IAAK,EAAE,QAAQ,GACpD,IAAI,CAAC,IAAM,SAAS,WACpB,KAAK,CAAC,KAAO;YAClB,OACE,sDAAsD;YACtD,SAAS;QAEb;QAGF,OAAO;YACL,IAAI,SAAS,MACX,qBAAqB;YAGvB,IAAI,WAAW,QAAQ,WAAW,IAAI,CAAC,QAAQ,YAAY,CAAC,iBAAiB;gBAC3E,iGAAiG;gBACjG,IAAI,QAAQ,OAAO,gBAAgB,CAAC;gBACpC,IAAI,MAAM,kBAAkB,KAAK,QAAQ;oBACvC,IAAI,qBAAqB,MAAM,kBAAkB,CAAC,KAAK,CAAC;oBACxD,KAAK,CAAC,KAAK,GAAG;wBACZ,MAAM,QAAQ,qBAAqB;wBACnC,OAAO,mBAAmB,GAAG,CAAC,CAAA,IAAK;gCAAC;gCAAG,KAAK,CAAC,EAAE;6BAAC;oBAClD;gBACF;YACF;QACF;IACF,GAAG;QAAC;QAAK;QAAU;QAAM;KAAU;IAEnC,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;kBAC/B;mBACA;eACA;gBACA;QACA,QAAQ;YACN,YAAY,UAAU;YACtB,WAAW,UAAU;QACvB;IACF;IAEA,IAAI,UAAU,UACZ,OAAO;IAGT,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QACL,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,iBAAe,UAAU,cAAc;QACvC,gBAAc,UAAU,aAAa;;AAE3C","sources":["packages/react-aria-components/src/SharedElementTransition.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 {dom, RenderProps, useRenderProps} from './utils';\nimport {flushSync} from 'react-dom';\nimport React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, ReactNode, RefObject, useContext, useRef, useState} from 'react';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useObjectRef} from 'react-aria';\n\ninterface Snapshot {\n rect: DOMRect,\n style: [string, string][]\n}\n\nconst SharedElementContext = createContext<RefObject<{[name: string]: Snapshot}> | null>(null);\n\nexport interface SharedElementTransitionProps {\n children: ReactNode\n}\n\n/**\n * A scope for SharedElements, which animate between parents.\n */\nexport function SharedElementTransition(props: SharedElementTransitionProps) {\n let ref = useRef({});\n return (\n <SharedElementContext.Provider value={ref}>\n {props.children}\n </SharedElementContext.Provider>\n );\n}\n\nexport interface SharedElementRenderProps {\n /**\n * Whether the element is currently entering.\n * @selector [data-entering]\n */\n isEntering: boolean,\n /**\n * Whether the element is currently exiting.\n * @selector [data-exiting]\n */\n isExiting: boolean\n}\n\nexport interface SharedElementPropsBase extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'className' | 'style'>, RenderProps<SharedElementRenderProps> {}\n\nexport interface SharedElementProps extends SharedElementPropsBase {\n name: string,\n isVisible?: boolean\n}\n\n/**\n * An element that animates between its old and new position when moving between parents.\n */\nexport const SharedElement = forwardRef(function SharedElement(props: SharedElementProps, ref: ForwardedRef<HTMLDivElement>) {\n let {name, isVisible = true, children, className, style, render, ...divProps} = props;\n let [state, setState] = useState(isVisible ? 'visible' : 'hidden');\n let scopeRef = useContext(SharedElementContext);\n if (!scopeRef) {\n throw new Error('<SharedElement> must be rendered inside a <SharedElementTransition>');\n }\n\n if (isVisible && state === 'hidden') {\n setState('visible');\n }\n\n ref = useObjectRef(ref);\n useLayoutEffect(() => {\n let element = ref.current;\n let scope = scopeRef.current;\n let prevSnapshot = scope[name];\n let frame: number | null = null;\n\n if (element && isVisible && prevSnapshot) {\n // Element is transitioning from a previous instance.\n setState('visible');\n let animations = element.getAnimations();\n\n // Set properties to animate from.\n let values = prevSnapshot.style.map(([property, prevValue]) => {\n let value = element.style[property];\n if (property === 'translate') {\n let prevRect = prevSnapshot.rect;\n let currentItem = element.getBoundingClientRect();\n let deltaX = prevRect.left - currentItem?.left;\n let deltaY = prevRect.top - currentItem?.top;\n element.style.translate = `${deltaX}px ${deltaY}px`;\n } else {\n element.style[property] = prevValue;\n }\n return [property, value];\n });\n\n // Cancel any new animations triggered by these properties.\n for (let a of element.getAnimations()) {\n if (!animations.includes(a)) {\n a.cancel();\n }\n }\n\n // Remove overrides after one frame to animate to the current values.\n frame = requestAnimationFrame(() => {\n frame = null;\n for (let [property, value] of values) {\n element.style[property] = value;\n }\n });\n\n delete scope[name];\n } else if (element && isVisible && !prevSnapshot) {\n // No previous instance exists, apply the entering state.\n queueMicrotask(() => flushSync(() => setState('entering')));\n frame = requestAnimationFrame(() => {\n frame = null;\n setState('visible');\n });\n } else if (element && !isVisible) {\n // Wait until layout effects finish, and check if a snapshot still exists.\n // If so, no new SharedElement consumed it, so enter the exiting state.\n queueMicrotask(() => {\n if (scope[name]) {\n delete scope[name];\n flushSync(() => setState('exiting'));\n Promise.all(element.getAnimations().map(a => a.finished))\n .then(() => setState('hidden'))\n .catch(() => {});\n } else {\n // Snapshot was consumed by another instance, unmount.\n setState('hidden');\n }\n });\n }\n\n return () => {\n if (frame != null) {\n cancelAnimationFrame(frame);\n }\n\n if (element && element.isConnected && !element.hasAttribute('data-exiting')) {\n // On unmount, store a snapshot of the rectangle and computed style for transitioning properties.\n let style = window.getComputedStyle(element);\n if (style.transitionProperty !== 'none') {\n let transitionProperty = style.transitionProperty.split(/\\s*,\\s*/);\n scope[name] = {\n rect: element.getBoundingClientRect(),\n style: transitionProperty.map(p => [p, style[p]])\n };\n }\n }\n };\n }, [ref, scopeRef, name, isVisible]);\n\n let renderProps = useRenderProps({\n children,\n className,\n style,\n render,\n values: {\n isEntering: state === 'entering',\n isExiting: state === 'exiting'\n }\n });\n\n if (state === 'hidden') {\n return null;\n }\n\n return (\n <dom.div\n {...divProps}\n {...renderProps}\n ref={ref}\n data-entering={state === 'entering' || undefined}\n data-exiting={state === 'exiting' || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"SharedElementTransition.main.js.map"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import {dom as $64fa3d84918910a7$export$df3a06d6289f983e, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from "./utils.mjs";
|
|
2
|
+
import {flushSync as $I3GNx$flushSync} from "react-dom";
|
|
3
|
+
import $I3GNx$react, {createContext as $I3GNx$createContext, useRef as $I3GNx$useRef, forwardRef as $I3GNx$forwardRef, useState as $I3GNx$useState, useContext as $I3GNx$useContext} from "react";
|
|
4
|
+
import {useLayoutEffect as $I3GNx$useLayoutEffect} from "@react-aria/utils";
|
|
5
|
+
import {useObjectRef as $I3GNx$useObjectRef} from "react-aria";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright 2025 Adobe. All rights reserved.
|
|
9
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
15
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
|
+
* governing permissions and limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const $c8a5a149f625efcf$var$SharedElementContext = /*#__PURE__*/ (0, $I3GNx$createContext)(null);
|
|
23
|
+
function $c8a5a149f625efcf$export$758399f318e6385a(props) {
|
|
24
|
+
let ref = (0, $I3GNx$useRef)({});
|
|
25
|
+
return /*#__PURE__*/ (0, $I3GNx$react).createElement($c8a5a149f625efcf$var$SharedElementContext.Provider, {
|
|
26
|
+
value: ref
|
|
27
|
+
}, props.children);
|
|
28
|
+
}
|
|
29
|
+
const $c8a5a149f625efcf$export$c34620ff8881d89f = /*#__PURE__*/ (0, $I3GNx$forwardRef)(function SharedElement(props, ref) {
|
|
30
|
+
let { name: name, isVisible: isVisible = true, children: children, className: className, style: style, render: render, ...divProps } = props;
|
|
31
|
+
let [state, setState] = (0, $I3GNx$useState)(isVisible ? 'visible' : 'hidden');
|
|
32
|
+
let scopeRef = (0, $I3GNx$useContext)($c8a5a149f625efcf$var$SharedElementContext);
|
|
33
|
+
if (!scopeRef) throw new Error('<SharedElement> must be rendered inside a <SharedElementTransition>');
|
|
34
|
+
if (isVisible && state === 'hidden') setState('visible');
|
|
35
|
+
ref = (0, $I3GNx$useObjectRef)(ref);
|
|
36
|
+
(0, $I3GNx$useLayoutEffect)(()=>{
|
|
37
|
+
let element = ref.current;
|
|
38
|
+
let scope = scopeRef.current;
|
|
39
|
+
let prevSnapshot = scope[name];
|
|
40
|
+
let frame = null;
|
|
41
|
+
if (element && isVisible && prevSnapshot) {
|
|
42
|
+
// Element is transitioning from a previous instance.
|
|
43
|
+
setState('visible');
|
|
44
|
+
let animations = element.getAnimations();
|
|
45
|
+
// Set properties to animate from.
|
|
46
|
+
let values = prevSnapshot.style.map(([property, prevValue])=>{
|
|
47
|
+
let value = element.style[property];
|
|
48
|
+
if (property === 'translate') {
|
|
49
|
+
let prevRect = prevSnapshot.rect;
|
|
50
|
+
let currentItem = element.getBoundingClientRect();
|
|
51
|
+
let deltaX = prevRect.left - (currentItem === null || currentItem === void 0 ? void 0 : currentItem.left);
|
|
52
|
+
let deltaY = prevRect.top - (currentItem === null || currentItem === void 0 ? void 0 : currentItem.top);
|
|
53
|
+
element.style.translate = `${deltaX}px ${deltaY}px`;
|
|
54
|
+
} else element.style[property] = prevValue;
|
|
55
|
+
return [
|
|
56
|
+
property,
|
|
57
|
+
value
|
|
58
|
+
];
|
|
59
|
+
});
|
|
60
|
+
// Cancel any new animations triggered by these properties.
|
|
61
|
+
for (let a of element.getAnimations())if (!animations.includes(a)) a.cancel();
|
|
62
|
+
// Remove overrides after one frame to animate to the current values.
|
|
63
|
+
frame = requestAnimationFrame(()=>{
|
|
64
|
+
frame = null;
|
|
65
|
+
for (let [property, value] of values)element.style[property] = value;
|
|
66
|
+
});
|
|
67
|
+
delete scope[name];
|
|
68
|
+
} else if (element && isVisible && !prevSnapshot) {
|
|
69
|
+
// No previous instance exists, apply the entering state.
|
|
70
|
+
queueMicrotask(()=>(0, $I3GNx$flushSync)(()=>setState('entering')));
|
|
71
|
+
frame = requestAnimationFrame(()=>{
|
|
72
|
+
frame = null;
|
|
73
|
+
setState('visible');
|
|
74
|
+
});
|
|
75
|
+
} else if (element && !isVisible) // Wait until layout effects finish, and check if a snapshot still exists.
|
|
76
|
+
// If so, no new SharedElement consumed it, so enter the exiting state.
|
|
77
|
+
queueMicrotask(()=>{
|
|
78
|
+
if (scope[name]) {
|
|
79
|
+
delete scope[name];
|
|
80
|
+
(0, $I3GNx$flushSync)(()=>setState('exiting'));
|
|
81
|
+
Promise.all(element.getAnimations().map((a)=>a.finished)).then(()=>setState('hidden')).catch(()=>{});
|
|
82
|
+
} else // Snapshot was consumed by another instance, unmount.
|
|
83
|
+
setState('hidden');
|
|
84
|
+
});
|
|
85
|
+
return ()=>{
|
|
86
|
+
if (frame != null) cancelAnimationFrame(frame);
|
|
87
|
+
if (element && element.isConnected && !element.hasAttribute('data-exiting')) {
|
|
88
|
+
// On unmount, store a snapshot of the rectangle and computed style for transitioning properties.
|
|
89
|
+
let style = window.getComputedStyle(element);
|
|
90
|
+
if (style.transitionProperty !== 'none') {
|
|
91
|
+
let transitionProperty = style.transitionProperty.split(/\s*,\s*/);
|
|
92
|
+
scope[name] = {
|
|
93
|
+
rect: element.getBoundingClientRect(),
|
|
94
|
+
style: transitionProperty.map((p)=>[
|
|
95
|
+
p,
|
|
96
|
+
style[p]
|
|
97
|
+
])
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}, [
|
|
103
|
+
ref,
|
|
104
|
+
scopeRef,
|
|
105
|
+
name,
|
|
106
|
+
isVisible
|
|
107
|
+
]);
|
|
108
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
109
|
+
children: children,
|
|
110
|
+
className: className,
|
|
111
|
+
style: style,
|
|
112
|
+
render: render,
|
|
113
|
+
values: {
|
|
114
|
+
isEntering: state === 'entering',
|
|
115
|
+
isExiting: state === 'exiting'
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
if (state === 'hidden') return null;
|
|
119
|
+
return /*#__PURE__*/ (0, $I3GNx$react).createElement((0, $64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
120
|
+
...divProps,
|
|
121
|
+
...renderProps,
|
|
122
|
+
ref: ref,
|
|
123
|
+
"data-entering": state === 'entering' || undefined,
|
|
124
|
+
"data-exiting": state === 'exiting' || undefined
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
export {$c8a5a149f625efcf$export$758399f318e6385a as SharedElementTransition, $c8a5a149f625efcf$export$c34620ff8881d89f as SharedElement};
|
|
130
|
+
//# sourceMappingURL=SharedElementTransition.module.js.map
|