@vygruppen/spor-react 3.7.7 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +13 -0
- package/dist/{CountryCodeSelect-IAYKP6P5.mjs → CountryCodeSelect-BA3A7ODU.mjs} +1 -1
- package/dist/{chunk-QJI3YQWW.mjs → chunk-HL3ESNVB.mjs} +429 -390
- package/dist/index.d.mts +64 -17
- package/dist/index.d.ts +64 -17
- package/dist/index.js +526 -487
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/src/datepicker/Calendar.tsx +8 -3
- package/src/datepicker/CalendarCell.tsx +8 -3
- package/src/datepicker/CalendarGrid.tsx +9 -3
- package/src/datepicker/CalendarTriggerButton.tsx +10 -3
- package/src/datepicker/DatePicker.tsx +15 -35
- package/src/datepicker/DateRangePicker.tsx +14 -25
- package/src/datepicker/DateTimeSegment.tsx +0 -2
- package/src/datepicker/RangeCalendar.tsx +8 -4
- package/src/datepicker/StyledField.tsx +6 -1
- package/src/datepicker/TimePicker.tsx +1 -1
- package/src/input/NumericStepper.tsx +91 -68
- package/src/theme/components/close-button.ts +9 -8
- package/src/theme/components/datepicker.ts +74 -23
- package/src/theme/components/modal.ts +4 -3
@@ -1,10 +1,10 @@
|
|
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, useMultiStyleConfig, useStyleConfig, Badge as Badge$1, Code as Code$1, Text, PopoverAnchor, FormLabel, Flex, useFormControlContext,
|
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, useMultiStyleConfig, useStyleConfig, Badge as Badge$1, Code as Code$1, Text, PopoverAnchor, FormLabel, Flex, useFormControlContext, 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
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 };
|
6
|
-
import * as
|
7
|
-
import
|
6
|
+
import * as React69 from 'react';
|
7
|
+
import React69__default, { createContext, useEffect, forwardRef as forwardRef$1, useRef, useState, useId, Suspense, useMemo, useContext, useCallback } from 'react';
|
8
8
|
import { CloseFill30Icon, CloseFill24Icon, CloseFill18Icon, CalendarOutline24Icon, CloseOutline24Icon, SearchOutline24Icon, InformationFill24Icon, InformationFill18Icon, WarningFill24Icon, WarningFill18Icon, ErrorFill24Icon, ErrorFill18Icon, LinkOutOutline24Icon, DropdownRightFill18Icon, DropdownLeftFill18Icon, DropdownDownFill18Icon, DropdownDownFill24Icon, DropdownUpFill24Icon, ArrowRightFill18Icon, DropdownLeftFill24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, ErrorOutline24Icon, AltTransportOutline24Icon, WarningOutline24Icon, SuccessOutline24Icon, InformationOutline24Icon, TrainFill18Icon, TrainFill24Icon, TrainFill30Icon, ExpressBusFill18Icon, ExpressBusFill24Icon, ExpressBusFill30Icon, BusFill18Icon, BusFill24Icon, BusFill30Icon, FerryFill18Icon, FerryFill24Icon, FerryFill30Icon, SubwayFill18Icon, SubwayFill24Icon, SubwayFill30Icon, TramFill18Icon, TramFill24Icon, TramFill30Icon, AltTransportFill18Icon, AltTransportFill24Icon, AltTransportFill30Icon, WalkFill18Icon, WalkFill24Icon, WalkFill30Icon } from '@vygruppen/spor-icon-react';
|
9
9
|
import { inlineLoaderColorData, spinnerColorData, contentLoaderData, fullScreenLoaderWhiteData, inlineLoaderDarkData, spinnerDarkData, fullScreenLoaderBlackData, inlineLoaderLightData, spinnerLightData } from '@vygruppen/spor-loader';
|
10
10
|
import { useLottie } from 'lottie-react';
|
@@ -770,22 +770,22 @@ var require_lodash = __commonJS({
|
|
770
770
|
}
|
771
771
|
});
|
772
772
|
var Divider = forwardRef((props, ref) => {
|
773
|
-
return /* @__PURE__ */
|
773
|
+
return /* @__PURE__ */ React69__default.createElement(Divider$1, { ...props, ref });
|
774
774
|
});
|
775
775
|
var Stack = forwardRef(
|
776
776
|
({ flexDirection, ...props }, ref) => {
|
777
|
-
return /* @__PURE__ */
|
777
|
+
return /* @__PURE__ */ React69__default.createElement(Stack$1, { ...props, direction: flexDirection, ref });
|
778
778
|
}
|
779
779
|
);
|
780
|
-
var AccordionContext =
|
780
|
+
var AccordionContext = React69__default.createContext(null);
|
781
781
|
var AccordionProvider = ({
|
782
782
|
size: size2,
|
783
783
|
...props
|
784
784
|
}) => {
|
785
|
-
return /* @__PURE__ */
|
785
|
+
return /* @__PURE__ */ React69__default.createElement(AccordionContext.Provider, { value: { size: size2 }, ...props });
|
786
786
|
};
|
787
787
|
var useAccordionContext = () => {
|
788
|
-
const context =
|
788
|
+
const context = React69__default.useContext(AccordionContext);
|
789
789
|
if (context === null) {
|
790
790
|
throw new Error(
|
791
791
|
"useAccordionContext must be used within AccordionProvider"
|
@@ -796,14 +796,14 @@ var useAccordionContext = () => {
|
|
796
796
|
var Accordion = forwardRef(
|
797
797
|
({ children, spacing: spacing3 = 2, ...props }, ref) => {
|
798
798
|
const defaultIndex = typeof props.defaultIndex === "number" && props.allowMultiple ? [props.defaultIndex] : props.defaultIndex;
|
799
|
-
return /* @__PURE__ */
|
799
|
+
return /* @__PURE__ */ React69__default.createElement(AccordionProvider, { size: props.size }, /* @__PURE__ */ React69__default.createElement(
|
800
800
|
Accordion$1,
|
801
801
|
{
|
802
802
|
...props,
|
803
803
|
ref,
|
804
804
|
defaultIndex
|
805
805
|
},
|
806
|
-
/* @__PURE__ */
|
806
|
+
/* @__PURE__ */ React69__default.createElement(Stack, { spacing: spacing3 }, children)
|
807
807
|
));
|
808
808
|
}
|
809
809
|
);
|
@@ -815,7 +815,7 @@ var Expandable = ({
|
|
815
815
|
size: size2 = "md",
|
816
816
|
...rest
|
817
817
|
}) => {
|
818
|
-
return /* @__PURE__ */
|
818
|
+
return /* @__PURE__ */ React69__default.createElement(Accordion, { ...rest, size: size2 }, /* @__PURE__ */ React69__default.createElement(
|
819
819
|
ExpandableItem,
|
820
820
|
{
|
821
821
|
headingLevel,
|
@@ -834,7 +834,7 @@ var ExpandableItem = ({
|
|
834
834
|
}) => {
|
835
835
|
const { size: size2 } = useAccordionContext();
|
836
836
|
warnAboutMismatchingIcon({ icon: leftIcon, size: size2 });
|
837
|
-
return /* @__PURE__ */
|
837
|
+
return /* @__PURE__ */ React69__default.createElement(AccordionItem, { ...rest }, /* @__PURE__ */ React69__default.createElement(Box, { as: headingLevel }, /* @__PURE__ */ React69__default.createElement(AccordionButton, null, /* @__PURE__ */ React69__default.createElement(Flex, { alignItems: "center" }, leftIcon && /* @__PURE__ */ React69__default.createElement(Box, { marginRight: 1 }, leftIcon), title), /* @__PURE__ */ React69__default.createElement(AccordionIcon, null))), /* @__PURE__ */ React69__default.createElement(AccordionPanel, null, children));
|
838
838
|
};
|
839
839
|
var warnAboutMismatchingIcon = ({ icon, size: size2 }) => {
|
840
840
|
var _a6, _b5;
|
@@ -883,7 +883,7 @@ function LanguageProvider({
|
|
883
883
|
language,
|
884
884
|
children
|
885
885
|
}) {
|
886
|
-
return /* @__PURE__ */
|
886
|
+
return /* @__PURE__ */ React69__default.createElement(LanguageContext.Provider, { value: language }, children);
|
887
887
|
}
|
888
888
|
function useLanguage() {
|
889
889
|
const language = useContext(LanguageContext);
|
@@ -915,11 +915,11 @@ function useHydrated() {
|
|
915
915
|
// src/loader/ClientOnly.tsx
|
916
916
|
var ClientOnly = ({ children, fallback = null }) => {
|
917
917
|
const isHydrated = useHydrated();
|
918
|
-
return /* @__PURE__ */
|
918
|
+
return /* @__PURE__ */ React69__default.createElement(React69__default.Fragment, null, isHydrated ? children() : fallback);
|
919
919
|
};
|
920
920
|
function Lottie({ animationData }) {
|
921
921
|
const { View } = useLottie({ animationData, loop: true });
|
922
|
-
return /* @__PURE__ */
|
922
|
+
return /* @__PURE__ */ React69__default.createElement(React69__default.Fragment, null, View);
|
923
923
|
}
|
924
924
|
|
925
925
|
// src/loader/ColorInlineLoader.tsx
|
@@ -928,7 +928,7 @@ var ColorInlineLoader = ({
|
|
928
928
|
maxWidth,
|
929
929
|
...props
|
930
930
|
}) => {
|
931
|
-
return /* @__PURE__ */
|
931
|
+
return /* @__PURE__ */ React69__default.createElement(Center, { ...props }, /* @__PURE__ */ React69__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React69__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__default.createElement(Lottie, { animationData: inlineLoaderColorData }))));
|
932
932
|
};
|
933
933
|
var ColorSpinner = ({
|
934
934
|
children,
|
@@ -936,24 +936,24 @@ var ColorSpinner = ({
|
|
936
936
|
maxWidth,
|
937
937
|
...props
|
938
938
|
}) => {
|
939
|
-
return /* @__PURE__ */
|
939
|
+
return /* @__PURE__ */ React69__default.createElement(Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React69__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React69__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__default.createElement(Lottie, { animationData: spinnerColorData }))), children && /* @__PURE__ */ React69__default.createElement(Box, { marginTop: 3, fontWeight: "bold" }, children));
|
940
940
|
};
|
941
941
|
var ContentLoader = ({ children, ...props }) => {
|
942
|
-
return /* @__PURE__ */
|
942
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { ...props }, /* @__PURE__ */ React69__default.createElement(Box, { maxWidth: "140px", marginX: "auto" }, /* @__PURE__ */ React69__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__default.createElement(Lottie, { animationData: contentLoaderData }))), children && /* @__PURE__ */ React69__default.createElement(Box, { textAlign: "center", fontWeight: "bold" }, children));
|
943
943
|
};
|
944
944
|
var DarkFullScreenLoader = ({
|
945
945
|
width,
|
946
946
|
maxWidth,
|
947
947
|
...props
|
948
948
|
}) => {
|
949
|
-
return /* @__PURE__ */
|
949
|
+
return /* @__PURE__ */ React69__default.createElement(Center, { height: "100%", background: "darkTeal", ...props }, /* @__PURE__ */ React69__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React69__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__default.createElement(Lottie, { animationData: fullScreenLoaderWhiteData }))));
|
950
950
|
};
|
951
951
|
var DarkInlineLoader = ({
|
952
952
|
width,
|
953
953
|
maxWidth,
|
954
954
|
...props
|
955
955
|
}) => {
|
956
|
-
return /* @__PURE__ */
|
956
|
+
return /* @__PURE__ */ React69__default.createElement(Center, { ...props }, /* @__PURE__ */ React69__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React69__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__default.createElement(Lottie, { animationData: inlineLoaderDarkData }))));
|
957
957
|
};
|
958
958
|
var DarkSpinner = ({
|
959
959
|
children,
|
@@ -961,21 +961,21 @@ var DarkSpinner = ({
|
|
961
961
|
maxWidth,
|
962
962
|
...props
|
963
963
|
}) => {
|
964
|
-
return /* @__PURE__ */
|
964
|
+
return /* @__PURE__ */ React69__default.createElement(Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React69__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React69__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__default.createElement(Lottie, { animationData: spinnerDarkData }))), children && /* @__PURE__ */ React69__default.createElement(Box, { marginTop: 3, fontWeight: "bold" }, children));
|
965
965
|
};
|
966
966
|
var LightFullScreenLoader = ({
|
967
967
|
width,
|
968
968
|
maxWidth,
|
969
969
|
...props
|
970
970
|
}) => {
|
971
|
-
return /* @__PURE__ */
|
971
|
+
return /* @__PURE__ */ React69__default.createElement(Center, { height: "100%", background: "white", ...props }, /* @__PURE__ */ React69__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React69__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__default.createElement(Lottie, { animationData: fullScreenLoaderBlackData }))));
|
972
972
|
};
|
973
973
|
var LightInlineLoader = ({
|
974
974
|
width,
|
975
975
|
maxWidth,
|
976
976
|
...props
|
977
977
|
}) => {
|
978
|
-
return /* @__PURE__ */
|
978
|
+
return /* @__PURE__ */ React69__default.createElement(Center, { ...props }, /* @__PURE__ */ React69__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React69__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__default.createElement(Lottie, { animationData: inlineLoaderLightData }))));
|
979
979
|
};
|
980
980
|
var LightSpinner = ({
|
981
981
|
children,
|
@@ -983,7 +983,7 @@ var LightSpinner = ({
|
|
983
983
|
maxWidth,
|
984
984
|
...props
|
985
985
|
}) => {
|
986
|
-
return /* @__PURE__ */
|
986
|
+
return /* @__PURE__ */ React69__default.createElement(Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React69__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React69__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React69__default.createElement(Lottie, { animationData: spinnerLightData }))), children && /* @__PURE__ */ React69__default.createElement(Box, { marginTop: 3, fontWeight: "bold" }, children));
|
987
987
|
};
|
988
988
|
var useRotatingLabel = ({ label, delay }) => {
|
989
989
|
const loadingTextArray = useMemo(
|
@@ -1019,7 +1019,7 @@ var ProgressBar = ({
|
|
1019
1019
|
value,
|
1020
1020
|
"aria-label": ariaLabel || t2(texts.label(value))
|
1021
1021
|
});
|
1022
|
-
return /* @__PURE__ */
|
1022
|
+
return /* @__PURE__ */ React69__default.createElement(React69__default.Fragment, null, /* @__PURE__ */ React69__default.createElement(
|
1023
1023
|
Box,
|
1024
1024
|
{
|
1025
1025
|
...progressBarProps,
|
@@ -1027,7 +1027,7 @@ var ProgressBar = ({
|
|
1027
1027
|
minWidth: "100px",
|
1028
1028
|
...rest
|
1029
1029
|
},
|
1030
|
-
/* @__PURE__ */
|
1030
|
+
/* @__PURE__ */ React69__default.createElement(
|
1031
1031
|
Flex,
|
1032
1032
|
{
|
1033
1033
|
backgroundColor: "coralGreen",
|
@@ -1036,7 +1036,7 @@ var ProgressBar = ({
|
|
1036
1036
|
justifyContent: "flex-start",
|
1037
1037
|
marginX: "auto"
|
1038
1038
|
},
|
1039
|
-
/* @__PURE__ */
|
1039
|
+
/* @__PURE__ */ React69__default.createElement(
|
1040
1040
|
Box,
|
1041
1041
|
{
|
1042
1042
|
backgroundColor: "greenHaze",
|
@@ -1048,7 +1048,7 @@ var ProgressBar = ({
|
|
1048
1048
|
}
|
1049
1049
|
)
|
1050
1050
|
),
|
1051
|
-
currentLoadingText && /* @__PURE__ */
|
1051
|
+
currentLoadingText && /* @__PURE__ */ React69__default.createElement(
|
1052
1052
|
Text,
|
1053
1053
|
{
|
1054
1054
|
textAlign: "center",
|
@@ -1091,7 +1091,7 @@ var ProgressLoader = ({
|
|
1091
1091
|
const progressPathLength = ((_a6 = pathRef.current) == null ? void 0 : _a6.getTotalLength()) ?? 0;
|
1092
1092
|
const progress = (value - 100) / 100 * progressPathLength;
|
1093
1093
|
const id = useId();
|
1094
|
-
return /* @__PURE__ */
|
1094
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { ...progressBarProps, minWidth: "100px", width, ...rest }, /* @__PURE__ */ React69__default.createElement(Box, { as: "svg", viewBox: "0 0 246 78", fill: "none" }, /* @__PURE__ */ React69__default.createElement(
|
1095
1095
|
Box,
|
1096
1096
|
{
|
1097
1097
|
as: "path",
|
@@ -1099,7 +1099,7 @@ var ProgressLoader = ({
|
|
1099
1099
|
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",
|
1100
1100
|
fill: "#FFB466"
|
1101
1101
|
}
|
1102
|
-
), /* @__PURE__ */
|
1102
|
+
), /* @__PURE__ */ React69__default.createElement(
|
1103
1103
|
Box,
|
1104
1104
|
{
|
1105
1105
|
as: "path",
|
@@ -1110,7 +1110,7 @@ var ProgressLoader = ({
|
|
1110
1110
|
strokeLinecap: "round",
|
1111
1111
|
strokeLinejoin: "round"
|
1112
1112
|
}
|
1113
|
-
), /* @__PURE__ */
|
1113
|
+
), /* @__PURE__ */ React69__default.createElement(
|
1114
1114
|
Box,
|
1115
1115
|
{
|
1116
1116
|
as: "path",
|
@@ -1125,7 +1125,7 @@ var ProgressLoader = ({
|
|
1125
1125
|
transition: "stroke-dashoffset .2s ease-out",
|
1126
1126
|
ref: pathRef
|
1127
1127
|
}
|
1128
|
-
), /* @__PURE__ */
|
1128
|
+
), /* @__PURE__ */ React69__default.createElement(
|
1129
1129
|
Box,
|
1130
1130
|
{
|
1131
1131
|
as: "path",
|
@@ -1133,7 +1133,7 @@ var ProgressLoader = ({
|
|
1133
1133
|
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",
|
1134
1134
|
fill: "#688CBA"
|
1135
1135
|
}
|
1136
|
-
)), currentLoadingText && /* @__PURE__ */
|
1136
|
+
)), currentLoadingText && /* @__PURE__ */ React69__default.createElement(
|
1137
1137
|
Text,
|
1138
1138
|
{
|
1139
1139
|
textAlign: "center",
|
@@ -1152,9 +1152,9 @@ var texts2 = createTexts({
|
|
1152
1152
|
en: `${value}% done`
|
1153
1153
|
})
|
1154
1154
|
});
|
1155
|
-
var Skeleton = forwardRef((props, ref) => /* @__PURE__ */
|
1156
|
-
var SkeletonCircle = (props) => /* @__PURE__ */
|
1157
|
-
var SkeletonText = (props) => /* @__PURE__ */
|
1155
|
+
var Skeleton = forwardRef((props, ref) => /* @__PURE__ */ React69__default.createElement(Skeleton$1, { ...props, ref }));
|
1156
|
+
var SkeletonCircle = (props) => /* @__PURE__ */ React69__default.createElement(SkeletonCircle$1, { boxSize: 6, borderRadius: "50%", ...props });
|
1157
|
+
var SkeletonText = (props) => /* @__PURE__ */ React69__default.createElement(SkeletonText$1, { boxSize: 6, ...props });
|
1158
1158
|
|
1159
1159
|
// src/button/Button.tsx
|
1160
1160
|
var Button = forwardRef((props, ref) => {
|
@@ -1171,7 +1171,7 @@ var Button = forwardRef((props, ref) => {
|
|
1171
1171
|
const buttonGroup = useButtonGroup();
|
1172
1172
|
const finalVariant = variant ?? (buttonGroup == null ? void 0 : buttonGroup.variant) ?? "primary";
|
1173
1173
|
const finalSize = size2 ?? (buttonGroup == null ? void 0 : buttonGroup.size) ?? "md";
|
1174
|
-
return /* @__PURE__ */
|
1174
|
+
return /* @__PURE__ */ React69__default.createElement(
|
1175
1175
|
Button$1,
|
1176
1176
|
{
|
1177
1177
|
size: finalSize,
|
@@ -1181,11 +1181,11 @@ var Button = forwardRef((props, ref) => {
|
|
1181
1181
|
"aria-label": ariaLabel,
|
1182
1182
|
"aria-busy": isLoading,
|
1183
1183
|
isDisabled: isDisabled || isLoading,
|
1184
|
-
leftIcon: isLoading && leftIcon ? /* @__PURE__ */
|
1185
|
-
rightIcon: isLoading && rightIcon ? /* @__PURE__ */
|
1184
|
+
leftIcon: isLoading && leftIcon ? /* @__PURE__ */ React69__default.createElement(Box, { visibility: isLoading ? "hidden" : "visible", "aria-hidden": "true" }, leftIcon) : leftIcon,
|
1185
|
+
rightIcon: isLoading && rightIcon ? /* @__PURE__ */ React69__default.createElement(Box, { visibility: isLoading ? "hidden" : "visible", "aria-hidden": "true" }, rightIcon) : rightIcon,
|
1186
1186
|
position: "relative"
|
1187
1187
|
},
|
1188
|
-
isLoading && /* @__PURE__ */
|
1188
|
+
isLoading && /* @__PURE__ */ React69__default.createElement(
|
1189
1189
|
Center,
|
1190
1190
|
{
|
1191
1191
|
position: "absolute",
|
@@ -1194,7 +1194,7 @@ var Button = forwardRef((props, ref) => {
|
|
1194
1194
|
left: "0",
|
1195
1195
|
paddingTop: 2
|
1196
1196
|
},
|
1197
|
-
/* @__PURE__ */
|
1197
|
+
/* @__PURE__ */ React69__default.createElement(
|
1198
1198
|
ColorInlineLoader,
|
1199
1199
|
{
|
1200
1200
|
maxWidth: getLoaderWidth(finalSize),
|
@@ -1203,7 +1203,7 @@ var Button = forwardRef((props, ref) => {
|
|
1203
1203
|
}
|
1204
1204
|
)
|
1205
1205
|
),
|
1206
|
-
/* @__PURE__ */
|
1206
|
+
/* @__PURE__ */ React69__default.createElement(
|
1207
1207
|
Box,
|
1208
1208
|
{
|
1209
1209
|
visibility: isLoading ? "hidden" : "visible",
|
@@ -1242,14 +1242,14 @@ var texts3 = createTexts({
|
|
1242
1242
|
sv: "Laddar\u2026"
|
1243
1243
|
}
|
1244
1244
|
});
|
1245
|
-
var ButtonGroup = forwardRef((props, ref) => /* @__PURE__ */
|
1245
|
+
var ButtonGroup = forwardRef((props, ref) => /* @__PURE__ */ React69__default.createElement(ButtonGroup$1, { ...props, ref }));
|
1246
1246
|
var IconButton = forwardRef(
|
1247
|
-
({ ...props }, ref) => /* @__PURE__ */
|
1247
|
+
({ ...props }, ref) => /* @__PURE__ */ React69__default.createElement(
|
1248
1248
|
IconButton$1,
|
1249
1249
|
{
|
1250
1250
|
title: props["aria-label"],
|
1251
1251
|
...props,
|
1252
|
-
spinner: /* @__PURE__ */
|
1252
|
+
spinner: /* @__PURE__ */ React69__default.createElement(ColorSpinner, { margin: 1 }),
|
1253
1253
|
ref
|
1254
1254
|
}
|
1255
1255
|
)
|
@@ -1259,7 +1259,7 @@ var IconButton = forwardRef(
|
|
1259
1259
|
var CloseButton = forwardRef(
|
1260
1260
|
({ size: size2 = "sm", ...props }, ref) => {
|
1261
1261
|
const { t: t2 } = useTranslation();
|
1262
|
-
return /* @__PURE__ */
|
1262
|
+
return /* @__PURE__ */ React69__default.createElement(
|
1263
1263
|
IconButton,
|
1264
1264
|
{
|
1265
1265
|
ref,
|
@@ -1276,11 +1276,11 @@ var getIcon = (size2) => {
|
|
1276
1276
|
switch (size2) {
|
1277
1277
|
case "xs":
|
1278
1278
|
case "sm":
|
1279
|
-
return /* @__PURE__ */
|
1279
|
+
return /* @__PURE__ */ React69__default.createElement(CloseFill18Icon, null);
|
1280
1280
|
case "md":
|
1281
|
-
return /* @__PURE__ */
|
1281
|
+
return /* @__PURE__ */ React69__default.createElement(CloseFill24Icon, null);
|
1282
1282
|
case "lg":
|
1283
|
-
return /* @__PURE__ */
|
1283
|
+
return /* @__PURE__ */ React69__default.createElement(CloseFill30Icon, null);
|
1284
1284
|
}
|
1285
1285
|
};
|
1286
1286
|
var texts4 = createTexts({
|
@@ -1302,7 +1302,7 @@ var FloatingActionButton = forwardRef(
|
|
1302
1302
|
placement = "bottom right",
|
1303
1303
|
...props
|
1304
1304
|
}, ref) => {
|
1305
|
-
const [isTextVisible, setIsTextVisible] =
|
1305
|
+
const [isTextVisible, setIsTextVisible] = React69__default.useState(
|
1306
1306
|
externalIsTextVisible !== void 0 ? externalIsTextVisible : false
|
1307
1307
|
);
|
1308
1308
|
const scrollDirection = useScrollDirection();
|
@@ -1324,7 +1324,7 @@ var FloatingActionButton = forwardRef(
|
|
1324
1324
|
isTextVisible,
|
1325
1325
|
placement
|
1326
1326
|
});
|
1327
|
-
return /* @__PURE__ */
|
1327
|
+
return /* @__PURE__ */ React69__default.createElement(
|
1328
1328
|
MotionBox,
|
1329
1329
|
{
|
1330
1330
|
__css: style.container,
|
@@ -1332,8 +1332,8 @@ var FloatingActionButton = forwardRef(
|
|
1332
1332
|
ref,
|
1333
1333
|
...props
|
1334
1334
|
},
|
1335
|
-
/* @__PURE__ */
|
1336
|
-
/* @__PURE__ */
|
1335
|
+
/* @__PURE__ */ React69__default.createElement(Box, { __css: style.icon }, icon),
|
1336
|
+
/* @__PURE__ */ React69__default.createElement(
|
1337
1337
|
MotionBox,
|
1338
1338
|
{
|
1339
1339
|
animate: isTextVisible ? "show" : "hide",
|
@@ -1358,11 +1358,11 @@ var FloatingActionButton = forwardRef(
|
|
1358
1358
|
}
|
1359
1359
|
);
|
1360
1360
|
var useScrollDirection = () => {
|
1361
|
-
const [scrollDirection, setScrollDirection] =
|
1362
|
-
const lastScrollPosition =
|
1361
|
+
const [scrollDirection, setScrollDirection] = React69__default.useState(null);
|
1362
|
+
const lastScrollPosition = React69__default.useRef(
|
1363
1363
|
typeof window !== "undefined" ? window.scrollY : 0
|
1364
1364
|
);
|
1365
|
-
|
1365
|
+
React69__default.useEffect(() => {
|
1366
1366
|
const onScroll = () => {
|
1367
1367
|
const delta = window.scrollY - lastScrollPosition.current;
|
1368
1368
|
if (delta === 0) {
|
@@ -1381,7 +1381,7 @@ var useScrollDirection = () => {
|
|
1381
1381
|
var AlertIcon = ({ variant }) => {
|
1382
1382
|
const Icon = getIcon2(variant);
|
1383
1383
|
const { t: t2 } = useTranslation();
|
1384
|
-
return /* @__PURE__ */
|
1384
|
+
return /* @__PURE__ */ React69__default.createElement(
|
1385
1385
|
Icon,
|
1386
1386
|
{
|
1387
1387
|
flexShrink: 0,
|
@@ -1439,7 +1439,7 @@ var texts5 = createTexts({
|
|
1439
1439
|
});
|
1440
1440
|
var BaseAlert = ({ variant, children, ...boxProps }) => {
|
1441
1441
|
const styles3 = useMultiStyleConfig("Alert", { variant });
|
1442
|
-
return /* @__PURE__ */
|
1442
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { __css: styles3.container, ...boxProps }, children);
|
1443
1443
|
};
|
1444
1444
|
|
1445
1445
|
// src/alert/ClosableAlert.tsx
|
@@ -1459,17 +1459,17 @@ var ClosableAlert = ({
|
|
1459
1459
|
externalOnClose();
|
1460
1460
|
onClose();
|
1461
1461
|
};
|
1462
|
-
return /* @__PURE__ */
|
1462
|
+
return /* @__PURE__ */ React69__default.createElement(BaseAlert, { variant }, /* @__PURE__ */ React69__default.createElement(
|
1463
1463
|
IconButton,
|
1464
1464
|
{
|
1465
1465
|
variant: "ghost",
|
1466
1466
|
size: "sm",
|
1467
1467
|
onClick: handleClose,
|
1468
|
-
icon: /* @__PURE__ */
|
1468
|
+
icon: /* @__PURE__ */ React69__default.createElement(CloseFill18Icon, null),
|
1469
1469
|
"aria-label": t2(texts6.close),
|
1470
1470
|
sx: styles3.closeButton
|
1471
1471
|
}
|
1472
|
-
), /* @__PURE__ */
|
1472
|
+
), /* @__PURE__ */ React69__default.createElement(AlertIcon, { variant }), children);
|
1473
1473
|
};
|
1474
1474
|
var texts6 = createTexts({
|
1475
1475
|
close: {
|
@@ -1489,7 +1489,7 @@ var ExpandableAlert = ({
|
|
1489
1489
|
},
|
1490
1490
|
...boxProps
|
1491
1491
|
}) => {
|
1492
|
-
return /* @__PURE__ */
|
1492
|
+
return /* @__PURE__ */ React69__default.createElement(BaseAlert, { variant, ...boxProps, paddingX: 0, paddingY: 0 }, /* @__PURE__ */ React69__default.createElement(
|
1493
1493
|
Accordion$1,
|
1494
1494
|
{
|
1495
1495
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
@@ -1497,14 +1497,14 @@ var ExpandableAlert = ({
|
|
1497
1497
|
allowToggle: true,
|
1498
1498
|
flexGrow: "1"
|
1499
1499
|
},
|
1500
|
-
/* @__PURE__ */
|
1500
|
+
/* @__PURE__ */ React69__default.createElement(AccordionItem, null, /* @__PURE__ */ React69__default.createElement(AccordionButton, { paddingX: 3, paddingY: 2, fontSize: "inherit" }, /* @__PURE__ */ React69__default.createElement(
|
1501
1501
|
Flex,
|
1502
1502
|
{
|
1503
1503
|
justifyContent: "space-between",
|
1504
1504
|
alignItems: "center",
|
1505
1505
|
flexGrow: "1"
|
1506
1506
|
},
|
1507
|
-
/* @__PURE__ */
|
1507
|
+
/* @__PURE__ */ React69__default.createElement(Flex, { as: headingLevel, alignItems: "center" }, /* @__PURE__ */ React69__default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React69__default.createElement(
|
1508
1508
|
Box,
|
1509
1509
|
{
|
1510
1510
|
as: "span",
|
@@ -1518,18 +1518,18 @@ var ExpandableAlert = ({
|
|
1518
1518
|
},
|
1519
1519
|
title
|
1520
1520
|
)),
|
1521
|
-
/* @__PURE__ */
|
1522
|
-
)), /* @__PURE__ */
|
1521
|
+
/* @__PURE__ */ React69__default.createElement(AccordionIcon, null)
|
1522
|
+
)), /* @__PURE__ */ React69__default.createElement(AccordionPanel, null, children))
|
1523
1523
|
));
|
1524
1524
|
};
|
1525
1525
|
var StaticAlert = ({ children, ...props }) => {
|
1526
|
-
return /* @__PURE__ */
|
1526
|
+
return /* @__PURE__ */ React69__default.createElement(BaseAlert, { ...props }, /* @__PURE__ */ React69__default.createElement(AlertIcon, { variant: props.variant }), children);
|
1527
1527
|
};
|
1528
1528
|
var Breadcrumb = (props) => {
|
1529
|
-
return /* @__PURE__ */
|
1529
|
+
return /* @__PURE__ */ React69__default.createElement(
|
1530
1530
|
Breadcrumb$1,
|
1531
1531
|
{
|
1532
|
-
separator: /* @__PURE__ */
|
1532
|
+
separator: /* @__PURE__ */ React69__default.createElement(DropdownRightFill18Icon, { color: "blackAlpha.400" }),
|
1533
1533
|
...props
|
1534
1534
|
}
|
1535
1535
|
);
|
@@ -1542,7 +1542,7 @@ var Card = forwardRef(
|
|
1542
1542
|
colorScheme,
|
1543
1543
|
size: size2
|
1544
1544
|
});
|
1545
|
-
return /* @__PURE__ */
|
1545
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { __css: styles3, ...props, ref }, children);
|
1546
1546
|
}
|
1547
1547
|
);
|
1548
1548
|
function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
@@ -3275,7 +3275,7 @@ function $9a36b6ba2fb1a7c5$var$nextUnavailableDate(anchorDate, state2, dir) {
|
|
3275
3275
|
}
|
3276
3276
|
var Badge = forwardRef(
|
3277
3277
|
({ icon, colorScheme = "grey", children, ...props }, ref) => {
|
3278
|
-
return /* @__PURE__ */
|
3278
|
+
return /* @__PURE__ */ React69__default.createElement(
|
3279
3279
|
Badge$1,
|
3280
3280
|
{
|
3281
3281
|
colorScheme,
|
@@ -3283,25 +3283,25 @@ var Badge = forwardRef(
|
|
3283
3283
|
paddingLeft: icon ? 1 : void 0,
|
3284
3284
|
ref
|
3285
3285
|
},
|
3286
|
-
icon &&
|
3286
|
+
icon && React69__default.cloneElement(icon, { marginRight: 1 }),
|
3287
3287
|
children
|
3288
3288
|
);
|
3289
3289
|
}
|
3290
3290
|
);
|
3291
|
-
var Code = forwardRef((props, ref) => /* @__PURE__ */
|
3291
|
+
var Code = forwardRef((props, ref) => /* @__PURE__ */ React69__default.createElement(Code$1, { ...props, ref }));
|
3292
3292
|
var Heading = ({
|
3293
3293
|
as,
|
3294
3294
|
variant = "xl-display",
|
3295
3295
|
...props
|
3296
3296
|
}) => {
|
3297
|
-
return /* @__PURE__ */
|
3297
|
+
return /* @__PURE__ */ React69__default.createElement(Text, { as, textStyle: variant, ...props });
|
3298
3298
|
};
|
3299
3299
|
var Text4 = forwardRef(
|
3300
3300
|
({ variant = "sm", ...props }, ref) => {
|
3301
|
-
return /* @__PURE__ */
|
3301
|
+
return /* @__PURE__ */ React69__default.createElement(Text, { ...props, textStyle: variant, ref });
|
3302
3302
|
}
|
3303
3303
|
);
|
3304
|
-
function CalendarCell({ state: state2, date, currentMonth }) {
|
3304
|
+
function CalendarCell({ state: state2, date, currentMonth, variant }) {
|
3305
3305
|
const ref = useRef(null);
|
3306
3306
|
const {
|
3307
3307
|
cellProps,
|
@@ -3312,7 +3312,7 @@ function CalendarCell({ state: state2, date, currentMonth }) {
|
|
3312
3312
|
isOutsideVisibleRange
|
3313
3313
|
} = useCalendarCell({ date }, state2, ref);
|
3314
3314
|
const isOutsideMonth = !isSameMonth(currentMonth, date);
|
3315
|
-
const styles3 = useMultiStyleConfig("Datepicker", {});
|
3315
|
+
const styles3 = useMultiStyleConfig("Datepicker", { variant });
|
3316
3316
|
const stateProps = {};
|
3317
3317
|
if (isSelected) {
|
3318
3318
|
stateProps["data-selected"] = true;
|
@@ -3336,7 +3336,7 @@ function CalendarCell({ state: state2, date, currentMonth }) {
|
|
3336
3336
|
{ passive: false, once: true }
|
3337
3337
|
);
|
3338
3338
|
}, []);
|
3339
|
-
return /* @__PURE__ */
|
3339
|
+
return /* @__PURE__ */ React69__default.createElement(
|
3340
3340
|
Box,
|
3341
3341
|
{
|
3342
3342
|
as: "td",
|
@@ -3359,7 +3359,7 @@ function CalendarCell({ state: state2, date, currentMonth }) {
|
|
3359
3359
|
}
|
3360
3360
|
}
|
3361
3361
|
},
|
3362
|
-
/* @__PURE__ */
|
3362
|
+
/* @__PURE__ */ React69__default.createElement(
|
3363
3363
|
Box,
|
3364
3364
|
{
|
3365
3365
|
as: "button",
|
@@ -3403,7 +3403,7 @@ var weekDays = {
|
|
3403
3403
|
sv: ["M\xE5", "Ti", "On", "To", "Fr", "L\xF6", "S\xF6"],
|
3404
3404
|
en: ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"]
|
3405
3405
|
};
|
3406
|
-
function CalendarGrid({ state: state2, offset = {} }) {
|
3406
|
+
function CalendarGrid({ state: state2, variant, offset = {} }) {
|
3407
3407
|
const { language } = useTranslation();
|
3408
3408
|
const locale = useCurrentLocale();
|
3409
3409
|
const startDate = state2.visibleRange.start.add(offset);
|
@@ -3417,9 +3417,9 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3417
3417
|
);
|
3418
3418
|
const weeksInMonth = getWeeksInMonth(state2.visibleRange.start, locale);
|
3419
3419
|
const weeksInMonthRange = new Array(weeksInMonth).fill(0).map((_, i) => i);
|
3420
|
-
const styles3 = useMultiStyleConfig("Datepicker", {});
|
3421
|
-
return /* @__PURE__ */
|
3422
|
-
return /* @__PURE__ */
|
3420
|
+
const styles3 = useMultiStyleConfig("Datepicker", { variant });
|
3421
|
+
return /* @__PURE__ */ React69__default.createElement("table", { ...gridProps }, /* @__PURE__ */ React69__default.createElement("thead", { ...headerProps }, /* @__PURE__ */ React69__default.createElement("tr", null, weekDays[language].map((day, index) => {
|
3422
|
+
return /* @__PURE__ */ React69__default.createElement(
|
3423
3423
|
Text4,
|
3424
3424
|
{
|
3425
3425
|
as: "th",
|
@@ -3429,16 +3429,17 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3429
3429
|
},
|
3430
3430
|
day
|
3431
3431
|
);
|
3432
|
-
}))), /* @__PURE__ */
|
3433
|
-
(date, dayIndex) => date ? /* @__PURE__ */
|
3432
|
+
}))), /* @__PURE__ */ React69__default.createElement("tbody", null, weeksInMonthRange.map((weekIndex) => /* @__PURE__ */ React69__default.createElement("tr", { key: weekIndex }, state2.getDatesInWeek(weekIndex, startDate).map(
|
3433
|
+
(date, dayIndex) => date ? /* @__PURE__ */ React69__default.createElement(
|
3434
3434
|
CalendarCell,
|
3435
3435
|
{
|
3436
|
+
variant,
|
3436
3437
|
key: dayIndex,
|
3437
3438
|
state: state2,
|
3438
3439
|
date,
|
3439
3440
|
currentMonth: startDate
|
3440
3441
|
}
|
3441
|
-
) : /* @__PURE__ */
|
3442
|
+
) : /* @__PURE__ */ React69__default.createElement("td", { key: dayIndex })
|
3442
3443
|
)))));
|
3443
3444
|
}
|
3444
3445
|
function CalendarNavigationButton({
|
@@ -3448,7 +3449,7 @@ function CalendarNavigationButton({
|
|
3448
3449
|
}) {
|
3449
3450
|
const ref = useRef(null);
|
3450
3451
|
const { buttonProps } = useButton(rest, ref);
|
3451
|
-
return /* @__PURE__ */
|
3452
|
+
return /* @__PURE__ */ React69__default.createElement(
|
3452
3453
|
IconButton,
|
3453
3454
|
{
|
3454
3455
|
...buttonProps,
|
@@ -3482,7 +3483,7 @@ function CalendarHeader({
|
|
3482
3483
|
);
|
3483
3484
|
const areAllOtherYearsDisabled = isPreviousYearDisabled && isNextYearDisabled;
|
3484
3485
|
const isYearPickerVisible = showYearNavigation && !areAllOtherYearsDisabled;
|
3485
|
-
return /* @__PURE__ */
|
3486
|
+
return /* @__PURE__ */ React69__default.createElement(Flex, { alignItems: "center", paddingBottom: "4", justifyContent: "space-between" }, /* @__PURE__ */ React69__default.createElement(
|
3486
3487
|
CalendarNavigator,
|
3487
3488
|
{
|
3488
3489
|
title: title ? title : isYearPickerVisible ? monthTitle : monthAndYearTitle,
|
@@ -3492,7 +3493,7 @@ function CalendarHeader({
|
|
3492
3493
|
isNextDisabled: !state2.isPreviousVisibleRangeInvalid,
|
3493
3494
|
isPreviousDisabled: !state2.isNextVisibleRangeInvalid
|
3494
3495
|
}
|
3495
|
-
), isYearPickerVisible && /* @__PURE__ */
|
3496
|
+
), isYearPickerVisible && /* @__PURE__ */ React69__default.createElement(
|
3496
3497
|
CalendarNavigator,
|
3497
3498
|
{
|
3498
3499
|
title: jsDate.getFullYear().toString(),
|
@@ -3514,15 +3515,15 @@ var CalendarNavigator = ({
|
|
3514
3515
|
isNextDisabled
|
3515
3516
|
}) => {
|
3516
3517
|
const { t: t2 } = useTranslation();
|
3517
|
-
return /* @__PURE__ */
|
3518
|
+
return /* @__PURE__ */ React69__default.createElement(Flex, { alignItems: "center", flexGrow: 1 }, /* @__PURE__ */ React69__default.createElement(
|
3518
3519
|
CalendarNavigationButton,
|
3519
3520
|
{
|
3520
3521
|
onPress: onPrevious,
|
3521
3522
|
isDisabled: isPreviousDisabled,
|
3522
|
-
icon: /* @__PURE__ */
|
3523
|
+
icon: /* @__PURE__ */ React69__default.createElement(ArrowLeftOutline24Icon, null),
|
3523
3524
|
"aria-label": `${t2(texts7.previous)} ${t2(texts7[unit])}`
|
3524
3525
|
}
|
3525
|
-
), /* @__PURE__ */
|
3526
|
+
), /* @__PURE__ */ React69__default.createElement(
|
3526
3527
|
Heading,
|
3527
3528
|
{
|
3528
3529
|
as: "div",
|
@@ -3533,12 +3534,12 @@ var CalendarNavigator = ({
|
|
3533
3534
|
textAlign: "center"
|
3534
3535
|
},
|
3535
3536
|
capitalize(title)
|
3536
|
-
), /* @__PURE__ */
|
3537
|
+
), /* @__PURE__ */ React69__default.createElement(
|
3537
3538
|
CalendarNavigationButton,
|
3538
3539
|
{
|
3539
3540
|
onPress: onNext,
|
3540
3541
|
isDisabled: isNextDisabled,
|
3541
|
-
icon: /* @__PURE__ */
|
3542
|
+
icon: /* @__PURE__ */ React69__default.createElement(ArrowRightOutline24Icon, null),
|
3542
3543
|
"aria-label": `${t2(texts7.next)} ${t2(texts7[unit])}`
|
3543
3544
|
}
|
3544
3545
|
));
|
@@ -3571,7 +3572,7 @@ var texts7 = createTexts({
|
|
3571
3572
|
});
|
3572
3573
|
|
3573
3574
|
// src/datepicker/Calendar.tsx
|
3574
|
-
function Calendar({ showYearNavigation, ...props }) {
|
3575
|
+
function Calendar({ showYearNavigation, variant, ...props }) {
|
3575
3576
|
const { t: t2 } = useTranslation();
|
3576
3577
|
const locale = useCurrentLocale();
|
3577
3578
|
const state2 = $131cf43a05231e1e$export$6d095e787d2b5e1f({
|
@@ -3582,7 +3583,7 @@ function Calendar({ showYearNavigation, ...props }) {
|
|
3582
3583
|
const { calendarProps } = useCalendar(props, state2);
|
3583
3584
|
const calendarAriaLabel = calendarProps["aria-label"];
|
3584
3585
|
const ariaLabel = t2(texts8.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
|
3585
|
-
return /* @__PURE__ */
|
3586
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { ...calendarProps, "aria-label": ariaLabel }, /* @__PURE__ */ React69__default.createElement(CalendarHeader, { state: state2, showYearNavigation }), /* @__PURE__ */ React69__default.createElement(CalendarGrid, { variant, state: state2 }));
|
3586
3587
|
}
|
3587
3588
|
var texts8 = createTexts({
|
3588
3589
|
calendar: {
|
@@ -3593,9 +3594,9 @@ var texts8 = createTexts({
|
|
3593
3594
|
}
|
3594
3595
|
});
|
3595
3596
|
var CalendarTriggerButton = forwardRef(
|
3596
|
-
({ ...buttonProps }, ref) => {
|
3597
|
+
({ variant, ...buttonProps }, ref) => {
|
3597
3598
|
const { t: t2 } = useTranslation();
|
3598
|
-
const styles3 = useMultiStyleConfig("Datepicker", {});
|
3599
|
+
const styles3 = useMultiStyleConfig("Datepicker", { variant });
|
3599
3600
|
const { onPress, ...filteredButtonProps } = buttonProps;
|
3600
3601
|
const handleOnPress = (event) => {
|
3601
3602
|
if (onPress) {
|
@@ -3603,7 +3604,7 @@ var CalendarTriggerButton = forwardRef(
|
|
3603
3604
|
onPress(event);
|
3604
3605
|
}
|
3605
3606
|
};
|
3606
|
-
return /* @__PURE__ */
|
3607
|
+
return /* @__PURE__ */ React69__default.createElement(PopoverAnchor, null, /* @__PURE__ */ React69__default.createElement(
|
3607
3608
|
Box,
|
3608
3609
|
{
|
3609
3610
|
ref,
|
@@ -3614,7 +3615,7 @@ var CalendarTriggerButton = forwardRef(
|
|
3614
3615
|
...filteredButtonProps,
|
3615
3616
|
onKeyUp: handleOnPress
|
3616
3617
|
},
|
3617
|
-
/* @__PURE__ */
|
3618
|
+
/* @__PURE__ */ React69__default.createElement(CalendarOutline24Icon, null)
|
3618
3619
|
));
|
3619
3620
|
}
|
3620
3621
|
);
|
@@ -3639,7 +3640,7 @@ var DateTimeSegment = forwardRef$1(
|
|
3639
3640
|
isPlaceholder: segment.isPlaceholder,
|
3640
3641
|
isEditable: segment.isEditable
|
3641
3642
|
});
|
3642
|
-
return /* @__PURE__ */
|
3643
|
+
return /* @__PURE__ */ React69__default.createElement(
|
3643
3644
|
Box,
|
3644
3645
|
{
|
3645
3646
|
...segmentProps,
|
@@ -3648,12 +3649,10 @@ var DateTimeSegment = forwardRef$1(
|
|
3648
3649
|
...segmentProps.style,
|
3649
3650
|
boxSizing: "content-box"
|
3650
3651
|
},
|
3651
|
-
paddingX: "1px",
|
3652
3652
|
textAlign: "center",
|
3653
3653
|
outline: "none",
|
3654
3654
|
borderRadius: "xs",
|
3655
3655
|
fontSize: ["mobile.sm", "desktop.sm"],
|
3656
|
-
minWidth: isPaddable(segment.type) ? "1.3em" : "auto",
|
3657
3656
|
sx: styles3.dateTimeSegment,
|
3658
3657
|
_focus: {
|
3659
3658
|
backgroundColor: "darkTeal",
|
@@ -3692,7 +3691,7 @@ var DateField = forwardRef$1(
|
|
3692
3691
|
state2,
|
3693
3692
|
ref
|
3694
3693
|
);
|
3695
|
-
return /* @__PURE__ */
|
3694
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { minWidth: "6rem", width: "100%" }, props.label && /* @__PURE__ */ React69__default.createElement(
|
3696
3695
|
FormLabel,
|
3697
3696
|
{
|
3698
3697
|
...props.labelProps,
|
@@ -3702,7 +3701,7 @@ var DateField = forwardRef$1(
|
|
3702
3701
|
paddingTop: "2px"
|
3703
3702
|
},
|
3704
3703
|
props.label
|
3705
|
-
), /* @__PURE__ */
|
3704
|
+
), /* @__PURE__ */ React69__default.createElement(Flex, { ...fieldProps, paddingTop: "3", paddingBottom: "0.5" }, state2.segments.map((segment, i) => /* @__PURE__ */ React69__default.createElement(
|
3706
3705
|
DateTimeSegment,
|
3707
3706
|
{
|
3708
3707
|
ref: i === 0 ? ref : void 0,
|
@@ -3710,7 +3709,7 @@ var DateField = forwardRef$1(
|
|
3710
3709
|
segment,
|
3711
3710
|
state: state2
|
3712
3711
|
}
|
3713
|
-
))), /* @__PURE__ */
|
3712
|
+
))), /* @__PURE__ */ React69__default.createElement(
|
3714
3713
|
"input",
|
3715
3714
|
{
|
3716
3715
|
type: "hidden",
|
@@ -3726,7 +3725,7 @@ var StyledField = forwardRef(
|
|
3726
3725
|
isInvalid: false
|
3727
3726
|
};
|
3728
3727
|
const styles3 = useMultiStyleConfig("Datepicker", { variant });
|
3729
|
-
return /* @__PURE__ */
|
3728
|
+
return /* @__PURE__ */ React69__default.createElement(
|
3730
3729
|
Box,
|
3731
3730
|
{
|
3732
3731
|
...otherProps,
|
@@ -3773,63 +3772,50 @@ var DatePicker = forwardRef$1(
|
|
3773
3772
|
state2,
|
3774
3773
|
ref
|
3775
3774
|
);
|
3776
|
-
const styles3 = useMultiStyleConfig("Datepicker", {});
|
3775
|
+
const styles3 = useMultiStyleConfig("Datepicker", { variant });
|
3777
3776
|
const locale = useCurrentLocale();
|
3778
|
-
const responsiveVariant = useBreakpointValue(typeof variant === "string" ? [variant] : variant) ?? "simple";
|
3779
|
-
const hasTrigger = responsiveVariant === "with-trigger";
|
3780
3777
|
const onFieldClick = () => {
|
3781
|
-
|
3782
|
-
state2.setOpen(true);
|
3783
|
-
}
|
3778
|
+
state2.setOpen(true);
|
3784
3779
|
};
|
3785
|
-
const popoverContent = /* @__PURE__ */
|
3780
|
+
const popoverContent = /* @__PURE__ */ React69__default.createElement(PopoverContent, { color: "darkGrey", boxShadow: "md", sx: styles3.calendar }, /* @__PURE__ */ React69__default.createElement(PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React69__default.createElement(PopoverBody, null, /* @__PURE__ */ React69__default.createElement(FocusLock, null, /* @__PURE__ */ React69__default.createElement(
|
3786
3781
|
Calendar,
|
3787
3782
|
{
|
3788
3783
|
...calendarProps,
|
3784
|
+
variant,
|
3789
3785
|
showYearNavigation
|
3790
3786
|
}
|
3791
3787
|
))));
|
3792
|
-
return /* @__PURE__ */
|
3793
|
-
|
3788
|
+
return /* @__PURE__ */ React69__default.createElement(I18nProvider, { locale }, /* @__PURE__ */ React69__default.createElement(Box, { position: "relative", display: "inline-flex", flexDirection: "column", width }, /* @__PURE__ */ React69__default.createElement(
|
3789
|
+
Popover,
|
3794
3790
|
{
|
3795
|
-
|
3796
|
-
|
3797
|
-
|
3798
|
-
|
3791
|
+
...dialogProps,
|
3792
|
+
isOpen: state2.isOpen,
|
3793
|
+
onOpen: state2.open,
|
3794
|
+
onClose: state2.close
|
3799
3795
|
},
|
3800
|
-
/* @__PURE__ */
|
3801
|
-
|
3796
|
+
/* @__PURE__ */ React69__default.createElement(InputGroup, { ...groupProps, display: "inline-flex" }, /* @__PURE__ */ React69__default.createElement(PopoverAnchor, null, /* @__PURE__ */ React69__default.createElement(
|
3797
|
+
StyledField,
|
3802
3798
|
{
|
3803
|
-
|
3804
|
-
|
3805
|
-
|
3806
|
-
|
3799
|
+
variant,
|
3800
|
+
onClick: onFieldClick,
|
3801
|
+
paddingX: 3,
|
3802
|
+
minHeight
|
3807
3803
|
},
|
3808
|
-
/* @__PURE__ */
|
3809
|
-
|
3804
|
+
/* @__PURE__ */ React69__default.createElement(PopoverTrigger, null, /* @__PURE__ */ React69__default.createElement(CalendarTriggerButton, { variant, ref, ...buttonProps })),
|
3805
|
+
/* @__PURE__ */ React69__default.createElement(
|
3806
|
+
DateField,
|
3810
3807
|
{
|
3811
|
-
|
3812
|
-
|
3813
|
-
|
3814
|
-
|
3815
|
-
}
|
3816
|
-
|
3817
|
-
|
3818
|
-
|
3819
|
-
|
3820
|
-
|
3821
|
-
|
3822
|
-
name: props.name,
|
3823
|
-
ref: hasTrigger ? void 0 : ref,
|
3824
|
-
...fieldProps
|
3825
|
-
}
|
3826
|
-
)
|
3827
|
-
)), hasTrigger && /* @__PURE__ */ React50__default.createElement(PopoverTrigger, null, /* @__PURE__ */ React50__default.createElement(CalendarTriggerButton, { ref, ...buttonProps }))),
|
3828
|
-
/* @__PURE__ */ React50__default.createElement(FormErrorMessage, { ...errorMessageProps }, errorMessage),
|
3829
|
-
state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React50__default.createElement(Portal, null, popoverContent),
|
3830
|
-
state2.isOpen && !props.isDisabled && !withPortal && popoverContent
|
3831
|
-
)
|
3832
|
-
));
|
3808
|
+
label: props.label,
|
3809
|
+
labelProps,
|
3810
|
+
name: props.name,
|
3811
|
+
...fieldProps
|
3812
|
+
}
|
3813
|
+
)
|
3814
|
+
))),
|
3815
|
+
/* @__PURE__ */ React69__default.createElement(FormErrorMessage, { ...errorMessageProps }, errorMessage),
|
3816
|
+
state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React69__default.createElement(Portal, null, popoverContent),
|
3817
|
+
state2.isOpen && !props.isDisabled && !withPortal && popoverContent
|
3818
|
+
)));
|
3833
3819
|
}
|
3834
3820
|
);
|
3835
3821
|
function RangeCalendar(props) {
|
@@ -3842,7 +3828,7 @@ function RangeCalendar(props) {
|
|
3842
3828
|
});
|
3843
3829
|
const ref = useRef(null);
|
3844
3830
|
const { calendarProps, title } = useRangeCalendar(props, state2, ref);
|
3845
|
-
return /* @__PURE__ */
|
3831
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { ...calendarProps, ref }, /* @__PURE__ */ React69__default.createElement(CalendarHeader, { state: state2, title }), /* @__PURE__ */ React69__default.createElement(Box, { display: "flex", gap: "8" }, /* @__PURE__ */ React69__default.createElement(CalendarGrid, { variant: props.variant, state: state2 }), /* @__PURE__ */ React69__default.createElement(CalendarGrid, { variant: props.variant, state: state2, offset: { months: 1 } })));
|
3846
3832
|
}
|
3847
3833
|
|
3848
3834
|
// src/datepicker/DateRangePicker.tsx
|
@@ -3871,25 +3857,19 @@ function DateRangePicker({
|
|
3871
3857
|
dialogProps,
|
3872
3858
|
calendarProps
|
3873
3859
|
} = useDateRangePicker(props, state2, ref);
|
3874
|
-
const
|
3875
|
-
const styles3 = useMultiStyleConfig("Datepicker", {
|
3876
|
-
variant: responsiveVariant
|
3877
|
-
});
|
3860
|
+
const styles3 = useMultiStyleConfig("Datepicker", { variant });
|
3878
3861
|
const locale = useCurrentLocale();
|
3879
3862
|
const handleEnterClick = (e) => {
|
3880
|
-
if (e.key === "Enter" && !state2.isOpen &&
|
3863
|
+
if (e.key === "Enter" && !state2.isOpen && variant === "base") {
|
3881
3864
|
e.stopPropagation();
|
3882
3865
|
state2.setOpen(true);
|
3883
3866
|
}
|
3884
3867
|
};
|
3885
3868
|
const onFieldClick = () => {
|
3886
|
-
|
3887
|
-
state2.setOpen(true);
|
3888
|
-
}
|
3869
|
+
state2.setOpen(true);
|
3889
3870
|
};
|
3890
|
-
const
|
3891
|
-
|
3892
|
-
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(
|
3871
|
+
const popoverContent = /* @__PURE__ */ React69__default.createElement(PopoverContent, { sx: styles3.calendar, boxShadow: "md", maxWidth: "none" }, /* @__PURE__ */ React69__default.createElement(PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React69__default.createElement(PopoverBody, null, /* @__PURE__ */ React69__default.createElement(FocusLock, null, /* @__PURE__ */ React69__default.createElement(RangeCalendar, { variant: "base", ...calendarProps }))));
|
3872
|
+
return /* @__PURE__ */ React69__default.createElement(I18nProvider, { locale }, /* @__PURE__ */ React69__default.createElement(Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React69__default.createElement(FormLabel, { ...labelProps, sx: styles3.inputLabel }, props.label), /* @__PURE__ */ React69__default.createElement(
|
3893
3873
|
Popover,
|
3894
3874
|
{
|
3895
3875
|
...dialogProps,
|
@@ -3897,29 +3877,28 @@ function DateRangePicker({
|
|
3897
3877
|
onOpen: state2.open,
|
3898
3878
|
onClose: state2.close
|
3899
3879
|
},
|
3900
|
-
/* @__PURE__ */
|
3880
|
+
/* @__PURE__ */ React69__default.createElement(InputGroup, { ...groupProps, width: "auto", display: "inline-flex" }, /* @__PURE__ */ React69__default.createElement(PopoverAnchor, null, /* @__PURE__ */ React69__default.createElement(
|
3901
3881
|
StyledField,
|
3902
3882
|
{
|
3903
3883
|
alignItems: "center",
|
3904
3884
|
paddingX: 3,
|
3905
|
-
variant
|
3885
|
+
variant,
|
3906
3886
|
onClick: onFieldClick,
|
3907
3887
|
onKeyPress: handleEnterClick,
|
3908
3888
|
minHeight
|
3909
3889
|
},
|
3910
|
-
|
3911
|
-
/* @__PURE__ */
|
3890
|
+
variant && /* @__PURE__ */ React69__default.createElement(PopoverTrigger, null, /* @__PURE__ */ React69__default.createElement(CalendarTriggerButton, { paddingLeft: 1, paddingRight: 1, variant, ref, ...buttonProps })),
|
3891
|
+
/* @__PURE__ */ React69__default.createElement(
|
3912
3892
|
DateField,
|
3913
3893
|
{
|
3914
3894
|
...startFieldProps,
|
3915
3895
|
name: startName,
|
3916
3896
|
label: props.startLabel,
|
3917
|
-
ref: hasTrigger ? void 0 : ref,
|
3918
3897
|
labelProps
|
3919
3898
|
}
|
3920
3899
|
),
|
3921
|
-
/* @__PURE__ */
|
3922
|
-
/* @__PURE__ */
|
3900
|
+
/* @__PURE__ */ React69__default.createElement(Box, { as: "span", "aria-hidden": "true", paddingRight: "2" }, "\u2013"),
|
3901
|
+
/* @__PURE__ */ React69__default.createElement(
|
3923
3902
|
DateField,
|
3924
3903
|
{
|
3925
3904
|
...endFieldProps,
|
@@ -3928,15 +3907,15 @@ function DateRangePicker({
|
|
3928
3907
|
labelProps
|
3929
3908
|
}
|
3930
3909
|
)
|
3931
|
-
))
|
3932
|
-
state2.isOpen && withPortal && /* @__PURE__ */
|
3910
|
+
))),
|
3911
|
+
state2.isOpen && withPortal && /* @__PURE__ */ React69__default.createElement(Portal, null, popoverContent),
|
3933
3912
|
state2.isOpen && !withPortal && popoverContent
|
3934
3913
|
)));
|
3935
3914
|
}
|
3936
3915
|
var TimeField = ({ state: state2, ...props }) => {
|
3937
3916
|
const ref = useRef(null);
|
3938
3917
|
const { labelProps, fieldProps } = useTimeField(props, state2, ref);
|
3939
|
-
return /* @__PURE__ */
|
3918
|
+
return /* @__PURE__ */ React69__default.createElement(Box, null, /* @__PURE__ */ React69__default.createElement(
|
3940
3919
|
FormLabel3,
|
3941
3920
|
{
|
3942
3921
|
...labelProps,
|
@@ -3948,7 +3927,7 @@ var TimeField = ({ state: state2, ...props }) => {
|
|
3948
3927
|
paddingTop: "2px"
|
3949
3928
|
},
|
3950
3929
|
props.label
|
3951
|
-
), /* @__PURE__ */
|
3930
|
+
), /* @__PURE__ */ React69__default.createElement(Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5" }, state2.segments.map((segment) => /* @__PURE__ */ React69__default.createElement(DateTimeSegment, { key: segment.type, segment, state: state2 }))), /* @__PURE__ */ React69__default.createElement(
|
3952
3931
|
"input",
|
3953
3932
|
{
|
3954
3933
|
type: "hidden",
|
@@ -4017,10 +3996,10 @@ var TimePicker = ({
|
|
4017
3996
|
const ariaLabel = `${inputLabel} \u2013 ${t2(
|
4018
3997
|
texts10.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
|
4019
3998
|
)}`;
|
4020
|
-
return /* @__PURE__ */
|
3999
|
+
return /* @__PURE__ */ React69__default.createElement(
|
4021
4000
|
StyledField,
|
4022
4001
|
{
|
4023
|
-
variant: "
|
4002
|
+
variant: "base",
|
4024
4003
|
width: "fit-content",
|
4025
4004
|
paddingX: 2,
|
4026
4005
|
alignItems: "center",
|
@@ -4033,7 +4012,7 @@ var TimePicker = ({
|
|
4033
4012
|
"aria-label": ariaLabel,
|
4034
4013
|
...boxProps
|
4035
4014
|
},
|
4036
|
-
/* @__PURE__ */
|
4015
|
+
/* @__PURE__ */ React69__default.createElement(
|
4037
4016
|
IconButton,
|
4038
4017
|
{
|
4039
4018
|
variant: "ghost",
|
@@ -4041,14 +4020,14 @@ var TimePicker = ({
|
|
4041
4020
|
borderRadius: "xs",
|
4042
4021
|
"aria-label": backwardsLabel,
|
4043
4022
|
title: backwardsLabel,
|
4044
|
-
icon: /* @__PURE__ */
|
4023
|
+
icon: /* @__PURE__ */ React69__default.createElement(DropdownLeftFill18Icon, null),
|
4045
4024
|
onClick: handleBackwardsClick,
|
4046
4025
|
isDisabled,
|
4047
4026
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
4048
4027
|
}
|
4049
4028
|
),
|
4050
|
-
/* @__PURE__ */
|
4051
|
-
/* @__PURE__ */
|
4029
|
+
/* @__PURE__ */ React69__default.createElement(TimeField, { label, state: state2, name }),
|
4030
|
+
/* @__PURE__ */ React69__default.createElement(
|
4052
4031
|
IconButton,
|
4053
4032
|
{
|
4054
4033
|
variant: "ghost",
|
@@ -4056,7 +4035,7 @@ var TimePicker = ({
|
|
4056
4035
|
borderRadius: "xs",
|
4057
4036
|
"aria-label": forwardsLabel,
|
4058
4037
|
title: forwardsLabel,
|
4059
|
-
icon: /* @__PURE__ */
|
4038
|
+
icon: /* @__PURE__ */ React69__default.createElement(DropdownRightFill18Icon, null),
|
4060
4039
|
onClick: handleForwardClick,
|
4061
4040
|
isDisabled,
|
4062
4041
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
@@ -4125,7 +4104,7 @@ var AttachedInputs = ({
|
|
4125
4104
|
}
|
4126
4105
|
};
|
4127
4106
|
const direction2 = flexDirection === "row" ? "horizontal" : "vertical";
|
4128
|
-
return /* @__PURE__ */
|
4107
|
+
return /* @__PURE__ */ React69__default.createElement(
|
4129
4108
|
Flex,
|
4130
4109
|
{
|
4131
4110
|
role: "group",
|
@@ -4139,7 +4118,7 @@ var AttachedInputs = ({
|
|
4139
4118
|
var Dialog = ({ title, children, ...props }) => {
|
4140
4119
|
const ref = useRef(null);
|
4141
4120
|
const { dialogProps, titleProps } = useDialog(props, ref);
|
4142
|
-
return /* @__PURE__ */
|
4121
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { ...dialogProps, ref, outline: "none" }, title && /* @__PURE__ */ React69__default.createElement(Heading$1, { as: "h3", ...titleProps }, title), children);
|
4143
4122
|
};
|
4144
4123
|
var Popover3 = forwardRef$1(
|
4145
4124
|
({
|
@@ -4170,21 +4149,21 @@ var Popover3 = forwardRef$1(
|
|
4170
4149
|
},
|
4171
4150
|
state2
|
4172
4151
|
);
|
4173
|
-
const popoverBox = /* @__PURE__ */
|
4152
|
+
const popoverBox = /* @__PURE__ */ React69__default.createElement(
|
4174
4153
|
Box,
|
4175
4154
|
{
|
4176
4155
|
...popoverProps,
|
4177
4156
|
ref: popoverRef,
|
4178
4157
|
minWidth: ((_a6 = triggerRef.current) == null ? void 0 : _a6.clientWidth) ?? "auto"
|
4179
4158
|
},
|
4180
|
-
/* @__PURE__ */
|
4159
|
+
/* @__PURE__ */ React69__default.createElement(DismissButton, { onDismiss: state2.close }),
|
4181
4160
|
children,
|
4182
|
-
/* @__PURE__ */
|
4161
|
+
/* @__PURE__ */ React69__default.createElement(DismissButton, { onDismiss: state2.close })
|
4183
4162
|
);
|
4184
4163
|
if (isNonModal) {
|
4185
4164
|
return popoverBox;
|
4186
4165
|
}
|
4187
|
-
return /* @__PURE__ */
|
4166
|
+
return /* @__PURE__ */ React69__default.createElement(Overlay, null, hasBackdrop && /* @__PURE__ */ React69__default.createElement(Box, { ...underlayProps, position: "fixed", inset: "0" }), popoverBox);
|
4188
4167
|
}
|
4189
4168
|
);
|
4190
4169
|
|
@@ -4221,7 +4200,7 @@ var CardSelect = forwardRef(
|
|
4221
4200
|
const styles3 = useMultiStyleConfig("CardSelect", { variant, size: size2 });
|
4222
4201
|
useForceRerender(state2.isOpen);
|
4223
4202
|
const ChevronIcon = size2 === "sm" ? DropdownDownFill18Icon : DropdownDownFill24Icon;
|
4224
|
-
return /* @__PURE__ */
|
4203
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { ...props }, /* @__PURE__ */ React69__default.createElement(
|
4225
4204
|
chakra.button,
|
4226
4205
|
{
|
4227
4206
|
type: "button",
|
@@ -4231,13 +4210,13 @@ var CardSelect = forwardRef(
|
|
4231
4210
|
width,
|
4232
4211
|
"data-attachable": true
|
4233
4212
|
},
|
4234
|
-
/* @__PURE__ */
|
4213
|
+
/* @__PURE__ */ React69__default.createElement(Flex, { gap: 1.5, alignItems: "center" }, icon, /* @__PURE__ */ React69__default.createElement(Box, { as: "span" }, label), withChevron ? /* @__PURE__ */ React69__default.createElement(
|
4235
4214
|
ChevronIcon,
|
4236
4215
|
{
|
4237
4216
|
transform: state2.isOpen ? "rotate(180deg)" : "none"
|
4238
4217
|
}
|
4239
4218
|
) : null)
|
4240
|
-
), state2.isOpen && /* @__PURE__ */
|
4219
|
+
), state2.isOpen && /* @__PURE__ */ React69__default.createElement(
|
4241
4220
|
Popover3,
|
4242
4221
|
{
|
4243
4222
|
state: state2,
|
@@ -4246,7 +4225,7 @@ var CardSelect = forwardRef(
|
|
4246
4225
|
crossOffset,
|
4247
4226
|
placement
|
4248
4227
|
},
|
4249
|
-
/* @__PURE__ */
|
4228
|
+
/* @__PURE__ */ React69__default.createElement(
|
4250
4229
|
Card,
|
4251
4230
|
{
|
4252
4231
|
colorScheme: "white",
|
@@ -4254,7 +4233,7 @@ var CardSelect = forwardRef(
|
|
4254
4233
|
sx: styles3.card,
|
4255
4234
|
...overlayProps
|
4256
4235
|
},
|
4257
|
-
/* @__PURE__ */
|
4236
|
+
/* @__PURE__ */ React69__default.createElement(Dialog, { "aria-label": label }, children)
|
4258
4237
|
)
|
4259
4238
|
));
|
4260
4239
|
}
|
@@ -4268,14 +4247,14 @@ function useForceRerender(shouldRerender) {
|
|
4268
4247
|
}, [shouldRerender]);
|
4269
4248
|
}
|
4270
4249
|
var Checkbox = forwardRef((props, ref) => {
|
4271
|
-
return /* @__PURE__ */
|
4250
|
+
return /* @__PURE__ */ React69__default.createElement(Checkbox$1, { ...props, ref });
|
4272
4251
|
});
|
4273
4252
|
var CheckboxGroup = ({
|
4274
4253
|
direction: direction2 = "row",
|
4275
4254
|
children,
|
4276
4255
|
...props
|
4277
4256
|
}) => {
|
4278
|
-
return /* @__PURE__ */
|
4257
|
+
return /* @__PURE__ */ React69__default.createElement(CheckboxGroup$1, { ...props }, /* @__PURE__ */ React69__default.createElement(Stack$1, { direction: direction2 }, children));
|
4279
4258
|
};
|
4280
4259
|
|
4281
4260
|
// ../../node_modules/@chakra-ui/utils/dist/chunk-O3SWHQEE.mjs
|
@@ -4296,15 +4275,15 @@ var ChoiceChip = forwardRef((props, ref) => {
|
|
4296
4275
|
hasLabel: Boolean(children)
|
4297
4276
|
});
|
4298
4277
|
const id = `choice-chip-${useId()}`;
|
4299
|
-
return /* @__PURE__ */
|
4278
|
+
return /* @__PURE__ */ React69__default.createElement(
|
4300
4279
|
chakra.label,
|
4301
4280
|
{
|
4302
4281
|
htmlFor: id,
|
4303
4282
|
...getRootProps(),
|
4304
4283
|
"aria-label": String(children)
|
4305
4284
|
},
|
4306
|
-
/* @__PURE__ */
|
4307
|
-
/* @__PURE__ */
|
4285
|
+
/* @__PURE__ */ React69__default.createElement(chakra.input, { ...getInputProps({}, ref), id }),
|
4286
|
+
/* @__PURE__ */ React69__default.createElement(
|
4308
4287
|
chakra.div,
|
4309
4288
|
{
|
4310
4289
|
...getLabelProps(),
|
@@ -4315,9 +4294,9 @@ var ChoiceChip = forwardRef((props, ref) => {
|
|
4315
4294
|
"data-active": dataAttr(state2.isActive),
|
4316
4295
|
"data-disabled": dataAttr(state2.isDisabled)
|
4317
4296
|
},
|
4318
|
-
icon && /* @__PURE__ */
|
4319
|
-
/* @__PURE__ */
|
4320
|
-
variant === "filter" && state2.isChecked && /* @__PURE__ */
|
4297
|
+
icon && /* @__PURE__ */ React69__default.createElement(chakra.span, { __css: styles3.icon }, state2.isChecked ? icon.checked : icon.default),
|
4298
|
+
/* @__PURE__ */ React69__default.createElement(chakra.span, { __css: styles3.label, ...getCheckboxProps() }, variant !== "icon" && children),
|
4299
|
+
variant === "filter" && state2.isChecked && /* @__PURE__ */ React69__default.createElement(CloseOutline24Icon, { marginLeft: 1.5 })
|
4321
4300
|
)
|
4322
4301
|
);
|
4323
4302
|
});
|
@@ -4369,7 +4348,7 @@ function Combobox({
|
|
4369
4348
|
},
|
4370
4349
|
state2
|
4371
4350
|
);
|
4372
|
-
return /* @__PURE__ */
|
4351
|
+
return /* @__PURE__ */ React69__default.createElement(React69__default.Fragment, null, /* @__PURE__ */ React69__default.createElement(
|
4373
4352
|
Input,
|
4374
4353
|
{
|
4375
4354
|
...inputProps,
|
@@ -4393,7 +4372,7 @@ function Combobox({
|
|
4393
4372
|
paddingX,
|
4394
4373
|
paddingY,
|
4395
4374
|
leftIcon,
|
4396
|
-
rightIcon: isLoading ? /* @__PURE__ */
|
4375
|
+
rightIcon: isLoading ? /* @__PURE__ */ React69__default.createElement(
|
4397
4376
|
ColorSpinner,
|
4398
4377
|
{
|
4399
4378
|
width: "1.5rem",
|
@@ -4408,7 +4387,7 @@ function Combobox({
|
|
4408
4387
|
}
|
4409
4388
|
) : rightIcon
|
4410
4389
|
}
|
4411
|
-
), state2.isOpen && !isLoading && /* @__PURE__ */
|
4390
|
+
), state2.isOpen && !isLoading && /* @__PURE__ */ React69__default.createElement(
|
4412
4391
|
Popover3,
|
4413
4392
|
{
|
4414
4393
|
state: state2,
|
@@ -4420,7 +4399,7 @@ function Combobox({
|
|
4420
4399
|
hasBackdrop: false,
|
4421
4400
|
containerPadding: 0
|
4422
4401
|
},
|
4423
|
-
/* @__PURE__ */
|
4402
|
+
/* @__PURE__ */ React69__default.createElement(
|
4424
4403
|
ListBox,
|
4425
4404
|
{
|
4426
4405
|
...listBoxProps,
|
@@ -4457,7 +4436,7 @@ var debounce = (fn, ms = 100) => {
|
|
4457
4436
|
};
|
4458
4437
|
};
|
4459
4438
|
var FormControl = forwardRef((props, ref) => {
|
4460
|
-
return /* @__PURE__ */
|
4439
|
+
return /* @__PURE__ */ React69__default.createElement(FormControl$1, { ...props, ref });
|
4461
4440
|
});
|
4462
4441
|
var FormErrorMessage = ({
|
4463
4442
|
children,
|
@@ -4473,7 +4452,7 @@ var FormErrorMessage = ({
|
|
4473
4452
|
return null;
|
4474
4453
|
}
|
4475
4454
|
const { ref, ...errorMessageProps } = formControlContext.getErrorMessageProps();
|
4476
|
-
return /* @__PURE__ */
|
4455
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { position: "relative", ref }, /* @__PURE__ */ React69__default.createElement(
|
4477
4456
|
Box,
|
4478
4457
|
{
|
4479
4458
|
borderRadius: "xs",
|
@@ -4491,12 +4470,12 @@ var FormErrorMessage = ({
|
|
4491
4470
|
...errorMessageProps,
|
4492
4471
|
...boxProps
|
4493
4472
|
},
|
4494
|
-
/* @__PURE__ */
|
4473
|
+
/* @__PURE__ */ React69__default.createElement(Arrow, { position: "absolute", top: "-0.25em", left: "1em" }),
|
4495
4474
|
children
|
4496
4475
|
));
|
4497
4476
|
};
|
4498
4477
|
var Arrow = (props) => {
|
4499
|
-
return /* @__PURE__ */
|
4478
|
+
return /* @__PURE__ */ React69__default.createElement(
|
4500
4479
|
Box,
|
4501
4480
|
{
|
4502
4481
|
...props,
|
@@ -4507,7 +4486,7 @@ var Arrow = (props) => {
|
|
4507
4486
|
fill: "none",
|
4508
4487
|
transform: "rotate(45deg)"
|
4509
4488
|
},
|
4510
|
-
/* @__PURE__ */
|
4489
|
+
/* @__PURE__ */ React69__default.createElement(
|
4511
4490
|
Box,
|
4512
4491
|
{
|
4513
4492
|
as: "path",
|
@@ -4518,7 +4497,7 @@ var Arrow = (props) => {
|
|
4518
4497
|
);
|
4519
4498
|
};
|
4520
4499
|
var FormLabel3 = forwardRef((props, ref) => {
|
4521
|
-
return /* @__PURE__ */
|
4500
|
+
return /* @__PURE__ */ React69__default.createElement(FormLabel, { ...props, ref });
|
4522
4501
|
});
|
4523
4502
|
function ListBox({
|
4524
4503
|
isLoading,
|
@@ -4529,7 +4508,7 @@ function ListBox({
|
|
4529
4508
|
}) {
|
4530
4509
|
const { listBoxProps } = useListBox(props, state2, listBoxRef);
|
4531
4510
|
const styles3 = useMultiStyleConfig("ListBox", {});
|
4532
|
-
return /* @__PURE__ */
|
4511
|
+
return /* @__PURE__ */ React69__default.createElement(
|
4533
4512
|
List,
|
4534
4513
|
{
|
4535
4514
|
...listBoxProps,
|
@@ -4540,19 +4519,19 @@ function ListBox({
|
|
4540
4519
|
},
|
4541
4520
|
state2.collection.size === 0 && props.emptyContent,
|
4542
4521
|
Array.from(state2.collection).map(
|
4543
|
-
(item) => item.type === "section" ? /* @__PURE__ */
|
4522
|
+
(item) => item.type === "section" ? /* @__PURE__ */ React69__default.createElement(ListBoxSection, { key: item.key, section: item, state: state2 }) : /* @__PURE__ */ React69__default.createElement(Option, { key: item.key, item, state: state2 })
|
4544
4523
|
)
|
4545
4524
|
);
|
4546
4525
|
}
|
4547
4526
|
function ItemLabel({ children }) {
|
4548
4527
|
let { labelProps } = useOptionContext();
|
4549
4528
|
const styles3 = useMultiStyleConfig("ListBox", {});
|
4550
|
-
return /* @__PURE__ */
|
4529
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { ...labelProps, sx: styles3.label }, children);
|
4551
4530
|
}
|
4552
4531
|
function ItemDescription({ children }) {
|
4553
4532
|
let { descriptionProps } = useOptionContext();
|
4554
4533
|
const styles3 = useMultiStyleConfig("ListBox", {});
|
4555
|
-
return /* @__PURE__ */
|
4534
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { ...descriptionProps, sx: styles3.description }, children);
|
4556
4535
|
}
|
4557
4536
|
function Option({ item, state: state2 }) {
|
4558
4537
|
const ref = useRef(null);
|
@@ -4585,9 +4564,9 @@ function Option({ item, state: state2 }) {
|
|
4585
4564
|
{ passive: false, once: true }
|
4586
4565
|
);
|
4587
4566
|
}, []);
|
4588
|
-
return /* @__PURE__ */
|
4567
|
+
return /* @__PURE__ */ React69__default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React69__default.createElement(ListItem, { ...optionProps, ...dataFields, ref, sx: styles3.item }, item.rendered));
|
4589
4568
|
}
|
4590
|
-
var OptionContext =
|
4569
|
+
var OptionContext = React69__default.createContext({
|
4591
4570
|
labelProps: {},
|
4592
4571
|
descriptionProps: {}
|
4593
4572
|
});
|
@@ -4601,7 +4580,7 @@ function ListBoxSection({ section, state: state2 }) {
|
|
4601
4580
|
});
|
4602
4581
|
const isFirstSection = section.key === state2.collection.getFirstKey();
|
4603
4582
|
const titleColor = useColorModeValue("darkGrey", "white");
|
4604
|
-
return /* @__PURE__ */
|
4583
|
+
return /* @__PURE__ */ React69__default.createElement(ListItem, { ...itemProps }, section.rendered && /* @__PURE__ */ React69__default.createElement(
|
4605
4584
|
Box,
|
4606
4585
|
{
|
4607
4586
|
fontSize: "mobile.xs",
|
@@ -4614,8 +4593,8 @@ function ListBoxSection({ section, state: state2 }) {
|
|
4614
4593
|
...headingProps
|
4615
4594
|
},
|
4616
4595
|
section.rendered
|
4617
|
-
), /* @__PURE__ */
|
4618
|
-
(item) => /* @__PURE__ */
|
4596
|
+
), /* @__PURE__ */ React69__default.createElement(List, { ...groupProps, padding: 0, listStyleType: "none" }, Array.from(state2.collection.getChildren(section.key)).map(
|
4597
|
+
(item) => /* @__PURE__ */ React69__default.createElement(Option, { key: item.key, item, state: state2 })
|
4619
4598
|
)));
|
4620
4599
|
}
|
4621
4600
|
|
@@ -4651,7 +4630,7 @@ function InfoSelect({
|
|
4651
4630
|
const { buttonProps } = useButton(triggerProps, triggerRef);
|
4652
4631
|
const { t: t2 } = useTranslation();
|
4653
4632
|
const formControl = useFormControlProps(props);
|
4654
|
-
return /* @__PURE__ */
|
4633
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { sx: styles3.container }, /* @__PURE__ */ React69__default.createElement(chakra.div, { ...labelProps, sx: styles3.label }, props.label), /* @__PURE__ */ React69__default.createElement(
|
4655
4634
|
HiddenSelect,
|
4656
4635
|
{
|
4657
4636
|
state: state2,
|
@@ -4659,7 +4638,7 @@ function InfoSelect({
|
|
4659
4638
|
label: props.label,
|
4660
4639
|
name: props.name
|
4661
4640
|
}
|
4662
|
-
), /* @__PURE__ */
|
4641
|
+
), /* @__PURE__ */ React69__default.createElement(
|
4663
4642
|
chakra.button,
|
4664
4643
|
{
|
4665
4644
|
type: "button",
|
@@ -4672,16 +4651,16 @@ function InfoSelect({
|
|
4672
4651
|
"aria-invalid": formControl.isInvalid,
|
4673
4652
|
"aria-describedby": formControl["aria-describedby"]
|
4674
4653
|
},
|
4675
|
-
/* @__PURE__ */
|
4676
|
-
/* @__PURE__ */
|
4677
|
-
), state2.isOpen && /* @__PURE__ */
|
4654
|
+
/* @__PURE__ */ React69__default.createElement(Box, { ...valueProps }, state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)),
|
4655
|
+
/* @__PURE__ */ React69__default.createElement(Box, { sx: styles3.arrowIcon }, state2.isOpen ? /* @__PURE__ */ React69__default.createElement(DropdownUpFill24Icon, null) : /* @__PURE__ */ React69__default.createElement(DropdownDownFill24Icon, null))
|
4656
|
+
), state2.isOpen && /* @__PURE__ */ React69__default.createElement(
|
4678
4657
|
Popover3,
|
4679
4658
|
{
|
4680
4659
|
state: state2,
|
4681
4660
|
triggerRef,
|
4682
4661
|
containerPadding: 0
|
4683
4662
|
},
|
4684
|
-
/* @__PURE__ */
|
4663
|
+
/* @__PURE__ */ React69__default.createElement(
|
4685
4664
|
ListBox,
|
4686
4665
|
{
|
4687
4666
|
...menuProps,
|
@@ -4706,7 +4685,7 @@ var Input = forwardRef(
|
|
4706
4685
|
const formControlProps = useFormControlContext();
|
4707
4686
|
const fallbackId = `input-${useId()}`;
|
4708
4687
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
4709
|
-
return /* @__PURE__ */
|
4688
|
+
return /* @__PURE__ */ React69__default.createElement(InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React69__default.createElement(InputLeftElement, { pointerEvents: "none" }, leftIcon), /* @__PURE__ */ React69__default.createElement(
|
4710
4689
|
Input$1,
|
4711
4690
|
{
|
4712
4691
|
"data-attachable": true,
|
@@ -4717,19 +4696,19 @@ var Input = forwardRef(
|
|
4717
4696
|
ref,
|
4718
4697
|
placeholder: " "
|
4719
4698
|
}
|
4720
|
-
), /* @__PURE__ */
|
4699
|
+
), /* @__PURE__ */ React69__default.createElement(FormLabel, { htmlFor: inputId }, label), rightIcon && /* @__PURE__ */ React69__default.createElement(InputRightElement, { pointerEvents: "none" }, rightIcon));
|
4721
4700
|
}
|
4722
4701
|
);
|
4723
4702
|
var InputLeftElement2 = forwardRef(
|
4724
|
-
(props, ref) => /* @__PURE__ */
|
4703
|
+
(props, ref) => /* @__PURE__ */ React69__default.createElement(InputLeftElement, { ...props, ref })
|
4725
4704
|
);
|
4726
4705
|
var InputRightElement2 = forwardRef(
|
4727
|
-
(props, ref) => /* @__PURE__ */
|
4706
|
+
(props, ref) => /* @__PURE__ */ React69__default.createElement(InputRightElement, { ...props, ref })
|
4728
4707
|
);
|
4729
4708
|
var NativeSelect = forwardRef(
|
4730
4709
|
({ label, ...props }, ref) => {
|
4731
4710
|
const styles3 = useMultiStyleConfig("Select", props);
|
4732
|
-
return /* @__PURE__ */
|
4711
|
+
return /* @__PURE__ */ React69__default.createElement(FormControl, null, /* @__PURE__ */ React69__default.createElement(
|
4733
4712
|
Select,
|
4734
4713
|
{
|
4735
4714
|
"data-attachable": true,
|
@@ -4737,7 +4716,7 @@ var NativeSelect = forwardRef(
|
|
4737
4716
|
rootProps: { __css: styles3.root },
|
4738
4717
|
ref
|
4739
4718
|
}
|
4740
|
-
), label && /* @__PURE__ */
|
4719
|
+
), label && /* @__PURE__ */ React69__default.createElement(FormLabel3, null, label));
|
4741
4720
|
}
|
4742
4721
|
);
|
4743
4722
|
var colors = {
|
@@ -4799,6 +4778,8 @@ function NumericStepper({
|
|
4799
4778
|
maxValue = 99,
|
4800
4779
|
isDisabled,
|
4801
4780
|
withInput = true,
|
4781
|
+
stepSize = 1,
|
4782
|
+
showZero = false,
|
4802
4783
|
...boxProps
|
4803
4784
|
}) {
|
4804
4785
|
const { t: t2 } = useTranslation();
|
@@ -4811,16 +4792,18 @@ function NumericStepper({
|
|
4811
4792
|
const textColor = useColorModeValue("darkGrey", "white");
|
4812
4793
|
const backgroundColor = useColorModeValue("white", "darkGrey");
|
4813
4794
|
const focusColor = useColorModeValue("greenHaze", "azure");
|
4814
|
-
|
4795
|
+
const clampedStepSize = Math.max(Math.min(stepSize, 10), 1);
|
4796
|
+
return /* @__PURE__ */ React69__default.createElement(Flex, { alignItems: "center", ...boxProps }, /* @__PURE__ */ React69__default.createElement(
|
4815
4797
|
VerySmallButton,
|
4816
4798
|
{
|
4817
|
-
icon: /* @__PURE__ */
|
4818
|
-
"aria-label": t2(texts12.decrementButtonAriaLabel),
|
4819
|
-
onClick: () => onChange(value -
|
4799
|
+
icon: /* @__PURE__ */ React69__default.createElement(SubtractIcon, { color: "white", stepLabel: clampedStepSize }),
|
4800
|
+
"aria-label": t2(texts12.decrementButtonAriaLabel(clampedStepSize)),
|
4801
|
+
onClick: () => onChange(Math.max(value - clampedStepSize, minValue)),
|
4820
4802
|
visibility: value <= minValue ? "hidden" : "visible",
|
4821
|
-
isDisabled: formControlProps.disabled
|
4803
|
+
isDisabled: formControlProps.disabled,
|
4804
|
+
id: value <= minValue ? void 0 : formControlProps.id
|
4822
4805
|
}
|
4823
|
-
), withInput ? /* @__PURE__ */
|
4806
|
+
), withInput ? /* @__PURE__ */ React69__default.createElement(
|
4824
4807
|
chakra.input,
|
4825
4808
|
{
|
4826
4809
|
type: "number",
|
@@ -4829,10 +4812,10 @@ function NumericStepper({
|
|
4829
4812
|
name: nameProp,
|
4830
4813
|
value,
|
4831
4814
|
...formControlProps,
|
4832
|
-
id: value
|
4815
|
+
id: !showZero && value === 0 ? void 0 : formControlProps.id,
|
4833
4816
|
fontSize: "sm",
|
4834
4817
|
fontWeight: "bold",
|
4835
|
-
width:
|
4818
|
+
width: `${Math.max(value.toString().length + 1, 3)}ch`,
|
4836
4819
|
marginX: 1,
|
4837
4820
|
paddingX: 1,
|
4838
4821
|
borderRadius: "xs",
|
@@ -4840,7 +4823,7 @@ function NumericStepper({
|
|
4840
4823
|
backgroundColor,
|
4841
4824
|
color: textColor,
|
4842
4825
|
transition: "box-shadow .1s ease-out",
|
4843
|
-
visibility: value === 0 ? "hidden" : "visible",
|
4826
|
+
visibility: !showZero && value === 0 ? "hidden" : "visible",
|
4844
4827
|
"aria-live": "assertive",
|
4845
4828
|
"aria-label": value.toString(),
|
4846
4829
|
_hover: {
|
@@ -4867,10 +4850,10 @@ function NumericStepper({
|
|
4867
4850
|
if (Number.isNaN(numericInput)) {
|
4868
4851
|
return;
|
4869
4852
|
}
|
4870
|
-
onChange(numericInput);
|
4853
|
+
onChange(Math.max(Math.min(numericInput, maxValue), minValue));
|
4871
4854
|
}
|
4872
4855
|
}
|
4873
|
-
) : /* @__PURE__ */
|
4856
|
+
) : /* @__PURE__ */ React69__default.createElement(
|
4874
4857
|
chakra.text,
|
4875
4858
|
{
|
4876
4859
|
fontSize: "sm",
|
@@ -4881,24 +4864,24 @@ function NumericStepper({
|
|
4881
4864
|
textAlign: "center",
|
4882
4865
|
color: textColor,
|
4883
4866
|
transition: "box-shadow .1s ease-out",
|
4884
|
-
visibility: value === 0 ? "hidden" : "visible",
|
4867
|
+
visibility: !showZero && value === 0 ? "hidden" : "visible",
|
4885
4868
|
"aria-label": value.toString()
|
4886
4869
|
},
|
4887
4870
|
value
|
4888
|
-
), /* @__PURE__ */
|
4871
|
+
), /* @__PURE__ */ React69__default.createElement(
|
4889
4872
|
VerySmallButton,
|
4890
4873
|
{
|
4891
|
-
icon: /* @__PURE__ */
|
4892
|
-
"aria-label": t2(texts12.incrementButtonAriaLabel),
|
4893
|
-
onClick: () => onChange(value +
|
4874
|
+
icon: /* @__PURE__ */ React69__default.createElement(AddIcon, { color: "white", stepLabel: clampedStepSize }),
|
4875
|
+
"aria-label": t2(texts12.incrementButtonAriaLabel(clampedStepSize)),
|
4876
|
+
onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
|
4894
4877
|
visibility: value >= maxValue ? "hidden" : "visible",
|
4895
4878
|
isDisabled: formControlProps.disabled,
|
4896
|
-
id: value
|
4879
|
+
id: value >= maxValue ? void 0 : formControlProps.id
|
4897
4880
|
}
|
4898
4881
|
));
|
4899
4882
|
}
|
4900
4883
|
var VerySmallButton = (props) => {
|
4901
|
-
return /* @__PURE__ */
|
4884
|
+
return /* @__PURE__ */ React69__default.createElement(
|
4902
4885
|
IconButton,
|
4903
4886
|
{
|
4904
4887
|
variant: "primary",
|
@@ -4915,7 +4898,7 @@ var VerySmallButton = (props) => {
|
|
4915
4898
|
}
|
4916
4899
|
);
|
4917
4900
|
};
|
4918
|
-
var SubtractIcon = (props) => /* @__PURE__ */
|
4901
|
+
var SubtractIcon = (props) => /* @__PURE__ */ React69__default.createElement(React69__default.Fragment, null, /* @__PURE__ */ React69__default.createElement(
|
4919
4902
|
Box,
|
4920
4903
|
{
|
4921
4904
|
as: "svg",
|
@@ -4925,7 +4908,7 @@ var SubtractIcon = (props) => /* @__PURE__ */ React50__default.createElement(
|
|
4925
4908
|
stroke: "currentColor",
|
4926
4909
|
...props
|
4927
4910
|
},
|
4928
|
-
/* @__PURE__ */
|
4911
|
+
/* @__PURE__ */ React69__default.createElement(
|
4929
4912
|
"line",
|
4930
4913
|
{
|
4931
4914
|
x1: "9",
|
@@ -4936,8 +4919,8 @@ var SubtractIcon = (props) => /* @__PURE__ */ React50__default.createElement(
|
|
4936
4919
|
strokeLinecap: "round"
|
4937
4920
|
}
|
4938
4921
|
)
|
4939
|
-
);
|
4940
|
-
var AddIcon = (props) => /* @__PURE__ */
|
4922
|
+
), props.stepLabel > 1 && /* @__PURE__ */ React69__default.createElement(chakra.span, { paddingRight: "1" }, props.stepLabel.toString()));
|
4923
|
+
var AddIcon = (props) => /* @__PURE__ */ React69__default.createElement(React69__default.Fragment, null, /* @__PURE__ */ React69__default.createElement(
|
4941
4924
|
Box,
|
4942
4925
|
{
|
4943
4926
|
as: "svg",
|
@@ -4947,7 +4930,7 @@ var AddIcon = (props) => /* @__PURE__ */ React50__default.createElement(
|
|
4947
4930
|
stroke: "currentColor",
|
4948
4931
|
...props
|
4949
4932
|
},
|
4950
|
-
/* @__PURE__ */
|
4933
|
+
/* @__PURE__ */ React69__default.createElement(
|
4951
4934
|
"line",
|
4952
4935
|
{
|
4953
4936
|
x1: "9",
|
@@ -4958,7 +4941,7 @@ var AddIcon = (props) => /* @__PURE__ */ React50__default.createElement(
|
|
4958
4941
|
strokeLinecap: "round"
|
4959
4942
|
}
|
4960
4943
|
),
|
4961
|
-
/* @__PURE__ */
|
4944
|
+
/* @__PURE__ */ React69__default.createElement(
|
4962
4945
|
"line",
|
4963
4946
|
{
|
4964
4947
|
x1: "15",
|
@@ -4969,19 +4952,23 @@ var AddIcon = (props) => /* @__PURE__ */ React50__default.createElement(
|
|
4969
4952
|
strokeLinecap: "round"
|
4970
4953
|
}
|
4971
4954
|
)
|
4972
|
-
);
|
4955
|
+
), props.stepLabel > 1 && /* @__PURE__ */ React69__default.createElement(chakra.span, { paddingRight: "1" }, props.stepLabel.toString()));
|
4973
4956
|
var texts12 = createTexts({
|
4974
|
-
decrementButtonAriaLabel
|
4975
|
-
|
4976
|
-
|
4977
|
-
|
4978
|
-
|
4957
|
+
decrementButtonAriaLabel(stepSize) {
|
4958
|
+
return {
|
4959
|
+
nb: `Trekk fra ${stepSize}`,
|
4960
|
+
en: `Subtract ${stepSize}`,
|
4961
|
+
nn: `Trekk fr\xE5 ${stepSize}`,
|
4962
|
+
sv: `Subtrahera ${stepSize}`
|
4963
|
+
};
|
4979
4964
|
},
|
4980
|
-
incrementButtonAriaLabel
|
4981
|
-
|
4982
|
-
|
4983
|
-
|
4984
|
-
|
4965
|
+
incrementButtonAriaLabel(stepSize) {
|
4966
|
+
return {
|
4967
|
+
nb: `Legg til ${stepSize}`,
|
4968
|
+
en: `Add ${stepSize}`,
|
4969
|
+
nn: `Legg til ${stepSize}`,
|
4970
|
+
sv: `L\xE4gg till ${stepSize}`
|
4971
|
+
};
|
4985
4972
|
}
|
4986
4973
|
});
|
4987
4974
|
var PasswordInput = forwardRef(
|
@@ -4991,7 +4978,7 @@ var PasswordInput = forwardRef(
|
|
4991
4978
|
const formControlProps = useFormControlContext();
|
4992
4979
|
const autoGeneratedId = `password-input-${useId()}`;
|
4993
4980
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
4994
|
-
return /* @__PURE__ */
|
4981
|
+
return /* @__PURE__ */ React69__default.createElement(InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React69__default.createElement(InputLeftElement2, null, leftIcon), /* @__PURE__ */ React69__default.createElement(
|
4995
4982
|
Input$1,
|
4996
4983
|
{
|
4997
4984
|
...props,
|
@@ -5003,7 +4990,7 @@ var PasswordInput = forwardRef(
|
|
5003
4990
|
ref,
|
5004
4991
|
"data-attachable": true
|
5005
4992
|
}
|
5006
|
-
), /* @__PURE__ */
|
4993
|
+
), /* @__PURE__ */ React69__default.createElement(FormLabel3, { htmlFor: inputId, pointerEvents: "none" }, label), /* @__PURE__ */ React69__default.createElement(InputRightElement2, { width: "fit-content" }, /* @__PURE__ */ React69__default.createElement(
|
5007
4994
|
Button$1,
|
5008
4995
|
{
|
5009
4996
|
variant: "ghost",
|
@@ -5041,10 +5028,10 @@ var PhoneNumberInput = forwardRef(
|
|
5041
5028
|
nationalNumber: ""
|
5042
5029
|
}
|
5043
5030
|
});
|
5044
|
-
return /* @__PURE__ */
|
5031
|
+
return /* @__PURE__ */ React69__default.createElement(AttachedInputs, { ...boxProps }, /* @__PURE__ */ React69__default.createElement(
|
5045
5032
|
Suspense,
|
5046
5033
|
{
|
5047
|
-
fallback: /* @__PURE__ */
|
5034
|
+
fallback: /* @__PURE__ */ React69__default.createElement(
|
5048
5035
|
InfoSelect,
|
5049
5036
|
{
|
5050
5037
|
isLabelSrOnly: true,
|
@@ -5053,10 +5040,10 @@ var PhoneNumberInput = forwardRef(
|
|
5053
5040
|
height: "100%",
|
5054
5041
|
value: "+47"
|
5055
5042
|
},
|
5056
|
-
/* @__PURE__ */
|
5043
|
+
/* @__PURE__ */ React69__default.createElement(Item, { key: "+47" }, "+47")
|
5057
5044
|
)
|
5058
5045
|
},
|
5059
|
-
/* @__PURE__ */
|
5046
|
+
/* @__PURE__ */ React69__default.createElement(
|
5060
5047
|
LazyCountryCodeSelect,
|
5061
5048
|
{
|
5062
5049
|
value: value.countryCode,
|
@@ -5069,7 +5056,7 @@ var PhoneNumberInput = forwardRef(
|
|
5069
5056
|
width: "6.25rem"
|
5070
5057
|
}
|
5071
5058
|
)
|
5072
|
-
), /* @__PURE__ */
|
5059
|
+
), /* @__PURE__ */ React69__default.createElement(
|
5073
5060
|
Input,
|
5074
5061
|
{
|
5075
5062
|
ref,
|
@@ -5098,13 +5085,13 @@ var texts14 = createTexts({
|
|
5098
5085
|
sv: "Telefonnummer"
|
5099
5086
|
}
|
5100
5087
|
});
|
5101
|
-
var LazyCountryCodeSelect =
|
5088
|
+
var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-BA3A7ODU.mjs'));
|
5102
5089
|
var Radio = forwardRef((props, ref) => {
|
5103
|
-
return /* @__PURE__ */
|
5090
|
+
return /* @__PURE__ */ React69__default.createElement(Radio$1, { ...props, ref });
|
5104
5091
|
});
|
5105
5092
|
var RadioGroup = forwardRef(
|
5106
5093
|
({ children, direction: direction2 = "row", ...rest }, ref) => {
|
5107
|
-
return /* @__PURE__ */
|
5094
|
+
return /* @__PURE__ */ React69__default.createElement(RadioGroup$1, { ...rest, ref }, /* @__PURE__ */ React69__default.createElement(Stack$1, { direction: direction2 }, children));
|
5108
5095
|
}
|
5109
5096
|
);
|
5110
5097
|
var SearchInput = forwardRef(
|
@@ -5114,7 +5101,7 @@ var SearchInput = forwardRef(
|
|
5114
5101
|
const formControlProps = useFormControlContext();
|
5115
5102
|
const autoGeneratedId = useId();
|
5116
5103
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
5117
|
-
return /* @__PURE__ */
|
5104
|
+
return /* @__PURE__ */ React69__default.createElement(InputGroup, { position: "relative" }, /* @__PURE__ */ React69__default.createElement(InputLeftElement2, null, /* @__PURE__ */ React69__default.createElement(SearchOutline24Icon, null)), /* @__PURE__ */ React69__default.createElement(
|
5118
5105
|
Input$1,
|
5119
5106
|
{
|
5120
5107
|
paddingLeft: 7,
|
@@ -5131,7 +5118,7 @@ var SearchInput = forwardRef(
|
|
5131
5118
|
placeholder: " ",
|
5132
5119
|
"data-attachable": true
|
5133
5120
|
}
|
5134
|
-
), /* @__PURE__ */
|
5121
|
+
), /* @__PURE__ */ React69__default.createElement(FormLabel3, { htmlFor: inputId, pointerEvents: "none" }, label ?? t2(texts15.label)), showClearButton && /* @__PURE__ */ React69__default.createElement(InputRightElement2, { width: "fit-content" }, /* @__PURE__ */ React69__default.createElement(
|
5135
5122
|
IconButton$1,
|
5136
5123
|
{
|
5137
5124
|
variant: "ghost",
|
@@ -5139,7 +5126,7 @@ var SearchInput = forwardRef(
|
|
5139
5126
|
size: "sm",
|
5140
5127
|
marginRight: 1,
|
5141
5128
|
"aria-label": t2(texts15.reset),
|
5142
|
-
icon: /* @__PURE__ */
|
5129
|
+
icon: /* @__PURE__ */ React69__default.createElement(CloseOutline24Icon, null),
|
5143
5130
|
onClick: onReset
|
5144
5131
|
}
|
5145
5132
|
)));
|
@@ -5161,7 +5148,7 @@ var texts15 = createTexts({
|
|
5161
5148
|
});
|
5162
5149
|
var Switch = forwardRef(
|
5163
5150
|
({ size: size2 = "md", ...props }, ref) => {
|
5164
|
-
return /* @__PURE__ */
|
5151
|
+
return /* @__PURE__ */ React69__default.createElement(Switch$1, { variant: "solid", size: size2, ...props, ref });
|
5165
5152
|
}
|
5166
5153
|
);
|
5167
5154
|
var Textarea = forwardRef((props, ref) => {
|
@@ -5172,7 +5159,7 @@ var Textarea = forwardRef((props, ref) => {
|
|
5172
5159
|
const formControlProps = useFormControlContext();
|
5173
5160
|
const fallbackId = `textarea-${useId()}`;
|
5174
5161
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
5175
|
-
return /* @__PURE__ */
|
5162
|
+
return /* @__PURE__ */ React69__default.createElement(InputGroup, { position: "relative", ...spacingProps }, /* @__PURE__ */ React69__default.createElement(Textarea$1, { ...rest, id: inputId, ref, placeholder: " " }), label && /* @__PURE__ */ React69__default.createElement(FormLabel, { htmlFor: inputId, id: `${inputId}-label` }, label));
|
5176
5163
|
});
|
5177
5164
|
function getSpacingProps(props) {
|
5178
5165
|
const {
|
@@ -5291,7 +5278,7 @@ var LineIcon = ({
|
|
5291
5278
|
if (!Icon) {
|
5292
5279
|
return null;
|
5293
5280
|
}
|
5294
|
-
return /* @__PURE__ */
|
5281
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { sx: { ...styles3.iconContainer, ...sx }, ...rest }, /* @__PURE__ */ React69__default.createElement(Icon, { sx: styles3.icon }));
|
5295
5282
|
};
|
5296
5283
|
|
5297
5284
|
// src/linjetag/InfoTag.tsx
|
@@ -5302,7 +5289,7 @@ var InfoTag = ({
|
|
5302
5289
|
description
|
5303
5290
|
}) => {
|
5304
5291
|
const styles3 = useMultiStyleConfig("InfoTag", { variant, size: size2 });
|
5305
|
-
return /* @__PURE__ */
|
5292
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { sx: styles3.container }, /* @__PURE__ */ React69__default.createElement(LineIcon, { variant, size: size2, sx: styles3.iconContainer }), /* @__PURE__ */ React69__default.createElement(Box, { sx: styles3.textContainer }, title && /* @__PURE__ */ React69__default.createElement(Box, { as: "span", sx: styles3.title }, title), title && description && " ", description && /* @__PURE__ */ React69__default.createElement(Box, { as: "span", sx: styles3.description }, description)));
|
5306
5293
|
};
|
5307
5294
|
var TravelTag = forwardRef(
|
5308
5295
|
({
|
@@ -5320,7 +5307,7 @@ var TravelTag = forwardRef(
|
|
5320
5307
|
deviationLevel
|
5321
5308
|
});
|
5322
5309
|
const DeviationLevelIcon = getDeviationLevelIcon({ deviationLevel, size: size2 });
|
5323
|
-
return /* @__PURE__ */
|
5310
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { sx: styles3.container, "aria-disabled": isDisabled, ref, ...rest }, /* @__PURE__ */ React69__default.createElement(LineIcon, { variant, size: size2, sx: styles3.iconContainer }), /* @__PURE__ */ React69__default.createElement(Box, { sx: styles3.textContainer }, title && /* @__PURE__ */ React69__default.createElement(Box, { as: "span", sx: styles3.title }, title), title && description && " ", description && /* @__PURE__ */ React69__default.createElement(Box, { as: "span", sx: styles3.description }, description)), DeviationLevelIcon && /* @__PURE__ */ React69__default.createElement(DeviationLevelIcon, { sx: styles3.deviationIcon }));
|
5324
5311
|
}
|
5325
5312
|
);
|
5326
5313
|
var getDeviationLevelIcon = ({
|
@@ -5344,7 +5331,7 @@ var TextLink = forwardRef(
|
|
5344
5331
|
var _a6;
|
5345
5332
|
const { t: t2 } = useTranslation();
|
5346
5333
|
const isExternal = props.isExternal !== void 0 ? props.isExternal : Boolean((_a6 = props.href) == null ? void 0 : _a6.match(/^https?:\/\//));
|
5347
|
-
return /* @__PURE__ */
|
5334
|
+
return /* @__PURE__ */ React69__default.createElement(Link, { ...props, ref, isExternal }, children, isExternal && /* @__PURE__ */ React69__default.createElement(
|
5348
5335
|
LinkOutOutline24Icon,
|
5349
5336
|
{
|
5350
5337
|
marginLeft: 0.5,
|
@@ -5365,7 +5352,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5365
5352
|
const mainColor = colorScheme === "light" ? "#1d211c" : "#ffffff";
|
5366
5353
|
const accentColor = colorScheme === "light" ? "#138c6e" : "#ffffff";
|
5367
5354
|
const id = useId();
|
5368
|
-
return /* @__PURE__ */
|
5355
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { as: "svg", viewBox: "0 0 107 54", ...boxProps }, /* @__PURE__ */ React69__default.createElement("title", null, "Vy logo"), /* @__PURE__ */ React69__default.createElement(
|
5369
5356
|
"path",
|
5370
5357
|
{
|
5371
5358
|
fillRule: "evenodd",
|
@@ -5373,7 +5360,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5373
5360
|
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",
|
5374
5361
|
fill: mainColor
|
5375
5362
|
}
|
5376
|
-
), /* @__PURE__ */
|
5363
|
+
), /* @__PURE__ */ React69__default.createElement(
|
5377
5364
|
"mask",
|
5378
5365
|
{
|
5379
5366
|
id: `${id}-a`,
|
@@ -5384,7 +5371,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5384
5371
|
width: "94",
|
5385
5372
|
height: "54"
|
5386
5373
|
},
|
5387
|
-
/* @__PURE__ */
|
5374
|
+
/* @__PURE__ */ React69__default.createElement(
|
5388
5375
|
"path",
|
5389
5376
|
{
|
5390
5377
|
fillRule: "evenodd",
|
@@ -5393,7 +5380,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5393
5380
|
fill: mainColor
|
5394
5381
|
}
|
5395
5382
|
)
|
5396
|
-
), /* @__PURE__ */
|
5383
|
+
), /* @__PURE__ */ React69__default.createElement(
|
5397
5384
|
"g",
|
5398
5385
|
{
|
5399
5386
|
mask: `url(#${id}-a)`,
|
@@ -5401,9 +5388,9 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5401
5388
|
clipRule: "evenodd",
|
5402
5389
|
fill: mainColor
|
5403
5390
|
},
|
5404
|
-
/* @__PURE__ */
|
5405
|
-
/* @__PURE__ */
|
5406
|
-
), /* @__PURE__ */
|
5391
|
+
/* @__PURE__ */ React69__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" }),
|
5392
|
+
/* @__PURE__ */ React69__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" })
|
5393
|
+
), /* @__PURE__ */ React69__default.createElement(
|
5407
5394
|
"path",
|
5408
5395
|
{
|
5409
5396
|
fillRule: "evenodd",
|
@@ -5411,7 +5398,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5411
5398
|
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",
|
5412
5399
|
fill: accentColor
|
5413
5400
|
}
|
5414
|
-
), /* @__PURE__ */
|
5401
|
+
), /* @__PURE__ */ React69__default.createElement(
|
5415
5402
|
"path",
|
5416
5403
|
{
|
5417
5404
|
fillRule: "evenodd",
|
@@ -5419,7 +5406,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5419
5406
|
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",
|
5420
5407
|
fill: mainColor
|
5421
5408
|
}
|
5422
|
-
), /* @__PURE__ */
|
5409
|
+
), /* @__PURE__ */ React69__default.createElement(
|
5423
5410
|
"mask",
|
5424
5411
|
{
|
5425
5412
|
id: `${id}-b`,
|
@@ -5430,7 +5417,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5430
5417
|
width: "78",
|
5431
5418
|
height: "54"
|
5432
5419
|
},
|
5433
|
-
/* @__PURE__ */
|
5420
|
+
/* @__PURE__ */ React69__default.createElement(
|
5434
5421
|
"path",
|
5435
5422
|
{
|
5436
5423
|
fillRule: "evenodd",
|
@@ -5439,25 +5426,25 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5439
5426
|
fill: mainColor
|
5440
5427
|
}
|
5441
5428
|
)
|
5442
|
-
), /* @__PURE__ */
|
5429
|
+
), /* @__PURE__ */ React69__default.createElement("g", { mask: `url(#${id}-b)`, fillRule: "evenodd", clipRule: "evenodd" }, /* @__PURE__ */ React69__default.createElement(
|
5443
5430
|
"path",
|
5444
5431
|
{
|
5445
5432
|
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",
|
5446
5433
|
fill: mainColor
|
5447
5434
|
}
|
5448
|
-
), /* @__PURE__ */
|
5435
|
+
), /* @__PURE__ */ React69__default.createElement(
|
5449
5436
|
"path",
|
5450
5437
|
{
|
5451
5438
|
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",
|
5452
5439
|
fill: mainColor
|
5453
5440
|
}
|
5454
|
-
), /* @__PURE__ */
|
5441
|
+
), /* @__PURE__ */ React69__default.createElement(
|
5455
5442
|
"path",
|
5456
5443
|
{
|
5457
5444
|
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",
|
5458
5445
|
fill: accentColor
|
5459
5446
|
}
|
5460
|
-
)), /* @__PURE__ */
|
5447
|
+
)), /* @__PURE__ */ React69__default.createElement(
|
5461
5448
|
"path",
|
5462
5449
|
{
|
5463
5450
|
fillRule: "evenodd",
|
@@ -5467,7 +5454,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5467
5454
|
}
|
5468
5455
|
));
|
5469
5456
|
};
|
5470
|
-
var JumpForwardIcon = (props) => /* @__PURE__ */
|
5457
|
+
var JumpForwardIcon = (props) => /* @__PURE__ */ React69.createElement(Box, { as: "svg", ...props, viewBox: "0 0 32 30", fill: "none" }, /* @__PURE__ */ React69.createElement(
|
5471
5458
|
"path",
|
5472
5459
|
{
|
5473
5460
|
fillRule: "evenodd",
|
@@ -5475,7 +5462,7 @@ var JumpForwardIcon = (props) => /* @__PURE__ */ React50.createElement(Box, { as
|
|
5475
5462
|
d: "M22.388 7.5C20.567 5.967 18.251 5 15.75 5 9.951 5 5.25 9.701 5.25 15.5S9.951 26 15.75 26s10.5-4.701 10.5-10.5a1 1 0 1 1 2 0c0 6.904-5.596 12.5-12.5 12.5s-12.5-5.596-12.5-12.5S8.846 3 15.75 3c3.206 0 6.11 1.31 8.304 3.3l.206-1.441a1 1 0 0 1 1.98.282L25.617 9.5H21.25a1 1 0 1 1 0-2h1.138Z",
|
5476
5463
|
fill: "currentColor"
|
5477
5464
|
}
|
5478
|
-
), /* @__PURE__ */
|
5465
|
+
), /* @__PURE__ */ React69.createElement(
|
5479
5466
|
"path",
|
5480
5467
|
{
|
5481
5468
|
fillRule: "evenodd",
|
@@ -5484,7 +5471,7 @@ var JumpForwardIcon = (props) => /* @__PURE__ */ React50.createElement(Box, { as
|
|
5484
5471
|
fill: "currentColor"
|
5485
5472
|
}
|
5486
5473
|
));
|
5487
|
-
var JumpBackwardIcon = (props) => /* @__PURE__ */
|
5474
|
+
var JumpBackwardIcon = (props) => /* @__PURE__ */ React69.createElement(Box, { as: "svg", ...props, viewBox: "0 0 32 30", fill: "none" }, /* @__PURE__ */ React69.createElement(
|
5488
5475
|
"path",
|
5489
5476
|
{
|
5490
5477
|
fillRule: "evenodd",
|
@@ -5492,7 +5479,7 @@ var JumpBackwardIcon = (props) => /* @__PURE__ */ React50.createElement(Box, { a
|
|
5492
5479
|
d: "M9.612 7.5C11.433 5.967 13.749 5 16.25 5c5.799 0 10.5 4.701 10.5 10.5S22.049 26 16.25 26s-10.5-4.701-10.5-10.5a1 1 0 1 0-2 0c0 6.904 5.596 12.5 12.5 12.5s12.5-5.596 12.5-12.5S23.154 3 16.25 3c-3.206 0-6.11 1.31-8.304 3.3L7.74 4.86a1 1 0 0 0-1.98.282L6.383 9.5h4.367a1 1 0 1 0 0-2H9.612Z",
|
5493
5480
|
fill: "currentColor"
|
5494
5481
|
}
|
5495
|
-
), /* @__PURE__ */
|
5482
|
+
), /* @__PURE__ */ React69.createElement(
|
5496
5483
|
"path",
|
5497
5484
|
{
|
5498
5485
|
fillRule: "evenodd",
|
@@ -5501,7 +5488,7 @@ var JumpBackwardIcon = (props) => /* @__PURE__ */ React50.createElement(Box, { a
|
|
5501
5488
|
fill: "currentColor"
|
5502
5489
|
}
|
5503
5490
|
));
|
5504
|
-
var PlayIcon = (props) => /* @__PURE__ */
|
5491
|
+
var PlayIcon = (props) => /* @__PURE__ */ React69.createElement(Box, { as: "svg", ...props, fill: "none", viewBox: "0 0 60 60" }, /* @__PURE__ */ React69.createElement(
|
5505
5492
|
"path",
|
5506
5493
|
{
|
5507
5494
|
fillRule: "evenodd",
|
@@ -5510,7 +5497,7 @@ var PlayIcon = (props) => /* @__PURE__ */ React50.createElement(Box, { as: "svg"
|
|
5510
5497
|
fill: "currentColor"
|
5511
5498
|
}
|
5512
5499
|
));
|
5513
|
-
var PauseIcon = (props) => /* @__PURE__ */
|
5500
|
+
var PauseIcon = (props) => /* @__PURE__ */ React69.createElement(Box, { as: "svg", ...props, viewBox: "0 0 60 60", fill: "none" }, /* @__PURE__ */ React69.createElement(
|
5514
5501
|
"path",
|
5515
5502
|
{
|
5516
5503
|
fillRule: "evenodd",
|
@@ -5519,7 +5506,7 @@ var PauseIcon = (props) => /* @__PURE__ */ React50.createElement(Box, { as: "svg
|
|
5519
5506
|
fill: "currentColor"
|
5520
5507
|
}
|
5521
5508
|
));
|
5522
|
-
var SkipNextIcon = (props) => /* @__PURE__ */
|
5509
|
+
var SkipNextIcon = (props) => /* @__PURE__ */ React69.createElement(Box, { as: "svg", ...props, viewBox: "0 0 30 30", fill: "none" }, /* @__PURE__ */ React69.createElement(
|
5523
5510
|
"path",
|
5524
5511
|
{
|
5525
5512
|
fillRule: "evenodd",
|
@@ -5528,7 +5515,7 @@ var SkipNextIcon = (props) => /* @__PURE__ */ React50.createElement(Box, { as: "
|
|
5528
5515
|
fill: "currentColor"
|
5529
5516
|
}
|
5530
5517
|
));
|
5531
|
-
var SkipPreviousIcon = (props) => /* @__PURE__ */
|
5518
|
+
var SkipPreviousIcon = (props) => /* @__PURE__ */ React69.createElement(Box, { as: "svg", ...props, viewBox: "0 0 30 30", fill: "none" }, /* @__PURE__ */ React69.createElement(
|
5532
5519
|
"path",
|
5533
5520
|
{
|
5534
5521
|
fillRule: "evenodd",
|
@@ -5550,7 +5537,7 @@ var JumpButton = ({
|
|
5550
5537
|
variant: "jumpSkip",
|
5551
5538
|
size: size2
|
5552
5539
|
});
|
5553
|
-
return /* @__PURE__ */
|
5540
|
+
return /* @__PURE__ */ React69__default.createElement(
|
5554
5541
|
Center,
|
5555
5542
|
{
|
5556
5543
|
as: "button",
|
@@ -5559,7 +5546,7 @@ var JumpButton = ({
|
|
5559
5546
|
disabled: isDisabled,
|
5560
5547
|
...props
|
5561
5548
|
},
|
5562
|
-
direction2 === "forward" ? /* @__PURE__ */
|
5549
|
+
direction2 === "forward" ? /* @__PURE__ */ React69__default.createElement(JumpForwardIcon, { sx: styles3.icon }) : /* @__PURE__ */ React69__default.createElement(JumpBackwardIcon, { sx: styles3.icon })
|
5563
5550
|
);
|
5564
5551
|
};
|
5565
5552
|
var texts17 = createTexts({
|
@@ -5587,7 +5574,7 @@ var PlayPauseButton = ({
|
|
5587
5574
|
variant: "play",
|
5588
5575
|
size: size2
|
5589
5576
|
});
|
5590
|
-
return /* @__PURE__ */
|
5577
|
+
return /* @__PURE__ */ React69__default.createElement(
|
5591
5578
|
Center,
|
5592
5579
|
{
|
5593
5580
|
as: "button",
|
@@ -5596,7 +5583,7 @@ var PlayPauseButton = ({
|
|
5596
5583
|
disabled: isDisabled,
|
5597
5584
|
...props
|
5598
5585
|
},
|
5599
|
-
isPlaying ? /* @__PURE__ */
|
5586
|
+
isPlaying ? /* @__PURE__ */ React69__default.createElement(PauseIcon, { sx: styles3.icon }) : /* @__PURE__ */ React69__default.createElement(PlayIcon, { sx: styles3.icon })
|
5600
5587
|
);
|
5601
5588
|
};
|
5602
5589
|
var texts18 = createTexts({
|
@@ -5624,7 +5611,7 @@ var SkipButton = ({
|
|
5624
5611
|
variant: "jumpSkip",
|
5625
5612
|
size: size2
|
5626
5613
|
});
|
5627
|
-
return /* @__PURE__ */
|
5614
|
+
return /* @__PURE__ */ React69__default.createElement(
|
5628
5615
|
Center,
|
5629
5616
|
{
|
5630
5617
|
as: "button",
|
@@ -5633,7 +5620,7 @@ var SkipButton = ({
|
|
5633
5620
|
disabled: isDisabled,
|
5634
5621
|
...props
|
5635
5622
|
},
|
5636
|
-
direction2 === "forward" ? /* @__PURE__ */
|
5623
|
+
direction2 === "forward" ? /* @__PURE__ */ React69__default.createElement(SkipNextIcon, { sx: styles3.icon }) : /* @__PURE__ */ React69__default.createElement(SkipPreviousIcon, { sx: styles3.icon })
|
5637
5624
|
);
|
5638
5625
|
};
|
5639
5626
|
var texts19 = createTexts({
|
@@ -5656,13 +5643,13 @@ var ModalHeader = forwardRef(
|
|
5656
5643
|
fontSize: size2 === "lg" ? ["mobile.lg", "desktop.lg"] : ["mobile.md", "desktop.md"],
|
5657
5644
|
textAlign: size2 === "lg" ? "center" : "left"
|
5658
5645
|
};
|
5659
|
-
return /* @__PURE__ */
|
5646
|
+
return /* @__PURE__ */ React69__default.createElement(ModalHeader$1, { ...props, ref, ...styles3 });
|
5660
5647
|
}
|
5661
5648
|
);
|
5662
5649
|
|
5663
5650
|
// src/modal/Drawer.tsx
|
5664
5651
|
var Drawer = (props) => {
|
5665
|
-
return /* @__PURE__ */
|
5652
|
+
return /* @__PURE__ */ React69__default.createElement(DrawerProvider, { placement: props.placement }, /* @__PURE__ */ React69__default.createElement(Drawer$1, { ...props }));
|
5666
5653
|
};
|
5667
5654
|
var DrawerContent = forwardRef(
|
5668
5655
|
({ children, ...props }, ref) => {
|
@@ -5679,7 +5666,7 @@ var DrawerContent = forwardRef(
|
|
5679
5666
|
});
|
5680
5667
|
const isTopOrBottom = placement === "top" || placement === "bottom";
|
5681
5668
|
const widthConstraits = isTopOrBottom ? { width: ["100%", "37.5rem"], mx: "auto" } : {};
|
5682
|
-
return /* @__PURE__ */
|
5669
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { ...handlers }, /* @__PURE__ */ React69__default.createElement(
|
5683
5670
|
DrawerContent$1,
|
5684
5671
|
{
|
5685
5672
|
...widthConstraits,
|
@@ -5688,13 +5675,13 @@ var DrawerContent = forwardRef(
|
|
5688
5675
|
...props,
|
5689
5676
|
ref
|
5690
5677
|
},
|
5691
|
-
/* @__PURE__ */
|
5678
|
+
/* @__PURE__ */ React69__default.createElement(Box, { position: "relative" }, /* @__PURE__ */ React69__default.createElement(Box, { maxHeight: "100vh", maxWidth: "100vw", overflow: "auto" }, isTopOrBottom && /* @__PURE__ */ React69__default.createElement(Notch, null), /* @__PURE__ */ React69__default.createElement(Box, null, children)))
|
5692
5679
|
));
|
5693
5680
|
}
|
5694
5681
|
);
|
5695
5682
|
var Notch = forwardRef((props, ref) => {
|
5696
5683
|
const placement = useDrawerContext();
|
5697
|
-
return /* @__PURE__ */
|
5684
|
+
return /* @__PURE__ */ React69__default.createElement(
|
5698
5685
|
Box,
|
5699
5686
|
{
|
5700
5687
|
position: "absolute",
|
@@ -5706,14 +5693,14 @@ var Notch = forwardRef((props, ref) => {
|
|
5706
5693
|
...props,
|
5707
5694
|
ref
|
5708
5695
|
},
|
5709
|
-
/* @__PURE__ */
|
5696
|
+
/* @__PURE__ */ React69__default.createElement(
|
5710
5697
|
Center,
|
5711
5698
|
{
|
5712
5699
|
background: `linear-gradient(to ${placement === "bottom" ? "bottom" : "top"}, white 0%, white 60%, transparent)`,
|
5713
5700
|
padding: 2,
|
5714
5701
|
borderRadius: "md"
|
5715
5702
|
},
|
5716
|
-
/* @__PURE__ */
|
5703
|
+
/* @__PURE__ */ React69__default.createElement(
|
5717
5704
|
Box,
|
5718
5705
|
{
|
5719
5706
|
width: "2.265rem",
|
@@ -5725,10 +5712,10 @@ var Notch = forwardRef((props, ref) => {
|
|
5725
5712
|
)
|
5726
5713
|
);
|
5727
5714
|
});
|
5728
|
-
var DrawerContext =
|
5729
|
-
var DrawerProvider = (props) => /* @__PURE__ */
|
5715
|
+
var DrawerContext = React69__default.createContext(void 0);
|
5716
|
+
var DrawerProvider = (props) => /* @__PURE__ */ React69__default.createElement(DrawerContext.Provider, { value: props.placement }, props.children);
|
5730
5717
|
var useDrawerContext = () => {
|
5731
|
-
return
|
5718
|
+
return React69__default.useContext(DrawerContext);
|
5732
5719
|
};
|
5733
5720
|
var SimpleDrawer = ({
|
5734
5721
|
placement,
|
@@ -5736,19 +5723,19 @@ var SimpleDrawer = ({
|
|
5736
5723
|
title,
|
5737
5724
|
...props
|
5738
5725
|
}) => {
|
5739
|
-
return /* @__PURE__ */
|
5726
|
+
return /* @__PURE__ */ React69__default.createElement(Drawer, { placement, ...props }, /* @__PURE__ */ React69__default.createElement(DrawerOverlay, null), /* @__PURE__ */ React69__default.createElement(DrawerContent, null, /* @__PURE__ */ React69__default.createElement(DrawerCloseButton, null), title && /* @__PURE__ */ React69__default.createElement(ModalHeader, null, title), /* @__PURE__ */ React69__default.createElement(DrawerBody, null, children)));
|
5740
5727
|
};
|
5741
5728
|
var PopoverWizardBody = ({ children }) => {
|
5742
|
-
const [currentStep, setCurrentStep] =
|
5743
|
-
const totalSteps =
|
5729
|
+
const [currentStep, setCurrentStep] = React69.useState(1);
|
5730
|
+
const totalSteps = React69.Children.count(children);
|
5744
5731
|
const { isOpen } = usePopoverContext();
|
5745
|
-
|
5732
|
+
React69.useEffect(() => {
|
5746
5733
|
if (!isOpen && currentStep > 1) {
|
5747
5734
|
const id = setTimeout(() => setCurrentStep(1), 500);
|
5748
5735
|
return () => clearTimeout(id);
|
5749
5736
|
}
|
5750
5737
|
}, [isOpen, currentStep]);
|
5751
|
-
return /* @__PURE__ */
|
5738
|
+
return /* @__PURE__ */ React69.createElement(PopoverBody, null, /* @__PURE__ */ React69.createElement(Stack, { spacing: 1.5 }, /* @__PURE__ */ React69.createElement(Box, null, React69.Children.toArray(children)[currentStep - 1]), /* @__PURE__ */ React69.createElement(Flex, { gap: 3 }, /* @__PURE__ */ React69.createElement(StepIndicator, { totalSteps, currentStep }), /* @__PURE__ */ React69.createElement(
|
5752
5739
|
NextStepButton,
|
5753
5740
|
{
|
5754
5741
|
isLastStep: totalSteps === currentStep,
|
@@ -5758,7 +5745,7 @@ var PopoverWizardBody = ({ children }) => {
|
|
5758
5745
|
};
|
5759
5746
|
var StepIndicator = ({ totalSteps, currentStep }) => {
|
5760
5747
|
const steps = createRange(1, totalSteps);
|
5761
|
-
return /* @__PURE__ */
|
5748
|
+
return /* @__PURE__ */ React69.createElement(Flex, { gap: 1, alignItems: "center" }, steps.map((step) => /* @__PURE__ */ React69.createElement(
|
5762
5749
|
Box,
|
5763
5750
|
{
|
5764
5751
|
key: step,
|
@@ -5777,13 +5764,13 @@ var createRange = (start, end) => {
|
|
5777
5764
|
var NextStepButton = ({ isLastStep, onNext }) => {
|
5778
5765
|
const { onClose } = usePopoverContext();
|
5779
5766
|
const { t: t2 } = useTranslation();
|
5780
|
-
return /* @__PURE__ */
|
5767
|
+
return /* @__PURE__ */ React69.createElement(
|
5781
5768
|
Button,
|
5782
5769
|
{
|
5783
5770
|
variant: "additional",
|
5784
5771
|
size: "sm",
|
5785
5772
|
color: "white",
|
5786
|
-
leftIcon: isLastStep ? void 0 : /* @__PURE__ */
|
5773
|
+
leftIcon: isLastStep ? void 0 : /* @__PURE__ */ React69.createElement(ArrowRightFill18Icon, null),
|
5787
5774
|
onClick: isLastStep ? onClose : onNext
|
5788
5775
|
},
|
5789
5776
|
t2(isLastStep ? texts20.finish : texts20.nextStep)
|
@@ -5815,7 +5802,7 @@ var SimplePopover = ({
|
|
5815
5802
|
borderRadius,
|
5816
5803
|
...props
|
5817
5804
|
}) => {
|
5818
|
-
return /* @__PURE__ */
|
5805
|
+
return /* @__PURE__ */ React69__default.createElement(DarkMode, null, /* @__PURE__ */ React69__default.createElement(
|
5819
5806
|
Popover,
|
5820
5807
|
{
|
5821
5808
|
onClose,
|
@@ -5827,8 +5814,8 @@ var SimplePopover = ({
|
|
5827
5814
|
arrowShadowColor: "none",
|
5828
5815
|
...props
|
5829
5816
|
},
|
5830
|
-
triggerElement && /* @__PURE__ */
|
5831
|
-
/* @__PURE__ */
|
5817
|
+
triggerElement && /* @__PURE__ */ React69__default.createElement(PopoverTrigger, null, triggerElement),
|
5818
|
+
/* @__PURE__ */ React69__default.createElement(PopoverContent, { borderRadius }, /* @__PURE__ */ React69__default.createElement(PopoverArrow, null), withCloseButton && /* @__PURE__ */ React69__default.createElement(PopoverCloseButton, null), /* @__PURE__ */ React69__default.createElement(PopoverBody, null, children))
|
5832
5819
|
));
|
5833
5820
|
};
|
5834
5821
|
var WizardPopover = ({
|
@@ -5836,7 +5823,7 @@ var WizardPopover = ({
|
|
5836
5823
|
triggerElement,
|
5837
5824
|
withCloseButton = false
|
5838
5825
|
}) => {
|
5839
|
-
return /* @__PURE__ */
|
5826
|
+
return /* @__PURE__ */ React69.createElement(DarkMode, null, /* @__PURE__ */ React69.createElement(Popover, { size: "lg" }, /* @__PURE__ */ React69.createElement(PopoverTrigger, null, triggerElement), /* @__PURE__ */ React69.createElement(PopoverContent, null, /* @__PURE__ */ React69.createElement(PopoverArrow, null), withCloseButton && /* @__PURE__ */ React69.createElement(PopoverCloseButton, null), /* @__PURE__ */ React69.createElement(PopoverWizardBody, null, children))));
|
5840
5827
|
};
|
5841
5828
|
var SporProvider = ({
|
5842
5829
|
theme: theme3 = theme,
|
@@ -5844,9 +5831,9 @@ var SporProvider = ({
|
|
5844
5831
|
children,
|
5845
5832
|
...props
|
5846
5833
|
}) => {
|
5847
|
-
return /* @__PURE__ */
|
5834
|
+
return /* @__PURE__ */ React69__default.createElement(LanguageProvider, { language }, /* @__PURE__ */ React69__default.createElement(ChakraProvider, { theme: theme3, ...props }, /* @__PURE__ */ React69__default.createElement(Global, { styles: fontFaces }), children));
|
5848
5835
|
};
|
5849
|
-
var StepperContext =
|
5836
|
+
var StepperContext = React69__default.createContext(null);
|
5850
5837
|
var StepperProvider = ({
|
5851
5838
|
activeStep,
|
5852
5839
|
children,
|
@@ -5854,7 +5841,7 @@ var StepperProvider = ({
|
|
5854
5841
|
colorScheme,
|
5855
5842
|
numberOfSteps
|
5856
5843
|
}) => {
|
5857
|
-
return /* @__PURE__ */
|
5844
|
+
return /* @__PURE__ */ React69__default.createElement(
|
5858
5845
|
StepperContext.Provider,
|
5859
5846
|
{
|
5860
5847
|
value: { activeStep, onClick, colorScheme, numberOfSteps }
|
@@ -5863,7 +5850,7 @@ var StepperProvider = ({
|
|
5863
5850
|
);
|
5864
5851
|
};
|
5865
5852
|
var useStepper = () => {
|
5866
|
-
const context =
|
5853
|
+
const context = React69__default.useContext(StepperContext);
|
5867
5854
|
if (!context) {
|
5868
5855
|
throw new Error(
|
5869
5856
|
"useStepper must be used within a StepperProvider. Most likely, you forgot to wrap your StepperStep in a Stepper component"
|
@@ -5885,7 +5872,7 @@ var Stepper = ({
|
|
5885
5872
|
const numberOfSteps = steps.length;
|
5886
5873
|
const activeStep = Number(activeStepAsStringOrNumber);
|
5887
5874
|
const { t: t2 } = useTranslation();
|
5888
|
-
return /* @__PURE__ */
|
5875
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { __css: style.root }, /* @__PURE__ */ React69__default.createElement(
|
5889
5876
|
StepperProvider,
|
5890
5877
|
{
|
5891
5878
|
onClick,
|
@@ -5893,24 +5880,24 @@ var Stepper = ({
|
|
5893
5880
|
colorScheme,
|
5894
5881
|
numberOfSteps
|
5895
5882
|
},
|
5896
|
-
/* @__PURE__ */
|
5883
|
+
/* @__PURE__ */ React69__default.createElement(Box, { __css: style.container }, /* @__PURE__ */ React69__default.createElement(Box, { __css: style.innerContainer }, /* @__PURE__ */ React69__default.createElement(HStack, null, activeStep > 1 && /* @__PURE__ */ React69__default.createElement(
|
5897
5884
|
IconButton,
|
5898
5885
|
{
|
5899
5886
|
"aria-label": t2(texts21.back),
|
5900
|
-
icon: /* @__PURE__ */
|
5887
|
+
icon: /* @__PURE__ */ React69__default.createElement(DropdownLeftFill24Icon, null),
|
5901
5888
|
variant: "ghost",
|
5902
5889
|
size: "sm",
|
5903
5890
|
onClick: () => onClick(activeStep - 1),
|
5904
5891
|
__css: style.backButton
|
5905
5892
|
}
|
5906
|
-
), /* @__PURE__ */
|
5893
|
+
), /* @__PURE__ */ React69__default.createElement(
|
5907
5894
|
SimplePopover,
|
5908
5895
|
{
|
5909
|
-
triggerElement: /* @__PURE__ */
|
5896
|
+
triggerElement: /* @__PURE__ */ React69__default.createElement(Box, { as: "button", __css: style.stepCounter }, t2(texts21.stepsOf(activeStep, numberOfSteps))),
|
5910
5897
|
borderRadius: "xs"
|
5911
5898
|
},
|
5912
|
-
steps.map((step, index) => /* @__PURE__ */
|
5913
|
-
)), title && /* @__PURE__ */
|
5899
|
+
steps.map((step, index) => /* @__PURE__ */ React69__default.createElement(StepperStep, { key: step, stepNumber: index + 1 }, step))
|
5900
|
+
)), title && /* @__PURE__ */ React69__default.createElement(Box, { as: "h3", __css: style.title }, title)), /* @__PURE__ */ React69__default.createElement(Flex, { justifyContent: "center", display: ["none", "flex"] }, steps.map((step, index) => /* @__PURE__ */ React69__default.createElement(StepperStep, { key: index, stepNumber: index + 1 }, step))))
|
5914
5901
|
));
|
5915
5902
|
};
|
5916
5903
|
var texts21 = createTexts({
|
@@ -5934,7 +5921,7 @@ var StepperStep = ({ children, stepNumber }) => {
|
|
5934
5921
|
variant,
|
5935
5922
|
colorScheme
|
5936
5923
|
});
|
5937
|
-
return /* @__PURE__ */
|
5924
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { __css: style.stepContainer }, stepNumber > 1 && /* @__PURE__ */ React69__default.createElement(DropdownRightFill18Icon, { marginX: 5, display: ["none", "block"] }), /* @__PURE__ */ React69__default.createElement(
|
5938
5925
|
Flex,
|
5939
5926
|
{
|
5940
5927
|
__css: style.stepButton,
|
@@ -5944,8 +5931,8 @@ var StepperStep = ({ children, stepNumber }) => {
|
|
5944
5931
|
disabled: variant === "disabled" || variant === "active",
|
5945
5932
|
onClick: () => onClick(stepNumber)
|
5946
5933
|
},
|
5947
|
-
/* @__PURE__ */
|
5948
|
-
/* @__PURE__ */
|
5934
|
+
/* @__PURE__ */ React69__default.createElement(Box, { __css: style.stepNumber }, stepNumber),
|
5935
|
+
/* @__PURE__ */ React69__default.createElement(Box, { __css: style.stepTitle }, children)
|
5949
5936
|
));
|
5950
5937
|
};
|
5951
5938
|
var getVariant = (stepNumber, activeStep) => {
|
@@ -5958,11 +5945,11 @@ var getVariant = (stepNumber, activeStep) => {
|
|
5958
5945
|
return "disabled";
|
5959
5946
|
};
|
5960
5947
|
var Tabs = forwardRef((props, ref) => {
|
5961
|
-
return /* @__PURE__ */
|
5948
|
+
return /* @__PURE__ */ React69.createElement(Tabs$1, { ...props, ref });
|
5962
5949
|
});
|
5963
5950
|
var Table = forwardRef((props, ref) => {
|
5964
5951
|
const { variant, size: size2, colorScheme, children, ...rest } = props;
|
5965
|
-
return /* @__PURE__ */
|
5952
|
+
return /* @__PURE__ */ React69__default.createElement(Box, { ...rest, ...getStyleProps(props) }, /* @__PURE__ */ React69__default.createElement(Box, { overflowX: "auto" }, /* @__PURE__ */ React69__default.createElement(
|
5966
5953
|
Table$1,
|
5967
5954
|
{
|
5968
5955
|
variant,
|
@@ -12163,34 +12150,35 @@ var config10 = helpers5.defineMultiStyleConfig({
|
|
12163
12150
|
var choice_chip_default = config10;
|
12164
12151
|
var $size6 = cssVar$1("close-button-size");
|
12165
12152
|
var config11 = defineStyleConfig$1({
|
12166
|
-
baseStyle: {
|
12153
|
+
baseStyle: (props) => ({
|
12167
12154
|
w: [$size6.reference],
|
12168
12155
|
h: [$size6.reference],
|
12169
12156
|
transitionProperty: "common",
|
12170
12157
|
transitionDuration: "normal",
|
12171
|
-
borderRadius: "
|
12158
|
+
borderRadius: "md",
|
12172
12159
|
backgroundColor: "transparent",
|
12173
|
-
color: "darkGrey",
|
12160
|
+
color: mode("darkGrey", "white")(props),
|
12174
12161
|
fontWeight: "normal",
|
12175
12162
|
...focusVisible({
|
12176
12163
|
focus: {
|
12177
12164
|
outline: "none",
|
12178
|
-
boxShadow: getBoxShadowString({ borderColor: "greenHaze" })
|
12165
|
+
boxShadow: getBoxShadowString({ borderColor: mode("greenHaze", "azure")(props) }),
|
12166
|
+
outlineOffset: "2px"
|
12179
12167
|
},
|
12180
12168
|
notFocus: {
|
12181
12169
|
boxShadow: "none"
|
12182
12170
|
}
|
12183
12171
|
}),
|
12184
12172
|
_hover: {
|
12185
|
-
backgroundColor: "seaMist",
|
12173
|
+
backgroundColor: mode("seaMist", "pine")(props),
|
12186
12174
|
_disabled: {
|
12187
12175
|
color: "dimGrey"
|
12188
12176
|
}
|
12189
12177
|
},
|
12190
12178
|
_active: {
|
12191
|
-
backgroundColor: "mint"
|
12179
|
+
backgroundColor: mode("mint", "whiteAlpha.200")(props)
|
12192
12180
|
}
|
12193
|
-
},
|
12181
|
+
}),
|
12194
12182
|
sizes: {
|
12195
12183
|
lg: {
|
12196
12184
|
[$size6.variable]: "40px",
|
@@ -12244,6 +12232,7 @@ var config13 = helpers6.defineMultiStyleConfig({
|
|
12244
12232
|
}),
|
12245
12233
|
transitionProperty: "box-shadow",
|
12246
12234
|
transitionDuration: "fast",
|
12235
|
+
borderRadius: "sm",
|
12247
12236
|
display: "flex",
|
12248
12237
|
flex: 1,
|
12249
12238
|
paddingY: 0.5,
|
@@ -12295,28 +12284,25 @@ var config13 = helpers6.defineMultiStyleConfig({
|
|
12295
12284
|
},
|
12296
12285
|
calendarTriggerButton: {
|
12297
12286
|
backgroundColor: mode("white", "night")(props),
|
12298
|
-
boxShadow:
|
12299
|
-
borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props)
|
12300
|
-
})}, inset 1px 0 0 1px ${mode("white", colors.night)(props)}`,
|
12301
|
-
// to make the shadow colors not multiply
|
12287
|
+
boxShadow: "none",
|
12302
12288
|
width: 8,
|
12303
12289
|
display: "flex",
|
12304
12290
|
alignItems: "center",
|
12305
12291
|
justifyContent: "center",
|
12306
|
-
|
12292
|
+
borderLeftRadius: "sm",
|
12307
12293
|
transitionProperty: "box-shadow, background-color",
|
12308
12294
|
transitionSpeed: "fast",
|
12309
12295
|
position: "relative",
|
12310
|
-
|
12311
|
-
|
12296
|
+
paddingTop: 1,
|
12297
|
+
paddingBottom: 1,
|
12298
|
+
borderRadius: "sm",
|
12299
|
+
right: "9px",
|
12312
12300
|
_hover: {
|
12313
|
-
boxShadow:
|
12314
|
-
|
12315
|
-
borderWidth: 2
|
12316
|
-
})}, inset 2px 0 0 2px ${mode("white", colors.night)(props)}`
|
12301
|
+
boxShadow: "none",
|
12302
|
+
backgroundColor: mode("seaMist", "pine")(props)
|
12317
12303
|
},
|
12318
12304
|
_active: {
|
12319
|
-
backgroundColor: mode("mint", "
|
12305
|
+
backgroundColor: mode("mint", "whiteAlpha.200")(props)
|
12320
12306
|
},
|
12321
12307
|
...focusVisible({
|
12322
12308
|
focus: {
|
@@ -12345,13 +12331,17 @@ var config13 = helpers6.defineMultiStyleConfig({
|
|
12345
12331
|
},
|
12346
12332
|
calendar: {
|
12347
12333
|
backgroundColor: mode("white", "night")(props),
|
12348
|
-
color: mode("darkGrey", "white")(props)
|
12334
|
+
color: mode("darkGrey", "white")(props),
|
12335
|
+
boxShadow: getBoxShadowString({
|
12336
|
+
borderWidth: 2,
|
12337
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props)
|
12338
|
+
})
|
12349
12339
|
},
|
12350
12340
|
weekdays: {
|
12351
12341
|
color: mode("darkGrey", "white")(props)
|
12352
12342
|
},
|
12353
12343
|
weekend: {
|
12354
|
-
color: mode("
|
12344
|
+
color: mode("darkTeal", "seaMist")(props)
|
12355
12345
|
},
|
12356
12346
|
dateCell: {
|
12357
12347
|
backgroundColor: mode("white", "night")(props),
|
@@ -12410,7 +12400,7 @@ var config13 = helpers6.defineMultiStyleConfig({
|
|
12410
12400
|
"&[data-today]": {
|
12411
12401
|
boxShadow: getBoxShadowString({
|
12412
12402
|
borderWidth: 1,
|
12413
|
-
borderColor: mode("
|
12403
|
+
borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props)
|
12414
12404
|
}),
|
12415
12405
|
_focus: {
|
12416
12406
|
outline: "none",
|
@@ -12427,16 +12417,64 @@ var config13 = helpers6.defineMultiStyleConfig({
|
|
12427
12417
|
}
|
12428
12418
|
}),
|
12429
12419
|
variants: {
|
12430
|
-
|
12431
|
-
|
12432
|
-
|
12420
|
+
base: (props) => ({
|
12421
|
+
calendar: {
|
12422
|
+
backgroundColor: mode("white", "night")(props),
|
12423
|
+
color: mode("darkGrey", "white")(props),
|
12424
|
+
boxShadow: getBoxShadowString({
|
12425
|
+
borderWidth: 2,
|
12426
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props)
|
12427
|
+
})
|
12428
|
+
},
|
12429
|
+
dateCell: {
|
12430
|
+
color: mode("darkGrey", "white")(props),
|
12431
|
+
_hover: {
|
12432
|
+
backgroundColor: mode("seaMist", "pine")(props)
|
12433
|
+
},
|
12434
|
+
"&[data-today]": {
|
12435
|
+
boxShadow: getBoxShadowString({
|
12436
|
+
borderWidth: 1,
|
12437
|
+
borderColor: mode("blackAlpha.400", "whiteAlpha.400")(props)
|
12438
|
+
})
|
12439
|
+
}
|
12433
12440
|
}
|
12434
|
-
},
|
12435
|
-
|
12436
|
-
|
12437
|
-
|
12441
|
+
}),
|
12442
|
+
floating: (props) => ({
|
12443
|
+
calendar: {
|
12444
|
+
backgroundColor: mode("white", "night")(props),
|
12445
|
+
color: mode("darkGrey", "white")(props),
|
12446
|
+
boxShadow: getBoxShadowString({
|
12447
|
+
borderColor: mode("grey.200", "whiteAlpha.400")(props),
|
12448
|
+
baseShadow: "sm"
|
12449
|
+
})
|
12450
|
+
},
|
12451
|
+
dateCell: {
|
12452
|
+
color: mode("darkGrey", "white")(props),
|
12453
|
+
_hover: {
|
12454
|
+
backgroundColor: mode("", "")(props)
|
12455
|
+
}
|
12438
12456
|
}
|
12439
|
-
}
|
12457
|
+
}),
|
12458
|
+
ghost: (props) => ({
|
12459
|
+
calendar: {
|
12460
|
+
backgroundColor: mode("white", "night")(props),
|
12461
|
+
color: mode("darkGrey", "white")(props),
|
12462
|
+
boxShadow: getBoxShadowString({
|
12463
|
+
borderWidth: 2,
|
12464
|
+
borderColor: mode("", "")(props)
|
12465
|
+
})
|
12466
|
+
},
|
12467
|
+
dateCell: {
|
12468
|
+
color: mode("darkGrey", "white")(props),
|
12469
|
+
_hover: {
|
12470
|
+
backgroundColor: mode("seaMist", "pine")(props)
|
12471
|
+
},
|
12472
|
+
_selected: {
|
12473
|
+
backgroundColor: mode("", "primaryGreen")(props),
|
12474
|
+
color: "darkGrey"
|
12475
|
+
}
|
12476
|
+
}
|
12477
|
+
})
|
12440
12478
|
}
|
12441
12479
|
});
|
12442
12480
|
var datepicker_default = config13;
|
@@ -13730,8 +13768,8 @@ var config26 = helpers17.defineMultiStyleConfig({
|
|
13730
13768
|
},
|
13731
13769
|
dialog: {
|
13732
13770
|
borderRadius: "md",
|
13733
|
-
background: "white",
|
13734
|
-
color: "inherit",
|
13771
|
+
background: mode("white", "night")(props),
|
13772
|
+
color: mode("inherit", "white")(props),
|
13735
13773
|
my: "3.75rem",
|
13736
13774
|
zIndex: "modal",
|
13737
13775
|
maxHeight: props.scrollBehavior === "inside" ? "calc(100% - 7.5rem)" : void 0,
|
@@ -13746,6 +13784,7 @@ var config26 = helpers17.defineMultiStyleConfig({
|
|
13746
13784
|
},
|
13747
13785
|
closeButton: {
|
13748
13786
|
position: "absolute",
|
13787
|
+
color: "inherit",
|
13749
13788
|
top: 3,
|
13750
13789
|
insetEnd: 3
|
13751
13790
|
},
|
@@ -15036,12 +15075,12 @@ var theme = {
|
|
15036
15075
|
};
|
15037
15076
|
var BaseToast = ({ children, variant, id }) => {
|
15038
15077
|
const styles3 = useStyleConfig("Toast", { variant });
|
15039
|
-
return /* @__PURE__ */
|
15078
|
+
return /* @__PURE__ */ React69__default.createElement(Flex, { sx: styles3, id }, /* @__PURE__ */ React69__default.createElement(ToastIcon, { variant }), children);
|
15040
15079
|
};
|
15041
15080
|
var ToastIcon = ({ variant }) => {
|
15042
15081
|
const Icon = getIcon3(variant);
|
15043
15082
|
const { t: t2 } = useTranslation();
|
15044
|
-
return /* @__PURE__ */
|
15083
|
+
return /* @__PURE__ */ React69__default.createElement(
|
15045
15084
|
Icon,
|
15046
15085
|
{
|
15047
15086
|
flexShrink: 0,
|
@@ -15091,7 +15130,7 @@ var ActionToast = ({
|
|
15091
15130
|
buttonText,
|
15092
15131
|
id
|
15093
15132
|
}) => {
|
15094
|
-
return /* @__PURE__ */
|
15133
|
+
return /* @__PURE__ */ React69__default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React69__default.createElement(Box, { marginRight: 2, flexGrow: "1" }, children), /* @__PURE__ */ React69__default.createElement(Button, { variant: "additional", size: "sm", onClick }, buttonText));
|
15095
15134
|
};
|
15096
15135
|
var ClosableToast = ({
|
15097
15136
|
children,
|
@@ -15101,13 +15140,13 @@ var ClosableToast = ({
|
|
15101
15140
|
}) => {
|
15102
15141
|
const styles3 = useMultiStyleConfig("Toast", { variant });
|
15103
15142
|
const { t: t2 } = useTranslation();
|
15104
|
-
return /* @__PURE__ */
|
15143
|
+
return /* @__PURE__ */ React69__default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React69__default.createElement(Box, { flexGrow: "1" }, children), /* @__PURE__ */ React69__default.createElement(
|
15105
15144
|
IconButton,
|
15106
15145
|
{
|
15107
15146
|
sx: styles3.dismissButton,
|
15108
15147
|
variant: "ghost",
|
15109
15148
|
"aria-label": t2(texts23.dismiss),
|
15110
|
-
icon: /* @__PURE__ */
|
15149
|
+
icon: /* @__PURE__ */ React69__default.createElement(CloseFill18Icon, null),
|
15111
15150
|
onClick: onClose
|
15112
15151
|
}
|
15113
15152
|
));
|
@@ -15135,7 +15174,7 @@ var useToast = () => {
|
|
15135
15174
|
};
|
15136
15175
|
var getToastComponent = (opts) => {
|
15137
15176
|
if ("isClosable" in opts && opts.isClosable) {
|
15138
|
-
return ({ onClose, id }) => /* @__PURE__ */
|
15177
|
+
return ({ onClose, id }) => /* @__PURE__ */ React69__default.createElement(
|
15139
15178
|
ClosableToast,
|
15140
15179
|
{
|
15141
15180
|
id,
|
@@ -15151,7 +15190,7 @@ var getToastComponent = (opts) => {
|
|
15151
15190
|
);
|
15152
15191
|
}
|
15153
15192
|
if ("buttonText" in opts) {
|
15154
|
-
return ({ id }) => /* @__PURE__ */
|
15193
|
+
return ({ id }) => /* @__PURE__ */ React69__default.createElement(
|
15155
15194
|
ActionToast,
|
15156
15195
|
{
|
15157
15196
|
id,
|
@@ -15162,7 +15201,7 @@ var getToastComponent = (opts) => {
|
|
15162
15201
|
opts.text
|
15163
15202
|
);
|
15164
15203
|
}
|
15165
|
-
return ({ id }) => /* @__PURE__ */
|
15204
|
+
return ({ id }) => /* @__PURE__ */ React69__default.createElement(BaseToast, { id, variant: opts.variant }, opts.text);
|
15166
15205
|
};
|
15167
15206
|
|
15168
15207
|
export { Accordion, AttachedInputs, Badge, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, ColorInlineLoader, ColorSpinner, Combobox, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerContent, Expandable, ExpandableAlert, ExpandableItem, FloatingActionButton, FormControl, FormErrorMessage, FormLabel3 as FormLabel, Heading, IconButton, InfoSelect, InfoTag, Input, InputLeftElement2 as InputLeftElement, InputRightElement2 as InputRightElement, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, ListBox, ModalHeader, NativeSelect, NumericStepper, PasswordInput, PhoneNumberInput, PlayPauseButton, PopoverWizardBody, ProgressBar, ProgressLoader, Radio, RadioGroup, SearchInput, SimpleDrawer, SimplePopover, Skeleton, SkeletonCircle, SkeletonText, SkipButton, SporProvider, Stack, StaticAlert, Stepper, StepperStep, Switch, Table, Tabs, Text4 as Text, TextLink, Textarea, TimePicker, TravelTag, VyLogo, WizardPopover, createTexts, fontFaces, theme, useToast, useTranslation };
|