react-aria-components 3.0.0-nightly-ab9fd5c68-241125 → 3.0.0-nightly-10a43de88-241127

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 (315) hide show
  1. package/dist/Breadcrumbs.main.js +2 -5
  2. package/dist/Breadcrumbs.main.js.map +1 -1
  3. package/dist/Breadcrumbs.mjs +3 -6
  4. package/dist/Breadcrumbs.module.js +3 -6
  5. package/dist/Breadcrumbs.module.js.map +1 -1
  6. package/dist/Button.main.js +2 -5
  7. package/dist/Button.main.js.map +1 -1
  8. package/dist/Button.mjs +2 -5
  9. package/dist/Button.module.js +2 -5
  10. package/dist/Button.module.js.map +1 -1
  11. package/dist/Calendar.main.js +9 -22
  12. package/dist/Calendar.main.js.map +1 -1
  13. package/dist/Calendar.mjs +9 -22
  14. package/dist/Calendar.module.js +9 -22
  15. package/dist/Calendar.module.js.map +1 -1
  16. package/dist/Checkbox.main.js +5 -12
  17. package/dist/Checkbox.main.js.map +1 -1
  18. package/dist/Checkbox.mjs +6 -13
  19. package/dist/Checkbox.module.js +6 -13
  20. package/dist/Checkbox.module.js.map +1 -1
  21. package/dist/ColorArea.main.js +2 -5
  22. package/dist/ColorArea.main.js.map +1 -1
  23. package/dist/ColorArea.mjs +3 -6
  24. package/dist/ColorArea.module.js +3 -6
  25. package/dist/ColorArea.module.js.map +1 -1
  26. package/dist/ColorField.main.js +2 -5
  27. package/dist/ColorField.main.js.map +1 -1
  28. package/dist/ColorField.mjs +2 -5
  29. package/dist/ColorField.module.js +2 -5
  30. package/dist/ColorField.module.js.map +1 -1
  31. package/dist/ColorSlider.main.js +2 -5
  32. package/dist/ColorSlider.main.js.map +1 -1
  33. package/dist/ColorSlider.mjs +2 -5
  34. package/dist/ColorSlider.module.js +2 -5
  35. package/dist/ColorSlider.module.js.map +1 -1
  36. package/dist/ColorSwatch.main.js +2 -5
  37. package/dist/ColorSwatch.main.js.map +1 -1
  38. package/dist/ColorSwatch.mjs +2 -5
  39. package/dist/ColorSwatch.module.js +2 -5
  40. package/dist/ColorSwatch.module.js.map +1 -1
  41. package/dist/ColorSwatchPicker.main.js +4 -8
  42. package/dist/ColorSwatchPicker.main.js.map +1 -1
  43. package/dist/ColorSwatchPicker.mjs +5 -9
  44. package/dist/ColorSwatchPicker.module.js +5 -9
  45. package/dist/ColorSwatchPicker.module.js.map +1 -1
  46. package/dist/ColorThumb.main.js +2 -5
  47. package/dist/ColorThumb.main.js.map +1 -1
  48. package/dist/ColorThumb.mjs +3 -6
  49. package/dist/ColorThumb.module.js +3 -6
  50. package/dist/ColorThumb.module.js.map +1 -1
  51. package/dist/ColorWheel.main.js +5 -11
  52. package/dist/ColorWheel.main.js.map +1 -1
  53. package/dist/ColorWheel.mjs +6 -12
  54. package/dist/ColorWheel.module.js +6 -12
  55. package/dist/ColorWheel.module.js.map +1 -1
  56. package/dist/ComboBox.main.js +2 -5
  57. package/dist/ComboBox.main.js.map +1 -1
  58. package/dist/ComboBox.mjs +3 -6
  59. package/dist/ComboBox.module.js +3 -6
  60. package/dist/ComboBox.module.js.map +1 -1
  61. package/dist/DateField.main.js +8 -23
  62. package/dist/DateField.main.js.map +1 -1
  63. package/dist/DateField.mjs +9 -24
  64. package/dist/DateField.module.js +9 -24
  65. package/dist/DateField.module.js.map +1 -1
  66. package/dist/DatePicker.main.js +4 -11
  67. package/dist/DatePicker.main.js.map +1 -1
  68. package/dist/DatePicker.mjs +5 -12
  69. package/dist/DatePicker.module.js +5 -12
  70. package/dist/DatePicker.module.js.map +1 -1
  71. package/dist/Dialog.main.js +2 -5
  72. package/dist/Dialog.main.js.map +1 -1
  73. package/dist/Dialog.mjs +3 -6
  74. package/dist/Dialog.module.js +3 -6
  75. package/dist/Dialog.module.js.map +1 -1
  76. package/dist/Disclosure.main.js +6 -16
  77. package/dist/Disclosure.main.js.map +1 -1
  78. package/dist/Disclosure.mjs +6 -16
  79. package/dist/Disclosure.module.js +6 -16
  80. package/dist/Disclosure.module.js.map +1 -1
  81. package/dist/DragAndDrop.main.js +2 -5
  82. package/dist/DragAndDrop.main.js.map +1 -1
  83. package/dist/DragAndDrop.mjs +3 -6
  84. package/dist/DragAndDrop.module.js +3 -6
  85. package/dist/DragAndDrop.module.js.map +1 -1
  86. package/dist/DropZone.main.js +2 -5
  87. package/dist/DropZone.main.js.map +1 -1
  88. package/dist/DropZone.mjs +3 -6
  89. package/dist/DropZone.module.js +3 -6
  90. package/dist/DropZone.module.js.map +1 -1
  91. package/dist/FieldError.main.js +2 -5
  92. package/dist/FieldError.main.js.map +1 -1
  93. package/dist/FieldError.mjs +3 -6
  94. package/dist/FieldError.module.js +3 -6
  95. package/dist/FieldError.module.js.map +1 -1
  96. package/dist/FileTrigger.main.js +2 -5
  97. package/dist/FileTrigger.main.js.map +1 -1
  98. package/dist/FileTrigger.mjs +2 -5
  99. package/dist/FileTrigger.module.js +2 -5
  100. package/dist/FileTrigger.module.js.map +1 -1
  101. package/dist/Form.main.js +2 -6
  102. package/dist/Form.main.js.map +1 -1
  103. package/dist/Form.mjs +2 -6
  104. package/dist/Form.module.js +2 -6
  105. package/dist/Form.module.js.map +1 -1
  106. package/dist/GridList.main.js +2 -6
  107. package/dist/GridList.main.js.map +1 -1
  108. package/dist/GridList.mjs +3 -7
  109. package/dist/GridList.module.js +3 -7
  110. package/dist/GridList.module.js.map +1 -1
  111. package/dist/Group.main.js +2 -5
  112. package/dist/Group.main.js.map +1 -1
  113. package/dist/Group.mjs +2 -5
  114. package/dist/Group.module.js +2 -5
  115. package/dist/Group.module.js.map +1 -1
  116. package/dist/Heading.main.js +2 -3
  117. package/dist/Heading.main.js.map +1 -1
  118. package/dist/Heading.mjs +2 -3
  119. package/dist/Heading.module.js +2 -3
  120. package/dist/Heading.module.js.map +1 -1
  121. package/dist/Input.main.js +2 -5
  122. package/dist/Input.main.js.map +1 -1
  123. package/dist/Input.mjs +2 -5
  124. package/dist/Input.module.js +2 -5
  125. package/dist/Input.module.js.map +1 -1
  126. package/dist/Keyboard.main.js +2 -3
  127. package/dist/Keyboard.main.js.map +1 -1
  128. package/dist/Keyboard.mjs +2 -3
  129. package/dist/Keyboard.module.js +2 -3
  130. package/dist/Keyboard.module.js.map +1 -1
  131. package/dist/Label.main.js +2 -3
  132. package/dist/Label.main.js.map +1 -1
  133. package/dist/Label.mjs +2 -3
  134. package/dist/Label.module.js +2 -3
  135. package/dist/Label.module.js.map +1 -1
  136. package/dist/Link.main.js +2 -6
  137. package/dist/Link.main.js.map +1 -1
  138. package/dist/Link.mjs +2 -6
  139. package/dist/Link.module.js +2 -6
  140. package/dist/Link.module.js.map +1 -1
  141. package/dist/ListBox.main.js +5 -10
  142. package/dist/ListBox.main.js.map +1 -1
  143. package/dist/ListBox.mjs +6 -11
  144. package/dist/ListBox.module.js +6 -11
  145. package/dist/ListBox.module.js.map +1 -1
  146. package/dist/Menu.main.js +5 -10
  147. package/dist/Menu.main.js.map +1 -1
  148. package/dist/Menu.mjs +5 -10
  149. package/dist/Menu.module.js +5 -10
  150. package/dist/Menu.module.js.map +1 -1
  151. package/dist/Meter.main.js +2 -5
  152. package/dist/Meter.main.js.map +1 -1
  153. package/dist/Meter.mjs +2 -5
  154. package/dist/Meter.module.js +2 -5
  155. package/dist/Meter.module.js.map +1 -1
  156. package/dist/Modal.main.js +3 -6
  157. package/dist/Modal.main.js.map +1 -1
  158. package/dist/Modal.mjs +4 -7
  159. package/dist/Modal.module.js +4 -7
  160. package/dist/Modal.module.js.map +1 -1
  161. package/dist/NumberField.main.js +2 -5
  162. package/dist/NumberField.main.js.map +1 -1
  163. package/dist/NumberField.mjs +3 -6
  164. package/dist/NumberField.module.js +3 -6
  165. package/dist/NumberField.module.js.map +1 -1
  166. package/dist/OverlayArrow.main.js +2 -6
  167. package/dist/OverlayArrow.main.js.map +1 -1
  168. package/dist/OverlayArrow.mjs +2 -6
  169. package/dist/OverlayArrow.module.js +2 -6
  170. package/dist/OverlayArrow.module.js.map +1 -1
  171. package/dist/Popover.main.js +2 -5
  172. package/dist/Popover.main.js.map +1 -1
  173. package/dist/Popover.mjs +3 -6
  174. package/dist/Popover.module.js +3 -6
  175. package/dist/Popover.module.js.map +1 -1
  176. package/dist/ProgressBar.main.js +2 -6
  177. package/dist/ProgressBar.main.js.map +1 -1
  178. package/dist/ProgressBar.mjs +2 -6
  179. package/dist/ProgressBar.module.js +2 -6
  180. package/dist/ProgressBar.module.js.map +1 -1
  181. package/dist/RadioGroup.main.js +4 -10
  182. package/dist/RadioGroup.main.js.map +1 -1
  183. package/dist/RadioGroup.mjs +4 -10
  184. package/dist/RadioGroup.module.js +4 -10
  185. package/dist/RadioGroup.module.js.map +1 -1
  186. package/dist/SearchField.main.js +2 -5
  187. package/dist/SearchField.main.js.map +1 -1
  188. package/dist/SearchField.mjs +3 -6
  189. package/dist/SearchField.module.js +3 -6
  190. package/dist/SearchField.module.js.map +1 -1
  191. package/dist/Select.main.js +5 -12
  192. package/dist/Select.main.js.map +1 -1
  193. package/dist/Select.mjs +6 -13
  194. package/dist/Select.module.js +6 -13
  195. package/dist/Select.module.js.map +1 -1
  196. package/dist/Slider.main.js +8 -20
  197. package/dist/Slider.main.js.map +1 -1
  198. package/dist/Slider.mjs +9 -21
  199. package/dist/Slider.module.js +9 -21
  200. package/dist/Slider.module.js.map +1 -1
  201. package/dist/Switch.main.js +2 -5
  202. package/dist/Switch.main.js.map +1 -1
  203. package/dist/Switch.mjs +2 -5
  204. package/dist/Switch.module.js +2 -5
  205. package/dist/Switch.module.js.map +1 -1
  206. package/dist/Table.main.js +6 -12
  207. package/dist/Table.main.js.map +1 -1
  208. package/dist/Table.mjs +7 -13
  209. package/dist/Table.module.js +7 -13
  210. package/dist/Table.module.js.map +1 -1
  211. package/dist/Tabs.main.js +6 -16
  212. package/dist/Tabs.main.js.map +1 -1
  213. package/dist/Tabs.mjs +7 -17
  214. package/dist/Tabs.module.js +7 -17
  215. package/dist/Tabs.module.js.map +1 -1
  216. package/dist/TagGroup.main.js +4 -10
  217. package/dist/TagGroup.main.js.map +1 -1
  218. package/dist/TagGroup.mjs +5 -11
  219. package/dist/TagGroup.module.js +5 -11
  220. package/dist/TagGroup.module.js.map +1 -1
  221. package/dist/Text.main.js +2 -3
  222. package/dist/Text.main.js.map +1 -1
  223. package/dist/Text.mjs +2 -3
  224. package/dist/Text.module.js +2 -3
  225. package/dist/Text.module.js.map +1 -1
  226. package/dist/TextArea.main.js +2 -5
  227. package/dist/TextArea.main.js.map +1 -1
  228. package/dist/TextArea.mjs +2 -5
  229. package/dist/TextArea.module.js +2 -5
  230. package/dist/TextArea.module.js.map +1 -1
  231. package/dist/TextField.main.js +2 -5
  232. package/dist/TextField.main.js.map +1 -1
  233. package/dist/TextField.mjs +3 -6
  234. package/dist/TextField.module.js +3 -6
  235. package/dist/TextField.module.js.map +1 -1
  236. package/dist/ToggleButton.main.js +2 -5
  237. package/dist/ToggleButton.main.js.map +1 -1
  238. package/dist/ToggleButton.mjs +3 -6
  239. package/dist/ToggleButton.module.js +3 -6
  240. package/dist/ToggleButton.module.js.map +1 -1
  241. package/dist/ToggleButtonGroup.main.js +2 -5
  242. package/dist/ToggleButtonGroup.main.js.map +1 -1
  243. package/dist/ToggleButtonGroup.mjs +2 -5
  244. package/dist/ToggleButtonGroup.module.js +2 -5
  245. package/dist/ToggleButtonGroup.module.js.map +1 -1
  246. package/dist/Toolbar.main.js +2 -6
  247. package/dist/Toolbar.main.js.map +1 -1
  248. package/dist/Toolbar.mjs +2 -6
  249. package/dist/Toolbar.module.js +2 -6
  250. package/dist/Toolbar.module.js.map +1 -1
  251. package/dist/Tooltip.main.js +2 -5
  252. package/dist/Tooltip.main.js.map +1 -1
  253. package/dist/Tooltip.mjs +3 -6
  254. package/dist/Tooltip.module.js +3 -6
  255. package/dist/Tooltip.module.js.map +1 -1
  256. package/dist/Tree.main.js +2 -6
  257. package/dist/Tree.main.js.map +1 -1
  258. package/dist/Tree.mjs +3 -7
  259. package/dist/Tree.module.js +3 -7
  260. package/dist/Tree.module.js.map +1 -1
  261. package/dist/types.d.ts +10 -10
  262. package/dist/types.d.ts.map +1 -1
  263. package/package.json +30 -30
  264. package/src/Breadcrumbs.tsx +5 -8
  265. package/src/Button.tsx +5 -8
  266. package/src/Calendar.tsx +19 -31
  267. package/src/Checkbox.tsx +11 -17
  268. package/src/ColorArea.tsx +5 -8
  269. package/src/ColorField.tsx +5 -8
  270. package/src/ColorSlider.tsx +5 -8
  271. package/src/ColorSwatch.tsx +5 -8
  272. package/src/ColorSwatchPicker.tsx +7 -13
  273. package/src/ColorThumb.tsx +5 -8
  274. package/src/ColorWheel.tsx +10 -16
  275. package/src/ComboBox.tsx +5 -8
  276. package/src/DateField.tsx +21 -33
  277. package/src/DatePicker.tsx +9 -15
  278. package/src/Dialog.tsx +5 -8
  279. package/src/Disclosure.tsx +16 -25
  280. package/src/DragAndDrop.tsx +5 -8
  281. package/src/DropZone.tsx +5 -8
  282. package/src/FieldError.tsx +5 -8
  283. package/src/FileTrigger.tsx +5 -8
  284. package/src/Form.tsx +6 -9
  285. package/src/GridList.tsx +6 -9
  286. package/src/Group.tsx +5 -8
  287. package/src/Heading.tsx +2 -5
  288. package/src/Input.tsx +5 -8
  289. package/src/Keyboard.tsx +2 -5
  290. package/src/Label.tsx +2 -5
  291. package/src/Link.tsx +6 -9
  292. package/src/ListBox.tsx +8 -12
  293. package/src/Menu.tsx +8 -12
  294. package/src/Meter.tsx +5 -8
  295. package/src/Modal.tsx +5 -8
  296. package/src/NumberField.tsx +5 -8
  297. package/src/OverlayArrow.tsx +6 -9
  298. package/src/Popover.tsx +5 -8
  299. package/src/ProgressBar.tsx +6 -9
  300. package/src/RadioGroup.tsx +10 -16
  301. package/src/SearchField.tsx +5 -8
  302. package/src/Select.tsx +11 -17
  303. package/src/Slider.tsx +20 -32
  304. package/src/Switch.tsx +5 -8
  305. package/src/Table.tsx +10 -19
  306. package/src/Tabs.tsx +14 -23
  307. package/src/TagGroup.tsx +8 -14
  308. package/src/Text.tsx +2 -5
  309. package/src/TextArea.tsx +5 -7
  310. package/src/TextField.tsx +5 -8
  311. package/src/ToggleButton.tsx +5 -8
  312. package/src/ToggleButtonGroup.tsx +5 -8
  313. package/src/Toolbar.tsx +6 -9
  314. package/src/Tooltip.tsx +5 -8
  315. package/src/Tree.tsx +6 -9
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;AAuDM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAoD;AACxF,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAA6B;AAE7E,SAAS,+BAA2B,KAAuB,EAAE,GAAiC;IAC5F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,YAAC,QAAQ,cAAE,aAAa,kBAAO,YAAY,mBAAO,aAAa,OAAM,GAAG;IAC5E,IAAI,UAAU,CAAA,GAAA,cAAM,EAAE;YACoB;6BAAxC,gCAAC,CAAA,GAAA,yCAAa,EAAE,QAAQ;YAAC,OAAO;gBAAC,OAAO,CAAA,eAAA,MAAM,KAAK,cAAX,0BAAA,eAAe,MAAM,YAAY;YAAA;WACtE,OAAO,aAAa,aACjB,SAAS;YACT,QAAQ;wBACR;uBACA;wBACA;YACA,iBAAiB;QACnB,KACE;OAEL;QAAC;QAAU;QAAY;QAAW;QAAY,MAAM,KAAK;QAAE,MAAM,YAAY;KAAC;IAEjF,qBACE,gCAAC,CAAA,GAAA,wBAAgB;QAAE,SAAS;OACzB,CAAA,2BAAc,gCAAC;YAAc,OAAO;YAAO,YAAY;YAAY,aAAa;;AAGvF;AAQA,SAAS,oCAAgC,SAAC,KAAK,cAAE,UAAU,EAAE,aAAa,GAAG,EAAwB;IACnG,IAAI,QACF,IAAI,aACJ,YAAY,0BACZ,iBAAiB,EAClB,GAAG;IACJ,IAAI,mBACF,YAAY;IAGd,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,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,SAAS;oBACT,OAAO;wBAAC,mBAAmB;oBAAS;gBACtC;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAa;gBAAG;oBAAC,GAAG,YAAY;oBAAE,KAAK;gBAAU;aAAE;YACpD;gBAAC,CAAA,GAAA,yCAAe;gBAAG;aAAM;YACzB;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,WAAW,WAAW,SAAS;oBAAE,YAAY,MAAM,UAAU,IAAI;gBAAK;aAAE;YACxF;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;aAAW;SAChC;qBACD,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,SAAS,IAAI;QACjC,aAAW,MAAM,MAAM,IAAI;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;QACtC,iBAAe,MAAM,UAAU,IAAI;QACpC,QAAQ,cAAc,uBAAS,gCAAC;QAAM,MAAK;QAAS,MAAM;QAAM,OAAO,CAAA,qBAAA,MAAM,WAAW,cAAjB,gCAAA,qBAAqB;;AAGnG;AAEA;;CAEC,GACD,MAAM,4CAA0B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB","sources":["packages/react-aria-components/src/ComboBox.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {AriaComboBoxProps, useComboBox, useFilter} from 'react-aria';\nimport {ButtonContext} from './Button';\nimport {Collection, ComboBoxState, Node, useComboBoxState} from 'react-stately';\nimport {CollectionBuilder} from '@react-aria/collections';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, useResizeObserver} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport {ListBoxContext, ListStateContext} from './ListBox';\nimport {OverlayTriggerStateContext} from './Dialog';\nimport {PopoverContext} from './Popover';\nimport React, {createContext, ForwardedRef, forwardRef, useCallback, useMemo, useRef, useState} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ComboBoxRenderProps {\n /**\n * Whether the combobox is currently open.\n * @selector [data-open]\n */\n isOpen: boolean,\n /**\n * Whether the combobox is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the combobox is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the combobox is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<T>, 'children' | 'placeholder' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<ComboBoxRenderProps>, SlotProps {\n /** The filter function used to determine if a option should be included in the combo box list. */\n defaultFilter?: (textValue: string, inputValue: string) => boolean,\n /**\n * Whether the text or key of the selected item is submitted as part of an HTML form.\n * When `allowsCustomValue` is `true`, this option does not apply and the text is always submitted.\n * @default 'key'\n */\n formValue?: 'text' | 'key',\n /** Whether the combo box allows the menu to be open when the collection is empty. */\n allowsEmptyCollection?: boolean\n}\n\nexport const ComboBoxContext = createContext<ContextValue<ComboBoxProps<any>, HTMLDivElement>>(null);\nexport const ComboBoxStateContext = createContext<ComboBoxState<any> | null>(null);\n\nfunction ComboBox<T extends object>(props: ComboBoxProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ComboBoxContext);\n let {children, isDisabled = false, isInvalid = false, isRequired = false} = props;\n let content = useMemo(() => (\n <ListBoxContext.Provider value={{items: props.items ?? props.defaultItems}}>\n {typeof children === 'function'\n ? children({\n isOpen: false,\n isDisabled,\n isInvalid,\n isRequired,\n defaultChildren: null\n })\n : children}\n </ListBoxContext.Provider>\n ), [children, isDisabled, isInvalid, isRequired, props.items, props.defaultItems]);\n\n return (\n <CollectionBuilder content={content}>\n {collection => <ComboBoxInner props={props} collection={collection} comboBoxRef={ref} />}\n </CollectionBuilder>\n );\n}\n\ninterface ComboBoxInnerProps<T extends object> {\n props: ComboBoxProps<T>,\n collection: Collection<Node<T>>,\n comboBoxRef: RefObject<HTMLDivElement | null>\n}\n\nfunction ComboBoxInner<T extends object>({props, collection, comboBoxRef: ref}: ComboBoxInnerProps<T>) {\n let {\n name,\n formValue = 'key',\n allowsCustomValue\n } = props;\n if (allowsCustomValue) {\n formValue = 'text';\n }\n\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let {contains} = useFilter({sensitivity: 'base'});\n let state = useComboBoxState({\n defaultFilter: props.defaultFilter || contains,\n ...props,\n // If props.items isn't provided, rely on collection filtering (aka listbox.items is provided or defaultItems provided to Combobox)\n items: props.items,\n children: undefined,\n collection,\n validationBehavior\n });\n\n let buttonRef = useRef<HTMLButtonElement>(null);\n let inputRef = useRef<HTMLInputElement>(null);\n let listBoxRef = useRef<HTMLDivElement>(null);\n let popoverRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let {\n buttonProps,\n inputProps,\n listBoxProps,\n labelProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useComboBox({\n ...removeDataAttributes(props),\n label,\n inputRef,\n buttonRef,\n listBoxRef,\n popoverRef,\n name: formValue === 'text' ? name : undefined,\n validationBehavior\n }, state);\n\n // Make menu width match input + button\n let [menuWidth, setMenuWidth] = useState<string | null>(null);\n let onResize = useCallback(() => {\n if (inputRef.current) {\n let buttonRect = buttonRef.current?.getBoundingClientRect();\n let inputRect = inputRef.current.getBoundingClientRect();\n let minX = buttonRect ? Math.min(buttonRect.left, inputRect.left) : inputRect.left;\n let maxX = buttonRect ? Math.max(buttonRect.right, inputRect.right) : inputRect.right;\n setMenuWidth((maxX - minX) + 'px');\n }\n }, [buttonRef, inputRef, setMenuWidth]);\n\n useResizeObserver({\n ref: inputRef,\n onResize: onResize\n });\n\n // Only expose a subset of state to renderProps function to avoid infinite render loop\n let renderPropsState = useMemo(() => ({\n isOpen: state.isOpen,\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false,\n isRequired: props.isRequired || false\n }), [state.isOpen, props.isDisabled, validation.isInvalid, props.isRequired]);\n\n let renderProps = useRenderProps({\n ...props,\n values: renderPropsState,\n defaultClassName: 'react-aria-ComboBox'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ComboBoxStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef}],\n [ButtonContext, {...buttonProps, ref: buttonRef, isPressed: state.isOpen}],\n [InputContext, {...inputProps, ref: inputRef}],\n [OverlayTriggerStateContext, state],\n [PopoverContext, {\n ref: popoverRef,\n triggerRef: inputRef,\n scrollRef: listBoxRef,\n placement: 'bottom start',\n isNonModal: true,\n trigger: 'ComboBox',\n style: {'--trigger-width': menuWidth} as React.CSSProperties\n }],\n [ListBoxContext, {...listBoxProps, ref: listBoxRef}],\n [ListStateContext, state],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [GroupContext, {isInvalid: validation.isInvalid, isDisabled: props.isDisabled || false}],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-focused={state.isFocused || undefined}\n data-open={state.isOpen || undefined}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined}\n data-required={props.isRequired || undefined} />\n {name && formValue === 'key' && <input type=\"hidden\" name={name} value={state.selectedKey ?? ''} />}\n </Provider>\n );\n}\n\n/**\n * A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query.\n */\nconst _ComboBox = /*#__PURE__*/ (forwardRef as forwardRefType)(ComboBox);\nexport {_ComboBox as ComboBox};\n"],"names":[],"version":3,"file":"ComboBox.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;AAuDM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAoD;AACxF,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAA6B;AAKtE,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,SAA2B,KAAuB,EAAE,GAAiC;IACjK,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,YAAC,QAAQ,cAAE,aAAa,kBAAO,YAAY,mBAAO,aAAa,OAAM,GAAG;IAC5E,IAAI,UAAU,CAAA,GAAA,cAAM,EAAE;YACoB;6BAAxC,gCAAC,CAAA,GAAA,yCAAa,EAAE,QAAQ;YAAC,OAAO;gBAAC,OAAO,CAAA,eAAA,MAAM,KAAK,cAAX,0BAAA,eAAe,MAAM,YAAY;YAAA;WACtE,OAAO,aAAa,aACjB,SAAS;YACT,QAAQ;wBACR;uBACA;wBACA;YACA,iBAAiB;QACnB,KACE;OAEL;QAAC;QAAU;QAAY;QAAW;QAAY,MAAM,KAAK;QAAE,MAAM,YAAY;KAAC;IAEjF,qBACE,gCAAC,CAAA,GAAA,wBAAgB;QAAE,SAAS;OACzB,CAAA,2BAAc,gCAAC;YAAc,OAAO;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AAE;YAC1E;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;gBAAQ;aAAE;YAC9C;gBAAC,CAAA,GAAA,wCAAyB;gBAAG;aAAM;YACnC;gBAAC,CAAA,GAAA,yCAAa;gBAAG;oBACf,KAAK;oBACL,YAAY;oBACZ,WAAW;oBACX,WAAW;oBACX,YAAY;oBACZ,SAAS;oBACT,OAAO;wBAAC,mBAAmB;oBAAS;gBACtC;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAa;gBAAG;oBAAC,GAAG,YAAY;oBAAE,KAAK;gBAAU;aAAE;YACpD;gBAAC,CAAA,GAAA,yCAAe;gBAAG;aAAM;YACzB;gBAAC,CAAA,GAAA,yCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,yCAAW;gBAAG;oBAAC,WAAW,WAAW,SAAS;oBAAE,YAAY,MAAM,UAAU,IAAI;gBAAK;aAAE;YACxF;gBAAC,CAAA,GAAA,yCAAgB;gBAAG;aAAW;SAChC;qBACD,gCAAC;QACE,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,gBAAc,MAAM,SAAS,IAAI;QACjC,aAAW,MAAM,MAAM,IAAI;QAC3B,iBAAe,MAAM,UAAU,IAAI;QACnC,gBAAc,WAAW,SAAS,IAAI;QACtC,iBAAe,MAAM,UAAU,IAAI;QACpC,QAAQ,cAAc,uBAAS,gCAAC;QAAM,MAAK;QAAS,MAAM;QAAM,OAAO,CAAA,qBAAA,MAAM,WAAW,cAAjB,gCAAA,qBAAqB;;AAGnG","sources":["packages/react-aria-components/src/ComboBox.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {AriaComboBoxProps, useComboBox, useFilter} from 'react-aria';\nimport {ButtonContext} from './Button';\nimport {Collection, ComboBoxState, Node, useComboBoxState} from 'react-stately';\nimport {CollectionBuilder} from '@react-aria/collections';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, useResizeObserver} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType, RefObject} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport {ListBoxContext, ListStateContext} from './ListBox';\nimport {OverlayTriggerStateContext} from './Dialog';\nimport {PopoverContext} from './Popover';\nimport React, {createContext, ForwardedRef, forwardRef, useCallback, useMemo, useRef, useState} from 'react';\nimport {TextContext} from './Text';\n\nexport interface ComboBoxRenderProps {\n /**\n * Whether the combobox is currently open.\n * @selector [data-open]\n */\n isOpen: boolean,\n /**\n * Whether the combobox is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the combobox is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the combobox is required.\n * @selector [data-required]\n */\n isRequired: boolean\n}\n\nexport interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<T>, 'children' | 'placeholder' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<ComboBoxRenderProps>, SlotProps {\n /** The filter function used to determine if a option should be included in the combo box list. */\n defaultFilter?: (textValue: string, inputValue: string) => boolean,\n /**\n * Whether the text or key of the selected item is submitted as part of an HTML form.\n * When `allowsCustomValue` is `true`, this option does not apply and the text is always submitted.\n * @default 'key'\n */\n formValue?: 'text' | 'key',\n /** Whether the combo box allows the menu to be open when the collection is empty. */\n allowsEmptyCollection?: boolean\n}\n\nexport const ComboBoxContext = createContext<ContextValue<ComboBoxProps<any>, HTMLDivElement>>(null);\nexport const ComboBoxStateContext = createContext<ComboBoxState<any> | null>(null);\n\n/**\n * A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query.\n */\nexport const ComboBox = /*#__PURE__*/ (forwardRef as forwardRefType)(function ComboBox<T extends object>(props: ComboBoxProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, ComboBoxContext);\n let {children, isDisabled = false, isInvalid = false, isRequired = false} = props;\n let content = useMemo(() => (\n <ListBoxContext.Provider value={{items: props.items ?? props.defaultItems}}>\n {typeof children === 'function'\n ? children({\n isOpen: false,\n isDisabled,\n isInvalid,\n isRequired,\n defaultChildren: null\n })\n : children}\n </ListBoxContext.Provider>\n ), [children, isDisabled, isInvalid, isRequired, props.items, props.defaultItems]);\n\n return (\n <CollectionBuilder content={content}>\n {collection => <ComboBoxInner props={props} collection={collection} comboBoxRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface ComboBoxInnerProps<T extends object> {\n props: ComboBoxProps<T>,\n collection: Collection<Node<T>>,\n comboBoxRef: RefObject<HTMLDivElement | null>\n}\n\nfunction ComboBoxInner<T extends object>({props, collection, comboBoxRef: ref}: ComboBoxInnerProps<T>) {\n let {\n name,\n formValue = 'key',\n allowsCustomValue\n } = props;\n if (allowsCustomValue) {\n formValue = 'text';\n }\n\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let {contains} = useFilter({sensitivity: 'base'});\n let state = useComboBoxState({\n defaultFilter: props.defaultFilter || contains,\n ...props,\n // If props.items isn't provided, rely on collection filtering (aka listbox.items is provided or defaultItems provided to Combobox)\n items: props.items,\n children: undefined,\n collection,\n validationBehavior\n });\n\n let buttonRef = useRef<HTMLButtonElement>(null);\n let inputRef = useRef<HTMLInputElement>(null);\n let listBoxRef = useRef<HTMLDivElement>(null);\n let popoverRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let {\n buttonProps,\n inputProps,\n listBoxProps,\n labelProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useComboBox({\n ...removeDataAttributes(props),\n label,\n inputRef,\n buttonRef,\n listBoxRef,\n popoverRef,\n name: formValue === 'text' ? name : undefined,\n validationBehavior\n }, state);\n\n // Make menu width match input + button\n let [menuWidth, setMenuWidth] = useState<string | null>(null);\n let onResize = useCallback(() => {\n if (inputRef.current) {\n let buttonRect = buttonRef.current?.getBoundingClientRect();\n let inputRect = inputRef.current.getBoundingClientRect();\n let minX = buttonRect ? Math.min(buttonRect.left, inputRect.left) : inputRect.left;\n let maxX = buttonRect ? Math.max(buttonRect.right, inputRect.right) : inputRect.right;\n setMenuWidth((maxX - minX) + 'px');\n }\n }, [buttonRef, inputRef, setMenuWidth]);\n\n useResizeObserver({\n ref: inputRef,\n onResize: onResize\n });\n\n // Only expose a subset of state to renderProps function to avoid infinite render loop\n let renderPropsState = useMemo(() => ({\n isOpen: state.isOpen,\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false,\n isRequired: props.isRequired || false\n }), [state.isOpen, props.isDisabled, validation.isInvalid, props.isRequired]);\n\n let renderProps = useRenderProps({\n ...props,\n values: renderPropsState,\n defaultClassName: 'react-aria-ComboBox'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [ComboBoxStateContext, state],\n [LabelContext, {...labelProps, ref: labelRef}],\n [ButtonContext, {...buttonProps, ref: buttonRef, isPressed: state.isOpen}],\n [InputContext, {...inputProps, ref: inputRef}],\n [OverlayTriggerStateContext, state],\n [PopoverContext, {\n ref: popoverRef,\n triggerRef: inputRef,\n scrollRef: listBoxRef,\n placement: 'bottom start',\n isNonModal: true,\n trigger: 'ComboBox',\n style: {'--trigger-width': menuWidth} as React.CSSProperties\n }],\n [ListBoxContext, {...listBoxProps, ref: listBoxRef}],\n [ListStateContext, state],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [GroupContext, {isInvalid: validation.isInvalid, isDisabled: props.isDisabled || false}],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-focused={state.isFocused || undefined}\n data-open={state.isOpen || undefined}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined}\n data-required={props.isRequired || undefined} />\n {name && formValue === 'key' && <input type=\"hidden\" name={name} value={state.selectedKey ?? ''} />}\n </Provider>\n );\n}\n"],"names":[],"version":3,"file":"ComboBox.module.js.map"}
@@ -54,7 +54,7 @@ const $9eb4e1c2268ca198$export$7b3e670c86da5fe8 = /*#__PURE__*/ (0, $hucUZ$react
54
54
  const $9eb4e1c2268ca198$export$8e17ddc448e87c1e = /*#__PURE__*/ (0, $hucUZ$react.createContext)(null);
55
55
  const $9eb4e1c2268ca198$export$3b08bebcf796eea0 = /*#__PURE__*/ (0, $hucUZ$react.createContext)(null);
56
56
  const $9eb4e1c2268ca198$export$5d8dc44abd10a920 = /*#__PURE__*/ (0, $hucUZ$react.createContext)(null);
57
- function $9eb4e1c2268ca198$var$DateField(props, ref) {
57
+ const $9eb4e1c2268ca198$export$d9781c7894a82487 = /*#__PURE__*/ (0, $hucUZ$react.forwardRef)(function DateField(props, ref) {
58
58
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $9eb4e1c2268ca198$export$7b3e670c86da5fe8);
59
59
  let { validationBehavior: formValidationBehavior } = (0, $c5ccf687772c0422$exports.useSlottedContext)((0, $35157657e549736b$exports.FormContext)) || {};
60
60
  var _props_validationBehavior, _ref;
@@ -136,12 +136,8 @@ function $9eb4e1c2268ca198$var$DateField(props, ref) {
136
136
  slot: props.slot || undefined,
137
137
  "data-invalid": state.isInvalid || undefined
138
138
  }));
139
- }
140
- /**
141
- * A date field allows users to enter and edit date and time values using a keyboard.
142
- * Each part of a date value is displayed in an individually editable segment.
143
- */ const $9eb4e1c2268ca198$export$d9781c7894a82487 = /*#__PURE__*/ (0, $hucUZ$react.forwardRef)($9eb4e1c2268ca198$var$DateField);
144
- function $9eb4e1c2268ca198$var$TimeField(props, ref) {
139
+ });
140
+ const $9eb4e1c2268ca198$export$5eaee2322dd727eb = /*#__PURE__*/ (0, $hucUZ$react.forwardRef)(function TimeField(props, ref) {
145
141
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $9eb4e1c2268ca198$export$8e17ddc448e87c1e);
146
142
  let { validationBehavior: formValidationBehavior } = (0, $c5ccf687772c0422$exports.useSlottedContext)((0, $35157657e549736b$exports.FormContext)) || {};
147
143
  var _props_validationBehavior, _ref;
@@ -222,12 +218,8 @@ function $9eb4e1c2268ca198$var$TimeField(props, ref) {
222
218
  slot: props.slot || undefined,
223
219
  "data-invalid": state.isInvalid || undefined
224
220
  }));
225
- }
226
- /**
227
- * A time field allows users to enter and edit time values using a keyboard.
228
- * Each part of a time value is displayed in an individually editable segment.
229
- */ const $9eb4e1c2268ca198$export$5eaee2322dd727eb = /*#__PURE__*/ (0, $hucUZ$react.forwardRef)($9eb4e1c2268ca198$var$TimeField);
230
- function $9eb4e1c2268ca198$var$DateInput(props, ref) {
221
+ });
222
+ const $9eb4e1c2268ca198$export$7edc06cf1783b30f = /*#__PURE__*/ (0, $hucUZ$react.forwardRef)(function DateInput(props, ref) {
231
223
  // If state is provided by DateField/TimeField, just render.
232
224
  // Otherwise (e.g. in DatePicker), we need to call hooks and create state ourselves.
233
225
  let dateFieldState = (0, $hucUZ$react.useContext)($9eb4e1c2268ca198$export$3b08bebcf796eea0);
@@ -239,7 +231,7 @@ function $9eb4e1c2268ca198$var$DateInput(props, ref) {
239
231
  ...props,
240
232
  ref: ref
241
233
  });
242
- }
234
+ });
243
235
  const $9eb4e1c2268ca198$var$DateInputStandalone = /*#__PURE__*/ (0, $hucUZ$react.forwardRef)((props, ref)=>{
244
236
  let [dateFieldProps, fieldRef] = (0, $c5ccf687772c0422$exports.useContextProps)({
245
237
  slot: props.slot
@@ -294,10 +286,7 @@ const $9eb4e1c2268ca198$var$DateInputInner = /*#__PURE__*/ (0, $hucUZ$react.forw
294
286
  key: i
295
287
  }))), /*#__PURE__*/ (0, ($parcel$interopDefault($hucUZ$react))).createElement((0, $1bcfcef5af644e13$exports.Input), null));
