@wix/editor-react-components 1.2769.0 → 1.2771.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 (28) hide show
  1. package/dist/site/components/AudioPlayer/component.js +2 -2
  2. package/dist/site/components/Breadcrumbs/component.js +1 -1
  3. package/dist/site/components/DatePicker/DatePicker.types.d.ts +20 -76
  4. package/dist/site/components/DatePicker/component.js +232 -1240
  5. package/dist/site/components/DatePicker/components/DatePickerCalendar.d.ts +3 -2
  6. package/dist/site/components/DatePicker/components/DatePickerField.d.ts +1 -3
  7. package/dist/site/components/DatePicker/constants.d.ts +47 -79
  8. package/dist/site/components/DatePicker/css.css +60 -287
  9. package/dist/site/components/DatePicker/datePickerUtils.d.ts +8 -26
  10. package/dist/site/components/DatePicker/manifest.js +234 -207
  11. package/dist/site/components/Repeater/component.js +6 -6
  12. package/dist/site/components/TextInput/component.js +2 -2
  13. package/dist/site/components/TimePicker/component.js +350 -3
  14. package/dist/site/components/chunks/Button.js +2 -2
  15. package/dist/site/components/chunks/{DismissSmall.js → DateField.js} +56 -430
  16. package/dist/site/components/chunks/Group.js +44 -44
  17. package/dist/site/components/chunks/I18nProvider.js +1 -1
  18. package/dist/site/components/chunks/Input.js +3 -26
  19. package/dist/site/components/chunks/VisuallyHidden.js +1 -1
  20. package/dist/site/components/chunks/constants37.js +59 -90
  21. package/dist/site/components/chunks/filterDOMProps.js +11 -11
  22. package/dist/site/components/chunks/index11.js +8 -4
  23. package/package.json +2 -2
  24. package/dist/site/components/DatePicker/components/DatePickerLabel.d.ts +0 -8
  25. package/dist/site/components/DatePicker/components/DatePickerTooltip.d.ts +0 -5
  26. package/dist/site/components/DatePicker/hooks/useDateConstraints.d.ts +0 -12
  27. package/dist/site/components/DatePicker/hooks/useDatePickerValue.d.ts +0 -15
  28. package/dist/site/components/DatePicker/hooks/useUnavailableDates.d.ts +0 -3
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { DatePickerElementProps } from '../DatePicker.types';
3
- export declare const DatePickerCalendar: ({ isRange, elementProps, }: {
4
- isRange: boolean;
3
+ export declare const DatePickerCalendar: ({ portalContainer, isPreviewOpen, elementProps, }: {
4
+ portalContainer: HTMLElement | null;
5
+ isPreviewOpen?: boolean;
5
6
  elementProps?: DatePickerElementProps;
6
7
  }) => React.JSX.Element;
@@ -1,7 +1,5 @@
1
1
  import { default as React } from 'react';
2
- export declare const DatePickerField: ({ isRange, clearButton, calendarButtonLabel, elementProps, }: {
3
- isRange: boolean;
4
- clearButton: React.ReactNode;
2
+ export declare const DatePickerField: ({ calendarButtonLabel, elementProps, }: {
5
3
  calendarButtonLabel: string;
6
4
  elementProps?: {
7
5
  dateInput?: {
@@ -3,81 +3,54 @@ export declare const DisplayNames: {
3
3
  elementDisplayName: string;
4
4
  data: {
5
5
  value: string;
6
- endValue: string;
7
- defaultValue: string;
8
- defaultEndValue: string;
9
- onEndChange: string;
10
- selectionMode: {
11
- displayName: string;
12
- options: {
13
- single: string;
14
- range: string;
15
- };
16
- };
17
- granularity: {
18
- displayName: string;
19
- options: {
20
- day: string;
21
- hour: string;
22
- minute: string;
23
- };
24
- };
25
- tooltip: string;
6
+ onValueChange: string;
26
7
  label: string;
27
- description: string;
28
- minDate: string;
29
- maxDate: string;
30
- unavailableDates: string;
31
- unavailableFrom: string;
32
- unavailableTo: string;
33
- allowPastDates: string;
34
- allowFutureDates: string;
35
- required: string;
8
+ helperText: string;
9
+ errorMessage: string;
36
10
  readOnly: string;
37
11
  disabled: string;
38
- clearable: string;
12
+ };
13
+ presets: {
14
+ baseDatePicker: string;
39
15
  };
40
16
  designStates: {
41
17
  hover: string;
42
18
  focus: string;
43
19
  disabled: string;
20
+ error: string;
44
21
  selected: string;
22
+ today: string;
45
23
  };
46
24
  elements: {
47
25
  label: string;
48
- description: string;
26
+ helperText: string;
27
+ errorMessage: string;
49
28
  dateInput: string;
50
29
  calendarButton: string;
51
30
  popover: string;
52
- calendar: string;
53
- calendarDay: string;
54
- today: string;
31
+ calendarHeader: string;
32
+ weekdays: string;
33
+ dates: string;
34
+ };
35
+ };
36
+ };
37
+ export declare const Descriptions: {
38
+ root: {
39
+ data: {
40
+ value: string;
41
+ helperText: string;
42
+ errorMessage: string;
55
43
  };
56
44
  };
57
45
  };
58
46
  export declare const defaultValues: {
59
- readonly selectionMode: "single";
60
- readonly granularity: "day";
61
- readonly tooltip: "";
62
47
  readonly label: "";
63
- readonly description: "";
64
- readonly allowPastDates: true;
65
- readonly allowFutureDates: true;
66
- readonly required: false;
48
+ readonly helperText: "";
67
49
  readonly readOnly: false;
68
50
  readonly disabled: false;
69
- readonly clearable: false;
70
51
  };
71
- export declare const enum SelectionModeValues {
72
- Single = "single",
73
- Range = "range"
74
- }
75
- /** React Aria `granularity`: the smallest editable time unit. */
76
- export declare const enum GranularityValues {
77
- Day = "day",
78
- Hour = "hour",
79
- Minute = "minute"
80
- }
52
+ /** Shown on stage while the Error design state is selected. */
53
+ export declare const PREVIEW_ERROR_MESSAGE = "Error message";
81
54
  /**
82
55
  * Design states. Wired in the manifest via `withSpec(IS_SUPPORT_DESIGN_STATE_SPEC)`
83
56
  * so they stay inert until the Conductor spec is declared. BEM classNames are the
@@ -85,14 +58,6 @@ export declare const enum GranularityValues {
85
58
  */
86
59
  export declare const DesignStates: {
87
60
  root: {
88
- hover: {
89
- displayName: string;
90
- className: string;
91
- };
92
- focus: {
93
- displayName: string;
94
- className: string;
95
- };
96
61
  disabled: {
97
62
  displayName: string;
98
63
  className: string;
@@ -107,6 +72,10 @@ export declare const DesignStates: {
107
72
  displayName: string;
108
73
  className: string;
109
74
  };
75
+ error: {
76
+ displayName: string;
77
+ className: string;
78
+ };
110
79
  disabled: {
111
80
  displayName: string;
112
81
  className: string;
@@ -121,8 +90,12 @@ export declare const DesignStates: {
121
90
  displayName: string;
122
91
  className: string;
123
92
  };
93
+ focus: {
94
+ displayName: string;
95
+ className: string;
96
+ };
124
97
  };
125
- calendarDay: {
98
+ dates: {
126
99
  hover: {
127
100
  displayName: string;
128
101
  className: string;
@@ -131,15 +104,17 @@ export declare const DesignStates: {
131
104
  displayName: string;
132
105
  className: string;
133
106
  };
134
- disabled: {
107
+ today: {
108
+ displayName: string;
109
+ className: string;
110
+ };
111
+ focus: {
135
112
  displayName: string;
136
113
  className: string;
137
114
  };
138
115
  };
139
116
  };
140
117
  export declare const PREVIEW_CALENDAR_OPEN = "previewCalendarOpen";
141
- /** The value that represents "no date selected". */
142
- export declare const EMPTY_VALUE = "";
143
118
  export declare const ARIA_LABEL_NAMESPACE = "ariaLabels";
144
119
  /**
145
120
  * Viewer-facing aria labels: each entry is a translation `key` plus an English
@@ -150,10 +125,6 @@ export declare const AriaLabels: {
150
125
  readonly key: "datePicker_aria_label";
151
126
  readonly default: "Date picker";
152
127
  };
153
- readonly clear: {
154
- readonly key: "datePicker_clear_button";
155
- readonly default: "Clear";
156
- };
157
128
  readonly openCalendar: {
158
129
  readonly key: "datePicker_open_calendar";
159
130
  readonly default: "Open calendar";
@@ -163,25 +134,22 @@ export declare const TestIds: {
163
134
  readonly root: "datepicker-root";
164
135
  readonly group: "datepicker-group";
165
136
  readonly field: "datepicker-field";
166
- readonly endField: "datepicker-end-field";
167
137
  readonly calendarButton: "datepicker-calendar-button";
168
- readonly clearButton: "datepicker-clear-button";
169
138
  readonly calendar: "datepicker-calendar";
170
- readonly tooltipButton: "datepicker-tooltip-button";
139
+ readonly helperText: "datepicker-helper-text";
171
140
  readonly errorMessage: "datepicker-error-message";
172
- readonly requiredIndicator: "datepicker-required-indicator";
173
141
  };
174
142
  export declare const selectors: {
175
143
  readonly root: "datePicker";
176
144
  readonly label: "datePicker__label";
177
- readonly description: "datePicker__description";
178
- readonly requiredIndicator: "datePicker__required-indicator";
179
- readonly group: "datePicker__group";
145
+ readonly helperText: "datePicker__helper-text";
146
+ readonly dateInput: "datePicker__date-input";
147
+ readonly segment: "datePicker__segment";
180
148
  readonly calendarButton: "datePicker__calendar-button";
181
149
  readonly popover: "datePicker__popover";
182
- readonly calendar: "datePicker__calendar";
183
- readonly day: "datePicker__day";
150
+ readonly calendarHeader: "datePicker__calendar-header";
151
+ readonly navButton: "datePicker__nav-button";
152
+ readonly weekday: "datePicker__weekday";
153
+ readonly date: "datePicker__date";
184
154
  readonly errorMessage: "datePicker__error-message";
185
155
  };
186
- /** Intrinsic `required` failure message (pre-resolved; i18n is a shared TODO). */
187
- export declare const VALUE_MISSING_MESSAGE = "This field is required";
@@ -1,374 +1,147 @@
1
- /* Applied to `.popover` too because the calendar is portaled to <body> (to escape
2
- section stacking), where it no longer inherits these vars from `.root`. */
3
- .root__l0Qv-,
4
- .popover__JAzkr {
5
- --font: var(
6
- --wst-paragraph-2-font,
7
- normal normal normal 16px/1.5em madefor-text,
8
- helveticaneuew01-45ligh,
9
- helveticaneuew02-45ligh,
10
- helveticaneuew10-45ligh,
11
- sans-serif
12
- );
13
- --text-color: var(--wst-paragraph-2-color, #2b2b2b);
14
-
15
- --labelFont: var(
16
- --wst-paragraph-2-font,
17
- normal normal normal 14px/1.4em madefor-text,
18
- helveticaneuew01-45ligh,
19
- helveticaneuew02-45ligh,
20
- helveticaneuew10-45ligh,
21
- sans-serif
22
- );
23
- --label-text-color: var(--wst-paragraph-2-color, #2b2b2b);
24
-
25
- --borderColor: var(--wst-system-line-1-color, #dfe5eb);
26
-
27
- --selected-date-background-color: var(--wst-links-and-actions-color, #116dff);
28
- --selected-date-text-color: var(--wst-primary-background-color, #ffffff);
29
- --day-hover-background-color: var(--wst-shade-3-color, #f0f4f7);
30
- --calendar-background-color: var(--wst-primary-background-color, #ffffff);
31
-
32
- --today-background-color: transparent;
33
- --today-outline-color: var(--wst-links-and-actions-color, #116dff);
34
- --today-text-color: var(--wst-links-and-actions-color, #116dff);
35
-
36
- --description-font: var(
37
- --wst-paragraph-2-font,
38
- 400 12px/1.4 'Helvetica Neue',
39
- Arial,
40
- sans-serif
41
- );
42
- --description-text-color: var(--wst-paragraph-2-color, #2b2b2b);
43
-
44
- --tooltip-font: var(
45
- --wst-paragraph-2-font,
46
- 400 12px/1.4 'Helvetica Neue',
47
- Arial,
48
- sans-serif
49
- );
50
- --tooltip-text-color: var(--wst-primary-background-color, #ffffff);
51
- --tooltip-background-color: var(--wst-paragraph-2-color, #2b2b2b);
52
-
53
- --accent-color: var(--selected-date-background-color);
54
- }
55
1
  .root__l0Qv- {
56
2
  box-sizing: border-box;
57
3
  display: flex;
58
4
  flex-direction: column;
59
- min-width: 0;
5
+ min-width: min-content !important;
60
6
  max-width: 100%;
61
- font: var(--font);
62
- color: var(--text-color);
63
7
  }
8
+
64
9
  .datePicker__n-7WW {
65
10
  display: flex;
66
11
  flex-direction: column;
67
- min-width: 0;
68
12
  }
69
- .labelRow__pUSW5 {
70
- display: flex;
71
- align-items: flex-start;
72
- gap: 6px;
73
- margin: 0 0 6px;
74
- min-width: 0;
13
+ .datePicker__n-7WW[data-disabled] {
14
+ cursor: not-allowed;
75
15
  }
76
- .label__YTX1z {
77
- margin: 0;
16
+
17
+ .label__YTX1z,
18
+ .helperText__CKn-5,
19
+ .errorMessage__b9Pp3 {
20
+ display: -webkit-box;
21
+ -webkit-box-orient: vertical;
22
+ -webkit-line-clamp: 2;
23
+ line-clamp: 2;
24
+ overflow: hidden;
78
25
  min-width: 0;
79
26
  max-width: 100%;
80
- font: var(--labelFont);
81
- color: var(--label-text-color);
82
27
  overflow-wrap: break-word;
83
28
  word-break: break-word;
84
29
  }
85
- .tooltipButton__4-ns8 {
86
- flex: none;
87
- box-sizing: border-box;
88
- display: inline-flex;
89
- align-items: center;
90
- justify-content: center;
91
- width: 16px;
92
- height: 16px;
93
- margin: 0;
94
- padding: 0;
95
- border: none;
96
- background: transparent;
97
- color: var(--label-text-color);
98
- cursor: pointer;
99
- opacity: 0.65;
100
- }
101
- .tooltipButton__4-ns8[data-hovered], .tooltipButton__4-ns8[data-focus-visible] {
102
- opacity: 1;
103
- }
104
- .tooltipButton__4-ns8[data-focus-visible] {
105
- border-radius: 50%;
106
- box-shadow: 0 0 0 2px var(--accent-color);
107
- }
108
- .infoIcon__zyj7w {
109
- width: 16px;
110
- height: 16px;
111
- }
112
- .tooltip__-Jo2K {
113
- max-width: 220px;
114
- padding: 6px 10px;
115
- font: var(--tooltip-font);
116
- color: var(--tooltip-text-color);
117
- background: var(--tooltip-background-color);
118
- border-radius: 6px;
119
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
120
- }
30
+
121
31
  .group__2UIvk {
122
32
  box-sizing: border-box;
123
33
  display: flex;
124
34
  align-items: center;
125
35
  width: 100%;
126
- column-gap: 8px;
127
- padding-top: 8px;
128
- padding-bottom: 8px;
129
- padding-inline-start: 12px;
130
- padding-inline-end: 12px;
131
- font: inherit;
132
- color: inherit;
133
- background: var(--wst-primary-background-color, #ffffff);
134
- box-shadow: none;
135
- border-top: 1px solid var(--borderColor);
136
- border-bottom: 1px solid var(--borderColor);
137
- border-inline-start: 1px solid var(--borderColor);
138
- border-inline-end: 1px solid var(--borderColor);
139
- border-start-start-radius: 6px;
140
- border-start-end-radius: 6px;
141
- border-end-start-radius: 6px;
142
- border-end-end-radius: 6px;
143
- transition: border-color 0.15s ease, box-shadow 0.15s ease;
144
- }
145
- .group__2UIvk:focus-within {
146
- border-color: var(--accent-color);
147
- box-shadow: 0 0 0 1px var(--accent-color);
148
- }
149
- .group__2UIvk:hover:not(:focus-within) {
150
- border-color: color-mix(in srgb, var(--accent-color) 45%, transparent);
151
- }
152
- .datePicker--hover .group__2UIvk {
153
- border-color: color-mix(in srgb, var(--accent-color) 45%, transparent);
154
- }
155
- .datePicker--focus .group__2UIvk {
156
- border-color: var(--accent-color);
157
- box-shadow: 0 0 0 1px var(--accent-color);
158
- }
159
- .datePicker__n-7WW[data-disabled],
160
- .datePicker--disabled {
161
- opacity: 0.55;
162
- cursor: not-allowed;
163
36
  }
37
+
164
38
  .field__lHZ2g {
165
39
  display: inline-flex;
166
40
  flex: 1;
167
- min-width: 0;
168
- gap: 1px;
169
- overflow: hidden;
170
- font: inherit;
171
- color: inherit;
172
41
  white-space: nowrap;
173
42
  }
174
- .rangeSeparator__jAkz- {
175
- flex: none;
176
- padding: 0 4px;
177
- opacity: 0.6;
178
- }
179
- .description__nmlkW {
180
- margin-top: 4px;
181
- font: var(--description-font);
182
- color: var(--description-text-color);
183
- opacity: 0.7;
184
- }
185
- .errorMessage__b9Pp3 {
186
- margin-top: 4px;
187
- font: var(--description-font);
188
- color: var(--errorColor, var(--wst-error-color, #e21c21));
189
- }
43
+
190
44
  .segment__w-IAO {
191
- padding: 0 2px;
192
- border-radius: 3px;
193
45
  font-variant-numeric: tabular-nums;
194
46
  text-align: center;
195
- outline: none;
196
- }
197
- .segment__w-IAO[data-type=literal] {
198
- padding: 0;
199
- opacity: 0.5;
200
47
  }
201
- .segment__w-IAO[data-placeholder] {
202
- color: color-mix(in srgb, currentColor 45%, transparent);
203
- }
204
- .segment__w-IAO[data-focused] {
205
- background: var(--accent-color);
206
- color: var(--selected-date-text-color);
48
+
49
+ .datePicker__label,
50
+ .datePicker__helper-text,
51
+ .datePicker__error-message,
52
+ .datePicker__date-input,
53
+ .datePicker__calendar-header,
54
+ .datePicker__weekday,
55
+ .datePicker__date {
56
+ text-shadow: var(--text-shadow);
207
57
  }
208
- .clearButton__NdcRh {
58
+
59
+ .calendarButton__s-QAb,
60
+ .navButton__5nJy7 {
209
61
  flex: none;
210
62
  box-sizing: border-box;
211
63
  display: inline-flex;
212
64
  align-items: center;
213
65
  justify-content: center;
214
- width: 24px;
215
- height: 24px;
216
66
  margin: 0;
217
67
  padding: 0;
218
68
  border: none;
219
- border-radius: 6px;
220
69
  background: transparent;
221
70
  color: inherit;
222
71
  cursor: pointer;
223
- transition: background 0.15s ease;
224
72
  }
225
- .clearButton__NdcRh:hover {
226
- background: var(--day-hover-background-color);
73
+ .calendarButton__s-QAb[data-disabled],
74
+ .navButton__5nJy7[data-disabled] {
75
+ cursor: default;
227
76
  }
228
- .clearIcon__Klxmr {
229
- width: 18px;
230
- height: 18px;
77
+
78
+ .calendarIcon__CYg1H {
79
+ width: 20px;
80
+ height: 20px;
231
81
  }
82
+
232
83
  .calendarButton__s-QAb {
233
- flex: none;
234
- box-sizing: border-box;
235
- display: inline-flex;
236
- align-items: center;
237
- justify-content: center;
238
84
  width: 28px;
239
85
  height: 28px;
240
- margin: 0;
241
- padding: 0;
242
- border: none;
243
- border-radius: 6px;
244
- background: transparent;
245
- color: inherit;
246
- cursor: pointer;
247
- transition: background 0.15s ease;
248
86
  }
249
- .calendarButton__s-QAb[data-hovered], .calendarButton__s-QAb[data-pressed] {
250
- background: var(--day-hover-background-color);
251
- }
252
- .calendarButton__s-QAb[data-focus-visible] {
253
- box-shadow: 0 0 0 2px var(--accent-color);
87
+
88
+ .navButton__5nJy7 {
89
+ font: inherit;
90
+ width: 1.5em;
91
+ height: 1.5em;
254
92
  }
255
- .calendarButton__s-QAb[data-disabled] {
256
- cursor: default;
257
- opacity: 0.5;
93
+
94
+ .navIcon__LkD1n {
95
+ width: 1.5em;
96
+ height: 1.5em;
258
97
  }
259
- .calendarIcon__CYg1H {
260
- width: 20px;
261
- height: 20px;
98
+
99
+ .positioner__38UDd {
100
+ box-sizing: border-box;
262
101
  }
102
+
263
103
  .popover__JAzkr {
264
104
  box-sizing: border-box;
265
- font: var(--font);
266
- color: var(--text-color);
267
- background: var(--calendar-background-color);
268
- border: 1px solid var(--borderColor);
269
- border-radius: 8px;
270
- box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
271
- }
272
- .dialog__XWvmP {
273
105
  outline: none;
274
106
  }
107
+
275
108
  .calendar__dQLez {
276
109
  box-sizing: border-box;
277
- padding: 12px;
278
- color: inherit;
279
110
  }
111
+
280
112
  .calendarHeader__h7CtJ {
281
113
  display: flex;
282
114
  align-items: center;
283
115
  justify-content: space-between;
284
- gap: 8px;
285
116
  margin-bottom: 8px;
286
117
  }
287
- .calendarHeading__JLdsJ {
118
+
119
+ :where(.calendarHeading__JLdsJ) {
288
120
  margin: 0;
289
- font-size: 14px;
290
- font-weight: 600;
291
- }
292
- .navButton__5nJy7 {
293
- box-sizing: border-box;
294
- display: inline-flex;
295
- align-items: center;
296
- justify-content: center;
297
- width: 28px;
298
- height: 28px;
299
- padding: 0;
300
- border: none;
301
- border-radius: 6px;
302
- background: transparent;
303
- color: inherit;
304
- cursor: pointer;
305
- transition: background 0.15s ease;
306
- }
307
- .navButton__5nJy7[data-hovered] {
308
- background: var(--day-hover-background-color);
309
- }
310
- .navButton__5nJy7[data-disabled] {
311
- cursor: default;
312
- opacity: 0.4;
313
- }
314
- .navIcon__LkD1n {
315
- width: 18px;
316
- height: 18px;
121
+ font: inherit;
317
122
  }
123
+
318
124
  .calendarGrid__7hp87 {
319
125
  border-collapse: collapse;
320
126
  }
321
- .calendarGrid__7hp87 th {
322
- padding: 6px 0;
323
- font-size: 12px;
324
- font-weight: 500;
325
- color: color-mix(in srgb, currentColor 55%, transparent);
326
- }
127
+
327
128
  .calendarCell__Pjcxr {
328
129
  box-sizing: border-box;
329
130
  display: flex;
330
131
  align-items: center;
331
132
  justify-content: center;
332
- width: 34px;
333
- height: 34px;
334
- border-radius: 8px;
335
- font-size: 13px;
336
- outline: none;
133
+ min-width: 34px;
134
+ min-height: 34px;
135
+ width: 1.5em;
136
+ height: 1.5em;
337
137
  cursor: pointer;
338
138
  }
339
139
  .calendarCell__Pjcxr[data-outside-month] {
340
140
  display: none;
341
141
  }
342
- .calendarCell__Pjcxr[data-today] {
343
- background: var(--today-background-color);
344
- color: var(--today-text-color);
345
- box-shadow: inset 0 0 0 1.5px var(--today-outline-color);
346
- }
347
- .calendarCell__Pjcxr[data-hovered] {
348
- background: var(--day-hover-background-color);
349
- }
350
- .calendarCell__Pjcxr[data-selected] {
351
- background: var(--accent-color);
352
- color: var(--selected-date-text-color);
353
- }
354
- .calendarCell__Pjcxr[data-disabled], .calendarCell__Pjcxr[data-unavailable] {
355
- color: color-mix(in srgb, currentColor 35%, transparent);
356
- cursor: default;
357
- }
358
- .calendarCell__Pjcxr[data-focus-visible] {
359
- box-shadow: 0 0 0 2px var(--accent-color);
360
- }
361
142
  .fallbackDirection__HeRgn:not([dir]) {
362
143
  direction: var(--wix-opt-in-direction);
363
144
  }
364
145
  .presetWrapper__J1yzj {
365
146
  display: contents;
366
- }
367
- .requiredIndicator__j5mIH {
368
- display: inline-block;
369
- width: 0.6em;
370
- height: 0.6em;
371
- margin-inline-start: 0.2em;
372
- vertical-align: super;
373
- color: inherit;
374
147
  }
@@ -1,26 +1,8 @@
1
- import { DateValue } from 'react-aria-components';
2
- import { UnavailableDateRange } from './DatePicker.types';
3
- /** Reads a string prop, defaulting an unset/non-string value to empty. */
4
- export declare const readString: (prop: string | undefined) => string;
5
- /** Reads a boolean prop, defaulting an unset/non-boolean value to `fallback`. */
6
- export declare const readBool: (prop: boolean | undefined, fallback: boolean) => boolean;
7
- /**
8
- * Parses an ISO string into a React Aria `DateValue`, or `null` if invalid/empty.
9
- * The result's type must match the picker's granularity:
10
- * - `withTime` false → a date-only `CalendarDate` (any time part is dropped).
11
- * - `withTime` true → a `CalendarDateTime` (a date-only input is widened to
12
- * midnight) so the hour/minute segments have a value to edit.
13
- */
14
- export declare const toDateValue: (iso: string, withTime: boolean) => DateValue | null;
15
- /**
16
- * `DateValue` → ISO string (`YYYY-MM-DD`, or `YYYY-MM-DDTHH:MM` with time); empty
17
- * for null. Granularity maxes at minute, so seconds (always `:00`) are trimmed.
18
- */
19
- export declare const toIso: (date: DateValue | null) => string;
20
- /**
21
- * Builds an `isDateUnavailable` predicate from a list of `{ from, to }` ISO ranges
22
- * (inclusive; a single blocked day has `from === to`, and one endpoint alone is
23
- * treated as that single day). Returns `undefined` when nothing parses, so the
24
- * picker leaves every date open. Unparseable/empty items are skipped.
25
- */
26
- export declare const buildIsDateUnavailable: (unavailableDates: ReadonlyArray<UnavailableDateRange> | undefined) => ((date: DateValue) => boolean) | undefined;
1
+ import { CalendarDate } from '@internationalized/date';
2
+ import { LocalDate } from './DatePicker.types';
3
+ /** Parses a `localDate` into a React Aria `CalendarDate`, or `null` if unset/invalid. */
4
+ export declare const toCalendarDate: (value: LocalDate | undefined) => CalendarDate | null;
5
+ /** `CalendarDate` → `localDate` (`YYYY-MM-DD`); `undefined` for a cleared date. */
6
+ export declare const toLocalDate: (date: {
7
+ toString: () => string;
8
+ } | null) => LocalDate | undefined;