@adobe/react-spectrum 3.47.2 → 3.47.3
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/private/actionbar/ActionBar.cjs +2 -3
- package/dist/private/actionbar/ActionBar.cjs.map +1 -1
- package/dist/private/actionbar/ActionBar.js +2 -3
- package/dist/private/actionbar/ActionBar.js.map +1 -1
- package/dist/private/actionbar/ActionBar.mjs +2 -3
- package/dist/private/actionbar/ActionBar.mjs.map +1 -1
- package/dist/private/actiongroup/ActionGroup.cjs +5 -1
- package/dist/private/actiongroup/ActionGroup.cjs.map +1 -1
- package/dist/private/actiongroup/ActionGroup.js +5 -1
- package/dist/private/actiongroup/ActionGroup.js.map +1 -1
- package/dist/private/actiongroup/ActionGroup.mjs +5 -1
- package/dist/private/actiongroup/ActionGroup.mjs.map +1 -1
- package/dist/private/autocomplete/MobileSearchAutocomplete.cjs +6 -0
- package/dist/private/autocomplete/MobileSearchAutocomplete.cjs.map +1 -1
- package/dist/private/autocomplete/MobileSearchAutocomplete.js +6 -0
- package/dist/private/autocomplete/MobileSearchAutocomplete.js.map +1 -1
- package/dist/private/autocomplete/MobileSearchAutocomplete.mjs +6 -0
- package/dist/private/autocomplete/MobileSearchAutocomplete.mjs.map +1 -1
- package/dist/private/autocomplete/SearchAutocomplete.cjs +1 -0
- package/dist/private/autocomplete/SearchAutocomplete.cjs.map +1 -1
- package/dist/private/autocomplete/SearchAutocomplete.js +1 -0
- package/dist/private/autocomplete/SearchAutocomplete.js.map +1 -1
- package/dist/private/autocomplete/SearchAutocomplete.mjs +1 -0
- package/dist/private/autocomplete/SearchAutocomplete.mjs.map +1 -1
- package/dist/private/button/Button.cjs +2 -1
- package/dist/private/button/Button.cjs.map +1 -1
- package/dist/private/button/Button.js +3 -2
- package/dist/private/button/Button.js.map +1 -1
- package/dist/private/button/Button.mjs +3 -2
- package/dist/private/button/Button.mjs.map +1 -1
- package/dist/private/button/ClearButton.cjs +2 -1
- package/dist/private/button/ClearButton.cjs.map +1 -1
- package/dist/private/button/ClearButton.js +2 -1
- package/dist/private/button/ClearButton.js.map +1 -1
- package/dist/private/button/ClearButton.mjs +2 -1
- package/dist/private/button/ClearButton.mjs.map +1 -1
- package/dist/private/buttongroup/ButtonGroup.cjs +4 -2
- package/dist/private/buttongroup/ButtonGroup.cjs.map +1 -1
- package/dist/private/buttongroup/ButtonGroup.js +4 -2
- package/dist/private/buttongroup/ButtonGroup.js.map +1 -1
- package/dist/private/buttongroup/ButtonGroup.mjs +4 -2
- package/dist/private/buttongroup/ButtonGroup.mjs.map +1 -1
- package/dist/private/card/CardBase.cjs +1 -0
- package/dist/private/card/CardBase.cjs.map +1 -1
- package/dist/private/card/CardBase.js +1 -0
- package/dist/private/card/CardBase.js.map +1 -1
- package/dist/private/card/CardBase.mjs +1 -0
- package/dist/private/card/CardBase.mjs.map +1 -1
- package/dist/private/card/CardView.cjs +3 -0
- package/dist/private/card/CardView.cjs.map +1 -1
- package/dist/private/card/CardView.js +3 -0
- package/dist/private/card/CardView.js.map +1 -1
- package/dist/private/card/CardView.mjs +3 -0
- package/dist/private/card/CardView.mjs.map +1 -1
- package/dist/private/checkbox/Checkbox.cjs.map +1 -1
- package/dist/private/checkbox/Checkbox.js.map +1 -1
- package/dist/private/checkbox/Checkbox.mjs.map +1 -1
- package/dist/private/color/ColorField.cjs +1 -0
- package/dist/private/color/ColorField.cjs.map +1 -1
- package/dist/private/color/ColorField.js +1 -0
- package/dist/private/color/ColorField.js.map +1 -1
- package/dist/private/color/ColorField.mjs +1 -0
- package/dist/private/color/ColorField.mjs.map +1 -1
- package/dist/private/color/ColorPicker.cjs.map +1 -1
- package/dist/private/color/ColorPicker.js.map +1 -1
- package/dist/private/color/ColorPicker.mjs.map +1 -1
- package/dist/private/color/ColorSwatch.cjs +2 -1
- package/dist/private/color/ColorSwatch.cjs.map +1 -1
- package/dist/private/color/ColorSwatch.js +2 -1
- package/dist/private/color/ColorSwatch.js.map +1 -1
- package/dist/private/color/ColorSwatch.mjs +2 -1
- package/dist/private/color/ColorSwatch.mjs.map +1 -1
- package/dist/private/color/ColorSwatchPicker.cjs.map +1 -1
- package/dist/private/color/ColorSwatchPicker.js.map +1 -1
- package/dist/private/color/ColorSwatchPicker.mjs.map +1 -1
- package/dist/private/color/ColorWheel.cjs +1 -0
- package/dist/private/color/ColorWheel.cjs.map +1 -1
- package/dist/private/color/ColorWheel.js +1 -0
- package/dist/private/color/ColorWheel.js.map +1 -1
- package/dist/private/color/ColorWheel.mjs +1 -0
- package/dist/private/color/ColorWheel.mjs.map +1 -1
- package/dist/private/combobox/ComboBox.cjs +1 -0
- package/dist/private/combobox/ComboBox.cjs.map +1 -1
- package/dist/private/combobox/ComboBox.js +1 -0
- package/dist/private/combobox/ComboBox.js.map +1 -1
- package/dist/private/combobox/ComboBox.mjs +1 -0
- package/dist/private/combobox/ComboBox.mjs.map +1 -1
- package/dist/private/combobox/MobileComboBox.cjs +8 -0
- package/dist/private/combobox/MobileComboBox.cjs.map +1 -1
- package/dist/private/combobox/MobileComboBox.js +8 -0
- package/dist/private/combobox/MobileComboBox.js.map +1 -1
- package/dist/private/combobox/MobileComboBox.mjs +8 -0
- package/dist/private/combobox/MobileComboBox.mjs.map +1 -1
- package/dist/private/datepicker/DateField.cjs +2 -1
- package/dist/private/datepicker/DateField.cjs.map +1 -1
- package/dist/private/datepicker/DateField.js +2 -1
- package/dist/private/datepicker/DateField.js.map +1 -1
- package/dist/private/datepicker/DateField.mjs +2 -1
- package/dist/private/datepicker/DateField.mjs.map +1 -1
- package/dist/private/datepicker/DatePicker.cjs +2 -1
- package/dist/private/datepicker/DatePicker.cjs.map +1 -1
- package/dist/private/datepicker/DatePicker.js +2 -1
- package/dist/private/datepicker/DatePicker.js.map +1 -1
- package/dist/private/datepicker/DatePicker.mjs +2 -1
- package/dist/private/datepicker/DatePicker.mjs.map +1 -1
- package/dist/private/datepicker/DateRangePicker.cjs +2 -1
- package/dist/private/datepicker/DateRangePicker.cjs.map +1 -1
- package/dist/private/datepicker/DateRangePicker.js +2 -1
- package/dist/private/datepicker/DateRangePicker.js.map +1 -1
- package/dist/private/datepicker/DateRangePicker.mjs +2 -1
- package/dist/private/datepicker/DateRangePicker.mjs.map +1 -1
- package/dist/private/dialog/AlertDialog.cjs +3 -1
- package/dist/private/dialog/AlertDialog.cjs.map +1 -1
- package/dist/private/dialog/AlertDialog.js +3 -1
- package/dist/private/dialog/AlertDialog.js.map +1 -1
- package/dist/private/dialog/AlertDialog.mjs +3 -1
- package/dist/private/dialog/AlertDialog.mjs.map +1 -1
- package/dist/private/dialog/Dialog.cjs +10 -3
- package/dist/private/dialog/Dialog.cjs.map +1 -1
- package/dist/private/dialog/Dialog.js +10 -3
- package/dist/private/dialog/Dialog.js.map +1 -1
- package/dist/private/dialog/Dialog.mjs +10 -3
- package/dist/private/dialog/Dialog.mjs.map +1 -1
- package/dist/private/dnd/useDragAndDrop.cjs +7 -0
- package/dist/private/dnd/useDragAndDrop.cjs.map +1 -1
- package/dist/private/dnd/useDragAndDrop.js +7 -0
- package/dist/private/dnd/useDragAndDrop.js.map +1 -1
- package/dist/private/dnd/useDragAndDrop.mjs +7 -0
- package/dist/private/dnd/useDragAndDrop.mjs.map +1 -1
- package/dist/private/icon/Icon.cjs +1 -1
- package/dist/private/icon/Icon.cjs.map +1 -1
- package/dist/private/icon/Icon.js +1 -1
- package/dist/private/icon/Icon.js.map +1 -1
- package/dist/private/icon/Icon.mjs +1 -1
- package/dist/private/icon/Icon.mjs.map +1 -1
- package/dist/private/icon/UIIcon.cjs +1 -1
- package/dist/private/icon/UIIcon.cjs.map +1 -1
- package/dist/private/icon/UIIcon.js +1 -1
- package/dist/private/icon/UIIcon.js.map +1 -1
- package/dist/private/icon/UIIcon.mjs +1 -1
- package/dist/private/icon/UIIcon.mjs.map +1 -1
- package/dist/private/intl/label/zh-CN.cjs +1 -1
- package/dist/private/intl/label/zh-CN.cjs.map +1 -1
- package/dist/private/intl/label/zh-CN.js +1 -1
- package/dist/private/intl/label/zh-CN.js.map +1 -1
- package/dist/private/intl/label/zh-CN.mjs +1 -1
- package/dist/private/intl/label/zh-CN.mjs.map +1 -1
- package/dist/private/intl/menu/es-ES.cjs +1 -1
- package/dist/private/intl/menu/es-ES.cjs.map +1 -1
- package/dist/private/intl/menu/es-ES.js +1 -1
- package/dist/private/intl/menu/es-ES.js.map +1 -1
- package/dist/private/intl/menu/es-ES.mjs +1 -1
- package/dist/private/intl/menu/es-ES.mjs.map +1 -1
- package/dist/private/intl/picker/zh-CN.cjs +1 -1
- package/dist/private/intl/picker/zh-CN.cjs.map +1 -1
- package/dist/private/intl/picker/zh-CN.js +1 -1
- package/dist/private/intl/picker/zh-CN.js.map +1 -1
- package/dist/private/intl/picker/zh-CN.mjs +1 -1
- package/dist/private/intl/picker/zh-CN.mjs.map +1 -1
- package/dist/private/intl/table/es-ES.cjs +1 -1
- package/dist/private/intl/table/es-ES.cjs.map +1 -1
- package/dist/private/intl/table/es-ES.js +1 -1
- package/dist/private/intl/table/es-ES.js.map +1 -1
- package/dist/private/intl/table/es-ES.mjs +1 -1
- package/dist/private/intl/table/es-ES.mjs.map +1 -1
- package/dist/private/intl/table/zh-TW.cjs +2 -2
- package/dist/private/intl/table/zh-TW.cjs.map +1 -1
- package/dist/private/intl/table/zh-TW.js +2 -2
- package/dist/private/intl/table/zh-TW.js.map +1 -1
- package/dist/private/intl/table/zh-TW.mjs +2 -2
- package/dist/private/intl/table/zh-TW.mjs.map +1 -1
- package/dist/private/label/Field.cjs +2 -1
- package/dist/private/label/Field.cjs.map +1 -1
- package/dist/private/label/Field.js +2 -1
- package/dist/private/label/Field.js.map +1 -1
- package/dist/private/label/Field.mjs +2 -1
- package/dist/private/label/Field.mjs.map +1 -1
- package/dist/private/layout/Grid.cjs +2 -1
- package/dist/private/layout/Grid.cjs.map +1 -1
- package/dist/private/layout/Grid.js +2 -1
- package/dist/private/layout/Grid.js.map +1 -1
- package/dist/private/layout/Grid.mjs +2 -1
- package/dist/private/layout/Grid.mjs.map +1 -1
- package/dist/private/link/Link.cjs +3 -0
- package/dist/private/link/Link.cjs.map +1 -1
- package/dist/private/link/Link.js +3 -0
- package/dist/private/link/Link.js.map +1 -1
- package/dist/private/link/Link.mjs +3 -0
- package/dist/private/link/Link.mjs.map +1 -1
- package/dist/private/list/InsertionIndicator.cjs +1 -0
- package/dist/private/list/InsertionIndicator.cjs.map +1 -1
- package/dist/private/list/InsertionIndicator.js +1 -0
- package/dist/private/list/InsertionIndicator.js.map +1 -1
- package/dist/private/list/InsertionIndicator.mjs +1 -0
- package/dist/private/list/InsertionIndicator.mjs.map +1 -1
- package/dist/private/list/ListView.cjs +5 -0
- package/dist/private/list/ListView.cjs.map +1 -1
- package/dist/private/list/ListView.js +5 -0
- package/dist/private/list/ListView.js.map +1 -1
- package/dist/private/list/ListView.mjs +5 -0
- package/dist/private/list/ListView.mjs.map +1 -1
- package/dist/private/list/ListViewItem.cjs +2 -0
- package/dist/private/list/ListViewItem.cjs.map +1 -1
- package/dist/private/list/ListViewItem.js +2 -0
- package/dist/private/list/ListViewItem.js.map +1 -1
- package/dist/private/list/ListViewItem.mjs +2 -0
- package/dist/private/list/ListViewItem.mjs.map +1 -1
- package/dist/private/list/RootDropIndicator.cjs +1 -0
- package/dist/private/list/RootDropIndicator.cjs.map +1 -1
- package/dist/private/list/RootDropIndicator.js +1 -0
- package/dist/private/list/RootDropIndicator.js.map +1 -1
- package/dist/private/list/RootDropIndicator.mjs +1 -0
- package/dist/private/list/RootDropIndicator.mjs.map +1 -1
- package/dist/private/menu/ContextualHelpTrigger.cjs +7 -1
- package/dist/private/menu/ContextualHelpTrigger.cjs.map +1 -1
- package/dist/private/menu/ContextualHelpTrigger.js +7 -1
- package/dist/private/menu/ContextualHelpTrigger.js.map +1 -1
- package/dist/private/menu/ContextualHelpTrigger.mjs +7 -1
- package/dist/private/menu/ContextualHelpTrigger.mjs.map +1 -1
- package/dist/private/menu/MenuItem.cjs +2 -0
- package/dist/private/menu/MenuItem.cjs.map +1 -1
- package/dist/private/menu/MenuItem.js +2 -0
- package/dist/private/menu/MenuItem.js.map +1 -1
- package/dist/private/menu/MenuItem.mjs +2 -0
- package/dist/private/menu/MenuItem.mjs.map +1 -1
- package/dist/private/menu/MenuTrigger.cjs +1 -0
- package/dist/private/menu/MenuTrigger.cjs.map +1 -1
- package/dist/private/menu/MenuTrigger.js +1 -0
- package/dist/private/menu/MenuTrigger.js.map +1 -1
- package/dist/private/menu/MenuTrigger.mjs +1 -0
- package/dist/private/menu/MenuTrigger.mjs.map +1 -1
- package/dist/private/menu/SubmenuTrigger.cjs +6 -1
- package/dist/private/menu/SubmenuTrigger.cjs.map +1 -1
- package/dist/private/menu/SubmenuTrigger.js +6 -1
- package/dist/private/menu/SubmenuTrigger.js.map +1 -1
- package/dist/private/menu/SubmenuTrigger.mjs +6 -1
- package/dist/private/menu/SubmenuTrigger.mjs.map +1 -1
- package/dist/private/package.cjs +1 -1
- package/dist/private/package.cjs.map +1 -1
- package/dist/private/package.js +1 -1
- package/dist/private/package.js.map +1 -1
- package/dist/private/package.mjs +1 -1
- package/dist/private/package.mjs.map +1 -1
- package/dist/private/progress/ProgressBarBase.cjs +2 -1
- package/dist/private/progress/ProgressBarBase.cjs.map +1 -1
- package/dist/private/progress/ProgressBarBase.js +2 -1
- package/dist/private/progress/ProgressBarBase.js.map +1 -1
- package/dist/private/progress/ProgressBarBase.mjs +2 -1
- package/dist/private/progress/ProgressBarBase.mjs.map +1 -1
- package/dist/private/progress/ProgressCircle.cjs +2 -1
- package/dist/private/progress/ProgressCircle.cjs.map +1 -1
- package/dist/private/progress/ProgressCircle.js +2 -1
- package/dist/private/progress/ProgressCircle.js.map +1 -1
- package/dist/private/progress/ProgressCircle.mjs +2 -1
- package/dist/private/progress/ProgressCircle.mjs.map +1 -1
- package/dist/private/slider/Slider.cjs +1 -0
- package/dist/private/slider/Slider.cjs.map +1 -1
- package/dist/private/slider/Slider.js +1 -0
- package/dist/private/slider/Slider.js.map +1 -1
- package/dist/private/slider/Slider.mjs +1 -0
- package/dist/private/slider/Slider.mjs.map +1 -1
- package/dist/private/table/InsertionIndicator.cjs +1 -0
- package/dist/private/table/InsertionIndicator.cjs.map +1 -1
- package/dist/private/table/InsertionIndicator.js +1 -0
- package/dist/private/table/InsertionIndicator.js.map +1 -1
- package/dist/private/table/InsertionIndicator.mjs +1 -0
- package/dist/private/table/InsertionIndicator.mjs.map +1 -1
- package/dist/private/table/Resizer.cjs +2 -25
- package/dist/private/table/Resizer.cjs.map +1 -1
- package/dist/private/table/Resizer.js +3 -26
- package/dist/private/table/Resizer.js.map +1 -1
- package/dist/private/table/Resizer.mjs +3 -26
- package/dist/private/table/Resizer.mjs.map +1 -1
- package/dist/private/table/RootDropIndicator.cjs +1 -0
- package/dist/private/table/RootDropIndicator.cjs.map +1 -1
- package/dist/private/table/RootDropIndicator.js +1 -0
- package/dist/private/table/RootDropIndicator.js.map +1 -1
- package/dist/private/table/RootDropIndicator.mjs +1 -0
- package/dist/private/table/RootDropIndicator.mjs.map +1 -1
- package/dist/private/table/TableViewBase.cjs +8 -0
- package/dist/private/table/TableViewBase.cjs.map +1 -1
- package/dist/private/table/TableViewBase.js +8 -0
- package/dist/private/table/TableViewBase.js.map +1 -1
- package/dist/private/table/TableViewBase.mjs +8 -0
- package/dist/private/table/TableViewBase.mjs.map +1 -1
- package/dist/private/table/TreeGridTableView.cjs +1 -0
- package/dist/private/table/TreeGridTableView.cjs.map +1 -1
- package/dist/private/table/TreeGridTableView.js +1 -0
- package/dist/private/table/TreeGridTableView.js.map +1 -1
- package/dist/private/table/TreeGridTableView.mjs +1 -0
- package/dist/private/table/TreeGridTableView.mjs.map +1 -1
- package/dist/private/tabs/Tabs.cjs +4 -2
- package/dist/private/tabs/Tabs.cjs.map +1 -1
- package/dist/private/tabs/Tabs.js +4 -2
- package/dist/private/tabs/Tabs.js.map +1 -1
- package/dist/private/tabs/Tabs.mjs +4 -2
- package/dist/private/tabs/Tabs.mjs.map +1 -1
- package/dist/private/tag/TagGroup.cjs +2 -0
- package/dist/private/tag/TagGroup.cjs.map +1 -1
- package/dist/private/tag/TagGroup.js +2 -0
- package/dist/private/tag/TagGroup.js.map +1 -1
- package/dist/private/tag/TagGroup.mjs +2 -0
- package/dist/private/tag/TagGroup.mjs.map +1 -1
- package/dist/private/textfield/TextArea.cjs +2 -0
- package/dist/private/textfield/TextArea.cjs.map +1 -1
- package/dist/private/textfield/TextArea.js +2 -0
- package/dist/private/textfield/TextArea.js.map +1 -1
- package/dist/private/textfield/TextArea.mjs +2 -0
- package/dist/private/textfield/TextArea.mjs.map +1 -1
- package/dist/private/textfield/TextField.cjs +1 -0
- package/dist/private/textfield/TextField.cjs.map +1 -1
- package/dist/private/textfield/TextField.js +1 -0
- package/dist/private/textfield/TextField.js.map +1 -1
- package/dist/private/textfield/TextField.mjs +1 -0
- package/dist/private/textfield/TextField.mjs.map +1 -1
- package/dist/private/textfield/TextFieldBase.cjs +2 -1
- package/dist/private/textfield/TextFieldBase.cjs.map +1 -1
- package/dist/private/textfield/TextFieldBase.js +2 -1
- package/dist/private/textfield/TextFieldBase.js.map +1 -1
- package/dist/private/textfield/TextFieldBase.mjs +2 -1
- package/dist/private/textfield/TextFieldBase.mjs.map +1 -1
- package/dist/private/utils/Slots.cjs +1 -0
- package/dist/private/utils/Slots.cjs.map +1 -1
- package/dist/private/utils/Slots.js +1 -0
- package/dist/private/utils/Slots.js.map +1 -1
- package/dist/private/utils/Slots.mjs +1 -0
- package/dist/private/utils/Slots.mjs.map +1 -1
- package/dist/types/src/dialog/AlertDialog.d.ts +2 -2
- 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/index.js +1 -1
- package/i18n/index.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 +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDM,MAAM,0DAAkB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,gBACvD,KAAsC,EACtC,GAA8B;IAE9B,QAAQ,CAAA,GAAA,yCAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,WAAC,OAAO,cAAE,UAAU,aAAE,SAAS,oBAAE,gBAAgB,oBAAE,mBAAmB,GAAE,GAAG;IAC/E,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;oBAAC;IAAU;IAClD,IAAI,YAAY,CAAA,GAAA,aAAK,EAAyB;IAC9C,IAAI,QAAQ,CAAA,GAAA,8BAAsB,EAAE;QAClC,GAAG,KAAK;QACR,qBAAqB,IAAM,CAAC,MAAM,OAAO;IAC3C;IACA,IAAI,cACF,UAAU,cACV,UAAU,eACV,WAAW,eACX,WAAW,mBACX,eAAe,iBACf,aAAa,oBACb,gBAAgB,qBAChB,iBAAiB,iBACjB,aAAa,aACb,SAAS,oBACT,gBAAgB,qBAChB,iBAAiB,EAClB,GAAG,CAAA,GAAA,yBAAiB,EAAE,OAAO,OAAO;IACrC,IAAI,UAAC,MAAM,WAAE,OAAO,EAAC,GAAG;IACxB,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,G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;QACb,UAAU;QACV,UAAU;QACV,WAAW,MAAM,SAAS;QAC1B,cAAc,MAAM,YAAY;QAChC,MAAA;;AAWtB;AAIA,SAAS;IACP,qBACE,gCAAC;QACC,eAAY;QACZ,eAAY;QACZ,WAAW,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,8CAAe,GAAG;;AAG9C","sources":["packages/@adobe/react-spectrum/src/datepicker/DateRangePicker.tsx"],"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 {\n AriaDateRangePickerProps,\n DateValue,\n useDateRangePicker\n} from 'react-aria/useDateRangePicker';\nimport CalendarIcon from '@spectrum-icons/workflow/Calendar';\nimport {classNames} from '../utils/classNames';\nimport {Content} from '../view/Content';\nimport {DatePickerField} from './DatePickerField';\nimport datepickerStyles from './styles.css';\nimport {Dialog} from '../dialog/Dialog';\nimport {DialogTrigger} from '../dialog/DialogTrigger';\nimport {Field} from '../label/Field';\nimport {FieldButton} from '../button/FieldButton';\nimport {Flex} from '../layout/Flex';\nimport {FocusableRef} from '@react-types/shared';\nimport {Input} from './Input';\nimport intlMessages from '../../intl/datepicker/*.json';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {RangeCalendar} from '../calendar/RangeCalendar';\nimport React, {ReactElement, useRef} from 'react';\nimport {SpectrumDatePickerBase} from './DatePicker';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TimeField} from './TimeField';\nimport {useDateRangePickerState} from 'react-stately/useDateRangePickerState';\nimport {\n useFocusManagerRef,\n useFormatHelpText,\n useFormattedDateWidth,\n useVisibleMonths\n} from './utils';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useFormProps} from '../form/Form';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useProviderProps} from '../provider/Provider';\n\nexport interface SpectrumDateRangePickerProps<T extends DateValue>\n extends\n Omit<AriaDateRangePickerProps<T>, 'isInvalid' | 'validationState'>,\n Omit<SpectrumDatePickerBase<T>, 'validate'> {}\n\n/**\n * DateRangePickers combine two DateFields and a RangeCalendar popover to allow users\n * to enter or select a date and time range.\n */\nexport const DateRangePicker = React.forwardRef(function DateRangePicker<T extends DateValue>(\n props: SpectrumDateRangePickerProps<T>,\n ref: FocusableRef<HTMLElement>\n) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {isQuiet, isDisabled, autoFocus, placeholderValue, maxVisibleMonths = 1} = props;\n let {hoverProps, isHovered} = useHover({isDisabled});\n let targetRef = useRef<HTMLDivElement | null>(null);\n let state = useDateRangePickerState({\n ...props,\n shouldCloseOnSelect: () => !state.hasTime\n });\n let {\n labelProps,\n groupProps,\n buttonProps,\n dialogProps,\n startFieldProps,\n endFieldProps,\n descriptionProps,\n errorMessageProps,\n calendarProps,\n isInvalid,\n validationErrors,\n validationDetails\n } = useDateRangePicker(props, state, targetRef);\n let {isOpen, setOpen} = state;\n let {direction} = useLocale();\n let domRef = useFocusManagerRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/datepicker');\n\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({\n within: true,\n isTextInput: true,\n autoFocus\n });\n\n let {isFocused: isFocusedButton, focusProps: focusPropsButton} = useFocusRing({\n within: false,\n isTextInput: false,\n autoFocus\n });\n\n let className = classNames(styles, 'spectrum-InputGroup', {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'spectrum-InputGroup--invalid': isInvalid && !isDisabled,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'focus-ring': isFocusVisible && !isFocusedButton\n });\n\n let fieldClassName = classNames(styles, 'spectrum-InputGroup-input', {\n 'is-disabled': isDisabled,\n 'is-invalid': isInvalid && !isDisabled\n });\n\n // Note: this description is intentionally not passed to useDatePicker.\n // The format help text is unnecessary for screen reader users because each segment already has a label.\n let description = useFormatHelpText(props);\n if (description && !props.description) {\n descriptionProps.id = undefined;\n }\n\n let placeholder: DateValue | null | undefined = placeholderValue;\n let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;\n let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;\n let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;\n let timeGranularity =\n state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second'\n ? state.granularity\n : null;\n let showTimeField = !!timeGranularity;\n\n let visibleMonths = useVisibleMonths(maxVisibleMonths);\n let validationState = state.validationState || (isInvalid ? 'invalid' : null);\n\n // Multiplying by two for the two dates, adding one character for the dash, and then the padding around the dash\n let approximateWidth = `calc(${useFormattedDateWidth(state) * 2 + 1}ch + 2 * var(--spectrum-global-dimension-size-100))`;\n\n return (\n <Field\n {...props}\n ref={domRef}\n elementType=\"span\"\n description={description}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={validationState}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n wrapperClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>\n <div\n {...mergeProps(groupProps, hoverProps, focusProps)}\n className={className}\n ref={targetRef}>\n <div style={{overflow: 'hidden', width: '100%'}}>\n <Input\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n validationState={validationState}\n className={classNames(styles, 'spectrum-InputGroup-field')}\n inputClassName={fieldClassName}\n disableFocusRing\n minWidth={approximateWidth}>\n <DatePickerField\n {...startFieldProps}\n data-testid=\"start-date\"\n isQuiet={props.isQuiet}\n inputClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-startField')}\n />\n <DateRangeDash />\n <DatePickerField\n {...endFieldProps}\n data-testid=\"end-date\"\n isQuiet={props.isQuiet}\n inputClassName={classNames(\n styles,\n 'spectrum-Datepicker-endField',\n classNames(datepickerStyles, 'react-spectrum-Datepicker-endField')\n )}\n />\n </Input>\n </div>\n <DialogTrigger\n type=\"popover\"\n mobileType=\"tray\"\n placement={direction === 'rtl' ? 'bottom right' : 'bottom left'}\n targetRef={targetRef}\n hideArrow\n isOpen={isOpen}\n onOpenChange={setOpen}\n shouldFlip={props.shouldFlip}>\n <FieldButton\n {...mergeProps(buttonProps, focusPropsButton)}\n UNSAFE_className={classNames(styles, 'spectrum-FieldButton')}\n isQuiet={isQuiet}\n validationState={validationState}>\n <CalendarIcon />\n </FieldButton>\n <Dialog\n UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialog')}\n {...dialogProps}>\n <Content>\n <div\n className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialogContent')}>\n <RangeCalendar\n {...calendarProps}\n visibleMonths={visibleMonths}\n createCalendar={props.createCalendar}\n UNSAFE_className={classNames(\n datepickerStyles,\n 'react-spectrum-Datepicker-calendar',\n {'is-invalid': validationState === 'invalid'}\n )}\n />\n {showTimeField && (\n <Flex\n gap=\"size-100\"\n marginTop=\"size-100\"\n UNSAFE_className={classNames(\n datepickerStyles,\n 'react-spectrum-Datepicker-timeFields'\n )}>\n <TimeField\n label={stringFormatter.format('startTime')}\n value={state.timeRange?.start || null}\n onChange={v => state.setTime('start', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n flex\n />\n <TimeField\n label={stringFormatter.format('endTime')}\n value={state.timeRange?.end || null}\n onChange={v => state.setTime('end', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n flex\n />\n </Flex>\n )}\n </div>\n </Content>\n </Dialog>\n </DialogTrigger>\n </div>\n </Field>\n );\n}) as <T extends DateValue>(\n props: SpectrumDateRangePickerProps<T> & {ref?: FocusableRef<HTMLElement>}\n) => ReactElement;\n\nfunction DateRangeDash() {\n return (\n <span\n aria-hidden=\"true\"\n data-testid=\"date-range-dash\"\n className={classNames(datepickerStyles, 'react-spectrum-Datepicker-rangeDash')}\n />\n );\n}\n"],"names":[],"version":3,"file":"DateRangePicker.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDM,MAAM,0DAAkB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,gBACvD,KAAsC,EACtC,GAA8B;IAE9B,QAAQ,CAAA,GAAA,yCAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,WAAC,OAAO,cAAE,UAAU,aAAE,SAAS,oBAAE,gBAAgB,oBAAE,mBAAmB,GAAE,GAAG;IAC/E,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;oBAAC;IAAU;IAClD,IAAI,YAAY,CAAA,GAAA,aAAK,EAAyB;IAC9C,IAAI,QAAQ,CAAA,GAAA,8BAAsB,EAAE;QAClC,GAAG,KAAK;QACR,qBAAqB,IAAM,CAAC,MAAM,OAAO;IAC3C;IACA,IAAI,cACF,UAAU,cACV,UAAU,eACV,WAAW,eACX,WAAW,mBACX,eAAe,iBACf,aAAa,oBACb,gBAAgB,qBAChB,iBAAiB,iBACjB,aAAa,aACb,SAAS,oBACT,gBAAgB,qBAChB,iBAAiB,EAClB,GAAG,CAAA,GAAA,yBAAiB,EAAE,OAAO,OAAO;IACrC,IAAI,UAAC,MA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AAE,OAAO;QAC/B,UAAU,CAAA,IAAK,MAAM,OAAO,CAAC,OAAO;QACpC,kBAAkB;QAClB,aAAa;QACb,UAAU;QACV,UAAU;QACV,WAAW,MAAM,SAAS;QAC1B,cAAc,MAAM,YAAY;QAChC,MAAA;;AAWtB;AAIA,SAAS;IACP,qBACE,gCAAC;QACC,eAAY;QACZ,eAAY;QACZ,WAAW,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,8CAAe,GAAG;;AAG9C","sources":["packages/@adobe/react-spectrum/src/datepicker/DateRangePicker.tsx"],"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 {\n AriaDateRangePickerProps,\n DateValue,\n useDateRangePicker\n} from 'react-aria/useDateRangePicker';\nimport CalendarIcon from '@spectrum-icons/workflow/Calendar';\nimport {classNames} from '../utils/classNames';\nimport {Content} from '../view/Content';\nimport {DatePickerField} from './DatePickerField';\nimport datepickerStyles from './styles.css';\nimport {Dialog} from '../dialog/Dialog';\nimport {DialogTrigger} from '../dialog/DialogTrigger';\nimport {Field} from '../label/Field';\nimport {FieldButton} from '../button/FieldButton';\nimport {Flex} from '../layout/Flex';\nimport {FocusableRef} from '@react-types/shared';\nimport {Input} from './Input';\nimport intlMessages from '../../intl/datepicker/*.json';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {RangeCalendar} from '../calendar/RangeCalendar';\nimport React, {ReactElement, useRef} from 'react';\nimport {SpectrumDatePickerBase} from './DatePicker';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TimeField} from './TimeField';\nimport {useDateRangePickerState} from 'react-stately/useDateRangePickerState';\nimport {\n useFocusManagerRef,\n useFormatHelpText,\n useFormattedDateWidth,\n useVisibleMonths\n} from './utils';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useFormProps} from '../form/Form';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useProviderProps} from '../provider/Provider';\n\nexport interface SpectrumDateRangePickerProps<T extends DateValue>\n extends\n Omit<AriaDateRangePickerProps<T>, 'isInvalid' | 'validationState'>,\n Omit<SpectrumDatePickerBase<T>, 'validate'> {}\n\n/**\n * DateRangePickers combine two DateFields and a RangeCalendar popover to allow users\n * to enter or select a date and time range.\n */\nexport const DateRangePicker = React.forwardRef(function DateRangePicker<T extends DateValue>(\n props: SpectrumDateRangePickerProps<T>,\n ref: FocusableRef<HTMLElement>\n) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {isQuiet, isDisabled, autoFocus, placeholderValue, maxVisibleMonths = 1} = props;\n let {hoverProps, isHovered} = useHover({isDisabled});\n let targetRef = useRef<HTMLDivElement | null>(null);\n let state = useDateRangePickerState({\n ...props,\n shouldCloseOnSelect: () => !state.hasTime\n });\n let {\n labelProps,\n groupProps,\n buttonProps,\n dialogProps,\n startFieldProps,\n endFieldProps,\n descriptionProps,\n errorMessageProps,\n calendarProps,\n isInvalid,\n validationErrors,\n validationDetails\n } = useDateRangePicker(props, state, targetRef);\n let {isOpen, setOpen} = state;\n let {direction} = useLocale();\n let domRef = useFocusManagerRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/datepicker');\n\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({\n within: true,\n isTextInput: true,\n autoFocus\n });\n\n let {isFocused: isFocusedButton, focusProps: focusPropsButton} = useFocusRing({\n within: false,\n isTextInput: false,\n autoFocus\n });\n\n let className = classNames(styles, 'spectrum-InputGroup', {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'spectrum-InputGroup--invalid': isInvalid && !isDisabled,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'focus-ring': isFocusVisible && !isFocusedButton\n });\n\n let fieldClassName = classNames(styles, 'spectrum-InputGroup-input', {\n 'is-disabled': isDisabled,\n 'is-invalid': isInvalid && !isDisabled\n });\n\n // Note: this description is intentionally not passed to useDatePicker.\n // The format help text is unnecessary for screen reader users because each segment already has a label.\n let description = useFormatHelpText(props);\n if (description && !props.description) {\n // oxlint-disable-next-line react/react-compiler\n descriptionProps.id = undefined;\n }\n\n let placeholder: DateValue | null | undefined = placeholderValue;\n let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;\n let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;\n let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;\n let timeGranularity =\n state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second'\n ? state.granularity\n : null;\n let showTimeField = !!timeGranularity;\n\n let visibleMonths = useVisibleMonths(maxVisibleMonths);\n let validationState = state.validationState || (isInvalid ? 'invalid' : null);\n\n // Multiplying by two for the two dates, adding one character for the dash, and then the padding around the dash\n let approximateWidth = `calc(${useFormattedDateWidth(state) * 2 + 1}ch + 2 * var(--spectrum-global-dimension-size-100))`;\n\n return (\n <Field\n {...props}\n ref={domRef}\n elementType=\"span\"\n description={description}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={validationState}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n wrapperClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>\n <div\n {...mergeProps(groupProps, hoverProps, focusProps)}\n className={className}\n ref={targetRef}>\n <div style={{overflow: 'hidden', width: '100%'}}>\n <Input\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n validationState={validationState}\n className={classNames(styles, 'spectrum-InputGroup-field')}\n inputClassName={fieldClassName}\n disableFocusRing\n minWidth={approximateWidth}>\n <DatePickerField\n {...startFieldProps}\n data-testid=\"start-date\"\n isQuiet={props.isQuiet}\n inputClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-startField')}\n />\n <DateRangeDash />\n <DatePickerField\n {...endFieldProps}\n data-testid=\"end-date\"\n isQuiet={props.isQuiet}\n inputClassName={classNames(\n styles,\n 'spectrum-Datepicker-endField',\n classNames(datepickerStyles, 'react-spectrum-Datepicker-endField')\n )}\n />\n </Input>\n </div>\n <DialogTrigger\n type=\"popover\"\n mobileType=\"tray\"\n placement={direction === 'rtl' ? 'bottom right' : 'bottom left'}\n targetRef={targetRef}\n hideArrow\n isOpen={isOpen}\n onOpenChange={setOpen}\n shouldFlip={props.shouldFlip}>\n <FieldButton\n {...mergeProps(buttonProps, focusPropsButton)}\n UNSAFE_className={classNames(styles, 'spectrum-FieldButton')}\n isQuiet={isQuiet}\n validationState={validationState}>\n <CalendarIcon />\n </FieldButton>\n <Dialog\n UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialog')}\n {...dialogProps}>\n <Content>\n <div\n className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialogContent')}>\n <RangeCalendar\n {...calendarProps}\n visibleMonths={visibleMonths}\n createCalendar={props.createCalendar}\n UNSAFE_className={classNames(\n datepickerStyles,\n 'react-spectrum-Datepicker-calendar',\n {'is-invalid': validationState === 'invalid'}\n )}\n />\n {showTimeField && (\n <Flex\n gap=\"size-100\"\n marginTop=\"size-100\"\n UNSAFE_className={classNames(\n datepickerStyles,\n 'react-spectrum-Datepicker-timeFields'\n )}>\n <TimeField\n label={stringFormatter.format('startTime')}\n value={state.timeRange?.start || null}\n onChange={v => state.setTime('start', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n flex\n />\n <TimeField\n label={stringFormatter.format('endTime')}\n value={state.timeRange?.end || null}\n onChange={v => state.setTime('end', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n flex\n />\n </Flex>\n )}\n </div>\n </Content>\n </Dialog>\n </DialogTrigger>\n </div>\n </Field>\n );\n}) as <T extends DateValue>(\n props: SpectrumDateRangePickerProps<T> & {ref?: FocusableRef<HTMLElement>}\n) => ReactElement;\n\nfunction DateRangeDash() {\n return (\n <span\n aria-hidden=\"true\"\n data-testid=\"date-range-dash\"\n className={classNames(datepickerStyles, 'react-spectrum-Datepicker-rangeDash')}\n />\n );\n}\n"],"names":[],"version":3,"file":"DateRangePicker.mjs.map"}
|
|
@@ -71,7 +71,9 @@ const $c82f495a1ede320e$export$de466dd8317b0b75 = /*#__PURE__*/ (0, $7B7fC$react
|
|
|
71
71
|
size: "M",
|
|
72
72
|
role: "alertdialog",
|
|
73
73
|
ref: ref,
|
|
74
|
-
...(0, $7B7fC$reactariafilterDOMProps.filterDOMProps)(props
|
|
74
|
+
...(0, $7B7fC$reactariafilterDOMProps.filterDOMProps)(props, {
|
|
75
|
+
labelable: true
|
|
76
|
+
})
|
|
75
77
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($7B7fC$react))).createElement((0, $ef0b1cd7dce2b6c2$exports.Heading), null, title), (variant === 'error' || variant === 'warning') && /*#__PURE__*/ (0, ($parcel$interopDefault($7B7fC$react))).createElement((0, ($parcel$interopDefault($7B7fC$spectrumiconsuiAlertMedium))), {
|
|
76
78
|
slot: "typeIcon",
|
|
77
79
|
"aria-label": stringFormatter.format('alert')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;AAoDM,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YA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W;QAChC,YAAY;QACZ,WAAW,oBAAoB;QAC/B,eAAY;OACX,qCAGL,0DAAC,CAAA,GAAA,gCAAK;QACJ,SAAS;QACT,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,WAAW;QAChC,YAAY;QACZ,WAAW,oBAAoB;QAC/B,eAAY;OACX;AAKX","sources":["packages/@adobe/react-spectrum/src/dialog/AlertDialog.tsx"],"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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {AriaLabelingProps, DOMProps, DOMRef, StyleProps} from '@react-types/shared';\nimport {Button, SpectrumButtonProps} from '../button/Button';\nimport {ButtonGroup} from '../buttongroup/ButtonGroup';\nimport {chain} from 'react-aria/chain';\nimport {classNames} from '../utils/classNames';\nimport {Content} from '../view/Content';\nimport {Dialog} from './Dialog';\nimport {DialogContext, DialogContextValue} from './context';\nimport {Divider} from '../divider/Divider';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {Heading} from '../text/Heading';\nimport intlMessages from '../../intl/dialog/*.json';\nimport React, {forwardRef, ReactNode, useContext} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/dialog/vars.css';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useStyleProps} from '../utils/styleProps';\n\nexport interface SpectrumAlertDialogProps extends AriaLabelingProps, DOMProps, StyleProps {\n /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */\n variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning';\n /** The title of the AlertDialog. */\n title: string;\n /** The contents of the AlertDialog. */\n children: ReactNode;\n /** The label to display within the cancel button. */\n cancelLabel?: string;\n /** The label to display within the confirm button. */\n primaryActionLabel: string;\n /** The label to display within the secondary button. */\n secondaryActionLabel?: string;\n /** Whether the primary button is disabled. */\n isPrimaryActionDisabled?: boolean;\n /** Whether the secondary button is disabled. */\n isSecondaryActionDisabled?: boolean;\n /** Handler that is called when the cancel button is pressed. */\n onCancel?: () => void;\n /** Handler that is called when the primary button is pressed. */\n onPrimaryAction?: () => void;\n /** Handler that is called when the secondary button is pressed. */\n onSecondaryAction?: () => void;\n /** Button to focus by default when the dialog opens. */\n autoFocusButton?: 'cancel' | 'primary' | 'secondary';\n // allowsKeyboardConfirmation?: boolean, // triggers primary action\n}\n\n/**\n * AlertDialogs are a specific type of Dialog. They display important information that users need to\n * acknowledge.\n */\nexport const AlertDialog = forwardRef(function AlertDialog(\n props: SpectrumAlertDialogProps,\n ref: DOMRef\n) {\n let {onClose = () => {}} = useContext(DialogContext) || ({} as DialogContextValue);\n\n let {\n variant,\n children,\n primaryActionLabel,\n secondaryActionLabel,\n cancelLabel,\n autoFocusButton,\n title,\n isPrimaryActionDisabled,\n isSecondaryActionDisabled,\n onCancel = () => {},\n onPrimaryAction = () => {},\n onSecondaryAction = () => {},\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/dialog');\n\n let confirmVariant: SpectrumButtonProps['variant'] = 'primary';\n if (variant) {\n if (variant === 'confirmation') {\n confirmVariant = 'cta';\n } else if (variant === 'destructive') {\n confirmVariant = 'negative';\n }\n }\n\n return (\n <Dialog\n UNSAFE_style={styleProps.style}\n UNSAFE_className={classNames(\n styles,\n {[`spectrum-Dialog--${variant}`]: variant},\n styleProps.className\n )}\n isHidden={styleProps.hidden}\n size=\"M\"\n role=\"alertdialog\"\n ref={ref}\n {...filterDOMProps(props, {labelable: true})}>\n <Heading>{title}</Heading>\n {(variant === 'error' || variant === 'warning') && (\n <AlertMedium slot=\"typeIcon\" aria-label={stringFormatter.format('alert')} />\n )}\n <Divider />\n <Content>{children}</Content>\n <ButtonGroup align=\"end\">\n {cancelLabel && (\n <Button\n variant=\"secondary\"\n onPress={() => chain(onClose(), onCancel())}\n autoFocus={autoFocusButton === 'cancel'}\n data-testid=\"rsp-AlertDialog-cancelButton\">\n {cancelLabel}\n </Button>\n )}\n {secondaryActionLabel && (\n <Button\n variant=\"secondary\"\n onPress={() => chain(onClose(), onSecondaryAction())}\n isDisabled={isSecondaryActionDisabled}\n autoFocus={autoFocusButton === 'secondary'}\n data-testid=\"rsp-AlertDialog-secondaryButton\">\n {secondaryActionLabel}\n </Button>\n )}\n <Button\n variant={confirmVariant}\n onPress={() => chain(onClose(), onPrimaryAction())}\n isDisabled={isPrimaryActionDisabled}\n autoFocus={autoFocusButton === 'primary'}\n data-testid=\"rsp-AlertDialog-confirmButton\">\n {primaryActionLabel}\n </Button>\n </ButtonGroup>\n </Dialog>\n );\n});\n"],"names":[],"version":3,"file":"AlertDialog.cjs.map"}
|
|
@@ -65,7 +65,9 @@ const $0c3b86927117991f$export$de466dd8317b0b75 = /*#__PURE__*/ (0, $eB83Y$forwa
|
|
|
65
65
|
size: "M",
|
|
66
66
|
role: "alertdialog",
|
|
67
67
|
ref: ref,
|
|
68
|
-
...(0, $eB83Y$filterDOMProps)(props
|
|
68
|
+
...(0, $eB83Y$filterDOMProps)(props, {
|
|
69
|
+
labelable: true
|
|
70
|
+
})
|
|
69
71
|
}, /*#__PURE__*/ (0, $eB83Y$react).createElement((0, $ddc09b0bc61c28b1$export$a8a3e93435678ff9), null, title), (variant === 'error' || variant === 'warning') && /*#__PURE__*/ (0, $eB83Y$react).createElement((0, $eB83Y$spectrumiconsuiAlertMedium), {
|
|
70
72
|
slot: "typeIcon",
|
|
71
73
|
"aria-label": stringFormatter.format('alert')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;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;OACX,cAGJ,sCACC,gCAAC,CAAA,GAAA,yCAAK;QACJ,SAAQ;QACR,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,WAAW;QAChC,YAAY;QACZ,WAAW,oBAAoB;QAC/B,eAAY;OACX,qCAGL,gCAAC,CAAA,GAAA,yCAAK;QACJ,SAAS;QACT,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,WAAW;QAChC,YAAY;QACZ,WAAW,oBAAoB;QAC/B,eAAY;OACX;AAKX","sources":["packages/@adobe/react-spectrum/src/dialog/AlertDialog.tsx"],"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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {AriaLabelingProps, DOMProps, DOMRef, StyleProps} from '@react-types/shared';\nimport {Button, SpectrumButtonProps} from '../button/Button';\nimport {ButtonGroup} from '../buttongroup/ButtonGroup';\nimport {chain} from 'react-aria/chain';\nimport {classNames} from '../utils/classNames';\nimport {Content} from '../view/Content';\nimport {Dialog} from './Dialog';\nimport {DialogContext, DialogContextValue} from './context';\nimport {Divider} from '../divider/Divider';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {Heading} from '../text/Heading';\nimport intlMessages from '../../intl/dialog/*.json';\nimport React, {forwardRef, ReactNode, useContext} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/dialog/vars.css';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useStyleProps} from '../utils/styleProps';\n\nexport interface SpectrumAlertDialogProps extends AriaLabelingProps, DOMProps, StyleProps {\n /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */\n variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning';\n /** The title of the AlertDialog. */\n title: string;\n /** The contents of the AlertDialog. */\n children: ReactNode;\n /** The label to display within the cancel button. */\n cancelLabel?: string;\n /** The label to display within the confirm button. */\n primaryActionLabel: string;\n /** The label to display within the secondary button. */\n secondaryActionLabel?: string;\n /** Whether the primary button is disabled. */\n isPrimaryActionDisabled?: boolean;\n /** Whether the secondary button is disabled. */\n isSecondaryActionDisabled?: boolean;\n /** Handler that is called when the cancel button is pressed. */\n onCancel?: () => void;\n /** Handler that is called when the primary button is pressed. */\n onPrimaryAction?: () => void;\n /** Handler that is called when the secondary button is pressed. */\n onSecondaryAction?: () => void;\n /** Button to focus by default when the dialog opens. */\n autoFocusButton?: 'cancel' | 'primary' | 'secondary';\n // allowsKeyboardConfirmation?: boolean, // triggers primary action\n}\n\n/**\n * AlertDialogs are a specific type of Dialog. They display important information that users need to\n * acknowledge.\n */\nexport const AlertDialog = forwardRef(function AlertDialog(\n props: SpectrumAlertDialogProps,\n ref: DOMRef\n) {\n let {onClose = () => {}} = useContext(DialogContext) || ({} as DialogContextValue);\n\n let {\n variant,\n children,\n primaryActionLabel,\n secondaryActionLabel,\n cancelLabel,\n autoFocusButton,\n title,\n isPrimaryActionDisabled,\n isSecondaryActionDisabled,\n onCancel = () => {},\n onPrimaryAction = () => {},\n onSecondaryAction = () => {},\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/dialog');\n\n let confirmVariant: SpectrumButtonProps['variant'] = 'primary';\n if (variant) {\n if (variant === 'confirmation') {\n confirmVariant = 'cta';\n } else if (variant === 'destructive') {\n confirmVariant = 'negative';\n }\n }\n\n return (\n <Dialog\n UNSAFE_style={styleProps.style}\n UNSAFE_className={classNames(\n styles,\n {[`spectrum-Dialog--${variant}`]: variant},\n styleProps.className\n )}\n isHidden={styleProps.hidden}\n size=\"M\"\n role=\"alertdialog\"\n ref={ref}\n {...filterDOMProps(props, {labelable: true})}>\n <Heading>{title}</Heading>\n {(variant === 'error' || variant === 'warning') && (\n <AlertMedium slot=\"typeIcon\" aria-label={stringFormatter.format('alert')} />\n )}\n <Divider />\n <Content>{children}</Content>\n <ButtonGroup align=\"end\">\n {cancelLabel && (\n <Button\n variant=\"secondary\"\n onPress={() => chain(onClose(), onCancel())}\n autoFocus={autoFocusButton === 'cancel'}\n data-testid=\"rsp-AlertDialog-cancelButton\">\n {cancelLabel}\n </Button>\n )}\n {secondaryActionLabel && (\n <Button\n variant=\"secondary\"\n onPress={() => chain(onClose(), onSecondaryAction())}\n isDisabled={isSecondaryActionDisabled}\n autoFocus={autoFocusButton === 'secondary'}\n data-testid=\"rsp-AlertDialog-secondaryButton\">\n {secondaryActionLabel}\n </Button>\n )}\n <Button\n variant={confirmVariant}\n onPress={() => chain(onClose(), onPrimaryAction())}\n isDisabled={isPrimaryActionDisabled}\n autoFocus={autoFocusButton === 'primary'}\n data-testid=\"rsp-AlertDialog-confirmButton\">\n {primaryActionLabel}\n </Button>\n </ButtonGroup>\n </Dialog>\n );\n});\n"],"names":[],"version":3,"file":"AlertDialog.js.map"}
|
|
@@ -65,7 +65,9 @@ const $e2979e34515e88d9$export$de466dd8317b0b75 = /*#__PURE__*/ (0, $lhEz1$forwa
|
|
|
65
65
|
size: "M",
|
|
66
66
|
role: "alertdialog",
|
|
67
67
|
ref: ref,
|
|
68
|
-
...(0, $lhEz1$filterDOMProps)(props
|
|
68
|
+
...(0, $lhEz1$filterDOMProps)(props, {
|
|
69
|
+
labelable: true
|
|
70
|
+
})
|
|
69
71
|
}, /*#__PURE__*/ (0, $lhEz1$react).createElement((0, $31107baeb31b7fac$export$a8a3e93435678ff9), null, title), (variant === 'error' || variant === 'warning') && /*#__PURE__*/ (0, $lhEz1$react).createElement((0, $lhEz1$spectrumiconsuiAlertMedium), {
|
|
70
72
|
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AAK;QACJ,SAAQ;QACR,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,WAAW;QAChC,WAAW,oBAAoB;QAC/B,eAAY;OACX,cAGJ,sCACC,gCAAC,CAAA,GAAA,yCAAK;QACJ,SAAQ;QACR,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,WAAW;QAChC,YAAY;QACZ,WAAW,oBAAoB;QAC/B,eAAY;OACX,qCAGL,gCAAC,CAAA,GAAA,yCAAK;QACJ,SAAS;QACT,SAAS,IAAM,CAAA,GAAA,YAAI,EAAE,WAAW;QAChC,YAAY;QACZ,WAAW,oBAAoB;QAC/B,eAAY;OACX;AAKX","sources":["packages/@adobe/react-spectrum/src/dialog/AlertDialog.tsx"],"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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {AriaLabelingProps, DOMProps, DOMRef, StyleProps} from '@react-types/shared';\nimport {Button, SpectrumButtonProps} from '../button/Button';\nimport {ButtonGroup} from '../buttongroup/ButtonGroup';\nimport {chain} from 'react-aria/chain';\nimport {classNames} from '../utils/classNames';\nimport {Content} from '../view/Content';\nimport {Dialog} from './Dialog';\nimport {DialogContext, DialogContextValue} from './context';\nimport {Divider} from '../divider/Divider';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {Heading} from '../text/Heading';\nimport intlMessages from '../../intl/dialog/*.json';\nimport React, {forwardRef, ReactNode, useContext} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/dialog/vars.css';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useStyleProps} from '../utils/styleProps';\n\nexport interface SpectrumAlertDialogProps extends AriaLabelingProps, DOMProps, StyleProps {\n /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */\n variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning';\n /** The title of the AlertDialog. */\n title: string;\n /** The contents of the AlertDialog. */\n children: ReactNode;\n /** The label to display within the cancel button. */\n cancelLabel?: string;\n /** The label to display within the confirm button. */\n primaryActionLabel: string;\n /** The label to display within the secondary button. */\n secondaryActionLabel?: string;\n /** Whether the primary button is disabled. */\n isPrimaryActionDisabled?: boolean;\n /** Whether the secondary button is disabled. */\n isSecondaryActionDisabled?: boolean;\n /** Handler that is called when the cancel button is pressed. */\n onCancel?: () => void;\n /** Handler that is called when the primary button is pressed. */\n onPrimaryAction?: () => void;\n /** Handler that is called when the secondary button is pressed. */\n onSecondaryAction?: () => void;\n /** Button to focus by default when the dialog opens. */\n autoFocusButton?: 'cancel' | 'primary' | 'secondary';\n // allowsKeyboardConfirmation?: boolean, // triggers primary action\n}\n\n/**\n * AlertDialogs are a specific type of Dialog. They display important information that users need to\n * acknowledge.\n */\nexport const AlertDialog = forwardRef(function AlertDialog(\n props: SpectrumAlertDialogProps,\n ref: DOMRef\n) {\n let {onClose = () => {}} = useContext(DialogContext) || ({} as DialogContextValue);\n\n let {\n variant,\n children,\n primaryActionLabel,\n secondaryActionLabel,\n cancelLabel,\n autoFocusButton,\n title,\n isPrimaryActionDisabled,\n isSecondaryActionDisabled,\n onCancel = () => {},\n onPrimaryAction = () => {},\n onSecondaryAction = () => {},\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/dialog');\n\n let confirmVariant: SpectrumButtonProps['variant'] = 'primary';\n if (variant) {\n if (variant === 'confirmation') {\n confirmVariant = 'cta';\n } else if (variant === 'destructive') {\n confirmVariant = 'negative';\n }\n }\n\n return (\n <Dialog\n UNSAFE_style={styleProps.style}\n UNSAFE_className={classNames(\n styles,\n {[`spectrum-Dialog--${variant}`]: variant},\n styleProps.className\n )}\n isHidden={styleProps.hidden}\n size=\"M\"\n role=\"alertdialog\"\n ref={ref}\n {...filterDOMProps(props, {labelable: true})}>\n <Heading>{title}</Heading>\n {(variant === 'error' || variant === 'warning') && (\n <AlertMedium slot=\"typeIcon\" aria-label={stringFormatter.format('alert')} />\n )}\n <Divider />\n <Content>{children}</Content>\n <ButtonGroup align=\"end\">\n {cancelLabel && (\n <Button\n variant=\"secondary\"\n onPress={() => chain(onClose(), onCancel())}\n autoFocus={autoFocusButton === 'cancel'}\n data-testid=\"rsp-AlertDialog-cancelButton\">\n {cancelLabel}\n </Button>\n )}\n {secondaryActionLabel && (\n <Button\n variant=\"secondary\"\n onPress={() => chain(onClose(), onSecondaryAction())}\n isDisabled={isSecondaryActionDisabled}\n autoFocus={autoFocusButton === 'secondary'}\n data-testid=\"rsp-AlertDialog-secondaryButton\">\n {secondaryActionLabel}\n </Button>\n )}\n <Button\n variant={confirmVariant}\n onPress={() => chain(onClose(), onPrimaryAction())}\n isDisabled={isPrimaryActionDisabled}\n autoFocus={autoFocusButton === 'primary'}\n data-testid=\"rsp-AlertDialog-confirmButton\">\n {primaryActionLabel}\n </Button>\n </ButtonGroup>\n </Dialog>\n );\n});\n"],"names":[],"version":3,"file":"AlertDialog.mjs.map"}
|
|
@@ -67,10 +67,14 @@ const $db50fa4488be370e$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
67
67
|
let domRef = (0, $65aea7b37663976b$exports.useDOMRef)(ref);
|
|
68
68
|
let gridRef = (0, $hi7zK$react.useRef)(null);
|
|
69
69
|
let sizeVariant = $db50fa4488be370e$var$sizeMap[type] || $db50fa4488be370e$var$sizeMap[size];
|
|
70
|
-
let { dialogProps: dialogProps, titleProps: titleProps } = (0, $hi7zK$reactariauseDialog.useDialog)((0, $hi7zK$reactariamergeProps.mergeProps)(contextProps, props), domRef);
|
|
70
|
+
let { dialogProps: dialogProps, titleProps: titleProps, contentProps: contentProps } = (0, $hi7zK$reactariauseDialog.useDialog)((0, $hi7zK$reactariamergeProps.mergeProps)(contextProps, props), domRef);
|
|
71
|
+
// oxlint-disable-next-line react/react-compiler
|
|
71
72
|
let hasHeader = (0, $dd6348d4a1a51ff9$exports.useHasChild)(`.${(0, ($parcel$interopDefault($5f6caa7677856121$exports)))['spectrum-Dialog-header']}`, (0, $65aea7b37663976b$exports.unwrapDOMRef)(gridRef));
|
|
73
|
+
// oxlint-disable-next-line react/react-compiler
|
|
72
74
|
let hasHeading = (0, $dd6348d4a1a51ff9$exports.useHasChild)(`.${(0, ($parcel$interopDefault($5f6caa7677856121$exports)))['spectrum-Dialog-heading']}`, (0, $65aea7b37663976b$exports.unwrapDOMRef)(gridRef));
|
|
75
|
+
// oxlint-disable-next-line react/react-compiler
|
|
73
76
|
let hasFooter = (0, $dd6348d4a1a51ff9$exports.useHasChild)(`.${(0, ($parcel$interopDefault($5f6caa7677856121$exports)))['spectrum-Dialog-footer']}`, (0, $65aea7b37663976b$exports.unwrapDOMRef)(gridRef));
|
|
77
|
+
// oxlint-disable-next-line react/react-compiler
|
|
74
78
|
let hasTypeIcon = (0, $dd6348d4a1a51ff9$exports.useHasChild)(`.${(0, ($parcel$interopDefault($5f6caa7677856121$exports)))['spectrum-Dialog-typeIcon']}`, (0, $65aea7b37663976b$exports.unwrapDOMRef)(gridRef));
|
|
75
79
|
let slots = (0, $hi7zK$react.useMemo)(()=>({
|
|
76
80
|
hero: {
|
|
@@ -86,6 +90,7 @@ const $db50fa4488be370e$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
86
90
|
},
|
|
87
91
|
header: {
|
|
88
92
|
UNSAFE_className: (0, $69fd630bd812ba47$exports.classNames)((0, ($parcel$interopDefault($5f6caa7677856121$exports))), 'spectrum-Dialog-header', {
|
|
93
|
+
// oxlint-disable-next-line react/react-compiler
|
|
89
94
|
'spectrum-Dialog-header--noHeading': !hasHeading,
|
|
90
95
|
'spectrum-Dialog-header--noTypeIcon': !hasTypeIcon
|
|
91
96
|
})
|
|
@@ -98,7 +103,8 @@ const $db50fa4488be370e$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
98
103
|
size: 'M'
|
|
99
104
|
},
|
|
100
105
|
content: {
|
|
101
|
-
UNSAFE_className: (0, ($parcel$interopDefault($5f6caa7677856121$exports)))['spectrum-Dialog-content']
|
|
106
|
+
UNSAFE_className: (0, ($parcel$interopDefault($5f6caa7677856121$exports)))['spectrum-Dialog-content'],
|
|
107
|
+
...contentProps
|
|
102
108
|
},
|
|
103
109
|
footer: {
|
|
104
110
|
UNSAFE_className: (0, ($parcel$interopDefault($5f6caa7677856121$exports)))['spectrum-Dialog-footer']
|
|
@@ -113,7 +119,8 @@ const $db50fa4488be370e$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
113
119
|
[
|
|
114
120
|
hasFooter,
|
|
115
121
|
hasHeader,
|
|
116
|
-
titleProps
|
|
122
|
+
titleProps,
|
|
123
|
+
contentProps
|
|
117
124
|
]);
|
|
118
125
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($hi7zK$react))).createElement("section", {
|
|
119
126
|
...styleProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AA8BD,IAAI,gCAAU;IACZ,GAAG;IACH,GAAG;IACH,GAAG;IACH,YAAY;IACZ,oBAAoB;AACtB;AAOO,MAAM,0DAAS,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,OAAO,KAA0B,EAAE,GAAW;IAC5F,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,IAAI,QAAC,OAAO,SAAS,GAAG,cAAa,GAAG,CAAA,GAAA,uBAAS,EAAE,C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,CAAA,GAAA,0DAAS;AAMtB","sources":["packages/@adobe/react-spectrum/src/dialog/Dialog.tsx"],"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 {ActionButton} from '../button/ActionButton';\nimport {AriaDialogProps, useDialog} from 'react-aria/useDialog';\nimport {classNames} from '../utils/classNames';\nimport CrossLarge from '@spectrum-icons/ui/CrossLarge';\nimport {DialogContext, DialogContextValue} from './context';\nimport {DOMRef, StyleProps} from '@react-types/shared';\nimport {Grid} from '../layout/Grid';\nimport intlMessages from '../../intl/dialog/*.json';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {ReactNode, useContext, useMemo, useRef} from 'react';\nimport {SlotProvider, useSlotProps} from '../utils/Slots';\nimport styles from '@adobe/spectrum-css-temp/components/dialog/vars.css';\nimport {unwrapDOMRef, useDOMRef} from '../utils/useDOMRef';\nimport {useHasChild} from '../utils/useHasChild';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useStyleProps} from '../utils/styleProps';\n\nexport interface SpectrumDialogProps extends AriaDialogProps, StyleProps {\n /** The contents of the Dialog. */\n children: ReactNode;\n /** The size of the Dialog. Only applies to \"modal\" type Dialogs. */\n size?: 'S' | 'M' | 'L';\n /** Whether the Dialog is dismissable. See the [examples](#examples) for more details. */\n isDismissable?: boolean;\n /** Handler that is called when the 'x' button of a dismissable Dialog is clicked. */\n onDismiss?: () => void;\n}\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large',\n fullscreen: 'fullscreen',\n fullscreenTakeover: 'fullscreenTakeover'\n};\n\n/**\n * Dialogs are windows containing contextual information, tasks, or workflows that appear over the\n * user interface. Depending on the kind of Dialog, further interactions may be blocked until the\n * Dialog is acknowledged.\n */\nexport const Dialog = React.forwardRef(function Dialog(props: SpectrumDialogProps, ref: DOMRef) {\n props = useSlotProps(props, 'dialog');\n let {type = 'modal', ...contextProps} = useContext(DialogContext) || ({} as DialogContextValue);\n let {\n children,\n isDismissable = contextProps.isDismissable,\n onDismiss = contextProps.onClose,\n size,\n ...otherProps\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/dialog');\n let {styleProps} = useStyleProps(otherProps);\n\n size = type === 'popover' ? size || 'S' : size || 'L';\n\n let domRef = useDOMRef(ref);\n let gridRef = useRef(null);\n let sizeVariant = sizeMap[type] || sizeMap[size];\n let {dialogProps, titleProps, contentProps} = useDialog(mergeProps(contextProps, props), domRef);\n\n // oxlint-disable-next-line react/react-compiler\n let hasHeader = useHasChild(`.${styles['spectrum-Dialog-header']}`, unwrapDOMRef(gridRef));\n // oxlint-disable-next-line react/react-compiler\n let hasHeading = useHasChild(`.${styles['spectrum-Dialog-heading']}`, unwrapDOMRef(gridRef));\n // oxlint-disable-next-line react/react-compiler\n let hasFooter = useHasChild(`.${styles['spectrum-Dialog-footer']}`, unwrapDOMRef(gridRef));\n // oxlint-disable-next-line react/react-compiler\n let hasTypeIcon = useHasChild(`.${styles['spectrum-Dialog-typeIcon']}`, unwrapDOMRef(gridRef));\n\n let slots = useMemo(\n () => ({\n hero: {UNSAFE_className: styles['spectrum-Dialog-hero']},\n heading: {\n UNSAFE_className: classNames(styles, 'spectrum-Dialog-heading', {\n 'spectrum-Dialog-heading--noHeader': !hasHeader,\n 'spectrum-Dialog-heading--noTypeIcon': !hasTypeIcon\n }),\n level: 2,\n ...titleProps\n },\n header: {\n UNSAFE_className: classNames(styles, 'spectrum-Dialog-header', {\n // oxlint-disable-next-line react/react-compiler\n 'spectrum-Dialog-header--noHeading': !hasHeading,\n 'spectrum-Dialog-header--noTypeIcon': !hasTypeIcon\n })\n },\n typeIcon: {UNSAFE_className: styles['spectrum-Dialog-typeIcon']},\n divider: {UNSAFE_className: styles['spectrum-Dialog-divider'], size: 'M'},\n content: {UNSAFE_className: styles['spectrum-Dialog-content'], ...contentProps},\n footer: {UNSAFE_className: styles['spectrum-Dialog-footer']},\n buttonGroup: {\n UNSAFE_className: classNames(styles, 'spectrum-Dialog-buttonGroup', {\n 'spectrum-Dialog-buttonGroup--noFooter': !hasFooter\n }),\n align: 'end'\n }\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [hasFooter, hasHeader, titleProps, contentProps]\n );\n\n return (\n <section\n {...styleProps}\n {...dialogProps}\n className={classNames(\n styles,\n 'spectrum-Dialog',\n {\n [`spectrum-Dialog--${sizeVariant}`]: sizeVariant,\n 'spectrum-Dialog--dismissable': isDismissable\n },\n styleProps.className\n )}\n ref={domRef}>\n <Grid ref={gridRef} UNSAFE_className={styles['spectrum-Dialog-grid']}>\n <SlotProvider slots={slots}>{children}</SlotProvider>\n {isDismissable && (\n <ActionButton\n UNSAFE_className={styles['spectrum-Dialog-closeButton']}\n isQuiet\n aria-label={stringFormatter.format('dismiss')}\n onPress={onDismiss}>\n <CrossLarge />\n </ActionButton>\n )}\n </Grid>\n </section>\n );\n});\n"],"names":[],"version":3,"file":"Dialog.cjs.map"}
|
|
@@ -61,10 +61,14 @@ const $89418a3659cad0c7$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, $cgl0K$react
|
|
|
61
61
|
let domRef = (0, $c234463e9ef56637$export$c2c55ef9111cafd8)(ref);
|
|
62
62
|
let gridRef = (0, $cgl0K$useRef)(null);
|
|
63
63
|
let sizeVariant = $89418a3659cad0c7$var$sizeMap[type] || $89418a3659cad0c7$var$sizeMap[size];
|
|
64
|
-
let { dialogProps: dialogProps, titleProps: titleProps } = (0, $cgl0K$useDialog)((0, $cgl0K$mergeProps)(contextProps, props), domRef);
|
|
64
|
+
let { dialogProps: dialogProps, titleProps: titleProps, contentProps: contentProps } = (0, $cgl0K$useDialog)((0, $cgl0K$mergeProps)(contextProps, props), domRef);
|
|
65
|
+
// oxlint-disable-next-line react/react-compiler
|
|
65
66
|
let hasHeader = (0, $584638b763a93bff$export$e52e2242b6d0f1d4)(`.${(0, ($parcel$interopDefault($cgl0K$dialog_vars_cssmjs)))['spectrum-Dialog-header']}`, (0, $c234463e9ef56637$export$c7e28c72a4823176)(gridRef));
|
|
67
|
+
// oxlint-disable-next-line react/react-compiler
|
|
66
68
|
let hasHeading = (0, $584638b763a93bff$export$e52e2242b6d0f1d4)(`.${(0, ($parcel$interopDefault($cgl0K$dialog_vars_cssmjs)))['spectrum-Dialog-heading']}`, (0, $c234463e9ef56637$export$c7e28c72a4823176)(gridRef));
|
|
69
|
+
// oxlint-disable-next-line react/react-compiler
|
|
67
70
|
let hasFooter = (0, $584638b763a93bff$export$e52e2242b6d0f1d4)(`.${(0, ($parcel$interopDefault($cgl0K$dialog_vars_cssmjs)))['spectrum-Dialog-footer']}`, (0, $c234463e9ef56637$export$c7e28c72a4823176)(gridRef));
|
|
71
|
+
// oxlint-disable-next-line react/react-compiler
|
|
68
72
|
let hasTypeIcon = (0, $584638b763a93bff$export$e52e2242b6d0f1d4)(`.${(0, ($parcel$interopDefault($cgl0K$dialog_vars_cssmjs)))['spectrum-Dialog-typeIcon']}`, (0, $c234463e9ef56637$export$c7e28c72a4823176)(gridRef));
|
|
69
73
|
let slots = (0, $cgl0K$useMemo)(()=>({
|
|
70
74
|
hero: {
|
|
@@ -80,6 +84,7 @@ const $89418a3659cad0c7$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, $cgl0K$react
|
|
|
80
84
|
},
|
|
81
85
|
header: {
|
|
82
86
|
UNSAFE_className: (0, $512ba93e663f149c$export$ce4ab0c55987d1ff)((0, ($parcel$interopDefault($cgl0K$dialog_vars_cssmjs))), 'spectrum-Dialog-header', {
|
|
87
|
+
// oxlint-disable-next-line react/react-compiler
|
|
83
88
|
'spectrum-Dialog-header--noHeading': !hasHeading,
|
|
84
89
|
'spectrum-Dialog-header--noTypeIcon': !hasTypeIcon
|
|
85
90
|
})
|
|
@@ -92,7 +97,8 @@ const $89418a3659cad0c7$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, $cgl0K$react
|
|
|
92
97
|
size: 'M'
|
|
93
98
|
},
|
|
94
99
|
content: {
|
|
95
|
-
UNSAFE_className: (0, ($parcel$interopDefault($cgl0K$dialog_vars_cssmjs)))['spectrum-Dialog-content']
|
|
100
|
+
UNSAFE_className: (0, ($parcel$interopDefault($cgl0K$dialog_vars_cssmjs)))['spectrum-Dialog-content'],
|
|
101
|
+
...contentProps
|
|
96
102
|
},
|
|
97
103
|
footer: {
|
|
98
104
|
UNSAFE_className: (0, ($parcel$interopDefault($cgl0K$dialog_vars_cssmjs)))['spectrum-Dialog-footer']
|
|
@@ -107,7 +113,8 @@ const $89418a3659cad0c7$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, $cgl0K$react
|
|
|
107
113
|
[
|
|
108
114
|
hasFooter,
|
|
109
115
|
hasHeader,
|
|
110
|
-
titleProps
|
|
116
|
+
titleProps,
|
|
117
|
+
contentProps
|
|
111
118
|
]);
|
|
112
119
|
return /*#__PURE__*/ (0, $cgl0K$react).createElement("section", {
|
|
113
120
|
...styleProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AA8BD,IAAI,gCAAU;IACZ,GAAG;IACH,GAAG;IACH,GAAG;IACH,YAAY;IACZ,oBAAoB;AACtB;AAOO,MAAM,0DAAS,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,OAAO,KAA0B,EAAE,GAAW;IAC5F,QAAQ,CAAA,GAAA,yCAAW,EAAE,OAAO;IAC5B,IAAI,QAAC,OAAO,SAAS,GAAG,cAAa,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAA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sources":["packages/@adobe/react-spectrum/src/dialog/Dialog.tsx"],"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 {ActionButton} from '../button/ActionButton';\nimport {AriaDialogProps, useDialog} from 'react-aria/useDialog';\nimport {classNames} from '../utils/classNames';\nimport CrossLarge from '@spectrum-icons/ui/CrossLarge';\nimport {DialogContext, DialogContextValue} from './context';\nimport {DOMRef, StyleProps} from '@react-types/shared';\nimport {Grid} from '../layout/Grid';\nimport intlMessages from '../../intl/dialog/*.json';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {ReactNode, useContext, useMemo, useRef} from 'react';\nimport {SlotProvider, useSlotProps} from '../utils/Slots';\nimport styles from '@adobe/spectrum-css-temp/components/dialog/vars.css';\nimport {unwrapDOMRef, useDOMRef} from '../utils/useDOMRef';\nimport {useHasChild} from '../utils/useHasChild';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useStyleProps} from '../utils/styleProps';\n\nexport interface SpectrumDialogProps extends AriaDialogProps, StyleProps {\n /** The contents of the Dialog. */\n children: ReactNode;\n /** The size of the Dialog. Only applies to \"modal\" type Dialogs. */\n size?: 'S' | 'M' | 'L';\n /** Whether the Dialog is dismissable. See the [examples](#examples) for more details. */\n isDismissable?: boolean;\n /** Handler that is called when the 'x' button of a dismissable Dialog is clicked. */\n onDismiss?: () => void;\n}\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large',\n fullscreen: 'fullscreen',\n fullscreenTakeover: 'fullscreenTakeover'\n};\n\n/**\n * Dialogs are windows containing contextual information, tasks, or workflows that appear over the\n * user interface. Depending on the kind of Dialog, further interactions may be blocked until the\n * Dialog is acknowledged.\n */\nexport const Dialog = React.forwardRef(function Dialog(props: SpectrumDialogProps, ref: DOMRef) {\n props = useSlotProps(props, 'dialog');\n let {type = 'modal', ...contextProps} = useContext(DialogContext) || ({} as DialogContextValue);\n let {\n children,\n isDismissable = contextProps.isDismissable,\n onDismiss = contextProps.onClose,\n size,\n ...otherProps\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/dialog');\n let {styleProps} = useStyleProps(otherProps);\n\n size = type === 'popover' ? size || 'S' : size || 'L';\n\n let domRef = useDOMRef(ref);\n let gridRef = useRef(null);\n let sizeVariant = sizeMap[type] || sizeMap[size];\n let {dialogProps, titleProps, contentProps} = useDialog(mergeProps(contextProps, props), domRef);\n\n // oxlint-disable-next-line react/react-compiler\n let hasHeader = useHasChild(`.${styles['spectrum-Dialog-header']}`, unwrapDOMRef(gridRef));\n // oxlint-disable-next-line react/react-compiler\n let hasHeading = useHasChild(`.${styles['spectrum-Dialog-heading']}`, unwrapDOMRef(gridRef));\n // oxlint-disable-next-line react/react-compiler\n let hasFooter = useHasChild(`.${styles['spectrum-Dialog-footer']}`, unwrapDOMRef(gridRef));\n // oxlint-disable-next-line react/react-compiler\n let hasTypeIcon = useHasChild(`.${styles['spectrum-Dialog-typeIcon']}`, unwrapDOMRef(gridRef));\n\n let slots = useMemo(\n () => ({\n hero: {UNSAFE_className: styles['spectrum-Dialog-hero']},\n heading: {\n UNSAFE_className: classNames(styles, 'spectrum-Dialog-heading', {\n 'spectrum-Dialog-heading--noHeader': !hasHeader,\n 'spectrum-Dialog-heading--noTypeIcon': !hasTypeIcon\n }),\n level: 2,\n ...titleProps\n },\n header: {\n UNSAFE_className: classNames(styles, 'spectrum-Dialog-header', {\n // oxlint-disable-next-line react/react-compiler\n 'spectrum-Dialog-header--noHeading': !hasHeading,\n 'spectrum-Dialog-header--noTypeIcon': !hasTypeIcon\n })\n },\n typeIcon: {UNSAFE_className: styles['spectrum-Dialog-typeIcon']},\n divider: {UNSAFE_className: styles['spectrum-Dialog-divider'], size: 'M'},\n content: {UNSAFE_className: styles['spectrum-Dialog-content'], ...contentProps},\n footer: {UNSAFE_className: styles['spectrum-Dialog-footer']},\n buttonGroup: {\n UNSAFE_className: classNames(styles, 'spectrum-Dialog-buttonGroup', {\n 'spectrum-Dialog-buttonGroup--noFooter': !hasFooter\n }),\n align: 'end'\n }\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [hasFooter, hasHeader, titleProps, contentProps]\n );\n\n return (\n <section\n {...styleProps}\n {...dialogProps}\n className={classNames(\n styles,\n 'spectrum-Dialog',\n {\n [`spectrum-Dialog--${sizeVariant}`]: sizeVariant,\n 'spectrum-Dialog--dismissable': isDismissable\n },\n styleProps.className\n )}\n ref={domRef}>\n <Grid ref={gridRef} UNSAFE_className={styles['spectrum-Dialog-grid']}>\n <SlotProvider slots={slots}>{children}</SlotProvider>\n {isDismissable && (\n <ActionButton\n UNSAFE_className={styles['spectrum-Dialog-closeButton']}\n isQuiet\n aria-label={stringFormatter.format('dismiss')}\n onPress={onDismiss}>\n <CrossLarge />\n </ActionButton>\n )}\n </Grid>\n </section>\n );\n});\n"],"names":[],"version":3,"file":"Dialog.js.map"}
|
|
@@ -61,10 +61,14 @@ const $8054558191a4f1c9$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, $gpOSB$react
|
|
|
61
61
|
let domRef = (0, $3c2c983d5210446c$export$c2c55ef9111cafd8)(ref);
|
|
62
62
|
let gridRef = (0, $gpOSB$useRef)(null);
|
|
63
63
|
let sizeVariant = $8054558191a4f1c9$var$sizeMap[type] || $8054558191a4f1c9$var$sizeMap[size];
|
|
64
|
-
let { dialogProps: dialogProps, titleProps: titleProps } = (0, $gpOSB$useDialog)((0, $gpOSB$mergeProps)(contextProps, props), domRef);
|
|
64
|
+
let { dialogProps: dialogProps, titleProps: titleProps, contentProps: contentProps } = (0, $gpOSB$useDialog)((0, $gpOSB$mergeProps)(contextProps, props), domRef);
|
|
65
|
+
// oxlint-disable-next-line react/react-compiler
|
|
65
66
|
let hasHeader = (0, $f57c7d8d50bdc255$export$e52e2242b6d0f1d4)(`.${(0, ($parcel$interopDefault($gpOSB$dialog_vars_cssmjs)))['spectrum-Dialog-header']}`, (0, $3c2c983d5210446c$export$c7e28c72a4823176)(gridRef));
|
|
67
|
+
// oxlint-disable-next-line react/react-compiler
|
|
66
68
|
let hasHeading = (0, $f57c7d8d50bdc255$export$e52e2242b6d0f1d4)(`.${(0, ($parcel$interopDefault($gpOSB$dialog_vars_cssmjs)))['spectrum-Dialog-heading']}`, (0, $3c2c983d5210446c$export$c7e28c72a4823176)(gridRef));
|
|
69
|
+
// oxlint-disable-next-line react/react-compiler
|
|
67
70
|
let hasFooter = (0, $f57c7d8d50bdc255$export$e52e2242b6d0f1d4)(`.${(0, ($parcel$interopDefault($gpOSB$dialog_vars_cssmjs)))['spectrum-Dialog-footer']}`, (0, $3c2c983d5210446c$export$c7e28c72a4823176)(gridRef));
|
|
71
|
+
// oxlint-disable-next-line react/react-compiler
|
|
68
72
|
let hasTypeIcon = (0, $f57c7d8d50bdc255$export$e52e2242b6d0f1d4)(`.${(0, ($parcel$interopDefault($gpOSB$dialog_vars_cssmjs)))['spectrum-Dialog-typeIcon']}`, (0, $3c2c983d5210446c$export$c7e28c72a4823176)(gridRef));
|
|
69
73
|
let slots = (0, $gpOSB$useMemo)(()=>({
|
|
70
74
|
hero: {
|
|
@@ -80,6 +84,7 @@ const $8054558191a4f1c9$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, $gpOSB$react
|
|
|
80
84
|
},
|
|
81
85
|
header: {
|
|
82
86
|
UNSAFE_className: (0, $6e6392558d48dfec$export$ce4ab0c55987d1ff)((0, ($parcel$interopDefault($gpOSB$dialog_vars_cssmjs))), 'spectrum-Dialog-header', {
|
|
87
|
+
// oxlint-disable-next-line react/react-compiler
|
|
83
88
|
'spectrum-Dialog-header--noHeading': !hasHeading,
|
|
84
89
|
'spectrum-Dialog-header--noTypeIcon': !hasTypeIcon
|
|
85
90
|
})
|
|
@@ -92,7 +97,8 @@ const $8054558191a4f1c9$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, $gpOSB$react
|
|
|
92
97
|
size: 'M'
|
|
93
98
|
},
|
|
94
99
|
content: {
|
|
95
|
-
UNSAFE_className: (0, ($parcel$interopDefault($gpOSB$dialog_vars_cssmjs)))['spectrum-Dialog-content']
|
|
100
|
+
UNSAFE_className: (0, ($parcel$interopDefault($gpOSB$dialog_vars_cssmjs)))['spectrum-Dialog-content'],
|
|
101
|
+
...contentProps
|
|
96
102
|
},
|
|
97
103
|
footer: {
|
|
98
104
|
UNSAFE_className: (0, ($parcel$interopDefault($gpOSB$dialog_vars_cssmjs)))['spectrum-Dialog-footer']
|
|
@@ -107,7 +113,8 @@ const $8054558191a4f1c9$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, $gpOSB$react
|
|
|
107
113
|
[
|
|
108
114
|
hasFooter,
|
|
109
115
|
hasHeader,
|
|
110
|
-
titleProps
|
|
116
|
+
titleProps,
|
|
117
|
+
contentProps
|
|
111
118
|
]);
|
|
112
119
|
return /*#__PURE__*/ (0, $gpOSB$react).createElement("section", {
|
|
113
120
|
...styleProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AA8BD,IAAI,gCAAU;IACZ,GAAG;IACH,GAAG;IACH,GAAG;IACH,YAAY;IACZ,oBAAoB;AACtB;AAOO,MAAM,0DAAS,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,OAAO,KAA0B,EAAE,GAAW;IAC5F,QAAQ,CAAA,GAAA,yCAAW,EAAE,OAAO;IAC5B,IAAI,QAAC,OAAO,SAAS,GAAG,cAAa,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAY,M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["packages/@adobe/react-spectrum/src/dialog/Dialog.tsx"],"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 {ActionButton} from '../button/ActionButton';\nimport {AriaDialogProps, useDialog} from 'react-aria/useDialog';\nimport {classNames} from '../utils/classNames';\nimport CrossLarge from '@spectrum-icons/ui/CrossLarge';\nimport {DialogContext, DialogContextValue} from './context';\nimport {DOMRef, StyleProps} from '@react-types/shared';\nimport {Grid} from '../layout/Grid';\nimport intlMessages from '../../intl/dialog/*.json';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {ReactNode, useContext, useMemo, useRef} from 'react';\nimport {SlotProvider, useSlotProps} from '../utils/Slots';\nimport styles from '@adobe/spectrum-css-temp/components/dialog/vars.css';\nimport {unwrapDOMRef, useDOMRef} from '../utils/useDOMRef';\nimport {useHasChild} from '../utils/useHasChild';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useStyleProps} from '../utils/styleProps';\n\nexport interface SpectrumDialogProps extends AriaDialogProps, StyleProps {\n /** The contents of the Dialog. */\n children: ReactNode;\n /** The size of the Dialog. Only applies to \"modal\" type Dialogs. */\n size?: 'S' | 'M' | 'L';\n /** Whether the Dialog is dismissable. See the [examples](#examples) for more details. */\n isDismissable?: boolean;\n /** Handler that is called when the 'x' button of a dismissable Dialog is clicked. */\n onDismiss?: () => void;\n}\n\nlet sizeMap = {\n S: 'small',\n M: 'medium',\n L: 'large',\n fullscreen: 'fullscreen',\n fullscreenTakeover: 'fullscreenTakeover'\n};\n\n/**\n * Dialogs are windows containing contextual information, tasks, or workflows that appear over the\n * user interface. Depending on the kind of Dialog, further interactions may be blocked until the\n * Dialog is acknowledged.\n */\nexport const Dialog = React.forwardRef(function Dialog(props: SpectrumDialogProps, ref: DOMRef) {\n props = useSlotProps(props, 'dialog');\n let {type = 'modal', ...contextProps} = useContext(DialogContext) || ({} as DialogContextValue);\n let {\n children,\n isDismissable = contextProps.isDismissable,\n onDismiss = contextProps.onClose,\n size,\n ...otherProps\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/dialog');\n let {styleProps} = useStyleProps(otherProps);\n\n size = type === 'popover' ? size || 'S' : size || 'L';\n\n let domRef = useDOMRef(ref);\n let gridRef = useRef(null);\n let sizeVariant = sizeMap[type] || sizeMap[size];\n let {dialogProps, titleProps, contentProps} = useDialog(mergeProps(contextProps, props), domRef);\n\n // oxlint-disable-next-line react/react-compiler\n let hasHeader = useHasChild(`.${styles['spectrum-Dialog-header']}`, unwrapDOMRef(gridRef));\n // oxlint-disable-next-line react/react-compiler\n let hasHeading = useHasChild(`.${styles['spectrum-Dialog-heading']}`, unwrapDOMRef(gridRef));\n // oxlint-disable-next-line react/react-compiler\n let hasFooter = useHasChild(`.${styles['spectrum-Dialog-footer']}`, unwrapDOMRef(gridRef));\n // oxlint-disable-next-line react/react-compiler\n let hasTypeIcon = useHasChild(`.${styles['spectrum-Dialog-typeIcon']}`, unwrapDOMRef(gridRef));\n\n let slots = useMemo(\n () => ({\n hero: {UNSAFE_className: styles['spectrum-Dialog-hero']},\n heading: {\n UNSAFE_className: classNames(styles, 'spectrum-Dialog-heading', {\n 'spectrum-Dialog-heading--noHeader': !hasHeader,\n 'spectrum-Dialog-heading--noTypeIcon': !hasTypeIcon\n }),\n level: 2,\n ...titleProps\n },\n header: {\n UNSAFE_className: classNames(styles, 'spectrum-Dialog-header', {\n // oxlint-disable-next-line react/react-compiler\n 'spectrum-Dialog-header--noHeading': !hasHeading,\n 'spectrum-Dialog-header--noTypeIcon': !hasTypeIcon\n })\n },\n typeIcon: {UNSAFE_className: styles['spectrum-Dialog-typeIcon']},\n divider: {UNSAFE_className: styles['spectrum-Dialog-divider'], size: 'M'},\n content: {UNSAFE_className: styles['spectrum-Dialog-content'], ...contentProps},\n footer: {UNSAFE_className: styles['spectrum-Dialog-footer']},\n buttonGroup: {\n UNSAFE_className: classNames(styles, 'spectrum-Dialog-buttonGroup', {\n 'spectrum-Dialog-buttonGroup--noFooter': !hasFooter\n }),\n align: 'end'\n }\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [hasFooter, hasHeader, titleProps, contentProps]\n );\n\n return (\n <section\n {...styleProps}\n {...dialogProps}\n className={classNames(\n styles,\n 'spectrum-Dialog',\n {\n [`spectrum-Dialog--${sizeVariant}`]: sizeVariant,\n 'spectrum-Dialog--dismissable': isDismissable\n },\n styleProps.className\n )}\n ref={domRef}>\n <Grid ref={gridRef} UNSAFE_className={styles['spectrum-Dialog-grid']}>\n <SlotProvider slots={slots}>{children}</SlotProvider>\n {isDismissable && (\n <ActionButton\n UNSAFE_className={styles['spectrum-Dialog-closeButton']}\n isQuiet\n aria-label={stringFormatter.format('dismiss')}\n onPress={onDismiss}>\n <CrossLarge />\n </ActionButton>\n )}\n </Grid>\n </section>\n );\n});\n"],"names":[],"version":3,"file":"Dialog.mjs.map"}
|
|
@@ -35,31 +35,38 @@ function $180c0494a69c5bd7$export$2cfc5be7a55829f6(options) {
|
|
|
35
35
|
let hooks = {};
|
|
36
36
|
if (isDraggable) {
|
|
37
37
|
hooks.useDraggableCollectionState = function useDraggableCollectionStateOverride(props) {
|
|
38
|
+
// oxlint-disable-next-line react/react-compiler
|
|
38
39
|
return (0, $gvwR2$reactstatelyuseDraggableCollectionState.useDraggableCollectionState)({
|
|
39
40
|
...props,
|
|
40
41
|
...options,
|
|
41
42
|
getItems: options.getItems
|
|
42
43
|
});
|
|
43
44
|
};
|
|
45
|
+
// oxlint-disable-next-line react/react-compiler
|
|
44
46
|
hooks.useDraggableCollection = (0, $gvwR2$reactariauseDraggableCollection.useDraggableCollection);
|
|
47
|
+
// oxlint-disable-next-line react/react-compiler
|
|
45
48
|
hooks.useDraggableItem = (0, $gvwR2$reactariauseDraggableCollection.useDraggableItem);
|
|
46
49
|
hooks.DragPreview = (0, $gvwR2$reactariauseDraggableCollection.DragPreview);
|
|
47
50
|
hooks.renderPreview = renderPreview;
|
|
48
51
|
}
|
|
49
52
|
if (isDroppable) {
|
|
50
53
|
hooks.useDroppableCollectionState = function useDroppableCollectionStateOverride(props) {
|
|
54
|
+
// oxlint-disable-next-line react/react-compiler
|
|
51
55
|
return (0, $gvwR2$reactstatelyuseDroppableCollectionState.useDroppableCollectionState)({
|
|
52
56
|
...props,
|
|
53
57
|
...options
|
|
54
58
|
});
|
|
55
59
|
};
|
|
60
|
+
// oxlint-disable-next-line react/react-compiler
|
|
56
61
|
hooks.useDroppableItem = (0, $gvwR2$reactariauseDroppableCollection.useDroppableItem);
|
|
57
62
|
hooks.useDroppableCollection = function useDroppableCollectionOverride(props, state, ref) {
|
|
63
|
+
// oxlint-disable-next-line react/react-compiler
|
|
58
64
|
return (0, $gvwR2$reactariauseDroppableCollection.useDroppableCollection)({
|
|
59
65
|
...props,
|
|
60
66
|
...options
|
|
61
67
|
}, state, ref);
|
|
62
68
|
};
|
|
69
|
+
// oxlint-disable-next-line react/react-compiler
|
|
63
70
|
hooks.useDropIndicator = (0, $gvwR2$reactariauseDroppableCollection.useDropIndicator);
|
|
64
71
|
}
|
|
65
72
|
if (isDraggable || isDroppable) hooks.isVirtualDragging = (0, $gvwR2$reactariaprivatedndDragManager.isVirtualDragging);
|