@vygruppen/spor-react 3.6.1 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +17 -0
- package/dist/{CountryCodeSelect-SXVHRDQC.mjs → CountryCodeSelect-3P7RFAM2.mjs} +1 -1
- package/dist/{chunk-OSIIU3AM.mjs → chunk-IP63HI2Y.mjs} +95 -92
- package/dist/index.d.mts +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.js +116 -90
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/datepicker/DateTimeSegment.tsx +2 -2
- package/src/index.tsx +2 -0
- package/src/list/index.tsx +3 -0
- package/src/provider/SporProvider.tsx +0 -6
- package/src/theme/foundations/fonts.ts +3 -3
- package/src/theme/foundations/index.ts +1 -0
- package/src/theme/foundations/styles.ts +12 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import { forwardRef, Divider as Divider$1, Stack as Stack$1, Accordion as Accordion$1, Skeleton as Skeleton$1, useButtonGroup, Button as Button$1, Box, Center, ButtonGroup as ButtonGroup$1, IconButton as IconButton$1, useStyleConfig, Badge as Badge$1, Code as Code$1, Text, useMultiStyleConfig, PopoverAnchor, FormLabel, Flex, useFormControlContext, useBreakpointValue, PopoverContent, PopoverArrow, PopoverBody, FocusLock, Popover, InputGroup, PopoverTrigger, Portal, chakra, Checkbox as Checkbox$1, useCheckbox, FormControl as FormControl$1, InputLeftElement, Input as Input$1, InputRightElement, Select, useDisclosure, useControllableState, Radio as Radio$1, RadioGroup as RadioGroup$1, Switch as Switch$1, Textarea as Textarea$1, Link, ModalHeader as ModalHeader$1, useModalContext, DrawerContent as DrawerContent$1, Tabs as Tabs$1, Table as Table$1, defineStyleConfig as defineStyleConfig$1, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, SkeletonCircle as SkeletonCircle$1, SkeletonText as SkeletonText$1, Breadcrumb as Breadcrumb$1, BreadcrumbItem as BreadcrumbItem$1, BreadcrumbLink as BreadcrumbLink$1, Heading as Heading$1, CheckboxGroup as CheckboxGroup$1, List, ListItem, useColorModeValue, useFormControlProps, useFormControl, Drawer as Drawer$1, DrawerOverlay, DrawerCloseButton, DrawerBody, usePopoverContext, DarkMode, PopoverCloseButton, ChakraProvider, HStack, useToast as useToast$1, useInterval } from '@chakra-ui/react';
|
2
|
-
export { AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box, Center, Collapse, Container, DarkMode, DrawerBody, DrawerCloseButton, DrawerFooter, DrawerOverlay, Fade, Flex, FormHelperText, Grid, GridItem, HStack, Image, Img, InputGroup, LightMode, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalOverlay, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, ScaleFade, SimpleGrid, Slide, SlideFade, Spacer, Tab, TabList, TabPanel, TabPanels, TableCaption, Tbody, Td, Tfoot, Th, Thead, Tr, VStack, Wrap, WrapItem, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
2
|
+
export { AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box, Center, Collapse, Container, DarkMode, DrawerBody, DrawerCloseButton, DrawerFooter, DrawerOverlay, Fade, Flex, FormHelperText, Grid, GridItem, HStack, Image, Img, InputGroup, LightMode, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalOverlay, OrderedList, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, ScaleFade, SimpleGrid, Slide, SlideFade, Spacer, Tab, TabList, TabPanel, TabPanels, TableCaption, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, VStack, Wrap, WrapItem, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
3
3
|
import tokens10__default from '@vygruppen/spor-design-tokens';
|
4
4
|
import * as tokens10 from '@vygruppen/spor-design-tokens';
|
5
5
|
export { tokens10 as tokens };
|
@@ -1425,8 +1425,8 @@ var texts5 = createTexts({
|
|
1425
1425
|
}
|
1426
1426
|
});
|
1427
1427
|
var BaseAlert = ({ variant, children, ...boxProps }) => {
|
1428
|
-
const
|
1429
|
-
return /* @__PURE__ */ React50__default.createElement(Box, { __css:
|
1428
|
+
const styles3 = useMultiStyleConfig("Alert", { variant });
|
1429
|
+
return /* @__PURE__ */ React50__default.createElement(Box, { __css: styles3.container, ...boxProps }, children);
|
1430
1430
|
};
|
1431
1431
|
|
1432
1432
|
// src/alert/ClosableAlert.tsx
|
@@ -1437,7 +1437,7 @@ var ClosableAlert = ({
|
|
1437
1437
|
}
|
1438
1438
|
}) => {
|
1439
1439
|
const { isOpen, onClose } = useDisclosure({ defaultIsOpen: true });
|
1440
|
-
const
|
1440
|
+
const styles3 = useMultiStyleConfig("Alert", { variant });
|
1441
1441
|
const { t: t2 } = useTranslation();
|
1442
1442
|
if (!isOpen) {
|
1443
1443
|
return null;
|
@@ -1454,7 +1454,7 @@ var ClosableAlert = ({
|
|
1454
1454
|
onClick: handleClose,
|
1455
1455
|
icon: /* @__PURE__ */ React50__default.createElement(CloseFill18Icon, null),
|
1456
1456
|
"aria-label": t2(texts6.close),
|
1457
|
-
sx:
|
1457
|
+
sx: styles3.closeButton
|
1458
1458
|
}
|
1459
1459
|
), /* @__PURE__ */ React50__default.createElement(AlertIcon, { variant }), children);
|
1460
1460
|
};
|
@@ -1525,11 +1525,11 @@ var BreadcrumbItem = BreadcrumbItem$1;
|
|
1525
1525
|
var BreadcrumbLink = BreadcrumbLink$1;
|
1526
1526
|
var Card = forwardRef(
|
1527
1527
|
({ size: size2 = "sm", colorScheme = "white", children, ...props }, ref) => {
|
1528
|
-
const
|
1528
|
+
const styles3 = useStyleConfig("Card", {
|
1529
1529
|
colorScheme,
|
1530
1530
|
size: size2
|
1531
1531
|
});
|
1532
|
-
return /* @__PURE__ */ React50__default.createElement(Box, { __css:
|
1532
|
+
return /* @__PURE__ */ React50__default.createElement(Box, { __css: styles3, ...props, ref }, children);
|
1533
1533
|
}
|
1534
1534
|
);
|
1535
1535
|
function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
@@ -3299,7 +3299,7 @@ function CalendarCell({ state: state2, date, currentMonth }) {
|
|
3299
3299
|
isOutsideVisibleRange
|
3300
3300
|
} = useCalendarCell({ date }, state2, ref);
|
3301
3301
|
const isOutsideMonth = !isSameMonth(currentMonth, date);
|
3302
|
-
const
|
3302
|
+
const styles3 = useMultiStyleConfig("Datepicker", {});
|
3303
3303
|
const stateProps = {};
|
3304
3304
|
if (isSelected) {
|
3305
3305
|
stateProps["data-selected"] = true;
|
@@ -3354,7 +3354,7 @@ function CalendarCell({ state: state2, date, currentMonth }) {
|
|
3354
3354
|
...buttonProps,
|
3355
3355
|
...stateProps,
|
3356
3356
|
ref,
|
3357
|
-
sx:
|
3357
|
+
sx: styles3.dateCell,
|
3358
3358
|
hidden: isOutsideVisibleRange,
|
3359
3359
|
width: "100%"
|
3360
3360
|
},
|
@@ -3404,14 +3404,14 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3404
3404
|
);
|
3405
3405
|
const weeksInMonth = getWeeksInMonth(state2.visibleRange.start, locale);
|
3406
3406
|
const weeksInMonthRange = new Array(weeksInMonth).fill(0).map((_, i) => i);
|
3407
|
-
const
|
3407
|
+
const styles3 = useMultiStyleConfig("Datepicker", {});
|
3408
3408
|
return /* @__PURE__ */ React50__default.createElement("table", { ...gridProps }, /* @__PURE__ */ React50__default.createElement("thead", { ...headerProps }, /* @__PURE__ */ React50__default.createElement("tr", null, weekDays[language].map((day, index) => {
|
3409
3409
|
return /* @__PURE__ */ React50__default.createElement(
|
3410
3410
|
Text4,
|
3411
3411
|
{
|
3412
3412
|
as: "th",
|
3413
3413
|
key: index,
|
3414
|
-
sx: index < 5 ?
|
3414
|
+
sx: index < 5 ? styles3.weekdays : styles3.weekend,
|
3415
3415
|
variant: "sm"
|
3416
3416
|
},
|
3417
3417
|
day
|
@@ -3582,7 +3582,7 @@ var texts8 = createTexts({
|
|
3582
3582
|
var CalendarTriggerButton = forwardRef(
|
3583
3583
|
({ ...buttonProps }, ref) => {
|
3584
3584
|
const { t: t2 } = useTranslation();
|
3585
|
-
const
|
3585
|
+
const styles3 = useMultiStyleConfig("Datepicker", {});
|
3586
3586
|
const { onPress, ...filteredButtonProps } = buttonProps;
|
3587
3587
|
const handleOnPress = (event) => {
|
3588
3588
|
if (onPress) {
|
@@ -3597,7 +3597,7 @@ var CalendarTriggerButton = forwardRef(
|
|
3597
3597
|
as: "button",
|
3598
3598
|
type: "button",
|
3599
3599
|
"aria-label": t2(texts9.openCalendar),
|
3600
|
-
sx:
|
3600
|
+
sx: styles3.calendarTriggerButton,
|
3601
3601
|
...filteredButtonProps,
|
3602
3602
|
onKeyUp: handleOnPress
|
3603
3603
|
},
|
@@ -3622,7 +3622,7 @@ var DateTimeSegment = forwardRef$1(
|
|
3622
3622
|
state2,
|
3623
3623
|
ref
|
3624
3624
|
);
|
3625
|
-
const
|
3625
|
+
const styles3 = useMultiStyleConfig("Datepicker", {
|
3626
3626
|
isPlaceholder: segment.isPlaceholder,
|
3627
3627
|
isEditable: segment.isEditable
|
3628
3628
|
});
|
@@ -3633,15 +3633,15 @@ var DateTimeSegment = forwardRef$1(
|
|
3633
3633
|
ref,
|
3634
3634
|
style: {
|
3635
3635
|
...segmentProps.style,
|
3636
|
-
fontVariantNumeric: "tabular-nums",
|
3637
3636
|
boxSizing: "content-box"
|
3638
3637
|
},
|
3639
3638
|
paddingX: "1px",
|
3640
|
-
textAlign: "
|
3639
|
+
textAlign: "center",
|
3641
3640
|
outline: "none",
|
3642
3641
|
borderRadius: "xs",
|
3643
3642
|
fontSize: ["mobile.sm", "desktop.sm"],
|
3644
|
-
|
3643
|
+
minWidth: isPaddable(segment.type) ? "1.3em" : "auto",
|
3644
|
+
sx: styles3.dateTimeSegment,
|
3645
3645
|
_focus: {
|
3646
3646
|
backgroundColor: "darkTeal",
|
3647
3647
|
color: "white"
|
@@ -3666,7 +3666,7 @@ var DateField = forwardRef$1(
|
|
3666
3666
|
(props, externalRef) => {
|
3667
3667
|
var _a6;
|
3668
3668
|
const locale = useCurrentLocale();
|
3669
|
-
const
|
3669
|
+
const styles3 = useMultiStyleConfig("Datepicker", {});
|
3670
3670
|
const state2 = $3c0fc76039f1c516$export$60e84778edff6d26({
|
3671
3671
|
...props,
|
3672
3672
|
locale,
|
@@ -3684,7 +3684,7 @@ var DateField = forwardRef$1(
|
|
3684
3684
|
{
|
3685
3685
|
...props.labelProps,
|
3686
3686
|
...labelProps,
|
3687
|
-
sx:
|
3687
|
+
sx: styles3.inputLabel,
|
3688
3688
|
position: "absolute",
|
3689
3689
|
paddingTop: "2px"
|
3690
3690
|
},
|
@@ -3712,12 +3712,12 @@ var StyledField = forwardRef(
|
|
3712
3712
|
const { isInvalid } = useFormControlContext() ?? {
|
3713
3713
|
isInvalid: false
|
3714
3714
|
};
|
3715
|
-
const
|
3715
|
+
const styles3 = useMultiStyleConfig("Datepicker", { variant });
|
3716
3716
|
return /* @__PURE__ */ React50__default.createElement(
|
3717
3717
|
Box,
|
3718
3718
|
{
|
3719
3719
|
...otherProps,
|
3720
|
-
__css:
|
3720
|
+
__css: styles3.wrapper,
|
3721
3721
|
ref,
|
3722
3722
|
"aria-invalid": isInvalid
|
3723
3723
|
},
|
@@ -3760,7 +3760,7 @@ var DatePicker = forwardRef$1(
|
|
3760
3760
|
state2,
|
3761
3761
|
ref
|
3762
3762
|
);
|
3763
|
-
const
|
3763
|
+
const styles3 = useMultiStyleConfig("Datepicker", {});
|
3764
3764
|
const locale = useCurrentLocale();
|
3765
3765
|
const responsiveVariant = useBreakpointValue(typeof variant === "string" ? [variant] : variant) ?? "simple";
|
3766
3766
|
const hasTrigger = responsiveVariant === "with-trigger";
|
@@ -3769,7 +3769,7 @@ var DatePicker = forwardRef$1(
|
|
3769
3769
|
state2.setOpen(true);
|
3770
3770
|
}
|
3771
3771
|
};
|
3772
|
-
const popoverContent = /* @__PURE__ */ React50__default.createElement(PopoverContent, { color: "darkGrey", boxShadow: "md", sx:
|
3772
|
+
const popoverContent = /* @__PURE__ */ React50__default.createElement(PopoverContent, { color: "darkGrey", boxShadow: "md", sx: styles3.calendar }, /* @__PURE__ */ React50__default.createElement(PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React50__default.createElement(PopoverBody, null, /* @__PURE__ */ React50__default.createElement(FocusLock, null, /* @__PURE__ */ React50__default.createElement(
|
3773
3773
|
Calendar,
|
3774
3774
|
{
|
3775
3775
|
...calendarProps,
|
@@ -3859,7 +3859,7 @@ function DateRangePicker({
|
|
3859
3859
|
calendarProps
|
3860
3860
|
} = useDateRangePicker(props, state2, ref);
|
3861
3861
|
const responsiveVariant = useBreakpointValue(typeof variant === "string" ? [variant] : variant) ?? "simple";
|
3862
|
-
const
|
3862
|
+
const styles3 = useMultiStyleConfig("Datepicker", {
|
3863
3863
|
variant: responsiveVariant
|
3864
3864
|
});
|
3865
3865
|
const locale = useCurrentLocale();
|
@@ -3875,8 +3875,8 @@ function DateRangePicker({
|
|
3875
3875
|
}
|
3876
3876
|
};
|
3877
3877
|
const hasTrigger = responsiveVariant === "with-trigger";
|
3878
|
-
const popoverContent = /* @__PURE__ */ React50__default.createElement(PopoverContent, { sx:
|
3879
|
-
return /* @__PURE__ */ React50__default.createElement(I18nProvider, { locale }, /* @__PURE__ */ React50__default.createElement(Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React50__default.createElement(FormLabel, { ...labelProps, sx:
|
3878
|
+
const popoverContent = /* @__PURE__ */ React50__default.createElement(PopoverContent, { sx: styles3.calendar, boxShadow: "md", maxWidth: "none" }, /* @__PURE__ */ React50__default.createElement(PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React50__default.createElement(PopoverBody, null, /* @__PURE__ */ React50__default.createElement(FocusLock, null, /* @__PURE__ */ React50__default.createElement(RangeCalendar, { ...calendarProps }))));
|
3879
|
+
return /* @__PURE__ */ React50__default.createElement(I18nProvider, { locale }, /* @__PURE__ */ React50__default.createElement(Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React50__default.createElement(FormLabel, { ...labelProps, sx: styles3.inputLabel }, props.label), /* @__PURE__ */ React50__default.createElement(
|
3880
3880
|
Popover,
|
3881
3881
|
{
|
3882
3882
|
...dialogProps,
|
@@ -4205,7 +4205,7 @@ var CardSelect = forwardRef(
|
|
4205
4205
|
triggerRef
|
4206
4206
|
);
|
4207
4207
|
const { buttonProps } = useButton(triggerProps, triggerRef);
|
4208
|
-
const
|
4208
|
+
const styles3 = useMultiStyleConfig("CardSelect", { variant, size: size2 });
|
4209
4209
|
useForceRerender(state2.isOpen);
|
4210
4210
|
const ChevronIcon = size2 === "sm" ? DropdownDownFill18Icon : DropdownDownFill24Icon;
|
4211
4211
|
return /* @__PURE__ */ React50__default.createElement(Box, { ...props }, /* @__PURE__ */ React50__default.createElement(
|
@@ -4213,7 +4213,7 @@ var CardSelect = forwardRef(
|
|
4213
4213
|
{
|
4214
4214
|
type: "button",
|
4215
4215
|
ref: triggerRef,
|
4216
|
-
sx:
|
4216
|
+
sx: styles3.trigger,
|
4217
4217
|
...buttonProps,
|
4218
4218
|
width,
|
4219
4219
|
"data-attachable": true
|
@@ -4238,7 +4238,7 @@ var CardSelect = forwardRef(
|
|
4238
4238
|
{
|
4239
4239
|
colorScheme: "white",
|
4240
4240
|
size: "lg",
|
4241
|
-
sx:
|
4241
|
+
sx: styles3.card,
|
4242
4242
|
...overlayProps
|
4243
4243
|
},
|
4244
4244
|
/* @__PURE__ */ React50__default.createElement(Dialog, { "aria-label": label }, children)
|
@@ -4276,7 +4276,7 @@ var ChoiceChip = forwardRef((props, ref) => {
|
|
4276
4276
|
getRootProps,
|
4277
4277
|
getLabelProps
|
4278
4278
|
} = useCheckbox(props);
|
4279
|
-
const
|
4279
|
+
const styles3 = useMultiStyleConfig("ChoiceChip", {
|
4280
4280
|
size: size2,
|
4281
4281
|
variant,
|
4282
4282
|
icon,
|
@@ -4295,13 +4295,13 @@ var ChoiceChip = forwardRef((props, ref) => {
|
|
4295
4295
|
chakra.div,
|
4296
4296
|
{
|
4297
4297
|
...getLabelProps(),
|
4298
|
-
__css:
|
4298
|
+
__css: styles3.container,
|
4299
4299
|
"data-checked": dataAttr(state2.isChecked),
|
4300
4300
|
"data-hover": dataAttr(state2.isHovered),
|
4301
4301
|
"data-focus": dataAttr(state2.isFocused)
|
4302
4302
|
},
|
4303
|
-
icon && /* @__PURE__ */ React50__default.createElement(chakra.span, { __css:
|
4304
|
-
/* @__PURE__ */ React50__default.createElement(chakra.span, { __css:
|
4303
|
+
icon && /* @__PURE__ */ React50__default.createElement(chakra.span, { __css: styles3.icon }, state2.isChecked ? icon.checked : icon.default),
|
4304
|
+
/* @__PURE__ */ React50__default.createElement(chakra.span, { __css: styles3.label, ...getCheckboxProps() }, variant !== "icon" && children),
|
4305
4305
|
variant === "filter" && state2.isChecked && /* @__PURE__ */ React50__default.createElement(CloseOutline24Icon, { marginLeft: 1.5 })
|
4306
4306
|
)
|
4307
4307
|
);
|
@@ -4513,13 +4513,13 @@ function ListBox({
|
|
4513
4513
|
...props
|
4514
4514
|
}) {
|
4515
4515
|
const { listBoxProps } = useListBox(props, state2, listBoxRef);
|
4516
|
-
const
|
4516
|
+
const styles3 = useMultiStyleConfig("ListBox", {});
|
4517
4517
|
return /* @__PURE__ */ React50__default.createElement(
|
4518
4518
|
List,
|
4519
4519
|
{
|
4520
4520
|
...listBoxProps,
|
4521
4521
|
ref: listBoxRef,
|
4522
|
-
sx:
|
4522
|
+
sx: styles3.container,
|
4523
4523
|
"aria-busy": isLoading,
|
4524
4524
|
maxWidth
|
4525
4525
|
},
|
@@ -4531,13 +4531,13 @@ function ListBox({
|
|
4531
4531
|
}
|
4532
4532
|
function ItemLabel({ children }) {
|
4533
4533
|
let { labelProps } = useOptionContext();
|
4534
|
-
const
|
4535
|
-
return /* @__PURE__ */ React50__default.createElement(Box, { ...labelProps, sx:
|
4534
|
+
const styles3 = useMultiStyleConfig("ListBox", {});
|
4535
|
+
return /* @__PURE__ */ React50__default.createElement(Box, { ...labelProps, sx: styles3.label }, children);
|
4536
4536
|
}
|
4537
4537
|
function ItemDescription({ children }) {
|
4538
4538
|
let { descriptionProps } = useOptionContext();
|
4539
|
-
const
|
4540
|
-
return /* @__PURE__ */ React50__default.createElement(Box, { ...descriptionProps, sx:
|
4539
|
+
const styles3 = useMultiStyleConfig("ListBox", {});
|
4540
|
+
return /* @__PURE__ */ React50__default.createElement(Box, { ...descriptionProps, sx: styles3.description }, children);
|
4541
4541
|
}
|
4542
4542
|
function Option({ item, state: state2 }) {
|
4543
4543
|
const ref = useRef(null);
|
@@ -4549,7 +4549,7 @@ function Option({ item, state: state2 }) {
|
|
4549
4549
|
labelProps,
|
4550
4550
|
descriptionProps
|
4551
4551
|
} = useOption({ key: item.key }, state2, ref);
|
4552
|
-
const
|
4552
|
+
const styles3 = useMultiStyleConfig("ListBox", {});
|
4553
4553
|
let dataFields = {};
|
4554
4554
|
if (isSelected) {
|
4555
4555
|
dataFields["data-selected"] = true;
|
@@ -4570,7 +4570,7 @@ function Option({ item, state: state2 }) {
|
|
4570
4570
|
{ passive: false, once: true }
|
4571
4571
|
);
|
4572
4572
|
}, []);
|
4573
|
-
return /* @__PURE__ */ React50__default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React50__default.createElement(ListItem, { ...optionProps, ...dataFields, ref, sx:
|
4573
|
+
return /* @__PURE__ */ React50__default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React50__default.createElement(ListItem, { ...optionProps, ...dataFields, ref, sx: styles3.item }, item.rendered));
|
4574
4574
|
}
|
4575
4575
|
var OptionContext = React50__default.createContext({
|
4576
4576
|
labelProps: {},
|
@@ -4629,14 +4629,14 @@ function InfoSelect({
|
|
4629
4629
|
state2,
|
4630
4630
|
triggerRef
|
4631
4631
|
);
|
4632
|
-
const
|
4632
|
+
const styles3 = useMultiStyleConfig("InfoSelect", {
|
4633
4633
|
isOpen: state2.isOpen,
|
4634
4634
|
isLabelSrOnly
|
4635
4635
|
});
|
4636
4636
|
const { buttonProps } = useButton(triggerProps, triggerRef);
|
4637
4637
|
const { t: t2 } = useTranslation();
|
4638
4638
|
const formControl = useFormControlProps(props);
|
4639
|
-
return /* @__PURE__ */ React50__default.createElement(Box, { sx:
|
4639
|
+
return /* @__PURE__ */ React50__default.createElement(Box, { sx: styles3.container }, /* @__PURE__ */ React50__default.createElement(chakra.div, { ...labelProps, sx: styles3.label }, props.label), /* @__PURE__ */ React50__default.createElement(
|
4640
4640
|
HiddenSelect,
|
4641
4641
|
{
|
4642
4642
|
state: state2,
|
@@ -4649,7 +4649,7 @@ function InfoSelect({
|
|
4649
4649
|
{
|
4650
4650
|
type: "button",
|
4651
4651
|
ref: triggerRef,
|
4652
|
-
sx:
|
4652
|
+
sx: styles3.button,
|
4653
4653
|
...buttonProps,
|
4654
4654
|
width,
|
4655
4655
|
height,
|
@@ -4658,7 +4658,7 @@ function InfoSelect({
|
|
4658
4658
|
"aria-describedby": formControl["aria-describedby"]
|
4659
4659
|
},
|
4660
4660
|
/* @__PURE__ */ React50__default.createElement(Box, { ...valueProps }, state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)),
|
4661
|
-
/* @__PURE__ */ React50__default.createElement(Box, { sx:
|
4661
|
+
/* @__PURE__ */ React50__default.createElement(Box, { sx: styles3.arrowIcon }, state2.isOpen ? /* @__PURE__ */ React50__default.createElement(DropdownUpFill24Icon, null) : /* @__PURE__ */ React50__default.createElement(DropdownDownFill24Icon, null))
|
4662
4662
|
), state2.isOpen && /* @__PURE__ */ React50__default.createElement(
|
4663
4663
|
Popover3,
|
4664
4664
|
{
|
@@ -4713,13 +4713,13 @@ var InputRightElement2 = forwardRef(
|
|
4713
4713
|
);
|
4714
4714
|
var NativeSelect = forwardRef(
|
4715
4715
|
({ label, ...props }, ref) => {
|
4716
|
-
const
|
4716
|
+
const styles3 = useMultiStyleConfig("Select", props);
|
4717
4717
|
return /* @__PURE__ */ React50__default.createElement(FormControl, null, /* @__PURE__ */ React50__default.createElement(
|
4718
4718
|
Select,
|
4719
4719
|
{
|
4720
4720
|
"data-attachable": true,
|
4721
4721
|
...props,
|
4722
|
-
rootProps: { __css:
|
4722
|
+
rootProps: { __css: styles3.root },
|
4723
4723
|
ref
|
4724
4724
|
}
|
4725
4725
|
), label && /* @__PURE__ */ React50__default.createElement(FormLabel3, null, label));
|
@@ -5083,7 +5083,7 @@ var texts14 = createTexts({
|
|
5083
5083
|
sv: "Telefonnummer"
|
5084
5084
|
}
|
5085
5085
|
});
|
5086
|
-
var LazyCountryCodeSelect = React50__default.lazy(() => import('./CountryCodeSelect-
|
5086
|
+
var LazyCountryCodeSelect = React50__default.lazy(() => import('./CountryCodeSelect-3P7RFAM2.mjs'));
|
5087
5087
|
var Radio = forwardRef((props, ref) => {
|
5088
5088
|
return /* @__PURE__ */ React50__default.createElement(Radio$1, { ...props, ref });
|
5089
5089
|
});
|
@@ -5271,12 +5271,12 @@ var LineIcon = ({
|
|
5271
5271
|
sx,
|
5272
5272
|
...rest
|
5273
5273
|
}) => {
|
5274
|
-
const
|
5274
|
+
const styles3 = useMultiStyleConfig("LineIcon", { variant, size: size2 });
|
5275
5275
|
const Icon = getCorrectIcon({ variant, size: size2 });
|
5276
5276
|
if (!Icon) {
|
5277
5277
|
return null;
|
5278
5278
|
}
|
5279
|
-
return /* @__PURE__ */ React50__default.createElement(Box, { sx: { ...
|
5279
|
+
return /* @__PURE__ */ React50__default.createElement(Box, { sx: { ...styles3.iconContainer, ...sx }, ...rest }, /* @__PURE__ */ React50__default.createElement(Icon, { sx: styles3.icon }));
|
5280
5280
|
};
|
5281
5281
|
|
5282
5282
|
// src/linjetag/InfoTag.tsx
|
@@ -5286,8 +5286,8 @@ var InfoTag = ({
|
|
5286
5286
|
title,
|
5287
5287
|
description
|
5288
5288
|
}) => {
|
5289
|
-
const
|
5290
|
-
return /* @__PURE__ */ React50__default.createElement(Box, { sx:
|
5289
|
+
const styles3 = useMultiStyleConfig("InfoTag", { variant, size: size2 });
|
5290
|
+
return /* @__PURE__ */ React50__default.createElement(Box, { sx: styles3.container }, /* @__PURE__ */ React50__default.createElement(LineIcon, { variant, size: size2, sx: styles3.iconContainer }), /* @__PURE__ */ React50__default.createElement(Box, { sx: styles3.textContainer }, title && /* @__PURE__ */ React50__default.createElement(Box, { as: "span", sx: styles3.title }, title), title && description && " ", description && /* @__PURE__ */ React50__default.createElement(Box, { as: "span", sx: styles3.description }, description)));
|
5291
5291
|
};
|
5292
5292
|
var TravelTag = forwardRef(
|
5293
5293
|
({
|
@@ -5299,13 +5299,13 @@ var TravelTag = forwardRef(
|
|
5299
5299
|
isDisabled,
|
5300
5300
|
...rest
|
5301
5301
|
}, ref) => {
|
5302
|
-
const
|
5302
|
+
const styles3 = useMultiStyleConfig("TravelTag", {
|
5303
5303
|
variant,
|
5304
5304
|
size: size2,
|
5305
5305
|
deviationLevel
|
5306
5306
|
});
|
5307
5307
|
const DeviationLevelIcon = getDeviationLevelIcon({ deviationLevel, size: size2 });
|
5308
|
-
return /* @__PURE__ */ React50__default.createElement(Box, { sx:
|
5308
|
+
return /* @__PURE__ */ React50__default.createElement(Box, { sx: styles3.container, "aria-disabled": isDisabled, ref, ...rest }, /* @__PURE__ */ React50__default.createElement(LineIcon, { variant, size: size2, sx: styles3.iconContainer }), /* @__PURE__ */ React50__default.createElement(Box, { sx: styles3.textContainer }, title && /* @__PURE__ */ React50__default.createElement(Box, { as: "span", sx: styles3.title }, title), title && description && " ", description && /* @__PURE__ */ React50__default.createElement(Box, { as: "span", sx: styles3.description }, description)), DeviationLevelIcon && /* @__PURE__ */ React50__default.createElement(DeviationLevelIcon, { sx: styles3.deviationIcon }));
|
5309
5309
|
}
|
5310
5310
|
);
|
5311
5311
|
var getDeviationLevelIcon = ({
|
@@ -5531,7 +5531,7 @@ var JumpButton = ({
|
|
5531
5531
|
...props
|
5532
5532
|
}) => {
|
5533
5533
|
const { t: t2 } = useTranslation();
|
5534
|
-
const
|
5534
|
+
const styles3 = useMultiStyleConfig("MediaControllerButton", {
|
5535
5535
|
variant: "jumpSkip",
|
5536
5536
|
size: size2
|
5537
5537
|
});
|
@@ -5539,12 +5539,12 @@ var JumpButton = ({
|
|
5539
5539
|
Center,
|
5540
5540
|
{
|
5541
5541
|
as: "button",
|
5542
|
-
sx:
|
5542
|
+
sx: styles3.container,
|
5543
5543
|
"aria-label": direction2 === "forward" ? t2(texts17.forward) : t2(texts17.backward),
|
5544
5544
|
disabled: isDisabled,
|
5545
5545
|
...props
|
5546
5546
|
},
|
5547
|
-
direction2 === "forward" ? /* @__PURE__ */ React50__default.createElement(JumpForwardIcon, { sx:
|
5547
|
+
direction2 === "forward" ? /* @__PURE__ */ React50__default.createElement(JumpForwardIcon, { sx: styles3.icon }) : /* @__PURE__ */ React50__default.createElement(JumpBackwardIcon, { sx: styles3.icon })
|
5548
5548
|
);
|
5549
5549
|
};
|
5550
5550
|
var texts17 = createTexts({
|
@@ -5568,7 +5568,7 @@ var PlayPauseButton = ({
|
|
5568
5568
|
...props
|
5569
5569
|
}) => {
|
5570
5570
|
const { t: t2 } = useTranslation();
|
5571
|
-
const
|
5571
|
+
const styles3 = useMultiStyleConfig("MediaControllerButton", {
|
5572
5572
|
variant: "play",
|
5573
5573
|
size: size2
|
5574
5574
|
});
|
@@ -5576,12 +5576,12 @@ var PlayPauseButton = ({
|
|
5576
5576
|
Center,
|
5577
5577
|
{
|
5578
5578
|
as: "button",
|
5579
|
-
sx:
|
5579
|
+
sx: styles3.container,
|
5580
5580
|
"aria-label": isPlaying ? t2(texts18.pause) : t2(texts18.play),
|
5581
5581
|
disabled: isDisabled,
|
5582
5582
|
...props
|
5583
5583
|
},
|
5584
|
-
isPlaying ? /* @__PURE__ */ React50__default.createElement(PauseIcon, { sx:
|
5584
|
+
isPlaying ? /* @__PURE__ */ React50__default.createElement(PauseIcon, { sx: styles3.icon }) : /* @__PURE__ */ React50__default.createElement(PlayIcon, { sx: styles3.icon })
|
5585
5585
|
);
|
5586
5586
|
};
|
5587
5587
|
var texts18 = createTexts({
|
@@ -5605,7 +5605,7 @@ var SkipButton = ({
|
|
5605
5605
|
...props
|
5606
5606
|
}) => {
|
5607
5607
|
const { t: t2 } = useTranslation();
|
5608
|
-
const
|
5608
|
+
const styles3 = useMultiStyleConfig("MediaControllerButton", {
|
5609
5609
|
variant: "jumpSkip",
|
5610
5610
|
size: size2
|
5611
5611
|
});
|
@@ -5613,12 +5613,12 @@ var SkipButton = ({
|
|
5613
5613
|
Center,
|
5614
5614
|
{
|
5615
5615
|
as: "button",
|
5616
|
-
sx:
|
5616
|
+
sx: styles3.container,
|
5617
5617
|
"aria-label": direction2 === "forward" ? t2(texts19.next) : t2(texts19.previous),
|
5618
5618
|
disabled: isDisabled,
|
5619
5619
|
...props
|
5620
5620
|
},
|
5621
|
-
direction2 === "forward" ? /* @__PURE__ */ React50__default.createElement(SkipNextIcon, { sx:
|
5621
|
+
direction2 === "forward" ? /* @__PURE__ */ React50__default.createElement(SkipNextIcon, { sx: styles3.icon }) : /* @__PURE__ */ React50__default.createElement(SkipPreviousIcon, { sx: styles3.icon })
|
5622
5622
|
);
|
5623
5623
|
};
|
5624
5624
|
var texts19 = createTexts({
|
@@ -5637,11 +5637,11 @@ var texts19 = createTexts({
|
|
5637
5637
|
});
|
5638
5638
|
var ModalHeader = forwardRef(
|
5639
5639
|
({ size: size2, ...props }, ref) => {
|
5640
|
-
const
|
5640
|
+
const styles3 = {
|
5641
5641
|
fontSize: size2 === "lg" ? ["mobile.lg", "desktop.lg"] : ["mobile.md", "desktop.md"],
|
5642
5642
|
textAlign: size2 === "lg" ? "center" : "left"
|
5643
5643
|
};
|
5644
|
-
return /* @__PURE__ */ React50__default.createElement(ModalHeader$1, { ...props, ref, ...
|
5644
|
+
return /* @__PURE__ */ React50__default.createElement(ModalHeader$1, { ...props, ref, ...styles3 });
|
5645
5645
|
}
|
5646
5646
|
);
|
5647
5647
|
|
@@ -5829,15 +5829,7 @@ var SporProvider = ({
|
|
5829
5829
|
children,
|
5830
5830
|
...props
|
5831
5831
|
}) => {
|
5832
|
-
return /* @__PURE__ */ React50__default.createElement(LanguageProvider, { language }, /* @__PURE__ */ React50__default.createElement(ChakraProvider, { theme: theme3, ...props }, /* @__PURE__ */ React50__default.createElement(Global, { styles: fontFaces }),
|
5833
|
-
Global,
|
5834
|
-
{
|
5835
|
-
styles: `
|
5836
|
-
html, body { color: ${theme3.colors.darkGrey}; }
|
5837
|
-
svg { display: initial; }
|
5838
|
-
`
|
5839
|
-
}
|
5840
|
-
), children));
|
5832
|
+
return /* @__PURE__ */ React50__default.createElement(LanguageProvider, { language }, /* @__PURE__ */ React50__default.createElement(ChakraProvider, { theme: theme3, ...props }, /* @__PURE__ */ React50__default.createElement(Global, { styles: fontFaces }), children));
|
5841
5833
|
};
|
5842
5834
|
var StepperContext = React50__default.createContext(null);
|
5843
5835
|
var StepperProvider = ({
|
@@ -7138,11 +7130,11 @@ var srFocusable = {
|
|
7138
7130
|
overflow: "visible",
|
7139
7131
|
whiteSpace: "normal"
|
7140
7132
|
};
|
7141
|
-
var getWithPriority = (theme3, key,
|
7133
|
+
var getWithPriority = (theme3, key, styles3) => {
|
7142
7134
|
const result = {};
|
7143
7135
|
const obj = memoizedGet(theme3, key, {});
|
7144
7136
|
for (const prop in obj) {
|
7145
|
-
const isInStyles = prop in
|
7137
|
+
const isInStyles = prop in styles3 && styles3[prop] != null;
|
7146
7138
|
if (!isInStyles)
|
7147
7139
|
result[prop] = obj[prop];
|
7148
7140
|
}
|
@@ -7160,15 +7152,15 @@ var others = {
|
|
7160
7152
|
},
|
7161
7153
|
layerStyle: {
|
7162
7154
|
processResult: true,
|
7163
|
-
transform: (value, theme3,
|
7155
|
+
transform: (value, theme3, styles3) => getWithPriority(theme3, `layerStyles.${value}`, styles3)
|
7164
7156
|
},
|
7165
7157
|
textStyle: {
|
7166
7158
|
processResult: true,
|
7167
|
-
transform: (value, theme3,
|
7159
|
+
transform: (value, theme3, styles3) => getWithPriority(theme3, `textStyles.${value}`, styles3)
|
7168
7160
|
},
|
7169
7161
|
apply: {
|
7170
7162
|
processResult: true,
|
7171
|
-
transform: (value, theme3,
|
7163
|
+
transform: (value, theme3, styles3) => getWithPriority(theme3, value, styles3)
|
7172
7164
|
}
|
7173
7165
|
};
|
7174
7166
|
var position = {
|
@@ -7536,8 +7528,8 @@ var systemProps = (0, import_lodash3.default)(
|
|
7536
7528
|
Object.assign({}, space, layout, flexbox, grid, position);
|
7537
7529
|
[...Object.keys(systemProps), ...pseudoPropNames];
|
7538
7530
|
({ ...systemProps, ...pseudoSelectors });
|
7539
|
-
function defineStyle(
|
7540
|
-
return
|
7531
|
+
function defineStyle(styles3) {
|
7532
|
+
return styles3;
|
7541
7533
|
}
|
7542
7534
|
function defineStyleConfig(config37) {
|
7543
7535
|
return config37;
|
@@ -10846,6 +10838,7 @@ __export(foundations_exports, {
|
|
10846
10838
|
sizes: () => sizes24,
|
10847
10839
|
space: () => space2,
|
10848
10840
|
spacing: () => spacing2,
|
10841
|
+
styles: () => styles2,
|
10849
10842
|
textStyles: () => textStyles,
|
10850
10843
|
zIndices: () => zIndices2
|
10851
10844
|
});
|
@@ -10874,9 +10867,9 @@ var config2 = {
|
|
10874
10867
|
useSystemColorMode: false
|
10875
10868
|
};
|
10876
10869
|
var fonts = {
|
10877
|
-
body: tokens10__default.font.family.body,
|
10878
|
-
heading: tokens10__default.font.family.heading,
|
10879
|
-
mono: tokens10__default.font.family.monospace
|
10870
|
+
body: `${tokens10__default.font.family.body}, sans-serif`,
|
10871
|
+
heading: `${tokens10__default.font.family.heading}, sans-serif`,
|
10872
|
+
mono: `${tokens10__default.font.family.monospace}, monospace`
|
10880
10873
|
};
|
10881
10874
|
var fontSizes = {
|
10882
10875
|
"2xs": tokens10__default.size.font.xs.mobile,
|
@@ -11052,6 +11045,16 @@ var zIndices2 = {
|
|
11052
11045
|
toast: tokens10__default.depth["z-index"].toast,
|
11053
11046
|
tooltip: tokens10__default.depth["z-index"].tooltip
|
11054
11047
|
};
|
11048
|
+
var styles2 = {
|
11049
|
+
global: (props) => ({
|
11050
|
+
"html, body": {
|
11051
|
+
color: mode("darkGrey", "lightGrey")(props)
|
11052
|
+
},
|
11053
|
+
svg: {
|
11054
|
+
display: "initial"
|
11055
|
+
}
|
11056
|
+
})
|
11057
|
+
};
|
11055
11058
|
|
11056
11059
|
// src/theme/components/accordion.ts
|
11057
11060
|
var helpers = createMultiStyleConfigHelpers(accordionAnatomy.keys);
|
@@ -11279,12 +11282,12 @@ var config5 = defineStyleConfig$1({
|
|
11279
11282
|
});
|
11280
11283
|
var badge_default = config5;
|
11281
11284
|
function getColorScheme(colorScheme) {
|
11282
|
-
let
|
11283
|
-
if (!
|
11285
|
+
let styles3 = colorCombinations[colorScheme];
|
11286
|
+
if (!styles3 && process.env.NODE_ENV === "development") {
|
11284
11287
|
console.warn(`Invalid color scheme ${colorScheme} provided.`);
|
11285
|
-
|
11288
|
+
styles3 = colorCombinations.grey;
|
11286
11289
|
}
|
11287
|
-
return
|
11290
|
+
return styles3;
|
11288
11291
|
}
|
11289
11292
|
var colorCombinations = {
|
11290
11293
|
yellow: {
|
@@ -14750,8 +14753,8 @@ var theme = {
|
|
14750
14753
|
}
|
14751
14754
|
};
|
14752
14755
|
var BaseToast = ({ children, variant, id }) => {
|
14753
|
-
const
|
14754
|
-
return /* @__PURE__ */ React50__default.createElement(Flex, { sx:
|
14756
|
+
const styles3 = useStyleConfig("Toast", { variant });
|
14757
|
+
return /* @__PURE__ */ React50__default.createElement(Flex, { sx: styles3, id }, /* @__PURE__ */ React50__default.createElement(ToastIcon, { variant }), children);
|
14755
14758
|
};
|
14756
14759
|
var ToastIcon = ({ variant }) => {
|
14757
14760
|
const Icon = getIcon3(variant);
|
@@ -14814,12 +14817,12 @@ var ClosableToast = ({
|
|
14814
14817
|
variant,
|
14815
14818
|
id
|
14816
14819
|
}) => {
|
14817
|
-
const
|
14820
|
+
const styles3 = useMultiStyleConfig("Toast", { variant });
|
14818
14821
|
const { t: t2 } = useTranslation();
|
14819
14822
|
return /* @__PURE__ */ React50__default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React50__default.createElement(Box, { flexGrow: "1" }, children), /* @__PURE__ */ React50__default.createElement(
|
14820
14823
|
IconButton,
|
14821
14824
|
{
|
14822
|
-
sx:
|
14825
|
+
sx: styles3.dismissButton,
|
14823
14826
|
variant: "ghost",
|
14824
14827
|
"aria-label": t2(texts23.dismiss),
|
14825
14828
|
icon: /* @__PURE__ */ React50__default.createElement(CloseFill18Icon, null),
|