296
288
  });
297
- /**
298
- * A date input groups the editable date segments within a date field.
299
- */ const $9eb4e1c2268ca198$export$7edc06cf1783b30f = /*#__PURE__*/ (0, $hucUZ$react.forwardRef)($9eb4e1c2268ca198$var$DateInput);
300
- function $9eb4e1c2268ca198$var$DateSegment({ segment: segment, ...otherProps }, ref) {
289
+ const $9eb4e1c2268ca198$export$336ab7fa954c4b5f = /*#__PURE__*/ (0, $hucUZ$react.forwardRef)(function DateSegment({ segment: segment, ...otherProps }, ref) {
301
290
  let dateFieldState = (0, $hucUZ$react.useContext)($9eb4e1c2268ca198$export$3b08bebcf796eea0);
302
291
  let timeFieldState = (0, $hucUZ$react.useContext)($9eb4e1c2268ca198$export$5d8dc44abd10a920);
303
292
  let state = dateFieldState !== null && dateFieldState !== void 0 ? dateFieldState : timeFieldState;
@@ -335,11 +324,7 @@ function $9eb4e1c2268ca198$var$DateSegment({ segment: segment, ...otherProps },
335
324
  "data-focused": isFocused || undefined,
336
325
  "data-focus-visible": isFocusVisible || undefined
337
326
  });
338
- }
339
- /**
340
- * A date segment displays an individual unit of a date and time, and allows users to edit
341
- * the value by typing or using the arrow keys to increment and decrement.
342
- */ const $9eb4e1c2268ca198$export$336ab7fa954c4b5f = /*#__PURE__*/ (0, $hucUZ$react.forwardRef)($9eb4e1c2268ca198$var$DateSegment);
327
+ });
343
328
 
