@adobe/react-spectrum 3.47.1 → 3.47.2

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.
Files changed (232) hide show
  1. package/dist/private/accordion_vars.css +66 -48
  2. package/dist/private/accordion_vars.css.map +1 -1
  3. package/dist/private/actionbar/ActionBar.cjs.map +1 -1
  4. package/dist/private/actionbar/ActionBar.js.map +1 -1
  5. package/dist/private/actionbar/ActionBar.mjs.map +1 -1
  6. package/dist/private/actionbar/actionbar.css +59 -57
  7. package/dist/private/actionbar/actionbar.css.map +1 -1
  8. package/dist/private/actiongroup/ActionGroup.cjs +1 -1
  9. package/dist/private/actiongroup/ActionGroup.cjs.map +1 -1
  10. package/dist/private/actiongroup/ActionGroup.js +1 -1
  11. package/dist/private/actiongroup/ActionGroup.js.map +1 -1
  12. package/dist/private/actiongroup/ActionGroup.mjs +1 -1
  13. package/dist/private/actiongroup/ActionGroup.mjs.map +1 -1
  14. package/dist/private/actiongroup_vars.css +124 -114
  15. package/dist/private/actiongroup_vars.css.map +1 -1
  16. package/dist/private/autocomplete/MobileSearchAutocomplete.cjs.map +1 -1
  17. package/dist/private/autocomplete/MobileSearchAutocomplete.js.map +1 -1
  18. package/dist/private/autocomplete/MobileSearchAutocomplete.mjs.map +1 -1
  19. package/dist/private/autocomplete/SearchAutocomplete.cjs.map +1 -1
  20. package/dist/private/autocomplete/SearchAutocomplete.js.map +1 -1
  21. package/dist/private/autocomplete/SearchAutocomplete.mjs.map +1 -1
  22. package/dist/private/autocomplete/searchautocomplete.css +6 -6
  23. package/dist/private/autocomplete/searchautocomplete.css.map +1 -1
  24. package/dist/private/avatar_vars.css +12 -7
  25. package/dist/private/avatar_vars.css.map +1 -1
  26. package/dist/private/badge_vars.css +76 -68
  27. package/dist/private/badge_vars.css.map +1 -1
  28. package/dist/private/barloader_vars.css +132 -112
  29. package/dist/private/barloader_vars.css.map +1 -1
  30. package/dist/private/breadcrumb_vars.css +182 -148
  31. package/dist/private/breadcrumb_vars.css.map +1 -1
  32. package/dist/private/button/Button.cjs.map +1 -1
  33. package/dist/private/button/Button.js.map +1 -1
  34. package/dist/private/button/Button.mjs.map +1 -1
  35. package/dist/private/button_vars.css +822 -785
  36. package/dist/private/button_vars.css.map +1 -1
  37. package/dist/private/buttongroup_vars.css +25 -24
  38. package/dist/private/buttongroup_vars.css.map +1 -1
  39. package/dist/private/buttongroup_vars_css.cjs +5 -5
  40. package/dist/private/buttongroup_vars_css.mjs +5 -5
  41. package/dist/private/calendar/CalendarBase.cjs.map +1 -1
  42. package/dist/private/calendar/CalendarBase.js.map +1 -1
  43. package/dist/private/calendar/CalendarBase.mjs.map +1 -1
  44. package/dist/private/calendar_vars.css +280 -256
  45. package/dist/private/calendar_vars.css.map +1 -1
  46. package/dist/private/card/BaseLayout.cjs +2 -2
  47. package/dist/private/card/BaseLayout.cjs.map +1 -1
  48. package/dist/private/card/BaseLayout.js +2 -2
  49. package/dist/private/card/BaseLayout.js.map +1 -1
  50. package/dist/private/card/BaseLayout.mjs +2 -2
  51. package/dist/private/card/BaseLayout.mjs.map +1 -1
  52. package/dist/private/card/CardView.cjs.map +1 -1
  53. package/dist/private/card/CardView.js.map +1 -1
  54. package/dist/private/card/CardView.mjs.map +1 -1
  55. package/dist/private/card_vars.css +995 -907
  56. package/dist/private/card_vars.css.map +1 -1
  57. package/dist/private/checkbox_vars.css +318 -219
  58. package/dist/private/checkbox_vars.css.map +1 -1
  59. package/dist/private/circleloader_vars.css +99 -85
  60. package/dist/private/circleloader_vars.css.map +1 -1
  61. package/dist/private/color/ColorEditor.cjs.map +1 -1
  62. package/dist/private/color/ColorEditor.js.map +1 -1
  63. package/dist/private/color/ColorEditor.mjs.map +1 -1
  64. package/dist/private/color/ColorPicker.css +28 -14
  65. package/dist/private/color/ColorPicker.css.map +1 -1
  66. package/dist/private/color/colorfield.css +3 -3
  67. package/dist/private/color/colorfield.css.map +1 -1
  68. package/dist/private/colorarea_vars.css +36 -29
  69. package/dist/private/colorarea_vars.css.map +1 -1
  70. package/dist/private/colorhandle_vars.css +23 -23
  71. package/dist/private/colorloupe_vars.css +5 -5
  72. package/dist/private/colorloupe_vars.css.map +1 -1
  73. package/dist/private/colorslider_vars.css +34 -34
  74. package/dist/private/colorslider_vars.css.map +1 -1
  75. package/dist/private/colorwheel_vars.css +44 -38
  76. package/dist/private/colorwheel_vars.css.map +1 -1
  77. package/dist/private/combobox/ComboBox.cjs.map +1 -1
  78. package/dist/private/combobox/ComboBox.js.map +1 -1
  79. package/dist/private/combobox/ComboBox.mjs.map +1 -1
  80. package/dist/private/combobox/MobileComboBox.cjs.map +1 -1
  81. package/dist/private/combobox/MobileComboBox.js.map +1 -1
  82. package/dist/private/combobox/MobileComboBox.mjs.map +1 -1
  83. package/dist/private/combobox/combobox.css +6 -6
  84. package/dist/private/combobox/combobox.css.map +1 -1
  85. package/dist/private/contextualhelp/ContextualHelp.cjs.map +1 -1
  86. package/dist/private/contextualhelp/ContextualHelp.js.map +1 -1
  87. package/dist/private/contextualhelp/ContextualHelp.mjs.map +1 -1
  88. package/dist/private/contextualhelp_vars.css +13 -13
  89. package/dist/private/contextualhelp_vars.css.map +1 -1
  90. package/dist/private/datepicker/DatePicker.cjs.map +1 -1
  91. package/dist/private/datepicker/DatePicker.js.map +1 -1
  92. package/dist/private/datepicker/DatePicker.mjs.map +1 -1
  93. package/dist/private/datepicker/DateRangePicker.cjs.map +1 -1
  94. package/dist/private/datepicker/DateRangePicker.js.map +1 -1
  95. package/dist/private/datepicker/DateRangePicker.mjs.map +1 -1
  96. package/dist/private/datepicker/styles.css +33 -31
  97. package/dist/private/datepicker/styles.css.map +1 -1
  98. package/dist/private/dialog/AlertDialog.cjs.map +1 -1
  99. package/dist/private/dialog/AlertDialog.js.map +1 -1
  100. package/dist/private/dialog/AlertDialog.mjs.map +1 -1
  101. package/dist/private/dialog/Dialog.cjs.map +1 -1
  102. package/dist/private/dialog/Dialog.js.map +1 -1
  103. package/dist/private/dialog/Dialog.mjs.map +1 -1
  104. package/dist/private/dialog_vars.css +216 -180
  105. package/dist/private/dialog_vars.css.map +1 -1
  106. package/dist/private/dropdown_vars.css +150 -114
  107. package/dist/private/dropdown_vars.css.map +1 -1
  108. package/dist/private/dropzone/DropZone.cjs.map +1 -1
  109. package/dist/private/dropzone/DropZone.js.map +1 -1
  110. package/dist/private/dropzone/DropZone.mjs.map +1 -1
  111. package/dist/private/dropzone_vars.css +114 -85
  112. package/dist/private/dropzone_vars.css.map +1 -1
  113. package/dist/private/fieldgroup_vars.css +54 -46
  114. package/dist/private/fieldgroup_vars.css.map +1 -1
  115. package/dist/private/fieldlabel_vars.css +183 -169
  116. package/dist/private/fieldlabel_vars.css.map +1 -1
  117. package/dist/private/helptext_vars.css +83 -69
  118. package/dist/private/helptext_vars.css.map +1 -1
  119. package/dist/private/icon_vars.css +52 -36
  120. package/dist/private/icon_vars.css.map +1 -1
  121. package/dist/private/illustratedmessage_vars.css +33 -31
  122. package/dist/private/illustratedmessage_vars.css.map +1 -1
  123. package/dist/private/inlinealert/InlineAlert.cjs.map +1 -1
  124. package/dist/private/inlinealert/InlineAlert.js.map +1 -1
  125. package/dist/private/inlinealert/InlineAlert.mjs.map +1 -1
  126. package/dist/private/inlinealert_vars.css +54 -46
  127. package/dist/private/inlinealert_vars.css.map +1 -1
  128. package/dist/private/inputgroup_vars.css +499 -319
  129. package/dist/private/inputgroup_vars.css.map +1 -1
  130. package/dist/private/label/Label.cjs.map +1 -1
  131. package/dist/private/label/Label.js.map +1 -1
  132. package/dist/private/label/Label.mjs.map +1 -1
  133. package/dist/private/link_vars.css +101 -85
  134. package/dist/private/link_vars.css.map +1 -1
  135. package/dist/private/list/ListView.cjs.map +1 -1
  136. package/dist/private/list/ListView.js.map +1 -1
  137. package/dist/private/list/ListView.mjs.map +1 -1
  138. package/dist/private/list/styles.css +425 -333
  139. package/dist/private/list/styles.css.map +1 -1
  140. package/dist/private/listbox/ListBoxBase.cjs.map +1 -1
  141. package/dist/private/listbox/ListBoxBase.js.map +1 -1
  142. package/dist/private/listbox/ListBoxBase.mjs.map +1 -1
  143. package/dist/private/menu/ActionMenu.cjs.map +1 -1
  144. package/dist/private/menu/ActionMenu.js.map +1 -1
  145. package/dist/private/menu/ActionMenu.mjs.map +1 -1
  146. package/dist/private/menu/Menu.cjs.map +1 -1
  147. package/dist/private/menu/Menu.js.map +1 -1
  148. package/dist/private/menu/Menu.mjs.map +1 -1
  149. package/dist/private/menu/MenuItem.cjs.map +1 -1
  150. package/dist/private/menu/MenuItem.js.map +1 -1
  151. package/dist/private/menu/MenuItem.mjs.map +1 -1
  152. package/dist/private/menu_vars.css +178 -160
  153. package/dist/private/menu_vars.css.map +1 -1
  154. package/dist/private/modal_vars.css +64 -54
  155. package/dist/private/modal_vars.css.map +1 -1
  156. package/dist/private/overlays/overlays.css +7 -5
  157. package/dist/private/overlays/overlays.css.map +1 -1
  158. package/dist/private/package.cjs +1 -1
  159. package/dist/private/package.cjs.map +1 -1
  160. package/dist/private/package.js +1 -1
  161. package/dist/private/package.js.map +1 -1
  162. package/dist/private/package.mjs +1 -1
  163. package/dist/private/package.mjs.map +1 -1
  164. package/dist/private/page_vars.css +54 -46
  165. package/dist/private/page_vars.css.map +1 -1
  166. package/dist/private/picker/Picker.cjs.map +1 -1
  167. package/dist/private/picker/Picker.js.map +1 -1
  168. package/dist/private/picker/Picker.mjs.map +1 -1
  169. package/dist/private/popover_vars.css +105 -83
  170. package/dist/private/popover_vars.css.map +1 -1
  171. package/dist/private/radio_vars.css +257 -163
  172. package/dist/private/radio_vars.css.map +1 -1
  173. package/dist/private/rule_vars.css +73 -63
  174. package/dist/private/rule_vars.css.map +1 -1
  175. package/dist/private/search_vars.css +95 -87
  176. package/dist/private/search_vars.css.map +1 -1
  177. package/dist/private/slider/RangeSlider.cjs.map +1 -1
  178. package/dist/private/slider/RangeSlider.js.map +1 -1
  179. package/dist/private/slider/RangeSlider.mjs.map +1 -1
  180. package/dist/private/slider_vars.css +516 -402
  181. package/dist/private/slider_vars.css.map +1 -1
  182. package/dist/private/statuslight_vars.css +76 -68
  183. package/dist/private/statuslight_vars.css.map +1 -1
  184. package/dist/private/steplist/StepListItem.cjs.map +1 -1
  185. package/dist/private/steplist/StepListItem.js.map +1 -1
  186. package/dist/private/steplist/StepListItem.mjs.map +1 -1
  187. package/dist/private/steplist_vars.css +371 -297
  188. package/dist/private/steplist_vars.css.map +1 -1
  189. package/dist/private/stepper_vars.css +557 -438
  190. package/dist/private/stepper_vars.css.map +1 -1
  191. package/dist/private/table/Resizer.cjs.map +1 -1
  192. package/dist/private/table/Resizer.js.map +1 -1
  193. package/dist/private/table/Resizer.mjs.map +1 -1
  194. package/dist/private/table/TableViewBase.cjs.map +1 -1
  195. package/dist/private/table/TableViewBase.js.map +1 -1
  196. package/dist/private/table/TableViewBase.mjs.map +1 -1
  197. package/dist/private/table/table.css +103 -95
  198. package/dist/private/table/table.css.map +1 -1
  199. package/dist/private/table_vars.css +458 -350
  200. package/dist/private/table_vars.css.map +1 -1
  201. package/dist/private/tabs_vars.css +319 -281
  202. package/dist/private/tabs_vars.css.map +1 -1
  203. package/dist/private/tag/TagGroup.cjs.map +1 -1
  204. package/dist/private/tag/TagGroup.js.map +1 -1
  205. package/dist/private/tag/TagGroup.mjs.map +1 -1
  206. package/dist/private/tags_vars.css +167 -149
  207. package/dist/private/tags_vars.css.map +1 -1
  208. package/dist/private/textfield/TextFieldBase.cjs.map +1 -1
  209. package/dist/private/textfield/TextFieldBase.js.map +1 -1
  210. package/dist/private/textfield/TextFieldBase.mjs.map +1 -1
  211. package/dist/private/textfield_vars.css +278 -250
  212. package/dist/private/textfield_vars.css.map +1 -1
  213. package/dist/private/toast/Toast.cjs.map +1 -1
  214. package/dist/private/toast/Toast.js.map +1 -1
  215. package/dist/private/toast/Toast.mjs.map +1 -1
  216. package/dist/private/toast/toastContainer.css +64 -56
  217. package/dist/private/toast/toastContainer.css.map +1 -1
  218. package/dist/private/toast_vars.css +5 -3
  219. package/dist/private/toast_vars.css.map +1 -1
  220. package/dist/private/toggle_vars.css +287 -211
  221. package/dist/private/toggle_vars.css.map +1 -1
  222. package/dist/private/tooltip_vars.css +150 -127
  223. package/dist/private/tooltip_vars.css.map +1 -1
  224. package/dist/private/tray_vars.css +54 -46
  225. package/dist/private/tray_vars.css.map +1 -1
  226. package/dist/private/typography_index.css +54 -46
  227. package/dist/private/typography_index.css.map +1 -1
  228. package/dist/private/underlay_vars.css +58 -50
  229. package/dist/private/underlay_vars.css.map +1 -1
  230. package/dist/private/well_vars.css +54 -46
  231. package/dist/private/well_vars.css.map +1 -1
  232. package/package.json +6 -6
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDM,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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EAAE,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';\n// @ts-ignore\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,gBA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AAA,GAAA,yCAAQ;QACP,OAAO,gBAAgB,MAAM,CAAC;QAC9B,OAAO,MAAM,SAAS,EAAE,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 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"}
@@ -55,12 +55,12 @@
55
55
  height: 100%;
