@vygruppen/spor-react 11.3.4 → 11.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +3 -6
- package/dist/index.d.ts +3 -6
- package/dist/index.js +417 -417
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +352 -355
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/alert/ServiceAlert.tsx +2 -2
- package/src/input/FormControl.tsx +2 -11
package/dist/index.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var tokens12 = require('@vygruppen/spor-design-tokens');
|
4
4
|
var react = require('@chakra-ui/react');
|
5
|
-
var
|
5
|
+
var React84 = require('react');
|
6
6
|
var sporIconReact = require('@vygruppen/spor-icon-react');
|
7
7
|
var reactAria = require('react-aria');
|
8
8
|
var reactStately = require('react-stately');
|
@@ -43,7 +43,7 @@ function _interopNamespace(e) {
|
|
43
43
|
}
|
44
44
|
|
45
45
|
var tokens12__namespace = /*#__PURE__*/_interopNamespace(tokens12);
|
46
|
-
var
|
46
|
+
var React84__namespace = /*#__PURE__*/_interopNamespace(React84);
|
47
47
|
var deepmerge__default = /*#__PURE__*/_interopDefault(deepmerge);
|
48
48
|
|
49
49
|
var __defProp = Object.defineProperty;
|
@@ -52,11 +52,11 @@ var __export = (target, all) => {
|
|
52
52
|
__defProp(target, name, { get: all[name], enumerable: true });
|
53
53
|
};
|
54
54
|
var Divider = react.forwardRef((props, ref) => {
|
55
|
-
return /* @__PURE__ */
|
55
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Divider, { ...props, ref });
|
56
56
|
});
|
57
57
|
var Stack = react.forwardRef(
|
58
58
|
({ flexDirection, ...props }, ref) => {
|
59
|
-
return /* @__PURE__ */
|
59
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Stack, { ...props, direction: flexDirection, ref });
|
60
60
|
}
|
61
61
|
);
|
62
62
|
var AttachedInputs = ({
|
@@ -88,7 +88,7 @@ var AttachedInputs = ({
|
|
88
88
|
}
|
89
89
|
};
|
90
90
|
const direction = flexDirection === "row" ? "horizontal" : "vertical";
|
91
|
-
return /* @__PURE__ */
|
91
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
92
92
|
react.Flex,
|
93
93
|
{
|
94
94
|
role: "group",
|
@@ -100,11 +100,11 @@ var AttachedInputs = ({
|
|
100
100
|
);
|
101
101
|
};
|
102
102
|
var Dialog = ({ title, children, ...props }) => {
|
103
|
-
const ref =
|
103
|
+
const ref = React84.useRef(null);
|
104
104
|
const { dialogProps, titleProps } = reactAria.useDialog(props, ref);
|
105
|
-
return /* @__PURE__ */
|
105
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...dialogProps, ref, outline: "none" }, title && /* @__PURE__ */ React84__namespace.default.createElement(react.Heading, { as: "h3", ...titleProps }, title), children);
|
106
106
|
};
|
107
|
-
var Popover =
|
107
|
+
var Popover = React84.forwardRef(
|
108
108
|
({
|
109
109
|
children,
|
110
110
|
state,
|
@@ -118,7 +118,7 @@ var Popover = React85.forwardRef(
|
|
118
118
|
containerPadding = 12
|
119
119
|
}, ref) => {
|
120
120
|
var _a;
|
121
|
-
const internalRef =
|
121
|
+
const internalRef = React84.useRef(null);
|
122
122
|
const popoverRef = ref ?? internalRef;
|
123
123
|
const { popoverProps, underlayProps } = reactAria.usePopover(
|
124
124
|
{
|
@@ -133,21 +133,21 @@ var Popover = React85.forwardRef(
|
|
133
133
|
},
|
134
134
|
state
|
135
135
|
);
|
136
|
-
const popoverBox = /* @__PURE__ */
|
136
|
+
const popoverBox = /* @__PURE__ */ React84__namespace.default.createElement(
|
137
137
|
react.Box,
|
138
138
|
{
|
139
139
|
...popoverProps,
|
140
140
|
ref: popoverRef,
|
141
141
|
minWidth: ((_a = triggerRef.current) == null ? void 0 : _a.clientWidth) ?? "auto"
|
142
142
|
},
|
143
|
-
/* @__PURE__ */
|
143
|
+
/* @__PURE__ */ React84__namespace.default.createElement(reactAria.DismissButton, { onDismiss: state.close }),
|
144
144
|
children,
|
145
|
-
/* @__PURE__ */
|
145
|
+
/* @__PURE__ */ React84__namespace.default.createElement(reactAria.DismissButton, { onDismiss: state.close })
|
146
146
|
);
|
147
147
|
if (isNonModal) {
|
148
148
|
return popoverBox;
|
149
149
|
}
|
150
|
-
return /* @__PURE__ */
|
150
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(reactAria.Overlay, null, hasBackdrop && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...underlayProps, position: "fixed", inset: "0" }), popoverBox);
|
151
151
|
}
|
152
152
|
);
|
153
153
|
|
@@ -170,7 +170,7 @@ var CardSelect = react.forwardRef(
|
|
170
170
|
}, externalRef) => {
|
171
171
|
var _a;
|
172
172
|
const label = "label" in props ? props.label : props["aria-label"];
|
173
|
-
const internalRef =
|
173
|
+
const internalRef = React84.useRef(null);
|
174
174
|
const triggerRef = externalRef ?? internalRef;
|
175
175
|
const state = reactStately.useOverlayTriggerState({
|
176
176
|
isOpen: externalIsOpen,
|
@@ -189,7 +189,7 @@ var CardSelect = react.forwardRef(
|
|
189
189
|
});
|
190
190
|
useForceRerender(state.isOpen);
|
191
191
|
const ChevronIcon = size === "sm" ? sporIconReact.DropdownDownFill18Icon : sporIconReact.DropdownDownFill24Icon;
|
192
|
-
return /* @__PURE__ */
|
192
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React84__namespace.default.createElement(
|
193
193
|
react.chakra.button,
|
194
194
|
{
|
195
195
|
type: "button",
|
@@ -200,13 +200,13 @@ var CardSelect = react.forwardRef(
|
|
200
200
|
width,
|
201
201
|
"data-attachable": true
|
202
202
|
},
|
203
|
-
/* @__PURE__ */
|
203
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { gap: 1.5, alignItems: "center" }, icon, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "span", display: props["aria-label"] ? "none" : "inline" }, label), withChevron ? /* @__PURE__ */ React84__namespace.default.createElement(
|
204
204
|
ChevronIcon,
|
205
205
|
{
|
206
206
|
transform: state.isOpen ? "rotate(180deg)" : "none"
|
207
207
|
}
|
208
208
|
) : null)
|
209
|
-
), state.isOpen && /* @__PURE__ */
|
209
|
+
), state.isOpen && /* @__PURE__ */ React84__namespace.default.createElement(
|
210
210
|
Popover,
|
211
211
|
{
|
212
212
|
state,
|
@@ -216,7 +216,7 @@ var CardSelect = react.forwardRef(
|
|
216
216
|
placement,
|
217
217
|
containerPadding: 0
|
218
218
|
},
|
219
|
-
/* @__PURE__ */
|
219
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
220
220
|
StaticCard,
|
221
221
|
{
|
222
222
|
colorScheme: "white",
|
@@ -228,14 +228,14 @@ var CardSelect = react.forwardRef(
|
|
228
228
|
...overlayProps,
|
229
229
|
maxWidth: (((_a = triggerRef.current) == null ? void 0 : _a.clientWidth) ?? 1) * 2
|
230
230
|
},
|
231
|
-
/* @__PURE__ */
|
231
|
+
/* @__PURE__ */ React84__namespace.default.createElement(Dialog, { "aria-label": label }, children)
|
232
232
|
)
|
233
233
|
));
|
234
234
|
}
|
235
235
|
);
|
236
236
|
function useForceRerender(shouldRerender) {
|
237
|
-
const [_, update] =
|
238
|
-
|
237
|
+
const [_, update] = React84.useState(false);
|
238
|
+
React84.useEffect(() => {
|
239
239
|
if (shouldRerender) {
|
240
240
|
update((x) => !x);
|
241
241
|
}
|
@@ -247,7 +247,7 @@ var CheckboxGroup = ({
|
|
247
247
|
children,
|
248
248
|
...props
|
249
249
|
}) => {
|
250
|
-
return /* @__PURE__ */
|
250
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.CheckboxGroup, { ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.Stack, { direction }, children));
|
251
251
|
};
|
252
252
|
var ChoiceChip = react.forwardRef(
|
253
253
|
({
|
@@ -273,15 +273,15 @@ var ChoiceChip = react.forwardRef(
|
|
273
273
|
icon,
|
274
274
|
hasLabel: chipType !== "icon"
|
275
275
|
});
|
276
|
-
const id = `choice-chip-${
|
277
|
-
return /* @__PURE__ */
|
276
|
+
const id = `choice-chip-${React84.useId()}`;
|
277
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
278
278
|
react.chakra.label,
|
279
279
|
{
|
280
280
|
...getRootProps(),
|
281
281
|
htmlFor: id,
|
282
282
|
"aria-label": String(children)
|
283
283
|
},
|
284
|
-
/* @__PURE__ */
|
284
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
285
285
|
react.chakra.input,
|
286
286
|
{
|
287
287
|
...getInputProps({}, ref),
|
@@ -289,7 +289,7 @@ var ChoiceChip = react.forwardRef(
|
|
289
289
|
disabled: isDisabled || state.isDisabled
|
290
290
|
}
|
291
291
|
),
|
292
|
-
/* @__PURE__ */
|
292
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
293
293
|
react.chakra.div,
|
294
294
|
{
|
295
295
|
...getLabelProps(),
|
@@ -300,9 +300,9 @@ var ChoiceChip = react.forwardRef(
|
|
300
300
|
"data-active": utils.dataAttr(state.isActive),
|
301
301
|
"data-disabled": utils.dataAttr(isDisabled || state.isDisabled)
|
302
302
|
},
|
303
|
-
icon && /* @__PURE__ */
|
304
|
-
chipType !== "icon" && /* @__PURE__ */
|
305
|
-
chipType === "filter" && state.isChecked && /* @__PURE__ */
|
303
|
+
icon && /* @__PURE__ */ React84__namespace.default.createElement(react.chakra.span, { __css: styles2.icon }, state.isChecked ? icon.checked : icon.default),
|
304
|
+
chipType !== "icon" && /* @__PURE__ */ React84__namespace.default.createElement(react.chakra.span, { __css: styles2.label, ...getCheckboxProps() }, children),
|
305
|
+
chipType === "filter" && state.isChecked && /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.CloseOutline24Icon, { marginLeft: 1.5 })
|
306
306
|
)
|
307
307
|
);
|
308
308
|
}
|
@@ -335,11 +335,11 @@ function Combobox({
|
|
335
335
|
...rest
|
336
336
|
}) {
|
337
337
|
const { contains } = reactAria.useFilter({ sensitivity: "base" });
|
338
|
-
const fallbackInputRef =
|
338
|
+
const fallbackInputRef = React84.useRef(null);
|
339
339
|
const inputRef = externalInputRef ?? fallbackInputRef;
|
340
|
-
const listBoxRef =
|
341
|
-
const popoverRef =
|
342
|
-
const listboxId = `${
|
340
|
+
const listBoxRef = React84.useRef(null);
|
341
|
+
const popoverRef = React84.useRef(null);
|
342
|
+
const listboxId = `${React84.useId()}-listbox`;
|
343
343
|
const inputWidth = useInputWidth(inputRef);
|
344
344
|
const state = reactStately.useComboBoxState({
|
345
345
|
allowsEmptyCollection: Boolean(emptyContent),
|
@@ -377,7 +377,7 @@ function Combobox({
|
|
377
377
|
},
|
378
378
|
state
|
379
379
|
);
|
380
|
-
return /* @__PURE__ */
|
380
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(React84__namespace.default.Fragment, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
381
381
|
Input,
|
382
382
|
{
|
383
383
|
...styleProps(comboBoxProps),
|
@@ -392,7 +392,7 @@ function Combobox({
|
|
392
392
|
borderBottomLeftRadius: state.isOpen && !isLoading ? 0 : borderBottomLeftRadius,
|
393
393
|
borderBottomRightRadius: state.isOpen && !isLoading ? 0 : borderBottomRightRadius,
|
394
394
|
...inputProps,
|
395
|
-
rightIcon: isLoading ? /* @__PURE__ */
|
395
|
+
rightIcon: isLoading ? /* @__PURE__ */ React84__namespace.default.createElement(
|
396
396
|
ColorSpinner,
|
397
397
|
{
|
398
398
|
width: "1.5rem",
|
@@ -407,7 +407,7 @@ function Combobox({
|
|
407
407
|
}
|
408
408
|
) : rightIcon
|
409
409
|
}
|
410
|
-
), /* @__PURE__ */
|
410
|
+
), /* @__PURE__ */ React84__namespace.default.createElement("span", { "aria-hidden": "true", "data-trigger": "multiselect" }), state.isOpen && !isLoading && /* @__PURE__ */ React84__namespace.default.createElement(
|
411
411
|
Popover,
|
412
412
|
{
|
413
413
|
state,
|
@@ -419,7 +419,7 @@ function Combobox({
|
|
419
419
|
hasBackdrop: false,
|
420
420
|
containerPadding: 0
|
421
421
|
},
|
422
|
-
/* @__PURE__ */
|
422
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
423
423
|
ListBox,
|
424
424
|
{
|
425
425
|
...listBoxProps,
|
@@ -435,8 +435,8 @@ function Combobox({
|
|
435
435
|
));
|
436
436
|
}
|
437
437
|
var useInputWidth = (inputRef) => {
|
438
|
-
const [inputWidth, setInputWidth] =
|
439
|
-
|
438
|
+
const [inputWidth, setInputWidth] = React84.useState("auto");
|
439
|
+
React84.useEffect(() => {
|
440
440
|
const onResize = debounce(() => {
|
441
441
|
if (inputRef.current) {
|
442
442
|
setInputWidth(`${inputRef.current.offsetWidth}px`);
|
@@ -462,9 +462,6 @@ var debounce = (fn, ms = 100) => {
|
|
462
462
|
}, ms);
|
463
463
|
};
|
464
464
|
};
|
465
|
-
var FormControl = react.forwardRef((props, ref) => {
|
466
|
-
return /* @__PURE__ */ React85__namespace.default.createElement(react.FormControl, { ...props, ref });
|
467
|
-
});
|
468
465
|
var FormErrorMessage = ({
|
469
466
|
children,
|
470
467
|
...boxProps
|
@@ -479,7 +476,7 @@ var FormErrorMessage = ({
|
|
479
476
|
return null;
|
480
477
|
}
|
481
478
|
const { ref, ...errorMessageProps } = formControlContext.getErrorMessageProps();
|
482
|
-
return /* @__PURE__ */
|
479
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { position: "relative", ref }, /* @__PURE__ */ React84__namespace.default.createElement(
|
483
480
|
react.Box,
|
484
481
|
{
|
485
482
|
borderRadius: "xs",
|
@@ -497,12 +494,12 @@ var FormErrorMessage = ({
|
|
497
494
|
...errorMessageProps,
|
498
495
|
...boxProps
|
499
496
|
},
|
500
|
-
/* @__PURE__ */
|
497
|
+
/* @__PURE__ */ React84__namespace.default.createElement(Arrow, { position: "absolute", top: "-0.25em", left: "1em" }),
|
501
498
|
children
|
502
499
|
));
|
503
500
|
};
|
504
501
|
var Arrow = (props) => {
|
505
|
-
return /* @__PURE__ */
|
502
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
506
503
|
react.Box,
|
507
504
|
{
|
508
505
|
...props,
|
@@ -513,7 +510,7 @@ var Arrow = (props) => {
|
|
513
510
|
fill: "none",
|
514
511
|
transform: "rotate(45deg)"
|
515
512
|
},
|
516
|
-
/* @__PURE__ */
|
513
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
517
514
|
react.Box,
|
518
515
|
{
|
519
516
|
as: "path",
|
@@ -524,7 +521,7 @@ var Arrow = (props) => {
|
|
524
521
|
);
|
525
522
|
};
|
526
523
|
var FormLabel = react.forwardRef((props, ref) => {
|
527
|
-
return /* @__PURE__ */
|
524
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.FormLabel, { ...props, ref });
|
528
525
|
});
|
529
526
|
function ListBox({
|
530
527
|
isLoading,
|
@@ -536,7 +533,7 @@ function ListBox({
|
|
536
533
|
}) {
|
537
534
|
const { listBoxProps } = reactAria.useListBox(props, state, listBoxRef);
|
538
535
|
const styles2 = react.useMultiStyleConfig("ListBox", { variant });
|
539
|
-
return /* @__PURE__ */
|
536
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
540
537
|
react.List,
|
541
538
|
{
|
542
539
|
...listBoxProps,
|
@@ -548,22 +545,22 @@ function ListBox({
|
|
548
545
|
},
|
549
546
|
state.collection.size === 0 && props.emptyContent,
|
550
547
|
Array.from(state.collection).map(
|
551
|
-
(item) => item.type === "section" ? /* @__PURE__ */
|
548
|
+
(item) => item.type === "section" ? /* @__PURE__ */ React84__namespace.default.createElement(ListBoxSection, { key: item.key, section: item, state }) : /* @__PURE__ */ React84__namespace.default.createElement(Option, { key: item.key, item, state })
|
552
549
|
)
|
553
550
|
);
|
554
551
|
}
|
555
552
|
function ItemLabel({ children }) {
|
556
553
|
let { labelProps } = useOptionContext();
|
557
554
|
const styles2 = react.useMultiStyleConfig("ListBox", {});
|
558
|
-
return /* @__PURE__ */
|
555
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...labelProps, sx: styles2.label }, children);
|
559
556
|
}
|
560
557
|
function ItemDescription({ children }) {
|
561
558
|
let { descriptionProps } = useOptionContext();
|
562
559
|
const styles2 = react.useMultiStyleConfig("ListBox", {});
|
563
|
-
return /* @__PURE__ */
|
560
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...descriptionProps, sx: styles2.description }, children);
|
564
561
|
}
|
565
562
|
function Option({ item, state }) {
|
566
|
-
const ref =
|
563
|
+
const ref = React84.useRef(null);
|
567
564
|
const {
|
568
565
|
optionProps,
|
569
566
|
isSelected,
|
@@ -587,7 +584,7 @@ function Option({ item, state }) {
|
|
587
584
|
if (isFocusVisible) {
|
588
585
|
dataFields["data-focus-visible"] = true;
|
589
586
|
}
|
590
|
-
|
587
|
+
React84.useEffect(() => {
|
591
588
|
var _a;
|
592
589
|
(_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.addEventListener(
|
593
590
|
"touchend",
|
@@ -597,14 +594,14 @@ function Option({ item, state }) {
|
|
597
594
|
{ passive: false, once: true }
|
598
595
|
);
|
599
596
|
}, []);
|
600
|
-
return /* @__PURE__ */
|
597
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React84__namespace.default.createElement(react.ListItem, { ...optionProps, ...dataFields, ref, sx: styles2.item }, item.rendered));
|
601
598
|
}
|
602
|
-
var OptionContext =
|
599
|
+
var OptionContext = React84__namespace.default.createContext({
|
603
600
|
labelProps: {},
|
604
601
|
descriptionProps: {}
|
605
602
|
});
|
606
603
|
var useOptionContext = () => {
|
607
|
-
return
|
604
|
+
return React84.useContext(OptionContext);
|
608
605
|
};
|
609
606
|
function ListBoxSection({ section, state }) {
|
610
607
|
const { itemProps, headingProps, groupProps } = reactAria.useListBoxSection({
|
@@ -613,7 +610,7 @@ function ListBoxSection({ section, state }) {
|
|
613
610
|
});
|
614
611
|
const isFirstSection = section.key === state.collection.getFirstKey();
|
615
612
|
const titleColor = react.useColorModeValue("darkGrey", "white");
|
616
|
-
return /* @__PURE__ */
|
613
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.ListItem, { ...itemProps }, section.rendered && /* @__PURE__ */ React84__namespace.default.createElement(
|
617
614
|
react.Box,
|
618
615
|
{
|
619
616
|
fontSize: "mobile.xs",
|
@@ -626,8 +623,8 @@ function ListBoxSection({ section, state }) {
|
|
626
623
|
...headingProps
|
627
624
|
},
|
628
625
|
section.rendered
|
629
|
-
), /* @__PURE__ */
|
630
|
-
(item) => /* @__PURE__ */
|
626
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(react.List, { ...groupProps, padding: 0, listStyleType: "none" }, Array.from(state.collection.getChildren(section.key)).map(
|
627
|
+
(item) => /* @__PURE__ */ React84__namespace.default.createElement(Option, { key: item.key, item, state })
|
631
628
|
)));
|
632
629
|
}
|
633
630
|
|
@@ -648,8 +645,8 @@ function InfoSelect({
|
|
648
645
|
...props
|
649
646
|
};
|
650
647
|
const state = reactStately.useSelectState(renamedProps);
|
651
|
-
const triggerRef =
|
652
|
-
const listboxRef =
|
648
|
+
const triggerRef = React84.useRef(null);
|
649
|
+
const listboxRef = React84.useRef(null);
|
653
650
|
const { labelProps, triggerProps, valueProps, menuProps } = reactAria.useSelect(
|
654
651
|
renamedProps,
|
655
652
|
state,
|
@@ -667,7 +664,7 @@ function InfoSelect({
|
|
667
664
|
const { buttonProps } = reactAria.useButton(triggerProps, triggerRef);
|
668
665
|
const { t } = useTranslation();
|
669
666
|
const formControl = react.useFormControlProps(props);
|
670
|
-
return /* @__PURE__ */
|
667
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: styles2.container }, /* @__PURE__ */ React84__namespace.default.createElement(
|
671
668
|
reactAria.HiddenSelect,
|
672
669
|
{
|
673
670
|
state,
|
@@ -675,7 +672,7 @@ function InfoSelect({
|
|
675
672
|
label: props.label,
|
676
673
|
name: props.name
|
677
674
|
}
|
678
|
-
), /* @__PURE__ */
|
675
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
679
676
|
react.chakra.button,
|
680
677
|
{
|
681
678
|
type: "button",
|
@@ -686,7 +683,7 @@ function InfoSelect({
|
|
686
683
|
"aria-invalid": formControl.isInvalid,
|
687
684
|
"aria-describedby": formControl["aria-describedby"]
|
688
685
|
},
|
689
|
-
/* @__PURE__ */
|
686
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.chakra.div, { sx: styles2.innerButton }, /* @__PURE__ */ React84__namespace.default.createElement(
|
690
687
|
react.chakra.div,
|
691
688
|
{
|
692
689
|
...labelProps,
|
@@ -700,7 +697,7 @@ function InfoSelect({
|
|
700
697
|
}
|
701
698
|
},
|
702
699
|
props.label
|
703
|
-
), /* @__PURE__ */
|
700
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
704
701
|
react.Box,
|
705
702
|
{
|
706
703
|
...valueProps,
|
@@ -712,15 +709,15 @@ function InfoSelect({
|
|
712
709
|
},
|
713
710
|
state.selectedItem ? state.selectedItem.textValue ?? state.selectedItem.rendered : placeholder ?? t(texts.selectAnOption)
|
714
711
|
)),
|
715
|
-
/* @__PURE__ */
|
716
|
-
), state.isOpen && /* @__PURE__ */
|
712
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: styles2.arrowIcon }, state.isOpen ? /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.DropdownUpFill24Icon, null) : /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.DropdownDownFill24Icon, null))
|
713
|
+
), state.isOpen && /* @__PURE__ */ React84__namespace.default.createElement(
|
717
714
|
Popover,
|
718
715
|
{
|
719
716
|
state,
|
720
717
|
triggerRef,
|
721
718
|
containerPadding: 0
|
722
719
|
},
|
723
|
-
/* @__PURE__ */
|
720
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
724
721
|
ListBox,
|
725
722
|
{
|
726
723
|
...menuProps,
|
@@ -744,10 +741,10 @@ var texts = createTexts({
|
|
744
741
|
var Input = react.forwardRef(
|
745
742
|
({ label, leftIcon, rightIcon, id, size, ...props }, ref) => {
|
746
743
|
const formControlProps = react.useFormControlContext();
|
747
|
-
const fallbackId = `input-${
|
744
|
+
const fallbackId = `input-${React84.useId()}`;
|
748
745
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
749
|
-
const labelId = `${
|
750
|
-
return /* @__PURE__ */
|
746
|
+
const labelId = `${React84.useId()}-label`;
|
747
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React84__namespace.default.createElement(react.InputLeftElement, { pointerEvents: "none" }, leftIcon), /* @__PURE__ */ React84__namespace.default.createElement(
|
751
748
|
react.Input,
|
752
749
|
{
|
753
750
|
"data-attachable": true,
|
@@ -765,7 +762,7 @@ var Input = react.forwardRef(
|
|
765
762
|
}
|
766
763
|
}
|
767
764
|
}
|
768
|
-
), /* @__PURE__ */
|
765
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
769
766
|
react.FormLabel,
|
770
767
|
{
|
771
768
|
htmlFor: inputId,
|
@@ -788,19 +785,19 @@ var Input = react.forwardRef(
|
|
788
785
|
}
|
789
786
|
},
|
790
787
|
label
|
791
|
-
), rightIcon && /* @__PURE__ */
|
788
|
+
), rightIcon && /* @__PURE__ */ React84__namespace.default.createElement(react.InputRightElement, { pointerEvents: "none" }, rightIcon));
|
792
789
|
}
|
793
790
|
);
|
794
791
|
var InputLeftElement2 = react.forwardRef(
|
795
|
-
(props, ref) => /* @__PURE__ */
|
792
|
+
(props, ref) => /* @__PURE__ */ React84__namespace.default.createElement(react.InputLeftElement, { ...props, ref })
|
796
793
|
);
|
797
794
|
var InputRightElement2 = react.forwardRef(
|
798
|
-
(props, ref) => /* @__PURE__ */
|
795
|
+
(props, ref) => /* @__PURE__ */ React84__namespace.default.createElement(react.InputRightElement, { ...props, ref })
|
799
796
|
);
|
800
797
|
var NativeSelect = react.forwardRef(
|
801
798
|
({ label, ...props }, ref) => {
|
802
799
|
const styles2 = react.useMultiStyleConfig("Select", props);
|
803
|
-
return /* @__PURE__ */
|
800
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.FormControl, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
804
801
|
react.Select,
|
805
802
|
{
|
806
803
|
"data-attachable": true,
|
@@ -808,7 +805,7 @@ var NativeSelect = react.forwardRef(
|
|
808
805
|
rootProps: { __css: styles2.root },
|
809
806
|
ref
|
810
807
|
}
|
811
|
-
), label && /* @__PURE__ */
|
808
|
+
), label && /* @__PURE__ */ React84__namespace.default.createElement(FormLabel, null, label));
|
812
809
|
}
|
813
810
|
);
|
814
811
|
function NumericStepper({
|
@@ -826,7 +823,7 @@ function NumericStepper({
|
|
826
823
|
ariaLabelContext = { singular: "", plural: "" },
|
827
824
|
...boxProps
|
828
825
|
}) {
|
829
|
-
const addButtonRef =
|
826
|
+
const addButtonRef = React84.useRef(null);
|
830
827
|
const { t } = useTranslation();
|
831
828
|
const styles2 = react.useMultiStyleConfig("NumericStepper", {});
|
832
829
|
const [value, onChange] = react.useControllableState({
|
@@ -840,10 +837,10 @@ function NumericStepper({
|
|
840
837
|
var _a;
|
841
838
|
(_a = addButtonRef.current) == null ? void 0 : _a.focus();
|
842
839
|
};
|
843
|
-
return /* @__PURE__ */
|
840
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { __css: styles2.container, ...boxProps }, /* @__PURE__ */ React84__namespace.default.createElement(
|
844
841
|
VerySmallButton,
|
845
842
|
{
|
846
|
-
icon: /* @__PURE__ */
|
843
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(SubtractIcon, { stepLabel: clampedStepSize }),
|
847
844
|
"aria-label": t(
|
848
845
|
texts2.decrementButtonAriaLabel(
|
849
846
|
clampedStepSize,
|
@@ -860,7 +857,7 @@ function NumericStepper({
|
|
860
857
|
isDisabled: formControlProps.disabled,
|
861
858
|
id: value <= minValue ? void 0 : formControlProps.id
|
862
859
|
}
|
863
|
-
), withInput ? /* @__PURE__ */
|
860
|
+
), withInput ? /* @__PURE__ */ React84__namespace.default.createElement(
|
864
861
|
react.chakra.input,
|
865
862
|
{
|
866
863
|
type: "number",
|
@@ -886,7 +883,7 @@ function NumericStepper({
|
|
886
883
|
}
|
887
884
|
}
|
888
885
|
}
|
889
|
-
) : /* @__PURE__ */
|
886
|
+
) : /* @__PURE__ */ React84__namespace.default.createElement(
|
890
887
|
react.chakra.text,
|
891
888
|
{
|
892
889
|
sx: styles2.text,
|
@@ -895,11 +892,11 @@ function NumericStepper({
|
|
895
892
|
"aria-label": ariaLabelContext.plural !== "" ? t(texts2.currentNumberAriaLabel(ariaLabelContext.plural)) : ""
|
896
893
|
},
|
897
894
|
value
|
898
|
-
), /* @__PURE__ */
|
895
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
899
896
|
VerySmallButton,
|
900
897
|
{
|
901
898
|
ref: addButtonRef,
|
902
|
-
icon: /* @__PURE__ */
|
899
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(AddIcon, { stepLabel: clampedStepSize }),
|
903
900
|
"aria-label": t(
|
904
901
|
texts2.incrementButtonAriaLabel(
|
905
902
|
clampedStepSize,
|
@@ -913,9 +910,9 @@ function NumericStepper({
|
|
913
910
|
}
|
914
911
|
));
|
915
912
|
}
|
916
|
-
var VerySmallButton =
|
913
|
+
var VerySmallButton = React84__namespace.default.forwardRef((props, ref) => {
|
917
914
|
const styles2 = react.useMultiStyleConfig("NumericStepper", {});
|
918
|
-
return /* @__PURE__ */
|
915
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
919
916
|
IconButton,
|
920
917
|
{
|
921
918
|
variant: "primary",
|
@@ -926,7 +923,7 @@ var VerySmallButton = React85__namespace.default.forwardRef((props, ref) => {
|
|
926
923
|
}
|
927
924
|
);
|
928
925
|
});
|
929
|
-
var SubtractIcon = ({ stepLabel, ...props }) => /* @__PURE__ */
|
926
|
+
var SubtractIcon = ({ stepLabel, ...props }) => /* @__PURE__ */ React84__namespace.default.createElement(React84__namespace.default.Fragment, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
930
927
|
react.Box,
|
931
928
|
{
|
932
929
|
as: "svg",
|
@@ -936,7 +933,7 @@ var SubtractIcon = ({ stepLabel, ...props }) => /* @__PURE__ */ React85__namespa
|
|
936
933
|
stroke: "currentColor",
|
937
934
|
...props
|
938
935
|
},
|
939
|
-
/* @__PURE__ */
|
936
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
940
937
|
"line",
|
941
938
|
{
|
942
939
|
x1: "9",
|
@@ -947,8 +944,8 @@ var SubtractIcon = ({ stepLabel, ...props }) => /* @__PURE__ */ React85__namespa
|
|
947
944
|
strokeLinecap: "round"
|
948
945
|
}
|
949
946
|
)
|
950
|
-
), stepLabel > 1 && /* @__PURE__ */
|
951
|
-
var AddIcon = ({ stepLabel, ...props }) => /* @__PURE__ */
|
947
|
+
), stepLabel > 1 && /* @__PURE__ */ React84__namespace.default.createElement(react.chakra.span, { paddingRight: "1" }, stepLabel.toString()));
|
948
|
+
var AddIcon = ({ stepLabel, ...props }) => /* @__PURE__ */ React84__namespace.default.createElement(React84__namespace.default.Fragment, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
952
949
|
react.Box,
|
953
950
|
{
|
954
951
|
as: "svg",
|
@@ -958,7 +955,7 @@ var AddIcon = ({ stepLabel, ...props }) => /* @__PURE__ */ React85__namespace.de
|
|
958
955
|
stroke: "currentColor",
|
959
956
|
...props
|
960
957
|
},
|
961
|
-
/* @__PURE__ */
|
958
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
962
959
|
"line",
|
963
960
|
{
|
964
961
|
x1: "9",
|
@@ -969,7 +966,7 @@ var AddIcon = ({ stepLabel, ...props }) => /* @__PURE__ */ React85__namespace.de
|
|
969
966
|
strokeLinecap: "round"
|
970
967
|
}
|
971
968
|
),
|
972
|
-
/* @__PURE__ */
|
969
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
973
970
|
"line",
|
974
971
|
{
|
975
972
|
x1: "15",
|
@@ -980,7 +977,7 @@ var AddIcon = ({ stepLabel, ...props }) => /* @__PURE__ */ React85__namespace.de
|
|
980
977
|
strokeLinecap: "round"
|
981
978
|
}
|
982
979
|
)
|
983
|
-
), stepLabel > 1 && /* @__PURE__ */
|
980
|
+
), stepLabel > 1 && /* @__PURE__ */ React84__namespace.default.createElement(react.chakra.span, { paddingRight: "1" }, stepLabel.toString()));
|
984
981
|
var texts2 = createTexts({
|
985
982
|
currentNumberAriaLabel(ariaContext) {
|
986
983
|
return {
|
@@ -1012,9 +1009,9 @@ var PasswordInput = react.forwardRef(
|
|
1012
1009
|
const { isOpen: isShowingPassword, onToggle } = react.useDisclosure();
|
1013
1010
|
const { t } = useTranslation();
|
1014
1011
|
const formControlProps = react.useFormControlContext();
|
1015
|
-
const autoGeneratedId = `password-input-${
|
1012
|
+
const autoGeneratedId = `password-input-${React84.useId()}`;
|
1016
1013
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
1017
|
-
return /* @__PURE__ */
|
1014
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React84__namespace.default.createElement(InputLeftElement2, { pointerEvents: "none" }, leftIcon), /* @__PURE__ */ React84__namespace.default.createElement(
|
1018
1015
|
react.Input,
|
1019
1016
|
{
|
1020
1017
|
...props,
|
@@ -1026,7 +1023,7 @@ var PasswordInput = react.forwardRef(
|
|
1026
1023
|
ref,
|
1027
1024
|
"data-attachable": true
|
1028
1025
|
}
|
1029
|
-
), /* @__PURE__ */
|
1026
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(FormLabel, { htmlFor: inputId, pointerEvents: "none" }, label), /* @__PURE__ */ React84__namespace.default.createElement(InputRightElement2, { width: "fit-content" }, /* @__PURE__ */ React84__namespace.default.createElement(
|
1030
1027
|
react.Button,
|
1031
1028
|
{
|
1032
1029
|
variant: "ghost",
|
@@ -1070,7 +1067,7 @@ var sortedCallingCodes = awesomePhonenumber.getSupportedCallingCodes().sort((a,
|
|
1070
1067
|
var callingCodes = [...prioritizedCountryCodes, ...sortedCallingCodes];
|
1071
1068
|
var CountryCodeSelect = (props) => {
|
1072
1069
|
const { t } = useTranslation();
|
1073
|
-
return /* @__PURE__ */
|
1070
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
1074
1071
|
InfoSelect,
|
1075
1072
|
{
|
1076
1073
|
label: t(texts4.countryCode),
|
@@ -1079,7 +1076,7 @@ var CountryCodeSelect = (props) => {
|
|
1079
1076
|
variant: props.variant,
|
1080
1077
|
...props
|
1081
1078
|
},
|
1082
|
-
(item) => /* @__PURE__ */
|
1079
|
+
(item) => /* @__PURE__ */ React84__namespace.default.createElement(reactStately.Item, { key: item.key }, item.key)
|
1083
1080
|
);
|
1084
1081
|
};
|
1085
1082
|
var texts4 = createTexts({
|
@@ -1112,7 +1109,7 @@ var PhoneNumberInput = react.forwardRef(
|
|
1112
1109
|
nationalNumber: ""
|
1113
1110
|
}
|
1114
1111
|
});
|
1115
|
-
return /* @__PURE__ */
|
1112
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(AttachedInputs, { ...boxProps }, /* @__PURE__ */ React84__namespace.default.createElement(
|
1116
1113
|
CountryCodeSelect,
|
1117
1114
|
{
|
1118
1115
|
value: value.countryCode,
|
@@ -1125,7 +1122,7 @@ var PhoneNumberInput = react.forwardRef(
|
|
1125
1122
|
width: "6.25rem",
|
1126
1123
|
variant
|
1127
1124
|
}
|
1128
|
-
), /* @__PURE__ */
|
1125
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
1129
1126
|
Input,
|
1130
1127
|
{
|
1131
1128
|
ref,
|
@@ -1168,11 +1165,11 @@ var texts5 = createTexts({
|
|
1168
1165
|
}
|
1169
1166
|
});
|
1170
1167
|
var Radio = react.forwardRef((props, ref) => {
|
1171
|
-
return /* @__PURE__ */
|
1168
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Radio, { ...props, ref });
|
1172
1169
|
});
|
1173
1170
|
var RadioGroup = react.forwardRef(
|
1174
1171
|
({ children, direction = "row", ...rest }, ref) => {
|
1175
|
-
return /* @__PURE__ */
|
1172
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.RadioGroup, { ...rest, ref }, /* @__PURE__ */ React84__namespace.default.createElement(react.Stack, { direction }, children));
|
1176
1173
|
}
|
1177
1174
|
);
|
1178
1175
|
var SearchInput = react.forwardRef(
|
@@ -1180,10 +1177,10 @@ var SearchInput = react.forwardRef(
|
|
1180
1177
|
const { t } = useTranslation();
|
1181
1178
|
const showClearButton = onReset && Boolean(props.value);
|
1182
1179
|
const formControlProps = react.useFormControlContext();
|
1183
|
-
const autoGeneratedId =
|
1180
|
+
const autoGeneratedId = React84.useId();
|
1184
1181
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
1185
1182
|
const { outerProps, innerProps } = getOuterProps(props);
|
1186
|
-
return /* @__PURE__ */
|
1183
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.InputGroup, { position: "relative", ...outerProps }, /* @__PURE__ */ React84__namespace.default.createElement(InputLeftElement2, { pointerEvents: "none" }, /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.SearchOutline24Icon, null)), /* @__PURE__ */ React84__namespace.default.createElement(
|
1187
1184
|
react.Input,
|
1188
1185
|
{
|
1189
1186
|
paddingLeft: 7,
|
@@ -1200,7 +1197,7 @@ var SearchInput = react.forwardRef(
|
|
1200
1197
|
ref,
|
1201
1198
|
"data-attachable": true
|
1202
1199
|
}
|
1203
|
-
), /* @__PURE__ */
|
1200
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
1204
1201
|
FormLabel,
|
1205
1202
|
{
|
1206
1203
|
htmlFor: inputId,
|
@@ -1221,7 +1218,7 @@ var SearchInput = react.forwardRef(
|
|
1221
1218
|
}
|
1222
1219
|
},
|
1223
1220
|
label ?? t(texts6.label)
|
1224
|
-
), showClearButton && /* @__PURE__ */
|
1221
|
+
), showClearButton && /* @__PURE__ */ React84__namespace.default.createElement(InputRightElement2, { width: "fit-content" }, /* @__PURE__ */ React84__namespace.default.createElement(
|
1225
1222
|
react.IconButton,
|
1226
1223
|
{
|
1227
1224
|
variant: "ghost",
|
@@ -1229,7 +1226,7 @@ var SearchInput = react.forwardRef(
|
|
1229
1226
|
size: "sm",
|
1230
1227
|
marginRight: 1,
|
1231
1228
|
"aria-label": t(texts6.reset),
|
1232
|
-
icon: /* @__PURE__ */
|
1229
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.CloseOutline24Icon, null),
|
1233
1230
|
onClick: onReset
|
1234
1231
|
}
|
1235
1232
|
)));
|
@@ -1264,13 +1261,13 @@ var texts6 = createTexts({
|
|
1264
1261
|
});
|
1265
1262
|
var Switch = react.forwardRef(
|
1266
1263
|
({ size = "md", as, ...props }, ref) => {
|
1267
|
-
return /* @__PURE__ */
|
1264
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Switch, { as, size, ...props, ref });
|
1268
1265
|
}
|
1269
1266
|
);
|
1270
1267
|
var useLabelHeight = (label) => {
|
1271
|
-
const labelRef =
|
1272
|
-
const [labelHeight, setLabelHeight] =
|
1273
|
-
|
1268
|
+
const labelRef = React84.useRef(null);
|
1269
|
+
const [labelHeight, setLabelHeight] = React84.useState(0);
|
1270
|
+
React84.useLayoutEffect(() => {
|
1274
1271
|
const updateLabelHeight = () => {
|
1275
1272
|
if (labelRef.current) {
|
1276
1273
|
setLabelHeight(labelRef.current.offsetHeight);
|
@@ -1295,18 +1292,18 @@ var Textarea = react.forwardRef((props, ref) => {
|
|
1295
1292
|
remainingProps: { label, ...rest }
|
1296
1293
|
} = getSpacingProps(props);
|
1297
1294
|
const formControlProps = react.useFormControlContext();
|
1298
|
-
const fallbackId = `textarea-${
|
1295
|
+
const fallbackId = `textarea-${React84.useId()}`;
|
1299
1296
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
1300
1297
|
const { labelRef, labelHeight } = useLabelHeight(label);
|
1301
|
-
return /* @__PURE__ */
|
1298
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
1302
1299
|
react.InputGroup,
|
1303
1300
|
{
|
1304
1301
|
position: "relative",
|
1305
1302
|
...spacingProps,
|
1306
1303
|
style: { "--label-height": `${labelHeight}px` }
|
1307
1304
|
},
|
1308
|
-
/* @__PURE__ */
|
1309
|
-
label && /* @__PURE__ */
|
1305
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Textarea, { ...rest, id: inputId, ref, placeholder: " " }),
|
1306
|
+
label && /* @__PURE__ */ React84__namespace.default.createElement(
|
1310
1307
|
react.FormLabel,
|
1311
1308
|
{
|
1312
1309
|
ref: labelRef,
|
@@ -1378,7 +1375,7 @@ function getSpacingProps(props) {
|
|
1378
1375
|
}
|
1379
1376
|
|
1380
1377
|
// src/layout/RadioCardGroup.tsx
|
1381
|
-
var RadioCardGroupContext =
|
1378
|
+
var RadioCardGroupContext = React84__namespace.default.createContext(null);
|
1382
1379
|
var RadioCardGroup = ({
|
1383
1380
|
children,
|
1384
1381
|
name,
|
@@ -1389,14 +1386,14 @@ var RadioCardGroup = ({
|
|
1389
1386
|
onChange,
|
1390
1387
|
...props
|
1391
1388
|
}) => {
|
1392
|
-
const [selectedValue, setSelectedValue] =
|
1389
|
+
const [selectedValue, setSelectedValue] = React84.useState(
|
1393
1390
|
defaultValue || ""
|
1394
1391
|
);
|
1395
1392
|
const handleChange = (value) => {
|
1396
1393
|
setSelectedValue(value);
|
1397
1394
|
onChange && onChange(value);
|
1398
1395
|
};
|
1399
|
-
return /* @__PURE__ */
|
1396
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
1400
1397
|
RadioCardGroupContext.Provider,
|
1401
1398
|
{
|
1402
1399
|
value: {
|
@@ -1407,12 +1404,12 @@ var RadioCardGroup = ({
|
|
1407
1404
|
defaultValue: defaultValue || ""
|
1408
1405
|
}
|
1409
1406
|
},
|
1410
|
-
/* @__PURE__ */
|
1407
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Stack, { as: "fieldset", direction, ...props }, groupLabel && /* @__PURE__ */ React84__namespace.default.createElement(FormLabel, { as: "legend", id: groupLabel }, groupLabel), children)
|
1411
1408
|
);
|
1412
1409
|
};
|
1413
1410
|
var RadioCard = react.forwardRef(
|
1414
1411
|
({ children, value, isDisabled, ...props }, ref) => {
|
1415
|
-
const context =
|
1412
|
+
const context = React84.useContext(RadioCardGroupContext);
|
1416
1413
|
if (!context) {
|
1417
1414
|
throw new Error(
|
1418
1415
|
"RadioCard components must be wrapped in a RadioCardGroup component"
|
@@ -1420,10 +1417,10 @@ var RadioCard = react.forwardRef(
|
|
1420
1417
|
}
|
1421
1418
|
const { name, selectedValue, onChange, variant } = context;
|
1422
1419
|
const styles2 = react.useMultiStyleConfig("RadioCard", { variant });
|
1423
|
-
const [isKeyboardUser, setKeyboardUser] =
|
1424
|
-
const [isFocused, setFocus] =
|
1420
|
+
const [isKeyboardUser, setKeyboardUser] = React84.useState(false);
|
1421
|
+
const [isFocused, setFocus] = React84.useState(false);
|
1425
1422
|
const isChecked = selectedValue === value;
|
1426
|
-
|
1423
|
+
React84.useEffect(() => {
|
1427
1424
|
const handleMouseDown = () => setKeyboardUser(false);
|
1428
1425
|
const handleKeyDown = (event) => {
|
1429
1426
|
if (event.key === " ") {
|
@@ -1439,21 +1436,21 @@ var RadioCard = react.forwardRef(
|
|
1439
1436
|
window.removeEventListener("keydown", handleKeyDown);
|
1440
1437
|
};
|
1441
1438
|
}, []);
|
1442
|
-
|
1439
|
+
React84.useEffect(() => {
|
1443
1440
|
if (isKeyboardUser && isChecked) {
|
1444
1441
|
setFocus(true);
|
1445
1442
|
} else {
|
1446
1443
|
setFocus(false);
|
1447
1444
|
}
|
1448
1445
|
}, [isKeyboardUser, isChecked]);
|
1449
|
-
const inputId = `radio-card-${
|
1450
|
-
return /* @__PURE__ */
|
1446
|
+
const inputId = `radio-card-${React84.useId()}`;
|
1447
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
1451
1448
|
react.Box,
|
1452
1449
|
{
|
1453
1450
|
onFocus: () => isKeyboardUser && setFocus(true),
|
1454
1451
|
onBlur: () => setFocus(false)
|
1455
1452
|
},
|
1456
|
-
/* @__PURE__ */
|
1453
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
1457
1454
|
react.chakra.input,
|
1458
1455
|
{
|
1459
1456
|
type: "radio",
|
@@ -1466,7 +1463,7 @@ var RadioCard = react.forwardRef(
|
|
1466
1463
|
__css: styles2.radioInput
|
1467
1464
|
}
|
1468
1465
|
),
|
1469
|
-
/* @__PURE__ */
|
1466
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
1470
1467
|
react.Box,
|
1471
1468
|
{
|
1472
1469
|
as: "label",
|
@@ -1493,7 +1490,7 @@ var StaticCard = react.forwardRef(
|
|
1493
1490
|
const styles2 = react.useStyleConfig("StaticCard", {
|
1494
1491
|
colorScheme
|
1495
1492
|
});
|
1496
|
-
return /* @__PURE__ */
|
1493
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { __css: styles2, ...props, ref }, children);
|
1497
1494
|
}
|
1498
1495
|
);
|
1499
1496
|
var PressableCard = react.forwardRef(
|
@@ -1501,20 +1498,20 @@ var PressableCard = react.forwardRef(
|
|
1501
1498
|
const styles2 = react.useStyleConfig("PressableCard", {
|
1502
1499
|
variant
|
1503
1500
|
});
|
1504
|
-
return /* @__PURE__ */
|
1501
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { __css: styles2, ...props, ref }, children);
|
1505
1502
|
}
|
1506
1503
|
);
|
1507
1504
|
var Accordion = react.forwardRef(
|
1508
1505
|
({ children, spacing: spacing2 = 2, ...props }, ref) => {
|
1509
1506
|
const defaultIndex = typeof props.defaultIndex === "number" && props.allowMultiple ? [props.defaultIndex] : props.defaultIndex;
|
1510
|
-
return /* @__PURE__ */
|
1507
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
1511
1508
|
react.Accordion,
|
1512
1509
|
{
|
1513
1510
|
...props,
|
1514
1511
|
ref,
|
1515
1512
|
defaultIndex
|
1516
1513
|
},
|
1517
|
-
/* @__PURE__ */
|
1514
|
+
/* @__PURE__ */ React84__namespace.default.createElement(Stack, { spacing: spacing2 }, children)
|
1518
1515
|
);
|
1519
1516
|
}
|
1520
1517
|
);
|
@@ -1529,7 +1526,7 @@ var Expandable = ({
|
|
1529
1526
|
},
|
1530
1527
|
...rest
|
1531
1528
|
}) => {
|
1532
|
-
return /* @__PURE__ */
|
1529
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
1533
1530
|
Accordion,
|
1534
1531
|
{
|
1535
1532
|
...rest,
|
@@ -1537,7 +1534,7 @@ var Expandable = ({
|
|
1537
1534
|
defaultIndex: defaultOpen ? 0 : void 0,
|
1538
1535
|
onChange: (expandedIndex) => onChange(expandedIndex === 0)
|
1539
1536
|
},
|
1540
|
-
/* @__PURE__ */
|
1537
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
1541
1538
|
ExpandableItem,
|
1542
1539
|
{
|
1543
1540
|
headingLevel,
|
@@ -1556,7 +1553,7 @@ var ExpandableItem = ({
|
|
1556
1553
|
...rest
|
1557
1554
|
}) => {
|
1558
1555
|
warnAboutMismatchingIcon({ icon: leftIcon });
|
1559
|
-
return /* @__PURE__ */
|
1556
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.AccordionItem, { ...rest }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: headingLevel }, /* @__PURE__ */ React84__namespace.default.createElement(react.AccordionButton, null, /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { alignItems: "center" }, leftIcon && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { marginRight: 1 }, leftIcon), title), /* @__PURE__ */ React84__namespace.default.createElement(react.AccordionIcon, null))), /* @__PURE__ */ React84__namespace.default.createElement(react.AccordionPanel, null, children));
|
1560
1557
|
};
|
1561
1558
|
var warnAboutMismatchingIcon = ({ icon }) => {
|
1562
1559
|
var _a, _b;
|
@@ -1591,15 +1588,15 @@ var Language = /* @__PURE__ */ ((Language3) => {
|
|
1591
1588
|
Language3["English"] = "en";
|
1592
1589
|
return Language3;
|
1593
1590
|
})(Language || {});
|
1594
|
-
var LanguageContext =
|
1591
|
+
var LanguageContext = React84.createContext(void 0);
|
1595
1592
|
function LanguageProvider({
|
1596
1593
|
language,
|
1597
1594
|
children
|
1598
1595
|
}) {
|
1599
|
-
return /* @__PURE__ */
|
1596
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(LanguageContext.Provider, { value: language }, children);
|
1600
1597
|
}
|
1601
1598
|
function useLanguage() {
|
1602
|
-
const language =
|
1599
|
+
const language = React84.useContext(LanguageContext);
|
1603
1600
|
if (!language) {
|
1604
1601
|
throw new Error("Please wrap your application in a LanguageProvider");
|
1605
1602
|
}
|
@@ -1617,8 +1614,8 @@ function createTexts(texts31) {
|
|
1617
1614
|
}
|
1618
1615
|
var hydrating = true;
|
1619
1616
|
function useHydrated() {
|
1620
|
-
let [hydrated, setHydrated] =
|
1621
|
-
|
1617
|
+
let [hydrated, setHydrated] = React84.useState(() => !hydrating);
|
1618
|
+
React84.useEffect(function hydrate() {
|
1622
1619
|
hydrating = false;
|
1623
1620
|
setHydrated(true);
|
1624
1621
|
}, []);
|
@@ -1628,11 +1625,11 @@ function useHydrated() {
|
|
1628
1625
|
// src/loader/ClientOnly.tsx
|
1629
1626
|
var ClientOnly = ({ children, fallback = null }) => {
|
1630
1627
|
const isHydrated = useHydrated();
|
1631
|
-
return /* @__PURE__ */
|
1628
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(React84__namespace.default.Fragment, null, isHydrated ? children() : fallback);
|
1632
1629
|
};
|
1633
1630
|
function Lottie({ animationData }) {
|
1634
1631
|
const { View } = lottieReact.useLottie({ animationData, loop: true });
|
1635
|
-
return /* @__PURE__ */
|
1632
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(React84__namespace.default.Fragment, null, View);
|
1636
1633
|
}
|
1637
1634
|
|
1638
1635
|
// src/loader/ColorInlineLoader.tsx
|
@@ -1641,7 +1638,7 @@ var ColorInlineLoader = ({
|
|
1641
1638
|
maxWidth,
|
1642
1639
|
...props
|
1643
1640
|
}) => {
|
1644
|
-
return /* @__PURE__ */
|
1641
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React84__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React84__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderColorData }))));
|
1645
1642
|
};
|
1646
1643
|
var ColorSpinner = ({
|
1647
1644
|
children,
|
@@ -1649,24 +1646,24 @@ var ColorSpinner = ({
|
|
1649
1646
|
maxWidth,
|
1650
1647
|
...props
|
1651
1648
|
}) => {
|
1652
|
-
return /* @__PURE__ */
|
1649
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React84__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React84__namespace.default.createElement(Lottie, { animationData: sporLoader.spinnerColorData }))), children && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { marginTop: 3, fontWeight: "bold" }, children));
|
1653
1650
|
};
|
1654
1651
|
var ContentLoader = ({ children, ...props }) => {
|
1655
|
-
return /* @__PURE__ */
|
1652
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { maxWidth: "140px", marginX: "auto" }, /* @__PURE__ */ React84__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React84__namespace.default.createElement(Lottie, { animationData: sporLoader.contentLoaderData }))), children && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { textAlign: "center", fontWeight: "bold" }, children));
|
1656
1653
|
};
|
1657
1654
|
var DarkFullScreenLoader = ({
|
1658
1655
|
width,
|
1659
1656
|
maxWidth,
|
1660
1657
|
...props
|
1661
1658
|
}) => {
|
1662
|
-
return /* @__PURE__ */
|
1659
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Center, { height: "100%", background: "darkTeal", ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React84__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React84__namespace.default.createElement(Lottie, { animationData: sporLoader.fullScreenLoaderWhiteData }))));
|
1663
1660
|
};
|
1664
1661
|
var DarkInlineLoader = ({
|
1665
1662
|
width,
|
1666
1663
|
maxWidth,
|
1667
1664
|
...props
|
1668
1665
|
}) => {
|
1669
|
-
return /* @__PURE__ */
|
1666
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React84__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React84__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderDarkData }))));
|
1670
1667
|
};
|
1671
1668
|
var DarkSpinner = ({
|
1672
1669
|
children,
|
@@ -1676,21 +1673,21 @@ var DarkSpinner = ({
|
|
1676
1673
|
}) => {
|
1677
1674
|
const { colorMode } = react.useColorMode();
|
1678
1675
|
const spinnerData = colorMode === "dark" ? sporLoader.spinnerLightData : sporLoader.spinnerDarkData;
|
1679
|
-
return /* @__PURE__ */
|
1676
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React84__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React84__namespace.default.createElement(Lottie, { animationData: spinnerData }))), children && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { marginTop: 3, fontWeight: "bold" }, children));
|
1680
1677
|
};
|
1681
1678
|
var LightFullScreenLoader = ({
|
1682
1679
|
width,
|
1683
1680
|
maxWidth,
|
1684
1681
|
...props
|
1685
1682
|
}) => {
|
1686
|
-
return /* @__PURE__ */
|
1683
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Center, { height: "100%", background: "white", ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React84__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React84__namespace.default.createElement(Lottie, { animationData: sporLoader.fullScreenLoaderBlackData }))));
|
1687
1684
|
};
|
1688
1685
|
var LightInlineLoader = ({
|
1689
1686
|
width,
|
1690
1687
|
maxWidth,
|
1691
1688
|
...props
|
1692
1689
|
}) => {
|
1693
|
-
return /* @__PURE__ */
|
1690
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Center, { ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React84__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React84__namespace.default.createElement(Lottie, { animationData: sporLoader.inlineLoaderLightData }))));
|
1694
1691
|
};
|
1695
1692
|
var LightSpinner = ({
|
1696
1693
|
children,
|
@@ -1698,14 +1695,14 @@ var LightSpinner = ({
|
|
1698
1695
|
maxWidth,
|
1699
1696
|
...props
|
1700
1697
|
}) => {
|
1701
|
-
return /* @__PURE__ */
|
1698
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width, maxWidth }, /* @__PURE__ */ React84__namespace.default.createElement(ClientOnly, null, () => /* @__PURE__ */ React84__namespace.default.createElement(Lottie, { animationData: sporLoader.spinnerLightData }))), children && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { marginTop: 3, fontWeight: "bold" }, children));
|
1702
1699
|
};
|
1703
1700
|
var useRotatingLabel = ({ label, delay }) => {
|
1704
|
-
const loadingTextArray =
|
1701
|
+
const loadingTextArray = React84.useMemo(
|
1705
1702
|
() => Array.isArray(label) ? label : [label],
|
1706
1703
|
[label]
|
1707
1704
|
);
|
1708
|
-
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] =
|
1705
|
+
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] = React84.useState(0);
|
1709
1706
|
react.useInterval(() => {
|
1710
1707
|
setCurrentLoadingTextIndex(
|
1711
1708
|
(prevIndex) => (prevIndex + 1) % loadingTextArray.length
|
@@ -1736,7 +1733,7 @@ var ProgressBar = ({
|
|
1736
1733
|
"aria-label": ariaLabel || t(texts7.label(value))
|
1737
1734
|
});
|
1738
1735
|
const styles2 = react.useMultiStyleConfig("ProgressBar", { isActive });
|
1739
|
-
return /* @__PURE__ */
|
1736
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(React84__namespace.default.Fragment, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
1740
1737
|
react.Box,
|
1741
1738
|
{
|
1742
1739
|
...progressBarProps,
|
@@ -1744,7 +1741,7 @@ var ProgressBar = ({
|
|
1744
1741
|
__css: styles2.container,
|
1745
1742
|
...rest
|
1746
1743
|
},
|
1747
|
-
/* @__PURE__ */
|
1744
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width, __css: styles2.background }, /* @__PURE__ */ React84__namespace.default.createElement(
|
1748
1745
|
react.Box,
|
1749
1746
|
{
|
1750
1747
|
__css: styles2.progress,
|
@@ -1752,7 +1749,7 @@ var ProgressBar = ({
|
|
1752
1749
|
width: isActive ? `${value}%` : "100%"
|
1753
1750
|
}
|
1754
1751
|
)),
|
1755
|
-
currentLoadingText && /* @__PURE__ */
|
1752
|
+
currentLoadingText && /* @__PURE__ */ React84__namespace.default.createElement(react.Text, { sx: styles2.description, ...labelProps }, currentLoadingText)
|
1756
1753
|
));
|
1757
1754
|
};
|
1758
1755
|
var texts7 = createTexts({
|
@@ -1782,11 +1779,11 @@ var ProgressLoader = ({
|
|
1782
1779
|
value,
|
1783
1780
|
"aria-label": ariaLabel ?? t(texts8.fallbackLabel(value ?? "?"))
|
1784
1781
|
});
|
1785
|
-
const pathRef =
|
1782
|
+
const pathRef = React84.useRef(null);
|
1786
1783
|
const progressPathLength = ((_a = pathRef.current) == null ? void 0 : _a.getTotalLength()) ?? 0;
|
1787
1784
|
const progress = (value - 100) / 100 * progressPathLength;
|
1788
|
-
const id =
|
1789
|
-
return /* @__PURE__ */
|
1785
|
+
const id = React84.useId();
|
1786
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...progressBarProps, minWidth: "100px", width, ...rest }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "svg", viewBox: "0 0 246 78", fill: "none" }, /* @__PURE__ */ React84__namespace.default.createElement(
|
1790
1787
|
react.Box,
|
1791
1788
|
{
|
1792
1789
|
as: "path",
|
@@ -1794,7 +1791,7 @@ var ProgressLoader = ({
|
|
1794
1791
|
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",
|
1795
1792
|
fill: "#FFB466"
|
1796
1793
|
}
|
1797
|
-
), /* @__PURE__ */
|
1794
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
1798
1795
|
react.Box,
|
1799
1796
|
{
|
1800
1797
|
as: "path",
|
@@ -1805,7 +1802,7 @@ var ProgressLoader = ({
|
|
1805
1802
|
strokeLinecap: "round",
|
1806
1803
|
strokeLinejoin: "round"
|
1807
1804
|
}
|
1808
|
-
), /* @__PURE__ */
|
1805
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
1809
1806
|
react.Box,
|
1810
1807
|
{
|
1811
1808
|
as: "path",
|
@@ -1820,7 +1817,7 @@ var ProgressLoader = ({
|
|
1820
1817
|
transition: "stroke-dashoffset .2s ease-out",
|
1821
1818
|
ref: pathRef
|
1822
1819
|
}
|
1823
|
-
), /* @__PURE__ */
|
1820
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
1824
1821
|
react.Box,
|
1825
1822
|
{
|
1826
1823
|
as: "path",
|
@@ -1828,7 +1825,7 @@ var ProgressLoader = ({
|
|
1828
1825
|
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",
|
1829
1826
|
fill: "#688CBA"
|
1830
1827
|
}
|
1831
|
-
)), currentLoadingText && /* @__PURE__ */
|
1828
|
+
)), currentLoadingText && /* @__PURE__ */ React84__namespace.default.createElement(
|
1832
1829
|
react.Text,
|
1833
1830
|
{
|
1834
1831
|
textAlign: "center",
|
@@ -1847,7 +1844,7 @@ var texts8 = createTexts({
|
|
1847
1844
|
en: `${value}% done`
|
1848
1845
|
})
|
1849
1846
|
});
|
1850
|
-
var Skeleton = react.forwardRef((props, ref) => /* @__PURE__ */
|
1847
|
+
var Skeleton = react.forwardRef((props, ref) => /* @__PURE__ */ React84__namespace.default.createElement(
|
1851
1848
|
react.Skeleton,
|
1852
1849
|
{
|
1853
1850
|
...props,
|
@@ -1857,8 +1854,8 @@ var Skeleton = react.forwardRef((props, ref) => /* @__PURE__ */ React85__namespa
|
|
1857
1854
|
role: "alert"
|
1858
1855
|
}
|
1859
1856
|
));
|
1860
|
-
var SkeletonCircle = (props) => /* @__PURE__ */
|
1861
|
-
var SkeletonText = (props) => /* @__PURE__ */
|
1857
|
+
var SkeletonCircle = (props) => /* @__PURE__ */ React84__namespace.default.createElement(react.SkeletonCircle, { boxSize: 6, borderRadius: "50%", ...props });
|
1858
|
+
var SkeletonText = (props) => /* @__PURE__ */ React84__namespace.default.createElement(react.SkeletonText, { boxSize: 6, ...props });
|
1862
1859
|
|
1863
1860
|
// src/button/Button.tsx
|
1864
1861
|
var Button2 = react.forwardRef((props, ref) => {
|
@@ -1888,7 +1885,7 @@ var Button2 = react.forwardRef((props, ref) => {
|
|
1888
1885
|
if (fontWeight) {
|
1889
1886
|
styles2.fontWeight = fontWeight;
|
1890
1887
|
}
|
1891
|
-
return /* @__PURE__ */
|
1888
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
1892
1889
|
react.Box,
|
1893
1890
|
{
|
1894
1891
|
...rest,
|
@@ -1902,7 +1899,7 @@ var Button2 = react.forwardRef((props, ref) => {
|
|
1902
1899
|
position: "relative",
|
1903
1900
|
fontFamily: "Vy Sans"
|
1904
1901
|
},
|
1905
|
-
isLoading && /* @__PURE__ */
|
1902
|
+
isLoading && /* @__PURE__ */ React84__namespace.default.createElement(react.Center, { position: "absolute", right: 0, left: 0, top: 1, bottom: 0 }, /* @__PURE__ */ React84__namespace.default.createElement(
|
1906
1903
|
ColorInlineLoader,
|
1907
1904
|
{
|
1908
1905
|
maxWidth: getLoaderWidth(finalSize),
|
@@ -1911,7 +1908,7 @@ var Button2 = react.forwardRef((props, ref) => {
|
|
1911
1908
|
marginY: 2
|
1912
1909
|
}
|
1913
1910
|
)),
|
1914
|
-
/* @__PURE__ */
|
1911
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
1915
1912
|
react.Flex,
|
1916
1913
|
{
|
1917
1914
|
gap: 1,
|
@@ -1921,7 +1918,7 @@ var Button2 = react.forwardRef((props, ref) => {
|
|
1921
1918
|
visibility: isLoading ? "hidden" : "visible",
|
1922
1919
|
"aria-hidden": isLoading
|
1923
1920
|
},
|
1924
|
-
/* @__PURE__ */
|
1921
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { gap: 1, alignItems: "center" }, leftIcon, /* @__PURE__ */ React84__namespace.default.createElement(
|
1925
1922
|
react.Box,
|
1926
1923
|
{
|
1927
1924
|
visibility: isLoading ? "hidden" : "visible",
|
@@ -1962,14 +1959,14 @@ var texts9 = createTexts({
|
|
1962
1959
|
sv: "Laddar\u2026"
|
1963
1960
|
}
|
1964
1961
|
});
|
1965
|
-
var ButtonGroup = react.forwardRef((props, ref) => /* @__PURE__ */
|
1962
|
+
var ButtonGroup = react.forwardRef((props, ref) => /* @__PURE__ */ React84__namespace.default.createElement(react.ButtonGroup, { ...props, ref }));
|
1966
1963
|
var IconButton = react.forwardRef(
|
1967
|
-
({ ...props }, ref) => /* @__PURE__ */
|
1964
|
+
({ ...props }, ref) => /* @__PURE__ */ React84__namespace.default.createElement(
|
1968
1965
|
react.IconButton,
|
1969
1966
|
{
|
1970
1967
|
title: props["aria-label"],
|
1971
1968
|
...props,
|
1972
|
-
spinner: /* @__PURE__ */
|
1969
|
+
spinner: /* @__PURE__ */ React84__namespace.default.createElement(ColorSpinner, { width: "80%", height: "80%", marginX: 1, marginTop: 1 }),
|
1973
1970
|
ref
|
1974
1971
|
}
|
1975
1972
|
)
|
@@ -1979,7 +1976,7 @@ var IconButton = react.forwardRef(
|
|
1979
1976
|
var CloseButton = react.forwardRef(
|
1980
1977
|
({ size = "sm", ...props }, ref) => {
|
1981
1978
|
const { t } = useTranslation();
|
1982
|
-
return /* @__PURE__ */
|
1979
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
1983
1980
|
IconButton,
|
1984
1981
|
{
|
1985
1982
|
ref,
|
@@ -1996,11 +1993,11 @@ var getIcon = (size) => {
|
|
1996
1993
|
switch (size) {
|
1997
1994
|
case "xs":
|
1998
1995
|
case "sm":
|
1999
|
-
return /* @__PURE__ */
|
1996
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.CloseFill18Icon, null);
|
2000
1997
|
case "md":
|
2001
|
-
return /* @__PURE__ */
|
1998
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.CloseFill24Icon, null);
|
2002
1999
|
case "lg":
|
2003
|
-
return /* @__PURE__ */
|
2000
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.CloseFill30Icon, null);
|
2004
2001
|
}
|
2005
2002
|
};
|
2006
2003
|
var texts10 = createTexts({
|
@@ -2022,11 +2019,11 @@ var FloatingActionButton = react.forwardRef(
|
|
2022
2019
|
placement = "bottom right",
|
2023
2020
|
...props
|
2024
2021
|
}, ref) => {
|
2025
|
-
const [isTextVisible, setIsTextVisible] =
|
2022
|
+
const [isTextVisible, setIsTextVisible] = React84__namespace.default.useState(
|
2026
2023
|
externalIsTextVisible !== void 0 ? externalIsTextVisible : false
|
2027
2024
|
);
|
2028
2025
|
const scrollDirection = useScrollDirection();
|
2029
|
-
|
2026
|
+
React84.useEffect(() => {
|
2030
2027
|
if (externalIsTextVisible !== void 0) {
|
2031
2028
|
return;
|
2032
2029
|
}
|
@@ -2036,7 +2033,7 @@ var FloatingActionButton = react.forwardRef(
|
|
2036
2033
|
);
|
2037
2034
|
return () => window.clearTimeout(id);
|
2038
2035
|
}, [scrollDirection, externalIsTextVisible]);
|
2039
|
-
|
2036
|
+
React84.useEffect(() => {
|
2040
2037
|
setIsTextVisible(!!externalIsTextVisible);
|
2041
2038
|
}, [externalIsTextVisible]);
|
2042
2039
|
const style = react.useMultiStyleConfig("FloatingActionButton", {
|
@@ -2044,7 +2041,7 @@ var FloatingActionButton = react.forwardRef(
|
|
2044
2041
|
isTextVisible,
|
2045
2042
|
placement
|
2046
2043
|
});
|
2047
|
-
return /* @__PURE__ */
|
2044
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
2048
2045
|
MotionBox,
|
2049
2046
|
{
|
2050
2047
|
__css: style.container,
|
@@ -2052,8 +2049,8 @@ var FloatingActionButton = react.forwardRef(
|
|
2052
2049
|
ref,
|
2053
2050
|
...props
|
2054
2051
|
},
|
2055
|
-
/* @__PURE__ */
|
2056
|
-
/* @__PURE__ */
|
2052
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { __css: style.icon }, icon),
|
2053
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
2057
2054
|
MotionBox,
|
2058
2055
|
{
|
2059
2056
|
animate: isTextVisible ? "show" : "hide",
|
@@ -2078,11 +2075,11 @@ var FloatingActionButton = react.forwardRef(
|
|
2078
2075
|
}
|
2079
2076
|
);
|
2080
2077
|
var useScrollDirection = () => {
|
2081
|
-
const [scrollDirection, setScrollDirection] =
|
2082
|
-
const lastScrollPosition =
|
2078
|
+
const [scrollDirection, setScrollDirection] = React84__namespace.default.useState(null);
|
2079
|
+
const lastScrollPosition = React84__namespace.default.useRef(
|
2083
2080
|
typeof window !== "undefined" ? window.scrollY : 0
|
2084
2081
|
);
|
2085
|
-
|
2082
|
+
React84__namespace.default.useEffect(() => {
|
2086
2083
|
const onScroll = () => {
|
2087
2084
|
const delta = window.scrollY - lastScrollPosition.current;
|
2088
2085
|
if (delta === 0) {
|
@@ -2101,7 +2098,7 @@ var useScrollDirection = () => {
|
|
2101
2098
|
var AlertIcon = ({ variant }) => {
|
2102
2099
|
const Icon = getIcon2(variant);
|
2103
2100
|
const { t } = useTranslation();
|
2104
|
-
return /* @__PURE__ */
|
2101
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
2105
2102
|
Icon,
|
2106
2103
|
{
|
2107
2104
|
flexShrink: 0,
|
@@ -2179,7 +2176,7 @@ var BaseAlert = ({
|
|
2179
2176
|
...boxProps
|
2180
2177
|
}) => {
|
2181
2178
|
const styles2 = react.useMultiStyleConfig("Alert", { variant });
|
2182
|
-
return /* @__PURE__ */
|
2179
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { __css: styles2.container, ...boxProps }, children);
|
2183
2180
|
};
|
2184
2181
|
|
2185
2182
|
// src/alert/ClosableAlert.tsx
|
@@ -2201,17 +2198,17 @@ var ClosableAlert = ({
|
|
2201
2198
|
externalOnClose();
|
2202
2199
|
onClose();
|
2203
2200
|
};
|
2204
|
-
return /* @__PURE__ */
|
2201
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(BaseAlert, { variant, ...boxProps }, /* @__PURE__ */ React84__namespace.default.createElement(
|
2205
2202
|
IconButton,
|
2206
2203
|
{
|
2207
2204
|
variant: "ghost",
|
2208
2205
|
size: "sm",
|
2209
2206
|
onClick: handleClose,
|
2210
|
-
icon: /* @__PURE__ */
|
2207
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
2211
2208
|
"aria-label": t(texts12.close),
|
2212
2209
|
sx: styles2.closeButton
|
2213
2210
|
}
|
2214
|
-
), /* @__PURE__ */
|
2211
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { direction: "column", gap: title ? 2 : void 0, textAlign: "left" }, title && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { fontWeight: "bold" }, title), /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { marginRight: 1 }, children)));
|
2215
2212
|
};
|
2216
2213
|
var texts12 = createTexts({
|
2217
2214
|
close: {
|
@@ -2232,7 +2229,7 @@ var ExpandableAlert = ({
|
|
2232
2229
|
...boxProps
|
2233
2230
|
}) => {
|
2234
2231
|
const styles2 = react.useMultiStyleConfig("AlertExpandable", { variant });
|
2235
|
-
return /* @__PURE__ */
|
2232
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(BaseAlert, { variant, ...boxProps, paddingX: 0, paddingY: 0 }, /* @__PURE__ */ React84__namespace.default.createElement(
|
2236
2233
|
react.Accordion,
|
2237
2234
|
{
|
2238
2235
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
@@ -2240,14 +2237,14 @@ var ExpandableAlert = ({
|
|
2240
2237
|
allowToggle: true,
|
2241
2238
|
flexGrow: "1"
|
2242
2239
|
},
|
2243
|
-
/* @__PURE__ */
|
2240
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.AccordionItem, { sx: styles2.accordion }, /* @__PURE__ */ React84__namespace.default.createElement(react.AccordionButton, { sx: styles2.container }, /* @__PURE__ */ React84__namespace.default.createElement(
|
2244
2241
|
react.Flex,
|
2245
2242
|
{
|
2246
2243
|
justifyContent: "space-between",
|
2247
2244
|
alignItems: "center",
|
2248
2245
|
flexGrow: "1"
|
2249
2246
|
},
|
2250
|
-
/* @__PURE__ */
|
2247
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { as: headingLevel, alignItems: "center" }, /* @__PURE__ */ React84__namespace.default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React84__namespace.default.createElement(
|
2251
2248
|
react.Box,
|
2252
2249
|
{
|
2253
2250
|
as: "span",
|
@@ -2262,13 +2259,13 @@ var ExpandableAlert = ({
|
|
2262
2259
|
},
|
2263
2260
|
title
|
2264
2261
|
)),
|
2265
|
-
/* @__PURE__ */
|
2262
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
2266
2263
|
react.AccordionIcon,
|
2267
2264
|
{
|
2268
2265
|
color: variant === "service" ? "white" : "darkGrey"
|
2269
2266
|
}
|
2270
2267
|
)
|
2271
|
-
)), /* @__PURE__ */
|
2268
|
+
)), /* @__PURE__ */ React84__namespace.default.createElement(react.AccordionPanel, { color: variant === "service" ? "white" : "darkGrey" }, children))
|
2272
2269
|
));
|
2273
2270
|
};
|
2274
2271
|
var StaticAlert = ({
|
@@ -2276,7 +2273,7 @@ var StaticAlert = ({
|
|
2276
2273
|
title,
|
2277
2274
|
...props
|
2278
2275
|
}) => {
|
2279
|
-
return /* @__PURE__ */
|
2276
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(BaseAlert, { ...props }, /* @__PURE__ */ React84__namespace.default.createElement(AlertIcon, { variant: props.variant }), /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { direction: "column", gap: title ? 2 : void 0, textAlign: "left" }, title && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { fontWeight: "bold" }, title), /* @__PURE__ */ React84__namespace.default.createElement(react.Box, null, children)));
|
2280
2277
|
};
|
2281
2278
|
var ServiceAlert = ({
|
2282
2279
|
variant = "service",
|
@@ -2292,7 +2289,7 @@ var ServiceAlert = ({
|
|
2292
2289
|
}) => {
|
2293
2290
|
const { t } = useTranslation();
|
2294
2291
|
const styles2 = react.useMultiStyleConfig("AlertService", { variant });
|
2295
|
-
return /* @__PURE__ */
|
2292
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
2296
2293
|
BaseAlert,
|
2297
2294
|
{
|
2298
2295
|
variant,
|
@@ -2301,7 +2298,7 @@ var ServiceAlert = ({
|
|
2301
2298
|
paddingY: 0,
|
2302
2299
|
sx: styles2.outerBox
|
2303
2300
|
},
|
2304
|
-
/* @__PURE__ */
|
2301
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
2305
2302
|
react.Accordion,
|
2306
2303
|
{
|
2307
2304
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
@@ -2311,7 +2308,7 @@ var ServiceAlert = ({
|
|
2311
2308
|
sx: { outline: "none" },
|
2312
2309
|
variant
|
2313
2310
|
},
|
2314
|
-
/* @__PURE__ */
|
2311
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.AccordionItem, null, /* @__PURE__ */ React84__namespace.default.createElement(react.AccordionButton, { sx: styles2.container }, /* @__PURE__ */ React84__namespace.default.createElement(
|
2315
2312
|
react.Stack,
|
2316
2313
|
{
|
2317
2314
|
flexDirection: "row",
|
@@ -2319,7 +2316,7 @@ var ServiceAlert = ({
|
|
2319
2316
|
width: "100%",
|
2320
2317
|
paddingX: 2
|
2321
2318
|
},
|
2322
|
-
/* @__PURE__ */
|
2319
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
2323
2320
|
react.Flex,
|
2324
2321
|
{
|
2325
2322
|
justifyContent: "space-between",
|
@@ -2327,7 +2324,7 @@ var ServiceAlert = ({
|
|
2327
2324
|
flexGrow: 1,
|
2328
2325
|
maxWidth: contentWidth
|
2329
2326
|
},
|
2330
|
-
/* @__PURE__ */
|
2327
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { as: headingLevel, alignItems: "center" }, notification === 1 && /* @__PURE__ */ React84__namespace.default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React84__namespace.default.createElement(
|
2331
2328
|
react.Box,
|
2332
2329
|
{
|
2333
2330
|
as: "span",
|
@@ -2341,9 +2338,9 @@ var ServiceAlert = ({
|
|
2341
2338
|
},
|
2342
2339
|
title
|
2343
2340
|
)),
|
2344
|
-
/* @__PURE__ */
|
2341
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { alignItems: "center" }, notification && /* @__PURE__ */ React84__namespace.default.createElement(react.Text, { sx: styles2.notificationText }, t(texts13.notification(notification))), /* @__PURE__ */ React84__namespace.default.createElement(react.AccordionIcon, null))
|
2345
2342
|
)
|
2346
|
-
)), /* @__PURE__ */
|
2343
|
+
)), /* @__PURE__ */ React84__namespace.default.createElement(react.AccordionPanel, { sx: styles2.serviceMessageContent }, /* @__PURE__ */ React84__namespace.default.createElement(react.Stack, { flexDirection: "row", justifyContent: "center", width: "100%" }, /* @__PURE__ */ React84__namespace.default.createElement(
|
2347
2344
|
react.Stack,
|
2348
2345
|
{
|
2349
2346
|
justifyContent: "center",
|
@@ -2381,10 +2378,10 @@ var texts13 = createTexts({
|
|
2381
2378
|
});
|
2382
2379
|
var Breadcrumb = (props) => {
|
2383
2380
|
const iconColor = react.useColorModeValue("blackAlpha.400", "whiteAlpha.400");
|
2384
|
-
return /* @__PURE__ */
|
2381
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
2385
2382
|
react.Breadcrumb,
|
2386
2383
|
{
|
2387
|
-
separator: /* @__PURE__ */
|
2384
|
+
separator: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, { color: iconColor }),
|
2388
2385
|
...props
|
2389
2386
|
}
|
2390
2387
|
);
|
@@ -2393,7 +2390,7 @@ var BreadcrumbItem = react.BreadcrumbItem;
|
|
2393
2390
|
var BreadcrumbLink = react.BreadcrumbLink;
|
2394
2391
|
var Badge = react.forwardRef(
|
2395
2392
|
({ icon, colorScheme = "grey", children, ...props }, ref) => {
|
2396
|
-
return /* @__PURE__ */
|
2393
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
2397
2394
|
react.Badge,
|
2398
2395
|
{
|
2399
2396
|
colorScheme,
|
@@ -2401,12 +2398,12 @@ var Badge = react.forwardRef(
|
|
2401
2398
|
paddingLeft: icon ? 1 : void 0,
|
2402
2399
|
ref
|
2403
2400
|
},
|
2404
|
-
icon &&
|
2401
|
+
icon && React84__namespace.default.cloneElement(icon, { marginRight: 1 }),
|
2405
2402
|
children
|
2406
2403
|
);
|
2407
2404
|
}
|
2408
2405
|
);
|
2409
|
-
var Code = react.forwardRef((props, ref) => /* @__PURE__ */
|
2406
|
+
var Code = react.forwardRef((props, ref) => /* @__PURE__ */ React84__namespace.default.createElement(react.Code, { ...props, ref }));
|
2410
2407
|
var Heading2 = ({
|
2411
2408
|
as,
|
2412
2409
|
variant = "xl-display",
|
@@ -2416,11 +2413,11 @@ var Heading2 = ({
|
|
2416
2413
|
}) => {
|
2417
2414
|
const id = externalId ?? (autoId && typeof props.children === "string" ? slugify(props.children) : void 0);
|
2418
2415
|
const color = react.useColorModeValue("text.primary.light", "text.primary.dark");
|
2419
|
-
return /* @__PURE__ */
|
2416
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Text, { as, textStyle: variant, id, color, ...props });
|
2420
2417
|
};
|
2421
2418
|
var Text5 = react.forwardRef(
|
2422
2419
|
({ variant = "sm", ...props }, ref) => {
|
2423
|
-
return /* @__PURE__ */
|
2420
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Text, { ...props, textStyle: variant, ref });
|
2424
2421
|
}
|
2425
2422
|
);
|
2426
2423
|
function CalendarCell({
|
@@ -2429,7 +2426,7 @@ function CalendarCell({
|
|
2429
2426
|
currentMonth,
|
2430
2427
|
variant
|
2431
2428
|
}) {
|
2432
|
-
const ref =
|
2429
|
+
const ref = React84.useRef(null);
|
2433
2430
|
const {
|
2434
2431
|
cellProps,
|
2435
2432
|
buttonProps,
|
@@ -2453,7 +2450,7 @@ function CalendarCell({
|
|
2453
2450
|
if (isOutsideMonth) {
|
2454
2451
|
stateProps["data-unavailable"] = true;
|
2455
2452
|
}
|
2456
|
-
|
2453
|
+
React84.useEffect(() => {
|
2457
2454
|
var _a;
|
2458
2455
|
(_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.addEventListener(
|
2459
2456
|
"touchend",
|
@@ -2463,7 +2460,7 @@ function CalendarCell({
|
|
2463
2460
|
{ passive: false, once: true }
|
2464
2461
|
);
|
2465
2462
|
}, []);
|
2466
|
-
return /* @__PURE__ */
|
2463
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "td", ...cellProps, textAlign: "center", sx: styles2.cell }, /* @__PURE__ */ React84__namespace.default.createElement(
|
2467
2464
|
react.Box,
|
2468
2465
|
{
|
2469
2466
|
as: "button",
|
@@ -2525,8 +2522,8 @@ function CalendarGrid({
|
|
2525
2522
|
const weeksInMonth = date.getWeeksInMonth(state.visibleRange.start, locale);
|
2526
2523
|
const weeksInMonthRange = new Array(weeksInMonth).fill(0).map((_, i) => i);
|
2527
2524
|
const styles2 = react.useMultiStyleConfig("Datepicker", { variant });
|
2528
|
-
return /* @__PURE__ */
|
2529
|
-
return /* @__PURE__ */
|
2525
|
+
return /* @__PURE__ */ React84__namespace.default.createElement("table", { ...gridProps }, /* @__PURE__ */ React84__namespace.default.createElement("thead", { ...headerProps }, /* @__PURE__ */ React84__namespace.default.createElement("tr", null, weekDays[language].map((day, index) => {
|
2526
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
2530
2527
|
Text5,
|
2531
2528
|
{
|
2532
2529
|
as: "th",
|
@@ -2536,8 +2533,8 @@ function CalendarGrid({
|
|
2536
2533
|
},
|
2537
2534
|
day
|
2538
2535
|
);
|
2539
|
-
}))), /* @__PURE__ */
|
2540
|
-
(date, dayIndex) => date ? /* @__PURE__ */
|
2536
|
+
}))), /* @__PURE__ */ React84__namespace.default.createElement("tbody", null, weeksInMonthRange.map((weekIndex) => /* @__PURE__ */ React84__namespace.default.createElement("tr", { key: weekIndex }, state.getDatesInWeek(weekIndex, startDate).map(
|
2537
|
+
(date, dayIndex) => date ? /* @__PURE__ */ React84__namespace.default.createElement(
|
2541
2538
|
CalendarCell,
|
2542
2539
|
{
|
2543
2540
|
variant,
|
@@ -2546,7 +2543,7 @@ function CalendarGrid({
|
|
2546
2543
|
date,
|
2547
2544
|
currentMonth: startDate
|
2548
2545
|
}
|
2549
|
-
) : /* @__PURE__ */
|
2546
|
+
) : /* @__PURE__ */ React84__namespace.default.createElement("td", { key: dayIndex })
|
2550
2547
|
)))));
|
2551
2548
|
}
|
2552
2549
|
function CalendarNavigationButton({
|
@@ -2554,9 +2551,9 @@ function CalendarNavigationButton({
|
|
2554
2551
|
"aria-label": ariaLabel,
|
2555
2552
|
...rest
|
2556
2553
|
}) {
|
2557
|
-
const ref =
|
2554
|
+
const ref = React84.useRef(null);
|
2558
2555
|
const { buttonProps } = reactAria.useButton(rest, ref);
|
2559
|
-
return /* @__PURE__ */
|
2556
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
2560
2557
|
IconButton,
|
2561
2558
|
{
|
2562
2559
|
...buttonProps,
|
@@ -2590,7 +2587,7 @@ function CalendarHeader({
|
|
2590
2587
|
);
|
2591
2588
|
const areAllOtherYearsDisabled = isPreviousYearDisabled && isNextYearDisabled;
|
2592
2589
|
const isYearPickerVisible = showYearNavigation && !areAllOtherYearsDisabled;
|
2593
|
-
return /* @__PURE__ */
|
2590
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { alignItems: "center", paddingBottom: "4", justifyContent: "space-between" }, /* @__PURE__ */ React84__namespace.default.createElement(
|
2594
2591
|
CalendarNavigator,
|
2595
2592
|
{
|
2596
2593
|
title: title ? title : isYearPickerVisible ? monthTitle : monthAndYearTitle,
|
@@ -2600,7 +2597,7 @@ function CalendarHeader({
|
|
2600
2597
|
isNextDisabled: !state.isPreviousVisibleRangeInvalid,
|
2601
2598
|
isPreviousDisabled: !state.isNextVisibleRangeInvalid
|
2602
2599
|
}
|
2603
|
-
), isYearPickerVisible && /* @__PURE__ */
|
2600
|
+
), isYearPickerVisible && /* @__PURE__ */ React84__namespace.default.createElement(
|
2604
2601
|
CalendarNavigator,
|
2605
2602
|
{
|
2606
2603
|
title: jsDate.getFullYear().toString(),
|
@@ -2622,15 +2619,15 @@ var CalendarNavigator = ({
|
|
2622
2619
|
isNextDisabled
|
2623
2620
|
}) => {
|
2624
2621
|
const { t } = useTranslation();
|
2625
|
-
return /* @__PURE__ */
|
2622
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { alignItems: "center", flexGrow: 1 }, /* @__PURE__ */ React84__namespace.default.createElement(
|
2626
2623
|
CalendarNavigationButton,
|
2627
2624
|
{
|
2628
2625
|
onPress: onPrevious,
|
2629
2626
|
isDisabled: isPreviousDisabled,
|
2630
|
-
icon: /* @__PURE__ */
|
2627
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.ArrowLeftOutline24Icon, null),
|
2631
2628
|
"aria-label": `${t(texts14.previous)} ${t(texts14[unit])}`
|
2632
2629
|
}
|
2633
|
-
), /* @__PURE__ */
|
2630
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
2634
2631
|
react.Box,
|
2635
2632
|
{
|
2636
2633
|
role: "heading",
|
@@ -2640,12 +2637,12 @@ var CalendarNavigator = ({
|
|
2640
2637
|
textAlign: "center"
|
2641
2638
|
},
|
2642
2639
|
capitalize(title)
|
2643
|
-
), /* @__PURE__ */
|
2640
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
2644
2641
|
CalendarNavigationButton,
|
2645
2642
|
{
|
2646
2643
|
onPress: onNext,
|
2647
2644
|
isDisabled: isNextDisabled,
|
2648
|
-
icon: /* @__PURE__ */
|
2645
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.ArrowRightOutline24Icon, null),
|
2649
2646
|
"aria-label": `${t(texts14.next)} ${t(texts14[unit])}`
|
2650
2647
|
}
|
2651
2648
|
));
|
@@ -2693,7 +2690,7 @@ function Calendar({
|
|
2693
2690
|
const { calendarProps } = reactAria.useCalendar(props, state);
|
2694
2691
|
const calendarAriaLabel = calendarProps["aria-label"];
|
2695
2692
|
const ariaLabel = t(texts15.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
|
2696
|
-
return /* @__PURE__ */
|
2693
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...calendarProps, "aria-label": ariaLabel }, /* @__PURE__ */ React84__namespace.default.createElement(CalendarHeader, { state, showYearNavigation }), /* @__PURE__ */ React84__namespace.default.createElement(CalendarGrid, { variant, state }));
|
2697
2694
|
}
|
2698
2695
|
var texts15 = createTexts({
|
2699
2696
|
calendar: {
|
@@ -2714,12 +2711,12 @@ var CalendarTriggerButton = react.forwardRef(
|
|
2714
2711
|
onPress == null ? void 0 : onPress(event);
|
2715
2712
|
}
|
2716
2713
|
};
|
2717
|
-
return /* @__PURE__ */
|
2714
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
2718
2715
|
IconButton,
|
2719
2716
|
{
|
2720
2717
|
ref,
|
2721
2718
|
role: "button",
|
2722
|
-
icon: /* @__PURE__ */
|
2719
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.CalendarOutline24Icon, null),
|
2723
2720
|
"aria-label": t(texts16.openCalendar),
|
2724
2721
|
sx: styles2.calendarTriggerButton,
|
2725
2722
|
variant: "ghost",
|
@@ -2739,9 +2736,9 @@ var texts16 = createTexts({
|
|
2739
2736
|
en: "Open calendar"
|
2740
2737
|
}
|
2741
2738
|
});
|
2742
|
-
var DateTimeSegment =
|
2739
|
+
var DateTimeSegment = React84.forwardRef(
|
2743
2740
|
({ segment, state, ariaLabel, ariaDescription }, externalRef) => {
|
2744
|
-
const internalRef =
|
2741
|
+
const internalRef = React84.useRef(null);
|
2745
2742
|
const ref = externalRef ?? internalRef;
|
2746
2743
|
const { segmentProps } = reactAria.useDateSegment(
|
2747
2744
|
segment,
|
@@ -2752,7 +2749,7 @@ var DateTimeSegment = React85.forwardRef(
|
|
2752
2749
|
isPlaceholder: segment.isPlaceholder,
|
2753
2750
|
isEditable: segment.isEditable
|
2754
2751
|
});
|
2755
|
-
return /* @__PURE__ */
|
2752
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
2756
2753
|
react.Box,
|
2757
2754
|
{
|
2758
2755
|
...segmentProps,
|
@@ -2784,7 +2781,7 @@ function createCalendar2(identifier) {
|
|
2784
2781
|
throw new Error(`Unsupported calendar ${identifier}`);
|
2785
2782
|
}
|
2786
2783
|
}
|
2787
|
-
var DateField =
|
2784
|
+
var DateField = React84.forwardRef(
|
2788
2785
|
({ labelId, ...props }, externalRef) => {
|
2789
2786
|
var _a;
|
2790
2787
|
const locale = useCurrentLocale();
|
@@ -2795,14 +2792,14 @@ var DateField = React85.forwardRef(
|
|
2795
2792
|
createCalendar: createCalendar2
|
2796
2793
|
});
|
2797
2794
|
const { t } = useTranslation();
|
2798
|
-
const internalRef =
|
2795
|
+
const internalRef = React84.useRef(null);
|
2799
2796
|
const ref = externalRef ?? internalRef;
|
2800
2797
|
const { fieldProps } = reactAria.useDateField(
|
2801
2798
|
props,
|
2802
2799
|
state,
|
2803
2800
|
ref
|
2804
2801
|
);
|
2805
|
-
return /* @__PURE__ */
|
2802
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { minWidth: "6rem", width: "100%" }, props.label && /* @__PURE__ */ React84__namespace.default.createElement(
|
2806
2803
|
react.FormLabel,
|
2807
2804
|
{
|
2808
2805
|
sx: styles2.inputLabel,
|
@@ -2811,7 +2808,7 @@ var DateField = React85.forwardRef(
|
|
2811
2808
|
id: labelId
|
2812
2809
|
},
|
2813
2810
|
props.label
|
2814
|
-
), /* @__PURE__ */
|
2811
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5" }, state.segments.map((segment, i) => /* @__PURE__ */ React84__namespace.default.createElement(
|
2815
2812
|
DateTimeSegment,
|
2816
2813
|
{
|
2817
2814
|
key: i,
|
@@ -2820,7 +2817,7 @@ var DateField = React85.forwardRef(
|
|
2820
2817
|
ariaLabel: labelId,
|
2821
2818
|
state
|
2822
2819
|
}
|
2823
|
-
))), /* @__PURE__ */
|
2820
|
+
))), /* @__PURE__ */ React84__namespace.default.createElement(
|
2824
2821
|
"input",
|
2825
2822
|
{
|
2826
2823
|
type: "hidden",
|
@@ -2868,7 +2865,7 @@ var StyledField = react.forwardRef(
|
|
2868
2865
|
isInvalid: false
|
2869
2866
|
};
|
2870
2867
|
const styles2 = react.useMultiStyleConfig("Datepicker", { variant });
|
2871
|
-
return /* @__PURE__ */
|
2868
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
2872
2869
|
react.Box,
|
2873
2870
|
{
|
2874
2871
|
...otherProps,
|
@@ -2884,7 +2881,7 @@ var StyledField = react.forwardRef(
|
|
2884
2881
|
);
|
2885
2882
|
|
2886
2883
|
// src/datepicker/DatePicker.tsx
|
2887
|
-
var DatePicker =
|
2884
|
+
var DatePicker = React84.forwardRef(
|
2888
2885
|
({
|
2889
2886
|
variant,
|
2890
2887
|
errorMessage,
|
@@ -2902,7 +2899,7 @@ var DatePicker = React85.forwardRef(
|
|
2902
2899
|
isRequired: props.isRequired ?? (formControlProps == null ? void 0 : formControlProps.isRequired),
|
2903
2900
|
validationState: (formControlProps == null ? void 0 : formControlProps.isInvalid) ? "invalid" : "valid"
|
2904
2901
|
});
|
2905
|
-
const internalRef =
|
2902
|
+
const internalRef = React84.useRef(null);
|
2906
2903
|
const ref = externalRef ?? internalRef;
|
2907
2904
|
const {
|
2908
2905
|
labelProps,
|
@@ -2916,14 +2913,14 @@ var DatePicker = React85.forwardRef(
|
|
2916
2913
|
state,
|
2917
2914
|
ref
|
2918
2915
|
);
|
2919
|
-
const labelId = `label-${
|
2920
|
-
const inputGroupId = `input-group-${
|
2916
|
+
const labelId = `label-${React84.useId()}`;
|
2917
|
+
const inputGroupId = `input-group-${React84.useId()}`;
|
2921
2918
|
const styles2 = react.useMultiStyleConfig("Datepicker", { variant });
|
2922
2919
|
const locale = useCurrentLocale();
|
2923
2920
|
const onFieldClick = () => {
|
2924
2921
|
state.setOpen(true);
|
2925
2922
|
};
|
2926
|
-
const popoverContent = /* @__PURE__ */
|
2923
|
+
const popoverContent = /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverContent, { color: "darkGrey", sx: styles2.calendarPopover }, /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverArrow, { sx: styles2.arrow }), /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React84__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
2927
2924
|
Calendar,
|
2928
2925
|
{
|
2929
2926
|
...calendarProps,
|
@@ -2931,7 +2928,7 @@ var DatePicker = React85.forwardRef(
|
|
2931
2928
|
showYearNavigation
|
2932
2929
|
}
|
2933
2930
|
))));
|
2934
|
-
return /* @__PURE__ */
|
2931
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React84__namespace.default.createElement(
|
2935
2932
|
react.Box,
|
2936
2933
|
{
|
2937
2934
|
position: "relative",
|
@@ -2939,7 +2936,7 @@ var DatePicker = React85.forwardRef(
|
|
2939
2936
|
flexDirection: "column",
|
2940
2937
|
width
|
2941
2938
|
},
|
2942
|
-
/* @__PURE__ */
|
2939
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
2943
2940
|
react.Popover,
|
2944
2941
|
{
|
2945
2942
|
...dialogProps,
|
@@ -2948,14 +2945,14 @@ var DatePicker = React85.forwardRef(
|
|
2948
2945
|
onClose: state.close,
|
2949
2946
|
flip: false
|
2950
2947
|
},
|
2951
|
-
/* @__PURE__ */
|
2948
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
2952
2949
|
react.InputGroup,
|
2953
2950
|
{
|
2954
2951
|
display: "inline-flex",
|
2955
2952
|
id: inputGroupId,
|
2956
2953
|
"aria-labelledby": labelId
|
2957
2954
|
},
|
2958
|
-
/* @__PURE__ */
|
2955
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
2959
2956
|
StyledField,
|
2960
2957
|
{
|
2961
2958
|
variant,
|
@@ -2965,7 +2962,7 @@ var DatePicker = React85.forwardRef(
|
|
2965
2962
|
isDisabled: props.isDisabled,
|
2966
2963
|
ariaLabelledby: labelId
|
2967
2964
|
},
|
2968
|
-
/* @__PURE__ */
|
2965
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
2969
2966
|
CalendarTriggerButton,
|
2970
2967
|
{
|
2971
2968
|
variant,
|
@@ -2975,7 +2972,7 @@ var DatePicker = React85.forwardRef(
|
|
2975
2972
|
...buttonProps
|
2976
2973
|
}
|
2977
2974
|
)),
|
2978
|
-
/* @__PURE__ */
|
2975
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
2979
2976
|
DateField,
|
2980
2977
|
{
|
2981
2978
|
label: props.label,
|
@@ -2987,8 +2984,8 @@ var DatePicker = React85.forwardRef(
|
|
2987
2984
|
)
|
2988
2985
|
))
|
2989
2986
|
),
|
2990
|
-
/* @__PURE__ */
|
2991
|
-
state.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */
|
2987
|
+
/* @__PURE__ */ React84__namespace.default.createElement(FormErrorMessage, { ...errorMessageProps }, errorMessage),
|
2988
|
+
state.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React84__namespace.default.createElement(react.Portal, null, popoverContent),
|
2992
2989
|
state.isOpen && !props.isDisabled && !withPortal && popoverContent
|
2993
2990
|
)
|
2994
2991
|
));
|
@@ -3002,9 +2999,9 @@ function RangeCalendar(props) {
|
|
3002
2999
|
locale,
|
3003
3000
|
createCalendar: date.createCalendar
|
3004
3001
|
});
|
3005
|
-
const ref =
|
3002
|
+
const ref = React84.useRef(null);
|
3006
3003
|
const { calendarProps, title } = reactAria.useRangeCalendar(props, state, ref);
|
3007
|
-
return /* @__PURE__ */
|
3004
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...calendarProps, ref }, /* @__PURE__ */ React84__namespace.default.createElement(CalendarHeader, { state, title }), /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { display: "flex", gap: "8" }, /* @__PURE__ */ React84__namespace.default.createElement(CalendarGrid, { variant: props.variant, state }), /* @__PURE__ */ React84__namespace.default.createElement(
|
3008
3005
|
CalendarGrid,
|
3009
3006
|
{
|
3010
3007
|
variant: props.variant,
|
@@ -3030,7 +3027,7 @@ function DateRangePicker({
|
|
3030
3027
|
isRequired: props.isRequired ?? (formControlProps == null ? void 0 : formControlProps.isRequired),
|
3031
3028
|
validationState: formControlProps.isInvalid ? "invalid" : "valid"
|
3032
3029
|
});
|
3033
|
-
const ref =
|
3030
|
+
const ref = React84.useRef(null);
|
3034
3031
|
const {
|
3035
3032
|
groupProps,
|
3036
3033
|
labelProps,
|
@@ -3051,8 +3048,8 @@ function DateRangePicker({
|
|
3051
3048
|
const onFieldClick = () => {
|
3052
3049
|
state.setOpen(true);
|
3053
3050
|
};
|
3054
|
-
const popoverContent = /* @__PURE__ */
|
3055
|
-
return /* @__PURE__ */
|
3051
|
+
const popoverContent = /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverContent, { sx: styles2.calendarPopover, maxWidth: "none" }, /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverArrow, { sx: styles2.arrow }), /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React84__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React84__namespace.default.createElement(RangeCalendar, { variant: "base", ...calendarProps }))));
|
3052
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React84__namespace.default.createElement(react.FormLabel, { ...labelProps, sx: styles2.inputLabel }, props.label), /* @__PURE__ */ React84__namespace.default.createElement(
|
3056
3053
|
react.Popover,
|
3057
3054
|
{
|
3058
3055
|
...dialogProps,
|
@@ -3061,7 +3058,7 @@ function DateRangePicker({
|
|
3061
3058
|
onClose: state.close,
|
3062
3059
|
flip: false
|
3063
3060
|
},
|
3064
|
-
/* @__PURE__ */
|
3061
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.InputGroup, { ...groupProps, width: "auto", display: "inline-flex" }, /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
3065
3062
|
StyledField,
|
3066
3063
|
{
|
3067
3064
|
alignItems: "center",
|
@@ -3071,7 +3068,7 @@ function DateRangePicker({
|
|
3071
3068
|
onKeyPress: handleEnterClick,
|
3072
3069
|
minHeight
|
3073
3070
|
},
|
3074
|
-
variant && /* @__PURE__ */
|
3071
|
+
variant && /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
3075
3072
|
CalendarTriggerButton,
|
3076
3073
|
{
|
3077
3074
|
paddingLeft: 1,
|
@@ -3081,7 +3078,7 @@ function DateRangePicker({
|
|
3081
3078
|
...buttonProps
|
3082
3079
|
}
|
3083
3080
|
)),
|
3084
|
-
/* @__PURE__ */
|
3081
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3085
3082
|
DateField,
|
3086
3083
|
{
|
3087
3084
|
...startFieldProps,
|
@@ -3090,8 +3087,8 @@ function DateRangePicker({
|
|
3090
3087
|
labelProps
|
3091
3088
|
}
|
3092
3089
|
),
|
3093
|
-
/* @__PURE__ */
|
3094
|
-
/* @__PURE__ */
|
3090
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "span", "aria-hidden": "true", paddingRight: "2" }, "\u2013"),
|
3091
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3095
3092
|
DateField,
|
3096
3093
|
{
|
3097
3094
|
...endFieldProps,
|
@@ -3101,14 +3098,14 @@ function DateRangePicker({
|
|
3101
3098
|
}
|
3102
3099
|
)
|
3103
3100
|
))),
|
3104
|
-
state.isOpen && withPortal && /* @__PURE__ */
|
3101
|
+
state.isOpen && withPortal && /* @__PURE__ */ React84__namespace.default.createElement(react.Portal, null, popoverContent),
|
3105
3102
|
state.isOpen && !withPortal && popoverContent
|
3106
3103
|
)));
|
3107
3104
|
}
|
3108
3105
|
var TimeField = ({ state, ...props }) => {
|
3109
|
-
const ref =
|
3106
|
+
const ref = React84.useRef(null);
|
3110
3107
|
const { labelProps, fieldProps } = reactAria.useTimeField(props, state, ref);
|
3111
|
-
return /* @__PURE__ */
|
3108
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, null, /* @__PURE__ */ React84__namespace.default.createElement(
|
3112
3109
|
FormLabel,
|
3113
3110
|
{
|
3114
3111
|
...labelProps,
|
@@ -3120,7 +3117,7 @@ var TimeField = ({ state, ...props }) => {
|
|
3120
3117
|
paddingTop: "2px"
|
3121
3118
|
},
|
3122
3119
|
props.label
|
3123
|
-
), /* @__PURE__ */
|
3120
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5" }, state.segments.map((segment) => /* @__PURE__ */ React84__namespace.default.createElement(DateTimeSegment, { key: segment.type, segment, state }))), /* @__PURE__ */ React84__namespace.default.createElement(
|
3124
3121
|
"input",
|
3125
3122
|
{
|
3126
3123
|
type: "hidden",
|
@@ -3189,7 +3186,7 @@ var TimePicker = ({
|
|
3189
3186
|
const ariaLabel = `${inputLabel} \u2013 ${t(
|
3190
3187
|
texts18.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
|
3191
3188
|
)}`;
|
3192
|
-
return /* @__PURE__ */
|
3189
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
3193
3190
|
StyledField,
|
3194
3191
|
{
|
3195
3192
|
variant: "base",
|
@@ -3205,7 +3202,7 @@ var TimePicker = ({
|
|
3205
3202
|
"aria-label": ariaLabel,
|
3206
3203
|
...boxProps
|
3207
3204
|
},
|
3208
|
-
/* @__PURE__ */
|
3205
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3209
3206
|
IconButton,
|
3210
3207
|
{
|
3211
3208
|
variant: "ghost",
|
@@ -3213,14 +3210,14 @@ var TimePicker = ({
|
|
3213
3210
|
borderRadius: "xs",
|
3214
3211
|
"aria-label": backwardsLabel,
|
3215
3212
|
title: backwardsLabel,
|
3216
|
-
icon: /* @__PURE__ */
|
3213
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.DropdownLeftFill18Icon, null),
|
3217
3214
|
onClick: handleBackwardsClick,
|
3218
3215
|
isDisabled,
|
3219
3216
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
3220
3217
|
}
|
3221
3218
|
),
|
3222
|
-
/* @__PURE__ */
|
3223
|
-
/* @__PURE__ */
|
3219
|
+
/* @__PURE__ */ React84__namespace.default.createElement(TimeField, { label, state, name }),
|
3220
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3224
3221
|
IconButton,
|
3225
3222
|
{
|
3226
3223
|
variant: "ghost",
|
@@ -3228,7 +3225,7 @@ var TimePicker = ({
|
|
3228
3225
|
borderRadius: "xs",
|
3229
3226
|
"aria-label": forwardsLabel,
|
3230
3227
|
title: forwardsLabel,
|
3231
|
-
icon: /* @__PURE__ */
|
3228
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, null),
|
3232
3229
|
onClick: handleForwardClick,
|
3233
3230
|
isDisabled,
|
3234
3231
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
@@ -3330,7 +3327,7 @@ var LineIcon = ({
|
|
3330
3327
|
if (!Icon) {
|
3331
3328
|
return null;
|
3332
3329
|
}
|
3333
|
-
return /* @__PURE__ */
|
3330
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: { ...styles2.iconContainer, ...sx } }, /* @__PURE__ */ React84__namespace.default.createElement(Icon, { sx: styles2.icon }));
|
3334
3331
|
};
|
3335
3332
|
|
3336
3333
|
// src/linjetag/InfoTag.tsx
|
@@ -3346,7 +3343,7 @@ var InfoTag = ({
|
|
3346
3343
|
size,
|
3347
3344
|
...customProps
|
3348
3345
|
});
|
3349
|
-
return /* @__PURE__ */
|
3346
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: styles2.container }, /* @__PURE__ */ React84__namespace.default.createElement(
|
3350
3347
|
LineIcon,
|
3351
3348
|
{
|
3352
3349
|
variant,
|
@@ -3354,7 +3351,7 @@ var InfoTag = ({
|
|
3354
3351
|
sx: styles2.iconContainer,
|
3355
3352
|
...customProps
|
3356
3353
|
}
|
3357
|
-
), /* @__PURE__ */
|
3354
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: styles2.textContainer }, title && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "span", sx: styles2.title }, title), title && description && " ", description && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "span", sx: styles2.description }, description)));
|
3358
3355
|
};
|
3359
3356
|
var TravelTag = react.forwardRef(
|
3360
3357
|
({
|
@@ -3377,7 +3374,7 @@ var TravelTag = react.forwardRef(
|
|
3377
3374
|
backgroundColor: variant === "custom" ? backgroundColor : void 0
|
3378
3375
|
});
|
3379
3376
|
const DeviationLevelIcon = getDeviationLevelIcon({ deviationLevel, size });
|
3380
|
-
return /* @__PURE__ */
|
3377
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: styles2.container, "aria-disabled": isDisabled, ref, ...rest }, /* @__PURE__ */ React84__namespace.default.createElement(
|
3381
3378
|
LineIcon,
|
3382
3379
|
{
|
3383
3380
|
variant,
|
@@ -3388,7 +3385,7 @@ var TravelTag = react.forwardRef(
|
|
3388
3385
|
customIconVariant,
|
3389
3386
|
...rest
|
3390
3387
|
}
|
3391
|
-
), /* @__PURE__ */
|
3388
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: styles2.textContainer }, title && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "span", sx: styles2.title }, title), title && description && " ", description && /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "span", sx: styles2.description }, description)), DeviationLevelIcon && /* @__PURE__ */ React84__namespace.default.createElement(DeviationLevelIcon, { sx: styles2.deviationIcon }));
|
3392
3389
|
}
|
3393
3390
|
);
|
3394
3391
|
var getDeviationLevelIcon = ({
|
@@ -3412,7 +3409,7 @@ var TextLink = react.forwardRef(
|
|
3412
3409
|
var _a;
|
3413
3410
|
const { t } = useTranslation();
|
3414
3411
|
const isExternal = props.isExternal !== void 0 ? props.isExternal : Boolean((_a = props.href) == null ? void 0 : _a.match(/^https?:\/\//));
|
3415
|
-
return /* @__PURE__ */
|
3412
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Link, { ...props, ref, isExternal }, children, isExternal && /* @__PURE__ */ React84__namespace.default.createElement(
|
3416
3413
|
sporIconReact.LinkOutOutline24Icon,
|
3417
3414
|
{
|
3418
3415
|
marginLeft: 0.5,
|
@@ -3432,8 +3429,8 @@ var texts19 = createTexts({
|
|
3432
3429
|
var VyLogo = ({ colorScheme, ...boxProps }) => {
|
3433
3430
|
const mainColor = colorScheme === "light" ? "#1d211c" : "#ffffff";
|
3434
3431
|
const accentColor = colorScheme === "light" ? "#138c6e" : "#ffffff";
|
3435
|
-
const id =
|
3436
|
-
return /* @__PURE__ */
|
3432
|
+
const id = React84.useId();
|
3433
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "svg", viewBox: "0 0 107 54", ...boxProps }, /* @__PURE__ */ React84__namespace.default.createElement("title", null, "Vy logo"), /* @__PURE__ */ React84__namespace.default.createElement(
|
3437
3434
|
"path",
|
3438
3435
|
{
|
3439
3436
|
fillRule: "evenodd",
|
@@ -3441,7 +3438,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
3441
3438
|
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",
|
3442
3439
|
fill: mainColor
|
3443
3440
|
}
|
3444
|
-
), /* @__PURE__ */
|
3441
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3445
3442
|
"mask",
|
3446
3443
|
{
|
3447
3444
|
id: `${id}-a`,
|
@@ -3452,7 +3449,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
3452
3449
|
width: "94",
|
3453
3450
|
height: "54"
|
3454
3451
|
},
|
3455
|
-
/* @__PURE__ */
|
3452
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3456
3453
|
"path",
|
3457
3454
|
{
|
3458
3455
|
fillRule: "evenodd",
|
@@ -3461,7 +3458,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
3461
3458
|
fill: mainColor
|
3462
3459
|
}
|
3463
3460
|
)
|
3464
|
-
), /* @__PURE__ */
|
3461
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3465
3462
|
"g",
|
3466
3463
|
{
|
3467
3464
|
mask: `url(#${id}-a)`,
|
@@ -3469,9 +3466,9 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
3469
3466
|
clipRule: "evenodd",
|
3470
3467
|
fill: mainColor
|
3471
3468
|
},
|
3472
|
-
/* @__PURE__ */
|
3473
|
-
/* @__PURE__ */
|
3474
|
-
), /* @__PURE__ */
|
3469
|
+
/* @__PURE__ */ React84__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" }),
|
3470
|
+
/* @__PURE__ */ React84__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" })
|
3471
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3475
3472
|
"path",
|
3476
3473
|
{
|
3477
3474
|
fillRule: "evenodd",
|
@@ -3479,7 +3476,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
3479
3476
|
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",
|
3480
3477
|
fill: accentColor
|
3481
3478
|
}
|
3482
|
-
), /* @__PURE__ */
|
3479
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3483
3480
|
"path",
|
3484
3481
|
{
|
3485
3482
|
fillRule: "evenodd",
|
@@ -3487,7 +3484,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
3487
3484
|
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",
|
3488
3485
|
fill: mainColor
|
3489
3486
|
}
|
3490
|
-
), /* @__PURE__ */
|
3487
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3491
3488
|
"mask",
|
3492
3489
|
{
|
3493
3490
|
id: `${id}-b`,
|
@@ -3498,7 +3495,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
3498
3495
|
width: "78",
|
3499
3496
|
height: "54"
|
3500
3497
|
},
|
3501
|
-
/* @__PURE__ */
|
3498
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3502
3499
|
"path",
|
3503
3500
|
{
|
3504
3501
|
fillRule: "evenodd",
|
@@ -3507,25 +3504,25 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
3507
3504
|
fill: mainColor
|
3508
3505
|
}
|
3509
3506
|
)
|
3510
|
-
), /* @__PURE__ */
|
3507
|
+
), /* @__PURE__ */ React84__namespace.default.createElement("g", { mask: `url(#${id}-b)`, fillRule: "evenodd", clipRule: "evenodd" }, /* @__PURE__ */ React84__namespace.default.createElement(
|
3511
3508
|
"path",
|
3512
3509
|
{
|
3513
3510
|
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",
|
3514
3511
|
fill: mainColor
|
3515
3512
|
}
|
3516
|
-
), /* @__PURE__ */
|
3513
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3517
3514
|
"path",
|
3518
3515
|
{
|
3519
3516
|
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",
|
3520
3517
|
fill: mainColor
|
3521
3518
|
}
|
3522
|
-
), /* @__PURE__ */
|
3519
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3523
3520
|
"path",
|
3524
3521
|
{
|
3525
3522
|
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",
|
3526
3523
|
fill: accentColor
|
3527
3524
|
}
|
3528
|
-
)), /* @__PURE__ */
|
3525
|
+
)), /* @__PURE__ */ React84__namespace.default.createElement(
|
3529
3526
|
"path",
|
3530
3527
|
{
|
3531
3528
|
fillRule: "evenodd",
|
@@ -3545,8 +3542,8 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3545
3542
|
const redColor = colorScheme === "light" ? "#EA3323" : "#ffffff";
|
3546
3543
|
const orangeColor = colorScheme === "light" ? "#F09436" : "#ffffff";
|
3547
3544
|
const yellowColor = colorScheme === "light" ? "#FFFF54" : "#ffffff";
|
3548
|
-
const id =
|
3549
|
-
return /* @__PURE__ */
|
3545
|
+
const id = React84.useId();
|
3546
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "svg", viewBox: "0 0 107 54", ...boxProps }, /* @__PURE__ */ React84__namespace.default.createElement("title", null, "Vy logo pride"), /* @__PURE__ */ React84__namespace.default.createElement(
|
3550
3547
|
"svg",
|
3551
3548
|
{
|
3552
3549
|
width: "108",
|
@@ -3555,7 +3552,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3555
3552
|
fill: "none",
|
3556
3553
|
xmlns: "http://www.w3.org/2000/svg"
|
3557
3554
|
},
|
3558
|
-
/* @__PURE__ */
|
3555
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3559
3556
|
"path",
|
3560
3557
|
{
|
3561
3558
|
fillRule: "evenodd",
|
@@ -3564,7 +3561,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3564
3561
|
fill: pinkColor
|
3565
3562
|
}
|
3566
3563
|
),
|
3567
|
-
/* @__PURE__ */
|
3564
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3568
3565
|
"mask",
|
3569
3566
|
{
|
3570
3567
|
id: `${id}-a-pride`,
|
@@ -3575,7 +3572,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3575
3572
|
width: "95",
|
3576
3573
|
height: "55"
|
3577
3574
|
},
|
3578
|
-
/* @__PURE__ */
|
3575
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3579
3576
|
"path",
|
3580
3577
|
{
|
3581
3578
|
fillRule: "evenodd",
|
@@ -3585,7 +3582,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3585
3582
|
}
|
3586
3583
|
)
|
3587
3584
|
),
|
3588
|
-
/* @__PURE__ */
|
3585
|
+
/* @__PURE__ */ React84__namespace.default.createElement("g", { mask: `url(#${id}-a-pride)` }, /* @__PURE__ */ React84__namespace.default.createElement(
|
3589
3586
|
"path",
|
3590
3587
|
{
|
3591
3588
|
fillRule: "evenodd",
|
@@ -3593,7 +3590,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3593
3590
|
d: "M86.1392 34.0577C86.1622 34.0577 86.1809 34.0389 86.1809 34.0158C86.1809 33.9951 86.1658 33.9779 86.146 33.9747V33.9745C83.7657 33.6665 82.2265 30.3247 81.3764 27.4799C80.4843 24.4948 77.2629 13.5951 75.3455 7.29056C73.4194 0.957342 67.4267 0.0485861 64.7129 0.0441895H64.7137C64.6906 0.0441895 64.6719 0.0629034 64.6719 0.0859014C64.6719 0.106645 64.6869 0.123893 64.7068 0.127162L64.7067 0.127388C67.2413 0.468862 70.8417 2.00375 72.3953 7.29056C73.7591 11.9308 78.0927 26.6723 78.2592 27.1656C79.2998 30.2466 80.5197 32.1068 82.0639 33.1046C83.1032 33.776 84.2891 34.0577 85.6664 34.0577H86.1392",
|
3594
3591
|
fill: purpleColor
|
3595
3592
|
}
|
3596
|
-
), /* @__PURE__ */
|
3593
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3597
3594
|
"path",
|
3598
3595
|
{
|
3599
3596
|
fillRule: "evenodd",
|
@@ -3601,7 +3598,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3601
3598
|
d: "M23.7089 54.6763C23.4058 54.6763 23.1352 54.6763 22.9803 54.6763C20.8144 54.6763 18.2099 53.5754 16.7766 48.5188L3.8641 4.45414C3.09965 1.80939 1.96226 0.481143 0.0347223 0.151506C0.014881 0.148237 0 0.131101 0 0.110245C0 0.0871344 0.018714 0.0684204 0.0418246 0.0684204H1.98402C4.56565 0.0684204 5.96987 1.36104 6.86386 4.45414C6.86386 4.45414 18.8019 44.9686 19.8869 48.7964C20.6896 51.628 21.628 53.5542 23.0795 54.3328C23.3142 54.4587 23.5119 54.5409 23.7154 54.5932C23.7352 54.5965 23.7506 54.6138 23.7506 54.6345C23.7506 54.6576 23.7319 54.6763 23.7089 54.6763Z",
|
3602
3599
|
fill: darkPurpleColor
|
3603
3600
|
}
|
3604
|
-
), /* @__PURE__ */
|
3601
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3605
3602
|
"path",
|
3606
3603
|
{
|
3607
3604
|
fillRule: "evenodd",
|
@@ -3609,7 +3606,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3609
3606
|
d: "M19.3365 6.09794C18.1013 1.82472 16.1613 0.0390015 12.5947 0.0390015H10.8543C10.8312 0.0390015 10.8125 0.0577155 10.8125 0.0808261C10.8125 0.101569 10.8277 0.118818 10.8476 0.122087V0.121974C13.6341 0.517899 15.2582 2.35232 16.341 6.09794C16.341 6.09794 27.027 42.4871 28.4146 47.2512C28.7189 46.2219 29.2327 44.4828 29.8791 42.2935C28.6038 37.9117 19.3365 6.09794 19.3365 6.09794",
|
3610
3607
|
fill: greenColor
|
3611
3608
|
}
|
3612
|
-
), /* @__PURE__ */
|
3609
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3613
3610
|
"path",
|
3614
3611
|
{
|
3615
3612
|
fillRule: "evenodd",
|
@@ -3617,7 +3614,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3617
3614
|
d: "M24.7059 54.6763H25.9753C27.5661 54.6763 28.7056 54.2553 29.5596 53.5597C30.9494 52.4272 31.5822 50.5663 32.1676 48.6028C32.2552 48.309 43.5646 9.95201 43.9629 8.45455C45.3098 3.39196 48.3208 1.18687 51.5334 0.404941C52.0668 0.275183 52.6055 0.184995 53.1431 0.127162H53.1439C53.1638 0.123893 53.1789 0.106645 53.1789 0.0859014C53.1789 0.0629034 53.1602 0.0441895 53.1371 0.0441895H51.7232C47.4872 0.0441895 42.7565 1.72507 40.9662 8.45455C40.3206 10.8814 29.2585 48.309 29.1709 48.6028C28.5854 50.5663 27.9202 52.6362 26.5303 53.7687C25.9647 54.2295 25.4469 54.4781 24.6995 54.5933H24.699C24.6792 54.5966 24.6641 54.614 24.6641 54.6346C24.6641 54.6577 24.6828 54.6764 24.7059 54.6764V54.6763",
|
3618
3615
|
fill: darkGreenColor
|
3619
3616
|
}
|
3620
|
-
), /* @__PURE__ */
|
3617
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3621
3618
|
"path",
|
3622
3619
|
{
|
3623
3620
|
fillRule: "evenodd",
|
@@ -3626,7 +3623,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3626
3623
|
fill: darkPurpleColor
|
3627
3624
|
}
|
3628
3625
|
)),
|
3629
|
-
/* @__PURE__ */
|
3626
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3630
3627
|
"path",
|
3631
3628
|
{
|
3632
3629
|
fillRule: "evenodd",
|
@@ -3635,7 +3632,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3635
3632
|
fill: blueColor
|
3636
3633
|
}
|
3637
3634
|
),
|
3638
|
-
/* @__PURE__ */
|
3635
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3639
3636
|
"path",
|
3640
3637
|
{
|
3641
3638
|
fillRule: "evenodd",
|
@@ -3644,7 +3641,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3644
3641
|
fill: blueColor
|
3645
3642
|
}
|
3646
3643
|
),
|
3647
|
-
/* @__PURE__ */
|
3644
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3648
3645
|
"path",
|
3649
3646
|
{
|
3650
3647
|
fillRule: "evenodd",
|
@@ -3653,7 +3650,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3653
3650
|
fill: greenColor
|
3654
3651
|
}
|
3655
3652
|
),
|
3656
|
-
/* @__PURE__ */
|
3653
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3657
3654
|
"mask",
|
3658
3655
|
{
|
3659
3656
|
id: `${id}-b-pride`,
|
@@ -3664,7 +3661,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3664
3661
|
width: "78",
|
3665
3662
|
height: "55"
|
3666
3663
|
},
|
3667
|
-
/* @__PURE__ */
|
3664
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3668
3665
|
"path",
|
3669
3666
|
{
|
3670
3667
|
fillRule: "evenodd",
|
@@ -3674,7 +3671,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3674
3671
|
}
|
3675
3672
|
)
|
3676
3673
|
),
|
3677
|
-
/* @__PURE__ */
|
3674
|
+
/* @__PURE__ */ React84__namespace.default.createElement("g", { mask: `url(#${id}-b-pride)` }, /* @__PURE__ */ React84__namespace.default.createElement(
|
3678
3675
|
"path",
|
3679
3676
|
{
|
3680
3677
|
fillRule: "evenodd",
|
@@ -3682,7 +3679,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3682
3679
|
d: "M89.8289 35.0891C88.7828 38.6493 85.8015 48.8015 85.8015 48.8015C84.2266 54.076 86.7112 54.6188 87.6599 54.6188H89.9623C89.9855 54.6188 90.0042 54.6001 90.0042 54.577C90.0042 54.5571 89.9903 54.5403 89.9717 54.5362V54.5363C88.8916 54.2553 87.4798 53.0991 88.7632 48.8015C88.7632 48.8015 92.0286 37.7282 93.2719 33.5031C92.561 34.2226 91.3615 34.8917 89.8289 35.0891",
|
3683
3680
|
fill: greenColor
|
3684
3681
|
}
|
3685
|
-
), /* @__PURE__ */
|
3682
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3686
3683
|
"path",
|
3687
3684
|
{
|
3688
3685
|
fillRule: "evenodd",
|
@@ -3690,7 +3687,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3690
3687
|
d: "M95.4467 54.6188C95.4698 54.6188 95.4885 54.6001 95.4885 54.577C95.4885 54.557 95.4747 54.5403 95.4561 54.5362H95.4558C94.5434 54.2765 93.3986 53.2655 94.4728 49.6684C94.4728 49.6684 107.101 6.68958 107.804 4.25563C108.507 1.82169 106.809 0.298979 105.28 0.0692254C105.269 0.0676471 105.219 0.0537807 105.209 0.0862483C105.199 0.118716 105.241 0.138557 105.249 0.143179C105.553 0.303376 105.894 0.672244 105.708 1.30469C105.522 1.93713 91.499 49.6684 91.499 49.6684C90.1586 54.1569 92.273 54.6188 93.0802 54.6188H95.4467",
|
3691
3688
|
fill: darkGreenColor
|
3692
3689
|
}
|
3693
|
-
), /* @__PURE__ */
|
3690
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3694
3691
|
"path",
|
3695
3692
|
{
|
3696
3693
|
fillRule: "evenodd",
|
@@ -3698,7 +3695,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3698
3695
|
d: "M75.4659 34.0577C75.4889 34.0577 75.5076 34.0389 75.5076 34.0158C75.5076 33.9951 75.4925 33.9778 75.4726 33.9746H75.4723C74.6146 33.8501 73.8387 33.5807 73.1306 33.1321C71.4607 32.0744 70.1687 30.0201 69.0737 26.521C68.9798 26.2215 63.6049 7.92165 63.4194 7.29056C62.2821 3.42105 60.4546 1.5616 58.6517 0.708874C57.557 0.191083 56.4715 0.0441895 55.5553 0.0441895C54.9539 0.0441895 54.4151 0.0441895 53.9784 0.0441895H53.9715C53.9484 0.0441895 53.9297 0.0629034 53.9297 0.0859014C53.9297 0.106645 53.9448 0.123893 53.9646 0.127162V0.127275C54.26 0.171918 58.362 0.298745 60.4275 7.29056C62.493 14.2825 64.9683 22.6405 65.8045 25.5908C67.6133 31.9722 69.9469 34.0577 73.6985 34.0577H75.4659",
|
3699
3696
|
fill: redColor
|
3700
3697
|
}
|
3701
|
-
), /* @__PURE__ */
|
3698
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3702
3699
|
"path",
|
3703
3700
|
{
|
3704
3701
|
fillRule: "evenodd",
|
@@ -3706,7 +3703,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3706
3703
|
d: "M56.4576 2.44421C56.4559 2.44568 56.4541 2.44703 56.4524 2.4485C54.944 3.74292 53.6961 5.66449 52.9539 8.45445C52.8754 8.74959 41.6662 46.889 41.4206 47.7167C40.4784 50.8926 39.6893 54.0469 36.1209 54.5932C36.101 54.5965 36.0859 54.6138 36.0859 54.6345C36.0859 54.6576 36.1047 54.6763 36.1278 54.6763H36.8373C36.8373 54.6763 37.3489 54.6683 37.4515 54.6642C41.0756 54.5179 42.8818 52.978 44.4271 47.7167C45.5556 43.8746 55.8691 8.75883 55.9604 8.45445C56.4006 6.98517 56.9293 5.3123 57.6882 3.84641C57.53 3.59208 56.9713 2.87385 56.4576 2.44421",
|
3707
3704
|
fill: orangeColor
|
3708
3705
|
}
|
3709
|
-
), /* @__PURE__ */
|
3706
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3710
3707
|
"path",
|
3711
3708
|
{
|
3712
3709
|
fillRule: "evenodd",
|
@@ -3715,7 +3712,7 @@ var VyLogoPride = ({ colorScheme, ...boxProps }) => {
|
|
3715
3712
|
fill: yellowColor
|
3716
3713
|
}
|
3717
3714
|
)),
|
3718
|
-
/* @__PURE__ */
|
3715
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
3719
3716
|
"path",
|
3720
3717
|
{
|
3721
3718
|
fillRule: "evenodd",
|
@@ -3732,109 +3729,109 @@ var CargonetLogo = ({
|
|
3732
3729
|
}) => {
|
3733
3730
|
const mainColor = "#DF8200";
|
3734
3731
|
const accentColor = colorScheme === "light" ? "#383E42" : "#ffffff";
|
3735
|
-
return /* @__PURE__ */
|
3732
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "svg", viewBox: "0 0 251 52", ...boxProps }, /* @__PURE__ */ React84__namespace.default.createElement("title", null, "Cargonet logo"), /* @__PURE__ */ React84__namespace.default.createElement(
|
3736
3733
|
"path",
|
3737
3734
|
{
|
3738
3735
|
d: "M87.9222 14.602L84.3862 18.7417C81.1953 15.9821 79.1685 15.2914 76.5379 15.2914C70.933 15.2914 67.4398 19.5609 67.4398 26.029C67.4398 32.5834 71.0186 36.8523 76.4089 36.8523C79.6855 36.8523 81.6694 35.6447 84.9038 32.9285L88.3969 36.982C84.645 40.5608 81.1524 42.1134 76.4951 42.1134C66.9651 42.1134 61.2733 35.214 61.2733 25.9856C61.2733 16.9732 66.7492 10.0309 76.5379 10.0309C81.2387 10.0309 84.3 11.4533 87.9222 14.602Z",
|
3739
3736
|
fill: accentColor
|
3740
3737
|
}
|
3741
|
-
), /* @__PURE__ */
|
3738
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3742
3739
|
"path",
|
3743
3740
|
{
|
3744
3741
|
d: "M106.461 41.3802C106.159 40.5604 105.986 39.5259 105.857 38.4046C104.693 40.6038 102.408 42.1131 98.6988 42.1131C94.4299 42.1131 90.8511 40.216 90.8511 35.774C90.8511 30.9013 95.1628 29.1333 100.812 28.1417L105.598 27.3225V26.7187C105.598 24.3903 103.917 23.1399 101.416 23.1399C98.4829 23.1399 96.5858 24.476 94.4734 26.6759L91.0231 23.5712C93.9124 20.2934 97.1468 18.6117 101.373 18.6117C107.754 18.6117 110.946 21.846 110.946 26.5028V35.9037C110.946 38.448 111.118 40.216 111.506 41.3802H106.461ZM105.598 32.6265V31.1607L101.373 31.9364C98.0093 32.5836 96.2414 33.4022 96.2414 35.3861C96.2414 36.9388 97.5346 37.9299 99.8202 37.9299C102.666 37.9299 105.598 36.4647 105.598 32.6265Z",
|
3745
3742
|
fill: accentColor
|
3746
3743
|
}
|
3747
|
-
), /* @__PURE__ */
|
3744
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3748
3745
|
"path",
|
3749
3746
|
{
|
3750
3747
|
d: "M130.65 19.6469L129.572 24.5625C128.537 24.2614 127.373 24.0455 126.295 24.0455C123.233 24.0455 121.422 26.4601 121.422 30.5565V41.3803H115.816V25.8563C115.816 22.8813 115.644 20.8111 115.385 19.3448H120.603C120.818 20.1645 120.991 21.4578 121.034 23.0967C122.112 20.5524 123.88 18.9569 126.812 18.9569C128.192 18.9569 129.529 19.2157 130.65 19.6469Z",
|
3751
3748
|
fill: accentColor
|
3752
3749
|
}
|
3753
|
-
), /* @__PURE__ */
|
3750
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3754
3751
|
"path",
|
3755
3752
|
{
|
3756
3753
|
d: "M152.813 19.3447V40.6896C152.813 46.9859 148.156 50.1768 142.075 50.1768C138.669 50.1768 135.219 49.3142 132.028 47.4172L134.745 43.3202C137.289 44.8729 139.532 45.692 141.99 45.692C145.008 45.692 147.336 44.269 147.336 40.3018V37.4993C146.043 39.5255 143.93 40.8199 140.911 40.8199C135.349 40.8199 131.209 36.3779 131.209 29.7373C131.209 23.0966 135.349 18.6118 140.911 18.6118C144.188 18.6118 146.345 20.0782 147.639 22.3631V19.3447H152.813ZM147.509 29.7373C147.509 25.9425 145.267 23.3988 142.162 23.3988C138.971 23.3988 136.858 25.9425 136.858 29.7373C136.858 33.5314 138.971 36.0763 142.162 36.0763C145.267 36.0763 147.509 33.5314 147.509 29.7373Z",
|
3757
3754
|
fill: accentColor
|
3758
3755
|
}
|
3759
|
-
), /* @__PURE__ */
|
3756
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3760
3757
|
"path",
|
3761
3758
|
{
|
3762
3759
|
d: "M178.72 30.341C178.72 37.3267 173.976 42.0702 167.292 42.0702C160.609 42.0702 155.866 37.3267 155.866 30.341C155.866 23.3553 160.609 18.6117 167.292 18.6117C173.976 18.6117 178.72 23.3553 178.72 30.341ZM161.557 30.341C161.557 34.6967 163.886 37.4992 167.292 37.4992C170.699 37.4992 173.028 34.6967 173.028 30.341C173.028 26.0721 170.699 23.1828 167.292 23.1828C163.886 23.1828 161.557 26.0721 161.557 30.341Z",
|
3763
3760
|
fill: accentColor
|
3764
3761
|
}
|
3765
|
-
), /* @__PURE__ */
|
3762
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3766
3763
|
"path",
|
3767
3764
|
{
|
3768
3765
|
d: "M208.903 10.7638V41.38H202.478L194.673 28.9612C192.516 25.5115 190.403 22.1046 188.635 18.8274C188.851 22.4497 188.937 26.4598 188.937 30.8155V41.38H183.029V10.7638H189.585L197.82 23.9589C199.717 26.9773 201.616 29.9529 203.21 32.8851C203.081 29.6507 203.038 26.0719 203.038 21.8893V10.7638H208.903Z",
|
3769
3766
|
fill: mainColor
|
3770
3767
|
}
|
3771
|
-
), /* @__PURE__ */
|
3768
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3772
3769
|
"path",
|
3773
3770
|
{
|
3774
3771
|
d: "M233.663 37.7578C230.386 41.035 227.324 42.0707 223.788 42.0707C216.672 42.0707 212.231 37.499 212.231 30.4705C212.231 23.6573 216.371 18.6116 223.313 18.6116C230.041 18.6116 233.619 22.8376 233.619 29.6079C233.619 30.2546 233.577 31.2897 233.534 31.6781H217.578C218.009 35.0844 220.08 37.499 223.917 37.499C226.505 37.499 228.144 36.5936 230.6 34.4378L233.663 37.7578ZM217.708 27.9262H228.359C228.144 24.8644 226.376 22.881 223.227 22.881C220.123 22.881 218.311 24.8644 217.708 27.9262Z",
|
3775
3772
|
fill: mainColor
|
3776
3773
|
}
|
3777
|
-
), /* @__PURE__ */
|
3774
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3778
3775
|
"path",
|
3779
3776
|
{
|
3780
3777
|
d: "M250.41 41.0785C248.556 41.6817 246.789 41.8976 245.538 41.8976C240.88 41.8976 239.198 39.8709 239.198 35.7739V23.4415H235.275V19.3445H239.198V12.6182H244.805V19.3445H250.066V23.4415H244.805V34.8257C244.805 36.5937 245.624 37.0244 247.047 37.0244C247.651 37.0244 248.47 36.9387 249.721 36.6365L250.41 41.0785Z",
|
3781
3778
|
fill: mainColor
|
3782
3779
|
}
|
3783
|
-
), /* @__PURE__ */
|
3780
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3784
3781
|
"path",
|
3785
3782
|
{
|
3786
3783
|
d: "M21.4911 10.2565H31.1579V0.589175H21.4911V10.2565Z",
|
3787
3784
|
fill: mainColor
|
3788
3785
|
}
|
3789
|
-
), /* @__PURE__ */
|
3786
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3790
3787
|
"path",
|
3791
3788
|
{
|
3792
3789
|
d: "M41.3861 10.8855H31.7757V20.5528H41.3861V10.8855Z",
|
3793
3790
|
fill: mainColor
|
3794
3791
|
}
|
3795
|
-
), /* @__PURE__ */
|
3792
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3796
3793
|
"path",
|
3797
3794
|
{
|
3798
3795
|
d: "M42.0022 10.2547H51.6126V0.587402H42.0022V10.2547Z",
|
3799
3796
|
fill: mainColor
|
3800
3797
|
}
|
3801
|
-
), /* @__PURE__ */
|
3798
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3802
3799
|
"path",
|
3803
3800
|
{
|
3804
3801
|
d: "M21.477 30.7758H31.1431V21.1654H21.477V30.7758Z",
|
3805
3802
|
fill: mainColor
|
3806
3803
|
}
|
3807
|
-
), /* @__PURE__ */
|
3804
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3808
3805
|
"path",
|
3809
3806
|
{
|
3810
3807
|
d: "M11.2124 20.5493H20.8791V10.8826H11.2124V20.5493Z",
|
3811
3808
|
fill: mainColor
|
3812
3809
|
}
|
3813
|
-
), /* @__PURE__ */
|
3810
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3814
3811
|
"path",
|
3815
3812
|
{
|
3816
3813
|
d: "M0.910156 30.7911H10.5775V21.1801H0.910156V30.7911Z",
|
3817
3814
|
fill: mainColor
|
3818
3815
|
}
|
3819
|
-
), /* @__PURE__ */
|
3816
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3820
3817
|
"path",
|
3821
3818
|
{
|
3822
3819
|
d: "M11.1948 41.0258H20.8615V31.4154H11.1948V41.0258Z",
|
3823
3820
|
fill: mainColor
|
3824
3821
|
}
|
3825
|
-
), /* @__PURE__ */
|
3822
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3826
3823
|
"path",
|
3827
3824
|
{
|
3828
3825
|
d: "M31.7669 41.0581H41.4336V31.3908H31.7669V41.0581Z",
|
3829
3826
|
fill: mainColor
|
3830
3827
|
}
|
3831
|
-
), /* @__PURE__ */
|
3828
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3832
3829
|
"path",
|
3833
3830
|
{
|
3834
3831
|
d: "M21.4776 51.2277H31.1443V41.656H21.4776V51.2277Z",
|
3835
3832
|
fill: mainColor
|
3836
3833
|
}
|
3837
|
-
), /* @__PURE__ */
|
3834
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(
|
3838
3835
|
"path",
|
3839
3836
|
{
|
3840
3837
|
d: "M42.0615 51.2283H51.7282V41.6989H42.0615V51.2283Z",
|
@@ -3853,7 +3850,7 @@ var JumpButton = ({
|
|
3853
3850
|
variant: "jumpSkip",
|
3854
3851
|
size
|
3855
3852
|
});
|
3856
|
-
return /* @__PURE__ */
|
3853
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
3857
3854
|
react.Center,
|
3858
3855
|
{
|
3859
3856
|
as: "button",
|
@@ -3862,7 +3859,7 @@ var JumpButton = ({
|
|
3862
3859
|
disabled: isDisabled,
|
3863
3860
|
...props
|
3864
3861
|
},
|
3865
|
-
direction === "forward" ? /* @__PURE__ */
|
3862
|
+
direction === "forward" ? /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.Forward15MediaControllerFill30Icon, { sx: styles2.icon }) : /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.Backward15MediaControllerFill30Icon, { sx: styles2.icon })
|
3866
3863
|
);
|
3867
3864
|
};
|
3868
3865
|
var texts20 = createTexts({
|
@@ -3890,7 +3887,7 @@ var PlayPauseButton = ({
|
|
3890
3887
|
variant: "play",
|
3891
3888
|
size
|
3892
3889
|
});
|
3893
|
-
return /* @__PURE__ */
|
3890
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
3894
3891
|
react.Center,
|
3895
3892
|
{
|
3896
3893
|
as: "button",
|
@@ -3899,7 +3896,7 @@ var PlayPauseButton = ({
|
|
3899
3896
|
disabled: isDisabled,
|
3900
3897
|
...props
|
3901
3898
|
},
|
3902
|
-
isPlaying ? /* @__PURE__ */
|
3899
|
+
isPlaying ? /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.PauseMediaControllerFill24Icon, { sx: styles2.icon }) : /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.PlayMediaControllerFill24Icon, { sx: styles2.icon })
|
3903
3900
|
);
|
3904
3901
|
};
|
3905
3902
|
var texts21 = createTexts({
|
@@ -3927,7 +3924,7 @@ var SkipButton = ({
|
|
3927
3924
|
variant: "jumpSkip",
|
3928
3925
|
size
|
3929
3926
|
});
|
3930
|
-
return /* @__PURE__ */
|
3927
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
3931
3928
|
react.Center,
|
3932
3929
|
{
|
3933
3930
|
as: "button",
|
@@ -3936,7 +3933,7 @@ var SkipButton = ({
|
|
3936
3933
|
disabled: isDisabled,
|
3937
3934
|
...props
|
3938
3935
|
},
|
3939
|
-
direction === "forward" ? /* @__PURE__ */
|
3936
|
+
direction === "forward" ? /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.NextMediaControllerFill30Icon, { sx: styles2.icon }) : /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.PreviousMediaControllerFill30Icon, { sx: styles2.icon })
|
3940
3937
|
);
|
3941
3938
|
};
|
3942
3939
|
var texts22 = createTexts({
|
@@ -3959,13 +3956,13 @@ var ModalHeader = react.forwardRef(
|
|
3959
3956
|
fontSize: size === "lg" ? ["mobile.lg", "desktop.lg"] : ["mobile.md", "desktop.md"],
|
3960
3957
|
textAlign: size === "lg" ? "center" : "left"
|
3961
3958
|
};
|
3962
|
-
return /* @__PURE__ */
|
3959
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.ModalHeader, { as: "h1", ...props, ref, ...styles2 });
|
3963
3960
|
}
|
3964
3961
|
);
|
3965
3962
|
|
3966
3963
|
// src/modal/Drawer.tsx
|
3967
3964
|
var Drawer = (props) => {
|
3968
|
-
return /* @__PURE__ */
|
3965
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(DrawerProvider, { placement: props.placement }, /* @__PURE__ */ React84__namespace.default.createElement(react.Drawer, { ...props }));
|
3969
3966
|
};
|
3970
3967
|
var DrawerContent = react.forwardRef(
|
3971
3968
|
({ children, ...props }, ref) => {
|
@@ -3982,7 +3979,7 @@ var DrawerContent = react.forwardRef(
|
|
3982
3979
|
});
|
3983
3980
|
const isTopOrBottom = placement === "top" || placement === "bottom";
|
3984
3981
|
const widthConstraits = isTopOrBottom ? { width: ["100%", "37.5rem"], mx: "auto" } : {};
|
3985
|
-
return /* @__PURE__ */
|
3982
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...handlers }, /* @__PURE__ */ React84__namespace.default.createElement(
|
3986
3983
|
react.DrawerContent,
|
3987
3984
|
{
|
3988
3985
|
...widthConstraits,
|
@@ -3991,13 +3988,13 @@ var DrawerContent = react.forwardRef(
|
|
3991
3988
|
...props,
|
3992
3989
|
ref
|
3993
3990
|
},
|
3994
|
-
/* @__PURE__ */
|
3991
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { position: "relative" }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { maxHeight: "100vh", maxWidth: "100vw", overflow: "auto" }, isTopOrBottom && /* @__PURE__ */ React84__namespace.default.createElement(Notch, null), /* @__PURE__ */ React84__namespace.default.createElement(react.Box, null, children)))
|
3995
3992
|
));
|
3996
3993
|
}
|
3997
3994
|
);
|
3998
3995
|
var Notch = react.forwardRef((props, ref) => {
|
3999
3996
|
const placement = useDrawerContext();
|
4000
|
-
return /* @__PURE__ */
|
3997
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4001
3998
|
react.Box,
|
4002
3999
|
{
|
4003
4000
|
position: "absolute",
|
@@ -4009,14 +4006,14 @@ var Notch = react.forwardRef((props, ref) => {
|
|
4009
4006
|
...props,
|
4010
4007
|
ref
|
4011
4008
|
},
|
4012
|
-
/* @__PURE__ */
|
4009
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
4013
4010
|
react.Center,
|
4014
4011
|
{
|
4015
4012
|
background: placement === "bottom" ? "bottom" : "top",
|
4016
4013
|
padding: 2,
|
4017
4014
|
borderRadius: "md"
|
4018
4015
|
},
|
4019
|
-
/* @__PURE__ */
|
4016
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
4020
4017
|
react.Box,
|
4021
4018
|
{
|
4022
4019
|
width: "2.265rem",
|
@@ -4028,22 +4025,22 @@ var Notch = react.forwardRef((props, ref) => {
|
|
4028
4025
|
)
|
4029
4026
|
);
|
4030
4027
|
});
|
4031
|
-
var DrawerContext =
|
4032
|
-
var DrawerProvider = (props) => /* @__PURE__ */
|
4028
|
+
var DrawerContext = React84__namespace.default.createContext(void 0);
|
4029
|
+
var DrawerProvider = (props) => /* @__PURE__ */ React84__namespace.default.createElement(DrawerContext.Provider, { value: props.placement }, props.children);
|
4033
4030
|
var useDrawerContext = () => {
|
4034
|
-
return
|
4031
|
+
return React84__namespace.default.useContext(DrawerContext);
|
4035
4032
|
};
|
4036
4033
|
var FullScreenDrawer = ({
|
4037
4034
|
children,
|
4038
4035
|
title,
|
4039
4036
|
placement = "bottom",
|
4040
|
-
leftButton = /* @__PURE__ */
|
4041
|
-
rightButton = /* @__PURE__ */
|
4037
|
+
leftButton = /* @__PURE__ */ React84__namespace.default.createElement(DrawerBackButton, null),
|
4038
|
+
rightButton = /* @__PURE__ */ React84__namespace.default.createElement(DrawerCloseButton2, null),
|
4042
4039
|
isOpen,
|
4043
4040
|
onClose,
|
4044
4041
|
body
|
4045
4042
|
}) => {
|
4046
|
-
const [isContentBoxScrolled, setContentBoxScrolled] =
|
4043
|
+
const [isContentBoxScrolled, setContentBoxScrolled] = React84.useState(false);
|
4047
4044
|
const onContentScroll = (e) => {
|
4048
4045
|
const target = e.target;
|
4049
4046
|
if (target.scrollTop <= 0) {
|
@@ -4052,10 +4049,10 @@ var FullScreenDrawer = ({
|
|
4052
4049
|
}
|
4053
4050
|
setContentBoxScrolled(true);
|
4054
4051
|
};
|
4055
|
-
|
4052
|
+
React84.useEffect(() => {
|
4056
4053
|
setContentBoxScrolled(false);
|
4057
4054
|
}, [isOpen]);
|
4058
|
-
return /* @__PURE__ */
|
4055
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(Drawer, { isOpen, onClose, placement, size: "full" }, /* @__PURE__ */ React84__namespace.default.createElement(react.DrawerOverlay, null), /* @__PURE__ */ React84__namespace.default.createElement(
|
4059
4056
|
react.DrawerContent,
|
4060
4057
|
{
|
4061
4058
|
height: "100vh",
|
@@ -4063,7 +4060,7 @@ var FullScreenDrawer = ({
|
|
4063
4060
|
backgroundPosition: "top",
|
4064
4061
|
backgroundRepeat: "no-repeat"
|
4065
4062
|
},
|
4066
|
-
/* @__PURE__ */
|
4063
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
4067
4064
|
DrawerTopMenu,
|
4068
4065
|
{
|
4069
4066
|
isScrolled: isContentBoxScrolled,
|
@@ -4072,7 +4069,7 @@ var FullScreenDrawer = ({
|
|
4072
4069
|
rightButton
|
4073
4070
|
}
|
4074
4071
|
),
|
4075
|
-
/* @__PURE__ */
|
4072
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.DrawerBody, { overflow: "auto", onScroll: onContentScroll, ...body }, children)
|
4076
4073
|
));
|
4077
4074
|
};
|
4078
4075
|
var DrawerTopMenu = ({
|
@@ -4085,7 +4082,7 @@ var DrawerTopMenu = ({
|
|
4085
4082
|
"bg.default.light",
|
4086
4083
|
"bg.default.dark"
|
4087
4084
|
);
|
4088
|
-
return /* @__PURE__ */
|
4085
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4089
4086
|
react.Flex,
|
4090
4087
|
{
|
4091
4088
|
width: "100%",
|
@@ -4098,8 +4095,8 @@ var DrawerTopMenu = ({
|
|
4098
4095
|
transition: "box-shadow 0.2s",
|
4099
4096
|
boxShadow: isScrolled ? "md" : void 0
|
4100
4097
|
},
|
4101
|
-
/* @__PURE__ */
|
4102
|
-
/* @__PURE__ */
|
4098
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { flex: "1" }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width: "fit-content" }, leftButton)),
|
4099
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
4103
4100
|
react.DrawerHeader,
|
4104
4101
|
{
|
4105
4102
|
as: "h2",
|
@@ -4112,7 +4109,7 @@ var DrawerTopMenu = ({
|
|
4112
4109
|
},
|
4113
4110
|
title
|
4114
4111
|
),
|
4115
|
-
/* @__PURE__ */
|
4112
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { flex: "1" }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { width: "fit-content", marginLeft: "auto" }, rightButton))
|
4116
4113
|
);
|
4117
4114
|
};
|
4118
4115
|
var DrawerCloseButton2 = () => {
|
@@ -4122,11 +4119,11 @@ var DrawerCloseButton2 = () => {
|
|
4122
4119
|
`(min-width: ${tokens12__namespace.default.size.breakpoint.sm})`
|
4123
4120
|
);
|
4124
4121
|
if (isScreenSizeMinSm) {
|
4125
|
-
return /* @__PURE__ */
|
4122
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4126
4123
|
Button2,
|
4127
4124
|
{
|
4128
4125
|
variant: "ghost",
|
4129
|
-
leftIcon: /* @__PURE__ */
|
4126
|
+
leftIcon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.CloseFill24Icon, null),
|
4130
4127
|
onClick: onClose,
|
4131
4128
|
"aria-label": t(texts23.close),
|
4132
4129
|
width: "fit-content"
|
@@ -4134,11 +4131,11 @@ var DrawerCloseButton2 = () => {
|
|
4134
4131
|
t(texts23.close)
|
4135
4132
|
);
|
4136
4133
|
}
|
4137
|
-
return /* @__PURE__ */
|
4134
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4138
4135
|
IconButton,
|
4139
4136
|
{
|
4140
4137
|
variant: "ghost",
|
4141
|
-
icon: /* @__PURE__ */
|
4138
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.CloseFill30Icon, null),
|
4142
4139
|
onClick: onClose,
|
4143
4140
|
"aria-label": t(texts23.close)
|
4144
4141
|
}
|
@@ -4151,11 +4148,11 @@ var DrawerBackButton = () => {
|
|
4151
4148
|
`(min-width: ${tokens12__namespace.default.size.breakpoint.sm})`
|
4152
4149
|
);
|
4153
4150
|
if (isScreenSizeMinSm) {
|
4154
|
-
return /* @__PURE__ */
|
4151
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4155
4152
|
Button2,
|
4156
4153
|
{
|
4157
4154
|
variant: "ghost",
|
4158
|
-
leftIcon: /* @__PURE__ */
|
4155
|
+
leftIcon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.ArrowLeftFill24Icon, null),
|
4159
4156
|
onClick: onClose,
|
4160
4157
|
"aria-label": t(texts23.backAriaLabel),
|
4161
4158
|
width: "fit-content"
|
@@ -4163,11 +4160,11 @@ var DrawerBackButton = () => {
|
|
4163
4160
|
t(texts23.back)
|
4164
4161
|
);
|
4165
4162
|
}
|
4166
|
-
return /* @__PURE__ */
|
4163
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4167
4164
|
IconButton,
|
4168
4165
|
{
|
4169
4166
|
variant: "ghost",
|
4170
|
-
icon: /* @__PURE__ */
|
4167
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.ArrowLeftFill30Icon, null),
|
4171
4168
|
onClick: onClose,
|
4172
4169
|
"aria-label": t(texts23.close)
|
4173
4170
|
}
|
@@ -4206,7 +4203,7 @@ var SimpleDrawer = ({
|
|
4206
4203
|
body,
|
4207
4204
|
...props
|
4208
4205
|
}) => {
|
4209
|
-
return /* @__PURE__ */
|
4206
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(Drawer, { placement, ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react.DrawerOverlay, null), /* @__PURE__ */ React84__namespace.default.createElement(DrawerContent, null, /* @__PURE__ */ React84__namespace.default.createElement(react.DrawerCloseButton, null), title && /* @__PURE__ */ React84__namespace.default.createElement(ModalHeader, null, title), /* @__PURE__ */ React84__namespace.default.createElement(react.DrawerBody, { ...body }, children)));
|
4210
4207
|
};
|
4211
4208
|
var EXPIRATION_DELAY = 1e3 * 60 * 60 * 24 * 30;
|
4212
4209
|
var Nudge = ({
|
@@ -4228,7 +4225,7 @@ var Nudge = ({
|
|
4228
4225
|
}
|
4229
4226
|
return null;
|
4230
4227
|
}
|
4231
|
-
return /* @__PURE__ */
|
4228
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4232
4229
|
react.Popover,
|
4233
4230
|
{
|
4234
4231
|
arrowSize: 12,
|
@@ -4236,8 +4233,8 @@ var Nudge = ({
|
|
4236
4233
|
defaultIsOpen: true,
|
4237
4234
|
...props
|
4238
4235
|
},
|
4239
|
-
/* @__PURE__ */
|
4240
|
-
/* @__PURE__ */
|
4236
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.PopoverAnchor, null, children),
|
4237
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.PopoverContent, { borderRadius: "sm" }, /* @__PURE__ */ React84__namespace.default.createElement(react.DarkMode, null, /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverArrow, null), /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverCloseButton, null), /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverBody, { margin: 1 }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { marginRight: 4 }, content), /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { marginTop: 1.5 }, actions ?? /* @__PURE__ */ React84__namespace.default.createElement(ButtonGroup, null, /* @__PURE__ */ React84__namespace.default.createElement(Button2, { variant: "tertiary", size: "xs" }, t(texts24.close)), /* @__PURE__ */ React84__namespace.default.createElement(Button2, { variant: "secondary", size: "xs", fontWeight: "bold" }, t(texts24.showMe)))))))
|
4241
4238
|
);
|
4242
4239
|
};
|
4243
4240
|
var texts24 = createTexts({
|
@@ -4261,23 +4258,23 @@ var WizardNudge = ({
|
|
4261
4258
|
content,
|
4262
4259
|
...props
|
4263
4260
|
}) => {
|
4264
|
-
const [currentStep, setCurrentStep] =
|
4261
|
+
const [currentStep, setCurrentStep] = React84.useState(1);
|
4265
4262
|
const totalSteps = content.length;
|
4266
4263
|
const isLastStep = totalSteps === currentStep;
|
4267
4264
|
const onNext = () => setCurrentStep((prev) => prev + 1);
|
4268
|
-
return /* @__PURE__ */
|
4265
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4269
4266
|
Nudge,
|
4270
4267
|
{
|
4271
4268
|
onClose,
|
4272
4269
|
name,
|
4273
4270
|
content: content[currentStep - 1],
|
4274
|
-
actions: /* @__PURE__ */
|
4271
|
+
actions: /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { gap: 3, alignItems: "center" }, /* @__PURE__ */ React84__namespace.default.createElement(
|
4275
4272
|
ProgressIndicator,
|
4276
4273
|
{
|
4277
4274
|
activeStep: currentStep,
|
4278
4275
|
numberOfSteps: totalSteps
|
4279
4276
|
}
|
4280
|
-
), /* @__PURE__ */
|
4277
|
+
), /* @__PURE__ */ React84__namespace.default.createElement(react.Box, null, /* @__PURE__ */ React84__namespace.default.createElement(NextOrCloseButton, { isLastStep, onNext }))),
|
4281
4278
|
...props
|
4282
4279
|
},
|
4283
4280
|
children
|
@@ -4286,12 +4283,12 @@ var WizardNudge = ({
|
|
4286
4283
|
var NextOrCloseButton = ({ isLastStep, onNext }) => {
|
4287
4284
|
const { onClose } = react.usePopoverContext();
|
4288
4285
|
const { t } = useTranslation();
|
4289
|
-
return /* @__PURE__ */
|
4286
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4290
4287
|
Button2,
|
4291
4288
|
{
|
4292
4289
|
variant: "tertiary",
|
4293
4290
|
size: "xs",
|
4294
|
-
leftIcon: isLastStep ? void 0 : /* @__PURE__ */
|
4291
|
+
leftIcon: isLastStep ? void 0 : /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.ArrowRightFill18Icon, null),
|
4295
4292
|
onClick: isLastStep ? onClose : onNext,
|
4296
4293
|
width: "fit-content"
|
4297
4294
|
},
|
@@ -4355,7 +4352,7 @@ var Pagination = ({
|
|
4355
4352
|
}
|
4356
4353
|
}
|
4357
4354
|
return displayPageNumbers.map(
|
4358
|
-
(pageNumber, index) => pageNumber === "..." ? /* @__PURE__ */
|
4355
|
+
(pageNumber, index) => pageNumber === "..." ? /* @__PURE__ */ React84__namespace.default.createElement(react.ListItem, { key: index, sx: style.listItem }, /* @__PURE__ */ React84__namespace.default.createElement(react.Center, null, "...")) : /* @__PURE__ */ React84__namespace.default.createElement(
|
4359
4356
|
react.Link,
|
4360
4357
|
{
|
4361
4358
|
key: index,
|
@@ -4372,7 +4369,7 @@ var Pagination = ({
|
|
4372
4369
|
)
|
4373
4370
|
);
|
4374
4371
|
};
|
4375
|
-
return /* @__PURE__ */
|
4372
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { as: "nav", "aria-label": "pagination" }, /* @__PURE__ */ React84__namespace.default.createElement(
|
4376
4373
|
react.UnorderedList,
|
4377
4374
|
{
|
4378
4375
|
display: "flex",
|
@@ -4381,22 +4378,22 @@ var Pagination = ({
|
|
4381
4378
|
padding: 0,
|
4382
4379
|
margin: 0
|
4383
4380
|
},
|
4384
|
-
/* @__PURE__ */
|
4381
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.ListItem, { "aria-label": t(texts26.previousPage) }, /* @__PURE__ */ React84__namespace.default.createElement(
|
4385
4382
|
TextLink,
|
4386
4383
|
{
|
4387
4384
|
onClick: () => onPageChange(selectedPage - 1),
|
4388
4385
|
sx: hasPreviousPage ? style.link : style.disabled
|
4389
4386
|
},
|
4390
|
-
/* @__PURE__ */
|
4387
|
+
/* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.DropdownLeftFill18Icon, { sx: style.icon })
|
4391
4388
|
)),
|
4392
4389
|
renderPaginationButtons(),
|
4393
|
-
/* @__PURE__ */
|
4390
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.ListItem, { "aria-label": t(texts26.nextPage) }, /* @__PURE__ */ React84__namespace.default.createElement(
|
4394
4391
|
TextLink,
|
4395
4392
|
{
|
4396
4393
|
onClick: () => onPageChange(selectedPage + 1),
|
4397
4394
|
sx: hasNextPage ? style.link : style.disabled
|
4398
4395
|
},
|
4399
|
-
/* @__PURE__ */
|
4396
|
+
/* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.DropdownRightFill18Icon, { sx: style.icon })
|
4400
4397
|
))
|
4401
4398
|
));
|
4402
4399
|
};
|
@@ -4416,7 +4413,7 @@ var texts26 = createTexts({
|
|
4416
4413
|
});
|
4417
4414
|
var ProgressDot = ({ isActive }) => {
|
4418
4415
|
const style = react.useMultiStyleConfig("ProgressIndicator");
|
4419
|
-
return /* @__PURE__ */
|
4416
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4420
4417
|
react.Box,
|
4421
4418
|
{
|
4422
4419
|
as: "svg",
|
@@ -4426,7 +4423,7 @@ var ProgressDot = ({ isActive }) => {
|
|
4426
4423
|
viewBox: "0 0 100 100",
|
4427
4424
|
"aria-current": isActive ? "step" : void 0
|
4428
4425
|
},
|
4429
|
-
/* @__PURE__ */
|
4426
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { as: "circle", cx: "50", cy: "50", r: "50" })
|
4430
4427
|
);
|
4431
4428
|
};
|
4432
4429
|
|
@@ -4437,7 +4434,7 @@ var ProgressIndicator = ({
|
|
4437
4434
|
}) => {
|
4438
4435
|
const { t } = useTranslation();
|
4439
4436
|
const style = react.useMultiStyleConfig("ProgressIndicator");
|
4440
|
-
return /* @__PURE__ */
|
4437
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4441
4438
|
react.Box,
|
4442
4439
|
{
|
4443
4440
|
__css: style.root,
|
@@ -4447,7 +4444,7 @@ var ProgressIndicator = ({
|
|
4447
4444
|
"aria-valuenow": activeStep,
|
4448
4445
|
"aria-valuetext": t(texts27.stepsOf(activeStep, numberOfSteps))
|
4449
4446
|
},
|
4450
|
-
/* @__PURE__ */
|
4447
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { __css: style.container }, Array.from({ length: numberOfSteps }, (_, i) => /* @__PURE__ */ React84__namespace.default.createElement(
|
4451
4448
|
ProgressDot,
|
4452
4449
|
{
|
4453
4450
|
key: i,
|
@@ -4474,9 +4471,9 @@ var SporProvider = ({
|
|
4474
4471
|
}) => {
|
4475
4472
|
const brandCustomizations = brandTheme[brand] ?? {};
|
4476
4473
|
const extendedTheme = deepmerge__default.default(theme2, brandCustomizations);
|
4477
|
-
return /* @__PURE__ */
|
4474
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(LanguageProvider, { language }, /* @__PURE__ */ React84__namespace.default.createElement(react.ChakraProvider, { theme: extendedTheme, ...props }, /* @__PURE__ */ React84__namespace.default.createElement(react$1.Global, { styles: fontFaces }), children));
|
4478
4475
|
};
|
4479
|
-
var StepperContext =
|
4476
|
+
var StepperContext = React84__namespace.default.createContext(null);
|
4480
4477
|
var StepperProvider = ({
|
4481
4478
|
activeStep,
|
4482
4479
|
children,
|
@@ -4484,7 +4481,7 @@ var StepperProvider = ({
|
|
4484
4481
|
numberOfSteps,
|
4485
4482
|
variant
|
4486
4483
|
}) => {
|
4487
|
-
return /* @__PURE__ */
|
4484
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
4488
4485
|
StepperContext.Provider,
|
4489
4486
|
{
|
4490
4487
|
value: { activeStep, onClick, numberOfSteps, variant }
|
@@ -4493,7 +4490,7 @@ var StepperProvider = ({
|
|
4493
4490
|
);
|
4494
4491
|
};
|
4495
4492
|
var useStepper = () => {
|
4496
|
-
const context =
|
4493
|
+
const context = React84__namespace.default.useContext(StepperContext);
|
4497
4494
|
if (!context) {
|
4498
4495
|
throw new Error(
|
4499
4496
|
"useStepper must be used within a StepperProvider. Most likely, you forgot to wrap your StepperStep in a Stepper component"
|
@@ -4521,7 +4518,7 @@ var Stepper = ({
|
|
4521
4518
|
const { t } = useTranslation();
|
4522
4519
|
const hideBackButtonOnFirstStep = activeStep === 1 && !onBackButtonClick;
|
4523
4520
|
const shownHeading = heading || title;
|
4524
|
-
return /* @__PURE__ */
|
4521
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: style.root }, /* @__PURE__ */ React84__namespace.default.createElement(
|
4525
4522
|
StepperProvider,
|
4526
4523
|
{
|
4527
4524
|
onClick,
|
@@ -4529,7 +4526,7 @@ var Stepper = ({
|
|
4529
4526
|
variant,
|
4530
4527
|
numberOfSteps
|
4531
4528
|
},
|
4532
|
-
/* @__PURE__ */
|
4529
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: style.container }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: style.innerContainer }, /* @__PURE__ */ React84__namespace.default.createElement(
|
4533
4530
|
react.Flex,
|
4534
4531
|
{
|
4535
4532
|
justifyContent: "space-between",
|
@@ -4537,11 +4534,11 @@ var Stepper = ({
|
|
4537
4534
|
gap: 2,
|
4538
4535
|
flex: 1
|
4539
4536
|
},
|
4540
|
-
/* @__PURE__ */
|
4537
|
+
/* @__PURE__ */ React84__namespace.default.createElement(
|
4541
4538
|
IconButton,
|
4542
4539
|
{
|
4543
4540
|
"aria-label": t(texts28.back),
|
4544
|
-
icon: /* @__PURE__ */
|
4541
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.ArrowLeftFill24Icon, null),
|
4545
4542
|
variant: "ghost",
|
4546
4543
|
size: "sm",
|
4547
4544
|
visibility: hideBackButtonOnFirstStep ? "hidden" : "visible",
|
@@ -4554,9 +4551,9 @@ var Stepper = ({
|
|
4554
4551
|
}
|
4555
4552
|
}
|
4556
4553
|
),
|
4557
|
-
shownHeading && /* @__PURE__ */
|
4558
|
-
/* @__PURE__ */
|
4559
|
-
)), /* @__PURE__ */
|
4554
|
+
shownHeading && /* @__PURE__ */ React84__namespace.default.createElement(Text5, { flex: 1, variant: "sm", as: headingLevel, sx: style.title }, shownHeading),
|
4555
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: style.stepCounter }, t(texts28.stepsOf(activeStep, numberOfSteps)))
|
4556
|
+
)), /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { justifyContent: "center", display: ["none", null, "flex"] }, steps.map((step, index) => /* @__PURE__ */ React84__namespace.default.createElement(
|
4560
4557
|
StepperStep,
|
4561
4558
|
{
|
4562
4559
|
key: index,
|
@@ -4601,14 +4598,14 @@ var StepperStep = ({
|
|
4601
4598
|
);
|
4602
4599
|
const iconColor = react.useColorModeValue("blackAlpha.200", "whiteAlpha.200");
|
4603
4600
|
const isDisabled = state !== "active" && isDisabledOverride || state === "disabled";
|
4604
|
-
return /* @__PURE__ */
|
4601
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { sx: style.stepContainer }, stepNumber > 1 && /* @__PURE__ */ React84__namespace.default.createElement(
|
4605
4602
|
sporIconReact.DropdownRightFill18Icon,
|
4606
4603
|
{
|
4607
4604
|
marginX: 5,
|
4608
4605
|
display: ["none", null, "block"],
|
4609
4606
|
color: iconColor
|
4610
4607
|
}
|
4611
|
-
), isDisabled ? /* @__PURE__ */
|
4608
|
+
), isDisabled ? /* @__PURE__ */ React84__namespace.default.createElement(
|
4612
4609
|
Text5,
|
4613
4610
|
{
|
4614
4611
|
variant: "xs",
|
@@ -4618,7 +4615,7 @@ var StepperStep = ({
|
|
4618
4615
|
paddingX: 2
|
4619
4616
|
},
|
4620
4617
|
children
|
4621
|
-
) : /* @__PURE__ */
|
4618
|
+
) : /* @__PURE__ */ React84__namespace.default.createElement(
|
4622
4619
|
Button2,
|
4623
4620
|
{
|
4624
4621
|
size: "xs",
|
@@ -4641,11 +4638,11 @@ var getState = (stepNumber, activeStep) => {
|
|
4641
4638
|
return "disabled";
|
4642
4639
|
};
|
4643
4640
|
var Tabs = react.forwardRef((props, ref) => {
|
4644
|
-
return /* @__PURE__ */
|
4641
|
+
return /* @__PURE__ */ React84__namespace.createElement(react.Tabs, { ...props, ref });
|
4645
4642
|
});
|
4646
4643
|
var Table = react.forwardRef((props, ref) => {
|
4647
4644
|
const { variant, size, colorScheme, children, ...rest } = props;
|
4648
|
-
return /* @__PURE__ */
|
4645
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { ...rest, ...getStyleProps(props) }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { overflowX: "auto", role: "region" }, /* @__PURE__ */ React84__namespace.default.createElement(
|
4649
4646
|
react.Table,
|
4650
4647
|
{
|
4651
4648
|
variant,
|
@@ -8990,12 +8987,12 @@ var brandTheme = {
|
|
8990
8987
|
};
|
8991
8988
|
var BaseToast = ({ children, variant, id }) => {
|
8992
8989
|
const styles2 = react.useStyleConfig("Toast", { variant });
|
8993
|
-
return /* @__PURE__ */
|
8990
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(react.Flex, { sx: styles2, id }, /* @__PURE__ */ React84__namespace.default.createElement(ToastIcon, { variant }), children);
|
8994
8991
|
};
|
8995
8992
|
var ToastIcon = ({ variant }) => {
|
8996
8993
|
const Icon = getIcon3(variant);
|
8997
8994
|
const { t } = useTranslation();
|
8998
|
-
return /* @__PURE__ */
|
8995
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
8999
8996
|
Icon,
|
9000
8997
|
{
|
9001
8998
|
flexShrink: 0,
|
@@ -9045,7 +9042,7 @@ var ActionToast = ({
|
|
9045
9042
|
buttonText,
|
9046
9043
|
id
|
9047
9044
|
}) => {
|
9048
|
-
return /* @__PURE__ */
|
9045
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { marginRight: 2, flexGrow: "1" }, children), /* @__PURE__ */ React84__namespace.default.createElement(Button2, { variant: "tertiary", size: "sm", onClick }, buttonText));
|
9049
9046
|
};
|
9050
9047
|
var ClosableToast = ({
|
9051
9048
|
children,
|
@@ -9055,13 +9052,13 @@ var ClosableToast = ({
|
|
9055
9052
|
}) => {
|
9056
9053
|
const styles2 = react.useMultiStyleConfig("Toast", { variant });
|
9057
9054
|
const { t } = useTranslation();
|
9058
|
-
return /* @__PURE__ */
|
9055
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React84__namespace.default.createElement(react.Box, { flexGrow: "1" }, children), /* @__PURE__ */ React84__namespace.default.createElement(
|
9059
9056
|
IconButton,
|
9060
9057
|
{
|
9061
9058
|
sx: styles2.dismissButton,
|
9062
9059
|
variant: "ghost",
|
9063
9060
|
"aria-label": t(texts30.dismiss),
|
9064
|
-
icon: /* @__PURE__ */
|
9061
|
+
icon: /* @__PURE__ */ React84__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
9065
9062
|
onClick: onClose
|
9066
9063
|
}
|
9067
9064
|
));
|
@@ -9078,7 +9075,7 @@ var texts30 = createTexts({
|
|
9078
9075
|
// src/toast/useToast.tsx
|
9079
9076
|
var useToast = () => {
|
9080
9077
|
const toast = react.useToast();
|
9081
|
-
const wrappedToast =
|
9078
|
+
const wrappedToast = React84.useCallback(
|
9082
9079
|
(opts) => {
|
9083
9080
|
const Toast = getToastComponent(opts);
|
9084
9081
|
toast({
|
@@ -9096,7 +9093,7 @@ var getToastComponent = (opts) => {
|
|
9096
9093
|
if (id === void 0) {
|
9097
9094
|
return null;
|
9098
9095
|
}
|
9099
|
-
return /* @__PURE__ */
|
9096
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
9100
9097
|
ClosableToast,
|
9101
9098
|
{
|
9102
9099
|
id: id.toString(),
|
@@ -9117,7 +9114,7 @@ var getToastComponent = (opts) => {
|
|
9117
9114
|
if (id === void 0) {
|
9118
9115
|
return null;
|
9119
9116
|
}
|
9120
|
-
return /* @__PURE__ */
|
9117
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
9121
9118
|
ActionToast,
|
9122
9119
|
{
|
9123
9120
|
id: id.toString(),
|
@@ -9133,7 +9130,7 @@ var getToastComponent = (opts) => {
|
|
9133
9130
|
if (id === void 0) {
|
9134
9131
|
return null;
|
9135
9132
|
}
|
9136
|
-
return /* @__PURE__ */
|
9133
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(BaseToast, { id: id.toString(), variant: opts.variant }, opts.text);
|
9137
9134
|
};
|
9138
9135
|
};
|
9139
9136
|
var Tooltip = ({
|
@@ -9147,7 +9144,7 @@ var Tooltip = ({
|
|
9147
9144
|
withCloseButton = false,
|
9148
9145
|
...props
|
9149
9146
|
}) => {
|
9150
|
-
return /* @__PURE__ */
|
9147
|
+
return /* @__PURE__ */ React84__namespace.default.createElement(
|
9151
9148
|
react.Popover,
|
9152
9149
|
{
|
9153
9150
|
onClose,
|
@@ -9159,8 +9156,8 @@ var Tooltip = ({
|
|
9159
9156
|
arrowShadowColor: "none",
|
9160
9157
|
...props
|
9161
9158
|
},
|
9162
|
-
/* @__PURE__ */
|
9163
|
-
/* @__PURE__ */
|
9159
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.PopoverTrigger, null, children),
|
9160
|
+
/* @__PURE__ */ React84__namespace.default.createElement(react.PopoverContent, null, /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverArrow, null), withCloseButton && /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverCloseButton, null), /* @__PURE__ */ React84__namespace.default.createElement(react.PopoverBody, null, content))
|
9164
9161
|
);
|
9165
9162
|
};
|
9166
9163
|
var useMediaQuery2 = react.useMediaQuery;
|
@@ -9240,6 +9237,10 @@ Object.defineProperty(exports, "Flex", {
|
|
9240
9237
|
enumerable: true,
|
9241
9238
|
get: function () { return react.Flex; }
|
9242
9239
|
});
|
9240
|
+
Object.defineProperty(exports, "FormControl", {
|
9241
|
+
enumerable: true,
|
9242
|
+
get: function () { return react.FormControl; }
|
9243
|
+
});
|
9243
9244
|
Object.defineProperty(exports, "FormHelperText", {
|
9244
9245
|
enumerable: true,
|
9245
9246
|
get: function () { return react.FormHelperText; }
|
@@ -9494,7 +9495,6 @@ exports.Expandable = Expandable;
|
|
9494
9495
|
exports.ExpandableAlert = ExpandableAlert;
|
9495
9496
|
exports.ExpandableItem = ExpandableItem;
|
9496
9497
|
exports.FloatingActionButton = FloatingActionButton;
|
9497
|
-
exports.FormControl = FormControl;
|
9498
9498
|
exports.FormErrorMessage = FormErrorMessage;
|
9499
9499
|
exports.FormLabel = FormLabel;
|
9500
9500
|
exports.FullScreenDrawer = FullScreenDrawer;
|