@alto-avios/alto-ui 3.8.0 → 4.0.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/IconButton.module-4obqG6tY.js +1050 -0
- package/dist/IconButton.module-4obqG6tY.js.map +1 -0
- package/dist/assets/AutoplayControl.css +1 -0
- package/dist/assets/AviosCurrency.css +1 -1
- package/dist/assets/AviosCurrencyBadge.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Carousel.css +1 -0
- package/dist/assets/CarouselButton.css +1 -0
- package/dist/assets/CarouselDots.css +1 -0
- package/dist/assets/ComboBox.css +1 -1
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/MonthYearField.css +1 -0
- package/dist/assets/SearchField.css +1 -1
- package/dist/assets/SelectNative.css +1 -1
- package/dist/assets/SkeletonLoader.css +1 -0
- package/dist/assets/TextAreaField.css +1 -1
- package/dist/components/Accordion/Accordion.js +8 -8
- package/dist/components/AviosCurrency/AviosCurrency.d.ts +1 -2
- package/dist/components/AviosCurrency/AviosCurrency.js +40 -36
- package/dist/components/AviosCurrency/AviosCurrency.js.map +1 -1
- package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.d.ts +48 -0
- package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.js +165 -0
- package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.js.map +1 -0
- package/dist/components/AviosCurrencyBadge/index.d.ts +1 -0
- package/dist/components/AviosCurrencyBadge/index.js +5 -0
- package/dist/components/AviosCurrencyBadge/index.js.map +1 -0
- package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.js +3 -3
- package/dist/components/Badge/Badge.d.ts +1 -16
- package/dist/components/Badge/Badge.js +3 -9
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Box/Box.d.ts +0 -4
- package/dist/components/Box/Box.js +1 -5
- package/dist/components/Box/Box.js.map +1 -1
- package/dist/components/Button/Button.d.ts +34 -64
- package/dist/components/Button/Button.js +61 -44
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/components/CalloutBanner/CalloutBanner.js +3 -3
- package/dist/components/Carousel/AutoplayControl/AutoplayControl.d.ts +27 -0
- package/dist/components/Carousel/AutoplayControl/AutoplayControl.js +115 -0
- package/dist/components/Carousel/AutoplayControl/AutoplayControl.js.map +1 -0
- package/dist/components/Carousel/Carousel.d.ts +171 -0
- package/dist/components/Carousel/Carousel.js +373 -0
- package/dist/components/Carousel/Carousel.js.map +1 -0
- package/dist/components/Carousel/CarouselButton/CarouselButton.d.ts +44 -0
- package/dist/components/Carousel/CarouselButton/CarouselButton.js +195 -0
- package/dist/components/Carousel/CarouselButton/CarouselButton.js.map +1 -0
- package/dist/components/Carousel/CarouselControls.d.ts +7 -0
- package/dist/components/Carousel/CarouselControls.js +305 -0
- package/dist/components/Carousel/CarouselControls.js.map +1 -0
- package/dist/components/Carousel/CarouselDots/CarouselDots.d.ts +16 -0
- package/dist/components/Carousel/CarouselDots/CarouselDots.js +150 -0
- package/dist/components/Carousel/CarouselDots/CarouselDots.js.map +1 -0
- package/dist/components/Carousel/index.d.ts +1 -0
- package/dist/components/Carousel/index.js +5 -0
- package/dist/components/Carousel/index.js.map +1 -0
- package/dist/components/ComboBox/ComboBox.js +10 -13
- package/dist/components/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/CreditCardNumberField/CreditCardNumberField.js +5 -5
- package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js +5 -5
- package/dist/components/Dialog/Dialog.js +4 -4
- package/dist/components/ErrorSummary/ErrorSummary.js +4 -4
- package/dist/components/FieldError/FieldError.d.ts +5 -1
- package/dist/components/FieldError/FieldError.js +8 -1
- package/dist/components/FieldError/FieldError.js.map +1 -1
- package/dist/components/FieldHeader/FieldHeader.js +1 -1
- package/dist/components/Grid/Grid.d.ts +6 -1
- package/dist/components/Grid/Grid.js +2 -0
- package/dist/components/Grid/Grid.js.map +1 -1
- package/dist/components/Heading/Heading.d.ts +1 -6
- package/dist/components/Heading/Heading.js +1 -6
- package/dist/components/Heading/Heading.js.map +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -6
- package/dist/components/IconButton/IconButton.d.ts +3 -15
- package/dist/components/IconButton/IconButton.js +18 -128
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/Image/Image.d.ts +0 -1
- package/dist/components/Image/Image.js +8 -13
- package/dist/components/Image/Image.js.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -16
- package/dist/components/Link/Link.js +4 -11
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/ListBoxItem/index.d.ts +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +2 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.js +6 -4
- package/dist/components/LoadingSpinner/LoadingSpinner.js.map +1 -1
- package/dist/components/MonthYearField/MonthYearField.d.ts +107 -0
- package/dist/components/MonthYearField/MonthYearField.js +332 -0
- package/dist/components/MonthYearField/MonthYearField.js.map +1 -0
- package/dist/components/MonthYearField/index.d.ts +2 -0
- package/dist/components/MonthYearField/index.js +5 -0
- package/dist/components/MonthYearField/index.js.map +1 -0
- package/dist/components/Paragraph/Paragraph.d.ts +1 -6
- package/dist/components/Paragraph/Paragraph.js +1 -6
- package/dist/components/Paragraph/Paragraph.js.map +1 -1
- package/dist/components/PasswordField/PasswordField.js +3 -3
- package/dist/components/PhoneNumberField/PhoneNumberField.js +1 -1
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/SearchField/SearchField.js +9 -7
- package/dist/components/SearchField/SearchField.js.map +1 -1
- package/dist/components/Section/Section.d.ts +42 -1
- package/dist/components/Section/Section.js +8 -13
- package/dist/components/Section/Section.js.map +1 -1
- package/dist/components/SelectCard/SelectCard.js +2 -2
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +50 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.js +150 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.js.map +1 -0
- package/dist/components/SkeletonLoader/index.d.ts +1 -0
- package/dist/components/SkeletonLoader/index.js +5 -0
- package/dist/components/SkeletonLoader/index.js.map +1 -0
- package/dist/components/SubHeading/SubHeading.d.ts +1 -6
- package/dist/components/SubHeading/SubHeading.js +1 -6
- package/dist/components/SubHeading/SubHeading.js.map +1 -1
- package/dist/components/TextAreaField/TextAreaField.js +1 -1
- package/dist/components/_base/Field/Field.js +4 -4
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/{react-number-format.es-BjKL6crg.js → react-number-format.es-Dbc1db6s.js} +6 -6
- package/dist/{react-number-format.es-BjKL6crg.js.map → react-number-format.es-Dbc1db6s.js.map} +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Field } from "../_base/Field/Field.js";
|
|
3
|
+
import React__default, { forwardRef, useRef, useCallback, useImperativeHandle } from "react";
|
|
4
|
+
import { Input } from "react-aria-components";
|
|
5
|
+
import '../../assets/MonthYearField.css';const monthYearField = "_monthYearField_q5uwu_1";
|
|
6
|
+
const inputsContainer = "_inputsContainer_q5uwu_10";
|
|
7
|
+
const input = "_input_q5uwu_10";
|
|
8
|
+
const separator = "_separator_q5uwu_117";
|
|
9
|
+
const styles = {
|
|
10
|
+
monthYearField,
|
|
11
|
+
inputsContainer,
|
|
12
|
+
input,
|
|
13
|
+
separator
|
|
14
|
+
};
|
|
15
|
+
const VALID_MONTHS = Array.from({
|
|
16
|
+
length: 12
|
|
17
|
+
}, (_, i) => i + 1);
|
|
18
|
+
const formatMonth = (value) => {
|
|
19
|
+
if (!value) return "";
|
|
20
|
+
const num = parseInt(value, 10);
|
|
21
|
+
if (isNaN(num) || num < 1 || num > 12) return value;
|
|
22
|
+
return num.toString().padStart(2, "0");
|
|
23
|
+
};
|
|
24
|
+
const formatYear = (value, yearFormat = 2) => {
|
|
25
|
+
if (!value) return "";
|
|
26
|
+
const num = parseInt(value, 10);
|
|
27
|
+
if (isNaN(num)) return value;
|
|
28
|
+
if (yearFormat === 4) {
|
|
29
|
+
return Math.max(1e3, Math.min(9999, num)).toString();
|
|
30
|
+
} else {
|
|
31
|
+
const year = num % 100;
|
|
32
|
+
return year.toString().padStart(2, "0");
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const convertTwoDigitYearToFour = (twoDigitYear) => {
|
|
36
|
+
if (!twoDigitYear) return "";
|
|
37
|
+
const num = parseInt(twoDigitYear, 10);
|
|
38
|
+
if (isNaN(num)) return twoDigitYear;
|
|
39
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
40
|
+
const currentCentury = Math.floor(currentYear / 100) * 100;
|
|
41
|
+
const currentTwoDigit = currentYear % 100;
|
|
42
|
+
if (num <= currentTwoDigit + 20) {
|
|
43
|
+
return (currentCentury + num).toString();
|
|
44
|
+
} else {
|
|
45
|
+
return (currentCentury - 100 + num).toString();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
function FieldWrapper({
|
|
49
|
+
children,
|
|
50
|
+
className,
|
|
51
|
+
isDisabled,
|
|
52
|
+
isInvalid,
|
|
53
|
+
errorMessage
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ jsx("div", { className, role: "group", ...isDisabled ? {
|
|
56
|
+
"data-disabled": true
|
|
57
|
+
} : {}, ...isInvalid || errorMessage ? {
|
|
58
|
+
"data-invalid": true
|
|
59
|
+
} : {}, children });
|
|
60
|
+
}
|
|
61
|
+
const MonthYearField = forwardRef((props, ref) => {
|
|
62
|
+
const {
|
|
63
|
+
monthValue: monthValueControlled,
|
|
64
|
+
yearValue: yearValueControlled,
|
|
65
|
+
yearFormat = 2,
|
|
66
|
+
onChange: onChangeControlled,
|
|
67
|
+
onFocus,
|
|
68
|
+
onBlur,
|
|
69
|
+
isDisabled = false,
|
|
70
|
+
isReadOnly = false,
|
|
71
|
+
isRequired = false,
|
|
72
|
+
autoCompleteMonth,
|
|
73
|
+
autoCompleteYear,
|
|
74
|
+
labelMonth = "Month",
|
|
75
|
+
labelYear = "Year",
|
|
76
|
+
placeholderMonth = "MM",
|
|
77
|
+
placeholderYear = yearFormat === 4 ? "YYYY" : "YY",
|
|
78
|
+
id: providedId,
|
|
79
|
+
name,
|
|
80
|
+
...fieldProps
|
|
81
|
+
} = props;
|
|
82
|
+
const monthRef = useRef(null);
|
|
83
|
+
const yearRef = useRef(null);
|
|
84
|
+
const [monthValueInternal, setMonthValue] = React__default.useState(monthValueControlled ?? "");
|
|
85
|
+
const [yearValueInternal, setYearValue] = React__default.useState(yearValueControlled ?? "");
|
|
86
|
+
const monthValue = monthValueControlled ?? monthValueInternal;
|
|
87
|
+
const yearValue = yearValueControlled ?? yearValueInternal;
|
|
88
|
+
const uniqueId = React__default.useId();
|
|
89
|
+
const id = providedId || uniqueId;
|
|
90
|
+
const onChange = useCallback((value) => {
|
|
91
|
+
setMonthValue(value.month);
|
|
92
|
+
setYearValue(value.year);
|
|
93
|
+
if (typeof onChangeControlled === "function") onChangeControlled == null ? void 0 : onChangeControlled(value);
|
|
94
|
+
}, [onChangeControlled]);
|
|
95
|
+
useImperativeHandle(ref, () => ({
|
|
96
|
+
focusMonth: () => {
|
|
97
|
+
var _a;
|
|
98
|
+
return (_a = monthRef.current) == null ? void 0 : _a.focus();
|
|
99
|
+
},
|
|
100
|
+
focusYear: () => {
|
|
101
|
+
var _a;
|
|
102
|
+
return (_a = yearRef.current) == null ? void 0 : _a.focus();
|
|
103
|
+
},
|
|
104
|
+
getValue: () => ({
|
|
105
|
+
month: monthValue,
|
|
106
|
+
year: yearValue
|
|
107
|
+
}),
|
|
108
|
+
setValue: (value) => onChange == null ? void 0 : onChange(value)
|
|
109
|
+
}), [monthValue, yearValue, onChange]);
|
|
110
|
+
const updateValue = useCallback((newMonth, newYear) => {
|
|
111
|
+
onChange == null ? void 0 : onChange({
|
|
112
|
+
month: newMonth,
|
|
113
|
+
year: newYear
|
|
114
|
+
});
|
|
115
|
+
}, [onChange]);
|
|
116
|
+
const handleMonthChange = useCallback((e) => {
|
|
117
|
+
if (isReadOnly) return;
|
|
118
|
+
let value = e.target.value.replace(/\D/g, "");
|
|
119
|
+
if (value.length > 2) {
|
|
120
|
+
value = value.slice(0, 2);
|
|
121
|
+
}
|
|
122
|
+
if (value.length === 1 && parseInt(value) > 1) {
|
|
123
|
+
value = "0" + value;
|
|
124
|
+
} else if (value.length === 2) {
|
|
125
|
+
const num = parseInt(value, 10);
|
|
126
|
+
if (num > 12) {
|
|
127
|
+
value = "12";
|
|
128
|
+
} else if (num < 1) {
|
|
129
|
+
value = "01";
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
updateValue(value, yearValue);
|
|
133
|
+
if (value.length === 2 && VALID_MONTHS.includes(parseInt(value, 10))) {
|
|
134
|
+
setTimeout(() => {
|
|
135
|
+
var _a;
|
|
136
|
+
return (_a = yearRef.current) == null ? void 0 : _a.focus();
|
|
137
|
+
}, 0);
|
|
138
|
+
}
|
|
139
|
+
}, [updateValue, yearValue, isReadOnly]);
|
|
140
|
+
const handleMonthBlur = useCallback((e) => {
|
|
141
|
+
if (isReadOnly) return;
|
|
142
|
+
const value = e.target.value;
|
|
143
|
+
if (value && value.length === 1) {
|
|
144
|
+
const formatted = formatMonth(value);
|
|
145
|
+
updateValue(formatted, yearValue);
|
|
146
|
+
}
|
|
147
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
148
|
+
}, [updateValue, yearValue, onBlur, isReadOnly]);
|
|
149
|
+
const handleYearChange = useCallback((e) => {
|
|
150
|
+
if (isReadOnly) return;
|
|
151
|
+
let value = e.target.value.replace(/\D/g, "");
|
|
152
|
+
const maxLength = yearFormat === 4 ? 4 : 2;
|
|
153
|
+
if (value.length > maxLength) {
|
|
154
|
+
value = value.slice(0, maxLength);
|
|
155
|
+
}
|
|
156
|
+
updateValue(monthValue, value);
|
|
157
|
+
}, [updateValue, monthValue, isReadOnly, yearFormat]);
|
|
158
|
+
const handleYearBlur = useCallback((e) => {
|
|
159
|
+
if (isReadOnly) return;
|
|
160
|
+
const value = e.target.value;
|
|
161
|
+
if (value) {
|
|
162
|
+
let processedValue = value;
|
|
163
|
+
if (yearFormat === 2) {
|
|
164
|
+
if (value.length === 1 || value.length === 2) {
|
|
165
|
+
processedValue = formatYear(value, yearFormat);
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
if (value.length === 1 || value.length === 2) {
|
|
169
|
+
processedValue = convertTwoDigitYearToFour(value);
|
|
170
|
+
} else {
|
|
171
|
+
processedValue = formatYear(value, yearFormat);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
updateValue(monthValue, processedValue);
|
|
175
|
+
}
|
|
176
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
177
|
+
}, [updateValue, monthValue, onBlur, isReadOnly, yearFormat]);
|
|
178
|
+
const handleMonthKeyDown = useCallback((e) => {
|
|
179
|
+
var _a;
|
|
180
|
+
if (isReadOnly) return;
|
|
181
|
+
const {
|
|
182
|
+
key,
|
|
183
|
+
currentTarget
|
|
184
|
+
} = e;
|
|
185
|
+
const {
|
|
186
|
+
value,
|
|
187
|
+
selectionStart,
|
|
188
|
+
selectionEnd
|
|
189
|
+
} = currentTarget;
|
|
190
|
+
if (key === "ArrowRight" && selectionStart === value.length) {
|
|
191
|
+
e.preventDefault();
|
|
192
|
+
(_a = yearRef.current) == null ? void 0 : _a.focus();
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
if (key === "Tab" && !e.shiftKey) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (/^\d$/.test(key)) {
|
|
199
|
+
e.preventDefault();
|
|
200
|
+
const digit = key;
|
|
201
|
+
let newValue = "";
|
|
202
|
+
if (selectionStart === 0 && selectionEnd === value.length) {
|
|
203
|
+
newValue = digit;
|
|
204
|
+
} else if (value.length === 0) {
|
|
205
|
+
newValue = digit;
|
|
206
|
+
} else if (value.length === 1) {
|
|
207
|
+
if (value === "0") {
|
|
208
|
+
newValue = digit === "0" ? "01" : "0" + digit;
|
|
209
|
+
} else if (value === "1") {
|
|
210
|
+
newValue = "1" + (parseInt(digit) > 2 ? "2" : digit);
|
|
211
|
+
} else {
|
|
212
|
+
newValue = "0" + digit;
|
|
213
|
+
}
|
|
214
|
+
} else {
|
|
215
|
+
newValue = digit;
|
|
216
|
+
}
|
|
217
|
+
if (newValue.length === 2) {
|
|
218
|
+
const monthNum = parseInt(newValue, 10);
|
|
219
|
+
if (monthNum > 12) {
|
|
220
|
+
newValue = "12";
|
|
221
|
+
} else if (monthNum < 1) {
|
|
222
|
+
newValue = "01";
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
updateValue(newValue, yearValue);
|
|
226
|
+
if (newValue.length === 2) {
|
|
227
|
+
setTimeout(() => {
|
|
228
|
+
var _a2;
|
|
229
|
+
return (_a2 = yearRef.current) == null ? void 0 : _a2.focus();
|
|
230
|
+
}, 0);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
if (key === "ArrowUp" || key === "ArrowDown") {
|
|
234
|
+
e.preventDefault();
|
|
235
|
+
const current = parseInt(value || "1", 10);
|
|
236
|
+
const delta = key === "ArrowUp" ? 1 : -1;
|
|
237
|
+
let newMonth = current + delta;
|
|
238
|
+
if (newMonth > 12) newMonth = 1;
|
|
239
|
+
if (newMonth < 1) newMonth = 12;
|
|
240
|
+
const formatted = newMonth.toString().padStart(2, "0");
|
|
241
|
+
updateValue(formatted, yearValue);
|
|
242
|
+
}
|
|
243
|
+
}, [updateValue, yearValue, isReadOnly]);
|
|
244
|
+
const handleYearKeyDown = useCallback((e) => {
|
|
245
|
+
var _a, _b;
|
|
246
|
+
if (isReadOnly) return;
|
|
247
|
+
const {
|
|
248
|
+
key,
|
|
249
|
+
currentTarget
|
|
250
|
+
} = e;
|
|
251
|
+
const {
|
|
252
|
+
value,
|
|
253
|
+
selectionStart,
|
|
254
|
+
selectionEnd
|
|
255
|
+
} = currentTarget;
|
|
256
|
+
if (key === "ArrowLeft" && selectionStart === 0) {
|
|
257
|
+
e.preventDefault();
|
|
258
|
+
(_a = monthRef.current) == null ? void 0 : _a.focus();
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
if (key === "Backspace" && value === "" && selectionStart === 0) {
|
|
262
|
+
e.preventDefault();
|
|
263
|
+
(_b = monthRef.current) == null ? void 0 : _b.focus();
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
if (/^\d$/.test(key)) {
|
|
267
|
+
e.preventDefault();
|
|
268
|
+
const digit = key;
|
|
269
|
+
let newValue = "";
|
|
270
|
+
const maxLength = yearFormat === 4 ? 4 : 2;
|
|
271
|
+
if (selectionStart === 0 && selectionEnd === value.length) {
|
|
272
|
+
newValue = digit;
|
|
273
|
+
} else if (value.length === 0) {
|
|
274
|
+
newValue = digit;
|
|
275
|
+
} else if (value.length < maxLength) {
|
|
276
|
+
newValue = value + digit;
|
|
277
|
+
} else {
|
|
278
|
+
newValue = value.slice(1) + digit;
|
|
279
|
+
}
|
|
280
|
+
if (newValue.length > maxLength) {
|
|
281
|
+
newValue = newValue.slice(-maxLength);
|
|
282
|
+
}
|
|
283
|
+
updateValue(monthValue, newValue);
|
|
284
|
+
}
|
|
285
|
+
if (key === "ArrowUp" || key === "ArrowDown") {
|
|
286
|
+
e.preventDefault();
|
|
287
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
288
|
+
const defaultYear = yearFormat === 4 ? currentYear : currentYear % 100;
|
|
289
|
+
const current = parseInt(value || defaultYear.toString(), 10);
|
|
290
|
+
const delta = key === "ArrowUp" ? 1 : -1;
|
|
291
|
+
let newYear = current + delta;
|
|
292
|
+
if (yearFormat === 4) {
|
|
293
|
+
if (newYear > 9999) newYear = 1e3;
|
|
294
|
+
if (newYear < 1e3) newYear = 9999;
|
|
295
|
+
} else {
|
|
296
|
+
if (newYear > 99) newYear = 0;
|
|
297
|
+
if (newYear < 0) newYear = 99;
|
|
298
|
+
}
|
|
299
|
+
const formatted = yearFormat === 4 ? newYear.toString() : newYear.toString().padStart(2, "0");
|
|
300
|
+
updateValue(monthValue, formatted);
|
|
301
|
+
}
|
|
302
|
+
}, [updateValue, monthValue, isReadOnly, yearFormat]);
|
|
303
|
+
const moveCaretToEnd = (input2) => {
|
|
304
|
+
const length = input2.value.length;
|
|
305
|
+
input2.setSelectionRange(length, length);
|
|
306
|
+
};
|
|
307
|
+
const handleMonthFocus = useCallback((e) => {
|
|
308
|
+
setTimeout(() => moveCaretToEnd(e.target), 0);
|
|
309
|
+
onFocus == null ? void 0 : onFocus(e);
|
|
310
|
+
}, [onFocus]);
|
|
311
|
+
const handleYearFocus = useCallback((e) => {
|
|
312
|
+
setTimeout(() => moveCaretToEnd(e.target), 0);
|
|
313
|
+
onFocus == null ? void 0 : onFocus(e);
|
|
314
|
+
}, [onFocus]);
|
|
315
|
+
const combinedValue = monthValue && yearValue ? `${monthValue.padStart(2, "0")}/${yearValue}` : "";
|
|
316
|
+
return /* @__PURE__ */ jsxs(Field, { as: FieldWrapper, ...fieldProps, isDisabled, isRequired, labelFor: id, className: styles.monthYearField, children: [
|
|
317
|
+
name && /* @__PURE__ */ jsx("input", { type: "hidden", name, value: combinedValue }),
|
|
318
|
+
/* @__PURE__ */ jsxs("div", { className: styles.inputsContainer, ...!!(props == null ? void 0 : props.errorMessage) || (props == null ? void 0 : props.isInvalid) ? {
|
|
319
|
+
"data-invalid": true
|
|
320
|
+
} : {}, children: [
|
|
321
|
+
/* @__PURE__ */ jsx(Input, { ref: monthRef, id: `${id}-month`, name: `${id}-month`, inputMode: "numeric", "aria-label": labelMonth, placeholder: placeholderMonth, value: monthValue, onChange: handleMonthChange, onBlur: handleMonthBlur, onFocus: handleMonthFocus, onKeyDown: handleMonthKeyDown, maxLength: 2, className: styles.input, autoComplete: autoCompleteMonth, "data-segment": "month", type: "text" }),
|
|
322
|
+
/* @__PURE__ */ jsx("span", { className: styles.separator, "aria-hidden": "true", "data-disabled": isDisabled || void 0, children: "/" }),
|
|
323
|
+
/* @__PURE__ */ jsx(Input, { ref: yearRef, id: `${id}-year`, name: `${id}-year`, inputMode: "numeric", "aria-label": labelYear, placeholder: placeholderYear, value: yearValue, onChange: handleYearChange, onBlur: handleYearBlur, onFocus: handleYearFocus, onKeyDown: handleYearKeyDown, maxLength: yearFormat === 4 ? 4 : 2, className: styles.input, autoComplete: autoCompleteYear, "data-segment": "year", "data-year-format": yearFormat, type: "text" })
|
|
324
|
+
] })
|
|
325
|
+
] });
|
|
326
|
+
});
|
|
327
|
+
MonthYearField.displayName = "MonthYearField";
|
|
328
|
+
export {
|
|
329
|
+
MonthYearField,
|
|
330
|
+
MonthYearField as default
|
|
331
|
+
};
|
|
332
|
+
//# sourceMappingURL=MonthYearField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MonthYearField.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -20,11 +20,6 @@ interface BaseProps extends ParagraphVariants {
|
|
|
20
20
|
* @default "secondary"
|
|
21
21
|
*/
|
|
22
22
|
foregroundColor?: ForegroundVariants['foregroundColor'];
|
|
23
|
-
/**
|
|
24
|
-
* The foreground color of the paragraph
|
|
25
|
-
* @deprecated Use `foregroundColor` instead
|
|
26
|
-
*/
|
|
27
|
-
fgColor?: ForegroundVariants['foregroundColor'];
|
|
28
23
|
/**
|
|
29
24
|
* The text alignment of the paragraph
|
|
30
25
|
* @default "start"
|
|
@@ -33,5 +28,5 @@ interface BaseProps extends ParagraphVariants {
|
|
|
33
28
|
}
|
|
34
29
|
type ResponsiveKeys = 'size' | 'textAlign';
|
|
35
30
|
export type ParagraphProps = WithResponsive<BaseProps, ResponsiveKeys>;
|
|
36
|
-
export declare const Paragraph: ({ children, size, foregroundColor,
|
|
31
|
+
export declare const Paragraph: ({ children, size, foregroundColor, textAlign, ...props }: ParagraphProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
32
|
export default Paragraph;
|
|
@@ -44,22 +44,17 @@ const Paragraph = ({
|
|
|
44
44
|
children,
|
|
45
45
|
size = "md",
|
|
46
46
|
foregroundColor = "secondary",
|
|
47
|
-
fgColor,
|
|
48
47
|
textAlign = "start",
|
|
49
48
|
...props
|
|
50
49
|
}) => {
|
|
51
50
|
const breakpoint = useBreakpoint();
|
|
52
51
|
const finalSize = resolveResponsiveProp(size, breakpoint);
|
|
53
52
|
const finalTextAlign = resolveResponsiveProp(textAlign, breakpoint);
|
|
54
|
-
const resolvedFontColor = fgColor ?? foregroundColor ?? "secondary";
|
|
55
|
-
if (fgColor) {
|
|
56
|
-
console.warn("The `fgColor` prop has been deprecated. Please use `foregroundColor` instead.");
|
|
57
|
-
}
|
|
58
53
|
return /* @__PURE__ */ jsx("p", { className: `${paragraph({
|
|
59
54
|
size: finalSize,
|
|
60
55
|
textAlign: finalTextAlign
|
|
61
56
|
})} ${foregroundColorVariants({
|
|
62
|
-
foregroundColor
|
|
57
|
+
foregroundColor
|
|
63
58
|
})}`, ...props, children });
|
|
64
59
|
};
|
|
65
60
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paragraph.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Paragraph.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React__default, { forwardRef, useState } from "react";
|
|
3
3
|
import { Field } from "../_base/Field/Field.js";
|
|
4
4
|
import { TextField, Group, Input } from "react-aria-components";
|
|
5
5
|
import { IconButton } from "../IconButton/IconButton.js";
|
|
@@ -32,7 +32,7 @@ const PasswordField = forwardRef(({
|
|
|
32
32
|
const [internalValue, setInternalValue] = useState(props == null ? void 0 : props.defaultValue);
|
|
33
33
|
const value = (props == null ? void 0 : props.value) ?? internalValue;
|
|
34
34
|
const isVisibleState = (props == null ? void 0 : props.isVisible) ?? internalVisible;
|
|
35
|
-
const handleChange =
|
|
35
|
+
const handleChange = React__default.useCallback((e) => {
|
|
36
36
|
var _a2;
|
|
37
37
|
setInternalValue(e.target.value);
|
|
38
38
|
(_a2 = props == null ? void 0 : props.onChange) == null ? void 0 : _a2.call(props, e.target.value);
|
|
@@ -47,7 +47,7 @@ const PasswordField = forwardRef(({
|
|
|
47
47
|
} : {
|
|
48
48
|
iconName: "eye-slash",
|
|
49
49
|
iconPrefix: "fas"
|
|
50
|
-
},
|
|
50
|
+
}, onPress: () => setInternalVisible(!isVisibleState), isDisabled: props == null ? void 0 : props.isDisabled, styleVariant: "neutral", emphasis: "tertiary", "aria-label": tooltipLabel, tooltipLabel })
|
|
51
51
|
] }) }) }),
|
|
52
52
|
/* @__PURE__ */ jsx("ul", { className: styles["passwordField__strength"], "aria-label": requirementsLabel, "aria-live": "polite", children: (_a = props.strengthValidations) == null ? void 0 : _a.map((validation) => /* @__PURE__ */ jsx(PasswordStrengthItem, { status: value ? validation.validation(value) ? "valid" : "invalid" : "neutral", message: validation.message }, `${validation.message}-${value}`)) })
|
|
53
53
|
] });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useState, useId } from "react";
|
|
3
3
|
import { TextField, Input } from "react-aria-components";
|
|
4
|
-
import { u as usePatternFormat, N as NumberFormatBase } from "../../react-number-format.es-
|
|
4
|
+
import { u as usePatternFormat, N as NumberFormatBase } from "../../react-number-format.es-Dbc1db6s.js";
|
|
5
5
|
import { countryPhoneMap, DEFAULT_PATTERN, getCountryOptions, getCountryFlagEmoji, getPhoneNumberValue } from "../../utils/phoneNumber/phoneNumber.js";
|
|
6
6
|
import { Field } from "../_base/Field/Field.js";
|
|
7
7
|
import '../../assets/PhoneNumberField.css';const phoneNumberField = "_phoneNumberField_ysf6g_1";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React__default, { useRef, useEffect } from "react";
|
|
3
3
|
import { usePopover, Overlay, DismissButton } from "@react-aria/overlays";
|
|
4
4
|
import { FocusScope } from "@react-aria/focus";
|
|
5
5
|
import '../../assets/Popover.css';const popoverWrapper = "_popoverWrapper_qrzbw_1";
|
|
@@ -30,7 +30,7 @@ const Popover = ({
|
|
|
30
30
|
}) => {
|
|
31
31
|
const popoverRef = useRef(null);
|
|
32
32
|
const initialPlacement = placement || arrowDirectionToPlacement[arrowDirection];
|
|
33
|
-
const [optimalPlacement, setOptimalPlacement] =
|
|
33
|
+
const [optimalPlacement, setOptimalPlacement] = React__default.useState(initialPlacement);
|
|
34
34
|
useEffect(() => {
|
|
35
35
|
const updatePlacement = () => {
|
|
36
36
|
if (!popoverRef.current || !triggerRef.current) return;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React__default, { useRef, useState } from "react";
|
|
3
3
|
import { Field } from "../_base/Field/Field.js";
|
|
4
4
|
import { TextField, Group, Input } from "react-aria-components";
|
|
5
5
|
import { IconButton } from "../IconButton/IconButton.js";
|
|
6
6
|
import { Icon } from "../Icon/Icon.js";
|
|
7
|
-
import '../../assets/SearchField.css';const searchField = "
|
|
8
|
-
const iconStart = "
|
|
7
|
+
import '../../assets/SearchField.css';const searchField = "_searchField_vqgsn_1";
|
|
8
|
+
const iconStart = "_iconStart_vqgsn_82";
|
|
9
9
|
const styles = {
|
|
10
10
|
searchField,
|
|
11
11
|
iconStart
|
|
@@ -18,12 +18,12 @@ const SearchField = ({
|
|
|
18
18
|
const inputRef = useRef(null);
|
|
19
19
|
const [internalValue, setInternalValue] = useState(props == null ? void 0 : props.defaultValue);
|
|
20
20
|
const value = (props == null ? void 0 : props.value) ?? internalValue;
|
|
21
|
-
const setValue =
|
|
21
|
+
const setValue = React__default.useCallback((nextValue) => {
|
|
22
22
|
var _a;
|
|
23
23
|
setInternalValue(nextValue);
|
|
24
24
|
(_a = props == null ? void 0 : props.onChange) == null ? void 0 : _a.call(props, nextValue);
|
|
25
25
|
}, [props == null ? void 0 : props.onChange]);
|
|
26
|
-
const handleClear =
|
|
26
|
+
const handleClear = React__default.useCallback(() => {
|
|
27
27
|
var _a;
|
|
28
28
|
setValue("");
|
|
29
29
|
(_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.focus();
|
|
@@ -34,11 +34,13 @@ const SearchField = ({
|
|
|
34
34
|
return (_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.focus();
|
|
35
35
|
}, children: [
|
|
36
36
|
/* @__PURE__ */ jsx(Icon, { iconSize: "1x", padding: "roomy", iconName: "search", className: styles.iconStart }),
|
|
37
|
-
/* @__PURE__ */ jsx(Input, { type: "text", value, onChange: (e) => setValue(e.target.value), ref: inputRef, placeholder
|
|
37
|
+
/* @__PURE__ */ jsx(Input, { type: "text", value, onChange: (e) => setValue(e.target.value), ref: inputRef, placeholder, ...(props == null ? void 0 : props.isInvalid) ? {
|
|
38
|
+
"data-invalid": true
|
|
39
|
+
} : {} }),
|
|
38
40
|
!!value && /* @__PURE__ */ jsx(IconButton, { size: "sm", iconProps: {
|
|
39
41
|
iconName: "xmark",
|
|
40
42
|
iconPrefix: "fas"
|
|
41
|
-
},
|
|
43
|
+
}, onPress: (props == null ? void 0 : props.isDisabled) ? void 0 : handleClear, isDisabled: props == null ? void 0 : props.isDisabled, styleVariant: "neutral", emphasis: "tertiary", "aria-label": tooltipLabel, tooltipLabel })
|
|
42
44
|
] }) }) });
|
|
43
45
|
};
|
|
44
46
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchField.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchField.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,26 +4,67 @@ import { PaddingVariants } from '../../utils/padding/padding';
|
|
|
4
4
|
import { FlexVariants } from '../../utils/flex/flex';
|
|
5
5
|
type SectionPaddingValue = 'default' | PaddingVariants['paddingX'];
|
|
6
6
|
export type SectionPadding = {
|
|
7
|
+
/**
|
|
8
|
+
* Controls both left and right padding of the section
|
|
9
|
+
*/
|
|
7
10
|
paddingX?: SectionPaddingValue;
|
|
11
|
+
/**
|
|
12
|
+
* Controls both top and bottom padding of the section
|
|
13
|
+
*/
|
|
8
14
|
paddingY?: SectionPaddingValue;
|
|
15
|
+
/**
|
|
16
|
+
* Controls the top padding of the section (overridden by paddingY)
|
|
17
|
+
*/
|
|
9
18
|
paddingTop?: SectionPaddingValue;
|
|
19
|
+
/**
|
|
20
|
+
* Controls the right padding of the section (overridden by paddingX)
|
|
21
|
+
*/
|
|
10
22
|
paddingRight?: SectionPaddingValue;
|
|
23
|
+
/**
|
|
24
|
+
* Controls the bottom padding of the section (overridden by paddingY)
|
|
25
|
+
*/
|
|
11
26
|
paddingBottom?: SectionPaddingValue;
|
|
27
|
+
/**
|
|
28
|
+
* Controls the left padding of the section (overridden by paddingX)
|
|
29
|
+
*/
|
|
12
30
|
paddingLeft?: SectionPaddingValue;
|
|
13
31
|
};
|
|
14
32
|
export interface SectionProps extends BackgroundVariants, SectionPadding, Pick<FlexVariants, 'flexDirection' | 'justifyContent' | 'alignItems'> {
|
|
15
33
|
children: React.ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Controls the maximum width of the section container
|
|
36
|
+
*/
|
|
16
37
|
containerMaxWidth?: 'full-width' | 'page';
|
|
38
|
+
/**
|
|
39
|
+
* The style of the section.
|
|
40
|
+
*/
|
|
17
41
|
style?: React.CSSProperties;
|
|
18
|
-
|
|
42
|
+
/**
|
|
43
|
+
* The class name of the section.
|
|
44
|
+
*/
|
|
19
45
|
className?: string;
|
|
20
46
|
}
|
|
21
47
|
export interface ContainerProps {
|
|
22
48
|
children: React.ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* The class name of the container.
|
|
51
|
+
*/
|
|
23
52
|
className?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The maximum width of the container.
|
|
55
|
+
*/
|
|
24
56
|
containerMaxWidth?: 'full-width' | 'page';
|
|
57
|
+
/**
|
|
58
|
+
* Direction of the flex container.
|
|
59
|
+
*/
|
|
25
60
|
flexDirection?: FlexVariants['flexDirection'];
|
|
61
|
+
/**
|
|
62
|
+
* Alignment along the main axis.
|
|
63
|
+
*/
|
|
26
64
|
justifyContent?: FlexVariants['justifyContent'];
|
|
65
|
+
/**
|
|
66
|
+
* Alignment along the cross axis.
|
|
67
|
+
*/
|
|
27
68
|
alignItems?: FlexVariants['alignItems'];
|
|
28
69
|
}
|
|
29
70
|
declare const Container: ({ children, className, containerMaxWidth, flexDirection, justifyContent, alignItems, }: ContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React__default, { forwardRef } from "react";
|
|
3
3
|
import { backgroundColorVariants } from "../../utils/backgroundColor/backgroundColor.js";
|
|
4
4
|
import { paddingVariants } from "../../utils/padding/padding.js";
|
|
5
5
|
import { c as cva } from "../../index-DdUYounA.js";
|
|
@@ -56,20 +56,19 @@ const Container = ({
|
|
|
56
56
|
}) => {
|
|
57
57
|
const widthClassName = containerMaxWidth === "full-width" ? "fullWidth" : "pageWidth";
|
|
58
58
|
return /* @__PURE__ */ jsx("div", { className: `
|
|
59
|
-
${styles.container}
|
|
60
|
-
${styles[widthClassName]}
|
|
59
|
+
${styles.container}
|
|
60
|
+
${styles[widthClassName]}
|
|
61
61
|
${flexVariants({
|
|
62
62
|
flexDirection,
|
|
63
63
|
justifyContent,
|
|
64
64
|
alignItems
|
|
65
|
-
})}
|
|
65
|
+
})}
|
|
66
66
|
${className || ""}
|
|
67
67
|
`.trim(), children });
|
|
68
68
|
};
|
|
69
69
|
const Section = forwardRef(({
|
|
70
70
|
children,
|
|
71
71
|
containerMaxWidth = "page",
|
|
72
|
-
backgroundColour,
|
|
73
72
|
backgroundColor,
|
|
74
73
|
paddingTop,
|
|
75
74
|
paddingBottom,
|
|
@@ -83,10 +82,6 @@ const Section = forwardRef(({
|
|
|
83
82
|
justifyContent,
|
|
84
83
|
alignItems
|
|
85
84
|
}, ref) => {
|
|
86
|
-
if (backgroundColour && !backgroundColor) {
|
|
87
|
-
console.warn("Warning: `backgroundColour` is deprecated and will be removed in a future release. Please use `backgroundColor` instead.");
|
|
88
|
-
}
|
|
89
|
-
const resolvedBackgroundColor = backgroundColor ?? backgroundColour;
|
|
90
85
|
return /* @__PURE__ */ jsx("section", { ref, className: `
|
|
91
86
|
${styles.section}
|
|
92
87
|
${paddingVariants({
|
|
@@ -106,7 +101,7 @@ const Section = forwardRef(({
|
|
|
106
101
|
paddingY: paddingY === "default" ? "default" : void 0
|
|
107
102
|
})}
|
|
108
103
|
${backgroundColorVariants({
|
|
109
|
-
backgroundColor
|
|
104
|
+
backgroundColor
|
|
110
105
|
})}
|
|
111
106
|
${flexVariants({
|
|
112
107
|
display: flexDirection || justifyContent ? "flex" : void 0,
|
|
@@ -115,9 +110,9 @@ const Section = forwardRef(({
|
|
|
115
110
|
alignItems
|
|
116
111
|
})}
|
|
117
112
|
${className || ""}
|
|
118
|
-
`.trim(), style, children:
|
|
119
|
-
if (
|
|
120
|
-
return
|
|
113
|
+
`.trim(), style, children: React__default.Children.map(children, (child) => {
|
|
114
|
+
if (React__default.isValidElement(child) && child.type === Container) {
|
|
115
|
+
return React__default.cloneElement(child, {
|
|
121
116
|
...child.props,
|
|
122
117
|
containerMaxWidth,
|
|
123
118
|
flexDirection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Section.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Section.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React__default, { createContext, useContext } from "react";
|
|
3
3
|
import { Paragraph } from "../Paragraph/Paragraph.js";
|
|
4
4
|
import { Checkbox, Radio } from "react-aria-components";
|
|
5
5
|
import '../../assets/SelectCard.css';const checkboxSvgWrapper = "_checkboxSvgWrapper_dir9q_104";
|
|
@@ -24,7 +24,7 @@ const SelectCard = ({
|
|
|
24
24
|
type = "checkbox",
|
|
25
25
|
...contextProps
|
|
26
26
|
}) => {
|
|
27
|
-
const labelId =
|
|
27
|
+
const labelId = React__default.useId();
|
|
28
28
|
if (type === "checkbox") {
|
|
29
29
|
return /* @__PURE__ */ jsx(SelectCardContext.Provider, { value: {
|
|
30
30
|
type,
|