@vygruppen/spor-react 9.3.0 → 9.4.1
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 +20 -0
- package/dist/{CountryCodeSelect-QD66IDCL.mjs → CountryCodeSelect-5QKP6VFT.mjs} +1 -1
- package/dist/{chunk-U3P2P6PX.mjs → chunk-JRXSGTL2.mjs} +601 -423
- package/dist/index.d.mts +110 -22
- package/dist/index.d.ts +110 -22
- package/dist/index.js +680 -479
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/alert/AlertIcon.tsx +1 -1
- package/src/card/StaticCard.tsx +25 -0
- package/src/card/index.tsx +1 -0
- package/src/input/Combobox.tsx +52 -38
- package/src/modal/FullScreenDrawer.tsx +179 -0
- package/src/modal/index.tsx +1 -0
- package/src/theme/components/index.ts +1 -0
- package/src/theme/components/static-card.ts +66 -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 React70 = require('react');
|
5
5
|
var lottieReact = require('lottie-react');
|
6
6
|
var sporLoader = require('@vygruppen/spor-loader');
|
7
7
|
var reactAria = require('react-aria');
|
@@ -11,10 +11,10 @@ var date = require('@internationalized/date');
|
|
11
11
|
var reactStately = require('react-stately');
|
12
12
|
var awesomePhonenumber = require('awesome-phonenumber');
|
13
13
|
var reactSwipeable = require('react-swipeable');
|
14
|
+
var tokens11 = require('@vygruppen/spor-design-tokens');
|
14
15
|
var react$1 = require('@emotion/react');
|
15
16
|
var deepmerge = require('deepmerge');
|
16
17
|
var themeTools = require('@chakra-ui/theme-tools');
|
17
|
-
var tokens10 = require('@vygruppen/spor-design-tokens');
|
18
18
|
|
19
19
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
20
20
|
|
@@ -36,9 +36,9 @@ function _interopNamespace(e) {
|
|
36
36
|
return Object.freeze(n);
|
37
37
|
}
|
38
38
|
|
39
|
-
var
|
39
|
+
var React70__namespace = /*#__PURE__*/_interopNamespace(React70);
|
40
|
+
var tokens11__namespace = /*#__PURE__*/_interopNamespace(tokens11);
|
40
41
|
var deepmerge__default = /*#__PURE__*/_interopDefault(deepmerge);
|
41
|
-
var tokens10__namespace = /*#__PURE__*/_interopNamespace(tokens10);
|
42
42
|
|
43
43
|
var __create = Object.create;
|
44
44
|
var __defProp = Object.defineProperty;
|
@@ -76,7 +76,7 @@ exports.Divider = void 0;
|
|
76
76
|
var init_Divider = __esm({
|
77
77
|
"src/layout/Divider.tsx"() {
|
78
78
|
exports.Divider = react.forwardRef((props, ref) => {
|
79
|
-
return /* @__PURE__ */
|
79
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Divider, { ...props, ref });
|
80
80
|
});
|
81
81
|
}
|
82
82
|
});
|
@@ -85,7 +85,7 @@ var init_Stack = __esm({
|
|
85
85
|
"src/layout/Stack.tsx"() {
|
86
86
|
exports.Stack = react.forwardRef(
|
87
87
|
({ flexDirection, ...props }, ref) => {
|
88
|
-
return /* @__PURE__ */
|
88
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Stack, { ...props, direction: flexDirection, ref });
|
89
89
|
}
|
90
90
|
);
|
91
91
|
}
|
@@ -99,15 +99,15 @@ var init_layout = __esm({
|
|
99
99
|
var AccordionContext, AccordionProvider, useAccordionContext;
|
100
100
|
var init_AccordionContext = __esm({
|
101
101
|
"src/accordion/AccordionContext.tsx"() {
|
102
|
-
AccordionContext =
|
102
|
+
AccordionContext = React70__namespace.default.createContext(null);
|
103
103
|
AccordionProvider = ({
|
104
104
|
size: size2,
|
105
105
|
...props
|
106
106
|
}) => {
|
107
|
-
return /* @__PURE__ */
|
107
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(AccordionContext.Provider, { value: { size: size2 }, ...props });
|
108
108
|
};
|
109
109
|
useAccordionContext = () => {
|
110
|
-
const context =
|
110
|
+
const context = React70__namespace.default.useContext(AccordionContext);
|
111
111
|
if (context === null) {
|
112
112
|
throw new Error(
|
113
113
|
"useAccordionContext must be used within AccordionProvider"
|
@@ -125,14 +125,14 @@ var init_Accordion = __esm({
|
|
125
125
|
exports.Accordion = react.forwardRef(
|
126
126
|
({ children, spacing: spacing3 = 2, ...props }, ref) => {
|
127
127
|
const defaultIndex = typeof props.defaultIndex === "number" && props.allowMultiple ? [props.defaultIndex] : props.defaultIndex;
|
128
|
-
return /* @__PURE__ */
|
128
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(AccordionProvider, { size: props.size }, /* @__PURE__ */ React70__namespace.default.createElement(
|
129
129
|
react.Accordion,
|
130
130
|
{
|
131
131
|
...props,
|
132
132
|
ref,
|
133
133
|
defaultIndex
|
134
134
|
},
|
135
|
-
/* @__PURE__ */
|
135
|
+
/* @__PURE__ */ React70__namespace.default.createElement(exports.Stack, { spacing: spacing3 }, children)
|
136
136
|
));
|
137
137
|
}
|
138
138
|
);
|
@@ -155,7 +155,7 @@ var init_Expandable = __esm({
|
|
155
155
|
},
|
156
156
|
...rest
|
157
157
|
}) => {
|
158
|
-
return /* @__PURE__ */
|
158
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
159
159
|
exports.Accordion,
|
160
160
|
{
|
161
161
|
...rest,
|
@@ -165,7 +165,7 @@ var init_Expandable = __esm({
|
|
165
165
|
size: size2,
|
166
166
|
onChange: (expandedIndex) => onChange(expandedIndex === 0)
|
167
167
|
},
|
168
|
-
/* @__PURE__ */
|
168
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
169
169
|
exports.ExpandableItem,
|
170
170
|
{
|
171
171
|
headingLevel,
|
@@ -185,7 +185,7 @@ var init_Expandable = __esm({
|
|
185
185
|
}) => {
|
186
186
|
const { size: size2 } = useAccordionContext();
|
187
187
|
warnAboutMismatchingIcon({ icon: leftIcon, size: size2 });
|
188
|
-
return /* @__PURE__ */
|
188
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.AccordionItem, { ...rest }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: headingLevel }, /* @__PURE__ */ React70__namespace.default.createElement(react.AccordionButton, null, /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { alignItems: "center" }, leftIcon && /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { marginRight: 1 }, leftIcon), title), /* @__PURE__ */ React70__namespace.default.createElement(react.AccordionIcon, null))), /* @__PURE__ */ React70__namespace.default.createElement(react.AccordionPanel, null, children));
|
189
189
|
};
|
190
190
|
warnAboutMismatchingIcon = ({ icon, size: size2 }) => {
|
191
191
|
var _a6, _b5;
|
@@ -236,10 +236,10 @@ function LanguageProvider({
|
|
236
236
|
language,
|
237
237
|
children
|
238
238
|
}) {
|
239
|
-
return /* @__PURE__ */
|
239
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(LanguageContext.Provider, { value: language }, children);
|
240
240
|
}
|
241
241
|
function useLanguage() {
|
242
|
-
const language =
|
242
|
+
const language = React70.useContext(LanguageContext);
|
243
243
|
if (!language) {
|
244
244
|
throw new Error("Please wrap your application in a LanguageProvider");
|
245
245
|
}
|
@@ -252,8 +252,8 @@ function useTranslation() {
|
|
252
252
|
};
|
253
253
|
return { t: t2, language };
|
254
254
|
}
|
255
|
-
function createTexts(
|
256
|
-
return
|
255
|
+
function createTexts(texts28) {
|
256
|
+
return texts28;
|
257
257
|
}
|
258
258
|
exports.Language = void 0; var LanguageContext;
|
259
259
|
var init_i18n = __esm({
|
@@ -265,12 +265,12 @@ var init_i18n = __esm({
|
|
265
265
|
Language3["English"] = "en";
|
266
266
|
return Language3;
|
267
267
|
})(exports.Language || {});
|
268
|
-
LanguageContext =
|
268
|
+
LanguageContext = React70.createContext(void 0);
|
269
269
|
}
|
270
270
|
});
|
271
271
|
function useHydrated() {
|
272
|
-
let [hydrated, setHydrated] =
|
273
|
-
|
272
|
+
let [hydrated, setHydrated] = React70.useState(() => !hydrating);
|
273
|
+
React70.useEffect(function hydrate() {
|
274
274
|
hydrating = false;
|
275
275
|
setHydrated(true);
|
276
276
|
}, []);
|
@@ -288,13 +288,13 @@ var init_ClientOnly = __esm({
|
|
288
288
|
init_useHydrated();
|
289
289
|
ClientOnly = ({ children, fallback = null }) => {
|
290
290
|
const isHydrated = useHydrated();
|
291
|
-
return /* @__PURE__ */
|
291
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(React70__namespace.default.Fragment, null, isHydrated ? children() : fallback);
|
292
292
|
};
|
293
293
|
}
|
294
294
|
});
|
295
295
|
function Lottie({ animationData }) {
|
296
296
|
const { View } = lottieReact.useLottie({ animationData, loop: true });
|
297
|
-
return /* @__PURE__ */
|
297
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(React70__namespace.default.Fragment, null, View);
|
298
298
|
}
|
299
299
|
var init_Lottie = __esm({
|
300
300
|
"src/loader/Lottie.tsx"() {
|
@@ -310,7 +310,7 @@ var init_ColorInlineLoader = __esm({
|
|
310
310
|
maxWidth,
|
311
311
|
...props
|
312
312
|
}) => {
|
313
|
-
return /* @__PURE__ */
|
313
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React70__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React70__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderColorData }))));
|
314
314
|
};
|
315
315
|
}
|
316
316
|
});
|
@@ -325,7 +325,7 @@ var init_ColorSpinner = __esm({
|
|
325
325
|
maxWidth,
|
326
326
|
...props
|
327
327
|
}) => {
|
328
|
-
return /* @__PURE__ */
|
328
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React70__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React70__namespace.default.createElement(Lottie, { animationData: sporLoader.spinnerColorData }))), children && /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { marginTop: 3, fontWeight: "bold" }, children));
|
329
329
|
};
|
330
330
|
}
|
331
331
|
});
|
@@ -335,7 +335,7 @@ var init_ContentLoader = __esm({
|
|
335
335
|
init_ClientOnly();
|
336
336
|
init_Lottie();
|
337
337
|
exports.ContentLoader = ({ children, ...props }) => {
|
338
|
-
return /* @__PURE__ */
|
338
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { maxWidth: "140px", marginX: "auto" }, /* @__PURE__ */ React70__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React70__namespace.default.createElement(Lottie, { animationData: sporLoader.contentLoaderData }))), children && /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { textAlign: "center", fontWeight: "bold" }, children));
|
339
339
|
};
|
340
340
|
}
|
341
341
|
});
|
@@ -349,7 +349,7 @@ var init_DarkFullScreenLoader = __esm({
|
|
349
349
|
maxWidth,
|
350
350
|
...props
|
351
351
|
}) => {
|
352
|
-
return /* @__PURE__ */
|
352
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Center, { height: "100%", background: "darkTeal", ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React70__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React70__namespace.default.createElement(Lottie, { animationData: sporLoader.fullScreenLoaderWhiteData }))));
|
353
353
|
};
|
354
354
|
}
|
355
355
|
});
|
@@ -363,7 +363,7 @@ var init_DarkInlineLoader = __esm({
|
|
363
363
|
maxWidth,
|
364
364
|
...props
|
365
365
|
}) => {
|
366
|
-
return /* @__PURE__ */
|
366
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React70__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React70__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderDarkData }))));
|
367
367
|
};
|
368
368
|
}
|
369
369
|
});
|
@@ -381,7 +381,7 @@ var init_DarkSpinner = __esm({
|
|
381
381
|
}) => {
|
382
382
|
const { colorMode } = react.useColorMode();
|
383
383
|
const spinnerData = colorMode === "dark" ? sporLoader.spinnerLightData : sporLoader.spinnerDarkData;
|
384
|
-
return /* @__PURE__ */
|
384
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React70__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React70__namespace.default.createElement(Lottie, { animationData: spinnerData }))), children && /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { marginTop: 3, fontWeight: "bold" }, children));
|
385
385
|
};
|
386
386
|
}
|
387
387
|
});
|
@@ -395,7 +395,7 @@ var init_LightFullScreenLoader = __esm({
|
|
395
395
|
maxWidth,
|
396
396
|
...props
|
397
397
|
}) => {
|
398
|
-
return /* @__PURE__ */
|
398
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Center, { height: "100%", background: "white", ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React70__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React70__namespace.default.createElement(Lottie, { animationData: sporLoader.fullScreenLoaderBlackData }))));
|
399
399
|
};
|
400
400
|
}
|
401
401
|
});
|
@@ -409,7 +409,7 @@ var init_LightInlineLoader = __esm({
|
|
409
409
|
maxWidth,
|
410
410
|
...props
|
411
411
|
}) => {
|
412
|
-
return /* @__PURE__ */
|
412
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React70__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React70__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderLightData }))));
|
413
413
|
};
|
414
414
|
}
|
415
415
|
});
|
@@ -424,7 +424,7 @@ var init_LightSpinner = __esm({
|
|
424
424
|
maxWidth,
|
425
425
|
...props
|
426
426
|
}) => {
|
427
|
-
return /* @__PURE__ */
|
427
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React70__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React70__namespace.default.createElement(Lottie, { animationData: sporLoader.spinnerLightData }))), children && /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { marginTop: 3, fontWeight: "bold" }, children));
|
428
428
|
};
|
429
429
|
}
|
430
430
|
});
|
@@ -432,11 +432,11 @@ var useRotatingLabel;
|
|
432
432
|
var init_useRotatingLabel = __esm({
|
433
433
|
"src/loader/useRotatingLabel.tsx"() {
|
434
434
|
useRotatingLabel = ({ label, delay }) => {
|
435
|
-
const loadingTextArray =
|
435
|
+
const loadingTextArray = React70.useMemo(
|
436
436
|
() => Array.isArray(label) ? label : [label],
|
437
437
|
[label]
|
438
438
|
);
|
439
|
-
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] =
|
439
|
+
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] = React70.useState(0);
|
440
440
|
react.useInterval(() => {
|
441
441
|
setCurrentLoadingTextIndex(
|
442
442
|
(prevIndex) => (prevIndex + 1) % loadingTextArray.length
|
@@ -471,7 +471,7 @@ var init_ProgressBar = __esm({
|
|
471
471
|
"aria-label": ariaLabel || t2(texts.label(value))
|
472
472
|
});
|
473
473
|
const styles3 = react.useMultiStyleConfig("ProgressBar", {});
|
474
|
-
return /* @__PURE__ */
|
474
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(React70__namespace.default.Fragment, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
475
475
|
react.Box,
|
476
476
|
{
|
477
477
|
...progressBarProps,
|
@@ -479,8 +479,8 @@ var init_ProgressBar = __esm({
|
|
479
479
|
__css: styles3.container,
|
480
480
|
...rest
|
481
481
|
},
|
482
|
-
/* @__PURE__ */
|
483
|
-
currentLoadingText && /* @__PURE__ */
|
482
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { width, __css: styles3.background }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { __css: styles3.progress, height, width: `${value}%` })),
|
483
|
+
currentLoadingText && /* @__PURE__ */ React70__namespace.default.createElement(react.Text, { sx: styles3.description, ...labelProps }, currentLoadingText)
|
484
484
|
));
|
485
485
|
};
|
486
486
|
texts = createTexts({
|
@@ -517,11 +517,11 @@ var init_ProgressLoader = __esm({
|
|
517
517
|
value,
|
518
518
|
"aria-label": ariaLabel ?? t2(texts2.fallbackLabel(value ?? "?"))
|
519
519
|
});
|
520
|
-
const pathRef =
|
520
|
+
const pathRef = React70.useRef(null);
|
521
521
|
const progressPathLength = ((_a6 = pathRef.current) == null ? void 0 : _a6.getTotalLength()) ?? 0;
|
522
522
|
const progress = (value - 100) / 100 * progressPathLength;
|
523
|
-
const id =
|
524
|
-
return /* @__PURE__ */
|
523
|
+
const id = React70.useId();
|
524
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...progressBarProps, minWidth: "100px", width, ...rest }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: "svg", viewBox: "0 0 246 78", fill: "none" }, /* @__PURE__ */ React70__namespace.default.createElement(
|
525
525
|
react.Box,
|
526
526
|
{
|
527
527
|
as: "path",
|
@@ -529,7 +529,7 @@ var init_ProgressLoader = __esm({
|
|
529
529
|
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",
|
530
530
|
fill: "#FFB466"
|
531
531
|
}
|
532
|
-
), /* @__PURE__ */
|
532
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
533
533
|
react.Box,
|
534
534
|
{
|
535
535
|
as: "path",
|
@@ -540,7 +540,7 @@ var init_ProgressLoader = __esm({
|
|
540
540
|
strokeLinecap: "round",
|
541
541
|
strokeLinejoin: "round"
|
542
542
|
}
|
543
|
-
), /* @__PURE__ */
|
543
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
544
544
|
react.Box,
|
545
545
|
{
|
546
546
|
as: "path",
|
@@ -555,7 +555,7 @@ var init_ProgressLoader = __esm({
|
|
555
555
|
transition: "stroke-dashoffset .2s ease-out",
|
556
556
|
ref: pathRef
|
557
557
|
}
|
558
|
-
), /* @__PURE__ */
|
558
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
559
559
|
react.Box,
|
560
560
|
{
|
561
561
|
as: "path",
|
@@ -563,7 +563,7 @@ var init_ProgressLoader = __esm({
|
|
563
563
|
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",
|
564
564
|
fill: "#688CBA"
|
565
565
|
}
|
566
|
-
)), currentLoadingText && /* @__PURE__ */
|
566
|
+
)), currentLoadingText && /* @__PURE__ */ React70__namespace.default.createElement(
|
567
567
|
react.Text,
|
568
568
|
{
|
569
569
|
textAlign: "center",
|
@@ -587,19 +587,19 @@ var init_ProgressLoader = __esm({
|
|
587
587
|
exports.Skeleton = void 0;
|
588
588
|
var init_Skeleton = __esm({
|
589
589
|
"src/loader/Skeleton.tsx"() {
|
590
|
-
exports.Skeleton = react.forwardRef((props, ref) => /* @__PURE__ */
|
590
|
+
exports.Skeleton = react.forwardRef((props, ref) => /* @__PURE__ */ React70__namespace.default.createElement(react.Skeleton, { ...props, ref }));
|
591
591
|
}
|
592
592
|
});
|
593
593
|
exports.SkeletonCircle = void 0;
|
594
594
|
var init_SkeletonCircle = __esm({
|
595
595
|
"src/loader/SkeletonCircle.tsx"() {
|
596
|
-
exports.SkeletonCircle = (props) => /* @__PURE__ */
|
596
|
+
exports.SkeletonCircle = (props) => /* @__PURE__ */ React70__namespace.default.createElement(react.SkeletonCircle, { boxSize: 6, borderRadius: "50%", ...props });
|
597
597
|
}
|
598
598
|
});
|
599
599
|
exports.SkeletonText = void 0;
|
600
600
|
var init_SkeletonText = __esm({
|
601
601
|
"src/loader/SkeletonText.tsx"() {
|
602
|
-
exports.SkeletonText = (props) => /* @__PURE__ */
|
602
|
+
exports.SkeletonText = (props) => /* @__PURE__ */ React70__namespace.default.createElement(react.SkeletonText, { boxSize: 6, ...props });
|
603
603
|
}
|
604
604
|
});
|
605
605
|
|
@@ -674,7 +674,7 @@ var init_Button = __esm({
|
|
674
674
|
if (fontWeight) {
|
675
675
|
styles3.fontWeight = fontWeight;
|
676
676
|
}
|
677
|
-
return /* @__PURE__ */
|
677
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
678
678
|
react.Box,
|
679
679
|
{
|
680
680
|
...rest,
|
@@ -687,7 +687,7 @@ var init_Button = __esm({
|
|
687
687
|
disabled: isDisabled || isLoading,
|
688
688
|
position: "relative"
|
689
689
|
},
|
690
|
-
isLoading && /* @__PURE__ */
|
690
|
+
isLoading && /* @__PURE__ */ React70__namespace.default.createElement(react.Center, { position: "absolute", right: 0, left: 0, top: 1, bottom: 0 }, /* @__PURE__ */ React70__namespace.default.createElement(
|
691
691
|
exports.ColorInlineLoader,
|
692
692
|
{
|
693
693
|
maxWidth: getLoaderWidth(finalSize),
|
@@ -696,7 +696,7 @@ var init_Button = __esm({
|
|
696
696
|
marginY: 2
|
697
697
|
}
|
698
698
|
)),
|
699
|
-
/* @__PURE__ */
|
699
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
700
700
|
react.Flex,
|
701
701
|
{
|
702
702
|
gap: 1,
|
@@ -706,7 +706,7 @@ var init_Button = __esm({
|
|
706
706
|
visibility: isLoading ? "hidden" : "visible",
|
707
707
|
"aria-hidden": isLoading
|
708
708
|
},
|
709
|
-
/* @__PURE__ */
|
709
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { gap: 1, alignItems: "center" }, leftIcon, /* @__PURE__ */ React70__namespace.default.createElement(
|
710
710
|
react.Box,
|
711
711
|
{
|
712
712
|
visibility: isLoading ? "hidden" : "visible",
|
@@ -732,7 +732,7 @@ var init_Button = __esm({
|
|
732
732
|
exports.ButtonGroup = void 0;
|
733
733
|
var init_ButtonGroup = __esm({
|
734
734
|
"src/button/ButtonGroup.tsx"() {
|
735
|
-
exports.ButtonGroup = react.forwardRef((props, ref) => /* @__PURE__ */
|
735
|
+
exports.ButtonGroup = react.forwardRef((props, ref) => /* @__PURE__ */ React70__namespace.default.createElement(react.ButtonGroup, { ...props, ref }));
|
736
736
|
}
|
737
737
|
});
|
738
738
|
exports.IconButton = void 0;
|
@@ -740,12 +740,12 @@ var init_IconButton = __esm({
|
|
740
740
|
"src/button/IconButton.tsx"() {
|
741
741
|
init_src();
|
742
742
|
exports.IconButton = react.forwardRef(
|
743
|
-
({ ...props }, ref) => /* @__PURE__ */
|
743
|
+
({ ...props }, ref) => /* @__PURE__ */ React70__namespace.default.createElement(
|
744
744
|
react.IconButton,
|
745
745
|
{
|
746
746
|
title: props["aria-label"],
|
747
747
|
...props,
|
748
|
-
spinner: /* @__PURE__ */
|
748
|
+
spinner: /* @__PURE__ */ React70__namespace.default.createElement(exports.ColorSpinner, { width: "80%", height: "80%", marginX: 1, marginTop: 1 }),
|
749
749
|
ref
|
750
750
|
}
|
751
751
|
)
|
@@ -760,7 +760,7 @@ var init_CloseButton = __esm({
|
|
760
760
|
exports.CloseButton = react.forwardRef(
|
761
761
|
({ size: size2 = "sm", ...props }, ref) => {
|
762
762
|
const { t: t2 } = useTranslation();
|
763
|
-
return /* @__PURE__ */
|
763
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
764
764
|
exports.IconButton,
|
765
765
|
{
|
766
766
|
ref,
|
@@ -777,11 +777,11 @@ var init_CloseButton = __esm({
|
|
777
777
|
switch (size2) {
|
778
778
|
case "xs":
|
779
779
|
case "sm":
|
780
|
-
return /* @__PURE__ */
|
780
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseFill18Icon, null);
|
781
781
|
case "md":
|
782
|
-
return /* @__PURE__ */
|
782
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseFill24Icon, null);
|
783
783
|
case "lg":
|
784
|
-
return /* @__PURE__ */
|
784
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseFill30Icon, null);
|
785
785
|
}
|
786
786
|
};
|
787
787
|
texts4 = createTexts({
|
@@ -808,11 +808,11 @@ var init_FloatingActionButton = __esm({
|
|
808
808
|
placement = "bottom right",
|
809
809
|
...props
|
810
810
|
}, ref) => {
|
811
|
-
const [isTextVisible, setIsTextVisible] =
|
811
|
+
const [isTextVisible, setIsTextVisible] = React70__namespace.default.useState(
|
812
812
|
externalIsTextVisible !== void 0 ? externalIsTextVisible : false
|
813
813
|
);
|
814
814
|
const scrollDirection = useScrollDirection();
|
815
|
-
|
815
|
+
React70.useEffect(() => {
|
816
816
|
if (externalIsTextVisible !== void 0) {
|
817
817
|
return;
|
818
818
|
}
|
@@ -822,7 +822,7 @@ var init_FloatingActionButton = __esm({
|
|
822
822
|
);
|
823
823
|
return () => window.clearTimeout(id);
|
824
824
|
}, [scrollDirection, externalIsTextVisible]);
|
825
|
-
|
825
|
+
React70.useEffect(() => {
|
826
826
|
setIsTextVisible(!!externalIsTextVisible);
|
827
827
|
}, [externalIsTextVisible]);
|
828
828
|
const style = react.useMultiStyleConfig("FloatingActionButton", {
|
@@ -830,7 +830,7 @@ var init_FloatingActionButton = __esm({
|
|
830
830
|
isTextVisible,
|
831
831
|
placement
|
832
832
|
});
|
833
|
-
return /* @__PURE__ */
|
833
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
834
834
|
MotionBox,
|
835
835
|
{
|
836
836
|
__css: style.container,
|
@@ -838,8 +838,8 @@ var init_FloatingActionButton = __esm({
|
|
838
838
|
ref,
|
839
839
|
...props
|
840
840
|
},
|
841
|
-
/* @__PURE__ */
|
842
|
-
/* @__PURE__ */
|
841
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { __css: style.icon }, icon),
|
842
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
843
843
|
MotionBox,
|
844
844
|
{
|
845
845
|
animate: isTextVisible ? "show" : "hide",
|
@@ -864,11 +864,11 @@ var init_FloatingActionButton = __esm({
|
|
864
864
|
}
|
865
865
|
);
|
866
866
|
useScrollDirection = () => {
|
867
|
-
const [scrollDirection, setScrollDirection] =
|
868
|
-
const lastScrollPosition =
|
867
|
+
const [scrollDirection, setScrollDirection] = React70__namespace.default.useState(null);
|
868
|
+
const lastScrollPosition = React70__namespace.default.useRef(
|
869
869
|
typeof window !== "undefined" ? window.scrollY : 0
|
870
870
|
);
|
871
|
-
|
871
|
+
React70__namespace.default.useEffect(() => {
|
872
872
|
const onScroll = () => {
|
873
873
|
const delta = window.scrollY - lastScrollPosition.current;
|
874
874
|
if (delta === 0) {
|
@@ -904,7 +904,7 @@ var init_AlertIcon = __esm({
|
|
904
904
|
AlertIcon = ({ variant }) => {
|
905
905
|
const Icon = getIcon2(variant);
|
906
906
|
const { t: t2 } = useTranslation();
|
907
|
-
return /* @__PURE__ */
|
907
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
908
908
|
Icon,
|
909
909
|
{
|
910
910
|
flexShrink: 0,
|
@@ -971,7 +971,7 @@ var init_BaseAlert = __esm({
|
|
971
971
|
...boxProps
|
972
972
|
}) => {
|
973
973
|
const styles3 = react.useMultiStyleConfig("Alert", { variant });
|
974
|
-
return /* @__PURE__ */
|
974
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { __css: styles3.container, ...boxProps }, children);
|
975
975
|
};
|
976
976
|
}
|
977
977
|
});
|
@@ -998,17 +998,17 @@ var init_ClosableAlert = __esm({
|
|
998
998
|
externalOnClose();
|
999
999
|
onClose();
|
1000
1000
|
};
|
1001
|
-
return /* @__PURE__ */
|
1001
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(BaseAlert, { variant }, /* @__PURE__ */ React70__namespace.default.createElement(
|
1002
1002
|
exports.IconButton,
|
1003
1003
|
{
|
1004
1004
|
variant: "ghost",
|
1005
1005
|
size: "sm",
|
1006
1006
|
onClick: handleClose,
|
1007
|
-
icon: /* @__PURE__ */
|
1007
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
1008
1008
|
"aria-label": t2(texts6.close),
|
1009
1009
|
sx: styles3.closeButton
|
1010
1010
|
}
|
1011
|
-
), /* @__PURE__ */
|
1011
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(AlertIcon, { variant }), children);
|
1012
1012
|
};
|
1013
1013
|
texts6 = createTexts({
|
1014
1014
|
close: {
|
@@ -1036,7 +1036,7 @@ var init_ExpandableAlert = __esm({
|
|
1036
1036
|
...boxProps
|
1037
1037
|
}) => {
|
1038
1038
|
const styles3 = react.useMultiStyleConfig("AlertExpandable", { variant });
|
1039
|
-
return /* @__PURE__ */
|
1039
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(BaseAlert, { variant, ...boxProps, paddingX: 0, paddingY: 0 }, /* @__PURE__ */ React70__namespace.default.createElement(
|
1040
1040
|
react.Accordion,
|
1041
1041
|
{
|
1042
1042
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
@@ -1044,14 +1044,14 @@ var init_ExpandableAlert = __esm({
|
|
1044
1044
|
allowToggle: true,
|
1045
1045
|
flexGrow: "1"
|
1046
1046
|
},
|
1047
|
-
/* @__PURE__ */
|
1047
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.AccordionItem, null, /* @__PURE__ */ React70__namespace.default.createElement(react.AccordionButton, { sx: styles3.container }, /* @__PURE__ */ React70__namespace.default.createElement(
|
1048
1048
|
react.Flex,
|
1049
1049
|
{
|
1050
1050
|
justifyContent: "space-between",
|
1051
1051
|
alignItems: "center",
|
1052
1052
|
flexGrow: "1"
|
1053
1053
|
},
|
1054
|
-
/* @__PURE__ */
|
1054
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { as: headingLevel, alignItems: "center" }, /* @__PURE__ */ React70__namespace.default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React70__namespace.default.createElement(
|
1055
1055
|
react.Box,
|
1056
1056
|
{
|
1057
1057
|
as: "span",
|
@@ -1065,8 +1065,8 @@ var init_ExpandableAlert = __esm({
|
|
1065
1065
|
},
|
1066
1066
|
title
|
1067
1067
|
)),
|
1068
|
-
/* @__PURE__ */
|
1069
|
-
)), /* @__PURE__ */
|
1068
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.AccordionIcon, null)
|
1069
|
+
)), /* @__PURE__ */ React70__namespace.default.createElement(react.AccordionPanel, null, children))
|
1070
1070
|
));
|
1071
1071
|
};
|
1072
1072
|
}
|
@@ -1077,7 +1077,7 @@ var init_StaticAlert = __esm({
|
|
1077
1077
|
init_AlertIcon();
|
1078
1078
|
init_BaseAlert();
|
1079
1079
|
exports.StaticAlert = ({ children, ...props }) => {
|
1080
|
-
return /* @__PURE__ */
|
1080
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(BaseAlert, { ...props }, /* @__PURE__ */ React70__namespace.default.createElement(AlertIcon, { variant: props.variant }), children);
|
1081
1081
|
};
|
1082
1082
|
}
|
1083
1083
|
});
|
@@ -1095,10 +1095,10 @@ var init_Breadcrumb = __esm({
|
|
1095
1095
|
"src/breadcrumb/Breadcrumb.tsx"() {
|
1096
1096
|
exports.Breadcrumb = (props) => {
|
1097
1097
|
const iconColor = react.useColorModeValue("blackAlpha.400", "whiteAlpha.400");
|
1098
|
-
return /* @__PURE__ */
|
1098
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
1099
1099
|
react.Breadcrumb,
|
1100
1100
|
{
|
1101
|
-
separator: /* @__PURE__ */
|
1101
|
+
separator: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, { color: iconColor }),
|
1102
1102
|
...props
|
1103
1103
|
}
|
1104
1104
|
);
|
@@ -1123,16 +1123,26 @@ var init_Card = __esm({
|
|
1123
1123
|
colorScheme,
|
1124
1124
|
size: size2
|
1125
1125
|
});
|
1126
|
-
return /* @__PURE__ */
|
1126
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.chakra.div, { sx: styles3, ...props, ref }, children);
|
1127
1127
|
}
|
1128
1128
|
);
|
1129
1129
|
}
|
1130
1130
|
});
|
1131
|
+
exports.StaticCard = void 0;
|
1132
|
+
var init_StaticCard = __esm({
|
1133
|
+
"src/card/StaticCard.tsx"() {
|
1134
|
+
exports.StaticCard = ({ colorScheme, ...props }) => {
|
1135
|
+
const styles3 = react.useStyleConfig("StaticCard", { colorScheme });
|
1136
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { __css: styles3, ...props });
|
1137
|
+
};
|
1138
|
+
}
|
1139
|
+
});
|
1131
1140
|
|
1132
1141
|
// src/card/index.tsx
|
1133
1142
|
var init_card = __esm({
|
1134
1143
|
"src/card/index.tsx"() {
|
1135
1144
|
init_Card();
|
1145
|
+
init_StaticCard();
|
1136
1146
|
}
|
1137
1147
|
});
|
1138
1148
|
exports.Badge = void 0;
|
@@ -1140,7 +1150,7 @@ var init_Badge = __esm({
|
|
1140
1150
|
"src/typography/Badge.tsx"() {
|
1141
1151
|
exports.Badge = react.forwardRef(
|
1142
1152
|
({ icon, colorScheme = "grey", children, ...props }, ref) => {
|
1143
|
-
return /* @__PURE__ */
|
1153
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
1144
1154
|
react.Badge,
|
1145
1155
|
{
|
1146
1156
|
colorScheme,
|
@@ -1148,7 +1158,7 @@ var init_Badge = __esm({
|
|
1148
1158
|
paddingLeft: icon ? 1 : void 0,
|
1149
1159
|
ref
|
1150
1160
|
},
|
1151
|
-
icon &&
|
1161
|
+
icon && React70__namespace.default.cloneElement(icon, { marginRight: 1 }),
|
1152
1162
|
children
|
1153
1163
|
);
|
1154
1164
|
}
|
@@ -1158,7 +1168,7 @@ var init_Badge = __esm({
|
|
1158
1168
|
exports.Code = void 0;
|
1159
1169
|
var init_Code = __esm({
|
1160
1170
|
"src/typography/Code.tsx"() {
|
1161
|
-
exports.Code = react.forwardRef((props, ref) => /* @__PURE__ */
|
1171
|
+
exports.Code = react.forwardRef((props, ref) => /* @__PURE__ */ React70__namespace.default.createElement(react.Code, { ...props, ref }));
|
1162
1172
|
}
|
1163
1173
|
});
|
1164
1174
|
exports.Heading = void 0;
|
@@ -1174,7 +1184,7 @@ var init_Heading = __esm({
|
|
1174
1184
|
}) => {
|
1175
1185
|
const id = externalId ?? (autoId && typeof props.children === "string") ? slugify(props.children) : void 0;
|
1176
1186
|
const color2 = react.useColorModeValue("text.primary.light", "text.primary.dark");
|
1177
|
-
return /* @__PURE__ */
|
1187
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Text, { as, textStyle: variant, id, color: color2, ...props });
|
1178
1188
|
};
|
1179
1189
|
}
|
1180
1190
|
});
|
@@ -1183,7 +1193,7 @@ var init_Text = __esm({
|
|
1183
1193
|
"src/typography/Text.tsx"() {
|
1184
1194
|
exports.Text = react.forwardRef(
|
1185
1195
|
({ variant = "sm", ...props }, ref) => {
|
1186
|
-
return /* @__PURE__ */
|
1196
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Text, { ...props, textStyle: variant, ref });
|
1187
1197
|
}
|
1188
1198
|
);
|
1189
1199
|
}
|
@@ -1204,7 +1214,7 @@ function CalendarCell({
|
|
1204
1214
|
currentMonth,
|
1205
1215
|
variant
|
1206
1216
|
}) {
|
1207
|
-
const ref =
|
1217
|
+
const ref = React70.useRef(null);
|
1208
1218
|
const {
|
1209
1219
|
cellProps,
|
1210
1220
|
buttonProps,
|
@@ -1228,7 +1238,7 @@ function CalendarCell({
|
|
1228
1238
|
if (isOutsideMonth) {
|
1229
1239
|
stateProps["data-unavailable"] = true;
|
1230
1240
|
}
|
1231
|
-
|
1241
|
+
React70.useEffect(() => {
|
1232
1242
|
var _a6;
|
1233
1243
|
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
1234
1244
|
"touchend",
|
@@ -1238,7 +1248,7 @@ function CalendarCell({
|
|
1238
1248
|
{ passive: false, once: true }
|
1239
1249
|
);
|
1240
1250
|
}, []);
|
1241
|
-
return /* @__PURE__ */
|
1251
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
1242
1252
|
react.Box,
|
1243
1253
|
{
|
1244
1254
|
as: "td",
|
@@ -1261,7 +1271,7 @@ function CalendarCell({
|
|
1261
1271
|
}
|
1262
1272
|
}
|
1263
1273
|
},
|
1264
|
-
/* @__PURE__ */
|
1274
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
1265
1275
|
react.Box,
|
1266
1276
|
{
|
1267
1277
|
as: "button",
|
@@ -1328,8 +1338,8 @@ function CalendarGrid({
|
|
1328
1338
|
const weeksInMonth = date.getWeeksInMonth(state2.visibleRange.start, locale);
|
1329
1339
|
const weeksInMonthRange = new Array(weeksInMonth).fill(0).map((_, i) => i);
|
1330
1340
|
const styles3 = react.useMultiStyleConfig("Datepicker", { variant });
|
1331
|
-
return /* @__PURE__ */
|
1332
|
-
return /* @__PURE__ */
|
1341
|
+
return /* @__PURE__ */ React70__namespace.default.createElement("table", { ...gridProps }, /* @__PURE__ */ React70__namespace.default.createElement("thead", { ...headerProps }, /* @__PURE__ */ React70__namespace.default.createElement("tr", null, weekDays[language].map((day, index) => {
|
1342
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
1333
1343
|
exports.Text,
|
1334
1344
|
{
|
1335
1345
|
as: "th",
|
@@ -1339,8 +1349,8 @@ function CalendarGrid({
|
|
1339
1349
|
},
|
1340
1350
|
day
|
1341
1351
|
);
|
1342
|
-
}))), /* @__PURE__ */
|
1343
|
-
(date, dayIndex) => date ? /* @__PURE__ */
|
1352
|
+
}))), /* @__PURE__ */ React70__namespace.default.createElement("tbody", null, weeksInMonthRange.map((weekIndex) => /* @__PURE__ */ React70__namespace.default.createElement("tr", { key: weekIndex }, state2.getDatesInWeek(weekIndex, startDate).map(
|
1353
|
+
(date, dayIndex) => date ? /* @__PURE__ */ React70__namespace.default.createElement(
|
1344
1354
|
CalendarCell,
|
1345
1355
|
{
|
1346
1356
|
variant,
|
@@ -1349,7 +1359,7 @@ function CalendarGrid({
|
|
1349
1359
|
date,
|
1350
1360
|
currentMonth: startDate
|
1351
1361
|
}
|
1352
|
-
) : /* @__PURE__ */
|
1362
|
+
) : /* @__PURE__ */ React70__namespace.default.createElement("td", { key: dayIndex })
|
1353
1363
|
)))));
|
1354
1364
|
}
|
1355
1365
|
var weekDays;
|
@@ -1372,9 +1382,9 @@ function CalendarNavigationButton({
|
|
1372
1382
|
"aria-label": ariaLabel,
|
1373
1383
|
...rest
|
1374
1384
|
}) {
|
1375
|
-
const ref =
|
1385
|
+
const ref = React70.useRef(null);
|
1376
1386
|
const { buttonProps } = reactAria.useButton(rest, ref);
|
1377
|
-
return /* @__PURE__ */
|
1387
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
1378
1388
|
exports.IconButton,
|
1379
1389
|
{
|
1380
1390
|
...buttonProps,
|
@@ -1411,7 +1421,7 @@ function CalendarHeader({
|
|
1411
1421
|
);
|
1412
1422
|
const areAllOtherYearsDisabled = isPreviousYearDisabled && isNextYearDisabled;
|
1413
1423
|
const isYearPickerVisible = showYearNavigation && !areAllOtherYearsDisabled;
|
1414
|
-
return /* @__PURE__ */
|
1424
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { alignItems: "center", paddingBottom: "4", justifyContent: "space-between" }, /* @__PURE__ */ React70__namespace.default.createElement(
|
1415
1425
|
CalendarNavigator,
|
1416
1426
|
{
|
1417
1427
|
title: title ? title : isYearPickerVisible ? monthTitle : monthAndYearTitle,
|
@@ -1421,7 +1431,7 @@ function CalendarHeader({
|
|
1421
1431
|
isNextDisabled: !state2.isPreviousVisibleRangeInvalid,
|
1422
1432
|
isPreviousDisabled: !state2.isNextVisibleRangeInvalid
|
1423
1433
|
}
|
1424
|
-
), isYearPickerVisible && /* @__PURE__ */
|
1434
|
+
), isYearPickerVisible && /* @__PURE__ */ React70__namespace.default.createElement(
|
1425
1435
|
CalendarNavigator,
|
1426
1436
|
{
|
1427
1437
|
title: jsDate.getFullYear().toString(),
|
@@ -1450,15 +1460,15 @@ var init_CalendarHeader = __esm({
|
|
1450
1460
|
isNextDisabled
|
1451
1461
|
}) => {
|
1452
1462
|
const { t: t2 } = useTranslation();
|
1453
|
-
return /* @__PURE__ */
|
1463
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { alignItems: "center", flexGrow: 1 }, /* @__PURE__ */ React70__namespace.default.createElement(
|
1454
1464
|
CalendarNavigationButton,
|
1455
1465
|
{
|
1456
1466
|
onPress: onPrevious,
|
1457
1467
|
isDisabled: isPreviousDisabled,
|
1458
|
-
icon: /* @__PURE__ */
|
1468
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.ArrowLeftOutline24Icon, null),
|
1459
1469
|
"aria-label": `${t2(texts7.previous)} ${t2(texts7[unit])}`
|
1460
1470
|
}
|
1461
|
-
), /* @__PURE__ */
|
1471
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
1462
1472
|
exports.Heading,
|
1463
1473
|
{
|
1464
1474
|
as: "div",
|
@@ -1469,12 +1479,12 @@ var init_CalendarHeader = __esm({
|
|
1469
1479
|
textAlign: "center"
|
1470
1480
|
},
|
1471
1481
|
capitalize(title)
|
1472
|
-
), /* @__PURE__ */
|
1482
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
1473
1483
|
CalendarNavigationButton,
|
1474
1484
|
{
|
1475
1485
|
onPress: onNext,
|
1476
1486
|
isDisabled: isNextDisabled,
|
1477
|
-
icon: /* @__PURE__ */
|
1487
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.ArrowRightOutline24Icon, null),
|
1478
1488
|
"aria-label": `${t2(texts7.next)} ${t2(texts7[unit])}`
|
1479
1489
|
}
|
1480
1490
|
));
|
@@ -1522,7 +1532,7 @@ function Calendar({
|
|
1522
1532
|
const { calendarProps } = reactAria.useCalendar(props, state2);
|
1523
1533
|
const calendarAriaLabel = calendarProps["aria-label"];
|
1524
1534
|
const ariaLabel = t2(texts8.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
|
1525
|
-
return /* @__PURE__ */
|
1535
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...calendarProps, "aria-label": ariaLabel }, /* @__PURE__ */ React70__namespace.default.createElement(CalendarHeader, { state: state2, showYearNavigation }), /* @__PURE__ */ React70__namespace.default.createElement(CalendarGrid, { variant, state: state2 }));
|
1526
1536
|
}
|
1527
1537
|
var texts8;
|
1528
1538
|
var init_Calendar = __esm({
|
@@ -1556,7 +1566,7 @@ var init_CalendarTriggerButton = __esm({
|
|
1556
1566
|
onPress(event);
|
1557
1567
|
}
|
1558
1568
|
};
|
1559
|
-
return /* @__PURE__ */
|
1569
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
1560
1570
|
react.Box,
|
1561
1571
|
{
|
1562
1572
|
ref,
|
@@ -1567,7 +1577,7 @@ var init_CalendarTriggerButton = __esm({
|
|
1567
1577
|
...filteredButtonProps,
|
1568
1578
|
onKeyUp: handleOnPress
|
1569
1579
|
},
|
1570
|
-
/* @__PURE__ */
|
1580
|
+
/* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CalendarOutline24Icon, null)
|
1571
1581
|
));
|
1572
1582
|
}
|
1573
1583
|
);
|
@@ -1584,9 +1594,9 @@ var init_CalendarTriggerButton = __esm({
|
|
1584
1594
|
var DateTimeSegment, isPaddable;
|
1585
1595
|
var init_DateTimeSegment = __esm({
|
1586
1596
|
"src/datepicker/DateTimeSegment.tsx"() {
|
1587
|
-
DateTimeSegment =
|
1597
|
+
DateTimeSegment = React70.forwardRef(
|
1588
1598
|
({ segment, state: state2 }, externalRef) => {
|
1589
|
-
const internalRef =
|
1599
|
+
const internalRef = React70.useRef(null);
|
1590
1600
|
const ref = externalRef ?? internalRef;
|
1591
1601
|
const { segmentProps } = reactAria.useDateSegment(
|
1592
1602
|
segment,
|
@@ -1597,7 +1607,7 @@ var init_DateTimeSegment = __esm({
|
|
1597
1607
|
isPlaceholder: segment.isPlaceholder,
|
1598
1608
|
isEditable: segment.isEditable
|
1599
1609
|
});
|
1600
|
-
return /* @__PURE__ */
|
1610
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
1601
1611
|
react.Box,
|
1602
1612
|
{
|
1603
1613
|
...segmentProps,
|
@@ -1636,7 +1646,7 @@ var init_DateField = __esm({
|
|
1636
1646
|
"src/datepicker/DateField.tsx"() {
|
1637
1647
|
init_DateTimeSegment();
|
1638
1648
|
init_utils();
|
1639
|
-
DateField =
|
1649
|
+
DateField = React70.forwardRef(
|
1640
1650
|
(props, externalRef) => {
|
1641
1651
|
var _a6;
|
1642
1652
|
const locale = useCurrentLocale();
|
@@ -1646,14 +1656,14 @@ var init_DateField = __esm({
|
|
1646
1656
|
locale,
|
1647
1657
|
createCalendar: createCalendar2
|
1648
1658
|
});
|
1649
|
-
const internalRef =
|
1659
|
+
const internalRef = React70.useRef(null);
|
1650
1660
|
const ref = externalRef ?? internalRef;
|
1651
1661
|
const { fieldProps, labelProps } = reactAria.useDateField(
|
1652
1662
|
props,
|
1653
1663
|
state2,
|
1654
1664
|
ref
|
1655
1665
|
);
|
1656
|
-
return /* @__PURE__ */
|
1666
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { minWidth: "6rem", width: "100%" }, props.label && /* @__PURE__ */ React70__namespace.default.createElement(
|
1657
1667
|
react.FormLabel,
|
1658
1668
|
{
|
1659
1669
|
...props.labelProps,
|
@@ -1663,7 +1673,7 @@ var init_DateField = __esm({
|
|
1663
1673
|
paddingTop: "2px"
|
1664
1674
|
},
|
1665
1675
|
props.label
|
1666
|
-
), /* @__PURE__ */
|
1676
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5" }, state2.segments.map((segment, i) => /* @__PURE__ */ React70__namespace.default.createElement(DateTimeSegment, { key: i, segment, state: state2 }))), /* @__PURE__ */ React70__namespace.default.createElement(
|
1667
1677
|
"input",
|
1668
1678
|
{
|
1669
1679
|
type: "hidden",
|
@@ -1684,7 +1694,7 @@ var init_StyledField = __esm({
|
|
1684
1694
|
isInvalid: false
|
1685
1695
|
};
|
1686
1696
|
const styles3 = react.useMultiStyleConfig("Datepicker", { variant });
|
1687
|
-
return /* @__PURE__ */
|
1697
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
1688
1698
|
react.Box,
|
1689
1699
|
{
|
1690
1700
|
...otherProps,
|
@@ -1707,7 +1717,7 @@ var init_DatePicker = __esm({
|
|
1707
1717
|
init_DateField();
|
1708
1718
|
init_StyledField();
|
1709
1719
|
init_utils();
|
1710
|
-
exports.DatePicker =
|
1720
|
+
exports.DatePicker = React70.forwardRef(
|
1711
1721
|
({
|
1712
1722
|
variant,
|
1713
1723
|
errorMessage,
|
@@ -1725,7 +1735,7 @@ var init_DatePicker = __esm({
|
|
1725
1735
|
isRequired: props.isRequired ?? (formControlProps == null ? void 0 : formControlProps.isRequired),
|
1726
1736
|
validationState: (formControlProps == null ? void 0 : formControlProps.isInvalid) ? "invalid" : "valid"
|
1727
1737
|
});
|
1728
|
-
const internalRef =
|
1738
|
+
const internalRef = React70.useRef(null);
|
1729
1739
|
const ref = externalRef ?? internalRef;
|
1730
1740
|
const {
|
1731
1741
|
groupProps,
|
@@ -1745,7 +1755,7 @@ var init_DatePicker = __esm({
|
|
1745
1755
|
const onFieldClick = () => {
|
1746
1756
|
state2.setOpen(true);
|
1747
1757
|
};
|
1748
|
-
const popoverContent = /* @__PURE__ */
|
1758
|
+
const popoverContent = /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverContent, { color: "darkGrey", sx: styles3.calendarPopover }, /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React70__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
1749
1759
|
Calendar,
|
1750
1760
|
{
|
1751
1761
|
...calendarProps,
|
@@ -1753,7 +1763,7 @@ var init_DatePicker = __esm({
|
|
1753
1763
|
showYearNavigation
|
1754
1764
|
}
|
1755
1765
|
))));
|
1756
|
-
return /* @__PURE__ */
|
1766
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React70__namespace.default.createElement(
|
1757
1767
|
react.Box,
|
1758
1768
|
{
|
1759
1769
|
position: "relative",
|
@@ -1761,7 +1771,7 @@ var init_DatePicker = __esm({
|
|
1761
1771
|
flexDirection: "column",
|
1762
1772
|
width
|
1763
1773
|
},
|
1764
|
-
/* @__PURE__ */
|
1774
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
1765
1775
|
react.Popover,
|
1766
1776
|
{
|
1767
1777
|
...dialogProps,
|
@@ -1770,7 +1780,7 @@ var init_DatePicker = __esm({
|
|
1770
1780
|
onClose: state2.close,
|
1771
1781
|
flip: false
|
1772
1782
|
},
|
1773
|
-
/* @__PURE__ */
|
1783
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.InputGroup, { ...groupProps, display: "inline-flex" }, /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
1774
1784
|
StyledField,
|
1775
1785
|
{
|
1776
1786
|
variant,
|
@@ -1778,7 +1788,7 @@ var init_DatePicker = __esm({
|
|
1778
1788
|
paddingX: 3,
|
1779
1789
|
minHeight
|
1780
1790
|
},
|
1781
|
-
/* @__PURE__ */
|
1791
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
1782
1792
|
CalendarTriggerButton,
|
1783
1793
|
{
|
1784
1794
|
variant,
|
@@ -1786,7 +1796,7 @@ var init_DatePicker = __esm({
|
|
1786
1796
|
...buttonProps
|
1787
1797
|
}
|
1788
1798
|
)),
|
1789
|
-
/* @__PURE__ */
|
1799
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
1790
1800
|
DateField,
|
1791
1801
|
{
|
1792
1802
|
label: props.label,
|
@@ -1796,8 +1806,8 @@ var init_DatePicker = __esm({
|
|
1796
1806
|
}
|
1797
1807
|
)
|
1798
1808
|
))),
|
1799
|
-
/* @__PURE__ */
|
1800
|
-
state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */
|
1809
|
+
/* @__PURE__ */ React70__namespace.default.createElement(exports.FormErrorMessage, { ...errorMessageProps }, errorMessage),
|
1810
|
+
state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React70__namespace.default.createElement(react.Portal, null, popoverContent),
|
1801
1811
|
state2.isOpen && !props.isDisabled && !withPortal && popoverContent
|
1802
1812
|
)
|
1803
1813
|
));
|
@@ -1813,9 +1823,9 @@ function RangeCalendar(props) {
|
|
1813
1823
|
locale,
|
1814
1824
|
createCalendar: date.createCalendar
|
1815
1825
|
});
|
1816
|
-
const ref =
|
1826
|
+
const ref = React70.useRef(null);
|
1817
1827
|
const { calendarProps, title } = reactAria.useRangeCalendar(props, state2, ref);
|
1818
|
-
return /* @__PURE__ */
|
1828
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...calendarProps, ref }, /* @__PURE__ */ React70__namespace.default.createElement(CalendarHeader, { state: state2, title }), /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { display: "flex", gap: "8" }, /* @__PURE__ */ React70__namespace.default.createElement(CalendarGrid, { variant: props.variant, state: state2 }), /* @__PURE__ */ React70__namespace.default.createElement(
|
1819
1829
|
CalendarGrid,
|
1820
1830
|
{
|
1821
1831
|
variant: props.variant,
|
@@ -1846,7 +1856,7 @@ function DateRangePicker({
|
|
1846
1856
|
isRequired: props.isRequired ?? (formControlProps == null ? void 0 : formControlProps.isRequired),
|
1847
1857
|
validationState: formControlProps.isInvalid ? "invalid" : "valid"
|
1848
1858
|
});
|
1849
|
-
const ref =
|
1859
|
+
const ref = React70.useRef(null);
|
1850
1860
|
const {
|
1851
1861
|
groupProps,
|
1852
1862
|
labelProps,
|
@@ -1867,8 +1877,8 @@ function DateRangePicker({
|
|
1867
1877
|
const onFieldClick = () => {
|
1868
1878
|
state2.setOpen(true);
|
1869
1879
|
};
|
1870
|
-
const popoverContent = /* @__PURE__ */
|
1871
|
-
return /* @__PURE__ */
|
1880
|
+
const popoverContent = /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverContent, { sx: styles3.calendarPopover, maxWidth: "none" }, /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React70__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React70__namespace.default.createElement(RangeCalendar, { variant: "base", ...calendarProps }))));
|
1881
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React70__namespace.default.createElement(react.FormLabel, { ...labelProps, sx: styles3.inputLabel }, props.label), /* @__PURE__ */ React70__namespace.default.createElement(
|
1872
1882
|
react.Popover,
|
1873
1883
|
{
|
1874
1884
|
...dialogProps,
|
@@ -1877,7 +1887,7 @@ function DateRangePicker({
|
|
1877
1887
|
onClose: state2.close,
|
1878
1888
|
flip: false
|
1879
1889
|
},
|
1880
|
-
/* @__PURE__ */
|
1890
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.InputGroup, { ...groupProps, width: "auto", display: "inline-flex" }, /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
1881
1891
|
StyledField,
|
1882
1892
|
{
|
1883
1893
|
alignItems: "center",
|
@@ -1887,7 +1897,7 @@ function DateRangePicker({
|
|
1887
1897
|
onKeyPress: handleEnterClick,
|
1888
1898
|
minHeight
|
1889
1899
|
},
|
1890
|
-
variant && /* @__PURE__ */
|
1900
|
+
variant && /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
1891
1901
|
CalendarTriggerButton,
|
1892
1902
|
{
|
1893
1903
|
paddingLeft: 1,
|
@@ -1897,7 +1907,7 @@ function DateRangePicker({
|
|
1897
1907
|
...buttonProps
|
1898
1908
|
}
|
1899
1909
|
)),
|
1900
|
-
/* @__PURE__ */
|
1910
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
1901
1911
|
DateField,
|
1902
1912
|
{
|
1903
1913
|
...startFieldProps,
|
@@ -1906,8 +1916,8 @@ function DateRangePicker({
|
|
1906
1916
|
labelProps
|
1907
1917
|
}
|
1908
1918
|
),
|
1909
|
-
/* @__PURE__ */
|
1910
|
-
/* @__PURE__ */
|
1919
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: "span", "aria-hidden": "true", paddingRight: "2" }, "\u2013"),
|
1920
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
1911
1921
|
DateField,
|
1912
1922
|
{
|
1913
1923
|
...endFieldProps,
|
@@ -1917,7 +1927,7 @@ function DateRangePicker({
|
|
1917
1927
|
}
|
1918
1928
|
)
|
1919
1929
|
))),
|
1920
|
-
state2.isOpen && withPortal && /* @__PURE__ */
|
1930
|
+
state2.isOpen && withPortal && /* @__PURE__ */ React70__namespace.default.createElement(react.Portal, null, popoverContent),
|
1921
1931
|
state2.isOpen && !withPortal && popoverContent
|
1922
1932
|
)));
|
1923
1933
|
}
|
@@ -1937,9 +1947,9 @@ var init_TimeField = __esm({
|
|
1937
1947
|
init_DateTimeSegment();
|
1938
1948
|
init_utils();
|
1939
1949
|
TimeField = ({ state: state2, ...props }) => {
|
1940
|
-
const ref =
|
1950
|
+
const ref = React70.useRef(null);
|
1941
1951
|
const { labelProps, fieldProps } = reactAria.useTimeField(props, state2, ref);
|
1942
|
-
return /* @__PURE__ */
|
1952
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
1943
1953
|
exports.FormLabel,
|
1944
1954
|
{
|
1945
1955
|
...labelProps,
|
@@ -1951,7 +1961,7 @@ var init_TimeField = __esm({
|
|
1951
1961
|
paddingTop: "2px"
|
1952
1962
|
},
|
1953
1963
|
props.label
|
1954
|
-
), /* @__PURE__ */
|
1964
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5" }, state2.segments.map((segment) => /* @__PURE__ */ React70__namespace.default.createElement(DateTimeSegment, { key: segment.type, segment, state: state2 }))), /* @__PURE__ */ React70__namespace.default.createElement(
|
1955
1965
|
"input",
|
1956
1966
|
{
|
1957
1967
|
type: "hidden",
|
@@ -2027,7 +2037,7 @@ var init_TimePicker = __esm({
|
|
2027
2037
|
const ariaLabel = `${inputLabel} \u2013 ${t2(
|
2028
2038
|
texts10.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
|
2029
2039
|
)}`;
|
2030
|
-
return /* @__PURE__ */
|
2040
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
2031
2041
|
StyledField,
|
2032
2042
|
{
|
2033
2043
|
variant: "base",
|
@@ -2043,7 +2053,7 @@ var init_TimePicker = __esm({
|
|
2043
2053
|
"aria-label": ariaLabel,
|
2044
2054
|
...boxProps
|
2045
2055
|
},
|
2046
|
-
/* @__PURE__ */
|
2056
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
2047
2057
|
exports.IconButton,
|
2048
2058
|
{
|
2049
2059
|
variant: "ghost",
|
@@ -2051,14 +2061,14 @@ var init_TimePicker = __esm({
|
|
2051
2061
|
borderRadius: "xs",
|
2052
2062
|
"aria-label": backwardsLabel,
|
2053
2063
|
title: backwardsLabel,
|
2054
|
-
icon: /* @__PURE__ */
|
2064
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.DropdownLeftFill18Icon, null),
|
2055
2065
|
onClick: handleBackwardsClick,
|
2056
2066
|
isDisabled,
|
2057
2067
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
2058
2068
|
}
|
2059
2069
|
),
|
2060
|
-
/* @__PURE__ */
|
2061
|
-
/* @__PURE__ */
|
2070
|
+
/* @__PURE__ */ React70__namespace.default.createElement(TimeField, { label, state: state2, name }),
|
2071
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
2062
2072
|
exports.IconButton,
|
2063
2073
|
{
|
2064
2074
|
variant: "ghost",
|
@@ -2066,7 +2076,7 @@ var init_TimePicker = __esm({
|
|
2066
2076
|
borderRadius: "xs",
|
2067
2077
|
"aria-label": forwardsLabel,
|
2068
2078
|
title: forwardsLabel,
|
2069
|
-
icon: /* @__PURE__ */
|
2079
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, null),
|
2070
2080
|
onClick: handleForwardClick,
|
2071
2081
|
isDisabled,
|
2072
2082
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
@@ -2152,7 +2162,7 @@ var init_AttachedInputs = __esm({
|
|
2152
2162
|
}
|
2153
2163
|
};
|
2154
2164
|
const direction2 = flexDirection === "row" ? "horizontal" : "vertical";
|
2155
|
-
return /* @__PURE__ */
|
2165
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
2156
2166
|
react.Flex,
|
2157
2167
|
{
|
2158
2168
|
role: "group",
|
@@ -2169,16 +2179,16 @@ var Dialog;
|
|
2169
2179
|
var init_Dialog = __esm({
|
2170
2180
|
"src/input/Dialog.tsx"() {
|
2171
2181
|
Dialog = ({ title, children, ...props }) => {
|
2172
|
-
const ref =
|
2182
|
+
const ref = React70.useRef(null);
|
2173
2183
|
const { dialogProps, titleProps } = reactAria.useDialog(props, ref);
|
2174
|
-
return /* @__PURE__ */
|
2184
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...dialogProps, ref, outline: "none" }, title && /* @__PURE__ */ React70__namespace.default.createElement(react.Heading, { as: "h3", ...titleProps }, title), children);
|
2175
2185
|
};
|
2176
2186
|
}
|
2177
2187
|
});
|
2178
2188
|
var Popover3;
|
2179
2189
|
var init_Popover = __esm({
|
2180
2190
|
"src/input/Popover.tsx"() {
|
2181
|
-
Popover3 =
|
2191
|
+
Popover3 = React70.forwardRef(
|
2182
2192
|
({
|
2183
2193
|
children,
|
2184
2194
|
state: state2,
|
@@ -2192,7 +2202,7 @@ var init_Popover = __esm({
|
|
2192
2202
|
containerPadding = 12
|
2193
2203
|
}, ref) => {
|
2194
2204
|
var _a6;
|
2195
|
-
const internalRef =
|
2205
|
+
const internalRef = React70.useRef(null);
|
2196
2206
|
const popoverRef = ref ?? internalRef;
|
2197
2207
|
const { popoverProps, underlayProps } = reactAria.usePopover(
|
2198
2208
|
{
|
@@ -2207,28 +2217,28 @@ var init_Popover = __esm({
|
|
2207
2217
|
},
|
2208
2218
|
state2
|
2209
2219
|
);
|
2210
|
-
const popoverBox = /* @__PURE__ */
|
2220
|
+
const popoverBox = /* @__PURE__ */ React70__namespace.default.createElement(
|
2211
2221
|
react.Box,
|
2212
2222
|
{
|
2213
2223
|
...popoverProps,
|
2214
2224
|
ref: popoverRef,
|
2215
2225
|
minWidth: ((_a6 = triggerRef.current) == null ? void 0 : _a6.clientWidth) ?? "auto"
|
2216
2226
|
},
|
2217
|
-
/* @__PURE__ */
|
2227
|
+
/* @__PURE__ */ React70__namespace.default.createElement(reactAria.DismissButton, { onDismiss: state2.close }),
|
2218
2228
|
children,
|
2219
|
-
/* @__PURE__ */
|
2229
|
+
/* @__PURE__ */ React70__namespace.default.createElement(reactAria.DismissButton, { onDismiss: state2.close })
|
2220
2230
|
);
|
2221
2231
|
if (isNonModal) {
|
2222
2232
|
return popoverBox;
|
2223
2233
|
}
|
2224
|
-
return /* @__PURE__ */
|
2234
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(reactAria.Overlay, null, hasBackdrop && /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...underlayProps, position: "fixed", inset: "0" }), popoverBox);
|
2225
2235
|
}
|
2226
2236
|
);
|
2227
2237
|
}
|
2228
2238
|
});
|
2229
2239
|
function useForceRerender(shouldRerender) {
|
2230
|
-
const [_, update] =
|
2231
|
-
|
2240
|
+
const [_, update] = React70.useState(false);
|
2241
|
+
React70.useEffect(() => {
|
2232
2242
|
if (shouldRerender) {
|
2233
2243
|
update((x) => !x);
|
2234
2244
|
}
|
@@ -2257,7 +2267,7 @@ var init_CardSelect = __esm({
|
|
2257
2267
|
...props
|
2258
2268
|
}, externalRef) => {
|
2259
2269
|
const label = "label" in props ? props.label : props["aria-label"];
|
2260
|
-
const internalRef =
|
2270
|
+
const internalRef = React70.useRef(null);
|
2261
2271
|
const triggerRef = externalRef ?? internalRef;
|
2262
2272
|
const state2 = reactStately.useOverlayTriggerState({
|
2263
2273
|
isOpen: externalIsOpen,
|
@@ -2276,7 +2286,7 @@ var init_CardSelect = __esm({
|
|
2276
2286
|
});
|
2277
2287
|
useForceRerender(state2.isOpen);
|
2278
2288
|
const ChevronIcon = size2 === "sm" ? sporIconReact.DropdownDownFill18Icon : sporIconReact.DropdownDownFill24Icon;
|
2279
|
-
return /* @__PURE__ */
|
2289
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React70__namespace.default.createElement(
|
2280
2290
|
react.chakra.button,
|
2281
2291
|
{
|
2282
2292
|
type: "button",
|
@@ -2288,13 +2298,13 @@ var init_CardSelect = __esm({
|
|
2288
2298
|
width,
|
2289
2299
|
"data-attachable": true
|
2290
2300
|
},
|
2291
|
-
/* @__PURE__ */
|
2301
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { gap: 1.5, alignItems: "center" }, icon, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: "span", display: props["aria-label"] ? "none" : "inline" }, label), withChevron ? /* @__PURE__ */ React70__namespace.default.createElement(
|
2292
2302
|
ChevronIcon,
|
2293
2303
|
{
|
2294
2304
|
transform: state2.isOpen ? "rotate(180deg)" : "none"
|
2295
2305
|
}
|
2296
2306
|
) : null)
|
2297
|
-
), state2.isOpen && /* @__PURE__ */
|
2307
|
+
), state2.isOpen && /* @__PURE__ */ React70__namespace.default.createElement(
|
2298
2308
|
Popover3,
|
2299
2309
|
{
|
2300
2310
|
state: state2,
|
@@ -2303,7 +2313,7 @@ var init_CardSelect = __esm({
|
|
2303
2313
|
crossOffset,
|
2304
2314
|
placement
|
2305
2315
|
},
|
2306
|
-
/* @__PURE__ */
|
2316
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
2307
2317
|
exports.Card,
|
2308
2318
|
{
|
2309
2319
|
colorScheme: "white",
|
@@ -2311,7 +2321,7 @@ var init_CardSelect = __esm({
|
|
2311
2321
|
sx: styles3.card,
|
2312
2322
|
...overlayProps
|
2313
2323
|
},
|
2314
|
-
/* @__PURE__ */
|
2324
|
+
/* @__PURE__ */ React70__namespace.default.createElement(Dialog, { "aria-label": label }, children)
|
2315
2325
|
)
|
2316
2326
|
));
|
2317
2327
|
}
|
@@ -2322,7 +2332,7 @@ exports.Checkbox = void 0;
|
|
2322
2332
|
var init_Checkbox = __esm({
|
2323
2333
|
"src/input/Checkbox.tsx"() {
|
2324
2334
|
exports.Checkbox = react.forwardRef((props, ref) => {
|
2325
|
-
return /* @__PURE__ */
|
2335
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Checkbox, { ...props, ref });
|
2326
2336
|
});
|
2327
2337
|
}
|
2328
2338
|
});
|
@@ -2334,7 +2344,7 @@ var init_CheckboxGroup = __esm({
|
|
2334
2344
|
children,
|
2335
2345
|
...props
|
2336
2346
|
}) => {
|
2337
|
-
return /* @__PURE__ */
|
2347
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.CheckboxGroup, { ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Stack, { direction: direction2 }, children));
|
2338
2348
|
};
|
2339
2349
|
}
|
2340
2350
|
});
|
@@ -3115,16 +3125,16 @@ var init_ChoiceChip = __esm({
|
|
3115
3125
|
icon,
|
3116
3126
|
hasLabel: Boolean(children)
|
3117
3127
|
});
|
3118
|
-
const id = `choice-chip-${
|
3119
|
-
return /* @__PURE__ */
|
3128
|
+
const id = `choice-chip-${React70.useId()}`;
|
3129
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
3120
3130
|
react.chakra.label,
|
3121
3131
|
{
|
3122
3132
|
htmlFor: id,
|
3123
3133
|
...getRootProps(),
|
3124
3134
|
"aria-label": String(children)
|
3125
3135
|
},
|
3126
|
-
/* @__PURE__ */
|
3127
|
-
/* @__PURE__ */
|
3136
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.chakra.input, { ...getInputProps({}, ref), id, disabled: isDisabled }),
|
3137
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3128
3138
|
react.chakra.div,
|
3129
3139
|
{
|
3130
3140
|
...getLabelProps(),
|
@@ -3135,9 +3145,9 @@ var init_ChoiceChip = __esm({
|
|
3135
3145
|
"data-active": dataAttr(state2.isActive),
|
3136
3146
|
"data-disabled": dataAttr(state2.isDisabled)
|
3137
3147
|
},
|
3138
|
-
icon && /* @__PURE__ */
|
3139
|
-
/* @__PURE__ */
|
3140
|
-
chipType === "filter" && state2.isChecked && /* @__PURE__ */
|
3148
|
+
icon && /* @__PURE__ */ React70__namespace.default.createElement(react.chakra.span, { __css: styles3.icon }, state2.isChecked ? icon.checked : icon.default),
|
3149
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.chakra.span, { __css: styles3.label, ...getCheckboxProps() }, chipType !== "icon" && children),
|
3150
|
+
chipType === "filter" && state2.isChecked && /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseOutline24Icon, { marginLeft: 1.5 })
|
3141
3151
|
)
|
3142
3152
|
);
|
3143
3153
|
});
|
@@ -3170,10 +3180,10 @@ function Combobox({
|
|
3170
3180
|
...rest
|
3171
3181
|
}) {
|
3172
3182
|
const { contains: contains2 } = reactAria.useFilter({ sensitivity: "base" });
|
3173
|
-
const fallbackInputRef =
|
3183
|
+
const fallbackInputRef = React70.useRef(null);
|
3174
3184
|
const inputRef = externalInputRef ?? fallbackInputRef;
|
3175
|
-
const listBoxRef =
|
3176
|
-
const popoverRef =
|
3185
|
+
const listBoxRef = React70.useRef(null);
|
3186
|
+
const popoverRef = React70.useRef(null);
|
3177
3187
|
const inputWidth = useInputWidth(inputRef);
|
3178
3188
|
const state2 = reactStately.useComboBoxState({
|
3179
3189
|
allowsEmptyCollection: Boolean(emptyContent),
|
@@ -3182,6 +3192,23 @@ function Combobox({
|
|
3182
3192
|
label,
|
3183
3193
|
...rest
|
3184
3194
|
});
|
3195
|
+
const comboBoxProps = {
|
3196
|
+
borderTopLeftRadius,
|
3197
|
+
borderTopRightRadius,
|
3198
|
+
marginBottom,
|
3199
|
+
marginTop,
|
3200
|
+
marginRight,
|
3201
|
+
marginLeft,
|
3202
|
+
marginX,
|
3203
|
+
marginY,
|
3204
|
+
paddingBottom,
|
3205
|
+
paddingRight,
|
3206
|
+
paddingTop,
|
3207
|
+
paddingLeft,
|
3208
|
+
paddingX,
|
3209
|
+
paddingY,
|
3210
|
+
leftIcon
|
3211
|
+
};
|
3185
3212
|
const {
|
3186
3213
|
inputProps: { size: size2, ...inputProps },
|
3187
3214
|
listBoxProps
|
@@ -3194,31 +3221,17 @@ function Combobox({
|
|
3194
3221
|
},
|
3195
3222
|
state2
|
3196
3223
|
);
|
3197
|
-
return /* @__PURE__ */
|
3224
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(React70__namespace.default.Fragment, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
3198
3225
|
exports.Input,
|
3199
3226
|
{
|
3200
|
-
...
|
3227
|
+
...styleProps(comboBoxProps),
|
3201
3228
|
"aria-haspopup": "listbox",
|
3202
3229
|
ref: inputRef,
|
3203
3230
|
label,
|
3204
3231
|
borderBottomLeftRadius: state2.isOpen && !isLoading ? 0 : borderBottomLeftRadius,
|
3205
3232
|
borderBottomRightRadius: state2.isOpen && !isLoading ? 0 : borderBottomRightRadius,
|
3206
|
-
|
3207
|
-
|
3208
|
-
marginBottom,
|
3209
|
-
marginTop,
|
3210
|
-
marginRight,
|
3211
|
-
marginLeft,
|
3212
|
-
marginX,
|
3213
|
-
marginY,
|
3214
|
-
paddingBottom,
|
3215
|
-
paddingRight,
|
3216
|
-
paddingTop,
|
3217
|
-
paddingLeft,
|
3218
|
-
paddingX,
|
3219
|
-
paddingY,
|
3220
|
-
leftIcon,
|
3221
|
-
rightIcon: isLoading ? /* @__PURE__ */ React69__namespace.default.createElement(
|
3233
|
+
...inputProps,
|
3234
|
+
rightIcon: isLoading ? /* @__PURE__ */ React70__namespace.default.createElement(
|
3222
3235
|
exports.ColorSpinner,
|
3223
3236
|
{
|
3224
3237
|
width: "1.5rem",
|
@@ -3233,7 +3246,7 @@ function Combobox({
|
|
3233
3246
|
}
|
3234
3247
|
) : rightIcon
|
3235
3248
|
}
|
3236
|
-
), state2.isOpen && !isLoading && /* @__PURE__ */
|
3249
|
+
), state2.isOpen && !isLoading && /* @__PURE__ */ React70__namespace.default.createElement(
|
3237
3250
|
Popover3,
|
3238
3251
|
{
|
3239
3252
|
state: state2,
|
@@ -3245,7 +3258,7 @@ function Combobox({
|
|
3245
3258
|
hasBackdrop: false,
|
3246
3259
|
containerPadding: 0
|
3247
3260
|
},
|
3248
|
-
/* @__PURE__ */
|
3261
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3249
3262
|
ListBox,
|
3250
3263
|
{
|
3251
3264
|
...listBoxProps,
|
@@ -3258,14 +3271,19 @@ function Combobox({
|
|
3258
3271
|
)
|
3259
3272
|
));
|
3260
3273
|
}
|
3274
|
+
function styleProps(obj) {
|
3275
|
+
return Object.fromEntries(
|
3276
|
+
Object.entries(obj).filter(([, value]) => value !== void 0)
|
3277
|
+
);
|
3278
|
+
}
|
3261
3279
|
var useInputWidth, debounce;
|
3262
3280
|
var init_Combobox = __esm({
|
3263
3281
|
"src/input/Combobox.tsx"() {
|
3264
3282
|
init_src();
|
3265
3283
|
init_Popover();
|
3266
3284
|
useInputWidth = (inputRef) => {
|
3267
|
-
const [inputWidth, setInputWidth] =
|
3268
|
-
|
3285
|
+
const [inputWidth, setInputWidth] = React70.useState("auto");
|
3286
|
+
React70.useEffect(() => {
|
3269
3287
|
const onResize = debounce(() => {
|
3270
3288
|
if (inputRef.current) {
|
3271
3289
|
setInputWidth(`${inputRef.current.offsetWidth}px`);
|
@@ -3292,7 +3310,7 @@ exports.FormControl = void 0;
|
|
3292
3310
|
var init_FormControl = __esm({
|
3293
3311
|
"src/input/FormControl.tsx"() {
|
3294
3312
|
exports.FormControl = react.forwardRef((props, ref) => {
|
3295
|
-
return /* @__PURE__ */
|
3313
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.FormControl, { ...props, ref });
|
3296
3314
|
});
|
3297
3315
|
}
|
3298
3316
|
});
|
@@ -3313,7 +3331,7 @@ var init_FormErrorMessage = __esm({
|
|
3313
3331
|
return null;
|
3314
3332
|
}
|
3315
3333
|
const { ref, ...errorMessageProps } = formControlContext.getErrorMessageProps();
|
3316
|
-
return /* @__PURE__ */
|
3334
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { position: "relative", ref }, /* @__PURE__ */ React70__namespace.default.createElement(
|
3317
3335
|
react.Box,
|
3318
3336
|
{
|
3319
3337
|
borderRadius: "xs",
|
@@ -3331,12 +3349,12 @@ var init_FormErrorMessage = __esm({
|
|
3331
3349
|
...errorMessageProps,
|
3332
3350
|
...boxProps
|
3333
3351
|
},
|
3334
|
-
/* @__PURE__ */
|
3352
|
+
/* @__PURE__ */ React70__namespace.default.createElement(Arrow, { position: "absolute", top: "-0.25em", left: "1em" }),
|
3335
3353
|
children
|
3336
3354
|
));
|
3337
3355
|
};
|
3338
3356
|
Arrow = (props) => {
|
3339
|
-
return /* @__PURE__ */
|
3357
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
3340
3358
|
react.Box,
|
3341
3359
|
{
|
3342
3360
|
...props,
|
@@ -3347,7 +3365,7 @@ var init_FormErrorMessage = __esm({
|
|
3347
3365
|
fill: "none",
|
3348
3366
|
transform: "rotate(45deg)"
|
3349
3367
|
},
|
3350
|
-
/* @__PURE__ */
|
3368
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3351
3369
|
react.Box,
|
3352
3370
|
{
|
3353
3371
|
as: "path",
|
@@ -3363,7 +3381,7 @@ exports.FormLabel = void 0;
|
|
3363
3381
|
var init_FormLabel = __esm({
|
3364
3382
|
"src/input/FormLabel.tsx"() {
|
3365
3383
|
exports.FormLabel = react.forwardRef((props, ref) => {
|
3366
|
-
return /* @__PURE__ */
|
3384
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.FormLabel, { ...props, ref });
|
3367
3385
|
});
|
3368
3386
|
}
|
3369
3387
|
});
|
@@ -3376,7 +3394,7 @@ function ListBox({
|
|
3376
3394
|
}) {
|
3377
3395
|
const { listBoxProps } = reactAria.useListBox(props, state2, listBoxRef);
|
3378
3396
|
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
3379
|
-
return /* @__PURE__ */
|
3397
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
3380
3398
|
react.List,
|
3381
3399
|
{
|
3382
3400
|
...listBoxProps,
|
@@ -3387,22 +3405,22 @@ function ListBox({
|
|
3387
3405
|
},
|
3388
3406
|
state2.collection.size === 0 && props.emptyContent,
|
3389
3407
|
Array.from(state2.collection).map(
|
3390
|
-
(item) => item.type === "section" ? /* @__PURE__ */
|
3408
|
+
(item) => item.type === "section" ? /* @__PURE__ */ React70__namespace.default.createElement(ListBoxSection, { key: item.key, section: item, state: state2 }) : /* @__PURE__ */ React70__namespace.default.createElement(Option, { key: item.key, item, state: state2 })
|
3391
3409
|
)
|
3392
3410
|
);
|
3393
3411
|
}
|
3394
3412
|
function ItemLabel({ children }) {
|
3395
3413
|
let { labelProps } = useOptionContext();
|
3396
3414
|
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
3397
|
-
return /* @__PURE__ */
|
3415
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...labelProps, sx: styles3.label }, children);
|
3398
3416
|
}
|
3399
3417
|
function ItemDescription({ children }) {
|
3400
3418
|
let { descriptionProps } = useOptionContext();
|
3401
3419
|
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
3402
|
-
return /* @__PURE__ */
|
3420
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...descriptionProps, sx: styles3.description }, children);
|
3403
3421
|
}
|
3404
3422
|
function Option({ item, state: state2 }) {
|
3405
|
-
const ref =
|
3423
|
+
const ref = React70.useRef(null);
|
3406
3424
|
const {
|
3407
3425
|
optionProps,
|
3408
3426
|
isSelected,
|
@@ -3422,7 +3440,7 @@ function Option({ item, state: state2 }) {
|
|
3422
3440
|
if (isFocused) {
|
3423
3441
|
dataFields["data-focus"] = true;
|
3424
3442
|
}
|
3425
|
-
|
3443
|
+
React70.useEffect(() => {
|
3426
3444
|
var _a6;
|
3427
3445
|
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
3428
3446
|
"touchend",
|
@@ -3432,7 +3450,7 @@ function Option({ item, state: state2 }) {
|
|
3432
3450
|
{ passive: false, once: true }
|
3433
3451
|
);
|
3434
3452
|
}, []);
|
3435
|
-
return /* @__PURE__ */
|
3453
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React70__namespace.default.createElement(react.ListItem, { ...optionProps, ...dataFields, ref, sx: styles3.item }, item.rendered));
|
3436
3454
|
}
|
3437
3455
|
function ListBoxSection({ section, state: state2 }) {
|
3438
3456
|
const { itemProps, headingProps, groupProps } = reactAria.useListBoxSection({
|
@@ -3441,7 +3459,7 @@ function ListBoxSection({ section, state: state2 }) {
|
|
3441
3459
|
});
|
3442
3460
|
const isFirstSection = section.key === state2.collection.getFirstKey();
|
3443
3461
|
const titleColor = react.useColorModeValue("darkGrey", "white");
|
3444
|
-
return /* @__PURE__ */
|
3462
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.ListItem, { ...itemProps }, section.rendered && /* @__PURE__ */ React70__namespace.default.createElement(
|
3445
3463
|
react.Box,
|
3446
3464
|
{
|
3447
3465
|
fontSize: "mobile.xs",
|
@@ -3454,19 +3472,19 @@ function ListBoxSection({ section, state: state2 }) {
|
|
3454
3472
|
...headingProps
|
3455
3473
|
},
|
3456
3474
|
section.rendered
|
3457
|
-
), /* @__PURE__ */
|
3458
|
-
(item) => /* @__PURE__ */
|
3475
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(react.List, { ...groupProps, padding: 0, listStyleType: "none" }, Array.from(state2.collection.getChildren(section.key)).map(
|
3476
|
+
(item) => /* @__PURE__ */ React70__namespace.default.createElement(Option, { key: item.key, item, state: state2 })
|
3459
3477
|
)));
|
3460
3478
|
}
|
3461
3479
|
var OptionContext, useOptionContext;
|
3462
3480
|
var init_ListBox = __esm({
|
3463
3481
|
"src/input/ListBox.tsx"() {
|
3464
|
-
OptionContext =
|
3482
|
+
OptionContext = React70__namespace.default.createContext({
|
3465
3483
|
labelProps: {},
|
3466
3484
|
descriptionProps: {}
|
3467
3485
|
});
|
3468
3486
|
useOptionContext = () => {
|
3469
|
-
return
|
3487
|
+
return React70.useContext(OptionContext);
|
3470
3488
|
};
|
3471
3489
|
}
|
3472
3490
|
});
|
@@ -3488,8 +3506,8 @@ function InfoSelect({
|
|
3488
3506
|
...props
|
3489
3507
|
};
|
3490
3508
|
const state2 = reactStately.useSelectState(renamedProps);
|
3491
|
-
const triggerRef =
|
3492
|
-
const listboxRef =
|
3509
|
+
const triggerRef = React70.useRef(null);
|
3510
|
+
const listboxRef = React70.useRef(null);
|
3493
3511
|
const { labelProps, triggerProps, valueProps, menuProps } = reactAria.useSelect(
|
3494
3512
|
renamedProps,
|
3495
3513
|
state2,
|
@@ -3505,7 +3523,7 @@ function InfoSelect({
|
|
3505
3523
|
const { buttonProps } = reactAria.useButton(triggerProps, triggerRef);
|
3506
3524
|
const { t: t2 } = useTranslation();
|
3507
3525
|
const formControl = react.useFormControlProps(props);
|
3508
|
-
return /* @__PURE__ */
|
3526
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: styles3.container }, /* @__PURE__ */ React70__namespace.default.createElement(react.chakra.div, { ...labelProps, sx: styles3.label }, props.label), /* @__PURE__ */ React70__namespace.default.createElement(
|
3509
3527
|
reactAria.HiddenSelect,
|
3510
3528
|
{
|
3511
3529
|
state: state2,
|
@@ -3513,7 +3531,7 @@ function InfoSelect({
|
|
3513
3531
|
label: props.label,
|
3514
3532
|
name: props.name
|
3515
3533
|
}
|
3516
|
-
), /* @__PURE__ */
|
3534
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
3517
3535
|
react.chakra.button,
|
3518
3536
|
{
|
3519
3537
|
type: "button",
|
@@ -3526,16 +3544,16 @@ function InfoSelect({
|
|
3526
3544
|
"aria-invalid": formControl.isInvalid,
|
3527
3545
|
"aria-describedby": formControl["aria-describedby"]
|
3528
3546
|
},
|
3529
|
-
/* @__PURE__ */
|
3530
|
-
/* @__PURE__ */
|
3531
|
-
), state2.isOpen && /* @__PURE__ */
|
3547
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...valueProps }, state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)),
|
3548
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: styles3.arrowIcon }, state2.isOpen ? /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.DropdownUpFill24Icon, null) : /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.DropdownDownFill24Icon, null))
|
3549
|
+
), state2.isOpen && /* @__PURE__ */ React70__namespace.default.createElement(
|
3532
3550
|
Popover3,
|
3533
3551
|
{
|
3534
3552
|
state: state2,
|
3535
3553
|
triggerRef,
|
3536
3554
|
containerPadding: 0
|
3537
3555
|
},
|
3538
|
-
/* @__PURE__ */
|
3556
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3539
3557
|
ListBox,
|
3540
3558
|
{
|
3541
3559
|
...menuProps,
|
@@ -3569,9 +3587,9 @@ var init_Input = __esm({
|
|
3569
3587
|
exports.Input = react.forwardRef(
|
3570
3588
|
({ label, leftIcon, rightIcon, id, size: size2, ...props }, ref) => {
|
3571
3589
|
const formControlProps = react.useFormControlContext();
|
3572
|
-
const fallbackId = `input-${
|
3590
|
+
const fallbackId = `input-${React70.useId()}`;
|
3573
3591
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
3574
|
-
return /* @__PURE__ */
|
3592
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React70__namespace.default.createElement(react.InputLeftElement, { pointerEvents: "none" }, leftIcon), /* @__PURE__ */ React70__namespace.default.createElement(
|
3575
3593
|
react.Input,
|
3576
3594
|
{
|
3577
3595
|
"data-attachable": true,
|
@@ -3582,7 +3600,7 @@ var init_Input = __esm({
|
|
3582
3600
|
ref,
|
3583
3601
|
placeholder: " "
|
3584
3602
|
}
|
3585
|
-
), /* @__PURE__ */
|
3603
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(react.FormLabel, { htmlFor: inputId }, label), rightIcon && /* @__PURE__ */ React70__namespace.default.createElement(react.InputRightElement, { pointerEvents: "none" }, rightIcon));
|
3586
3604
|
}
|
3587
3605
|
);
|
3588
3606
|
}
|
@@ -3591,10 +3609,10 @@ exports.InputLeftElement = void 0; exports.InputRightElement = void 0;
|
|
3591
3609
|
var init_InputElement = __esm({
|
3592
3610
|
"src/input/InputElement.tsx"() {
|
3593
3611
|
exports.InputLeftElement = react.forwardRef(
|
3594
|
-
(props, ref) => /* @__PURE__ */
|
3612
|
+
(props, ref) => /* @__PURE__ */ React70__namespace.default.createElement(react.InputLeftElement, { ...props, ref })
|
3595
3613
|
);
|
3596
3614
|
exports.InputRightElement = react.forwardRef(
|
3597
|
-
(props, ref) => /* @__PURE__ */
|
3615
|
+
(props, ref) => /* @__PURE__ */ React70__namespace.default.createElement(react.InputRightElement, { ...props, ref })
|
3598
3616
|
);
|
3599
3617
|
}
|
3600
3618
|
});
|
@@ -3605,7 +3623,7 @@ var init_NativeSelect = __esm({
|
|
3605
3623
|
exports.NativeSelect = react.forwardRef(
|
3606
3624
|
({ label, ...props }, ref) => {
|
3607
3625
|
const styles3 = react.useMultiStyleConfig("Select", props);
|
3608
|
-
return /* @__PURE__ */
|
3626
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(exports.FormControl, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
3609
3627
|
react.Select,
|
3610
3628
|
{
|
3611
3629
|
"data-attachable": true,
|
@@ -3613,7 +3631,7 @@ var init_NativeSelect = __esm({
|
|
3613
3631
|
rootProps: { __css: styles3.root },
|
3614
3632
|
ref
|
3615
3633
|
}
|
3616
|
-
), label && /* @__PURE__ */
|
3634
|
+
), label && /* @__PURE__ */ React70__namespace.default.createElement(exports.FormLabel, null, label));
|
3617
3635
|
}
|
3618
3636
|
);
|
3619
3637
|
}
|
@@ -3641,17 +3659,17 @@ function NumericStepper({
|
|
3641
3659
|
});
|
3642
3660
|
const formControlProps = react.useFormControl({ id: idProp, isDisabled });
|
3643
3661
|
const clampedStepSize = Math.max(Math.min(stepSize, 10), 1);
|
3644
|
-
return /* @__PURE__ */
|
3662
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { __css: styles3.container, ...boxProps }, /* @__PURE__ */ React70__namespace.default.createElement(
|
3645
3663
|
VerySmallButton,
|
3646
3664
|
{
|
3647
|
-
icon: /* @__PURE__ */
|
3665
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(SubtractIcon, { stepLabel: clampedStepSize }),
|
3648
3666
|
"aria-label": t2(texts12.decrementButtonAriaLabel(clampedStepSize)),
|
3649
3667
|
onClick: () => onChange(Math.max(value - clampedStepSize, minValue)),
|
3650
3668
|
visibility: value <= minValue ? "hidden" : "visible",
|
3651
3669
|
isDisabled: formControlProps.disabled,
|
3652
3670
|
id: value <= minValue ? void 0 : formControlProps.id
|
3653
3671
|
}
|
3654
|
-
), withInput ? /* @__PURE__ */
|
3672
|
+
), withInput ? /* @__PURE__ */ React70__namespace.default.createElement(
|
3655
3673
|
react.chakra.input,
|
3656
3674
|
{
|
3657
3675
|
type: "number",
|
@@ -3674,7 +3692,7 @@ function NumericStepper({
|
|
3674
3692
|
onChange(Math.max(Math.min(numericInput, maxValue), minValue));
|
3675
3693
|
}
|
3676
3694
|
}
|
3677
|
-
) : /* @__PURE__ */
|
3695
|
+
) : /* @__PURE__ */ React70__namespace.default.createElement(
|
3678
3696
|
react.chakra.text,
|
3679
3697
|
{
|
3680
3698
|
sx: styles3.text,
|
@@ -3682,10 +3700,10 @@ function NumericStepper({
|
|
3682
3700
|
"aria-label": value.toString()
|
3683
3701
|
},
|
3684
3702
|
value
|
3685
|
-
), /* @__PURE__ */
|
3703
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
3686
3704
|
VerySmallButton,
|
3687
3705
|
{
|
3688
|
-
icon: /* @__PURE__ */
|
3706
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(AddIcon, { stepLabel: clampedStepSize }),
|
3689
3707
|
"aria-label": t2(texts12.incrementButtonAriaLabel(clampedStepSize)),
|
3690
3708
|
onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
|
3691
3709
|
visibility: value >= maxValue ? "hidden" : "visible",
|
@@ -3700,9 +3718,9 @@ var init_NumericStepper = __esm({
|
|
3700
3718
|
init_src();
|
3701
3719
|
VerySmallButton = (props) => {
|
3702
3720
|
const styles3 = react.useMultiStyleConfig("NumericStepper", {});
|
3703
|
-
return /* @__PURE__ */
|
3721
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(exports.IconButton, { variant: "primary", size: "xs", sx: styles3.button, ...props });
|
3704
3722
|
};
|
3705
|
-
SubtractIcon = (props) => /* @__PURE__ */
|
3723
|
+
SubtractIcon = (props) => /* @__PURE__ */ React70__namespace.default.createElement(React70__namespace.default.Fragment, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
3706
3724
|
react.Box,
|
3707
3725
|
{
|
3708
3726
|
as: "svg",
|
@@ -3712,7 +3730,7 @@ var init_NumericStepper = __esm({
|
|
3712
3730
|
stroke: "currentColor",
|
3713
3731
|
...props
|
3714
3732
|
},
|
3715
|
-
/* @__PURE__ */
|
3733
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3716
3734
|
"line",
|
3717
3735
|
{
|
3718
3736
|
x1: "9",
|
@@ -3723,8 +3741,8 @@ var init_NumericStepper = __esm({
|
|
3723
3741
|
strokeLinecap: "round"
|
3724
3742
|
}
|
3725
3743
|
)
|
3726
|
-
), props.stepLabel > 1 && /* @__PURE__ */
|
3727
|
-
AddIcon = (props) => /* @__PURE__ */
|
3744
|
+
), props.stepLabel > 1 && /* @__PURE__ */ React70__namespace.default.createElement(react.chakra.span, { paddingRight: "1" }, props.stepLabel.toString()));
|
3745
|
+
AddIcon = (props) => /* @__PURE__ */ React70__namespace.default.createElement(React70__namespace.default.Fragment, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
3728
3746
|
react.Box,
|
3729
3747
|
{
|
3730
3748
|
as: "svg",
|
@@ -3734,7 +3752,7 @@ var init_NumericStepper = __esm({
|
|
3734
3752
|
stroke: "currentColor",
|
3735
3753
|
...props
|
3736
3754
|
},
|
3737
|
-
/* @__PURE__ */
|
3755
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3738
3756
|
"line",
|
3739
3757
|
{
|
3740
3758
|
x1: "9",
|
@@ -3745,7 +3763,7 @@ var init_NumericStepper = __esm({
|
|
3745
3763
|
strokeLinecap: "round"
|
3746
3764
|
}
|
3747
3765
|
),
|
3748
|
-
/* @__PURE__ */
|
3766
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3749
3767
|
"line",
|
3750
3768
|
{
|
3751
3769
|
x1: "15",
|
@@ -3756,7 +3774,7 @@ var init_NumericStepper = __esm({
|
|
3756
3774
|
strokeLinecap: "round"
|
3757
3775
|
}
|
3758
3776
|
)
|
3759
|
-
), props.stepLabel > 1 && /* @__PURE__ */
|
3777
|
+
), props.stepLabel > 1 && /* @__PURE__ */ React70__namespace.default.createElement(react.chakra.span, { paddingRight: "1" }, props.stepLabel.toString()));
|
3760
3778
|
texts12 = createTexts({
|
3761
3779
|
decrementButtonAriaLabel(stepSize) {
|
3762
3780
|
return {
|
@@ -3787,9 +3805,9 @@ var init_PasswordInput = __esm({
|
|
3787
3805
|
const { isOpen: isShowingPassword, onToggle } = react.useDisclosure();
|
3788
3806
|
const { t: t2 } = useTranslation();
|
3789
3807
|
const formControlProps = react.useFormControlContext();
|
3790
|
-
const autoGeneratedId = `password-input-${
|
3808
|
+
const autoGeneratedId = `password-input-${React70.useId()}`;
|
3791
3809
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
3792
|
-
return /* @__PURE__ */
|
3810
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React70__namespace.default.createElement(exports.InputLeftElement, null, leftIcon), /* @__PURE__ */ React70__namespace.default.createElement(
|
3793
3811
|
react.Input,
|
3794
3812
|
{
|
3795
3813
|
...props,
|
@@ -3801,7 +3819,7 @@ var init_PasswordInput = __esm({
|
|
3801
3819
|
ref,
|
3802
3820
|
"data-attachable": true
|
3803
3821
|
}
|
3804
|
-
), /* @__PURE__ */
|
3822
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(exports.FormLabel, { htmlFor: inputId, pointerEvents: "none" }, label), /* @__PURE__ */ React70__namespace.default.createElement(exports.InputRightElement, { width: "fit-content" }, /* @__PURE__ */ React70__namespace.default.createElement(
|
3805
3823
|
react.Button,
|
3806
3824
|
{
|
3807
3825
|
variant: "ghost",
|
@@ -3858,7 +3876,7 @@ var init_CountryCodeSelect = __esm({
|
|
3858
3876
|
callingCodes = [...prioritizedCountryCodes, ...sortedCallingCodes];
|
3859
3877
|
CountryCodeSelect = (props) => {
|
3860
3878
|
const { t: t2 } = useTranslation();
|
3861
|
-
return /* @__PURE__ */
|
3879
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
3862
3880
|
InfoSelect,
|
3863
3881
|
{
|
3864
3882
|
label: t2(texts14.countryCode),
|
@@ -3866,7 +3884,7 @@ var init_CountryCodeSelect = __esm({
|
|
3866
3884
|
items: callingCodes,
|
3867
3885
|
...props
|
3868
3886
|
},
|
3869
|
-
(item) => /* @__PURE__ */
|
3887
|
+
(item) => /* @__PURE__ */ React70__namespace.default.createElement(reactStately.Item, { key: item.key }, item.key)
|
3870
3888
|
);
|
3871
3889
|
};
|
3872
3890
|
CountryCodeSelect_default = CountryCodeSelect;
|
@@ -3903,10 +3921,10 @@ var init_PhoneNumberInput = __esm({
|
|
3903
3921
|
nationalNumber: ""
|
3904
3922
|
}
|
3905
3923
|
});
|
3906
|
-
return /* @__PURE__ */
|
3907
|
-
|
3924
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(exports.AttachedInputs, { ...boxProps }, /* @__PURE__ */ React70__namespace.default.createElement(
|
3925
|
+
React70.Suspense,
|
3908
3926
|
{
|
3909
|
-
fallback: /* @__PURE__ */
|
3927
|
+
fallback: /* @__PURE__ */ React70__namespace.default.createElement(
|
3910
3928
|
InfoSelect,
|
3911
3929
|
{
|
3912
3930
|
isLabelSrOnly: true,
|
@@ -3915,10 +3933,10 @@ var init_PhoneNumberInput = __esm({
|
|
3915
3933
|
height: "100%",
|
3916
3934
|
value: "+47"
|
3917
3935
|
},
|
3918
|
-
/* @__PURE__ */
|
3936
|
+
/* @__PURE__ */ React70__namespace.default.createElement(reactStately.Item, { key: "+47" }, "+47")
|
3919
3937
|
)
|
3920
3938
|
},
|
3921
|
-
/* @__PURE__ */
|
3939
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3922
3940
|
LazyCountryCodeSelect,
|
3923
3941
|
{
|
3924
3942
|
value: value.countryCode,
|
@@ -3931,7 +3949,7 @@ var init_PhoneNumberInput = __esm({
|
|
3931
3949
|
width: "6.25rem"
|
3932
3950
|
}
|
3933
3951
|
)
|
3934
|
-
), /* @__PURE__ */
|
3952
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
3935
3953
|
exports.Input,
|
3936
3954
|
{
|
3937
3955
|
ref,
|
@@ -3960,14 +3978,14 @@ var init_PhoneNumberInput = __esm({
|
|
3960
3978
|
sv: "Telefonnummer"
|
3961
3979
|
}
|
3962
3980
|
});
|
3963
|
-
LazyCountryCodeSelect =
|
3981
|
+
LazyCountryCodeSelect = React70__namespace.default.lazy(() => Promise.resolve().then(() => (init_CountryCodeSelect(), CountryCodeSelect_exports)));
|
3964
3982
|
}
|
3965
3983
|
});
|
3966
3984
|
exports.Radio = void 0;
|
3967
3985
|
var init_Radio = __esm({
|
3968
3986
|
"src/input/Radio.tsx"() {
|
3969
3987
|
exports.Radio = react.forwardRef((props, ref) => {
|
3970
|
-
return /* @__PURE__ */
|
3988
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Radio, { ...props, ref });
|
3971
3989
|
});
|
3972
3990
|
}
|
3973
3991
|
});
|
@@ -3976,7 +3994,7 @@ var init_RadioGroup = __esm({
|
|
3976
3994
|
"src/input/RadioGroup.tsx"() {
|
3977
3995
|
exports.RadioGroup = react.forwardRef(
|
3978
3996
|
({ children, direction: direction2 = "row", ...rest }, ref) => {
|
3979
|
-
return /* @__PURE__ */
|
3997
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.RadioGroup, { ...rest, ref }, /* @__PURE__ */ React70__namespace.default.createElement(react.Stack, { direction: direction2 }, children));
|
3980
3998
|
}
|
3981
3999
|
);
|
3982
4000
|
}
|
@@ -3991,9 +4009,9 @@ var init_SearchInput = __esm({
|
|
3991
4009
|
const { t: t2 } = useTranslation();
|
3992
4010
|
const showClearButton = onReset && Boolean(props.value);
|
3993
4011
|
const formControlProps = react.useFormControlContext();
|
3994
|
-
const autoGeneratedId =
|
4012
|
+
const autoGeneratedId = React70.useId();
|
3995
4013
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
3996
|
-
return /* @__PURE__ */
|
4014
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.InputGroup, { position: "relative" }, /* @__PURE__ */ React70__namespace.default.createElement(exports.InputLeftElement, null, /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.SearchOutline24Icon, null)), /* @__PURE__ */ React70__namespace.default.createElement(
|
3997
4015
|
react.Input,
|
3998
4016
|
{
|
3999
4017
|
paddingLeft: 7,
|
@@ -4010,7 +4028,7 @@ var init_SearchInput = __esm({
|
|
4010
4028
|
placeholder: " ",
|
4011
4029
|
"data-attachable": true
|
4012
4030
|
}
|
4013
|
-
), /* @__PURE__ */
|
4031
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(exports.FormLabel, { htmlFor: inputId, pointerEvents: "none" }, label ?? t2(texts16.label)), showClearButton && /* @__PURE__ */ React70__namespace.default.createElement(exports.InputRightElement, { width: "fit-content" }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4014
4032
|
react.IconButton,
|
4015
4033
|
{
|
4016
4034
|
variant: "ghost",
|
@@ -4018,7 +4036,7 @@ var init_SearchInput = __esm({
|
|
4018
4036
|
size: "sm",
|
4019
4037
|
marginRight: 1,
|
4020
4038
|
"aria-label": t2(texts16.reset),
|
4021
|
-
icon: /* @__PURE__ */
|
4039
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseOutline24Icon, null),
|
4022
4040
|
onClick: onReset
|
4023
4041
|
}
|
4024
4042
|
)));
|
@@ -4045,7 +4063,7 @@ var init_Switch = __esm({
|
|
4045
4063
|
"src/input/Switch.tsx"() {
|
4046
4064
|
exports.Switch = react.forwardRef(
|
4047
4065
|
({ size: size2 = "md", ...props }, ref) => {
|
4048
|
-
return /* @__PURE__ */
|
4066
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Switch, { size: size2, ...props, ref });
|
4049
4067
|
}
|
4050
4068
|
);
|
4051
4069
|
}
|
@@ -4117,9 +4135,9 @@ var init_Textarea = __esm({
|
|
4117
4135
|
remainingProps: { label, ...rest }
|
4118
4136
|
} = getSpacingProps(props);
|
4119
4137
|
const formControlProps = react.useFormControlContext();
|
4120
|
-
const fallbackId = `textarea-${
|
4138
|
+
const fallbackId = `textarea-${React70.useId()}`;
|
4121
4139
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
4122
|
-
return /* @__PURE__ */
|
4140
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.InputGroup, { position: "relative", ...spacingProps }, /* @__PURE__ */ React70__namespace.default.createElement(react.Textarea, { ...rest, id: inputId, ref, placeholder: " " }), label && /* @__PURE__ */ React70__namespace.default.createElement(react.FormLabel, { htmlFor: inputId, id: `${inputId}-label` }, label));
|
4123
4141
|
});
|
4124
4142
|
}
|
4125
4143
|
});
|
@@ -4218,7 +4236,7 @@ var init_LineIcon = __esm({
|
|
4218
4236
|
if (!Icon) {
|
4219
4237
|
return null;
|
4220
4238
|
}
|
4221
|
-
return /* @__PURE__ */
|
4239
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: { ...styles3.iconContainer, ...sx }, ...rest }, /* @__PURE__ */ React70__namespace.default.createElement(Icon, { sx: styles3.icon }));
|
4222
4240
|
};
|
4223
4241
|
}
|
4224
4242
|
});
|
@@ -4238,7 +4256,7 @@ var init_InfoTag = __esm({
|
|
4238
4256
|
size: size2,
|
4239
4257
|
...customProps
|
4240
4258
|
});
|
4241
|
-
return /* @__PURE__ */
|
4259
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: styles3.container }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4242
4260
|
exports.LineIcon,
|
4243
4261
|
{
|
4244
4262
|
variant,
|
@@ -4246,7 +4264,7 @@ var init_InfoTag = __esm({
|
|
4246
4264
|
sx: styles3.iconContainer,
|
4247
4265
|
...customProps
|
4248
4266
|
}
|
4249
|
-
), /* @__PURE__ */
|
4267
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: styles3.textContainer }, title && /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: "span", sx: styles3.title }, title), title && description && " ", description && /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: "span", sx: styles3.description }, description)));
|
4250
4268
|
};
|
4251
4269
|
}
|
4252
4270
|
});
|
@@ -4272,7 +4290,7 @@ var init_TravelTag = __esm({
|
|
4272
4290
|
backgroundColor: variant === "custom" ? rest.backgroundColor : void 0
|
4273
4291
|
});
|
4274
4292
|
const DeviationLevelIcon = getDeviationLevelIcon({ deviationLevel, size: size2 });
|
4275
|
-
return /* @__PURE__ */
|
4293
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: styles3.container, "aria-disabled": isDisabled, ref, ...rest }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4276
4294
|
exports.LineIcon,
|
4277
4295
|
{
|
4278
4296
|
variant,
|
@@ -4280,7 +4298,7 @@ var init_TravelTag = __esm({
|
|
4280
4298
|
sx: styles3.iconContainer,
|
4281
4299
|
...rest
|
4282
4300
|
}
|
4283
|
-
), /* @__PURE__ */
|
4301
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: styles3.textContainer }, title && /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: "span", sx: styles3.title }, title), title && description && " ", description && /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: "span", sx: styles3.description }, description)), DeviationLevelIcon && /* @__PURE__ */ React70__namespace.default.createElement(DeviationLevelIcon, { sx: styles3.deviationIcon }));
|
4284
4302
|
}
|
4285
4303
|
);
|
4286
4304
|
getDeviationLevelIcon = ({
|
@@ -4319,7 +4337,7 @@ var init_TextLink = __esm({
|
|
4319
4337
|
var _a6;
|
4320
4338
|
const { t: t2 } = useTranslation();
|
4321
4339
|
const isExternal = props.isExternal !== void 0 ? props.isExternal : Boolean((_a6 = props.href) == null ? void 0 : _a6.match(/^https?:\/\//));
|
4322
|
-
return /* @__PURE__ */
|
4340
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Link, { ...props, ref, isExternal }, children, isExternal && /* @__PURE__ */ React70__namespace.default.createElement(
|
4323
4341
|
sporIconReact.LinkOutOutline24Icon,
|
4324
4342
|
{
|
4325
4343
|
marginLeft: 0.5,
|
@@ -4355,8 +4373,8 @@ var init_VyLogo = __esm({
|
|
4355
4373
|
exports.VyLogo = ({ colorScheme, ...boxProps }) => {
|
4356
4374
|
const mainColor = colorScheme === "light" ? "#1d211c" : "#ffffff";
|
4357
4375
|
const accentColor = colorScheme === "light" ? "#138c6e" : "#ffffff";
|
4358
|
-
const id =
|
4359
|
-
return /* @__PURE__ */
|
4376
|
+
const id = React70.useId();
|
4377
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: "svg", viewBox: "0 0 107 54", ...boxProps }, /* @__PURE__ */ React70__namespace.default.createElement("title", null, "Vy logo"), /* @__PURE__ */ React70__namespace.default.createElement(
|
4360
4378
|
"path",
|
4361
4379
|
{
|
4362
4380
|
fillRule: "evenodd",
|
@@ -4364,7 +4382,7 @@ var init_VyLogo = __esm({
|
|
4364
4382
|
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",
|
4365
4383
|
fill: mainColor
|
4366
4384
|
}
|
4367
|
-
), /* @__PURE__ */
|
4385
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4368
4386
|
"mask",
|
4369
4387
|
{
|
4370
4388
|
id: `${id}-a`,
|
@@ -4375,7 +4393,7 @@ var init_VyLogo = __esm({
|
|
4375
4393
|
width: "94",
|
4376
4394
|
height: "54"
|
4377
4395
|
},
|
4378
|
-
/* @__PURE__ */
|
4396
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
4379
4397
|
"path",
|
4380
4398
|
{
|
4381
4399
|
fillRule: "evenodd",
|
@@ -4384,7 +4402,7 @@ var init_VyLogo = __esm({
|
|
4384
4402
|
fill: mainColor
|
4385
4403
|
}
|
4386
4404
|
)
|
4387
|
-
), /* @__PURE__ */
|
4405
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4388
4406
|
"g",
|
4389
4407
|
{
|
4390
4408
|
mask: `url(#${id}-a)`,
|
@@ -4392,9 +4410,9 @@ var init_VyLogo = __esm({
|
|
4392
4410
|
clipRule: "evenodd",
|
4393
4411
|
fill: mainColor
|
4394
4412
|
},
|
4395
|
-
/* @__PURE__ */
|
4396
|
-
/* @__PURE__ */
|
4397
|
-
), /* @__PURE__ */
|
4413
|
+
/* @__PURE__ */ React70__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" }),
|
4414
|
+
/* @__PURE__ */ React70__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" })
|
4415
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4398
4416
|
"path",
|
4399
4417
|
{
|
4400
4418
|
fillRule: "evenodd",
|
@@ -4402,7 +4420,7 @@ var init_VyLogo = __esm({
|
|
4402
4420
|
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",
|
4403
4421
|
fill: accentColor
|
4404
4422
|
}
|
4405
|
-
), /* @__PURE__ */
|
4423
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4406
4424
|
"path",
|
4407
4425
|
{
|
4408
4426
|
fillRule: "evenodd",
|
@@ -4410,7 +4428,7 @@ var init_VyLogo = __esm({
|
|
4410
4428
|
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",
|
4411
4429
|
fill: mainColor
|
4412
4430
|
}
|
4413
|
-
), /* @__PURE__ */
|
4431
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4414
4432
|
"mask",
|
4415
4433
|
{
|
4416
4434
|
id: `${id}-b`,
|
@@ -4421,7 +4439,7 @@ var init_VyLogo = __esm({
|
|
4421
4439
|
width: "78",
|
4422
4440
|
height: "54"
|
4423
4441
|
},
|
4424
|
-
/* @__PURE__ */
|
4442
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
4425
4443
|
"path",
|
4426
4444
|
{
|
4427
4445
|
fillRule: "evenodd",
|
@@ -4430,25 +4448,25 @@ var init_VyLogo = __esm({
|
|
4430
4448
|
fill: mainColor
|
4431
4449
|
}
|
4432
4450
|
)
|
4433
|
-
), /* @__PURE__ */
|
4451
|
+
), /* @__PURE__ */ React70__namespace.default.createElement("g", { mask: `url(#${id}-b)`, fillRule: "evenodd", clipRule: "evenodd" }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4434
4452
|
"path",
|
4435
4453
|
{
|
4436
4454
|
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",
|
4437
4455
|
fill: mainColor
|
4438
4456
|
}
|
4439
|
-
), /* @__PURE__ */
|
4457
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4440
4458
|
"path",
|
4441
4459
|
{
|
4442
4460
|
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",
|
4443
4461
|
fill: mainColor
|
4444
4462
|
}
|
4445
|
-
), /* @__PURE__ */
|
4463
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4446
4464
|
"path",
|
4447
4465
|
{
|
4448
4466
|
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",
|
4449
4467
|
fill: accentColor
|
4450
4468
|
}
|
4451
|
-
)), /* @__PURE__ */
|
4469
|
+
)), /* @__PURE__ */ React70__namespace.default.createElement(
|
4452
4470
|
"path",
|
4453
4471
|
{
|
4454
4472
|
fillRule: "evenodd",
|
@@ -4470,7 +4488,7 @@ var init_logo = __esm({
|
|
4470
4488
|
var JumpForwardIcon, JumpBackwardIcon, PlayIcon, PauseIcon, SkipNextIcon, SkipPreviousIcon;
|
4471
4489
|
var init_icons2 = __esm({
|
4472
4490
|
"src/media-controller/icons.tsx"() {
|
4473
|
-
JumpForwardIcon = (props) => /* @__PURE__ */
|
4491
|
+
JumpForwardIcon = (props) => /* @__PURE__ */ React70__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 32 30", fill: "none" }, /* @__PURE__ */ React70__namespace.createElement(
|
4474
4492
|
"path",
|
4475
4493
|
{
|
4476
4494
|
fillRule: "evenodd",
|
@@ -4478,7 +4496,7 @@ var init_icons2 = __esm({
|
|
4478
4496
|
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",
|
4479
4497
|
fill: "currentColor"
|
4480
4498
|
}
|
4481
|
-
), /* @__PURE__ */
|
4499
|
+
), /* @__PURE__ */ React70__namespace.createElement(
|
4482
4500
|
"path",
|
4483
4501
|
{
|
4484
4502
|
fillRule: "evenodd",
|
@@ -4487,7 +4505,7 @@ var init_icons2 = __esm({
|
|
4487
4505
|
fill: "currentColor"
|
4488
4506
|
}
|
4489
4507
|
));
|
4490
|
-
JumpBackwardIcon = (props) => /* @__PURE__ */
|
4508
|
+
JumpBackwardIcon = (props) => /* @__PURE__ */ React70__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 32 30", fill: "none" }, /* @__PURE__ */ React70__namespace.createElement(
|
4491
4509
|
"path",
|
4492
4510
|
{
|
4493
4511
|
fillRule: "evenodd",
|
@@ -4495,7 +4513,7 @@ var init_icons2 = __esm({
|
|
4495
4513
|
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",
|
4496
4514
|
fill: "currentColor"
|
4497
4515
|
}
|
4498
|
-
), /* @__PURE__ */
|
4516
|
+
), /* @__PURE__ */ React70__namespace.createElement(
|
4499
4517
|
"path",
|
4500
4518
|
{
|
4501
4519
|
fillRule: "evenodd",
|
@@ -4504,7 +4522,7 @@ var init_icons2 = __esm({
|
|
4504
4522
|
fill: "currentColor"
|
4505
4523
|
}
|
4506
4524
|
));
|
4507
|
-
PlayIcon = (props) => /* @__PURE__ */
|
4525
|
+
PlayIcon = (props) => /* @__PURE__ */ React70__namespace.createElement(react.Box, { as: "svg", ...props, fill: "none", viewBox: "0 0 60 60" }, /* @__PURE__ */ React70__namespace.createElement(
|
4508
4526
|
"path",
|
4509
4527
|
{
|
4510
4528
|
fillRule: "evenodd",
|
@@ -4513,7 +4531,7 @@ var init_icons2 = __esm({
|
|
4513
4531
|
fill: "currentColor"
|
4514
4532
|
}
|
4515
4533
|
));
|
4516
|
-
PauseIcon = (props) => /* @__PURE__ */
|
4534
|
+
PauseIcon = (props) => /* @__PURE__ */ React70__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 60 60", fill: "none" }, /* @__PURE__ */ React70__namespace.createElement(
|
4517
4535
|
"path",
|
4518
4536
|
{
|
4519
4537
|
fillRule: "evenodd",
|
@@ -4522,7 +4540,7 @@ var init_icons2 = __esm({
|
|
4522
4540
|
fill: "currentColor"
|
4523
4541
|
}
|
4524
4542
|
));
|
4525
|
-
SkipNextIcon = (props) => /* @__PURE__ */
|
4543
|
+
SkipNextIcon = (props) => /* @__PURE__ */ React70__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 30 30", fill: "none" }, /* @__PURE__ */ React70__namespace.createElement(
|
4526
4544
|
"path",
|
4527
4545
|
{
|
4528
4546
|
fillRule: "evenodd",
|
@@ -4531,7 +4549,7 @@ var init_icons2 = __esm({
|
|
4531
4549
|
fill: "currentColor"
|
4532
4550
|
}
|
4533
4551
|
));
|
4534
|
-
SkipPreviousIcon = (props) => /* @__PURE__ */
|
4552
|
+
SkipPreviousIcon = (props) => /* @__PURE__ */ React70__namespace.createElement(react.Box, { as: "svg", ...props, viewBox: "0 0 30 30", fill: "none" }, /* @__PURE__ */ React70__namespace.createElement(
|
4535
4553
|
"path",
|
4536
4554
|
{
|
4537
4555
|
fillRule: "evenodd",
|
@@ -4558,7 +4576,7 @@ var init_JumpButton = __esm({
|
|
4558
4576
|
variant: "jumpSkip",
|
4559
4577
|
size: size2
|
4560
4578
|
});
|
4561
|
-
return /* @__PURE__ */
|
4579
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4562
4580
|
react.Center,
|
4563
4581
|
{
|
4564
4582
|
as: "button",
|
@@ -4567,7 +4585,7 @@ var init_JumpButton = __esm({
|
|
4567
4585
|
disabled: isDisabled,
|
4568
4586
|
...props
|
4569
4587
|
},
|
4570
|
-
direction2 === "forward" ? /* @__PURE__ */
|
4588
|
+
direction2 === "forward" ? /* @__PURE__ */ React70__namespace.default.createElement(JumpForwardIcon, { sx: styles3.icon }) : /* @__PURE__ */ React70__namespace.default.createElement(JumpBackwardIcon, { sx: styles3.icon })
|
4571
4589
|
);
|
4572
4590
|
};
|
4573
4591
|
texts18 = createTexts({
|
@@ -4602,7 +4620,7 @@ var init_PlayPauseButton = __esm({
|
|
4602
4620
|
variant: "play",
|
4603
4621
|
size: size2
|
4604
4622
|
});
|
4605
|
-
return /* @__PURE__ */
|
4623
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4606
4624
|
react.Center,
|
4607
4625
|
{
|
4608
4626
|
as: "button",
|
@@ -4611,7 +4629,7 @@ var init_PlayPauseButton = __esm({
|
|
4611
4629
|
disabled: isDisabled,
|
4612
4630
|
...props
|
4613
4631
|
},
|
4614
|
-
isPlaying ? /* @__PURE__ */
|
4632
|
+
isPlaying ? /* @__PURE__ */ React70__namespace.default.createElement(PauseIcon, { sx: styles3.icon }) : /* @__PURE__ */ React70__namespace.default.createElement(PlayIcon, { sx: styles3.icon })
|
4615
4633
|
);
|
4616
4634
|
};
|
4617
4635
|
texts19 = createTexts({
|
@@ -4646,7 +4664,7 @@ var init_SkipButton = __esm({
|
|
4646
4664
|
variant: "jumpSkip",
|
4647
4665
|
size: size2
|
4648
4666
|
});
|
4649
|
-
return /* @__PURE__ */
|
4667
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4650
4668
|
react.Center,
|
4651
4669
|
{
|
4652
4670
|
as: "button",
|
@@ -4655,7 +4673,7 @@ var init_SkipButton = __esm({
|
|
4655
4673
|
disabled: isDisabled,
|
4656
4674
|
...props
|
4657
4675
|
},
|
4658
|
-
direction2 === "forward" ? /* @__PURE__ */
|
4676
|
+
direction2 === "forward" ? /* @__PURE__ */ React70__namespace.default.createElement(SkipNextIcon, { sx: styles3.icon }) : /* @__PURE__ */ React70__namespace.default.createElement(SkipPreviousIcon, { sx: styles3.icon })
|
4659
4677
|
);
|
4660
4678
|
};
|
4661
4679
|
texts20 = createTexts({
|
@@ -4692,7 +4710,7 @@ var init_ModalHeader = __esm({
|
|
4692
4710
|
fontSize: size2 === "lg" ? ["mobile.lg", "desktop.lg"] : ["mobile.md", "desktop.md"],
|
4693
4711
|
textAlign: size2 === "lg" ? "center" : "left"
|
4694
4712
|
};
|
4695
|
-
return /* @__PURE__ */
|
4713
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.ModalHeader, { ...props, ref, ...styles3 });
|
4696
4714
|
}
|
4697
4715
|
);
|
4698
4716
|
}
|
@@ -4702,7 +4720,7 @@ var init_Drawer = __esm({
|
|
4702
4720
|
"src/modal/Drawer.tsx"() {
|
4703
4721
|
init_ModalHeader();
|
4704
4722
|
exports.Drawer = (props) => {
|
4705
|
-
return /* @__PURE__ */
|
4723
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(DrawerProvider, { placement: props.placement }, /* @__PURE__ */ React70__namespace.default.createElement(react.Drawer, { ...props }));
|
4706
4724
|
};
|
4707
4725
|
exports.DrawerContent = react.forwardRef(
|
4708
4726
|
({ children, ...props }, ref) => {
|
@@ -4719,7 +4737,7 @@ var init_Drawer = __esm({
|
|
4719
4737
|
});
|
4720
4738
|
const isTopOrBottom = placement === "top" || placement === "bottom";
|
4721
4739
|
const widthConstraits = isTopOrBottom ? { width: ["100%", "37.5rem"], mx: "auto" } : {};
|
4722
|
-
return /* @__PURE__ */
|
4740
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...handlers }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4723
4741
|
react.DrawerContent,
|
4724
4742
|
{
|
4725
4743
|
...widthConstraits,
|
@@ -4728,13 +4746,13 @@ var init_Drawer = __esm({
|
|
4728
4746
|
...props,
|
4729
4747
|
ref
|
4730
4748
|
},
|
4731
|
-
/* @__PURE__ */
|
4749
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { position: "relative" }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { maxHeight: "100vh", maxWidth: "100vw", overflow: "auto" }, isTopOrBottom && /* @__PURE__ */ React70__namespace.default.createElement(Notch, null), /* @__PURE__ */ React70__namespace.default.createElement(react.Box, null, children)))
|
4732
4750
|
));
|
4733
4751
|
}
|
4734
4752
|
);
|
4735
4753
|
Notch = react.forwardRef((props, ref) => {
|
4736
4754
|
const placement = useDrawerContext();
|
4737
|
-
return /* @__PURE__ */
|
4755
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4738
4756
|
react.Box,
|
4739
4757
|
{
|
4740
4758
|
position: "absolute",
|
@@ -4746,14 +4764,14 @@ var init_Drawer = __esm({
|
|
4746
4764
|
...props,
|
4747
4765
|
ref
|
4748
4766
|
},
|
4749
|
-
/* @__PURE__ */
|
4767
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
4750
4768
|
react.Center,
|
4751
4769
|
{
|
4752
4770
|
background: placement === "bottom" ? "bottom" : "top",
|
4753
4771
|
padding: 2,
|
4754
4772
|
borderRadius: "md"
|
4755
4773
|
},
|
4756
|
-
/* @__PURE__ */
|
4774
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
4757
4775
|
react.Box,
|
4758
4776
|
{
|
4759
4777
|
width: "2.265rem",
|
@@ -4765,11 +4783,138 @@ var init_Drawer = __esm({
|
|
4765
4783
|
)
|
4766
4784
|
);
|
4767
4785
|
});
|
4768
|
-
DrawerContext =
|
4769
|
-
DrawerProvider = (props) => /* @__PURE__ */
|
4786
|
+
DrawerContext = React70__namespace.default.createContext(void 0);
|
4787
|
+
DrawerProvider = (props) => /* @__PURE__ */ React70__namespace.default.createElement(DrawerContext.Provider, { value: props.placement }, props.children);
|
4770
4788
|
useDrawerContext = () => {
|
4771
|
-
return
|
4789
|
+
return React70__namespace.default.useContext(DrawerContext);
|
4790
|
+
};
|
4791
|
+
}
|
4792
|
+
});
|
4793
|
+
exports.FullScreenDrawer = void 0; var DrawerTopMenu, DrawerCloseButton2, texts21;
|
4794
|
+
var init_FullScreenDrawer = __esm({
|
4795
|
+
"src/modal/FullScreenDrawer.tsx"() {
|
4796
|
+
init_button();
|
4797
|
+
init_i18n();
|
4798
|
+
init_Drawer();
|
4799
|
+
exports.FullScreenDrawer = ({
|
4800
|
+
children,
|
4801
|
+
title,
|
4802
|
+
placement = "bottom",
|
4803
|
+
leftButton = null,
|
4804
|
+
rightButton = /* @__PURE__ */ React70__namespace.default.createElement(DrawerCloseButton2, null),
|
4805
|
+
isOpen,
|
4806
|
+
onClose
|
4807
|
+
}) => {
|
4808
|
+
const [isContentBoxScrolled, setContentBoxScrolled] = React70.useState(false);
|
4809
|
+
const onContentScroll = (e) => {
|
4810
|
+
const target = e.target;
|
4811
|
+
if (target.scrollTop <= 0) {
|
4812
|
+
setContentBoxScrolled(false);
|
4813
|
+
return;
|
4814
|
+
}
|
4815
|
+
setContentBoxScrolled(true);
|
4816
|
+
};
|
4817
|
+
React70.useEffect(() => {
|
4818
|
+
setContentBoxScrolled(false);
|
4819
|
+
}, [isOpen]);
|
4820
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(exports.Drawer, { isOpen, onClose, placement, size: "full" }, /* @__PURE__ */ React70__namespace.default.createElement(react.DrawerOverlay, null), /* @__PURE__ */ React70__namespace.default.createElement(
|
4821
|
+
react.DrawerContent,
|
4822
|
+
{
|
4823
|
+
height: "100vh",
|
4824
|
+
backgroundSize: "100% 285px, 100%",
|
4825
|
+
backgroundPosition: "top",
|
4826
|
+
backgroundRepeat: "no-repeat"
|
4827
|
+
},
|
4828
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
4829
|
+
DrawerTopMenu,
|
4830
|
+
{
|
4831
|
+
isScrolled: isContentBoxScrolled,
|
4832
|
+
title,
|
4833
|
+
leftButton,
|
4834
|
+
rightButton
|
4835
|
+
}
|
4836
|
+
),
|
4837
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.DrawerBody, { overflow: "auto", onScroll: onContentScroll }, children)
|
4838
|
+
));
|
4839
|
+
};
|
4840
|
+
DrawerTopMenu = ({
|
4841
|
+
title,
|
4842
|
+
leftButton,
|
4843
|
+
rightButton,
|
4844
|
+
isScrolled
|
4845
|
+
}) => {
|
4846
|
+
const backgroundColor = react.useColorModeValue(
|
4847
|
+
"bg.default.light",
|
4848
|
+
"bg.default.dark"
|
4849
|
+
);
|
4850
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4851
|
+
react.Flex,
|
4852
|
+
{
|
4853
|
+
width: "100%",
|
4854
|
+
backgroundColor,
|
4855
|
+
position: "static",
|
4856
|
+
paddingTop: [1.5, 2.5, 3, 3],
|
4857
|
+
paddingBottom: [1.5, 2.5, 3, 3],
|
4858
|
+
paddingLeft: [2, 3, 6, 9],
|
4859
|
+
paddingRight: [2, 3, 6, 9],
|
4860
|
+
transition: "box-shadow 0.2s",
|
4861
|
+
boxShadow: isScrolled ? "md" : void 0
|
4862
|
+
},
|
4863
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { flex: "1" }, leftButton),
|
4864
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
4865
|
+
react.DrawerHeader,
|
4866
|
+
{
|
4867
|
+
as: "h2",
|
4868
|
+
fontSize: "md",
|
4869
|
+
fontWeight: "bold",
|
4870
|
+
textAlign: "center",
|
4871
|
+
flex: "1",
|
4872
|
+
margin: 0,
|
4873
|
+
padding: 0
|
4874
|
+
},
|
4875
|
+
title
|
4876
|
+
),
|
4877
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { flex: "1" }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { width: "fit-content", marginLeft: "auto" }, rightButton))
|
4878
|
+
);
|
4879
|
+
};
|
4880
|
+
DrawerCloseButton2 = () => {
|
4881
|
+
const { onClose } = react.useModalContext();
|
4882
|
+
const { t: t2 } = useTranslation();
|
4883
|
+
const [isScreenSizeMinSm] = react.useMediaQuery(
|
4884
|
+
`(min-width: ${tokens11__namespace.default.size.breakpoint.sm})`
|
4885
|
+
);
|
4886
|
+
if (isScreenSizeMinSm) {
|
4887
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4888
|
+
exports.Button,
|
4889
|
+
{
|
4890
|
+
variant: "ghost",
|
4891
|
+
leftIcon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseFill24Icon, null),
|
4892
|
+
onClick: onClose,
|
4893
|
+
"aria-label": t2(texts21.close),
|
4894
|
+
width: "fit-content",
|
4895
|
+
marginLeft: "auto"
|
4896
|
+
},
|
4897
|
+
t2(texts21.close)
|
4898
|
+
);
|
4899
|
+
}
|
4900
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4901
|
+
exports.IconButton,
|
4902
|
+
{
|
4903
|
+
variant: "ghost",
|
4904
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseFill30Icon, null),
|
4905
|
+
onClick: onClose,
|
4906
|
+
"aria-label": t2(texts21.close)
|
4907
|
+
}
|
4908
|
+
);
|
4772
4909
|
};
|
4910
|
+
texts21 = createTexts({
|
4911
|
+
close: {
|
4912
|
+
nb: "Lukk",
|
4913
|
+
nn: "Lukk",
|
4914
|
+
en: "Close",
|
4915
|
+
sv: "St\xE4ng"
|
4916
|
+
}
|
4917
|
+
});
|
4773
4918
|
}
|
4774
4919
|
});
|
4775
4920
|
var init_Modal = __esm({
|
@@ -4786,7 +4931,7 @@ var init_SimpleDrawer = __esm({
|
|
4786
4931
|
title,
|
4787
4932
|
...props
|
4788
4933
|
}) => {
|
4789
|
-
return /* @__PURE__ */
|
4934
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(exports.Drawer, { placement, ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.DrawerOverlay, null), /* @__PURE__ */ React70__namespace.default.createElement(exports.DrawerContent, null, /* @__PURE__ */ React70__namespace.default.createElement(react.DrawerCloseButton, null), title && /* @__PURE__ */ React70__namespace.default.createElement(exports.ModalHeader, null, title), /* @__PURE__ */ React70__namespace.default.createElement(react.DrawerBody, null, children)));
|
4790
4935
|
};
|
4791
4936
|
}
|
4792
4937
|
});
|
@@ -4795,12 +4940,13 @@ var init_SimpleDrawer = __esm({
|
|
4795
4940
|
var init_modal = __esm({
|
4796
4941
|
"src/modal/index.tsx"() {
|
4797
4942
|
init_Drawer();
|
4943
|
+
init_FullScreenDrawer();
|
4798
4944
|
init_Modal();
|
4799
4945
|
init_ModalHeader();
|
4800
4946
|
init_SimpleDrawer();
|
4801
4947
|
}
|
4802
4948
|
});
|
4803
|
-
var EXPIRATION_DELAY; exports.Nudge = void 0; var
|
4949
|
+
var EXPIRATION_DELAY; exports.Nudge = void 0; var texts22;
|
4804
4950
|
var init_Nudge = __esm({
|
4805
4951
|
"src/nudge/Nudge.tsx"() {
|
4806
4952
|
init_src();
|
@@ -4824,7 +4970,7 @@ var init_Nudge = __esm({
|
|
4824
4970
|
}
|
4825
4971
|
return null;
|
4826
4972
|
}
|
4827
|
-
return /* @__PURE__ */
|
4973
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4828
4974
|
react.Popover,
|
4829
4975
|
{
|
4830
4976
|
arrowSize: 12,
|
@@ -4832,11 +4978,11 @@ var init_Nudge = __esm({
|
|
4832
4978
|
defaultIsOpen: true,
|
4833
4979
|
...props
|
4834
4980
|
},
|
4835
|
-
/* @__PURE__ */
|
4836
|
-
/* @__PURE__ */
|
4981
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.PopoverAnchor, null, children),
|
4982
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.PopoverContent, { borderRadius: "sm" }, /* @__PURE__ */ React70__namespace.default.createElement(react.DarkMode, null, /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverArrow, null), /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverCloseButton, null), /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverBody, { margin: 1 }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { marginRight: 4 }, content), /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { marginTop: 1.5 }, actions ?? /* @__PURE__ */ React70__namespace.default.createElement(exports.ButtonGroup, null, /* @__PURE__ */ React70__namespace.default.createElement(exports.Button, { variant: "tertiary", size: "xs" }, t2(texts22.close)), /* @__PURE__ */ React70__namespace.default.createElement(exports.Button, { variant: "secondary", size: "xs", fontWeight: "bold" }, t2(texts22.showMe)))))))
|
4837
4983
|
);
|
4838
4984
|
};
|
4839
|
-
|
4985
|
+
texts22 = createTexts({
|
4840
4986
|
close: {
|
4841
4987
|
nb: "Lukk",
|
4842
4988
|
nn: "Lukk",
|
@@ -4852,7 +4998,7 @@ var init_Nudge = __esm({
|
|
4852
4998
|
});
|
4853
4999
|
}
|
4854
5000
|
});
|
4855
|
-
exports.WizardNudge = void 0; var NextOrCloseButton,
|
5001
|
+
exports.WizardNudge = void 0; var NextOrCloseButton, texts23;
|
4856
5002
|
var init_WizardNudge = __esm({
|
4857
5003
|
"src/nudge/WizardNudge.tsx"() {
|
4858
5004
|
init_src();
|
@@ -4863,23 +5009,23 @@ var init_WizardNudge = __esm({
|
|
4863
5009
|
content,
|
4864
5010
|
...props
|
4865
5011
|
}) => {
|
4866
|
-
const [currentStep, setCurrentStep] =
|
5012
|
+
const [currentStep, setCurrentStep] = React70.useState(1);
|
4867
5013
|
const totalSteps = content.length;
|
4868
5014
|
const isLastStep = totalSteps === currentStep;
|
4869
5015
|
const onNext = () => setCurrentStep((prev) => prev + 1);
|
4870
|
-
return /* @__PURE__ */
|
5016
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4871
5017
|
exports.Nudge,
|
4872
5018
|
{
|
4873
5019
|
onClose,
|
4874
5020
|
name,
|
4875
5021
|
content: content[currentStep - 1],
|
4876
|
-
actions: /* @__PURE__ */
|
5022
|
+
actions: /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { gap: 3, alignItems: "center" }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4877
5023
|
exports.ProgressIndicator,
|
4878
5024
|
{
|
4879
5025
|
activeStep: currentStep,
|
4880
5026
|
numberOfSteps: totalSteps
|
4881
5027
|
}
|
4882
|
-
), /* @__PURE__ */
|
5028
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(react.Box, null, /* @__PURE__ */ React70__namespace.default.createElement(NextOrCloseButton, { isLastStep, onNext }))),
|
4883
5029
|
...props
|
4884
5030
|
},
|
4885
5031
|
children
|
@@ -4888,19 +5034,19 @@ var init_WizardNudge = __esm({
|
|
4888
5034
|
NextOrCloseButton = ({ isLastStep, onNext }) => {
|
4889
5035
|
const { onClose } = react.usePopoverContext();
|
4890
5036
|
const { t: t2 } = useTranslation();
|
4891
|
-
return /* @__PURE__ */
|
5037
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4892
5038
|
exports.Button,
|
4893
5039
|
{
|
4894
5040
|
variant: "tertiary",
|
4895
5041
|
size: "xs",
|
4896
|
-
leftIcon: isLastStep ? void 0 : /* @__PURE__ */
|
5042
|
+
leftIcon: isLastStep ? void 0 : /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.ArrowRightFill18Icon, null),
|
4897
5043
|
onClick: isLastStep ? onClose : onNext,
|
4898
5044
|
width: "fit-content"
|
4899
5045
|
},
|
4900
|
-
t2(isLastStep ?
|
5046
|
+
t2(isLastStep ? texts23.finish : texts23.nextStep)
|
4901
5047
|
);
|
4902
5048
|
};
|
4903
|
-
|
5049
|
+
texts23 = createTexts({
|
4904
5050
|
nextStep: {
|
4905
5051
|
nb: "Neste",
|
4906
5052
|
nn: "Neste",
|
@@ -4930,7 +5076,7 @@ var init_ProgressDot = __esm({
|
|
4930
5076
|
init_src();
|
4931
5077
|
ProgressDot = ({ isActive }) => {
|
4932
5078
|
const style = react.useMultiStyleConfig("ProgressIndicator");
|
4933
|
-
return /* @__PURE__ */
|
5079
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4934
5080
|
react.Box,
|
4935
5081
|
{
|
4936
5082
|
as: "svg",
|
@@ -4940,12 +5086,12 @@ var init_ProgressDot = __esm({
|
|
4940
5086
|
viewBox: "0 0 100 100",
|
4941
5087
|
"aria-current": isActive ? "step" : void 0
|
4942
5088
|
},
|
4943
|
-
/* @__PURE__ */
|
5089
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: "circle", cx: "50", cy: "50", r: "50" })
|
4944
5090
|
);
|
4945
5091
|
};
|
4946
5092
|
}
|
4947
5093
|
});
|
4948
|
-
exports.ProgressIndicator = void 0; var
|
5094
|
+
exports.ProgressIndicator = void 0; var texts24;
|
4949
5095
|
var init_ProgressIndicator = __esm({
|
4950
5096
|
"src/progress-indicator/ProgressIndicator.tsx"() {
|
4951
5097
|
init_src();
|
@@ -4956,7 +5102,7 @@ var init_ProgressIndicator = __esm({
|
|
4956
5102
|
}) => {
|
4957
5103
|
const { t: t2 } = useTranslation();
|
4958
5104
|
const style = react.useMultiStyleConfig("ProgressIndicator");
|
4959
|
-
return /* @__PURE__ */
|
5105
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4960
5106
|
react.Box,
|
4961
5107
|
{
|
4962
5108
|
__css: style.root,
|
@@ -4964,9 +5110,9 @@ var init_ProgressIndicator = __esm({
|
|
4964
5110
|
"aria-valuemin": 1,
|
4965
5111
|
"aria-valuemax": numberOfSteps,
|
4966
5112
|
"aria-valuenow": activeStep,
|
4967
|
-
"aria-valuetext": t2(
|
5113
|
+
"aria-valuetext": t2(texts24.stepsOf(activeStep, numberOfSteps))
|
4968
5114
|
},
|
4969
|
-
/* @__PURE__ */
|
5115
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { __css: style.container }, Array.from({ length: numberOfSteps }, (_, i) => /* @__PURE__ */ React70__namespace.default.createElement(
|
4970
5116
|
ProgressDot,
|
4971
5117
|
{
|
4972
5118
|
key: i,
|
@@ -4976,7 +5122,7 @@ var init_ProgressIndicator = __esm({
|
|
4976
5122
|
)))
|
4977
5123
|
);
|
4978
5124
|
};
|
4979
|
-
|
5125
|
+
texts24 = createTexts({
|
4980
5126
|
stepsOf: (activeStep, numberOfSteps) => ({
|
4981
5127
|
nb: `Steg ${activeStep} av ${numberOfSteps}`,
|
4982
5128
|
nn: `Steg ${activeStep} av ${numberOfSteps}`,
|
@@ -5007,7 +5153,7 @@ var init_SporProvider = __esm({
|
|
5007
5153
|
}) => {
|
5008
5154
|
const brandCustomizations = exports.brandTheme[brand] ?? {};
|
5009
5155
|
const extendedTheme = deepmerge__default.default(theme3, brandCustomizations);
|
5010
|
-
return /* @__PURE__ */
|
5156
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(LanguageProvider, { language }, /* @__PURE__ */ React70__namespace.default.createElement(react.ChakraProvider, { theme: extendedTheme, ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react$1.Global, { styles: exports.fontFaces }), children));
|
5011
5157
|
};
|
5012
5158
|
}
|
5013
5159
|
});
|
@@ -5021,7 +5167,7 @@ var init_provider = __esm({
|
|
5021
5167
|
var StepperContext, StepperProvider, useStepper;
|
5022
5168
|
var init_StepperContext = __esm({
|
5023
5169
|
"src/stepper/StepperContext.tsx"() {
|
5024
|
-
StepperContext =
|
5170
|
+
StepperContext = React70__namespace.default.createContext(null);
|
5025
5171
|
StepperProvider = ({
|
5026
5172
|
activeStep,
|
5027
5173
|
children,
|
@@ -5029,7 +5175,7 @@ var init_StepperContext = __esm({
|
|
5029
5175
|
numberOfSteps,
|
5030
5176
|
variant
|
5031
5177
|
}) => {
|
5032
|
-
return /* @__PURE__ */
|
5178
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
5033
5179
|
StepperContext.Provider,
|
5034
5180
|
{
|
5035
5181
|
value: { activeStep, onClick, numberOfSteps, variant }
|
@@ -5038,7 +5184,7 @@ var init_StepperContext = __esm({
|
|
5038
5184
|
);
|
5039
5185
|
};
|
5040
5186
|
useStepper = () => {
|
5041
|
-
const context =
|
5187
|
+
const context = React70__namespace.default.useContext(StepperContext);
|
5042
5188
|
if (!context) {
|
5043
5189
|
throw new Error(
|
5044
5190
|
"useStepper must be used within a StepperProvider. Most likely, you forgot to wrap your StepperStep in a Stepper component"
|
@@ -5048,7 +5194,7 @@ var init_StepperContext = __esm({
|
|
5048
5194
|
};
|
5049
5195
|
}
|
5050
5196
|
});
|
5051
|
-
exports.Stepper = void 0; var
|
5197
|
+
exports.Stepper = void 0; var texts25;
|
5052
5198
|
var init_Stepper = __esm({
|
5053
5199
|
"src/stepper/Stepper.tsx"() {
|
5054
5200
|
init_stepper();
|
@@ -5072,7 +5218,7 @@ var init_Stepper = __esm({
|
|
5072
5218
|
const { t: t2 } = useTranslation();
|
5073
5219
|
const hideBackButtonOnFirstStep = activeStep === 1 && !onBackButtonClick;
|
5074
5220
|
const shownHeading = heading || title;
|
5075
|
-
return /* @__PURE__ */
|
5221
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: style.root }, /* @__PURE__ */ React70__namespace.default.createElement(
|
5076
5222
|
StepperProvider,
|
5077
5223
|
{
|
5078
5224
|
onClick,
|
@@ -5080,7 +5226,7 @@ var init_Stepper = __esm({
|
|
5080
5226
|
variant,
|
5081
5227
|
numberOfSteps
|
5082
5228
|
},
|
5083
|
-
/* @__PURE__ */
|
5229
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: style.container }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: style.innerContainer }, /* @__PURE__ */ React70__namespace.default.createElement(
|
5084
5230
|
react.Flex,
|
5085
5231
|
{
|
5086
5232
|
justifyContent: "space-between",
|
@@ -5088,11 +5234,11 @@ var init_Stepper = __esm({
|
|
5088
5234
|
gap: 2,
|
5089
5235
|
flex: 1
|
5090
5236
|
},
|
5091
|
-
/* @__PURE__ */
|
5237
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
5092
5238
|
exports.IconButton,
|
5093
5239
|
{
|
5094
|
-
"aria-label": t2(
|
5095
|
-
icon: /* @__PURE__ */
|
5240
|
+
"aria-label": t2(texts25.back),
|
5241
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.ArrowLeftFill24Icon, null),
|
5096
5242
|
variant: "ghost",
|
5097
5243
|
size: "sm",
|
5098
5244
|
visibility: hideBackButtonOnFirstStep ? "hidden" : "visible",
|
@@ -5105,9 +5251,9 @@ var init_Stepper = __esm({
|
|
5105
5251
|
}
|
5106
5252
|
}
|
5107
5253
|
),
|
5108
|
-
shownHeading && /* @__PURE__ */
|
5109
|
-
/* @__PURE__ */
|
5110
|
-
)), /* @__PURE__ */
|
5254
|
+
shownHeading && /* @__PURE__ */ React70__namespace.default.createElement(exports.Text, { flex: 1, variant: "sm", as: headingLevel, sx: style.title }, shownHeading),
|
5255
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: style.stepCounter }, t2(texts25.stepsOf(activeStep, numberOfSteps)))
|
5256
|
+
)), /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { justifyContent: "center", display: ["none", null, "flex"] }, steps.map((step, index) => /* @__PURE__ */ React70__namespace.default.createElement(
|
5111
5257
|
exports.StepperStep,
|
5112
5258
|
{
|
5113
5259
|
key: index,
|
@@ -5120,7 +5266,7 @@ var init_Stepper = __esm({
|
|
5120
5266
|
))))
|
5121
5267
|
));
|
5122
5268
|
};
|
5123
|
-
|
5269
|
+
texts25 = createTexts({
|
5124
5270
|
stepsOf: (activeStep, numberOfSteps) => ({
|
5125
5271
|
nb: `Steg ${activeStep}/${numberOfSteps}`,
|
5126
5272
|
nn: `Steg ${activeStep}/${numberOfSteps}`,
|
@@ -5159,14 +5305,14 @@ var init_StepperStep = __esm({
|
|
5159
5305
|
);
|
5160
5306
|
const iconColor = react.useColorModeValue("blackAlpha.200", "whiteAlpha.200");
|
5161
5307
|
const isDisabled = state2 !== "active" && isDisabledOverride || state2 === "disabled";
|
5162
|
-
return /* @__PURE__ */
|
5308
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: style.stepContainer }, stepNumber > 1 && /* @__PURE__ */ React70__namespace.default.createElement(
|
5163
5309
|
sporIconReact.DropdownRightFill18Icon,
|
5164
5310
|
{
|
5165
5311
|
marginX: 5,
|
5166
5312
|
display: ["none", null, "block"],
|
5167
5313
|
color: iconColor
|
5168
5314
|
}
|
5169
|
-
), isDisabled ? /* @__PURE__ */
|
5315
|
+
), isDisabled ? /* @__PURE__ */ React70__namespace.default.createElement(
|
5170
5316
|
exports.Text,
|
5171
5317
|
{
|
5172
5318
|
variant: "xs",
|
@@ -5176,7 +5322,7 @@ var init_StepperStep = __esm({
|
|
5176
5322
|
paddingX: 2
|
5177
5323
|
},
|
5178
5324
|
children
|
5179
|
-
) : /* @__PURE__ */
|
5325
|
+
) : /* @__PURE__ */ React70__namespace.default.createElement(
|
5180
5326
|
exports.Button,
|
5181
5327
|
{
|
5182
5328
|
size: "xs",
|
@@ -5212,7 +5358,7 @@ exports.Tabs = void 0;
|
|
5212
5358
|
var init_Tabs = __esm({
|
5213
5359
|
"src/tab/Tabs.tsx"() {
|
5214
5360
|
exports.Tabs = react.forwardRef((props, ref) => {
|
5215
|
-
return /* @__PURE__ */
|
5361
|
+
return /* @__PURE__ */ React70__namespace.createElement(react.Tabs, { ...props, ref });
|
5216
5362
|
});
|
5217
5363
|
}
|
5218
5364
|
});
|
@@ -5234,7 +5380,7 @@ var init_Table = __esm({
|
|
5234
5380
|
"src/table/Table.tsx"() {
|
5235
5381
|
exports.Table = react.forwardRef((props, ref) => {
|
5236
5382
|
const { variant, size: size2, colorScheme, children, ...rest } = props;
|
5237
|
-
return /* @__PURE__ */
|
5383
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...rest, ...getStyleProps(props) }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { overflowX: "auto" }, /* @__PURE__ */ React70__namespace.default.createElement(
|
5238
5384
|
react.Table,
|
5239
5385
|
{
|
5240
5386
|
variant,
|
@@ -5978,16 +6124,16 @@ function defineCssVars(scope, keys2) {
|
|
5978
6124
|
function defineStyle(styles3) {
|
5979
6125
|
return styles3;
|
5980
6126
|
}
|
5981
|
-
function defineStyleConfig(
|
5982
|
-
return
|
6127
|
+
function defineStyleConfig(config42) {
|
6128
|
+
return config42;
|
5983
6129
|
}
|
5984
6130
|
function createMultiStyleConfigHelpers(parts18) {
|
5985
6131
|
return {
|
5986
|
-
definePartsStyle(
|
5987
|
-
return
|
6132
|
+
definePartsStyle(config42) {
|
6133
|
+
return config42;
|
5988
6134
|
},
|
5989
|
-
defineMultiStyleConfig(
|
5990
|
-
return { parts: parts18, ...
|
6135
|
+
defineMultiStyleConfig(config42) {
|
6136
|
+
return { parts: parts18, ...config42 };
|
5991
6137
|
}
|
5992
6138
|
};
|
5993
6139
|
}
|
@@ -11658,12 +11804,12 @@ var init_borders = __esm({
|
|
11658
11804
|
"src/theme/foundations/borders.ts"() {
|
11659
11805
|
borders2 = {
|
11660
11806
|
none: "0",
|
11661
|
-
sm: `${
|
11662
|
-
"sm-dashed": `${
|
11663
|
-
md: `${
|
11664
|
-
"md-dashed": `${
|
11665
|
-
lg: `${
|
11666
|
-
"lg-dashed": `${
|
11807
|
+
sm: `${tokens11__namespace.default.size.stroke.sm} solid`,
|
11808
|
+
"sm-dashed": `${tokens11__namespace.default.size.stroke.sm} dashed`,
|
11809
|
+
md: `${tokens11__namespace.default.size.stroke.md} solid`,
|
11810
|
+
"md-dashed": `${tokens11__namespace.default.size.stroke.md} dashed`,
|
11811
|
+
lg: `${tokens11__namespace.default.size.stroke.lg} solid`,
|
11812
|
+
"lg-dashed": `${tokens11__namespace.default.size.stroke.lg} dashed`
|
11667
11813
|
};
|
11668
11814
|
}
|
11669
11815
|
});
|
@@ -11672,11 +11818,11 @@ var init_breakpoints = __esm({
|
|
11672
11818
|
"src/theme/foundations/breakpoints.ts"() {
|
11673
11819
|
breakpoints2 = {
|
11674
11820
|
base: "0px",
|
11675
|
-
sm:
|
11676
|
-
md:
|
11677
|
-
lg:
|
11678
|
-
xl:
|
11679
|
-
"2xl":
|
11821
|
+
sm: tokens11__namespace.default.size.breakpoint.sm,
|
11822
|
+
md: tokens11__namespace.default.size.breakpoint.md,
|
11823
|
+
lg: tokens11__namespace.default.size.breakpoint.lg,
|
11824
|
+
xl: tokens11__namespace.default.size.breakpoint.xl,
|
11825
|
+
"2xl": tokens11__namespace.default.size.breakpoint.xl
|
11680
11826
|
};
|
11681
11827
|
}
|
11682
11828
|
});
|
@@ -11684,10 +11830,10 @@ var colors2;
|
|
11684
11830
|
var init_colors = __esm({
|
11685
11831
|
"src/theme/foundations/colors.ts"() {
|
11686
11832
|
colors2 = {
|
11687
|
-
...
|
11688
|
-
...
|
11689
|
-
...
|
11690
|
-
linjetag:
|
11833
|
+
...tokens11__namespace.default.color.alias,
|
11834
|
+
...tokens11__namespace.default.color.palette,
|
11835
|
+
...tokens11__namespace.default.color.vyDigital,
|
11836
|
+
linjetag: tokens11__namespace.default.color.linjetag
|
11691
11837
|
};
|
11692
11838
|
}
|
11693
11839
|
});
|
@@ -11707,9 +11853,9 @@ var fonts;
|
|
11707
11853
|
var init_fonts = __esm({
|
11708
11854
|
"src/theme/foundations/fonts.ts"() {
|
11709
11855
|
fonts = {
|
11710
|
-
body: `${
|
11711
|
-
heading: `${
|
11712
|
-
mono: `${
|
11856
|
+
body: `${tokens11__namespace.default.font.family.body}, arial, sans-serif`,
|
11857
|
+
heading: `${tokens11__namespace.default.font.family.heading}, arial, sans-serif`,
|
11858
|
+
mono: `${tokens11__namespace.default.font.family.monospace}, monospace`
|
11713
11859
|
};
|
11714
11860
|
}
|
11715
11861
|
});
|
@@ -11717,29 +11863,29 @@ var fontSizes;
|
|
11717
11863
|
var init_fontSizes = __esm({
|
11718
11864
|
"src/theme/foundations/fontSizes.ts"() {
|
11719
11865
|
fontSizes = {
|
11720
|
-
"2xs":
|
11721
|
-
xs:
|
11722
|
-
sm:
|
11723
|
-
md:
|
11724
|
-
lg:
|
11725
|
-
xl:
|
11726
|
-
"2xl":
|
11727
|
-
"3xl":
|
11866
|
+
"2xs": tokens11__namespace.default.size.font.xs.mobile,
|
11867
|
+
xs: tokens11__namespace.default.size.font.sm.mobile,
|
11868
|
+
sm: tokens11__namespace.default.size.font.md.mobile,
|
11869
|
+
md: tokens11__namespace.default.size.font.lg.mobile,
|
11870
|
+
lg: tokens11__namespace.default.size.font.xl.mobile,
|
11871
|
+
xl: tokens11__namespace.default.size.font.xxl.mobile,
|
11872
|
+
"2xl": tokens11__namespace.default.size.font.xl.desktop,
|
11873
|
+
"3xl": tokens11__namespace.default.size.font.xxl.desktop,
|
11728
11874
|
mobile: {
|
11729
|
-
xs:
|
11730
|
-
sm:
|
11731
|
-
md:
|
11732
|
-
lg:
|
11733
|
-
xl:
|
11734
|
-
xxl:
|
11875
|
+
xs: tokens11__namespace.default.size.font.xs.mobile,
|
11876
|
+
sm: tokens11__namespace.default.size.font.sm.mobile,
|
11877
|
+
md: tokens11__namespace.default.size.font.md.mobile,
|
11878
|
+
lg: tokens11__namespace.default.size.font.lg.mobile,
|
11879
|
+
xl: tokens11__namespace.default.size.font.xl.mobile,
|
11880
|
+
xxl: tokens11__namespace.default.size.font.xxl.mobile
|
11735
11881
|
},
|
11736
11882
|
desktop: {
|
11737
|
-
xs:
|
11738
|
-
sm:
|
11739
|
-
md:
|
11740
|
-
lg:
|
11741
|
-
xl:
|
11742
|
-
xxl:
|
11883
|
+
xs: tokens11__namespace.default.size.font.xs.desktop,
|
11884
|
+
sm: tokens11__namespace.default.size.font.sm.desktop,
|
11885
|
+
md: tokens11__namespace.default.size.font.md.desktop,
|
11886
|
+
lg: tokens11__namespace.default.size.font.lg.desktop,
|
11887
|
+
xl: tokens11__namespace.default.size.font.xl.desktop,
|
11888
|
+
xxl: tokens11__namespace.default.size.font.xxl.desktop
|
11743
11889
|
}
|
11744
11890
|
};
|
11745
11891
|
}
|
@@ -11760,8 +11906,8 @@ var lineHeights;
|
|
11760
11906
|
var init_lineHeights = __esm({
|
11761
11907
|
"src/theme/foundations/lineHeights.ts"() {
|
11762
11908
|
lineHeights = {
|
11763
|
-
base:
|
11764
|
-
normal:
|
11909
|
+
base: tokens11__namespace.default.font.style.lg["line-height"],
|
11910
|
+
normal: tokens11__namespace.default.font.style.lg["line-height"]
|
11765
11911
|
};
|
11766
11912
|
}
|
11767
11913
|
});
|
@@ -11769,13 +11915,13 @@ var radii2;
|
|
11769
11915
|
var init_radii = __esm({
|
11770
11916
|
"src/theme/foundations/radii.ts"() {
|
11771
11917
|
radii2 = {
|
11772
|
-
none:
|
11773
|
-
xs:
|
11774
|
-
sm:
|
11775
|
-
md:
|
11776
|
-
lg:
|
11777
|
-
xl:
|
11778
|
-
"2xl":
|
11918
|
+
none: tokens11__namespace.default.size["border-radius"].none,
|
11919
|
+
xs: tokens11__namespace.default.size["border-radius"].xs,
|
11920
|
+
sm: tokens11__namespace.default.size["border-radius"].sm,
|
11921
|
+
md: tokens11__namespace.default.size["border-radius"].md,
|
11922
|
+
lg: tokens11__namespace.default.size["border-radius"].lg,
|
11923
|
+
xl: tokens11__namespace.default.size["border-radius"].xl,
|
11924
|
+
"2xl": tokens11__namespace.default.size["border-radius"]["2xl"],
|
11779
11925
|
round: "50%"
|
11780
11926
|
};
|
11781
11927
|
}
|
@@ -11785,18 +11931,18 @@ var init_shadows = __esm({
|
|
11785
11931
|
"src/theme/foundations/shadows.ts"() {
|
11786
11932
|
shadows2 = {
|
11787
11933
|
none: "none",
|
11788
|
-
sm:
|
11789
|
-
md:
|
11790
|
-
lg:
|
11934
|
+
sm: tokens11__namespace.default.depth.shadow.sm.value,
|
11935
|
+
md: tokens11__namespace.default.depth.shadow.md.value,
|
11936
|
+
lg: tokens11__namespace.default.depth.shadow.lg.value
|
11791
11937
|
};
|
11792
11938
|
}
|
11793
11939
|
});
|
11794
11940
|
var spacing2, space2;
|
11795
11941
|
var init_spacing = __esm({
|
11796
11942
|
"src/theme/foundations/spacing.ts"() {
|
11797
|
-
spacing2 = Object.entries(
|
11798
|
-
(
|
11799
|
-
...
|
11943
|
+
spacing2 = Object.entries(tokens11__namespace.default.size.spacing).reduce(
|
11944
|
+
(tokens16, [key, token]) => ({
|
11945
|
+
...tokens16,
|
11800
11946
|
[Number(key)]: token
|
11801
11947
|
}),
|
11802
11948
|
{}
|
@@ -11848,73 +11994,73 @@ var init_textStyles = __esm({
|
|
11848
11994
|
textStyles = {
|
11849
11995
|
"2xl": {
|
11850
11996
|
fontSize: [
|
11851
|
-
|
11997
|
+
tokens11__namespace.default.font.style.xxl["font-size"].mobile,
|
11852
11998
|
null,
|
11853
11999
|
null,
|
11854
|
-
|
12000
|
+
tokens11__namespace.default.font.style.xxl["font-size"].desktop
|
11855
12001
|
],
|
11856
|
-
fontFamily:
|
11857
|
-
lineHeight:
|
12002
|
+
fontFamily: tokens11__namespace.default.font.style.xxl["font-family"],
|
12003
|
+
lineHeight: tokens11__namespace.default.font.style.xxl["line-height"]
|
11858
12004
|
},
|
11859
12005
|
"xl-display": {
|
11860
12006
|
fontSize: [
|
11861
|
-
|
12007
|
+
tokens11__namespace.default.font.style["xl-display"]["font-size"].mobile,
|
11862
12008
|
null,
|
11863
12009
|
null,
|
11864
|
-
|
12010
|
+
tokens11__namespace.default.font.style["xl-display"]["font-size"].desktop
|
11865
12011
|
],
|
11866
|
-
fontFamily:
|
11867
|
-
lineHeight:
|
12012
|
+
fontFamily: tokens11__namespace.default.font.style["xl-display"]["font-family"],
|
12013
|
+
lineHeight: tokens11__namespace.default.font.style["xl-display"]["line-height"]
|
11868
12014
|
},
|
11869
12015
|
"xl-sans": {
|
11870
12016
|
fontSize: [
|
11871
|
-
|
12017
|
+
tokens11__namespace.default.font.style["xl-sans"]["font-size"].mobile,
|
11872
12018
|
null,
|
11873
12019
|
null,
|
11874
|
-
|
12020
|
+
tokens11__namespace.default.font.style["xl-sans"]["font-size"].desktop
|
11875
12021
|
],
|
11876
|
-
fontFamily:
|
11877
|
-
lineHeight:
|
12022
|
+
fontFamily: tokens11__namespace.default.font.style["xl-sans"]["font-family"],
|
12023
|
+
lineHeight: tokens11__namespace.default.font.style["xl-sans"]["line-height"]
|
11878
12024
|
},
|
11879
12025
|
lg: {
|
11880
12026
|
fontSize: [
|
11881
|
-
|
12027
|
+
tokens11__namespace.default.font.style.lg["font-size"].mobile,
|
11882
12028
|
null,
|
11883
12029
|
null,
|
11884
|
-
|
12030
|
+
tokens11__namespace.default.font.style.lg["font-size"].desktop
|
11885
12031
|
],
|
11886
|
-
fontFamily:
|
11887
|
-
lineHeight:
|
12032
|
+
fontFamily: tokens11__namespace.default.font.style.lg["font-family"],
|
12033
|
+
lineHeight: tokens11__namespace.default.font.style.lg["line-height"]
|
11888
12034
|
},
|
11889
12035
|
md: {
|
11890
12036
|
fontSize: [
|
11891
|
-
|
12037
|
+
tokens11__namespace.default.font.style.md["font-size"].mobile,
|
11892
12038
|
null,
|
11893
12039
|
null,
|
11894
|
-
|
12040
|
+
tokens11__namespace.default.font.style.md["font-size"].desktop
|
11895
12041
|
],
|
11896
|
-
fontFamily:
|
11897
|
-
lineHeight:
|
12042
|
+
fontFamily: tokens11__namespace.default.font.style.md["font-family"],
|
12043
|
+
lineHeight: tokens11__namespace.default.font.style.md["line-height"]
|
11898
12044
|
},
|
11899
12045
|
sm: {
|
11900
12046
|
fontSize: [
|
11901
|
-
|
12047
|
+
tokens11__namespace.default.font.style.sm["font-size"].mobile,
|
11902
12048
|
null,
|
11903
12049
|
null,
|
11904
|
-
|
12050
|
+
tokens11__namespace.default.font.style.sm["font-size"].desktop
|
11905
12051
|
],
|
11906
|
-
fontFamily:
|
11907
|
-
lineHeight:
|
12052
|
+
fontFamily: tokens11__namespace.default.font.style.sm["font-family"],
|
12053
|
+
lineHeight: tokens11__namespace.default.font.style.sm["line-height"]
|
11908
12054
|
},
|
11909
12055
|
xs: {
|
11910
12056
|
fontSize: [
|
11911
|
-
|
12057
|
+
tokens11__namespace.default.font.style.xs["font-size"].mobile,
|
11912
12058
|
null,
|
11913
12059
|
null,
|
11914
|
-
|
12060
|
+
tokens11__namespace.default.font.style.xs["font-size"].desktop
|
11915
12061
|
],
|
11916
|
-
fontFamily:
|
11917
|
-
lineHeight:
|
12062
|
+
fontFamily: tokens11__namespace.default.font.style.xs["font-family"],
|
12063
|
+
lineHeight: tokens11__namespace.default.font.style.xs["line-height"]
|
11918
12064
|
}
|
11919
12065
|
};
|
11920
12066
|
}
|
@@ -11923,19 +12069,19 @@ var zIndices2;
|
|
11923
12069
|
var init_zIndices = __esm({
|
11924
12070
|
"src/theme/foundations/zIndices.ts"() {
|
11925
12071
|
zIndices2 = {
|
11926
|
-
hide:
|
12072
|
+
hide: tokens11__namespace.default.depth["z-index"].hide,
|
11927
12073
|
auto: "auto",
|
11928
|
-
base:
|
11929
|
-
docked:
|
11930
|
-
dropdown:
|
11931
|
-
sticky:
|
11932
|
-
banner:
|
11933
|
-
overlay:
|
11934
|
-
modal:
|
11935
|
-
popover:
|
11936
|
-
skipLink:
|
11937
|
-
toast:
|
11938
|
-
tooltip:
|
12074
|
+
base: tokens11__namespace.default.depth["z-index"].base,
|
12075
|
+
docked: tokens11__namespace.default.depth["z-index"].docked,
|
12076
|
+
dropdown: tokens11__namespace.default.depth["z-index"].dropdown,
|
12077
|
+
sticky: tokens11__namespace.default.depth["z-index"].sticky,
|
12078
|
+
banner: tokens11__namespace.default.depth["z-index"].banner,
|
12079
|
+
overlay: tokens11__namespace.default.depth["z-index"].overlay,
|
12080
|
+
modal: tokens11__namespace.default.depth["z-index"].modal,
|
12081
|
+
popover: tokens11__namespace.default.depth["z-index"].popover,
|
12082
|
+
skipLink: tokens11__namespace.default.depth["z-index"].skipLink,
|
12083
|
+
toast: tokens11__namespace.default.depth["z-index"].toast,
|
12084
|
+
tooltip: tokens11__namespace.default.depth["z-index"].tooltip
|
11939
12085
|
};
|
11940
12086
|
}
|
11941
12087
|
});
|
@@ -14946,6 +15092,59 @@ var init_toast = __esm({
|
|
14946
15092
|
toast_default = config40;
|
14947
15093
|
}
|
14948
15094
|
});
|
15095
|
+
var config41, static_card_default, getColorSchemeBaseProps2;
|
15096
|
+
var init_static_card = __esm({
|
15097
|
+
"src/theme/components/static-card.ts"() {
|
15098
|
+
init_foundations();
|
15099
|
+
init_base_utils();
|
15100
|
+
config41 = react.defineStyleConfig({
|
15101
|
+
baseStyle: (props) => ({
|
15102
|
+
appearance: "none",
|
15103
|
+
border: "none",
|
15104
|
+
overflow: "hidden",
|
15105
|
+
fontSize: "inherit",
|
15106
|
+
display: "block",
|
15107
|
+
borderRadius: "md",
|
15108
|
+
// Except for white cards, all cards are light mode always
|
15109
|
+
color: "text.default.light",
|
15110
|
+
...getColorSchemeBaseProps2(props)
|
15111
|
+
})
|
15112
|
+
});
|
15113
|
+
static_card_default = config41;
|
15114
|
+
getColorSchemeBaseProps2 = (props) => {
|
15115
|
+
var _a6;
|
15116
|
+
switch (props.colorScheme) {
|
15117
|
+
case "white":
|
15118
|
+
return {
|
15119
|
+
...baseBorder("default", props),
|
15120
|
+
backgroundColor: themeTools.mode(
|
15121
|
+
"white",
|
15122
|
+
`color-mix(in srgb, white 10%, var(--spor-colors-bg-default-dark))`
|
15123
|
+
)(props),
|
15124
|
+
color: "inherit"
|
15125
|
+
};
|
15126
|
+
case "grey":
|
15127
|
+
return {
|
15128
|
+
backgroundColor: "lightGrey"
|
15129
|
+
};
|
15130
|
+
case "green": {
|
15131
|
+
return {
|
15132
|
+
backgroundColor: "seaMist"
|
15133
|
+
};
|
15134
|
+
}
|
15135
|
+
case "red": {
|
15136
|
+
return {
|
15137
|
+
backgroundColor: "pink"
|
15138
|
+
};
|
15139
|
+
}
|
15140
|
+
default:
|
15141
|
+
return {
|
15142
|
+
backgroundColor: ((_a6 = colors2[props.colorScheme]) == null ? void 0 : _a6[100]) ?? "platinum"
|
15143
|
+
};
|
15144
|
+
}
|
15145
|
+
};
|
15146
|
+
}
|
15147
|
+
});
|
14949
15148
|
|
14950
15149
|
// src/theme/components/index.ts
|
14951
15150
|
var components_exports = {};
|
@@ -14984,6 +15183,7 @@ __export(components_exports, {
|
|
14984
15183
|
Radio: () => radio_default,
|
14985
15184
|
Select: () => select_default,
|
14986
15185
|
Skeleton: () => skeleton_default,
|
15186
|
+
StaticCard: () => static_card_default,
|
14987
15187
|
Stepper: () => stepper_default,
|
14988
15188
|
Switch: () => switch_default,
|
14989
15189
|
Table: () => table_default,
|
@@ -15034,6 +15234,7 @@ var init_components = __esm({
|
|
15034
15234
|
init_tabs();
|
15035
15235
|
init_textarea();
|
15036
15236
|
init_toast();
|
15237
|
+
init_static_card();
|
15037
15238
|
init_travel_tag();
|
15038
15239
|
}
|
15039
15240
|
});
|
@@ -15042,7 +15243,7 @@ var init_font_faces = __esm({
|
|
15042
15243
|
"src/theme/font-faces.ts"() {
|
15043
15244
|
exports.fontFaces = `
|
15044
15245
|
@font-face {
|
15045
|
-
font-family: ${
|
15246
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["light"].name};
|
15046
15247
|
src: url("https://www.vy.no/styles/font/VySans-Light.woff2") format("woff2"),
|
15047
15248
|
url("https://www.vy.no/styles/font/VySans-Light.woff") format("woff");
|
15048
15249
|
font-style: normal;
|
@@ -15050,7 +15251,7 @@ var init_font_faces = __esm({
|
|
15050
15251
|
font-display: swap
|
15051
15252
|
}
|
15052
15253
|
@font-face {
|
15053
|
-
font-family: ${
|
15254
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["light-italic"].name};
|
15054
15255
|
src: url("https://www.vy.no/styles/font/VySans-LightItalic.woff2")
|
15055
15256
|
format("woff2"),
|
15056
15257
|
url("https://www.vy.no/styles/font/VySans-LightItalic.woff") format("woff");
|
@@ -15059,7 +15260,7 @@ var init_font_faces = __esm({
|
|
15059
15260
|
font-display: swap
|
15060
15261
|
}
|
15061
15262
|
@font-face {
|
15062
|
-
font-family: ${
|
15263
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["medium"].name};
|
15063
15264
|
src: url("https://www.vy.no/styles/font/VySans-Regular.woff2") format("woff2"),
|
15064
15265
|
url("https://www.vy.no/styles/font/VySans-Regular.woff") format("woff");
|
15065
15266
|
font-style: normal;
|
@@ -15067,7 +15268,7 @@ var init_font_faces = __esm({
|
|
15067
15268
|
font-display: swap
|
15068
15269
|
}
|
15069
15270
|
@font-face {
|
15070
|
-
font-family: ${
|
15271
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["medium-italic"].name};
|
15071
15272
|
src: url("https://www.vy.no/styles/font/VySans-RegularItalic.woff2")
|
15072
15273
|
format("woff2"),
|
15073
15274
|
url("https://www.vy.no/styles/font/VySans-RegularItalic.woff")
|
@@ -15077,7 +15278,7 @@ var init_font_faces = __esm({
|
|
15077
15278
|
font-display: swap
|
15078
15279
|
}
|
15079
15280
|
@font-face {
|
15080
|
-
font-family: ${
|
15281
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["bold"].name};
|
15081
15282
|
src: url("https://www.vy.no/styles/font/VySans-Bold.woff2") format("woff2"),
|
15082
15283
|
url("https://www.vy.no/styles/font/VySans-Bold.woff") format("woff");
|
15083
15284
|
font-style: normal;
|
@@ -15085,7 +15286,7 @@ var init_font_faces = __esm({
|
|
15085
15286
|
font-display: swap
|
15086
15287
|
}
|
15087
15288
|
@font-face {
|
15088
|
-
font-family: ${
|
15289
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["bold-italic"].name};
|
15089
15290
|
src: url("https://www.vy.no/styles/font/VySans-BoldItalic.woff2")
|
15090
15291
|
format("woff2"),
|
15091
15292
|
url("https://www.vy.no/styles/font/VySans-BoldItalic.woff") format("woff");
|
@@ -15094,7 +15295,7 @@ var init_font_faces = __esm({
|
|
15094
15295
|
font-display: swap
|
15095
15296
|
}
|
15096
15297
|
@font-face {
|
15097
|
-
font-family: ${
|
15298
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-display"].name};
|
15098
15299
|
src: url("https://www.vy.no/styles/font/VyDisplay-Medium.woff2")
|
15099
15300
|
format("woff2"),
|
15100
15301
|
url("https://www.vy.no/styles/font/VyDisplay-Medium.woff") format("woff");
|
@@ -15143,27 +15344,27 @@ var init_theme = __esm({
|
|
15143
15344
|
}
|
15144
15345
|
},
|
15145
15346
|
["CargoNet" /* CargoNet */]: {
|
15146
|
-
colors:
|
15347
|
+
colors: tokens11__namespace.default.color.cargonet
|
15147
15348
|
}
|
15148
15349
|
};
|
15149
15350
|
}
|
15150
15351
|
});
|
15151
|
-
var BaseToast, ToastIcon, getIcon3,
|
15352
|
+
var BaseToast, ToastIcon, getIcon3, texts26;
|
15152
15353
|
var init_BaseToast = __esm({
|
15153
15354
|
"src/toast/BaseToast.tsx"() {
|
15154
15355
|
init_src();
|
15155
15356
|
BaseToast = ({ children, variant, id }) => {
|
15156
15357
|
const styles3 = react.useStyleConfig("Toast", { variant });
|
15157
|
-
return /* @__PURE__ */
|
15358
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { sx: styles3, id }, /* @__PURE__ */ React70__namespace.default.createElement(ToastIcon, { variant }), children);
|
15158
15359
|
};
|
15159
15360
|
ToastIcon = ({ variant }) => {
|
15160
15361
|
const Icon = getIcon3(variant);
|
15161
15362
|
const { t: t2 } = useTranslation();
|
15162
|
-
return /* @__PURE__ */
|
15363
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
15163
15364
|
Icon,
|
15164
15365
|
{
|
15165
15366
|
flexShrink: 0,
|
15166
|
-
"aria-label": t2(
|
15367
|
+
"aria-label": t2(texts26[variant]),
|
15167
15368
|
marginRight: 1,
|
15168
15369
|
marginY: 1.5,
|
15169
15370
|
color: "darkGrey"
|
@@ -15180,7 +15381,7 @@ var init_BaseToast = __esm({
|
|
15180
15381
|
return sporIconReact.ErrorOutline24Icon;
|
15181
15382
|
}
|
15182
15383
|
};
|
15183
|
-
|
15384
|
+
texts26 = createTexts({
|
15184
15385
|
info: {
|
15185
15386
|
nb: "Informasjon",
|
15186
15387
|
nn: "Informasjon",
|
@@ -15214,11 +15415,11 @@ var init_ActionToast = __esm({
|
|
15214
15415
|
buttonText,
|
15215
15416
|
id
|
15216
15417
|
}) => {
|
15217
|
-
return /* @__PURE__ */
|
15418
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { marginRight: 2, flexGrow: "1" }, children), /* @__PURE__ */ React70__namespace.default.createElement(exports.Button, { variant: "tertiary", size: "sm", onClick }, buttonText));
|
15218
15419
|
};
|
15219
15420
|
}
|
15220
15421
|
});
|
15221
|
-
var ClosableToast,
|
15422
|
+
var ClosableToast, texts27;
|
15222
15423
|
var init_ClosableToast = __esm({
|
15223
15424
|
"src/toast/ClosableToast.tsx"() {
|
15224
15425
|
init_src();
|
@@ -15231,18 +15432,18 @@ var init_ClosableToast = __esm({
|
|
15231
15432
|
}) => {
|
15232
15433
|
const styles3 = react.useMultiStyleConfig("Toast", { variant });
|
15233
15434
|
const { t: t2 } = useTranslation();
|
15234
|
-
return /* @__PURE__ */
|
15435
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { flexGrow: "1" }, children), /* @__PURE__ */ React70__namespace.default.createElement(
|
15235
15436
|
exports.IconButton,
|
15236
15437
|
{
|
15237
15438
|
sx: styles3.dismissButton,
|
15238
15439
|
variant: "ghost",
|
15239
|
-
"aria-label": t2(
|
15240
|
-
icon: /* @__PURE__ */
|
15440
|
+
"aria-label": t2(texts27.dismiss),
|
15441
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
15241
15442
|
onClick: onClose
|
15242
15443
|
}
|
15243
15444
|
));
|
15244
15445
|
};
|
15245
|
-
|
15446
|
+
texts27 = createTexts({
|
15246
15447
|
dismiss: {
|
15247
15448
|
nb: "Lukk",
|
15248
15449
|
nn: "Lukk",
|
@@ -15260,7 +15461,7 @@ var init_useToast = __esm({
|
|
15260
15461
|
init_ClosableToast();
|
15261
15462
|
exports.useToast = () => {
|
15262
15463
|
const toast = react.useToast();
|
15263
|
-
const wrappedToast =
|
15464
|
+
const wrappedToast = React70.useCallback((opts) => {
|
15264
15465
|
const Toast = getToastComponent(opts);
|
15265
15466
|
toast({
|
15266
15467
|
...opts,
|
@@ -15271,7 +15472,7 @@ var init_useToast = __esm({
|
|
15271
15472
|
};
|
15272
15473
|
getToastComponent = (opts) => {
|
15273
15474
|
if ("isClosable" in opts && opts.isClosable) {
|
15274
|
-
return ({ onClose, id }) => /* @__PURE__ */
|
15475
|
+
return ({ onClose, id }) => /* @__PURE__ */ React70__namespace.default.createElement(
|
15275
15476
|
ClosableToast,
|
15276
15477
|
{
|
15277
15478
|
id,
|
@@ -15287,7 +15488,7 @@ var init_useToast = __esm({
|
|
15287
15488
|
);
|
15288
15489
|
}
|
15289
15490
|
if ("buttonText" in opts) {
|
15290
|
-
return ({ id }) => /* @__PURE__ */
|
15491
|
+
return ({ id }) => /* @__PURE__ */ React70__namespace.default.createElement(
|
15291
15492
|
ActionToast,
|
15292
15493
|
{
|
15293
15494
|
id,
|
@@ -15298,7 +15499,7 @@ var init_useToast = __esm({
|
|
15298
15499
|
opts.text
|
15299
15500
|
);
|
15300
15501
|
}
|
15301
|
-
return ({ id }) => /* @__PURE__ */
|
15502
|
+
return ({ id }) => /* @__PURE__ */ React70__namespace.default.createElement(BaseToast, { id, variant: opts.variant }, opts.text);
|
15302
15503
|
};
|
15303
15504
|
}
|
15304
15505
|
});
|
@@ -15323,7 +15524,7 @@ var init_Tooltip = __esm({
|
|
15323
15524
|
withCloseButton = false,
|
15324
15525
|
...props
|
15325
15526
|
}) => {
|
15326
|
-
return /* @__PURE__ */
|
15527
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
15327
15528
|
react.Popover,
|
15328
15529
|
{
|
15329
15530
|
onClose,
|
@@ -15335,8 +15536,8 @@ var init_Tooltip = __esm({
|
|
15335
15536
|
arrowShadowColor: "none",
|
15336
15537
|
...props
|
15337
15538
|
},
|
15338
|
-
/* @__PURE__ */
|
15339
|
-
/* @__PURE__ */
|
15539
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.PopoverTrigger, null, children),
|
15540
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.PopoverContent, null, /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverArrow, null), withCloseButton && /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverCloseButton, null), /* @__PURE__ */ React70__namespace.default.createElement(react.PopoverBody, null, content))
|
15340
15541
|
);
|
15341
15542
|
};
|
15342
15543
|
}
|
@@ -15409,8 +15610,8 @@ function useSizes({
|
|
15409
15610
|
getNodes,
|
15410
15611
|
observeMutation = true
|
15411
15612
|
}) {
|
15412
|
-
const [sizes26, setSizes] =
|
15413
|
-
const [count, setCount] =
|
15613
|
+
const [sizes26, setSizes] = React70.useState([]);
|
15614
|
+
const [count, setCount] = React70.useState(0);
|
15414
15615
|
useSafeLayoutEffect(() => {
|
15415
15616
|
const elements = getNodes();
|
15416
15617
|
const cleanups = elements.map(
|
@@ -15458,7 +15659,7 @@ var init_dist9 = __esm({
|
|
15458
15659
|
"../../node_modules/@chakra-ui/react-use-size/dist/index.mjs"() {
|
15459
15660
|
"use client";
|
15460
15661
|
init_dist8();
|
15461
|
-
useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ?
|
15662
|
+
useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ? React70.useLayoutEffect : React70.useEffect;
|
15462
15663
|
}
|
15463
15664
|
});
|
15464
15665
|
var init_externals = __esm({
|
@@ -15807,7 +16008,7 @@ Object.defineProperty(exports, 'Section', {
|
|
15807
16008
|
enumerable: true,
|
15808
16009
|
get: function () { return reactStately.Section; }
|
15809
16010
|
});
|
15810
|
-
exports.tokens =
|
16011
|
+
exports.tokens = tokens11__namespace;
|
15811
16012
|
exports.Combobox = Combobox;
|
15812
16013
|
exports.DateRangePicker = DateRangePicker;
|
15813
16014
|
exports.DrawerHeader = exports.ModalHeader;
|