linear-react-components-ui 2.1.0-beta.2 → 2.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,12 +17,13 @@ import { Triggers } from "./triggers.js";
17
17
  import { DateFieldContext } from "./context.js";
18
18
  import v1 from "../../../node_modules/uuid/dist/v1.js";
19
19
  const InputBase = React.forwardRef((props, ref) => {
20
- const $ = compilerRuntimeExports.c(183);
20
+ const $ = compilerRuntimeExports.c(186);
21
21
  let disabled;
22
22
  let errors;
23
23
  let label;
24
24
  let max;
25
25
  let min;
26
+ let onChange;
26
27
  let placeholder;
27
28
  let readOnly;
28
29
  let rest;
@@ -73,6 +74,7 @@ const InputBase = React.forwardRef((props, ref) => {
73
74
  shouldCloseOnSelect,
74
75
  min,
75
76
  max,
77
+ onChange,
76
78
  readOnly,
77
79
  disabled,
78
80
  ...rest
@@ -83,58 +85,60 @@ const InputBase = React.forwardRef((props, ref) => {
83
85
  $[3] = label;
84
86
  $[4] = max;
85
87
  $[5] = min;
86
- $[6] = placeholder;
87
- $[7] = readOnly;
88
- $[8] = rest;
89
- $[9] = shouldCloseOnSelect;
90
- $[10] = t0;
91
- $[11] = t1;
92
- $[12] = t10;
93
- $[13] = t11;
94
- $[14] = t12;
95
- $[15] = t13;
96
- $[16] = t14;
97
- $[17] = t15;
98
- $[18] = t2;
99
- $[19] = t3;
100
- $[20] = t4;
101
- $[21] = t5;
102
- $[22] = t6;
103
- $[23] = t7;
104
- $[24] = t8;
105
- $[25] = t9;
106
- $[26] = tooltip;
107
- $[27] = tooltipPosition;
108
- $[28] = tooltipWidth;
88
+ $[6] = onChange;
89
+ $[7] = placeholder;
90
+ $[8] = readOnly;
91
+ $[9] = rest;
92
+ $[10] = shouldCloseOnSelect;
93
+ $[11] = t0;
94
+ $[12] = t1;
95
+ $[13] = t10;
96
+ $[14] = t11;
97
+ $[15] = t12;
98
+ $[16] = t13;
99
+ $[17] = t14;
100
+ $[18] = t15;
101
+ $[19] = t2;
102
+ $[20] = t3;
103
+ $[21] = t4;
104
+ $[22] = t5;
105
+ $[23] = t6;
106
+ $[24] = t7;
107
+ $[25] = t8;
108
+ $[26] = t9;
109
+ $[27] = tooltip;
110
+ $[28] = tooltipPosition;
111
+ $[29] = tooltipWidth;
109
112
  } else {
110
113
  disabled = $[1];
111
114
  errors = $[2];
112
115
  label = $[3];
113
116
  max = $[4];
114
117
  min = $[5];
115
- placeholder = $[6];
116
- readOnly = $[7];
117
- rest = $[8];
118
- shouldCloseOnSelect = $[9];
119
- t0 = $[10];
120
- t1 = $[11];
121
- t10 = $[12];
122
- t11 = $[13];
123
- t12 = $[14];
124
- t13 = $[15];
125
- t14 = $[16];
126
- t15 = $[17];
127
- t2 = $[18];
128
- t3 = $[19];
129
- t4 = $[20];
130
- t5 = $[21];
131
- t6 = $[22];
132
- t7 = $[23];
133
- t8 = $[24];
134
- t9 = $[25];
135
- tooltip = $[26];
136
- tooltipPosition = $[27];
137
- tooltipWidth = $[28];
118
+ onChange = $[6];
119
+ placeholder = $[7];
120
+ readOnly = $[8];
121
+ rest = $[9];
122
+ shouldCloseOnSelect = $[10];
123
+ t0 = $[11];
124
+ t1 = $[12];
125
+ t10 = $[13];
126
+ t11 = $[14];
127
+ t12 = $[15];
128
+ t13 = $[16];
129
+ t14 = $[17];
130
+ t15 = $[18];
131
+ t2 = $[19];
132
+ t3 = $[20];
133
+ t4 = $[21];
134
+ t5 = $[22];
135
+ t6 = $[23];
136
+ t7 = $[24];
137
+ t8 = $[25];
138
+ t9 = $[26];
139
+ tooltip = $[27];
140
+ tooltipPosition = $[28];
141
+ tooltipWidth = $[29];
138
142
  }
139
143
  const returnValueType = t0 === void 0 ? "default" : t0;
140
144
  const customClass = t1 === void 0 ? "" : t1;
@@ -161,21 +165,21 @@ const InputBase = React.forwardRef((props, ref) => {
161
165
  const shouldCloseCalendarOnSelect = shouldCloseOnSelect ?? !isDateTime;
162
166
  const inputPlaceholder = placeholder ?? ptbrFormat;
163
167
  let t16;
164
- if ($[29] !== min) {
168
+ if ($[30] !== min) {
165
169
  t16 = parseBoundary(min);
166
- $[29] = min;
167
- $[30] = t16;
170
+ $[30] = min;
171
+ $[31] = t16;
168
172
  } else {
169
- t16 = $[30];
173
+ t16 = $[31];
170
174
  }
171
175
  const minDate = t16;
172
176
  let t17;
173
- if ($[31] !== max) {
177
+ if ($[32] !== max) {
174
178
  t17 = parseBoundary(max);
175
- $[31] = max;
176
- $[32] = t17;
179
+ $[32] = max;
180
+ $[33] = t17;
177
181
  } else {
178
- t17 = $[32];
182
+ t17 = $[33];
179
183
  }
180
184
  const maxDate = t17;
181
185
  const hasBounds = Boolean(minDate || maxDate);
@@ -206,44 +210,46 @@ const InputBase = React.forwardRef((props, ref) => {
206
210
  unmaskedValue,
207
211
  setMaskValue,
208
212
  handleOnPaste,
209
- handleOnBeforeInput
213
+ handleOnBeforeInput,
214
+ handleOnKeyDownCapture
210
215
  } = useDateMask({
211
216
  inputRef: dateInputRef,
212
217
  variant,
213
218
  defaultValue: selectedDate?.format(ptbrFormat),
214
219
  undigitable,
220
+ readOnly,
215
221
  onCommit: (date) => handleUpdateDateState(date),
216
222
  onPaste: props.onPaste,
217
223
  onBeforeInput: props.onBeforeInput
218
224
  });
219
225
  let t18;
220
- if ($[33] !== props.id || $[34] !== props.name) {
226
+ if ($[34] !== props.id || $[35] !== props.name) {
221
227
  t18 = props.id || props.name || v1();
222
- $[33] = props.id;
223
- $[34] = props.name;
224
- $[35] = t18;
228
+ $[34] = props.id;
229
+ $[35] = props.name;
230
+ $[36] = t18;
225
231
  } else {
226
- t18 = $[35];
232
+ t18 = $[36];
227
233
  }
228
234
  const inputId = t18;
229
235
  let t19;
230
- if ($[36] !== props.label) {
236
+ if ($[37] !== props.label) {
231
237
  t19 = _.isEmpty(props?.label);
232
- $[36] = props.label;
233
- $[37] = t19;
238
+ $[37] = props.label;
239
+ $[38] = t19;
234
240
  } else {
235
- t19 = $[37];
241
+ t19 = $[38];
236
242
  }
237
243
  const hasLabel = !t19;
238
244
  const hasHintMessages = Boolean(props.hint?.length);
239
245
  const hasValidationErrors = Boolean(errors?.length);
240
246
  let t20;
241
- if ($[38] !== props.value) {
247
+ if ($[39] !== props.value) {
242
248
  t20 = _.isEmpty(props?.value);
243
- $[38] = props.value;
244
- $[39] = t20;
249
+ $[39] = props.value;
250
+ $[40] = t20;
245
251
  } else {
246
- t20 = $[39];
252
+ t20 = $[40];
247
253
  }
248
254
  const hasValidDateSelected = !t20;
249
255
  const handleUpdateDateState = (date_0) => {
@@ -252,7 +258,7 @@ const InputBase = React.forwardRef((props, ref) => {
252
258
  setSelectedDate(date_0.clone());
253
259
  handleChangeActiveDescendant(date_0.format(TOKEN_ISO_FORMAT));
254
260
  handleChangeCalendarDisplayDate(date_0.clone());
255
- props.onChange?.({
261
+ onChange?.({
256
262
  target: {
257
263
  name: props.name,
258
264
  value: returnValueType === "default" ? nonIsoDateFormat : isoDateFormat
@@ -263,9 +269,9 @@ const InputBase = React.forwardRef((props, ref) => {
263
269
  }
264
270
  };
265
271
  let t21;
266
- if ($[40] !== handleSetCalendarBoxOpen || $[41] !== props || $[42] !== setMaskValue || $[43] !== setSelectedDate) {
272
+ if ($[41] !== handleSetCalendarBoxOpen || $[42] !== onChange || $[43] !== props.name || $[44] !== setMaskValue || $[45] !== setSelectedDate) {
267
273
  t21 = () => {
268
- props.onChange?.({
274
+ onChange?.({
269
275
  target: {
270
276
  name: props.name,
271
277
  value: ""
@@ -275,17 +281,18 @@ const InputBase = React.forwardRef((props, ref) => {
275
281
  setMaskValue("");
276
282
  handleSetCalendarBoxOpen(false);
277
283
  };
278
- $[40] = handleSetCalendarBoxOpen;
279
- $[41] = props;
280
- $[42] = setMaskValue;
281
- $[43] = setSelectedDate;
282
- $[44] = t21;
284
+ $[41] = handleSetCalendarBoxOpen;
285
+ $[42] = onChange;
286
+ $[43] = props.name;
287
+ $[44] = setMaskValue;
288
+ $[45] = setSelectedDate;
289
+ $[46] = t21;
283
290
  } else {
284
- t21 = $[44];
291
+ t21 = $[46];
285
292
  }
286
293
  const handleOnClickClearSelectedDate = t21;
287
294
  let t22;
288
- if ($[45] !== digits || $[46] !== handleChangeActiveDescendant || $[47] !== handleChangeCalendarDisplayDate || $[48] !== handleSetCalendarBoxOpen || $[49] !== props || $[50] !== ptbrFormat || $[51] !== selectedDate || $[52] !== setMaskValue || $[53] !== unmaskedValue || $[54] !== variant) {
295
+ if ($[47] !== digits || $[48] !== handleChangeActiveDescendant || $[49] !== handleChangeCalendarDisplayDate || $[50] !== handleSetCalendarBoxOpen || $[51] !== props || $[52] !== ptbrFormat || $[53] !== selectedDate || $[54] !== setMaskValue || $[55] !== unmaskedValue || $[56] !== variant) {
289
296
  t22 = (event) => {
290
297
  props?.onBlur?.(event);
291
298
  handleSetCalendarBoxOpen(false);
@@ -298,23 +305,23 @@ const InputBase = React.forwardRef((props, ref) => {
298
305
  }
299
306
  }
300
307
  };
301
- $[45] = digits;
302
- $[46] = handleChangeActiveDescendant;
303
- $[47] = handleChangeCalendarDisplayDate;
304
- $[48] = handleSetCalendarBoxOpen;
305
- $[49] = props;
306
- $[50] = ptbrFormat;
307
- $[51] = selectedDate;
308
- $[52] = setMaskValue;
309
- $[53] = unmaskedValue;
310
- $[54] = variant;
311
- $[55] = t22;
308
+ $[47] = digits;
309
+ $[48] = handleChangeActiveDescendant;
310
+ $[49] = handleChangeCalendarDisplayDate;
311
+ $[50] = handleSetCalendarBoxOpen;
312
+ $[51] = props;
313
+ $[52] = ptbrFormat;
314
+ $[53] = selectedDate;
315
+ $[54] = setMaskValue;
316
+ $[55] = unmaskedValue;
317
+ $[56] = variant;
318
+ $[57] = t22;
312
319
  } else {
313
- t22 = $[55];
320
+ t22 = $[57];
314
321
  }
315
322
  const handleOnBlur = t22;
316
323
  let t23;
317
- if ($[56] !== handleChangeActiveDescendant || $[57] !== handleChangeCalendarDisplayDate || $[58] !== handleSetCalendarBoxOpen || $[59] !== openCalendarOnFocus || $[60] !== props || $[61] !== readOnly || $[62] !== selectedDate) {
324
+ if ($[58] !== handleChangeActiveDescendant || $[59] !== handleChangeCalendarDisplayDate || $[60] !== handleSetCalendarBoxOpen || $[61] !== openCalendarOnFocus || $[62] !== props || $[63] !== readOnly || $[64] !== selectedDate) {
318
325
  t23 = (event_0) => {
319
326
  props?.onFocus?.(event_0);
320
327
  handleChangeActiveDescendant((selectedDate ?? hooks()).format(TOKEN_ISO_FORMAT));
@@ -323,44 +330,44 @@ const InputBase = React.forwardRef((props, ref) => {
323
330
  handleSetCalendarBoxOpen(true);
324
331
  }
325
332
  };
326
- $[56] = handleChangeActiveDescendant;
327
- $[57] = handleChangeCalendarDisplayDate;
328
- $[58] = handleSetCalendarBoxOpen;
329
- $[59] = openCalendarOnFocus;
330
- $[60] = props;
331
- $[61] = readOnly;
332
- $[62] = selectedDate;
333
- $[63] = t23;
333
+ $[58] = handleChangeActiveDescendant;
334
+ $[59] = handleChangeCalendarDisplayDate;
335
+ $[60] = handleSetCalendarBoxOpen;
336
+ $[61] = openCalendarOnFocus;
337
+ $[62] = props;
338
+ $[63] = readOnly;
339
+ $[64] = selectedDate;
340
+ $[65] = t23;
334
341
  } else {
335
- t23 = $[63];
342
+ t23 = $[65];
336
343
  }
337
344
  const handleOnFocus = t23;
338
345
  let t24;
339
- if ($[64] !== handleKeyDownNavigation || $[65] !== props) {
346
+ if ($[66] !== handleKeyDownNavigation || $[67] !== props) {
340
347
  t24 = (event_1) => {
341
348
  props?.onKeyDown?.(event_1);
342
349
  handleKeyDownNavigation(event_1);
343
350
  };
344
- $[64] = handleKeyDownNavigation;
345
- $[65] = props;
346
- $[66] = t24;
351
+ $[66] = handleKeyDownNavigation;
352
+ $[67] = props;
353
+ $[68] = t24;
347
354
  } else {
348
- t24 = $[66];
355
+ t24 = $[68];
349
356
  }
350
357
  const handleOnKeyDown = t24;
351
358
  let t25;
352
- if ($[67] !== handleUpdateDateState || $[68] !== selectedDate) {
359
+ if ($[69] !== handleUpdateDateState || $[70] !== selectedDate) {
353
360
  t25 = (hour, minute) => {
354
361
  if (!selectedDate) {
355
362
  return;
356
363
  }
357
364
  handleUpdateDateState(selectedDate.clone().hour(hour).minute(minute).second(0));
358
365
  };
359
- $[67] = handleUpdateDateState;
360
- $[68] = selectedDate;
361
- $[69] = t25;
366
+ $[69] = handleUpdateDateState;
367
+ $[70] = selectedDate;
368
+ $[71] = t25;
362
369
  } else {
363
- t25 = $[69];
370
+ t25 = $[71];
364
371
  }
365
372
  const handleSelectTime = t25;
366
373
  const handleSelectDay = (day) => {
@@ -368,35 +375,35 @@ const InputBase = React.forwardRef((props, ref) => {
368
375
  handleUpdateDateState(clampDateToBounds(dayWithTime, minDate, maxDate));
369
376
  };
370
377
  let t26;
371
- if ($[70] !== props.value || $[71] !== ptbrFormat || $[72] !== setMaskValue || $[73] !== setSelectedDate || $[74] !== variant) {
378
+ if ($[72] !== props.value || $[73] !== ptbrFormat || $[74] !== setMaskValue || $[75] !== setSelectedDate || $[76] !== variant) {
372
379
  t26 = () => {
373
380
  const date_2 = parseDateValue(props?.value ?? null, variant);
374
381
  setSelectedDate(date_2.isValid() ? date_2 : null);
375
382
  setMaskValue(date_2.format(ptbrFormat));
376
383
  };
377
- $[70] = props.value;
378
- $[71] = ptbrFormat;
379
- $[72] = setMaskValue;
380
- $[73] = setSelectedDate;
381
- $[74] = variant;
382
- $[75] = t26;
384
+ $[72] = props.value;
385
+ $[73] = ptbrFormat;
386
+ $[74] = setMaskValue;
387
+ $[75] = setSelectedDate;
388
+ $[76] = variant;
389
+ $[77] = t26;
383
390
  } else {
384
- t26 = $[75];
391
+ t26 = $[77];
385
392
  }
386
393
  const t27 = props?.value;
387
394
  let t28;
388
- if ($[76] !== t27) {
395
+ if ($[78] !== t27) {
389
396
  t28 = [t27];
390
- $[76] = t27;
391
- $[77] = t28;
397
+ $[78] = t27;
398
+ $[79] = t28;
392
399
  } else {
393
- t28 = $[77];
400
+ t28 = $[79];
394
401
  }
395
402
  React.useEffect(t26, t28);
396
403
  const t29 = Boolean(readOnly);
397
404
  const t30 = Boolean(disabled);
398
405
  let t31;
399
- if ($[78] !== calendarState || $[79] !== handleOnClickClearSelectedDate || $[80] !== handleUpdateDateState || $[81] !== hasValidDateSelected || $[82] !== inputId || $[83] !== label || $[84] !== maskedValue || $[85] !== selectedDate || $[86] !== showCalendarButton || $[87] !== showClearDateButton || $[88] !== skeletonize || $[89] !== t29 || $[90] !== t30 || $[91] !== unmaskedValue) {
406
+ if ($[80] !== calendarState || $[81] !== handleOnClickClearSelectedDate || $[82] !== handleUpdateDateState || $[83] !== hasValidDateSelected || $[84] !== inputId || $[85] !== label || $[86] !== maskedValue || $[87] !== selectedDate || $[88] !== showCalendarButton || $[89] !== showClearDateButton || $[90] !== skeletonize || $[91] !== t29 || $[92] !== t30 || $[93] !== unmaskedValue) {
400
407
  t31 = {
401
408
  ...calendarState,
402
409
  label,
@@ -414,157 +421,158 @@ const InputBase = React.forwardRef((props, ref) => {
414
421
  handleOnClickClearSelectedDate,
415
422
  handleSelectDate: handleUpdateDateState
416
423
  };
417
- $[78] = calendarState;
418
- $[79] = handleOnClickClearSelectedDate;
419
- $[80] = handleUpdateDateState;
420
- $[81] = hasValidDateSelected;
421
- $[82] = inputId;
422
- $[83] = label;
423
- $[84] = maskedValue;
424
- $[85] = selectedDate;
425
- $[86] = showCalendarButton;
426
- $[87] = showClearDateButton;
427
- $[88] = skeletonize;
428
- $[89] = t29;
429
- $[90] = t30;
430
- $[91] = unmaskedValue;
431
- $[92] = t31;
424
+ $[80] = calendarState;
425
+ $[81] = handleOnClickClearSelectedDate;
426
+ $[82] = handleUpdateDateState;
427
+ $[83] = hasValidDateSelected;
428
+ $[84] = inputId;
429
+ $[85] = label;
430
+ $[86] = maskedValue;
431
+ $[87] = selectedDate;
432
+ $[88] = showCalendarButton;
433
+ $[89] = showClearDateButton;
434
+ $[90] = skeletonize;
435
+ $[91] = t29;
436
+ $[92] = t30;
437
+ $[93] = unmaskedValue;
438
+ $[94] = t31;
432
439
  } else {
433
- t31 = $[92];
440
+ t31 = $[94];
434
441
  }
435
442
  const contextValues = t31;
436
443
  let t32;
437
- if ($[93] !== customClassLabel || $[94] !== disabled || $[95] !== hasHintMessages || $[96] !== hasLabel || $[97] !== hintPosition || $[98] !== inputId || $[99] !== label || $[100] !== labelUppercase || $[101] !== popoverAlign || $[102] !== props.hint || $[103] !== props.required || $[104] !== readOnly || $[105] !== skeletonize || $[106] !== themePopover) {
444
+ if ($[95] !== customClassLabel || $[96] !== disabled || $[97] !== hasHintMessages || $[98] !== hasLabel || $[99] !== hintPosition || $[100] !== inputId || $[101] !== label || $[102] !== labelUppercase || $[103] !== popoverAlign || $[104] !== props.hint || $[105] !== props.required || $[106] !== readOnly || $[107] !== skeletonize || $[108] !== themePopover) {
438
445
  t32 = hasLabel && /* @__PURE__ */ jsx(Label, { "data-testid": "test-date-field-label", label, inputId, hint: props?.hint, isDisabled: disabled, isReadOnly: readOnly, skeletonize, required: props?.required, hintPosition, themePopover, popoverAlign, labelUppercase, hasHintMessages, customClassLabel });
439
- $[93] = customClassLabel;
440
- $[94] = disabled;
441
- $[95] = hasHintMessages;
442
- $[96] = hasLabel;
443
- $[97] = hintPosition;
444
- $[98] = inputId;
445
- $[99] = label;
446
- $[100] = labelUppercase;
447
- $[101] = popoverAlign;
448
- $[102] = props.hint;
449
- $[103] = props.required;
450
- $[104] = readOnly;
451
- $[105] = skeletonize;
452
- $[106] = themePopover;
453
- $[107] = t32;
446
+ $[95] = customClassLabel;
447
+ $[96] = disabled;
448
+ $[97] = hasHintMessages;
449
+ $[98] = hasLabel;
450
+ $[99] = hintPosition;
451
+ $[100] = inputId;
452
+ $[101] = label;
453
+ $[102] = labelUppercase;
454
+ $[103] = popoverAlign;
455
+ $[104] = props.hint;
456
+ $[105] = props.required;
457
+ $[106] = readOnly;
458
+ $[107] = skeletonize;
459
+ $[108] = themePopover;
460
+ $[109] = t32;
454
461
  } else {
455
- t32 = $[107];
462
+ t32 = $[109];
456
463
  }
457
464
  let t33;
458
- if ($[108] !== ref) {
465
+ if ($[110] !== ref) {
459
466
  t33 = mergeRefs(ref, dateInputRef);
460
- $[108] = ref;
461
- $[109] = t33;
467
+ $[110] = ref;
468
+ $[111] = t33;
462
469
  } else {
463
- t33 = $[109];
470
+ t33 = $[111];
464
471
  }
465
472
  const t34 = props?.name;
466
473
  const t35 = !readOnly && !skeletonize ? 0 : -1;
467
474
  let t36;
468
- if ($[110] !== activeDescendant || $[111] !== calendarBoxOpen || $[112] !== customClass || $[113] !== disabled || $[114] !== handleOnBeforeInput || $[115] !== handleOnBlur || $[116] !== handleOnFocus || $[117] !== handleOnKeyDown || $[118] !== handleOnPaste || $[119] !== hasValidationErrors || $[120] !== inputId || $[121] !== inputPlaceholder || $[122] !== maskedValue || $[123] !== readOnly || $[124] !== rest || $[125] !== skeletonize || $[126] !== t33 || $[127] !== t34 || $[128] !== t35 || $[129] !== textAlign || $[130] !== undigitable) {
469
- t36 = /* @__PURE__ */ jsx(Input, { ...rest, ref: t33, id: inputId, name: t34, value: maskedValue, readOnly, disabled, customClass, tabIndex: t35, placeholder: inputPlaceholder, "aria-activedescendant": activeDescendant, "aria-expanded": calendarBoxOpen, "aria-controls": inputId, "aria-labelledby": inputId, "data-state-is-period-input": false, "data-testid": "test-date-field-input", "data-state-error": hasValidationErrors, "data-state-read-only": readOnly, "data-state-text-align": textAlign, "data-state-undigitable": undigitable, "data-state-skeletonize": skeletonize, onBlur: handleOnBlur, onFocus: handleOnFocus, onPaste: handleOnPaste, onKeyDown: handleOnKeyDown, onBeforeInput: handleOnBeforeInput });
470
- $[110] = activeDescendant;
471
- $[111] = calendarBoxOpen;
472
- $[112] = customClass;
473
- $[113] = disabled;
474
- $[114] = handleOnBeforeInput;
475
- $[115] = handleOnBlur;
476
- $[116] = handleOnFocus;
477
- $[117] = handleOnKeyDown;
478
- $[118] = handleOnPaste;
479
- $[119] = hasValidationErrors;
480
- $[120] = inputId;
481
- $[121] = inputPlaceholder;
482
- $[122] = maskedValue;
483
- $[123] = readOnly;
484
- $[124] = rest;
485
- $[125] = skeletonize;
486
- $[126] = t33;
487
- $[127] = t34;
488
- $[128] = t35;
489
- $[129] = textAlign;
490
- $[130] = undigitable;
491
- $[131] = t36;
475
+ if ($[112] !== activeDescendant || $[113] !== calendarBoxOpen || $[114] !== customClass || $[115] !== disabled || $[116] !== handleOnBeforeInput || $[117] !== handleOnBlur || $[118] !== handleOnFocus || $[119] !== handleOnKeyDown || $[120] !== handleOnKeyDownCapture || $[121] !== handleOnPaste || $[122] !== hasValidationErrors || $[123] !== inputId || $[124] !== inputPlaceholder || $[125] !== maskedValue || $[126] !== readOnly || $[127] !== rest || $[128] !== skeletonize || $[129] !== t33 || $[130] !== t34 || $[131] !== t35 || $[132] !== textAlign || $[133] !== undigitable) {
476
+ t36 = /* @__PURE__ */ jsx(Input, { ...rest, ref: t33, id: inputId, name: t34, value: maskedValue, readOnly, disabled, customClass, tabIndex: t35, placeholder: inputPlaceholder, "aria-activedescendant": activeDescendant, "aria-expanded": calendarBoxOpen, "aria-controls": inputId, "aria-labelledby": inputId, "data-state-is-period-input": false, "data-testid": "test-date-field-input", "data-state-error": hasValidationErrors, "data-state-read-only": readOnly, "data-state-text-align": textAlign, "data-state-undigitable": undigitable, "data-state-skeletonize": skeletonize, onBlur: handleOnBlur, onFocus: handleOnFocus, onPaste: handleOnPaste, onKeyDown: handleOnKeyDown, onKeyDownCapture: handleOnKeyDownCapture, onBeforeInput: handleOnBeforeInput });
477
+ $[112] = activeDescendant;
478
+ $[113] = calendarBoxOpen;
479
+ $[114] = customClass;
480
+ $[115] = disabled;
481
+ $[116] = handleOnBeforeInput;
482
+ $[117] = handleOnBlur;
483
+ $[118] = handleOnFocus;
484
+ $[119] = handleOnKeyDown;
485
+ $[120] = handleOnKeyDownCapture;
486
+ $[121] = handleOnPaste;
487
+ $[122] = hasValidationErrors;
488
+ $[123] = inputId;
489
+ $[124] = inputPlaceholder;
490
+ $[125] = maskedValue;
491
+ $[126] = readOnly;
492
+ $[127] = rest;
493
+ $[128] = skeletonize;
494
+ $[129] = t33;
495
+ $[130] = t34;
496
+ $[131] = t35;
497
+ $[132] = textAlign;
498
+ $[133] = undigitable;
499
+ $[134] = t36;
492
500
  } else {
493
- t36 = $[131];
501
+ t36 = $[134];
494
502
  }
495
503
  let t37;
496
- if ($[132] === Symbol.for("react.memo_cache_sentinel")) {
504
+ if ($[135] === Symbol.for("react.memo_cache_sentinel")) {
497
505
  t37 = /* @__PURE__ */ jsx(Triggers, {});
498
- $[132] = t37;
506
+ $[135] = t37;
499
507
  } else {
500
- t37 = $[132];
508
+ t37 = $[135];
501
509
  }
502
510
  let t38;
503
- if ($[133] !== customClassInputContainer || $[134] !== dateContainerRef || $[135] !== skeletonize || $[136] !== t36) {
511
+ if ($[136] !== customClassInputContainer || $[137] !== dateContainerRef || $[138] !== skeletonize || $[139] !== t36) {
504
512
  t38 = /* @__PURE__ */ jsxs(Container, { ref: dateContainerRef, skeletonize, customClassInputContainer, children: [
505
513
  t36,
506
514
  t37
507
515
  ] });
508
- $[133] = customClassInputContainer;
509
- $[134] = dateContainerRef;
510
- $[135] = skeletonize;
511
- $[136] = t36;
512
- $[137] = t38;
516
+ $[136] = customClassInputContainer;
517
+ $[137] = dateContainerRef;
518
+ $[138] = skeletonize;
519
+ $[139] = t36;
520
+ $[140] = t38;
513
521
  } else {
514
- t38 = $[137];
522
+ t38 = $[140];
515
523
  }
516
524
  let t39;
517
- if ($[138] !== activeDescendant || $[139] !== calendarBoxOpen || $[140] !== calendarDisplayDate || $[141] !== calendarRef || $[142] !== dateContainerRef || $[143] !== handleNextMonth || $[144] !== handlePreviousMonth || $[145] !== handleSelectDay || $[146] !== handleSelectTime || $[147] !== hasBounds || $[148] !== inputId || $[149] !== isDateTime || $[150] !== maxDate || $[151] !== minDate || $[152] !== selectedDate) {
525
+ if ($[141] !== activeDescendant || $[142] !== calendarBoxOpen || $[143] !== calendarDisplayDate || $[144] !== calendarRef || $[145] !== dateContainerRef || $[146] !== handleNextMonth || $[147] !== handlePreviousMonth || $[148] !== handleSelectDay || $[149] !== handleSelectTime || $[150] !== hasBounds || $[151] !== inputId || $[152] !== isDateTime || $[153] !== maxDate || $[154] !== minDate || $[155] !== selectedDate) {
518
526
  t39 = calendarBoxOpen && createPortal(/* @__PURE__ */ jsx(CalendarBox, { ref: calendarRef, testIdPrefix: "test-date-field", headerId: inputId, calendarBoxOpen, activeDescendant, calendarDisplayDate, containerRef: dateContainerRef, onNextMonth: handleNextMonth, onPreviousMonth: handlePreviousMonth, getDayState: (day_0) => ({
519
527
  isSelected: selectedDate ? day_0.isSame(selectedDate, "day") : false,
520
528
  ...hasBounds && {
521
529
  isDisabled: isDayOutOfBounds(day_0, minDate, maxDate)
522
530
  }
523
531
  }), onSelectDay: handleSelectDay, children: isDateTime && /* @__PURE__ */ jsx(TimeSelector, { value: selectedDate, onSelectTime: handleSelectTime, min: minDate, max: maxDate, testIdPrefix: "test-date-field" }) }), document.body);
524
- $[138] = activeDescendant;
525
- $[139] = calendarBoxOpen;
526
- $[140] = calendarDisplayDate;
527
- $[141] = calendarRef;
528
- $[142] = dateContainerRef;
529
- $[143] = handleNextMonth;
530
- $[144] = handlePreviousMonth;
531
- $[145] = handleSelectDay;
532
- $[146] = handleSelectTime;
533
- $[147] = hasBounds;
534
- $[148] = inputId;
535
- $[149] = isDateTime;
536
- $[150] = maxDate;
537
- $[151] = minDate;
538
- $[152] = selectedDate;
539
- $[153] = t39;
532
+ $[141] = activeDescendant;
533
+ $[142] = calendarBoxOpen;
534
+ $[143] = calendarDisplayDate;
535
+ $[144] = calendarRef;
536
+ $[145] = dateContainerRef;
537
+ $[146] = handleNextMonth;
538
+ $[147] = handlePreviousMonth;
539
+ $[148] = handleSelectDay;
540
+ $[149] = handleSelectTime;
541
+ $[150] = hasBounds;
542
+ $[151] = inputId;
543
+ $[152] = isDateTime;
544
+ $[153] = maxDate;
545
+ $[154] = minDate;
546
+ $[155] = selectedDate;
547
+ $[156] = t39;
540
548
  } else {
541
- t39 = $[153];
549
+ t39 = $[156];
542
550
  }
543
551
  let t40;
544
- if ($[154] !== disabled || $[155] !== hasHintMessages || $[156] !== hintPosition || $[157] !== props.hint || $[158] !== skeletonize) {
552
+ if ($[157] !== disabled || $[158] !== hasHintMessages || $[159] !== hintPosition || $[160] !== props.hint || $[161] !== skeletonize) {
545
553
  t40 = hintPosition === "below" && /* @__PURE__ */ jsx(Hint, { customClass: "hint", description: props.hint, disabled, skeletonize, visible: hasHintMessages });
546
- $[154] = disabled;
547
- $[155] = hasHintMessages;
548
- $[156] = hintPosition;
549
- $[157] = props.hint;
550
- $[158] = skeletonize;
551
- $[159] = t40;
554
+ $[157] = disabled;
555
+ $[158] = hasHintMessages;
556
+ $[159] = hintPosition;
557
+ $[160] = props.hint;
558
+ $[161] = skeletonize;
559
+ $[162] = t40;
552
560
  } else {
553
- t40 = $[159];
561
+ t40 = $[162];
554
562
  }
555
563
  let t41;
556
- if ($[160] !== errors || $[161] !== hasValidationErrors || $[162] !== props.name || $[163] !== skeletonize) {
564
+ if ($[163] !== errors || $[164] !== hasValidationErrors || $[165] !== props.name || $[166] !== skeletonize) {
557
565
  t41 = hasValidationErrors && /* @__PURE__ */ jsx("span", { "data-testid": "test-date-field-list-errors", className: "error", "data-state-skeletonize": skeletonize, "aria-describedby": String(props.name).concat("-errors"), children: errors?.map(_temp) });
558
- $[160] = errors;
559
- $[161] = hasValidationErrors;
560
- $[162] = props.name;
561
- $[163] = skeletonize;
562
- $[164] = t41;
566
+ $[163] = errors;
567
+ $[164] = hasValidationErrors;
568
+ $[165] = props.name;
569
+ $[166] = skeletonize;
570
+ $[167] = t41;
563
571
  } else {
564
- t41 = $[164];
572
+ t41 = $[167];
565
573
  }
566
574
  let t42;
567
- if ($[165] !== customClassWrapper || $[166] !== hasValidationErrors || $[167] !== t32 || $[168] !== t38 || $[169] !== t39 || $[170] !== t40 || $[171] !== t41) {
575
+ if ($[168] !== customClassWrapper || $[169] !== hasValidationErrors || $[170] !== t32 || $[171] !== t38 || $[172] !== t39 || $[173] !== t40 || $[174] !== t41) {
568
576
  t42 = /* @__PURE__ */ jsxs(Root, { ref: inputRootRef, "data-testid": "test-date-field-root", customClassWrapper, hasValidationErrors, children: [
569
577
  t32,
570
578
  t38,
@@ -572,47 +580,47 @@ const InputBase = React.forwardRef((props, ref) => {
572
580
  t40,
573
581
  t41
574
582
  ] });
575
- $[165] = customClassWrapper;
576
- $[166] = hasValidationErrors;
577
- $[167] = t32;
578
- $[168] = t38;
579
- $[169] = t39;
580
- $[170] = t40;
581
- $[171] = t41;
582
- $[172] = t42;
583
+ $[168] = customClassWrapper;
584
+ $[169] = hasValidationErrors;
585
+ $[170] = t32;
586
+ $[171] = t38;
587
+ $[172] = t39;
588
+ $[173] = t40;
589
+ $[174] = t41;
590
+ $[175] = t42;
583
591
  } else {
584
- t42 = $[172];
592
+ t42 = $[175];
585
593
  }
586
594
  let t43;
587
- if ($[173] !== contextValues || $[174] !== t42) {
595
+ if ($[176] !== contextValues || $[177] !== t42) {
588
596
  t43 = /* @__PURE__ */ jsx(DateFieldContext.Provider, { value: contextValues, children: t42 });
589
- $[173] = contextValues;
590
- $[174] = t42;
591
- $[175] = t43;
597
+ $[176] = contextValues;
598
+ $[177] = t42;
599
+ $[178] = t43;
592
600
  } else {
593
- t43 = $[175];
601
+ t43 = $[178];
594
602
  }
595
603
  let t44;
596
- if ($[176] !== tooltip || $[177] !== tooltipPosition || $[178] !== tooltipWidth) {
604
+ if ($[179] !== tooltip || $[180] !== tooltipPosition || $[181] !== tooltipWidth) {
597
605
  t44 = /* @__PURE__ */ jsx(Tooltip, { targetRef: inputRootRef, text: tooltip, width: tooltipWidth, position: tooltipPosition });
598
- $[176] = tooltip;
599
- $[177] = tooltipPosition;
600
- $[178] = tooltipWidth;
601
- $[179] = t44;
606
+ $[179] = tooltip;
607
+ $[180] = tooltipPosition;
608
+ $[181] = tooltipWidth;
609
+ $[182] = t44;
602
610
  } else {
603
- t44 = $[179];
611
+ t44 = $[182];
604
612
  }
605
613
  let t45;
606
- if ($[180] !== t43 || $[181] !== t44) {
614
+ if ($[183] !== t43 || $[184] !== t44) {
607
615
  t45 = /* @__PURE__ */ jsxs(React.Fragment, { children: [
608
616
  t43,
609
617
  t44
610
618
  ] });
611
- $[180] = t43;
612
- $[181] = t44;
613
- $[182] = t45;
619
+ $[183] = t43;
620
+ $[184] = t44;
621
+ $[185] = t45;
614
622
  } else {
615
- t45 = $[182];
623
+ t45 = $[185];
616
624
  }
617
625
  return t45;
618
626
  });