@react-spectrum/datepicker 3.9.5 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/DateField.main.js +6 -4
  2. package/dist/DateField.main.js.map +1 -1
  3. package/dist/DateField.mjs +8 -6
  4. package/dist/DateField.module.js +7 -5
  5. package/dist/DateField.module.js.map +1 -1
  6. package/dist/DatePicker.main.js +32 -30
  7. package/dist/DatePicker.main.js.map +1 -1
  8. package/dist/DatePicker.mjs +34 -32
  9. package/dist/DatePicker.module.js +33 -31
  10. package/dist/DatePicker.module.js.map +1 -1
  11. package/dist/DatePickerField.main.js +5 -5
  12. package/dist/DatePickerField.main.js.map +1 -1
  13. package/dist/DatePickerField.mjs +6 -6
  14. package/dist/DatePickerField.module.js +5 -5
  15. package/dist/DatePickerField.module.js.map +1 -1
  16. package/dist/DatePickerSegment.main.js +12 -15
  17. package/dist/DatePickerSegment.main.js.map +1 -1
  18. package/dist/DatePickerSegment.mjs +13 -16
  19. package/dist/DatePickerSegment.module.js +12 -15
  20. package/dist/DatePickerSegment.module.js.map +1 -1
  21. package/dist/DateRangePicker.main.js +38 -35
  22. package/dist/DateRangePicker.main.js.map +1 -1
  23. package/dist/DateRangePicker.mjs +40 -37
  24. package/dist/DateRangePicker.module.js +39 -36
  25. package/dist/DateRangePicker.module.js.map +1 -1
  26. package/dist/Input.main.js +25 -19
  27. package/dist/Input.main.js.map +1 -1
  28. package/dist/Input.mjs +26 -20
  29. package/dist/Input.module.js +25 -19
  30. package/dist/Input.module.js.map +1 -1
  31. package/dist/TimeField.main.js +6 -4
  32. package/dist/TimeField.main.js.map +1 -1
  33. package/dist/TimeField.mjs +8 -6
  34. package/dist/TimeField.module.js +7 -5
  35. package/dist/TimeField.module.js.map +1 -1
  36. package/dist/ar-AE.mjs +1 -1
  37. package/dist/bg-BG.mjs +1 -1
  38. package/dist/cs-CZ.mjs +1 -1
  39. package/dist/da-DK.mjs +1 -1
  40. package/dist/de-DE.mjs +1 -1
  41. package/dist/el-GR.mjs +1 -1
  42. package/dist/en-US.mjs +1 -1
  43. package/dist/es-ES.mjs +1 -1
  44. package/dist/et-EE.mjs +1 -1
  45. package/dist/fi-FI.mjs +1 -1
  46. package/dist/fr-FR.mjs +1 -1
  47. package/dist/he-IL.mjs +1 -1
  48. package/dist/hr-HR.mjs +1 -1
  49. package/dist/hu-HU.mjs +1 -1
  50. package/dist/inputgroup_vars_css.mjs +1 -1
  51. package/dist/intlStrings.mjs +1 -1
  52. package/dist/it-IT.mjs +1 -1
  53. package/dist/ja-JP.mjs +1 -1
  54. package/dist/ko-KR.mjs +1 -1
  55. package/dist/lt-LT.mjs +1 -1
  56. package/dist/lv-LV.mjs +1 -1
  57. package/dist/nb-NO.mjs +1 -1
  58. package/dist/nl-NL.mjs +1 -1
  59. package/dist/pl-PL.mjs +1 -1
  60. package/dist/pt-BR.mjs +1 -1
  61. package/dist/pt-PT.mjs +1 -1
  62. package/dist/ro-RO.mjs +1 -1
  63. package/dist/ru-RU.mjs +1 -1
  64. package/dist/sk-SK.mjs +1 -1
  65. package/dist/sl-SI.mjs +1 -1
  66. package/dist/sr-SP.mjs +1 -1
  67. package/dist/{styles.36ea4632.css → styles.b562cf4b.css} +9 -13
  68. package/dist/styles.b562cf4b.css.map +1 -0
  69. package/dist/styles_css.main.js +3 -0
  70. package/dist/styles_css.main.js.map +1 -1
  71. package/dist/styles_css.mjs +4 -1
  72. package/dist/styles_css.module.js +3 -0
  73. package/dist/styles_css.module.js.map +1 -1
  74. package/dist/sv-SE.mjs +1 -1
  75. package/dist/textfield_vars_css.mjs +1 -1
  76. package/dist/tr-TR.mjs +1 -1
  77. package/dist/types.d.ts.map +1 -1
  78. package/dist/uk-UA.mjs +1 -1
  79. package/dist/utils.main.js +26 -11
  80. package/dist/utils.main.js.map +1 -1
  81. package/dist/utils.mjs +28 -14
  82. package/dist/utils.module.js +27 -13
  83. package/dist/utils.module.js.map +1 -1
  84. package/dist/{vars.3692148b.css → vars.3d0e5be0.css} +2 -1
  85. package/dist/vars.3d0e5be0.css.map +1 -0
  86. package/dist/zh-CN.mjs +1 -1
  87. package/dist/zh-TW.mjs +1 -1
  88. package/package.json +23 -23
  89. package/src/DateField.tsx +4 -1
  90. package/src/DatePicker.tsx +6 -3
  91. package/src/DatePickerField.tsx +2 -2
  92. package/src/DatePickerSegment.tsx +4 -7
  93. package/src/DateRangePicker.tsx +7 -3
  94. package/src/Input.tsx +10 -2
  95. package/src/TimeField.tsx +4 -1
  96. package/src/styles.css +8 -12
  97. package/src/utils.ts +15 -2
  98. package/dist/styles.36ea4632.css.map +0 -1
  99. package/dist/vars.3692148b.css.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import {DatePickerField as $d2bb88c82604b25f$export$34dc4cfa15ead1} from "./DatePickerField.module.js";
2
- import "./styles.36ea4632.css";
2
+ import "./styles.b562cf4b.css";
3
3
  import $8czI1$styles_cssmodulejs from "./styles_css.module.js";
4
4
  import {Input as $79348162c55d687f$export$f5b8910cec6cf069} from "./Input.module.js";
5
5
  import $8czI1$intlStringsmodulejs from "./intlStrings.module.js";
6
- import "./vars.3692148b.css";
6
+ import "./vars.3d0e5be0.css";
7
7
  import "./textfield_vars_css.module.js";
8
8
  import "./vars.ccbd2e3f.css";
9
9
  import $8czI1$inputgroup_vars_cssmodulejs from "./inputgroup_vars_css.module.js";
10
10
  import {TimeField as $f0a04554754386b6$export$5eaee2322dd727eb} from "./TimeField.module.js";
11
- import {useFocusManagerRef as $04e96200274b03de$export$71a23a36270e4bf0, useFormatHelpText as $04e96200274b03de$export$322f4580ccd8dde6, useVisibleMonths as $04e96200274b03de$export$12ce2869ce471b1f} from "./utils.module.js";
11
+ import {useFocusManagerRef as $04e96200274b03de$export$71a23a36270e4bf0, useFormatHelpText as $04e96200274b03de$export$322f4580ccd8dde6, useFormattedDateWidth as $04e96200274b03de$export$31e22e3c931fc056, useVisibleMonths as $04e96200274b03de$export$12ce2869ce471b1f} from "./utils.module.js";
12
12
  import {Calendar as $8czI1$Calendar} from "@react-spectrum/calendar";
13
13
  import $8czI1$spectrumiconsworkflowCalendar from "@spectrum-icons/workflow/Calendar";
14
14
  import {classNames as $8czI1$classNames} from "@react-spectrum/utils";
@@ -71,7 +71,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
71
71
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $8czI1$useHover)({
72
72
  isDisabled: isDisabled
73
73
  });
