@react-spectrum/datepicker 3.9.5 → 3.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DateField.main.js +3 -3
- package/dist/DateField.mjs +4 -4
- package/dist/DateField.module.js +3 -3
- package/dist/DatePicker.main.js +26 -26
- package/dist/DatePicker.mjs +27 -27
- package/dist/DatePicker.module.js +26 -26
- package/dist/DatePickerField.main.js +2 -2
- package/dist/DatePickerField.mjs +3 -3
- package/dist/DatePickerField.module.js +2 -2
- package/dist/DatePickerSegment.main.js +9 -9
- package/dist/DatePickerSegment.mjs +10 -10
- package/dist/DatePickerSegment.module.js +9 -9
- package/dist/DateRangePicker.main.js +32 -32
- package/dist/DateRangePicker.mjs +33 -33
- package/dist/DateRangePicker.module.js +32 -32
- package/dist/Input.main.js +16 -16
- package/dist/Input.mjs +17 -17
- package/dist/Input.module.js +16 -16
- package/dist/TimeField.main.js +3 -3
- package/dist/TimeField.mjs +4 -4
- package/dist/TimeField.module.js +3 -3
- package/dist/ar-AE.mjs +1 -1
- package/dist/bg-BG.mjs +1 -1
- package/dist/cs-CZ.mjs +1 -1
- package/dist/da-DK.mjs +1 -1
- package/dist/de-DE.mjs +1 -1
- package/dist/el-GR.mjs +1 -1
- package/dist/en-US.mjs +1 -1
- package/dist/es-ES.mjs +1 -1
- package/dist/et-EE.mjs +1 -1
- package/dist/fi-FI.mjs +1 -1
- package/dist/fr-FR.mjs +1 -1
- package/dist/he-IL.mjs +1 -1
- package/dist/hr-HR.mjs +1 -1
- package/dist/hu-HU.mjs +1 -1
- package/dist/inputgroup_vars_css.mjs +1 -1
- package/dist/intlStrings.mjs +1 -1
- package/dist/it-IT.mjs +1 -1
- package/dist/ja-JP.mjs +1 -1
- package/dist/ko-KR.mjs +1 -1
- package/dist/lt-LT.mjs +1 -1
- package/dist/lv-LV.mjs +1 -1
- package/dist/nb-NO.mjs +1 -1
- package/dist/nl-NL.mjs +1 -1
- package/dist/pl-PL.mjs +1 -1
- package/dist/pt-BR.mjs +1 -1
- package/dist/pt-PT.mjs +1 -1
- package/dist/ro-RO.mjs +1 -1
- package/dist/ru-RU.mjs +1 -1
- package/dist/sk-SK.mjs +1 -1
- package/dist/sl-SI.mjs +1 -1
- package/dist/sr-SP.mjs +1 -1
- package/dist/styles_css.mjs +1 -1
- package/dist/sv-SE.mjs +1 -1
- package/dist/textfield_vars_css.mjs +1 -1
- package/dist/tr-TR.mjs +1 -1
- package/dist/uk-UA.mjs +1 -1
- package/dist/utils.main.js +10 -10
- package/dist/utils.mjs +11 -11
- package/dist/utils.module.js +10 -10
- package/dist/zh-CN.mjs +1 -1
- package/dist/zh-TW.mjs +1 -1
- package/package.json +21 -21
package/dist/DateField.main.js
CHANGED
|
@@ -67,7 +67,7 @@ function $1ab74d2cd1dc2e45$var$DateField(props, ref) {
|
|
|
67
67
|
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
68
68
|
let description = (0, $4d2e419f522adb48$exports.useFormatHelpText)(props);
|
|
69
69
|
if (description && !props.description) descriptionProps.id = null;
|
|
70
|
-
let validationState = state.validationState || (isInvalid ?
|
|
70
|
+
let validationState = state.validationState || (isInvalid ? 'invalid' : null);
|
|
71
71
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($2sBGl$react))).createElement((0, $2sBGl$reactspectrumlabel.Field), {
|
|
72
72
|
...props,
|
|
73
73
|
ref: domRef,
|
|
@@ -80,7 +80,7 @@ function $1ab74d2cd1dc2e45$var$DateField(props, ref) {
|
|
|
80
80
|
isInvalid: isInvalid,
|
|
81
81
|
validationErrors: validationErrors,
|
|
82
82
|
validationDetails: validationDetails,
|
|
83
|
-
wrapperClassName: (0, $2sBGl$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))),
|
|
83
|
+
wrapperClassName: (0, $2sBGl$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-Datepicker-fieldWrapper')
|
|
84
84
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2sBGl$react))).createElement((0, $c3ebc4931d9b9977$exports.Input), {
|
|
85
85
|
ref: fieldRef,
|
|
86
86
|
fieldProps: fieldProps,
|
|
@@ -88,7 +88,7 @@ function $1ab74d2cd1dc2e45$var$DateField(props, ref) {
|
|
|
88
88
|
isQuiet: isQuiet,
|
|
89
89
|
autoFocus: autoFocus,
|
|
90
90
|
validationState: validationState,
|
|
91
|
-
className: (0, $2sBGl$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))),
|
|
91
|
+
className: (0, $2sBGl$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-DateField')
|
|
92
92
|
}, state.segments.map((segment, i)=>/*#__PURE__*/ (0, ($parcel$interopDefault($2sBGl$react))).createElement((0, $edac158d20ebe4a9$exports.DatePickerSegment), {
|
|
93
93
|
key: i,
|
|
94
94
|
segment: segment,
|
package/dist/DateField.mjs
CHANGED
|
@@ -61,7 +61,7 @@ function $0129798af6791690$var$DateField(props, ref) {
|
|
|
61
61
|
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
62
62
|
let description = (0, $04e96200274b03de$export$322f4580ccd8dde6)(props);
|
|
63
63
|
if (description && !props.description) descriptionProps.id = null;
|
|
64
|
-
let validationState = state.validationState || (isInvalid ?
|
|
64
|
+
let validationState = state.validationState || (isInvalid ? 'invalid' : null);
|
|
65
65
|
return /*#__PURE__*/ (0, $6iHxC$react).createElement((0, $6iHxC$Field), {
|
|
66
66
|
...props,
|
|
67
67
|
ref: domRef,
|
|
@@ -74,7 +74,7 @@ function $0129798af6791690$var$DateField(props, ref) {
|
|
|
74
74
|
isInvalid: isInvalid,
|
|
75
75
|
validationErrors: validationErrors,
|
|
76
76
|
validationDetails: validationDetails,
|
|
77
|
-
wrapperClassName: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))),
|
|
77
|
+
wrapperClassName: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))), 'react-spectrum-Datepicker-fieldWrapper')
|
|
78
78
|
}, /*#__PURE__*/ (0, $6iHxC$react).createElement((0, $79348162c55d687f$export$f5b8910cec6cf069), {
|
|
79
79
|
ref: fieldRef,
|
|
80
80
|
fieldProps: fieldProps,
|
|
@@ -82,7 +82,7 @@ function $0129798af6791690$var$DateField(props, ref) {
|
|
|
82
82
|
isQuiet: isQuiet,
|
|
83
83
|
autoFocus: autoFocus,
|
|
84
84
|
validationState: validationState,
|
|
85
|
-
className: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))),
|
|
85
|
+
className: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))), 'react-spectrum-DateField')
|
|
86
86
|
}, state.segments.map((segment, i)=>/*#__PURE__*/ (0, $6iHxC$react).createElement((0, $cfa347761f172638$export$6388987c5223b54e), {
|
|
87
87
|
key: i,
|
|
88
88
|
segment: segment,
|
|
@@ -102,4 +102,4 @@ function $0129798af6791690$var$DateField(props, ref) {
|
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
export {$0129798af6791690$export$d9781c7894a82487 as DateField};
|
|
105
|
-
//# sourceMappingURL=DateField.
|
|
105
|
+
//# sourceMappingURL=DateField.module.js.map
|
package/dist/DateField.module.js
CHANGED
|
@@ -61,7 +61,7 @@ function $0129798af6791690$var$DateField(props, ref) {
|
|
|
61
61
|
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
62
62
|
let description = (0, $04e96200274b03de$export$322f4580ccd8dde6)(props);
|
|
63
63
|
if (description && !props.description) descriptionProps.id = null;
|
|
64
|
-
let validationState = state.validationState || (isInvalid ?
|
|
64
|
+
let validationState = state.validationState || (isInvalid ? 'invalid' : null);
|
|
65
65
|
return /*#__PURE__*/ (0, $6iHxC$react).createElement((0, $6iHxC$Field), {
|
|
66
66
|
...props,
|
|
67
67
|
ref: domRef,
|
|
@@ -74,7 +74,7 @@ function $0129798af6791690$var$DateField(props, ref) {
|
|
|
74
74
|
isInvalid: isInvalid,
|
|
75
75
|
validationErrors: validationErrors,
|
|
76
76
|
validationDetails: validationDetails,
|
|
77
|
-
wrapperClassName: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))),
|
|
77
|
+
wrapperClassName: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))), 'react-spectrum-Datepicker-fieldWrapper')
|
|
78
78
|
}, /*#__PURE__*/ (0, $6iHxC$react).createElement((0, $79348162c55d687f$export$f5b8910cec6cf069), {
|
|
79
79
|
ref: fieldRef,
|
|
80
80
|
fieldProps: fieldProps,
|
|
@@ -82,7 +82,7 @@ function $0129798af6791690$var$DateField(props, ref) {
|
|
|
82
82
|
isQuiet: isQuiet,
|
|
83
83
|
autoFocus: autoFocus,
|
|
84
84
|
validationState: validationState,
|
|
85
|
-
className: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))),
|
|
85
|
+
className: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))), 'react-spectrum-DateField')
|
|
86
86
|
}, state.segments.map((segment, i)=>/*#__PURE__*/ (0, $6iHxC$react).createElement((0, $cfa347761f172638$export$6388987c5223b54e), {
|
|
87
87
|
key: i,
|
|
88
88
|
segment: segment,
|
package/dist/DatePicker.main.js
CHANGED
|
@@ -86,7 +86,7 @@ function $5c1ddf85d7c27889$var$DatePicker(props, ref) {
|
|
|
86
86
|
let { isOpen: isOpen, setOpen: setOpen } = state;
|
|
87
87
|
let { direction: direction } = (0, $2ni54$reactariai18n.useLocale)();
|
|
88
88
|
let domRef = (0, $4d2e419f522adb48$exports.useFocusManagerRef)(ref);
|
|
89
|
-
let stringFormatter = (0, $2ni54$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($0045b32a117743a7$exports))),
|
|
89
|
+
let stringFormatter = (0, $2ni54$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($0045b32a117743a7$exports))), '@react-spectrum/datepicker');
|
|
90
90
|
let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $2ni54$reactariafocus.useFocusRing)({
|
|
91
91
|
within: true,
|
|
92
92
|
isTextInput: true,
|
|
@@ -97,30 +97,30 @@ function $5c1ddf85d7c27889$var$DatePicker(props, ref) {
|
|
|
97
97
|
isTextInput: false,
|
|
98
98
|
autoFocus: autoFocus
|
|
99
99
|
});
|
|
100
|
-
let className = (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
let className = (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), 'spectrum-InputGroup', {
|
|
101
|
+
'spectrum-InputGroup--quiet': isQuiet,
|
|
102
|
+
'spectrum-InputGroup--invalid': isInvalid && !isDisabled,
|
|
103
|
+
'is-disabled': isDisabled,
|
|
104
|
+
'is-hovered': isHovered,
|
|
105
|
+
'is-focused': isFocused,
|
|
106
|
+
'focus-ring': isFocusVisible && !isFocusedButton
|
|
107
107
|
});
|
|
108
|
-
let fieldClassName = (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))),
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
let fieldClassName = (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), 'spectrum-InputGroup-input', {
|
|
109
|
+
'is-disabled': isDisabled,
|
|
110
|
+
'is-invalid': isInvalid && !isDisabled
|
|
111
111
|
});
|
|
112
112
|
// Note: this description is intentionally not passed to useDatePicker.
|
|
113
113
|
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
114
114
|
let description = (0, $4d2e419f522adb48$exports.useFormatHelpText)(props);
|
|
115
115
|
if (description && !props.description) descriptionProps.id = null;
|
|
116
116
|
let placeholder = placeholderValue;
|
|
117
|
-
let timePlaceholder = placeholder &&
|
|
118
|
-
let timeMinValue = props.minValue &&
|
|
119
|
-
let timeMaxValue = props.maxValue &&
|
|
120
|
-
let timeGranularity = state.granularity ===
|
|
117
|
+
let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : null;
|
|
118
|
+
let timeMinValue = props.minValue && 'hour' in props.minValue ? props.minValue : null;
|
|
119
|
+
let timeMaxValue = props.maxValue && 'hour' in props.maxValue ? props.maxValue : null;
|
|
120
|
+
let timeGranularity = state.granularity === 'hour' || state.granularity === 'minute' || state.granularity === 'second' ? state.granularity : null;
|
|
121
121
|
let showTimeField = !!timeGranularity;
|
|
122
122
|
let visibleMonths = (0, $4d2e419f522adb48$exports.useVisibleMonths)(maxVisibleMonths);
|
|
123
|
-
let validationState = state.validationState || (isInvalid ?
|
|
123
|
+
let validationState = state.validationState || (isInvalid ? 'invalid' : null);
|
|
124
124
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement((0, $2ni54$reactspectrumlabel.Field), {
|
|
125
125
|
...props,
|
|
126
126
|
ref: domRef,
|
|
@@ -133,7 +133,7 @@ function $5c1ddf85d7c27889$var$DatePicker(props, ref) {
|
|
|
133
133
|
isInvalid: isInvalid,
|
|
134
134
|
validationErrors: validationErrors,
|
|
135
135
|
validationDetails: validationDetails,
|
|
136
|
-
wrapperClassName: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))),
|
|
136
|
+
wrapperClassName: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-Datepicker-fieldWrapper')
|
|
137
137
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement("div", {
|
|
138
138
|
...(0, $2ni54$reactariautils.mergeProps)(groupProps, hoverProps, focusProps),
|
|
139
139
|
className: className,
|
|
@@ -142,7 +142,7 @@ function $5c1ddf85d7c27889$var$DatePicker(props, ref) {
|
|
|
142
142
|
isDisabled: isDisabled,
|
|
143
143
|
isQuiet: isQuiet,
|
|
144
144
|
validationState: validationState,
|
|
145
|
-
className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))),
|
|
145
|
+
className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), 'spectrum-InputGroup-field'),
|
|
146
146
|
inputClassName: fieldClassName,
|
|
147
147
|
disableFocusRing: true
|
|
148
148
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement((0, $bd22dc8dad9522bc$exports.DatePickerField), {
|
|
@@ -152,7 +152,7 @@ function $5c1ddf85d7c27889$var$DatePicker(props, ref) {
|
|
|
152
152
|
})), /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement((0, $2ni54$reactspectrumdialog.DialogTrigger), {
|
|
153
153
|
type: "popover",
|
|
154
154
|
mobileType: "tray",
|
|
155
|
-
placement: direction ===
|
|
155
|
+
placement: direction === 'rtl' ? 'bottom right' : 'bottom left',
|
|
156
156
|
targetRef: targetRef,
|
|
157
157
|
hideArrow: true,
|
|
158
158
|
isOpen: isOpen,
|
|
@@ -160,25 +160,25 @@ function $5c1ddf85d7c27889$var$DatePicker(props, ref) {
|
|
|
160
160
|
shouldFlip: props.shouldFlip
|
|
161
161
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement((0, $2ni54$reactspectrumbutton.FieldButton), {
|
|
162
162
|
...(0, $2ni54$reactariautils.mergeProps)(buttonProps, focusPropsButton),
|
|
163
|
-
UNSAFE_className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))),
|
|
163
|
+
UNSAFE_className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), 'spectrum-FieldButton'),
|
|
164
164
|
isQuiet: isQuiet,
|
|
165
165
|
validationState: validationState
|
|
166
166
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement((0, ($parcel$interopDefault($2ni54$spectrumiconsworkflowCalendar))), null)), /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement((0, $2ni54$reactspectrumdialog.Dialog), {
|
|
167
|
-
UNSAFE_className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))),
|
|
167
|
+
UNSAFE_className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-Datepicker-dialog'),
|
|
168
168
|
...dialogProps
|
|
169
169
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement((0, $2ni54$reactspectrumview.Content), null, /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement("div", {
|
|
170
|
-
className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))),
|
|
170
|
+
className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-Datepicker-dialogContent')
|
|
171
171
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement((0, $2ni54$reactspectrumcalendar.Calendar), {
|
|
172
172
|
...calendarProps,
|
|
173
173
|
visibleMonths: visibleMonths,
|
|
174
174
|
pageBehavior: pageBehavior,
|
|
175
|
-
UNSAFE_className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))),
|
|
176
|
-
|
|
175
|
+
UNSAFE_className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-Datepicker-calendar', {
|
|
176
|
+
'is-invalid': isInvalid
|
|
177
177
|
})
|
|
178
178
|
}), showTimeField && /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement("div", {
|
|
179
|
-
className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))),
|
|
179
|
+
className: (0, $2ni54$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-Datepicker-timeFields')
|
|
180
180
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2ni54$react))).createElement((0, $740ff83729a8f317$exports.TimeField), {
|
|
181
|
-
label: stringFormatter.format(
|
|
181
|
+
label: stringFormatter.format('time'),
|
|
182
182
|
value: state.timeValue,
|
|
183
183
|
onChange: state.setTimeValue,
|
|
184
184
|
placeholderValue: timePlaceholder,
|
package/dist/DatePicker.mjs
CHANGED
|
@@ -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))),
|
|
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,30 @@ 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))),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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))),
|
|
103
|
-
|
|
104
|
-
|
|
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 &&
|
|
112
|
-
let timeMinValue = props.minValue &&
|
|
113
|
-
let timeMaxValue = props.maxValue &&
|
|
114
|
-
let timeGranularity = state.granularity ===
|
|
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 ?
|
|
117
|
+
let validationState = state.validationState || (isInvalid ? 'invalid' : null);
|
|
118
118
|
return /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$Field), {
|
|
119
119
|
...props,
|
|
120
120
|
ref: domRef,
|
|
@@ -127,7 +127,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
127
127
|
isInvalid: isInvalid,
|
|
128
128
|
validationErrors: validationErrors,
|
|
129
129
|
validationDetails: validationDetails,
|
|
130
|
-
wrapperClassName: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))),
|
|
130
|
+
wrapperClassName: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-fieldWrapper')
|
|
131
131
|
}, /*#__PURE__*/ (0, $8czI1$react).createElement("div", {
|
|
132
132
|
...(0, $8czI1$mergeProps)(groupProps, hoverProps, focusProps),
|
|
133
133
|
className: className,
|
|
@@ -136,7 +136,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
136
136
|
isDisabled: isDisabled,
|
|
137
137
|
isQuiet: isQuiet,
|
|
138
138
|
validationState: validationState,
|
|
139
|
-
className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))),
|
|
139
|
+
className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-field'),
|
|
140
140
|
inputClassName: fieldClassName,
|
|
141
141
|
disableFocusRing: true
|
|
142
142
|
}, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $d2bb88c82604b25f$export$34dc4cfa15ead1), {
|
|
@@ -146,7 +146,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
146
146
|
})), /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$DialogTrigger), {
|
|
147
147
|
type: "popover",
|
|
148
148
|
mobileType: "tray",
|
|
149
|
-
placement: direction ===
|
|
149
|
+
placement: direction === 'rtl' ? 'bottom right' : 'bottom left',
|
|
150
150
|
targetRef: targetRef,
|
|
151
151
|
hideArrow: true,
|
|
152
152
|
isOpen: isOpen,
|
|
@@ -154,25 +154,25 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
154
154
|
shouldFlip: props.shouldFlip
|
|
155
155
|
}, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$FieldButton), {
|
|
156
156
|
...(0, $8czI1$mergeProps)(buttonProps, focusPropsButton),
|
|
157
|
-
UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))),
|
|
157
|
+
UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), 'spectrum-FieldButton'),
|
|
158
158
|
isQuiet: isQuiet,
|
|
159
159
|
validationState: validationState
|
|
160
160
|
}, /*#__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))),
|
|
161
|
+
UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-dialog'),
|
|
162
162
|
...dialogProps
|
|
163
163
|
}, /*#__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))),
|
|
164
|
+
className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-dialogContent')
|
|
165
165
|
}, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$Calendar), {
|
|
166
166
|
...calendarProps,
|
|
167
167
|
visibleMonths: visibleMonths,
|
|
168
168
|
pageBehavior: pageBehavior,
|
|
169
|
-
UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))),
|
|
170
|
-
|
|
169
|
+
UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-calendar', {
|
|
170
|
+
'is-invalid': isInvalid
|
|
171
171
|
})
|
|
172
172
|
}), showTimeField && /*#__PURE__*/ (0, $8czI1$react).createElement("div", {
|
|
173
|
-
className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))),
|
|
173
|
+
className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-timeFields')
|
|
174
174
|
}, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $f0a04554754386b6$export$5eaee2322dd727eb), {
|
|
175
|
-
label: stringFormatter.format(
|
|
175
|
+
label: stringFormatter.format('time'),
|
|
176
176
|
value: state.timeValue,
|
|
177
177
|
onChange: state.setTimeValue,
|
|
178
178
|
placeholderValue: timePlaceholder,
|
|
@@ -190,4 +190,4 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
190
190
|
|
|
191
191
|
|
|
192
192
|
export {$beaeefa091999363$export$5109c6dd95d8fb00 as DatePicker};
|
|
193
|
-
//# sourceMappingURL=DatePicker.
|
|
193
|
+
//# sourceMappingURL=DatePicker.module.js.map
|
|
@@ -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))),
|
|
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,30 @@ 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))),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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))),
|
|
103
|
-
|
|
104
|
-
|
|
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 &&
|
|
112
|
-
let timeMinValue = props.minValue &&
|
|
113
|
-
let timeMaxValue = props.maxValue &&
|
|
114
|
-
let timeGranularity = state.granularity ===
|
|
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 ?
|
|
117
|
+
let validationState = state.validationState || (isInvalid ? 'invalid' : null);
|
|
118
118
|
return /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$Field), {
|
|
119
119
|
...props,
|
|
120
120
|
ref: domRef,
|
|
@@ -127,7 +127,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
127
127
|
isInvalid: isInvalid,
|
|
128
128
|
validationErrors: validationErrors,
|
|
129
129
|
validationDetails: validationDetails,
|
|
130
|
-
wrapperClassName: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))),
|
|
130
|
+
wrapperClassName: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-fieldWrapper')
|
|
131
131
|
}, /*#__PURE__*/ (0, $8czI1$react).createElement("div", {
|
|
132
132
|
...(0, $8czI1$mergeProps)(groupProps, hoverProps, focusProps),
|
|
133
133
|
className: className,
|
|
@@ -136,7 +136,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
136
136
|
isDisabled: isDisabled,
|
|
137
137
|
isQuiet: isQuiet,
|
|
138
138
|
validationState: validationState,
|
|
139
|
-
className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))),
|
|
139
|
+
className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-field'),
|
|
140
140
|
inputClassName: fieldClassName,
|
|
141
141
|
disableFocusRing: true
|
|
142
142
|
}, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $d2bb88c82604b25f$export$34dc4cfa15ead1), {
|
|
@@ -146,7 +146,7 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
146
146
|
})), /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$DialogTrigger), {
|
|
147
147
|
type: "popover",
|
|
148
148
|
mobileType: "tray",
|
|
149
|
-
placement: direction ===
|
|
149
|
+
placement: direction === 'rtl' ? 'bottom right' : 'bottom left',
|
|
150
150
|
targetRef: targetRef,
|
|
151
151
|
hideArrow: true,
|
|
152
152
|
isOpen: isOpen,
|
|
@@ -154,25 +154,25 @@ function $beaeefa091999363$var$DatePicker(props, ref) {
|
|
|
154
154
|
shouldFlip: props.shouldFlip
|
|
155
155
|
}, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$FieldButton), {
|
|
156
156
|
...(0, $8czI1$mergeProps)(buttonProps, focusPropsButton),
|
|
157
|
-
UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))),
|
|
157
|
+
UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$inputgroup_vars_cssmodulejs))), 'spectrum-FieldButton'),
|
|
158
158
|
isQuiet: isQuiet,
|
|
159
159
|
validationState: validationState
|
|
160
160
|
}, /*#__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))),
|
|
161
|
+
UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-dialog'),
|
|
162
162
|
...dialogProps
|
|
163
163
|
}, /*#__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))),
|
|
164
|
+
className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-dialogContent')
|
|
165
165
|
}, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $8czI1$Calendar), {
|
|
166
166
|
...calendarProps,
|
|
167
167
|
visibleMonths: visibleMonths,
|
|
168
168
|
pageBehavior: pageBehavior,
|
|
169
|
-
UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))),
|
|
170
|
-
|
|
169
|
+
UNSAFE_className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-calendar', {
|
|
170
|
+
'is-invalid': isInvalid
|
|
171
171
|
})
|
|
172
172
|
}), showTimeField && /*#__PURE__*/ (0, $8czI1$react).createElement("div", {
|
|
173
|
-
className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))),
|
|
173
|
+
className: (0, $8czI1$classNames)((0, ($parcel$interopDefault($8czI1$styles_cssmodulejs))), 'react-spectrum-Datepicker-timeFields')
|
|
174
174
|
}, /*#__PURE__*/ (0, $8czI1$react).createElement((0, $f0a04554754386b6$export$5eaee2322dd727eb), {
|
|
175
|
-
label: stringFormatter.format(
|
|
175
|
+
label: stringFormatter.format('time'),
|
|
176
176
|
value: state.timeValue,
|
|
177
177
|
onChange: state.setTimeValue,
|
|
178
178
|
placeholderValue: timePlaceholder,
|
|
@@ -52,8 +52,8 @@ function $bd22dc8dad9522bc$export$34dc4cfa15ead1(props) {
|
|
|
52
52
|
}, state, ref);
|
|
53
53
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($g7Fnj$react))).createElement("div", {
|
|
54
54
|
...fieldProps,
|
|
55
|
-
"data-testid": props[
|
|
56
|
-
className: (0, $g7Fnj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))),
|
|
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,
|
package/dist/DatePickerField.mjs
CHANGED
|
@@ -46,8 +46,8 @@ function $d2bb88c82604b25f$export$34dc4cfa15ead1(props) {
|
|
|
46
46
|
}, state, ref);
|
|
47
47
|
return /*#__PURE__*/ (0, $332Ed$react).createElement("div", {
|
|
48
48
|
...fieldProps,
|
|
49
|
-
"data-testid": props[
|
|
50
|
-
className: (0, $332Ed$classNames)((0, ($parcel$interopDefault($332Ed$styles_cssmodulejs))),
|
|
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.
|
|
67
|
+
//# sourceMappingURL=DatePickerField.module.js.map
|
|
@@ -46,8 +46,8 @@ function $d2bb88c82604b25f$export$34dc4cfa15ead1(props) {
|
|
|
46
46
|
}, state, ref);
|
|
47
47
|
return /*#__PURE__*/ (0, $332Ed$react).createElement("div", {
|
|
48
48
|
...fieldProps,
|
|
49
|
-
"data-testid": props[
|
|
50
|
-
className: (0, $332Ed$classNames)((0, ($parcel$interopDefault($332Ed$styles_cssmodulejs))),
|
|
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,
|
|
@@ -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
|
|
34
|
+
case 'literal':
|
|
35
35
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($9PhAi$react))).createElement($edac158d20ebe4a9$var$LiteralSegment, {
|
|
36
36
|
segment: segment
|
|
37
37
|
});
|
|
@@ -47,8 +47,8 @@ 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))),
|
|
51
|
-
"data-testid": 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 }) {
|
|
@@ -57,19 +57,19 @@ function $edac158d20ebe4a9$var$EditableSegment({ segment: segment, state: state
|
|
|
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))),
|
|
61
|
-
|
|
62
|
-
|
|
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
64
|
style: {
|
|
65
65
|
...segmentProps.style,
|
|
66
|
-
minWidth: segment.maxValue != null ? String(segment.maxValue).length +
|
|
66
|
+
minWidth: segment.maxValue != null ? String(segment.maxValue).length + 'ch' : null
|
|
67
67
|
},
|
|
68
68
|
"data-testid": segment.type
|
|
69
69
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9PhAi$react))).createElement("span", {
|
|
70
70
|
"aria-hidden": "true",
|
|
71
|
-
className: (0, $9PhAi$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))),
|
|
72
|
-
}, segment.placeholder), segment.isPlaceholder ?
|
|
71
|
+
className: (0, $9PhAi$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-DatePicker-placeholder')
|
|
72
|
+
}, segment.placeholder), segment.isPlaceholder ? '' : segment.text);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
|
|
@@ -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
|
|
28
|
+
case 'literal':
|
|
29
29
|
return /*#__PURE__*/ (0, $jOVo7$react).createElement($cfa347761f172638$var$LiteralSegment, {
|
|
30
30
|
segment: segment
|
|
31
31
|
});
|
|
@@ -41,8 +41,8 @@ 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))),
|
|
45
|
-
"data-testid": 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 }) {
|
|
@@ -51,21 +51,21 @@ function $cfa347761f172638$var$EditableSegment({ segment: segment, state: state
|
|
|
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))),
|
|
55
|
-
|
|
56
|
-
|
|
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
58
|
style: {
|
|
59
59
|
...segmentProps.style,
|
|
60
|
-
minWidth: segment.maxValue != null ? String(segment.maxValue).length +
|
|
60
|
+
minWidth: segment.maxValue != null ? String(segment.maxValue).length + 'ch' : null
|
|
61
61
|
},
|
|
62
62
|
"data-testid": segment.type
|
|
63
63
|
}, /*#__PURE__*/ (0, $jOVo7$react).createElement("span", {
|
|
64
64
|
"aria-hidden": "true",
|
|
65
|
-
className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))),
|
|
66
|
-
}, segment.placeholder), segment.isPlaceholder ?
|
|
65
|
+
className: (0, $jOVo7$classNames)((0, ($parcel$interopDefault($jOVo7$styles_cssmodulejs))), 'react-spectrum-DatePicker-placeholder')
|
|
66
|
+
}, segment.placeholder), segment.isPlaceholder ? '' : segment.text);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
export {$cfa347761f172638$export$6388987c5223b54e as DatePickerSegment};
|
|
71
|
-
//# sourceMappingURL=DatePickerSegment.
|
|
71
|
+
//# sourceMappingURL=DatePickerSegment.module.js.map
|