@vygruppen/spor-react 3.4.3 → 3.5.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 +10 -10
- package/CHANGELOG.md +12 -0
- package/dist/{CountryCodeSelect-EGTCLFUV.mjs → CountryCodeSelect-46KAQXG4.mjs} +1 -1
- package/dist/{chunk-LHZ4TUAK.mjs → chunk-ELSHBTSG.mjs} +332 -282
- package/dist/index.d.ts +71 -48
- package/dist/index.js +446 -374
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/breadcrumb/Breadcrumb.tsx +37 -0
- package/src/breadcrumb/index.tsx +1 -0
- package/src/index.tsx +1 -0
- package/src/input/Input.tsx +8 -2
- package/src/theme/components/breadcrumb.ts +47 -0
- package/src/theme/components/index.ts +1 -0
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 React50 = require('react');
|
5
5
|
var lottieReact = require('lottie-react');
|
6
6
|
var sporLoader = require('@vygruppen/spor-loader');
|
7
7
|
var reactAria = require('react-aria');
|
@@ -32,7 +32,7 @@ function _interopNamespace(e) {
|
|
32
32
|
return Object.freeze(n);
|
33
33
|
}
|
34
34
|
|
35
|
-
var
|
35
|
+
var React50__namespace = /*#__PURE__*/_interopNamespace(React50);
|
36
36
|
var tokens10__namespace = /*#__PURE__*/_interopNamespace(tokens10);
|
37
37
|
|
38
38
|
var __create = Object.create;
|
@@ -71,7 +71,7 @@ exports.Divider = void 0;
|
|
71
71
|
var init_Divider = __esm({
|
72
72
|
"src/layout/Divider.tsx"() {
|
73
73
|
exports.Divider = react.forwardRef((props, ref) => {
|
74
|
-
return /* @__PURE__ */
|
74
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
75
75
|
react.Box,
|
76
76
|
{
|
77
77
|
as: "hr",
|
@@ -92,7 +92,7 @@ var init_Stack = __esm({
|
|
92
92
|
"src/layout/Stack.tsx"() {
|
93
93
|
exports.Stack = react.forwardRef(
|
94
94
|
({ flexDirection, ...props }, ref) => {
|
95
|
-
return /* @__PURE__ */
|
95
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Stack, { ...props, direction: flexDirection, ref });
|
96
96
|
}
|
97
97
|
);
|
98
98
|
}
|
@@ -106,15 +106,15 @@ var init_layout = __esm({
|
|
106
106
|
var AccordionContext, AccordionProvider, useAccordionContext;
|
107
107
|
var init_AccordionContext = __esm({
|
108
108
|
"src/accordion/AccordionContext.tsx"() {
|
109
|
-
AccordionContext =
|
109
|
+
AccordionContext = React50__namespace.default.createContext(null);
|
110
110
|
AccordionProvider = ({
|
111
111
|
size: size2,
|
112
112
|
...props
|
113
113
|
}) => {
|
114
|
-
return /* @__PURE__ */
|
114
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(AccordionContext.Provider, { value: { size: size2 }, ...props });
|
115
115
|
};
|
116
116
|
useAccordionContext = () => {
|
117
|
-
const context =
|
117
|
+
const context = React50__namespace.default.useContext(AccordionContext);
|
118
118
|
if (context === null) {
|
119
119
|
throw new Error(
|
120
120
|
"useAccordionContext must be used within AccordionProvider"
|
@@ -132,14 +132,14 @@ var init_Accordion = __esm({
|
|
132
132
|
exports.Accordion = react.forwardRef(
|
133
133
|
({ children, spacing: spacing3 = 2, ...props }, ref) => {
|
134
134
|
const defaultIndex = typeof props.defaultIndex === "number" && props.allowMultiple ? [props.defaultIndex] : props.defaultIndex;
|
135
|
-
return /* @__PURE__ */
|
135
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(AccordionProvider, { size: props.size }, /* @__PURE__ */ React50__namespace.default.createElement(
|
136
136
|
react.Accordion,
|
137
137
|
{
|
138
138
|
...props,
|
139
139
|
ref,
|
140
140
|
defaultIndex
|
141
141
|
},
|
142
|
-
/* @__PURE__ */
|
142
|
+
/* @__PURE__ */ React50__namespace.default.createElement(exports.Stack, { spacing: spacing3 }, children)
|
143
143
|
));
|
144
144
|
}
|
145
145
|
);
|
@@ -158,7 +158,7 @@ var init_Expandable = __esm({
|
|
158
158
|
size: size2 = "md",
|
159
159
|
...rest
|
160
160
|
}) => {
|
161
|
-
return /* @__PURE__ */
|
161
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(exports.Accordion, { ...rest, size: size2 }, /* @__PURE__ */ React50__namespace.default.createElement(
|
162
162
|
exports.ExpandableItem,
|
163
163
|
{
|
164
164
|
headingLevel,
|
@@ -177,7 +177,7 @@ var init_Expandable = __esm({
|
|
177
177
|
}) => {
|
178
178
|
const { size: size2 } = useAccordionContext();
|
179
179
|
warnAboutMismatchingIcon({ icon: leftIcon, size: size2 });
|
180
|
-
return /* @__PURE__ */
|
180
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.AccordionItem, { ...rest }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: headingLevel }, /* @__PURE__ */ React50__namespace.default.createElement(react.AccordionButton, null, /* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { alignItems: "center" }, leftIcon && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { marginRight: 1 }, leftIcon), title), /* @__PURE__ */ React50__namespace.default.createElement(react.AccordionIcon, null))), /* @__PURE__ */ React50__namespace.default.createElement(react.AccordionPanel, null, children));
|
181
181
|
};
|
182
182
|
warnAboutMismatchingIcon = ({ icon, size: size2 }) => {
|
183
183
|
var _a6, _b5;
|
@@ -228,10 +228,10 @@ function LanguageProvider({
|
|
228
228
|
language,
|
229
229
|
children
|
230
230
|
}) {
|
231
|
-
return /* @__PURE__ */
|
231
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(LanguageContext.Provider, { value: language }, children);
|
232
232
|
}
|
233
233
|
function useLanguage() {
|
234
|
-
const language =
|
234
|
+
const language = React50.useContext(LanguageContext);
|
235
235
|
if (!language) {
|
236
236
|
throw new Error("Please wrap your application in a LanguageProvider");
|
237
237
|
}
|
@@ -257,12 +257,12 @@ var init_i18n = __esm({
|
|
257
257
|
Language3["English"] = "en";
|
258
258
|
return Language3;
|
259
259
|
})(exports.Language || {});
|
260
|
-
LanguageContext =
|
260
|
+
LanguageContext = React50.createContext(void 0);
|
261
261
|
}
|
262
262
|
});
|
263
263
|
function useHydrated() {
|
264
|
-
let [hydrated, setHydrated] =
|
265
|
-
|
264
|
+
let [hydrated, setHydrated] = React50.useState(() => !hydrating);
|
265
|
+
React50.useEffect(function hydrate() {
|
266
266
|
hydrating = false;
|
267
267
|
setHydrated(true);
|
268
268
|
}, []);
|
@@ -280,13 +280,13 @@ var init_ClientOnly = __esm({
|
|
280
280
|
init_useHydrated();
|
281
281
|
ClientOnly = ({ children, fallback = null }) => {
|
282
282
|
const isHydrated = useHydrated();
|
283
|
-
return /* @__PURE__ */
|
283
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(React50__namespace.default.Fragment, null, isHydrated ? children() : fallback);
|
284
284
|
};
|
285
285
|
}
|
286
286
|
});
|
287
287
|
function Lottie({ animationData }) {
|
288
288
|
const { View } = lottieReact.useLottie({ animationData, loop: true });
|
289
|
-
return /* @__PURE__ */
|
289
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(React50__namespace.default.Fragment, null, View);
|
290
290
|
}
|
291
291
|
var init_Lottie = __esm({
|
292
292
|
"src/loader/Lottie.tsx"() {
|
@@ -302,7 +302,7 @@ var init_ColorInlineLoader = __esm({
|
|
302
302
|
maxWidth,
|
303
303
|
...props
|
304
304
|
}) => {
|
305
|
-
return /* @__PURE__ */
|
305
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React50__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React50__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderColorData }))));
|
306
306
|
};
|
307
307
|
}
|
308
308
|
});
|
@@ -317,7 +317,7 @@ var init_ColorSpinner = __esm({
|
|
317
317
|
maxWidth,
|
318
318
|
...props
|
319
319
|
}) => {
|
320
|
-
return /* @__PURE__ */
|
320
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React50__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React50__namespace.default.createElement(Lottie, { animationData: sporLoader.spinnerColorData }))), children && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { mt: 3, fontWeight: "bold" }, children));
|
321
321
|
};
|
322
322
|
}
|
323
323
|
});
|
@@ -327,7 +327,7 @@ var init_ContentLoader = __esm({
|
|
327
327
|
init_ClientOnly();
|
328
328
|
init_Lottie();
|
329
329
|
exports.ContentLoader = ({ children, ...props }) => {
|
330
|
-
return /* @__PURE__ */
|
330
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { maxWidth: "140px", mx: "auto" }, /* @__PURE__ */ React50__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React50__namespace.default.createElement(Lottie, { animationData: sporLoader.contentLoaderData }))), children && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { textAlign: "center", fontWeight: "bold" }, children));
|
331
331
|
};
|
332
332
|
}
|
333
333
|
});
|
@@ -341,7 +341,7 @@ var init_DarkFullScreenLoader = __esm({
|
|
341
341
|
maxWidth,
|
342
342
|
...props
|
343
343
|
}) => {
|
344
|
-
return /* @__PURE__ */
|
344
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Center, { height: "100%", background: "darkTeal", ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React50__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React50__namespace.default.createElement(Lottie, { animationData: sporLoader.fullScreenLoaderWhiteData }))));
|
345
345
|
};
|
346
346
|
}
|
347
347
|
});
|
@@ -355,7 +355,7 @@ var init_DarkInlineLoader = __esm({
|
|
355
355
|
maxWidth,
|
356
356
|
...props
|
357
357
|
}) => {
|
358
|
-
return /* @__PURE__ */
|
358
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React50__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React50__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderDarkData }))));
|
359
359
|
};
|
360
360
|
}
|
361
361
|
});
|
@@ -371,7 +371,7 @@ var init_DarkSpinner = __esm({
|
|
371
371
|
maxWidth,
|
372
372
|
...props
|
373
373
|
}) => {
|
374
|
-
return /* @__PURE__ */
|
374
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React50__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React50__namespace.default.createElement(Lottie, { animationData: sporLoader.spinnerDarkData }))), children && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { marginTop: 3, fontWeight: "bold" }, children));
|
375
375
|
};
|
376
376
|
}
|
377
377
|
});
|
@@ -385,7 +385,7 @@ var init_LightFullScreenLoader = __esm({
|
|
385
385
|
maxWidth,
|
386
386
|
...props
|
387
387
|
}) => {
|
388
|
-
return /* @__PURE__ */
|
388
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Center, { height: "100%", background: "white", ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React50__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React50__namespace.default.createElement(Lottie, { animationData: sporLoader.fullScreenLoaderBlackData }))));
|
389
389
|
};
|
390
390
|
}
|
391
391
|
});
|
@@ -399,7 +399,7 @@ var init_LightInlineLoader = __esm({
|
|
399
399
|
maxWidth,
|
400
400
|
...props
|
401
401
|
}) => {
|
402
|
-
return /* @__PURE__ */
|
402
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React50__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React50__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderLightData }))));
|
403
403
|
};
|
404
404
|
}
|
405
405
|
});
|
@@ -414,7 +414,7 @@ var init_LightSpinner = __esm({
|
|
414
414
|
maxWidth,
|
415
415
|
...props
|
416
416
|
}) => {
|
417
|
-
return /* @__PURE__ */
|
417
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React50__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React50__namespace.default.createElement(Lottie, { animationData: sporLoader.spinnerLightData }))), children && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { mt: 3, fontWeight: "bold" }, children));
|
418
418
|
};
|
419
419
|
}
|
420
420
|
});
|
@@ -422,11 +422,11 @@ var useRotatingLabel;
|
|
422
422
|
var init_useRotatingLabel = __esm({
|
423
423
|
"src/loader/useRotatingLabel.tsx"() {
|
424
424
|
useRotatingLabel = ({ label, delay }) => {
|
425
|
-
const loadingTextArray =
|
425
|
+
const loadingTextArray = React50.useMemo(
|
426
426
|
() => Array.isArray(label) ? label : [label],
|
427
427
|
[label]
|
428
428
|
);
|
429
|
-
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] =
|
429
|
+
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] = React50.useState(0);
|
430
430
|
react.useInterval(() => {
|
431
431
|
setCurrentLoadingTextIndex(
|
432
432
|
(prevIndex) => (prevIndex + 1) % loadingTextArray.length
|
@@ -460,7 +460,7 @@ var init_ProgressBar = __esm({
|
|
460
460
|
value,
|
461
461
|
"aria-label": ariaLabel || t2(texts.label(value))
|
462
462
|
});
|
463
|
-
return /* @__PURE__ */
|
463
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(React50__namespace.default.Fragment, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
464
464
|
react.Box,
|
465
465
|
{
|
466
466
|
...progressBarProps,
|
@@ -468,7 +468,7 @@ var init_ProgressBar = __esm({
|
|
468
468
|
minWidth: "100px",
|
469
469
|
...rest
|
470
470
|
},
|
471
|
-
/* @__PURE__ */
|
471
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
472
472
|
react.Flex,
|
473
473
|
{
|
474
474
|
backgroundColor: "coralGreen",
|
@@ -477,7 +477,7 @@ var init_ProgressBar = __esm({
|
|
477
477
|
justifyContent: "flex-start",
|
478
478
|
marginX: "auto"
|
479
479
|
},
|
480
|
-
/* @__PURE__ */
|
480
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
481
481
|
react.Box,
|
482
482
|
{
|
483
483
|
backgroundColor: "greenHaze",
|
@@ -489,7 +489,7 @@ var init_ProgressBar = __esm({
|
|
489
489
|
}
|
490
490
|
)
|
491
491
|
),
|
492
|
-
currentLoadingText && /* @__PURE__ */
|
492
|
+
currentLoadingText && /* @__PURE__ */ React50__namespace.default.createElement(
|
493
493
|
react.Text,
|
494
494
|
{
|
495
495
|
textAlign: "center",
|
@@ -535,11 +535,11 @@ var init_ProgressLoader = __esm({
|
|
535
535
|
value,
|
536
536
|
"aria-label": ariaLabel ?? t2(texts2.fallbackLabel(value ?? "?"))
|
537
537
|
});
|
538
|
-
const pathRef =
|
538
|
+
const pathRef = React50.useRef(null);
|
539
539
|
const progressPathLength = ((_a6 = pathRef.current) == null ? void 0 : _a6.getTotalLength()) ?? 0;
|
540
540
|
const progress = (value - 100) / 100 * progressPathLength;
|
541
|
-
const id =
|
542
|
-
return /* @__PURE__ */
|
541
|
+
const id = React50.useId();
|
542
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...progressBarProps, minWidth: "100px", width, ...rest }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "svg", viewBox: "0 0 246 78", fill: "none" }, /* @__PURE__ */ React50__namespace.default.createElement(
|
543
543
|
react.Box,
|
544
544
|
{
|
545
545
|
as: "path",
|
@@ -547,7 +547,7 @@ var init_ProgressLoader = __esm({
|
|
547
547
|
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",
|
548
548
|
fill: "#FFB466"
|
549
549
|
}
|
550
|
-
), /* @__PURE__ */
|
550
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
551
551
|
react.Box,
|
552
552
|
{
|
553
553
|
as: "path",
|
@@ -558,7 +558,7 @@ var init_ProgressLoader = __esm({
|
|
558
558
|
strokeLinecap: "round",
|
559
559
|
strokeLinejoin: "round"
|
560
560
|
}
|
561
|
-
), /* @__PURE__ */
|
561
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
562
562
|
react.Box,
|
563
563
|
{
|
564
564
|
as: "path",
|
@@ -573,7 +573,7 @@ var init_ProgressLoader = __esm({
|
|
573
573
|
transition: "stroke-dashoffset .2s ease-out",
|
574
574
|
ref: pathRef
|
575
575
|
}
|
576
|
-
), /* @__PURE__ */
|
576
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
577
577
|
react.Box,
|
578
578
|
{
|
579
579
|
as: "path",
|
@@ -581,7 +581,7 @@ var init_ProgressLoader = __esm({
|
|
581
581
|
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",
|
582
582
|
fill: "#688CBA"
|
583
583
|
}
|
584
|
-
)), currentLoadingText && /* @__PURE__ */
|
584
|
+
)), currentLoadingText && /* @__PURE__ */ React50__namespace.default.createElement(
|
585
585
|
react.Text,
|
586
586
|
{
|
587
587
|
textAlign: "center",
|
@@ -605,19 +605,19 @@ var init_ProgressLoader = __esm({
|
|
605
605
|
exports.Skeleton = void 0;
|
606
606
|
var init_Skeleton = __esm({
|
607
607
|
"src/loader/Skeleton.tsx"() {
|
608
|
-
exports.Skeleton = react.forwardRef((props, ref) => /* @__PURE__ */
|
608
|
+
exports.Skeleton = react.forwardRef((props, ref) => /* @__PURE__ */ React50__namespace.default.createElement(react.Skeleton, { ...props, ref }));
|
609
609
|
}
|
610
610
|
});
|
611
611
|
exports.SkeletonCircle = void 0;
|
612
612
|
var init_SkeletonCircle = __esm({
|
613
613
|
"src/loader/SkeletonCircle.tsx"() {
|
614
|
-
exports.SkeletonCircle = (props) => /* @__PURE__ */
|
614
|
+
exports.SkeletonCircle = (props) => /* @__PURE__ */ React50__namespace.default.createElement(react.SkeletonCircle, { boxSize: 6, borderRadius: "50%", ...props });
|
615
615
|
}
|
616
616
|
});
|
617
617
|
exports.SkeletonText = void 0;
|
618
618
|
var init_SkeletonText = __esm({
|
619
619
|
"src/loader/SkeletonText.tsx"() {
|
620
|
-
exports.SkeletonText = (props) => /* @__PURE__ */
|
620
|
+
exports.SkeletonText = (props) => /* @__PURE__ */ React50__namespace.default.createElement(react.SkeletonText, { boxSize: 6, ...props });
|
621
621
|
}
|
622
622
|
});
|
623
623
|
|
@@ -679,7 +679,7 @@ var init_Button = __esm({
|
|
679
679
|
const buttonGroup = react.useButtonGroup();
|
680
680
|
const finalVariant = variant ?? (buttonGroup == null ? void 0 : buttonGroup.variant) ?? "primary";
|
681
681
|
const finalSize = size2 ?? (buttonGroup == null ? void 0 : buttonGroup.size) ?? "md";
|
682
|
-
return /* @__PURE__ */
|
682
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
683
683
|
react.Button,
|
684
684
|
{
|
685
685
|
size: finalSize,
|
@@ -689,11 +689,11 @@ var init_Button = __esm({
|
|
689
689
|
"aria-label": ariaLabel,
|
690
690
|
"aria-busy": isLoading,
|
691
691
|
isDisabled: isDisabled || isLoading,
|
692
|
-
leftIcon: isLoading && leftIcon ? /* @__PURE__ */
|
693
|
-
rightIcon: isLoading && rightIcon ? /* @__PURE__ */
|
692
|
+
leftIcon: isLoading && leftIcon ? /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { visibility: isLoading ? "hidden" : "visible", "aria-hidden": "true" }, leftIcon) : leftIcon,
|
693
|
+
rightIcon: isLoading && rightIcon ? /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { visibility: isLoading ? "hidden" : "visible", "aria-hidden": "true" }, rightIcon) : rightIcon,
|
694
694
|
position: "relative"
|
695
695
|
},
|
696
|
-
isLoading && /* @__PURE__ */
|
696
|
+
isLoading && /* @__PURE__ */ React50__namespace.default.createElement(
|
697
697
|
react.Center,
|
698
698
|
{
|
699
699
|
position: "absolute",
|
@@ -702,7 +702,7 @@ var init_Button = __esm({
|
|
702
702
|
left: "0",
|
703
703
|
paddingTop: 2
|
704
704
|
},
|
705
|
-
/* @__PURE__ */
|
705
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
706
706
|
exports.ColorInlineLoader,
|
707
707
|
{
|
708
708
|
maxWidth: getLoaderWidth(finalSize),
|
@@ -711,7 +711,7 @@ var init_Button = __esm({
|
|
711
711
|
}
|
712
712
|
)
|
713
713
|
),
|
714
|
-
/* @__PURE__ */
|
714
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { visibility: isLoading ? "hidden" : "visible" }, children)
|
715
715
|
);
|
716
716
|
});
|
717
717
|
texts3 = createTexts({
|
@@ -727,7 +727,7 @@ var init_Button = __esm({
|
|
727
727
|
exports.ButtonGroup = void 0;
|
728
728
|
var init_ButtonGroup = __esm({
|
729
729
|
"src/button/ButtonGroup.tsx"() {
|
730
|
-
exports.ButtonGroup = react.forwardRef((props, ref) => /* @__PURE__ */
|
730
|
+
exports.ButtonGroup = react.forwardRef((props, ref) => /* @__PURE__ */ React50__namespace.default.createElement(react.ButtonGroup, { ...props, ref }));
|
731
731
|
}
|
732
732
|
});
|
733
733
|
exports.IconButton = void 0;
|
@@ -735,12 +735,12 @@ var init_IconButton = __esm({
|
|
735
735
|
"src/button/IconButton.tsx"() {
|
736
736
|
init_src();
|
737
737
|
exports.IconButton = react.forwardRef(
|
738
|
-
({ ...props }, ref) => /* @__PURE__ */
|
738
|
+
({ ...props }, ref) => /* @__PURE__ */ React50__namespace.default.createElement(
|
739
739
|
react.IconButton,
|
740
740
|
{
|
741
741
|
title: props["aria-label"],
|
742
742
|
...props,
|
743
|
-
spinner: /* @__PURE__ */
|
743
|
+
spinner: /* @__PURE__ */ React50__namespace.default.createElement(exports.ColorSpinner, { m: 1 }),
|
744
744
|
ref
|
745
745
|
}
|
746
746
|
)
|
@@ -755,7 +755,7 @@ var init_CloseButton = __esm({
|
|
755
755
|
exports.CloseButton = react.forwardRef(
|
756
756
|
({ size: size2 = "sm", ...props }, ref) => {
|
757
757
|
const { t: t2 } = useTranslation();
|
758
|
-
return /* @__PURE__ */
|
758
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
759
759
|
exports.IconButton,
|
760
760
|
{
|
761
761
|
ref,
|
@@ -772,11 +772,11 @@ var init_CloseButton = __esm({
|
|
772
772
|
switch (size2) {
|
773
773
|
case "xs":
|
774
774
|
case "sm":
|
775
|
-
return /* @__PURE__ */
|
775
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CloseFill18Icon, null);
|
776
776
|
case "md":
|
777
|
-
return /* @__PURE__ */
|
777
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CloseFill24Icon, null);
|
778
778
|
case "lg":
|
779
|
-
return /* @__PURE__ */
|
779
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CloseFill30Icon, null);
|
780
780
|
}
|
781
781
|
};
|
782
782
|
texts4 = createTexts({
|
@@ -801,11 +801,11 @@ var init_FloatingActionButton = __esm({
|
|
801
801
|
placement = "bottom right",
|
802
802
|
...props
|
803
803
|
}) => {
|
804
|
-
const [isTextVisible, setIsTextVisible] =
|
804
|
+
const [isTextVisible, setIsTextVisible] = React50__namespace.default.useState(
|
805
805
|
externalIsTextVisible !== void 0 ? externalIsTextVisible : true
|
806
806
|
);
|
807
807
|
const scrollDirection = useScrollDirection();
|
808
|
-
|
808
|
+
React50__namespace.default.useEffect(() => {
|
809
809
|
if (externalIsTextVisible !== void 0) {
|
810
810
|
return;
|
811
811
|
}
|
@@ -815,7 +815,7 @@ var init_FloatingActionButton = __esm({
|
|
815
815
|
);
|
816
816
|
return () => window.clearTimeout(id);
|
817
817
|
}, [scrollDirection, externalIsTextVisible]);
|
818
|
-
|
818
|
+
React50__namespace.default.useEffect(() => {
|
819
819
|
setIsTextVisible(!!externalIsTextVisible);
|
820
820
|
}, [externalIsTextVisible]);
|
821
821
|
const style = react.useMultiStyleConfig("FloatingActionButton", {
|
@@ -823,7 +823,7 @@ var init_FloatingActionButton = __esm({
|
|
823
823
|
isTextVisible,
|
824
824
|
placement
|
825
825
|
});
|
826
|
-
return /* @__PURE__ */
|
826
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
827
827
|
MotionBox,
|
828
828
|
{
|
829
829
|
__css: style.container,
|
@@ -831,8 +831,8 @@ var init_FloatingActionButton = __esm({
|
|
831
831
|
"aria-label": children,
|
832
832
|
...props
|
833
833
|
},
|
834
|
-
/* @__PURE__ */
|
835
|
-
/* @__PURE__ */
|
834
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: style.icon }, icon),
|
835
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
836
836
|
MotionBox,
|
837
837
|
{
|
838
838
|
animate: isTextVisible ? "show" : "hide",
|
@@ -856,9 +856,9 @@ var init_FloatingActionButton = __esm({
|
|
856
856
|
);
|
857
857
|
};
|
858
858
|
useScrollDirection = () => {
|
859
|
-
const [scrollDirection, setScrollDirection] =
|
860
|
-
const lastScrollPosition =
|
861
|
-
|
859
|
+
const [scrollDirection, setScrollDirection] = React50__namespace.default.useState(null);
|
860
|
+
const lastScrollPosition = React50__namespace.default.useRef(window.scrollY);
|
861
|
+
React50__namespace.default.useEffect(() => {
|
862
862
|
const onScroll = () => {
|
863
863
|
const delta = window.scrollY - lastScrollPosition.current;
|
864
864
|
if (delta === 0) {
|
@@ -894,7 +894,7 @@ var init_AlertIcon = __esm({
|
|
894
894
|
AlertIcon = ({ variant }) => {
|
895
895
|
const Icon = getIcon2(variant);
|
896
896
|
const { t: t2 } = useTranslation();
|
897
|
-
return /* @__PURE__ */
|
897
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
898
898
|
Icon,
|
899
899
|
{
|
900
900
|
flexShrink: 0,
|
@@ -957,7 +957,7 @@ var init_BaseAlert = __esm({
|
|
957
957
|
"src/alert/BaseAlert.tsx"() {
|
958
958
|
BaseAlert = ({ variant, children, ...boxProps }) => {
|
959
959
|
const styles2 = react.useMultiStyleConfig("Alert", { variant });
|
960
|
-
return /* @__PURE__ */
|
960
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles2.container, ...boxProps }, children);
|
961
961
|
};
|
962
962
|
}
|
963
963
|
});
|
@@ -984,17 +984,17 @@ var init_ClosableAlert = __esm({
|
|
984
984
|
externalOnClose();
|
985
985
|
onClose();
|
986
986
|
};
|
987
|
-
return /* @__PURE__ */
|
987
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(BaseAlert, { variant }, /* @__PURE__ */ React50__namespace.default.createElement(
|
988
988
|
exports.IconButton,
|
989
989
|
{
|
990
990
|
variant: "ghost",
|
991
991
|
size: "sm",
|
992
992
|
onClick: handleClose,
|
993
|
-
icon: /* @__PURE__ */
|
993
|
+
icon: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
994
994
|
"aria-label": t2(texts6.close),
|
995
995
|
sx: styles2.closeButton
|
996
996
|
}
|
997
|
-
), /* @__PURE__ */
|
997
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(AlertIcon, { variant }), children);
|
998
998
|
};
|
999
999
|
texts6 = createTexts({
|
1000
1000
|
close: {
|
@@ -1021,7 +1021,7 @@ var init_ExpandableAlert = __esm({
|
|
1021
1021
|
},
|
1022
1022
|
...boxProps
|
1023
1023
|
}) => {
|
1024
|
-
return /* @__PURE__ */
|
1024
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(BaseAlert, { variant, paddingX: 0, paddingY: 0, padding: 0, ...boxProps }, /* @__PURE__ */ React50__namespace.default.createElement(
|
1025
1025
|
react.Accordion,
|
1026
1026
|
{
|
1027
1027
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
@@ -1029,14 +1029,14 @@ var init_ExpandableAlert = __esm({
|
|
1029
1029
|
allowToggle: true,
|
1030
1030
|
flexGrow: "1"
|
1031
1031
|
},
|
1032
|
-
/* @__PURE__ */
|
1032
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.AccordionItem, null, /* @__PURE__ */ React50__namespace.default.createElement(react.AccordionButton, { paddingX: 3, paddingY: 2 }, /* @__PURE__ */ React50__namespace.default.createElement(
|
1033
1033
|
react.Flex,
|
1034
1034
|
{
|
1035
1035
|
justifyContent: "space-between",
|
1036
1036
|
alignItems: "center",
|
1037
1037
|
flexGrow: "1"
|
1038
1038
|
},
|
1039
|
-
/* @__PURE__ */
|
1039
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { as: headingLevel }, /* @__PURE__ */ React50__namespace.default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React50__namespace.default.createElement(
|
1040
1040
|
react.Box,
|
1041
1041
|
{
|
1042
1042
|
as: "span",
|
@@ -1050,8 +1050,8 @@ var init_ExpandableAlert = __esm({
|
|
1050
1050
|
},
|
1051
1051
|
title
|
1052
1052
|
)),
|
1053
|
-
/* @__PURE__ */
|
1054
|
-
)), /* @__PURE__ */
|
1053
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.AccordionIcon, null)
|
1054
|
+
)), /* @__PURE__ */ React50__namespace.default.createElement(react.AccordionPanel, null, children))
|
1055
1055
|
));
|
1056
1056
|
};
|
1057
1057
|
}
|
@@ -1062,7 +1062,7 @@ var init_StaticAlert = __esm({
|
|
1062
1062
|
init_AlertIcon();
|
1063
1063
|
init_BaseAlert();
|
1064
1064
|
exports.StaticAlert = ({ children, ...props }) => {
|
1065
|
-
return /* @__PURE__ */
|
1065
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(BaseAlert, { ...props }, /* @__PURE__ */ React50__namespace.default.createElement(AlertIcon, { variant: props.variant }), children);
|
1066
1066
|
};
|
1067
1067
|
}
|
1068
1068
|
});
|
@@ -1075,6 +1075,29 @@ var init_alert = __esm({
|
|
1075
1075
|
init_StaticAlert();
|
1076
1076
|
}
|
1077
1077
|
});
|
1078
|
+
exports.Breadcrumb = void 0; exports.BreadcrumbItem = void 0; exports.BreadcrumbLink = void 0;
|
1079
|
+
var init_Breadcrumb = __esm({
|
1080
|
+
"src/breadcrumb/Breadcrumb.tsx"() {
|
1081
|
+
exports.Breadcrumb = (props) => {
|
1082
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
1083
|
+
react.Breadcrumb,
|
1084
|
+
{
|
1085
|
+
separator: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, { color: "blackAlpha.400" }),
|
1086
|
+
...props
|
1087
|
+
}
|
1088
|
+
);
|
1089
|
+
};
|
1090
|
+
exports.BreadcrumbItem = react.BreadcrumbItem;
|
1091
|
+
exports.BreadcrumbLink = react.BreadcrumbLink;
|
1092
|
+
}
|
1093
|
+
});
|
1094
|
+
|
1095
|
+
// src/breadcrumb/index.tsx
|
1096
|
+
var init_breadcrumb = __esm({
|
1097
|
+
"src/breadcrumb/index.tsx"() {
|
1098
|
+
init_Breadcrumb();
|
1099
|
+
}
|
1100
|
+
});
|
1078
1101
|
exports.Card = void 0;
|
1079
1102
|
var init_Card = __esm({
|
1080
1103
|
"src/card/Card.tsx"() {
|
@@ -1085,7 +1108,7 @@ var init_Card = __esm({
|
|
1085
1108
|
colorScheme,
|
1086
1109
|
size: size2
|
1087
1110
|
});
|
1088
|
-
return /* @__PURE__ */
|
1111
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: styles2, ...props, ref }, children);
|
1089
1112
|
}
|
1090
1113
|
);
|
1091
1114
|
}
|
@@ -1098,10 +1121,10 @@ var init_card = __esm({
|
|
1098
1121
|
}
|
1099
1122
|
});
|
1100
1123
|
function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
1101
|
-
let [stateValue, setStateValue] = (
|
1102
|
-
let isControlledRef = (
|
1124
|
+
let [stateValue, setStateValue] = (React50.useState)(value || defaultValue);
|
1125
|
+
let isControlledRef = (React50.useRef)(value !== void 0);
|
1103
1126
|
let isControlled = value !== void 0;
|
1104
|
-
(
|
1127
|
+
(React50.useEffect)(() => {
|
1105
1128
|
let wasControlled = isControlledRef.current;
|
1106
1129
|
if (wasControlled !== isControlled)
|
1107
1130
|
console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
|
@@ -1110,7 +1133,7 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
1110
1133
|
isControlled
|
1111
1134
|
]);
|
1112
1135
|
let currentValue = isControlled ? value : stateValue;
|
1113
|
-
let setValue = (
|
1136
|
+
let setValue = (React50.useCallback)((value2, ...args) => {
|
1114
1137
|
let onChangeCaller = (value3, ...onChangeArgs) => {
|
1115
1138
|
if (onChange) {
|
1116
1139
|
if (!Object.is(currentValue, value3))
|
@@ -1150,17 +1173,17 @@ var init_import = __esm({
|
|
1150
1173
|
});
|
1151
1174
|
function $fc909762b330b746$export$61c6a8c84e605fb6(props) {
|
1152
1175
|
let [isOpen, setOpen] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.isOpen, props.defaultOpen || false, props.onOpenChange);
|
1153
|
-
const open = (
|
1176
|
+
const open = (React50.useCallback)(() => {
|
1154
1177
|
setOpen(true);
|
1155
1178
|
}, [
|
1156
1179
|
setOpen
|
1157
1180
|
]);
|
1158
|
-
const close = (
|
1181
|
+
const close = (React50.useCallback)(() => {
|
1159
1182
|
setOpen(false);
|
1160
1183
|
}, [
|
1161
1184
|
setOpen
|
1162
1185
|
]);
|
1163
|
-
const toggle = (
|
1186
|
+
const toggle = (React50.useCallback)(() => {
|
1164
1187
|
setOpen(!isOpen);
|
1165
1188
|
}, [
|
1166
1189
|
setOpen,
|
@@ -1289,7 +1312,7 @@ function $35a22f14a1f04b11$export$2440da353cedad43(v, granularity) {
|
|
1289
1312
|
let defaultGranularity = v && "minute" in v ? "minute" : "day";
|
1290
1313
|
if (v && granularity && !(granularity in v))
|
1291
1314
|
throw new Error("Invalid granularity " + granularity + " for value " + v.toString());
|
1292
|
-
let [lastValue, setLastValue] = (
|
1315
|
+
let [lastValue, setLastValue] = (React50.useState)([
|
1293
1316
|
defaultGranularity,
|
1294
1317
|
defaultTimeZone
|
1295
1318
|
]);
|
@@ -1316,8 +1339,8 @@ function $ab5bf3f618090389$export$87194bb378cc3ac2(props) {
|
|
1316
1339
|
let hasTime = granularity === "hour" || granularity === "minute" || granularity === "second";
|
1317
1340
|
var _props_shouldCloseOnSelect;
|
1318
1341
|
let shouldCloseOnSelect = (_props_shouldCloseOnSelect = props.shouldCloseOnSelect) !== null && _props_shouldCloseOnSelect !== void 0 ? _props_shouldCloseOnSelect : true;
|
1319
|
-
let [selectedDate, setSelectedDate] = (
|
1320
|
-
let [selectedTime, setSelectedTime] = (
|
1342
|
+
let [selectedDate, setSelectedDate] = (React50.useState)(null);
|
1343
|
+
let [selectedTime, setSelectedTime] = (React50.useState)(null);
|
1321
1344
|
if (value) {
|
1322
1345
|
selectedDate = value;
|
1323
1346
|
if ("hour" in value)
|
@@ -1394,23 +1417,23 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
1394
1417
|
let timeZone = defaultTimeZone || "UTC";
|
1395
1418
|
if (v && !(granularity in v))
|
1396
1419
|
throw new Error("Invalid granularity " + granularity + " for value " + v.toString());
|
1397
|
-
let defaultFormatter = (
|
1420
|
+
let defaultFormatter = (React50.useMemo)(() => new (date.DateFormatter)(locale), [
|
1398
1421
|
locale
|
1399
1422
|
]);
|
1400
|
-
let calendar = (
|
1423
|
+
let calendar = (React50.useMemo)(() => createCalendar4(defaultFormatter.resolvedOptions().calendar), [
|
1401
1424
|
createCalendar4,
|
1402
1425
|
defaultFormatter
|
1403
1426
|
]);
|
1404
1427
|
let [value, setDate] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue, props.onChange);
|
1405
|
-
let calendarValue = (
|
1428
|
+
let calendarValue = (React50.useMemo)(() => ($35a22f14a1f04b11$export$61a490a80c552550)(value, calendar), [
|
1406
1429
|
value,
|
1407
1430
|
calendar
|
1408
1431
|
]);
|
1409
|
-
let [placeholderDate, setPlaceholderDate] = (
|
1432
|
+
let [placeholderDate, setPlaceholderDate] = (React50.useState)(() => ($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
|
1410
1433
|
let val = calendarValue || placeholderDate;
|
1411
1434
|
let showEra = calendar.identifier === "gregory" && val.era === "BC";
|
1412
1435
|
var _props_maxGranularity;
|
1413
|
-
let formatOpts = (
|
1436
|
+
let formatOpts = (React50.useMemo)(() => ({
|
1414
1437
|
granularity,
|
1415
1438
|
maxGranularity: (_props_maxGranularity = props.maxGranularity) !== null && _props_maxGranularity !== void 0 ? _props_maxGranularity : "year",
|
1416
1439
|
timeZone: defaultTimeZone,
|
@@ -1427,25 +1450,25 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
1427
1450
|
hideTimeZone,
|
1428
1451
|
showEra
|
1429
1452
|
]);
|
1430
|
-
let opts = (
|
1453
|
+
let opts = (React50.useMemo)(() => ($35a22f14a1f04b11$export$7e319ea407e63bc0)({}, formatOpts), [
|
1431
1454
|
formatOpts
|
1432
1455
|
]);
|
1433
|
-
let dateFormatter = (
|
1456
|
+
let dateFormatter = (React50.useMemo)(() => new (date.DateFormatter)(locale, opts), [
|
1434
1457
|
locale,
|
1435
1458
|
opts
|
1436
1459
|
]);
|
1437
|
-
let resolvedOptions = (
|
1460
|
+
let resolvedOptions = (React50.useMemo)(() => dateFormatter.resolvedOptions(), [
|
1438
1461
|
dateFormatter
|
1439
1462
|
]);
|
1440
|
-
let allSegments = (
|
1463
|
+
let allSegments = (React50.useMemo)(() => dateFormatter.formatToParts(/* @__PURE__ */ new Date()).filter((seg) => $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[seg.type]).reduce((p, seg) => (p[seg.type] = true, p), {}), [
|
1441
1464
|
dateFormatter
|
1442
1465
|
]);
|
1443
|
-
let [validSegments, setValidSegments] = (
|
1466
|
+
let [validSegments, setValidSegments] = (React50.useState)(() => props.value || props.defaultValue ? {
|
1444
1467
|
...allSegments
|
1445
1468
|
} : {});
|
1446
|
-
let clearedSegment = (
|
1447
|
-
let lastCalendarIdentifier = (
|
1448
|
-
(
|
1469
|
+
let clearedSegment = (React50.useRef)();
|
1470
|
+
let lastCalendarIdentifier = (React50.useRef)(calendar.identifier);
|
1471
|
+
(React50.useEffect)(() => {
|
1449
1472
|
if (calendar.identifier !== lastCalendarIdentifier.current) {
|
1450
1473
|
lastCalendarIdentifier.current = calendar.identifier;
|
1451
1474
|
setPlaceholderDate((placeholder) => Object.keys(validSegments).length > 0 ? (date.toCalendar)(placeholder, calendar) : ($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
|
@@ -1485,11 +1508,11 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
1485
1508
|
setPlaceholderDate(newValue);
|
1486
1509
|
clearedSegment.current = null;
|
1487
1510
|
};
|
1488
|
-
let dateValue = (
|
1511
|
+
let dateValue = (React50.useMemo)(() => displayValue.toDate(timeZone), [
|
1489
1512
|
displayValue,
|
1490
1513
|
timeZone
|
1491
1514
|
]);
|
1492
|
-
let segments = (
|
1515
|
+
let segments = (React50.useMemo)(() => dateFormatter.formatToParts(dateValue).map((segment) => {
|
1493
1516
|
let isEditable = $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[segment.type];
|
1494
1517
|
if (segment.type === "era" && calendar.getEras().length === 1)
|
1495
1518
|
isEditable = false;
|
@@ -1756,7 +1779,7 @@ function $93c38a5e28be6249$export$e50a61c1de9f574(props) {
|
|
1756
1779
|
var _props_isDateUnavailable, _props_isDateUnavailable1;
|
1757
1780
|
let overlayState = ($fc909762b330b746$export$61c6a8c84e605fb6)(props);
|
1758
1781
|
let [controlledValue, setControlledValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue || null, props.onChange);
|
1759
|
-
let [placeholderValue, setPlaceholderValue] = (
|
1782
|
+
let [placeholderValue, setPlaceholderValue] = (React50.useState)(() => controlledValue || {
|
1760
1783
|
start: null,
|
1761
1784
|
end: null
|
1762
1785
|
});
|
@@ -1780,8 +1803,8 @@ function $93c38a5e28be6249$export$e50a61c1de9f574(props) {
|
|
1780
1803
|
let hasTime = granularity === "hour" || granularity === "minute" || granularity === "second";
|
1781
1804
|
var _props_shouldCloseOnSelect;
|
1782
1805
|
let shouldCloseOnSelect = (_props_shouldCloseOnSelect = props.shouldCloseOnSelect) !== null && _props_shouldCloseOnSelect !== void 0 ? _props_shouldCloseOnSelect : true;
|
1783
|
-
let [dateRange, setSelectedDateRange] = (
|
1784
|
-
let [timeRange, setSelectedTimeRange] = (
|
1806
|
+
let [dateRange, setSelectedDateRange] = (React50.useState)(null);
|
1807
|
+
let [timeRange, setSelectedTimeRange] = (React50.useState)(null);
|
1785
1808
|
if (value && value.start && value.end) {
|
1786
1809
|
dateRange = value;
|
1787
1810
|
if ("hour" in value.start)
|
@@ -2401,35 +2424,35 @@ function $f62d864046160412$export$a1d3911297b952d7(date, minValue, isDateUnavail
|
|
2401
2424
|
return date;
|
2402
2425
|
}
|
2403
2426
|
function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
2404
|
-
let defaultFormatter = (
|
2427
|
+
let defaultFormatter = (React50.useMemo)(() => new (date.DateFormatter)(props.locale), [
|
2405
2428
|
props.locale
|
2406
2429
|
]);
|
2407
|
-
let resolvedOptions = (
|
2430
|
+
let resolvedOptions = (React50.useMemo)(() => defaultFormatter.resolvedOptions(), [
|
2408
2431
|
defaultFormatter
|
2409
2432
|
]);
|
2410
2433
|
let { locale, createCalendar: createCalendar4, visibleDuration = {
|
2411
2434
|
months: 1
|
2412
2435
|
}, minValue, maxValue, selectionAlignment, isDateUnavailable, pageBehavior = "visible" } = props;
|
2413
|
-
let calendar = (
|
2436
|
+
let calendar = (React50.useMemo)(() => createCalendar4(resolvedOptions.calendar), [
|
2414
2437
|
createCalendar4,
|
2415
2438
|
resolvedOptions.calendar
|
2416
2439
|
]);
|
2417
2440
|
let [value, setControlledValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue, props.onChange);
|
2418
|
-
let calendarDateValue = (
|
2441
|
+
let calendarDateValue = (React50.useMemo)(() => value ? (date.toCalendar)((date.toCalendarDate)(value), calendar) : null, [
|
2419
2442
|
value,
|
2420
2443
|
calendar
|
2421
2444
|
]);
|
2422
|
-
let timeZone = (
|
2445
|
+
let timeZone = (React50.useMemo)(() => value && "timeZone" in value ? value.timeZone : resolvedOptions.timeZone, [
|
2423
2446
|
value,
|
2424
2447
|
resolvedOptions.timeZone
|
2425
2448
|
]);
|
2426
|
-
let focusedCalendarDate = (
|
2449
|
+
let focusedCalendarDate = (React50.useMemo)(() => props.focusedValue ? ($f62d864046160412$export$4f5203c0d889109e)((date.toCalendar)((date.toCalendarDate)(props.focusedValue), calendar), minValue, maxValue) : void 0, [
|
2427
2450
|
props.focusedValue,
|
2428
2451
|
calendar,
|
2429
2452
|
minValue,
|
2430
2453
|
maxValue
|
2431
2454
|
]);
|
2432
|
-
let defaultFocusedCalendarDate = (
|
2455
|
+
let defaultFocusedCalendarDate = (React50.useMemo)(() => ($f62d864046160412$export$4f5203c0d889109e)(props.defaultFocusedValue ? (date.toCalendar)((date.toCalendarDate)(props.defaultFocusedValue), calendar) : calendarDateValue || (date.toCalendar)((date.today)(timeZone), calendar), minValue, maxValue), [
|
2433
2456
|
props.defaultFocusedValue,
|
2434
2457
|
calendarDateValue,
|
2435
2458
|
timeZone,
|
@@ -2438,7 +2461,7 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
2438
2461
|
maxValue
|
2439
2462
|
]);
|
2440
2463
|
let [focusedDate, setFocusedDate] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(focusedCalendarDate, defaultFocusedCalendarDate, props.onFocusChange);
|
2441
|
-
let [startDate, setStartDate] = (
|
2464
|
+
let [startDate, setStartDate] = (React50.useState)(() => {
|
2442
2465
|
switch (selectionAlignment) {
|
2443
2466
|
case "start":
|
2444
2467
|
return ($f62d864046160412$export$144a00ba6044eb9)(focusedDate, visibleDuration, locale, minValue, maxValue);
|
@@ -2449,8 +2472,8 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
2449
2472
|
return ($f62d864046160412$export$f4a51ff076cc9a09)(focusedDate, visibleDuration, locale, minValue, maxValue);
|
2450
2473
|
}
|
2451
2474
|
});
|
2452
|
-
let [isFocused, setFocused] = (
|
2453
|
-
let endDate = (
|
2475
|
+
let [isFocused, setFocused] = (React50.useState)(props.autoFocus || false);
|
2476
|
+
let endDate = (React50.useMemo)(() => {
|
2454
2477
|
let duration = {
|
2455
2478
|
...visibleDuration
|
2456
2479
|
};
|
@@ -2463,7 +2486,7 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
2463
2486
|
startDate,
|
2464
2487
|
visibleDuration
|
2465
2488
|
]);
|
2466
|
-
let [lastCalendarIdentifier, setLastCalendarIdentifier] = (
|
2489
|
+
let [lastCalendarIdentifier, setLastCalendarIdentifier] = (React50.useState)(calendar.identifier);
|
2467
2490
|
if (calendar.identifier !== lastCalendarIdentifier) {
|
2468
2491
|
let newFocusedDate = (date.toCalendar)(focusedDate, calendar);
|
2469
2492
|
setStartDate(($f62d864046160412$export$f4a51ff076cc9a09)(newFocusedDate, visibleDuration, locale, minValue, maxValue));
|
@@ -2493,7 +2516,7 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
2493
2516
|
setControlledValue(newValue);
|
2494
2517
|
}
|
2495
2518
|
}
|
2496
|
-
let isUnavailable = (
|
2519
|
+
let isUnavailable = (React50.useMemo)(() => {
|
2497
2520
|
if (!calendarDateValue)
|
2498
2521
|
return false;
|
2499
2522
|
if (isDateUnavailable && isDateUnavailable(calendarDateValue))
|
@@ -2506,7 +2529,7 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
2506
2529
|
maxValue
|
2507
2530
|
]);
|
2508
2531
|
let validationState = props.validationState || (isUnavailable ? "invalid" : null);
|
2509
|
-
let pageDuration = (
|
2532
|
+
let pageDuration = (React50.useMemo)(() => {
|
2510
2533
|
if (pageBehavior === "visible")
|
2511
2534
|
return visibleDuration;
|
2512
2535
|
return $131cf43a05231e1e$var$unitDuration(visibleDuration);
|
@@ -2688,7 +2711,7 @@ function $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(props) {
|
|
2688
2711
|
months: 1
|
2689
2712
|
}, minValue, maxValue, ...calendarProps } = props;
|
2690
2713
|
let [value, setValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(valueProp, defaultValue || null, onChange);
|
2691
|
-
let [anchorDate, setAnchorDateState] = (
|
2714
|
+
let [anchorDate, setAnchorDateState] = (React50.useState)(null);
|
2692
2715
|
let alignment = "center";
|
2693
2716
|
if (value && value.start && value.end) {
|
2694
2717
|
let start = ($f62d864046160412$export$f4a51ff076cc9a09)((date.toCalendarDate)(value.start), visibleDuration, locale, minValue, maxValue);
|
@@ -2698,15 +2721,15 @@ function $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(props) {
|
|
2698
2721
|
if (value.end.compare(end) > 0)
|
2699
2722
|
alignment = "start";
|
2700
2723
|
}
|
2701
|
-
let availableRangeRef = (
|
2702
|
-
let [availableRange, setAvailableRange] = (
|
2703
|
-
let min = (
|
2724
|
+
let availableRangeRef = (React50.useRef)(null);
|
2725
|
+
let [availableRange, setAvailableRange] = (React50.useState)(null);
|
2726
|
+
let min = (React50.useMemo)(() => {
|
2704
2727
|
return (date.maxDate)(minValue, availableRange === null || availableRange === void 0 ? void 0 : availableRange.start);
|
2705
2728
|
}, [
|
2706
2729
|
minValue,
|
2707
2730
|
availableRange
|
2708
2731
|
]);
|
2709
|
-
let max = (
|
2732
|
+
let max = (React50.useMemo)(() => {
|
2710
2733
|
return (date.minDate)(maxValue, availableRange === null || availableRange === void 0 ? void 0 : availableRange.end);
|
2711
2734
|
}, [
|
2712
2735
|
maxValue,
|
@@ -2734,7 +2757,7 @@ function $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(props) {
|
|
2734
2757
|
setAvailableRange(null);
|
2735
2758
|
}
|
2736
2759
|
};
|
2737
|
-
let [lastVisibleRange, setLastVisibleRange] = (
|
2760
|
+
let [lastVisibleRange, setLastVisibleRange] = (React50.useState)(calendar.visibleRange);
|
2738
2761
|
if (!(date.isEqualDay)(calendar.visibleRange.start, lastVisibleRange.start) || !(date.isEqualDay)(calendar.visibleRange.end, lastVisibleRange.end)) {
|
2739
2762
|
updateAvailableRange(anchorDate);
|
2740
2763
|
setLastVisibleRange(calendar.visibleRange);
|
@@ -2767,9 +2790,9 @@ function $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(props) {
|
|
2767
2790
|
setAnchorDate(null);
|
2768
2791
|
}
|
2769
2792
|
};
|
2770
|
-
let [isDragging, setDragging] = (
|
2793
|
+
let [isDragging, setDragging] = (React50.useState)(false);
|
2771
2794
|
let { isDateUnavailable } = props;
|
2772
|
-
let isInvalidSelection = (
|
2795
|
+
let isInvalidSelection = (React50.useMemo)(() => {
|
2773
2796
|
if (!value || anchorDate)
|
2774
2797
|
return false;
|
2775
2798
|
if (isDateUnavailable && (isDateUnavailable(value.start) || isDateUnavailable(value.end)))
|
@@ -2853,7 +2876,7 @@ var init_Badge = __esm({
|
|
2853
2876
|
"src/typography/Badge.tsx"() {
|
2854
2877
|
exports.Badge = react.forwardRef(
|
2855
2878
|
({ icon, colorScheme = "grey", children, ...props }, ref) => {
|
2856
|
-
return /* @__PURE__ */
|
2879
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
2857
2880
|
react.Badge,
|
2858
2881
|
{
|
2859
2882
|
colorScheme,
|
@@ -2861,7 +2884,7 @@ var init_Badge = __esm({
|
|
2861
2884
|
paddingLeft: icon ? 1 : void 0,
|
2862
2885
|
ref
|
2863
2886
|
},
|
2864
|
-
icon &&
|
2887
|
+
icon && React50__namespace.default.cloneElement(icon, { marginRight: 1 }),
|
2865
2888
|
children
|
2866
2889
|
);
|
2867
2890
|
}
|
@@ -2871,7 +2894,7 @@ var init_Badge = __esm({
|
|
2871
2894
|
exports.Code = void 0;
|
2872
2895
|
var init_Code = __esm({
|
2873
2896
|
"src/typography/Code.tsx"() {
|
2874
|
-
exports.Code = react.forwardRef((props, ref) => /* @__PURE__ */
|
2897
|
+
exports.Code = react.forwardRef((props, ref) => /* @__PURE__ */ React50__namespace.default.createElement(react.Code, { ...props, ref }));
|
2875
2898
|
}
|
2876
2899
|
});
|
2877
2900
|
exports.Heading = void 0;
|
@@ -2882,7 +2905,7 @@ var init_Heading = __esm({
|
|
2882
2905
|
variant = "xl-display",
|
2883
2906
|
...props
|
2884
2907
|
}) => {
|
2885
|
-
return /* @__PURE__ */
|
2908
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Text, { as, textStyle: variant, ...props });
|
2886
2909
|
};
|
2887
2910
|
}
|
2888
2911
|
});
|
@@ -2891,7 +2914,7 @@ var init_Text = __esm({
|
|
2891
2914
|
"src/typography/Text.tsx"() {
|
2892
2915
|
exports.Text = react.forwardRef(
|
2893
2916
|
({ variant = "sm", ...props }, ref) => {
|
2894
|
-
return /* @__PURE__ */
|
2917
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Text, { ...props, textStyle: variant, ref });
|
2895
2918
|
}
|
2896
2919
|
);
|
2897
2920
|
}
|
@@ -2907,7 +2930,7 @@ var init_typography = __esm({
|
|
2907
2930
|
}
|
2908
2931
|
});
|
2909
2932
|
function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
2910
|
-
const ref =
|
2933
|
+
const ref = React50.useRef(null);
|
2911
2934
|
const {
|
2912
2935
|
cellProps,
|
2913
2936
|
buttonProps,
|
@@ -2931,7 +2954,7 @@ function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
|
2931
2954
|
if (isOutsideMonth) {
|
2932
2955
|
stateProps["data-unavailable"] = true;
|
2933
2956
|
}
|
2934
|
-
|
2957
|
+
React50.useEffect(() => {
|
2935
2958
|
var _a6;
|
2936
2959
|
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
2937
2960
|
"touchend",
|
@@ -2941,7 +2964,7 @@ function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
|
2941
2964
|
{ passive: false, once: true }
|
2942
2965
|
);
|
2943
2966
|
}, []);
|
2944
|
-
return /* @__PURE__ */
|
2967
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
2945
2968
|
react.Box,
|
2946
2969
|
{
|
2947
2970
|
as: "td",
|
@@ -2964,7 +2987,7 @@ function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
|
2964
2987
|
}
|
2965
2988
|
}
|
2966
2989
|
},
|
2967
|
-
/* @__PURE__ */
|
2990
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
2968
2991
|
react.Box,
|
2969
2992
|
{
|
2970
2993
|
as: "button",
|
@@ -3027,8 +3050,8 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3027
3050
|
const weeksInMonth = date.getWeeksInMonth(state2.visibleRange.start, locale);
|
3028
3051
|
const weeksInMonthRange = new Array(weeksInMonth).fill(0).map((_, i) => i);
|
3029
3052
|
const styles2 = react.useMultiStyleConfig("Datepicker", {});
|
3030
|
-
return /* @__PURE__ */
|
3031
|
-
return /* @__PURE__ */
|
3053
|
+
return /* @__PURE__ */ React50__namespace.default.createElement("table", { ...gridProps }, /* @__PURE__ */ React50__namespace.default.createElement("thead", { ...headerProps }, /* @__PURE__ */ React50__namespace.default.createElement("tr", null, weekDays[language].map((day, index2) => {
|
3054
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
3032
3055
|
exports.Text,
|
3033
3056
|
{
|
3034
3057
|
as: "th",
|
@@ -3038,8 +3061,8 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3038
3061
|
},
|
3039
3062
|
day
|
3040
3063
|
);
|
3041
|
-
}))), /* @__PURE__ */
|
3042
|
-
(date, dayIndex) => date ? /* @__PURE__ */
|
3064
|
+
}))), /* @__PURE__ */ React50__namespace.default.createElement("tbody", null, weeksInMonthRange.map((weekIndex) => /* @__PURE__ */ React50__namespace.default.createElement("tr", { key: weekIndex }, state2.getDatesInWeek(weekIndex, startDate).map(
|
3065
|
+
(date, dayIndex) => date ? /* @__PURE__ */ React50__namespace.default.createElement(
|
3043
3066
|
CalendarCell,
|
3044
3067
|
{
|
3045
3068
|
key: dayIndex,
|
@@ -3047,7 +3070,7 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3047
3070
|
date,
|
3048
3071
|
currentMonth: startDate
|
3049
3072
|
}
|
3050
|
-
) : /* @__PURE__ */
|
3073
|
+
) : /* @__PURE__ */ React50__namespace.default.createElement("td", { key: dayIndex })
|
3051
3074
|
)))));
|
3052
3075
|
}
|
3053
3076
|
var weekDays;
|
@@ -3070,9 +3093,9 @@ function CalendarNavigationButton({
|
|
3070
3093
|
"aria-label": ariaLabel,
|
3071
3094
|
...rest
|
3072
3095
|
}) {
|
3073
|
-
const ref =
|
3096
|
+
const ref = React50.useRef(null);
|
3074
3097
|
const { buttonProps } = reactAria.useButton(rest, ref);
|
3075
|
-
return /* @__PURE__ */
|
3098
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
3076
3099
|
exports.IconButton,
|
3077
3100
|
{
|
3078
3101
|
...buttonProps,
|
@@ -3109,7 +3132,7 @@ function CalendarHeader({
|
|
3109
3132
|
);
|
3110
3133
|
const areAllOtherYearsDisabled = isPreviousYearDisabled && isNextYearDisabled;
|
3111
3134
|
const isYearPickerVisible = showYearNavigation && !areAllOtherYearsDisabled;
|
3112
|
-
return /* @__PURE__ */
|
3135
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { alignItems: "center", paddingBottom: "4", justifyContent: "space-between" }, /* @__PURE__ */ React50__namespace.default.createElement(
|
3113
3136
|
CalendarNavigator,
|
3114
3137
|
{
|
3115
3138
|
title: title ? title : isYearPickerVisible ? monthTitle : monthAndYearTitle,
|
@@ -3119,7 +3142,7 @@ function CalendarHeader({
|
|
3119
3142
|
isNextDisabled: !state2.isPreviousVisibleRangeInvalid,
|
3120
3143
|
isPreviousDisabled: !state2.isNextVisibleRangeInvalid
|
3121
3144
|
}
|
3122
|
-
), isYearPickerVisible && /* @__PURE__ */
|
3145
|
+
), isYearPickerVisible && /* @__PURE__ */ React50__namespace.default.createElement(
|
3123
3146
|
CalendarNavigator,
|
3124
3147
|
{
|
3125
3148
|
title: jsDate.getFullYear().toString(),
|
@@ -3148,15 +3171,15 @@ var init_CalendarHeader = __esm({
|
|
3148
3171
|
isNextDisabled
|
3149
3172
|
}) => {
|
3150
3173
|
const { t: t2 } = useTranslation();
|
3151
|
-
return /* @__PURE__ */
|
3174
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { alignItems: "center", flexGrow: 1 }, /* @__PURE__ */ React50__namespace.default.createElement(
|
3152
3175
|
CalendarNavigationButton,
|
3153
3176
|
{
|
3154
3177
|
onPress: onPrevious,
|
3155
3178
|
isDisabled: isPreviousDisabled,
|
3156
|
-
icon: /* @__PURE__ */
|
3179
|
+
icon: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.ArrowLeftOutline24Icon, null),
|
3157
3180
|
"aria-label": `${t2(texts7.previous)} ${t2(texts7[unit])}`
|
3158
3181
|
}
|
3159
|
-
), /* @__PURE__ */
|
3182
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
3160
3183
|
exports.Heading,
|
3161
3184
|
{
|
3162
3185
|
as: "div",
|
@@ -3167,12 +3190,12 @@ var init_CalendarHeader = __esm({
|
|
3167
3190
|
textAlign: "center"
|
3168
3191
|
},
|
3169
3192
|
capitalize(title)
|
3170
|
-
), /* @__PURE__ */
|
3193
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
3171
3194
|
CalendarNavigationButton,
|
3172
3195
|
{
|
3173
3196
|
onPress: onNext,
|
3174
3197
|
isDisabled: isNextDisabled,
|
3175
|
-
icon: /* @__PURE__ */
|
3198
|
+
icon: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.ArrowRightOutline24Icon, null),
|
3176
3199
|
"aria-label": `${t2(texts7.next)} ${t2(texts7[unit])}`
|
3177
3200
|
}
|
3178
3201
|
));
|
@@ -3216,7 +3239,7 @@ function Calendar({ showYearNavigation, ...props }) {
|
|
3216
3239
|
const { calendarProps } = reactAria.useCalendar(props, state2);
|
3217
3240
|
const calendarAriaLabel = calendarProps["aria-label"];
|
3218
3241
|
const ariaLabel = t2(texts8.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
|
3219
|
-
return /* @__PURE__ */
|
3242
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...calendarProps, "aria-label": ariaLabel }, /* @__PURE__ */ React50__namespace.default.createElement(CalendarHeader, { state: state2, showYearNavigation }), /* @__PURE__ */ React50__namespace.default.createElement(CalendarGrid, { state: state2 }));
|
3220
3243
|
}
|
3221
3244
|
var texts8;
|
3222
3245
|
var init_Calendar = __esm({
|
@@ -3251,7 +3274,7 @@ var init_CalendarTriggerButton = __esm({
|
|
3251
3274
|
onPress(event);
|
3252
3275
|
}
|
3253
3276
|
};
|
3254
|
-
return /* @__PURE__ */
|
3277
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
3255
3278
|
react.Box,
|
3256
3279
|
{
|
3257
3280
|
ref,
|
@@ -3262,7 +3285,7 @@ var init_CalendarTriggerButton = __esm({
|
|
3262
3285
|
...filteredButtonProps,
|
3263
3286
|
onKeyUp: handleOnPress
|
3264
3287
|
},
|
3265
|
-
/* @__PURE__ */
|
3288
|
+
/* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CalendarOutline24Icon, null)
|
3266
3289
|
));
|
3267
3290
|
}
|
3268
3291
|
);
|
@@ -3279,9 +3302,9 @@ var init_CalendarTriggerButton = __esm({
|
|
3279
3302
|
var DateTimeSegment, isPaddable;
|
3280
3303
|
var init_DateTimeSegment = __esm({
|
3281
3304
|
"src/datepicker/DateTimeSegment.tsx"() {
|
3282
|
-
DateTimeSegment =
|
3305
|
+
DateTimeSegment = React50.forwardRef(
|
3283
3306
|
({ segment, state: state2 }, externalRef) => {
|
3284
|
-
const internalRef =
|
3307
|
+
const internalRef = React50.useRef(null);
|
3285
3308
|
const ref = externalRef ?? internalRef;
|
3286
3309
|
const { segmentProps } = reactAria.useDateSegment(
|
3287
3310
|
segment,
|
@@ -3292,7 +3315,7 @@ var init_DateTimeSegment = __esm({
|
|
3292
3315
|
isPlaceholder: segment.isPlaceholder,
|
3293
3316
|
isEditable: segment.isEditable
|
3294
3317
|
});
|
3295
|
-
return /* @__PURE__ */
|
3318
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
3296
3319
|
react.Box,
|
3297
3320
|
{
|
3298
3321
|
...segmentProps,
|
@@ -3334,7 +3357,7 @@ var init_DateField = __esm({
|
|
3334
3357
|
init_import4();
|
3335
3358
|
init_DateTimeSegment();
|
3336
3359
|
init_utils();
|
3337
|
-
DateField =
|
3360
|
+
DateField = React50.forwardRef(
|
3338
3361
|
(props, externalRef) => {
|
3339
3362
|
var _a6;
|
3340
3363
|
const locale = useCurrentLocale();
|
@@ -3344,14 +3367,14 @@ var init_DateField = __esm({
|
|
3344
3367
|
locale,
|
3345
3368
|
createCalendar: createCalendar2
|
3346
3369
|
});
|
3347
|
-
const internalRef =
|
3370
|
+
const internalRef = React50.useRef(null);
|
3348
3371
|
const ref = externalRef ?? internalRef;
|
3349
3372
|
const { fieldProps, labelProps } = reactAria.useDateField(
|
3350
3373
|
props,
|
3351
3374
|
state2,
|
3352
3375
|
ref
|
3353
3376
|
);
|
3354
|
-
return /* @__PURE__ */
|
3377
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { minWidth: "6rem", width: "100%" }, props.label && /* @__PURE__ */ React50__namespace.default.createElement(
|
3355
3378
|
react.FormLabel,
|
3356
3379
|
{
|
3357
3380
|
...props.labelProps,
|
@@ -3361,7 +3384,7 @@ var init_DateField = __esm({
|
|
3361
3384
|
paddingTop: "2px"
|
3362
3385
|
},
|
3363
3386
|
props.label
|
3364
|
-
), /* @__PURE__ */
|
3387
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { ...fieldProps, paddingTop: "3", paddingBottom: "0.5" }, state2.segments.map((segment, i) => /* @__PURE__ */ React50__namespace.default.createElement(
|
3365
3388
|
DateTimeSegment,
|
3366
3389
|
{
|
3367
3390
|
ref: i === 0 ? ref : void 0,
|
@@ -3369,7 +3392,7 @@ var init_DateField = __esm({
|
|
3369
3392
|
segment,
|
3370
3393
|
state: state2
|
3371
3394
|
}
|
3372
|
-
))), /* @__PURE__ */
|
3395
|
+
))), /* @__PURE__ */ React50__namespace.default.createElement(
|
3373
3396
|
"input",
|
3374
3397
|
{
|
3375
3398
|
type: "hidden",
|
@@ -3390,7 +3413,7 @@ var init_StyledField = __esm({
|
|
3390
3413
|
isInvalid: false
|
3391
3414
|
};
|
3392
3415
|
const styles2 = react.useMultiStyleConfig("Datepicker", { variant });
|
3393
|
-
return /* @__PURE__ */
|
3416
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
3394
3417
|
react.Box,
|
3395
3418
|
{
|
3396
3419
|
...otherProps,
|
@@ -3414,7 +3437,7 @@ var init_DatePicker = __esm({
|
|
3414
3437
|
init_DateField();
|
3415
3438
|
init_StyledField();
|
3416
3439
|
init_utils();
|
3417
|
-
exports.DatePicker =
|
3440
|
+
exports.DatePicker = React50.forwardRef(
|
3418
3441
|
({
|
3419
3442
|
variant,
|
3420
3443
|
errorMessage,
|
@@ -3432,7 +3455,7 @@ var init_DatePicker = __esm({
|
|
3432
3455
|
isRequired: props.isRequired ?? (formControlProps == null ? void 0 : formControlProps.isRequired),
|
3433
3456
|
validationState: (formControlProps == null ? void 0 : formControlProps.isInvalid) ? "invalid" : "valid"
|
3434
3457
|
});
|
3435
|
-
const internalRef =
|
3458
|
+
const internalRef = React50.useRef(null);
|
3436
3459
|
const ref = externalRef ?? internalRef;
|
3437
3460
|
const {
|
3438
3461
|
groupProps,
|
@@ -3456,14 +3479,14 @@ var init_DatePicker = __esm({
|
|
3456
3479
|
state2.setOpen(true);
|
3457
3480
|
}
|
3458
3481
|
};
|
3459
|
-
const popoverContent = /* @__PURE__ */
|
3482
|
+
const popoverContent = /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverContent, { color: "darkGrey", boxShadow: "md", sx: styles2.calendar }, /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverArrow, { sx: styles2.arrow }), /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React50__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
3460
3483
|
Calendar,
|
3461
3484
|
{
|
3462
3485
|
...calendarProps,
|
3463
3486
|
showYearNavigation
|
3464
3487
|
}
|
3465
3488
|
))));
|
3466
|
-
return /* @__PURE__ */
|
3489
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React50__namespace.default.createElement(
|
3467
3490
|
react.Box,
|
3468
3491
|
{
|
3469
3492
|
position: "relative",
|
@@ -3471,7 +3494,7 @@ var init_DatePicker = __esm({
|
|
3471
3494
|
flexDirection: "column",
|
3472
3495
|
width
|
3473
3496
|
},
|
3474
|
-
/* @__PURE__ */
|
3497
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
3475
3498
|
react.Popover,
|
3476
3499
|
{
|
3477
3500
|
...dialogProps,
|
@@ -3479,7 +3502,7 @@ var init_DatePicker = __esm({
|
|
3479
3502
|
onOpen: state2.open,
|
3480
3503
|
onClose: state2.close
|
3481
3504
|
},
|
3482
|
-
/* @__PURE__ */
|
3505
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.InputGroup, { ...groupProps, display: "inline-flex" }, /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
3483
3506
|
StyledField,
|
3484
3507
|
{
|
3485
3508
|
variant: responsiveVariant,
|
@@ -3487,8 +3510,8 @@ var init_DatePicker = __esm({
|
|
3487
3510
|
paddingX: 3,
|
3488
3511
|
minHeight
|
3489
3512
|
},
|
3490
|
-
!hasTrigger && /* @__PURE__ */
|
3491
|
-
/* @__PURE__ */
|
3513
|
+
!hasTrigger && /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CalendarOutline24Icon, { marginRight: 2, alignSelf: "center" }),
|
3514
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
3492
3515
|
DateField,
|
3493
3516
|
{
|
3494
3517
|
label: props.label,
|
@@ -3498,9 +3521,9 @@ var init_DatePicker = __esm({
|
|
3498
3521
|
...fieldProps
|
3499
3522
|
}
|
3500
3523
|
)
|
3501
|
-
)), hasTrigger && /* @__PURE__ */
|
3502
|
-
/* @__PURE__ */
|
3503
|
-
state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */
|
3524
|
+
)), hasTrigger && /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React50__namespace.default.createElement(CalendarTriggerButton, { ref, ...buttonProps }))),
|
3525
|
+
/* @__PURE__ */ React50__namespace.default.createElement(exports.FormErrorMessage, { ...errorMessageProps }, errorMessage),
|
3526
|
+
state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React50__namespace.default.createElement(react.Portal, null, popoverContent),
|
3504
3527
|
state2.isOpen && !props.isDisabled && !withPortal && popoverContent
|
3505
3528
|
)
|
3506
3529
|
));
|
@@ -3516,9 +3539,9 @@ function RangeCalendar(props) {
|
|
3516
3539
|
locale,
|
3517
3540
|
createCalendar: date.createCalendar
|
3518
3541
|
});
|
3519
|
-
const ref =
|
3542
|
+
const ref = React50.useRef(null);
|
3520
3543
|
const { calendarProps, title } = reactAria.useRangeCalendar(props, state2, ref);
|
3521
|
-
return /* @__PURE__ */
|
3544
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...calendarProps, ref }, /* @__PURE__ */ React50__namespace.default.createElement(CalendarHeader, { state: state2, title }), /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { display: "flex", gap: "8" }, /* @__PURE__ */ React50__namespace.default.createElement(CalendarGrid, { state: state2 }), /* @__PURE__ */ React50__namespace.default.createElement(CalendarGrid, { state: state2, offset: { months: 1 } })));
|
3522
3545
|
}
|
3523
3546
|
var init_RangeCalendar = __esm({
|
3524
3547
|
"src/datepicker/RangeCalendar.tsx"() {
|
@@ -3543,7 +3566,7 @@ function DateRangePicker({
|
|
3543
3566
|
isRequired: props.isRequired ?? (formControlProps == null ? void 0 : formControlProps.isRequired),
|
3544
3567
|
validationState: formControlProps.isInvalid ? "invalid" : "valid"
|
3545
3568
|
});
|
3546
|
-
const ref =
|
3569
|
+
const ref = React50.useRef(null);
|
3547
3570
|
const {
|
3548
3571
|
groupProps,
|
3549
3572
|
labelProps,
|
@@ -3570,8 +3593,8 @@ function DateRangePicker({
|
|
3570
3593
|
}
|
3571
3594
|
};
|
3572
3595
|
const hasTrigger = responsiveVariant === "with-trigger";
|
3573
|
-
const popoverContent = /* @__PURE__ */
|
3574
|
-
return /* @__PURE__ */
|
3596
|
+
const popoverContent = /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverContent, { sx: styles2.calendar, boxShadow: "md", maxWidth: "none" }, /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverArrow, { sx: styles2.arrow }), /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React50__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React50__namespace.default.createElement(RangeCalendar, { ...calendarProps }))));
|
3597
|
+
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: styles2.inputLabel }, props.label), /* @__PURE__ */ React50__namespace.default.createElement(
|
3575
3598
|
react.Popover,
|
3576
3599
|
{
|
3577
3600
|
...dialogProps,
|
@@ -3579,7 +3602,7 @@ function DateRangePicker({
|
|
3579
3602
|
onOpen: state2.open,
|
3580
3603
|
onClose: state2.close
|
3581
3604
|
},
|
3582
|
-
/* @__PURE__ */
|
3605
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.InputGroup, { ...groupProps, width: "auto", display: "inline-flex" }, /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
3583
3606
|
StyledField,
|
3584
3607
|
{
|
3585
3608
|
alignItems: "center",
|
@@ -3589,8 +3612,8 @@ function DateRangePicker({
|
|
3589
3612
|
onKeyPress: handleEnterClick,
|
3590
3613
|
minHeight
|
3591
3614
|
},
|
3592
|
-
!hasTrigger && /* @__PURE__ */
|
3593
|
-
/* @__PURE__ */
|
3615
|
+
!hasTrigger && /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CalendarOutline24Icon, { mr: 2, alignSelf: "center" }),
|
3616
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
3594
3617
|
DateField,
|
3595
3618
|
{
|
3596
3619
|
...startFieldProps,
|
@@ -3600,8 +3623,8 @@ function DateRangePicker({
|
|
3600
3623
|
labelProps
|
3601
3624
|
}
|
3602
3625
|
),
|
3603
|
-
/* @__PURE__ */
|
3604
|
-
/* @__PURE__ */
|
3626
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "span", "aria-hidden": "true", px: "2" }, "\u2013"),
|
3627
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
3605
3628
|
DateField,
|
3606
3629
|
{
|
3607
3630
|
...endFieldProps,
|
@@ -3610,8 +3633,8 @@ function DateRangePicker({
|
|
3610
3633
|
labelProps
|
3611
3634
|
}
|
3612
3635
|
)
|
3613
|
-
)), hasTrigger && /* @__PURE__ */
|
3614
|
-
state2.isOpen && withPortal && /* @__PURE__ */
|
3636
|
+
)), hasTrigger && /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React50__namespace.default.createElement(CalendarTriggerButton, { ref, ...buttonProps }))),
|
3637
|
+
state2.isOpen && withPortal && /* @__PURE__ */ React50__namespace.default.createElement(react.Portal, null, popoverContent),
|
3615
3638
|
state2.isOpen && !withPortal && popoverContent
|
3616
3639
|
)));
|
3617
3640
|
}
|
@@ -3632,9 +3655,9 @@ var init_TimeField = __esm({
|
|
3632
3655
|
init_DateTimeSegment();
|
3633
3656
|
init_utils();
|
3634
3657
|
TimeField = ({ state: state2, ...props }) => {
|
3635
|
-
const ref =
|
3658
|
+
const ref = React50.useRef(null);
|
3636
3659
|
const { labelProps, fieldProps } = reactAria.useTimeField(props, state2, ref);
|
3637
|
-
return /* @__PURE__ */
|
3660
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
3638
3661
|
exports.FormLabel,
|
3639
3662
|
{
|
3640
3663
|
...labelProps,
|
@@ -3646,7 +3669,7 @@ var init_TimeField = __esm({
|
|
3646
3669
|
paddingTop: "2px"
|
3647
3670
|
},
|
3648
3671
|
props.label
|
3649
|
-
), /* @__PURE__ */
|
3672
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5" }, state2.segments.map((segment) => /* @__PURE__ */ React50__namespace.default.createElement(DateTimeSegment, { key: segment.type, segment, state: state2 }))), /* @__PURE__ */ React50__namespace.default.createElement(
|
3650
3673
|
"input",
|
3651
3674
|
{
|
3652
3675
|
type: "hidden",
|
@@ -3722,7 +3745,7 @@ var init_TimePicker = __esm({
|
|
3722
3745
|
const ariaLabel = `${inputLabel} \u2013 ${t2(
|
3723
3746
|
texts10.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
|
3724
3747
|
)}`;
|
3725
|
-
return /* @__PURE__ */
|
3748
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
3726
3749
|
StyledField,
|
3727
3750
|
{
|
3728
3751
|
variant: "simple",
|
@@ -3738,7 +3761,7 @@ var init_TimePicker = __esm({
|
|
3738
3761
|
"aria-label": ariaLabel,
|
3739
3762
|
...boxProps
|
3740
3763
|
},
|
3741
|
-
/* @__PURE__ */
|
3764
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
3742
3765
|
exports.IconButton,
|
3743
3766
|
{
|
3744
3767
|
variant: "ghost",
|
@@ -3746,14 +3769,14 @@ var init_TimePicker = __esm({
|
|
3746
3769
|
borderRadius: "xs",
|
3747
3770
|
"aria-label": backwardsLabel,
|
3748
3771
|
title: backwardsLabel,
|
3749
|
-
icon: /* @__PURE__ */
|
3772
|
+
icon: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.DropdownLeftFill18Icon, null),
|
3750
3773
|
onClick: handleBackwardsClick,
|
3751
3774
|
isDisabled,
|
3752
3775
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
3753
3776
|
}
|
3754
3777
|
),
|
3755
|
-
/* @__PURE__ */
|
3756
|
-
/* @__PURE__ */
|
3778
|
+
/* @__PURE__ */ React50__namespace.default.createElement(TimeField, { label, state: state2, name }),
|
3779
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
3757
3780
|
exports.IconButton,
|
3758
3781
|
{
|
3759
3782
|
variant: "ghost",
|
@@ -3761,7 +3784,7 @@ var init_TimePicker = __esm({
|
|
3761
3784
|
borderRadius: "xs",
|
3762
3785
|
"aria-label": forwardsLabel,
|
3763
3786
|
title: forwardsLabel,
|
3764
|
-
icon: /* @__PURE__ */
|
3787
|
+
icon: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, null),
|
3765
3788
|
onClick: handleForwardClick,
|
3766
3789
|
isDisabled,
|
3767
3790
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
@@ -3847,7 +3870,7 @@ var init_AttachedInputs = __esm({
|
|
3847
3870
|
}
|
3848
3871
|
};
|
3849
3872
|
const direction2 = flexDirection === "row" ? "horizontal" : "vertical";
|
3850
|
-
return /* @__PURE__ */
|
3873
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
3851
3874
|
react.Flex,
|
3852
3875
|
{
|
3853
3876
|
role: "group",
|
@@ -3864,16 +3887,16 @@ var Dialog;
|
|
3864
3887
|
var init_Dialog = __esm({
|
3865
3888
|
"src/input/Dialog.tsx"() {
|
3866
3889
|
Dialog = ({ title, children, ...props }) => {
|
3867
|
-
const ref =
|
3890
|
+
const ref = React50.useRef(null);
|
3868
3891
|
const { dialogProps, titleProps } = reactAria.useDialog(props, ref);
|
3869
|
-
return /* @__PURE__ */
|
3892
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...dialogProps, ref, outline: "none" }, title && /* @__PURE__ */ React50__namespace.default.createElement(react.Heading, { as: "h3", ...titleProps }, title), children);
|
3870
3893
|
};
|
3871
3894
|
}
|
3872
3895
|
});
|
3873
3896
|
var Popover3;
|
3874
3897
|
var init_Popover = __esm({
|
3875
3898
|
"src/input/Popover.tsx"() {
|
3876
|
-
Popover3 =
|
3899
|
+
Popover3 = React50.forwardRef(
|
3877
3900
|
({
|
3878
3901
|
children,
|
3879
3902
|
state: state2,
|
@@ -3887,7 +3910,7 @@ var init_Popover = __esm({
|
|
3887
3910
|
containerPadding = 12
|
3888
3911
|
}, ref) => {
|
3889
3912
|
var _a6;
|
3890
|
-
const internalRef =
|
3913
|
+
const internalRef = React50.useRef(null);
|
3891
3914
|
const popoverRef = ref ?? internalRef;
|
3892
3915
|
const { popoverProps, underlayProps } = reactAria.usePopover(
|
3893
3916
|
{
|
@@ -3902,28 +3925,28 @@ var init_Popover = __esm({
|
|
3902
3925
|
},
|
3903
3926
|
state2
|
3904
3927
|
);
|
3905
|
-
const popoverBox = /* @__PURE__ */
|
3928
|
+
const popoverBox = /* @__PURE__ */ React50__namespace.default.createElement(
|
3906
3929
|
react.Box,
|
3907
3930
|
{
|
3908
3931
|
...popoverProps,
|
3909
3932
|
ref: popoverRef,
|
3910
3933
|
minWidth: ((_a6 = triggerRef.current) == null ? void 0 : _a6.clientWidth) ?? "auto"
|
3911
3934
|
},
|
3912
|
-
/* @__PURE__ */
|
3935
|
+
/* @__PURE__ */ React50__namespace.default.createElement(reactAria.DismissButton, { onDismiss: state2.close }),
|
3913
3936
|
children,
|
3914
|
-
/* @__PURE__ */
|
3937
|
+
/* @__PURE__ */ React50__namespace.default.createElement(reactAria.DismissButton, { onDismiss: state2.close })
|
3915
3938
|
);
|
3916
3939
|
if (isNonModal) {
|
3917
3940
|
return popoverBox;
|
3918
3941
|
}
|
3919
|
-
return /* @__PURE__ */
|
3942
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(reactAria.Overlay, null, hasBackdrop && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...underlayProps, position: "fixed", inset: "0" }), popoverBox);
|
3920
3943
|
}
|
3921
3944
|
);
|
3922
3945
|
}
|
3923
3946
|
});
|
3924
3947
|
function useForceRerender(shouldRerender) {
|
3925
|
-
const [_, update] =
|
3926
|
-
|
3948
|
+
const [_, update] = React50.useState(false);
|
3949
|
+
React50.useEffect(() => {
|
3927
3950
|
if (shouldRerender) {
|
3928
3951
|
update((x) => !x);
|
3929
3952
|
}
|
@@ -3951,7 +3974,7 @@ var init_CardSelect = __esm({
|
|
3951
3974
|
withChevron = true,
|
3952
3975
|
...props
|
3953
3976
|
}, externalRef) => {
|
3954
|
-
const internalRef =
|
3977
|
+
const internalRef = React50.useRef(null);
|
3955
3978
|
const triggerRef = externalRef ?? internalRef;
|
3956
3979
|
const state2 = reactStately.useOverlayTriggerState({
|
3957
3980
|
isOpen: externalIsOpen,
|
@@ -3967,7 +3990,7 @@ var init_CardSelect = __esm({
|
|
3967
3990
|
const styles2 = react.useMultiStyleConfig("CardSelect", { variant, size: size2 });
|
3968
3991
|
useForceRerender(state2.isOpen);
|
3969
3992
|
const ChevronIcon = size2 === "sm" ? sporIconReact.DropdownDownFill18Icon : sporIconReact.DropdownDownFill24Icon;
|
3970
|
-
return /* @__PURE__ */
|
3993
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React50__namespace.default.createElement(
|
3971
3994
|
react.chakra.button,
|
3972
3995
|
{
|
3973
3996
|
type: "button",
|
@@ -3977,13 +4000,13 @@ var init_CardSelect = __esm({
|
|
3977
4000
|
width,
|
3978
4001
|
"data-attachable": true
|
3979
4002
|
},
|
3980
|
-
/* @__PURE__ */
|
4003
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { gap: 1.5, alignItems: "center" }, icon, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "span" }, label), withChevron ? /* @__PURE__ */ React50__namespace.default.createElement(
|
3981
4004
|
ChevronIcon,
|
3982
4005
|
{
|
3983
4006
|
transform: state2.isOpen ? "rotate(180deg)" : "none"
|
3984
4007
|
}
|
3985
4008
|
) : null)
|
3986
|
-
), state2.isOpen && /* @__PURE__ */
|
4009
|
+
), state2.isOpen && /* @__PURE__ */ React50__namespace.default.createElement(
|
3987
4010
|
Popover3,
|
3988
4011
|
{
|
3989
4012
|
state: state2,
|
@@ -3992,7 +4015,7 @@ var init_CardSelect = __esm({
|
|
3992
4015
|
crossOffset,
|
3993
4016
|
placement
|
3994
4017
|
},
|
3995
|
-
/* @__PURE__ */
|
4018
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
3996
4019
|
exports.Card,
|
3997
4020
|
{
|
3998
4021
|
colorScheme: "white",
|
@@ -4000,7 +4023,7 @@ var init_CardSelect = __esm({
|
|
4000
4023
|
sx: styles2.card,
|
4001
4024
|
...overlayProps
|
4002
4025
|
},
|
4003
|
-
/* @__PURE__ */
|
4026
|
+
/* @__PURE__ */ React50__namespace.default.createElement(Dialog, { "aria-label": label }, children)
|
4004
4027
|
)
|
4005
4028
|
));
|
4006
4029
|
}
|
@@ -4011,7 +4034,7 @@ exports.Checkbox = void 0;
|
|
4011
4034
|
var init_Checkbox = __esm({
|
4012
4035
|
"src/input/Checkbox.tsx"() {
|
4013
4036
|
exports.Checkbox = react.forwardRef((props, ref) => {
|
4014
|
-
return /* @__PURE__ */
|
4037
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Checkbox, { ...props, ref });
|
4015
4038
|
});
|
4016
4039
|
}
|
4017
4040
|
});
|
@@ -4023,7 +4046,7 @@ var init_CheckboxGroup = __esm({
|
|
4023
4046
|
children,
|
4024
4047
|
...props
|
4025
4048
|
}) => {
|
4026
|
-
return /* @__PURE__ */
|
4049
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.CheckboxGroup, { ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.Stack, { direction: direction2 }, children));
|
4027
4050
|
};
|
4028
4051
|
}
|
4029
4052
|
});
|
@@ -4796,16 +4819,16 @@ var init_ChoiceChip = __esm({
|
|
4796
4819
|
icon,
|
4797
4820
|
hasLabel: Boolean(children)
|
4798
4821
|
});
|
4799
|
-
const id = `choice-chip-${
|
4800
|
-
return /* @__PURE__ */
|
4822
|
+
const id = `choice-chip-${React50.useId()}`;
|
4823
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
4801
4824
|
react.chakra.label,
|
4802
4825
|
{
|
4803
4826
|
htmlFor: id,
|
4804
4827
|
...getRootProps(),
|
4805
4828
|
"aria-label": String(children)
|
4806
4829
|
},
|
4807
|
-
/* @__PURE__ */
|
4808
|
-
/* @__PURE__ */
|
4830
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.chakra.input, { ...getInputProps({}, ref), id }),
|
4831
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
4809
4832
|
react.chakra.div,
|
4810
4833
|
{
|
4811
4834
|
...getLabelProps(),
|
@@ -4814,9 +4837,9 @@ var init_ChoiceChip = __esm({
|
|
4814
4837
|
"data-hover": dataAttr(state2.isHovered),
|
4815
4838
|
"data-focus": dataAttr(state2.isFocused)
|
4816
4839
|
},
|
4817
|
-
icon && /* @__PURE__ */
|
4818
|
-
/* @__PURE__ */
|
4819
|
-
variant === "filter" && state2.isChecked && /* @__PURE__ */
|
4840
|
+
icon && /* @__PURE__ */ React50__namespace.default.createElement(react.chakra.span, { __css: styles2.icon }, state2.isChecked ? icon.checked : icon.default),
|
4841
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.chakra.span, { __css: styles2.label, ...getCheckboxProps() }, variant !== "icon" && children),
|
4842
|
+
variant === "filter" && state2.isChecked && /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CloseOutline24Icon, { ml: 1.5 })
|
4820
4843
|
)
|
4821
4844
|
);
|
4822
4845
|
});
|
@@ -4847,9 +4870,9 @@ function Combobox({
|
|
4847
4870
|
...rest
|
4848
4871
|
}) {
|
4849
4872
|
const { contains: contains2 } = reactAria.useFilter({ sensitivity: "base" });
|
4850
|
-
const inputRef =
|
4851
|
-
const listBoxRef =
|
4852
|
-
const popoverRef =
|
4873
|
+
const inputRef = React50.useRef(null);
|
4874
|
+
const listBoxRef = React50.useRef(null);
|
4875
|
+
const popoverRef = React50.useRef(null);
|
4853
4876
|
const inputWidth = useInputWidth(inputRef);
|
4854
4877
|
const state2 = reactStately.useComboBoxState({
|
4855
4878
|
...rest,
|
@@ -4870,7 +4893,7 @@ function Combobox({
|
|
4870
4893
|
},
|
4871
4894
|
state2
|
4872
4895
|
);
|
4873
|
-
return /* @__PURE__ */
|
4896
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(React50__namespace.default.Fragment, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
4874
4897
|
exports.Input,
|
4875
4898
|
{
|
4876
4899
|
...inputProps,
|
@@ -4894,7 +4917,7 @@ function Combobox({
|
|
4894
4917
|
paddingX,
|
4895
4918
|
paddingY,
|
4896
4919
|
leftIcon,
|
4897
|
-
rightIcon: isLoading ? /* @__PURE__ */
|
4920
|
+
rightIcon: isLoading ? /* @__PURE__ */ React50__namespace.default.createElement(
|
4898
4921
|
exports.ColorSpinner,
|
4899
4922
|
{
|
4900
4923
|
width: "1.5rem",
|
@@ -4909,7 +4932,7 @@ function Combobox({
|
|
4909
4932
|
}
|
4910
4933
|
) : rightIcon
|
4911
4934
|
}
|
4912
|
-
), state2.isOpen && !isLoading && /* @__PURE__ */
|
4935
|
+
), state2.isOpen && !isLoading && /* @__PURE__ */ React50__namespace.default.createElement(
|
4913
4936
|
Popover3,
|
4914
4937
|
{
|
4915
4938
|
state: state2,
|
@@ -4921,7 +4944,7 @@ function Combobox({
|
|
4921
4944
|
hasBackdrop: false,
|
4922
4945
|
containerPadding: 0
|
4923
4946
|
},
|
4924
|
-
/* @__PURE__ */
|
4947
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
4925
4948
|
ListBox,
|
4926
4949
|
{
|
4927
4950
|
...listBoxProps,
|
@@ -4940,8 +4963,8 @@ var init_Combobox = __esm({
|
|
4940
4963
|
init_src();
|
4941
4964
|
init_Popover();
|
4942
4965
|
useInputWidth = (inputRef) => {
|
4943
|
-
const [inputWidth, setInputWidth] =
|
4944
|
-
|
4966
|
+
const [inputWidth, setInputWidth] = React50.useState("auto");
|
4967
|
+
React50.useEffect(() => {
|
4945
4968
|
const onResize = debounce(() => {
|
4946
4969
|
if (inputRef.current) {
|
4947
4970
|
setInputWidth(`${inputRef.current.offsetWidth}px`);
|
@@ -4968,7 +4991,7 @@ exports.FormControl = void 0;
|
|
4968
4991
|
var init_FormControl = __esm({
|
4969
4992
|
"src/input/FormControl.tsx"() {
|
4970
4993
|
exports.FormControl = react.forwardRef((props, ref) => {
|
4971
|
-
return /* @__PURE__ */
|
4994
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.FormControl, { ...props, ref });
|
4972
4995
|
});
|
4973
4996
|
}
|
4974
4997
|
});
|
@@ -4989,7 +5012,7 @@ var init_FormErrorMessage = __esm({
|
|
4989
5012
|
return null;
|
4990
5013
|
}
|
4991
5014
|
const { ref, ...errorMessageProps } = formControlContext.getErrorMessageProps();
|
4992
|
-
return /* @__PURE__ */
|
5015
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { position: "relative", ref }, /* @__PURE__ */ React50__namespace.default.createElement(
|
4993
5016
|
react.Box,
|
4994
5017
|
{
|
4995
5018
|
borderRadius: "xs",
|
@@ -5007,12 +5030,12 @@ var init_FormErrorMessage = __esm({
|
|
5007
5030
|
...errorMessageProps,
|
5008
5031
|
...boxProps
|
5009
5032
|
},
|
5010
|
-
/* @__PURE__ */
|
5033
|
+
/* @__PURE__ */ React50__namespace.default.createElement(Arrow, { position: "absolute", top: "-0.25em", left: "1em" }),
|
5011
5034
|
children
|
5012
5035
|
));
|
5013
5036
|
};
|
5014
5037
|
Arrow = (props) => {
|
5015
|
-
return /* @__PURE__ */
|
5038
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
5016
5039
|
react.Box,
|
5017
5040
|
{
|
5018
5041
|
...props,
|
@@ -5023,7 +5046,7 @@ var init_FormErrorMessage = __esm({
|
|
5023
5046
|
fill: "none",
|
5024
5047
|
transform: "rotate(45deg)"
|
5025
5048
|
},
|
5026
|
-
/* @__PURE__ */
|
5049
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
5027
5050
|
react.Box,
|
5028
5051
|
{
|
5029
5052
|
as: "path",
|
@@ -5039,7 +5062,7 @@ exports.FormLabel = void 0;
|
|
5039
5062
|
var init_FormLabel = __esm({
|
5040
5063
|
"src/input/FormLabel.tsx"() {
|
5041
5064
|
exports.FormLabel = react.forwardRef((props, ref) => {
|
5042
|
-
return /* @__PURE__ */
|
5065
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.FormLabel, { ...props, ref });
|
5043
5066
|
});
|
5044
5067
|
}
|
5045
5068
|
});
|
@@ -5052,7 +5075,7 @@ function ListBox({
|
|
5052
5075
|
}) {
|
5053
5076
|
const { listBoxProps } = reactAria.useListBox(props, state2, listBoxRef);
|
5054
5077
|
const styles2 = react.useMultiStyleConfig("ListBox", {});
|
5055
|
-
return /* @__PURE__ */
|
5078
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
5056
5079
|
react.List,
|
5057
5080
|
{
|
5058
5081
|
...listBoxProps,
|
@@ -5063,22 +5086,22 @@ function ListBox({
|
|
5063
5086
|
},
|
5064
5087
|
state2.collection.size === 0 && props.emptyContent,
|
5065
5088
|
Array.from(state2.collection).map(
|
5066
|
-
(item) => item.type === "section" ? /* @__PURE__ */
|
5089
|
+
(item) => item.type === "section" ? /* @__PURE__ */ React50__namespace.default.createElement(ListBoxSection, { key: item.key, section: item, state: state2 }) : /* @__PURE__ */ React50__namespace.default.createElement(Option, { key: item.key, item, state: state2 })
|
5067
5090
|
)
|
5068
5091
|
);
|
5069
5092
|
}
|
5070
5093
|
function ItemLabel({ children }) {
|
5071
5094
|
let { labelProps } = useOptionContext();
|
5072
5095
|
const styles2 = react.useMultiStyleConfig("ListBox", {});
|
5073
|
-
return /* @__PURE__ */
|
5096
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...labelProps, sx: styles2.label }, children);
|
5074
5097
|
}
|
5075
5098
|
function ItemDescription({ children }) {
|
5076
5099
|
let { descriptionProps } = useOptionContext();
|
5077
5100
|
const styles2 = react.useMultiStyleConfig("ListBox", {});
|
5078
|
-
return /* @__PURE__ */
|
5101
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...descriptionProps, sx: styles2.description }, children);
|
5079
5102
|
}
|
5080
5103
|
function Option({ item, state: state2 }) {
|
5081
|
-
const ref =
|
5104
|
+
const ref = React50.useRef(null);
|
5082
5105
|
const {
|
5083
5106
|
optionProps,
|
5084
5107
|
isSelected,
|
@@ -5098,7 +5121,7 @@ function Option({ item, state: state2 }) {
|
|
5098
5121
|
if (isFocused) {
|
5099
5122
|
dataFields["data-focus"] = true;
|
5100
5123
|
}
|
5101
|
-
|
5124
|
+
React50.useEffect(() => {
|
5102
5125
|
var _a6;
|
5103
5126
|
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
5104
5127
|
"touchend",
|
@@ -5108,7 +5131,7 @@ function Option({ item, state: state2 }) {
|
|
5108
5131
|
{ passive: false, once: true }
|
5109
5132
|
);
|
5110
5133
|
}, []);
|
5111
|
-
return /* @__PURE__ */
|
5134
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React50__namespace.default.createElement(react.ListItem, { ...optionProps, ...dataFields, ref, sx: styles2.item }, item.rendered));
|
5112
5135
|
}
|
5113
5136
|
function ListBoxSection({ section, state: state2 }) {
|
5114
5137
|
const { itemProps, headingProps, groupProps } = reactAria.useListBoxSection({
|
@@ -5117,7 +5140,7 @@ function ListBoxSection({ section, state: state2 }) {
|
|
5117
5140
|
});
|
5118
5141
|
const isFirstSection = section.key === state2.collection.getFirstKey();
|
5119
5142
|
const titleColor = react.useColorModeValue("darkGrey", "white");
|
5120
|
-
return /* @__PURE__ */
|
5143
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.ListItem, { ...itemProps }, section.rendered && /* @__PURE__ */ React50__namespace.default.createElement(
|
5121
5144
|
react.Box,
|
5122
5145
|
{
|
5123
5146
|
fontSize: "mobile.xs",
|
@@ -5130,19 +5153,19 @@ function ListBoxSection({ section, state: state2 }) {
|
|
5130
5153
|
...headingProps
|
5131
5154
|
},
|
5132
5155
|
section.rendered
|
5133
|
-
), /* @__PURE__ */
|
5134
|
-
(item) => /* @__PURE__ */
|
5156
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(react.List, { ...groupProps, padding: 0, listStyleType: "none" }, Array.from(state2.collection.getChildren(section.key)).map(
|
5157
|
+
(item) => /* @__PURE__ */ React50__namespace.default.createElement(Option, { key: item.key, item, state: state2 })
|
5135
5158
|
)));
|
5136
5159
|
}
|
5137
5160
|
var OptionContext, useOptionContext;
|
5138
5161
|
var init_ListBox = __esm({
|
5139
5162
|
"src/input/ListBox.tsx"() {
|
5140
|
-
OptionContext =
|
5163
|
+
OptionContext = React50__namespace.default.createContext({
|
5141
5164
|
labelProps: {},
|
5142
5165
|
descriptionProps: {}
|
5143
5166
|
});
|
5144
5167
|
useOptionContext = () => {
|
5145
|
-
return
|
5168
|
+
return React50.useContext(OptionContext);
|
5146
5169
|
};
|
5147
5170
|
}
|
5148
5171
|
});
|
@@ -5163,8 +5186,8 @@ function InfoSelect({
|
|
5163
5186
|
...props
|
5164
5187
|
};
|
5165
5188
|
const state2 = reactStately.useSelectState(renamedProps);
|
5166
|
-
const triggerRef =
|
5167
|
-
const listboxRef =
|
5189
|
+
const triggerRef = React50.useRef(null);
|
5190
|
+
const listboxRef = React50.useRef(null);
|
5168
5191
|
const { labelProps, triggerProps, valueProps, menuProps } = reactAria.useSelect(
|
5169
5192
|
renamedProps,
|
5170
5193
|
state2,
|
@@ -5177,7 +5200,7 @@ function InfoSelect({
|
|
5177
5200
|
const { buttonProps } = reactAria.useButton(triggerProps, triggerRef);
|
5178
5201
|
const { t: t2 } = useTranslation();
|
5179
5202
|
const formControl = react.useFormControlProps(props);
|
5180
|
-
return /* @__PURE__ */
|
5203
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles2.container }, /* @__PURE__ */ React50__namespace.default.createElement(react.chakra.div, { ...labelProps, sx: styles2.label }, props.label), /* @__PURE__ */ React50__namespace.default.createElement(
|
5181
5204
|
reactAria.HiddenSelect,
|
5182
5205
|
{
|
5183
5206
|
state: state2,
|
@@ -5185,7 +5208,7 @@ function InfoSelect({
|
|
5185
5208
|
label: props.label,
|
5186
5209
|
name: props.name
|
5187
5210
|
}
|
5188
|
-
), /* @__PURE__ */
|
5211
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
5189
5212
|
react.chakra.button,
|
5190
5213
|
{
|
5191
5214
|
type: "button",
|
@@ -5198,16 +5221,16 @@ function InfoSelect({
|
|
5198
5221
|
"aria-invalid": formControl.isInvalid,
|
5199
5222
|
"aria-describedby": formControl["aria-describedby"]
|
5200
5223
|
},
|
5201
|
-
/* @__PURE__ */
|
5202
|
-
/* @__PURE__ */
|
5203
|
-
), state2.isOpen && /* @__PURE__ */
|
5224
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...valueProps }, state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)),
|
5225
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles2.arrowIcon }, state2.isOpen ? /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.DropdownUpFill24Icon, null) : /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.DropdownDownFill24Icon, null))
|
5226
|
+
), state2.isOpen && /* @__PURE__ */ React50__namespace.default.createElement(
|
5204
5227
|
Popover3,
|
5205
5228
|
{
|
5206
5229
|
state: state2,
|
5207
5230
|
triggerRef,
|
5208
5231
|
containerPadding: 0
|
5209
5232
|
},
|
5210
|
-
/* @__PURE__ */
|
5233
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
5211
5234
|
ListBox,
|
5212
5235
|
{
|
5213
5236
|
...menuProps,
|
@@ -5241,9 +5264,9 @@ var init_Input = __esm({
|
|
5241
5264
|
exports.Input = react.forwardRef(
|
5242
5265
|
({ label, leftIcon, rightIcon, id, size: size2, ...props }, ref) => {
|
5243
5266
|
const formControlProps = react.useFormControlContext();
|
5244
|
-
const fallbackId = `input-${
|
5267
|
+
const fallbackId = `input-${React50.useId()}`;
|
5245
5268
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
5246
|
-
return /* @__PURE__ */
|
5269
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React50__namespace.default.createElement(react.InputLeftElement, { pointerEvents: "none" }, leftIcon), /* @__PURE__ */ React50__namespace.default.createElement(
|
5247
5270
|
react.Input,
|
5248
5271
|
{
|
5249
5272
|
"data-attachable": true,
|
@@ -5254,7 +5277,7 @@ var init_Input = __esm({
|
|
5254
5277
|
ref,
|
5255
5278
|
placeholder: " "
|
5256
5279
|
}
|
5257
|
-
), /* @__PURE__ */
|
5280
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(react.FormLabel, { htmlFor: inputId }, label), rightIcon && /* @__PURE__ */ React50__namespace.default.createElement(react.InputRightElement, { pointerEvents: "none" }, rightIcon));
|
5258
5281
|
}
|
5259
5282
|
);
|
5260
5283
|
}
|
@@ -5263,10 +5286,10 @@ exports.InputLeftElement = void 0; exports.InputRightElement = void 0;
|
|
5263
5286
|
var init_InputElement = __esm({
|
5264
5287
|
"src/input/InputElement.tsx"() {
|
5265
5288
|
exports.InputLeftElement = react.forwardRef(
|
5266
|
-
(props, ref) => /* @__PURE__ */
|
5289
|
+
(props, ref) => /* @__PURE__ */ React50__namespace.default.createElement(react.InputLeftElement, { ...props, ref })
|
5267
5290
|
);
|
5268
5291
|
exports.InputRightElement = react.forwardRef(
|
5269
|
-
(props, ref) => /* @__PURE__ */
|
5292
|
+
(props, ref) => /* @__PURE__ */ React50__namespace.default.createElement(react.InputRightElement, { ...props, ref })
|
5270
5293
|
);
|
5271
5294
|
}
|
5272
5295
|
});
|
@@ -5277,7 +5300,7 @@ var init_NativeSelect = __esm({
|
|
5277
5300
|
exports.NativeSelect = react.forwardRef(
|
5278
5301
|
({ label, ...props }, ref) => {
|
5279
5302
|
const styles2 = react.useMultiStyleConfig("Select", props);
|
5280
|
-
return /* @__PURE__ */
|
5303
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(exports.FormControl, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
5281
5304
|
react.Select,
|
5282
5305
|
{
|
5283
5306
|
"data-attachable": true,
|
@@ -5285,7 +5308,7 @@ var init_NativeSelect = __esm({
|
|
5285
5308
|
rootProps: { __css: styles2.root },
|
5286
5309
|
ref
|
5287
5310
|
}
|
5288
|
-
), label && /* @__PURE__ */
|
5311
|
+
), label && /* @__PURE__ */ React50__namespace.default.createElement(exports.FormLabel, null, label));
|
5289
5312
|
}
|
5290
5313
|
);
|
5291
5314
|
}
|
@@ -5381,16 +5404,16 @@ function NumericStepper({
|
|
5381
5404
|
const textColor = react.useColorModeValue("darkGrey", "white");
|
5382
5405
|
const backgroundColor = react.useColorModeValue("white", "darkGrey");
|
5383
5406
|
const focusColor = react.useColorModeValue("greenHaze", "azure");
|
5384
|
-
return /* @__PURE__ */
|
5407
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { alignItems: "center", ...boxProps }, /* @__PURE__ */ React50__namespace.default.createElement(
|
5385
5408
|
VerySmallButton,
|
5386
5409
|
{
|
5387
|
-
icon: /* @__PURE__ */
|
5410
|
+
icon: /* @__PURE__ */ React50__namespace.default.createElement(SubtractIcon, { color: "white" }),
|
5388
5411
|
"aria-label": t2(texts12.decrementButtonAriaLabel),
|
5389
5412
|
onClick: () => onChange(value - 1),
|
5390
5413
|
visibility: value <= minValue ? "hidden" : "visible",
|
5391
5414
|
isDisabled: formControlProps.disabled
|
5392
5415
|
}
|
5393
|
-
), withInput ? /* @__PURE__ */
|
5416
|
+
), withInput ? /* @__PURE__ */ React50__namespace.default.createElement(
|
5394
5417
|
react.chakra.input,
|
5395
5418
|
{
|
5396
5419
|
type: "number",
|
@@ -5440,7 +5463,7 @@ function NumericStepper({
|
|
5440
5463
|
onChange(numericInput);
|
5441
5464
|
}
|
5442
5465
|
}
|
5443
|
-
) : /* @__PURE__ */
|
5466
|
+
) : /* @__PURE__ */ React50__namespace.default.createElement(
|
5444
5467
|
react.chakra.text,
|
5445
5468
|
{
|
5446
5469
|
fontSize: "sm",
|
@@ -5455,10 +5478,10 @@ function NumericStepper({
|
|
5455
5478
|
"aria-label": value.toString()
|
5456
5479
|
},
|
5457
5480
|
value
|
5458
|
-
), /* @__PURE__ */
|
5481
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
5459
5482
|
VerySmallButton,
|
5460
5483
|
{
|
5461
|
-
icon: /* @__PURE__ */
|
5484
|
+
icon: /* @__PURE__ */ React50__namespace.default.createElement(AddIcon, { color: "white" }),
|
5462
5485
|
"aria-label": t2(texts12.incrementButtonAriaLabel),
|
5463
5486
|
onClick: () => onChange(value + 1),
|
5464
5487
|
visibility: value >= maxValue ? "hidden" : "visible",
|
@@ -5474,7 +5497,7 @@ var init_NumericStepper = __esm({
|
|
5474
5497
|
init_box_shadow_utils();
|
5475
5498
|
init_focus_utils();
|
5476
5499
|
VerySmallButton = (props) => {
|
5477
|
-
return /* @__PURE__ */
|
5500
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
5478
5501
|
exports.IconButton,
|
5479
5502
|
{
|
5480
5503
|
variant: "primary",
|
@@ -5491,7 +5514,7 @@ var init_NumericStepper = __esm({
|
|
5491
5514
|
}
|
5492
5515
|
);
|
5493
5516
|
};
|
5494
|
-
SubtractIcon = (props) => /* @__PURE__ */
|
5517
|
+
SubtractIcon = (props) => /* @__PURE__ */ React50__namespace.default.createElement(
|
5495
5518
|
react.Box,
|
5496
5519
|
{
|
5497
5520
|
as: "svg",
|
@@ -5501,7 +5524,7 @@ var init_NumericStepper = __esm({
|
|
5501
5524
|
stroke: "currentColor",
|
5502
5525
|
...props
|
5503
5526
|
},
|
5504
|
-
/* @__PURE__ */
|
5527
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
5505
5528
|
"line",
|
5506
5529
|
{
|
5507
5530
|
x1: "9",
|
@@ -5513,7 +5536,7 @@ var init_NumericStepper = __esm({
|
|
5513
5536
|
}
|
5514
5537
|
)
|
5515
5538
|
);
|
5516
|
-
AddIcon = (props) => /* @__PURE__ */
|
5539
|
+
AddIcon = (props) => /* @__PURE__ */ React50__namespace.default.createElement(
|
5517
5540
|
react.Box,
|
5518
5541
|
{
|
5519
5542
|
as: "svg",
|
@@ -5523,7 +5546,7 @@ var init_NumericStepper = __esm({
|
|
5523
5546
|
stroke: "currentColor",
|
5524
5547
|
...props
|
5525
5548
|
},
|
5526
|
-
/* @__PURE__ */
|
5549
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
5527
5550
|
"line",
|
5528
5551
|
{
|
5529
5552
|
x1: "9",
|
@@ -5534,7 +5557,7 @@ var init_NumericStepper = __esm({
|
|
5534
5557
|
strokeLinecap: "round"
|
5535
5558
|
}
|
5536
5559
|
),
|
5537
|
-
/* @__PURE__ */
|
5560
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
5538
5561
|
"line",
|
5539
5562
|
{
|
5540
5563
|
x1: "15",
|
@@ -5572,9 +5595,9 @@ var init_PasswordInput = __esm({
|
|
5572
5595
|
const { isOpen: isShowingPassword, onToggle } = react.useDisclosure();
|
5573
5596
|
const { t: t2 } = useTranslation();
|
5574
5597
|
const formControlProps = react.useFormControlContext();
|
5575
|
-
const autoGeneratedId = `password-input-${
|
5598
|
+
const autoGeneratedId = `password-input-${React50.useId()}`;
|
5576
5599
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
5577
|
-
return /* @__PURE__ */
|
5600
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React50__namespace.default.createElement(exports.InputLeftElement, null, leftIcon), /* @__PURE__ */ React50__namespace.default.createElement(
|
5578
5601
|
react.Input,
|
5579
5602
|
{
|
5580
5603
|
...props,
|
@@ -5586,7 +5609,7 @@ var init_PasswordInput = __esm({
|
|
5586
5609
|
ref,
|
5587
5610
|
"data-attachable": true
|
5588
5611
|
}
|
5589
|
-
), /* @__PURE__ */
|
5612
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(exports.FormLabel, { htmlFor: inputId, pointerEvents: "none" }, label), /* @__PURE__ */ React50__namespace.default.createElement(exports.InputRightElement, { width: "fit-content" }, /* @__PURE__ */ React50__namespace.default.createElement(
|
5590
5613
|
react.Button,
|
5591
5614
|
{
|
5592
5615
|
variant: "ghost",
|
@@ -12128,7 +12151,7 @@ var init_CountryCodeSelect = __esm({
|
|
12128
12151
|
callingCodes = [...prioritizedCountryCodes, ...sortedCallingCodes];
|
12129
12152
|
CountryCodeSelect = (props) => {
|
12130
12153
|
const { t: t2 } = useTranslation();
|
12131
|
-
return /* @__PURE__ */
|
12154
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
12132
12155
|
InfoSelect,
|
12133
12156
|
{
|
12134
12157
|
label: t2(texts14.countryCode),
|
@@ -12136,7 +12159,7 @@ var init_CountryCodeSelect = __esm({
|
|
12136
12159
|
items: callingCodes,
|
12137
12160
|
...props
|
12138
12161
|
},
|
12139
|
-
(item) => /* @__PURE__ */
|
12162
|
+
(item) => /* @__PURE__ */ React50__namespace.default.createElement(reactStately.Item, { key: item.key }, item.key)
|
12140
12163
|
);
|
12141
12164
|
};
|
12142
12165
|
CountryCodeSelect_default = CountryCodeSelect;
|
@@ -12166,10 +12189,10 @@ var init_PhoneNumberInput = __esm({
|
|
12166
12189
|
nationalNumber: ""
|
12167
12190
|
}
|
12168
12191
|
});
|
12169
|
-
return /* @__PURE__ */
|
12170
|
-
|
12192
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(exports.AttachedInputs, { ...boxProps }, /* @__PURE__ */ React50__namespace.default.createElement(
|
12193
|
+
React50.Suspense,
|
12171
12194
|
{
|
12172
|
-
fallback: /* @__PURE__ */
|
12195
|
+
fallback: /* @__PURE__ */ React50__namespace.default.createElement(
|
12173
12196
|
InfoSelect,
|
12174
12197
|
{
|
12175
12198
|
isLabelSrOnly: true,
|
@@ -12178,10 +12201,10 @@ var init_PhoneNumberInput = __esm({
|
|
12178
12201
|
height: "100%",
|
12179
12202
|
value: "+47"
|
12180
12203
|
},
|
12181
|
-
/* @__PURE__ */
|
12204
|
+
/* @__PURE__ */ React50__namespace.default.createElement(reactStately.Item, { key: "+47" }, "+47")
|
12182
12205
|
)
|
12183
12206
|
},
|
12184
|
-
/* @__PURE__ */
|
12207
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
12185
12208
|
LazyCountryCodeSelect,
|
12186
12209
|
{
|
12187
12210
|
value: value.countryCode,
|
@@ -12194,7 +12217,7 @@ var init_PhoneNumberInput = __esm({
|
|
12194
12217
|
width: "6.25rem"
|
12195
12218
|
}
|
12196
12219
|
)
|
12197
|
-
), /* @__PURE__ */
|
12220
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
12198
12221
|
exports.Input,
|
12199
12222
|
{
|
12200
12223
|
ref,
|
@@ -12223,14 +12246,14 @@ var init_PhoneNumberInput = __esm({
|
|
12223
12246
|
sv: "Telefonnummer"
|
12224
12247
|
}
|
12225
12248
|
});
|
12226
|
-
LazyCountryCodeSelect =
|
12249
|
+
LazyCountryCodeSelect = React50__namespace.default.lazy(() => Promise.resolve().then(() => (init_CountryCodeSelect(), CountryCodeSelect_exports)));
|
12227
12250
|
}
|
12228
12251
|
});
|
12229
12252
|
exports.Radio = void 0;
|
12230
12253
|
var init_Radio = __esm({
|
12231
12254
|
"src/input/Radio.tsx"() {
|
12232
12255
|
exports.Radio = react.forwardRef((props, ref) => {
|
12233
|
-
return /* @__PURE__ */
|
12256
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Radio, { ...props, ref });
|
12234
12257
|
});
|
12235
12258
|
}
|
12236
12259
|
});
|
@@ -12239,7 +12262,7 @@ var init_RadioGroup = __esm({
|
|
12239
12262
|
"src/input/RadioGroup.tsx"() {
|
12240
12263
|
exports.RadioGroup = react.forwardRef(
|
12241
12264
|
({ children, direction: direction2 = "row", ...rest }, ref) => {
|
12242
|
-
return /* @__PURE__ */
|
12265
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.RadioGroup, { ...rest, ref }, /* @__PURE__ */ React50__namespace.default.createElement(react.Stack, { direction: direction2 }, children));
|
12243
12266
|
}
|
12244
12267
|
);
|
12245
12268
|
}
|
@@ -12254,9 +12277,9 @@ var init_SearchInput = __esm({
|
|
12254
12277
|
const { t: t2 } = useTranslation();
|
12255
12278
|
const showClearButton = onReset && Boolean(props.value);
|
12256
12279
|
const formControlProps = react.useFormControlContext();
|
12257
|
-
const autoGeneratedId =
|
12280
|
+
const autoGeneratedId = React50.useId();
|
12258
12281
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
12259
|
-
return /* @__PURE__ */
|
12282
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.InputGroup, { position: "relative" }, /* @__PURE__ */ React50__namespace.default.createElement(exports.InputLeftElement, null, /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.SearchOutline24Icon, null)), /* @__PURE__ */ React50__namespace.default.createElement(
|
12260
12283
|
react.Input,
|
12261
12284
|
{
|
12262
12285
|
pl: 7,
|
@@ -12273,7 +12296,7 @@ var init_SearchInput = __esm({
|
|
12273
12296
|
placeholder: " ",
|
12274
12297
|
"data-attachable": true
|
12275
12298
|
}
|
12276
|
-
), /* @__PURE__ */
|
12299
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(exports.FormLabel, { htmlFor: inputId, pointerEvents: "none" }, label ?? t2(texts16.label)), showClearButton && /* @__PURE__ */ React50__namespace.default.createElement(exports.InputRightElement, { width: "fit-content" }, /* @__PURE__ */ React50__namespace.default.createElement(
|
12277
12300
|
react.IconButton,
|
12278
12301
|
{
|
12279
12302
|
variant: "ghost",
|
@@ -12281,7 +12304,7 @@ var init_SearchInput = __esm({
|
|
12281
12304
|
size: "sm",
|
12282
12305
|
mr: 1,
|
12283
12306
|
"aria-label": t2(texts16.reset),
|
12284
|
-
icon: /* @__PURE__ */
|
12307
|
+
icon: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CloseOutline24Icon, null),
|
12285
12308
|
onClick: onReset
|
12286
12309
|
}
|
12287
12310
|
)));
|
@@ -12308,7 +12331,7 @@ var init_Switch = __esm({
|
|
12308
12331
|
"src/input/Switch.tsx"() {
|
12309
12332
|
exports.Switch = react.forwardRef(
|
12310
12333
|
({ size: size2 = "md", ...props }, ref) => {
|
12311
|
-
return /* @__PURE__ */
|
12334
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Switch, { variant: "solid", size: size2, ...props, ref });
|
12312
12335
|
}
|
12313
12336
|
);
|
12314
12337
|
}
|
@@ -12380,9 +12403,9 @@ var init_Textarea = __esm({
|
|
12380
12403
|
remainingProps: { label, ...rest }
|
12381
12404
|
} = getSpacingProps(props);
|
12382
12405
|
const formControlProps = react.useFormControlContext();
|
12383
|
-
const fallbackId = `textarea-${
|
12406
|
+
const fallbackId = `textarea-${React50.useId()}`;
|
12384
12407
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
12385
|
-
return /* @__PURE__ */
|
12408
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.InputGroup, { position: "relative", ...spacingProps }, /* @__PURE__ */ React50__namespace.default.createElement(react.Textarea, { ...rest, id: inputId, ref, placeholder: " " }), label && /* @__PURE__ */ React50__namespace.default.createElement(react.FormLabel, { htmlFor: inputId, id: `${inputId}-label` }, label));
|
12386
12409
|
});
|
12387
12410
|
}
|
12388
12411
|
});
|
@@ -12478,7 +12501,7 @@ var init_LineIcon = __esm({
|
|
12478
12501
|
if (!Icon) {
|
12479
12502
|
return null;
|
12480
12503
|
}
|
12481
|
-
return /* @__PURE__ */
|
12504
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: { ...styles2.iconContainer, ...sx }, ...rest }, /* @__PURE__ */ React50__namespace.default.createElement(Icon, { sx: styles2.icon }));
|
12482
12505
|
};
|
12483
12506
|
}
|
12484
12507
|
});
|
@@ -12493,7 +12516,7 @@ var init_InfoTag = __esm({
|
|
12493
12516
|
description
|
12494
12517
|
}) => {
|
12495
12518
|
const styles2 = react.useMultiStyleConfig("InfoTag", { variant, size: size2 });
|
12496
|
-
return /* @__PURE__ */
|
12519
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles2.container }, /* @__PURE__ */ React50__namespace.default.createElement(exports.LineIcon, { variant, size: size2, sx: styles2.iconContainer }), /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles2.textContainer }, title && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "span", sx: styles2.title }, title), title && description && " ", description && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "span", sx: styles2.description }, description)));
|
12497
12520
|
};
|
12498
12521
|
}
|
12499
12522
|
});
|
@@ -12517,7 +12540,7 @@ var init_TravelTag = __esm({
|
|
12517
12540
|
deviationLevel
|
12518
12541
|
});
|
12519
12542
|
const DeviationLevelIcon = getDeviationLevelIcon({ deviationLevel, size: size2 });
|
12520
|
-
return /* @__PURE__ */
|
12543
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles2.container, "aria-disabled": isDisabled, ref, ...rest }, /* @__PURE__ */ React50__namespace.default.createElement(exports.LineIcon, { variant, size: size2, sx: styles2.iconContainer }), /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles2.textContainer }, title && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "span", sx: styles2.title }, title), title && description && " ", description && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "span", sx: styles2.description }, description)), DeviationLevelIcon && /* @__PURE__ */ React50__namespace.default.createElement(DeviationLevelIcon, { sx: styles2.deviationIcon }));
|
12521
12544
|
}
|
12522
12545
|
);
|
12523
12546
|
getDeviationLevelIcon = ({
|
@@ -12556,7 +12579,7 @@ var init_TextLink = __esm({
|
|
12556
12579
|
var _a6;
|
12557
12580
|
const { t: t2 } = useTranslation();
|
12558
12581
|
const isExternal = props.isExternal !== void 0 ? props.isExternal : Boolean((_a6 = props.href) == null ? void 0 : _a6.match(/^https?:\/\//));
|
12559
|
-
return /* @__PURE__ */
|
12582
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Link, { ...props, ref, isExternal }, children, isExternal && /* @__PURE__ */ React50__namespace.default.createElement(
|
12560
12583
|
sporIconReact.LinkOutOutline24Icon,
|
12561
12584
|
{
|
12562
12585
|
marginLeft: 0.5,
|
@@ -12588,8 +12611,8 @@ var init_VyLogo = __esm({
|
|
12588
12611
|
exports.VyLogo = ({ colorScheme, ...boxProps }) => {
|
12589
12612
|
const mainColor = colorScheme === "light" ? "#1d211c" : "#ffffff";
|
12590
12613
|
const accentColor = colorScheme === "light" ? "#138c6e" : "#ffffff";
|
12591
|
-
const id =
|
12592
|
-
return /* @__PURE__ */
|
12614
|
+
const id = React50.useId();
|
12615
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "svg", viewBox: "0 0 107 54", ...boxProps }, /* @__PURE__ */ React50__namespace.default.createElement("title", null, "Vy logo"), /* @__PURE__ */ React50__namespace.default.createElement(
|
12593
12616
|
"path",
|
12594
12617
|
{
|
12595
12618
|
fillRule: "evenodd",
|
@@ -12597,7 +12620,7 @@ var init_VyLogo = __esm({
|
|
12597
12620
|
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",
|
12598
12621
|
fill: mainColor
|
12599
12622
|
}
|
12600
|
-
), /* @__PURE__ */
|
12623
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
12601
12624
|
"mask",
|
12602
12625
|
{
|
12603
12626
|
id: `${id}-a`,
|
@@ -12608,7 +12631,7 @@ var init_VyLogo = __esm({
|
|
12608
12631
|
width: "94",
|
12609
12632
|
height: "54"
|
12610
12633
|
},
|
12611
|
-
/* @__PURE__ */
|
12634
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
12612
12635
|
"path",
|
12613
12636
|
{
|
12614
12637
|
fillRule: "evenodd",
|
@@ -12617,7 +12640,7 @@ var init_VyLogo = __esm({
|
|
12617
12640
|
fill: mainColor
|
12618
12641
|
}
|
12619
12642
|
)
|
12620
|
-
), /* @__PURE__ */
|
12643
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
12621
12644
|
"g",
|
12622
12645
|
{
|
12623
12646
|
mask: `url(#${id}-a)`,
|
@@ -12625,9 +12648,9 @@ var init_VyLogo = __esm({
|
|
12625
12648
|
clipRule: "evenodd",
|
12626
12649
|
fill: mainColor
|
12627
12650
|
},
|
12628
|
-
/* @__PURE__ */
|
12629
|
-
/* @__PURE__ */
|
12630
|
-
), /* @__PURE__ */
|
12651
|
+
/* @__PURE__ */ React50__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" }),
|
12652
|
+
/* @__PURE__ */ React50__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" })
|
12653
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
12631
12654
|
"path",
|
12632
12655
|
{
|
12633
12656
|
fillRule: "evenodd",
|
@@ -12635,7 +12658,7 @@ var init_VyLogo = __esm({
|
|
12635
12658
|
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",
|
12636
12659
|
fill: accentColor
|
12637
12660
|
}
|
12638
|
-
), /* @__PURE__ */
|
12661
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
12639
12662
|
"path",
|
12640
12663
|
{
|
12641
12664
|
fillRule: "evenodd",
|
@@ -12643,7 +12666,7 @@ var init_VyLogo = __esm({
|
|
12643
12666
|
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",
|
12644
12667
|
fill: mainColor
|
12645
12668
|
}
|
12646
|
-
), /* @__PURE__ */
|
12669
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
12647
12670
|
"mask",
|
12648
12671
|
{
|
12649
12672
|
id: `${id}-b`,
|
@@ -12654,7 +12677,7 @@ var init_VyLogo = __esm({
|
|
12654
12677
|
width: "78",
|
12655
12678
|
height: "54"
|
12656
12679
|
},
|
12657
|
-
/* @__PURE__ */
|
12680
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
12658
12681
|
"path",
|
12659
12682
|
{
|
12660
12683
|
fillRule: "evenodd",
|
@@ -12663,25 +12686,25 @@ var init_VyLogo = __esm({
|
|
12663
12686
|
fill: mainColor
|
12664
12687
|
}
|
12665
12688
|
)
|
12666
|
-
), /* @__PURE__ */
|
12689
|
+
), /* @__PURE__ */ React50__namespace.default.createElement("g", { mask: `url(#${id}-b)`, fillRule: "evenodd", clipRule: "evenodd" }, /* @__PURE__ */ React50__namespace.default.createElement(
|
12667
12690
|
"path",
|
12668
12691
|
{
|
12669
12692
|
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",
|
12670
12693
|
fill: mainColor
|
12671
12694
|
}
|
12672
|
-
), /* @__PURE__ */
|
12695
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
12673
12696
|
"path",
|
12674
12697
|
{
|
12675
12698
|
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",
|
12676
12699
|
fill: mainColor
|
12677
12700
|
}
|
12678
|
-
), /* @__PURE__ */
|
12701
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
12679
12702
|
"path",
|
12680
12703
|
{
|
12681
12704
|
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",
|
12682
12705
|
fill: accentColor
|
12683
12706
|
}
|
12684
|
-
)), /* @__PURE__ */
|
12707
|
+
)), /* @__PURE__ */ React50__namespace.default.createElement(
|
12685
12708
|
"path",
|
12686
12709
|
{
|
12687
12710
|
fillRule: "evenodd",
|
@@ -12703,7 +12726,7 @@ var init_logo = __esm({
|
|
12703
12726
|
var JumpForwardIcon, JumpBackwardIcon, PlayIcon, PauseIcon, SkipNextIcon, SkipPreviousIcon;
|
12704
12727
|
var init_icons2 = __esm({
|
12705
12728
|
"src/media-controller/icons.tsx"() {
|
12706
|
-
JumpForwardIcon = (props) => /* @__PURE__ */
|
12729
|
+
JumpForwardIcon = (props) => /* @__PURE__ */ React50__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 32 30", fill: "none" }, /* @__PURE__ */ React50__namespace.createElement(
|
12707
12730
|
"path",
|
12708
12731
|
{
|
12709
12732
|
fillRule: "evenodd",
|
@@ -12711,7 +12734,7 @@ var init_icons2 = __esm({
|
|
12711
12734
|
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",
|
12712
12735
|
fill: "currentColor"
|
12713
12736
|
}
|
12714
|
-
), /* @__PURE__ */
|
12737
|
+
), /* @__PURE__ */ React50__namespace.createElement(
|
12715
12738
|
"path",
|
12716
12739
|
{
|
12717
12740
|
fillRule: "evenodd",
|
@@ -12720,7 +12743,7 @@ var init_icons2 = __esm({
|
|
12720
12743
|
fill: "currentColor"
|
12721
12744
|
}
|
12722
12745
|
));
|
12723
|
-
JumpBackwardIcon = (props) => /* @__PURE__ */
|
12746
|
+
JumpBackwardIcon = (props) => /* @__PURE__ */ React50__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 32 30", fill: "none" }, /* @__PURE__ */ React50__namespace.createElement(
|
12724
12747
|
"path",
|
12725
12748
|
{
|
12726
12749
|
fillRule: "evenodd",
|
@@ -12728,7 +12751,7 @@ var init_icons2 = __esm({
|
|
12728
12751
|
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",
|
12729
12752
|
fill: "currentColor"
|
12730
12753
|
}
|
12731
|
-
), /* @__PURE__ */
|
12754
|
+
), /* @__PURE__ */ React50__namespace.createElement(
|
12732
12755
|
"path",
|
12733
12756
|
{
|
12734
12757
|
fillRule: "evenodd",
|
@@ -12737,7 +12760,7 @@ var init_icons2 = __esm({
|
|
12737
12760
|
fill: "currentColor"
|
12738
12761
|
}
|
12739
12762
|
));
|
12740
|
-
PlayIcon = (props) => /* @__PURE__ */
|
12763
|
+
PlayIcon = (props) => /* @__PURE__ */ React50__namespace.createElement(react.Box, { as: "svg", ...props, fill: "none", viewBox: "0 0 60 60" }, /* @__PURE__ */ React50__namespace.createElement(
|
12741
12764
|
"path",
|
12742
12765
|
{
|
12743
12766
|
fillRule: "evenodd",
|
@@ -12746,7 +12769,7 @@ var init_icons2 = __esm({
|
|
12746
12769
|
fill: "currentColor"
|
12747
12770
|
}
|
12748
12771
|
));
|
12749
|
-
PauseIcon = (props) => /* @__PURE__ */
|
12772
|
+
PauseIcon = (props) => /* @__PURE__ */ React50__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 60 60", fill: "none" }, /* @__PURE__ */ React50__namespace.createElement(
|
12750
12773
|
"path",
|
12751
12774
|
{
|
12752
12775
|
fillRule: "evenodd",
|
@@ -12755,7 +12778,7 @@ var init_icons2 = __esm({
|
|
12755
12778
|
fill: "currentColor"
|
12756
12779
|
}
|
12757
12780
|
));
|
12758
|
-
SkipNextIcon = (props) => /* @__PURE__ */
|
12781
|
+
SkipNextIcon = (props) => /* @__PURE__ */ React50__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 30 30", fill: "none" }, /* @__PURE__ */ React50__namespace.createElement(
|
12759
12782
|
"path",
|
12760
12783
|
{
|
12761
12784
|
fillRule: "evenodd",
|
@@ -12764,7 +12787,7 @@ var init_icons2 = __esm({
|
|
12764
12787
|
fill: "currentColor"
|
12765
12788
|
}
|
12766
12789
|
));
|
12767
|
-
SkipPreviousIcon = (props) => /* @__PURE__ */
|
12790
|
+
SkipPreviousIcon = (props) => /* @__PURE__ */ React50__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 30 30", fill: "none" }, /* @__PURE__ */ React50__namespace.createElement(
|
12768
12791
|
"path",
|
12769
12792
|
{
|
12770
12793
|
fillRule: "evenodd",
|
@@ -12791,7 +12814,7 @@ var init_JumpButton = __esm({
|
|
12791
12814
|
variant: "jumpSkip",
|
12792
12815
|
size: size2
|
12793
12816
|
});
|
12794
|
-
return /* @__PURE__ */
|
12817
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
12795
12818
|
react.Center,
|
12796
12819
|
{
|
12797
12820
|
as: "button",
|
@@ -12800,7 +12823,7 @@ var init_JumpButton = __esm({
|
|
12800
12823
|
disabled: isDisabled,
|
12801
12824
|
...props
|
12802
12825
|
},
|
12803
|
-
direction2 === "forward" ? /* @__PURE__ */
|
12826
|
+
direction2 === "forward" ? /* @__PURE__ */ React50__namespace.default.createElement(JumpForwardIcon, { sx: styles2.icon }) : /* @__PURE__ */ React50__namespace.default.createElement(JumpBackwardIcon, { sx: styles2.icon })
|
12804
12827
|
);
|
12805
12828
|
};
|
12806
12829
|
texts18 = createTexts({
|
@@ -12835,7 +12858,7 @@ var init_PlayPauseButton = __esm({
|
|
12835
12858
|
variant: "play",
|
12836
12859
|
size: size2
|
12837
12860
|
});
|
12838
|
-
return /* @__PURE__ */
|
12861
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
12839
12862
|
react.Center,
|
12840
12863
|
{
|
12841
12864
|
as: "button",
|
@@ -12844,7 +12867,7 @@ var init_PlayPauseButton = __esm({
|
|
12844
12867
|
disabled: isDisabled,
|
12845
12868
|
...props
|
12846
12869
|
},
|
12847
|
-
isPlaying ? /* @__PURE__ */
|
12870
|
+
isPlaying ? /* @__PURE__ */ React50__namespace.default.createElement(PauseIcon, { sx: styles2.icon }) : /* @__PURE__ */ React50__namespace.default.createElement(PlayIcon, { sx: styles2.icon })
|
12848
12871
|
);
|
12849
12872
|
};
|
12850
12873
|
texts19 = createTexts({
|
@@ -12879,7 +12902,7 @@ var init_SkipButton = __esm({
|
|
12879
12902
|
variant: "jumpSkip",
|
12880
12903
|
size: size2
|
12881
12904
|
});
|
12882
|
-
return /* @__PURE__ */
|
12905
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
12883
12906
|
react.Center,
|
12884
12907
|
{
|
12885
12908
|
as: "button",
|
@@ -12888,7 +12911,7 @@ var init_SkipButton = __esm({
|
|
12888
12911
|
disabled: isDisabled,
|
12889
12912
|
...props
|
12890
12913
|
},
|
12891
|
-
direction2 === "forward" ? /* @__PURE__ */
|
12914
|
+
direction2 === "forward" ? /* @__PURE__ */ React50__namespace.default.createElement(SkipNextIcon, { sx: styles2.icon }) : /* @__PURE__ */ React50__namespace.default.createElement(SkipPreviousIcon, { sx: styles2.icon })
|
12892
12915
|
);
|
12893
12916
|
};
|
12894
12917
|
texts20 = createTexts({
|
@@ -12925,7 +12948,7 @@ var init_ModalHeader = __esm({
|
|
12925
12948
|
fontSize: size2 === "lg" ? ["mobile.lg", "desktop.lg"] : ["mobile.md", "desktop.md"],
|
12926
12949
|
textAlign: size2 === "lg" ? "center" : "left"
|
12927
12950
|
};
|
12928
|
-
return /* @__PURE__ */
|
12951
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.ModalHeader, { ...props, ref, ...styles2 });
|
12929
12952
|
}
|
12930
12953
|
);
|
12931
12954
|
}
|
@@ -12935,7 +12958,7 @@ var init_Drawer = __esm({
|
|
12935
12958
|
"src/modal/Drawer.tsx"() {
|
12936
12959
|
init_ModalHeader();
|
12937
12960
|
exports.Drawer = (props) => {
|
12938
|
-
return /* @__PURE__ */
|
12961
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(DrawerProvider, { placement: props.placement }, /* @__PURE__ */ React50__namespace.default.createElement(react.Drawer, { ...props }));
|
12939
12962
|
};
|
12940
12963
|
exports.DrawerContent = react.forwardRef(
|
12941
12964
|
({ children, ...props }, ref) => {
|
@@ -12952,7 +12975,7 @@ var init_Drawer = __esm({
|
|
12952
12975
|
});
|
12953
12976
|
const isTopOrBottom = placement === "top" || placement === "bottom";
|
12954
12977
|
const widthConstraits = isTopOrBottom ? { width: ["100%", "37.5rem"], mx: "auto" } : {};
|
12955
|
-
return /* @__PURE__ */
|
12978
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...handlers }, /* @__PURE__ */ React50__namespace.default.createElement(
|
12956
12979
|
react.DrawerContent,
|
12957
12980
|
{
|
12958
12981
|
...widthConstraits,
|
@@ -12961,13 +12984,13 @@ var init_Drawer = __esm({
|
|
12961
12984
|
...props,
|
12962
12985
|
ref
|
12963
12986
|
},
|
12964
|
-
/* @__PURE__ */
|
12987
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { position: "relative" }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { maxHeight: "100vh", maxWidth: "100vw", overflow: "auto" }, isTopOrBottom && /* @__PURE__ */ React50__namespace.default.createElement(Notch, null), /* @__PURE__ */ React50__namespace.default.createElement(react.Box, null, children)))
|
12965
12988
|
));
|
12966
12989
|
}
|
12967
12990
|
);
|
12968
12991
|
Notch = react.forwardRef((props, ref) => {
|
12969
12992
|
const placement = useDrawerContext();
|
12970
|
-
return /* @__PURE__ */
|
12993
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
12971
12994
|
react.Box,
|
12972
12995
|
{
|
12973
12996
|
position: "absolute",
|
@@ -12979,14 +13002,14 @@ var init_Drawer = __esm({
|
|
12979
13002
|
...props,
|
12980
13003
|
ref
|
12981
13004
|
},
|
12982
|
-
/* @__PURE__ */
|
13005
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
12983
13006
|
react.Center,
|
12984
13007
|
{
|
12985
13008
|
background: `linear-gradient(to ${placement === "bottom" ? "bottom" : "top"}, white 0%, white 60%, transparent)`,
|
12986
13009
|
padding: 2,
|
12987
13010
|
borderRadius: "md"
|
12988
13011
|
},
|
12989
|
-
/* @__PURE__ */
|
13012
|
+
/* @__PURE__ */ React50__namespace.default.createElement(
|
12990
13013
|
react.Box,
|
12991
13014
|
{
|
12992
13015
|
width: "2.265rem",
|
@@ -12998,10 +13021,10 @@ var init_Drawer = __esm({
|
|
12998
13021
|
)
|
12999
13022
|
);
|
13000
13023
|
});
|
13001
|
-
DrawerContext =
|
13002
|
-
DrawerProvider = (props) => /* @__PURE__ */
|
13024
|
+
DrawerContext = React50__namespace.default.createContext(void 0);
|
13025
|
+
DrawerProvider = (props) => /* @__PURE__ */ React50__namespace.default.createElement(DrawerContext.Provider, { value: props.placement }, props.children);
|
13003
13026
|
useDrawerContext = () => {
|
13004
|
-
return
|
13027
|
+
return React50__namespace.default.useContext(DrawerContext);
|
13005
13028
|
};
|
13006
13029
|
}
|
13007
13030
|
});
|
@@ -13019,7 +13042,7 @@ var init_SimpleDrawer = __esm({
|
|
13019
13042
|
title,
|
13020
13043
|
...props
|
13021
13044
|
}) => {
|
13022
|
-
return /* @__PURE__ */
|
13045
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(exports.Drawer, { placement, ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react.DrawerOverlay, null), /* @__PURE__ */ React50__namespace.default.createElement(exports.DrawerContent, null, /* @__PURE__ */ React50__namespace.default.createElement(react.DrawerCloseButton, null), title && /* @__PURE__ */ React50__namespace.default.createElement(exports.ModalHeader, null, title), /* @__PURE__ */ React50__namespace.default.createElement(react.DrawerBody, null, children)));
|
13023
13046
|
};
|
13024
13047
|
}
|
13025
13048
|
});
|
@@ -13038,16 +13061,16 @@ var init_PopoverWizardBody = __esm({
|
|
13038
13061
|
"src/popover/PopoverWizardBody.tsx"() {
|
13039
13062
|
init_src();
|
13040
13063
|
exports.PopoverWizardBody = ({ children }) => {
|
13041
|
-
const [currentStep, setCurrentStep] =
|
13042
|
-
const totalSteps =
|
13064
|
+
const [currentStep, setCurrentStep] = React50__namespace.useState(1);
|
13065
|
+
const totalSteps = React50__namespace.Children.count(children);
|
13043
13066
|
const { isOpen } = react.usePopoverContext();
|
13044
|
-
|
13067
|
+
React50__namespace.useEffect(() => {
|
13045
13068
|
if (!isOpen && currentStep > 1) {
|
13046
13069
|
const id = setTimeout(() => setCurrentStep(1), 500);
|
13047
13070
|
return () => clearTimeout(id);
|
13048
13071
|
}
|
13049
13072
|
}, [isOpen, currentStep]);
|
13050
|
-
return /* @__PURE__ */
|
13073
|
+
return /* @__PURE__ */ React50__namespace.createElement(react.PopoverBody, null, /* @__PURE__ */ React50__namespace.createElement(exports.Stack, { spacing: 1.5 }, /* @__PURE__ */ React50__namespace.createElement(react.Box, null, React50__namespace.Children.toArray(children)[currentStep - 1]), /* @__PURE__ */ React50__namespace.createElement(react.Flex, { gap: 3 }, /* @__PURE__ */ React50__namespace.createElement(StepIndicator, { totalSteps, currentStep }), /* @__PURE__ */ React50__namespace.createElement(
|
13051
13074
|
NextStepButton,
|
13052
13075
|
{
|
13053
13076
|
isLastStep: totalSteps === currentStep,
|
@@ -13057,7 +13080,7 @@ var init_PopoverWizardBody = __esm({
|
|
13057
13080
|
};
|
13058
13081
|
StepIndicator = ({ totalSteps, currentStep }) => {
|
13059
13082
|
const steps = createRange(1, totalSteps);
|
13060
|
-
return /* @__PURE__ */
|
13083
|
+
return /* @__PURE__ */ React50__namespace.createElement(react.Flex, { gap: 1, alignItems: "center" }, steps.map((step) => /* @__PURE__ */ React50__namespace.createElement(
|
13061
13084
|
react.Box,
|
13062
13085
|
{
|
13063
13086
|
key: step,
|
@@ -13076,13 +13099,13 @@ var init_PopoverWizardBody = __esm({
|
|
13076
13099
|
NextStepButton = ({ isLastStep, onNext }) => {
|
13077
13100
|
const { onClose } = react.usePopoverContext();
|
13078
13101
|
const { t: t2 } = useTranslation();
|
13079
|
-
return /* @__PURE__ */
|
13102
|
+
return /* @__PURE__ */ React50__namespace.createElement(
|
13080
13103
|
exports.Button,
|
13081
13104
|
{
|
13082
13105
|
variant: "additional",
|
13083
13106
|
size: "sm",
|
13084
13107
|
color: "white",
|
13085
|
-
leftIcon: isLastStep ? void 0 : /* @__PURE__ */
|
13108
|
+
leftIcon: isLastStep ? void 0 : /* @__PURE__ */ React50__namespace.createElement(sporIconReact.ArrowRightFill18Icon, null),
|
13086
13109
|
onClick: isLastStep ? onClose : onNext
|
13087
13110
|
},
|
13088
13111
|
t2(isLastStep ? texts21.finish : texts21.nextStep)
|
@@ -13119,7 +13142,7 @@ var init_SimplePopover = __esm({
|
|
13119
13142
|
borderRadius,
|
13120
13143
|
...props
|
13121
13144
|
}) => {
|
13122
|
-
return /* @__PURE__ */
|
13145
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.DarkMode, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
13123
13146
|
react.Popover,
|
13124
13147
|
{
|
13125
13148
|
onClose,
|
@@ -13131,8 +13154,8 @@ var init_SimplePopover = __esm({
|
|
13131
13154
|
arrowShadowColor: "none",
|
13132
13155
|
...props
|
13133
13156
|
},
|
13134
|
-
triggerElement && /* @__PURE__ */
|
13135
|
-
/* @__PURE__ */
|
13157
|
+
triggerElement && /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverTrigger, null, triggerElement),
|
13158
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.PopoverContent, { borderRadius }, /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverArrow, null), withCloseButton && /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverCloseButton, null), /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverBody, null, children))
|
13136
13159
|
));
|
13137
13160
|
};
|
13138
13161
|
}
|
@@ -13146,7 +13169,7 @@ var init_WizardPopover = __esm({
|
|
13146
13169
|
triggerElement,
|
13147
13170
|
withCloseButton = false
|
13148
13171
|
}) => {
|
13149
|
-
return /* @__PURE__ */
|
13172
|
+
return /* @__PURE__ */ React50__namespace.createElement(react.DarkMode, null, /* @__PURE__ */ React50__namespace.createElement(react.Popover, { size: "lg" }, /* @__PURE__ */ React50__namespace.createElement(react.PopoverTrigger, null, triggerElement), /* @__PURE__ */ React50__namespace.createElement(react.PopoverContent, null, /* @__PURE__ */ React50__namespace.createElement(react.PopoverArrow, null), withCloseButton && /* @__PURE__ */ React50__namespace.createElement(react.PopoverCloseButton, null), /* @__PURE__ */ React50__namespace.createElement(exports.PopoverWizardBody, null, children))));
|
13150
13173
|
};
|
13151
13174
|
}
|
13152
13175
|
});
|
@@ -13168,7 +13191,7 @@ var init_SporProvider = __esm({
|
|
13168
13191
|
children,
|
13169
13192
|
...props
|
13170
13193
|
}) => {
|
13171
|
-
return /* @__PURE__ */
|
13194
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(LanguageProvider, { language }, /* @__PURE__ */ React50__namespace.default.createElement(react.ChakraProvider, { theme: theme3, ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react$1.Global, { styles: exports.fontFaces }), /* @__PURE__ */ React50__namespace.default.createElement(
|
13172
13195
|
react$1.Global,
|
13173
13196
|
{
|
13174
13197
|
styles: `
|
@@ -13190,7 +13213,7 @@ var init_provider = __esm({
|
|
13190
13213
|
var StepperContext, StepperProvider, useStepper;
|
13191
13214
|
var init_StepperContext = __esm({
|
13192
13215
|
"src/stepper/StepperContext.tsx"() {
|
13193
|
-
StepperContext =
|
13216
|
+
StepperContext = React50__namespace.default.createContext(null);
|
13194
13217
|
StepperProvider = ({
|
13195
13218
|
activeStep,
|
13196
13219
|
children,
|
@@ -13198,7 +13221,7 @@ var init_StepperContext = __esm({
|
|
13198
13221
|
colorScheme,
|
13199
13222
|
numberOfSteps
|
13200
13223
|
}) => {
|
13201
|
-
return /* @__PURE__ */
|
13224
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
13202
13225
|
StepperContext.Provider,
|
13203
13226
|
{
|
13204
13227
|
value: { activeStep, onClick, colorScheme, numberOfSteps }
|
@@ -13207,7 +13230,7 @@ var init_StepperContext = __esm({
|
|
13207
13230
|
);
|
13208
13231
|
};
|
13209
13232
|
useStepper = () => {
|
13210
|
-
const context =
|
13233
|
+
const context = React50__namespace.default.useContext(StepperContext);
|
13211
13234
|
if (!context) {
|
13212
13235
|
throw new Error(
|
13213
13236
|
"useStepper must be used within a StepperProvider. Most likely, you forgot to wrap your StepperStep in a Stepper component"
|
@@ -13235,7 +13258,7 @@ var init_Stepper = __esm({
|
|
13235
13258
|
const numberOfSteps = steps.length;
|
13236
13259
|
const activeStep = Number(activeStepAsStringOrNumber);
|
13237
13260
|
const { t: t2 } = useTranslation();
|
13238
|
-
return /* @__PURE__ */
|
13261
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: style.root }, /* @__PURE__ */ React50__namespace.default.createElement(
|
13239
13262
|
StepperProvider,
|
13240
13263
|
{
|
13241
13264
|
onClick,
|
@@ -13243,24 +13266,24 @@ var init_Stepper = __esm({
|
|
13243
13266
|
colorScheme,
|
13244
13267
|
numberOfSteps
|
13245
13268
|
},
|
13246
|
-
/* @__PURE__ */
|
13269
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: style.container }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: style.innerContainer }, /* @__PURE__ */ React50__namespace.default.createElement(react.HStack, null, activeStep > 1 && /* @__PURE__ */ React50__namespace.default.createElement(
|
13247
13270
|
exports.IconButton,
|
13248
13271
|
{
|
13249
13272
|
"aria-label": t2(texts22.back),
|
13250
|
-
icon: /* @__PURE__ */
|
13273
|
+
icon: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.DropdownLeftFill24Icon, null),
|
13251
13274
|
variant: "ghost",
|
13252
13275
|
size: "sm",
|
13253
13276
|
onClick: () => onClick(activeStep - 1),
|
13254
13277
|
__css: style.backButton
|
13255
13278
|
}
|
13256
|
-
), /* @__PURE__ */
|
13279
|
+
), /* @__PURE__ */ React50__namespace.default.createElement(
|
13257
13280
|
exports.SimplePopover,
|
13258
13281
|
{
|
13259
|
-
triggerElement: /* @__PURE__ */
|
13282
|
+
triggerElement: /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "button", __css: style.stepCounter }, t2(texts22.stepsOf(activeStep, numberOfSteps))),
|
13260
13283
|
borderRadius: "xs"
|
13261
13284
|
},
|
13262
|
-
steps.map((step, index2) => /* @__PURE__ */
|
13263
|
-
)), title && /* @__PURE__ */
|
13285
|
+
steps.map((step, index2) => /* @__PURE__ */ React50__namespace.default.createElement(exports.StepperStep, { key: step, stepNumber: index2 + 1 }, step))
|
13286
|
+
)), title && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "h3", __css: style.title }, title)), /* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { justifyContent: "center", display: ["none", "flex"] }, steps.map((step, index2) => /* @__PURE__ */ React50__namespace.default.createElement(exports.StepperStep, { key: index2, stepNumber: index2 + 1 }, step))))
|
13264
13287
|
));
|
13265
13288
|
};
|
13266
13289
|
texts22 = createTexts({
|
@@ -13291,7 +13314,7 @@ var init_StepperStep = __esm({
|
|
13291
13314
|
variant,
|
13292
13315
|
colorScheme
|
13293
13316
|
});
|
13294
|
-
return /* @__PURE__ */
|
13317
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: style.stepContainer }, stepNumber > 1 && /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, { mx: 5, display: ["none", "block"] }), /* @__PURE__ */ React50__namespace.default.createElement(
|
13295
13318
|
react.Flex,
|
13296
13319
|
{
|
13297
13320
|
__css: style.stepButton,
|
@@ -13301,8 +13324,8 @@ var init_StepperStep = __esm({
|
|
13301
13324
|
disabled: variant === "disabled" || variant === "active",
|
13302
13325
|
onClick: () => onClick(stepNumber)
|
13303
13326
|
},
|
13304
|
-
/* @__PURE__ */
|
13305
|
-
/* @__PURE__ */
|
13327
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: style.stepNumber }, stepNumber),
|
13328
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: style.stepTitle }, children)
|
13306
13329
|
));
|
13307
13330
|
};
|
13308
13331
|
getVariant = (stepNumber, activeStep) => {
|
@@ -13328,7 +13351,7 @@ exports.Tabs = void 0;
|
|
13328
13351
|
var init_Tabs = __esm({
|
13329
13352
|
"src/tab/Tabs.tsx"() {
|
13330
13353
|
exports.Tabs = react.forwardRef((props, ref) => {
|
13331
|
-
return /* @__PURE__ */
|
13354
|
+
return /* @__PURE__ */ React50__namespace.createElement(react.Tabs, { ...props, ref });
|
13332
13355
|
});
|
13333
13356
|
}
|
13334
13357
|
});
|
@@ -13350,7 +13373,7 @@ var init_Table = __esm({
|
|
13350
13373
|
"src/table/Table.tsx"() {
|
13351
13374
|
exports.Table = react.forwardRef((props, ref) => {
|
13352
13375
|
const { variant, size: size2, colorScheme, children, ...rest } = props;
|
13353
|
-
return /* @__PURE__ */
|
13376
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...rest, ...getStyleProps(props) }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { overflowX: "auto" }, /* @__PURE__ */ React50__namespace.default.createElement(
|
13354
13377
|
react.Table,
|
13355
13378
|
{
|
13356
13379
|
variant,
|
@@ -19256,6 +19279,52 @@ var init_badge = __esm({
|
|
19256
19279
|
};
|
19257
19280
|
}
|
19258
19281
|
});
|
19282
|
+
|
19283
|
+
// src/theme/components/breadcrumb.ts
|
19284
|
+
var defineMultiStyleConfig27, definePartsStyle27, baseStyleLink2, baseStyle43, breadcrumb_default;
|
19285
|
+
var init_breadcrumb2 = __esm({
|
19286
|
+
"src/theme/components/breadcrumb.ts"() {
|
19287
|
+
init_dist4();
|
19288
|
+
init_dist3();
|
19289
|
+
init_box_shadow_utils();
|
19290
|
+
({ defineMultiStyleConfig: defineMultiStyleConfig27, definePartsStyle: definePartsStyle27 } = createMultiStyleConfigHelpers(breadcrumbAnatomy.keys));
|
19291
|
+
baseStyleLink2 = defineStyle({
|
19292
|
+
transitionProperty: "common",
|
19293
|
+
transitionDuration: "fast",
|
19294
|
+
transitionTimingFunction: "ease-out",
|
19295
|
+
outline: "none",
|
19296
|
+
color: "inherit",
|
19297
|
+
textDecoration: "none",
|
19298
|
+
"&:not([aria-current=page])": {
|
19299
|
+
cursor: "pointer",
|
19300
|
+
paddingX: 0.5,
|
19301
|
+
borderRadius: "xs",
|
19302
|
+
_hover: {
|
19303
|
+
backgroundColor: "coralGreen"
|
19304
|
+
},
|
19305
|
+
_focusVisible: {
|
19306
|
+
boxShadow: getBoxShadowString({
|
19307
|
+
borderColor: "greenHaze",
|
19308
|
+
borderWidth: 2
|
19309
|
+
})
|
19310
|
+
},
|
19311
|
+
_active: {
|
19312
|
+
backgroundColor: "mint"
|
19313
|
+
}
|
19314
|
+
}
|
19315
|
+
});
|
19316
|
+
baseStyle43 = definePartsStyle27({
|
19317
|
+
link: baseStyleLink2,
|
19318
|
+
list: {
|
19319
|
+
flexWrap: "wrap",
|
19320
|
+
alignItems: "flex-start"
|
19321
|
+
}
|
19322
|
+
});
|
19323
|
+
breadcrumb_default = defineMultiStyleConfig27({
|
19324
|
+
baseStyle: baseStyle43
|
19325
|
+
});
|
19326
|
+
}
|
19327
|
+
});
|
19259
19328
|
var config6, button_default;
|
19260
19329
|
var init_button2 = __esm({
|
19261
19330
|
"src/theme/components/button.ts"() {
|
@@ -22746,6 +22815,7 @@ __export(components_exports, {
|
|
22746
22815
|
Accordion: () => accordion_default,
|
22747
22816
|
Alert: () => alert_default,
|
22748
22817
|
Badge: () => badge_default,
|
22818
|
+
Breadcrumb: () => breadcrumb_default,
|
22749
22819
|
Button: () => button_default,
|
22750
22820
|
Card: () => card_default,
|
22751
22821
|
CardSelect: () => card_select_default,
|
@@ -22783,6 +22853,7 @@ var init_components = __esm({
|
|
22783
22853
|
init_accordion2();
|
22784
22854
|
init_alert2();
|
22785
22855
|
init_badge();
|
22856
|
+
init_breadcrumb2();
|
22786
22857
|
init_button2();
|
22787
22858
|
init_card2();
|
22788
22859
|
init_card_select();
|
@@ -22909,12 +22980,12 @@ var init_BaseToast = __esm({
|
|
22909
22980
|
init_src();
|
22910
22981
|
BaseToast = ({ children, variant, id }) => {
|
22911
22982
|
const styles2 = react.useStyleConfig("Toast", { variant });
|
22912
|
-
return /* @__PURE__ */
|
22983
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { sx: styles2, id }, /* @__PURE__ */ React50__namespace.default.createElement(ToastIcon, { variant }), children);
|
22913
22984
|
};
|
22914
22985
|
ToastIcon = ({ variant }) => {
|
22915
22986
|
const Icon = getIcon3(variant);
|
22916
22987
|
const { t: t2 } = useTranslation();
|
22917
|
-
return /* @__PURE__ */
|
22988
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(
|
22918
22989
|
Icon,
|
22919
22990
|
{
|
22920
22991
|
flexShrink: 0,
|
@@ -22969,7 +23040,7 @@ var init_ActionToast = __esm({
|
|
22969
23040
|
buttonText,
|
22970
23041
|
id
|
22971
23042
|
}) => {
|
22972
|
-
return /* @__PURE__ */
|
23043
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { marginRight: 2, flexGrow: "1" }, children), /* @__PURE__ */ React50__namespace.default.createElement(exports.Button, { variant: "additional", size: "sm", onClick }, buttonText));
|
22973
23044
|
};
|
22974
23045
|
}
|
22975
23046
|
});
|
@@ -22986,13 +23057,13 @@ var init_ClosableToast = __esm({
|
|
22986
23057
|
}) => {
|
22987
23058
|
const styles2 = react.useMultiStyleConfig("Toast", { variant });
|
22988
23059
|
const { t: t2 } = useTranslation();
|
22989
|
-
return /* @__PURE__ */
|
23060
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { flexGrow: "1" }, children), /* @__PURE__ */ React50__namespace.default.createElement(
|
22990
23061
|
exports.IconButton,
|
22991
23062
|
{
|
22992
23063
|
sx: styles2.dismissButton,
|
22993
23064
|
variant: "ghost",
|
22994
23065
|
"aria-label": t2(texts24.dismiss),
|
22995
|
-
icon: /* @__PURE__ */
|
23066
|
+
icon: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
22996
23067
|
onClick: onClose
|
22997
23068
|
}
|
22998
23069
|
));
|
@@ -23015,7 +23086,7 @@ var init_useToast = __esm({
|
|
23015
23086
|
init_ClosableToast();
|
23016
23087
|
exports.useToast = () => {
|
23017
23088
|
const toast = react.useToast();
|
23018
|
-
const wrappedToast =
|
23089
|
+
const wrappedToast = React50.useCallback((opts) => {
|
23019
23090
|
const Toast = getToastComponent(opts);
|
23020
23091
|
toast({
|
23021
23092
|
...opts,
|
@@ -23026,7 +23097,7 @@ var init_useToast = __esm({
|
|
23026
23097
|
};
|
23027
23098
|
getToastComponent = (opts) => {
|
23028
23099
|
if ("isClosable" in opts && opts.isClosable) {
|
23029
|
-
return ({ onClose, id }) => /* @__PURE__ */
|
23100
|
+
return ({ onClose, id }) => /* @__PURE__ */ React50__namespace.default.createElement(
|
23030
23101
|
ClosableToast,
|
23031
23102
|
{
|
23032
23103
|
id,
|
@@ -23042,7 +23113,7 @@ var init_useToast = __esm({
|
|
23042
23113
|
);
|
23043
23114
|
}
|
23044
23115
|
if ("buttonText" in opts) {
|
23045
|
-
return ({ id }) => /* @__PURE__ */
|
23116
|
+
return ({ id }) => /* @__PURE__ */ React50__namespace.default.createElement(
|
23046
23117
|
ActionToast,
|
23047
23118
|
{
|
23048
23119
|
id,
|
@@ -23053,7 +23124,7 @@ var init_useToast = __esm({
|
|
23053
23124
|
opts.text
|
23054
23125
|
);
|
23055
23126
|
}
|
23056
|
-
return ({ id }) => /* @__PURE__ */
|
23127
|
+
return ({ id }) => /* @__PURE__ */ React50__namespace.default.createElement(BaseToast, { id, variant: opts.variant }, opts.text);
|
23057
23128
|
};
|
23058
23129
|
}
|
23059
23130
|
});
|
@@ -23083,6 +23154,7 @@ var init_src = __esm({
|
|
23083
23154
|
"src/index.tsx"() {
|
23084
23155
|
init_accordion();
|
23085
23156
|
init_alert();
|
23157
|
+
init_breadcrumb();
|
23086
23158
|
init_button();
|
23087
23159
|
init_card();
|
23088
23160
|
init_datepicker();
|