344
329
 
345
330
  //# sourceMappingURL=DateField.main.js.map
@@ -1 +1 @@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AAa,EAAE;QAC/B,GAAG,UAAU;QACb,QAAQ;YACN,GAAG,OAAO;YACV,YAAY,CAAC,QAAQ,UAAU;YAC/B,WAAW,MAAM,SAAS;YAC1B,YAAY,MAAM,UAAU;uBAC5B;uBACA;4BACA;QACF;QACA,iBAAiB,QAAQ,IAAI;QAC7B,kBAAkB;IACpB;IAGA,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,2BAAS,EAAE,CAAA,GAAA,oCAAa,EAAE,aAAoB,cAAc,YAAY,WAAW;QACtF,GAAG,WAAW;QACf,KAAK;QACL,oBAAkB,QAAQ,aAAa,IAAI;QAC3C,gBAAc,MAAM,SAAS,IAAI;QACjC,iBAAe,CAAC,QAAQ,UAAU,IAAI;QACtC,iBAAe,MAAM,UAAU,IAAI;QACnC,aAAW,QAAQ,IAAI;QACvB,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;;AAE5C;AAEA;;;CAGC,GACD,MAAM,4CAA6B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB","sources":["packages/react-aria-components/src/DateField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {AriaDateFieldProps, AriaTimeFieldProps, DateValue, HoverEvents, mergeProps, TimeValue, useDateField, useDateSegment, useFocusRing, useHover, useLocale, useTimeField} from 'react-aria';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DateFieldState, DateSegmentType, DateSegment as IDateSegment, TimeFieldState, useDateFieldState, useTimeFieldState} from 'react-stately';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, useObjectRef} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType} from '@react-types/shared';\nimport {Group, GroupContext} from './Group';\nimport {Input, InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {cloneElement, createContext, ForwardedRef, forwardRef, JSX, ReactElement, useContext, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface DateFieldRenderProps {\n /**\n * State of the date field.\n */\n state: DateFieldState,\n /**\n * Whether the date field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the date field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\nexport interface DateFieldProps<T extends DateValue> extends Omit<AriaDateFieldProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<DateFieldRenderProps>, SlotProps {}\nexport interface TimeFieldProps<T extends TimeValue> extends Omit<AriaTimeFieldProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<DateFieldRenderProps>, SlotProps {}\n\nexport const DateFieldContext = createContext<ContextValue<DateFieldProps<any>, HTMLDivElement>>(null);\nexport const TimeFieldContext = createContext<ContextValue<TimeFieldProps<any>, HTMLDivElement>>(null);\nexport const DateFieldStateContext = createContext<DateFieldState | null>(null);\nexport const TimeFieldStateContext = createContext<TimeFieldState | null>(null);\n\nfunction DateField<T extends DateValue>(props: DateFieldProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, DateFieldContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...props,\n locale,\n createCalendar,\n validationBehavior\n });\n\n let fieldRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let inputRef = useRef<HTMLInputElement>(null);\n let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useDateField({\n ...removeDataAttributes(props),\n label,\n inputRef,\n validationBehavior\n }, state, fieldRef);\n\n let renderProps = useRenderProps({\n ...removeDataAttributes(props),\n values: {\n state,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled\n },\n defaultClassName: 'react-aria-DateField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [DateFieldStateContext, state],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-invalid={state.isInvalid || undefined} />\n </Provider>\n );\n}\n\n/**\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nconst _DateField = /*#__PURE__*/ (forwardRef as forwardRefType)(DateField);\nexport {_DateField as DateField};\n\nfunction TimeField<T extends TimeValue>(props: TimeFieldProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, TimeFieldContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let {locale} = useLocale();\n let state = useTimeFieldState({\n ...props,\n locale,\n validationBehavior\n });\n\n let fieldRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let inputRef = useRef<HTMLInputElement>(null);\n let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useTimeField({\n ...removeDataAttributes(props),\n label,\n inputRef,\n validationBehavior\n }, state, fieldRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled\n },\n defaultClassName: 'react-aria-TimeField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [TimeFieldStateContext, state],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-invalid={state.isInvalid || undefined} />\n </Provider>\n );\n}\n\n/**\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nconst _TimeField = /*#__PURE__*/ (forwardRef as forwardRefType)(TimeField);\nexport {_TimeField as TimeField};\n\nexport interface DateInputRenderProps {\n /**\n * Whether the date input is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether an element within the date input is focused, either via a mouse or keyboard.\n * @selector [data-focus-within]\n */\n isFocusWithin: boolean,\n /**\n * Whether an element within the date input is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the date input is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n\n /**\n * Whether the date input is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean\n}\n\nexport interface DateInputProps extends SlotProps, StyleRenderProps<DateInputRenderProps> {\n children: (segment: IDateSegment) => ReactElement\n}\n\nfunction DateInput(props: DateInputProps, ref: ForwardedRef<HTMLDivElement>): JSX.Element {\n // If state is provided by DateField/TimeField, just render.\n // Otherwise (e.g. in DatePicker), we need to call hooks and create state ourselves.\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n return dateFieldState || timeFieldState\n ? <DateInputInner {...props} ref={ref} />\n : <DateInputStandalone {...props} ref={ref} />;\n}\n\nconst DateInputStandalone = forwardRef((props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n let [dateFieldProps, fieldRef] = useContextProps({slot: props.slot} as DateFieldProps<any>, ref, DateFieldContext);\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...dateFieldProps,\n locale,\n createCalendar\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let {fieldProps, inputProps} = useDateField({...dateFieldProps, inputRef}, state, fieldRef);\n\n return (\n <Provider\n values={[\n [DateFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}]\n ]}>\n <DateInputInner {...props} />\n </Provider>\n );\n});\n\nconst DateInputInner = forwardRef((props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n let {className, children} = props;\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n let state = dateFieldState ?? timeFieldState!;\n\n return (\n <>\n <Group\n {...props}\n ref={ref}\n slot={props.slot || undefined}\n className={className ?? 'react-aria-DateInput'}\n isInvalid={state.isInvalid}>\n {state.segments.map((segment, i) => cloneElement(children(segment), {key: i}))}\n </Group>\n <Input />\n </>\n );\n});\n\n/**\n * A date input groups the editable date segments within a date field.\n */\nconst _DateInput = /*#__PURE__*/ (forwardRef as forwardRefType)(DateInput);\nexport {_DateInput as DateInput};\n\nexport interface DateSegmentRenderProps extends Omit<IDateSegment, 'isEditable'> {\n /**\n * Whether the segment is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the segment is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the segment is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the value is a placeholder.\n * @selector [data-placeholder]\n */\n isPlaceholder: boolean,\n /**\n * Whether the segment is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the date field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the date field is in an invalid state.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The type of segment. Values include `literal`, `year`, `month`, `day`, etc.\n * @selector [data-type=\"...\"]\n */\n type: DateSegmentType\n}\n\nexport interface DateSegmentProps extends RenderProps<DateSegmentRenderProps>, HoverEvents {\n segment: IDateSegment\n}\n\nfunction DateSegment({segment, ...otherProps}: DateSegmentProps, ref: ForwardedRef<HTMLDivElement>) {\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n let state = dateFieldState ?? timeFieldState!;\n let domRef = useObjectRef(ref);\n let {segmentProps} = useDateSegment(segment, state, domRef);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({...otherProps, isDisabled: state.isDisabled || segment.type === 'literal'});\n let renderProps = useRenderProps({\n ...otherProps,\n values: {\n ...segment,\n isReadOnly: !segment.isEditable,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled,\n isHovered,\n isFocused,\n isFocusVisible\n },\n defaultChildren: segment.text,\n defaultClassName: 'react-aria-DateSegment'\n });\n\n\n return (\n <div\n {...mergeProps(filterDOMProps(otherProps as any), segmentProps, focusProps, hoverProps)}\n {...renderProps}\n ref={domRef}\n data-placeholder={segment.isPlaceholder || undefined}\n data-invalid={state.isInvalid || undefined}\n data-readonly={!segment.isEditable || undefined}\n data-disabled={state.isDisabled || undefined}\n data-type={segment.type}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined} />\n );\n}\n\n/**\n * A date segment displays an individual unit of a date and time, and allows users to edit\n * the value by typing or using the arrow keys to increment and decrement.\n */\nconst _DateSegment = /*#__PURE__*/ (forwardRef as forwardRefType)(DateSegment);\nexport {_D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,KAAK;IAAS;IACjH,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,UAAU;QACb,QAAQ;YACN,GAAG,OAAO;YACV,YAAY,CAAC,QAAQ,UAAU;YAC/B,WAAW,MAAM,SAAS;YAC1B,YAAY,MAAM,UAAU;uBAC5B;uBACA;4BACA;QACF;QACA,iBAAiB,QAAQ,IAAI;QAC7B,kBAAkB;IACpB;IAGA,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,2BAAS,EAAE,CAAA,GAAA,oCAAa,EAAE,aAAoB,cAAc,YAAY,WAAW;QACtF,GAAG,WAAW;QACf,KAAK;QACL,oBAAkB,QAAQ,aAAa,IAAI;QAC3C,gBAAc,MAAM,SAAS,IAAI;QACjC,iBAAe,CAAC,QAAQ,UAAU,IAAI;QACtC,iBAAe,MAAM,UAAU,IAAI;QACnC,aAAW,QAAQ,IAAI;QACvB,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;;AAE5C","sources":["packages/react-aria-components/src/DateField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {AriaDateFieldProps, AriaTimeFieldProps, DateValue, HoverEvents, mergeProps, TimeValue, useDateField, useDateSegment, useFocusRing, useHover, useLocale, useTimeField} from 'react-aria';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DateFieldState, DateSegmentType, DateSegment as IDateSegment, TimeFieldState, useDateFieldState, useTimeFieldState} from 'react-stately';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, useObjectRef} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType} from '@react-types/shared';\nimport {Group, GroupContext} from './Group';\nimport {Input, InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {cloneElement, createContext, ForwardedRef, forwardRef, JSX, ReactElement, useContext, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface DateFieldRenderProps {\n /**\n * State of the date field.\n */\n state: DateFieldState,\n /**\n * Whether the date field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the date field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\nexport interface DateFieldProps<T extends DateValue> extends Omit<AriaDateFieldProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<DateFieldRenderProps>, SlotProps {}\nexport interface TimeFieldProps<T extends TimeValue> extends Omit<AriaTimeFieldProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<DateFieldRenderProps>, SlotProps {}\n\nexport const DateFieldContext = createContext<ContextValue<DateFieldProps<any>, HTMLDivElement>>(null);\nexport const TimeFieldContext = createContext<ContextValue<TimeFieldProps<any>, HTMLDivElement>>(null);\nexport const DateFieldStateContext = createContext<DateFieldState | null>(null);\nexport const TimeFieldStateContext = createContext<TimeFieldState | null>(null);\n\n/**\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport const DateField = /*#__PURE__*/ (forwardRef as forwardRefType)(function DateField<T extends DateValue>(props: DateFieldProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, DateFieldContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...props,\n locale,\n createCalendar,\n validationBehavior\n });\n\n let fieldRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let inputRef = useRef<HTMLInputElement>(null);\n let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useDateField({\n ...removeDataAttributes(props),\n label,\n inputRef,\n validationBehavior\n }, state, fieldRef);\n\n let renderProps = useRenderProps({\n ...removeDataAttributes(props),\n values: {\n state,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled\n },\n defaultClassName: 'react-aria-DateField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [DateFieldStateContext, state],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-invalid={state.isInvalid || undefined} />\n </Provider>\n );\n});\n\n/**\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nexport const TimeField = /*#__PURE__*/ (forwardRef as forwardRefType)(function TimeField<T extends TimeValue>(props: TimeFieldProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, TimeFieldContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let {locale} = useLocale();\n let state = useTimeFieldState({\n ...props,\n locale,\n validationBehavior\n });\n\n let fieldRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let inputRef = useRef<HTMLInputElement>(null);\n let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useTimeField({\n ...removeDataAttributes(props),\n label,\n inputRef,\n validationBehavior\n }, state, fieldRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled\n },\n defaultClassName: 'react-aria-TimeField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [TimeFieldStateContext, state],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-invalid={state.isInvalid || undefined} />\n </Provider>\n );\n});\n\nexport interface DateInputRenderProps {\n /**\n * Whether the date input is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether an element within the date input is focused, either via a mouse or keyboard.\n * @selector [data-focus-within]\n */\n isFocusWithin: boolean,\n /**\n * Whether an element within the date input is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the date input is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n\n /**\n * Whether the date input is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean\n}\n\nexport interface DateInputProps extends SlotProps, StyleRenderProps<DateInputRenderProps> {\n children: (segment: IDateSegment) => ReactElement\n}\n\n/**\n * A date input groups the editable date segments within a date field.\n */\nexport const DateInput = /*#__PURE__*/ (forwardRef as forwardRefType)(function DateInput(props: DateInputProps, ref: ForwardedRef<HTMLDivElement>): JSX.Element {\n // If state is provided by DateField/TimeField, just render.\n // Otherwise (e.g. in DatePicker), we need to call hooks and create state ourselves.\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n return dateFieldState || timeFieldState\n ? <DateInputInner {...props} ref={ref} />\n : <DateInputStandalone {...props} ref={ref} />;\n});\n\nconst DateInputStandalone = forwardRef((props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n let [dateFieldProps, fieldRef] = useContextProps({slot: props.slot} as DateFieldProps<any>, ref, DateFieldContext);\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...dateFieldProps,\n locale,\n createCalendar\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let {fieldProps, inputProps} = useDateField({...dateFieldProps, inputRef}, state, fieldRef);\n\n return (\n <Provider\n values={[\n [DateFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}]\n ]}>\n <DateInputInner {...props} />\n </Provider>\n );\n});\n\nconst DateInputInner = forwardRef((props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n let {className, children} = props;\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n let state = dateFieldState ?? timeFieldState!;\n\n return (\n <>\n <Group\n {...props}\n ref={ref}\n slot={props.slot || undefined}\n className={className ?? 'react-aria-DateInput'}\n isInvalid={state.isInvalid}>\n {state.segments.map((segment, i) => cloneElement(children(segment), {key: i}))}\n </Group>\n <Input />\n </>\n );\n});\n\nexport interface DateSegmentRenderProps extends Omit<IDateSegment, 'isEditable'> {\n /**\n * Whether the segment is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the segment is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the segment is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the value is a placeholder.\n * @selector [data-placeholder]\n */\n isPlaceholder: boolean,\n /**\n * Whether the segment is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the date field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the date field is in an invalid state.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The type of segment. Values include `literal`, `year`, `month`, `day`, etc.\n * @selector [data-type=\"...\"]\n */\n type: DateSegmentType\n}\n\nexport interface DateSegmentProps extends RenderProps<DateSegmentRenderProps>, HoverEvents {\n segment: IDateSegment\n}\n\n/**\n * A date segment displays an individual unit of a date and time, and allows users to edit\n * the value by typing or using the arrow keys to increment and decrement.\n */\nexport const DateSegment = /*#__PURE__*/ (forwardRef as forwardRefType)(function DateSegment({segment, ...otherProps}: DateSegmentProps, ref: ForwardedRef<HTMLDivElement>) {\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n let state = dateFieldState ?? timeFieldState!;\n let domRef = useObjectRef(ref);\n let {segmentProps} = useDateSegment(segment, state, domRef);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({...otherProps, isDisabled: state.isDisabled || segment.type === 'literal'});\n let renderProps = useRenderProps({\n ...otherProps,\n values: {\n ...segment,\n isReadOnly: !segment.isEditable,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled,\n isHovered,\n isFocused,\n isFocusVisible\n },\n defaultChildren: segment.text,\n defaultClassName: 'react-aria-DateSegment'\n });\n\n\n return (\n <div\n {...mergeProps(filterDOMProps(otherProps as any), segmentProps, focusProps, hoverProps)}\n {...renderProps}\n ref={domRef}\n data-placeholder={segment.isPlaceholder || undefined}\n data-invalid={state.isInvalid || undefined}\n data-readonly={!segment.isEditable || undefined}\n data-disabled={state.isDisabled || undefined}\n data-type={segment.type}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"DateField.main.js.map"}
@@ -9,7 +9,7 @@ import {useLocale as $a9Sgq$useLocale, useDateField as $a9Sgq$useDateField, useT
9
9
  import {createCalendar as $a9Sgq$createCalendar} from "@internationalized/date";
10
10
  import {useDateFieldState as $a9Sgq$useDateFieldState, useTimeFieldState as $a9Sgq$useTimeFieldState} from "react-stately";
11
11
  import {filterDOMProps as $a9Sgq$filterDOMProps, useObjectRef as $a9Sgq$useObjectRef} from "@react-aria/utils";
12
- import $a9Sgq$react, {createContext as $a9Sgq$createContext, useRef as $a9Sgq$useRef, forwardRef as $a9Sgq$forwardRef, useContext as $a9Sgq$useContext, cloneElement as $a9Sgq$cloneElement} from "react";
12
+ import $a9Sgq$react, {createContext as $a9Sgq$createContext, forwardRef as $a9Sgq$forwardRef, useRef as $a9Sgq$useRef, useContext as $a9Sgq$useContext, cloneElement as $a9Sgq$cloneElement} from "react";
13
13
 
14
14
  /*
15
15
  * Copyright 2022 Adobe. All rights reserved.
@@ -37,7 +37,7 @@ const $40825cdb76e74f70$export$7b3e670c86da5fe8 = /*#__PURE__*/ (0, $a9Sgq$creat
37
37
  const $40825cdb76e74f70$export$8e17ddc448e87c1e = /*#__PURE__*/ (0, $a9Sgq$createContext)(null);
38
38
  const $40825cdb76e74f70$export$3b08bebcf796eea0 = /*#__PURE__*/ (0, $a9Sgq$createContext)(null);
39
39
  const $40825cdb76e74f70$export$5d8dc44abd10a920 = /*#__PURE__*/ (0, $a9Sgq$createContext)(null);
40
- function $40825cdb76e74f70$var$DateField(props, ref) {
40
+ const $40825cdb76e74f70$export$d9781c7894a82487 = /*#__PURE__*/ (0, $a9Sgq$forwardRef)(function DateField(props, ref) {
41
41
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $40825cdb76e74f70$export$7b3e670c86da5fe8);
42
42
  let { validationBehavior: formValidationBehavior } = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)((0, $d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
43
43
  var _props_validationBehavior, _ref;
@@ -119,12 +119,8 @@ function $40825cdb76e74f70$var$DateField(props, ref) {
119
119
  slot: props.slot || undefined,
120
120
  "data-invalid": state.isInvalid || undefined
121
121
  }));
122
- }
123
- /**
124
- * A date field allows users to enter and edit date and time values using a keyboard.
125
- * Each part of a date value is displayed in an individually editable segment.
126
- */ const $40825cdb76e74f70$export$d9781c7894a82487 = /*#__PURE__*/ (0, $a9Sgq$forwardRef)($40825cdb76e74f70$var$DateField);
127
- function $40825cdb76e74f70$var$TimeField(props, ref) {
122
+ });
123
+ const $40825cdb76e74f70$export$5eaee2322dd727eb = /*#__PURE__*/ (0, $a9Sgq$forwardRef)(function TimeField(props, ref) {
128
124
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $40825cdb76e74f70$export$8e17ddc448e87c1e);
129
125
  let { validationBehavior: formValidationBehavior } = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)((0, $d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
130
126
  var _props_validationBehavior, _ref;
@@ -205,12 +201,8 @@ function $40825cdb76e74f70$var$TimeField(props, ref) {
205
201
  slot: props.slot || undefined,
206
202
  "data-invalid": state.isInvalid || undefined
207
203
  }));
208
- }
209
- /**
210
- * A time field allows users to enter and edit time values using a keyboard.
211
- * Each part of a time value is displayed in an individually editable segment.
212
- */ const $40825cdb76e74f70$export$5eaee2322dd727eb = /*#__PURE__*/ (0, $a9Sgq$forwardRef)($40825cdb76e74f70$var$TimeField);
213
- function $40825cdb76e74f70$var$DateInput(props, ref) {
204
+ });
205
+ const $40825cdb76e74f70$export$7edc06cf1783b30f = /*#__PURE__*/ (0, $a9Sgq$forwardRef)(function DateInput(props, ref) {
214
206
  // If state is provided by DateField/TimeField, just render.
215
207
  // Otherwise (e.g. in DatePicker), we need to call hooks and create state ourselves.
216
208
  let dateFieldState = (0, $a9Sgq$useContext)($40825cdb76e74f70$export$3b08bebcf796eea0);
@@ -222,7 +214,7 @@ function $40825cdb76e74f70$var$DateInput(props, ref) {
222
214
  ...props,
223
215
  ref: ref
224
216
  });
225
- }
217
+ });
226
218
  const $40825cdb76e74f70$var$DateInputStandalone = /*#__PURE__*/ (0, $a9Sgq$forwardRef)((props, ref)=>{
227
219
  let [dateFieldProps, fieldRef] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)({
228
220
  slot: props.slot
@@ -277,10 +269,7 @@ const $40825cdb76e74f70$var$DateInputInner = /*#__PURE__*/ (0, $a9Sgq$forwardRef
277
269
  key: i
278
270
  }))), /*#__PURE__*/ (0, $a9Sgq$react).createElement((0, $3985021b0ad6602f$export$f5b8910cec6cf069), null));
