@vygruppen/spor-react 3.7.7 → 3.8.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/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +13 -0
- package/dist/{CountryCodeSelect-IAYKP6P5.mjs → CountryCodeSelect-BA3A7ODU.mjs} +1 -1
- package/dist/{chunk-QJI3YQWW.mjs → chunk-HL3ESNVB.mjs} +429 -390
- package/dist/index.d.mts +64 -17
- package/dist/index.d.ts +64 -17
- package/dist/index.js +526 -487
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/src/datepicker/Calendar.tsx +8 -3
- package/src/datepicker/CalendarCell.tsx +8 -3
- package/src/datepicker/CalendarGrid.tsx +9 -3
- package/src/datepicker/CalendarTriggerButton.tsx +10 -3
- package/src/datepicker/DatePicker.tsx +15 -35
- package/src/datepicker/DateRangePicker.tsx +14 -25
- package/src/datepicker/DateTimeSegment.tsx +0 -2
- package/src/datepicker/RangeCalendar.tsx +8 -4
- package/src/datepicker/StyledField.tsx +6 -1
- package/src/datepicker/TimePicker.tsx +1 -1
- package/src/input/NumericStepper.tsx +91 -68
- package/src/theme/components/close-button.ts +9 -8
- package/src/theme/components/datepicker.ts +74 -23
- package/src/theme/components/modal.ts +4 -3
package/dist/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
var react = require('@chakra-ui/react');
|
4
|
-
var
|
4
|
+
var React69 = require('react');
|
5
5
|
var lottieReact = require('lottie-react');
|
6
6
|
var sporLoader = require('@vygruppen/spor-loader');
|
7
7
|
var reactAria = require('react-aria');
|
@@ -33,7 +33,7 @@ function _interopNamespace(e) {
|
|
33
33
|
return Object.freeze(n);
|
34
34
|
}
|
35
35
|
|
36
|
-
var
|
36
|
+
var React69__namespace = /*#__PURE__*/_interopNamespace(React69);
|
37
37
|
var tokens10__namespace = /*#__PURE__*/_interopNamespace(tokens10);
|
38
38
|
|
39
39
|
var __create = Object.create;
|
@@ -72,7 +72,7 @@ exports.Divider = void 0;
|
|
72
72
|
var init_Divider = __esm({
|
73
73
|
"src/layout/Divider.tsx"() {
|
74
74
|
exports.Divider = react.forwardRef((props, ref) => {
|
75
|
-
return /* @__PURE__ */
|
75
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Divider, { ...props, ref });
|
76
76
|
});
|
77
77
|
}
|
78
78
|
});
|
@@ -81,7 +81,7 @@ var init_Stack = __esm({
|
|
81
81
|
"src/layout/Stack.tsx"() {
|
82
82
|
exports.Stack = react.forwardRef(
|
83
83
|
({ flexDirection, ...props }, ref) => {
|
84
|
-
return /* @__PURE__ */
|
84
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Stack, { ...props, direction: flexDirection, ref });
|
85
85
|
}
|
86
86
|
);
|
87
87
|
}
|
@@ -95,15 +95,15 @@ var init_layout = __esm({
|
|
95
95
|
var AccordionContext, AccordionProvider, useAccordionContext;
|
96
96
|
var init_AccordionContext = __esm({
|
97
97
|
"src/accordion/AccordionContext.tsx"() {
|
98
|
-
AccordionContext =
|
98
|
+
AccordionContext = React69__namespace.default.createContext(null);
|
99
99
|
AccordionProvider = ({
|
100
100
|
size: size2,
|
101
101
|
...props
|
102
102
|
}) => {
|
103
|
-
return /* @__PURE__ */
|
103
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(AccordionContext.Provider, { value: { size: size2 }, ...props });
|
104
104
|
};
|
105
105
|
useAccordionContext = () => {
|
106
|
-
const context =
|
106
|
+
const context = React69__namespace.default.useContext(AccordionContext);
|
107
107
|
if (context === null) {
|
108
108
|
throw new Error(
|
109
109
|
"useAccordionContext must be used within AccordionProvider"
|
@@ -121,14 +121,14 @@ var init_Accordion = __esm({
|
|
121
121
|
exports.Accordion = react.forwardRef(
|
122
122
|
({ children, spacing: spacing3 = 2, ...props }, ref) => {
|
123
123
|
const defaultIndex = typeof props.defaultIndex === "number" && props.allowMultiple ? [props.defaultIndex] : props.defaultIndex;
|
124
|
-
return /* @__PURE__ */
|
124
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(AccordionProvider, { size: props.size }, /* @__PURE__ */ React69__namespace.default.createElement(
|
125
125
|
react.Accordion,
|
126
126
|
{
|
127
127
|
...props,
|
128
128
|
ref,
|
129
129
|
defaultIndex
|
130
130
|
},
|
131
|
-
/* @__PURE__ */
|
131
|
+
/* @__PURE__ */ React69__namespace.default.createElement(exports.Stack, { spacing: spacing3 }, children)
|
132
132
|
));
|
133
133
|
}
|
134
134
|
);
|
@@ -147,7 +147,7 @@ var init_Expandable = __esm({
|
|
147
147
|
size: size2 = "md",
|
148
148
|
...rest
|
149
149
|
}) => {
|
150
|
-
return /* @__PURE__ */
|
150
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(exports.Accordion, { ...rest, size: size2 }, /* @__PURE__ */ React69__namespace.default.createElement(
|
151
151
|
exports.ExpandableItem,
|
152
152
|
{
|
153
153
|
headingLevel,
|
@@ -166,7 +166,7 @@ var init_Expandable = __esm({
|
|
166
166
|
}) => {
|
167
167
|
const { size: size2 } = useAccordionContext();
|
168
168
|
warnAboutMismatchingIcon({ icon: leftIcon, size: size2 });
|
169
|
-
return /* @__PURE__ */
|
169
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.AccordionItem, { ...rest }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: headingLevel }, /* @__PURE__ */ React69__namespace.default.createElement(react.AccordionButton, null, /* @__PURE__ */ React69__namespace.default.createElement(react.Flex, { alignItems: "center" }, leftIcon && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { marginRight: 1 }, leftIcon), title), /* @__PURE__ */ React69__namespace.default.createElement(react.AccordionIcon, null))), /* @__PURE__ */ React69__namespace.default.createElement(react.AccordionPanel, null, children));
|
170
170
|
};
|
171
171
|
warnAboutMismatchingIcon = ({ icon, size: size2 }) => {
|
172
172
|
var _a6, _b5;
|
@@ -217,10 +217,10 @@ function LanguageProvider({
|
|
217
217
|
language,
|
218
218
|
children
|
219
219
|
}) {
|
220
|
-
return /* @__PURE__ */
|
220
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(LanguageContext.Provider, { value: language }, children);
|
221
221
|
}
|
222
222
|
function useLanguage() {
|
223
|
-
const language =
|
223
|
+
const language = React69.useContext(LanguageContext);
|
224
224
|
if (!language) {
|
225
225
|
throw new Error("Please wrap your application in a LanguageProvider");
|
226
226
|
}
|
@@ -246,12 +246,12 @@ var init_i18n = __esm({
|
|
246
246
|
Language3["English"] = "en";
|
247
247
|
return Language3;
|
248
248
|
})(exports.Language || {});
|
249
|
-
LanguageContext =
|
249
|
+
LanguageContext = React69.createContext(void 0);
|
250
250
|
}
|
251
251
|
});
|
252
252
|
function useHydrated() {
|
253
|
-
let [hydrated, setHydrated] =
|
254
|
-
|
253
|
+
let [hydrated, setHydrated] = React69.useState(() => !hydrating);
|
254
|
+
React69.useEffect(function hydrate() {
|
255
255
|
hydrating = false;
|
256
256
|
setHydrated(true);
|
257
257
|
}, []);
|
@@ -269,13 +269,13 @@ var init_ClientOnly = __esm({
|
|
269
269
|
init_useHydrated();
|
270
270
|
ClientOnly = ({ children, fallback = null }) => {
|
271
271
|
const isHydrated = useHydrated();
|
272
|
-
return /* @__PURE__ */
|
272
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(React69__namespace.default.Fragment, null, isHydrated ? children() : fallback);
|
273
273
|
};
|
274
274
|
}
|
275
275
|
});
|
276
276
|
function Lottie({ animationData }) {
|
277
277
|
const { View } = lottieReact.useLottie({ animationData, loop: true });
|
278
|
-
return /* @__PURE__ */
|
278
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(React69__namespace.default.Fragment, null, View);
|
279
279
|
}
|
280
280
|
var init_Lottie = __esm({
|
281
281
|
"src/loader/Lottie.tsx"() {
|
@@ -291,7 +291,7 @@ var init_ColorInlineLoader = __esm({
|
|
291
291
|
maxWidth,
|
292
292
|
...props
|
293
293
|
}) => {
|
294
|
-
return /* @__PURE__ */
|
294
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React69__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderColorData }))));
|
295
295
|
};
|
296
296
|
}
|
297
297
|
});
|
@@ -306,7 +306,7 @@ var init_ColorSpinner = __esm({
|
|
306
306
|
maxWidth,
|
307
307
|
...props
|
308
308
|
}) => {
|
309
|
-
return /* @__PURE__ */
|
309
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React69__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__namespace.default.createElement(Lottie, { animationData: sporLoader.spinnerColorData }))), children && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { marginTop: 3, fontWeight: "bold" }, children));
|
310
310
|
};
|
311
311
|
}
|
312
312
|
});
|
@@ -316,7 +316,7 @@ var init_ContentLoader = __esm({
|
|
316
316
|
init_ClientOnly();
|
317
317
|
init_Lottie();
|
318
318
|
exports.ContentLoader = ({ children, ...props }) => {
|
319
|
-
return /* @__PURE__ */
|
319
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { maxWidth: "140px", marginX: "auto" }, /* @__PURE__ */ React69__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__namespace.default.createElement(Lottie, { animationData: sporLoader.contentLoaderData }))), children && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { textAlign: "center", fontWeight: "bold" }, children));
|
320
320
|
};
|
321
321
|
}
|
322
322
|
});
|
@@ -330,7 +330,7 @@ var init_DarkFullScreenLoader = __esm({
|
|
330
330
|
maxWidth,
|
331
331
|
...props
|
332
332
|
}) => {
|
333
|
-
return /* @__PURE__ */
|
333
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Center, { height: "100%", background: "darkTeal", ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React69__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__namespace.default.createElement(Lottie, { animationData: sporLoader.fullScreenLoaderWhiteData }))));
|
334
334
|
};
|
335
335
|
}
|
336
336
|
});
|
@@ -344,7 +344,7 @@ var init_DarkInlineLoader = __esm({
|
|
344
344
|
maxWidth,
|
345
345
|
...props
|
346
346
|
}) => {
|
347
|
-
return /* @__PURE__ */
|
347
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React69__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderDarkData }))));
|
348
348
|
};
|
349
349
|
}
|
350
350
|
});
|
@@ -360,7 +360,7 @@ var init_DarkSpinner = __esm({
|
|
360
360
|
maxWidth,
|
361
361
|
...props
|
362
362
|
}) => {
|
363
|
-
return /* @__PURE__ */
|
363
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React69__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__namespace.default.createElement(Lottie, { animationData: sporLoader.spinnerDarkData }))), children && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { marginTop: 3, fontWeight: "bold" }, children));
|
364
364
|
};
|
365
365
|
}
|
366
366
|
});
|
@@ -374,7 +374,7 @@ var init_LightFullScreenLoader = __esm({
|
|
374
374
|
maxWidth,
|
375
375
|
...props
|
376
376
|
}) => {
|
377
|
-
return /* @__PURE__ */
|
377
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Center, { height: "100%", background: "white", ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React69__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__namespace.default.createElement(Lottie, { animationData: sporLoader.fullScreenLoaderBlackData }))));
|
378
378
|
};
|
379
379
|
}
|
380
380
|
});
|
@@ -388,7 +388,7 @@ var init_LightInlineLoader = __esm({
|
|
388
388
|
maxWidth,
|
389
389
|
...props
|
390
390
|
}) => {
|
391
|
-
return /* @__PURE__ */
|
391
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React69__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderLightData }))));
|
392
392
|
};
|
393
393
|
}
|
394
394
|
});
|
@@ -403,7 +403,7 @@ var init_LightSpinner = __esm({
|
|
403
403
|
maxWidth,
|
404
404
|
...props
|
405
405
|
}) => {
|
406
|
-
return /* @__PURE__ */
|
406
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React69__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__namespace.default.createElement(Lottie, { animationData: sporLoader.spinnerLightData }))), children && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { marginTop: 3, fontWeight: "bold" }, children));
|
407
407
|
};
|
408
408
|
}
|
409
409
|
});
|
@@ -411,11 +411,11 @@ var useRotatingLabel;
|
|
411
411
|
var init_useRotatingLabel = __esm({
|
412
412
|
"src/loader/useRotatingLabel.tsx"() {
|
413
413
|
useRotatingLabel = ({ label, delay }) => {
|
414
|
-
const loadingTextArray =
|
414
|
+
const loadingTextArray = React69.useMemo(
|
415
415
|
() => Array.isArray(label) ? label : [label],
|
416
416
|
[label]
|
417
417
|
);
|
418
|
-
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] =
|
418
|
+
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] = React69.useState(0);
|
419
419
|
react.useInterval(() => {
|
420
420
|
setCurrentLoadingTextIndex(
|
421
421
|
(prevIndex) => (prevIndex + 1) % loadingTextArray.length
|
@@ -449,7 +449,7 @@ var init_ProgressBar = __esm({
|
|
449
449
|
value,
|
450
450
|
"aria-label": ariaLabel || t2(texts.label(value))
|
451
451
|
});
|
452
|
-
return /* @__PURE__ */
|
452
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(React69__namespace.default.Fragment, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
453
453
|
react.Box,
|
454
454
|
{
|
455
455
|
...progressBarProps,
|
@@ -457,7 +457,7 @@ var init_ProgressBar = __esm({
|
|
457
457
|
minWidth: "100px",
|
458
458
|
...rest
|
459
459
|
},
|
460
|
-
/* @__PURE__ */
|
460
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
461
461
|
react.Flex,
|
462
462
|
{
|
463
463
|
backgroundColor: "coralGreen",
|
@@ -466,7 +466,7 @@ var init_ProgressBar = __esm({
|
|
466
466
|
justifyContent: "flex-start",
|
467
467
|
marginX: "auto"
|
468
468
|
},
|
469
|
-
/* @__PURE__ */
|
469
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
470
470
|
react.Box,
|
471
471
|
{
|
472
472
|
backgroundColor: "greenHaze",
|
@@ -478,7 +478,7 @@ var init_ProgressBar = __esm({
|
|
478
478
|
}
|
479
479
|
)
|
480
480
|
),
|
481
|
-
currentLoadingText && /* @__PURE__ */
|
481
|
+
currentLoadingText && /* @__PURE__ */ React69__namespace.default.createElement(
|
482
482
|
react.Text,
|
483
483
|
{
|
484
484
|
textAlign: "center",
|
@@ -524,11 +524,11 @@ var init_ProgressLoader = __esm({
|
|
524
524
|
value,
|
525
525
|
"aria-label": ariaLabel ?? t2(texts2.fallbackLabel(value ?? "?"))
|
526
526
|
});
|
527
|
-
const pathRef =
|
527
|
+
const pathRef = React69.useRef(null);
|
528
528
|
const progressPathLength = ((_a6 = pathRef.current) == null ? void 0 : _a6.getTotalLength()) ?? 0;
|
529
529
|
const progress = (value - 100) / 100 * progressPathLength;
|
530
|
-
const id =
|
531
|
-
return /* @__PURE__ */
|
530
|
+
const id = React69.useId();
|
531
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...progressBarProps, minWidth: "100px", width, ...rest }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: "svg", viewBox: "0 0 246 78", fill: "none" }, /* @__PURE__ */ React69__namespace.default.createElement(
|
532
532
|
react.Box,
|
533
533
|
{
|
534
534
|
as: "path",
|
@@ -536,7 +536,7 @@ var init_ProgressLoader = __esm({
|
|
536
536
|
d: "M14.0479 44.8251C19.4332 44.8251 23.7988 40.5242 23.7988 35.2187C23.7988 29.9133 19.4332 25.6124 14.0479 25.6124C8.66254 25.6124 4.29688 29.9133 4.29688 35.2187C4.29688 40.5242 8.66254 44.8251 14.0479 44.8251Z",
|
537
537
|
fill: "#FFB466"
|
538
538
|
}
|
539
|
-
), /* @__PURE__ */
|
539
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
540
540
|
react.Box,
|
541
541
|
{
|
542
542
|
as: "path",
|
@@ -547,7 +547,7 @@ var init_ProgressLoader = __esm({
|
|
547
547
|
strokeLinecap: "round",
|
548
548
|
strokeLinejoin: "round"
|
549
549
|
}
|
550
|
-
), /* @__PURE__ */
|
550
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
551
551
|
react.Box,
|
552
552
|
{
|
553
553
|
as: "path",
|
@@ -562,7 +562,7 @@ var init_ProgressLoader = __esm({
|
|
562
562
|
transition: "stroke-dashoffset .2s ease-out",
|
563
563
|
ref: pathRef
|
564
564
|
}
|
565
|
-
), /* @__PURE__ */
|
565
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
566
566
|
react.Box,
|
567
567
|
{
|
568
568
|
as: "path",
|
@@ -570,7 +570,7 @@ var init_ProgressLoader = __esm({
|
|
570
570
|
d: "M226.025 44.8251C231.411 44.8251 235.776 40.5242 235.776 35.2187C235.776 29.9133 231.411 25.6124 226.025 25.6124C220.64 25.6124 216.274 29.9133 216.274 35.2187C216.274 40.5242 220.64 44.8251 226.025 44.8251Z",
|
571
571
|
fill: "#688CBA"
|
572
572
|
}
|
573
|
-
)), currentLoadingText && /* @__PURE__ */
|
573
|
+
)), currentLoadingText && /* @__PURE__ */ React69__namespace.default.createElement(
|
574
574
|
react.Text,
|
575
575
|
{
|
576
576
|
textAlign: "center",
|
@@ -594,19 +594,19 @@ var init_ProgressLoader = __esm({
|
|
594
594
|
exports.Skeleton = void 0;
|
595
595
|
var init_Skeleton = __esm({
|
596
596
|
"src/loader/Skeleton.tsx"() {
|
597
|
-
exports.Skeleton = react.forwardRef((props, ref) => /* @__PURE__ */
|
597
|
+
exports.Skeleton = react.forwardRef((props, ref) => /* @__PURE__ */ React69__namespace.default.createElement(react.Skeleton, { ...props, ref }));
|
598
598
|
}
|
599
599
|
});
|
600
600
|
exports.SkeletonCircle = void 0;
|
601
601
|
var init_SkeletonCircle = __esm({
|
602
602
|
"src/loader/SkeletonCircle.tsx"() {
|
603
|
-
exports.SkeletonCircle = (props) => /* @__PURE__ */
|
603
|
+
exports.SkeletonCircle = (props) => /* @__PURE__ */ React69__namespace.default.createElement(react.SkeletonCircle, { boxSize: 6, borderRadius: "50%", ...props });
|
604
604
|
}
|
605
605
|
});
|
606
606
|
exports.SkeletonText = void 0;
|
607
607
|
var init_SkeletonText = __esm({
|
608
608
|
"src/loader/SkeletonText.tsx"() {
|
609
|
-
exports.SkeletonText = (props) => /* @__PURE__ */
|
609
|
+
exports.SkeletonText = (props) => /* @__PURE__ */ React69__namespace.default.createElement(react.SkeletonText, { boxSize: 6, ...props });
|
610
610
|
}
|
611
611
|
});
|
612
612
|
|
@@ -668,7 +668,7 @@ var init_Button = __esm({
|
|
668
668
|
const buttonGroup = react.useButtonGroup();
|
669
669
|
const finalVariant = variant ?? (buttonGroup == null ? void 0 : buttonGroup.variant) ?? "primary";
|
670
670
|
const finalSize = size2 ?? (buttonGroup == null ? void 0 : buttonGroup.size) ?? "md";
|
671
|
-
return /* @__PURE__ */
|
671
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
672
672
|
react.Button,
|
673
673
|
{
|
674
674
|
size: finalSize,
|
@@ -678,11 +678,11 @@ var init_Button = __esm({
|
|
678
678
|
"aria-label": ariaLabel,
|
679
679
|
"aria-busy": isLoading,
|
680
680
|
isDisabled: isDisabled || isLoading,
|
681
|
-
leftIcon: isLoading && leftIcon ? /* @__PURE__ */
|
682
|
-
rightIcon: isLoading && rightIcon ? /* @__PURE__ */
|
681
|
+
leftIcon: isLoading && leftIcon ? /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { visibility: isLoading ? "hidden" : "visible", "aria-hidden": "true" }, leftIcon) : leftIcon,
|
682
|
+
rightIcon: isLoading && rightIcon ? /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { visibility: isLoading ? "hidden" : "visible", "aria-hidden": "true" }, rightIcon) : rightIcon,
|
683
683
|
position: "relative"
|
684
684
|
},
|
685
|
-
isLoading && /* @__PURE__ */
|
685
|
+
isLoading && /* @__PURE__ */ React69__namespace.default.createElement(
|
686
686
|
react.Center,
|
687
687
|
{
|
688
688
|
position: "absolute",
|
@@ -691,7 +691,7 @@ var init_Button = __esm({
|
|
691
691
|
left: "0",
|
692
692
|
paddingTop: 2
|
693
693
|
},
|
694
|
-
/* @__PURE__ */
|
694
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
695
695
|
exports.ColorInlineLoader,
|
696
696
|
{
|
697
697
|
maxWidth: getLoaderWidth(finalSize),
|
@@ -700,7 +700,7 @@ var init_Button = __esm({
|
|
700
700
|
}
|
701
701
|
)
|
702
702
|
),
|
703
|
-
/* @__PURE__ */
|
703
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
704
704
|
react.Box,
|
705
705
|
{
|
706
706
|
visibility: isLoading ? "hidden" : "visible",
|
@@ -724,7 +724,7 @@ var init_Button = __esm({
|
|
724
724
|
exports.ButtonGroup = void 0;
|
725
725
|
var init_ButtonGroup = __esm({
|
726
726
|
"src/button/ButtonGroup.tsx"() {
|
727
|
-
exports.ButtonGroup = react.forwardRef((props, ref) => /* @__PURE__ */
|
727
|
+
exports.ButtonGroup = react.forwardRef((props, ref) => /* @__PURE__ */ React69__namespace.default.createElement(react.ButtonGroup, { ...props, ref }));
|
728
728
|
}
|
729
729
|
});
|
730
730
|
exports.IconButton = void 0;
|
@@ -732,12 +732,12 @@ var init_IconButton = __esm({
|
|
732
732
|
"src/button/IconButton.tsx"() {
|
733
733
|
init_src();
|
734
734
|
exports.IconButton = react.forwardRef(
|
735
|
-
({ ...props }, ref) => /* @__PURE__ */
|
735
|
+
({ ...props }, ref) => /* @__PURE__ */ React69__namespace.default.createElement(
|
736
736
|
react.IconButton,
|
737
737
|
{
|
738
738
|
title: props["aria-label"],
|
739
739
|
...props,
|
740
|
-
spinner: /* @__PURE__ */
|
740
|
+
spinner: /* @__PURE__ */ React69__namespace.default.createElement(exports.ColorSpinner, { margin: 1 }),
|
741
741
|
ref
|
742
742
|
}
|
743
743
|
)
|
@@ -752,7 +752,7 @@ var init_CloseButton = __esm({
|
|
752
752
|
exports.CloseButton = react.forwardRef(
|
753
753
|
({ size: size2 = "sm", ...props }, ref) => {
|
754
754
|
const { t: t2 } = useTranslation();
|
755
|
-
return /* @__PURE__ */
|
755
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
756
756
|
exports.IconButton,
|
757
757
|
{
|
758
758
|
ref,
|
@@ -769,11 +769,11 @@ var init_CloseButton = __esm({
|
|
769
769
|
switch (size2) {
|
770
770
|
case "xs":
|
771
771
|
case "sm":
|
772
|
-
return /* @__PURE__ */
|
772
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.CloseFill18Icon, null);
|
773
773
|
case "md":
|
774
|
-
return /* @__PURE__ */
|
774
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.CloseFill24Icon, null);
|
775
775
|
case "lg":
|
776
|
-
return /* @__PURE__ */
|
776
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.CloseFill30Icon, null);
|
777
777
|
}
|
778
778
|
};
|
779
779
|
texts4 = createTexts({
|
@@ -800,11 +800,11 @@ var init_FloatingActionButton = __esm({
|
|
800
800
|
placement = "bottom right",
|
801
801
|
...props
|
802
802
|
}, ref) => {
|
803
|
-
const [isTextVisible, setIsTextVisible] =
|
803
|
+
const [isTextVisible, setIsTextVisible] = React69__namespace.default.useState(
|
804
804
|
externalIsTextVisible !== void 0 ? externalIsTextVisible : false
|
805
805
|
);
|
806
806
|
const scrollDirection = useScrollDirection();
|
807
|
-
|
807
|
+
React69.useEffect(() => {
|
808
808
|
if (externalIsTextVisible !== void 0) {
|
809
809
|
return;
|
810
810
|
}
|
@@ -814,7 +814,7 @@ var init_FloatingActionButton = __esm({
|
|
814
814
|
);
|
815
815
|
return () => window.clearTimeout(id);
|
816
816
|
}, [scrollDirection, externalIsTextVisible]);
|
817
|
-
|
817
|
+
React69.useEffect(() => {
|
818
818
|
setIsTextVisible(!!externalIsTextVisible);
|
819
819
|
}, [externalIsTextVisible]);
|
820
820
|
const style = react.useMultiStyleConfig("FloatingActionButton", {
|
@@ -822,7 +822,7 @@ var init_FloatingActionButton = __esm({
|
|
822
822
|
isTextVisible,
|
823
823
|
placement
|
824
824
|
});
|
825
|
-
return /* @__PURE__ */
|
825
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
826
826
|
MotionBox,
|
827
827
|
{
|
828
828
|
__css: style.container,
|
@@ -830,8 +830,8 @@ var init_FloatingActionButton = __esm({
|
|
830
830
|
ref,
|
831
831
|
...props
|
832
832
|
},
|
833
|
-
/* @__PURE__ */
|
834
|
-
/* @__PURE__ */
|
833
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.Box, { __css: style.icon }, icon),
|
834
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
835
835
|
MotionBox,
|
836
836
|
{
|
837
837
|
animate: isTextVisible ? "show" : "hide",
|
@@ -856,11 +856,11 @@ var init_FloatingActionButton = __esm({
|
|
856
856
|
}
|
857
857
|
);
|
858
858
|
useScrollDirection = () => {
|
859
|
-
const [scrollDirection, setScrollDirection] =
|
860
|
-
const lastScrollPosition =
|
859
|
+
const [scrollDirection, setScrollDirection] = React69__namespace.default.useState(null);
|
860
|
+
const lastScrollPosition = React69__namespace.default.useRef(
|
861
861
|
typeof window !== "undefined" ? window.scrollY : 0
|
862
862
|
);
|
863
|
-
|
863
|
+
React69__namespace.default.useEffect(() => {
|
864
864
|
const onScroll = () => {
|
865
865
|
const delta = window.scrollY - lastScrollPosition.current;
|
866
866
|
if (delta === 0) {
|
@@ -896,7 +896,7 @@ var init_AlertIcon = __esm({
|
|
896
896
|
AlertIcon = ({ variant }) => {
|
897
897
|
const Icon = getIcon2(variant);
|
898
898
|
const { t: t2 } = useTranslation();
|
899
|
-
return /* @__PURE__ */
|
899
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
900
900
|
Icon,
|
901
901
|
{
|
902
902
|
flexShrink: 0,
|
@@ -959,7 +959,7 @@ var init_BaseAlert = __esm({
|
|
959
959
|
"src/alert/BaseAlert.tsx"() {
|
960
960
|
BaseAlert = ({ variant, children, ...boxProps }) => {
|
961
961
|
const styles3 = react.useMultiStyleConfig("Alert", { variant });
|
962
|
-
return /* @__PURE__ */
|
962
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { __css: styles3.container, ...boxProps }, children);
|
963
963
|
};
|
964
964
|
}
|
965
965
|
});
|
@@ -986,17 +986,17 @@ var init_ClosableAlert = __esm({
|
|
986
986
|
externalOnClose();
|
987
987
|
onClose();
|
988
988
|
};
|
989
|
-
return /* @__PURE__ */
|
989
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(BaseAlert, { variant }, /* @__PURE__ */ React69__namespace.default.createElement(
|
990
990
|
exports.IconButton,
|
991
991
|
{
|
992
992
|
variant: "ghost",
|
993
993
|
size: "sm",
|
994
994
|
onClick: handleClose,
|
995
|
-
icon: /* @__PURE__ */
|
995
|
+
icon: /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
996
996
|
"aria-label": t2(texts6.close),
|
997
997
|
sx: styles3.closeButton
|
998
998
|
}
|
999
|
-
), /* @__PURE__ */
|
999
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(AlertIcon, { variant }), children);
|
1000
1000
|
};
|
1001
1001
|
texts6 = createTexts({
|
1002
1002
|
close: {
|
@@ -1023,7 +1023,7 @@ var init_ExpandableAlert = __esm({
|
|
1023
1023
|
},
|
1024
1024
|
...boxProps
|
1025
1025
|
}) => {
|
1026
|
-
return /* @__PURE__ */
|
1026
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(BaseAlert, { variant, ...boxProps, paddingX: 0, paddingY: 0 }, /* @__PURE__ */ React69__namespace.default.createElement(
|
1027
1027
|
react.Accordion,
|
1028
1028
|
{
|
1029
1029
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
@@ -1031,14 +1031,14 @@ var init_ExpandableAlert = __esm({
|
|
1031
1031
|
allowToggle: true,
|
1032
1032
|
flexGrow: "1"
|
1033
1033
|
},
|
1034
|
-
/* @__PURE__ */
|
1034
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.AccordionItem, null, /* @__PURE__ */ React69__namespace.default.createElement(react.AccordionButton, { paddingX: 3, paddingY: 2, fontSize: "inherit" }, /* @__PURE__ */ React69__namespace.default.createElement(
|
1035
1035
|
react.Flex,
|
1036
1036
|
{
|
1037
1037
|
justifyContent: "space-between",
|
1038
1038
|
alignItems: "center",
|
1039
1039
|
flexGrow: "1"
|
1040
1040
|
},
|
1041
|
-
/* @__PURE__ */
|
1041
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.Flex, { as: headingLevel, alignItems: "center" }, /* @__PURE__ */ React69__namespace.default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React69__namespace.default.createElement(
|
1042
1042
|
react.Box,
|
1043
1043
|
{
|
1044
1044
|
as: "span",
|
@@ -1052,8 +1052,8 @@ var init_ExpandableAlert = __esm({
|
|
1052
1052
|
},
|
1053
1053
|
title
|
1054
1054
|
)),
|
1055
|
-
/* @__PURE__ */
|
1056
|
-
)), /* @__PURE__ */
|
1055
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.AccordionIcon, null)
|
1056
|
+
)), /* @__PURE__ */ React69__namespace.default.createElement(react.AccordionPanel, null, children))
|
1057
1057
|
));
|
1058
1058
|
};
|
1059
1059
|
}
|
@@ -1064,7 +1064,7 @@ var init_StaticAlert = __esm({
|
|
1064
1064
|
init_AlertIcon();
|
1065
1065
|
init_BaseAlert();
|
1066
1066
|
exports.StaticAlert = ({ children, ...props }) => {
|
1067
|
-
return /* @__PURE__ */
|
1067
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(BaseAlert, { ...props }, /* @__PURE__ */ React69__namespace.default.createElement(AlertIcon, { variant: props.variant }), children);
|
1068
1068
|
};
|
1069
1069
|
}
|
1070
1070
|
});
|
@@ -1081,10 +1081,10 @@ exports.Breadcrumb = void 0; exports.BreadcrumbItem = void 0; exports.Breadcrumb
|
|
1081
1081
|
var init_Breadcrumb = __esm({
|
1082
1082
|
"src/breadcrumb/Breadcrumb.tsx"() {
|
1083
1083
|
exports.Breadcrumb = (props) => {
|
1084
|
-
return /* @__PURE__ */
|
1084
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
1085
1085
|
react.Breadcrumb,
|
1086
1086
|
{
|
1087
|
-
separator: /* @__PURE__ */
|
1087
|
+
separator: /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, { color: "blackAlpha.400" }),
|
1088
1088
|
...props
|
1089
1089
|
}
|
1090
1090
|
);
|
@@ -1110,7 +1110,7 @@ var init_Card = __esm({
|
|
1110
1110
|
colorScheme,
|
1111
1111
|
size: size2
|
1112
1112
|
});
|
1113
|
-
return /* @__PURE__ */
|
1113
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { __css: styles3, ...props, ref }, children);
|
1114
1114
|
}
|
1115
1115
|
);
|
1116
1116
|
}
|
@@ -1123,10 +1123,10 @@ var init_card = __esm({
|
|
1123
1123
|
}
|
1124
1124
|
});
|
1125
1125
|
function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
1126
|
-
let [stateValue, setStateValue] = (
|
1127
|
-
let isControlledRef = (
|
1126
|
+
let [stateValue, setStateValue] = (React69.useState)(value || defaultValue);
|
1127
|
+
let isControlledRef = (React69.useRef)(value !== void 0);
|
1128
1128
|
let isControlled = value !== void 0;
|
1129
|
-
(
|
1129
|
+
(React69.useEffect)(() => {
|
1130
1130
|
let wasControlled = isControlledRef.current;
|
1131
1131
|
if (wasControlled !== isControlled)
|
1132
1132
|
console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
|
@@ -1135,7 +1135,7 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
1135
1135
|
isControlled
|
1136
1136
|
]);
|
1137
1137
|
let currentValue = isControlled ? value : stateValue;
|
1138
|
-
let setValue = (
|
1138
|
+
let setValue = (React69.useCallback)((value2, ...args) => {
|
1139
1139
|
let onChangeCaller = (value3, ...onChangeArgs) => {
|
1140
1140
|
if (onChange) {
|
1141
1141
|
if (!Object.is(currentValue, value3))
|
@@ -1175,17 +1175,17 @@ var init_import = __esm({
|
|
1175
1175
|
});
|
1176
1176
|
function $fc909762b330b746$export$61c6a8c84e605fb6(props) {
|
1177
1177
|
let [isOpen, setOpen] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.isOpen, props.defaultOpen || false, props.onOpenChange);
|
1178
|
-
const open = (
|
1178
|
+
const open = (React69.useCallback)(() => {
|
1179
1179
|
setOpen(true);
|
1180
1180
|
}, [
|
1181
1181
|
setOpen
|
1182
1182
|
]);
|
1183
|
-
const close = (
|
1183
|
+
const close = (React69.useCallback)(() => {
|
1184
1184
|
setOpen(false);
|
1185
1185
|
}, [
|
1186
1186
|
setOpen
|
1187
1187
|
]);
|
1188
|
-
const toggle = (
|
1188
|
+
const toggle = (React69.useCallback)(() => {
|
1189
1189
|
setOpen(!isOpen);
|
1190
1190
|
}, [
|
1191
1191
|
setOpen,
|
@@ -1314,7 +1314,7 @@ function $35a22f14a1f04b11$export$2440da353cedad43(v, granularity) {
|
|
1314
1314
|
let defaultGranularity = v && "minute" in v ? "minute" : "day";
|
1315
1315
|
if (v && granularity && !(granularity in v))
|
1316
1316
|
throw new Error("Invalid granularity " + granularity + " for value " + v.toString());
|
1317
|
-
let [lastValue, setLastValue] = (
|
1317
|
+
let [lastValue, setLastValue] = (React69.useState)([
|
1318
1318
|
defaultGranularity,
|
1319
1319
|
defaultTimeZone
|
1320
1320
|
]);
|
@@ -1341,8 +1341,8 @@ function $ab5bf3f618090389$export$87194bb378cc3ac2(props) {
|
|
1341
1341
|
let hasTime = granularity === "hour" || granularity === "minute" || granularity === "second";
|
1342
1342
|
var _props_shouldCloseOnSelect;
|
1343
1343
|
let shouldCloseOnSelect = (_props_shouldCloseOnSelect = props.shouldCloseOnSelect) !== null && _props_shouldCloseOnSelect !== void 0 ? _props_shouldCloseOnSelect : true;
|
1344
|
-
let [selectedDate, setSelectedDate] = (
|
1345
|
-
let [selectedTime, setSelectedTime] = (
|
1344
|
+
let [selectedDate, setSelectedDate] = (React69.useState)(null);
|
1345
|
+
let [selectedTime, setSelectedTime] = (React69.useState)(null);
|
1346
1346
|
if (value) {
|
1347
1347
|
selectedDate = value;
|
1348
1348
|
if ("hour" in value)
|
@@ -1419,23 +1419,23 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
1419
1419
|
let timeZone = defaultTimeZone || "UTC";
|
1420
1420
|
if (v && !(granularity in v))
|
1421
1421
|
throw new Error("Invalid granularity " + granularity + " for value " + v.toString());
|
1422
|
-
let defaultFormatter = (
|
1422
|
+
let defaultFormatter = (React69.useMemo)(() => new (date.DateFormatter)(locale), [
|
1423
1423
|
locale
|
1424
1424
|
]);
|
1425
|
-
let calendar = (
|
1425
|
+
let calendar = (React69.useMemo)(() => createCalendar4(defaultFormatter.resolvedOptions().calendar), [
|
1426
1426
|
createCalendar4,
|
1427
1427
|
defaultFormatter
|
1428
1428
|
]);
|
1429
1429
|
let [value, setDate] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue, props.onChange);
|
1430
|
-
let calendarValue = (
|
1430
|
+
let calendarValue = (React69.useMemo)(() => ($35a22f14a1f04b11$export$61a490a80c552550)(value, calendar), [
|
1431
1431
|
value,
|
1432
1432
|
calendar
|
1433
1433
|
]);
|
1434
|
-
let [placeholderDate, setPlaceholderDate] = (
|
1434
|
+
let [placeholderDate, setPlaceholderDate] = (React69.useState)(() => ($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
|
1435
1435
|
let val = calendarValue || placeholderDate;
|
1436
1436
|
let showEra = calendar.identifier === "gregory" && val.era === "BC";
|
1437
1437
|
var _props_maxGranularity;
|
1438
|
-
let formatOpts = (
|
1438
|
+
let formatOpts = (React69.useMemo)(() => ({
|
1439
1439
|
granularity,
|
1440
1440
|
maxGranularity: (_props_maxGranularity = props.maxGranularity) !== null && _props_maxGranularity !== void 0 ? _props_maxGranularity : "year",
|
1441
1441
|
timeZone: defaultTimeZone,
|
@@ -1452,25 +1452,25 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
1452
1452
|
hideTimeZone,
|
1453
1453
|
showEra
|
1454
1454
|
]);
|
1455
|
-
let opts = (
|
1455
|
+
let opts = (React69.useMemo)(() => ($35a22f14a1f04b11$export$7e319ea407e63bc0)({}, formatOpts), [
|
1456
1456
|
formatOpts
|
1457
1457
|
]);
|
1458
|
-
let dateFormatter = (
|
1458
|
+
let dateFormatter = (React69.useMemo)(() => new (date.DateFormatter)(locale, opts), [
|
1459
1459
|
locale,
|
1460
1460
|
opts
|
1461
1461
|
]);
|
1462
|
-
let resolvedOptions = (
|
1462
|
+
let resolvedOptions = (React69.useMemo)(() => dateFormatter.resolvedOptions(), [
|
1463
1463
|
dateFormatter
|
1464
1464
|
]);
|
1465
|
-
let allSegments = (
|
1465
|
+
let allSegments = (React69.useMemo)(() => dateFormatter.formatToParts(/* @__PURE__ */ new Date()).filter((seg) => $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[seg.type]).reduce((p, seg) => (p[seg.type] = true, p), {}), [
|
1466
1466
|
dateFormatter
|
1467
1467
|
]);
|
1468
|
-
let [validSegments, setValidSegments] = (
|
1468
|
+
let [validSegments, setValidSegments] = (React69.useState)(() => props.value || props.defaultValue ? {
|
1469
1469
|
...allSegments
|
1470
1470
|
} : {});
|
1471
|
-
let clearedSegment = (
|
1472
|
-
let lastCalendarIdentifier = (
|
1473
|
-
(
|
1471
|
+
let clearedSegment = (React69.useRef)();
|
1472
|
+
let lastCalendarIdentifier = (React69.useRef)(calendar.identifier);
|
1473
|
+
(React69.useEffect)(() => {
|
1474
1474
|
if (calendar.identifier !== lastCalendarIdentifier.current) {
|
1475
1475
|
lastCalendarIdentifier.current = calendar.identifier;
|
1476
1476
|
setPlaceholderDate((placeholder) => Object.keys(validSegments).length > 0 ? (date.toCalendar)(placeholder, calendar) : ($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
|
@@ -1510,11 +1510,11 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
1510
1510
|
setPlaceholderDate(newValue);
|
1511
1511
|
clearedSegment.current = null;
|
1512
1512
|
};
|
1513
|
-
let dateValue = (
|
1513
|
+
let dateValue = (React69.useMemo)(() => displayValue.toDate(timeZone), [
|
1514
1514
|
displayValue,
|
1515
1515
|
timeZone
|
1516
1516
|
]);
|
1517
|
-
let segments = (
|
1517
|
+
let segments = (React69.useMemo)(() => dateFormatter.formatToParts(dateValue).map((segment) => {
|
1518
1518
|
let isEditable = $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[segment.type];
|
1519
1519
|
if (segment.type === "era" && calendar.getEras().length === 1)
|
1520
1520
|
isEditable = false;
|
@@ -1781,7 +1781,7 @@ function $93c38a5e28be6249$export$e50a61c1de9f574(props) {
|
|
1781
1781
|
var _props_isDateUnavailable, _props_isDateUnavailable1;
|
1782
1782
|
let overlayState = ($fc909762b330b746$export$61c6a8c84e605fb6)(props);
|
1783
1783
|
let [controlledValue, setControlledValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue || null, props.onChange);
|
1784
|
-
let [placeholderValue, setPlaceholderValue] = (
|
1784
|
+
let [placeholderValue, setPlaceholderValue] = (React69.useState)(() => controlledValue || {
|
1785
1785
|
start: null,
|
1786
1786
|
end: null
|
1787
1787
|
});
|
@@ -1805,8 +1805,8 @@ function $93c38a5e28be6249$export$e50a61c1de9f574(props) {
|
|
1805
1805
|
let hasTime = granularity === "hour" || granularity === "minute" || granularity === "second";
|
1806
1806
|
var _props_shouldCloseOnSelect;
|
1807
1807
|
let shouldCloseOnSelect = (_props_shouldCloseOnSelect = props.shouldCloseOnSelect) !== null && _props_shouldCloseOnSelect !== void 0 ? _props_shouldCloseOnSelect : true;
|
1808
|
-
let [dateRange, setSelectedDateRange] = (
|
1809
|
-
let [timeRange, setSelectedTimeRange] = (
|
1808
|
+
let [dateRange, setSelectedDateRange] = (React69.useState)(null);
|
1809
|
+
let [timeRange, setSelectedTimeRange] = (React69.useState)(null);
|
1810
1810
|
if (value && value.start && value.end) {
|
1811
1811
|
dateRange = value;
|
1812
1812
|
if ("hour" in value.start)
|
@@ -2426,35 +2426,35 @@ function $f62d864046160412$export$a1d3911297b952d7(date, minValue, isDateUnavail
|
|
2426
2426
|
return date;
|
2427
2427
|
}
|
2428
2428
|
function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
2429
|
-
let defaultFormatter = (
|
2429
|
+
let defaultFormatter = (React69.useMemo)(() => new (date.DateFormatter)(props.locale), [
|
2430
2430
|
props.locale
|
2431
2431
|
]);
|
2432
|
-
let resolvedOptions = (
|
2432
|
+
let resolvedOptions = (React69.useMemo)(() => defaultFormatter.resolvedOptions(), [
|
2433
2433
|
defaultFormatter
|
2434
2434
|
]);
|
2435
2435
|
let { locale, createCalendar: createCalendar4, visibleDuration = {
|
2436
2436
|
months: 1
|
2437
2437
|
}, minValue, maxValue, selectionAlignment, isDateUnavailable, pageBehavior = "visible" } = props;
|
2438
|
-
let calendar = (
|
2438
|
+
let calendar = (React69.useMemo)(() => createCalendar4(resolvedOptions.calendar), [
|
2439
2439
|
createCalendar4,
|
2440
2440
|
resolvedOptions.calendar
|
2441
2441
|
]);
|
2442
2442
|
let [value, setControlledValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue, props.onChange);
|
2443
|
-
let calendarDateValue = (
|
2443
|
+
let calendarDateValue = (React69.useMemo)(() => value ? (date.toCalendar)((date.toCalendarDate)(value), calendar) : null, [
|
2444
2444
|
value,
|
2445
2445
|
calendar
|
2446
2446
|
]);
|
2447
|
-
let timeZone = (
|
2447
|
+
let timeZone = (React69.useMemo)(() => value && "timeZone" in value ? value.timeZone : resolvedOptions.timeZone, [
|
2448
2448
|
value,
|
2449
2449
|
resolvedOptions.timeZone
|
2450
2450
|
]);
|
2451
|
-
let focusedCalendarDate = (
|
2451
|
+
let focusedCalendarDate = (React69.useMemo)(() => props.focusedValue ? ($f62d864046160412$export$4f5203c0d889109e)((date.toCalendar)((date.toCalendarDate)(props.focusedValue), calendar), minValue, maxValue) : void 0, [
|
2452
2452
|
props.focusedValue,
|
2453
2453
|
calendar,
|
2454
2454
|
minValue,
|
2455
2455
|
maxValue
|
2456
2456
|
]);
|
2457
|
-
let defaultFocusedCalendarDate = (
|
2457
|
+
let defaultFocusedCalendarDate = (React69.useMemo)(() => ($f62d864046160412$export$4f5203c0d889109e)(props.defaultFocusedValue ? (date.toCalendar)((date.toCalendarDate)(props.defaultFocusedValue), calendar) : calendarDateValue || (date.toCalendar)((date.today)(timeZone), calendar), minValue, maxValue), [
|
2458
2458
|
props.defaultFocusedValue,
|
2459
2459
|
calendarDateValue,
|
2460
2460
|
timeZone,
|
@@ -2463,7 +2463,7 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
2463
2463
|
maxValue
|
2464
2464
|
]);
|
2465
2465
|
let [focusedDate, setFocusedDate] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(focusedCalendarDate, defaultFocusedCalendarDate, props.onFocusChange);
|
2466
|
-
let [startDate, setStartDate] = (
|
2466
|
+
let [startDate, setStartDate] = (React69.useState)(() => {
|
2467
2467
|
switch (selectionAlignment) {
|
2468
2468
|
case "start":
|
2469
2469
|
return ($f62d864046160412$export$144a00ba6044eb9)(focusedDate, visibleDuration, locale, minValue, maxValue);
|
@@ -2474,8 +2474,8 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
2474
2474
|
return ($f62d864046160412$export$f4a51ff076cc9a09)(focusedDate, visibleDuration, locale, minValue, maxValue);
|
2475
2475
|
}
|
2476
2476
|
});
|
2477
|
-
let [isFocused, setFocused] = (
|
2478
|
-
let endDate = (
|
2477
|
+
let [isFocused, setFocused] = (React69.useState)(props.autoFocus || false);
|
2478
|
+
let endDate = (React69.useMemo)(() => {
|
2479
2479
|
let duration = {
|
2480
2480
|
...visibleDuration
|
2481
2481
|
};
|
@@ -2488,7 +2488,7 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
2488
2488
|
startDate,
|
2489
2489
|
visibleDuration
|
2490
2490
|
]);
|
2491
|
-
let [lastCalendarIdentifier, setLastCalendarIdentifier] = (
|
2491
|
+
let [lastCalendarIdentifier, setLastCalendarIdentifier] = (React69.useState)(calendar.identifier);
|
2492
2492
|
if (calendar.identifier !== lastCalendarIdentifier) {
|
2493
2493
|
let newFocusedDate = (date.toCalendar)(focusedDate, calendar);
|
2494
2494
|
setStartDate(($f62d864046160412$export$f4a51ff076cc9a09)(newFocusedDate, visibleDuration, locale, minValue, maxValue));
|
@@ -2518,7 +2518,7 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
2518
2518
|
setControlledValue(newValue);
|
2519
2519
|
}
|
2520
2520
|
}
|
2521
|
-
let isUnavailable = (
|
2521
|
+
let isUnavailable = (React69.useMemo)(() => {
|
2522
2522
|
if (!calendarDateValue)
|
2523
2523
|
return false;
|
2524
2524
|
if (isDateUnavailable && isDateUnavailable(calendarDateValue))
|
@@ -2531,7 +2531,7 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
2531
2531
|
maxValue
|
2532
2532
|
]);
|
2533
2533
|
let validationState = props.validationState || (isUnavailable ? "invalid" : null);
|
2534
|
-
let pageDuration = (
|
2534
|
+
let pageDuration = (React69.useMemo)(() => {
|
2535
2535
|
if (pageBehavior === "visible")
|
2536
2536
|
return visibleDuration;
|
2537
2537
|
return $131cf43a05231e1e$var$unitDuration(visibleDuration);
|
@@ -2713,7 +2713,7 @@ function $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(props) {
|
|
2713
2713
|
months: 1
|
2714
2714
|
}, minValue, maxValue, ...calendarProps } = props;
|
2715
2715
|
let [value, setValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(valueProp, defaultValue || null, onChange);
|
2716
|
-
let [anchorDate, setAnchorDateState] = (
|
2716
|
+
let [anchorDate, setAnchorDateState] = (React69.useState)(null);
|
2717
2717
|
let alignment = "center";
|
2718
2718
|
if (value && value.start && value.end) {
|
2719
2719
|
let start = ($f62d864046160412$export$f4a51ff076cc9a09)((date.toCalendarDate)(value.start), visibleDuration, locale, minValue, maxValue);
|
@@ -2723,15 +2723,15 @@ function $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(props) {
|
|
2723
2723
|
if (value.end.compare(end) > 0)
|
2724
2724
|
alignment = "start";
|
2725
2725
|
}
|
2726
|
-
let availableRangeRef = (
|
2727
|
-
let [availableRange, setAvailableRange] = (
|
2728
|
-
let min = (
|
2726
|
+
let availableRangeRef = (React69.useRef)(null);
|
2727
|
+
let [availableRange, setAvailableRange] = (React69.useState)(null);
|
2728
|
+
let min = (React69.useMemo)(() => {
|
2729
2729
|
return (date.maxDate)(minValue, availableRange === null || availableRange === void 0 ? void 0 : availableRange.start);
|
2730
2730
|
}, [
|
2731
2731
|
minValue,
|
2732
2732
|
availableRange
|
2733
2733
|
]);
|
2734
|
-
let max = (
|
2734
|
+
let max = (React69.useMemo)(() => {
|
2735
2735
|
return (date.minDate)(maxValue, availableRange === null || availableRange === void 0 ? void 0 : availableRange.end);
|
2736
2736
|
}, [
|
2737
2737
|
maxValue,
|
@@ -2759,7 +2759,7 @@ function $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(props) {
|
|
2759
2759
|
setAvailableRange(null);
|
2760
2760
|
}
|
2761
2761
|
};
|
2762
|
-
let [lastVisibleRange, setLastVisibleRange] = (
|
2762
|
+
let [lastVisibleRange, setLastVisibleRange] = (React69.useState)(calendar.visibleRange);
|
2763
2763
|
if (!(date.isEqualDay)(calendar.visibleRange.start, lastVisibleRange.start) || !(date.isEqualDay)(calendar.visibleRange.end, lastVisibleRange.end)) {
|
2764
2764
|
updateAvailableRange(anchorDate);
|
2765
2765
|
setLastVisibleRange(calendar.visibleRange);
|
@@ -2792,9 +2792,9 @@ function $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(props) {
|
|
2792
2792
|
setAnchorDate(null);
|
2793
2793
|
}
|
2794
2794
|
};
|
2795
|
-
let [isDragging, setDragging] = (
|
2795
|
+
let [isDragging, setDragging] = (React69.useState)(false);
|
2796
2796
|
let { isDateUnavailable } = props;
|
2797
|
-
let isInvalidSelection = (
|
2797
|
+
let isInvalidSelection = (React69.useMemo)(() => {
|
2798
2798
|
if (!value || anchorDate)
|
2799
2799
|
return false;
|
2800
2800
|
if (isDateUnavailable && (isDateUnavailable(value.start) || isDateUnavailable(value.end)))
|
@@ -2878,7 +2878,7 @@ var init_Badge = __esm({
|
|
2878
2878
|
"src/typography/Badge.tsx"() {
|
2879
2879
|
exports.Badge = react.forwardRef(
|
2880
2880
|
({ icon, colorScheme = "grey", children, ...props }, ref) => {
|
2881
|
-
return /* @__PURE__ */
|
2881
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
2882
2882
|
react.Badge,
|
2883
2883
|
{
|
2884
2884
|
colorScheme,
|
@@ -2886,7 +2886,7 @@ var init_Badge = __esm({
|
|
2886
2886
|
paddingLeft: icon ? 1 : void 0,
|
2887
2887
|
ref
|
2888
2888
|
},
|
2889
|
-
icon &&
|
2889
|
+
icon && React69__namespace.default.cloneElement(icon, { marginRight: 1 }),
|
2890
2890
|
children
|
2891
2891
|
);
|
2892
2892
|
}
|
@@ -2896,7 +2896,7 @@ var init_Badge = __esm({
|
|
2896
2896
|
exports.Code = void 0;
|
2897
2897
|
var init_Code = __esm({
|
2898
2898
|
"src/typography/Code.tsx"() {
|
2899
|
-
exports.Code = react.forwardRef((props, ref) => /* @__PURE__ */
|
2899
|
+
exports.Code = react.forwardRef((props, ref) => /* @__PURE__ */ React69__namespace.default.createElement(react.Code, { ...props, ref }));
|
2900
2900
|
}
|
2901
2901
|
});
|
2902
2902
|
exports.Heading = void 0;
|
@@ -2907,7 +2907,7 @@ var init_Heading = __esm({
|
|
2907
2907
|
variant = "xl-display",
|
2908
2908
|
...props
|
2909
2909
|
}) => {
|
2910
|
-
return /* @__PURE__ */
|
2910
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Text, { as, textStyle: variant, ...props });
|
2911
2911
|
};
|
2912
2912
|
}
|
2913
2913
|
});
|
@@ -2916,7 +2916,7 @@ var init_Text = __esm({
|
|
2916
2916
|
"src/typography/Text.tsx"() {
|
2917
2917
|
exports.Text = react.forwardRef(
|
2918
2918
|
({ variant = "sm", ...props }, ref) => {
|
2919
|
-
return /* @__PURE__ */
|
2919
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Text, { ...props, textStyle: variant, ref });
|
2920
2920
|
}
|
2921
2921
|
);
|
2922
2922
|
}
|
@@ -2931,8 +2931,8 @@ var init_typography = __esm({
|
|
2931
2931
|
init_Text();
|
2932
2932
|
}
|
2933
2933
|
});
|
2934
|
-
function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
2935
|
-
const ref =
|
2934
|
+
function CalendarCell({ state: state2, date: date$1, currentMonth, variant }) {
|
2935
|
+
const ref = React69.useRef(null);
|
2936
2936
|
const {
|
2937
2937
|
cellProps,
|
2938
2938
|
buttonProps,
|
@@ -2942,7 +2942,7 @@ function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
|
2942
2942
|
isOutsideVisibleRange
|
2943
2943
|
} = reactAria.useCalendarCell({ date: date$1 }, state2, ref);
|
2944
2944
|
const isOutsideMonth = !date.isSameMonth(currentMonth, date$1);
|
2945
|
-
const styles3 = react.useMultiStyleConfig("Datepicker", {});
|
2945
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", { variant });
|
2946
2946
|
const stateProps = {};
|
2947
2947
|
if (isSelected) {
|
2948
2948
|
stateProps["data-selected"] = true;
|
@@ -2956,7 +2956,7 @@ function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
|
2956
2956
|
if (isOutsideMonth) {
|
2957
2957
|
stateProps["data-unavailable"] = true;
|
2958
2958
|
}
|
2959
|
-
|
2959
|
+
React69.useEffect(() => {
|
2960
2960
|
var _a6;
|
2961
2961
|
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
2962
2962
|
"touchend",
|
@@ -2966,7 +2966,7 @@ function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
|
2966
2966
|
{ passive: false, once: true }
|
2967
2967
|
);
|
2968
2968
|
}, []);
|
2969
|
-
return /* @__PURE__ */
|
2969
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
2970
2970
|
react.Box,
|
2971
2971
|
{
|
2972
2972
|
as: "td",
|
@@ -2989,7 +2989,7 @@ function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
|
2989
2989
|
}
|
2990
2990
|
}
|
2991
2991
|
},
|
2992
|
-
/* @__PURE__ */
|
2992
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
2993
2993
|
react.Box,
|
2994
2994
|
{
|
2995
2995
|
as: "button",
|
@@ -3037,7 +3037,7 @@ var init_utils = __esm({
|
|
3037
3037
|
};
|
3038
3038
|
}
|
3039
3039
|
});
|
3040
|
-
function CalendarGrid({ state: state2, offset = {} }) {
|
3040
|
+
function CalendarGrid({ state: state2, variant, offset = {} }) {
|
3041
3041
|
const { language } = useTranslation();
|
3042
3042
|
const locale = useCurrentLocale();
|
3043
3043
|
const startDate = state2.visibleRange.start.add(offset);
|
@@ -3051,9 +3051,9 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3051
3051
|
);
|
3052
3052
|
const weeksInMonth = date.getWeeksInMonth(state2.visibleRange.start, locale);
|
3053
3053
|
const weeksInMonthRange = new Array(weeksInMonth).fill(0).map((_, i) => i);
|
3054
|
-
const styles3 = react.useMultiStyleConfig("Datepicker", {});
|
3055
|
-
return /* @__PURE__ */
|
3056
|
-
return /* @__PURE__ */
|
3054
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", { variant });
|
3055
|
+
return /* @__PURE__ */ React69__namespace.default.createElement("table", { ...gridProps }, /* @__PURE__ */ React69__namespace.default.createElement("thead", { ...headerProps }, /* @__PURE__ */ React69__namespace.default.createElement("tr", null, weekDays[language].map((day, index) => {
|
3056
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
3057
3057
|
exports.Text,
|
3058
3058
|
{
|
3059
3059
|
as: "th",
|
@@ -3063,16 +3063,17 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3063
3063
|
},
|
3064
3064
|
day
|
3065
3065
|
);
|
3066
|
-
}))), /* @__PURE__ */
|
3067
|
-
(date, dayIndex) => date ? /* @__PURE__ */
|
3066
|
+
}))), /* @__PURE__ */ React69__namespace.default.createElement("tbody", null, weeksInMonthRange.map((weekIndex) => /* @__PURE__ */ React69__namespace.default.createElement("tr", { key: weekIndex }, state2.getDatesInWeek(weekIndex, startDate).map(
|
3067
|
+
(date, dayIndex) => date ? /* @__PURE__ */ React69__namespace.default.createElement(
|
3068
3068
|
CalendarCell,
|
3069
3069
|
{
|
3070
|
+
variant,
|
3070
3071
|
key: dayIndex,
|
3071
3072
|
state: state2,
|
3072
3073
|
date,
|
3073
3074
|
currentMonth: startDate
|
3074
3075
|
}
|
3075
|
-
) : /* @__PURE__ */
|
3076
|
+
) : /* @__PURE__ */ React69__namespace.default.createElement("td", { key: dayIndex })
|
3076
3077
|
)))));
|
3077
3078
|
}
|
3078
3079
|
var weekDays;
|
@@ -3095,9 +3096,9 @@ function CalendarNavigationButton({
|
|
3095
3096
|
"aria-label": ariaLabel,
|
3096
3097
|
...rest
|
3097
3098
|
}) {
|
3098
|
-
const ref =
|
3099
|
+
const ref = React69.useRef(null);
|
3099
3100
|
const { buttonProps } = reactAria.useButton(rest, ref);
|
3100
|
-
return /* @__PURE__ */
|
3101
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
3101
3102
|
exports.IconButton,
|
3102
3103
|
{
|
3103
3104
|
...buttonProps,
|
@@ -3134,7 +3135,7 @@ function CalendarHeader({
|
|
3134
3135
|
);
|
3135
3136
|
const areAllOtherYearsDisabled = isPreviousYearDisabled && isNextYearDisabled;
|
3136
3137
|
const isYearPickerVisible = showYearNavigation && !areAllOtherYearsDisabled;
|
3137
|
-
return /* @__PURE__ */
|
3138
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Flex, { alignItems: "center", paddingBottom: "4", justifyContent: "space-between" }, /* @__PURE__ */ React69__namespace.default.createElement(
|
3138
3139
|
CalendarNavigator,
|
3139
3140
|
{
|
3140
3141
|
title: title ? title : isYearPickerVisible ? monthTitle : monthAndYearTitle,
|
@@ -3144,7 +3145,7 @@ function CalendarHeader({
|
|
3144
3145
|
isNextDisabled: !state2.isPreviousVisibleRangeInvalid,
|
3145
3146
|
isPreviousDisabled: !state2.isNextVisibleRangeInvalid
|
3146
3147
|
}
|
3147
|
-
), isYearPickerVisible && /* @__PURE__ */
|
3148
|
+
), isYearPickerVisible && /* @__PURE__ */ React69__namespace.default.createElement(
|
3148
3149
|
CalendarNavigator,
|
3149
3150
|
{
|
3150
3151
|
title: jsDate.getFullYear().toString(),
|
@@ -3173,15 +3174,15 @@ var init_CalendarHeader = __esm({
|
|
3173
3174
|
isNextDisabled
|
3174
3175
|
}) => {
|
3175
3176
|
const { t: t2 } = useTranslation();
|
3176
|
-
return /* @__PURE__ */
|
3177
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Flex, { alignItems: "center", flexGrow: 1 }, /* @__PURE__ */ React69__namespace.default.createElement(
|
3177
3178
|
CalendarNavigationButton,
|
3178
3179
|
{
|
3179
3180
|
onPress: onPrevious,
|
3180
3181
|
isDisabled: isPreviousDisabled,
|
3181
|
-
icon: /* @__PURE__ */
|
3182
|
+
icon: /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.ArrowLeftOutline24Icon, null),
|
3182
3183
|
"aria-label": `${t2(texts7.previous)} ${t2(texts7[unit])}`
|
3183
3184
|
}
|
3184
|
-
), /* @__PURE__ */
|
3185
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
3185
3186
|
exports.Heading,
|
3186
3187
|
{
|
3187
3188
|
as: "div",
|
@@ -3192,12 +3193,12 @@ var init_CalendarHeader = __esm({
|
|
3192
3193
|
textAlign: "center"
|
3193
3194
|
},
|
3194
3195
|
capitalize(title)
|
3195
|
-
), /* @__PURE__ */
|
3196
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
3196
3197
|
CalendarNavigationButton,
|
3197
3198
|
{
|
3198
3199
|
onPress: onNext,
|
3199
3200
|
isDisabled: isNextDisabled,
|
3200
|
-
icon: /* @__PURE__ */
|
3201
|
+
icon: /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.ArrowRightOutline24Icon, null),
|
3201
3202
|
"aria-label": `${t2(texts7.next)} ${t2(texts7[unit])}`
|
3202
3203
|
}
|
3203
3204
|
));
|
@@ -3230,7 +3231,7 @@ var init_CalendarHeader = __esm({
|
|
3230
3231
|
});
|
3231
3232
|
}
|
3232
3233
|
});
|
3233
|
-
function Calendar({ showYearNavigation, ...props }) {
|
3234
|
+
function Calendar({ showYearNavigation, variant, ...props }) {
|
3234
3235
|
const { t: t2 } = useTranslation();
|
3235
3236
|
const locale = useCurrentLocale();
|
3236
3237
|
const state2 = $131cf43a05231e1e$export$6d095e787d2b5e1f({
|
@@ -3241,7 +3242,7 @@ function Calendar({ showYearNavigation, ...props }) {
|
|
3241
3242
|
const { calendarProps } = reactAria.useCalendar(props, state2);
|
3242
3243
|
const calendarAriaLabel = calendarProps["aria-label"];
|
3243
3244
|
const ariaLabel = t2(texts8.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
|
3244
|
-
return /* @__PURE__ */
|
3245
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...calendarProps, "aria-label": ariaLabel }, /* @__PURE__ */ React69__namespace.default.createElement(CalendarHeader, { state: state2, showYearNavigation }), /* @__PURE__ */ React69__namespace.default.createElement(CalendarGrid, { variant, state: state2 }));
|
3245
3246
|
}
|
3246
3247
|
var texts8;
|
3247
3248
|
var init_Calendar = __esm({
|
@@ -3266,9 +3267,9 @@ var init_CalendarTriggerButton = __esm({
|
|
3266
3267
|
"src/datepicker/CalendarTriggerButton.tsx"() {
|
3267
3268
|
init_src();
|
3268
3269
|
CalendarTriggerButton = react.forwardRef(
|
3269
|
-
({ ...buttonProps }, ref) => {
|
3270
|
+
({ variant, ...buttonProps }, ref) => {
|
3270
3271
|
const { t: t2 } = useTranslation();
|
3271
|
-
const styles3 = react.useMultiStyleConfig("Datepicker", {});
|
3272
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", { variant });
|
3272
3273
|
const { onPress, ...filteredButtonProps } = buttonProps;
|
3273
3274
|
const handleOnPress = (event) => {
|
3274
3275
|
if (onPress) {
|
@@ -3276,7 +3277,7 @@ var init_CalendarTriggerButton = __esm({
|
|
3276
3277
|
onPress(event);
|
3277
3278
|
}
|
3278
3279
|
};
|
3279
|
-
return /* @__PURE__ */
|
3280
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
3280
3281
|
react.Box,
|
3281
3282
|
{
|
3282
3283
|
ref,
|
@@ -3287,7 +3288,7 @@ var init_CalendarTriggerButton = __esm({
|
|
3287
3288
|
...filteredButtonProps,
|
3288
3289
|
onKeyUp: handleOnPress
|
3289
3290
|
},
|
3290
|
-
/* @__PURE__ */
|
3291
|
+
/* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.CalendarOutline24Icon, null)
|
3291
3292
|
));
|
3292
3293
|
}
|
3293
3294
|
);
|
@@ -3304,9 +3305,9 @@ var init_CalendarTriggerButton = __esm({
|
|
3304
3305
|
var DateTimeSegment, isPaddable;
|
3305
3306
|
var init_DateTimeSegment = __esm({
|
3306
3307
|
"src/datepicker/DateTimeSegment.tsx"() {
|
3307
|
-
DateTimeSegment =
|
3308
|
+
DateTimeSegment = React69.forwardRef(
|
3308
3309
|
({ segment, state: state2 }, externalRef) => {
|
3309
|
-
const internalRef =
|
3310
|
+
const internalRef = React69.useRef(null);
|
3310
3311
|
const ref = externalRef ?? internalRef;
|
3311
3312
|
const { segmentProps } = reactAria.useDateSegment(
|
3312
3313
|
segment,
|
@@ -3317,7 +3318,7 @@ var init_DateTimeSegment = __esm({
|
|
3317
3318
|
isPlaceholder: segment.isPlaceholder,
|
3318
3319
|
isEditable: segment.isEditable
|
3319
3320
|
});
|
3320
|
-
return /* @__PURE__ */
|
3321
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
3321
3322
|
react.Box,
|
3322
3323
|
{
|
3323
3324
|
...segmentProps,
|
@@ -3326,12 +3327,10 @@ var init_DateTimeSegment = __esm({
|
|
3326
3327
|
...segmentProps.style,
|
3327
3328
|
boxSizing: "content-box"
|
3328
3329
|
},
|
3329
|
-
paddingX: "1px",
|
3330
3330
|
textAlign: "center",
|
3331
3331
|
outline: "none",
|
3332
3332
|
borderRadius: "xs",
|
3333
3333
|
fontSize: ["mobile.sm", "desktop.sm"],
|
3334
|
-
minWidth: isPaddable(segment.type) ? "1.3em" : "auto",
|
3335
3334
|
sx: styles3.dateTimeSegment,
|
3336
3335
|
_focus: {
|
3337
3336
|
backgroundColor: "darkTeal",
|
@@ -3359,7 +3358,7 @@ var init_DateField = __esm({
|
|
3359
3358
|
init_import4();
|
3360
3359
|
init_DateTimeSegment();
|
3361
3360
|
init_utils();
|
3362
|
-
DateField =
|
3361
|
+
DateField = React69.forwardRef(
|
3363
3362
|
(props, externalRef) => {
|
3364
3363
|
var _a6;
|
3365
3364
|
const locale = useCurrentLocale();
|
@@ -3369,14 +3368,14 @@ var init_DateField = __esm({
|
|
3369
3368
|
locale,
|
3370
3369
|
createCalendar: createCalendar2
|
3371
3370
|
});
|
3372
|
-
const internalRef =
|
3371
|
+
const internalRef = React69.useRef(null);
|
3373
3372
|
const ref = externalRef ?? internalRef;
|
3374
3373
|
const { fieldProps, labelProps } = reactAria.useDateField(
|
3375
3374
|
props,
|
3376
3375
|
state2,
|
3377
3376
|
ref
|
3378
3377
|
);
|
3379
|
-
return /* @__PURE__ */
|
3378
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { minWidth: "6rem", width: "100%" }, props.label && /* @__PURE__ */ React69__namespace.default.createElement(
|
3380
3379
|
react.FormLabel,
|
3381
3380
|
{
|
3382
3381
|
...props.labelProps,
|
@@ -3386,7 +3385,7 @@ var init_DateField = __esm({
|
|
3386
3385
|
paddingTop: "2px"
|
3387
3386
|
},
|
3388
3387
|
props.label
|
3389
|
-
), /* @__PURE__ */
|
3388
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(react.Flex, { ...fieldProps, paddingTop: "3", paddingBottom: "0.5" }, state2.segments.map((segment, i) => /* @__PURE__ */ React69__namespace.default.createElement(
|
3390
3389
|
DateTimeSegment,
|
3391
3390
|
{
|
3392
3391
|
ref: i === 0 ? ref : void 0,
|
@@ -3394,7 +3393,7 @@ var init_DateField = __esm({
|
|
3394
3393
|
segment,
|
3395
3394
|
state: state2
|
3396
3395
|
}
|
3397
|
-
))), /* @__PURE__ */
|
3396
|
+
))), /* @__PURE__ */ React69__namespace.default.createElement(
|
3398
3397
|
"input",
|
3399
3398
|
{
|
3400
3399
|
type: "hidden",
|
@@ -3415,7 +3414,7 @@ var init_StyledField = __esm({
|
|
3415
3414
|
isInvalid: false
|
3416
3415
|
};
|
3417
3416
|
const styles3 = react.useMultiStyleConfig("Datepicker", { variant });
|
3418
|
-
return /* @__PURE__ */
|
3417
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
3419
3418
|
react.Box,
|
3420
3419
|
{
|
3421
3420
|
...otherProps,
|
@@ -3439,7 +3438,7 @@ var init_DatePicker = __esm({
|
|
3439
3438
|
init_DateField();
|
3440
3439
|
init_StyledField();
|
3441
3440
|
init_utils();
|
3442
|
-
exports.DatePicker =
|
3441
|
+
exports.DatePicker = React69.forwardRef(
|
3443
3442
|
({
|
3444
3443
|
variant,
|
3445
3444
|
errorMessage,
|
@@ -3457,7 +3456,7 @@ var init_DatePicker = __esm({
|
|
3457
3456
|
isRequired: props.isRequired ?? (formControlProps == null ? void 0 : formControlProps.isRequired),
|
3458
3457
|
validationState: (formControlProps == null ? void 0 : formControlProps.isInvalid) ? "invalid" : "valid"
|
3459
3458
|
});
|
3460
|
-
const internalRef =
|
3459
|
+
const internalRef = React69.useRef(null);
|
3461
3460
|
const ref = externalRef ?? internalRef;
|
3462
3461
|
const {
|
3463
3462
|
groupProps,
|
@@ -3472,63 +3471,50 @@ var init_DatePicker = __esm({
|
|
3472
3471
|
state2,
|
3473
3472
|
ref
|
3474
3473
|
);
|
3475
|
-
const styles3 = react.useMultiStyleConfig("Datepicker", {});
|
3474
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", { variant });
|
3476
3475
|
const locale = useCurrentLocale();
|
3477
|
-
const responsiveVariant = react.useBreakpointValue(typeof variant === "string" ? [variant] : variant) ?? "simple";
|
3478
|
-
const hasTrigger = responsiveVariant === "with-trigger";
|
3479
3476
|
const onFieldClick = () => {
|
3480
|
-
|
3481
|
-
state2.setOpen(true);
|
3482
|
-
}
|
3477
|
+
state2.setOpen(true);
|
3483
3478
|
};
|
3484
|
-
const popoverContent = /* @__PURE__ */
|
3479
|
+
const popoverContent = /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverContent, { color: "darkGrey", boxShadow: "md", sx: styles3.calendar }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React69__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
3485
3480
|
Calendar,
|
3486
3481
|
{
|
3487
3482
|
...calendarProps,
|
3483
|
+
variant,
|
3488
3484
|
showYearNavigation
|
3489
3485
|
}
|
3490
3486
|
))));
|
3491
|
-
return /* @__PURE__ */
|
3492
|
-
react.
|
3487
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { position: "relative", display: "inline-flex", flexDirection: "column", width }, /* @__PURE__ */ React69__namespace.default.createElement(
|
3488
|
+
react.Popover,
|
3493
3489
|
{
|
3494
|
-
|
3495
|
-
|
3496
|
-
|
3497
|
-
|
3490
|
+
...dialogProps,
|
3491
|
+
isOpen: state2.isOpen,
|
3492
|
+
onOpen: state2.open,
|
3493
|
+
onClose: state2.close
|
3498
3494
|
},
|
3499
|
-
/* @__PURE__ */
|
3500
|
-
|
3495
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.InputGroup, { ...groupProps, display: "inline-flex" }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
3496
|
+
StyledField,
|
3501
3497
|
{
|
3502
|
-
|
3503
|
-
|
3504
|
-
|
3505
|
-
|
3498
|
+
variant,
|
3499
|
+
onClick: onFieldClick,
|
3500
|
+
paddingX: 3,
|
3501
|
+
minHeight
|
3506
3502
|
},
|
3507
|
-
/* @__PURE__ */
|
3508
|
-
|
3503
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React69__namespace.default.createElement(CalendarTriggerButton, { variant, ref, ...buttonProps })),
|
3504
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
3505
|
+
DateField,
|
3509
3506
|
{
|
3510
|
-
|
3511
|
-
|
3512
|
-
|
3513
|
-
|
3514
|
-
}
|
3515
|
-
|
3516
|
-
|
3517
|
-
|
3518
|
-
|
3519
|
-
|
3520
|
-
|
3521
|
-
name: props.name,
|
3522
|
-
ref: hasTrigger ? void 0 : ref,
|
3523
|
-
...fieldProps
|
3524
|
-
}
|
3525
|
-
)
|
3526
|
-
)), hasTrigger && /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React50__namespace.default.createElement(CalendarTriggerButton, { ref, ...buttonProps }))),
|
3527
|
-
/* @__PURE__ */ React50__namespace.default.createElement(exports.FormErrorMessage, { ...errorMessageProps }, errorMessage),
|
3528
|
-
state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React50__namespace.default.createElement(react.Portal, null, popoverContent),
|
3529
|
-
state2.isOpen && !props.isDisabled && !withPortal && popoverContent
|
3530
|
-
)
|
3531
|
-
));
|
3507
|
+
label: props.label,
|
3508
|
+
labelProps,
|
3509
|
+
name: props.name,
|
3510
|
+
...fieldProps
|
3511
|
+
}
|
3512
|
+
)
|
3513
|
+
))),
|
3514
|
+
/* @__PURE__ */ React69__namespace.default.createElement(exports.FormErrorMessage, { ...errorMessageProps }, errorMessage),
|
3515
|
+
state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React69__namespace.default.createElement(react.Portal, null, popoverContent),
|
3516
|
+
state2.isOpen && !props.isDisabled && !withPortal && popoverContent
|
3517
|
+
)));
|
3532
3518
|
}
|
3533
3519
|
);
|
3534
3520
|
}
|
@@ -3541,9 +3527,9 @@ function RangeCalendar(props) {
|
|
3541
3527
|
locale,
|
3542
3528
|
createCalendar: date.createCalendar
|
3543
3529
|
});
|
3544
|
-
const ref =
|
3530
|
+
const ref = React69.useRef(null);
|
3545
3531
|
const { calendarProps, title } = reactAria.useRangeCalendar(props, state2, ref);
|
3546
|
-
return /* @__PURE__ */
|
3532
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...calendarProps, ref }, /* @__PURE__ */ React69__namespace.default.createElement(CalendarHeader, { state: state2, title }), /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { display: "flex", gap: "8" }, /* @__PURE__ */ React69__namespace.default.createElement(CalendarGrid, { variant: props.variant, state: state2 }), /* @__PURE__ */ React69__namespace.default.createElement(CalendarGrid, { variant: props.variant, state: state2, offset: { months: 1 } })));
|
3547
3533
|
}
|
3548
3534
|
var init_RangeCalendar = __esm({
|
3549
3535
|
"src/datepicker/RangeCalendar.tsx"() {
|
@@ -3568,7 +3554,7 @@ function DateRangePicker({
|
|
3568
3554
|
isRequired: props.isRequired ?? (formControlProps == null ? void 0 : formControlProps.isRequired),
|
3569
3555
|
validationState: formControlProps.isInvalid ? "invalid" : "valid"
|
3570
3556
|
});
|
3571
|
-
const ref =
|
3557
|
+
const ref = React69.useRef(null);
|
3572
3558
|
const {
|
3573
3559
|
groupProps,
|
3574
3560
|
labelProps,
|
@@ -3578,25 +3564,19 @@ function DateRangePicker({
|
|
3578
3564
|
dialogProps,
|
3579
3565
|
calendarProps
|
3580
3566
|
} = reactAria.useDateRangePicker(props, state2, ref);
|
3581
|
-
const
|
3582
|
-
const styles3 = react.useMultiStyleConfig("Datepicker", {
|
3583
|
-
variant: responsiveVariant
|
3584
|
-
});
|
3567
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", { variant });
|
3585
3568
|
const locale = useCurrentLocale();
|
3586
3569
|
const handleEnterClick = (e) => {
|
3587
|
-
if (e.key === "Enter" && !state2.isOpen &&
|
3570
|
+
if (e.key === "Enter" && !state2.isOpen && variant === "base") {
|
3588
3571
|
e.stopPropagation();
|
3589
3572
|
state2.setOpen(true);
|
3590
3573
|
}
|
3591
3574
|
};
|
3592
3575
|
const onFieldClick = () => {
|
3593
|
-
|
3594
|
-
state2.setOpen(true);
|
3595
|
-
}
|
3576
|
+
state2.setOpen(true);
|
3596
3577
|
};
|
3597
|
-
const
|
3598
|
-
|
3599
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React50__namespace.default.createElement(react.FormLabel, { ...labelProps, sx: styles3.inputLabel }, props.label), /* @__PURE__ */ React50__namespace.default.createElement(
|
3578
|
+
const popoverContent = /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverContent, { sx: styles3.calendar, boxShadow: "md", maxWidth: "none" }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React69__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React69__namespace.default.createElement(RangeCalendar, { variant: "base", ...calendarProps }))));
|
3579
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React69__namespace.default.createElement(react.FormLabel, { ...labelProps, sx: styles3.inputLabel }, props.label), /* @__PURE__ */ React69__namespace.default.createElement(
|
3600
3580
|
react.Popover,
|
3601
3581
|
{
|
3602
3582
|
...dialogProps,
|
@@ -3604,29 +3584,28 @@ function DateRangePicker({
|
|
3604
3584
|
onOpen: state2.open,
|
3605
3585
|
onClose: state2.close
|
3606
3586
|
},
|
3607
|
-
/* @__PURE__ */
|
3587
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.InputGroup, { ...groupProps, width: "auto", display: "inline-flex" }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
3608
3588
|
StyledField,
|
3609
3589
|
{
|
3610
3590
|
alignItems: "center",
|
3611
3591
|
paddingX: 3,
|
3612
|
-
variant
|
3592
|
+
variant,
|
3613
3593
|
onClick: onFieldClick,
|
3614
3594
|
onKeyPress: handleEnterClick,
|
3615
3595
|
minHeight
|
3616
3596
|
},
|
3617
|
-
|
3618
|
-
/* @__PURE__ */
|
3597
|
+
variant && /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React69__namespace.default.createElement(CalendarTriggerButton, { paddingLeft: 1, paddingRight: 1, variant, ref, ...buttonProps })),
|
3598
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
3619
3599
|
DateField,
|
3620
3600
|
{
|
3621
3601
|
...startFieldProps,
|
3622
3602
|
name: startName,
|
3623
3603
|
label: props.startLabel,
|
3624
|
-
ref: hasTrigger ? void 0 : ref,
|
3625
3604
|
labelProps
|
3626
3605
|
}
|
3627
3606
|
),
|
3628
|
-
/* @__PURE__ */
|
3629
|
-
/* @__PURE__ */
|
3607
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: "span", "aria-hidden": "true", paddingRight: "2" }, "\u2013"),
|
3608
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
3630
3609
|
DateField,
|
3631
3610
|
{
|
3632
3611
|
...endFieldProps,
|
@@ -3635,8 +3614,8 @@ function DateRangePicker({
|
|
3635
3614
|
labelProps
|
3636
3615
|
}
|
3637
3616
|
)
|
3638
|
-
))
|
3639
|
-
state2.isOpen && withPortal && /* @__PURE__ */
|
3617
|
+
))),
|
3618
|
+
state2.isOpen && withPortal && /* @__PURE__ */ React69__namespace.default.createElement(react.Portal, null, popoverContent),
|
3640
3619
|
state2.isOpen && !withPortal && popoverContent
|
3641
3620
|
)));
|
3642
3621
|
}
|
@@ -3657,9 +3636,9 @@ var init_TimeField = __esm({
|
|
3657
3636
|
init_DateTimeSegment();
|
3658
3637
|
init_utils();
|
3659
3638
|
TimeField = ({ state: state2, ...props }) => {
|
3660
|
-
const ref =
|
3639
|
+
const ref = React69.useRef(null);
|
3661
3640
|
const { labelProps, fieldProps } = reactAria.useTimeField(props, state2, ref);
|
3662
|
-
return /* @__PURE__ */
|
3641
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
3663
3642
|
exports.FormLabel,
|
3664
3643
|
{
|
3665
3644
|
...labelProps,
|
@@ -3671,7 +3650,7 @@ var init_TimeField = __esm({
|
|
3671
3650
|
paddingTop: "2px"
|
3672
3651
|
},
|
3673
3652
|
props.label
|
3674
|
-
), /* @__PURE__ */
|
3653
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(react.Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5" }, state2.segments.map((segment) => /* @__PURE__ */ React69__namespace.default.createElement(DateTimeSegment, { key: segment.type, segment, state: state2 }))), /* @__PURE__ */ React69__namespace.default.createElement(
|
3675
3654
|
"input",
|
3676
3655
|
{
|
3677
3656
|
type: "hidden",
|
@@ -3747,10 +3726,10 @@ var init_TimePicker = __esm({
|
|
3747
3726
|
const ariaLabel = `${inputLabel} \u2013 ${t2(
|
3748
3727
|
texts10.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
|
3749
3728
|
)}`;
|
3750
|
-
return /* @__PURE__ */
|
3729
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
3751
3730
|
StyledField,
|
3752
3731
|
{
|
3753
|
-
variant: "
|
3732
|
+
variant: "base",
|
3754
3733
|
width: "fit-content",
|
3755
3734
|
paddingX: 2,
|
3756
3735
|
alignItems: "center",
|
@@ -3763,7 +3742,7 @@ var init_TimePicker = __esm({
|
|
3763
3742
|
"aria-label": ariaLabel,
|
3764
3743
|
...boxProps
|
3765
3744
|
},
|
3766
|
-
/* @__PURE__ */
|
3745
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
3767
3746
|
exports.IconButton,
|
3768
3747
|
{
|
3769
3748
|
variant: "ghost",
|
@@ -3771,14 +3750,14 @@ var init_TimePicker = __esm({
|
|
3771
3750
|
borderRadius: "xs",
|
3772
3751
|
"aria-label": backwardsLabel,
|
3773
3752
|
title: backwardsLabel,
|
3774
|
-
icon: /* @__PURE__ */
|
3753
|
+
icon: /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.DropdownLeftFill18Icon, null),
|
3775
3754
|
onClick: handleBackwardsClick,
|
3776
3755
|
isDisabled,
|
3777
3756
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
3778
3757
|
}
|
3779
3758
|
),
|
3780
|
-
/* @__PURE__ */
|
3781
|
-
/* @__PURE__ */
|
3759
|
+
/* @__PURE__ */ React69__namespace.default.createElement(TimeField, { label, state: state2, name }),
|
3760
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
3782
3761
|
exports.IconButton,
|
3783
3762
|
{
|
3784
3763
|
variant: "ghost",
|
@@ -3786,7 +3765,7 @@ var init_TimePicker = __esm({
|
|
3786
3765
|
borderRadius: "xs",
|
3787
3766
|
"aria-label": forwardsLabel,
|
3788
3767
|
title: forwardsLabel,
|
3789
|
-
icon: /* @__PURE__ */
|
3768
|
+
icon: /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, null),
|
3790
3769
|
onClick: handleForwardClick,
|
3791
3770
|
isDisabled,
|
3792
3771
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
@@ -3872,7 +3851,7 @@ var init_AttachedInputs = __esm({
|
|
3872
3851
|
}
|
3873
3852
|
};
|
3874
3853
|
const direction2 = flexDirection === "row" ? "horizontal" : "vertical";
|
3875
|
-
return /* @__PURE__ */
|
3854
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
3876
3855
|
react.Flex,
|
3877
3856
|
{
|
3878
3857
|
role: "group",
|
@@ -3889,16 +3868,16 @@ var Dialog;
|
|
3889
3868
|
var init_Dialog = __esm({
|
3890
3869
|
"src/input/Dialog.tsx"() {
|
3891
3870
|
Dialog = ({ title, children, ...props }) => {
|
3892
|
-
const ref =
|
3871
|
+
const ref = React69.useRef(null);
|
3893
3872
|
const { dialogProps, titleProps } = reactAria.useDialog(props, ref);
|
3894
|
-
return /* @__PURE__ */
|
3873
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...dialogProps, ref, outline: "none" }, title && /* @__PURE__ */ React69__namespace.default.createElement(react.Heading, { as: "h3", ...titleProps }, title), children);
|
3895
3874
|
};
|
3896
3875
|
}
|
3897
3876
|
});
|
3898
3877
|
var Popover3;
|
3899
3878
|
var init_Popover = __esm({
|
3900
3879
|
"src/input/Popover.tsx"() {
|
3901
|
-
Popover3 =
|
3880
|
+
Popover3 = React69.forwardRef(
|
3902
3881
|
({
|
3903
3882
|
children,
|
3904
3883
|
state: state2,
|
@@ -3912,7 +3891,7 @@ var init_Popover = __esm({
|
|
3912
3891
|
containerPadding = 12
|
3913
3892
|
}, ref) => {
|
3914
3893
|
var _a6;
|
3915
|
-
const internalRef =
|
3894
|
+
const internalRef = React69.useRef(null);
|
3916
3895
|
const popoverRef = ref ?? internalRef;
|
3917
3896
|
const { popoverProps, underlayProps } = reactAria.usePopover(
|
3918
3897
|
{
|
@@ -3927,28 +3906,28 @@ var init_Popover = __esm({
|
|
3927
3906
|
},
|
3928
3907
|
state2
|
3929
3908
|
);
|
3930
|
-
const popoverBox = /* @__PURE__ */
|
3909
|
+
const popoverBox = /* @__PURE__ */ React69__namespace.default.createElement(
|
3931
3910
|
react.Box,
|
3932
3911
|
{
|
3933
3912
|
...popoverProps,
|
3934
3913
|
ref: popoverRef,
|
3935
3914
|
minWidth: ((_a6 = triggerRef.current) == null ? void 0 : _a6.clientWidth) ?? "auto"
|
3936
3915
|
},
|
3937
|
-
/* @__PURE__ */
|
3916
|
+
/* @__PURE__ */ React69__namespace.default.createElement(reactAria.DismissButton, { onDismiss: state2.close }),
|
3938
3917
|
children,
|
3939
|
-
/* @__PURE__ */
|
3918
|
+
/* @__PURE__ */ React69__namespace.default.createElement(reactAria.DismissButton, { onDismiss: state2.close })
|
3940
3919
|
);
|
3941
3920
|
if (isNonModal) {
|
3942
3921
|
return popoverBox;
|
3943
3922
|
}
|
3944
|
-
return /* @__PURE__ */
|
3923
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(reactAria.Overlay, null, hasBackdrop && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...underlayProps, position: "fixed", inset: "0" }), popoverBox);
|
3945
3924
|
}
|
3946
3925
|
);
|
3947
3926
|
}
|
3948
3927
|
});
|
3949
3928
|
function useForceRerender(shouldRerender) {
|
3950
|
-
const [_, update] =
|
3951
|
-
|
3929
|
+
const [_, update] = React69.useState(false);
|
3930
|
+
React69.useEffect(() => {
|
3952
3931
|
if (shouldRerender) {
|
3953
3932
|
update((x) => !x);
|
3954
3933
|
}
|
@@ -3976,7 +3955,7 @@ var init_CardSelect = __esm({
|
|
3976
3955
|
withChevron = true,
|
3977
3956
|
...props
|
3978
3957
|
}, externalRef) => {
|
3979
|
-
const internalRef =
|
3958
|
+
const internalRef = React69.useRef(null);
|
3980
3959
|
const triggerRef = externalRef ?? internalRef;
|
3981
3960
|
const state2 = reactStately.useOverlayTriggerState({
|
3982
3961
|
isOpen: externalIsOpen,
|
@@ -3992,7 +3971,7 @@ var init_CardSelect = __esm({
|
|
3992
3971
|
const styles3 = react.useMultiStyleConfig("CardSelect", { variant, size: size2 });
|
3993
3972
|
useForceRerender(state2.isOpen);
|
3994
3973
|
const ChevronIcon = size2 === "sm" ? sporIconReact.DropdownDownFill18Icon : sporIconReact.DropdownDownFill24Icon;
|
3995
|
-
return /* @__PURE__ */
|
3974
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React69__namespace.default.createElement(
|
3996
3975
|
react.chakra.button,
|
3997
3976
|
{
|
3998
3977
|
type: "button",
|
@@ -4002,13 +3981,13 @@ var init_CardSelect = __esm({
|
|
4002
3981
|
width,
|
4003
3982
|
"data-attachable": true
|
4004
3983
|
},
|
4005
|
-
/* @__PURE__ */
|
3984
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.Flex, { gap: 1.5, alignItems: "center" }, icon, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: "span" }, label), withChevron ? /* @__PURE__ */ React69__namespace.default.createElement(
|
4006
3985
|
ChevronIcon,
|
4007
3986
|
{
|
4008
3987
|
transform: state2.isOpen ? "rotate(180deg)" : "none"
|
4009
3988
|
}
|
4010
3989
|
) : null)
|
4011
|
-
), state2.isOpen && /* @__PURE__ */
|
3990
|
+
), state2.isOpen && /* @__PURE__ */ React69__namespace.default.createElement(
|
4012
3991
|
Popover3,
|
4013
3992
|
{
|
4014
3993
|
state: state2,
|
@@ -4017,7 +3996,7 @@ var init_CardSelect = __esm({
|
|
4017
3996
|
crossOffset,
|
4018
3997
|
placement
|
4019
3998
|
},
|
4020
|
-
/* @__PURE__ */
|
3999
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
4021
4000
|
exports.Card,
|
4022
4001
|
{
|
4023
4002
|
colorScheme: "white",
|
@@ -4025,7 +4004,7 @@ var init_CardSelect = __esm({
|
|
4025
4004
|
sx: styles3.card,
|
4026
4005
|
...overlayProps
|
4027
4006
|
},
|
4028
|
-
/* @__PURE__ */
|
4007
|
+
/* @__PURE__ */ React69__namespace.default.createElement(Dialog, { "aria-label": label }, children)
|
4029
4008
|
)
|
4030
4009
|
));
|
4031
4010
|
}
|
@@ -4036,7 +4015,7 @@ exports.Checkbox = void 0;
|
|
4036
4015
|
var init_Checkbox = __esm({
|
4037
4016
|
"src/input/Checkbox.tsx"() {
|
4038
4017
|
exports.Checkbox = react.forwardRef((props, ref) => {
|
4039
|
-
return /* @__PURE__ */
|
4018
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Checkbox, { ...props, ref });
|
4040
4019
|
});
|
4041
4020
|
}
|
4042
4021
|
});
|
@@ -4048,7 +4027,7 @@ var init_CheckboxGroup = __esm({
|
|
4048
4027
|
children,
|
4049
4028
|
...props
|
4050
4029
|
}) => {
|
4051
|
-
return /* @__PURE__ */
|
4030
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.CheckboxGroup, { ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.Stack, { direction: direction2 }, children));
|
4052
4031
|
};
|
4053
4032
|
}
|
4054
4033
|
});
|
@@ -4821,16 +4800,16 @@ var init_ChoiceChip = __esm({
|
|
4821
4800
|
icon,
|
4822
4801
|
hasLabel: Boolean(children)
|
4823
4802
|
});
|
4824
|
-
const id = `choice-chip-${
|
4825
|
-
return /* @__PURE__ */
|
4803
|
+
const id = `choice-chip-${React69.useId()}`;
|
4804
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
4826
4805
|
react.chakra.label,
|
4827
4806
|
{
|
4828
4807
|
htmlFor: id,
|
4829
4808
|
...getRootProps(),
|
4830
4809
|
"aria-label": String(children)
|
4831
4810
|
},
|
4832
|
-
/* @__PURE__ */
|
4833
|
-
/* @__PURE__ */
|
4811
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.chakra.input, { ...getInputProps({}, ref), id }),
|
4812
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
4834
4813
|
react.chakra.div,
|
4835
4814
|
{
|
4836
4815
|
...getLabelProps(),
|
@@ -4841,9 +4820,9 @@ var init_ChoiceChip = __esm({
|
|
4841
4820
|
"data-active": dataAttr(state2.isActive),
|
4842
4821
|
"data-disabled": dataAttr(state2.isDisabled)
|
4843
4822
|
},
|
4844
|
-
icon && /* @__PURE__ */
|
4845
|
-
/* @__PURE__ */
|
4846
|
-
variant === "filter" && state2.isChecked && /* @__PURE__ */
|
4823
|
+
icon && /* @__PURE__ */ React69__namespace.default.createElement(react.chakra.span, { __css: styles3.icon }, state2.isChecked ? icon.checked : icon.default),
|
4824
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.chakra.span, { __css: styles3.label, ...getCheckboxProps() }, variant !== "icon" && children),
|
4825
|
+
variant === "filter" && state2.isChecked && /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.CloseOutline24Icon, { marginLeft: 1.5 })
|
4847
4826
|
)
|
4848
4827
|
);
|
4849
4828
|
});
|
@@ -4874,9 +4853,9 @@ function Combobox({
|
|
4874
4853
|
...rest
|
4875
4854
|
}) {
|
4876
4855
|
const { contains: contains2 } = reactAria.useFilter({ sensitivity: "base" });
|
4877
|
-
const inputRef =
|
4878
|
-
const listBoxRef =
|
4879
|
-
const popoverRef =
|
4856
|
+
const inputRef = React69.useRef(null);
|
4857
|
+
const listBoxRef = React69.useRef(null);
|
4858
|
+
const popoverRef = React69.useRef(null);
|
4880
4859
|
const inputWidth = useInputWidth(inputRef);
|
4881
4860
|
const state2 = reactStately.useComboBoxState({
|
4882
4861
|
...rest,
|
@@ -4897,7 +4876,7 @@ function Combobox({
|
|
4897
4876
|
},
|
4898
4877
|
state2
|
4899
4878
|
);
|
4900
|
-
return /* @__PURE__ */
|
4879
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(React69__namespace.default.Fragment, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
4901
4880
|
exports.Input,
|
4902
4881
|
{
|
4903
4882
|
...inputProps,
|
@@ -4921,7 +4900,7 @@ function Combobox({
|
|
4921
4900
|
paddingX,
|
4922
4901
|
paddingY,
|
4923
4902
|
leftIcon,
|
4924
|
-
rightIcon: isLoading ? /* @__PURE__ */
|
4903
|
+
rightIcon: isLoading ? /* @__PURE__ */ React69__namespace.default.createElement(
|
4925
4904
|
exports.ColorSpinner,
|
4926
4905
|
{
|
4927
4906
|
width: "1.5rem",
|
@@ -4936,7 +4915,7 @@ function Combobox({
|
|
4936
4915
|
}
|
4937
4916
|
) : rightIcon
|
4938
4917
|
}
|
4939
|
-
), state2.isOpen && !isLoading && /* @__PURE__ */
|
4918
|
+
), state2.isOpen && !isLoading && /* @__PURE__ */ React69__namespace.default.createElement(
|
4940
4919
|
Popover3,
|
4941
4920
|
{
|
4942
4921
|
state: state2,
|
@@ -4948,7 +4927,7 @@ function Combobox({
|
|
4948
4927
|
hasBackdrop: false,
|
4949
4928
|
containerPadding: 0
|
4950
4929
|
},
|
4951
|
-
/* @__PURE__ */
|
4930
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
4952
4931
|
ListBox,
|
4953
4932
|
{
|
4954
4933
|
...listBoxProps,
|
@@ -4967,8 +4946,8 @@ var init_Combobox = __esm({
|
|
4967
4946
|
init_src();
|
4968
4947
|
init_Popover();
|
4969
4948
|
useInputWidth = (inputRef) => {
|
4970
|
-
const [inputWidth, setInputWidth] =
|
4971
|
-
|
4949
|
+
const [inputWidth, setInputWidth] = React69.useState("auto");
|
4950
|
+
React69.useEffect(() => {
|
4972
4951
|
const onResize = debounce(() => {
|
4973
4952
|
if (inputRef.current) {
|
4974
4953
|
setInputWidth(`${inputRef.current.offsetWidth}px`);
|
@@ -4995,7 +4974,7 @@ exports.FormControl = void 0;
|
|
4995
4974
|
var init_FormControl = __esm({
|
4996
4975
|
"src/input/FormControl.tsx"() {
|
4997
4976
|
exports.FormControl = react.forwardRef((props, ref) => {
|
4998
|
-
return /* @__PURE__ */
|
4977
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.FormControl, { ...props, ref });
|
4999
4978
|
});
|
5000
4979
|
}
|
5001
4980
|
});
|
@@ -5016,7 +4995,7 @@ var init_FormErrorMessage = __esm({
|
|
5016
4995
|
return null;
|
5017
4996
|
}
|
5018
4997
|
const { ref, ...errorMessageProps } = formControlContext.getErrorMessageProps();
|
5019
|
-
return /* @__PURE__ */
|
4998
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { position: "relative", ref }, /* @__PURE__ */ React69__namespace.default.createElement(
|
5020
4999
|
react.Box,
|
5021
5000
|
{
|
5022
5001
|
borderRadius: "xs",
|
@@ -5034,12 +5013,12 @@ var init_FormErrorMessage = __esm({
|
|
5034
5013
|
...errorMessageProps,
|
5035
5014
|
...boxProps
|
5036
5015
|
},
|
5037
|
-
/* @__PURE__ */
|
5016
|
+
/* @__PURE__ */ React69__namespace.default.createElement(Arrow, { position: "absolute", top: "-0.25em", left: "1em" }),
|
5038
5017
|
children
|
5039
5018
|
));
|
5040
5019
|
};
|
5041
5020
|
Arrow = (props) => {
|
5042
|
-
return /* @__PURE__ */
|
5021
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
5043
5022
|
react.Box,
|
5044
5023
|
{
|
5045
5024
|
...props,
|
@@ -5050,7 +5029,7 @@ var init_FormErrorMessage = __esm({
|
|
5050
5029
|
fill: "none",
|
5051
5030
|
transform: "rotate(45deg)"
|
5052
5031
|
},
|
5053
|
-
/* @__PURE__ */
|
5032
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
5054
5033
|
react.Box,
|
5055
5034
|
{
|
5056
5035
|
as: "path",
|
@@ -5066,7 +5045,7 @@ exports.FormLabel = void 0;
|
|
5066
5045
|
var init_FormLabel = __esm({
|
5067
5046
|
"src/input/FormLabel.tsx"() {
|
5068
5047
|
exports.FormLabel = react.forwardRef((props, ref) => {
|
5069
|
-
return /* @__PURE__ */
|
5048
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.FormLabel, { ...props, ref });
|
5070
5049
|
});
|
5071
5050
|
}
|
5072
5051
|
});
|
@@ -5079,7 +5058,7 @@ function ListBox({
|
|
5079
5058
|
}) {
|
5080
5059
|
const { listBoxProps } = reactAria.useListBox(props, state2, listBoxRef);
|
5081
5060
|
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
5082
|
-
return /* @__PURE__ */
|
5061
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
5083
5062
|
react.List,
|
5084
5063
|
{
|
5085
5064
|
...listBoxProps,
|
@@ -5090,22 +5069,22 @@ function ListBox({
|
|
5090
5069
|
},
|
5091
5070
|
state2.collection.size === 0 && props.emptyContent,
|
5092
5071
|
Array.from(state2.collection).map(
|
5093
|
-
(item) => item.type === "section" ? /* @__PURE__ */
|
5072
|
+
(item) => item.type === "section" ? /* @__PURE__ */ React69__namespace.default.createElement(ListBoxSection, { key: item.key, section: item, state: state2 }) : /* @__PURE__ */ React69__namespace.default.createElement(Option, { key: item.key, item, state: state2 })
|
5094
5073
|
)
|
5095
5074
|
);
|
5096
5075
|
}
|
5097
5076
|
function ItemLabel({ children }) {
|
5098
5077
|
let { labelProps } = useOptionContext();
|
5099
5078
|
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
5100
|
-
return /* @__PURE__ */
|
5079
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...labelProps, sx: styles3.label }, children);
|
5101
5080
|
}
|
5102
5081
|
function ItemDescription({ children }) {
|
5103
5082
|
let { descriptionProps } = useOptionContext();
|
5104
5083
|
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
5105
|
-
return /* @__PURE__ */
|
5084
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...descriptionProps, sx: styles3.description }, children);
|
5106
5085
|
}
|
5107
5086
|
function Option({ item, state: state2 }) {
|
5108
|
-
const ref =
|
5087
|
+
const ref = React69.useRef(null);
|
5109
5088
|
const {
|
5110
5089
|
optionProps,
|
5111
5090
|
isSelected,
|
@@ -5125,7 +5104,7 @@ function Option({ item, state: state2 }) {
|
|
5125
5104
|
if (isFocused) {
|
5126
5105
|
dataFields["data-focus"] = true;
|
5127
5106
|
}
|
5128
|
-
|
5107
|
+
React69.useEffect(() => {
|
5129
5108
|
var _a6;
|
5130
5109
|
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
5131
5110
|
"touchend",
|
@@ -5135,7 +5114,7 @@ function Option({ item, state: state2 }) {
|
|
5135
5114
|
{ passive: false, once: true }
|
5136
5115
|
);
|
5137
5116
|
}, []);
|
5138
|
-
return /* @__PURE__ */
|
5117
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React69__namespace.default.createElement(react.ListItem, { ...optionProps, ...dataFields, ref, sx: styles3.item }, item.rendered));
|
5139
5118
|
}
|
5140
5119
|
function ListBoxSection({ section, state: state2 }) {
|
5141
5120
|
const { itemProps, headingProps, groupProps } = reactAria.useListBoxSection({
|
@@ -5144,7 +5123,7 @@ function ListBoxSection({ section, state: state2 }) {
|
|
5144
5123
|
});
|
5145
5124
|
const isFirstSection = section.key === state2.collection.getFirstKey();
|
5146
5125
|
const titleColor = react.useColorModeValue("darkGrey", "white");
|
5147
|
-
return /* @__PURE__ */
|
5126
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.ListItem, { ...itemProps }, section.rendered && /* @__PURE__ */ React69__namespace.default.createElement(
|
5148
5127
|
react.Box,
|
5149
5128
|
{
|
5150
5129
|
fontSize: "mobile.xs",
|
@@ -5157,19 +5136,19 @@ function ListBoxSection({ section, state: state2 }) {
|
|
5157
5136
|
...headingProps
|
5158
5137
|
},
|
5159
5138
|
section.rendered
|
5160
|
-
), /* @__PURE__ */
|
5161
|
-
(item) => /* @__PURE__ */
|
5139
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(react.List, { ...groupProps, padding: 0, listStyleType: "none" }, Array.from(state2.collection.getChildren(section.key)).map(
|
5140
|
+
(item) => /* @__PURE__ */ React69__namespace.default.createElement(Option, { key: item.key, item, state: state2 })
|
5162
5141
|
)));
|
5163
5142
|
}
|
5164
5143
|
var OptionContext, useOptionContext;
|
5165
5144
|
var init_ListBox = __esm({
|
5166
5145
|
"src/input/ListBox.tsx"() {
|
5167
|
-
OptionContext =
|
5146
|
+
OptionContext = React69__namespace.default.createContext({
|
5168
5147
|
labelProps: {},
|
5169
5148
|
descriptionProps: {}
|
5170
5149
|
});
|
5171
5150
|
useOptionContext = () => {
|
5172
|
-
return
|
5151
|
+
return React69.useContext(OptionContext);
|
5173
5152
|
};
|
5174
5153
|
}
|
5175
5154
|
});
|
@@ -5190,8 +5169,8 @@ function InfoSelect({
|
|
5190
5169
|
...props
|
5191
5170
|
};
|
5192
5171
|
const state2 = reactStately.useSelectState(renamedProps);
|
5193
|
-
const triggerRef =
|
5194
|
-
const listboxRef =
|
5172
|
+
const triggerRef = React69.useRef(null);
|
5173
|
+
const listboxRef = React69.useRef(null);
|
5195
5174
|
const { labelProps, triggerProps, valueProps, menuProps } = reactAria.useSelect(
|
5196
5175
|
renamedProps,
|
5197
5176
|
state2,
|
@@ -5204,7 +5183,7 @@ function InfoSelect({
|
|
5204
5183
|
const { buttonProps } = reactAria.useButton(triggerProps, triggerRef);
|
5205
5184
|
const { t: t2 } = useTranslation();
|
5206
5185
|
const formControl = react.useFormControlProps(props);
|
5207
|
-
return /* @__PURE__ */
|
5186
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { sx: styles3.container }, /* @__PURE__ */ React69__namespace.default.createElement(react.chakra.div, { ...labelProps, sx: styles3.label }, props.label), /* @__PURE__ */ React69__namespace.default.createElement(
|
5208
5187
|
reactAria.HiddenSelect,
|
5209
5188
|
{
|
5210
5189
|
state: state2,
|
@@ -5212,7 +5191,7 @@ function InfoSelect({
|
|
5212
5191
|
label: props.label,
|
5213
5192
|
name: props.name
|
5214
5193
|
}
|
5215
|
-
), /* @__PURE__ */
|
5194
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
5216
5195
|
react.chakra.button,
|
5217
5196
|
{
|
5218
5197
|
type: "button",
|
@@ -5225,16 +5204,16 @@ function InfoSelect({
|
|
5225
5204
|
"aria-invalid": formControl.isInvalid,
|
5226
5205
|
"aria-describedby": formControl["aria-describedby"]
|
5227
5206
|
},
|
5228
|
-
/* @__PURE__ */
|
5229
|
-
/* @__PURE__ */
|
5230
|
-
), state2.isOpen && /* @__PURE__ */
|
5207
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...valueProps }, state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)),
|
5208
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.Box, { sx: styles3.arrowIcon }, state2.isOpen ? /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.DropdownUpFill24Icon, null) : /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.DropdownDownFill24Icon, null))
|
5209
|
+
), state2.isOpen && /* @__PURE__ */ React69__namespace.default.createElement(
|
5231
5210
|
Popover3,
|
5232
5211
|
{
|
5233
5212
|
state: state2,
|
5234
5213
|
triggerRef,
|
5235
5214
|
containerPadding: 0
|
5236
5215
|
},
|
5237
|
-
/* @__PURE__ */
|
5216
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
5238
5217
|
ListBox,
|
5239
5218
|
{
|
5240
5219
|
...menuProps,
|
@@ -5268,9 +5247,9 @@ var init_Input = __esm({
|
|
5268
5247
|
exports.Input = react.forwardRef(
|
5269
5248
|
({ label, leftIcon, rightIcon, id, size: size2, ...props }, ref) => {
|
5270
5249
|
const formControlProps = react.useFormControlContext();
|
5271
|
-
const fallbackId = `input-${
|
5250
|
+
const fallbackId = `input-${React69.useId()}`;
|
5272
5251
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
5273
|
-
return /* @__PURE__ */
|
5252
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React69__namespace.default.createElement(react.InputLeftElement, { pointerEvents: "none" }, leftIcon), /* @__PURE__ */ React69__namespace.default.createElement(
|
5274
5253
|
react.Input,
|
5275
5254
|
{
|
5276
5255
|
"data-attachable": true,
|
@@ -5281,7 +5260,7 @@ var init_Input = __esm({
|
|
5281
5260
|
ref,
|
5282
5261
|
placeholder: " "
|
5283
5262
|
}
|
5284
|
-
), /* @__PURE__ */
|
5263
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(react.FormLabel, { htmlFor: inputId }, label), rightIcon && /* @__PURE__ */ React69__namespace.default.createElement(react.InputRightElement, { pointerEvents: "none" }, rightIcon));
|
5285
5264
|
}
|
5286
5265
|
);
|
5287
5266
|
}
|
@@ -5290,10 +5269,10 @@ exports.InputLeftElement = void 0; exports.InputRightElement = void 0;
|
|
5290
5269
|
var init_InputElement = __esm({
|
5291
5270
|
"src/input/InputElement.tsx"() {
|
5292
5271
|
exports.InputLeftElement = react.forwardRef(
|
5293
|
-
(props, ref) => /* @__PURE__ */
|
5272
|
+
(props, ref) => /* @__PURE__ */ React69__namespace.default.createElement(react.InputLeftElement, { ...props, ref })
|
5294
5273
|
);
|
5295
5274
|
exports.InputRightElement = react.forwardRef(
|
5296
|
-
(props, ref) => /* @__PURE__ */
|
5275
|
+
(props, ref) => /* @__PURE__ */ React69__namespace.default.createElement(react.InputRightElement, { ...props, ref })
|
5297
5276
|
);
|
5298
5277
|
}
|
5299
5278
|
});
|
@@ -5304,7 +5283,7 @@ var init_NativeSelect = __esm({
|
|
5304
5283
|
exports.NativeSelect = react.forwardRef(
|
5305
5284
|
({ label, ...props }, ref) => {
|
5306
5285
|
const styles3 = react.useMultiStyleConfig("Select", props);
|
5307
|
-
return /* @__PURE__ */
|
5286
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(exports.FormControl, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
5308
5287
|
react.Select,
|
5309
5288
|
{
|
5310
5289
|
"data-attachable": true,
|
@@ -5312,7 +5291,7 @@ var init_NativeSelect = __esm({
|
|
5312
5291
|
rootProps: { __css: styles3.root },
|
5313
5292
|
ref
|
5314
5293
|
}
|
5315
|
-
), label && /* @__PURE__ */
|
5294
|
+
), label && /* @__PURE__ */ React69__namespace.default.createElement(exports.FormLabel, null, label));
|
5316
5295
|
}
|
5317
5296
|
);
|
5318
5297
|
}
|
@@ -5396,6 +5375,8 @@ function NumericStepper({
|
|
5396
5375
|
maxValue = 99,
|
5397
5376
|
isDisabled,
|
5398
5377
|
withInput = true,
|
5378
|
+
stepSize = 1,
|
5379
|
+
showZero = false,
|
5399
5380
|
...boxProps
|
5400
5381
|
}) {
|
5401
5382
|
const { t: t2 } = useTranslation();
|
@@ -5408,16 +5389,18 @@ function NumericStepper({
|
|
5408
5389
|
const textColor = react.useColorModeValue("darkGrey", "white");
|
5409
5390
|
const backgroundColor = react.useColorModeValue("white", "darkGrey");
|
5410
5391
|
const focusColor = react.useColorModeValue("greenHaze", "azure");
|
5411
|
-
|
5392
|
+
const clampedStepSize = Math.max(Math.min(stepSize, 10), 1);
|
5393
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Flex, { alignItems: "center", ...boxProps }, /* @__PURE__ */ React69__namespace.default.createElement(
|
5412
5394
|
VerySmallButton,
|
5413
5395
|
{
|
5414
|
-
icon: /* @__PURE__ */
|
5415
|
-
"aria-label": t2(texts12.decrementButtonAriaLabel),
|
5416
|
-
onClick: () => onChange(value -
|
5396
|
+
icon: /* @__PURE__ */ React69__namespace.default.createElement(SubtractIcon, { color: "white", stepLabel: clampedStepSize }),
|
5397
|
+
"aria-label": t2(texts12.decrementButtonAriaLabel(clampedStepSize)),
|
5398
|
+
onClick: () => onChange(Math.max(value - clampedStepSize, minValue)),
|
5417
5399
|
visibility: value <= minValue ? "hidden" : "visible",
|
5418
|
-
isDisabled: formControlProps.disabled
|
5400
|
+
isDisabled: formControlProps.disabled,
|
5401
|
+
id: value <= minValue ? void 0 : formControlProps.id
|
5419
5402
|
}
|
5420
|
-
), withInput ? /* @__PURE__ */
|
5403
|
+
), withInput ? /* @__PURE__ */ React69__namespace.default.createElement(
|
5421
5404
|
react.chakra.input,
|
5422
5405
|
{
|
5423
5406
|
type: "number",
|
@@ -5426,10 +5409,10 @@ function NumericStepper({
|
|
5426
5409
|
name: nameProp,
|
5427
5410
|
value,
|
5428
5411
|
...formControlProps,
|
5429
|
-
id: value
|
5412
|
+
id: !showZero && value === 0 ? void 0 : formControlProps.id,
|
5430
5413
|
fontSize: "sm",
|
5431
5414
|
fontWeight: "bold",
|
5432
|
-
width:
|
5415
|
+
width: `${Math.max(value.toString().length + 1, 3)}ch`,
|
5433
5416
|
marginX: 1,
|
5434
5417
|
paddingX: 1,
|
5435
5418
|
borderRadius: "xs",
|
@@ -5437,7 +5420,7 @@ function NumericStepper({
|
|
5437
5420
|
backgroundColor,
|
5438
5421
|
color: textColor,
|
5439
5422
|
transition: "box-shadow .1s ease-out",
|
5440
|
-
visibility: value === 0 ? "hidden" : "visible",
|
5423
|
+
visibility: !showZero && value === 0 ? "hidden" : "visible",
|
5441
5424
|
"aria-live": "assertive",
|
5442
5425
|
"aria-label": value.toString(),
|
5443
5426
|
_hover: {
|
@@ -5464,10 +5447,10 @@ function NumericStepper({
|
|
5464
5447
|
if (Number.isNaN(numericInput)) {
|
5465
5448
|
return;
|
5466
5449
|
}
|
5467
|
-
onChange(numericInput);
|
5450
|
+
onChange(Math.max(Math.min(numericInput, maxValue), minValue));
|
5468
5451
|
}
|
5469
5452
|
}
|
5470
|
-
) : /* @__PURE__ */
|
5453
|
+
) : /* @__PURE__ */ React69__namespace.default.createElement(
|
5471
5454
|
react.chakra.text,
|
5472
5455
|
{
|
5473
5456
|
fontSize: "sm",
|
@@ -5478,19 +5461,19 @@ function NumericStepper({
|
|
5478
5461
|
textAlign: "center",
|
5479
5462
|
color: textColor,
|
5480
5463
|
transition: "box-shadow .1s ease-out",
|
5481
|
-
visibility: value === 0 ? "hidden" : "visible",
|
5464
|
+
visibility: !showZero && value === 0 ? "hidden" : "visible",
|
5482
5465
|
"aria-label": value.toString()
|
5483
5466
|
},
|
5484
5467
|
value
|
5485
|
-
), /* @__PURE__ */
|
5468
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
5486
5469
|
VerySmallButton,
|
5487
5470
|
{
|
5488
|
-
icon: /* @__PURE__ */
|
5489
|
-
"aria-label": t2(texts12.incrementButtonAriaLabel),
|
5490
|
-
onClick: () => onChange(value +
|
5471
|
+
icon: /* @__PURE__ */ React69__namespace.default.createElement(AddIcon, { color: "white", stepLabel: clampedStepSize }),
|
5472
|
+
"aria-label": t2(texts12.incrementButtonAriaLabel(clampedStepSize)),
|
5473
|
+
onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
|
5491
5474
|
visibility: value >= maxValue ? "hidden" : "visible",
|
5492
5475
|
isDisabled: formControlProps.disabled,
|
5493
|
-
id: value
|
5476
|
+
id: value >= maxValue ? void 0 : formControlProps.id
|
5494
5477
|
}
|
5495
5478
|
));
|
5496
5479
|
}
|
@@ -5501,7 +5484,7 @@ var init_NumericStepper = __esm({
|
|
5501
5484
|
init_box_shadow_utils();
|
5502
5485
|
init_focus_utils();
|
5503
5486
|
VerySmallButton = (props) => {
|
5504
|
-
return /* @__PURE__ */
|
5487
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
5505
5488
|
exports.IconButton,
|
5506
5489
|
{
|
5507
5490
|
variant: "primary",
|
@@ -5518,7 +5501,7 @@ var init_NumericStepper = __esm({
|
|
5518
5501
|
}
|
5519
5502
|
);
|
5520
5503
|
};
|
5521
|
-
SubtractIcon = (props) => /* @__PURE__ */
|
5504
|
+
SubtractIcon = (props) => /* @__PURE__ */ React69__namespace.default.createElement(React69__namespace.default.Fragment, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
5522
5505
|
react.Box,
|
5523
5506
|
{
|
5524
5507
|
as: "svg",
|
@@ -5528,7 +5511,7 @@ var init_NumericStepper = __esm({
|
|
5528
5511
|
stroke: "currentColor",
|
5529
5512
|
...props
|
5530
5513
|
},
|
5531
|
-
/* @__PURE__ */
|
5514
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
5532
5515
|
"line",
|
5533
5516
|
{
|
5534
5517
|
x1: "9",
|
@@ -5539,8 +5522,8 @@ var init_NumericStepper = __esm({
|
|
5539
5522
|
strokeLinecap: "round"
|
5540
5523
|
}
|
5541
5524
|
)
|
5542
|
-
);
|
5543
|
-
AddIcon = (props) => /* @__PURE__ */
|
5525
|
+
), props.stepLabel > 1 && /* @__PURE__ */ React69__namespace.default.createElement(react.chakra.span, { paddingRight: "1" }, props.stepLabel.toString()));
|
5526
|
+
AddIcon = (props) => /* @__PURE__ */ React69__namespace.default.createElement(React69__namespace.default.Fragment, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
5544
5527
|
react.Box,
|
5545
5528
|
{
|
5546
5529
|
as: "svg",
|
@@ -5550,7 +5533,7 @@ var init_NumericStepper = __esm({
|
|
5550
5533
|
stroke: "currentColor",
|
5551
5534
|
...props
|
5552
5535
|
},
|
5553
|
-
/* @__PURE__ */
|
5536
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
5554
5537
|
"line",
|
5555
5538
|
{
|
5556
5539
|
x1: "9",
|
@@ -5561,7 +5544,7 @@ var init_NumericStepper = __esm({
|
|
5561
5544
|
strokeLinecap: "round"
|
5562
5545
|
}
|
5563
5546
|
),
|
5564
|
-
/* @__PURE__ */
|
5547
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
5565
5548
|
"line",
|
5566
5549
|
{
|
5567
5550
|
x1: "15",
|
@@ -5572,19 +5555,23 @@ var init_NumericStepper = __esm({
|
|
5572
5555
|
strokeLinecap: "round"
|
5573
5556
|
}
|
5574
5557
|
)
|
5575
|
-
);
|
5558
|
+
), props.stepLabel > 1 && /* @__PURE__ */ React69__namespace.default.createElement(react.chakra.span, { paddingRight: "1" }, props.stepLabel.toString()));
|
5576
5559
|
texts12 = createTexts({
|
5577
|
-
decrementButtonAriaLabel
|
5578
|
-
|
5579
|
-
|
5580
|
-
|
5581
|
-
|
5582
|
-
|
5583
|
-
|
5584
|
-
|
5585
|
-
|
5586
|
-
|
5587
|
-
|
5560
|
+
decrementButtonAriaLabel(stepSize) {
|
5561
|
+
return {
|
5562
|
+
nb: `Trekk fra ${stepSize}`,
|
5563
|
+
en: `Subtract ${stepSize}`,
|
5564
|
+
nn: `Trekk fr\xE5 ${stepSize}`,
|
5565
|
+
sv: `Subtrahera ${stepSize}`
|
5566
|
+
};
|
5567
|
+
},
|
5568
|
+
incrementButtonAriaLabel(stepSize) {
|
5569
|
+
return {
|
5570
|
+
nb: `Legg til ${stepSize}`,
|
5571
|
+
en: `Add ${stepSize}`,
|
5572
|
+
nn: `Legg til ${stepSize}`,
|
5573
|
+
sv: `L\xE4gg till ${stepSize}`
|
5574
|
+
};
|
5588
5575
|
}
|
5589
5576
|
});
|
5590
5577
|
}
|
@@ -5599,9 +5586,9 @@ var init_PasswordInput = __esm({
|
|
5599
5586
|
const { isOpen: isShowingPassword, onToggle } = react.useDisclosure();
|
5600
5587
|
const { t: t2 } = useTranslation();
|
5601
5588
|
const formControlProps = react.useFormControlContext();
|
5602
|
-
const autoGeneratedId = `password-input-${
|
5589
|
+
const autoGeneratedId = `password-input-${React69.useId()}`;
|
5603
5590
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
5604
|
-
return /* @__PURE__ */
|
5591
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React69__namespace.default.createElement(exports.InputLeftElement, null, leftIcon), /* @__PURE__ */ React69__namespace.default.createElement(
|
5605
5592
|
react.Input,
|
5606
5593
|
{
|
5607
5594
|
...props,
|
@@ -5613,7 +5600,7 @@ var init_PasswordInput = __esm({
|
|
5613
5600
|
ref,
|
5614
5601
|
"data-attachable": true
|
5615
5602
|
}
|
5616
|
-
), /* @__PURE__ */
|
5603
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(exports.FormLabel, { htmlFor: inputId, pointerEvents: "none" }, label), /* @__PURE__ */ React69__namespace.default.createElement(exports.InputRightElement, { width: "fit-content" }, /* @__PURE__ */ React69__namespace.default.createElement(
|
5617
5604
|
react.Button,
|
5618
5605
|
{
|
5619
5606
|
variant: "ghost",
|
@@ -5667,7 +5654,7 @@ var init_CountryCodeSelect = __esm({
|
|
5667
5654
|
callingCodes = [...prioritizedCountryCodes, ...sortedCallingCodes];
|
5668
5655
|
CountryCodeSelect = (props) => {
|
5669
5656
|
const { t: t2 } = useTranslation();
|
5670
|
-
return /* @__PURE__ */
|
5657
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
5671
5658
|
InfoSelect,
|
5672
5659
|
{
|
5673
5660
|
label: t2(texts14.countryCode),
|
@@ -5675,7 +5662,7 @@ var init_CountryCodeSelect = __esm({
|
|
5675
5662
|
items: callingCodes,
|
5676
5663
|
...props
|
5677
5664
|
},
|
5678
|
-
(item) => /* @__PURE__ */
|
5665
|
+
(item) => /* @__PURE__ */ React69__namespace.default.createElement(reactStately.Item, { key: item.key }, item.key)
|
5679
5666
|
);
|
5680
5667
|
};
|
5681
5668
|
CountryCodeSelect_default = CountryCodeSelect;
|
@@ -5705,10 +5692,10 @@ var init_PhoneNumberInput = __esm({
|
|
5705
5692
|
nationalNumber: ""
|
5706
5693
|
}
|
5707
5694
|
});
|
5708
|
-
return /* @__PURE__ */
|
5709
|
-
|
5695
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(exports.AttachedInputs, { ...boxProps }, /* @__PURE__ */ React69__namespace.default.createElement(
|
5696
|
+
React69.Suspense,
|
5710
5697
|
{
|
5711
|
-
fallback: /* @__PURE__ */
|
5698
|
+
fallback: /* @__PURE__ */ React69__namespace.default.createElement(
|
5712
5699
|
InfoSelect,
|
5713
5700
|
{
|
5714
5701
|
isLabelSrOnly: true,
|
@@ -5717,10 +5704,10 @@ var init_PhoneNumberInput = __esm({
|
|
5717
5704
|
height: "100%",
|
5718
5705
|
value: "+47"
|
5719
5706
|
},
|
5720
|
-
/* @__PURE__ */
|
5707
|
+
/* @__PURE__ */ React69__namespace.default.createElement(reactStately.Item, { key: "+47" }, "+47")
|
5721
5708
|
)
|
5722
5709
|
},
|
5723
|
-
/* @__PURE__ */
|
5710
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
5724
5711
|
LazyCountryCodeSelect,
|
5725
5712
|
{
|
5726
5713
|
value: value.countryCode,
|
@@ -5733,7 +5720,7 @@ var init_PhoneNumberInput = __esm({
|
|
5733
5720
|
width: "6.25rem"
|
5734
5721
|
}
|
5735
5722
|
)
|
5736
|
-
), /* @__PURE__ */
|
5723
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
5737
5724
|
exports.Input,
|
5738
5725
|
{
|
5739
5726
|
ref,
|
@@ -5762,14 +5749,14 @@ var init_PhoneNumberInput = __esm({
|
|
5762
5749
|
sv: "Telefonnummer"
|
5763
5750
|
}
|
5764
5751
|
});
|
5765
|
-
LazyCountryCodeSelect =
|
5752
|
+
LazyCountryCodeSelect = React69__namespace.default.lazy(() => Promise.resolve().then(() => (init_CountryCodeSelect(), CountryCodeSelect_exports)));
|
5766
5753
|
}
|
5767
5754
|
});
|
5768
5755
|
exports.Radio = void 0;
|
5769
5756
|
var init_Radio = __esm({
|
5770
5757
|
"src/input/Radio.tsx"() {
|
5771
5758
|
exports.Radio = react.forwardRef((props, ref) => {
|
5772
|
-
return /* @__PURE__ */
|
5759
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Radio, { ...props, ref });
|
5773
5760
|
});
|
5774
5761
|
}
|
5775
5762
|
});
|
@@ -5778,7 +5765,7 @@ var init_RadioGroup = __esm({
|
|
5778
5765
|
"src/input/RadioGroup.tsx"() {
|
5779
5766
|
exports.RadioGroup = react.forwardRef(
|
5780
5767
|
({ children, direction: direction2 = "row", ...rest }, ref) => {
|
5781
|
-
return /* @__PURE__ */
|
5768
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.RadioGroup, { ...rest, ref }, /* @__PURE__ */ React69__namespace.default.createElement(react.Stack, { direction: direction2 }, children));
|
5782
5769
|
}
|
5783
5770
|
);
|
5784
5771
|
}
|
@@ -5793,9 +5780,9 @@ var init_SearchInput = __esm({
|
|
5793
5780
|
const { t: t2 } = useTranslation();
|
5794
5781
|
const showClearButton = onReset && Boolean(props.value);
|
5795
5782
|
const formControlProps = react.useFormControlContext();
|
5796
|
-
const autoGeneratedId =
|
5783
|
+
const autoGeneratedId = React69.useId();
|
5797
5784
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
5798
|
-
return /* @__PURE__ */
|
5785
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.InputGroup, { position: "relative" }, /* @__PURE__ */ React69__namespace.default.createElement(exports.InputLeftElement, null, /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.SearchOutline24Icon, null)), /* @__PURE__ */ React69__namespace.default.createElement(
|
5799
5786
|
react.Input,
|
5800
5787
|
{
|
5801
5788
|
paddingLeft: 7,
|
@@ -5812,7 +5799,7 @@ var init_SearchInput = __esm({
|
|
5812
5799
|
placeholder: " ",
|
5813
5800
|
"data-attachable": true
|
5814
5801
|
}
|
5815
|
-
), /* @__PURE__ */
|
5802
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(exports.FormLabel, { htmlFor: inputId, pointerEvents: "none" }, label ?? t2(texts16.label)), showClearButton && /* @__PURE__ */ React69__namespace.default.createElement(exports.InputRightElement, { width: "fit-content" }, /* @__PURE__ */ React69__namespace.default.createElement(
|
5816
5803
|
react.IconButton,
|
5817
5804
|
{
|
5818
5805
|
variant: "ghost",
|
@@ -5820,7 +5807,7 @@ var init_SearchInput = __esm({
|
|
5820
5807
|
size: "sm",
|
5821
5808
|
marginRight: 1,
|
5822
5809
|
"aria-label": t2(texts16.reset),
|
5823
|
-
icon: /* @__PURE__ */
|
5810
|
+
icon: /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.CloseOutline24Icon, null),
|
5824
5811
|
onClick: onReset
|
5825
5812
|
}
|
5826
5813
|
)));
|
@@ -5847,7 +5834,7 @@ var init_Switch = __esm({
|
|
5847
5834
|
"src/input/Switch.tsx"() {
|
5848
5835
|
exports.Switch = react.forwardRef(
|
5849
5836
|
({ size: size2 = "md", ...props }, ref) => {
|
5850
|
-
return /* @__PURE__ */
|
5837
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Switch, { variant: "solid", size: size2, ...props, ref });
|
5851
5838
|
}
|
5852
5839
|
);
|
5853
5840
|
}
|
@@ -5919,9 +5906,9 @@ var init_Textarea = __esm({
|
|
5919
5906
|
remainingProps: { label, ...rest }
|
5920
5907
|
} = getSpacingProps(props);
|
5921
5908
|
const formControlProps = react.useFormControlContext();
|
5922
|
-
const fallbackId = `textarea-${
|
5909
|
+
const fallbackId = `textarea-${React69.useId()}`;
|
5923
5910
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
5924
|
-
return /* @__PURE__ */
|
5911
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.InputGroup, { position: "relative", ...spacingProps }, /* @__PURE__ */ React69__namespace.default.createElement(react.Textarea, { ...rest, id: inputId, ref, placeholder: " " }), label && /* @__PURE__ */ React69__namespace.default.createElement(react.FormLabel, { htmlFor: inputId, id: `${inputId}-label` }, label));
|
5925
5912
|
});
|
5926
5913
|
}
|
5927
5914
|
});
|
@@ -6017,7 +6004,7 @@ var init_LineIcon = __esm({
|
|
6017
6004
|
if (!Icon) {
|
6018
6005
|
return null;
|
6019
6006
|
}
|
6020
|
-
return /* @__PURE__ */
|
6007
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { sx: { ...styles3.iconContainer, ...sx }, ...rest }, /* @__PURE__ */ React69__namespace.default.createElement(Icon, { sx: styles3.icon }));
|
6021
6008
|
};
|
6022
6009
|
}
|
6023
6010
|
});
|
@@ -6032,7 +6019,7 @@ var init_InfoTag = __esm({
|
|
6032
6019
|
description
|
6033
6020
|
}) => {
|
6034
6021
|
const styles3 = react.useMultiStyleConfig("InfoTag", { variant, size: size2 });
|
6035
|
-
return /* @__PURE__ */
|
6022
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { sx: styles3.container }, /* @__PURE__ */ React69__namespace.default.createElement(exports.LineIcon, { variant, size: size2, sx: styles3.iconContainer }), /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { sx: styles3.textContainer }, title && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: "span", sx: styles3.title }, title), title && description && " ", description && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: "span", sx: styles3.description }, description)));
|
6036
6023
|
};
|
6037
6024
|
}
|
6038
6025
|
});
|
@@ -6056,7 +6043,7 @@ var init_TravelTag = __esm({
|
|
6056
6043
|
deviationLevel
|
6057
6044
|
});
|
6058
6045
|
const DeviationLevelIcon = getDeviationLevelIcon({ deviationLevel, size: size2 });
|
6059
|
-
return /* @__PURE__ */
|
6046
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { sx: styles3.container, "aria-disabled": isDisabled, ref, ...rest }, /* @__PURE__ */ React69__namespace.default.createElement(exports.LineIcon, { variant, size: size2, sx: styles3.iconContainer }), /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { sx: styles3.textContainer }, title && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: "span", sx: styles3.title }, title), title && description && " ", description && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: "span", sx: styles3.description }, description)), DeviationLevelIcon && /* @__PURE__ */ React69__namespace.default.createElement(DeviationLevelIcon, { sx: styles3.deviationIcon }));
|
6060
6047
|
}
|
6061
6048
|
);
|
6062
6049
|
getDeviationLevelIcon = ({
|
@@ -6095,7 +6082,7 @@ var init_TextLink = __esm({
|
|
6095
6082
|
var _a6;
|
6096
6083
|
const { t: t2 } = useTranslation();
|
6097
6084
|
const isExternal = props.isExternal !== void 0 ? props.isExternal : Boolean((_a6 = props.href) == null ? void 0 : _a6.match(/^https?:\/\//));
|
6098
|
-
return /* @__PURE__ */
|
6085
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Link, { ...props, ref, isExternal }, children, isExternal && /* @__PURE__ */ React69__namespace.default.createElement(
|
6099
6086
|
sporIconReact.LinkOutOutline24Icon,
|
6100
6087
|
{
|
6101
6088
|
marginLeft: 0.5,
|
@@ -6131,8 +6118,8 @@ var init_VyLogo = __esm({
|
|
6131
6118
|
exports.VyLogo = ({ colorScheme, ...boxProps }) => {
|
6132
6119
|
const mainColor = colorScheme === "light" ? "#1d211c" : "#ffffff";
|
6133
6120
|
const accentColor = colorScheme === "light" ? "#138c6e" : "#ffffff";
|
6134
|
-
const id =
|
6135
|
-
return /* @__PURE__ */
|
6121
|
+
const id = React69.useId();
|
6122
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: "svg", viewBox: "0 0 107 54", ...boxProps }, /* @__PURE__ */ React69__namespace.default.createElement("title", null, "Vy logo"), /* @__PURE__ */ React69__namespace.default.createElement(
|
6136
6123
|
"path",
|
6137
6124
|
{
|
6138
6125
|
fillRule: "evenodd",
|
@@ -6140,7 +6127,7 @@ var init_VyLogo = __esm({
|
|
6140
6127
|
d: "M79.97 33.44a.04.04 0 0 0 0-.08 5.76 5.76 0 0 1-2.32-.85c-1.56-1-2.79-2.9-3.83-6.07L68.14 7.16c-1.18-4.04-3.42-5.85-5.48-6.6a8.36 8.36 0 0 0-2.88-.52h-1.44a.04.04 0 0 0 0 .08c.57.09 1.18.24 1.8.5 1.92.8 3.92 2.63 5.06 6.54l5.61 19.07c1.06 3.3 2.31 5.27 3.92 6.3 1.01.64 2.17.9 3.5.9h1.74Z",
|
6141
6128
|
fill: mainColor
|
6142
6129
|
}
|
6143
|
-
), /* @__PURE__ */
|
6130
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
6144
6131
|
"mask",
|
6145
6132
|
{
|
6146
6133
|
id: `${id}-a`,
|
@@ -6151,7 +6138,7 @@ var init_VyLogo = __esm({
|
|
6151
6138
|
width: "94",
|
6152
6139
|
height: "54"
|
6153
6140
|
},
|
6154
|
-
/* @__PURE__ */
|
6141
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
6155
6142
|
"path",
|
6156
6143
|
{
|
6157
6144
|
fillRule: "evenodd",
|
@@ -6160,7 +6147,7 @@ var init_VyLogo = __esm({
|
|
6160
6147
|
fill: mainColor
|
6161
6148
|
}
|
6162
6149
|
)
|
6163
|
-
), /* @__PURE__ */
|
6150
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
6164
6151
|
"g",
|
6165
6152
|
{
|
6166
6153
|
mask: `url(#${id}-a)`,
|
@@ -6168,9 +6155,9 @@ var init_VyLogo = __esm({
|
|
6168
6155
|
clipRule: "evenodd",
|
6169
6156
|
fill: mainColor
|
6170
6157
|
},
|
6171
|
-
/* @__PURE__ */
|
6172
|
-
/* @__PURE__ */
|
6173
|
-
), /* @__PURE__ */
|
6158
|
+
/* @__PURE__ */ React69__namespace.default.createElement("path", { d: "M84.57 33.44a.04.04 0 0 0 .01-.08c-2.34-.3-3.85-3.59-4.68-6.38-.88-2.93-4.04-13.63-5.92-19.82C72.08.94 66.2.05 63.54.04a.04.04 0 0 0-.01.08c2.49.34 6.02 1.85 7.55 7.04 1.34 4.55 5.6 19.03 5.76 19.51 1.02 3.03 2.22 4.85 3.73 5.83a6.3 6.3 0 0 0 3.54.94h.46ZM23.28 53.68h-.72c-2.12 0-4.68-1.08-6.09-6.04L3.8 4.37C3.04 1.77 1.93.47.03.15A.04.04 0 0 1 .04.07h1.9c2.54 0 3.92 1.27 4.8 4.3 0 0 11.72 39.78 12.79 43.54.78 2.78 1.7 4.67 3.13 5.43.23.13.42.2.62.26a.04.04 0 0 1 0 .08ZM18.99 5.99C17.77 1.79 15.87.04 12.37.04h-1.71a.04.04 0 0 0 0 .08c2.73.39 4.32 2.19 5.39 5.87 0 0 10.49 35.72 11.85 40.4l1.44-4.87L18.99 6Z" }),
|
6159
|
+
/* @__PURE__ */ React69__namespace.default.createElement("path", { d: "M24.26 53.68h1.24c1.57 0 2.69-.41 3.52-1.1 1.37-1.1 1.99-2.93 2.56-4.86.09-.29 11.2-37.95 11.59-39.42 1.32-4.97 4.27-7.13 7.43-7.9a12.2 12.2 0 0 1 1.58-.28.04.04 0 0 0 0-.08h-1.4c-4.15 0-8.8 1.65-10.56 8.26-.63 2.38-11.5 39.13-11.58 39.42-.57 1.93-1.23 3.96-2.59 5.07-.56.45-1.06.7-1.8.81a.04.04 0 0 0 0 .08ZM81.3 27.76l6.53-21.78C88.89 2.3 90.49.5 93.23.11a.04.04 0 0 0-.01-.08H91.5c-3.5 0-5.4 1.76-6.62 5.95l-5.05 16.97s1.33 4.46 1.46 4.8Z" })
|
6160
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
6174
6161
|
"path",
|
6175
6162
|
{
|
6176
6163
|
fillRule: "evenodd",
|
@@ -6178,7 +6165,7 @@ var init_VyLogo = __esm({
|
|
6178
6165
|
d: "M98.49.07h-1.82c-2.98 0-4.6 1.49-5.63 5.06l-6.52 21.79a18.22 18.22 0 0 1-1.67 3.96c.57.78 1.17 1.26 1.76 1.38 1.13-.96 2.06-2.75 2.89-5.46l6.49-21.67c.9-3.1 2.23-4.63 4.5-4.98a.04.04 0 0 0 0-.08Z",
|
6179
6166
|
fill: accentColor
|
6180
6167
|
}
|
6181
|
-
), /* @__PURE__ */
|
6168
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
6182
6169
|
"path",
|
6183
6170
|
{
|
6184
6171
|
fillRule: "evenodd",
|
@@ -6186,7 +6173,7 @@ var init_VyLogo = __esm({
|
|
6186
6173
|
d: "M85.25 34.53h-2.93L78.58 46.9c-1.82 6.1 1.05 6.73 2.15 6.73h2.31a.04.04 0 0 0 .01-.09c-1.25-.3-2.96-1.6-1.45-6.64l3.65-12.37ZM102.35.11c.02 0 .03-.02.03-.04a.04.04 0 0 0-.04-.04h-.4c-2.54 0-3.92 1.27-4.8 4.3 0 0-5 16.82-6.57 22.03-1.57 5.2-2.65 6.6-4.78 6.97l-.11.03a.04.04 0 0 0 0 .08h1.45c3.72 0 5.1-2.48 6.41-6.84l7.5-25.07c.19-.6.7-1.23 1.31-1.42Z",
|
6187
6174
|
fill: mainColor
|
6188
6175
|
}
|
6189
|
-
), /* @__PURE__ */
|
6176
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
6190
6177
|
"mask",
|
6191
6178
|
{
|
6192
6179
|
id: `${id}-b`,
|
@@ -6197,7 +6184,7 @@ var init_VyLogo = __esm({
|
|
6197
6184
|
width: "78",
|
6198
6185
|
height: "54"
|
6199
6186
|
},
|
6200
|
-
/* @__PURE__ */
|
6187
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
6201
6188
|
"path",
|
6202
6189
|
{
|
6203
6190
|
fillRule: "evenodd",
|
@@ -6206,25 +6193,25 @@ var init_VyLogo = __esm({
|
|
6206
6193
|
fill: mainColor
|
6207
6194
|
}
|
6208
6195
|
)
|
6209
|
-
), /* @__PURE__ */
|
6196
|
+
), /* @__PURE__ */ React69__namespace.default.createElement("g", { mask: `url(#${id}-b)`, fillRule: "evenodd", clipRule: "evenodd" }, /* @__PURE__ */ React69__namespace.default.createElement(
|
6210
6197
|
"path",
|
6211
6198
|
{
|
6212
6199
|
d: "m88.2 34.45-3.96 13.46c-1.54 5.18.9 5.72 1.83 5.72h2.26a.04.04 0 0 0 0-.09c-1.05-.27-2.44-1.4-1.18-5.63l4.43-15.02c-.7.71-1.88 1.37-3.38 1.56ZM93.71 53.63c.02 0 .04-.02.04-.05a.04.04 0 0 0-.03-.04c-.9-.25-2.02-1.24-.96-4.77 0 0 12.4-42.2 13.08-44.6a3.1 3.1 0 0 0-2.47-4.1c-.02 0-.06-.02-.07.01-.01.04.03.06.04.06.3.16.63.52.45 1.14L89.84 48.77c-1.32 4.4.76 4.86 1.55 4.86h2.32ZM74.1 33.44a.04.04 0 0 0 0-.08 5.77 5.77 0 0 1-2.3-.83c-1.64-1.04-2.9-3.06-3.98-6.5-.1-.29-5.37-18.25-5.55-18.87-1.12-3.8-2.91-5.63-4.68-6.46a7.06 7.06 0 0 0-3.04-.66H53a.04.04 0 0 0-.02.08c.3.05 4.32.17 6.35 7.04 2.03 6.86 4.46 15.07 5.28 17.97 1.77 6.26 4.07 8.3 7.75 8.3h1.73Z",
|
6213
6200
|
fill: mainColor
|
6214
6201
|
}
|
6215
|
-
), /* @__PURE__ */
|
6202
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
6216
6203
|
"path",
|
6217
6204
|
{
|
6218
6205
|
d: "M55.43 2.4c-1.48 1.27-2.7 3.16-3.44 5.9-.07.29-11.08 37.74-11.32 38.55-.93 3.12-1.7 6.21-5.2 6.75a.04.04 0 0 0 0 .08h.7l.6-.01c3.56-.14 5.33-1.66 6.85-6.82L54.94 8.3c.44-1.44.96-3.08 1.7-4.52-.15-.25-.7-.96-1.2-1.38Z",
|
6219
6206
|
fill: mainColor
|
6220
6207
|
}
|
6221
|
-
), /* @__PURE__ */
|
6208
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
6222
6209
|
"path",
|
6223
6210
|
{
|
6224
6211
|
d: "M53.78 1.44a4.64 4.64 0 0 0-4.17.93A10.79 10.79 0 0 0 46.19 8L34.53 47.72c-.58 1.93-1.2 3.75-2.56 4.87-.62.5-1.4.86-2.39 1.01a.04.04 0 0 0 0 .08h1.8c1.57 0 2.69-.41 3.53-1.1 1.36-1.1 1.98-2.93 2.56-4.86L49.05 8.3c.73-2.74 1.95-4.63 3.43-5.9.43-.36.88-.68 1.35-.95l-.05-.01Z",
|
6225
6212
|
fill: accentColor
|
6226
6213
|
}
|
6227
|
-
)), /* @__PURE__ */
|
6214
|
+
)), /* @__PURE__ */ React69__namespace.default.createElement(
|
6228
6215
|
"path",
|
6229
6216
|
{
|
6230
6217
|
fillRule: "evenodd",
|
@@ -6246,7 +6233,7 @@ var init_logo = __esm({
|
|
6246
6233
|
var JumpForwardIcon, JumpBackwardIcon, PlayIcon, PauseIcon, SkipNextIcon, SkipPreviousIcon;
|
6247
6234
|
var init_icons2 = __esm({
|
6248
6235
|
"src/media-controller/icons.tsx"() {
|
6249
|
-
JumpForwardIcon = (props) => /* @__PURE__ */
|
6236
|
+
JumpForwardIcon = (props) => /* @__PURE__ */ React69__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 32 30", fill: "none" }, /* @__PURE__ */ React69__namespace.createElement(
|
6250
6237
|
"path",
|
6251
6238
|
{
|
6252
6239
|
fillRule: "evenodd",
|
@@ -6254,7 +6241,7 @@ var init_icons2 = __esm({
|
|
6254
6241
|
d: "M22.388 7.5C20.567 5.967 18.251 5 15.75 5 9.951 5 5.25 9.701 5.25 15.5S9.951 26 15.75 26s10.5-4.701 10.5-10.5a1 1 0 1 1 2 0c0 6.904-5.596 12.5-12.5 12.5s-12.5-5.596-12.5-12.5S8.846 3 15.75 3c3.206 0 6.11 1.31 8.304 3.3l.206-1.441a1 1 0 0 1 1.98.282L25.617 9.5H21.25a1 1 0 1 1 0-2h1.138Z",
|
6255
6242
|
fill: "currentColor"
|
6256
6243
|
}
|
6257
|
-
), /* @__PURE__ */
|
6244
|
+
), /* @__PURE__ */ React69__namespace.createElement(
|
6258
6245
|
"path",
|
6259
6246
|
{
|
6260
6247
|
fillRule: "evenodd",
|
@@ -6263,7 +6250,7 @@ var init_icons2 = __esm({
|
|
6263
6250
|
fill: "currentColor"
|
6264
6251
|
}
|
6265
6252
|
));
|
6266
|
-
JumpBackwardIcon = (props) => /* @__PURE__ */
|
6253
|
+
JumpBackwardIcon = (props) => /* @__PURE__ */ React69__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 32 30", fill: "none" }, /* @__PURE__ */ React69__namespace.createElement(
|
6267
6254
|
"path",
|
6268
6255
|
{
|
6269
6256
|
fillRule: "evenodd",
|
@@ -6271,7 +6258,7 @@ var init_icons2 = __esm({
|
|
6271
6258
|
d: "M9.612 7.5C11.433 5.967 13.749 5 16.25 5c5.799 0 10.5 4.701 10.5 10.5S22.049 26 16.25 26s-10.5-4.701-10.5-10.5a1 1 0 1 0-2 0c0 6.904 5.596 12.5 12.5 12.5s12.5-5.596 12.5-12.5S23.154 3 16.25 3c-3.206 0-6.11 1.31-8.304 3.3L7.74 4.86a1 1 0 0 0-1.98.282L6.383 9.5h4.367a1 1 0 1 0 0-2H9.612Z",
|
6272
6259
|
fill: "currentColor"
|
6273
6260
|
}
|
6274
|
-
), /* @__PURE__ */
|
6261
|
+
), /* @__PURE__ */ React69__namespace.createElement(
|
6275
6262
|
"path",
|
6276
6263
|
{
|
6277
6264
|
fillRule: "evenodd",
|
@@ -6280,7 +6267,7 @@ var init_icons2 = __esm({
|
|
6280
6267
|
fill: "currentColor"
|
6281
6268
|
}
|
6282
6269
|
));
|
6283
|
-
PlayIcon = (props) => /* @__PURE__ */
|
6270
|
+
PlayIcon = (props) => /* @__PURE__ */ React69__namespace.createElement(react.Box, { as: "svg", ...props, fill: "none", viewBox: "0 0 60 60" }, /* @__PURE__ */ React69__namespace.createElement(
|
6284
6271
|
"path",
|
6285
6272
|
{
|
6286
6273
|
fillRule: "evenodd",
|
@@ -6289,7 +6276,7 @@ var init_icons2 = __esm({
|
|
6289
6276
|
fill: "currentColor"
|
6290
6277
|
}
|
6291
6278
|
));
|
6292
|
-
PauseIcon = (props) => /* @__PURE__ */
|
6279
|
+
PauseIcon = (props) => /* @__PURE__ */ React69__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 60 60", fill: "none" }, /* @__PURE__ */ React69__namespace.createElement(
|
6293
6280
|
"path",
|
6294
6281
|
{
|
6295
6282
|
fillRule: "evenodd",
|
@@ -6298,7 +6285,7 @@ var init_icons2 = __esm({
|
|
6298
6285
|
fill: "currentColor"
|
6299
6286
|
}
|
6300
6287
|
));
|
6301
|
-
SkipNextIcon = (props) => /* @__PURE__ */
|
6288
|
+
SkipNextIcon = (props) => /* @__PURE__ */ React69__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 30 30", fill: "none" }, /* @__PURE__ */ React69__namespace.createElement(
|
6302
6289
|
"path",
|
6303
6290
|
{
|
6304
6291
|
fillRule: "evenodd",
|
@@ -6307,7 +6294,7 @@ var init_icons2 = __esm({
|
|
6307
6294
|
fill: "currentColor"
|
6308
6295
|
}
|
6309
6296
|
));
|
6310
|
-
SkipPreviousIcon = (props) => /* @__PURE__ */
|
6297
|
+
SkipPreviousIcon = (props) => /* @__PURE__ */ React69__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 30 30", fill: "none" }, /* @__PURE__ */ React69__namespace.createElement(
|
6311
6298
|
"path",
|
6312
6299
|
{
|
6313
6300
|
fillRule: "evenodd",
|
@@ -6334,7 +6321,7 @@ var init_JumpButton = __esm({
|
|
6334
6321
|
variant: "jumpSkip",
|
6335
6322
|
size: size2
|
6336
6323
|
});
|
6337
|
-
return /* @__PURE__ */
|
6324
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
6338
6325
|
react.Center,
|
6339
6326
|
{
|
6340
6327
|
as: "button",
|
@@ -6343,7 +6330,7 @@ var init_JumpButton = __esm({
|
|
6343
6330
|
disabled: isDisabled,
|
6344
6331
|
...props
|
6345
6332
|
},
|
6346
|
-
direction2 === "forward" ? /* @__PURE__ */
|
6333
|
+
direction2 === "forward" ? /* @__PURE__ */ React69__namespace.default.createElement(JumpForwardIcon, { sx: styles3.icon }) : /* @__PURE__ */ React69__namespace.default.createElement(JumpBackwardIcon, { sx: styles3.icon })
|
6347
6334
|
);
|
6348
6335
|
};
|
6349
6336
|
texts18 = createTexts({
|
@@ -6378,7 +6365,7 @@ var init_PlayPauseButton = __esm({
|
|
6378
6365
|
variant: "play",
|
6379
6366
|
size: size2
|
6380
6367
|
});
|
6381
|
-
return /* @__PURE__ */
|
6368
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
6382
6369
|
react.Center,
|
6383
6370
|
{
|
6384
6371
|
as: "button",
|
@@ -6387,7 +6374,7 @@ var init_PlayPauseButton = __esm({
|
|
6387
6374
|
disabled: isDisabled,
|
6388
6375
|
...props
|
6389
6376
|
},
|
6390
|
-
isPlaying ? /* @__PURE__ */
|
6377
|
+
isPlaying ? /* @__PURE__ */ React69__namespace.default.createElement(PauseIcon, { sx: styles3.icon }) : /* @__PURE__ */ React69__namespace.default.createElement(PlayIcon, { sx: styles3.icon })
|
6391
6378
|
);
|
6392
6379
|
};
|
6393
6380
|
texts19 = createTexts({
|
@@ -6422,7 +6409,7 @@ var init_SkipButton = __esm({
|
|
6422
6409
|
variant: "jumpSkip",
|
6423
6410
|
size: size2
|
6424
6411
|
});
|
6425
|
-
return /* @__PURE__ */
|
6412
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
6426
6413
|
react.Center,
|
6427
6414
|
{
|
6428
6415
|
as: "button",
|
@@ -6431,7 +6418,7 @@ var init_SkipButton = __esm({
|
|
6431
6418
|
disabled: isDisabled,
|
6432
6419
|
...props
|
6433
6420
|
},
|
6434
|
-
direction2 === "forward" ? /* @__PURE__ */
|
6421
|
+
direction2 === "forward" ? /* @__PURE__ */ React69__namespace.default.createElement(SkipNextIcon, { sx: styles3.icon }) : /* @__PURE__ */ React69__namespace.default.createElement(SkipPreviousIcon, { sx: styles3.icon })
|
6435
6422
|
);
|
6436
6423
|
};
|
6437
6424
|
texts20 = createTexts({
|
@@ -6468,7 +6455,7 @@ var init_ModalHeader = __esm({
|
|
6468
6455
|
fontSize: size2 === "lg" ? ["mobile.lg", "desktop.lg"] : ["mobile.md", "desktop.md"],
|
6469
6456
|
textAlign: size2 === "lg" ? "center" : "left"
|
6470
6457
|
};
|
6471
|
-
return /* @__PURE__ */
|
6458
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.ModalHeader, { ...props, ref, ...styles3 });
|
6472
6459
|
}
|
6473
6460
|
);
|
6474
6461
|
}
|
@@ -6478,7 +6465,7 @@ var init_Drawer = __esm({
|
|
6478
6465
|
"src/modal/Drawer.tsx"() {
|
6479
6466
|
init_ModalHeader();
|
6480
6467
|
exports.Drawer = (props) => {
|
6481
|
-
return /* @__PURE__ */
|
6468
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(DrawerProvider, { placement: props.placement }, /* @__PURE__ */ React69__namespace.default.createElement(react.Drawer, { ...props }));
|
6482
6469
|
};
|
6483
6470
|
exports.DrawerContent = react.forwardRef(
|
6484
6471
|
({ children, ...props }, ref) => {
|
@@ -6495,7 +6482,7 @@ var init_Drawer = __esm({
|
|
6495
6482
|
});
|
6496
6483
|
const isTopOrBottom = placement === "top" || placement === "bottom";
|
6497
6484
|
const widthConstraits = isTopOrBottom ? { width: ["100%", "37.5rem"], mx: "auto" } : {};
|
6498
|
-
return /* @__PURE__ */
|
6485
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...handlers }, /* @__PURE__ */ React69__namespace.default.createElement(
|
6499
6486
|
react.DrawerContent,
|
6500
6487
|
{
|
6501
6488
|
...widthConstraits,
|
@@ -6504,13 +6491,13 @@ var init_Drawer = __esm({
|
|
6504
6491
|
...props,
|
6505
6492
|
ref
|
6506
6493
|
},
|
6507
|
-
/* @__PURE__ */
|
6494
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.Box, { position: "relative" }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { maxHeight: "100vh", maxWidth: "100vw", overflow: "auto" }, isTopOrBottom && /* @__PURE__ */ React69__namespace.default.createElement(Notch, null), /* @__PURE__ */ React69__namespace.default.createElement(react.Box, null, children)))
|
6508
6495
|
));
|
6509
6496
|
}
|
6510
6497
|
);
|
6511
6498
|
Notch = react.forwardRef((props, ref) => {
|
6512
6499
|
const placement = useDrawerContext();
|
6513
|
-
return /* @__PURE__ */
|
6500
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
6514
6501
|
react.Box,
|
6515
6502
|
{
|
6516
6503
|
position: "absolute",
|
@@ -6522,14 +6509,14 @@ var init_Drawer = __esm({
|
|
6522
6509
|
...props,
|
6523
6510
|
ref
|
6524
6511
|
},
|
6525
|
-
/* @__PURE__ */
|
6512
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
6526
6513
|
react.Center,
|
6527
6514
|
{
|
6528
6515
|
background: `linear-gradient(to ${placement === "bottom" ? "bottom" : "top"}, white 0%, white 60%, transparent)`,
|
6529
6516
|
padding: 2,
|
6530
6517
|
borderRadius: "md"
|
6531
6518
|
},
|
6532
|
-
/* @__PURE__ */
|
6519
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
6533
6520
|
react.Box,
|
6534
6521
|
{
|
6535
6522
|
width: "2.265rem",
|
@@ -6541,10 +6528,10 @@ var init_Drawer = __esm({
|
|
6541
6528
|
)
|
6542
6529
|
);
|
6543
6530
|
});
|
6544
|
-
DrawerContext =
|
6545
|
-
DrawerProvider = (props) => /* @__PURE__ */
|
6531
|
+
DrawerContext = React69__namespace.default.createContext(void 0);
|
6532
|
+
DrawerProvider = (props) => /* @__PURE__ */ React69__namespace.default.createElement(DrawerContext.Provider, { value: props.placement }, props.children);
|
6546
6533
|
useDrawerContext = () => {
|
6547
|
-
return
|
6534
|
+
return React69__namespace.default.useContext(DrawerContext);
|
6548
6535
|
};
|
6549
6536
|
}
|
6550
6537
|
});
|
@@ -6562,7 +6549,7 @@ var init_SimpleDrawer = __esm({
|
|
6562
6549
|
title,
|
6563
6550
|
...props
|
6564
6551
|
}) => {
|
6565
|
-
return /* @__PURE__ */
|
6552
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(exports.Drawer, { placement, ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react.DrawerOverlay, null), /* @__PURE__ */ React69__namespace.default.createElement(exports.DrawerContent, null, /* @__PURE__ */ React69__namespace.default.createElement(react.DrawerCloseButton, null), title && /* @__PURE__ */ React69__namespace.default.createElement(exports.ModalHeader, null, title), /* @__PURE__ */ React69__namespace.default.createElement(react.DrawerBody, null, children)));
|
6566
6553
|
};
|
6567
6554
|
}
|
6568
6555
|
});
|
@@ -6581,16 +6568,16 @@ var init_PopoverWizardBody = __esm({
|
|
6581
6568
|
"src/popover/PopoverWizardBody.tsx"() {
|
6582
6569
|
init_src();
|
6583
6570
|
exports.PopoverWizardBody = ({ children }) => {
|
6584
|
-
const [currentStep, setCurrentStep] =
|
6585
|
-
const totalSteps =
|
6571
|
+
const [currentStep, setCurrentStep] = React69__namespace.useState(1);
|
6572
|
+
const totalSteps = React69__namespace.Children.count(children);
|
6586
6573
|
const { isOpen } = react.usePopoverContext();
|
6587
|
-
|
6574
|
+
React69__namespace.useEffect(() => {
|
6588
6575
|
if (!isOpen && currentStep > 1) {
|
6589
6576
|
const id = setTimeout(() => setCurrentStep(1), 500);
|
6590
6577
|
return () => clearTimeout(id);
|
6591
6578
|
}
|
6592
6579
|
}, [isOpen, currentStep]);
|
6593
|
-
return /* @__PURE__ */
|
6580
|
+
return /* @__PURE__ */ React69__namespace.createElement(react.PopoverBody, null, /* @__PURE__ */ React69__namespace.createElement(exports.Stack, { spacing: 1.5 }, /* @__PURE__ */ React69__namespace.createElement(react.Box, null, React69__namespace.Children.toArray(children)[currentStep - 1]), /* @__PURE__ */ React69__namespace.createElement(react.Flex, { gap: 3 }, /* @__PURE__ */ React69__namespace.createElement(StepIndicator, { totalSteps, currentStep }), /* @__PURE__ */ React69__namespace.createElement(
|
6594
6581
|
NextStepButton,
|
6595
6582
|
{
|
6596
6583
|
isLastStep: totalSteps === currentStep,
|
@@ -6600,7 +6587,7 @@ var init_PopoverWizardBody = __esm({
|
|
6600
6587
|
};
|
6601
6588
|
StepIndicator = ({ totalSteps, currentStep }) => {
|
6602
6589
|
const steps = createRange(1, totalSteps);
|
6603
|
-
return /* @__PURE__ */
|
6590
|
+
return /* @__PURE__ */ React69__namespace.createElement(react.Flex, { gap: 1, alignItems: "center" }, steps.map((step) => /* @__PURE__ */ React69__namespace.createElement(
|
6604
6591
|
react.Box,
|
6605
6592
|
{
|
6606
6593
|
key: step,
|
@@ -6619,13 +6606,13 @@ var init_PopoverWizardBody = __esm({
|
|
6619
6606
|
NextStepButton = ({ isLastStep, onNext }) => {
|
6620
6607
|
const { onClose } = react.usePopoverContext();
|
6621
6608
|
const { t: t2 } = useTranslation();
|
6622
|
-
return /* @__PURE__ */
|
6609
|
+
return /* @__PURE__ */ React69__namespace.createElement(
|
6623
6610
|
exports.Button,
|
6624
6611
|
{
|
6625
6612
|
variant: "additional",
|
6626
6613
|
size: "sm",
|
6627
6614
|
color: "white",
|
6628
|
-
leftIcon: isLastStep ? void 0 : /* @__PURE__ */
|
6615
|
+
leftIcon: isLastStep ? void 0 : /* @__PURE__ */ React69__namespace.createElement(sporIconReact.ArrowRightFill18Icon, null),
|
6629
6616
|
onClick: isLastStep ? onClose : onNext
|
6630
6617
|
},
|
6631
6618
|
t2(isLastStep ? texts21.finish : texts21.nextStep)
|
@@ -6662,7 +6649,7 @@ var init_SimplePopover = __esm({
|
|
6662
6649
|
borderRadius,
|
6663
6650
|
...props
|
6664
6651
|
}) => {
|
6665
|
-
return /* @__PURE__ */
|
6652
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.DarkMode, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
6666
6653
|
react.Popover,
|
6667
6654
|
{
|
6668
6655
|
onClose,
|
@@ -6674,8 +6661,8 @@ var init_SimplePopover = __esm({
|
|
6674
6661
|
arrowShadowColor: "none",
|
6675
6662
|
...props
|
6676
6663
|
},
|
6677
|
-
triggerElement && /* @__PURE__ */
|
6678
|
-
/* @__PURE__ */
|
6664
|
+
triggerElement && /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverTrigger, null, triggerElement),
|
6665
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.PopoverContent, { borderRadius }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverArrow, null), withCloseButton && /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverCloseButton, null), /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverBody, null, children))
|
6679
6666
|
));
|
6680
6667
|
};
|
6681
6668
|
}
|
@@ -6689,7 +6676,7 @@ var init_WizardPopover = __esm({
|
|
6689
6676
|
triggerElement,
|
6690
6677
|
withCloseButton = false
|
6691
6678
|
}) => {
|
6692
|
-
return /* @__PURE__ */
|
6679
|
+
return /* @__PURE__ */ React69__namespace.createElement(react.DarkMode, null, /* @__PURE__ */ React69__namespace.createElement(react.Popover, { size: "lg" }, /* @__PURE__ */ React69__namespace.createElement(react.PopoverTrigger, null, triggerElement), /* @__PURE__ */ React69__namespace.createElement(react.PopoverContent, null, /* @__PURE__ */ React69__namespace.createElement(react.PopoverArrow, null), withCloseButton && /* @__PURE__ */ React69__namespace.createElement(react.PopoverCloseButton, null), /* @__PURE__ */ React69__namespace.createElement(exports.PopoverWizardBody, null, children))));
|
6693
6680
|
};
|
6694
6681
|
}
|
6695
6682
|
});
|
@@ -6711,7 +6698,7 @@ var init_SporProvider = __esm({
|
|
6711
6698
|
children,
|
6712
6699
|
...props
|
6713
6700
|
}) => {
|
6714
|
-
return /* @__PURE__ */
|
6701
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(LanguageProvider, { language }, /* @__PURE__ */ React69__namespace.default.createElement(react.ChakraProvider, { theme: theme3, ...props }, /* @__PURE__ */ React69__namespace.default.createElement(react$1.Global, { styles: exports.fontFaces }), children));
|
6715
6702
|
};
|
6716
6703
|
}
|
6717
6704
|
});
|
@@ -6725,7 +6712,7 @@ var init_provider = __esm({
|
|
6725
6712
|
var StepperContext, StepperProvider, useStepper;
|
6726
6713
|
var init_StepperContext = __esm({
|
6727
6714
|
"src/stepper/StepperContext.tsx"() {
|
6728
|
-
StepperContext =
|
6715
|
+
StepperContext = React69__namespace.default.createContext(null);
|
6729
6716
|
StepperProvider = ({
|
6730
6717
|
activeStep,
|
6731
6718
|
children,
|
@@ -6733,7 +6720,7 @@ var init_StepperContext = __esm({
|
|
6733
6720
|
colorScheme,
|
6734
6721
|
numberOfSteps
|
6735
6722
|
}) => {
|
6736
|
-
return /* @__PURE__ */
|
6723
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
6737
6724
|
StepperContext.Provider,
|
6738
6725
|
{
|
6739
6726
|
value: { activeStep, onClick, colorScheme, numberOfSteps }
|
@@ -6742,7 +6729,7 @@ var init_StepperContext = __esm({
|
|
6742
6729
|
);
|
6743
6730
|
};
|
6744
6731
|
useStepper = () => {
|
6745
|
-
const context =
|
6732
|
+
const context = React69__namespace.default.useContext(StepperContext);
|
6746
6733
|
if (!context) {
|
6747
6734
|
throw new Error(
|
6748
6735
|
"useStepper must be used within a StepperProvider. Most likely, you forgot to wrap your StepperStep in a Stepper component"
|
@@ -6770,7 +6757,7 @@ var init_Stepper = __esm({
|
|
6770
6757
|
const numberOfSteps = steps.length;
|
6771
6758
|
const activeStep = Number(activeStepAsStringOrNumber);
|
6772
6759
|
const { t: t2 } = useTranslation();
|
6773
|
-
return /* @__PURE__ */
|
6760
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { __css: style.root }, /* @__PURE__ */ React69__namespace.default.createElement(
|
6774
6761
|
StepperProvider,
|
6775
6762
|
{
|
6776
6763
|
onClick,
|
@@ -6778,24 +6765,24 @@ var init_Stepper = __esm({
|
|
6778
6765
|
colorScheme,
|
6779
6766
|
numberOfSteps
|
6780
6767
|
},
|
6781
|
-
/* @__PURE__ */
|
6768
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.Box, { __css: style.container }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { __css: style.innerContainer }, /* @__PURE__ */ React69__namespace.default.createElement(react.HStack, null, activeStep > 1 && /* @__PURE__ */ React69__namespace.default.createElement(
|
6782
6769
|
exports.IconButton,
|
6783
6770
|
{
|
6784
6771
|
"aria-label": t2(texts22.back),
|
6785
|
-
icon: /* @__PURE__ */
|
6772
|
+
icon: /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.DropdownLeftFill24Icon, null),
|
6786
6773
|
variant: "ghost",
|
6787
6774
|
size: "sm",
|
6788
6775
|
onClick: () => onClick(activeStep - 1),
|
6789
6776
|
__css: style.backButton
|
6790
6777
|
}
|
6791
|
-
), /* @__PURE__ */
|
6778
|
+
), /* @__PURE__ */ React69__namespace.default.createElement(
|
6792
6779
|
exports.SimplePopover,
|
6793
6780
|
{
|
6794
|
-
triggerElement: /* @__PURE__ */
|
6781
|
+
triggerElement: /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: "button", __css: style.stepCounter }, t2(texts22.stepsOf(activeStep, numberOfSteps))),
|
6795
6782
|
borderRadius: "xs"
|
6796
6783
|
},
|
6797
|
-
steps.map((step, index) => /* @__PURE__ */
|
6798
|
-
)), title && /* @__PURE__ */
|
6784
|
+
steps.map((step, index) => /* @__PURE__ */ React69__namespace.default.createElement(exports.StepperStep, { key: step, stepNumber: index + 1 }, step))
|
6785
|
+
)), title && /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { as: "h3", __css: style.title }, title)), /* @__PURE__ */ React69__namespace.default.createElement(react.Flex, { justifyContent: "center", display: ["none", "flex"] }, steps.map((step, index) => /* @__PURE__ */ React69__namespace.default.createElement(exports.StepperStep, { key: index, stepNumber: index + 1 }, step))))
|
6799
6786
|
));
|
6800
6787
|
};
|
6801
6788
|
texts22 = createTexts({
|
@@ -6826,7 +6813,7 @@ var init_StepperStep = __esm({
|
|
6826
6813
|
variant,
|
6827
6814
|
colorScheme
|
6828
6815
|
});
|
6829
|
-
return /* @__PURE__ */
|
6816
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { __css: style.stepContainer }, stepNumber > 1 && /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, { marginX: 5, display: ["none", "block"] }), /* @__PURE__ */ React69__namespace.default.createElement(
|
6830
6817
|
react.Flex,
|
6831
6818
|
{
|
6832
6819
|
__css: style.stepButton,
|
@@ -6836,8 +6823,8 @@ var init_StepperStep = __esm({
|
|
6836
6823
|
disabled: variant === "disabled" || variant === "active",
|
6837
6824
|
onClick: () => onClick(stepNumber)
|
6838
6825
|
},
|
6839
|
-
/* @__PURE__ */
|
6840
|
-
/* @__PURE__ */
|
6826
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.Box, { __css: style.stepNumber }, stepNumber),
|
6827
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.Box, { __css: style.stepTitle }, children)
|
6841
6828
|
));
|
6842
6829
|
};
|
6843
6830
|
getVariant = (stepNumber, activeStep) => {
|
@@ -6863,7 +6850,7 @@ exports.Tabs = void 0;
|
|
6863
6850
|
var init_Tabs = __esm({
|
6864
6851
|
"src/tab/Tabs.tsx"() {
|
6865
6852
|
exports.Tabs = react.forwardRef((props, ref) => {
|
6866
|
-
return /* @__PURE__ */
|
6853
|
+
return /* @__PURE__ */ React69__namespace.createElement(react.Tabs, { ...props, ref });
|
6867
6854
|
});
|
6868
6855
|
}
|
6869
6856
|
});
|
@@ -6885,7 +6872,7 @@ var init_Table = __esm({
|
|
6885
6872
|
"src/table/Table.tsx"() {
|
6886
6873
|
exports.Table = react.forwardRef((props, ref) => {
|
6887
6874
|
const { variant, size: size2, colorScheme, children, ...rest } = props;
|
6888
|
-
return /* @__PURE__ */
|
6875
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { ...rest, ...getStyleProps(props) }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { overflowX: "auto" }, /* @__PURE__ */ React69__namespace.default.createElement(
|
6889
6876
|
react.Table,
|
6890
6877
|
{
|
6891
6878
|
variant,
|
@@ -13715,34 +13702,35 @@ var init_close_button = __esm({
|
|
13715
13702
|
init_focus_utils();
|
13716
13703
|
$size6 = themeTools.cssVar("close-button-size");
|
13717
13704
|
config11 = react.defineStyleConfig({
|
13718
|
-
baseStyle: {
|
13705
|
+
baseStyle: (props) => ({
|
13719
13706
|
w: [$size6.reference],
|
13720
13707
|
h: [$size6.reference],
|
13721
13708
|
transitionProperty: "common",
|
13722
13709
|
transitionDuration: "normal",
|
13723
|
-
borderRadius: "
|
13710
|
+
borderRadius: "md",
|
13724
13711
|
backgroundColor: "transparent",
|
13725
|
-
color: "darkGrey",
|
13712
|
+
color: themeTools.mode("darkGrey", "white")(props),
|
13726
13713
|
fontWeight: "normal",
|
13727
13714
|
...focusVisible({
|
13728
13715
|
focus: {
|
13729
13716
|
outline: "none",
|
13730
|
-
boxShadow: getBoxShadowString({ borderColor: "greenHaze" })
|
13717
|
+
boxShadow: getBoxShadowString({ borderColor: themeTools.mode("greenHaze", "azure")(props) }),
|
13718
|
+
outlineOffset: "2px"
|
13731
13719
|
},
|
13732
13720
|
notFocus: {
|
13733
13721
|
boxShadow: "none"
|
13734
13722
|
}
|
13735
13723
|
}),
|
13736
13724
|
_hover: {
|
13737
|
-
backgroundColor: "seaMist",
|
13725
|
+
backgroundColor: themeTools.mode("seaMist", "pine")(props),
|
13738
13726
|
_disabled: {
|
13739
13727
|
color: "dimGrey"
|
13740
13728
|
}
|
13741
13729
|
},
|
13742
13730
|
_active: {
|
13743
|
-
backgroundColor: "mint"
|
13731
|
+
backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props)
|
13744
13732
|
}
|
13745
|
-
},
|
13733
|
+
}),
|
13746
13734
|
sizes: {
|
13747
13735
|
lg: {
|
13748
13736
|
[$size6.variable]: "40px",
|
@@ -13810,6 +13798,7 @@ var init_datepicker2 = __esm({
|
|
13810
13798
|
}),
|
13811
13799
|
transitionProperty: "box-shadow",
|
13812
13800
|
transitionDuration: "fast",
|
13801
|
+
borderRadius: "sm",
|
13813
13802
|
display: "flex",
|
13814
13803
|
flex: 1,
|
13815
13804
|
paddingY: 0.5,
|
@@ -13861,28 +13850,25 @@ var init_datepicker2 = __esm({
|
|
13861
13850
|
},
|
13862
13851
|
calendarTriggerButton: {
|
13863
13852
|
backgroundColor: themeTools.mode("white", "night")(props),
|
13864
|
-
boxShadow:
|
13865
|
-
borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props)
|
13866
|
-
})}, inset 1px 0 0 1px ${themeTools.mode("white", colors.night)(props)}`,
|
13867
|
-
// to make the shadow colors not multiply
|
13853
|
+
boxShadow: "none",
|
13868
13854
|
width: 8,
|
13869
13855
|
display: "flex",
|
13870
13856
|
alignItems: "center",
|
13871
13857
|
justifyContent: "center",
|
13872
|
-
|
13858
|
+
borderLeftRadius: "sm",
|
13873
13859
|
transitionProperty: "box-shadow, background-color",
|
13874
13860
|
transitionSpeed: "fast",
|
13875
13861
|
position: "relative",
|
13876
|
-
|
13877
|
-
|
13862
|
+
paddingTop: 1,
|
13863
|
+
paddingBottom: 1,
|
13864
|
+
borderRadius: "sm",
|
13865
|
+
right: "9px",
|
13878
13866
|
_hover: {
|
13879
|
-
boxShadow:
|
13880
|
-
|
13881
|
-
borderWidth: 2
|
13882
|
-
})}, inset 2px 0 0 2px ${themeTools.mode("white", colors.night)(props)}`
|
13867
|
+
boxShadow: "none",
|
13868
|
+
backgroundColor: themeTools.mode("seaMist", "pine")(props)
|
13883
13869
|
},
|
13884
13870
|
_active: {
|
13885
|
-
backgroundColor: themeTools.mode("mint", "
|
13871
|
+
backgroundColor: themeTools.mode("mint", "whiteAlpha.200")(props)
|
13886
13872
|
},
|
13887
13873
|
...focusVisible({
|
13888
13874
|
focus: {
|
@@ -13911,13 +13897,17 @@ var init_datepicker2 = __esm({
|
|
13911
13897
|
},
|
13912
13898
|
calendar: {
|
13913
13899
|
backgroundColor: themeTools.mode("white", "night")(props),
|
13914
|
-
color: themeTools.mode("darkGrey", "white")(props)
|
13900
|
+
color: themeTools.mode("darkGrey", "white")(props),
|
13901
|
+
boxShadow: getBoxShadowString({
|
13902
|
+
borderWidth: 2,
|
13903
|
+
borderColor: themeTools.mode("blackAlpha.200", "whiteAlpha.200")(props)
|
13904
|
+
})
|
13915
13905
|
},
|
13916
13906
|
weekdays: {
|
13917
13907
|
color: themeTools.mode("darkGrey", "white")(props)
|
13918
13908
|
},
|
13919
13909
|
weekend: {
|
13920
|
-
color: themeTools.mode("
|
13910
|
+
color: themeTools.mode("darkTeal", "seaMist")(props)
|
13921
13911
|
},
|
13922
13912
|
dateCell: {
|
13923
13913
|
backgroundColor: themeTools.mode("white", "night")(props),
|
@@ -13976,7 +13966,7 @@ var init_datepicker2 = __esm({
|
|
13976
13966
|
"&[data-today]": {
|
13977
13967
|
boxShadow: getBoxShadowString({
|
13978
13968
|
borderWidth: 1,
|
13979
|
-
borderColor: themeTools.mode("
|
13969
|
+
borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props)
|
13980
13970
|
}),
|
13981
13971
|
_focus: {
|
13982
13972
|
outline: "none",
|
@@ -13993,16 +13983,64 @@ var init_datepicker2 = __esm({
|
|
13993
13983
|
}
|
13994
13984
|
}),
|
13995
13985
|
variants: {
|
13996
|
-
|
13997
|
-
|
13998
|
-
|
13986
|
+
base: (props) => ({
|
13987
|
+
calendar: {
|
13988
|
+
backgroundColor: themeTools.mode("white", "night")(props),
|
13989
|
+
color: themeTools.mode("darkGrey", "white")(props),
|
13990
|
+
boxShadow: getBoxShadowString({
|
13991
|
+
borderWidth: 2,
|
13992
|
+
borderColor: themeTools.mode("blackAlpha.200", "whiteAlpha.200")(props)
|
13993
|
+
})
|
13994
|
+
},
|
13995
|
+
dateCell: {
|
13996
|
+
color: themeTools.mode("darkGrey", "white")(props),
|
13997
|
+
_hover: {
|
13998
|
+
backgroundColor: themeTools.mode("seaMist", "pine")(props)
|
13999
|
+
},
|
14000
|
+
"&[data-today]": {
|
14001
|
+
boxShadow: getBoxShadowString({
|
14002
|
+
borderWidth: 1,
|
14003
|
+
borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props)
|
14004
|
+
})
|
14005
|
+
}
|
13999
14006
|
}
|
14000
|
-
},
|
14001
|
-
|
14002
|
-
|
14003
|
-
|
14007
|
+
}),
|
14008
|
+
floating: (props) => ({
|
14009
|
+
calendar: {
|
14010
|
+
backgroundColor: themeTools.mode("white", "night")(props),
|
14011
|
+
color: themeTools.mode("darkGrey", "white")(props),
|
14012
|
+
boxShadow: getBoxShadowString({
|
14013
|
+
borderColor: themeTools.mode("grey.200", "whiteAlpha.400")(props),
|
14014
|
+
baseShadow: "sm"
|
14015
|
+
})
|
14016
|
+
},
|
14017
|
+
dateCell: {
|
14018
|
+
color: themeTools.mode("darkGrey", "white")(props),
|
14019
|
+
_hover: {
|
14020
|
+
backgroundColor: themeTools.mode("", "")(props)
|
14021
|
+
}
|
14004
14022
|
}
|
14005
|
-
}
|
14023
|
+
}),
|
14024
|
+
ghost: (props) => ({
|
14025
|
+
calendar: {
|
14026
|
+
backgroundColor: themeTools.mode("white", "night")(props),
|
14027
|
+
color: themeTools.mode("darkGrey", "white")(props),
|
14028
|
+
boxShadow: getBoxShadowString({
|
14029
|
+
borderWidth: 2,
|
14030
|
+
borderColor: themeTools.mode("", "")(props)
|
14031
|
+
})
|
14032
|
+
},
|
14033
|
+
dateCell: {
|
14034
|
+
color: themeTools.mode("darkGrey", "white")(props),
|
14035
|
+
_hover: {
|
14036
|
+
backgroundColor: themeTools.mode("seaMist", "pine")(props)
|
14037
|
+
},
|
14038
|
+
_selected: {
|
14039
|
+
backgroundColor: themeTools.mode("", "primaryGreen")(props),
|
14040
|
+
color: "darkGrey"
|
14041
|
+
}
|
14042
|
+
}
|
14043
|
+
})
|
14006
14044
|
}
|
14007
14045
|
});
|
14008
14046
|
datepicker_default = config13;
|
@@ -15412,8 +15450,8 @@ var init_modal2 = __esm({
|
|
15412
15450
|
},
|
15413
15451
|
dialog: {
|
15414
15452
|
borderRadius: "md",
|
15415
|
-
background: "white",
|
15416
|
-
color: "inherit",
|
15453
|
+
background: themeTools.mode("white", "night")(props),
|
15454
|
+
color: themeTools.mode("inherit", "white")(props),
|
15417
15455
|
my: "3.75rem",
|
15418
15456
|
zIndex: "modal",
|
15419
15457
|
maxHeight: props.scrollBehavior === "inside" ? "calc(100% - 7.5rem)" : void 0,
|
@@ -15428,6 +15466,7 @@ var init_modal2 = __esm({
|
|
15428
15466
|
},
|
15429
15467
|
closeButton: {
|
15430
15468
|
position: "absolute",
|
15469
|
+
color: "inherit",
|
15431
15470
|
top: 3,
|
15432
15471
|
insetEnd: 3
|
15433
15472
|
},
|
@@ -16881,12 +16920,12 @@ var init_BaseToast = __esm({
|
|
16881
16920
|
init_src();
|
16882
16921
|
BaseToast = ({ children, variant, id }) => {
|
16883
16922
|
const styles3 = react.useStyleConfig("Toast", { variant });
|
16884
|
-
return /* @__PURE__ */
|
16923
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(react.Flex, { sx: styles3, id }, /* @__PURE__ */ React69__namespace.default.createElement(ToastIcon, { variant }), children);
|
16885
16924
|
};
|
16886
16925
|
ToastIcon = ({ variant }) => {
|
16887
16926
|
const Icon = getIcon3(variant);
|
16888
16927
|
const { t: t2 } = useTranslation();
|
16889
|
-
return /* @__PURE__ */
|
16928
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(
|
16890
16929
|
Icon,
|
16891
16930
|
{
|
16892
16931
|
flexShrink: 0,
|
@@ -16941,7 +16980,7 @@ var init_ActionToast = __esm({
|
|
16941
16980
|
buttonText,
|
16942
16981
|
id
|
16943
16982
|
}) => {
|
16944
|
-
return /* @__PURE__ */
|
16983
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { marginRight: 2, flexGrow: "1" }, children), /* @__PURE__ */ React69__namespace.default.createElement(exports.Button, { variant: "additional", size: "sm", onClick }, buttonText));
|
16945
16984
|
};
|
16946
16985
|
}
|
16947
16986
|
});
|
@@ -16958,13 +16997,13 @@ var init_ClosableToast = __esm({
|
|
16958
16997
|
}) => {
|
16959
16998
|
const styles3 = react.useMultiStyleConfig("Toast", { variant });
|
16960
16999
|
const { t: t2 } = useTranslation();
|
16961
|
-
return /* @__PURE__ */
|
17000
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { flexGrow: "1" }, children), /* @__PURE__ */ React69__namespace.default.createElement(
|
16962
17001
|
exports.IconButton,
|
16963
17002
|
{
|
16964
17003
|
sx: styles3.dismissButton,
|
16965
17004
|
variant: "ghost",
|
16966
17005
|
"aria-label": t2(texts24.dismiss),
|
16967
|
-
icon: /* @__PURE__ */
|
17006
|
+
icon: /* @__PURE__ */ React69__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
16968
17007
|
onClick: onClose
|
16969
17008
|
}
|
16970
17009
|
));
|
@@ -16987,7 +17026,7 @@ var init_useToast = __esm({
|
|
16987
17026
|
init_ClosableToast();
|
16988
17027
|
exports.useToast = () => {
|
16989
17028
|
const toast = react.useToast();
|
16990
|
-
const wrappedToast =
|
17029
|
+
const wrappedToast = React69.useCallback((opts) => {
|
16991
17030
|
const Toast = getToastComponent(opts);
|
16992
17031
|
toast({
|
16993
17032
|
...opts,
|
@@ -16998,7 +17037,7 @@ var init_useToast = __esm({
|
|
16998
17037
|
};
|
16999
17038
|
getToastComponent = (opts) => {
|
17000
17039
|
if ("isClosable" in opts && opts.isClosable) {
|
17001
|
-
return ({ onClose, id }) => /* @__PURE__ */
|
17040
|
+
return ({ onClose, id }) => /* @__PURE__ */ React69__namespace.default.createElement(
|
17002
17041
|
ClosableToast,
|
17003
17042
|
{
|
17004
17043
|
id,
|
@@ -17014,7 +17053,7 @@ var init_useToast = __esm({
|
|
17014
17053
|
);
|
17015
17054
|
}
|
17016
17055
|
if ("buttonText" in opts) {
|
17017
|
-
return ({ id }) => /* @__PURE__ */
|
17056
|
+
return ({ id }) => /* @__PURE__ */ React69__namespace.default.createElement(
|
17018
17057
|
ActionToast,
|
17019
17058
|
{
|
17020
17059
|
id,
|
@@ -17025,7 +17064,7 @@ var init_useToast = __esm({
|
|
17025
17064
|
opts.text
|
17026
17065
|
);
|
17027
17066
|
}
|
17028
|
-
return ({ id }) => /* @__PURE__ */
|
17067
|
+
return ({ id }) => /* @__PURE__ */ React69__namespace.default.createElement(BaseToast, { id, variant: opts.variant }, opts.text);
|
17029
17068
|
};
|
17030
17069
|
}
|
17031
17070
|
});
|