74
- let targetRef = (0, $8czI1$useRef)();
74
+ let targetRef = (0, $8czI1$useRef)(undefined);
75
75
  let state = (0, $8czI1$useDatePickerState)({
76
76
  ...props,
77
77
  shouldCloseOnSelect: ()=>!state.hasTime
@@ -80,7 +80,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
80
80
  let { isOpen: isOpen, setOpen: setOpen } = state;
81
81
  let { direction: direction } = (0, $8czI1$useLocale)();
82
82
  let domRef = (0, $04e96200274b03de$export$71a23a36270e4bf0)(ref);
83
- let stringFormatter = (0, $8czI1$useLocalizedStringFormatter)((0, ($parcel$interopDefault($8czI1$intlStringsmodulejs))), "@react-spectrum/datepicker");
83
+ let stringFormatter = (0, $8czI1$useLocalizedStringFormatter)((0, ($parcel$interopDefault($8czI1$intlStringsmodulejs))), '@react-spectrum/datepicker');
84
84
  let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $8czI1$useFocusRing)({
85
85
  within: true,
86
86
  isTextInput: true,
@@ -91,30 +91,31 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
91
91
  isTextInput: false,
92
92
  autoFocus: autoFocus
93
93
  });
94
- let className = (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), "spectrum-InputGroup", {
95
- "spectrum-InputGroup--quiet": isQuiet,
96
- "spectrum-InputGroup--invalid": isInvalid && !isDisabled,
97
- "is-disabled": isDisabled,
98
- "is-hovered": isHovered,
99
- "is-focused": isFocused,
100
- "focus-ring": isFocusVisible && !isFocusedButton
94
+ let className = (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup', {
95
+ 'spectrum-InputGroup--quiet': isQuiet,
96
+ 'spectrum-InputGroup--invalid': isInvalid && !isDisabled,
97
+ 'is-disabled': isDisabled,
98
+ 'is-hovered': isHovered,
99
+ 'is-focused': isFocused,
100
+ 'focus-ring': isFocusVisible && !isFocusedButton
101
101
  });
102
- let fieldClassName = (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), "spectrum-InputGroup-input", {
103
- "is-disabled": isDisabled,
104
- "is-invalid": isInvalid && !isDisabled
102
+ let fieldClassName = (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-input', {
103
+ 'is-disabled': isDisabled,
104
+ 'is-invalid': isInvalid && !isDisabled
105
105
  });
106
106
  // Note: this description is intentionally not passed to useDatePicker.
107
107
  // The format help text is unnecessary for screen reader users because each segment already has a label.
108
108
  let description = (0, $04e96200274b03de$export$322f4580ccd8dde6)(props);
109
109
  if (description && !props.description) descriptionProps.id = null;
110
110
  let placeholder = placeholderValue;
111
- let timePlaceholder = placeholder && "hour" in placeholder ? placeholder : null;
112
- let timeMinValue = props.minValue && "hour" in props.minValue ? props.minValue : null;
113
- let timeMaxValue = props.maxValue && "hour" in props.maxValue ? props.maxValue : null;
114
- let timeGranularity = state.granularity === "hour" || state.granularity === "minute" || state.granularity === "second" ? state.granularity : null;
111
+ let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;
112
+ let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;
113
+ let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;
114
+ let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' ? state.granularity : null;
115
115
  let showTimeField = !!timeGranularity;
116
116
  let visibleMonths = (0, $04e96200274b03de$export$12ce2869ce471b1f)(maxVisibleMonths);
117
- let validationState = state.validationState || (isInvalid ? "invalid" : null);
117
+ let validationState = state.validationState || (isInvalid ? 'invalid' : null);
118
+ let approximateWidth = (0, $04e96200274b03de$export$31e22e3c931fc056)(state) + 'ch';
118
119
  return /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$Field), {
119
120
  ...props,
120
121
  ref: domRef,
@@ -127,7 +128,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
127
128
  isInvalid: isInvalid,
128
129
  validationErrors: validationErrors,
129
130
  validationDetails: validationDetails,
130
- wrapperClassName: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), "react-spectrum-Datepicker-fieldWrapper")
131
+ wrapperClassName: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-fieldWrapper')
131
132
  }, /*#__PURE__*/ (0, $8czI1$react).createElement("div", {
132
133
  ...(0, $8czI1$mergeProps)(groupProps, hoverProps, focusProps),
133
134
  className: className,
@@ -136,9 +137,10 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
136
137
  isDisabled: isDisabled,
137
138
  isQuiet: isQuiet,
138
139
  validationState: validationState,
139
- className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), "spectrum-InputGroup-field"),
140
+ className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-field'),
140
141
  inputClassName: fieldClassName,
141
- disableFocusRing: true
142
+ disableFocusRing: true,
143
+ minWidth: approximateWidth
142
144
  }, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $d2bb88c82604b25f$export$34dc4cfa15ead1), {
143
145
  ...fieldProps,
144
146
  "data-testid": "date-field",
@@ -146,7 +148,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
146
148
  })), /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$DialogTrigger), {
147
149
  type: "popover",
148
150
  mobileType: "tray",
149
- placement: direction === "rtl" ? "bottom right" : "bottom left",
151
+ placement: direction === 'rtl' ? 'bottom right' : 'bottom left',
150
152
  targetRef: targetRef,
151
153
  hideArrow: true,
152
154
  isOpen: isOpen,
@@ -154,25 +156,25 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
154
156
  shouldFlip: props.shouldFlip
155
157
  }, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$FieldButton), {
156
158
  ...(0, $8czI1$mergeProps)(buttonProps, focusPropsButton),
157
- UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), "spectrum-FieldButton"),
159
+ UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), 'spectrum-FieldButton'),
158
160
  isQuiet: isQuiet,
159
161
  validationState: validationState
160
162
  }, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$spectrumiconsworkflowCalendar), null)), /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$Dialog), {
161
- UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), "react-spectrum-Datepicker-dialog"),
163
+ UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-dialog'),
162
164
  ...dialogProps
163
165
  }, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$Content), null, /*#__PURE__*/ (0, $8czI1$react).createElement("div", {
164
- className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), "react-spectrum-Datepicker-dialogContent")
166
+ className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-dialogContent')
165
167
  }, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$Calendar), {
166
168
  ...calendarProps,
167
169
  visibleMonths: visibleMonths,
168
170
  pageBehavior: pageBehavior,
169
- UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), "react-spectrum-Datepicker-calendar", {
170
- "is-invalid": isInvalid
171
+ UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-calendar', {
172
+ 'is-invalid': isInvalid
171
173
  })