56
56
  display: flex;
57
57
  overflow-x: auto;
58
- }
59
58
 
60
- .CBy5TW_react-spectrum-Datepicker-inputContents::-webkit-scrollbar {
61
- width: 0;
62
- height: 0;
63
- display: none;
59
+ &::-webkit-scrollbar {
60
+ width: 0;
61
+ height: 0;
62
+ display: none;
63
+ }
64
64
  }
65
65
 
66
66
  .CBy5TW_react-spectrum-Datepicker-inputSized {
@@ -68,8 +68,10 @@
68
68
  display: inline;
69
69
  }
70
70
 
71
- .CBy5TW_react-spectrum-Datepicker-rangeDash:before {
72
- content: "–";
71
+ .CBy5TW_react-spectrum-Datepicker-rangeDash {
72
+ &:before {
73
+ content: "–";
74
+ }
73
75
  }
74
76
 
75
77
  .CBy5TW_react-spectrum-Datepicker-segments {
@@ -94,19 +96,19 @@
94
96
  background: none;
95
97
  border: none;
96
98
  padding: 0 2px;
97
- }
98
99
 
99
- .CBy5TW_react-spectrum-DatePicker-cell::selection {
100
- background: none;
100
+ &::selection {
101
+ background: none;
102
+ }
101
103
  }
102
104
 
103
105
  .CBy5TW_react-spectrum-DatePicker-cell.CBy5TW_is-placeholder {
104
106
  color: var(--spectrum-gray-600);
105
- }
106
107
 
107
- .CBy5TW_react-spectrum-DatePicker-cell.CBy5TW_is-placeholder .CBy5TW_react-spectrum-DatePicker-placeholder {
108
- text-align: center;
109
- pointer-events: none;
108
+ & .CBy5TW_react-spectrum-DatePicker-placeholder {
109
+ text-align: center;
110
+ pointer-events: none;
111
+ }
110
112
  }
111
113
 
112
114
  .CBy5TW_react-spectrum-DatePicker-cell.CBy5TW_is-placeholder ~ .CBy5TW_react-spectrum-Datepicker-literal {
@@ -131,26 +133,26 @@
131
133
  .CBy5TW_react-spectrum-Datepicker-dialogContent {
132
134
  flex-direction: column;
133
135
  display: flex;
134
- }
135
136
 
136
- .CBy5TW_react-spectrum-Datepicker-dialogContent .CBy5TW_react-spectrum-Datepicker-calendar.CBy5TW_is-invalid {
137
- display: contents;
138
- }
137
+ & .CBy5TW_react-spectrum-Datepicker-calendar.CBy5TW_is-invalid {
138
+ display: contents;
139
+ }
139
140
 
140
- .CBy5TW_react-spectrum-Datepicker-dialogContent .spectrum-Calendar-helpText {
141
- margin: var(--spectrum-global-dimension-size-200) var(--spectrum-calendar-day-padding, 4px) 0
141
+ & .spectrum-Calendar-helpText {
142
+ margin: var(--spectrum-global-dimension-size-200) var(--spectrum-calendar-day-padding, 4px) 0
142
143
  var(--spectrum-calendar-day-padding, 4px);
143
- order: 10;
144
+ order: 10;
145
+ }
144
146
  }
145
147
 
146
148
  @media (width <= 700px) {
147
149
  .CBy5TW_react-spectrum-Datepicker-dialog {
148
150
  --spectrum-dialog-padding-x: 8px;
149
- }
150
151
 
151
- .CBy5TW_react-spectrum-Datepicker-dialog .CBy5TW_react-spectrum-Datepicker-dialogContent {
152
- max-width: calc((var(--spectrum-calendar-day-width, var(--spectrum-global-dimension-size-400)) * 7) + (var(--spectrum-calendar-day-padding, 4px) * 12));
153
- margin: 0 auto;
152
+ & .CBy5TW_react-spectrum-Datepicker-dialogContent {
153
+ max-width: calc((var(--spectrum-calendar-day-width, var(--spectrum-global-dimension-size-400)) * 7) + (var(--spectrum-calendar-day-padding, 4px) * 12));
154
+ margin: 0 auto;
155
+ }
154
156
  }
155
157
  }
156
158
 
@@ -171,18 +173,18 @@
171
173
 
172
174
  .CBy5TW_react-spectrum-DatePicker-cell.CBy5TW_is-read-only {
173
175
  color: buttontext;
174
- }
175
176
 
176
- .CBy5TW_react-spectrum-DatePicker-cell.CBy5TW_is-read-only:focus {
177
- color: highlighttext;
177
+ &:focus {
178
+ color: highlighttext;
179
+ }
178
180
  }
179
181
 
180
182
  .CBy5TW_react-spectrum-DatePicker-cell.CBy5TW_is-placeholder {
181
183
  color: buttontext;
182
- }
183
184
 
184
- .CBy5TW_react-spectrum-DatePicker-cell.CBy5TW_is-placeholder:focus {
185
- color: highlighttext;
185
+ &:focus {
186
+ color: highlighttext;
187
+ }
186
188
  }
187
189
  }
188
190
  /*# sourceMappingURL=styles.css.map */
@@ -1 +1 @@
1
- {"mappings":"AAYA;;;;;;AAMA;;;;;AAKA;;;;;;AAMA;;;;;;AAQA;;;;AAIA;;;;AAMA;;;;AAIA;;;;AAIA;;;;;AAKA","sources":["packages/@adobe/react-spectrum/src/datepicker/styles.css"],"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\n.react-spectrum-Datepicker-fieldWrapper.react-spectrum-Datepicker-fieldWrapper.react-spectrum-Datepicker-fieldWrapper {\n width: auto;\n min-width: var(--spectrum-global-dimension-size-2000);\n max-width: 100%;\n}\n\n.react-spectrum-Datepicker-startField {\n width: auto;\n padding-inline-end: var(--spectrum-global-dimension-size-100);\n}\n\n.react-spectrum-Datepicker-endField {\n width: auto;\n flex: 1;\n padding-inline-start: var(--spectrum-global-dimension-size-100);\n}\n\n.react-spectrum-Datepicker-field\n ~ .react-spectrum-Datepicker-endField\n > .react-spectrum-Datepicker-input {\n border-inline-start-width: 0;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.react-spectrum-Datepicker-field.react-spectrum-Datepicker-field {\n width: 100%;\n}\n\n.react-spectrum-Datepicker-field .react-spectrum-DateField-Input {\n line-height: var(--spectrum-body-4-text-line-height);\n}\n\n/* specificity war with .spectrum-Field--positionSide etc. */\n.react-spectrum-DateField.react-spectrum-DateField.react-spectrum-DateField.react-spectrum-DateField {\n min-width: var(--spectrum-global-dimension-size-2000);\n}\n\n.react-spectrum-TimeField.react-spectrum-TimeField.react-spectrum-TimeField.react-spectrum-TimeField {\n min-width: var(--spectrum-global-dimension-size-1250);\n}\n\n.react-spectrum-TimeField-fieldWrapper.react-spectrum-TimeField-fieldWrapper.react-spectrum-TimeField-fieldWrapper {\n width: auto;\n min-width: var(--spectrum-global-dimension-size-1250);\n}\n\n.react-spectrum-Datepicker-input.react-spectrum-Datepicker-input.react-spectrum-Datepicker-input {\n /* always reserve space for the validation icon */\n padding-inline-end: calc(\n var(--spectrum-textfield-padding-x) + var(--spectrum-icon-alert-medium-width) +\n var(--spectrum-textfield-icon-margin-left)\n );\n cursor: text;\n}\n\n.react-spectrum-Datepicker-inputContents {\n display: flex;\n align-items: center;\n height: 100%;\n overflow-x: auto;\n scrollbar-width: none; /* Firefox */\n -ms-overflow-style: none; /* Internet Explorer 10+ */\n\n &::-webkit-scrollbar {\n /* WebKit */\n width: 0;\n height: 0;\n display: none;\n }\n}\n\n.react-spectrum-Datepicker-inputSized {\n display: inline;\n align-items: center;\n}\n\n.react-spectrum-Datepicker-rangeDash {\n &:before {\n content: '–';\n }\n}\n\n.react-spectrum-Datepicker-segments {\n display: inline-block;\n align-items: center;\n}\n\n.react-spectrum-Datepicker-literal {\n white-space: pre;\n user-select: none;\n color: var(--spectrum-textfield-text-color);\n}\n\n.react-spectrum-DatePicker-cell {\n border: none;\n background: none;\n padding: 0 2px;\n border-radius: var(--spectrum-alias-border-radius-small);\n font-variant-numeric: tabular-nums;\n text-align: end;\n box-sizing: content-box;\n white-space: nowrap;\n color: var(--spectrum-textfield-text-color);\n\n &::selection {\n /* hide the selection because there is no way to fully prevent it in Firefox */\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1742153 */\n background: transparent;\n }\n}\n\n.react-spectrum-DatePicker-cell.is-placeholder {\n color: var(--spectrum-gray-600);\n\n .react-spectrum-DatePicker-placeholder {\n text-align: center;\n pointer-events: none;\n }\n}\n\n.react-spectrum-DatePicker-cell.is-placeholder ~ .react-spectrum-Datepicker-literal {\n color: var(--spectrum-global-color-gray-600);\n}\n\n.react-spectrum-DatePicker-cell.is-read-only {\n color: var(--spectrum-global-color-gray-700);\n}\n\n.react-spectrum-DatePicker-cell:focus {\n background-color: var(--spectrum-accent-background-color-default);\n color: white;\n caret-color: transparent;\n outline: none;\n}\n\n.react-spectrum-Datepicker-dialog.react-spectrum-Datepicker-dialog {\n width: auto;\n}\n\n.react-spectrum-Datepicker-dialogContent {\n display: flex;\n flex-direction: column;\n\n .react-spectrum-Datepicker-calendar.is-invalid {\n /* Only apply display: contents when the calendar is invalid, which allows us to move the\n * error message below the time fields. Otherwise, don't do this because it breaks dragging\n * the selected range on Android. */\n display: contents;\n }\n\n /* Push the help text within the calendar down to the bottom of the dialog, below the time fields. */\n :global(.spectrum-Calendar-helpText) {\n order: 10;\n margin: var(--spectrum-global-dimension-size-200) var(--spectrum-calendar-day-padding) 0\n var(--spectrum-calendar-day-padding);\n }\n}\n\n/* when displayed in a tray, reduce the padding of the dialog */\n@media (max-width: 700px) {\n .react-spectrum-Datepicker-dialog {\n --spectrum-dialog-padding-x: 8px;\n\n .react-spectrum-Datepicker-dialogContent {\n margin: 0 auto;\n max-width: calc(\n (var(--spectrum-calendar-day-width) * 7) + (var(--spectrum-calendar-day-padding) * 12)\n );\n }\n }\n}\n\n.react-spectrum-Datepicker-timeFields {\n width: 100%;\n min-width: calc(var(--spectrum-calendar-day-width) * 7);\n max-width: calc(\n (var(--spectrum-calendar-day-width) * 7) + (var(--spectrum-calendar-day-padding) * 12)\n );\n padding: 0 var(--spectrum-calendar-day-padding);\n box-sizing: border-box;\n}\n\n@media (forced-colors: active) {\n .react-spectrum-DatePicker-cell:focus {\n forced-color-adjust: none;\n background-color: Highlight;\n color: HighlightText;\n }\n .react-spectrum-DatePicker-cell.is-read-only {\n color: ButtonText;\n &:focus {\n color: HighlightText;\n }\n }\n .react-spectrum-DatePicker-cell.is-placeholder {\n color: ButtonText;\n &:focus {\n color: HighlightText;\n }\n }\n}\n"],"names":[],"version":3,"file":"styles.css.map"}
1
+ {"mappings":"AAYA;;;;;;AAMA;;;;;AAKA;;;;;;AAMA;;;;;;AAQA;;;;AAIA;;;;AAMA;;;;AAIA;;;;AAIA;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;AA+BE","sources":["packages/@adobe/react-spectrum/src/datepicker/styles.css"],"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\n.react-spectrum-Datepicker-fieldWrapper.react-spectrum-Datepicker-fieldWrapper.react-spectrum-Datepicker-fieldWrapper {\n width: auto;\n min-width: var(--spectrum-global-dimension-size-2000);\n max-width: 100%;\n}\n\n.react-spectrum-Datepicker-startField {\n width: auto;\n padding-inline-end: var(--spectrum-global-dimension-size-100);\n}\n\n.react-spectrum-Datepicker-endField {\n width: auto;\n flex: 1;\n padding-inline-start: var(--spectrum-global-dimension-size-100);\n}\n\n.react-spectrum-Datepicker-field\n ~ .react-spectrum-Datepicker-endField\n > .react-spectrum-Datepicker-input {\n border-inline-start-width: 0;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.react-spectrum-Datepicker-field.react-spectrum-Datepicker-field {\n width: 100%;\n}\n\n.react-spectrum-Datepicker-field .react-spectrum-DateField-Input {\n line-height: var(--spectrum-body-4-text-line-height);\n}\n\n/* specificity war with .spectrum-Field--positionSide etc. */\n.react-spectrum-DateField.react-spectrum-DateField.react-spectrum-DateField.react-spectrum-DateField {\n min-width: var(--spectrum-global-dimension-size-2000);\n}\n\n.react-spectrum-TimeField.react-spectrum-TimeField.react-spectrum-TimeField.react-spectrum-TimeField {\n min-width: var(--spectrum-global-dimension-size-1250);\n}\n\n.react-spectrum-TimeField-fieldWrapper.react-spectrum-TimeField-fieldWrapper.react-spectrum-TimeField-fieldWrapper {\n width: auto;\n min-width: var(--spectrum-global-dimension-size-1250);\n}\n\n.react-spectrum-Datepicker-input.react-spectrum-Datepicker-input.react-spectrum-Datepicker-input {\n /* always reserve space for the validation icon */\n padding-inline-end: calc(\n var(--spectrum-textfield-padding-x) + var(--spectrum-icon-alert-medium-width) +\n var(--spectrum-textfield-icon-margin-left)\n );\n cursor: text;\n}\n\n.react-spectrum-Datepicker-inputContents {\n display: flex;\n align-items: center;\n height: 100%;\n overflow-x: auto;\n scrollbar-width: none; /* Firefox */\n -ms-overflow-style: none; /* Internet Explorer 10+ */\n\n &::-webkit-scrollbar {\n /* WebKit */\n width: 0;\n height: 0;\n display: none;\n }\n}\n\n.react-spectrum-Datepicker-inputSized {\n display: inline;\n align-items: center;\n}\n\n.react-spectrum-Datepicker-rangeDash {\n &:before {\n content: '–';\n }\n}\n\n.react-spectrum-Datepicker-segments {\n display: inline-block;\n align-items: center;\n}\n\n.react-spectrum-Datepicker-literal {\n white-space: pre;\n user-select: none;\n color: var(--spectrum-textfield-text-color);\n}\n\n.react-spectrum-DatePicker-cell {\n border: none;\n background: none;\n padding: 0 2px;\n border-radius: var(--spectrum-alias-border-radius-small);\n font-variant-numeric: tabular-nums;\n text-align: end;\n box-sizing: content-box;\n white-space: nowrap;\n color: var(--spectrum-textfield-text-color);\n\n &::selection {\n /* hide the selection because there is no way to fully prevent it in Firefox */\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1742153 */\n background: transparent;\n }\n}\n\n.react-spectrum-DatePicker-cell.is-placeholder {\n color: var(--spectrum-gray-600);\n\n .react-spectrum-DatePicker-placeholder {\n text-align: center;\n pointer-events: none;\n }\n}\n\n.react-spectrum-DatePicker-cell.is-placeholder ~ .react-spectrum-Datepicker-literal {\n color: var(--spectrum-global-color-gray-600);\n}\n\n.react-spectrum-DatePicker-cell.is-read-only {\n color: var(--spectrum-global-color-gray-700);\n}\n\n.react-spectrum-DatePicker-cell:focus {\n background-color: var(--spectrum-accent-background-color-default);\n color: white;\n caret-color: transparent;\n outline: none;\n}\n\n.react-spectrum-Datepicker-dialog.react-spectrum-Datepicker-dialog {\n width: auto;\n}\n\n.react-spectrum-Datepicker-dialogContent {\n display: flex;\n flex-direction: column;\n\n .react-spectrum-Datepicker-calendar.is-invalid {\n /* Only apply display: contents when the calendar is invalid, which allows us to move the\n * error message below the time fields. Otherwise, don't do this because it breaks dragging\n * the selected range on Android. */\n display: contents;\n }\n\n /* Push the help text within the calendar down to the bottom of the dialog, below the time fields. */\n :global(.spectrum-Calendar-helpText) {\n order: 10;\n margin: var(--spectrum-global-dimension-size-200) var(--spectrum-calendar-day-padding) 0\n var(--spectrum-calendar-day-padding);\n }\n}\n\n/* when displayed in a tray, reduce the padding of the dialog */\n@media (max-width: 700px) {\n .react-spectrum-Datepicker-dialog {\n --spectrum-dialog-padding-x: 8px;\n\n .react-spectrum-Datepicker-dialogContent {\n margin: 0 auto;\n max-width: calc(\n (var(--spectrum-calendar-day-width) * 7) + (var(--spectrum-calendar-day-padding) * 12)\n );\n }\n }\n}\n\n.react-spectrum-Datepicker-timeFields {\n width: 100%;\n min-width: calc(var(--spectrum-calendar-day-width) * 7);\n max-width: calc(\n (var(--spectrum-calendar-day-width) * 7) + (var(--spectrum-calendar-day-padding) * 12)\n );\n padding: 0 var(--spectrum-calendar-day-padding);\n box-sizing: border-box;\n}\n\n@media (forced-colors: active) {\n .react-spectrum-DatePicker-cell:focus {\n forced-color-adjust: none;\n background-color: Highlight;\n color: HighlightText;\n }\n .react-spectrum-DatePicker-cell.is-read-only {\n color: ButtonText;\n &:focus {\n color: HighlightText;\n }\n }\n .react-spectrum-DatePicker-cell.is-placeholder {\n color: ButtonText;\n &:focus {\n color: HighlightText;\n }\n }\n}\n"],"names":[],"version":3,"file":"styles.css.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;AAqDM,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAC7C,KAA+B,EAC/B,GAAW;IAEX,IAAI,WAAC,UAAU,KAAO,GAAE,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,uCAAY,MAAO,CAAC;IAE1D,IAAI,WACF,OAAO,YACP,QAAQ,sBACR,kBAAkB,wBAClB,oBAAoB,eACpB,WAAW,mBACX,eAAe,SACf,KAAK,2BACL,uBAAuB,6BACvB,yBAAyB,YACzB,WAAW,KAAO,oBAClB,kBAAkB,KAAO,sBACzB,oBAAoB,KAAO,GAC3B,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,kBAAkB,CAAA,GAAA,uEAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,IAAI,iBAAiD;IACrD,IAAI,SAAS;QACX,IAAI,YAAY,gBACd,iBAAiB;aACZ,IAAI,YAAY,eACrB,iBAAiB;IAErB;IAEA,qBACE,0DAAC,CAAA,GAAA,gCAAK;QACJ,cAAc,WAAW,KAAK;QAC9B,kBAAkB,CAAA,GAAA,oCAAS,EACzB,CAAA,GAAA,mDAAK,GACL;YAAC,CAAC,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAAE;QAAO,GACzC,WAAW,SAAS;QAEtB,UAAU,WAAW,MAAM;QAC3B,MAAK;QACL,MAAK;QACL,KAAK;QACJ,GAAG,CAAA,GAAA,6CAAa,EAAE,MAAM;qBACzB,0DAAC,CAAA,GAAA,iCAAM,SAAG,QACT,AAAC,CAAA,YAAY,WAAW,YAAY,SAAQ,mBAC3C,0DAAC,CAAA,GAAA,2DAAU;QAAE,MAAK;QAAW,cAAY,gBAAgB,MAAM,CAAC;sBAElE,0DAAC,CAAA,GAAA,iCAAM,wBACP,0DAAC,CAAA,GAAA,iCAAM,SAAG,yBACV,0DAAC,CAAA,GAAA,qCAAU;QAAE,OAAM;OAChB,6BACC,0DAAC,CAAA,GAAA,gCAAK;QACJ,SAAQ;QACR,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,WAAW;QAChC,WAAW,oBAAoB;QAC/B,eAAY;OACX,cAGJ,sCACC,0DAAC,CAAA,GAAA,gCAAK;QACJ,SAAQ;QACR,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,WAAW;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 {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 {DOMProps, DOMRef, StyleProps} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {Heading} from '../text/Heading';\nimport intlMessages from '../../intl/dialog/*.json';\n// @ts-ignore\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 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)}>\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"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;AAoDM,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAC7C,KAA+B,EAC/B,GAAW;IAEX,IAAI,WAAC,UAAU,KAAO,GAAE,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,uCAAY,MAAO,CAAC;IAE1D,IAAI,WACF,OAAO,YACP,QAAQ,sBACR,kBAAkB,wBAClB,oBAAoB,eACpB,WAAW,mBACX,eAAe,SACf,KAAK,2BACL,uBAAuB,6BACvB,yBAAyB,YACzB,WAAW,KAAO,oBAClB,kBAAkB,KAAO,sBACzB,oBAAoB,KAAO,GAC3B,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,kBAAkB,CAAA,GAAA,uEAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,IAAI,iBAAiD;IACrD,IAAI,SAAS;QACX,IAAI,YAAY,gBACd,iBAAiB;aACZ,IAAI,YAAY,eACrB,iBAAiB;IAErB;IAEA,qBACE,0DAAC,CAAA,GAAA,gCAAK;QACJ,cAAc,WAAW,KAAK;QAC9B,kBAAkB,CAAA,GAAA,oCAAS,EACzB,CAAA,GAAA,mDAAK,GACL;YAAC,CAAC,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAAE;QAAO,GACzC,WAAW,SAAS;QAEtB,UAAU,WAAW,MAAM;QAC3B,MAAK;QACL,MAAK;QACL,KAAK;QACJ,GAAG,CAAA,GAAA,6CAAa,EAAE,MAAM;qBACzB,0DAAC,CAAA,GAAA,iCAAM,SAAG,QACT,AAAC,CAAA,YAAY,WAAW,YAAY,SAAQ,mBAC3C,0DAAC,CAAA,GAAA,2DAAU;QAAE,MAAK;QAAW,cAAY,gBAAgB,MAAM,CAAC;sBAElE,0DAAC,CAAA,GAAA,iCAAM,wBACP,0DAAC,CAAA,GAAA,iCAAM,SAAG,yBACV,0DAAC,CAAA,GAAA,qCAAU;QAAE,OAAM;OAChB,6BACC,0DAAC,CAAA,GAAA,gCAAK;QACJ,SAAQ;QACR,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,WAAW;QAChC,WAAW,oBAAoB;QAC/B,eAAY;OACX,cAGJ,sCACC,0DAAC,CAAA,GAAA,gCAAK;QACJ,SAAQ;QACR,SAAS,IAAM,CAAA,GAAA,2BAAI,EAAE,WAAW;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 {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 {DOMProps, DOMRef, StyleProps} from '@react-types/shared';\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 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)}>\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"}
@@ -1 +1 @@
1
- {"mappings":";;;;;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,SAAG,yBACV,gCAAC,CAAA,GAAA,yCAAU;QAAE,OAAM;OAChB,6BACC,gCAAC,CAAA,GAAA,yCAAK;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 {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 {DOMProps, DOMRef, StyleProps} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {Heading} from '../text/Heading';\nimport intlMessages from '../../intl/dialog/*.json';\n// @ts-ignore\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 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)}>\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"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;AAoDM,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAC7C,KAA+B,EAC/B,GAAW;IAEX,IAAI,WAAC,UAAU,KAAO,GAAE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAY,MAAO,CAAC;IAE1D,IAAI,WACF,OAAO,YACP,Q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,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 {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 {DOMProps, DOMRef, StyleProps} from '@react-types/shared';\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 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)}>\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"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;AAqDM,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAC7C,KAA+B,EAC/B,GAAW;IAEX,IAAI,WAAC,UAAU,KAAO,GAAE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAY,MAAO,CAAC;IAE1D,IAAI,WACF,OAAO,YACP,QAAQ,sBACR,kBAAkB,wBAClB,oBAAoB,eACpB,WAAW,mBACX,eAAe,SACf,KAAK,2BACL,uBAAuB,6BACvB,yBAAyB,YACzB,WAAW,KAAO,oBAClB,kBAAkB,KAAO,sBACzB,oBAAoB,KAAO,GAC3B,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAY,EAAE;IACjC,IAAI,kBAAkB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esContent":["/*\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 {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 {DOMProps, DOMRef, StyleProps} from '@react-types/shared';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {Heading} from '../text/Heading';\nimport intlMessages from '../../intl/dialog/*.json';\n// @ts-ignore\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 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)}>\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"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;AAoDM,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAC7C,KAA+B,EAC/B,GAAW;IAEX,IAAI,WAAC,UAAU,KAAO,GAAE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAY,MAAO,CAAC;IAE1D,IAAI,WACF,OAAO,YACP,QAAQ,sBACR,kBAAkB,wBAClB,oBAAoB,eACpB,WAAW,mBACX,eAAe,SACf,KAAK,2BACL,uBAAuB,6BACvB,yBAAyB,YACzB,WAAW,KAAO,oBAClB,kBAAkB,KAAO,sBACzB,oBAAoB,KAAO,GAC3B,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAY,EAAE;IACjC,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAEhE,IAAI,iBAAiD;IACrD,IAAI,SAAS;QACX,IAAI,YAAY,gBACd,iBAAiB;aACZ,IAAI,YAAY,eACrB,iBAAiB;IAErB;IAEA,qBACE,gCAAC,CAAA,GAAA,yCAAK;QACJ,cAAc,WAAW,KAAK;QAC9B,kBAAkB,CAAA,GAAA,yCAAS,EACzB,CAAA,GAAA,mDAAK,GACL;YAAC,CAAC,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAAE;QAAO,GACzC,WAAW,SAAS;QAEtB,UAAU,WAAW,MAAM;QAC3B,MAAK;QACL,MAAK;QACL,KAAK;QACJ,GAAG,CAAA,GAAA,qBAAa,EAAE,MAAM;qBACzB,gCAAC,CAAA,GAAA,yCAAM,SAAG,QACT,AAAC,CAAA,YAAY,WAAW,YAAY,SAAQ,mBAC3C,gCAAC,CAAA,GAAA,iCAAU;QAAE,MAAK;QAAW,cAAY,gBAAgB,MAAM,CAAC;sBAElE,gCAAC,CAAA,GAAA,yCAAM,wBACP,gCAAC,CAAA,GAAA,yCAAM,SAAG,yBACV,gCAAC,CAAA,GAAA,yCAAU;QAAE,OAAM;OAChB,6BACC,gCAAC,CAAA,GAAA,yCAAK;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 {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 {DOMProps, DOMRef, StyleProps} from '@react-types/shared';\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 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)}>\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 === 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AE,CAAA,GAAA,mDAAK,GAAG,+BAA+B;oBAClE,yCAAyC,CAAC;gBAC5C;gBACA,OAAO;YACT;QACF,CAAA,GACA,uDAAuD;IACvD;QAAC;QAAW;QAAW;KAAW;IAGpC,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,WAAW;QACf,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,mBACA;YACE,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,EAAE;YACrC,gCAAgC;QAClC,GACA,WAAW,SAAS;QAEtB,KAAK;qBACL,0DAAC,CAAA,GAAA,8BAAG;QAAE,KAAK;QAAS,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,uBAAuB;qBAClE,0DAAC,CAAA,GAAA,sCAAW;QAAE,OAAO;OAAQ,WAC5B,+BACC,0DAAC,CAAA,GAAA,sCAAW;QACV,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,8BAA8B;QACvD,SAAA;QACA,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAS;qBACT,0DAAC,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';\n\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';\n// @ts-ignore\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} = useDialog(mergeProps(contextProps, props), domRef);\n\n let hasHeader = useHasChild(`.${styles['spectrum-Dialog-header']}`, unwrapDOMRef(gridRef));\n let hasHeading = useHasChild(`.${styles['spectrum-Dialog-heading']}`, unwrapDOMRef(gridRef));\n let hasFooter = useHasChild(`.${styles['spectrum-Dialog-footer']}`, unwrapDOMRef(gridRef));\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 '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']},\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]\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"}
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,CAAA,GAAA,uCAAY,MAAO,CAAC;IACvE,IAAI,YACF,QAAQ,iBACR,gBAAgB,aAAa,aAAa,aAC1C,YAAY,aAAa,OAAO,QAChC,IAAI,EACJ,GAAG,YACJ,GAAG;IACJ,IAAI,kBAAkB,CAAA,GAAA,uEAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,OAAO,SAAS,YAAY,QAAQ,MAAM,QAAQ;IAElD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,UAAU,CAAA,GAAA,mBAAK,EAAE;IACrB,IAAI,cAAc,6BAAO,CAAC,KAAK,IAAI,6BAAO,CAAC,KAAK;IAChD,IAAI,eAAC,WAAW,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,mCAAQ,EAAE,CAAA,GAAA,qCAAS,EAAE,cAAc,QAAQ;IAE3E,IAAI,YAAY,CAAA,GAAA,qCAAU,EAAE,CAAC,CAAC,EAAE,CAAA,GAAA,mDAAK,CAAC,CAAC,yBAAyB,EAAE,EAAE,CAAA,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S,EAAE,CAAA,GAAA,mDAAK,GAAG,+BAA+B;oBAClE,yCAAyC,CAAC;gBAC5C;gBACA,OAAO;YACT;QACF,CAAA,GACA,uDAAuD;IACvD;QAAC;QAAW;QAAW;KAAW;IAGpC,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,WAAW;QACf,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,mBACA;YACE,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,EAAE;YACrC,gCAAgC;QAClC,GACA,WAAW,SAAS;QAEtB,KAAK;qBACL,0DAAC,CAAA,GAAA,8BAAG;QAAE,KAAK;QAAS,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,uBAAuB;qBAClE,0DAAC,CAAA,GAAA,sCAAW;QAAE,OAAO;OAAQ,WAC5B,+BACC,0DAAC,CAAA,GAAA,sCAAW;QACV,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,8BAA8B;QACvD,SAAA;QACA,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAS;qBACT,0DAAC,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} = useDialog(mergeProps(contextProps, props), domRef);\n\n let hasHeader = useHasChild(`.${styles['spectrum-Dialog-header']}`, unwrapDOMRef(gridRef));\n let hasHeading = useHasChild(`.${styles['spectrum-Dialog-heading']}`, unwrapDOMRef(gridRef));\n let hasFooter = useHasChild(`.${styles['spectrum-Dialog-footer']}`, unwrapDOMRef(gridRef));\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 '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']},\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]\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"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAgCD,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,MAAO,CAAC;IACvE,IAAI,YACF,QAAQ,iBACR,gBAAgB,aAAa,aAAa,aAC1C,YAAY,aAAa,OAAO,QAChC,IAAI,EACJ,GAAG,YACJ,GAAG;IACJ,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,8CAAW,GAAG;IAChE,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAY,EAAE;IAEjC,OAAO,SAAS,YAAY,QAAQ,MAAM,QAAQ;IAElD,IAAI,SAAS,CAAA,GAAA,yCAAQ,EAAE;IACvB,IAAI,UAAU,CAAA,GAAA,aAAK,EAAE;IACrB,IAAI,cAAc,6BAAO,CAAC,KAAK,IAAI,6BAAO,CAAC,KAAK;IAChD,IAAI,eAAC,WAAW,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,gBAAQ,EAAE,CAAA,GAAA,iBAAS,EAAE,cAAc,QAAQ;IAE3E,IAAI,YAAY,CAAA,GAAA,yCAAU,EAAE,CAAC,CAAC,EAAE,CAAA,GAAA,mDAAK,CAAC,CAAC,yBAAyB,EAAE,EAAE,CAAA,GAAA,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,CAAA,GAAA,mDAAK,GAAG,+BAA+B;oBAClE,yCAAyC,CAAC;gBAC5C;gBACA,OAAO;YACT;QACF,CAAA,GACA,uDAAuD;IACvD;QAAC;QAAW;QAAW;KAAW;IAGpC,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,WAAW;QACf,WAAW,CAAA,GAAA,yCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,mBACA;YACE,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,EAAE;YACrC,gCAAgC;QAClC,GACA,WAAW,SAAS;QAEtB,KAAK;qBACL,gCAAC,CAAA,GAAA,yCAAG;QAAE,KAAK;QAAS,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,uBAAuB;qBAClE,gCAAC,CAAA,GAAA,yCAAW;QAAE,OAAO;OAAQ,WAC5B,+BACC,gCAAC,CAAA,GAAA,yCAAW;QACV,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,8BAA8B;QACvD,SAAA;QACA,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAS;qBACT,gCAAC,CAAA,GAAA,gCAAS;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';\n\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';\n// @ts-ignore\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} = useDialog(mergeProps(contextProps, props), domRef);\n\n let hasHeader = useHasChild(`.${styles['spectrum-Dialog-header']}`, unwrapDOMRef(gridRef));\n let hasHeading = useHasChild(`.${styles['spectrum-Dialog-heading']}`, unwrapDOMRef(gridRef));\n let hasFooter = useHasChild(`.${styles['spectrum-Dialog-footer']}`, unwrapDOMRef(gridRef));\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 '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']},\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]\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"}
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,MAAO,CAAC;IACvE,IAAI,YACF,QAAQ,iBACR,gBAAgB,aAAa,aAAa,aAC1C,YAAY,aAAa,OAAO,QAChC,IAAI,EACJ,GAAG,YACJ,GAAG;IACJ,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,8CAAW,GAAG;IAChE,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAY,EAAE;IAEjC,OAAO,SAAS,YAAY,QAAQ,MAAM,QAAQ;IAElD,IAAI,SAAS,CAAA,GAAA,yCAAQ,EAAE;IACvB,IAAI,UAAU,CAAA,GAAA,aAAK,EAAE;IACrB,IAAI,cAAc,6BAAO,CAAC,KAAK,IAAI,6BAAO,CAAC,KAAK;IAChD,IAAI,eAAC,WAAW,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,gBAAQ,EAAE,CAAA,GAAA,iBAAS,EAAE,cAAc,QAAQ;IAE3E,IAAI,YAAY,CAAA,GAAA,yCAAU,EAAE,CAAC,CAAC,EAAE,CAAA,GAAA,mDAAK,CAAC,CAAC,yBAAyB,EAAE,EAAE,CAAA,GAAA,yCAAW,E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AAA,mDAAK,GAAG,+BAA+B;oBAClE,yCAAyC,CAAC;gBAC5C;gBACA,OAAO;YACT;QACF,CAAA,GACA,uDAAuD;IACvD;QAAC;QAAW;QAAW;KAAW;IAGpC,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,WAAW;QACf,WAAW,CAAA,GAAA,yCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,mBACA;YACE,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,EAAE;YACrC,gCAAgC;QAClC,GACA,WAAW,SAAS;QAEtB,KAAK;qBACL,gCAAC,CAAA,GAAA,yCAAG;QAAE,KAAK;QAAS,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,uBAAuB;qBAClE,gCAAC,CAAA,GAAA,yCAAW;QAAE,OAAO;OAAQ,WAC5B,+BACC,gCAAC,CAAA,GAAA,yCAAW;QACV,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,8BAA8B;QACvD,SAAA;QACA,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAS;qBACT,gCAAC,CAAA,GAAA,gCAAS;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} = useDialog(mergeProps(contextProps, props), domRef);\n\n let hasHeader = useHasChild(`.${styles['spectrum-Dialog-header']}`, unwrapDOMRef(gridRef));\n let hasHeading = useHasChild(`.${styles['spectrum-Dialog-heading']}`, unwrapDOMRef(gridRef));\n let hasFooter = useHasChild(`.${styles['spectrum-Dialog-footer']}`, unwrapDOMRef(gridRef));\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 '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']},\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]\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"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAgCD,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,MAAO,CAAC;IACvE,IAAI,YACF,QAAQ,iBACR,gBAAgB,aAAa,aAAa,aAC1C,YAAY,aAAa,OAAO,QAChC,IAAI,EACJ,GAAG,YACJ,GAAG;IACJ,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAY,EAAE;IAEjC,OAAO,SAAS,YAAY,QAAQ,MAAM,QAAQ;IAElD,IAAI,SAAS,CAAA,GAAA,yCAAQ,EAAE;IACvB,IAAI,UAAU,CAAA,GAAA,aAAK,EAAE;IACrB,IAAI,cAAc,6BAAO,CAAC,KAAK,IAAI,6BAAO,CAAC,KAAK;IAChD,IAAI,eAAC,WAAW,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,gBAAQ,EAAE,CAAA,GAAA,iBAAS,EAAE,cAAc,QAAQ;IAE3E,IAAI,YAAY,CAAA,GAAA,yCAAU,EAAE,CAAC,CAAC,EAAE,CAAA,GAAA,mDAAK,CAAC,CAAC,yBAAyB,EAAE,EAAE,CAAA,GAAA,yCAAW,EAAE;IACjF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K,GAAG,+BAA+B;oBAClE,yCAAyC,CAAC;gBAC5C;gBACA,OAAO;YACT;QACF,CAAA,GACA,uDAAuD;IACvD;QAAC;QAAW;QAAW;KAAW;IAGpC,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,WAAW;QACf,WAAW,CAAA,GAAA,yCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,mBACA;YACE,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,EAAE;YACrC,gCAAgC;QAClC,GACA,WAAW,SAAS;QAEtB,KAAK;qBACL,gCAAC,CAAA,GAAA,yCAAG;QAAE,KAAK;QAAS,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,uBAAuB;qBAClE,gCAAC,CAAA,GAAA,yCAAW;QAAE,OAAO;OAAQ,WAC5B,+BACC,gCAAC,CAAA,GAAA,yCAAW;QACV,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,8BAA8B;QACvD,SAAA;QACA,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAS;qBACT,gCAAC,CAAA,GAAA,gCAAS;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';\n\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';\n// @ts-ignore\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} = useDialog(mergeProps(contextProps, props), domRef);\n\n let hasHeader = useHasChild(`.${styles['spectrum-Dialog-header']}`, unwrapDOMRef(gridRef));\n let hasHeading = useHasChild(`.${styles['spectrum-Dialog-heading']}`, unwrapDOMRef(gridRef));\n let hasFooter = useHasChild(`.${styles['spectrum-Dialog-footer']}`, unwrapDOMRef(gridRef));\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 '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']},\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]\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"}
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,MAAO,CAAC;IACvE,IAAI,YACF,QAAQ,iBACR,gBAAgB,aAAa,aAAa,aAC1C,YAAY,aAAa,OAAO,QAChC,IAAI,EACJ,GAAG,YACJ,GAAG;IACJ,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAY,EAAE;IAEjC,OAAO,SAAS,YAAY,QAAQ,MAAM,QAAQ;IAElD,IAAI,SAAS,CAAA,GAAA,yCAAQ,EAAE;IACvB,IAAI,UAAU,CAAA,GAAA,aAAK,EAAE;IACrB,IAAI,cAAc,6BAAO,CAAC,KAAK,IAAI,6BAAO,CAAC,KAAK;IAChD,IAAI,eAAC,WAAW,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,gBAAQ,EAAE,CAAA,GAAA,iBAAS,EAAE,cAAc,QAAQ;IAE3E,IAAI,YAAY,CAAA,GAAA,yCAAU,EAAE,CAAC,CAAC,EAAE,CAAA,GAAA,mDAAK,CAAC,CAAC,yBAAyB,EAAE,EAAE,CAAA,GAAA,yCAAW,EAAE;IACjF,IAAI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G,+BAA+B;oBAClE,yCAAyC,CAAC;gBAC5C;gBACA,OAAO;YACT;QACF,CAAA,GACA,uDAAuD;IACvD;QAAC;QAAW;QAAW;KAAW;IAGpC,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,WAAW;QACf,WAAW,CAAA,GAAA,yCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,mBACA;YACE,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,EAAE;YACrC,gCAAgC;QAClC,GACA,WAAW,SAAS;QAEtB,KAAK;qBACL,gCAAC,CAAA,GAAA,yCAAG;QAAE,KAAK;QAAS,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,uBAAuB;qBAClE,gCAAC,CAAA,GAAA,yCAAW;QAAE,OAAO;OAAQ,WAC5B,+BACC,gCAAC,CAAA,GAAA,yCAAW;QACV,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,8BAA8B;QACvD,SAAA;QACA,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAS;qBACT,gCAAC,CAAA,GAAA,gCAAS;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} = useDialog(mergeProps(contextProps, props), domRef);\n\n let hasHeader = useHasChild(`.${styles['spectrum-Dialog-header']}`, unwrapDOMRef(gridRef));\n let hasHeading = useHasChild(`.${styles['spectrum-Dialog-heading']}`, unwrapDOMRef(gridRef));\n let hasFooter = useHasChild(`.${styles['spectrum-Dialog-footer']}`, unwrapDOMRef(gridRef));\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 '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']},\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]\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"}