@wix/editor-react-components 1.2288.0 → 1.2289.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.
- package/dist/site/components/AccordionComponent/component.js +1 -1
- package/dist/site/components/AccordionComponent/manifest.js +1 -1
- package/dist/site/components/AudioPlayer/component.js +5 -1105
- package/dist/site/components/AudioPlayer/manifest.js +1 -1
- package/dist/site/components/Breadcrumbs/component.js +3 -117
- package/dist/site/components/Breadcrumbs/manifest.js +1 -1
- package/dist/site/components/CollapsibleText/component.js +1 -1
- package/dist/site/components/CollapsibleText/manifest.js +1 -1
- package/dist/site/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/site/components/DatePicker/DatePicker.types.d.ts +91 -0
- package/dist/site/components/DatePicker/component.d.ts +2 -0
- package/dist/site/components/DatePicker/component.js +12181 -0
- package/dist/site/components/DatePicker/component.preview.d.ts +2 -0
- package/dist/site/components/DatePicker/components/DatePickerCalendar.d.ts +5 -0
- package/dist/site/components/DatePicker/components/DatePickerField.d.ts +6 -0
- package/dist/site/components/DatePicker/components/DatePickerLabel.d.ts +6 -0
- package/dist/site/components/DatePicker/components/DatePickerTooltip.d.ts +5 -0
- package/dist/site/components/DatePicker/constants.d.ts +177 -0
- package/dist/site/components/DatePicker/css.css +349 -0
- package/dist/site/components/DatePicker/datePickerUtils.d.ts +26 -0
- package/dist/site/components/DatePicker/hooks/useDateConstraints.d.ts +12 -0
- package/dist/site/components/DatePicker/hooks/useDatePickerValue.d.ts +15 -0
- package/dist/site/components/DatePicker/hooks/useUnavailableDates.d.ts +3 -0
- package/dist/site/components/DatePicker/index.d.ts +2 -0
- package/dist/site/components/DatePicker/index.js +6 -0
- package/dist/site/components/DatePicker/manifest.d.ts +5 -0
- package/dist/site/components/DatePicker/manifest.js +370 -0
- package/dist/site/components/Dropdown/component.js +1 -3
- package/dist/site/components/TextBox/component.js +1 -4
- package/dist/site/components/TextInput/component.js +4 -297
- package/dist/site/components/chunks/Button2.js +1118 -0
- package/dist/site/components/chunks/DismissSmall.js +7 -0
- package/dist/site/components/chunks/Group.js +108 -36
- package/dist/site/components/chunks/I18nProvider.js +32 -2
- package/dist/site/components/chunks/InfoCircleSmall.js +7 -0
- package/dist/site/components/chunks/Input.js +341 -0
- package/dist/site/components/chunks/constants32.js +152 -49
- package/dist/site/components/chunks/constants33.js +53 -71
- package/dist/site/components/chunks/constants34.js +73 -77
- package/dist/site/components/chunks/constants35.js +76 -57
- package/dist/site/components/chunks/constants36.js +72 -0
- package/dist/site/components/chunks/filterDOMProps.js +14 -8
- package/dist/site/components/chunks/useLocalizedStringFormatter.js +122 -0
- package/dist/site/components/extensions.js +53 -48
- package/package.json +3 -2
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
export declare const DisplayNames: {
|
|
2
|
+
root: {
|
|
3
|
+
elementDisplayName: string;
|
|
4
|
+
data: {
|
|
5
|
+
value: string;
|
|
6
|
+
endValue: string;
|
|
7
|
+
onEndChange: string;
|
|
8
|
+
selectionMode: {
|
|
9
|
+
displayName: string;
|
|
10
|
+
options: {
|
|
11
|
+
single: string;
|
|
12
|
+
range: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
granularity: {
|
|
16
|
+
displayName: string;
|
|
17
|
+
options: {
|
|
18
|
+
day: string;
|
|
19
|
+
hour: string;
|
|
20
|
+
minute: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
tooltip: string;
|
|
24
|
+
label: string;
|
|
25
|
+
description: string;
|
|
26
|
+
minDate: string;
|
|
27
|
+
maxDate: string;
|
|
28
|
+
unavailableDates: string;
|
|
29
|
+
unavailableFrom: string;
|
|
30
|
+
unavailableTo: string;
|
|
31
|
+
allowPastDates: string;
|
|
32
|
+
allowFutureDates: string;
|
|
33
|
+
required: string;
|
|
34
|
+
readOnly: string;
|
|
35
|
+
disabled: string;
|
|
36
|
+
clearable: string;
|
|
37
|
+
};
|
|
38
|
+
designStates: {
|
|
39
|
+
hover: string;
|
|
40
|
+
focus: string;
|
|
41
|
+
disabled: string;
|
|
42
|
+
selected: string;
|
|
43
|
+
};
|
|
44
|
+
elements: {
|
|
45
|
+
label: string;
|
|
46
|
+
dateInput: string;
|
|
47
|
+
calendarButton: string;
|
|
48
|
+
popover: string;
|
|
49
|
+
calendar: string;
|
|
50
|
+
calendarDay: string;
|
|
51
|
+
today: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export declare const defaultValues: {
|
|
56
|
+
readonly selectionMode: "single";
|
|
57
|
+
readonly granularity: "day";
|
|
58
|
+
readonly tooltip: "";
|
|
59
|
+
readonly label: "";
|
|
60
|
+
readonly description: "";
|
|
61
|
+
readonly allowPastDates: true;
|
|
62
|
+
readonly allowFutureDates: true;
|
|
63
|
+
readonly required: false;
|
|
64
|
+
readonly readOnly: false;
|
|
65
|
+
readonly disabled: false;
|
|
66
|
+
readonly clearable: false;
|
|
67
|
+
};
|
|
68
|
+
export declare const enum SelectionModeValues {
|
|
69
|
+
Single = "single",
|
|
70
|
+
Range = "range"
|
|
71
|
+
}
|
|
72
|
+
/** React Aria `granularity`: the smallest editable time unit. */
|
|
73
|
+
export declare const enum GranularityValues {
|
|
74
|
+
Day = "day",
|
|
75
|
+
Hour = "hour",
|
|
76
|
+
Minute = "minute"
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Design states. Wired in the manifest via `withSpec(IS_SUPPORT_DESIGN_STATE_SPEC)`
|
|
80
|
+
* so they stay inert until the Conductor spec is declared. BEM classNames are the
|
|
81
|
+
* editor's preview hooks; the live site uses the matching native pseudo-classes.
|
|
82
|
+
*/
|
|
83
|
+
export declare const DesignStates: {
|
|
84
|
+
root: {
|
|
85
|
+
hover: {
|
|
86
|
+
displayName: string;
|
|
87
|
+
className: string;
|
|
88
|
+
};
|
|
89
|
+
focus: {
|
|
90
|
+
displayName: string;
|
|
91
|
+
className: string;
|
|
92
|
+
};
|
|
93
|
+
disabled: {
|
|
94
|
+
displayName: string;
|
|
95
|
+
className: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
dateInput: {
|
|
99
|
+
hover: {
|
|
100
|
+
displayName: string;
|
|
101
|
+
className: string;
|
|
102
|
+
};
|
|
103
|
+
focus: {
|
|
104
|
+
displayName: string;
|
|
105
|
+
className: string;
|
|
106
|
+
};
|
|
107
|
+
disabled: {
|
|
108
|
+
displayName: string;
|
|
109
|
+
className: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
calendarButton: {
|
|
113
|
+
hover: {
|
|
114
|
+
displayName: string;
|
|
115
|
+
className: string;
|
|
116
|
+
};
|
|
117
|
+
selected: {
|
|
118
|
+
displayName: string;
|
|
119
|
+
className: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
calendarDay: {
|
|
123
|
+
hover: {
|
|
124
|
+
displayName: string;
|
|
125
|
+
className: string;
|
|
126
|
+
};
|
|
127
|
+
selected: {
|
|
128
|
+
displayName: string;
|
|
129
|
+
className: string;
|
|
130
|
+
};
|
|
131
|
+
disabled: {
|
|
132
|
+
displayName: string;
|
|
133
|
+
className: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
export declare const PREVIEW_CALENDAR_OPEN = "previewCalendarOpen";
|
|
138
|
+
/** The value that represents "no date selected". */
|
|
139
|
+
export declare const EMPTY_VALUE = "";
|
|
140
|
+
export declare const ARIA_LABEL_NAMESPACE = "ariaLabels";
|
|
141
|
+
/**
|
|
142
|
+
* Viewer-facing aria labels: each entry is a translation `key` plus an English
|
|
143
|
+
* `default` fallback. Referenced from constants (never as inline string keys).
|
|
144
|
+
*/
|
|
145
|
+
export declare const AriaLabels: {
|
|
146
|
+
readonly root: {
|
|
147
|
+
readonly key: "datePicker_aria_label";
|
|
148
|
+
readonly default: "Date picker";
|
|
149
|
+
};
|
|
150
|
+
readonly clear: {
|
|
151
|
+
readonly key: "datePicker_clear_button";
|
|
152
|
+
readonly default: "Clear";
|
|
153
|
+
};
|
|
154
|
+
readonly openCalendar: {
|
|
155
|
+
readonly key: "datePicker_open_calendar";
|
|
156
|
+
readonly default: "Open calendar";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
export declare const TestIds: {
|
|
160
|
+
readonly root: "datepicker-root";
|
|
161
|
+
readonly group: "datepicker-group";
|
|
162
|
+
readonly field: "datepicker-field";
|
|
163
|
+
readonly endField: "datepicker-end-field";
|
|
164
|
+
readonly calendarButton: "datepicker-calendar-button";
|
|
165
|
+
readonly clearButton: "datepicker-clear-button";
|
|
166
|
+
readonly calendar: "datepicker-calendar";
|
|
167
|
+
readonly tooltipButton: "datepicker-tooltip-button";
|
|
168
|
+
};
|
|
169
|
+
export declare const selectors: {
|
|
170
|
+
readonly root: "datePicker";
|
|
171
|
+
readonly label: "datePicker__label";
|
|
172
|
+
readonly group: "datePicker__group";
|
|
173
|
+
readonly calendarButton: "datePicker__calendar-button";
|
|
174
|
+
readonly popover: "datePicker__popover";
|
|
175
|
+
readonly calendar: "datePicker__calendar";
|
|
176
|
+
readonly day: "datePicker__day";
|
|
177
|
+
};
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
.root__l0Qv- {
|
|
2
|
+
--font: var(
|
|
3
|
+
--wst-paragraph-2-font,
|
|
4
|
+
normal normal normal 16px/1.5em madefor-text,
|
|
5
|
+
helveticaneuew01-45ligh,
|
|
6
|
+
helveticaneuew02-45ligh,
|
|
7
|
+
helveticaneuew10-45ligh,
|
|
8
|
+
sans-serif
|
|
9
|
+
);
|
|
10
|
+
--text-color: var(--wst-paragraph-2-color, #2b2b2b);
|
|
11
|
+
|
|
12
|
+
--labelFont: var(
|
|
13
|
+
--wst-paragraph-2-font,
|
|
14
|
+
normal normal normal 14px/1.4em madefor-text,
|
|
15
|
+
helveticaneuew01-45ligh,
|
|
16
|
+
helveticaneuew02-45ligh,
|
|
17
|
+
helveticaneuew10-45ligh,
|
|
18
|
+
sans-serif
|
|
19
|
+
);
|
|
20
|
+
--label-text-color: var(--wst-paragraph-2-color, #2b2b2b);
|
|
21
|
+
|
|
22
|
+
--field-background-color: var(--wst-primary-background-color, #ffffff);
|
|
23
|
+
--borderColor: var(--wst-system-line-1-color, #dfe5eb);
|
|
24
|
+
--borderWidth: 1px;
|
|
25
|
+
--borderStartStartRadius: 6px;
|
|
26
|
+
--borderStartEndRadius: 6px;
|
|
27
|
+
--borderEndStartRadius: 6px;
|
|
28
|
+
--borderEndEndRadius: 6px;
|
|
29
|
+
|
|
30
|
+
--selected-date-background-color: var(--wst-links-and-actions-color, #116dff);
|
|
31
|
+
--selected-date-text-color: var(--wst-primary-background-color, #ffffff);
|
|
32
|
+
--day-hover-background-color: var(--wst-shade-3-color, #f0f4f7);
|
|
33
|
+
--calendar-background-color: var(--wst-primary-background-color, #ffffff);
|
|
34
|
+
|
|
35
|
+
--today-background-color: transparent;
|
|
36
|
+
--today-outline-color: var(--wst-links-and-actions-color, #116dff);
|
|
37
|
+
--today-text-color: var(--wst-links-and-actions-color, #116dff);
|
|
38
|
+
|
|
39
|
+
--description-font: var(
|
|
40
|
+
--wst-paragraph-2-font,
|
|
41
|
+
400 12px/1.4 'Helvetica Neue',
|
|
42
|
+
Arial,
|
|
43
|
+
sans-serif
|
|
44
|
+
);
|
|
45
|
+
--description-text-color: var(--wst-paragraph-2-color, #2b2b2b);
|
|
46
|
+
|
|
47
|
+
--tooltip-font: var(
|
|
48
|
+
--wst-paragraph-2-font,
|
|
49
|
+
400 12px/1.4 'Helvetica Neue',
|
|
50
|
+
Arial,
|
|
51
|
+
sans-serif
|
|
52
|
+
);
|
|
53
|
+
--tooltip-text-color: var(--wst-primary-background-color, #ffffff);
|
|
54
|
+
--tooltip-background-color: var(--wst-paragraph-2-color, #2b2b2b);
|
|
55
|
+
|
|
56
|
+
--accent-color: var(--selected-date-background-color);
|
|
57
|
+
}
|
|
58
|
+
.root__l0Qv- {
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
min-width: 200px;
|
|
63
|
+
max-width: 100%;
|
|
64
|
+
font: var(--font);
|
|
65
|
+
color: var(--text-color);
|
|
66
|
+
}
|
|
67
|
+
.datePicker__n-7WW {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
}
|
|
71
|
+
.labelRow__pUSW5 {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: 6px;
|
|
75
|
+
margin: 0 0 6px;
|
|
76
|
+
}
|
|
77
|
+
.label__YTX1z {
|
|
78
|
+
margin: 0;
|
|
79
|
+
font: var(--labelFont);
|
|
80
|
+
color: var(--label-text-color);
|
|
81
|
+
}
|
|
82
|
+
.tooltipButton__4-ns8 {
|
|
83
|
+
flex: none;
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
width: 16px;
|
|
89
|
+
height: 16px;
|
|
90
|
+
margin: 0;
|
|
91
|
+
padding: 0;
|
|
92
|
+
border: none;
|
|
93
|
+
background: transparent;
|
|
94
|
+
color: var(--label-text-color);
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
opacity: 0.65;
|
|
97
|
+
}
|
|
98
|
+
.tooltipButton__4-ns8[data-hovered], .tooltipButton__4-ns8[data-focus-visible] {
|
|
99
|
+
opacity: 1;
|
|
100
|
+
}
|
|
101
|
+
.tooltipButton__4-ns8[data-focus-visible] {
|
|
102
|
+
border-radius: 50%;
|
|
103
|
+
box-shadow: 0 0 0 2px var(--accent-color);
|
|
104
|
+
}
|
|
105
|
+
.infoIcon__zyj7w {
|
|
106
|
+
width: 16px;
|
|
107
|
+
height: 16px;
|
|
108
|
+
}
|
|
109
|
+
.tooltip__-Jo2K {
|
|
110
|
+
max-width: 220px;
|
|
111
|
+
padding: 6px 10px;
|
|
112
|
+
font: var(--tooltip-font);
|
|
113
|
+
color: var(--tooltip-text-color);
|
|
114
|
+
background: var(--tooltip-background-color);
|
|
115
|
+
border-radius: 6px;
|
|
116
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
|
|
117
|
+
}
|
|
118
|
+
.group__2UIvk {
|
|
119
|
+
box-sizing: border-box;
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: 8px;
|
|
123
|
+
width: 100%;
|
|
124
|
+
padding: 8px 12px;
|
|
125
|
+
font: inherit;
|
|
126
|
+
color: inherit;
|
|
127
|
+
background: var(--field-background-color);
|
|
128
|
+
border-style: solid;
|
|
129
|
+
border-width: var(--borderWidth);
|
|
130
|
+
border-color: var(--borderColor);
|
|
131
|
+
border-start-start-radius: var(--borderStartStartRadius);
|
|
132
|
+
border-start-end-radius: var(--borderStartEndRadius);
|
|
133
|
+
border-end-start-radius: var(--borderEndStartRadius);
|
|
134
|
+
border-end-end-radius: var(--borderEndEndRadius);
|
|
135
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
136
|
+
}
|
|
137
|
+
.group__2UIvk:focus-within {
|
|
138
|
+
border-color: var(--accent-color);
|
|
139
|
+
box-shadow: 0 0 0 1px var(--accent-color);
|
|
140
|
+
}
|
|
141
|
+
.group__2UIvk:hover:not(:focus-within) {
|
|
142
|
+
border-color: color-mix(in srgb, var(--accent-color) 45%, transparent);
|
|
143
|
+
}
|
|
144
|
+
.datePicker--hover .group__2UIvk {
|
|
145
|
+
border-color: color-mix(in srgb, var(--accent-color) 45%, transparent);
|
|
146
|
+
}
|
|
147
|
+
.datePicker--focus .group__2UIvk {
|
|
148
|
+
border-color: var(--accent-color);
|
|
149
|
+
box-shadow: 0 0 0 1px var(--accent-color);
|
|
150
|
+
}
|
|
151
|
+
.datePicker__n-7WW[data-disabled],
|
|
152
|
+
.datePicker--disabled {
|
|
153
|
+
opacity: 0.55;
|
|
154
|
+
cursor: not-allowed;
|
|
155
|
+
}
|
|
156
|
+
.field__lHZ2g {
|
|
157
|
+
display: inline-flex;
|
|
158
|
+
flex: 1;
|
|
159
|
+
min-width: 0;
|
|
160
|
+
gap: 1px;
|
|
161
|
+
font: inherit;
|
|
162
|
+
color: inherit;
|
|
163
|
+
white-space: nowrap;
|
|
164
|
+
}
|
|
165
|
+
.rangeSeparator__jAkz- {
|
|
166
|
+
flex: none;
|
|
167
|
+
padding: 0 4px;
|
|
168
|
+
opacity: 0.6;
|
|
169
|
+
}
|
|
170
|
+
.description__nmlkW {
|
|
171
|
+
margin-top: 4px;
|
|
172
|
+
font: var(--description-font);
|
|
173
|
+
color: var(--description-text-color);
|
|
174
|
+
opacity: 0.7;
|
|
175
|
+
}
|
|
176
|
+
.segment__w-IAO {
|
|
177
|
+
padding: 0 2px;
|
|
178
|
+
border-radius: 3px;
|
|
179
|
+
font-variant-numeric: tabular-nums;
|
|
180
|
+
text-align: center;
|
|
181
|
+
outline: none;
|
|
182
|
+
}
|
|
183
|
+
.segment__w-IAO[data-type=literal] {
|
|
184
|
+
padding: 0;
|
|
185
|
+
opacity: 0.5;
|
|
186
|
+
}
|
|
187
|
+
.segment__w-IAO[data-placeholder] {
|
|
188
|
+
color: color-mix(in srgb, currentColor 45%, transparent);
|
|
189
|
+
}
|
|
190
|
+
.segment__w-IAO[data-focused] {
|
|
191
|
+
background: var(--accent-color);
|
|
192
|
+
color: var(--selected-date-text-color);
|
|
193
|
+
}
|
|
194
|
+
.clearButton__NdcRh {
|
|
195
|
+
flex: none;
|
|
196
|
+
box-sizing: border-box;
|
|
197
|
+
display: inline-flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
justify-content: center;
|
|
200
|
+
width: 24px;
|
|
201
|
+
height: 24px;
|
|
202
|
+
margin: 0;
|
|
203
|
+
padding: 0;
|
|
204
|
+
border: none;
|
|
205
|
+
border-radius: 6px;
|
|
206
|
+
background: transparent;
|
|
207
|
+
color: inherit;
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
transition: background 0.15s ease;
|
|
210
|
+
}
|
|
211
|
+
.clearButton__NdcRh:hover {
|
|
212
|
+
background: var(--day-hover-background-color);
|
|
213
|
+
}
|
|
214
|
+
.clearIcon__Klxmr {
|
|
215
|
+
width: 18px;
|
|
216
|
+
height: 18px;
|
|
217
|
+
}
|
|
218
|
+
.calendarButton__s-QAb {
|
|
219
|
+
flex: none;
|
|
220
|
+
box-sizing: border-box;
|
|
221
|
+
display: inline-flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
justify-content: center;
|
|
224
|
+
width: 28px;
|
|
225
|
+
height: 28px;
|
|
226
|
+
margin: 0;
|
|
227
|
+
padding: 0;
|
|
228
|
+
border: none;
|
|
229
|
+
border-radius: 6px;
|
|
230
|
+
background: transparent;
|
|
231
|
+
color: inherit;
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
transition: background 0.15s ease;
|
|
234
|
+
}
|
|
235
|
+
.calendarButton__s-QAb[data-hovered], .calendarButton__s-QAb[data-pressed] {
|
|
236
|
+
background: var(--day-hover-background-color);
|
|
237
|
+
}
|
|
238
|
+
.calendarButton__s-QAb[data-focus-visible] {
|
|
239
|
+
box-shadow: 0 0 0 2px var(--accent-color);
|
|
240
|
+
}
|
|
241
|
+
.calendarButton__s-QAb[data-disabled] {
|
|
242
|
+
cursor: default;
|
|
243
|
+
opacity: 0.5;
|
|
244
|
+
}
|
|
245
|
+
.calendarIcon__CYg1H {
|
|
246
|
+
width: 20px;
|
|
247
|
+
height: 20px;
|
|
248
|
+
}
|
|
249
|
+
.popover__JAzkr {
|
|
250
|
+
box-sizing: border-box;
|
|
251
|
+
background: var(--calendar-background-color);
|
|
252
|
+
border: 1px solid var(--borderColor);
|
|
253
|
+
border-radius: 8px;
|
|
254
|
+
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
|
|
255
|
+
}
|
|
256
|
+
.dialog__XWvmP {
|
|
257
|
+
outline: none;
|
|
258
|
+
}
|
|
259
|
+
.calendar__dQLez {
|
|
260
|
+
box-sizing: border-box;
|
|
261
|
+
padding: 12px;
|
|
262
|
+
color: inherit;
|
|
263
|
+
}
|
|
264
|
+
.calendarHeader__h7CtJ {
|
|
265
|
+
display: flex;
|
|
266
|
+
align-items: center;
|
|
267
|
+
justify-content: space-between;
|
|
268
|
+
gap: 8px;
|
|
269
|
+
margin-bottom: 8px;
|
|
270
|
+
}
|
|
271
|
+
.calendarHeading__JLdsJ {
|
|
272
|
+
margin: 0;
|
|
273
|
+
font-size: 14px;
|
|
274
|
+
font-weight: 600;
|
|
275
|
+
}
|
|
276
|
+
.navButton__5nJy7 {
|
|
277
|
+
box-sizing: border-box;
|
|
278
|
+
display: inline-flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
justify-content: center;
|
|
281
|
+
width: 28px;
|
|
282
|
+
height: 28px;
|
|
283
|
+
padding: 0;
|
|
284
|
+
border: none;
|
|
285
|
+
border-radius: 6px;
|
|
286
|
+
background: transparent;
|
|
287
|
+
color: inherit;
|
|
288
|
+
cursor: pointer;
|
|
289
|
+
transition: background 0.15s ease;
|
|
290
|
+
}
|
|
291
|
+
.navButton__5nJy7[data-hovered] {
|
|
292
|
+
background: var(--day-hover-background-color);
|
|
293
|
+
}
|
|
294
|
+
.navButton__5nJy7[data-disabled] {
|
|
295
|
+
cursor: default;
|
|
296
|
+
opacity: 0.4;
|
|
297
|
+
}
|
|
298
|
+
.navIcon__LkD1n {
|
|
299
|
+
width: 18px;
|
|
300
|
+
height: 18px;
|
|
301
|
+
}
|
|
302
|
+
.calendarGrid__7hp87 {
|
|
303
|
+
border-collapse: collapse;
|
|
304
|
+
}
|
|
305
|
+
.calendarGrid__7hp87 th {
|
|
306
|
+
padding: 6px 0;
|
|
307
|
+
font-size: 12px;
|
|
308
|
+
font-weight: 500;
|
|
309
|
+
color: color-mix(in srgb, currentColor 55%, transparent);
|
|
310
|
+
}
|
|
311
|
+
.calendarCell__Pjcxr {
|
|
312
|
+
box-sizing: border-box;
|
|
313
|
+
width: 34px;
|
|
314
|
+
height: 34px;
|
|
315
|
+
text-align: center;
|
|
316
|
+
vertical-align: middle;
|
|
317
|
+
border-radius: 8px;
|
|
318
|
+
font-size: 13px;
|
|
319
|
+
outline: none;
|
|
320
|
+
cursor: pointer;
|
|
321
|
+
}
|
|
322
|
+
.calendarCell__Pjcxr[data-outside-month] {
|
|
323
|
+
display: none;
|
|
324
|
+
}
|
|
325
|
+
.calendarCell__Pjcxr[data-today] {
|
|
326
|
+
background: var(--today-background-color);
|
|
327
|
+
color: var(--today-text-color);
|
|
328
|
+
box-shadow: inset 0 0 0 1.5px var(--today-outline-color);
|
|
329
|
+
}
|
|
330
|
+
.calendarCell__Pjcxr[data-hovered] {
|
|
331
|
+
background: var(--day-hover-background-color);
|
|
332
|
+
}
|
|
333
|
+
.calendarCell__Pjcxr[data-selected] {
|
|
334
|
+
background: var(--accent-color);
|
|
335
|
+
color: var(--selected-date-text-color);
|
|
336
|
+
}
|
|
337
|
+
.calendarCell__Pjcxr[data-disabled], .calendarCell__Pjcxr[data-unavailable] {
|
|
338
|
+
color: color-mix(in srgb, currentColor 35%, transparent);
|
|
339
|
+
cursor: default;
|
|
340
|
+
}
|
|
341
|
+
.calendarCell__Pjcxr[data-focus-visible] {
|
|
342
|
+
box-shadow: 0 0 0 2px var(--accent-color);
|
|
343
|
+
}
|
|
344
|
+
.fallbackDirection__HeRgn:not([dir]) {
|
|
345
|
+
direction: var(--wix-opt-in-direction);
|
|
346
|
+
}
|
|
347
|
+
.presetWrapper__J1yzj {
|
|
348
|
+
display: contents;
|
|
349
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DateValue } from 'react-aria-components';
|
|
2
|
+
import { DatePickerProps } from '../DatePicker.types';
|
|
3
|
+
export declare const useDateConstraints: (params: {
|
|
4
|
+
minDate: DatePickerProps["minDate"];
|
|
5
|
+
maxDate: DatePickerProps["maxDate"];
|
|
6
|
+
allowPastDates: boolean;
|
|
7
|
+
allowFutureDates: boolean;
|
|
8
|
+
withTime: boolean;
|
|
9
|
+
}) => {
|
|
10
|
+
minValue: DateValue | undefined;
|
|
11
|
+
maxValue: DateValue | undefined;
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DateValue } from 'react-aria-components';
|
|
2
|
+
import { DatePickerProps, DateRangeValue } from '../DatePicker.types';
|
|
3
|
+
export declare const useDatePickerValue: (params: {
|
|
4
|
+
value: DatePickerProps["value"];
|
|
5
|
+
endValue: DatePickerProps["endValue"];
|
|
6
|
+
onChange: NonNullable<DatePickerProps["onChange"]>;
|
|
7
|
+
onEndChange: NonNullable<DatePickerProps["onEndChange"]>;
|
|
8
|
+
withTime: boolean;
|
|
9
|
+
}) => {
|
|
10
|
+
dateValue: DateValue | null;
|
|
11
|
+
rangeValue: DateRangeValue;
|
|
12
|
+
handleSingleChange: (next: DateValue | null) => void;
|
|
13
|
+
handleRangeChange: (next: DateRangeValue) => void;
|
|
14
|
+
hasValue: (isRange: boolean) => boolean;
|
|
15
|
+
};
|