279
271
  });
280
- /**
281
- * A date input groups the editable date segments within a date field.
282
- */ const $40825cdb76e74f70$export$7edc06cf1783b30f = /*#__PURE__*/ (0, $a9Sgq$forwardRef)($40825cdb76e74f70$var$DateInput);
283
- function $40825cdb76e74f70$var$DateSegment({ segment: segment, ...otherProps }, ref) {
272
+ const $40825cdb76e74f70$export$336ab7fa954c4b5f = /*#__PURE__*/ (0, $a9Sgq$forwardRef)(function DateSegment({ segment: segment, ...otherProps }, ref) {
284
273
  let dateFieldState = (0, $a9Sgq$useContext)($40825cdb76e74f70$export$3b08bebcf796eea0);
285
274
  let timeFieldState = (0, $a9Sgq$useContext)($40825cdb76e74f70$export$5d8dc44abd10a920);
286
275
  let state = dateFieldState !== null && dateFieldState !== void 0 ? dateFieldState : timeFieldState;
@@ -318,11 +307,7 @@ function $40825cdb76e74f70$var$DateSegment({ segment: segment, ...otherProps },
318
307
  "data-focused": isFocused || undefined,
319
308
  "data-focus-visible": isFocusVisible || undefined
320
309
  });
321
- }
322
- /**
323
- * A date segment displays an individual unit of a date and time, and allows users to edit
324
- * the value by typing or using the arrow keys to increment and decrement.
325
- */ const $40825cdb76e74f70$export$336ab7fa954c4b5f = /*#__PURE__*/ (0, $a9Sgq$forwardRef)($40825cdb76e74f70$var$DateSegment);
310
+ });
326
311
 