172
174
  }), showTimeField && /*#__PURE__*/ (0, $8czI1$react).createElement("div", {
173
- className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), "react-spectrum-Datepicker-timeFields")
175
+ className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-timeFields')
174
176
  }, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $f0a04554754386b6$export$5eaee2322dd727eb), {
175
- label: stringFormatter.format("time"),
177
+ label: stringFormatter.format('time'),
176
178
  value: state.timeValue,
177
179
  onChange: state.setTimeValue,
178
180
  placeholderValue: timePlaceholder,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;AA8BD,SAAS,iCAAgC,KAAiC,EAAE,GAA8B;IACxG,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAW,EAAE;IACrB,IAAI,aACF,SAAS,WACT,OAAO,cACP,UAAU,oBACV,gBAAgB,oBAChB,mBAAmB,iBACnB,YAAY,EACb,GAAG;IACJ,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;oBAAC;IAAU;IAClD,IAAI,YAAY,CAAA,GAAA,aAAK;IACrB,IAAI,QAAQ,CAAA,GAAA,yBAAiB,EAAE;QAC7B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AAiB;QAC7C,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAK,GAAG;QACrC,SAAS;QACT,iBAAiB;qBACjB,gCAAC,CAAA,GAAA,oCAAW,yBAEd,gCAAC,CAAA,GAAA,aAAK;QAAE,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAe,GAAG;QAAsC,GAAG,WAAW;qBACzG,gCAAC,CAAA,GAAA,cAAM,uBACL,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAe,GAAG;qBAC3C,gCAAC,CAAA,GAAA,eAAO;QACL,GAAG,aAAa;QACjB,eAAe;QACf,cAAc;QACd,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAe,GAAG,sCAAsC;YAAC,cAAc;QAAS;QAC9G,+BACC,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAe,GAAG;qBAC3C,gCAAC,CAAA,GAAA,yCAAQ;QACP,OAAO,gBAAgB,MAAM,CAAC;QAC9B,OAAO,MAAM,SAAS;QACtB,UAAU,MAAM,YAAY;QAC5B,kBAAkB;QAClB,aAAa;QACb,UAAU;QACV,UAAU;QACV,WAAW,MAAM,SAAS;QAC1B,cAAc,MAAM,YAAY;QAChC,WAAU;;AAUhC;AAEA;;CAEC,GACD,MAAM,0DAAc,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/datepicker/src/DatePicker.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Calendar} from '@react-spectrum/calendar';\nimport CalendarIcon from '@spectrum-icons/workflow/Calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {Content} from '@react-spectrum/view';\nimport {DatePickerField} from './DatePickerField';\nimport datepickerStyles from './styles.css';\nimport {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';\nimport {Dialog, DialogTrigger} from '@react-spectrum/dialog';\nimport {Field} from '@react-spectrum/label';\nimport {FieldButton} from '@react-spectrum/button';\nimport {FocusableRef} from '@react-types/shared';\nimport {Input} from './Input';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement, useRef} from 'react';\nimport '@adobe/spectrum-css-temp/components/textfield/vars.css'; // HACK: must be included BEFORE inputgroup\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TimeField} from './TimeField';\nimport {useDatePicker} from '@react-aria/datepicker';\nimport {useDatePickerState} from '@react-stately/datepicker';\nimport {useFocusManagerRef, useFormatHelpText, useVisibleMonths} from './utils';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n autoFocus,\n isQuiet,\n isDisabled,\n placeholderValue,\n maxVisibleMonths = 1,\n pageBehavior\n } = props;\n let {hoverProps, isHovered} = useHover({isDisabled});\n let targetRef = useRef<HTMLDivElement>();\n let state = useDatePickerState({\n ...props,\n shouldCloseOnSelect: () => !state.hasTime\n });\n let {groupProps, labelProps, fieldProps, descriptionProps, errorMessageProps, buttonProps, dialogProps, calendarProps, isInvalid, validationErrors, validationDetails} = useDatePicker(props, state, targetRef);\n let {isOpen, setOpen} = state;\n let {direction} = useLocale();\n let domRef = useFocusManagerRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/datepicker');\n\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({\n within: true,\n isTextInput: true,\n autoFocus\n });\n\n let {isFocused: isFocusedButton, focusProps: focusPropsButton} = useFocusRing({\n within: false,\n isTextInput: false,\n autoFocus\n });\n\n let className = classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'spectrum-InputGroup--invalid': isInvalid && !isDisabled,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'focus-ring': isFocusVisible && !isFocusedButton\n }\n );\n\n let fieldClassName = classNames(\n styles,\n 'spectrum-InputGroup-input',\n {\n 'is-disabled': isDisabled,\n 'is-invalid': isInvalid && !isDisabled\n }\n );\n\n // Note: this description is intentionally not passed to useDatePicker.\n // The format help text is unnecessary for screen reader users because each segment already has a label.\n let description = useFormatHelpText(props);\n if (description && !props.description) {\n descriptionProps.id = null;\n }\n\n let placeholder: DateValue = placeholderValue;\n let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;\n let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;\n let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;\n let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' ? state.granularity : null;\n let showTimeField = !!timeGranularity;\n\n let visibleMonths = useVisibleMonths(maxVisibleMonths);\n let validationState = state.validationState || (isInvalid ? 'invalid' : null);\n\n return (\n <Field\n {...props}\n ref={domRef}\n elementType=\"span\"\n description={description}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={validationState}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n wrapperClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>\n <div\n {...mergeProps(groupProps, hoverProps, focusProps)}\n className={className}\n ref={targetRef}>\n <Input\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n validationState={validationState}\n className={classNames(styles, 'spectrum-InputGroup-field')}\n inputClassName={fieldClassName}\n disableFocusRing>\n <DatePickerField\n {...fieldProps}\n data-testid=\"date-field\"\n isQuiet={isQuiet} />\n </Input>\n <DialogTrigger\n type=\"popover\"\n mobileType=\"tray\"\n placement={direction === 'rtl' ? 'bottom right' : 'bottom left'}\n targetRef={targetRef}\n hideArrow\n isOpen={isOpen}\n onOpenChange={setOpen}\n shouldFlip={props.shouldFlip}>\n <FieldButton\n {...mergeProps(buttonProps, focusPropsButton)}\n UNSAFE_className={classNames(styles, 'spectrum-FieldButton')}\n isQuiet={isQuiet}\n validationState={validationState}>\n <CalendarIcon />\n </FieldButton>\n <Dialog UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialog')} {...dialogProps}>\n <Content>\n <div className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialogContent')}>\n <Calendar\n {...calendarProps}\n visibleMonths={visibleMonths}\n pageBehavior={pageBehavior}\n UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-calendar', {'is-invalid': isInvalid})} />\n {showTimeField &&\n <div className={classNames(datepickerStyles, 'react-spectrum-Datepicker-timeFields')}>\n <TimeField\n label={stringFormatter.format('time')}\n value={state.timeValue}\n onChange={state.setTimeValue}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n marginTop=\"size-100\" />\n </div>\n }\n </div>\n </Content>\n </Dialog>\n </DialogTrigger>\n </div>\n </Field>\n );\n}\n\n/**\n * DatePickers combine a DateField and a Calendar popover to allow users to enter or select a date and time value.\n */\nconst _DatePicker = React.forwardRef(DatePicker) as <T extends DateValue>(props: SpectrumDatePickerProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement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C3C,gCAAC,CAAA,GAAA,yCAAQ;QACP,OAAO,gBAAgB,MAAM,CAAC;QAC9B,OAAO,MAAM,SAAS;QACtB,UAAU,MAAM,YAAY;QAC5B,kBAAkB;QAClB,aAAa;QACb,UAAU;QACV,UAAU;QACV,WAAW,MAAM,SAAS;QAC1B,cAAc,MAAM,YAAY;QAChC,WAAU;;AAUhC;AAEA;;CAEC,GACD,MAAM,0DAAc,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/datepicker/src/DatePicker.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Calendar} from '@react-spectrum/calendar';\nimport CalendarIcon from '@spectrum-icons/workflow/Calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {Content} from '@react-spectrum/view';\nimport {DatePickerField} from './DatePickerField';\nimport datepickerStyles from './styles.css';\nimport {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';\nimport {Dialog, DialogTrigger} from '@react-spectrum/dialog';\nimport {Field} from '@react-spectrum/label';\nimport {FieldButton} from '@react-spectrum/button';\nimport {FocusableRef} from '@react-types/shared';\nimport {Input} from './Input';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement, useRef} from 'react';\nimport '@adobe/spectrum-css-temp/components/textfield/vars.css'; // HACK: must be included BEFORE inputgroup\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TimeField} from './TimeField';\nimport {useDatePicker} from '@react-aria/datepicker';\nimport {useDatePickerState} from '@react-stately/datepicker';\nimport {useFocusManagerRef, useFormatHelpText, useFormattedDateWidth, useVisibleMonths} from './utils';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n autoFocus,\n isQuiet,\n isDisabled,\n placeholderValue,\n maxVisibleMonths = 1,\n pageBehavior\n } = props;\n let {hoverProps, isHovered} = useHover({isDisabled});\n let targetRef = useRef<HTMLDivElement>(undefined);\n let state = useDatePickerState({\n ...props,\n shouldCloseOnSelect: () => !state.hasTime\n });\n let {groupProps, labelProps, fieldProps, descriptionProps, errorMessageProps, buttonProps, dialogProps, calendarProps, isInvalid, validationErrors, validationDetails} = useDatePicker(props, state, targetRef);\n let {isOpen, setOpen} = state;\n let {direction} = useLocale();\n let domRef = useFocusManagerRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/datepicker');\n\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({\n within: true,\n isTextInput: true,\n autoFocus\n });\n\n let {isFocused: isFocusedButton, focusProps: focusPropsButton} = useFocusRing({\n within: false,\n isTextInput: false,\n autoFocus\n });\n\n let className = classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'spectrum-InputGroup--invalid': isInvalid && !isDisabled,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'focus-ring': isFocusVisible && !isFocusedButton\n }\n );\n\n let fieldClassName = classNames(\n styles,\n 'spectrum-InputGroup-input',\n {\n 'is-disabled': isDisabled,\n 'is-invalid': isInvalid && !isDisabled\n }\n );\n\n // Note: this description is intentionally not passed to useDatePicker.\n // The format help text is unnecessary for screen reader users because each segment already has a label.\n let description = useFormatHelpText(props);\n if (description && !props.description) {\n descriptionProps.id = null;\n }\n\n let placeholder: DateValue = placeholderValue;\n let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;\n let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;\n let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;\n let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' ? state.granularity : null;\n let showTimeField = !!timeGranularity;\n\n let visibleMonths = useVisibleMonths(maxVisibleMonths);\n let validationState = state.validationState || (isInvalid ? 'invalid' : null);\n\n let approximateWidth = useFormattedDateWidth(state) + 'ch';\n\n return (\n <Field\n {...props}\n ref={domRef}\n elementType=\"span\"\n description={description}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={validationState}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n wrapperClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>\n <div\n {...mergeProps(groupProps, hoverProps, focusProps)}\n className={className}\n ref={targetRef}>\n <Input\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n validationState={validationState}\n className={classNames(styles, 'spectrum-InputGroup-field')}\n inputClassName={fieldClassName}\n disableFocusRing\n minWidth={approximateWidth}>\n <DatePickerField\n {...fieldProps}\n data-testid=\"date-field\"\n isQuiet={isQuiet} />\n </Input>\n <DialogTrigger\n type=\"popover\"\n mobileType=\"tray\"\n placement={direction === 'rtl' ? 'bottom right' : 'bottom left'}\n targetRef={targetRef}\n hideArrow\n isOpen={isOpen}\n onOpenChange={setOpen}\n shouldFlip={props.shouldFlip}>\n <FieldButton\n {...mergeProps(buttonProps, focusPropsButton)}\n UNSAFE_className={classNames(styles, 'spectrum-FieldButton')}\n isQuiet={isQuiet}\n validationState={validationState}>\n <CalendarIcon />\n </FieldButton>\n <Dialog UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialog')} {...dialogProps}>\n <Content>\n <div className={classNames(datepickerStyles, 'react-spectrum-Datepicker-dialogContent')}>\n <Calendar\n {...calendarProps}\n visibleMonths={visibleMonths}\n pageBehavior={pageBehavior}\n UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-calendar', {'is-invalid': isInvalid})} />\n {showTimeField &&\n <div className={classNames(datepickerStyles, 'react-spectrum-Datepicker-timeFields')}>\n <TimeField\n label={stringFormatter.format('time')}\n value={state.timeValue}\n onChange={state.setTimeValue}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n marginTop=\"size-100\" />\n </div>\n }\n </div>\n </Content>\n </Dialog>\n </DialogTrigger>\n </div>\n </Field>\n );\n}\n\n/**\n * DatePickers combine a DateField and a Calendar popover to allow users to enter or select a date and time value.\n */\nconst _DatePicker = React.forwardRef(DatePicker) as <T extends DateValue>(props: SpectrumDatePickerProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\nexport {_DatePicker as DatePicker};\n"],"names":[],"version":3,"file":"DatePicker.module.js.map"}
