@vygruppen/spor-react 9.2.1 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +24 -0
- package/dist/{CountryCodeSelect-FR7IFLQR.mjs → CountryCodeSelect-5QKP6VFT.mjs} +1 -1
- package/dist/{chunk-EVOFJL5T.mjs → chunk-JRXSGTL2.mjs} +611 -435
- package/dist/index.d.mts +143 -64
- package/dist/index.d.ts +143 -64
- package/dist/index.js +690 -491
- 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/CardSelect.tsx +15 -1
- 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/button.ts +1 -1
- package/src/theme/components/choice-chip.ts +0 -2
- package/src/theme/components/datepicker.ts +2 -1
- package/src/theme/components/index.ts +1 -0
- package/src/theme/components/input.ts +1 -1
- package/src/theme/components/numeric-stepper.ts +1 -1
- package/src/theme/components/select.ts +1 -3
- package/src/theme/components/static-card.ts +66 -0
- package/src/theme/components/switch.ts +2 -2
- package/src/theme/utils/base-utils.ts +1 -1
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
|
}
|
@@ -2253,10 +2263,11 @@ var init_CardSelect = __esm({
|
|
2253
2263
|
crossOffset = 0,
|
2254
2264
|
placement = "bottom",
|
2255
2265
|
withChevron = true,
|
2266
|
+
fontWeight = "normal",
|
2256
2267
|
...props
|
2257
2268
|
}, externalRef) => {
|
2258
2269
|
const label = "label" in props ? props.label : props["aria-label"];
|
2259
|
-
const internalRef =
|
2270
|
+
const internalRef = React70.useRef(null);
|
2260
2271
|
const triggerRef = externalRef ?? internalRef;
|
2261
2272
|
const state2 = reactStately.useOverlayTriggerState({
|
2262
2273
|
isOpen: externalIsOpen,
|
@@ -2275,24 +2286,25 @@ var init_CardSelect = __esm({
|
|
2275
2286
|
});
|
2276
2287
|
useForceRerender(state2.isOpen);
|
2277
2288
|
const ChevronIcon = size2 === "sm" ? sporIconReact.DropdownDownFill18Icon : sporIconReact.DropdownDownFill24Icon;
|
2278
|
-
return /* @__PURE__ */
|
2289
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React70__namespace.default.createElement(
|
2279
2290
|
react.chakra.button,
|
2280
2291
|
{
|
2281
2292
|
type: "button",
|
2282
2293
|
ref: triggerRef,
|
2294
|
+
fontWeight: "bold",
|
2283
2295
|
sx: styles3.trigger,
|
2284
2296
|
"aria-label": label,
|
2285
2297
|
...buttonProps,
|
2286
2298
|
width,
|
2287
2299
|
"data-attachable": true
|
2288
2300
|
},
|
2289
|
-
/* @__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(
|
2290
2302
|
ChevronIcon,
|
2291
2303
|
{
|
2292
2304
|
transform: state2.isOpen ? "rotate(180deg)" : "none"
|
2293
2305
|
}
|
2294
2306
|
) : null)
|
2295
|
-
), state2.isOpen && /* @__PURE__ */
|
2307
|
+
), state2.isOpen && /* @__PURE__ */ React70__namespace.default.createElement(
|
2296
2308
|
Popover3,
|
2297
2309
|
{
|
2298
2310
|
state: state2,
|
@@ -2301,7 +2313,7 @@ var init_CardSelect = __esm({
|
|
2301
2313
|
crossOffset,
|
2302
2314
|
placement
|
2303
2315
|
},
|
2304
|
-
/* @__PURE__ */
|
2316
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
2305
2317
|
exports.Card,
|
2306
2318
|
{
|
2307
2319
|
colorScheme: "white",
|
@@ -2309,7 +2321,7 @@ var init_CardSelect = __esm({
|
|
2309
2321
|
sx: styles3.card,
|
2310
2322
|
...overlayProps
|
2311
2323
|
},
|
2312
|
-
/* @__PURE__ */
|
2324
|
+
/* @__PURE__ */ React70__namespace.default.createElement(Dialog, { "aria-label": label }, children)
|
2313
2325
|
)
|
2314
2326
|
));
|
2315
2327
|
}
|
@@ -2320,7 +2332,7 @@ exports.Checkbox = void 0;
|
|
2320
2332
|
var init_Checkbox = __esm({
|
2321
2333
|
"src/input/Checkbox.tsx"() {
|
2322
2334
|
exports.Checkbox = react.forwardRef((props, ref) => {
|
2323
|
-
return /* @__PURE__ */
|
2335
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Checkbox, { ...props, ref });
|
2324
2336
|
});
|
2325
2337
|
}
|
2326
2338
|
});
|
@@ -2332,7 +2344,7 @@ var init_CheckboxGroup = __esm({
|
|
2332
2344
|
children,
|
2333
2345
|
...props
|
2334
2346
|
}) => {
|
2335
|
-
return /* @__PURE__ */
|
2347
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.CheckboxGroup, { ...props }, /* @__PURE__ */ React70__namespace.default.createElement(react.Stack, { direction: direction2 }, children));
|
2336
2348
|
};
|
2337
2349
|
}
|
2338
2350
|
});
|
@@ -3113,16 +3125,16 @@ var init_ChoiceChip = __esm({
|
|
3113
3125
|
icon,
|
3114
3126
|
hasLabel: Boolean(children)
|
3115
3127
|
});
|
3116
|
-
const id = `choice-chip-${
|
3117
|
-
return /* @__PURE__ */
|
3128
|
+
const id = `choice-chip-${React70.useId()}`;
|
3129
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
3118
3130
|
react.chakra.label,
|
3119
3131
|
{
|
3120
3132
|
htmlFor: id,
|
3121
3133
|
...getRootProps(),
|
3122
3134
|
"aria-label": String(children)
|
3123
3135
|
},
|
3124
|
-
/* @__PURE__ */
|
3125
|
-
/* @__PURE__ */
|
3136
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.chakra.input, { ...getInputProps({}, ref), id, disabled: isDisabled }),
|
3137
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3126
3138
|
react.chakra.div,
|
3127
3139
|
{
|
3128
3140
|
...getLabelProps(),
|
@@ -3133,9 +3145,9 @@ var init_ChoiceChip = __esm({
|
|
3133
3145
|
"data-active": dataAttr(state2.isActive),
|
3134
3146
|
"data-disabled": dataAttr(state2.isDisabled)
|
3135
3147
|
},
|
3136
|
-
icon && /* @__PURE__ */
|
3137
|
-
/* @__PURE__ */
|
3138
|
-
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 })
|
3139
3151
|
)
|
3140
3152
|
);
|
3141
3153
|
});
|
@@ -3168,10 +3180,10 @@ function Combobox({
|
|
3168
3180
|
...rest
|
3169
3181
|
}) {
|
3170
3182
|
const { contains: contains2 } = reactAria.useFilter({ sensitivity: "base" });
|
3171
|
-
const fallbackInputRef =
|
3183
|
+
const fallbackInputRef = React70.useRef(null);
|
3172
3184
|
const inputRef = externalInputRef ?? fallbackInputRef;
|
3173
|
-
const listBoxRef =
|
3174
|
-
const popoverRef =
|
3185
|
+
const listBoxRef = React70.useRef(null);
|
3186
|
+
const popoverRef = React70.useRef(null);
|
3175
3187
|
const inputWidth = useInputWidth(inputRef);
|
3176
3188
|
const state2 = reactStately.useComboBoxState({
|
3177
3189
|
allowsEmptyCollection: Boolean(emptyContent),
|
@@ -3180,6 +3192,23 @@ function Combobox({
|
|
3180
3192
|
label,
|
3181
3193
|
...rest
|
3182
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
|
+
};
|
3183
3212
|
const {
|
3184
3213
|
inputProps: { size: size2, ...inputProps },
|
3185
3214
|
listBoxProps
|
@@ -3192,31 +3221,17 @@ function Combobox({
|
|
3192
3221
|
},
|
3193
3222
|
state2
|
3194
3223
|
);
|
3195
|
-
return /* @__PURE__ */
|
3224
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(React70__namespace.default.Fragment, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
3196
3225
|
exports.Input,
|
3197
3226
|
{
|
3198
|
-
...
|
3227
|
+
...styleProps(comboBoxProps),
|
3199
3228
|
"aria-haspopup": "listbox",
|
3200
3229
|
ref: inputRef,
|
3201
3230
|
label,
|
3202
3231
|
borderBottomLeftRadius: state2.isOpen && !isLoading ? 0 : borderBottomLeftRadius,
|
3203
3232
|
borderBottomRightRadius: state2.isOpen && !isLoading ? 0 : borderBottomRightRadius,
|
3204
|
-
|
3205
|
-
|
3206
|
-
marginBottom,
|
3207
|
-
marginTop,
|
3208
|
-
marginRight,
|
3209
|
-
marginLeft,
|
3210
|
-
marginX,
|
3211
|
-
marginY,
|
3212
|
-
paddingBottom,
|
3213
|
-
paddingRight,
|
3214
|
-
paddingTop,
|
3215
|
-
paddingLeft,
|
3216
|
-
paddingX,
|
3217
|
-
paddingY,
|
3218
|
-
leftIcon,
|
3219
|
-
rightIcon: isLoading ? /* @__PURE__ */ React69__namespace.default.createElement(
|
3233
|
+
...inputProps,
|
3234
|
+
rightIcon: isLoading ? /* @__PURE__ */ React70__namespace.default.createElement(
|
3220
3235
|
exports.ColorSpinner,
|
3221
3236
|
{
|
3222
3237
|
width: "1.5rem",
|
@@ -3231,7 +3246,7 @@ function Combobox({
|
|
3231
3246
|
}
|
3232
3247
|
) : rightIcon
|
3233
3248
|
}
|
3234
|
-
), state2.isOpen && !isLoading && /* @__PURE__ */
|
3249
|
+
), state2.isOpen && !isLoading && /* @__PURE__ */ React70__namespace.default.createElement(
|
3235
3250
|
Popover3,
|
3236
3251
|
{
|
3237
3252
|
state: state2,
|
@@ -3243,7 +3258,7 @@ function Combobox({
|
|
3243
3258
|
hasBackdrop: false,
|
3244
3259
|
containerPadding: 0
|
3245
3260
|
},
|
3246
|
-
/* @__PURE__ */
|
3261
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3247
3262
|
ListBox,
|
3248
3263
|
{
|
3249
3264
|
...listBoxProps,
|
@@ -3256,14 +3271,19 @@ function Combobox({
|
|
3256
3271
|
)
|
3257
3272
|
));
|
3258
3273
|
}
|
3274
|
+
function styleProps(obj) {
|
3275
|
+
return Object.fromEntries(
|
3276
|
+
Object.entries(obj).filter(([, value]) => value !== void 0)
|
3277
|
+
);
|
3278
|
+
}
|
3259
3279
|
var useInputWidth, debounce;
|
3260
3280
|
var init_Combobox = __esm({
|
3261
3281
|
"src/input/Combobox.tsx"() {
|
3262
3282
|
init_src();
|
3263
3283
|
init_Popover();
|
3264
3284
|
useInputWidth = (inputRef) => {
|
3265
|
-
const [inputWidth, setInputWidth] =
|
3266
|
-
|
3285
|
+
const [inputWidth, setInputWidth] = React70.useState("auto");
|
3286
|
+
React70.useEffect(() => {
|
3267
3287
|
const onResize = debounce(() => {
|
3268
3288
|
if (inputRef.current) {
|
3269
3289
|
setInputWidth(`${inputRef.current.offsetWidth}px`);
|
@@ -3290,7 +3310,7 @@ exports.FormControl = void 0;
|
|
3290
3310
|
var init_FormControl = __esm({
|
3291
3311
|
"src/input/FormControl.tsx"() {
|
3292
3312
|
exports.FormControl = react.forwardRef((props, ref) => {
|
3293
|
-
return /* @__PURE__ */
|
3313
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.FormControl, { ...props, ref });
|
3294
3314
|
});
|
3295
3315
|
}
|
3296
3316
|
});
|
@@ -3311,7 +3331,7 @@ var init_FormErrorMessage = __esm({
|
|
3311
3331
|
return null;
|
3312
3332
|
}
|
3313
3333
|
const { ref, ...errorMessageProps } = formControlContext.getErrorMessageProps();
|
3314
|
-
return /* @__PURE__ */
|
3334
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { position: "relative", ref }, /* @__PURE__ */ React70__namespace.default.createElement(
|
3315
3335
|
react.Box,
|
3316
3336
|
{
|
3317
3337
|
borderRadius: "xs",
|
@@ -3329,12 +3349,12 @@ var init_FormErrorMessage = __esm({
|
|
3329
3349
|
...errorMessageProps,
|
3330
3350
|
...boxProps
|
3331
3351
|
},
|
3332
|
-
/* @__PURE__ */
|
3352
|
+
/* @__PURE__ */ React70__namespace.default.createElement(Arrow, { position: "absolute", top: "-0.25em", left: "1em" }),
|
3333
3353
|
children
|
3334
3354
|
));
|
3335
3355
|
};
|
3336
3356
|
Arrow = (props) => {
|
3337
|
-
return /* @__PURE__ */
|
3357
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
3338
3358
|
react.Box,
|
3339
3359
|
{
|
3340
3360
|
...props,
|
@@ -3345,7 +3365,7 @@ var init_FormErrorMessage = __esm({
|
|
3345
3365
|
fill: "none",
|
3346
3366
|
transform: "rotate(45deg)"
|
3347
3367
|
},
|
3348
|
-
/* @__PURE__ */
|
3368
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3349
3369
|
react.Box,
|
3350
3370
|
{
|
3351
3371
|
as: "path",
|
@@ -3361,7 +3381,7 @@ exports.FormLabel = void 0;
|
|
3361
3381
|
var init_FormLabel = __esm({
|
3362
3382
|
"src/input/FormLabel.tsx"() {
|
3363
3383
|
exports.FormLabel = react.forwardRef((props, ref) => {
|
3364
|
-
return /* @__PURE__ */
|
3384
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.FormLabel, { ...props, ref });
|
3365
3385
|
});
|
3366
3386
|
}
|
3367
3387
|
});
|
@@ -3374,7 +3394,7 @@ function ListBox({
|
|
3374
3394
|
}) {
|
3375
3395
|
const { listBoxProps } = reactAria.useListBox(props, state2, listBoxRef);
|
3376
3396
|
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
3377
|
-
return /* @__PURE__ */
|
3397
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
3378
3398
|
react.List,
|
3379
3399
|
{
|
3380
3400
|
...listBoxProps,
|
@@ -3385,22 +3405,22 @@ function ListBox({
|
|
3385
3405
|
},
|
3386
3406
|
state2.collection.size === 0 && props.emptyContent,
|
3387
3407
|
Array.from(state2.collection).map(
|
3388
|
-
(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 })
|
3389
3409
|
)
|
3390
3410
|
);
|
3391
3411
|
}
|
3392
3412
|
function ItemLabel({ children }) {
|
3393
3413
|
let { labelProps } = useOptionContext();
|
3394
3414
|
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
3395
|
-
return /* @__PURE__ */
|
3415
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...labelProps, sx: styles3.label }, children);
|
3396
3416
|
}
|
3397
3417
|
function ItemDescription({ children }) {
|
3398
3418
|
let { descriptionProps } = useOptionContext();
|
3399
3419
|
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
3400
|
-
return /* @__PURE__ */
|
3420
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...descriptionProps, sx: styles3.description }, children);
|
3401
3421
|
}
|
3402
3422
|
function Option({ item, state: state2 }) {
|
3403
|
-
const ref =
|
3423
|
+
const ref = React70.useRef(null);
|
3404
3424
|
const {
|
3405
3425
|
optionProps,
|
3406
3426
|
isSelected,
|
@@ -3420,7 +3440,7 @@ function Option({ item, state: state2 }) {
|
|
3420
3440
|
if (isFocused) {
|
3421
3441
|
dataFields["data-focus"] = true;
|
3422
3442
|
}
|
3423
|
-
|
3443
|
+
React70.useEffect(() => {
|
3424
3444
|
var _a6;
|
3425
3445
|
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
3426
3446
|
"touchend",
|
@@ -3430,7 +3450,7 @@ function Option({ item, state: state2 }) {
|
|
3430
3450
|
{ passive: false, once: true }
|
3431
3451
|
);
|
3432
3452
|
}, []);
|
3433
|
-
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));
|
3434
3454
|
}
|
3435
3455
|
function ListBoxSection({ section, state: state2 }) {
|
3436
3456
|
const { itemProps, headingProps, groupProps } = reactAria.useListBoxSection({
|
@@ -3439,7 +3459,7 @@ function ListBoxSection({ section, state: state2 }) {
|
|
3439
3459
|
});
|
3440
3460
|
const isFirstSection = section.key === state2.collection.getFirstKey();
|
3441
3461
|
const titleColor = react.useColorModeValue("darkGrey", "white");
|
3442
|
-
return /* @__PURE__ */
|
3462
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.ListItem, { ...itemProps }, section.rendered && /* @__PURE__ */ React70__namespace.default.createElement(
|
3443
3463
|
react.Box,
|
3444
3464
|
{
|
3445
3465
|
fontSize: "mobile.xs",
|
@@ -3452,19 +3472,19 @@ function ListBoxSection({ section, state: state2 }) {
|
|
3452
3472
|
...headingProps
|
3453
3473
|
},
|
3454
3474
|
section.rendered
|
3455
|
-
), /* @__PURE__ */
|
3456
|
-
(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 })
|
3457
3477
|
)));
|
3458
3478
|
}
|
3459
3479
|
var OptionContext, useOptionContext;
|
3460
3480
|
var init_ListBox = __esm({
|
3461
3481
|
"src/input/ListBox.tsx"() {
|
3462
|
-
OptionContext =
|
3482
|
+
OptionContext = React70__namespace.default.createContext({
|
3463
3483
|
labelProps: {},
|
3464
3484
|
descriptionProps: {}
|
3465
3485
|
});
|
3466
3486
|
useOptionContext = () => {
|
3467
|
-
return
|
3487
|
+
return React70.useContext(OptionContext);
|
3468
3488
|
};
|
3469
3489
|
}
|
3470
3490
|
});
|
@@ -3486,8 +3506,8 @@ function InfoSelect({
|
|
3486
3506
|
...props
|
3487
3507
|
};
|
3488
3508
|
const state2 = reactStately.useSelectState(renamedProps);
|
3489
|
-
const triggerRef =
|
3490
|
-
const listboxRef =
|
3509
|
+
const triggerRef = React70.useRef(null);
|
3510
|
+
const listboxRef = React70.useRef(null);
|
3491
3511
|
const { labelProps, triggerProps, valueProps, menuProps } = reactAria.useSelect(
|
3492
3512
|
renamedProps,
|
3493
3513
|
state2,
|
@@ -3503,7 +3523,7 @@ function InfoSelect({
|
|
3503
3523
|
const { buttonProps } = reactAria.useButton(triggerProps, triggerRef);
|
3504
3524
|
const { t: t2 } = useTranslation();
|
3505
3525
|
const formControl = react.useFormControlProps(props);
|
3506
|
-
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(
|
3507
3527
|
reactAria.HiddenSelect,
|
3508
3528
|
{
|
3509
3529
|
state: state2,
|
@@ -3511,7 +3531,7 @@ function InfoSelect({
|
|
3511
3531
|
label: props.label,
|
3512
3532
|
name: props.name
|
3513
3533
|
}
|
3514
|
-
), /* @__PURE__ */
|
3534
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
3515
3535
|
react.chakra.button,
|
3516
3536
|
{
|
3517
3537
|
type: "button",
|
@@ -3524,16 +3544,16 @@ function InfoSelect({
|
|
3524
3544
|
"aria-invalid": formControl.isInvalid,
|
3525
3545
|
"aria-describedby": formControl["aria-describedby"]
|
3526
3546
|
},
|
3527
|
-
/* @__PURE__ */
|
3528
|
-
/* @__PURE__ */
|
3529
|
-
), 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(
|
3530
3550
|
Popover3,
|
3531
3551
|
{
|
3532
3552
|
state: state2,
|
3533
3553
|
triggerRef,
|
3534
3554
|
containerPadding: 0
|
3535
3555
|
},
|
3536
|
-
/* @__PURE__ */
|
3556
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3537
3557
|
ListBox,
|
3538
3558
|
{
|
3539
3559
|
...menuProps,
|
@@ -3567,9 +3587,9 @@ var init_Input = __esm({
|
|
3567
3587
|
exports.Input = react.forwardRef(
|
3568
3588
|
({ label, leftIcon, rightIcon, id, size: size2, ...props }, ref) => {
|
3569
3589
|
const formControlProps = react.useFormControlContext();
|
3570
|
-
const fallbackId = `input-${
|
3590
|
+
const fallbackId = `input-${React70.useId()}`;
|
3571
3591
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
3572
|
-
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(
|
3573
3593
|
react.Input,
|
3574
3594
|
{
|
3575
3595
|
"data-attachable": true,
|
@@ -3580,7 +3600,7 @@ var init_Input = __esm({
|
|
3580
3600
|
ref,
|
3581
3601
|
placeholder: " "
|
3582
3602
|
}
|
3583
|
-
), /* @__PURE__ */
|
3603
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(react.FormLabel, { htmlFor: inputId }, label), rightIcon && /* @__PURE__ */ React70__namespace.default.createElement(react.InputRightElement, { pointerEvents: "none" }, rightIcon));
|
3584
3604
|
}
|
3585
3605
|
);
|
3586
3606
|
}
|
@@ -3589,10 +3609,10 @@ exports.InputLeftElement = void 0; exports.InputRightElement = void 0;
|
|
3589
3609
|
var init_InputElement = __esm({
|
3590
3610
|
"src/input/InputElement.tsx"() {
|
3591
3611
|
exports.InputLeftElement = react.forwardRef(
|
3592
|
-
(props, ref) => /* @__PURE__ */
|
3612
|
+
(props, ref) => /* @__PURE__ */ React70__namespace.default.createElement(react.InputLeftElement, { ...props, ref })
|
3593
3613
|
);
|
3594
3614
|
exports.InputRightElement = react.forwardRef(
|
3595
|
-
(props, ref) => /* @__PURE__ */
|
3615
|
+
(props, ref) => /* @__PURE__ */ React70__namespace.default.createElement(react.InputRightElement, { ...props, ref })
|
3596
3616
|
);
|
3597
3617
|
}
|
3598
3618
|
});
|
@@ -3603,7 +3623,7 @@ var init_NativeSelect = __esm({
|
|
3603
3623
|
exports.NativeSelect = react.forwardRef(
|
3604
3624
|
({ label, ...props }, ref) => {
|
3605
3625
|
const styles3 = react.useMultiStyleConfig("Select", props);
|
3606
|
-
return /* @__PURE__ */
|
3626
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(exports.FormControl, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
3607
3627
|
react.Select,
|
3608
3628
|
{
|
3609
3629
|
"data-attachable": true,
|
@@ -3611,7 +3631,7 @@ var init_NativeSelect = __esm({
|
|
3611
3631
|
rootProps: { __css: styles3.root },
|
3612
3632
|
ref
|
3613
3633
|
}
|
3614
|
-
), label && /* @__PURE__ */
|
3634
|
+
), label && /* @__PURE__ */ React70__namespace.default.createElement(exports.FormLabel, null, label));
|
3615
3635
|
}
|
3616
3636
|
);
|
3617
3637
|
}
|
@@ -3639,17 +3659,17 @@ function NumericStepper({
|
|
3639
3659
|
});
|
3640
3660
|
const formControlProps = react.useFormControl({ id: idProp, isDisabled });
|
3641
3661
|
const clampedStepSize = Math.max(Math.min(stepSize, 10), 1);
|
3642
|
-
return /* @__PURE__ */
|
3662
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { __css: styles3.container, ...boxProps }, /* @__PURE__ */ React70__namespace.default.createElement(
|
3643
3663
|
VerySmallButton,
|
3644
3664
|
{
|
3645
|
-
icon: /* @__PURE__ */
|
3665
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(SubtractIcon, { stepLabel: clampedStepSize }),
|
3646
3666
|
"aria-label": t2(texts12.decrementButtonAriaLabel(clampedStepSize)),
|
3647
3667
|
onClick: () => onChange(Math.max(value - clampedStepSize, minValue)),
|
3648
3668
|
visibility: value <= minValue ? "hidden" : "visible",
|
3649
3669
|
isDisabled: formControlProps.disabled,
|
3650
3670
|
id: value <= minValue ? void 0 : formControlProps.id
|
3651
3671
|
}
|
3652
|
-
), withInput ? /* @__PURE__ */
|
3672
|
+
), withInput ? /* @__PURE__ */ React70__namespace.default.createElement(
|
3653
3673
|
react.chakra.input,
|
3654
3674
|
{
|
3655
3675
|
type: "number",
|
@@ -3672,7 +3692,7 @@ function NumericStepper({
|
|
3672
3692
|
onChange(Math.max(Math.min(numericInput, maxValue), minValue));
|
3673
3693
|
}
|
3674
3694
|
}
|
3675
|
-
) : /* @__PURE__ */
|
3695
|
+
) : /* @__PURE__ */ React70__namespace.default.createElement(
|
3676
3696
|
react.chakra.text,
|
3677
3697
|
{
|
3678
3698
|
sx: styles3.text,
|
@@ -3680,10 +3700,10 @@ function NumericStepper({
|
|
3680
3700
|
"aria-label": value.toString()
|
3681
3701
|
},
|
3682
3702
|
value
|
3683
|
-
), /* @__PURE__ */
|
3703
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
3684
3704
|
VerySmallButton,
|
3685
3705
|
{
|
3686
|
-
icon: /* @__PURE__ */
|
3706
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(AddIcon, { stepLabel: clampedStepSize }),
|
3687
3707
|
"aria-label": t2(texts12.incrementButtonAriaLabel(clampedStepSize)),
|
3688
3708
|
onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
|
3689
3709
|
visibility: value >= maxValue ? "hidden" : "visible",
|
@@ -3698,9 +3718,9 @@ var init_NumericStepper = __esm({
|
|
3698
3718
|
init_src();
|
3699
3719
|
VerySmallButton = (props) => {
|
3700
3720
|
const styles3 = react.useMultiStyleConfig("NumericStepper", {});
|
3701
|
-
return /* @__PURE__ */
|
3721
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(exports.IconButton, { variant: "primary", size: "xs", sx: styles3.button, ...props });
|
3702
3722
|
};
|
3703
|
-
SubtractIcon = (props) => /* @__PURE__ */
|
3723
|
+
SubtractIcon = (props) => /* @__PURE__ */ React70__namespace.default.createElement(React70__namespace.default.Fragment, null, /* @__PURE__ */ React70__namespace.default.createElement(
|
3704
3724
|
react.Box,
|
3705
3725
|
{
|
3706
3726
|
as: "svg",
|
@@ -3710,7 +3730,7 @@ var init_NumericStepper = __esm({
|
|
3710
3730
|
stroke: "currentColor",
|
3711
3731
|
...props
|
3712
3732
|
},
|
3713
|
-
/* @__PURE__ */
|
3733
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3714
3734
|
"line",
|
3715
3735
|
{
|
3716
3736
|
x1: "9",
|
@@ -3721,8 +3741,8 @@ var init_NumericStepper = __esm({
|
|
3721
3741
|
strokeLinecap: "round"
|
3722
3742
|
}
|
3723
3743
|
)
|
3724
|
-
), props.stepLabel > 1 && /* @__PURE__ */
|
3725
|
-
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(
|
3726
3746
|
react.Box,
|
3727
3747
|
{
|
3728
3748
|
as: "svg",
|
@@ -3732,7 +3752,7 @@ var init_NumericStepper = __esm({
|
|
3732
3752
|
stroke: "currentColor",
|
3733
3753
|
...props
|
3734
3754
|
},
|
3735
|
-
/* @__PURE__ */
|
3755
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3736
3756
|
"line",
|
3737
3757
|
{
|
3738
3758
|
x1: "9",
|
@@ -3743,7 +3763,7 @@ var init_NumericStepper = __esm({
|
|
3743
3763
|
strokeLinecap: "round"
|
3744
3764
|
}
|
3745
3765
|
),
|
3746
|
-
/* @__PURE__ */
|
3766
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3747
3767
|
"line",
|
3748
3768
|
{
|
3749
3769
|
x1: "15",
|
@@ -3754,7 +3774,7 @@ var init_NumericStepper = __esm({
|
|
3754
3774
|
strokeLinecap: "round"
|
3755
3775
|
}
|
3756
3776
|
)
|
3757
|
-
), props.stepLabel > 1 && /* @__PURE__ */
|
3777
|
+
), props.stepLabel > 1 && /* @__PURE__ */ React70__namespace.default.createElement(react.chakra.span, { paddingRight: "1" }, props.stepLabel.toString()));
|
3758
3778
|
texts12 = createTexts({
|
3759
3779
|
decrementButtonAriaLabel(stepSize) {
|
3760
3780
|
return {
|
@@ -3785,9 +3805,9 @@ var init_PasswordInput = __esm({
|
|
3785
3805
|
const { isOpen: isShowingPassword, onToggle } = react.useDisclosure();
|
3786
3806
|
const { t: t2 } = useTranslation();
|
3787
3807
|
const formControlProps = react.useFormControlContext();
|
3788
|
-
const autoGeneratedId = `password-input-${
|
3808
|
+
const autoGeneratedId = `password-input-${React70.useId()}`;
|
3789
3809
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
3790
|
-
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(
|
3791
3811
|
react.Input,
|
3792
3812
|
{
|
3793
3813
|
...props,
|
@@ -3799,7 +3819,7 @@ var init_PasswordInput = __esm({
|
|
3799
3819
|
ref,
|
3800
3820
|
"data-attachable": true
|
3801
3821
|
}
|
3802
|
-
), /* @__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(
|
3803
3823
|
react.Button,
|
3804
3824
|
{
|
3805
3825
|
variant: "ghost",
|
@@ -3856,7 +3876,7 @@ var init_CountryCodeSelect = __esm({
|
|
3856
3876
|
callingCodes = [...prioritizedCountryCodes, ...sortedCallingCodes];
|
3857
3877
|
CountryCodeSelect = (props) => {
|
3858
3878
|
const { t: t2 } = useTranslation();
|
3859
|
-
return /* @__PURE__ */
|
3879
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
3860
3880
|
InfoSelect,
|
3861
3881
|
{
|
3862
3882
|
label: t2(texts14.countryCode),
|
@@ -3864,7 +3884,7 @@ var init_CountryCodeSelect = __esm({
|
|
3864
3884
|
items: callingCodes,
|
3865
3885
|
...props
|
3866
3886
|
},
|
3867
|
-
(item) => /* @__PURE__ */
|
3887
|
+
(item) => /* @__PURE__ */ React70__namespace.default.createElement(reactStately.Item, { key: item.key }, item.key)
|
3868
3888
|
);
|
3869
3889
|
};
|
3870
3890
|
CountryCodeSelect_default = CountryCodeSelect;
|
@@ -3901,10 +3921,10 @@ var init_PhoneNumberInput = __esm({
|
|
3901
3921
|
nationalNumber: ""
|
3902
3922
|
}
|
3903
3923
|
});
|
3904
|
-
return /* @__PURE__ */
|
3905
|
-
|
3924
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(exports.AttachedInputs, { ...boxProps }, /* @__PURE__ */ React70__namespace.default.createElement(
|
3925
|
+
React70.Suspense,
|
3906
3926
|
{
|
3907
|
-
fallback: /* @__PURE__ */
|
3927
|
+
fallback: /* @__PURE__ */ React70__namespace.default.createElement(
|
3908
3928
|
InfoSelect,
|
3909
3929
|
{
|
3910
3930
|
isLabelSrOnly: true,
|
@@ -3913,10 +3933,10 @@ var init_PhoneNumberInput = __esm({
|
|
3913
3933
|
height: "100%",
|
3914
3934
|
value: "+47"
|
3915
3935
|
},
|
3916
|
-
/* @__PURE__ */
|
3936
|
+
/* @__PURE__ */ React70__namespace.default.createElement(reactStately.Item, { key: "+47" }, "+47")
|
3917
3937
|
)
|
3918
3938
|
},
|
3919
|
-
/* @__PURE__ */
|
3939
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
3920
3940
|
LazyCountryCodeSelect,
|
3921
3941
|
{
|
3922
3942
|
value: value.countryCode,
|
@@ -3929,7 +3949,7 @@ var init_PhoneNumberInput = __esm({
|
|
3929
3949
|
width: "6.25rem"
|
3930
3950
|
}
|
3931
3951
|
)
|
3932
|
-
), /* @__PURE__ */
|
3952
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
3933
3953
|
exports.Input,
|
3934
3954
|
{
|
3935
3955
|
ref,
|
@@ -3958,14 +3978,14 @@ var init_PhoneNumberInput = __esm({
|
|
3958
3978
|
sv: "Telefonnummer"
|
3959
3979
|
}
|
3960
3980
|
});
|
3961
|
-
LazyCountryCodeSelect =
|
3981
|
+
LazyCountryCodeSelect = React70__namespace.default.lazy(() => Promise.resolve().then(() => (init_CountryCodeSelect(), CountryCodeSelect_exports)));
|
3962
3982
|
}
|
3963
3983
|
});
|
3964
3984
|
exports.Radio = void 0;
|
3965
3985
|
var init_Radio = __esm({
|
3966
3986
|
"src/input/Radio.tsx"() {
|
3967
3987
|
exports.Radio = react.forwardRef((props, ref) => {
|
3968
|
-
return /* @__PURE__ */
|
3988
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Radio, { ...props, ref });
|
3969
3989
|
});
|
3970
3990
|
}
|
3971
3991
|
});
|
@@ -3974,7 +3994,7 @@ var init_RadioGroup = __esm({
|
|
3974
3994
|
"src/input/RadioGroup.tsx"() {
|
3975
3995
|
exports.RadioGroup = react.forwardRef(
|
3976
3996
|
({ children, direction: direction2 = "row", ...rest }, ref) => {
|
3977
|
-
return /* @__PURE__ */
|
3997
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.RadioGroup, { ...rest, ref }, /* @__PURE__ */ React70__namespace.default.createElement(react.Stack, { direction: direction2 }, children));
|
3978
3998
|
}
|
3979
3999
|
);
|
3980
4000
|
}
|
@@ -3989,9 +4009,9 @@ var init_SearchInput = __esm({
|
|
3989
4009
|
const { t: t2 } = useTranslation();
|
3990
4010
|
const showClearButton = onReset && Boolean(props.value);
|
3991
4011
|
const formControlProps = react.useFormControlContext();
|
3992
|
-
const autoGeneratedId =
|
4012
|
+
const autoGeneratedId = React70.useId();
|
3993
4013
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
3994
|
-
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(
|
3995
4015
|
react.Input,
|
3996
4016
|
{
|
3997
4017
|
paddingLeft: 7,
|
@@ -4008,7 +4028,7 @@ var init_SearchInput = __esm({
|
|
4008
4028
|
placeholder: " ",
|
4009
4029
|
"data-attachable": true
|
4010
4030
|
}
|
4011
|
-
), /* @__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(
|
4012
4032
|
react.IconButton,
|
4013
4033
|
{
|
4014
4034
|
variant: "ghost",
|
@@ -4016,7 +4036,7 @@ var init_SearchInput = __esm({
|
|
4016
4036
|
size: "sm",
|
4017
4037
|
marginRight: 1,
|
4018
4038
|
"aria-label": t2(texts16.reset),
|
4019
|
-
icon: /* @__PURE__ */
|
4039
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseOutline24Icon, null),
|
4020
4040
|
onClick: onReset
|
4021
4041
|
}
|
4022
4042
|
)));
|
@@ -4043,7 +4063,7 @@ var init_Switch = __esm({
|
|
4043
4063
|
"src/input/Switch.tsx"() {
|
4044
4064
|
exports.Switch = react.forwardRef(
|
4045
4065
|
({ size: size2 = "md", ...props }, ref) => {
|
4046
|
-
return /* @__PURE__ */
|
4066
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Switch, { size: size2, ...props, ref });
|
4047
4067
|
}
|
4048
4068
|
);
|
4049
4069
|
}
|
@@ -4115,9 +4135,9 @@ var init_Textarea = __esm({
|
|
4115
4135
|
remainingProps: { label, ...rest }
|
4116
4136
|
} = getSpacingProps(props);
|
4117
4137
|
const formControlProps = react.useFormControlContext();
|
4118
|
-
const fallbackId = `textarea-${
|
4138
|
+
const fallbackId = `textarea-${React70.useId()}`;
|
4119
4139
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
4120
|
-
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));
|
4121
4141
|
});
|
4122
4142
|
}
|
4123
4143
|
});
|
@@ -4216,7 +4236,7 @@ var init_LineIcon = __esm({
|
|
4216
4236
|
if (!Icon) {
|
4217
4237
|
return null;
|
4218
4238
|
}
|
4219
|
-
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 }));
|
4220
4240
|
};
|
4221
4241
|
}
|
4222
4242
|
});
|
@@ -4236,7 +4256,7 @@ var init_InfoTag = __esm({
|
|
4236
4256
|
size: size2,
|
4237
4257
|
...customProps
|
4238
4258
|
});
|
4239
|
-
return /* @__PURE__ */
|
4259
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: styles3.container }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4240
4260
|
exports.LineIcon,
|
4241
4261
|
{
|
4242
4262
|
variant,
|
@@ -4244,7 +4264,7 @@ var init_InfoTag = __esm({
|
|
4244
4264
|
sx: styles3.iconContainer,
|
4245
4265
|
...customProps
|
4246
4266
|
}
|
4247
|
-
), /* @__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)));
|
4248
4268
|
};
|
4249
4269
|
}
|
4250
4270
|
});
|
@@ -4270,7 +4290,7 @@ var init_TravelTag = __esm({
|
|
4270
4290
|
backgroundColor: variant === "custom" ? rest.backgroundColor : void 0
|
4271
4291
|
});
|
4272
4292
|
const DeviationLevelIcon = getDeviationLevelIcon({ deviationLevel, size: size2 });
|
4273
|
-
return /* @__PURE__ */
|
4293
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: styles3.container, "aria-disabled": isDisabled, ref, ...rest }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4274
4294
|
exports.LineIcon,
|
4275
4295
|
{
|
4276
4296
|
variant,
|
@@ -4278,7 +4298,7 @@ var init_TravelTag = __esm({
|
|
4278
4298
|
sx: styles3.iconContainer,
|
4279
4299
|
...rest
|
4280
4300
|
}
|
4281
|
-
), /* @__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 }));
|
4282
4302
|
}
|
4283
4303
|
);
|
4284
4304
|
getDeviationLevelIcon = ({
|
@@ -4317,7 +4337,7 @@ var init_TextLink = __esm({
|
|
4317
4337
|
var _a6;
|
4318
4338
|
const { t: t2 } = useTranslation();
|
4319
4339
|
const isExternal = props.isExternal !== void 0 ? props.isExternal : Boolean((_a6 = props.href) == null ? void 0 : _a6.match(/^https?:\/\//));
|
4320
|
-
return /* @__PURE__ */
|
4340
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Link, { ...props, ref, isExternal }, children, isExternal && /* @__PURE__ */ React70__namespace.default.createElement(
|
4321
4341
|
sporIconReact.LinkOutOutline24Icon,
|
4322
4342
|
{
|
4323
4343
|
marginLeft: 0.5,
|
@@ -4353,8 +4373,8 @@ var init_VyLogo = __esm({
|
|
4353
4373
|
exports.VyLogo = ({ colorScheme, ...boxProps }) => {
|
4354
4374
|
const mainColor = colorScheme === "light" ? "#1d211c" : "#ffffff";
|
4355
4375
|
const accentColor = colorScheme === "light" ? "#138c6e" : "#ffffff";
|
4356
|
-
const id =
|
4357
|
-
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(
|
4358
4378
|
"path",
|
4359
4379
|
{
|
4360
4380
|
fillRule: "evenodd",
|
@@ -4362,7 +4382,7 @@ var init_VyLogo = __esm({
|
|
4362
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",
|
4363
4383
|
fill: mainColor
|
4364
4384
|
}
|
4365
|
-
), /* @__PURE__ */
|
4385
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4366
4386
|
"mask",
|
4367
4387
|
{
|
4368
4388
|
id: `${id}-a`,
|
@@ -4373,7 +4393,7 @@ var init_VyLogo = __esm({
|
|
4373
4393
|
width: "94",
|
4374
4394
|
height: "54"
|
4375
4395
|
},
|
4376
|
-
/* @__PURE__ */
|
4396
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
4377
4397
|
"path",
|
4378
4398
|
{
|
4379
4399
|
fillRule: "evenodd",
|
@@ -4382,7 +4402,7 @@ var init_VyLogo = __esm({
|
|
4382
4402
|
fill: mainColor
|
4383
4403
|
}
|
4384
4404
|
)
|
4385
|
-
), /* @__PURE__ */
|
4405
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4386
4406
|
"g",
|
4387
4407
|
{
|
4388
4408
|
mask: `url(#${id}-a)`,
|
@@ -4390,9 +4410,9 @@ var init_VyLogo = __esm({
|
|
4390
4410
|
clipRule: "evenodd",
|
4391
4411
|
fill: mainColor
|
4392
4412
|
},
|
4393
|
-
/* @__PURE__ */
|
4394
|
-
/* @__PURE__ */
|
4395
|
-
), /* @__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(
|
4396
4416
|
"path",
|
4397
4417
|
{
|
4398
4418
|
fillRule: "evenodd",
|
@@ -4400,7 +4420,7 @@ var init_VyLogo = __esm({
|
|
4400
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",
|
4401
4421
|
fill: accentColor
|
4402
4422
|
}
|
4403
|
-
), /* @__PURE__ */
|
4423
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4404
4424
|
"path",
|
4405
4425
|
{
|
4406
4426
|
fillRule: "evenodd",
|
@@ -4408,7 +4428,7 @@ var init_VyLogo = __esm({
|
|
4408
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",
|
4409
4429
|
fill: mainColor
|
4410
4430
|
}
|
4411
|
-
), /* @__PURE__ */
|
4431
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4412
4432
|
"mask",
|
4413
4433
|
{
|
4414
4434
|
id: `${id}-b`,
|
@@ -4419,7 +4439,7 @@ var init_VyLogo = __esm({
|
|
4419
4439
|
width: "78",
|
4420
4440
|
height: "54"
|
4421
4441
|
},
|
4422
|
-
/* @__PURE__ */
|
4442
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
4423
4443
|
"path",
|
4424
4444
|
{
|
4425
4445
|
fillRule: "evenodd",
|
@@ -4428,25 +4448,25 @@ var init_VyLogo = __esm({
|
|
4428
4448
|
fill: mainColor
|
4429
4449
|
}
|
4430
4450
|
)
|
4431
|
-
), /* @__PURE__ */
|
4451
|
+
), /* @__PURE__ */ React70__namespace.default.createElement("g", { mask: `url(#${id}-b)`, fillRule: "evenodd", clipRule: "evenodd" }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4432
4452
|
"path",
|
4433
4453
|
{
|
4434
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",
|
4435
4455
|
fill: mainColor
|
4436
4456
|
}
|
4437
|
-
), /* @__PURE__ */
|
4457
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4438
4458
|
"path",
|
4439
4459
|
{
|
4440
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",
|
4441
4461
|
fill: mainColor
|
4442
4462
|
}
|
4443
|
-
), /* @__PURE__ */
|
4463
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(
|
4444
4464
|
"path",
|
4445
4465
|
{
|
4446
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",
|
4447
4467
|
fill: accentColor
|
4448
4468
|
}
|
4449
|
-
)), /* @__PURE__ */
|
4469
|
+
)), /* @__PURE__ */ React70__namespace.default.createElement(
|
4450
4470
|
"path",
|
4451
4471
|
{
|
4452
4472
|
fillRule: "evenodd",
|
@@ -4468,7 +4488,7 @@ var init_logo = __esm({
|
|
4468
4488
|
var JumpForwardIcon, JumpBackwardIcon, PlayIcon, PauseIcon, SkipNextIcon, SkipPreviousIcon;
|
4469
4489
|
var init_icons2 = __esm({
|
4470
4490
|
"src/media-controller/icons.tsx"() {
|
4471
|
-
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(
|
4472
4492
|
"path",
|
4473
4493
|
{
|
4474
4494
|
fillRule: "evenodd",
|
@@ -4476,7 +4496,7 @@ var init_icons2 = __esm({
|
|
4476
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",
|
4477
4497
|
fill: "currentColor"
|
4478
4498
|
}
|
4479
|
-
), /* @__PURE__ */
|
4499
|
+
), /* @__PURE__ */ React70__namespace.createElement(
|
4480
4500
|
"path",
|
4481
4501
|
{
|
4482
4502
|
fillRule: "evenodd",
|
@@ -4485,7 +4505,7 @@ var init_icons2 = __esm({
|
|
4485
4505
|
fill: "currentColor"
|
4486
4506
|
}
|
4487
4507
|
));
|
4488
|
-
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(
|
4489
4509
|
"path",
|
4490
4510
|
{
|
4491
4511
|
fillRule: "evenodd",
|
@@ -4493,7 +4513,7 @@ var init_icons2 = __esm({
|
|
4493
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",
|
4494
4514
|
fill: "currentColor"
|
4495
4515
|
}
|
4496
|
-
), /* @__PURE__ */
|
4516
|
+
), /* @__PURE__ */ React70__namespace.createElement(
|
4497
4517
|
"path",
|
4498
4518
|
{
|
4499
4519
|
fillRule: "evenodd",
|
@@ -4502,7 +4522,7 @@ var init_icons2 = __esm({
|
|
4502
4522
|
fill: "currentColor"
|
4503
4523
|
}
|
4504
4524
|
));
|
4505
|
-
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(
|
4506
4526
|
"path",
|
4507
4527
|
{
|
4508
4528
|
fillRule: "evenodd",
|
@@ -4511,7 +4531,7 @@ var init_icons2 = __esm({
|
|
4511
4531
|
fill: "currentColor"
|
4512
4532
|
}
|
4513
4533
|
));
|
4514
|
-
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(
|
4515
4535
|
"path",
|
4516
4536
|
{
|
4517
4537
|
fillRule: "evenodd",
|
@@ -4520,7 +4540,7 @@ var init_icons2 = __esm({
|
|
4520
4540
|
fill: "currentColor"
|
4521
4541
|
}
|
4522
4542
|
));
|
4523
|
-
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(
|
4524
4544
|
"path",
|
4525
4545
|
{
|
4526
4546
|
fillRule: "evenodd",
|
@@ -4529,7 +4549,7 @@ var init_icons2 = __esm({
|
|
4529
4549
|
fill: "currentColor"
|
4530
4550
|
}
|
4531
4551
|
));
|
4532
|
-
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(
|
4533
4553
|
"path",
|
4534
4554
|
{
|
4535
4555
|
fillRule: "evenodd",
|
@@ -4556,7 +4576,7 @@ var init_JumpButton = __esm({
|
|
4556
4576
|
variant: "jumpSkip",
|
4557
4577
|
size: size2
|
4558
4578
|
});
|
4559
|
-
return /* @__PURE__ */
|
4579
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4560
4580
|
react.Center,
|
4561
4581
|
{
|
4562
4582
|
as: "button",
|
@@ -4565,7 +4585,7 @@ var init_JumpButton = __esm({
|
|
4565
4585
|
disabled: isDisabled,
|
4566
4586
|
...props
|
4567
4587
|
},
|
4568
|
-
direction2 === "forward" ? /* @__PURE__ */
|
4588
|
+
direction2 === "forward" ? /* @__PURE__ */ React70__namespace.default.createElement(JumpForwardIcon, { sx: styles3.icon }) : /* @__PURE__ */ React70__namespace.default.createElement(JumpBackwardIcon, { sx: styles3.icon })
|
4569
4589
|
);
|
4570
4590
|
};
|
4571
4591
|
texts18 = createTexts({
|
@@ -4600,7 +4620,7 @@ var init_PlayPauseButton = __esm({
|
|
4600
4620
|
variant: "play",
|
4601
4621
|
size: size2
|
4602
4622
|
});
|
4603
|
-
return /* @__PURE__ */
|
4623
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4604
4624
|
react.Center,
|
4605
4625
|
{
|
4606
4626
|
as: "button",
|
@@ -4609,7 +4629,7 @@ var init_PlayPauseButton = __esm({
|
|
4609
4629
|
disabled: isDisabled,
|
4610
4630
|
...props
|
4611
4631
|
},
|
4612
|
-
isPlaying ? /* @__PURE__ */
|
4632
|
+
isPlaying ? /* @__PURE__ */ React70__namespace.default.createElement(PauseIcon, { sx: styles3.icon }) : /* @__PURE__ */ React70__namespace.default.createElement(PlayIcon, { sx: styles3.icon })
|
4613
4633
|
);
|
4614
4634
|
};
|
4615
4635
|
texts19 = createTexts({
|
@@ -4644,7 +4664,7 @@ var init_SkipButton = __esm({
|
|
4644
4664
|
variant: "jumpSkip",
|
4645
4665
|
size: size2
|
4646
4666
|
});
|
4647
|
-
return /* @__PURE__ */
|
4667
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4648
4668
|
react.Center,
|
4649
4669
|
{
|
4650
4670
|
as: "button",
|
@@ -4653,7 +4673,7 @@ var init_SkipButton = __esm({
|
|
4653
4673
|
disabled: isDisabled,
|
4654
4674
|
...props
|
4655
4675
|
},
|
4656
|
-
direction2 === "forward" ? /* @__PURE__ */
|
4676
|
+
direction2 === "forward" ? /* @__PURE__ */ React70__namespace.default.createElement(SkipNextIcon, { sx: styles3.icon }) : /* @__PURE__ */ React70__namespace.default.createElement(SkipPreviousIcon, { sx: styles3.icon })
|
4657
4677
|
);
|
4658
4678
|
};
|
4659
4679
|
texts20 = createTexts({
|
@@ -4690,7 +4710,7 @@ var init_ModalHeader = __esm({
|
|
4690
4710
|
fontSize: size2 === "lg" ? ["mobile.lg", "desktop.lg"] : ["mobile.md", "desktop.md"],
|
4691
4711
|
textAlign: size2 === "lg" ? "center" : "left"
|
4692
4712
|
};
|
4693
|
-
return /* @__PURE__ */
|
4713
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.ModalHeader, { ...props, ref, ...styles3 });
|
4694
4714
|
}
|
4695
4715
|
);
|
4696
4716
|
}
|
@@ -4700,7 +4720,7 @@ var init_Drawer = __esm({
|
|
4700
4720
|
"src/modal/Drawer.tsx"() {
|
4701
4721
|
init_ModalHeader();
|
4702
4722
|
exports.Drawer = (props) => {
|
4703
|
-
return /* @__PURE__ */
|
4723
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(DrawerProvider, { placement: props.placement }, /* @__PURE__ */ React70__namespace.default.createElement(react.Drawer, { ...props }));
|
4704
4724
|
};
|
4705
4725
|
exports.DrawerContent = react.forwardRef(
|
4706
4726
|
({ children, ...props }, ref) => {
|
@@ -4717,7 +4737,7 @@ var init_Drawer = __esm({
|
|
4717
4737
|
});
|
4718
4738
|
const isTopOrBottom = placement === "top" || placement === "bottom";
|
4719
4739
|
const widthConstraits = isTopOrBottom ? { width: ["100%", "37.5rem"], mx: "auto" } : {};
|
4720
|
-
return /* @__PURE__ */
|
4740
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { ...handlers }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4721
4741
|
react.DrawerContent,
|
4722
4742
|
{
|
4723
4743
|
...widthConstraits,
|
@@ -4726,13 +4746,13 @@ var init_Drawer = __esm({
|
|
4726
4746
|
...props,
|
4727
4747
|
ref
|
4728
4748
|
},
|
4729
|
-
/* @__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)))
|
4730
4750
|
));
|
4731
4751
|
}
|
4732
4752
|
);
|
4733
4753
|
Notch = react.forwardRef((props, ref) => {
|
4734
4754
|
const placement = useDrawerContext();
|
4735
|
-
return /* @__PURE__ */
|
4755
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4736
4756
|
react.Box,
|
4737
4757
|
{
|
4738
4758
|
position: "absolute",
|
@@ -4744,14 +4764,14 @@ var init_Drawer = __esm({
|
|
4744
4764
|
...props,
|
4745
4765
|
ref
|
4746
4766
|
},
|
4747
|
-
/* @__PURE__ */
|
4767
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
4748
4768
|
react.Center,
|
4749
4769
|
{
|
4750
4770
|
background: placement === "bottom" ? "bottom" : "top",
|
4751
4771
|
padding: 2,
|
4752
4772
|
borderRadius: "md"
|
4753
4773
|
},
|
4754
|
-
/* @__PURE__ */
|
4774
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
4755
4775
|
react.Box,
|
4756
4776
|
{
|
4757
4777
|
width: "2.265rem",
|
@@ -4763,13 +4783,140 @@ var init_Drawer = __esm({
|
|
4763
4783
|
)
|
4764
4784
|
);
|
4765
4785
|
});
|
4766
|
-
DrawerContext =
|
4767
|
-
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);
|
4768
4788
|
useDrawerContext = () => {
|
4769
|
-
return
|
4789
|
+
return React70__namespace.default.useContext(DrawerContext);
|
4770
4790
|
};
|
4771
4791
|
}
|
4772
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
|
+
);
|
4909
|
+
};
|
4910
|
+
texts21 = createTexts({
|
4911
|
+
close: {
|
4912
|
+
nb: "Lukk",
|
4913
|
+
nn: "Lukk",
|
4914
|
+
en: "Close",
|
4915
|
+
sv: "St\xE4ng"
|
4916
|
+
}
|
4917
|
+
});
|
4918
|
+
}
|
4919
|
+
});
|
4773
4920
|
var init_Modal = __esm({
|
4774
4921
|
"src/modal/Modal.tsx"() {
|
4775
4922
|
}
|
@@ -4784,7 +4931,7 @@ var init_SimpleDrawer = __esm({
|
|
4784
4931
|
title,
|
4785
4932
|
...props
|
4786
4933
|
}) => {
|
4787
|
-
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)));
|
4788
4935
|
};
|
4789
4936
|
}
|
4790
4937
|
});
|
@@ -4793,12 +4940,13 @@ var init_SimpleDrawer = __esm({
|
|
4793
4940
|
var init_modal = __esm({
|
4794
4941
|
"src/modal/index.tsx"() {
|
4795
4942
|
init_Drawer();
|
4943
|
+
init_FullScreenDrawer();
|
4796
4944
|
init_Modal();
|
4797
4945
|
init_ModalHeader();
|
4798
4946
|
init_SimpleDrawer();
|
4799
4947
|
}
|
4800
4948
|
});
|
4801
|
-
var EXPIRATION_DELAY; exports.Nudge = void 0; var
|
4949
|
+
var EXPIRATION_DELAY; exports.Nudge = void 0; var texts22;
|
4802
4950
|
var init_Nudge = __esm({
|
4803
4951
|
"src/nudge/Nudge.tsx"() {
|
4804
4952
|
init_src();
|
@@ -4822,7 +4970,7 @@ var init_Nudge = __esm({
|
|
4822
4970
|
}
|
4823
4971
|
return null;
|
4824
4972
|
}
|
4825
|
-
return /* @__PURE__ */
|
4973
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4826
4974
|
react.Popover,
|
4827
4975
|
{
|
4828
4976
|
arrowSize: 12,
|
@@ -4830,11 +4978,11 @@ var init_Nudge = __esm({
|
|
4830
4978
|
defaultIsOpen: true,
|
4831
4979
|
...props
|
4832
4980
|
},
|
4833
|
-
/* @__PURE__ */
|
4834
|
-
/* @__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)))))))
|
4835
4983
|
);
|
4836
4984
|
};
|
4837
|
-
|
4985
|
+
texts22 = createTexts({
|
4838
4986
|
close: {
|
4839
4987
|
nb: "Lukk",
|
4840
4988
|
nn: "Lukk",
|
@@ -4850,7 +4998,7 @@ var init_Nudge = __esm({
|
|
4850
4998
|
});
|
4851
4999
|
}
|
4852
5000
|
});
|
4853
|
-
exports.WizardNudge = void 0; var NextOrCloseButton,
|
5001
|
+
exports.WizardNudge = void 0; var NextOrCloseButton, texts23;
|
4854
5002
|
var init_WizardNudge = __esm({
|
4855
5003
|
"src/nudge/WizardNudge.tsx"() {
|
4856
5004
|
init_src();
|
@@ -4861,23 +5009,23 @@ var init_WizardNudge = __esm({
|
|
4861
5009
|
content,
|
4862
5010
|
...props
|
4863
5011
|
}) => {
|
4864
|
-
const [currentStep, setCurrentStep] =
|
5012
|
+
const [currentStep, setCurrentStep] = React70.useState(1);
|
4865
5013
|
const totalSteps = content.length;
|
4866
5014
|
const isLastStep = totalSteps === currentStep;
|
4867
5015
|
const onNext = () => setCurrentStep((prev) => prev + 1);
|
4868
|
-
return /* @__PURE__ */
|
5016
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4869
5017
|
exports.Nudge,
|
4870
5018
|
{
|
4871
5019
|
onClose,
|
4872
5020
|
name,
|
4873
5021
|
content: content[currentStep - 1],
|
4874
|
-
actions: /* @__PURE__ */
|
5022
|
+
actions: /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { gap: 3, alignItems: "center" }, /* @__PURE__ */ React70__namespace.default.createElement(
|
4875
5023
|
exports.ProgressIndicator,
|
4876
5024
|
{
|
4877
5025
|
activeStep: currentStep,
|
4878
5026
|
numberOfSteps: totalSteps
|
4879
5027
|
}
|
4880
|
-
), /* @__PURE__ */
|
5028
|
+
), /* @__PURE__ */ React70__namespace.default.createElement(react.Box, null, /* @__PURE__ */ React70__namespace.default.createElement(NextOrCloseButton, { isLastStep, onNext }))),
|
4881
5029
|
...props
|
4882
5030
|
},
|
4883
5031
|
children
|
@@ -4886,19 +5034,19 @@ var init_WizardNudge = __esm({
|
|
4886
5034
|
NextOrCloseButton = ({ isLastStep, onNext }) => {
|
4887
5035
|
const { onClose } = react.usePopoverContext();
|
4888
5036
|
const { t: t2 } = useTranslation();
|
4889
|
-
return /* @__PURE__ */
|
5037
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4890
5038
|
exports.Button,
|
4891
5039
|
{
|
4892
5040
|
variant: "tertiary",
|
4893
5041
|
size: "xs",
|
4894
|
-
leftIcon: isLastStep ? void 0 : /* @__PURE__ */
|
5042
|
+
leftIcon: isLastStep ? void 0 : /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.ArrowRightFill18Icon, null),
|
4895
5043
|
onClick: isLastStep ? onClose : onNext,
|
4896
5044
|
width: "fit-content"
|
4897
5045
|
},
|
4898
|
-
t2(isLastStep ?
|
5046
|
+
t2(isLastStep ? texts23.finish : texts23.nextStep)
|
4899
5047
|
);
|
4900
5048
|
};
|
4901
|
-
|
5049
|
+
texts23 = createTexts({
|
4902
5050
|
nextStep: {
|
4903
5051
|
nb: "Neste",
|
4904
5052
|
nn: "Neste",
|
@@ -4928,7 +5076,7 @@ var init_ProgressDot = __esm({
|
|
4928
5076
|
init_src();
|
4929
5077
|
ProgressDot = ({ isActive }) => {
|
4930
5078
|
const style = react.useMultiStyleConfig("ProgressIndicator");
|
4931
|
-
return /* @__PURE__ */
|
5079
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4932
5080
|
react.Box,
|
4933
5081
|
{
|
4934
5082
|
as: "svg",
|
@@ -4938,12 +5086,12 @@ var init_ProgressDot = __esm({
|
|
4938
5086
|
viewBox: "0 0 100 100",
|
4939
5087
|
"aria-current": isActive ? "step" : void 0
|
4940
5088
|
},
|
4941
|
-
/* @__PURE__ */
|
5089
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { as: "circle", cx: "50", cy: "50", r: "50" })
|
4942
5090
|
);
|
4943
5091
|
};
|
4944
5092
|
}
|
4945
5093
|
});
|
4946
|
-
exports.ProgressIndicator = void 0; var
|
5094
|
+
exports.ProgressIndicator = void 0; var texts24;
|
4947
5095
|
var init_ProgressIndicator = __esm({
|
4948
5096
|
"src/progress-indicator/ProgressIndicator.tsx"() {
|
4949
5097
|
init_src();
|
@@ -4954,7 +5102,7 @@ var init_ProgressIndicator = __esm({
|
|
4954
5102
|
}) => {
|
4955
5103
|
const { t: t2 } = useTranslation();
|
4956
5104
|
const style = react.useMultiStyleConfig("ProgressIndicator");
|
4957
|
-
return /* @__PURE__ */
|
5105
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
4958
5106
|
react.Box,
|
4959
5107
|
{
|
4960
5108
|
__css: style.root,
|
@@ -4962,9 +5110,9 @@ var init_ProgressIndicator = __esm({
|
|
4962
5110
|
"aria-valuemin": 1,
|
4963
5111
|
"aria-valuemax": numberOfSteps,
|
4964
5112
|
"aria-valuenow": activeStep,
|
4965
|
-
"aria-valuetext": t2(
|
5113
|
+
"aria-valuetext": t2(texts24.stepsOf(activeStep, numberOfSteps))
|
4966
5114
|
},
|
4967
|
-
/* @__PURE__ */
|
5115
|
+
/* @__PURE__ */ React70__namespace.default.createElement(react.Box, { __css: style.container }, Array.from({ length: numberOfSteps }, (_, i) => /* @__PURE__ */ React70__namespace.default.createElement(
|
4968
5116
|
ProgressDot,
|
4969
5117
|
{
|
4970
5118
|
key: i,
|
@@ -4974,7 +5122,7 @@ var init_ProgressIndicator = __esm({
|
|
4974
5122
|
)))
|
4975
5123
|
);
|
4976
5124
|
};
|
4977
|
-
|
5125
|
+
texts24 = createTexts({
|
4978
5126
|
stepsOf: (activeStep, numberOfSteps) => ({
|
4979
5127
|
nb: `Steg ${activeStep} av ${numberOfSteps}`,
|
4980
5128
|
nn: `Steg ${activeStep} av ${numberOfSteps}`,
|
@@ -5005,7 +5153,7 @@ var init_SporProvider = __esm({
|
|
5005
5153
|
}) => {
|
5006
5154
|
const brandCustomizations = exports.brandTheme[brand] ?? {};
|
5007
5155
|
const extendedTheme = deepmerge__default.default(theme3, brandCustomizations);
|
5008
|
-
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));
|
5009
5157
|
};
|
5010
5158
|
}
|
5011
5159
|
});
|
@@ -5019,7 +5167,7 @@ var init_provider = __esm({
|
|
5019
5167
|
var StepperContext, StepperProvider, useStepper;
|
5020
5168
|
var init_StepperContext = __esm({
|
5021
5169
|
"src/stepper/StepperContext.tsx"() {
|
5022
|
-
StepperContext =
|
5170
|
+
StepperContext = React70__namespace.default.createContext(null);
|
5023
5171
|
StepperProvider = ({
|
5024
5172
|
activeStep,
|
5025
5173
|
children,
|
@@ -5027,7 +5175,7 @@ var init_StepperContext = __esm({
|
|
5027
5175
|
numberOfSteps,
|
5028
5176
|
variant
|
5029
5177
|
}) => {
|
5030
|
-
return /* @__PURE__ */
|
5178
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
5031
5179
|
StepperContext.Provider,
|
5032
5180
|
{
|
5033
5181
|
value: { activeStep, onClick, numberOfSteps, variant }
|
@@ -5036,7 +5184,7 @@ var init_StepperContext = __esm({
|
|
5036
5184
|
);
|
5037
5185
|
};
|
5038
5186
|
useStepper = () => {
|
5039
|
-
const context =
|
5187
|
+
const context = React70__namespace.default.useContext(StepperContext);
|
5040
5188
|
if (!context) {
|
5041
5189
|
throw new Error(
|
5042
5190
|
"useStepper must be used within a StepperProvider. Most likely, you forgot to wrap your StepperStep in a Stepper component"
|
@@ -5046,7 +5194,7 @@ var init_StepperContext = __esm({
|
|
5046
5194
|
};
|
5047
5195
|
}
|
5048
5196
|
});
|
5049
|
-
exports.Stepper = void 0; var
|
5197
|
+
exports.Stepper = void 0; var texts25;
|
5050
5198
|
var init_Stepper = __esm({
|
5051
5199
|
"src/stepper/Stepper.tsx"() {
|
5052
5200
|
init_stepper();
|
@@ -5070,7 +5218,7 @@ var init_Stepper = __esm({
|
|
5070
5218
|
const { t: t2 } = useTranslation();
|
5071
5219
|
const hideBackButtonOnFirstStep = activeStep === 1 && !onBackButtonClick;
|
5072
5220
|
const shownHeading = heading || title;
|
5073
|
-
return /* @__PURE__ */
|
5221
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: style.root }, /* @__PURE__ */ React70__namespace.default.createElement(
|
5074
5222
|
StepperProvider,
|
5075
5223
|
{
|
5076
5224
|
onClick,
|
@@ -5078,7 +5226,7 @@ var init_Stepper = __esm({
|
|
5078
5226
|
variant,
|
5079
5227
|
numberOfSteps
|
5080
5228
|
},
|
5081
|
-
/* @__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(
|
5082
5230
|
react.Flex,
|
5083
5231
|
{
|
5084
5232
|
justifyContent: "space-between",
|
@@ -5086,11 +5234,11 @@ var init_Stepper = __esm({
|
|
5086
5234
|
gap: 2,
|
5087
5235
|
flex: 1
|
5088
5236
|
},
|
5089
|
-
/* @__PURE__ */
|
5237
|
+
/* @__PURE__ */ React70__namespace.default.createElement(
|
5090
5238
|
exports.IconButton,
|
5091
5239
|
{
|
5092
|
-
"aria-label": t2(
|
5093
|
-
icon: /* @__PURE__ */
|
5240
|
+
"aria-label": t2(texts25.back),
|
5241
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.ArrowLeftFill24Icon, null),
|
5094
5242
|
variant: "ghost",
|
5095
5243
|
size: "sm",
|
5096
5244
|
visibility: hideBackButtonOnFirstStep ? "hidden" : "visible",
|
@@ -5103,9 +5251,9 @@ var init_Stepper = __esm({
|
|
5103
5251
|
}
|
5104
5252
|
}
|
5105
5253
|
),
|
5106
|
-
shownHeading && /* @__PURE__ */
|
5107
|
-
/* @__PURE__ */
|
5108
|
-
)), /* @__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(
|
5109
5257
|
exports.StepperStep,
|
5110
5258
|
{
|
5111
5259
|
key: index,
|
@@ -5118,7 +5266,7 @@ var init_Stepper = __esm({
|
|
5118
5266
|
))))
|
5119
5267
|
));
|
5120
5268
|
};
|
5121
|
-
|
5269
|
+
texts25 = createTexts({
|
5122
5270
|
stepsOf: (activeStep, numberOfSteps) => ({
|
5123
5271
|
nb: `Steg ${activeStep}/${numberOfSteps}`,
|
5124
5272
|
nn: `Steg ${activeStep}/${numberOfSteps}`,
|
@@ -5157,14 +5305,14 @@ var init_StepperStep = __esm({
|
|
5157
5305
|
);
|
5158
5306
|
const iconColor = react.useColorModeValue("blackAlpha.200", "whiteAlpha.200");
|
5159
5307
|
const isDisabled = state2 !== "active" && isDisabledOverride || state2 === "disabled";
|
5160
|
-
return /* @__PURE__ */
|
5308
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Box, { sx: style.stepContainer }, stepNumber > 1 && /* @__PURE__ */ React70__namespace.default.createElement(
|
5161
5309
|
sporIconReact.DropdownRightFill18Icon,
|
5162
5310
|
{
|
5163
5311
|
marginX: 5,
|
5164
5312
|
display: ["none", null, "block"],
|
5165
5313
|
color: iconColor
|
5166
5314
|
}
|
5167
|
-
), isDisabled ? /* @__PURE__ */
|
5315
|
+
), isDisabled ? /* @__PURE__ */ React70__namespace.default.createElement(
|
5168
5316
|
exports.Text,
|
5169
5317
|
{
|
5170
5318
|
variant: "xs",
|
@@ -5174,7 +5322,7 @@ var init_StepperStep = __esm({
|
|
5174
5322
|
paddingX: 2
|
5175
5323
|
},
|
5176
5324
|
children
|
5177
|
-
) : /* @__PURE__ */
|
5325
|
+
) : /* @__PURE__ */ React70__namespace.default.createElement(
|
5178
5326
|
exports.Button,
|
5179
5327
|
{
|
5180
5328
|
size: "xs",
|
@@ -5210,7 +5358,7 @@ exports.Tabs = void 0;
|
|
5210
5358
|
var init_Tabs = __esm({
|
5211
5359
|
"src/tab/Tabs.tsx"() {
|
5212
5360
|
exports.Tabs = react.forwardRef((props, ref) => {
|
5213
|
-
return /* @__PURE__ */
|
5361
|
+
return /* @__PURE__ */ React70__namespace.createElement(react.Tabs, { ...props, ref });
|
5214
5362
|
});
|
5215
5363
|
}
|
5216
5364
|
});
|
@@ -5232,7 +5380,7 @@ var init_Table = __esm({
|
|
5232
5380
|
"src/table/Table.tsx"() {
|
5233
5381
|
exports.Table = react.forwardRef((props, ref) => {
|
5234
5382
|
const { variant, size: size2, colorScheme, children, ...rest } = props;
|
5235
|
-
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(
|
5236
5384
|
react.Table,
|
5237
5385
|
{
|
5238
5386
|
variant,
|
@@ -5976,16 +6124,16 @@ function defineCssVars(scope, keys2) {
|
|
5976
6124
|
function defineStyle(styles3) {
|
5977
6125
|
return styles3;
|
5978
6126
|
}
|
5979
|
-
function defineStyleConfig(
|
5980
|
-
return
|
6127
|
+
function defineStyleConfig(config42) {
|
6128
|
+
return config42;
|
5981
6129
|
}
|
5982
6130
|
function createMultiStyleConfigHelpers(parts18) {
|
5983
6131
|
return {
|
5984
|
-
definePartsStyle(
|
5985
|
-
return
|
6132
|
+
definePartsStyle(config42) {
|
6133
|
+
return config42;
|
5986
6134
|
},
|
5987
|
-
defineMultiStyleConfig(
|
5988
|
-
return { parts: parts18, ...
|
6135
|
+
defineMultiStyleConfig(config42) {
|
6136
|
+
return { parts: parts18, ...config42 };
|
5989
6137
|
}
|
5990
6138
|
};
|
5991
6139
|
}
|
@@ -10858,7 +11006,7 @@ function baseBackground(state2, props) {
|
|
10858
11006
|
return surface("disabled", props);
|
10859
11007
|
case "hover":
|
10860
11008
|
default:
|
10861
|
-
return
|
11009
|
+
return { backgroundColor: "transparent" };
|
10862
11010
|
}
|
10863
11011
|
}
|
10864
11012
|
function baseBorder(state2, props) {
|
@@ -11585,7 +11733,6 @@ var init_button2 = __esm({
|
|
11585
11733
|
},
|
11586
11734
|
_active: {
|
11587
11735
|
...baseBorder("default", props),
|
11588
|
-
// We want a
|
11589
11736
|
...baseBackground("active", props)
|
11590
11737
|
}
|
11591
11738
|
}),
|
@@ -11657,12 +11804,12 @@ var init_borders = __esm({
|
|
11657
11804
|
"src/theme/foundations/borders.ts"() {
|
11658
11805
|
borders2 = {
|
11659
11806
|
none: "0",
|
11660
|
-
sm: `${
|
11661
|
-
"sm-dashed": `${
|
11662
|
-
md: `${
|
11663
|
-
"md-dashed": `${
|
11664
|
-
lg: `${
|
11665
|
-
"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`
|
11666
11813
|
};
|
11667
11814
|
}
|
11668
11815
|
});
|
@@ -11671,11 +11818,11 @@ var init_breakpoints = __esm({
|
|
11671
11818
|
"src/theme/foundations/breakpoints.ts"() {
|
11672
11819
|
breakpoints2 = {
|
11673
11820
|
base: "0px",
|
11674
|
-
sm:
|
11675
|
-
md:
|
11676
|
-
lg:
|
11677
|
-
xl:
|
11678
|
-
"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
|
11679
11826
|
};
|
11680
11827
|
}
|
11681
11828
|
});
|
@@ -11683,10 +11830,10 @@ var colors2;
|
|
11683
11830
|
var init_colors = __esm({
|
11684
11831
|
"src/theme/foundations/colors.ts"() {
|
11685
11832
|
colors2 = {
|
11686
|
-
...
|
11687
|
-
...
|
11688
|
-
...
|
11689
|
-
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
|
11690
11837
|
};
|
11691
11838
|
}
|
11692
11839
|
});
|
@@ -11706,9 +11853,9 @@ var fonts;
|
|
11706
11853
|
var init_fonts = __esm({
|
11707
11854
|
"src/theme/foundations/fonts.ts"() {
|
11708
11855
|
fonts = {
|
11709
|
-
body: `${
|
11710
|
-
heading: `${
|
11711
|
-
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`
|
11712
11859
|
};
|
11713
11860
|
}
|
11714
11861
|
});
|
@@ -11716,29 +11863,29 @@ var fontSizes;
|
|
11716
11863
|
var init_fontSizes = __esm({
|
11717
11864
|
"src/theme/foundations/fontSizes.ts"() {
|
11718
11865
|
fontSizes = {
|
11719
|
-
"2xs":
|
11720
|
-
xs:
|
11721
|
-
sm:
|
11722
|
-
md:
|
11723
|
-
lg:
|
11724
|
-
xl:
|
11725
|
-
"2xl":
|
11726
|
-
"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,
|
11727
11874
|
mobile: {
|
11728
|
-
xs:
|
11729
|
-
sm:
|
11730
|
-
md:
|
11731
|
-
lg:
|
11732
|
-
xl:
|
11733
|
-
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
|
11734
11881
|
},
|
11735
11882
|
desktop: {
|
11736
|
-
xs:
|
11737
|
-
sm:
|
11738
|
-
md:
|
11739
|
-
lg:
|
11740
|
-
xl:
|
11741
|
-
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
|
11742
11889
|
}
|
11743
11890
|
};
|
11744
11891
|
}
|
@@ -11759,8 +11906,8 @@ var lineHeights;
|
|
11759
11906
|
var init_lineHeights = __esm({
|
11760
11907
|
"src/theme/foundations/lineHeights.ts"() {
|
11761
11908
|
lineHeights = {
|
11762
|
-
base:
|
11763
|
-
normal:
|
11909
|
+
base: tokens11__namespace.default.font.style.lg["line-height"],
|
11910
|
+
normal: tokens11__namespace.default.font.style.lg["line-height"]
|
11764
11911
|
};
|
11765
11912
|
}
|
11766
11913
|
});
|
@@ -11768,13 +11915,13 @@ var radii2;
|
|
11768
11915
|
var init_radii = __esm({
|
11769
11916
|
"src/theme/foundations/radii.ts"() {
|
11770
11917
|
radii2 = {
|
11771
|
-
none:
|
11772
|
-
xs:
|
11773
|
-
sm:
|
11774
|
-
md:
|
11775
|
-
lg:
|
11776
|
-
xl:
|
11777
|
-
"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"],
|
11778
11925
|
round: "50%"
|
11779
11926
|
};
|
11780
11927
|
}
|
@@ -11784,18 +11931,18 @@ var init_shadows = __esm({
|
|
11784
11931
|
"src/theme/foundations/shadows.ts"() {
|
11785
11932
|
shadows2 = {
|
11786
11933
|
none: "none",
|
11787
|
-
sm:
|
11788
|
-
md:
|
11789
|
-
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
|
11790
11937
|
};
|
11791
11938
|
}
|
11792
11939
|
});
|
11793
11940
|
var spacing2, space2;
|
11794
11941
|
var init_spacing = __esm({
|
11795
11942
|
"src/theme/foundations/spacing.ts"() {
|
11796
|
-
spacing2 = Object.entries(
|
11797
|
-
(
|
11798
|
-
...
|
11943
|
+
spacing2 = Object.entries(tokens11__namespace.default.size.spacing).reduce(
|
11944
|
+
(tokens16, [key, token]) => ({
|
11945
|
+
...tokens16,
|
11799
11946
|
[Number(key)]: token
|
11800
11947
|
}),
|
11801
11948
|
{}
|
@@ -11847,73 +11994,73 @@ var init_textStyles = __esm({
|
|
11847
11994
|
textStyles = {
|
11848
11995
|
"2xl": {
|
11849
11996
|
fontSize: [
|
11850
|
-
|
11997
|
+
tokens11__namespace.default.font.style.xxl["font-size"].mobile,
|
11851
11998
|
null,
|
11852
11999
|
null,
|
11853
|
-
|
12000
|
+
tokens11__namespace.default.font.style.xxl["font-size"].desktop
|
11854
12001
|
],
|
11855
|
-
fontFamily:
|
11856
|
-
lineHeight:
|
12002
|
+
fontFamily: tokens11__namespace.default.font.style.xxl["font-family"],
|
12003
|
+
lineHeight: tokens11__namespace.default.font.style.xxl["line-height"]
|
11857
12004
|
},
|
11858
12005
|
"xl-display": {
|
11859
12006
|
fontSize: [
|
11860
|
-
|
12007
|
+
tokens11__namespace.default.font.style["xl-display"]["font-size"].mobile,
|
11861
12008
|
null,
|
11862
12009
|
null,
|
11863
|
-
|
12010
|
+
tokens11__namespace.default.font.style["xl-display"]["font-size"].desktop
|
11864
12011
|
],
|
11865
|
-
fontFamily:
|
11866
|
-
lineHeight:
|
12012
|
+
fontFamily: tokens11__namespace.default.font.style["xl-display"]["font-family"],
|
12013
|
+
lineHeight: tokens11__namespace.default.font.style["xl-display"]["line-height"]
|
11867
12014
|
},
|
11868
12015
|
"xl-sans": {
|
11869
12016
|
fontSize: [
|
11870
|
-
|
12017
|
+
tokens11__namespace.default.font.style["xl-sans"]["font-size"].mobile,
|
11871
12018
|
null,
|
11872
12019
|
null,
|
11873
|
-
|
12020
|
+
tokens11__namespace.default.font.style["xl-sans"]["font-size"].desktop
|
11874
12021
|
],
|
11875
|
-
fontFamily:
|
11876
|
-
lineHeight:
|
12022
|
+
fontFamily: tokens11__namespace.default.font.style["xl-sans"]["font-family"],
|
12023
|
+
lineHeight: tokens11__namespace.default.font.style["xl-sans"]["line-height"]
|
11877
12024
|
},
|
11878
12025
|
lg: {
|
11879
12026
|
fontSize: [
|
11880
|
-
|
12027
|
+
tokens11__namespace.default.font.style.lg["font-size"].mobile,
|
11881
12028
|
null,
|
11882
12029
|
null,
|
11883
|
-
|
12030
|
+
tokens11__namespace.default.font.style.lg["font-size"].desktop
|
11884
12031
|
],
|
11885
|
-
fontFamily:
|
11886
|
-
lineHeight:
|
12032
|
+
fontFamily: tokens11__namespace.default.font.style.lg["font-family"],
|
12033
|
+
lineHeight: tokens11__namespace.default.font.style.lg["line-height"]
|
11887
12034
|
},
|
11888
12035
|
md: {
|
11889
12036
|
fontSize: [
|
11890
|
-
|
12037
|
+
tokens11__namespace.default.font.style.md["font-size"].mobile,
|
11891
12038
|
null,
|
11892
12039
|
null,
|
11893
|
-
|
12040
|
+
tokens11__namespace.default.font.style.md["font-size"].desktop
|
11894
12041
|
],
|
11895
|
-
fontFamily:
|
11896
|
-
lineHeight:
|
12042
|
+
fontFamily: tokens11__namespace.default.font.style.md["font-family"],
|
12043
|
+
lineHeight: tokens11__namespace.default.font.style.md["line-height"]
|
11897
12044
|
},
|
11898
12045
|
sm: {
|
11899
12046
|
fontSize: [
|
11900
|
-
|
12047
|
+
tokens11__namespace.default.font.style.sm["font-size"].mobile,
|
11901
12048
|
null,
|
11902
12049
|
null,
|
11903
|
-
|
12050
|
+
tokens11__namespace.default.font.style.sm["font-size"].desktop
|
11904
12051
|
],
|
11905
|
-
fontFamily:
|
11906
|
-
lineHeight:
|
12052
|
+
fontFamily: tokens11__namespace.default.font.style.sm["font-family"],
|
12053
|
+
lineHeight: tokens11__namespace.default.font.style.sm["line-height"]
|
11907
12054
|
},
|
11908
12055
|
xs: {
|
11909
12056
|
fontSize: [
|
11910
|
-
|
12057
|
+
tokens11__namespace.default.font.style.xs["font-size"].mobile,
|
11911
12058
|
null,
|
11912
12059
|
null,
|
11913
|
-
|
12060
|
+
tokens11__namespace.default.font.style.xs["font-size"].desktop
|
11914
12061
|
],
|
11915
|
-
fontFamily:
|
11916
|
-
lineHeight:
|
12062
|
+
fontFamily: tokens11__namespace.default.font.style.xs["font-family"],
|
12063
|
+
lineHeight: tokens11__namespace.default.font.style.xs["line-height"]
|
11917
12064
|
}
|
11918
12065
|
};
|
11919
12066
|
}
|
@@ -11922,19 +12069,19 @@ var zIndices2;
|
|
11922
12069
|
var init_zIndices = __esm({
|
11923
12070
|
"src/theme/foundations/zIndices.ts"() {
|
11924
12071
|
zIndices2 = {
|
11925
|
-
hide:
|
12072
|
+
hide: tokens11__namespace.default.depth["z-index"].hide,
|
11926
12073
|
auto: "auto",
|
11927
|
-
base:
|
11928
|
-
docked:
|
11929
|
-
dropdown:
|
11930
|
-
sticky:
|
11931
|
-
banner:
|
11932
|
-
overlay:
|
11933
|
-
modal:
|
11934
|
-
popover:
|
11935
|
-
skipLink:
|
11936
|
-
toast:
|
11937
|
-
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
|
11938
12085
|
};
|
11939
12086
|
}
|
11940
12087
|
});
|
@@ -12410,13 +12557,11 @@ var init_choice_chip = __esm({
|
|
12410
12557
|
variants: {
|
12411
12558
|
base: (props) => ({
|
12412
12559
|
container: {
|
12413
|
-
...baseBackground("default", props),
|
12414
12560
|
...baseBorder("default", props),
|
12415
12561
|
...baseText("default", props),
|
12416
12562
|
_hover: {
|
12417
12563
|
...baseText("default", props),
|
12418
|
-
...baseBorder("hover", props)
|
12419
|
-
...baseBackground("hover", props)
|
12564
|
+
...baseBorder("hover", props)
|
12420
12565
|
},
|
12421
12566
|
_active: {
|
12422
12567
|
...baseBackground("active", props),
|
@@ -12732,6 +12877,7 @@ var init_datepicker2 = __esm({
|
|
12732
12877
|
}),
|
12733
12878
|
floating: (props) => ({
|
12734
12879
|
wrapper: {
|
12880
|
+
...floatingBackground("default", props),
|
12735
12881
|
...floatingBorder("default", props),
|
12736
12882
|
boxShadow: "sm",
|
12737
12883
|
_hover: {
|
@@ -13489,7 +13635,6 @@ var init_input2 = __esm({
|
|
13489
13635
|
width: "100%",
|
13490
13636
|
outline: "none",
|
13491
13637
|
border: 0,
|
13492
|
-
...baseBackground("default", props),
|
13493
13638
|
borderRadius: "sm",
|
13494
13639
|
transitionProperty: "common",
|
13495
13640
|
transitionDuration: "fast",
|
@@ -13497,6 +13642,7 @@ var init_input2 = __esm({
|
|
13497
13642
|
paddingX: 3,
|
13498
13643
|
height: "54px",
|
13499
13644
|
fontSize: "mobile.md",
|
13645
|
+
...baseBackground("default", props),
|
13500
13646
|
...baseBorder("default", props),
|
13501
13647
|
_hover: {
|
13502
13648
|
...baseBorder("hover", props)
|
@@ -14046,8 +14192,8 @@ var init_numeric_stepper = __esm({
|
|
14046
14192
|
textAlign: "center",
|
14047
14193
|
transitionProperty: "common",
|
14048
14194
|
transitionDuration: "fast",
|
14049
|
-
...baseBackground("default", props),
|
14050
14195
|
...baseText("default", props),
|
14196
|
+
...baseBackground("default", props),
|
14051
14197
|
_disabled: {
|
14052
14198
|
pointerEvents: "none",
|
14053
14199
|
opacity: 0.5
|
@@ -14329,9 +14475,7 @@ var init_select = __esm({
|
|
14329
14475
|
...input_default.baseStyle(props).field,
|
14330
14476
|
appearance: "none",
|
14331
14477
|
paddingTop: "16px",
|
14332
|
-
"option, optgroup": {
|
14333
|
-
background: "white"
|
14334
|
-
}
|
14478
|
+
"option, optgroup": {}
|
14335
14479
|
},
|
14336
14480
|
icon: {
|
14337
14481
|
width: "30px",
|
@@ -14517,17 +14661,17 @@ var init_switch = __esm({
|
|
14517
14661
|
height: [$height3.reference],
|
14518
14662
|
transitionProperty: "common",
|
14519
14663
|
transitionDuration: "fast",
|
14520
|
-
...baseBackground("default", props),
|
14521
14664
|
...baseBorder("default", props),
|
14522
14665
|
...focusVisibleStyles(props),
|
14666
|
+
...baseBackground("default", props),
|
14523
14667
|
_hover: {
|
14524
|
-
...baseBackground("hover", props),
|
14525
14668
|
...baseBorder("hover", props)
|
14526
14669
|
},
|
14527
14670
|
_checked: {
|
14528
14671
|
...brandBackground("default", props),
|
14529
14672
|
outlineColor: "transparent",
|
14530
14673
|
_hover: {
|
14674
|
+
...baseBackground("default", props),
|
14531
14675
|
...brandBackground("hover", props)
|
14532
14676
|
}
|
14533
14677
|
},
|
@@ -14948,6 +15092,59 @@ var init_toast = __esm({
|
|
14948
15092
|
toast_default = config40;
|
14949
15093
|
}
|
14950
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
|
+
});
|
14951
15148
|
|
14952
15149
|
// src/theme/components/index.ts
|
14953
15150
|
var components_exports = {};
|
@@ -14986,6 +15183,7 @@ __export(components_exports, {
|
|
14986
15183
|
Radio: () => radio_default,
|
14987
15184
|
Select: () => select_default,
|
14988
15185
|
Skeleton: () => skeleton_default,
|
15186
|
+
StaticCard: () => static_card_default,
|
14989
15187
|
Stepper: () => stepper_default,
|
14990
15188
|
Switch: () => switch_default,
|
14991
15189
|
Table: () => table_default,
|
@@ -15036,6 +15234,7 @@ var init_components = __esm({
|
|
15036
15234
|
init_tabs();
|
15037
15235
|
init_textarea();
|
15038
15236
|
init_toast();
|
15237
|
+
init_static_card();
|
15039
15238
|
init_travel_tag();
|
15040
15239
|
}
|
15041
15240
|
});
|
@@ -15044,7 +15243,7 @@ var init_font_faces = __esm({
|
|
15044
15243
|
"src/theme/font-faces.ts"() {
|
15045
15244
|
exports.fontFaces = `
|
15046
15245
|
@font-face {
|
15047
|
-
font-family: ${
|
15246
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["light"].name};
|
15048
15247
|
src: url("https://www.vy.no/styles/font/VySans-Light.woff2") format("woff2"),
|
15049
15248
|
url("https://www.vy.no/styles/font/VySans-Light.woff") format("woff");
|
15050
15249
|
font-style: normal;
|
@@ -15052,7 +15251,7 @@ var init_font_faces = __esm({
|
|
15052
15251
|
font-display: swap
|
15053
15252
|
}
|
15054
15253
|
@font-face {
|
15055
|
-
font-family: ${
|
15254
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["light-italic"].name};
|
15056
15255
|
src: url("https://www.vy.no/styles/font/VySans-LightItalic.woff2")
|
15057
15256
|
format("woff2"),
|
15058
15257
|
url("https://www.vy.no/styles/font/VySans-LightItalic.woff") format("woff");
|
@@ -15061,7 +15260,7 @@ var init_font_faces = __esm({
|
|
15061
15260
|
font-display: swap
|
15062
15261
|
}
|
15063
15262
|
@font-face {
|
15064
|
-
font-family: ${
|
15263
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["medium"].name};
|
15065
15264
|
src: url("https://www.vy.no/styles/font/VySans-Regular.woff2") format("woff2"),
|
15066
15265
|
url("https://www.vy.no/styles/font/VySans-Regular.woff") format("woff");
|
15067
15266
|
font-style: normal;
|
@@ -15069,7 +15268,7 @@ var init_font_faces = __esm({
|
|
15069
15268
|
font-display: swap
|
15070
15269
|
}
|
15071
15270
|
@font-face {
|
15072
|
-
font-family: ${
|
15271
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["medium-italic"].name};
|
15073
15272
|
src: url("https://www.vy.no/styles/font/VySans-RegularItalic.woff2")
|
15074
15273
|
format("woff2"),
|
15075
15274
|
url("https://www.vy.no/styles/font/VySans-RegularItalic.woff")
|
@@ -15079,7 +15278,7 @@ var init_font_faces = __esm({
|
|
15079
15278
|
font-display: swap
|
15080
15279
|
}
|
15081
15280
|
@font-face {
|
15082
|
-
font-family: ${
|
15281
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["bold"].name};
|
15083
15282
|
src: url("https://www.vy.no/styles/font/VySans-Bold.woff2") format("woff2"),
|
15084
15283
|
url("https://www.vy.no/styles/font/VySans-Bold.woff") format("woff");
|
15085
15284
|
font-style: normal;
|
@@ -15087,7 +15286,7 @@ var init_font_faces = __esm({
|
|
15087
15286
|
font-display: swap
|
15088
15287
|
}
|
15089
15288
|
@font-face {
|
15090
|
-
font-family: ${
|
15289
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-sans"]["bold-italic"].name};
|
15091
15290
|
src: url("https://www.vy.no/styles/font/VySans-BoldItalic.woff2")
|
15092
15291
|
format("woff2"),
|
15093
15292
|
url("https://www.vy.no/styles/font/VySans-BoldItalic.woff") format("woff");
|
@@ -15096,7 +15295,7 @@ var init_font_faces = __esm({
|
|
15096
15295
|
font-display: swap
|
15097
15296
|
}
|
15098
15297
|
@font-face {
|
15099
|
-
font-family: ${
|
15298
|
+
font-family: ${tokens11__namespace.default.asset.font["vy-display"].name};
|
15100
15299
|
src: url("https://www.vy.no/styles/font/VyDisplay-Medium.woff2")
|
15101
15300
|
format("woff2"),
|
15102
15301
|
url("https://www.vy.no/styles/font/VyDisplay-Medium.woff") format("woff");
|
@@ -15145,27 +15344,27 @@ var init_theme = __esm({
|
|
15145
15344
|
}
|
15146
15345
|
},
|
15147
15346
|
["CargoNet" /* CargoNet */]: {
|
15148
|
-
colors:
|
15347
|
+
colors: tokens11__namespace.default.color.cargonet
|
15149
15348
|
}
|
15150
15349
|
};
|
15151
15350
|
}
|
15152
15351
|
});
|
15153
|
-
var BaseToast, ToastIcon, getIcon3,
|
15352
|
+
var BaseToast, ToastIcon, getIcon3, texts26;
|
15154
15353
|
var init_BaseToast = __esm({
|
15155
15354
|
"src/toast/BaseToast.tsx"() {
|
15156
15355
|
init_src();
|
15157
15356
|
BaseToast = ({ children, variant, id }) => {
|
15158
15357
|
const styles3 = react.useStyleConfig("Toast", { variant });
|
15159
|
-
return /* @__PURE__ */
|
15358
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(react.Flex, { sx: styles3, id }, /* @__PURE__ */ React70__namespace.default.createElement(ToastIcon, { variant }), children);
|
15160
15359
|
};
|
15161
15360
|
ToastIcon = ({ variant }) => {
|
15162
15361
|
const Icon = getIcon3(variant);
|
15163
15362
|
const { t: t2 } = useTranslation();
|
15164
|
-
return /* @__PURE__ */
|
15363
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
15165
15364
|
Icon,
|
15166
15365
|
{
|
15167
15366
|
flexShrink: 0,
|
15168
|
-
"aria-label": t2(
|
15367
|
+
"aria-label": t2(texts26[variant]),
|
15169
15368
|
marginRight: 1,
|
15170
15369
|
marginY: 1.5,
|
15171
15370
|
color: "darkGrey"
|
@@ -15182,7 +15381,7 @@ var init_BaseToast = __esm({
|
|
15182
15381
|
return sporIconReact.ErrorOutline24Icon;
|
15183
15382
|
}
|
15184
15383
|
};
|
15185
|
-
|
15384
|
+
texts26 = createTexts({
|
15186
15385
|
info: {
|
15187
15386
|
nb: "Informasjon",
|
15188
15387
|
nn: "Informasjon",
|
@@ -15216,11 +15415,11 @@ var init_ActionToast = __esm({
|
|
15216
15415
|
buttonText,
|
15217
15416
|
id
|
15218
15417
|
}) => {
|
15219
|
-
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));
|
15220
15419
|
};
|
15221
15420
|
}
|
15222
15421
|
});
|
15223
|
-
var ClosableToast,
|
15422
|
+
var ClosableToast, texts27;
|
15224
15423
|
var init_ClosableToast = __esm({
|
15225
15424
|
"src/toast/ClosableToast.tsx"() {
|
15226
15425
|
init_src();
|
@@ -15233,18 +15432,18 @@ var init_ClosableToast = __esm({
|
|
15233
15432
|
}) => {
|
15234
15433
|
const styles3 = react.useMultiStyleConfig("Toast", { variant });
|
15235
15434
|
const { t: t2 } = useTranslation();
|
15236
|
-
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(
|
15237
15436
|
exports.IconButton,
|
15238
15437
|
{
|
15239
15438
|
sx: styles3.dismissButton,
|
15240
15439
|
variant: "ghost",
|
15241
|
-
"aria-label": t2(
|
15242
|
-
icon: /* @__PURE__ */
|
15440
|
+
"aria-label": t2(texts27.dismiss),
|
15441
|
+
icon: /* @__PURE__ */ React70__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
15243
15442
|
onClick: onClose
|
15244
15443
|
}
|
15245
15444
|
));
|
15246
15445
|
};
|
15247
|
-
|
15446
|
+
texts27 = createTexts({
|
15248
15447
|
dismiss: {
|
15249
15448
|
nb: "Lukk",
|
15250
15449
|
nn: "Lukk",
|
@@ -15262,7 +15461,7 @@ var init_useToast = __esm({
|
|
15262
15461
|
init_ClosableToast();
|
15263
15462
|
exports.useToast = () => {
|
15264
15463
|
const toast = react.useToast();
|
15265
|
-
const wrappedToast =
|
15464
|
+
const wrappedToast = React70.useCallback((opts) => {
|
15266
15465
|
const Toast = getToastComponent(opts);
|
15267
15466
|
toast({
|
15268
15467
|
...opts,
|
@@ -15273,7 +15472,7 @@ var init_useToast = __esm({
|
|
15273
15472
|
};
|
15274
15473
|
getToastComponent = (opts) => {
|
15275
15474
|
if ("isClosable" in opts && opts.isClosable) {
|
15276
|
-
return ({ onClose, id }) => /* @__PURE__ */
|
15475
|
+
return ({ onClose, id }) => /* @__PURE__ */ React70__namespace.default.createElement(
|
15277
15476
|
ClosableToast,
|
15278
15477
|
{
|
15279
15478
|
id,
|
@@ -15289,7 +15488,7 @@ var init_useToast = __esm({
|
|
15289
15488
|
);
|
15290
15489
|
}
|
15291
15490
|
if ("buttonText" in opts) {
|
15292
|
-
return ({ id }) => /* @__PURE__ */
|
15491
|
+
return ({ id }) => /* @__PURE__ */ React70__namespace.default.createElement(
|
15293
15492
|
ActionToast,
|
15294
15493
|
{
|
15295
15494
|
id,
|
@@ -15300,7 +15499,7 @@ var init_useToast = __esm({
|
|
15300
15499
|
opts.text
|
15301
15500
|
);
|
15302
15501
|
}
|
15303
|
-
return ({ id }) => /* @__PURE__ */
|
15502
|
+
return ({ id }) => /* @__PURE__ */ React70__namespace.default.createElement(BaseToast, { id, variant: opts.variant }, opts.text);
|
15304
15503
|
};
|
15305
15504
|
}
|
15306
15505
|
});
|
@@ -15325,7 +15524,7 @@ var init_Tooltip = __esm({
|
|
15325
15524
|
withCloseButton = false,
|
15326
15525
|
...props
|
15327
15526
|
}) => {
|
15328
|
-
return /* @__PURE__ */
|
15527
|
+
return /* @__PURE__ */ React70__namespace.default.createElement(
|
15329
15528
|
react.Popover,
|
15330
15529
|
{
|
15331
15530
|
onClose,
|
@@ -15337,8 +15536,8 @@ var init_Tooltip = __esm({
|
|
15337
15536
|
arrowShadowColor: "none",
|
15338
15537
|
...props
|
15339
15538
|
},
|
15340
|
-
/* @__PURE__ */
|
15341
|
-
/* @__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))
|
15342
15541
|
);
|
15343
15542
|
};
|
15344
15543
|
}
|
@@ -15411,8 +15610,8 @@ function useSizes({
|
|
15411
15610
|
getNodes,
|
15412
15611
|
observeMutation = true
|
15413
15612
|
}) {
|
15414
|
-
const [sizes26, setSizes] =
|
15415
|
-
const [count, setCount] =
|
15613
|
+
const [sizes26, setSizes] = React70.useState([]);
|
15614
|
+
const [count, setCount] = React70.useState(0);
|
15416
15615
|
useSafeLayoutEffect(() => {
|
15417
15616
|
const elements = getNodes();
|
15418
15617
|
const cleanups = elements.map(
|
@@ -15460,7 +15659,7 @@ var init_dist9 = __esm({
|
|
15460
15659
|
"../../node_modules/@chakra-ui/react-use-size/dist/index.mjs"() {
|
15461
15660
|
"use client";
|
15462
15661
|
init_dist8();
|
15463
|
-
useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ?
|
15662
|
+
useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ? React70.useLayoutEffect : React70.useEffect;
|
15464
15663
|
}
|
15465
15664
|
});
|
15466
15665
|
var init_externals = __esm({
|
@@ -15809,7 +16008,7 @@ Object.defineProperty(exports, 'Section', {
|
|
15809
16008
|
enumerable: true,
|
15810
16009
|
get: function () { return reactStately.Section; }
|
15811
16010
|
});
|
15812
|
-
exports.tokens =
|
16011
|
+
exports.tokens = tokens11__namespace;
|
15813
16012
|
exports.Combobox = Combobox;
|
15814
16013
|
exports.DateRangePicker = DateRangePicker;
|
15815
16014
|
exports.DrawerHeader = exports.ModalHeader;
|