327
312
 
328
313
  export {$40825cdb76e74f70$export$7b3e670c86da5fe8 as DateFieldContext, $40825cdb76e74f70$export$8e17ddc448e87c1e as TimeFieldContext, $40825cdb76e74f70$export$3b08bebcf796eea0 as DateFieldStateContext, $40825cdb76e74f70$export$5d8dc44abd10a920 as TimeFieldStateContext, $40825cdb76e74f70$export$d9781c7894a82487 as DateField, $40825cdb76e74f70$export$5eaee2322dd727eb as TimeField, $40825cdb76e74f70$export$7edc06cf1783b30f as DateInput, $40825cdb76e74f70$export$336ab7fa954c4b5f as DateSegment};
@@ -9,7 +9,7 @@ import {useLocale as $a9Sgq$useLocale, useDateField as $a9Sgq$useDateField, useT
9
9
  import {createCalendar as $a9Sgq$createCalendar} from "@internationalized/date";
10
10
  import {useDateFieldState as $a9Sgq$useDateFieldState, useTimeFieldState as $a9Sgq$useTimeFieldState} from "react-stately";
11
11
  import {filterDOMProps as $a9Sgq$filterDOMProps, useObjectRef as $a9Sgq$useObjectRef} from "@react-aria/utils";
12
- import $a9Sgq$react, {createContext as $a9Sgq$createContext, useRef as $a9Sgq$useRef, forwardRef as $a9Sgq$forwardRef, useContext as $a9Sgq$useContext, cloneElement as $a9Sgq$cloneElement} from "react";
12
+ import $a9Sgq$react, {createContext as $a9Sgq$createContext, forwardRef as $a9Sgq$forwardRef, useRef as $a9Sgq$useRef, useContext as $a9Sgq$useContext, cloneElement as $a9Sgq$cloneElement} from "react";
13
13
 
14
14
  /*
15
15
  * Copyright 2022 Adobe. All rights reserved.
@@ -37,7 +37,7 @@ const $40825cdb76e74f70$export$7b3e670c86da5fe8 = /*#__PURE__*/ (0, $a9Sgq$creat
37
37
  const $40825cdb76e74f70$export$8e17ddc448e87c1e = /*#__PURE__*/ (0, $a9Sgq$createContext)(null);
38
38
  const $40825cdb76e74f70$export$3b08bebcf796eea0 = /*#__PURE__*/ (0, $a9Sgq$createContext)(null);
39
39
  const $40825cdb76e74f70$export$5d8dc44abd10a920 = /*#__PURE__*/ (0, $a9Sgq$createContext)(null);
40
- function $40825cdb76e74f70$var$DateField(props, ref) {
40
+ const $40825cdb76e74f70$export$d9781c7894a82487 = /*#__PURE__*/ (0, $a9Sgq$forwardRef)(function DateField(props, ref) {
41
41
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $40825cdb76e74f70$export$7b3e670c86da5fe8);
42
42
  let { validationBehavior: formValidationBehavior } = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)((0, $d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
43
43
  var _props_validationBehavior, _ref;
@@ -119,12 +119,8 @@ function $40825cdb76e74f70$var$DateField(props, ref) {
119
119
  slot: props.slot || undefined,
120
120
  "data-invalid": state.isInvalid || undefined
121
121
  }));
122
- }
123
- /**
124
- * A date field allows users to enter and edit date and time values using a keyboard.
125
- * Each part of a date value is displayed in an individually editable segment.
126
- */ const $40825cdb76e74f70$export$d9781c7894a82487 = /*#__PURE__*/ (0, $a9Sgq$forwardRef)($40825cdb76e74f70$var$DateField);
127
- function $40825cdb76e74f70$var$TimeField(props, ref) {
122
+ });
123
+ const $40825cdb76e74f70$export$5eaee2322dd727eb = /*#__PURE__*/ (0, $a9Sgq$forwardRef)(function TimeField(props, ref) {
128
124
  [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $40825cdb76e74f70$export$8e17ddc448e87c1e);
129
125
  let { validationBehavior: formValidationBehavior } = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)((0, $d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
130
126
  var _props_validationBehavior, _ref;
@@ -205,12 +201,8 @@ function $40825cdb76e74f70$var$TimeField(props, ref) {
205
201
  slot: props.slot || undefined,
206
202
  "data-invalid": state.isInvalid || undefined
207
203
  }));
208
- }
209
- /**
210
- * A time field allows users to enter and edit time values using a keyboard.
211
- * Each part of a time value is displayed in an individually editable segment.
212
- */ const $40825cdb76e74f70$export$5eaee2322dd727eb = /*#__PURE__*/ (0, $a9Sgq$forwardRef)($40825cdb76e74f70$var$TimeField);
213
- function $40825cdb76e74f70$var$DateInput(props, ref) {
204
+ });
205
+ const $40825cdb76e74f70$export$7edc06cf1783b30f = /*#__PURE__*/ (0, $a9Sgq$forwardRef)(function DateInput(props, ref) {
214
206
  // If state is provided by DateField/TimeField, just render.
215
207
  // Otherwise (e.g. in DatePicker), we need to call hooks and create state ourselves.
216
208
  let dateFieldState = (0, $a9Sgq$useContext)($40825cdb76e74f70$export$3b08bebcf796eea0);
@@ -222,7 +214,7 @@ function $40825cdb76e74f70$var$DateInput(props, ref) {
222
214
  ...props,
223
215
  ref: ref
224
216
  });
225
- }
217
+ });
226
218
  const $40825cdb76e74f70$var$DateInputStandalone = /*#__PURE__*/ (0, $a9Sgq$forwardRef)((props, ref)=>{
227
219
  let [dateFieldProps, fieldRef] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)({
228
220
  slot: props.slot
@@ -277,10 +269,7 @@ const $40825cdb76e74f70$var$DateInputInner = /*#__PURE__*/ (0, $a9Sgq$forwardRef
277
269
  key: i
278
270
  }))), /*#__PURE__*/ (0, $a9Sgq$react).createElement((0, $3985021b0ad6602f$export$f5b8910cec6cf069), null));