@@ -1,5 +1,5 @@
1
1
  var $edac158d20ebe4a9$exports = require("./DatePickerSegment.main.js");
2
- require("./styles.36ea4632.css");
2
+ require("./styles.b562cf4b.css");
3
3
  var $91c3db8c6a21ca71$exports = require("./styles_css.main.js");
4
4
  var $g7Fnj$reactspectrumutils = require("@react-spectrum/utils");
5
5
  var $g7Fnj$internationalizeddate = require("@internationalized/date");
@@ -38,22 +38,22 @@ $parcel$export(module.exports, "DatePickerField", () => $bd22dc8dad9522bc$export
38
38
 
39
39
  function $bd22dc8dad9522bc$export$34dc4cfa15ead1(props) {
40
40
  let { isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, inputClassName: inputClassName } = props;
41
- let ref = (0, $g7Fnj$react.useRef)();
41
+ let ref = (0, $g7Fnj$react.useRef)(undefined);
42
42
  let { locale: locale } = (0, $g7Fnj$reactariai18n.useLocale)();
43
43
  let state = (0, $g7Fnj$reactstatelydatepicker.useDateFieldState)({
44
44
  ...props,
45
45
  locale: locale,
46
46
  createCalendar: $g7Fnj$internationalizeddate.createCalendar
47
47
  });
48
- let inputRef = (0, $g7Fnj$react.useRef)();
48
+ let inputRef = (0, $g7Fnj$react.useRef)(undefined);
49
49
  let { fieldProps: fieldProps, inputProps: inputProps } = (0, $g7Fnj$reactariadatepicker.useDateField)({
50
50
  ...props,
51
51
  inputRef: inputRef
52
52
  }, state, ref);
53
53
  return /*#__PURE__*/ (0, ($parcel$interopDefault($g7Fnj$react))).createElement("div", {
54
54
  ...fieldProps,
55
- "data-testid": props["data-testid"],
56
- className: (0, $g7Fnj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-segments", inputClassName),
55
+ "data-testid": props['data-testid'],
56
+ className: (0, $g7Fnj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-Datepicker-segments', inputClassName),
57
57
  ref: ref
58
58
  }, state.segments.map((segment, i)=>/*#__PURE__*/ (0, ($parcel$interopDefault($g7Fnj$react))).createElement((0, $edac158d20ebe4a9$exports.DatePickerSegment), {
59
59
  key: i,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAkBM,SAAS,wCAAqC,KAA8B;IACjF,IAAI,cACF,UAAU,cACV,UAAU,cACV,UAAU,kBACV,cAAc,EACf,GAAG;IACJ,IAAI,MAAM,CAAA,GAAA,mBAAK;IACf,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,8BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,+CAAgB,EAAE;QAC5B,GAAG,KAAK;gBACR;wBACA;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,mBAAK;IACpB,IAAI,cAAC,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAW,EAAE;QAAC,GAAG,KAAK;kBAAE;IAAQ,GAAG,OAAO;IAEzE,qBACE,0DAAC;QAAK,GAAG,UAAU;QAAE,eAAa,KAAK,CAAC,cAAc;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAe,GAAG,sCAAsC;QAAiB,KAAK;OACzJ,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,kBAC3B,0DAAC,CAAA,GAAA,2CAAgB;YAChB,KAAK;YACL,SAAS;YACT,OAAO;YACP,YAAY;YACZ,YAAY;YACZ,YAAY;2BAEhB,0DAAC;QAAO,GAAG,UAAU;QAAE,KAAK;;AAGlC","sources":["packages/@react-spectrum/datepicker/src/DatePickerField.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DatePickerSegment} from './DatePickerSegment';\nimport datepickerStyles from './styles.css';\nimport {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';\nimport React, {useRef} from 'react';\nimport {useDateField} from '@react-aria/datepicker';\nimport {useDateFieldState} from '@react-stately/datepicker';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface DatePickerFieldProps<T extends DateValue> extends SpectrumDatePickerProps<T> {\n inputClassName?: string,\n hideValidationIcon?: boolean,\n maxGranularity?: SpectrumDatePickerProps<T>['granularity']\n}\n\nexport function DatePickerField<T extends DateValue>(props: DatePickerFieldProps<T>) {\n let {\n isDisabled,\n isReadOnly,\n isRequired,\n inputClassName\n } = props;\n let ref = useRef();\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...props,\n locale,\n createCalendar\n });\n\n let inputRef = useRef();\n let {fieldProps, inputProps} = useDateField({...props, inputRef}, state, ref);\n\n return (\n <div {...fieldProps} data-testid={props['data-testid']} className={classNames(datepickerStyles, 'react-spectrum-Datepicker-segments', inputClassName)} ref={ref}>\n {state.segments.map((segment, i) =>\n (<DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />)\n )}\n <input {...inputProps} ref={inputRef} />\n </div>\n );\n}\n"],"names":[],"version":3,"file":"DatePickerField.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAkBM,SAAS,wCAAqC,KAA8B;IACjF,IAAI,cACF,UAAU,cACV,UAAU,cACV,UAAU,kBACV,cAAc,EACf,GAAG;IACJ,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAE;IACjB,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,8BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,+CAAgB,EAAE;QAC5B,GAAG,KAAK;gBACR;wBACA;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;IACtB,IAAI,cAAC,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAW,EAAE;QAAC,GAAG,KAAK;kBAAE;IAAQ,GAAG,OAAO;IAEzE,qBACE,0DAAC;QAAK,GAAG,UAAU;QAAE,eAAa,KAAK,CAAC,cAAc;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAe,GAAG,sCAAsC;QAAiB,KAAK;OACzJ,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,kBAC3B,0DAAC,CAAA,GAAA,2CAAgB;YAChB,KAAK;YACL,SAAS;YACT,OAAO;YACP,YAAY;YACZ,YAAY;YACZ,YAAY;2BAEhB,0DAAC;QAAO,GAAG,UAAU;QAAE,KAAK;;AAGlC","sources":["packages/@react-spectrum/datepicker/src/DatePickerField.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DatePickerSegment} from './DatePickerSegment';\nimport datepickerStyles from './styles.css';\nimport {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';\nimport React, {useRef} from 'react';\nimport {useDateField} from '@react-aria/datepicker';\nimport {useDateFieldState} from '@react-stately/datepicker';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface DatePickerFieldProps<T extends DateValue> extends SpectrumDatePickerProps<T> {\n inputClassName?: string,\n hideValidationIcon?: boolean,\n maxGranularity?: SpectrumDatePickerProps<T>['granularity']\n}\n\nexport function DatePickerField<T extends DateValue>(props: DatePickerFieldProps<T>) {\n let {\n isDisabled,\n isReadOnly,\n isRequired,\n inputClassName\n } = props;\n let ref = useRef(undefined);\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...props,\n locale,\n createCalendar\n });\n\n let inputRef = useRef(undefined);\n let {fieldProps, inputProps} = useDateField({...props, inputRef}, state, ref);\n\n return (\n <div {...fieldProps} data-testid={props['data-testid']} className={classNames(datepickerStyles, 'react-spectrum-Datepicker-segments', inputClassName)} ref={ref}>\n {state.segments.map((segment, i) =>\n (<DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />)\n )}\n <input {...inputProps} ref={inputRef} />\n </div>\n );\n}\n"],"names":[],"version":3,"file":"DatePickerField.main.js.map"}
@@ -1,5 +1,5 @@
1
1
  import {DatePickerSegment as $cfa347761f172638$export$6388987c5223b54e} from "./DatePickerSegment.mjs";
2
- import "./styles.36ea4632.css";
2
+ import "./styles.b562cf4b.css";
3
3
  import $332Ed$styles_cssmodulejs from "./styles_css.mjs";
4
4
  import {classNames as $332Ed$classNames} from "@react-spectrum/utils";
5
5
  import {createCalendar as $332Ed$createCalendar} from "@internationalized/date";
@@ -32,22 +32,22 @@ function $parcel$interopDefault(a) {
32
32
 
33
33
  function $d2bb88c82604b25f$export$34dc4cfa15ead1(props) {
34
34
  let { isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, inputClassName: inputClassName } = props;
35
- let ref = (0, $332Ed$useRef)();
35
+ let ref = (0, $332Ed$useRef)(undefined);
36
36
  let { locale: locale } = (0, $332Ed$useLocale)();
37
37
  let state = (0, $332Ed$useDateFieldState)({
38
38
  ...props,
39
39
  locale: locale,
40
40
  createCalendar: $332Ed$createCalendar
41
41
  });
42
- let inputRef = (0, $332Ed$useRef)();
42
+ let inputRef = (0, $332Ed$useRef)(undefined);
43
43
  let { fieldProps: fieldProps, inputProps: inputProps } = (0, $332Ed$useDateField)({
44
44
  ...props,
45
45
  inputRef: inputRef
46
46
  }, state, ref);
47
47
  return /*#__PURE__*/ (0, $332Ed$react).createElement("div", {
48
48
  ...fieldProps,
49
- "data-testid": props["data-testid"],
50
- className: (0, $332Ed$classNames)((0, ($parcel$interopDefault($332Ed$styles_cssmodulejs))), "react-spectrum-Datepicker-segments", inputClassName),
49
+ "data-testid": props['data-testid'],
50
+ className: (0, $332Ed$classNames)((0, ($parcel$interopDefault($332Ed$styles_cssmodulejs))), 'react-spectrum-Datepicker-segments', inputClassName),
51
51
  ref: ref
52
52
  }, state.segments.map((segment, i)=>/*#__PURE__*/ (0, $332Ed$react).createElement((0, $cfa347761f172638$export$6388987c5223b54e), {
53
53
  key: i,
@@ -64,4 +64,4 @@ function $d2bb88c82604b25f$export$34dc4cfa15ead1(props) {
64
64
 
65
65
 
66
66
  export {$d2bb88c82604b25f$export$34dc4cfa15ead1 as DatePickerField};
67
- //# sourceMappingURL=DatePickerField.mjs.map
67
+ //# sourceMappingURL=DatePickerField.module.js.map
@@ -1,5 +1,5 @@
1
1
  import {DatePickerSegment as $cfa347761f172638$export$6388987c5223b54e} from "./DatePickerSegment.module.js";
2
- import "./styles.36ea4632.css";
2
+ import "./styles.b562cf4b.css";
3
3
  import $332Ed$styles_cssmodulejs from "./styles_css.module.js";
4
4
  import {classNames as $332Ed$classNames} from "@react-spectrum/utils";
5
5
  import {createCalendar as $332Ed$createCalendar} from "@internationalized/date";
@@ -32,22 +32,22 @@ function $parcel$interopDefault(a) {
32
32
 
33
33
  function $d2bb88c82604b25f$export$34dc4cfa15ead1(props) {
34
34
  let { isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, inputClassName: inputClassName } = props;
35
- let ref = (0, $332Ed$useRef)();
35
+ let ref = (0, $332Ed$useRef)(undefined);
36
36
  let { locale: locale } = (0, $332Ed$useLocale)();
37
37
  let state = (0, $332Ed$useDateFieldState)({
38
38
  ...props,
39
39
  locale: locale,
40
40
  createCalendar: $332Ed$createCalendar
41
41
  });
42
- let inputRef = (0, $332Ed$useRef)();
42
+ let inputRef = (0, $332Ed$useRef)(undefined);
43
43
  let { fieldProps: fieldProps, inputProps: inputProps } = (0, $332Ed$useDateField)({
44
44
  ...props,
45
45
  inputRef: inputRef
46
46
  }, state, ref);
47
47
  return /*#__PURE__*/ (0, $332Ed$react).createElement("div", {
48
48
  ...fieldProps,
49
- "data-testid": props["data-testid"],
50
- className: (0, $332Ed$classNames)((0, ($parcel$interopDefault($332Ed$styles_cssmodulejs))), "react-spectrum-Datepicker-segments", inputClassName),
49
+ "data-testid": props['data-testid'],
50
+ className: (0, $332Ed$classNames)((0, ($parcel$interopDefault($332Ed$styles_cssmodulejs))), 'react-spectrum-Datepicker-segments', inputClassName),
51
51
  ref: ref
52
52
  }, state.segments.map((segment, i)=>/*#__PURE__*/ (0, $332Ed$react).createElement((0, $cfa347761f172638$export$6388987c5223b54e), {
53
53
  key: i,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAkBM,SAAS,wCAAqC,KAA8B;IACjF,IAAI,cACF,UAAU,cACV,UAAU,cACV,UAAU,kBACV,cAAc,EACf,GAAG;IACJ,IAAI,MAAM,CAAA,GAAA,aAAK;IACf,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,wBAAgB,EAAE;QAC5B,GAAG,KAAK;gBACR;wBACA;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,aAAK;IACpB,IAAI,cAAC,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;QAAC,GAAG,KAAK;kBAAE;IAAQ,GAAG,OAAO;IAEzE,qBACE,gCAAC;QAAK,GAAG,UAAU;QAAE,eAAa,KAAK,CAAC,cAAc;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAe,GAAG,sCAAsC;QAAiB,KAAK;OACzJ,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,kBAC3B,gCAAC,CAAA,GAAA,yCAAgB;YAChB,KAAK;YACL,SAAS;YACT,OAAO;YACP,YAAY;YACZ,YAAY;YACZ,YAAY;2BAEhB,gCAAC;QAAO,GAAG,UAAU;QAAE,KAAK;;AAGlC","sources":["packages/@react-spectrum/datepicker/src/DatePickerField.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DatePickerSegment} from './DatePickerSegment';\nimport datepickerStyles from './styles.css';\nimport {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';\nimport React, {useRef} from 'react';\nimport {useDateField} from '@react-aria/datepicker';\nimport {useDateFieldState} from '@react-stately/datepicker';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface DatePickerFieldProps<T extends DateValue> extends SpectrumDatePickerProps<T> {\n inputClassName?: string,\n hideValidationIcon?: boolean,\n maxGranularity?: SpectrumDatePickerProps<T>['granularity']\n}\n\nexport function DatePickerField<T extends DateValue>(props: DatePickerFieldProps<T>) {\n let {\n isDisabled,\n isReadOnly,\n isRequired,\n inputClassName\n } = props;\n let ref = useRef();\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...props,\n locale,\n createCalendar\n });\n\n let inputRef = useRef();\n let {fieldProps, inputProps} = useDateField({...props, inputRef}, state, ref);\n\n return (\n <div {...fieldProps} data-testid={props['data-testid']} className={classNames(datepickerStyles, 'react-spectrum-Datepicker-segments', inputClassName)} ref={ref}>\n {state.segments.map((segment, i) =>\n (<DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />)\n )}\n <input {...inputProps} ref={inputRef} />\n </div>\n );\n}\n"],"names":[],"version":3,"file":"DatePickerField.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAkBM,SAAS,wCAAqC,KAA8B;IACjF,IAAI,cACF,UAAU,cACV,UAAU,cACV,UAAU,kBACV,cAAc,EACf,GAAG;IACJ,IAAI,MAAM,CAAA,GAAA,aAAK,EAAE;IACjB,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,wBAAgB,EAAE;QAC5B,GAAG,KAAK;gBACR;wBACA;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,aAAK,EAAE;IACtB,IAAI,cAAC,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;QAAC,GAAG,KAAK;kBAAE;IAAQ,GAAG,OAAO;IAEzE,qBACE,gCAAC;QAAK,GAAG,UAAU;QAAE,eAAa,KAAK,CAAC,cAAc;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAe,GAAG,sCAAsC;QAAiB,KAAK;OACzJ,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,kBAC3B,gCAAC,CAAA,GAAA,yCAAgB;YAChB,KAAK;YACL,SAAS;YACT,OAAO;YACP,YAAY;YACZ,YAAY;YACZ,YAAY;2BAEhB,gCAAC;QAAO,GAAG,UAAU;QAAE,KAAK;;AAGlC","sources":["packages/@react-spectrum/datepicker/src/DatePickerField.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DatePickerSegment} from './DatePickerSegment';\nimport datepickerStyles from './styles.css';\nimport {DateValue, SpectrumDatePickerProps} from '@react-types/datepicker';\nimport React, {useRef} from 'react';\nimport {useDateField} from '@react-aria/datepicker';\nimport {useDateFieldState} from '@react-stately/datepicker';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface DatePickerFieldProps<T extends DateValue> extends SpectrumDatePickerProps<T> {\n inputClassName?: string,\n hideValidationIcon?: boolean,\n maxGranularity?: SpectrumDatePickerProps<T>['granularity']\n}\n\nexport function DatePickerField<T extends DateValue>(props: DatePickerFieldProps<T>) {\n let {\n isDisabled,\n isReadOnly,\n isRequired,\n inputClassName\n } = props;\n let ref = useRef(undefined);\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...props,\n locale,\n createCalendar\n });\n\n let inputRef = useRef(undefined);\n let {fieldProps, inputProps} = useDateField({...props, inputRef}, state, ref);\n\n return (\n <div {...fieldProps} data-testid={props['data-testid']} className={classNames(datepickerStyles, 'react-spectrum-Datepicker-segments', inputClassName)} ref={ref}>\n {state.segments.map((segment, i) =>\n (<DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />)\n )}\n <input {...inputProps} ref={inputRef} />\n </div>\n );\n}\n"],"names":[],"version":3,"file":"DatePickerField.module.js.map"}
@@ -1,4 +1,4 @@
1
- require("./styles.36ea4632.css");
1
+ require("./styles.b562cf4b.css");
2
2
  var $91c3db8c6a21ca71$exports = require("./styles_css.main.js");
3
3
  var $9PhAi$reactspectrumutils = require("@react-spectrum/utils");
4
4
  var $9PhAi$react = require("react");
@@ -31,7 +31,7 @@ $parcel$export(module.exports, "DatePickerSegment", () => $edac158d20ebe4a9$expo
31
31
  function $edac158d20ebe4a9$export$6388987c5223b54e({ segment: segment, state: state, ...otherProps }) {
32
32
  switch(segment.type){
33
33
  // A separator, e.g. punctuation
34
- case "literal":
34
+ case 'literal':
35
35
  return /*#__PURE__*/ (0, ($parcel$interopDefault($9PhAi$react))).createElement($edac158d20ebe4a9$var$LiteralSegment, {
36
36
  segment: segment
37
37
  });
@@ -47,29 +47,26 @@ function $edac158d20ebe4a9$export$6388987c5223b54e({ segment: segment, state: st
47
47
  function $edac158d20ebe4a9$var$LiteralSegment({ segment: segment }) {
48
48
  return /*#__PURE__*/ (0, ($parcel$interopDefault($9PhAi$react))).createElement("span", {
49
49
  "aria-hidden": "true",
50
- className: (0, $9PhAi$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-Datepicker-literal"),
51
- "data-testid": segment.type === "literal" ? undefined : segment.type
50
+ className: (0, $9PhAi$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-Datepicker-literal'),
51
+ "data-testid": segment.type === 'literal' ? undefined : segment.type
52
52
  }, segment.text);
53
53
  }
54
54
  function $edac158d20ebe4a9$var$EditableSegment({ segment: segment, state: state }) {
55
- let ref = (0, $9PhAi$react.useRef)();
55
+ let ref = (0, $9PhAi$react.useRef)(undefined);
56
56
  let { segmentProps: segmentProps } = (0, $9PhAi$reactariadatepicker.useDateSegment)(segment, state, ref);
57
57
  return /*#__PURE__*/ (0, ($parcel$interopDefault($9PhAi$react))).createElement("div", {
58
58
  ...segmentProps,
59
59
  ref: ref,
60
- className: (0, $9PhAi$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-DatePicker-cell", {
61
- "is-placeholder": segment.isPlaceholder,
62
- "is-read-only": !segment.isEditable
60
+ className: (0, $9PhAi$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-DatePicker-cell', {
61
+ 'is-placeholder': segment.isPlaceholder,
62
+ 'is-read-only': !segment.isEditable
63
63
  }),
64
- style: {
65
- ...segmentProps.style,
66
- minWidth: segment.maxValue != null ? String(segment.maxValue).length + "ch" : null
67
- },
64
+ style: segmentProps.style,
68
65
  "data-testid": segment.type
69
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($9PhAi$react))).createElement("span", {
66
+ }, segment.isPlaceholder ? /*#__PURE__*/ (0, ($parcel$interopDefault($9PhAi$react))).createElement("span", {
70
67
  "aria-hidden": "true",
71
- className: (0, $9PhAi$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), "react-spectrum-DatePicker-placeholder")
72
- }, segment.placeholder), segment.isPlaceholder ? "" : segment.text);
68
+ className: (0, $9PhAi$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-DatePicker-placeholder')
69
+ }, segment.placeholder) : segment.text);
73
70
  }
74
71
 
75
72
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAkBM,SAAS,0CAAkB,WAAC,OAAO,SAAE,KAAK,EAAE,GAAG,YAAmC;IACvF,OAAQ,QAAQ,IAAI;QAClB,gCAAgC;QAChC,KAAK;YACH,qBAAO,0DAAC;gBAAe,SAAS;;QAElC,mBAAmB;QACnB;YACE,qBAAO,0DAAC;gBAAgB,SAAS;gBAAS,OAAO;gBAAQ,GAAG,UAAU;;IAC1E;AACF;AAEA,SAAS,qCAAe,WAAC,OAAO,EAAsB;IACpD,qBACE,0DAAC;QACC,eAAY;QACZ,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC9B,eAAa,QAAQ,IAAI,KAAK,YAAY,YAAY,QAAQ,IAAI;OACjE,QAAQ,IAAI;AAGnB;AAEA,SAAS,sCAAgB,WAAC,OAAO,SAAE,KAAK,EAAyB;IAC/D,IAAI,MAAM,CAAA,GAAA,mBAAK;IACf,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,yCAAa,EAAE,SAAS,OAAO;IACpD,qBACE,0DAAC;QACE,GAAG,YAAY;QAChB,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,kCAAkC;YAC9D,kBAAkB,QAAQ,aAAa;YACvC,gBAAgB,CAAC,QAAQ,UAAU;QACrC;QACA,OAAO;YACL,GAAG,aAAa,KAAK;YACrB,UAAU,QAAQ,QAAQ,IAAI,OAAO,OAAO,QAAQ,QAAQ,EAAE,MAAM,GAAG,OAAO;QAChF;QACA,eAAa,QAAQ,IAAI;qBACzB,0DAAC;QAAK,eAAY;QAAO,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAA2C,QAAQ,WAAW,GACpH,QAAQ,aAAa,GAAG,KAAK,QAAQ,IAAI;AAGhD","sources":["packages/@react-spectrum/datepicker/src/DatePickerSegment.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {DateFieldState, DateSegment} from '@react-stately/datepicker';\nimport {DatePickerBase, DateValue} from '@react-types/datepicker';\nimport React, {useRef} from 'react';\nimport styles from './styles.css';\nimport {useDateSegment} from '@react-aria/datepicker';\n\ninterface DatePickerSegmentProps extends DatePickerBase<DateValue> {\n segment: DateSegment,\n state: DateFieldState\n}\n\ninterface LiteralSegmentProps {\n segment: DateSegment\n}\n\nexport function DatePickerSegment({segment, state, ...otherProps}: DatePickerSegmentProps) {\n switch (segment.type) {\n // A separator, e.g. punctuation\n case 'literal':\n return <LiteralSegment segment={segment} />;\n\n // Editable segment\n default:\n return <EditableSegment segment={segment} state={state} {...otherProps} />;\n }\n}\n\nfunction LiteralSegment({segment}: LiteralSegmentProps) {\n return (\n <span\n aria-hidden=\"true\"\n className={classNames(styles, 'react-spectrum-Datepicker-literal')}\n data-testid={segment.type === 'literal' ? undefined : segment.type}>\n {segment.text}\n </span>\n );\n}\n\nfunction EditableSegment({segment, state}: DatePickerSegmentProps) {\n let ref = useRef();\n let {segmentProps} = useDateSegment(segment, state, ref);\n return (\n <div\n {...segmentProps}\n ref={ref}\n className={classNames(styles, 'react-spectrum-DatePicker-cell', {\n 'is-placeholder': segment.isPlaceholder,\n 'is-read-only': !segment.isEditable\n })}\n style={{\n ...segmentProps.style,\n minWidth: segment.maxValue != null ? String(segment.maxValue).length + 'ch' : null\n }}\n data-testid={segment.type}>\n <span aria-hidden=\"true\" className={classNames(styles, 'react-spectrum-DatePicker-placeholder')}>{segment.placeholder}</span>\n {segment.isPlaceholder ? '' : segment.text}\n </div>\n );\n}\n"],"names":[],"version":3,"file":"DatePickerSegment.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAkBM,SAAS,0CAAkB,WAAC,OAAO,SAAE,KAAK,EAAE,GAAG,YAAmC;IACvF,OAAQ,QAAQ,IAAI;QAClB,gCAAgC;QAChC,KAAK;YACH,qBAAO,0DAAC;gBAAe,SAAS;;QAElC,mBAAmB;QACnB;YACE,qBAAO,0DAAC;gBAAgB,SAAS;gBAAS,OAAO;gBAAQ,GAAG,UAAU;;IAC1E;AACF;AAEA,SAAS,qCAAe,WAAC,OAAO,EAAsB;IACpD,qBACE,0DAAC;QACC,eAAY;QACZ,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC9B,eAAa,QAAQ,IAAI,KAAK,YAAY,YAAY,QAAQ,IAAI;OACjE,QAAQ,IAAI;AAGnB;AAEA,SAAS,sCAAgB,WAAC,OAAO,SAAE,KAAK,EAAyB;IAC/D,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAE;IACjB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,yCAAa,EAAE,SAAS,OAAO;IAEpD,qBACE,0DAAC;QACE,GAAG,YAAY;QAChB,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,kCAAkC;YAC9D,kBAAkB,QAAQ,aAAa;YACvC,gBAAgB,CAAC,QAAQ,UAAU;QACrC;QACA,OAAO,aAAa,KAAK;QACzB,eAAa,QAAQ,IAAI;OACxB,QAAQ,aAAa,iBAAG,0DAAC;QAAK,eAAY;QAAO,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAA2C,QAAQ,WAAW,IAAW,QAAQ,IAAI;AAG3K","sources":["packages/@react-spectrum/datepicker/src/DatePickerSegment.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {DateFieldState, DateSegment} from '@react-stately/datepicker';\nimport {DatePickerBase, DateValue} from '@react-types/datepicker';\nimport React, {useRef} from 'react';\nimport styles from './styles.css';\nimport {useDateSegment} from '@react-aria/datepicker';\n\ninterface DatePickerSegmentProps extends DatePickerBase<DateValue> {\n segment: DateSegment,\n state: DateFieldState\n}\n\ninterface LiteralSegmentProps {\n segment: DateSegment\n}\n\nexport function DatePickerSegment({segment, state, ...otherProps}: DatePickerSegmentProps) {\n switch (segment.type) {\n // A separator, e.g. punctuation\n case 'literal':\n return <LiteralSegment segment={segment} />;\n\n // Editable segment\n default:\n return <EditableSegment segment={segment} state={state} {...otherProps} />;\n }\n}\n\nfunction LiteralSegment({segment}: LiteralSegmentProps) {\n return (\n <span\n aria-hidden=\"true\"\n className={classNames(styles, 'react-spectrum-Datepicker-literal')}\n data-testid={segment.type === 'literal' ? undefined : segment.type}>\n {segment.text}\n </span>\n );\n}\n\nfunction EditableSegment({segment, state}: DatePickerSegmentProps) {\n let ref = useRef(undefined);\n let {segmentProps} = useDateSegment(segment, state, ref);\n\n return (\n <div\n {...segmentProps}\n ref={ref}\n className={classNames(styles, 'react-spectrum-DatePicker-cell', {\n 'is-placeholder': segment.isPlaceholder,\n 'is-read-only': !segment.isEditable\n })}\n style={segmentProps.style}\n data-testid={segment.type}>\n {segment.isPlaceholder ? <span aria-hidden=\"true\" className={classNames(styles, 'react-spectrum-DatePicker-placeholder')}>{segment.placeholder}</span> : segment.text}\n </div>\n );\n}\n"],"names":[],"version":3,"file":"DatePickerSegment.main.js.map"}
@@ -1,4 +1,4 @@
1
- import "./styles.36ea4632.css";
1
+ import "./styles.b562cf4b.css";
2
2
  import $jOVo7$styles_cssmodulejs from "./styles_css.mjs";
3
3
  import {classNames as $jOVo7$classNames} from "@react-spectrum/utils";
4
4
  import $jOVo7$react, {useRef as $jOVo7$useRef} from "react";
@@ -25,7 +25,7 @@ function $parcel$interopDefault(a) {
25
25
  function $cfa347761f172638$export$6388987c5223b54e({ segment: segment, state: state, ...otherProps }) {
26
26
  switch(segment.type){
27
27
  // A separator, e.g. punctuation
28
- case "literal":
28
+ case 'literal':
29
29
  return /*#__PURE__*/ (0, $jOVo7$react).createElement($cfa347761f172638$var$LiteralSegment, {
30
30
  segment: segment
31
31
  });
@@ -41,31 +41,28 @@ function $cfa347761f172638$export$6388987c5223b54e({ segment: segment, state: st
41
41
  function $cfa347761f172638$var$LiteralSegment({ segment: segment }) {
42
42
  return /*#__PURE__*/ (0, $jOVo7$react).createElement("span", {
43
43
  "aria-hidden": "true",
44
- className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), "react-spectrum-Datepicker-literal"),
45
- "data-testid": segment.type === "literal" ? undefined : segment.type
44
+ className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), 'react-spectrum-Datepicker-literal'),
45
+ "data-testid": segment.type === 'literal' ? undefined : segment.type
46
46
  }, segment.text);
47
47
  }
48
48
  function $cfa347761f172638$var$EditableSegment({ segment: segment, state: state }) {
49
- let ref = (0, $jOVo7$useRef)();
49
+ let ref = (0, $jOVo7$useRef)(undefined);
50
50
  let { segmentProps: segmentProps } = (0, $jOVo7$useDateSegment)(segment, state, ref);
51
51
  return /*#__PURE__*/ (0, $jOVo7$react).createElement("div", {
52
52
  ...segmentProps,
53
53
  ref: ref,
54
- className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), "react-spectrum-DatePicker-cell", {
55
- "is-placeholder": segment.isPlaceholder,
56
- "is-read-only": !segment.isEditable
54
+ className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), 'react-spectrum-DatePicker-cell', {
55
+ 'is-placeholder': segment.isPlaceholder,
56
+ 'is-read-only': !segment.isEditable
57
57
  }),
58
- style: {
59
- ...segmentProps.style,
60
- minWidth: segment.maxValue != null ? String(segment.maxValue).length + "ch" : null
61
- },
58
+ style: segmentProps.style,
62
59
  "data-testid": segment.type
63
- }, /*#__PURE__*/ (0, $jOVo7$react).createElement("span", {
60
+ }, segment.isPlaceholder ? /*#__PURE__*/ (0, $jOVo7$react).createElement("span", {
64
61
  "aria-hidden": "true",
65
- className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), "react-spectrum-DatePicker-placeholder")
66
- }, segment.placeholder), segment.isPlaceholder ? "" : segment.text);
62
+ className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), 'react-spectrum-DatePicker-placeholder')
63
+ }, segment.placeholder) : segment.text);
67
64
  }
68
65
 
69
66
 
70
67
  export {$cfa347761f172638$export$6388987c5223b54e as DatePickerSegment};
71
- //# sourceMappingURL=DatePickerSegment.mjs.map
68
+ //# sourceMappingURL=DatePickerSegment.module.js.map
@@ -1,4 +1,4 @@
1
- import "./styles.36ea4632.css";
1
+ import "./styles.b562cf4b.css";
2
2
  import $jOVo7$styles_cssmodulejs from "./styles_css.module.js";
3
3
  import {classNames as $jOVo7$classNames} from "@react-spectrum/utils";
4
4
  import $jOVo7$react, {useRef as $jOVo7$useRef} from "react";
@@ -25,7 +25,7 @@ function $parcel$interopDefault(a) {
25
25
  function $cfa347761f172638$export$6388987c5223b54e({ segment: segment, state: state, ...otherProps }) {
26
26
  switch(segment.type){
27
27
  // A separator, e.g. punctuation
28
- case "literal":
28
+ case 'literal':
29
29
  return /*#__PURE__*/ (0, $jOVo7$react).createElement($cfa347761f172638$var$LiteralSegment, {
30
30
  segment: segment
31
31
  });
@@ -41,29 +41,26 @@ function $cfa347761f172638$export$6388987c5223b54e({ segment: segment, state: st
41
41
  function $cfa347761f172638$var$LiteralSegment({ segment: segment }) {
42
42
  return /*#__PURE__*/ (0, $jOVo7$react).createElement("span", {
43
43
  "aria-hidden": "true",
44
- className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), "react-spectrum-Datepicker-literal"),
45
- "data-testid": segment.type === "literal" ? undefined : segment.type
44
+ className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), 'react-spectrum-Datepicker-literal'),
45
+ "data-testid": segment.type === 'literal' ? undefined : segment.type
46
46
  }, segment.text);
47
47
  }
48
48
  function $cfa347761f172638$var$EditableSegment({ segment: segment, state: state }) {
49
- let ref = (0, $jOVo7$useRef)();
49
+ let ref = (0, $jOVo7$useRef)(undefined);
50
50
  let { segmentProps: segmentProps } = (0, $jOVo7$useDateSegment)(segment, state, ref);
51
51
  return /*#__PURE__*/ (0, $jOVo7$react).createElement("div", {
52
52
  ...segmentProps,
53
53
  ref: ref,
54
- className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), "react-spectrum-DatePicker-cell", {
55
- "is-placeholder": segment.isPlaceholder,
56
- "is-read-only": !segment.isEditable
54
+ className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), 'react-spectrum-DatePicker-cell', {
55
+ 'is-placeholder': segment.isPlaceholder,
56
+ 'is-read-only': !segment.isEditable
57
57
  }),
58
- style: {
59
- ...segmentProps.style,
60
- minWidth: segment.maxValue != null ? String(segment.maxValue).length + "ch" : null
61
- },
58
+ style: segmentProps.style,
62
59
  "data-testid": segment.type
63
- }, /*#__PURE__*/ (0, $jOVo7$react).createElement("span", {
60
+ }, segment.isPlaceholder ? /*#__PURE__*/ (0, $jOVo7$react).createElement("span", {
64
61
  "aria-hidden": "true",
65
- className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), "react-spectrum-DatePicker-placeholder")
66
- }, segment.placeholder), segment.isPlaceholder ? "" : segment.text);
62
+ className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), 'react-spectrum-DatePicker-placeholder')
63
+ }, segment.placeholder) : segment.text);
67
64
  }
68
65
 
69
66
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAkBM,SAAS,0CAAkB,WAAC,OAAO,SAAE,KAAK,EAAE,GAAG,YAAmC;IACvF,OAAQ,QAAQ,IAAI;QAClB,gCAAgC;QAChC,KAAK;YACH,qBAAO,gCAAC;gBAAe,SAAS;;QAElC,mBAAmB;QACnB;YACE,qBAAO,gCAAC;gBAAgB,SAAS;gBAAS,OAAO;gBAAQ,GAAG,UAAU;;IAC1E;AACF;AAEA,SAAS,qCAAe,WAAC,OAAO,EAAsB;IACpD,qBACE,gCAAC;QACC,eAAY;QACZ,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC9B,eAAa,QAAQ,IAAI,KAAK,YAAY,YAAY,QAAQ,IAAI;OACjE,QAAQ,IAAI;AAGnB;AAEA,SAAS,sCAAgB,WAAC,OAAO,SAAE,KAAK,EAAyB;IAC/D,IAAI,MAAM,CAAA,GAAA,aAAK;IACf,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE,SAAS,OAAO;IACpD,qBACE,gCAAC;QACE,GAAG,YAAY;QAChB,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,kCAAkC;YAC9D,kBAAkB,QAAQ,aAAa;YACvC,gBAAgB,CAAC,QAAQ,UAAU;QACrC;QACA,OAAO;YACL,GAAG,aAAa,KAAK;YACrB,UAAU,QAAQ,QAAQ,IAAI,OAAO,OAAO,QAAQ,QAAQ,EAAE,MAAM,GAAG,OAAO;QAChF;QACA,eAAa,QAAQ,IAAI;qBACzB,gCAAC;QAAK,eAAY;QAAO,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAA2C,QAAQ,WAAW,GACpH,QAAQ,aAAa,GAAG,KAAK,QAAQ,IAAI;AAGhD","sources":["packages/@react-spectrum/datepicker/src/DatePickerSegment.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {DateFieldState, DateSegment} from '@react-stately/datepicker';\nimport {DatePickerBase, DateValue} from '@react-types/datepicker';\nimport React, {useRef} from 'react';\nimport styles from './styles.css';\nimport {useDateSegment} from '@react-aria/datepicker';\n\ninterface DatePickerSegmentProps extends DatePickerBase<DateValue> {\n segment: DateSegment,\n state: DateFieldState\n}\n\ninterface LiteralSegmentProps {\n segment: DateSegment\n}\n\nexport function DatePickerSegment({segment, state, ...otherProps}: DatePickerSegmentProps) {\n switch (segment.type) {\n // A separator, e.g. punctuation\n case 'literal':\n return <LiteralSegment segment={segment} />;\n\n // Editable segment\n default:\n return <EditableSegment segment={segment} state={state} {...otherProps} />;\n }\n}\n\nfunction LiteralSegment({segment}: LiteralSegmentProps) {\n return (\n <span\n aria-hidden=\"true\"\n className={classNames(styles, 'react-spectrum-Datepicker-literal')}\n data-testid={segment.type === 'literal' ? undefined : segment.type}>\n {segment.text}\n </span>\n );\n}\n\nfunction EditableSegment({segment, state}: DatePickerSegmentProps) {\n let ref = useRef();\n let {segmentProps} = useDateSegment(segment, state, ref);\n return (\n <div\n {...segmentProps}\n ref={ref}\n className={classNames(styles, 'react-spectrum-DatePicker-cell', {\n 'is-placeholder': segment.isPlaceholder,\n 'is-read-only': !segment.isEditable\n })}\n style={{\n ...segmentProps.style,\n minWidth: segment.maxValue != null ? String(segment.maxValue).length + 'ch' : null\n }}\n data-testid={segment.type}>\n <span aria-hidden=\"true\" className={classNames(styles, 'react-spectrum-DatePicker-placeholder')}>{segment.placeholder}</span>\n {segment.isPlaceholder ? '' : segment.text}\n </div>\n );\n}\n"],"names":[],"version":3,"file":"DatePickerSegment.module.js.map"}
1
+ {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAkBM,SAAS,0CAAkB,WAAC,OAAO,SAAE,KAAK,EAAE,GAAG,YAAmC;IACvF,OAAQ,QAAQ,IAAI;QAClB,gCAAgC;QAChC,KAAK;YACH,qBAAO,gCAAC;gBAAe,SAAS;;QAElC,mBAAmB;QACnB;YACE,qBAAO,gCAAC;gBAAgB,SAAS;gBAAS,OAAO;gBAAQ,GAAG,UAAU;;IAC1E;AACF;AAEA,SAAS,qCAAe,WAAC,OAAO,EAAsB;IACpD,qBACE,gCAAC;QACC,eAAY;QACZ,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC9B,eAAa,QAAQ,IAAI,KAAK,YAAY,YAAY,QAAQ,IAAI;OACjE,QAAQ,IAAI;AAGnB;AAEA,SAAS,sCAAgB,WAAC,OAAO,SAAE,KAAK,EAAyB;IAC/D,IAAI,MAAM,CAAA,GAAA,aAAK,EAAE;IACjB,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE,SAAS,OAAO;IAEpD,qBACE,gCAAC;QACE,GAAG,YAAY;QAChB,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,kCAAkC;YAC9D,kBAAkB,QAAQ,aAAa;YACvC,gBAAgB,CAAC,QAAQ,UAAU;QACrC;QACA,OAAO,aAAa,KAAK;QACzB,eAAa,QAAQ,IAAI;OACxB,QAAQ,aAAa,iBAAG,gCAAC;QAAK,eAAY;QAAO,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAA2C,QAAQ,WAAW,IAAW,QAAQ,IAAI;AAG3K","sources":["packages/@react-spectrum/datepicker/src/DatePickerSegment.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {DateFieldState, DateSegment} from '@react-stately/datepicker';\nimport {DatePickerBase, DateValue} from '@react-types/datepicker';\nimport React, {useRef} from 'react';\nimport styles from './styles.css';\nimport {useDateSegment} from '@react-aria/datepicker';\n\ninterface DatePickerSegmentProps extends DatePickerBase<DateValue> {\n segment: DateSegment,\n state: DateFieldState\n}\n\ninterface LiteralSegmentProps {\n segment: DateSegment\n}\n\nexport function DatePickerSegment({segment, state, ...otherProps}: DatePickerSegmentProps) {\n switch (segment.type) {\n // A separator, e.g. punctuation\n case 'literal':\n return <LiteralSegment segment={segment} />;\n\n // Editable segment\n default:\n return <EditableSegment segment={segment} state={state} {...otherProps} />;\n }\n}\n\nfunction LiteralSegment({segment}: LiteralSegmentProps) {\n return (\n <span\n aria-hidden=\"true\"\n className={classNames(styles, 'react-spectrum-Datepicker-literal')}\n data-testid={segment.type === 'literal' ? undefined : segment.type}>\n {segment.text}\n </span>\n );\n}\n\nfunction EditableSegment({segment, state}: DatePickerSegmentProps) {\n let ref = useRef(undefined);\n let {segmentProps} = useDateSegment(segment, state, ref);\n\n return (\n <div\n {...segmentProps}\n ref={ref}\n className={classNames(styles, 'react-spectrum-DatePicker-cell', {\n 'is-placeholder': segment.isPlaceholder,\n 'is-read-only': !segment.isEditable\n })}\n style={segmentProps.style}\n data-testid={segment.type}>\n {segment.isPlaceholder ? <span aria-hidden=\"true\" className={classNames(styles, 'react-spectrum-DatePicker-placeholder')}>{segment.placeholder}</span> : segment.text}\n </div>\n );\n}\n"],"names":[],"version":3,"file":"DatePickerSegment.module.js.map"}