279
271
  });
280
- /**
281
- * A date input groups the editable date segments within a date field.
282
- */ const $40825cdb76e74f70$export$7edc06cf1783b30f = /*#__PURE__*/ (0, $a9Sgq$forwardRef)($40825cdb76e74f70$var$DateInput);
283
- function $40825cdb76e74f70$var$DateSegment({ segment: segment, ...otherProps }, ref) {
272
+ const $40825cdb76e74f70$export$336ab7fa954c4b5f = /*#__PURE__*/ (0, $a9Sgq$forwardRef)(function DateSegment({ segment: segment, ...otherProps }, ref) {
284
273
  let dateFieldState = (0, $a9Sgq$useContext)($40825cdb76e74f70$export$3b08bebcf796eea0);
285
274
  let timeFieldState = (0, $a9Sgq$useContext)($40825cdb76e74f70$export$5d8dc44abd10a920);
286
275
  let state = dateFieldState !== null && dateFieldState !== void 0 ? dateFieldState : timeFieldState;
@@ -318,11 +307,7 @@ function $40825cdb76e74f70$var$DateSegment({ segment: segment, ...otherProps },
318
307
  "data-focused": isFocused || undefined,
319
308
  "data-focus-visible": isFocusVisible || undefined
320
309
  });
321
- }
322
- /**
323
- * A date segment displays an individual unit of a date and time, and allows users to edit
324
- * the value by typing or using the arrow keys to increment and decrement.
325
- */ const $40825cdb76e74f70$export$336ab7fa954c4b5f = /*#__PURE__*/ (0, $a9Sgq$forwardRef)($40825cdb76e74f70$var$DateSegment);
310
+ });
326
311
 
327
312
 
328
313
  export {$40825cdb76e74f70$export$7b3e670c86da5fe8 as DateFieldContext, $40825cdb76e74f70$export$8e17ddc448e87c1e as TimeFieldContext, $40825cdb76e74f70$export$3b08bebcf796eea0 as DateFieldStateContext, $40825cdb76e74f70$export$5d8dc44abd10a920 as TimeFieldStateContext, $40825cdb76e74f70$export$d9781c7894a82487 as DateField, $40825cdb76e74f70$export$5eaee2322dd727eb as TimeField, $40825cdb76e74f70$export$7edc06cf1783b30f as DateInput, $40825cdb76e74f70$export$336ab7fa954c4b5f as DateSegment};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;AAkCM,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAAqD;AAC1F,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAAqD;AAC1F,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAAyB;AACnE,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAAyB;AAE1E,SAAS,gCAA+B,KAAwB,EAAE,GAAiC;IACjG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,yCAAgB,EAAE,CAAA,GAAA,yCAAU,MAAM,CAAC;QAC7D,2BAAA;IAAzB,IAAI,qBAAqB,CAAA,OAAA,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B,oCAA5B,kBAAA,OAAsD;IAC/E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,wBAAgB,EAAE;QAC5B,GAAG,KAAK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AAA,GAAA,iBAAS,EAAE;IAChC,IAAI,iBAAiB,CAAA,GAAA,iBAAS,EAAE;IAChC,IAAI,QAAQ,2BAAA,4BAAA,iBAAkB;IAC9B,IAAI,SAAS,CAAA,GAAA,mBAAW,EAAE;IAC1B,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE,SAAS,OAAO;IACpD,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;QAAC,GAAG,UAAU;QAAE,YAAY,MAAM,UAAU,IAAI,QAAQ,IAAI,KAAK;IAAS;IACjH,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,UAAU;QACb,QAAQ;YACN,GAAG,OAAO;YACV,YAAY,CAAC,QAAQ,UAAU;YAC/B,WAAW,MAAM,SAAS;YAC1B,YAAY,MAAM,UAAU;uBAC5B;uBACA;4BACA;QACF;QACA,iBAAiB,QAAQ,IAAI;QAC7B,kBAAkB;IACpB;IAGA,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,qBAAa,EAAE,aAAoB,cAAc,YAAY,WAAW;QACtF,GAAG,WAAW;QACf,KAAK;QACL,oBAAkB,QAAQ,aAAa,IAAI;QAC3C,gBAAc,MAAM,SAAS,IAAI;QACjC,iBAAe,CAAC,QAAQ,UAAU,IAAI;QACtC,iBAAe,MAAM,UAAU,IAAI;QACnC,aAAW,QAAQ,IAAI;QACvB,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;;AAE5C;AAEA;;;CAGC,GACD,MAAM,4CAA6B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB","sources":["packages/react-aria-components/src/DateField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {AriaDateFieldProps, AriaTimeFieldProps, DateValue, HoverEvents, mergeProps, TimeValue, useDateField, useDateSegment, useFocusRing, useHover, useLocale, useTimeField} from 'react-aria';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DateFieldState, DateSegmentType, DateSegment as IDateSegment, TimeFieldState, useDateFieldState, useTimeFieldState} from 'react-stately';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, useObjectRef} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType} from '@react-types/shared';\nimport {Group, GroupContext} from './Group';\nimport {Input, InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {cloneElement, createContext, ForwardedRef, forwardRef, JSX, ReactElement, useContext, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface DateFieldRenderProps {\n /**\n * State of the date field.\n */\n state: DateFieldState,\n /**\n * Whether the date field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the date field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\nexport interface DateFieldProps<T extends DateValue> extends Omit<AriaDateFieldProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<DateFieldRenderProps>, SlotProps {}\nexport interface TimeFieldProps<T extends TimeValue> extends Omit<AriaTimeFieldProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<DateFieldRenderProps>, SlotProps {}\n\nexport const DateFieldContext = createContext<ContextValue<DateFieldProps<any>, HTMLDivElement>>(null);\nexport const TimeFieldContext = createContext<ContextValue<TimeFieldProps<any>, HTMLDivElement>>(null);\nexport const DateFieldStateContext = createContext<DateFieldState | null>(null);\nexport const TimeFieldStateContext = createContext<TimeFieldState | null>(null);\n\nfunction DateField<T extends DateValue>(props: DateFieldProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, DateFieldContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...props,\n locale,\n createCalendar,\n validationBehavior\n });\n\n let fieldRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let inputRef = useRef<HTMLInputElement>(null);\n let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useDateField({\n ...removeDataAttributes(props),\n label,\n inputRef,\n validationBehavior\n }, state, fieldRef);\n\n let renderProps = useRenderProps({\n ...removeDataAttributes(props),\n values: {\n state,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled\n },\n defaultClassName: 'react-aria-DateField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [DateFieldStateContext, state],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-invalid={state.isInvalid || undefined} />\n </Provider>\n );\n}\n\n/**\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nconst _DateField = /*#__PURE__*/ (forwardRef as forwardRefType)(DateField);\nexport {_DateField as DateField};\n\nfunction TimeField<T extends TimeValue>(props: TimeFieldProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, TimeFieldContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let {locale} = useLocale();\n let state = useTimeFieldState({\n ...props,\n locale,\n validationBehavior\n });\n\n let fieldRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let inputRef = useRef<HTMLInputElement>(null);\n let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useTimeField({\n ...removeDataAttributes(props),\n label,\n inputRef,\n validationBehavior\n }, state, fieldRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled\n },\n defaultClassName: 'react-aria-TimeField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [TimeFieldStateContext, state],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-invalid={state.isInvalid || undefined} />\n </Provider>\n );\n}\n\n/**\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nconst _TimeField = /*#__PURE__*/ (forwardRef as forwardRefType)(TimeField);\nexport {_TimeField as TimeField};\n\nexport interface DateInputRenderProps {\n /**\n * Whether the date input is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether an element within the date input is focused, either via a mouse or keyboard.\n * @selector [data-focus-within]\n */\n isFocusWithin: boolean,\n /**\n * Whether an element within the date input is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the date input is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n\n /**\n * Whether the date input is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean\n}\n\nexport interface DateInputProps extends SlotProps, StyleRenderProps<DateInputRenderProps> {\n children: (segment: IDateSegment) => ReactElement\n}\n\nfunction DateInput(props: DateInputProps, ref: ForwardedRef<HTMLDivElement>): JSX.Element {\n // If state is provided by DateField/TimeField, just render.\n // Otherwise (e.g. in DatePicker), we need to call hooks and create state ourselves.\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n return dateFieldState || timeFieldState\n ? <DateInputInner {...props} ref={ref} />\n : <DateInputStandalone {...props} ref={ref} />;\n}\n\nconst DateInputStandalone = forwardRef((props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n let [dateFieldProps, fieldRef] = useContextProps({slot: props.slot} as DateFieldProps<any>, ref, DateFieldContext);\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...dateFieldProps,\n locale,\n createCalendar\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let {fieldProps, inputProps} = useDateField({...dateFieldProps, inputRef}, state, fieldRef);\n\n return (\n <Provider\n values={[\n [DateFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}]\n ]}>\n <DateInputInner {...props} />\n </Provider>\n );\n});\n\nconst DateInputInner = forwardRef((props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n let {className, children} = props;\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n let state = dateFieldState ?? timeFieldState!;\n\n return (\n <>\n <Group\n {...props}\n ref={ref}\n slot={props.slot || undefined}\n className={className ?? 'react-aria-DateInput'}\n isInvalid={state.isInvalid}>\n {state.segments.map((segment, i) => cloneElement(children(segment), {key: i}))}\n </Group>\n <Input />\n </>\n );\n});\n\n/**\n * A date input groups the editable date segments within a date field.\n */\nconst _DateInput = /*#__PURE__*/ (forwardRef as forwardRefType)(DateInput);\nexport {_DateInput as DateInput};\n\nexport interface DateSegmentRenderProps extends Omit<IDateSegment, 'isEditable'> {\n /**\n * Whether the segment is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the segment is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the segment is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the value is a placeholder.\n * @selector [data-placeholder]\n */\n isPlaceholder: boolean,\n /**\n * Whether the segment is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the date field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the date field is in an invalid state.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The type of segment. Values include `literal`, `year`, `month`, `day`, etc.\n * @selector [data-type=\"...\"]\n */\n type: DateSegmentType\n}\n\nexport interface DateSegmentProps extends RenderProps<DateSegmentRenderProps>, HoverEvents {\n segment: IDateSegment\n}\n\nfunction DateSegment({segment, ...otherProps}: DateSegmentProps, ref: ForwardedRef<HTMLDivElement>) {\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n let state = dateFieldState ?? timeFieldState!;\n let domRef = useObjectRef(ref);\n let {segmentProps} = useDateSegment(segment, state, domRef);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({...otherProps, isDisabled: state.isDisabled || segment.type === 'literal'});\n let renderProps = useRenderProps({\n ...otherProps,\n values: {\n ...segment,\n isReadOnly: !segment.isEditable,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled,\n isHovered,\n isFocused,\n isFocusVisible\n },\n defaultChildren: segment.text,\n defaultClassName: 'react-aria-DateSegment'\n });\n\n\n return (\n <div\n {...mergeProps(filterDOMProps(otherProps as any), segmentProps, focusProps, hoverProps)}\n {...renderProps}\n ref={domRef}\n data-placeholder={segment.isPlaceholder || undefined}\n data-invalid={state.isInvalid || undefined}\n data-readonly={!segment.isEditable || undefined}\n data-disabled={state.isDisabled || undefined}\n data-type={segment.type}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined} />\n );\n}\n\n/**\n * A date segment displays an individual unit of a date and time, and allows users to edit\n * the value by typing or using the arrow keys to increment and decrement.\n */\nconst _DateSegment = /*#__PURE__*/ (forwardRef as forwardRefType)(DateSegment);\nexport {_DateSegment as DateSegment};\n"],"names":[],"version":3,"file":"DateField.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;AAkCM,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAAqD;AAC1F,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAAqD;AAC1F,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAAyB;AACnE,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAAyB;AAMnE,MAAM,4CAA0B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,UAA+B,KAAwB,EAAE,GAAiC;IACvK,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,yCAAgB,EAAE,CAAA,GAAA,yCAAU,MAAM,CAAC;QAC7D,2BAAA;IAAzB,IAAI,qBAAqB,CAAA,OAAA,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B,oCAA5B,kBAAA,OAAsD;IAC/E,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA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K,IAAI,iBAAiB,CAAA,GAAA,iBAAS,EAAE;IAChC,IAAI,iBAAiB,CAAA,GAAA,iBAAS,EAAE;IAChC,IAAI,QAAQ,2BAAA,4BAAA,iBAAkB;IAC9B,IAAI,SAAS,CAAA,GAAA,mBAAW,EAAE;IAC1B,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE,SAAS,OAAO;IACpD,IAAI,cAAC,UAAU,aAAE,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW;IACzD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;QAAC,GAAG,UAAU;QAAE,YAAY,MAAM,UAAU,IAAI,QAAQ,IAAI,KAAK;IAAS;IACjH,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,UAAU;QACb,QAAQ;YACN,GAAG,OAAO;YACV,YAAY,CAAC,QAAQ,UAAU;YAC/B,WAAW,MAAM,SAAS;YAC1B,YAAY,MAAM,UAAU;uBAC5B;uBACA;4BACA;QACF;QACA,iBAAiB,QAAQ,IAAI;QAC7B,kBAAkB;IACpB;IAGA,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,qBAAa,EAAE,aAAoB,cAAc,YAAY,WAAW;QACtF,GAAG,WAAW;QACf,KAAK;QACL,oBAAkB,QAAQ,aAAa,IAAI;QAC3C,gBAAc,MAAM,SAAS,IAAI;QACjC,iBAAe,CAAC,QAAQ,UAAU,IAAI;QACtC,iBAAe,MAAM,UAAU,IAAI;QACnC,aAAW,QAAQ,IAAI;QACvB,gBAAc,aAAa;QAC3B,gBAAc,aAAa;QAC3B,sBAAoB,kBAAkB;;AAE5C","sources":["packages/react-aria-components/src/DateField.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {AriaDateFieldProps, AriaTimeFieldProps, DateValue, HoverEvents, mergeProps, TimeValue, useDateField, useDateSegment, useFocusRing, useHover, useLocale, useTimeField} from 'react-aria';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DateFieldState, DateSegmentType, DateSegment as IDateSegment, TimeFieldState, useDateFieldState, useTimeFieldState} from 'react-stately';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, useObjectRef} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType} from '@react-types/shared';\nimport {Group, GroupContext} from './Group';\nimport {Input, InputContext} from './Input';\nimport {LabelContext} from './Label';\nimport React, {cloneElement, createContext, ForwardedRef, forwardRef, JSX, ReactElement, useContext, useRef} from 'react';\nimport {TextContext} from './Text';\n\nexport interface DateFieldRenderProps {\n /**\n * State of the date field.\n */\n state: DateFieldState,\n /**\n * Whether the date field is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the date field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean\n}\nexport interface DateFieldProps<T extends DateValue> extends Omit<AriaDateFieldProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<DateFieldRenderProps>, SlotProps {}\nexport interface TimeFieldProps<T extends TimeValue> extends Omit<AriaTimeFieldProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<DateFieldRenderProps>, SlotProps {}\n\nexport const DateFieldContext = createContext<ContextValue<DateFieldProps<any>, HTMLDivElement>>(null);\nexport const TimeFieldContext = createContext<ContextValue<TimeFieldProps<any>, HTMLDivElement>>(null);\nexport const DateFieldStateContext = createContext<DateFieldState | null>(null);\nexport const TimeFieldStateContext = createContext<TimeFieldState | null>(null);\n\n/**\n * A date field allows users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport const DateField = /*#__PURE__*/ (forwardRef as forwardRefType)(function DateField<T extends DateValue>(props: DateFieldProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, DateFieldContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...props,\n locale,\n createCalendar,\n validationBehavior\n });\n\n let fieldRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let inputRef = useRef<HTMLInputElement>(null);\n let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useDateField({\n ...removeDataAttributes(props),\n label,\n inputRef,\n validationBehavior\n }, state, fieldRef);\n\n let renderProps = useRenderProps({\n ...removeDataAttributes(props),\n values: {\n state,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled\n },\n defaultClassName: 'react-aria-DateField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [DateFieldStateContext, state],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-invalid={state.isInvalid || undefined} />\n </Provider>\n );\n});\n\n/**\n * A time field allows users to enter and edit time values using a keyboard.\n * Each part of a time value is displayed in an individually editable segment.\n */\nexport const TimeField = /*#__PURE__*/ (forwardRef as forwardRefType)(function TimeField<T extends TimeValue>(props: TimeFieldProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, TimeFieldContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let {locale} = useLocale();\n let state = useTimeFieldState({\n ...props,\n locale,\n validationBehavior\n });\n\n let fieldRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let inputRef = useRef<HTMLInputElement>(null);\n let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useTimeField({\n ...removeDataAttributes(props),\n label,\n inputRef,\n validationBehavior\n }, state, fieldRef);\n\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled\n },\n defaultClassName: 'react-aria-TimeField'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [TimeFieldStateContext, state],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}],\n [InputContext, {...inputProps, ref: inputRef}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-invalid={state.isInvalid || undefined} />\n </Provider>\n );\n});\n\nexport interface DateInputRenderProps {\n /**\n * Whether the date input is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether an element within the date input is focused, either via a mouse or keyboard.\n * @selector [data-focus-within]\n */\n isFocusWithin: boolean,\n /**\n * Whether an element within the date input is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the date input is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n\n /**\n * Whether the date input is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean\n}\n\nexport interface DateInputProps extends SlotProps, StyleRenderProps<DateInputRenderProps> {\n children: (segment: IDateSegment) => ReactElement\n}\n\n/**\n * A date input groups the editable date segments within a date field.\n */\nexport const DateInput = /*#__PURE__*/ (forwardRef as forwardRefType)(function DateInput(props: DateInputProps, ref: ForwardedRef<HTMLDivElement>): JSX.Element {\n // If state is provided by DateField/TimeField, just render.\n // Otherwise (e.g. in DatePicker), we need to call hooks and create state ourselves.\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n return dateFieldState || timeFieldState\n ? <DateInputInner {...props} ref={ref} />\n : <DateInputStandalone {...props} ref={ref} />;\n});\n\nconst DateInputStandalone = forwardRef((props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n let [dateFieldProps, fieldRef] = useContextProps({slot: props.slot} as DateFieldProps<any>, ref, DateFieldContext);\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...dateFieldProps,\n locale,\n createCalendar\n });\n\n let inputRef = useRef<HTMLInputElement>(null);\n let {fieldProps, inputProps} = useDateField({...dateFieldProps, inputRef}, state, fieldRef);\n\n return (\n <Provider\n values={[\n [DateFieldStateContext, state],\n [InputContext, {...inputProps, ref: inputRef}],\n [GroupContext, {...fieldProps, ref: fieldRef, isInvalid: state.isInvalid}]\n ]}>\n <DateInputInner {...props} />\n </Provider>\n );\n});\n\nconst DateInputInner = forwardRef((props: DateInputProps, ref: ForwardedRef<HTMLDivElement>) => {\n let {className, children} = props;\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n let state = dateFieldState ?? timeFieldState!;\n\n return (\n <>\n <Group\n {...props}\n ref={ref}\n slot={props.slot || undefined}\n className={className ?? 'react-aria-DateInput'}\n isInvalid={state.isInvalid}>\n {state.segments.map((segment, i) => cloneElement(children(segment), {key: i}))}\n </Group>\n <Input />\n </>\n );\n});\n\nexport interface DateSegmentRenderProps extends Omit<IDateSegment, 'isEditable'> {\n /**\n * Whether the segment is currently hovered with a mouse.\n * @selector [data-hovered]\n */\n isHovered: boolean,\n /**\n * Whether the segment is focused, either via a mouse or keyboard.\n * @selector [data-focused]\n */\n isFocused: boolean,\n /**\n * Whether the segment is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the value is a placeholder.\n * @selector [data-placeholder]\n */\n isPlaceholder: boolean,\n /**\n * Whether the segment is read only.\n * @selector [data-readonly]\n */\n isReadOnly: boolean,\n /**\n * Whether the date field is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the date field is in an invalid state.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * The type of segment. Values include `literal`, `year`, `month`, `day`, etc.\n * @selector [data-type=\"...\"]\n */\n type: DateSegmentType\n}\n\nexport interface DateSegmentProps extends RenderProps<DateSegmentRenderProps>, HoverEvents {\n segment: IDateSegment\n}\n\n/**\n * A date segment displays an individual unit of a date and time, and allows users to edit\n * the value by typing or using the arrow keys to increment and decrement.\n */\nexport const DateSegment = /*#__PURE__*/ (forwardRef as forwardRefType)(function DateSegment({segment, ...otherProps}: DateSegmentProps, ref: ForwardedRef<HTMLDivElement>) {\n let dateFieldState = useContext(DateFieldStateContext);\n let timeFieldState = useContext(TimeFieldStateContext);\n let state = dateFieldState ?? timeFieldState!;\n let domRef = useObjectRef(ref);\n let {segmentProps} = useDateSegment(segment, state, domRef);\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({...otherProps, isDisabled: state.isDisabled || segment.type === 'literal'});\n let renderProps = useRenderProps({\n ...otherProps,\n values: {\n ...segment,\n isReadOnly: !segment.isEditable,\n isInvalid: state.isInvalid,\n isDisabled: state.isDisabled,\n isHovered,\n isFocused,\n isFocusVisible\n },\n defaultChildren: segment.text,\n defaultClassName: 'react-aria-DateSegment'\n });\n\n\n return (\n <div\n {...mergeProps(filterDOMProps(otherProps as any), segmentProps, focusProps, hoverProps)}\n {...renderProps}\n ref={domRef}\n data-placeholder={segment.isPlaceholder || undefined}\n data-invalid={state.isInvalid || undefined}\n data-readonly={!segment.isEditable || undefined}\n data-disabled={state.isDisabled || undefined}\n data-type={segment.type}\n data-hovered={isHovered || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined} />\n );\n});\n"],"names":[],"version":3,"file":"DateField.module.js.map"}
@@ -58,7 +58,7 @@ const $adfe8d3f75d5162e$export$cf316c7f3b44c11e = /*#__PURE__*/ (0, $bhT4V$react
58
58
  const $adfe8d3f75d5162e$export$8282edba42ee28a = /*#__PURE__*/ (0, $bhT4V$react.createContext)(null);
59
59
  const $adfe8d3f75d5162e$export$50a10c048fdcdee9 = /*#__PURE__*/ (0, $bhT4V$react.createContext)(null);
60
60
  const $adfe8d3f75d5162e$export$80d7ae1f804790be = /*#__PURE__*/ (0, $bhT4V$react.createContext)(null);
61
- function $adfe8d3f75d5162e$var$DatePicker(props, ref) {
61
+ const $adfe8d3f75d5162e$export$5109c6dd95d8fb00 = /*#__PURE__*/ (0, $bhT4V$react.forwardRef)(function DatePicker(props, ref) {
62
62
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $adfe8d3f75d5162e$export$cf316c7f3b44c11e);
63
63
  let { validationBehavior: formValidationBehavior } = (0, $c5ccf687772c0422$exports.useSlottedContext)((0, $35157657e549736b$exports.FormContext)) || {};
64
64
  var _props_validationBehavior, _ref;
@@ -182,11 +182,8 @@ function $adfe8d3f75d5162e$var$DatePicker(props, ref) {
182
182
  "data-disabled": props.isDisabled || undefined,
183
183
  "data-open": state.isOpen || undefined
184
184
  }));
185
- }
186
- /**
187
- * A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.
188
- */ const $adfe8d3f75d5162e$export$5109c6dd95d8fb00 = /*#__PURE__*/ (0, $bhT4V$react.forwardRef)($adfe8d3f75d5162e$var$DatePicker);
189
- function $adfe8d3f75d5162e$var$DateRangePicker(props, ref) {
185
+ });
186
+ const $adfe8d3f75d5162e$export$17334619f3ac2224 = /*#__PURE__*/ (0, $bhT4V$react.forwardRef)(function DateRangePicker(props, ref) {
190
187
  [props, ref] = (0, $c5ccf687772c0422$exports.useContextProps)(props, ref, $adfe8d3f75d5162e$export$8282edba42ee28a);
191
188
  let { validationBehavior: formValidationBehavior } = (0, $c5ccf687772c0422$exports.useSlottedContext)((0, $35157657e549736b$exports.FormContext)) || {};
192
189
  var _props_validationBehavior, _ref;
@@ -315,11 +312,7 @@ function $adfe8d3f75d5162e$var$DateRangePicker(props, ref) {
315
312
  "data-disabled": props.isDisabled || undefined,
316
313
  "data-open": state.isOpen || undefined
317
314
  }));
318
- }
319
- /**
320
- * A date range picker combines two DateFields and a RangeCalendar popover to allow
321
- * users to enter or select a date and time range.
322
- */ const $adfe8d3f75d5162e$export$17334619f3ac2224 = /*#__PURE__*/ (0, $bhT4V$react.forwardRef)($adfe8d3f75d5162e$var$DateRangePicker);
315
+ });
323
316
 
324
317
 
325
318
  //# sourceMappingURL=DatePicker.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AA2DM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAAsD;AAC5F,MAAM,yDAAyB,CAAA,GAAA,0BAAY,EAA2D;AACtG,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA0B;AACrE,MAAM,0DAA8B,CAAA,GAAA,0BAAY,EAA+B;AAEtF,SAAS,iCAAgC,KAAyB,EAAE,GAAiC;IACnG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE,CAAA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EA;;;CAGC,GACD,MAAM,4CAAiC,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB","sources":["packages/react-aria-components/src/DatePicker.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {AriaDatePickerProps, AriaDateRangePickerProps, DateValue, useDatePicker, useDateRangePicker, useFocusRing} from 'react-aria';\nimport {ButtonContext} from './Button';\nimport {CalendarContext, RangeCalendarContext} from './Calendar';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {DateFieldContext} from './DateField';\nimport {DatePickerState, DatePickerStateOptions, DateRangePickerState, DateRangePickerStateOptions, useDatePickerState, useDateRangePickerState} from 'react-stately';\nimport {DialogContext, OverlayTriggerStateContext} from './Dialog';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, useResizeObserver} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {LabelContext} from './Label';\nimport {PopoverContext} from './Popover';\nimport React, {createContext, ForwardedRef, forwardRef, useCallback, useRef, useState} from 'react';\nimport {TextContext} from './Text';\n\nexport interface DatePickerRenderProps {\n /**\n * Whether an element within the date picker is focused, either via a mouse or keyboard.\n * @selector [data-focus-within]\n */\n isFocusWithin: boolean,\n /**\n * Whether an element within the date picker is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the date picker is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the date picker is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the date picker's popover is currently open.\n * @selector [data-open]\n */\n isOpen: boolean,\n /**\n * State of the date picker.\n */\n state: DatePickerState\n}\nexport interface DateRangePickerRenderProps extends Omit<DatePickerRenderProps, 'state'> {\n /**\n * State of the date range picker.\n */\n state: DateRangePickerState\n}\n\nexport interface DatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, Pick<DatePickerStateOptions<T>, 'shouldCloseOnSelect'>, RACValidation, RenderProps<DatePickerRenderProps>, SlotProps {}\nexport interface DateRangePickerProps<T extends DateValue> extends Omit<AriaDateRangePickerProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, Pick<DateRangePickerStateOptions<T>, 'shouldCloseOnSelect'>, RACValidation, RenderProps<DateRangePickerRenderProps>, SlotProps {}\n\nexport const DatePickerContext = createContext<ContextValue<DatePickerProps<any>, HTMLDivElement>>(null);\nexport const DateRangePickerContext = createContext<ContextValue<DateRangePickerProps<any>, HTMLDivElement>>(null);\nexport const DatePickerStateContext = createContext<DatePickerState | null>(null);\nexport const DateRangePickerStateContext = createContext<DateRangePickerState | null>(null);\n\nfunction DatePicker<T extends DateValue>(props: DatePickerProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, DatePickerContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useDatePickerState({\n ...props,\n validationBehavior\n });\n\n let groupRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let {\n groupProps,\n labelProps,\n fieldProps,\n buttonProps,\n dialogProps,\n calendarProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useDatePicker({\n ...removeDataAttributes(props),\n label,\n validationBehavior\n }, state, groupRef);\n\n // Allows calendar width to match input group\n let [groupWidth, setGroupWidth] = useState<string | null>(null);\n let onResize = useCallback(() => {\n if (groupRef.current) {\n setGroupWidth(groupRef.current.offsetWidth + 'px');\n }\n }, []);\n\n useResizeObserver({\n ref: groupRef,\n onResize: onResize\n });\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing({within: true});\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isFocusWithin: isFocused,\n isFocusVisible,\n isDisabled: props.isDisabled || false,\n isInvalid: state.isInvalid,\n isOpen: state.isOpen\n },\n defaultClassName: 'react-aria-DatePicker'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [DatePickerStateContext, state],\n [GroupContext, {...groupProps, ref: groupRef, isInvalid: state.isInvalid}],\n [DateFieldContext, fieldProps],\n [ButtonContext, {...buttonProps, isPressed: state.isOpen}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [CalendarContext, calendarProps],\n [OverlayTriggerStateContext, state],\n [PopoverContext, {\n trigger: 'DatePicker',\n triggerRef: groupRef,\n placement: 'bottom start',\n style: {'--trigger-width': groupWidth} as React.CSSProperties\n }],\n [DialogContext, dialogProps],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...focusProps}\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-focus-within={isFocused || undefined}\n data-invalid={state.isInvalid || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={props.isDisabled || undefined}\n data-open={state.isOpen || undefined} />\n </Provider>\n );\n}\n\n/**\n * A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.\n */\nconst _DatePicker = /*#__PURE__*/ (forwardRef as forwardRefType)(DatePicker);\nexport {_DatePicker as DatePicker};\n\nfunction DateRangePicker<T extends DateValue>(props: DateRangePickerProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, DateRangePickerContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useDateRangePickerState({\n ...props,\n validationBehavior\n });\n\n let groupRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let {\n groupProps,\n labelProps,\n startFieldProps,\n endFieldProps,\n buttonProps,\n dialogProps,\n calendarProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useDateRangePicker({\n ...removeDataAttributes(props),\n label,\n validationBehavior\n }, state, groupRef);\n\n // Allows calendar width to match input group\n let [groupWidth, setGroupWidth] = useState<string | null>(null);\n let onResize = useCallback(() => {\n if (groupRef.current) {\n setGroupWidth(groupRef.current.offsetWidth + 'px');\n }\n }, []);\n\n useResizeObserver({\n ref: groupRef,\n onResize: onResize\n });\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing({within: true});\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isFocusWithin: isFocused,\n isFocusVisible,\n isDisabled: props.isDisabled || false,\n isInvalid: state.isInvalid,\n isOpen: state.isOpen\n },\n defaultClassName: 'react-aria-DateRangePicker'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [DateRangePickerStateContext, state],\n [GroupContext, {...groupProps, ref: groupRef, isInvalid: state.isInvalid}],\n [ButtonContext, {...buttonProps, isPressed: state.isOpen}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [RangeCalendarContext, calendarProps],\n [OverlayTriggerStateContext, state],\n [PopoverContext, {\n trigger: 'DateRangePicker',\n triggerRef: groupRef,\n placement: 'bottom start',\n style: {'--trigger-width': groupWidth} as React.CSSProperties\n }],\n [DialogContext, dialogProps],\n [DateFieldContext, {\n slots: {\n start: startFieldProps,\n end: endFieldProps\n }\n }],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...focusProps}\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-focus-within={isFocused || undefined}\n data-invalid={state.isInvalid || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={props.isDisabled || undefined}\n data-open={state.isOpen || undefined} />\n </Provider>\n );\n}\n\n/**\n * A date range picker combines two DateFields and a RangeCalendar popover to allow\n * users to enter or select a date and time range.\n */\nconst _DateRangePicker = /*#__PURE__*/ (forwardRef as forwardRefType)(DateRangePicker);\nexport {_DateRangePicker as DateRangePicker};\n"],"names":[],"version":3,"file":"DatePicker.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AA2DM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAAsD;AAC5F,MAAM,yDAAyB,CAAA,GAAA,0BAAY,EAA2D;AACtG,MAAM,0DAAyB,CAAA,GAAA,0BAAY,EAA0B;AACrE,MAAM,0DAA8B,CAAA,GAAA,0BAAY,EAA+B;AAK/E,MAAM,4CAA2B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,WAAgC,KAAyB,EAAE,GAAiC;IAC1K,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE,CAAA,GAAA,qCAAU,MAAM,CAAC;QAC7D,2BAAA;IAAzB,IAAI,qBAAqB,CAAA,OAAA,CAAA,4BAAA,MAAM,kBAAkB,cAAxB,uCAAA,4BAA4B,oCAA5B,kBAAA,OAAsD;IAC/E,IAAI,QAAQ,CAAA,GAAA,sCAAiB,EAAE;QAC7B,GAAG,KAAK;4BACR;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAkB;IACtC,IAAI,CAAC,UAAU,MAAM,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AC,GAAG,WAAW;oBAAE,WAAW,MAAM,MAAM;gBAAA;aAAE;YAC1D;gBAAC,CAAA,GAAA,sCAAW;gBAAG;oBAAC,GAAG,UAAU;oBAAE,KAAK;oBAAU,aAAa;gBAAM;aAAE;YACnE;gBAAC,CAAA,GAAA,8CAAmB;gBAAG;aAAc;YACrC;gBAAC,CAAA,GAAA,oDAAyB;gBAAG;aAAM;YACnC;gBAAC,CAAA,GAAA,wCAAa;gBAAG;oBACf,SAAS;oBACT,YAAY;oBACZ,WAAW;oBACX,OAAO;wBAAC,mBAAmB;oBAAU;gBACvC;aAAE;YACF;gBAAC,CAAA,GAAA,uCAAY;gBAAG;aAAY;YAC5B;gBAAC,CAAA,GAAA,0CAAe;gBAAG;oBACjB,OAAO;wBACL,OAAO;wBACP,KAAK;oBACP;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,qCAAU;gBAAG;oBACZ,OAAO;wBACL,aAAa;wBACb,cAAc;oBAChB;gBACF;aAAE;YACF;gBAAC,CAAA,GAAA,2CAAgB;gBAAG;aAAW;SAChC;qBACD,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,qBAAmB,aAAa;QAChC,gBAAc,MAAM,SAAS,IAAI;QACjC,sBAAoB,kBAAkB;QACtC,iBAAe,MAAM,UAAU,IAAI;QACnC,aAAW,MAAM,MAAM,IAAI;;AAGnC","sources":["packages/react-aria-components/src/DatePicker.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {AriaDatePickerProps, AriaDateRangePickerProps, DateValue, useDatePicker, useDateRangePicker, useFocusRing} from 'react-aria';\nimport {ButtonContext} from './Button';\nimport {CalendarContext, RangeCalendarContext} from './Calendar';\nimport {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils';\nimport {DateFieldContext} from './DateField';\nimport {DatePickerState, DatePickerStateOptions, DateRangePickerState, DateRangePickerStateOptions, useDatePickerState, useDateRangePickerState} from 'react-stately';\nimport {DialogContext, OverlayTriggerStateContext} from './Dialog';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps, useResizeObserver} from '@react-aria/utils';\nimport {FormContext} from './Form';\nimport {forwardRefType} from '@react-types/shared';\nimport {GroupContext} from './Group';\nimport {LabelContext} from './Label';\nimport {PopoverContext} from './Popover';\nimport React, {createContext, ForwardedRef, forwardRef, useCallback, useRef, useState} from 'react';\nimport {TextContext} from './Text';\n\nexport interface DatePickerRenderProps {\n /**\n * Whether an element within the date picker is focused, either via a mouse or keyboard.\n * @selector [data-focus-within]\n */\n isFocusWithin: boolean,\n /**\n * Whether an element within the date picker is keyboard focused.\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean,\n /**\n * Whether the date picker is disabled.\n * @selector [data-disabled]\n */\n isDisabled: boolean,\n /**\n * Whether the date picker is invalid.\n * @selector [data-invalid]\n */\n isInvalid: boolean,\n /**\n * Whether the date picker's popover is currently open.\n * @selector [data-open]\n */\n isOpen: boolean,\n /**\n * State of the date picker.\n */\n state: DatePickerState\n}\nexport interface DateRangePickerRenderProps extends Omit<DatePickerRenderProps, 'state'> {\n /**\n * State of the date range picker.\n */\n state: DateRangePickerState\n}\n\nexport interface DatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, Pick<DatePickerStateOptions<T>, 'shouldCloseOnSelect'>, RACValidation, RenderProps<DatePickerRenderProps>, SlotProps {}\nexport interface DateRangePickerProps<T extends DateValue> extends Omit<AriaDateRangePickerProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, Pick<DateRangePickerStateOptions<T>, 'shouldCloseOnSelect'>, RACValidation, RenderProps<DateRangePickerRenderProps>, SlotProps {}\n\nexport const DatePickerContext = createContext<ContextValue<DatePickerProps<any>, HTMLDivElement>>(null);\nexport const DateRangePickerContext = createContext<ContextValue<DateRangePickerProps<any>, HTMLDivElement>>(null);\nexport const DatePickerStateContext = createContext<DatePickerState | null>(null);\nexport const DateRangePickerStateContext = createContext<DateRangePickerState | null>(null);\n\n/**\n * A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.\n */\nexport const DatePicker = /*#__PURE__*/ (forwardRef as forwardRefType)(function DatePicker<T extends DateValue>(props: DatePickerProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, DatePickerContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useDatePickerState({\n ...props,\n validationBehavior\n });\n\n let groupRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let {\n groupProps,\n labelProps,\n fieldProps,\n buttonProps,\n dialogProps,\n calendarProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useDatePicker({\n ...removeDataAttributes(props),\n label,\n validationBehavior\n }, state, groupRef);\n\n // Allows calendar width to match input group\n let [groupWidth, setGroupWidth] = useState<string | null>(null);\n let onResize = useCallback(() => {\n if (groupRef.current) {\n setGroupWidth(groupRef.current.offsetWidth + 'px');\n }\n }, []);\n\n useResizeObserver({\n ref: groupRef,\n onResize: onResize\n });\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing({within: true});\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isFocusWithin: isFocused,\n isFocusVisible,\n isDisabled: props.isDisabled || false,\n isInvalid: state.isInvalid,\n isOpen: state.isOpen\n },\n defaultClassName: 'react-aria-DatePicker'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [DatePickerStateContext, state],\n [GroupContext, {...groupProps, ref: groupRef, isInvalid: state.isInvalid}],\n [DateFieldContext, fieldProps],\n [ButtonContext, {...buttonProps, isPressed: state.isOpen}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [CalendarContext, calendarProps],\n [OverlayTriggerStateContext, state],\n [PopoverContext, {\n trigger: 'DatePicker',\n triggerRef: groupRef,\n placement: 'bottom start',\n style: {'--trigger-width': groupWidth} as React.CSSProperties\n }],\n [DialogContext, dialogProps],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...focusProps}\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-focus-within={isFocused || undefined}\n data-invalid={state.isInvalid || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={props.isDisabled || undefined}\n data-open={state.isOpen || undefined} />\n </Provider>\n );\n});\n\n/**\n * A date range picker combines two DateFields and a RangeCalendar popover to allow\n * users to enter or select a date and time range.\n */\nexport const DateRangePicker = /*#__PURE__*/ (forwardRef as forwardRefType)(function DateRangePicker<T extends DateValue>(props: DateRangePickerProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, DateRangePickerContext);\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useDateRangePickerState({\n ...props,\n validationBehavior\n });\n\n let groupRef = useRef<HTMLDivElement>(null);\n let [labelRef, label] = useSlot();\n let {\n groupProps,\n labelProps,\n startFieldProps,\n endFieldProps,\n buttonProps,\n dialogProps,\n calendarProps,\n descriptionProps,\n errorMessageProps,\n ...validation\n } = useDateRangePicker({\n ...removeDataAttributes(props),\n label,\n validationBehavior\n }, state, groupRef);\n\n // Allows calendar width to match input group\n let [groupWidth, setGroupWidth] = useState<string | null>(null);\n let onResize = useCallback(() => {\n if (groupRef.current) {\n setGroupWidth(groupRef.current.offsetWidth + 'px');\n }\n }, []);\n\n useResizeObserver({\n ref: groupRef,\n onResize: onResize\n });\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing({within: true});\n let renderProps = useRenderProps({\n ...props,\n values: {\n state,\n isFocusWithin: isFocused,\n isFocusVisible,\n isDisabled: props.isDisabled || false,\n isInvalid: state.isInvalid,\n isOpen: state.isOpen\n },\n defaultClassName: 'react-aria-DateRangePicker'\n });\n\n let DOMProps = filterDOMProps(props);\n delete DOMProps.id;\n\n return (\n <Provider\n values={[\n [DateRangePickerStateContext, state],\n [GroupContext, {...groupProps, ref: groupRef, isInvalid: state.isInvalid}],\n [ButtonContext, {...buttonProps, isPressed: state.isOpen}],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [RangeCalendarContext, calendarProps],\n [OverlayTriggerStateContext, state],\n [PopoverContext, {\n trigger: 'DateRangePicker',\n triggerRef: groupRef,\n placement: 'bottom start',\n style: {'--trigger-width': groupWidth} as React.CSSProperties\n }],\n [DialogContext, dialogProps],\n [DateFieldContext, {\n slots: {\n start: startFieldProps,\n end: endFieldProps\n }\n }],\n [TextContext, {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }],\n [FieldErrorContext, validation]\n ]}>\n <div\n {...focusProps}\n {...DOMProps}\n {...renderProps}\n ref={ref}\n slot={props.slot || undefined}\n data-focus-within={isFocused || undefined}\n data-invalid={state.isInvalid || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-disabled={props.isDisabled || undefined}\n data-open={state.isOpen || undefined} />\n </Provider>\n );\n});\n"],"names":[],"version":3,"file":"DatePicker.main.js.map"}