@vygruppen/spor-react 2.3.1 → 2.3.4
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 +9 -9
- package/CHANGELOG.md +20 -0
- package/dist/{CountryCodeSelect-ZOSDJ6DE.mjs → CountryCodeSelect-WGG2Z3VI.mjs} +1 -1
- package/dist/{chunk-DSLSJDMJ.mjs → chunk-QXVLVC2K.mjs} +293 -273
- package/dist/index.d.ts +71 -12
- package/dist/index.js +399 -377
- package/dist/index.mjs +1 -1
- package/package.json +6 -7
- package/src/i18n/index.tsx +100 -9
- package/src/input/NumericStepper.tsx +5 -2
- package/src/input/PhoneNumberInput.tsx +1 -1
- package/src/provider/SporProvider.tsx +1 -1
@@ -3,10 +3,9 @@ export { AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box, Cen
|
|
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 React49 from 'react';
|
7
|
+
import React49__default, { createContext, useRef, useState, useEffect, useId, Suspense, useCallback, useContext, useMemo } from 'react';
|
8
8
|
import { CloseFill30Icon, CloseFill24Icon, CloseFill18Icon, CloseOutline24Icon, SearchOutline24Icon, InformationFill24Icon, InformationFill18Icon, WarningFill24Icon, WarningFill18Icon, ErrorFill24Icon, ErrorFill18Icon, LinkOutOutline24Icon, CalendarOutline24Icon, DropdownLeftFill24Icon, DropdownRightFill24Icon, DropdownDownFill18Icon, DropdownDownFill24Icon, DropdownUpFill24Icon, ArrowRightFill18Icon, DropdownRightFill18Icon, ErrorOutline24Icon, AltTransportOutline24Icon, WarningOutline24Icon, SuccessOutline24Icon, InformationOutline24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, 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
|
-
import { initLobot } from '@leile/lobo-t';
|
10
9
|
import { inlineLoaderColorData, spinnerColorData, contentLoaderData, fullScreenLoaderWhiteData, inlineLoaderDarkData, spinnerDarkData, fullScreenLoaderBlackData, inlineLoaderLightData, spinnerLightData } from '@vygruppen/spor-loader';
|
11
10
|
import { useLottie } from 'lottie-react';
|
12
11
|
import { useOverlayTrigger, useButton, useListBox, useOption, useProgressBar, useDatePicker, I18nProvider, useDateRangePicker, useDialog, usePopover, Overlay, DismissButton, useSelect, HiddenSelect, useCalendar, useDateField, useRangeCalendar, useTimeField, useCalendarGrid, useDateSegment, useCalendarCell } from 'react-aria';
|
@@ -770,15 +769,15 @@ var require_lodash = __commonJS({
|
|
770
769
|
module.exports = mergeWith5;
|
771
770
|
}
|
772
771
|
});
|
773
|
-
var AccordionContext =
|
772
|
+
var AccordionContext = React49__default.createContext(null);
|
774
773
|
var AccordionProvider = ({
|
775
774
|
size: size2,
|
776
775
|
...props
|
777
776
|
}) => {
|
778
|
-
return /* @__PURE__ */
|
777
|
+
return /* @__PURE__ */ React49__default.createElement(AccordionContext.Provider, { value: { size: size2 }, ...props });
|
779
778
|
};
|
780
779
|
var useAccordionContext = () => {
|
781
|
-
const context =
|
780
|
+
const context = React49__default.useContext(AccordionContext);
|
782
781
|
if (context === null) {
|
783
782
|
throw new Error(
|
784
783
|
"useAccordionContext must be used within AccordionProvider"
|
@@ -788,7 +787,7 @@ var useAccordionContext = () => {
|
|
788
787
|
};
|
789
788
|
var Accordion = forwardRef((props, ref) => {
|
790
789
|
const defaultIndex = typeof props.defaultIndex === "number" && props.allowMultiple ? [props.defaultIndex] : props.defaultIndex;
|
791
|
-
return /* @__PURE__ */
|
790
|
+
return /* @__PURE__ */ React49__default.createElement(AccordionProvider, { size: props.size }, /* @__PURE__ */ React49__default.createElement(
|
792
791
|
Accordion$1,
|
793
792
|
{
|
794
793
|
...props,
|
@@ -805,7 +804,7 @@ var Expandable = ({
|
|
805
804
|
size: size2 = "md",
|
806
805
|
...rest
|
807
806
|
}) => {
|
808
|
-
return /* @__PURE__ */
|
807
|
+
return /* @__PURE__ */ React49__default.createElement(Accordion, { ...rest, size: size2 }, /* @__PURE__ */ React49__default.createElement(
|
809
808
|
ExpandableItem,
|
810
809
|
{
|
811
810
|
headingLevel,
|
@@ -824,7 +823,7 @@ var ExpandableItem = ({
|
|
824
823
|
}) => {
|
825
824
|
const { size: size2 } = useAccordionContext();
|
826
825
|
warnAboutMismatchingIcon({ icon: leftIcon, size: size2 });
|
827
|
-
return /* @__PURE__ */
|
826
|
+
return /* @__PURE__ */ React49__default.createElement(AccordionItem, { ...rest }, /* @__PURE__ */ React49__default.createElement(Box, { as: headingLevel }, /* @__PURE__ */ React49__default.createElement(AccordionButton, null, /* @__PURE__ */ React49__default.createElement(Flex, { alignItems: "center" }, leftIcon && /* @__PURE__ */ React49__default.createElement(Box, { mr: 2 }, leftIcon), title), /* @__PURE__ */ React49__default.createElement(AccordionIcon, null))), /* @__PURE__ */ React49__default.createElement(AccordionPanel, null, children));
|
828
827
|
};
|
829
828
|
var warnAboutMismatchingIcon = ({ icon, size: size2 }) => {
|
830
829
|
var _a6, _b5;
|
@@ -868,9 +867,27 @@ var Language = /* @__PURE__ */ ((Language3) => {
|
|
868
867
|
Language3["English"] = "en";
|
869
868
|
return Language3;
|
870
869
|
})(Language || {});
|
871
|
-
var
|
872
|
-
|
873
|
-
|
870
|
+
var LanguageContext = createContext(void 0);
|
871
|
+
function LanguageProvider({
|
872
|
+
language,
|
873
|
+
children
|
874
|
+
}) {
|
875
|
+
return /* @__PURE__ */ React49__default.createElement(LanguageContext.Provider, { value: language }, children);
|
876
|
+
}
|
877
|
+
function useLanguage() {
|
878
|
+
const language = useContext(LanguageContext);
|
879
|
+
if (!language) {
|
880
|
+
throw new Error("Please wrap your application in a LanguageProvider");
|
881
|
+
}
|
882
|
+
return language;
|
883
|
+
}
|
884
|
+
function useTranslation() {
|
885
|
+
const language = useLanguage();
|
886
|
+
const t2 = (text) => {
|
887
|
+
return text[language];
|
888
|
+
};
|
889
|
+
return { t: t2, language };
|
890
|
+
}
|
874
891
|
function createTexts(texts23) {
|
875
892
|
return texts23;
|
876
893
|
}
|
@@ -887,11 +904,11 @@ function useHydrated() {
|
|
887
904
|
// src/loader/ClientOnly.tsx
|
888
905
|
var ClientOnly = ({ children, fallback = null }) => {
|
889
906
|
const isHydrated = useHydrated();
|
890
|
-
return /* @__PURE__ */
|
907
|
+
return /* @__PURE__ */ React49__default.createElement(React49__default.Fragment, null, isHydrated ? children() : fallback);
|
891
908
|
};
|
892
909
|
function Lottie({ animationData }) {
|
893
910
|
const { View } = useLottie({ animationData, loop: true });
|
894
|
-
return /* @__PURE__ */
|
911
|
+
return /* @__PURE__ */ React49__default.createElement(React49__default.Fragment, null, View);
|
895
912
|
}
|
896
913
|
|
897
914
|
// src/loader/ColorInlineLoader.tsx
|
@@ -900,7 +917,7 @@ var ColorInlineLoader = ({
|
|
900
917
|
maxWidth,
|
901
918
|
...props
|
902
919
|
}) => {
|
903
|
-
return /* @__PURE__ */
|
920
|
+
return /* @__PURE__ */ React49__default.createElement(Center, { ...props }, /* @__PURE__ */ React49__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React49__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React49__default.createElement(Lottie, { animationData: inlineLoaderColorData }))));
|
904
921
|
};
|
905
922
|
var ColorSpinner = ({
|
906
923
|
children,
|
@@ -908,24 +925,24 @@ var ColorSpinner = ({
|
|
908
925
|
maxWidth,
|
909
926
|
...props
|
910
927
|
}) => {
|
911
|
-
return /* @__PURE__ */
|
928
|
+
return /* @__PURE__ */ React49__default.createElement(Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React49__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React49__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React49__default.createElement(Lottie, { animationData: spinnerColorData }))), children && /* @__PURE__ */ React49__default.createElement(Box, { mt: 3, fontWeight: "bold" }, children));
|
912
929
|
};
|
913
930
|
var ContentLoader = ({ children, ...props }) => {
|
914
|
-
return /* @__PURE__ */
|
931
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...props }, /* @__PURE__ */ React49__default.createElement(Box, { maxWidth: "140px", mx: "auto" }, /* @__PURE__ */ React49__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React49__default.createElement(Lottie, { animationData: contentLoaderData }))), children && /* @__PURE__ */ React49__default.createElement(Box, { textAlign: "center", fontWeight: "bold" }, children));
|
915
932
|
};
|
916
933
|
var DarkFullScreenLoader = ({
|
917
934
|
width,
|
918
935
|
maxWidth,
|
919
936
|
...props
|
920
937
|
}) => {
|
921
|
-
return /* @__PURE__ */
|
938
|
+
return /* @__PURE__ */ React49__default.createElement(Center, { height: "100%", background: "darkTeal", ...props }, /* @__PURE__ */ React49__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React49__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React49__default.createElement(Lottie, { animationData: fullScreenLoaderWhiteData }))));
|
922
939
|
};
|
923
940
|
var DarkInlineLoader = ({
|
924
941
|
width,
|
925
942
|
maxWidth,
|
926
943
|
...props
|
927
944
|
}) => {
|
928
|
-
return /* @__PURE__ */
|
945
|
+
return /* @__PURE__ */ React49__default.createElement(Center, { ...props }, /* @__PURE__ */ React49__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React49__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React49__default.createElement(Lottie, { animationData: inlineLoaderDarkData }))));
|
929
946
|
};
|
930
947
|
var DarkSpinner = ({
|
931
948
|
children,
|
@@ -933,21 +950,21 @@ var DarkSpinner = ({
|
|
933
950
|
maxWidth,
|
934
951
|
...props
|
935
952
|
}) => {
|
936
|
-
return /* @__PURE__ */
|
953
|
+
return /* @__PURE__ */ React49__default.createElement(Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React49__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React49__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React49__default.createElement(Lottie, { animationData: spinnerDarkData }))), children && /* @__PURE__ */ React49__default.createElement(Box, { mt: 3, fontWeight: "bold" }, children));
|
937
954
|
};
|
938
955
|
var LightFullScreenLoader = ({
|
939
956
|
width,
|
940
957
|
maxWidth,
|
941
958
|
...props
|
942
959
|
}) => {
|
943
|
-
return /* @__PURE__ */
|
960
|
+
return /* @__PURE__ */ React49__default.createElement(Center, { height: "100%", background: "white", ...props }, /* @__PURE__ */ React49__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React49__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React49__default.createElement(Lottie, { animationData: fullScreenLoaderBlackData }))));
|
944
961
|
};
|
945
962
|
var LightInlineLoader = ({
|
946
963
|
width,
|
947
964
|
maxWidth,
|
948
965
|
...props
|
949
966
|
}) => {
|
950
|
-
return /* @__PURE__ */
|
967
|
+
return /* @__PURE__ */ React49__default.createElement(Center, { ...props }, /* @__PURE__ */ React49__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React49__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React49__default.createElement(Lottie, { animationData: inlineLoaderLightData }))));
|
951
968
|
};
|
952
969
|
var LightSpinner = ({
|
953
970
|
children,
|
@@ -955,7 +972,7 @@ var LightSpinner = ({
|
|
955
972
|
maxWidth,
|
956
973
|
...props
|
957
974
|
}) => {
|
958
|
-
return /* @__PURE__ */
|
975
|
+
return /* @__PURE__ */ React49__default.createElement(Center, { flexDirection: "column", ...props }, /* @__PURE__ */ React49__default.createElement(Box, { width, maxWidth }, /* @__PURE__ */ React49__default.createElement(ClientOnly, null, () => /* @__PURE__ */ React49__default.createElement(Lottie, { animationData: spinnerLightData }))), children && /* @__PURE__ */ React49__default.createElement(Box, { mt: 3, fontWeight: "bold" }, children));
|
959
976
|
};
|
960
977
|
var useRotatingLabel = ({ label, delay }) => {
|
961
978
|
const loadingTextArray = useMemo(
|
@@ -991,7 +1008,7 @@ var ProgressBar = ({
|
|
991
1008
|
value,
|
992
1009
|
"aria-label": ariaLabel || t2(texts.label(value))
|
993
1010
|
});
|
994
|
-
return /* @__PURE__ */
|
1011
|
+
return /* @__PURE__ */ React49__default.createElement(React49__default.Fragment, null, /* @__PURE__ */ React49__default.createElement(
|
995
1012
|
Box,
|
996
1013
|
{
|
997
1014
|
...progressBarProps,
|
@@ -999,7 +1016,7 @@ var ProgressBar = ({
|
|
999
1016
|
minWidth: "100px",
|
1000
1017
|
...rest
|
1001
1018
|
},
|
1002
|
-
/* @__PURE__ */
|
1019
|
+
/* @__PURE__ */ React49__default.createElement(
|
1003
1020
|
Flex,
|
1004
1021
|
{
|
1005
1022
|
backgroundColor: "coralGreen",
|
@@ -1008,7 +1025,7 @@ var ProgressBar = ({
|
|
1008
1025
|
justifyContent: "flex-start",
|
1009
1026
|
marginX: "auto"
|
1010
1027
|
},
|
1011
|
-
/* @__PURE__ */
|
1028
|
+
/* @__PURE__ */ React49__default.createElement(
|
1012
1029
|
Box,
|
1013
1030
|
{
|
1014
1031
|
backgroundColor: "greenHaze",
|
@@ -1020,7 +1037,7 @@ var ProgressBar = ({
|
|
1020
1037
|
}
|
1021
1038
|
)
|
1022
1039
|
),
|
1023
|
-
currentLoadingText && /* @__PURE__ */
|
1040
|
+
currentLoadingText && /* @__PURE__ */ React49__default.createElement(
|
1024
1041
|
Text,
|
1025
1042
|
{
|
1026
1043
|
textAlign: "center",
|
@@ -1063,7 +1080,7 @@ var ProgressLoader = ({
|
|
1063
1080
|
const progressPathLength = ((_a6 = pathRef.current) == null ? void 0 : _a6.getTotalLength()) ?? 0;
|
1064
1081
|
const progress = (value - 100) / 100 * progressPathLength;
|
1065
1082
|
const id = useId();
|
1066
|
-
return /* @__PURE__ */
|
1083
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...progressBarProps, minWidth: "100px", width, ...rest }, /* @__PURE__ */ React49__default.createElement(Box, { as: "svg", viewBox: "0 0 246 78", fill: "none" }, /* @__PURE__ */ React49__default.createElement(
|
1067
1084
|
Box,
|
1068
1085
|
{
|
1069
1086
|
as: "path",
|
@@ -1071,7 +1088,7 @@ var ProgressLoader = ({
|
|
1071
1088
|
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",
|
1072
1089
|
fill: "#FFB466"
|
1073
1090
|
}
|
1074
|
-
), /* @__PURE__ */
|
1091
|
+
), /* @__PURE__ */ React49__default.createElement(
|
1075
1092
|
Box,
|
1076
1093
|
{
|
1077
1094
|
as: "path",
|
@@ -1082,7 +1099,7 @@ var ProgressLoader = ({
|
|
1082
1099
|
strokeLinecap: "round",
|
1083
1100
|
strokeLinejoin: "round"
|
1084
1101
|
}
|
1085
|
-
), /* @__PURE__ */
|
1102
|
+
), /* @__PURE__ */ React49__default.createElement(
|
1086
1103
|
Box,
|
1087
1104
|
{
|
1088
1105
|
as: "path",
|
@@ -1097,7 +1114,7 @@ var ProgressLoader = ({
|
|
1097
1114
|
transition: "stroke-dashoffset .2s ease-out",
|
1098
1115
|
ref: pathRef
|
1099
1116
|
}
|
1100
|
-
), /* @__PURE__ */
|
1117
|
+
), /* @__PURE__ */ React49__default.createElement(
|
1101
1118
|
Box,
|
1102
1119
|
{
|
1103
1120
|
as: "path",
|
@@ -1105,7 +1122,7 @@ var ProgressLoader = ({
|
|
1105
1122
|
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",
|
1106
1123
|
fill: "#688CBA"
|
1107
1124
|
}
|
1108
|
-
)), currentLoadingText && /* @__PURE__ */
|
1125
|
+
)), currentLoadingText && /* @__PURE__ */ React49__default.createElement(
|
1109
1126
|
Text,
|
1110
1127
|
{
|
1111
1128
|
textAlign: "center",
|
@@ -1124,9 +1141,9 @@ var texts2 = createTexts({
|
|
1124
1141
|
en: `${value}% done`
|
1125
1142
|
})
|
1126
1143
|
});
|
1127
|
-
var Skeleton = forwardRef((props, ref) => /* @__PURE__ */
|
1128
|
-
var SkeletonCircle = (props) => /* @__PURE__ */
|
1129
|
-
var SkeletonText = (props) => /* @__PURE__ */
|
1144
|
+
var Skeleton = forwardRef((props, ref) => /* @__PURE__ */ React49__default.createElement(Skeleton$1, { ...props, ref }));
|
1145
|
+
var SkeletonCircle = (props) => /* @__PURE__ */ React49__default.createElement(SkeletonCircle$1, { boxSize: 6, borderRadius: "50%", ...props });
|
1146
|
+
var SkeletonText = (props) => /* @__PURE__ */ React49__default.createElement(SkeletonText$1, { boxSize: 6, ...props });
|
1130
1147
|
|
1131
1148
|
// src/button/Button.tsx
|
1132
1149
|
var Button = forwardRef((props, ref) => {
|
@@ -1143,7 +1160,7 @@ var Button = forwardRef((props, ref) => {
|
|
1143
1160
|
const buttonGroup = useButtonGroup();
|
1144
1161
|
const finalVariant = variant ?? (buttonGroup == null ? void 0 : buttonGroup.variant) ?? "primary";
|
1145
1162
|
const finalSize = size2 ?? (buttonGroup == null ? void 0 : buttonGroup.size) ?? "md";
|
1146
|
-
return /* @__PURE__ */
|
1163
|
+
return /* @__PURE__ */ React49__default.createElement(
|
1147
1164
|
Button$1,
|
1148
1165
|
{
|
1149
1166
|
size: finalSize,
|
@@ -1153,11 +1170,11 @@ var Button = forwardRef((props, ref) => {
|
|
1153
1170
|
"aria-label": ariaLabel,
|
1154
1171
|
"aria-busy": isLoading,
|
1155
1172
|
isDisabled: isDisabled || isLoading,
|
1156
|
-
leftIcon: isLoading && leftIcon ? /* @__PURE__ */
|
1157
|
-
rightIcon: isLoading && rightIcon ? /* @__PURE__ */
|
1173
|
+
leftIcon: isLoading && leftIcon ? /* @__PURE__ */ React49__default.createElement(Box, { visibility: isLoading ? "hidden" : "visible", "aria-hidden": "true" }, leftIcon) : leftIcon,
|
1174
|
+
rightIcon: isLoading && rightIcon ? /* @__PURE__ */ React49__default.createElement(Box, { visibility: isLoading ? "hidden" : "visible", "aria-hidden": "true" }, rightIcon) : rightIcon,
|
1158
1175
|
position: "relative"
|
1159
1176
|
},
|
1160
|
-
isLoading && /* @__PURE__ */
|
1177
|
+
isLoading && /* @__PURE__ */ React49__default.createElement(
|
1161
1178
|
Center,
|
1162
1179
|
{
|
1163
1180
|
position: "absolute",
|
@@ -1166,7 +1183,7 @@ var Button = forwardRef((props, ref) => {
|
|
1166
1183
|
left: "0",
|
1167
1184
|
paddingTop: 2
|
1168
1185
|
},
|
1169
|
-
/* @__PURE__ */
|
1186
|
+
/* @__PURE__ */ React49__default.createElement(
|
1170
1187
|
ColorInlineLoader,
|
1171
1188
|
{
|
1172
1189
|
maxWidth: getLoaderWidth(finalSize),
|
@@ -1175,7 +1192,7 @@ var Button = forwardRef((props, ref) => {
|
|
1175
1192
|
}
|
1176
1193
|
)
|
1177
1194
|
),
|
1178
|
-
/* @__PURE__ */
|
1195
|
+
/* @__PURE__ */ React49__default.createElement(Box, { visibility: isLoading ? "hidden" : "visible" }, children)
|
1179
1196
|
);
|
1180
1197
|
});
|
1181
1198
|
function getLoaderWidth(size2) {
|
@@ -1206,14 +1223,14 @@ var texts3 = createTexts({
|
|
1206
1223
|
sv: "Laddar\u2026"
|
1207
1224
|
}
|
1208
1225
|
});
|
1209
|
-
var ButtonGroup = forwardRef((props, ref) => /* @__PURE__ */
|
1226
|
+
var ButtonGroup = forwardRef((props, ref) => /* @__PURE__ */ React49__default.createElement(ButtonGroup$1, { ...props, ref }));
|
1210
1227
|
var IconButton = forwardRef(
|
1211
|
-
({ ...props }, ref) => /* @__PURE__ */
|
1228
|
+
({ ...props }, ref) => /* @__PURE__ */ React49__default.createElement(
|
1212
1229
|
IconButton$1,
|
1213
1230
|
{
|
1214
1231
|
title: props["aria-label"],
|
1215
1232
|
...props,
|
1216
|
-
spinner: /* @__PURE__ */
|
1233
|
+
spinner: /* @__PURE__ */ React49__default.createElement(ColorSpinner, { m: 1 }),
|
1217
1234
|
ref
|
1218
1235
|
}
|
1219
1236
|
)
|
@@ -1223,7 +1240,7 @@ var IconButton = forwardRef(
|
|
1223
1240
|
var CloseButton = forwardRef(
|
1224
1241
|
({ size: size2 = "sm", ...props }, ref) => {
|
1225
1242
|
const { t: t2 } = useTranslation();
|
1226
|
-
return /* @__PURE__ */
|
1243
|
+
return /* @__PURE__ */ React49__default.createElement(
|
1227
1244
|
IconButton,
|
1228
1245
|
{
|
1229
1246
|
ref,
|
@@ -1240,11 +1257,11 @@ var getIcon = (size2) => {
|
|
1240
1257
|
switch (size2) {
|
1241
1258
|
case "xs":
|
1242
1259
|
case "sm":
|
1243
|
-
return /* @__PURE__ */
|
1260
|
+
return /* @__PURE__ */ React49__default.createElement(CloseFill18Icon, null);
|
1244
1261
|
case "md":
|
1245
|
-
return /* @__PURE__ */
|
1262
|
+
return /* @__PURE__ */ React49__default.createElement(CloseFill24Icon, null);
|
1246
1263
|
case "lg":
|
1247
|
-
return /* @__PURE__ */
|
1264
|
+
return /* @__PURE__ */ React49__default.createElement(CloseFill30Icon, null);
|
1248
1265
|
}
|
1249
1266
|
};
|
1250
1267
|
var texts4 = createTexts({
|
@@ -1264,11 +1281,11 @@ var FloatingActionButton = ({
|
|
1264
1281
|
placement = "bottom right",
|
1265
1282
|
...props
|
1266
1283
|
}) => {
|
1267
|
-
const [isTextVisible, setIsTextVisible] =
|
1284
|
+
const [isTextVisible, setIsTextVisible] = React49__default.useState(
|
1268
1285
|
externalIsTextVisible !== void 0 ? externalIsTextVisible : true
|
1269
1286
|
);
|
1270
1287
|
const scrollDirection = useScrollDirection();
|
1271
|
-
|
1288
|
+
React49__default.useEffect(() => {
|
1272
1289
|
if (externalIsTextVisible !== void 0) {
|
1273
1290
|
return;
|
1274
1291
|
}
|
@@ -1278,7 +1295,7 @@ var FloatingActionButton = ({
|
|
1278
1295
|
);
|
1279
1296
|
return () => window.clearTimeout(id);
|
1280
1297
|
}, [scrollDirection, externalIsTextVisible]);
|
1281
|
-
|
1298
|
+
React49__default.useEffect(() => {
|
1282
1299
|
setIsTextVisible(!!externalIsTextVisible);
|
1283
1300
|
}, [externalIsTextVisible]);
|
1284
1301
|
const style = useMultiStyleConfig("FloatingActionButton", {
|
@@ -1286,7 +1303,7 @@ var FloatingActionButton = ({
|
|
1286
1303
|
isTextVisible,
|
1287
1304
|
placement
|
1288
1305
|
});
|
1289
|
-
return /* @__PURE__ */
|
1306
|
+
return /* @__PURE__ */ React49__default.createElement(
|
1290
1307
|
MotionBox,
|
1291
1308
|
{
|
1292
1309
|
__css: style.container,
|
@@ -1294,8 +1311,8 @@ var FloatingActionButton = ({
|
|
1294
1311
|
"aria-label": children,
|
1295
1312
|
...props
|
1296
1313
|
},
|
1297
|
-
/* @__PURE__ */
|
1298
|
-
/* @__PURE__ */
|
1314
|
+
/* @__PURE__ */ React49__default.createElement(Box, { __css: style.icon }, icon),
|
1315
|
+
/* @__PURE__ */ React49__default.createElement(
|
1299
1316
|
MotionBox,
|
1300
1317
|
{
|
1301
1318
|
animate: isTextVisible ? "show" : "hide",
|
@@ -1319,9 +1336,9 @@ var FloatingActionButton = ({
|
|
1319
1336
|
);
|
1320
1337
|
};
|
1321
1338
|
var useScrollDirection = () => {
|
1322
|
-
const [scrollDirection, setScrollDirection] =
|
1323
|
-
const lastScrollPosition =
|
1324
|
-
|
1339
|
+
const [scrollDirection, setScrollDirection] = React49__default.useState(null);
|
1340
|
+
const lastScrollPosition = React49__default.useRef(window.scrollY);
|
1341
|
+
React49__default.useEffect(() => {
|
1325
1342
|
const onScroll = () => {
|
1326
1343
|
const delta = window.scrollY - lastScrollPosition.current;
|
1327
1344
|
if (delta === 0) {
|
@@ -1340,7 +1357,7 @@ var useScrollDirection = () => {
|
|
1340
1357
|
var AlertIcon = ({ variant }) => {
|
1341
1358
|
const Icon = getIcon2(variant);
|
1342
1359
|
const { t: t2 } = useTranslation();
|
1343
|
-
return /* @__PURE__ */
|
1360
|
+
return /* @__PURE__ */ React49__default.createElement(
|
1344
1361
|
Icon,
|
1345
1362
|
{
|
1346
1363
|
flexShrink: 0,
|
@@ -1398,7 +1415,7 @@ var texts5 = createTexts({
|
|
1398
1415
|
});
|
1399
1416
|
var BaseAlert = ({ variant, children, ...boxProps }) => {
|
1400
1417
|
const styles2 = useMultiStyleConfig("Alert", { variant });
|
1401
|
-
return /* @__PURE__ */
|
1418
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { sx: styles2.container, ...boxProps }, children);
|
1402
1419
|
};
|
1403
1420
|
|
1404
1421
|
// src/alert/ClosableAlert.tsx
|
@@ -1418,17 +1435,17 @@ var ClosableAlert = ({
|
|
1418
1435
|
externalOnClose();
|
1419
1436
|
onClose();
|
1420
1437
|
};
|
1421
|
-
return /* @__PURE__ */
|
1438
|
+
return /* @__PURE__ */ React49__default.createElement(BaseAlert, { variant }, /* @__PURE__ */ React49__default.createElement(
|
1422
1439
|
IconButton,
|
1423
1440
|
{
|
1424
1441
|
variant: "ghost",
|
1425
1442
|
size: "sm",
|
1426
1443
|
onClick: handleClose,
|
1427
|
-
icon: /* @__PURE__ */
|
1444
|
+
icon: /* @__PURE__ */ React49__default.createElement(CloseFill18Icon, null),
|
1428
1445
|
"aria-label": t2(texts6.close),
|
1429
1446
|
sx: styles2.closeButton
|
1430
1447
|
}
|
1431
|
-
), /* @__PURE__ */
|
1448
|
+
), /* @__PURE__ */ React49__default.createElement(AlertIcon, { variant }), children);
|
1432
1449
|
};
|
1433
1450
|
var texts6 = createTexts({
|
1434
1451
|
close: {
|
@@ -1447,7 +1464,7 @@ var ExpandableAlert = ({
|
|
1447
1464
|
onToggle = () => {
|
1448
1465
|
}
|
1449
1466
|
}) => {
|
1450
|
-
return /* @__PURE__ */
|
1467
|
+
return /* @__PURE__ */ React49__default.createElement(BaseAlert, { variant, paddingX: 0, paddingY: 0, padding: 0 }, /* @__PURE__ */ React49__default.createElement(
|
1451
1468
|
Accordion$1,
|
1452
1469
|
{
|
1453
1470
|
onChange: (expandedIndex) => onToggle(expandedIndex === 0),
|
@@ -1455,14 +1472,14 @@ var ExpandableAlert = ({
|
|
1455
1472
|
allowToggle: true,
|
1456
1473
|
flexGrow: "1"
|
1457
1474
|
},
|
1458
|
-
/* @__PURE__ */
|
1475
|
+
/* @__PURE__ */ React49__default.createElement(AccordionItem, null, /* @__PURE__ */ React49__default.createElement(AccordionButton, { paddingX: 3, paddingY: 2 }, /* @__PURE__ */ React49__default.createElement(
|
1459
1476
|
Flex,
|
1460
1477
|
{
|
1461
1478
|
justifyContent: "space-between",
|
1462
1479
|
alignItems: "center",
|
1463
1480
|
flexGrow: "1"
|
1464
1481
|
},
|
1465
|
-
/* @__PURE__ */
|
1482
|
+
/* @__PURE__ */ React49__default.createElement(Flex, { as: headingLevel }, /* @__PURE__ */ React49__default.createElement(AlertIcon, { variant }), /* @__PURE__ */ React49__default.createElement(
|
1466
1483
|
Box,
|
1467
1484
|
{
|
1468
1485
|
as: "span",
|
@@ -1476,15 +1493,15 @@ var ExpandableAlert = ({
|
|
1476
1493
|
},
|
1477
1494
|
title
|
1478
1495
|
)),
|
1479
|
-
/* @__PURE__ */
|
1480
|
-
)), /* @__PURE__ */
|
1496
|
+
/* @__PURE__ */ React49__default.createElement(AccordionIcon, null)
|
1497
|
+
)), /* @__PURE__ */ React49__default.createElement(AccordionPanel, null, children))
|
1481
1498
|
));
|
1482
1499
|
};
|
1483
1500
|
var StaticAlert = ({ children, ...props }) => {
|
1484
|
-
return /* @__PURE__ */
|
1501
|
+
return /* @__PURE__ */ React49__default.createElement(BaseAlert, { ...props }, /* @__PURE__ */ React49__default.createElement(AlertIcon, { variant: props.variant }), children);
|
1485
1502
|
};
|
1486
1503
|
var Divider = forwardRef((props, ref) => {
|
1487
|
-
return /* @__PURE__ */
|
1504
|
+
return /* @__PURE__ */ React49__default.createElement(
|
1488
1505
|
Box,
|
1489
1506
|
{
|
1490
1507
|
as: "hr",
|
@@ -1500,7 +1517,7 @@ var Divider = forwardRef((props, ref) => {
|
|
1500
1517
|
});
|
1501
1518
|
var Stack = forwardRef(
|
1502
1519
|
({ flexDirection, ...props }, ref) => {
|
1503
|
-
return /* @__PURE__ */
|
1520
|
+
return /* @__PURE__ */ React49__default.createElement(Stack$1, { ...props, direction: flexDirection, ref });
|
1504
1521
|
}
|
1505
1522
|
);
|
1506
1523
|
|
@@ -1511,7 +1528,7 @@ var Card = forwardRef(
|
|
1511
1528
|
colorScheme,
|
1512
1529
|
size: size2
|
1513
1530
|
});
|
1514
|
-
return /* @__PURE__ */
|
1531
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { __css: styles2, ...props, ref }, children);
|
1515
1532
|
}
|
1516
1533
|
);
|
1517
1534
|
function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
@@ -3195,7 +3212,7 @@ function $9a36b6ba2fb1a7c5$var$nextUnavailableDate(anchorDate, state2, dir) {
|
|
3195
3212
|
}
|
3196
3213
|
var Badge = forwardRef(
|
3197
3214
|
({ icon, colorScheme = "grey", children, ...props }, ref) => {
|
3198
|
-
return /* @__PURE__ */
|
3215
|
+
return /* @__PURE__ */ React49__default.createElement(
|
3199
3216
|
Badge$1,
|
3200
3217
|
{
|
3201
3218
|
colorScheme,
|
@@ -3203,22 +3220,22 @@ var Badge = forwardRef(
|
|
3203
3220
|
paddingLeft: icon ? 1 : void 0,
|
3204
3221
|
ref
|
3205
3222
|
},
|
3206
|
-
icon &&
|
3223
|
+
icon && React49__default.cloneElement(icon, { marginRight: 1 }),
|
3207
3224
|
children
|
3208
3225
|
);
|
3209
3226
|
}
|
3210
3227
|
);
|
3211
|
-
var Code = forwardRef((props, ref) => /* @__PURE__ */
|
3228
|
+
var Code = forwardRef((props, ref) => /* @__PURE__ */ React49__default.createElement(Code$1, { ...props, ref }));
|
3212
3229
|
var Heading = ({
|
3213
3230
|
variant = "xl-display",
|
3214
3231
|
as = "h2",
|
3215
3232
|
...props
|
3216
3233
|
}) => {
|
3217
|
-
return /* @__PURE__ */
|
3234
|
+
return /* @__PURE__ */ React49__default.createElement(Text, { as, textStyle: variant, ...props });
|
3218
3235
|
};
|
3219
3236
|
var Text4 = forwardRef(
|
3220
3237
|
({ variant = "sm", ...props }, ref) => {
|
3221
|
-
return /* @__PURE__ */
|
3238
|
+
return /* @__PURE__ */ React49__default.createElement(Text, { ...props, textStyle: variant, ref });
|
3222
3239
|
}
|
3223
3240
|
);
|
3224
3241
|
function CalendarCell({ state: state2, date, currentMonth }) {
|
@@ -3239,7 +3256,7 @@ function CalendarCell({ state: state2, date, currentMonth }) {
|
|
3239
3256
|
if (isOutsideMonth) {
|
3240
3257
|
stateProps["data-unavailable"] = true;
|
3241
3258
|
}
|
3242
|
-
return /* @__PURE__ */
|
3259
|
+
return /* @__PURE__ */ React49__default.createElement(
|
3243
3260
|
Box,
|
3244
3261
|
{
|
3245
3262
|
as: "td",
|
@@ -3262,7 +3279,7 @@ function CalendarCell({ state: state2, date, currentMonth }) {
|
|
3262
3279
|
}
|
3263
3280
|
}
|
3264
3281
|
},
|
3265
|
-
/* @__PURE__ */
|
3282
|
+
/* @__PURE__ */ React49__default.createElement(
|
3266
3283
|
Box,
|
3267
3284
|
{
|
3268
3285
|
as: "button",
|
@@ -3320,8 +3337,8 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3320
3337
|
const weeksInMonth = getWeeksInMonth(state2.visibleRange.start, locale);
|
3321
3338
|
const weeksInMonthRange = new Array(weeksInMonth).fill(0).map((_, i) => i);
|
3322
3339
|
const styles2 = useMultiStyleConfig("Datepicker", {});
|
3323
|
-
return /* @__PURE__ */
|
3324
|
-
return /* @__PURE__ */
|
3340
|
+
return /* @__PURE__ */ React49__default.createElement("table", { ...gridProps }, /* @__PURE__ */ React49__default.createElement("thead", { ...headerProps }, /* @__PURE__ */ React49__default.createElement("tr", null, weekDays[language].map((day, index) => {
|
3341
|
+
return /* @__PURE__ */ React49__default.createElement(
|
3325
3342
|
Text4,
|
3326
3343
|
{
|
3327
3344
|
as: "th",
|
@@ -3331,8 +3348,8 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3331
3348
|
},
|
3332
3349
|
day
|
3333
3350
|
);
|
3334
|
-
}))), /* @__PURE__ */
|
3335
|
-
(date, dayIndex) => date ? /* @__PURE__ */
|
3351
|
+
}))), /* @__PURE__ */ React49__default.createElement("tbody", null, weeksInMonthRange.map((weekIndex) => /* @__PURE__ */ React49__default.createElement("tr", { key: weekIndex }, state2.getDatesInWeek(weekIndex, startDate).map(
|
3352
|
+
(date, dayIndex) => date ? /* @__PURE__ */ React49__default.createElement(
|
3336
3353
|
CalendarCell,
|
3337
3354
|
{
|
3338
3355
|
key: dayIndex,
|
@@ -3340,7 +3357,7 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3340
3357
|
date,
|
3341
3358
|
currentMonth: startDate
|
3342
3359
|
}
|
3343
|
-
) : /* @__PURE__ */
|
3360
|
+
) : /* @__PURE__ */ React49__default.createElement("td", { key: dayIndex })
|
3344
3361
|
)))));
|
3345
3362
|
}
|
3346
3363
|
function CalendarNavigationButton({
|
@@ -3350,7 +3367,7 @@ function CalendarNavigationButton({
|
|
3350
3367
|
}) {
|
3351
3368
|
const ref = useRef(null);
|
3352
3369
|
const { buttonProps } = useButton(rest, ref);
|
3353
|
-
return /* @__PURE__ */
|
3370
|
+
return /* @__PURE__ */ React49__default.createElement(
|
3354
3371
|
IconButton,
|
3355
3372
|
{
|
3356
3373
|
...buttonProps,
|
@@ -3384,7 +3401,7 @@ function CalendarHeader({
|
|
3384
3401
|
);
|
3385
3402
|
const areAllOtherYearsDisabled = isPreviousYearDisabled && isNextYearDisabled;
|
3386
3403
|
const isYearPickerVisible = showYearNavigation && !areAllOtherYearsDisabled;
|
3387
|
-
return /* @__PURE__ */
|
3404
|
+
return /* @__PURE__ */ React49__default.createElement(Flex, { alignItems: "center", paddingBottom: "4", justifyContent: "space-between" }, /* @__PURE__ */ React49__default.createElement(
|
3388
3405
|
CalendarNavigator,
|
3389
3406
|
{
|
3390
3407
|
title: title ? title : isYearPickerVisible ? monthTitle : monthAndYearTitle,
|
@@ -3394,7 +3411,7 @@ function CalendarHeader({
|
|
3394
3411
|
isNextDisabled: !state2.isPreviousVisibleRangeInvalid,
|
3395
3412
|
isPreviousDisabled: !state2.isNextVisibleRangeInvalid
|
3396
3413
|
}
|
3397
|
-
), isYearPickerVisible && /* @__PURE__ */
|
3414
|
+
), isYearPickerVisible && /* @__PURE__ */ React49__default.createElement(
|
3398
3415
|
CalendarNavigator,
|
3399
3416
|
{
|
3400
3417
|
title: jsDate.getFullYear().toString(),
|
@@ -3416,15 +3433,15 @@ var CalendarNavigator = ({
|
|
3416
3433
|
isNextDisabled
|
3417
3434
|
}) => {
|
3418
3435
|
const { t: t2 } = useTranslation();
|
3419
|
-
return /* @__PURE__ */
|
3436
|
+
return /* @__PURE__ */ React49__default.createElement(Flex, { alignItems: "center", flexGrow: 1 }, /* @__PURE__ */ React49__default.createElement(
|
3420
3437
|
CalendarNavigationButton,
|
3421
3438
|
{
|
3422
3439
|
onPress: onPrevious,
|
3423
3440
|
isDisabled: isPreviousDisabled,
|
3424
|
-
icon: /* @__PURE__ */
|
3441
|
+
icon: /* @__PURE__ */ React49__default.createElement(ArrowLeftOutline24Icon, null),
|
3425
3442
|
"aria-label": `${t2(texts7.previous)} ${t2(texts7[unit])}`
|
3426
3443
|
}
|
3427
|
-
), /* @__PURE__ */
|
3444
|
+
), /* @__PURE__ */ React49__default.createElement(
|
3428
3445
|
Heading,
|
3429
3446
|
{
|
3430
3447
|
as: "div",
|
@@ -3435,12 +3452,12 @@ var CalendarNavigator = ({
|
|
3435
3452
|
textAlign: "center"
|
3436
3453
|
},
|
3437
3454
|
capitalize(title)
|
3438
|
-
), /* @__PURE__ */
|
3455
|
+
), /* @__PURE__ */ React49__default.createElement(
|
3439
3456
|
CalendarNavigationButton,
|
3440
3457
|
{
|
3441
3458
|
onPress: onNext,
|
3442
3459
|
isDisabled: isNextDisabled,
|
3443
|
-
icon: /* @__PURE__ */
|
3460
|
+
icon: /* @__PURE__ */ React49__default.createElement(ArrowRightOutline24Icon, null),
|
3444
3461
|
"aria-label": `${t2(texts7.next)} ${t2(texts7[unit])}`
|
3445
3462
|
}
|
3446
3463
|
));
|
@@ -3481,14 +3498,14 @@ function Calendar({ showYearNavigation, ...props }) {
|
|
3481
3498
|
createCalendar
|
3482
3499
|
});
|
3483
3500
|
const { calendarProps } = useCalendar(props, state2);
|
3484
|
-
return /* @__PURE__ */
|
3501
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...calendarProps }, /* @__PURE__ */ React49__default.createElement(CalendarHeader, { state: state2, showYearNavigation }), /* @__PURE__ */ React49__default.createElement(CalendarGrid, { state: state2 }));
|
3485
3502
|
}
|
3486
3503
|
var CalendarTriggerButton = (props) => {
|
3487
3504
|
const { t: t2 } = useTranslation();
|
3488
3505
|
const styles2 = useMultiStyleConfig("Datepicker", {});
|
3489
3506
|
const ref = useRef(null);
|
3490
3507
|
const { buttonProps } = useButton(props, ref);
|
3491
|
-
return /* @__PURE__ */
|
3508
|
+
return /* @__PURE__ */ React49__default.createElement(PopoverAnchor, null, /* @__PURE__ */ React49__default.createElement(
|
3492
3509
|
Box,
|
3493
3510
|
{
|
3494
3511
|
ref,
|
@@ -3498,7 +3515,7 @@ var CalendarTriggerButton = (props) => {
|
|
3498
3515
|
sx: styles2.calendarTriggerButton,
|
3499
3516
|
...buttonProps
|
3500
3517
|
},
|
3501
|
-
/* @__PURE__ */
|
3518
|
+
/* @__PURE__ */ React49__default.createElement(CalendarOutline24Icon, null)
|
3502
3519
|
));
|
3503
3520
|
};
|
3504
3521
|
var texts8 = createTexts({
|
@@ -3516,7 +3533,7 @@ var DateTimeSegment = ({ segment, state: state2 }) => {
|
|
3516
3533
|
isPlaceholder: segment.isPlaceholder,
|
3517
3534
|
isEditable: segment.isEditable
|
3518
3535
|
});
|
3519
|
-
return /* @__PURE__ */
|
3536
|
+
return /* @__PURE__ */ React49__default.createElement(
|
3520
3537
|
Box,
|
3521
3538
|
{
|
3522
3539
|
...segmentProps,
|
@@ -3562,7 +3579,7 @@ function DateField(props) {
|
|
3562
3579
|
});
|
3563
3580
|
const ref = useRef(null);
|
3564
3581
|
const { fieldProps, labelProps } = useDateField(props, state2, ref);
|
3565
|
-
return /* @__PURE__ */
|
3582
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { minWidth: "6rem" }, props.label && /* @__PURE__ */ React49__default.createElement(FormLabel, { ...props.labelProps, ...labelProps, sx: styles2.inputLabel }, props.label), /* @__PURE__ */ React49__default.createElement(Flex, { ...fieldProps, ref }, state2.segments.map((segment, i) => /* @__PURE__ */ React49__default.createElement(DateTimeSegment, { key: i, segment, state: state2 }))), /* @__PURE__ */ React49__default.createElement("input", { type: "hidden", value: (_a6 = state2.value) == null ? void 0 : _a6.toString(), name: props.name }));
|
3566
3583
|
}
|
3567
3584
|
var StyledField = forwardRef(
|
3568
3585
|
({ children, variant, ...otherProps }, ref) => {
|
@@ -3570,7 +3587,7 @@ var StyledField = forwardRef(
|
|
3570
3587
|
isInvalid: false
|
3571
3588
|
};
|
3572
3589
|
const styles2 = useMultiStyleConfig("Datepicker", { variant });
|
3573
|
-
return /* @__PURE__ */
|
3590
|
+
return /* @__PURE__ */ React49__default.createElement(
|
3574
3591
|
Box,
|
3575
3592
|
{
|
3576
3593
|
...otherProps,
|
@@ -3624,7 +3641,7 @@ function DatePicker({
|
|
3624
3641
|
};
|
3625
3642
|
const hasTrigger = responsiveVariant === "with-trigger";
|
3626
3643
|
const styles2 = useMultiStyleConfig("Datepicker", {});
|
3627
|
-
return /* @__PURE__ */
|
3644
|
+
return /* @__PURE__ */ React49__default.createElement(I18nProvider, { locale }, /* @__PURE__ */ React49__default.createElement(Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, /* @__PURE__ */ React49__default.createElement(
|
3628
3645
|
Popover,
|
3629
3646
|
{
|
3630
3647
|
...dialogProps,
|
@@ -3635,7 +3652,7 @@ function DatePicker({
|
|
3635
3652
|
closeOnEsc: true,
|
3636
3653
|
returnFocusOnClose: true
|
3637
3654
|
},
|
3638
|
-
/* @__PURE__ */
|
3655
|
+
/* @__PURE__ */ React49__default.createElement(
|
3639
3656
|
InputGroup,
|
3640
3657
|
{
|
3641
3658
|
...groupProps,
|
@@ -3643,7 +3660,7 @@ function DatePicker({
|
|
3643
3660
|
width: "auto",
|
3644
3661
|
display: "inline-flex"
|
3645
3662
|
},
|
3646
|
-
/* @__PURE__ */
|
3663
|
+
/* @__PURE__ */ React49__default.createElement(PopoverAnchor, null, /* @__PURE__ */ React49__default.createElement(
|
3647
3664
|
StyledField,
|
3648
3665
|
{
|
3649
3666
|
variant: responsiveVariant,
|
@@ -3652,8 +3669,8 @@ function DatePicker({
|
|
3652
3669
|
paddingX: 3,
|
3653
3670
|
minHeight
|
3654
3671
|
},
|
3655
|
-
!hasTrigger && /* @__PURE__ */
|
3656
|
-
/* @__PURE__ */
|
3672
|
+
!hasTrigger && /* @__PURE__ */ React49__default.createElement(CalendarOutline24Icon, { marginRight: 2, alignSelf: "center" }),
|
3673
|
+
/* @__PURE__ */ React49__default.createElement(
|
3657
3674
|
DateField,
|
3658
3675
|
{
|
3659
3676
|
label: props.label,
|
@@ -3663,18 +3680,18 @@ function DatePicker({
|
|
3663
3680
|
}
|
3664
3681
|
)
|
3665
3682
|
)),
|
3666
|
-
hasTrigger && /* @__PURE__ */
|
3683
|
+
hasTrigger && /* @__PURE__ */ React49__default.createElement(CalendarTriggerButton, { ...buttonProps })
|
3667
3684
|
),
|
3668
|
-
/* @__PURE__ */
|
3669
|
-
state2.isOpen && !props.isDisabled && /* @__PURE__ */
|
3685
|
+
/* @__PURE__ */ React49__default.createElement(FormErrorMessage, { ...errorMessageProps }, errorMessage),
|
3686
|
+
state2.isOpen && !props.isDisabled && /* @__PURE__ */ React49__default.createElement(Portal, null, /* @__PURE__ */ React49__default.createElement(
|
3670
3687
|
PopoverContent,
|
3671
3688
|
{
|
3672
3689
|
color: "darkGrey",
|
3673
3690
|
boxShadow: "md",
|
3674
3691
|
sx: styles2.calendar
|
3675
3692
|
},
|
3676
|
-
/* @__PURE__ */
|
3677
|
-
/* @__PURE__ */
|
3693
|
+
/* @__PURE__ */ React49__default.createElement(PopoverArrow, { sx: styles2.arrow }),
|
3694
|
+
/* @__PURE__ */ React49__default.createElement(PopoverBody, null, /* @__PURE__ */ React49__default.createElement(
|
3678
3695
|
Calendar,
|
3679
3696
|
{
|
3680
3697
|
...calendarProps,
|
@@ -3694,7 +3711,7 @@ function RangeCalendar(props) {
|
|
3694
3711
|
});
|
3695
3712
|
const ref = useRef(null);
|
3696
3713
|
const { calendarProps, title } = useRangeCalendar(props, state2, ref);
|
3697
|
-
return /* @__PURE__ */
|
3714
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...calendarProps, ref }, /* @__PURE__ */ React49__default.createElement(CalendarHeader, { state: state2, title }), /* @__PURE__ */ React49__default.createElement(Box, { display: "flex", gap: "8" }, /* @__PURE__ */ React49__default.createElement(CalendarGrid, { state: state2 }), /* @__PURE__ */ React49__default.createElement(CalendarGrid, { state: state2, offset: { months: 1 } })));
|
3698
3715
|
}
|
3699
3716
|
|
3700
3717
|
// src/datepicker/DateRangePicker.tsx
|
@@ -3739,7 +3756,7 @@ function DateRangePicker({
|
|
3739
3756
|
}
|
3740
3757
|
};
|
3741
3758
|
const hasTrigger = responsiveVariant === "with-trigger";
|
3742
|
-
return /* @__PURE__ */
|
3759
|
+
return /* @__PURE__ */ React49__default.createElement(I18nProvider, { locale }, /* @__PURE__ */ React49__default.createElement(Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React49__default.createElement(FormLabel, { ...labelProps, sx: styles2.inputLabel }, props.label), /* @__PURE__ */ React49__default.createElement(
|
3743
3760
|
Popover,
|
3744
3761
|
{
|
3745
3762
|
...dialogProps,
|
@@ -3749,7 +3766,7 @@ function DateRangePicker({
|
|
3749
3766
|
closeOnEsc: true,
|
3750
3767
|
returnFocusOnClose: true
|
3751
3768
|
},
|
3752
|
-
/* @__PURE__ */
|
3769
|
+
/* @__PURE__ */ React49__default.createElement(
|
3753
3770
|
InputGroup,
|
3754
3771
|
{
|
3755
3772
|
...groupProps,
|
@@ -3757,7 +3774,7 @@ function DateRangePicker({
|
|
3757
3774
|
width: "auto",
|
3758
3775
|
display: "inline-flex"
|
3759
3776
|
},
|
3760
|
-
/* @__PURE__ */
|
3777
|
+
/* @__PURE__ */ React49__default.createElement(PopoverAnchor, null, /* @__PURE__ */ React49__default.createElement(
|
3761
3778
|
StyledField,
|
3762
3779
|
{
|
3763
3780
|
alignItems: "center",
|
@@ -3767,8 +3784,8 @@ function DateRangePicker({
|
|
3767
3784
|
onKeyPress: handleEnterClick,
|
3768
3785
|
minHeight
|
3769
3786
|
},
|
3770
|
-
!hasTrigger && /* @__PURE__ */
|
3771
|
-
/* @__PURE__ */
|
3787
|
+
!hasTrigger && /* @__PURE__ */ React49__default.createElement(CalendarOutline24Icon, { mr: 2, alignSelf: "center" }),
|
3788
|
+
/* @__PURE__ */ React49__default.createElement(
|
3772
3789
|
DateField,
|
3773
3790
|
{
|
3774
3791
|
...startFieldProps,
|
@@ -3777,8 +3794,8 @@ function DateRangePicker({
|
|
3777
3794
|
labelProps
|
3778
3795
|
}
|
3779
3796
|
),
|
3780
|
-
/* @__PURE__ */
|
3781
|
-
/* @__PURE__ */
|
3797
|
+
/* @__PURE__ */ React49__default.createElement(Box, { as: "span", "aria-hidden": "true", px: "2" }, "\u2013"),
|
3798
|
+
/* @__PURE__ */ React49__default.createElement(
|
3782
3799
|
DateField,
|
3783
3800
|
{
|
3784
3801
|
...endFieldProps,
|
@@ -3788,24 +3805,24 @@ function DateRangePicker({
|
|
3788
3805
|
}
|
3789
3806
|
)
|
3790
3807
|
)),
|
3791
|
-
hasTrigger && /* @__PURE__ */
|
3808
|
+
hasTrigger && /* @__PURE__ */ React49__default.createElement(CalendarTriggerButton, { ...buttonProps })
|
3792
3809
|
),
|
3793
|
-
state2.isOpen && /* @__PURE__ */
|
3810
|
+
state2.isOpen && /* @__PURE__ */ React49__default.createElement(Portal, null, /* @__PURE__ */ React49__default.createElement(
|
3794
3811
|
PopoverContent,
|
3795
3812
|
{
|
3796
3813
|
sx: styles2.calendar,
|
3797
3814
|
boxShadow: "md",
|
3798
3815
|
maxWidth: "none"
|
3799
3816
|
},
|
3800
|
-
/* @__PURE__ */
|
3801
|
-
/* @__PURE__ */
|
3817
|
+
/* @__PURE__ */ React49__default.createElement(PopoverArrow, { sx: styles2.arrow }),
|
3818
|
+
/* @__PURE__ */ React49__default.createElement(PopoverBody, null, /* @__PURE__ */ React49__default.createElement(RangeCalendar, { ...calendarProps }))
|
3802
3819
|
))
|
3803
3820
|
)));
|
3804
3821
|
}
|
3805
3822
|
var TimeField = ({ state: state2, ...props }) => {
|
3806
3823
|
const ref = useRef(null);
|
3807
3824
|
const { labelProps, fieldProps } = useTimeField(props, state2, ref);
|
3808
|
-
return /* @__PURE__ */
|
3825
|
+
return /* @__PURE__ */ React49__default.createElement(Box, null, /* @__PURE__ */ React49__default.createElement(
|
3809
3826
|
FormLabel3,
|
3810
3827
|
{
|
3811
3828
|
...labelProps,
|
@@ -3814,7 +3831,7 @@ var TimeField = ({ state: state2, ...props }) => {
|
|
3814
3831
|
fontSize: "mobile.xs"
|
3815
3832
|
},
|
3816
3833
|
props.label
|
3817
|
-
), /* @__PURE__ */
|
3834
|
+
), /* @__PURE__ */ React49__default.createElement(Flex, { ...fieldProps, ref }, state2.segments.map((segment) => /* @__PURE__ */ React49__default.createElement(DateTimeSegment, { key: segment.type, segment, state: state2 }))), /* @__PURE__ */ React49__default.createElement(
|
3818
3835
|
"input",
|
3819
3836
|
{
|
3820
3837
|
type: "hidden",
|
@@ -3883,7 +3900,7 @@ var TimePicker = ({
|
|
3883
3900
|
const ariaLabel = `${inputLabel} \u2013 ${t2(
|
3884
3901
|
texts9.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
|
3885
3902
|
)}`;
|
3886
|
-
return /* @__PURE__ */
|
3903
|
+
return /* @__PURE__ */ React49__default.createElement(
|
3887
3904
|
StyledField,
|
3888
3905
|
{
|
3889
3906
|
variant: "simple",
|
@@ -3899,7 +3916,7 @@ var TimePicker = ({
|
|
3899
3916
|
"aria-label": ariaLabel,
|
3900
3917
|
...boxProps
|
3901
3918
|
},
|
3902
|
-
/* @__PURE__ */
|
3919
|
+
/* @__PURE__ */ React49__default.createElement(
|
3903
3920
|
IconButton,
|
3904
3921
|
{
|
3905
3922
|
variant: "ghost",
|
@@ -3907,14 +3924,14 @@ var TimePicker = ({
|
|
3907
3924
|
borderRadius: "xs",
|
3908
3925
|
"aria-label": backwardsLabel,
|
3909
3926
|
title: backwardsLabel,
|
3910
|
-
icon: /* @__PURE__ */
|
3927
|
+
icon: /* @__PURE__ */ React49__default.createElement(DropdownLeftFill24Icon, null),
|
3911
3928
|
onClick: handleBackwardsClick,
|
3912
3929
|
isDisabled,
|
3913
3930
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
3914
3931
|
}
|
3915
3932
|
),
|
3916
|
-
/* @__PURE__ */
|
3917
|
-
/* @__PURE__ */
|
3933
|
+
/* @__PURE__ */ React49__default.createElement(TimeField, { label, state: state2, name }),
|
3934
|
+
/* @__PURE__ */ React49__default.createElement(
|
3918
3935
|
IconButton,
|
3919
3936
|
{
|
3920
3937
|
variant: "ghost",
|
@@ -3922,7 +3939,7 @@ var TimePicker = ({
|
|
3922
3939
|
borderRadius: "xs",
|
3923
3940
|
"aria-label": forwardsLabel,
|
3924
3941
|
title: forwardsLabel,
|
3925
|
-
icon: /* @__PURE__ */
|
3942
|
+
icon: /* @__PURE__ */ React49__default.createElement(DropdownRightFill24Icon, null),
|
3926
3943
|
onClick: handleForwardClick,
|
3927
3944
|
isDisabled,
|
3928
3945
|
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
@@ -3991,7 +4008,7 @@ var AttachedInputs = ({
|
|
3991
4008
|
}
|
3992
4009
|
};
|
3993
4010
|
const direction2 = flexDirection === "row" ? "horizontal" : "vertical";
|
3994
|
-
return /* @__PURE__ */
|
4011
|
+
return /* @__PURE__ */ React49__default.createElement(
|
3995
4012
|
Flex,
|
3996
4013
|
{
|
3997
4014
|
role: "group",
|
@@ -4005,7 +4022,7 @@ var AttachedInputs = ({
|
|
4005
4022
|
var Dialog = ({ title, children, ...props }) => {
|
4006
4023
|
const ref = useRef(null);
|
4007
4024
|
const { dialogProps, titleProps } = useDialog(props, ref);
|
4008
|
-
return /* @__PURE__ */
|
4025
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...dialogProps, ref, outline: "none" }, title && /* @__PURE__ */ React49__default.createElement(Heading$1, { as: "h3", ...titleProps }, title), children);
|
4009
4026
|
};
|
4010
4027
|
var Popover3 = ({
|
4011
4028
|
children,
|
@@ -4027,16 +4044,16 @@ var Popover3 = ({
|
|
4027
4044
|
},
|
4028
4045
|
state2
|
4029
4046
|
);
|
4030
|
-
return /* @__PURE__ */
|
4047
|
+
return /* @__PURE__ */ React49__default.createElement(Overlay, null, /* @__PURE__ */ React49__default.createElement(Box, { ...underlayProps, position: "fixed", inset: "0" }), /* @__PURE__ */ React49__default.createElement(
|
4031
4048
|
Box,
|
4032
4049
|
{
|
4033
4050
|
...popoverProps,
|
4034
4051
|
ref: popoverRef,
|
4035
4052
|
minWidth: ((_a6 = triggerRef.current) == null ? void 0 : _a6.clientWidth) ?? "auto"
|
4036
4053
|
},
|
4037
|
-
/* @__PURE__ */
|
4054
|
+
/* @__PURE__ */ React49__default.createElement(DismissButton, { onDismiss: state2.close }),
|
4038
4055
|
children,
|
4039
|
-
/* @__PURE__ */
|
4056
|
+
/* @__PURE__ */ React49__default.createElement(DismissButton, { onDismiss: state2.close })
|
4040
4057
|
));
|
4041
4058
|
};
|
4042
4059
|
|
@@ -4073,7 +4090,7 @@ var CardSelect = forwardRef(
|
|
4073
4090
|
const styles2 = useMultiStyleConfig("CardSelect", { variant, size: size2 });
|
4074
4091
|
useForceRerender(state2.isOpen);
|
4075
4092
|
const ChevronIcon = size2 === "sm" ? DropdownDownFill18Icon : DropdownDownFill24Icon;
|
4076
|
-
return /* @__PURE__ */
|
4093
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...props }, /* @__PURE__ */ React49__default.createElement(
|
4077
4094
|
chakra.button,
|
4078
4095
|
{
|
4079
4096
|
type: "button",
|
@@ -4083,13 +4100,13 @@ var CardSelect = forwardRef(
|
|
4083
4100
|
width,
|
4084
4101
|
"data-attachable": true
|
4085
4102
|
},
|
4086
|
-
/* @__PURE__ */
|
4103
|
+
/* @__PURE__ */ React49__default.createElement(Flex, { gap: 1.5, alignItems: "center" }, icon, /* @__PURE__ */ React49__default.createElement(Box, { as: "span" }, label), withChevron ? /* @__PURE__ */ React49__default.createElement(
|
4087
4104
|
ChevronIcon,
|
4088
4105
|
{
|
4089
4106
|
transform: state2.isOpen ? "rotate(180deg)" : "none"
|
4090
4107
|
}
|
4091
4108
|
) : null)
|
4092
|
-
), state2.isOpen && /* @__PURE__ */
|
4109
|
+
), state2.isOpen && /* @__PURE__ */ React49__default.createElement(
|
4093
4110
|
Popover3,
|
4094
4111
|
{
|
4095
4112
|
state: state2,
|
@@ -4098,7 +4115,7 @@ var CardSelect = forwardRef(
|
|
4098
4115
|
crossOffset,
|
4099
4116
|
placement
|
4100
4117
|
},
|
4101
|
-
/* @__PURE__ */
|
4118
|
+
/* @__PURE__ */ React49__default.createElement(
|
4102
4119
|
Card,
|
4103
4120
|
{
|
4104
4121
|
colorScheme: "white",
|
@@ -4106,7 +4123,7 @@ var CardSelect = forwardRef(
|
|
4106
4123
|
sx: styles2.card,
|
4107
4124
|
...overlayProps
|
4108
4125
|
},
|
4109
|
-
/* @__PURE__ */
|
4126
|
+
/* @__PURE__ */ React49__default.createElement(Dialog, { "aria-label": label }, children)
|
4110
4127
|
)
|
4111
4128
|
));
|
4112
4129
|
}
|
@@ -4120,14 +4137,14 @@ function useForceRerender(shouldRerender) {
|
|
4120
4137
|
}, [shouldRerender]);
|
4121
4138
|
}
|
4122
4139
|
var Checkbox = forwardRef((props, ref) => {
|
4123
|
-
return /* @__PURE__ */
|
4140
|
+
return /* @__PURE__ */ React49__default.createElement(Checkbox$1, { ...props, ref });
|
4124
4141
|
});
|
4125
4142
|
var CheckboxGroup = ({
|
4126
4143
|
direction: direction2 = "row",
|
4127
4144
|
children,
|
4128
4145
|
...props
|
4129
4146
|
}) => {
|
4130
|
-
return /* @__PURE__ */
|
4147
|
+
return /* @__PURE__ */ React49__default.createElement(CheckboxGroup$1, { ...props }, /* @__PURE__ */ React49__default.createElement(Stack$1, { direction: direction2 }, children));
|
4131
4148
|
};
|
4132
4149
|
|
4133
4150
|
// ../../node_modules/@chakra-ui/utils/dist/chunk-O3SWHQEE.mjs
|
@@ -4148,15 +4165,15 @@ var ChoiceChip = forwardRef((props, ref) => {
|
|
4148
4165
|
hasLabel: Boolean(children)
|
4149
4166
|
});
|
4150
4167
|
const id = `choice-chip-${useId()}`;
|
4151
|
-
return /* @__PURE__ */
|
4168
|
+
return /* @__PURE__ */ React49__default.createElement(
|
4152
4169
|
chakra.label,
|
4153
4170
|
{
|
4154
4171
|
htmlFor: id,
|
4155
4172
|
...getRootProps(),
|
4156
4173
|
"aria-label": String(children)
|
4157
4174
|
},
|
4158
|
-
/* @__PURE__ */
|
4159
|
-
/* @__PURE__ */
|
4175
|
+
/* @__PURE__ */ React49__default.createElement(chakra.input, { ...getInputProps({}, ref), id }),
|
4176
|
+
/* @__PURE__ */ React49__default.createElement(
|
4160
4177
|
chakra.div,
|
4161
4178
|
{
|
4162
4179
|
...getLabelProps(),
|
@@ -4165,9 +4182,9 @@ var ChoiceChip = forwardRef((props, ref) => {
|
|
4165
4182
|
"data-hover": dataAttr(state2.isHovered),
|
4166
4183
|
"data-focus": dataAttr(state2.isFocused)
|
4167
4184
|
},
|
4168
|
-
icon && /* @__PURE__ */
|
4169
|
-
/* @__PURE__ */
|
4170
|
-
variant === "filter" && state2.isChecked && /* @__PURE__ */
|
4185
|
+
icon && /* @__PURE__ */ React49__default.createElement(chakra.span, { __css: styles2.icon }, state2.isChecked ? icon.checked : icon.default),
|
4186
|
+
/* @__PURE__ */ React49__default.createElement(chakra.span, { __css: styles2.label, ...getCheckboxProps() }, variant !== "icon" && children),
|
4187
|
+
variant === "filter" && state2.isChecked && /* @__PURE__ */ React49__default.createElement(CloseOutline24Icon, { ml: 1.5 })
|
4171
4188
|
)
|
4172
4189
|
);
|
4173
4190
|
});
|
@@ -4241,16 +4258,16 @@ function NumericStepper({
|
|
4241
4258
|
const textColor = useColorModeValue("darkGrey", "white");
|
4242
4259
|
const backgroundColor = useColorModeValue("white", "darkGrey");
|
4243
4260
|
const focusColor = useColorModeValue("greenHaze", "azure");
|
4244
|
-
return /* @__PURE__ */
|
4261
|
+
return /* @__PURE__ */ React49__default.createElement(Flex, { alignItems: "center", ...boxProps }, /* @__PURE__ */ React49__default.createElement(
|
4245
4262
|
VerySmallButton,
|
4246
4263
|
{
|
4247
|
-
icon: /* @__PURE__ */
|
4264
|
+
icon: /* @__PURE__ */ React49__default.createElement(SubtractIcon, { color: "white" }),
|
4248
4265
|
"aria-label": t2(texts10.decrementButtonAriaLabel),
|
4249
4266
|
onClick: () => onChange(value - 1),
|
4250
4267
|
visibility: value <= minValue ? "hidden" : "visible",
|
4251
4268
|
isDisabled: formControlProps.disabled
|
4252
4269
|
}
|
4253
|
-
), /* @__PURE__ */
|
4270
|
+
), /* @__PURE__ */ React49__default.createElement(
|
4254
4271
|
chakra.input,
|
4255
4272
|
{
|
4256
4273
|
type: "number",
|
@@ -4268,7 +4285,10 @@ function NumericStepper({
|
|
4268
4285
|
textAlign: "center",
|
4269
4286
|
backgroundColor,
|
4270
4287
|
color: textColor,
|
4271
|
-
transition: "
|
4288
|
+
transition: "box-shadow .1s ease-out",
|
4289
|
+
visibility: value === 0 ? "hidden" : "visible",
|
4290
|
+
"aria-live": "assertive",
|
4291
|
+
"aria-label": value.toString(),
|
4272
4292
|
_hover: {
|
4273
4293
|
boxShadow: getBoxShadowString({
|
4274
4294
|
borderColor: "currentColor",
|
@@ -4296,10 +4316,10 @@ function NumericStepper({
|
|
4296
4316
|
onChange(numericInput);
|
4297
4317
|
}
|
4298
4318
|
}
|
4299
|
-
), /* @__PURE__ */
|
4319
|
+
), /* @__PURE__ */ React49__default.createElement(
|
4300
4320
|
VerySmallButton,
|
4301
4321
|
{
|
4302
|
-
icon: /* @__PURE__ */
|
4322
|
+
icon: /* @__PURE__ */ React49__default.createElement(AddIcon, { color: "white" }),
|
4303
4323
|
"aria-label": t2(texts10.incrementButtonAriaLabel),
|
4304
4324
|
onClick: () => onChange(value + 1),
|
4305
4325
|
visibility: value >= maxValue ? "hidden" : "visible",
|
@@ -4308,7 +4328,7 @@ function NumericStepper({
|
|
4308
4328
|
));
|
4309
4329
|
}
|
4310
4330
|
var VerySmallButton = (props) => {
|
4311
|
-
return /* @__PURE__ */
|
4331
|
+
return /* @__PURE__ */ React49__default.createElement(
|
4312
4332
|
IconButton,
|
4313
4333
|
{
|
4314
4334
|
variant: "primary",
|
@@ -4325,7 +4345,7 @@ var VerySmallButton = (props) => {
|
|
4325
4345
|
}
|
4326
4346
|
);
|
4327
4347
|
};
|
4328
|
-
var SubtractIcon = (props) => /* @__PURE__ */
|
4348
|
+
var SubtractIcon = (props) => /* @__PURE__ */ React49__default.createElement(
|
4329
4349
|
Box,
|
4330
4350
|
{
|
4331
4351
|
as: "svg",
|
@@ -4335,7 +4355,7 @@ var SubtractIcon = (props) => /* @__PURE__ */ React48__default.createElement(
|
|
4335
4355
|
stroke: "currentColor",
|
4336
4356
|
...props
|
4337
4357
|
},
|
4338
|
-
/* @__PURE__ */
|
4358
|
+
/* @__PURE__ */ React49__default.createElement(
|
4339
4359
|
"line",
|
4340
4360
|
{
|
4341
4361
|
x1: "9",
|
@@ -4347,7 +4367,7 @@ var SubtractIcon = (props) => /* @__PURE__ */ React48__default.createElement(
|
|
4347
4367
|
}
|
4348
4368
|
)
|
4349
4369
|
);
|
4350
|
-
var AddIcon = (props) => /* @__PURE__ */
|
4370
|
+
var AddIcon = (props) => /* @__PURE__ */ React49__default.createElement(
|
4351
4371
|
Box,
|
4352
4372
|
{
|
4353
4373
|
as: "svg",
|
@@ -4357,7 +4377,7 @@ var AddIcon = (props) => /* @__PURE__ */ React48__default.createElement(
|
|
4357
4377
|
stroke: "currentColor",
|
4358
4378
|
...props
|
4359
4379
|
},
|
4360
|
-
/* @__PURE__ */
|
4380
|
+
/* @__PURE__ */ React49__default.createElement(
|
4361
4381
|
"line",
|
4362
4382
|
{
|
4363
4383
|
x1: "9",
|
@@ -4368,7 +4388,7 @@ var AddIcon = (props) => /* @__PURE__ */ React48__default.createElement(
|
|
4368
4388
|
strokeLinecap: "round"
|
4369
4389
|
}
|
4370
4390
|
),
|
4371
|
-
/* @__PURE__ */
|
4391
|
+
/* @__PURE__ */ React49__default.createElement(
|
4372
4392
|
"line",
|
4373
4393
|
{
|
4374
4394
|
x1: "15",
|
@@ -4395,7 +4415,7 @@ var texts10 = createTexts({
|
|
4395
4415
|
}
|
4396
4416
|
});
|
4397
4417
|
var FormControl = forwardRef((props, ref) => {
|
4398
|
-
return /* @__PURE__ */
|
4418
|
+
return /* @__PURE__ */ React49__default.createElement(FormControl$1, { ...props, ref });
|
4399
4419
|
});
|
4400
4420
|
var FormErrorMessage = ({
|
4401
4421
|
children,
|
@@ -4411,7 +4431,7 @@ var FormErrorMessage = ({
|
|
4411
4431
|
return null;
|
4412
4432
|
}
|
4413
4433
|
const { ref, ...errorMessageProps } = formControlContext.getErrorMessageProps();
|
4414
|
-
return /* @__PURE__ */
|
4434
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { position: "relative", ref }, /* @__PURE__ */ React49__default.createElement(
|
4415
4435
|
Box,
|
4416
4436
|
{
|
4417
4437
|
borderRadius: "xs",
|
@@ -4429,12 +4449,12 @@ var FormErrorMessage = ({
|
|
4429
4449
|
...errorMessageProps,
|
4430
4450
|
...boxProps
|
4431
4451
|
},
|
4432
|
-
/* @__PURE__ */
|
4452
|
+
/* @__PURE__ */ React49__default.createElement(Arrow, { position: "absolute", top: "-0.25em", left: "1em" }),
|
4433
4453
|
children
|
4434
4454
|
));
|
4435
4455
|
};
|
4436
4456
|
var Arrow = (props) => {
|
4437
|
-
return /* @__PURE__ */
|
4457
|
+
return /* @__PURE__ */ React49__default.createElement(
|
4438
4458
|
Box,
|
4439
4459
|
{
|
4440
4460
|
...props,
|
@@ -4445,7 +4465,7 @@ var Arrow = (props) => {
|
|
4445
4465
|
fill: "none",
|
4446
4466
|
transform: "rotate(45deg)"
|
4447
4467
|
},
|
4448
|
-
/* @__PURE__ */
|
4468
|
+
/* @__PURE__ */ React49__default.createElement(
|
4449
4469
|
Box,
|
4450
4470
|
{
|
4451
4471
|
as: "path",
|
@@ -4456,7 +4476,7 @@ var Arrow = (props) => {
|
|
4456
4476
|
);
|
4457
4477
|
};
|
4458
4478
|
var FormLabel3 = forwardRef((props, ref) => {
|
4459
|
-
return /* @__PURE__ */
|
4479
|
+
return /* @__PURE__ */ React49__default.createElement(FormLabel, { ...props, ref });
|
4460
4480
|
});
|
4461
4481
|
var ListBox = forwardRef((props, ref) => {
|
4462
4482
|
const { state: state2, listBoxOptions, ...rest } = props;
|
@@ -4464,7 +4484,7 @@ var ListBox = forwardRef((props, ref) => {
|
|
4464
4484
|
const internalRef = useRef(null);
|
4465
4485
|
const listBoxRef = ref ?? internalRef;
|
4466
4486
|
const { listBoxProps } = useListBox(listBoxOptions, state2, listBoxRef);
|
4467
|
-
return /* @__PURE__ */
|
4487
|
+
return /* @__PURE__ */ React49__default.createElement(
|
4468
4488
|
Box,
|
4469
4489
|
{
|
4470
4490
|
as: "ul",
|
@@ -4473,10 +4493,10 @@ var ListBox = forwardRef((props, ref) => {
|
|
4473
4493
|
ref: listBoxRef,
|
4474
4494
|
...rest
|
4475
4495
|
},
|
4476
|
-
Array.from(state2.collection).map((item) => /* @__PURE__ */
|
4496
|
+
Array.from(state2.collection).map((item) => /* @__PURE__ */ React49__default.createElement(Option, { key: item.key, item, state: state2 }))
|
4477
4497
|
);
|
4478
4498
|
});
|
4479
|
-
var OptionContext =
|
4499
|
+
var OptionContext = React49__default.createContext({
|
4480
4500
|
labelProps: {},
|
4481
4501
|
descriptionProps: {}
|
4482
4502
|
});
|
@@ -4491,19 +4511,19 @@ var Option = ({ item, state: state2 }) => {
|
|
4491
4511
|
state2,
|
4492
4512
|
ref
|
4493
4513
|
);
|
4494
|
-
return /* @__PURE__ */
|
4514
|
+
return /* @__PURE__ */ React49__default.createElement(chakra.li, { ...optionProps, ref, sx: styles2.item }, /* @__PURE__ */ React49__default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, item.rendered));
|
4495
4515
|
};
|
4496
4516
|
function SelectItemLabel({ children }) {
|
4497
4517
|
let { labelProps } = useOptionContext();
|
4498
4518
|
const styles2 = useMultiStyleConfig("ListBox", {});
|
4499
|
-
return /* @__PURE__ */
|
4519
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...labelProps, sx: styles2.label }, children);
|
4500
4520
|
}
|
4501
4521
|
function SelectItemDescription({
|
4502
4522
|
children
|
4503
4523
|
}) {
|
4504
4524
|
let { descriptionProps } = useOptionContext();
|
4505
4525
|
const styles2 = useMultiStyleConfig("ListBox", {});
|
4506
|
-
return /* @__PURE__ */
|
4526
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...descriptionProps, sx: styles2.description }, children);
|
4507
4527
|
}
|
4508
4528
|
|
4509
4529
|
// src/input/InfoSelect.tsx
|
@@ -4537,7 +4557,7 @@ function InfoSelect({
|
|
4537
4557
|
const { buttonProps } = useButton(triggerProps, triggerRef);
|
4538
4558
|
const { t: t2 } = useTranslation();
|
4539
4559
|
const formControl = useFormControlProps(props);
|
4540
|
-
return /* @__PURE__ */
|
4560
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { sx: styles2.container }, /* @__PURE__ */ React49__default.createElement(chakra.div, { ...labelProps, sx: styles2.label }, props.label), /* @__PURE__ */ React49__default.createElement(
|
4541
4561
|
HiddenSelect,
|
4542
4562
|
{
|
4543
4563
|
state: state2,
|
@@ -4545,7 +4565,7 @@ function InfoSelect({
|
|
4545
4565
|
label: props.label,
|
4546
4566
|
name: props.name
|
4547
4567
|
}
|
4548
|
-
), /* @__PURE__ */
|
4568
|
+
), /* @__PURE__ */ React49__default.createElement(
|
4549
4569
|
chakra.button,
|
4550
4570
|
{
|
4551
4571
|
type: "button",
|
@@ -4558,9 +4578,9 @@ function InfoSelect({
|
|
4558
4578
|
"aria-invalid": formControl.isInvalid,
|
4559
4579
|
"aria-describedby": formControl["aria-describedby"]
|
4560
4580
|
},
|
4561
|
-
/* @__PURE__ */
|
4562
|
-
/* @__PURE__ */
|
4563
|
-
), state2.isOpen && /* @__PURE__ */
|
4581
|
+
/* @__PURE__ */ React49__default.createElement(Box, { ...valueProps }, state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)),
|
4582
|
+
/* @__PURE__ */ React49__default.createElement(Box, { sx: styles2.arrowIcon }, state2.isOpen ? /* @__PURE__ */ React49__default.createElement(DropdownUpFill24Icon, null) : /* @__PURE__ */ React49__default.createElement(DropdownDownFill24Icon, null))
|
4583
|
+
), state2.isOpen && /* @__PURE__ */ React49__default.createElement(Popover3, { state: state2, triggerRef }, /* @__PURE__ */ React49__default.createElement(
|
4564
4584
|
ListBox,
|
4565
4585
|
{
|
4566
4586
|
listBoxOptions: menuProps,
|
@@ -4582,7 +4602,7 @@ var Input = forwardRef(
|
|
4582
4602
|
const formControlProps = useFormControlContext();
|
4583
4603
|
const fallbackId = `input-${useId()}`;
|
4584
4604
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
4585
|
-
return /* @__PURE__ */
|
4605
|
+
return /* @__PURE__ */ React49__default.createElement(InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React49__default.createElement(InputLeftElement, null, leftIcon), /* @__PURE__ */ React49__default.createElement(
|
4586
4606
|
Input$1,
|
4587
4607
|
{
|
4588
4608
|
"data-attachable": true,
|
@@ -4593,19 +4613,19 @@ var Input = forwardRef(
|
|
4593
4613
|
ref,
|
4594
4614
|
placeholder: " "
|
4595
4615
|
}
|
4596
|
-
), /* @__PURE__ */
|
4616
|
+
), /* @__PURE__ */ React49__default.createElement(FormLabel, { htmlFor: inputId, pointerEvents: "none" }, label), rightIcon && /* @__PURE__ */ React49__default.createElement(InputRightElement, null, rightIcon));
|
4597
4617
|
}
|
4598
4618
|
);
|
4599
4619
|
var InputLeftElement2 = forwardRef(
|
4600
|
-
(props, ref) => /* @__PURE__ */
|
4620
|
+
(props, ref) => /* @__PURE__ */ React49__default.createElement(InputLeftElement, { ...props, ref })
|
4601
4621
|
);
|
4602
4622
|
var InputRightElement2 = forwardRef(
|
4603
|
-
(props, ref) => /* @__PURE__ */
|
4623
|
+
(props, ref) => /* @__PURE__ */ React49__default.createElement(InputRightElement, { ...props, ref })
|
4604
4624
|
);
|
4605
4625
|
var NativeSelect = forwardRef(
|
4606
4626
|
({ label, ...props }, ref) => {
|
4607
4627
|
const styles2 = useMultiStyleConfig("Select", props);
|
4608
|
-
return /* @__PURE__ */
|
4628
|
+
return /* @__PURE__ */ React49__default.createElement(FormControl, null, /* @__PURE__ */ React49__default.createElement(
|
4609
4629
|
Select,
|
4610
4630
|
{
|
4611
4631
|
"data-attachable": true,
|
@@ -4613,7 +4633,7 @@ var NativeSelect = forwardRef(
|
|
4613
4633
|
rootProps: { __css: styles2.root },
|
4614
4634
|
ref
|
4615
4635
|
}
|
4616
|
-
), label && /* @__PURE__ */
|
4636
|
+
), label && /* @__PURE__ */ React49__default.createElement(FormLabel3, null, label));
|
4617
4637
|
}
|
4618
4638
|
);
|
4619
4639
|
var PasswordInput = forwardRef(
|
@@ -4623,7 +4643,7 @@ var PasswordInput = forwardRef(
|
|
4623
4643
|
const formControlProps = useFormControlContext();
|
4624
4644
|
const autoGeneratedId = `password-input-${useId()}`;
|
4625
4645
|
const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
4626
|
-
return /* @__PURE__ */
|
4646
|
+
return /* @__PURE__ */ React49__default.createElement(InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React49__default.createElement(InputLeftElement2, null, leftIcon), /* @__PURE__ */ React49__default.createElement(
|
4627
4647
|
Input$1,
|
4628
4648
|
{
|
4629
4649
|
...props,
|
@@ -4635,7 +4655,7 @@ var PasswordInput = forwardRef(
|
|
4635
4655
|
ref,
|
4636
4656
|
"data-attachable": true
|
4637
4657
|
}
|
4638
|
-
), /* @__PURE__ */
|
4658
|
+
), /* @__PURE__ */ React49__default.createElement(FormLabel3, { htmlFor: inputId, pointerEvents: "none" }, label), /* @__PURE__ */ React49__default.createElement(InputRightElement2, { width: "fit-content" }, /* @__PURE__ */ React49__default.createElement(
|
4639
4659
|
Button$1,
|
4640
4660
|
{
|
4641
4661
|
variant: "ghost",
|
@@ -4673,10 +4693,10 @@ var PhoneNumberInput = forwardRef(
|
|
4673
4693
|
nationalNumber: ""
|
4674
4694
|
}
|
4675
4695
|
});
|
4676
|
-
return /* @__PURE__ */
|
4696
|
+
return /* @__PURE__ */ React49__default.createElement(AttachedInputs, { ...boxProps }, /* @__PURE__ */ React49__default.createElement(
|
4677
4697
|
Suspense,
|
4678
4698
|
{
|
4679
|
-
fallback: /* @__PURE__ */
|
4699
|
+
fallback: /* @__PURE__ */ React49__default.createElement(
|
4680
4700
|
InfoSelect,
|
4681
4701
|
{
|
4682
4702
|
isLabelSrOnly: true,
|
@@ -4685,10 +4705,10 @@ var PhoneNumberInput = forwardRef(
|
|
4685
4705
|
height: "100%",
|
4686
4706
|
value: "+47"
|
4687
4707
|
},
|
4688
|
-
/* @__PURE__ */
|
4708
|
+
/* @__PURE__ */ React49__default.createElement(Item, { key: "+47" }, "+47")
|
4689
4709
|
)
|
4690
4710
|
},
|
4691
|
-
/* @__PURE__ */
|
4711
|
+
/* @__PURE__ */ React49__default.createElement(
|
4692
4712
|
LazyCountryCodeSelect,
|
4693
4713
|
{
|
4694
4714
|
value: value.countryCode,
|
@@ -4701,7 +4721,7 @@ var PhoneNumberInput = forwardRef(
|
|
4701
4721
|
width: "6.25rem"
|
4702
4722
|
}
|
4703
4723
|
)
|
4704
|
-
), /* @__PURE__ */
|
4724
|
+
), /* @__PURE__ */ React49__default.createElement(
|
4705
4725
|
Input,
|
4706
4726
|
{
|
4707
4727
|
ref,
|
@@ -4730,13 +4750,13 @@ var texts13 = createTexts({
|
|
4730
4750
|
sv: "Telefonnummer"
|
4731
4751
|
}
|
4732
4752
|
});
|
4733
|
-
var LazyCountryCodeSelect =
|
4753
|
+
var LazyCountryCodeSelect = React49__default.lazy(() => import('./CountryCodeSelect-WGG2Z3VI.mjs'));
|
4734
4754
|
var Radio = forwardRef((props, ref) => {
|
4735
|
-
return /* @__PURE__ */
|
4755
|
+
return /* @__PURE__ */ React49__default.createElement(Radio$1, { ...props, ref });
|
4736
4756
|
});
|
4737
4757
|
var RadioGroup = forwardRef(
|
4738
4758
|
({ children, direction: direction2 = "row", ...rest }, ref) => {
|
4739
|
-
return /* @__PURE__ */
|
4759
|
+
return /* @__PURE__ */ React49__default.createElement(RadioGroup$1, { ...rest, ref }, /* @__PURE__ */ React49__default.createElement(Stack$1, { direction: direction2 }, children));
|
4740
4760
|
}
|
4741
4761
|
);
|
4742
4762
|
var SearchInput = forwardRef(
|
@@ -4746,7 +4766,7 @@ var SearchInput = forwardRef(
|
|
4746
4766
|
const formControlProps = useFormControlContext();
|
4747
4767
|
const autoGeneratedId = useId();
|
4748
4768
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
|
4749
|
-
return /* @__PURE__ */
|
4769
|
+
return /* @__PURE__ */ React49__default.createElement(InputGroup, { position: "relative" }, /* @__PURE__ */ React49__default.createElement(InputLeftElement2, null, /* @__PURE__ */ React49__default.createElement(SearchOutline24Icon, null)), /* @__PURE__ */ React49__default.createElement(
|
4750
4770
|
Input$1,
|
4751
4771
|
{
|
4752
4772
|
pl: 7,
|
@@ -4763,7 +4783,7 @@ var SearchInput = forwardRef(
|
|
4763
4783
|
placeholder: " ",
|
4764
4784
|
"data-attachable": true
|
4765
4785
|
}
|
4766
|
-
), /* @__PURE__ */
|
4786
|
+
), /* @__PURE__ */ React49__default.createElement(FormLabel3, { htmlFor: inputId, pointerEvents: "none" }, label ?? t2(texts14.label)), showClearButton && /* @__PURE__ */ React49__default.createElement(InputRightElement2, { width: "fit-content" }, /* @__PURE__ */ React49__default.createElement(
|
4767
4787
|
IconButton$1,
|
4768
4788
|
{
|
4769
4789
|
variant: "ghost",
|
@@ -4771,7 +4791,7 @@ var SearchInput = forwardRef(
|
|
4771
4791
|
size: "sm",
|
4772
4792
|
mr: 1,
|
4773
4793
|
"aria-label": t2(texts14.reset),
|
4774
|
-
icon: /* @__PURE__ */
|
4794
|
+
icon: /* @__PURE__ */ React49__default.createElement(CloseOutline24Icon, null),
|
4775
4795
|
onClick: onReset
|
4776
4796
|
}
|
4777
4797
|
)));
|
@@ -4793,7 +4813,7 @@ var texts14 = createTexts({
|
|
4793
4813
|
});
|
4794
4814
|
var Switch = forwardRef(
|
4795
4815
|
({ size: size2 = "md", ...props }, ref) => {
|
4796
|
-
return /* @__PURE__ */
|
4816
|
+
return /* @__PURE__ */ React49__default.createElement(Switch$1, { variant: "solid", size: size2, ...props, ref });
|
4797
4817
|
}
|
4798
4818
|
);
|
4799
4819
|
var Textarea = forwardRef((props, ref) => {
|
@@ -4804,7 +4824,7 @@ var Textarea = forwardRef((props, ref) => {
|
|
4804
4824
|
const formControlProps = useFormControlContext();
|
4805
4825
|
const fallbackId = `textarea-${useId()}`;
|
4806
4826
|
const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
|
4807
|
-
return /* @__PURE__ */
|
4827
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...spacingProps }, /* @__PURE__ */ React49__default.createElement(FormLabel, { htmlFor: inputId }, label), /* @__PURE__ */ React49__default.createElement(Textarea$1, { ...rest, id: inputId, ref }));
|
4808
4828
|
});
|
4809
4829
|
function getSpacingProps(props) {
|
4810
4830
|
const {
|
@@ -4923,7 +4943,7 @@ var LineIcon = ({
|
|
4923
4943
|
if (!Icon) {
|
4924
4944
|
return null;
|
4925
4945
|
}
|
4926
|
-
return /* @__PURE__ */
|
4946
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { sx: { ...styles2.iconContainer, ...sx }, ...rest }, /* @__PURE__ */ React49__default.createElement(Icon, { sx: styles2.icon }));
|
4927
4947
|
};
|
4928
4948
|
|
4929
4949
|
// src/linjetag/InfoTag.tsx
|
@@ -4934,7 +4954,7 @@ var InfoTag = ({
|
|
4934
4954
|
description
|
4935
4955
|
}) => {
|
4936
4956
|
const styles2 = useMultiStyleConfig("InfoTag", { variant, size: size2 });
|
4937
|
-
return /* @__PURE__ */
|
4957
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { sx: styles2.container }, /* @__PURE__ */ React49__default.createElement(LineIcon, { variant, size: size2, sx: styles2.iconContainer }), /* @__PURE__ */ React49__default.createElement(Box, { sx: styles2.textContainer }, title && /* @__PURE__ */ React49__default.createElement(Box, { as: "span", sx: styles2.title }, title), title && description && " ", description && /* @__PURE__ */ React49__default.createElement(Box, { as: "span", sx: styles2.description }, description)));
|
4938
4958
|
};
|
4939
4959
|
var TravelTag = forwardRef(
|
4940
4960
|
({
|
@@ -4952,7 +4972,7 @@ var TravelTag = forwardRef(
|
|
4952
4972
|
deviationLevel
|
4953
4973
|
});
|
4954
4974
|
const DeviationLevelIcon = getDeviationLevelIcon({ deviationLevel, size: size2 });
|
4955
|
-
return /* @__PURE__ */
|
4975
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { sx: styles2.container, "aria-disabled": isDisabled, ref, ...rest }, /* @__PURE__ */ React49__default.createElement(LineIcon, { variant, size: size2, sx: styles2.iconContainer }), /* @__PURE__ */ React49__default.createElement(Box, { sx: styles2.textContainer }, title && /* @__PURE__ */ React49__default.createElement(Box, { as: "span", sx: styles2.title }, title), title && description && " ", description && /* @__PURE__ */ React49__default.createElement(Box, { as: "span", sx: styles2.description }, description)), DeviationLevelIcon && /* @__PURE__ */ React49__default.createElement(DeviationLevelIcon, { sx: styles2.deviationIcon }));
|
4956
4976
|
}
|
4957
4977
|
);
|
4958
4978
|
var getDeviationLevelIcon = ({
|
@@ -4976,7 +4996,7 @@ var TextLink = forwardRef(
|
|
4976
4996
|
var _a6;
|
4977
4997
|
const { t: t2 } = useTranslation();
|
4978
4998
|
const isExternal = props.isExternal !== void 0 ? props.isExternal : Boolean((_a6 = props.href) == null ? void 0 : _a6.match(/^https?:\/\//));
|
4979
|
-
return /* @__PURE__ */
|
4999
|
+
return /* @__PURE__ */ React49__default.createElement(Link, { ...props, ref, isExternal }, children, isExternal && /* @__PURE__ */ React49__default.createElement(
|
4980
5000
|
LinkOutOutline24Icon,
|
4981
5001
|
{
|
4982
5002
|
marginLeft: 0.5,
|
@@ -4997,7 +5017,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
4997
5017
|
const mainColor = colorScheme === "light" ? "#1d211c" : "#ffffff";
|
4998
5018
|
const accentColor = colorScheme === "light" ? "#138c6e" : "#ffffff";
|
4999
5019
|
const id = useId();
|
5000
|
-
return /* @__PURE__ */
|
5020
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { as: "svg", viewBox: "0 0 107 54", ...boxProps }, /* @__PURE__ */ React49__default.createElement("title", null, "Vy logo"), /* @__PURE__ */ React49__default.createElement(
|
5001
5021
|
"path",
|
5002
5022
|
{
|
5003
5023
|
fillRule: "evenodd",
|
@@ -5005,7 +5025,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5005
5025
|
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",
|
5006
5026
|
fill: mainColor
|
5007
5027
|
}
|
5008
|
-
), /* @__PURE__ */
|
5028
|
+
), /* @__PURE__ */ React49__default.createElement(
|
5009
5029
|
"mask",
|
5010
5030
|
{
|
5011
5031
|
id: `${id}-a`,
|
@@ -5016,7 +5036,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5016
5036
|
width: "94",
|
5017
5037
|
height: "54"
|
5018
5038
|
},
|
5019
|
-
/* @__PURE__ */
|
5039
|
+
/* @__PURE__ */ React49__default.createElement(
|
5020
5040
|
"path",
|
5021
5041
|
{
|
5022
5042
|
fillRule: "evenodd",
|
@@ -5025,7 +5045,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5025
5045
|
fill: mainColor
|
5026
5046
|
}
|
5027
5047
|
)
|
5028
|
-
), /* @__PURE__ */
|
5048
|
+
), /* @__PURE__ */ React49__default.createElement(
|
5029
5049
|
"g",
|
5030
5050
|
{
|
5031
5051
|
mask: `url(#${id}-a)`,
|
@@ -5033,9 +5053,9 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5033
5053
|
clipRule: "evenodd",
|
5034
5054
|
fill: mainColor
|
5035
5055
|
},
|
5036
|
-
/* @__PURE__ */
|
5037
|
-
/* @__PURE__ */
|
5038
|
-
), /* @__PURE__ */
|
5056
|
+
/* @__PURE__ */ React49__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" }),
|
5057
|
+
/* @__PURE__ */ React49__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" })
|
5058
|
+
), /* @__PURE__ */ React49__default.createElement(
|
5039
5059
|
"path",
|
5040
5060
|
{
|
5041
5061
|
fillRule: "evenodd",
|
@@ -5043,7 +5063,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5043
5063
|
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",
|
5044
5064
|
fill: accentColor
|
5045
5065
|
}
|
5046
|
-
), /* @__PURE__ */
|
5066
|
+
), /* @__PURE__ */ React49__default.createElement(
|
5047
5067
|
"path",
|
5048
5068
|
{
|
5049
5069
|
fillRule: "evenodd",
|
@@ -5051,7 +5071,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5051
5071
|
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",
|
5052
5072
|
fill: mainColor
|
5053
5073
|
}
|
5054
|
-
), /* @__PURE__ */
|
5074
|
+
), /* @__PURE__ */ React49__default.createElement(
|
5055
5075
|
"mask",
|
5056
5076
|
{
|
5057
5077
|
id: `${id}-b`,
|
@@ -5062,7 +5082,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5062
5082
|
width: "78",
|
5063
5083
|
height: "54"
|
5064
5084
|
},
|
5065
|
-
/* @__PURE__ */
|
5085
|
+
/* @__PURE__ */ React49__default.createElement(
|
5066
5086
|
"path",
|
5067
5087
|
{
|
5068
5088
|
fillRule: "evenodd",
|
@@ -5071,25 +5091,25 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5071
5091
|
fill: mainColor
|
5072
5092
|
}
|
5073
5093
|
)
|
5074
|
-
), /* @__PURE__ */
|
5094
|
+
), /* @__PURE__ */ React49__default.createElement("g", { mask: `url(#${id}-b)`, fillRule: "evenodd", clipRule: "evenodd" }, /* @__PURE__ */ React49__default.createElement(
|
5075
5095
|
"path",
|
5076
5096
|
{
|
5077
5097
|
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",
|
5078
5098
|
fill: mainColor
|
5079
5099
|
}
|
5080
|
-
), /* @__PURE__ */
|
5100
|
+
), /* @__PURE__ */ React49__default.createElement(
|
5081
5101
|
"path",
|
5082
5102
|
{
|
5083
5103
|
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",
|
5084
5104
|
fill: mainColor
|
5085
5105
|
}
|
5086
|
-
), /* @__PURE__ */
|
5106
|
+
), /* @__PURE__ */ React49__default.createElement(
|
5087
5107
|
"path",
|
5088
5108
|
{
|
5089
5109
|
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",
|
5090
5110
|
fill: accentColor
|
5091
5111
|
}
|
5092
|
-
)), /* @__PURE__ */
|
5112
|
+
)), /* @__PURE__ */ React49__default.createElement(
|
5093
5113
|
"path",
|
5094
5114
|
{
|
5095
5115
|
fillRule: "evenodd",
|
@@ -5099,7 +5119,7 @@ var VyLogo = ({ colorScheme, ...boxProps }) => {
|
|
5099
5119
|
}
|
5100
5120
|
));
|
5101
5121
|
};
|
5102
|
-
var JumpForwardIcon = (props) => /* @__PURE__ */
|
5122
|
+
var JumpForwardIcon = (props) => /* @__PURE__ */ React49.createElement(Box, { as: "svg", ...props, viewBox: "0 0 32 30", fill: "none" }, /* @__PURE__ */ React49.createElement(
|
5103
5123
|
"path",
|
5104
5124
|
{
|
5105
5125
|
fillRule: "evenodd",
|
@@ -5107,7 +5127,7 @@ var JumpForwardIcon = (props) => /* @__PURE__ */ React48.createElement(Box, { as
|
|
5107
5127
|
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",
|
5108
5128
|
fill: "currentColor"
|
5109
5129
|
}
|
5110
|
-
), /* @__PURE__ */
|
5130
|
+
), /* @__PURE__ */ React49.createElement(
|
5111
5131
|
"path",
|
5112
5132
|
{
|
5113
5133
|
fillRule: "evenodd",
|
@@ -5116,7 +5136,7 @@ var JumpForwardIcon = (props) => /* @__PURE__ */ React48.createElement(Box, { as
|
|
5116
5136
|
fill: "currentColor"
|
5117
5137
|
}
|
5118
5138
|
));
|
5119
|
-
var JumpBackwardIcon = (props) => /* @__PURE__ */
|
5139
|
+
var JumpBackwardIcon = (props) => /* @__PURE__ */ React49.createElement(Box, { as: "svg", ...props, viewBox: "0 0 32 30", fill: "none" }, /* @__PURE__ */ React49.createElement(
|
5120
5140
|
"path",
|
5121
5141
|
{
|
5122
5142
|
fillRule: "evenodd",
|
@@ -5124,7 +5144,7 @@ var JumpBackwardIcon = (props) => /* @__PURE__ */ React48.createElement(Box, { a
|
|
5124
5144
|
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",
|
5125
5145
|
fill: "currentColor"
|
5126
5146
|
}
|
5127
|
-
), /* @__PURE__ */
|
5147
|
+
), /* @__PURE__ */ React49.createElement(
|
5128
5148
|
"path",
|
5129
5149
|
{
|
5130
5150
|
fillRule: "evenodd",
|
@@ -5133,7 +5153,7 @@ var JumpBackwardIcon = (props) => /* @__PURE__ */ React48.createElement(Box, { a
|
|
5133
5153
|
fill: "currentColor"
|
5134
5154
|
}
|
5135
5155
|
));
|
5136
|
-
var PlayIcon = (props) => /* @__PURE__ */
|
5156
|
+
var PlayIcon = (props) => /* @__PURE__ */ React49.createElement(Box, { as: "svg", ...props, fill: "none", viewBox: "0 0 60 60" }, /* @__PURE__ */ React49.createElement(
|
5137
5157
|
"path",
|
5138
5158
|
{
|
5139
5159
|
fillRule: "evenodd",
|
@@ -5142,7 +5162,7 @@ var PlayIcon = (props) => /* @__PURE__ */ React48.createElement(Box, { as: "svg"
|
|
5142
5162
|
fill: "currentColor"
|
5143
5163
|
}
|
5144
5164
|
));
|
5145
|
-
var PauseIcon = (props) => /* @__PURE__ */
|
5165
|
+
var PauseIcon = (props) => /* @__PURE__ */ React49.createElement(Box, { as: "svg", ...props, viewBox: "0 0 60 60", fill: "none" }, /* @__PURE__ */ React49.createElement(
|
5146
5166
|
"path",
|
5147
5167
|
{
|
5148
5168
|
fillRule: "evenodd",
|
@@ -5151,7 +5171,7 @@ var PauseIcon = (props) => /* @__PURE__ */ React48.createElement(Box, { as: "svg
|
|
5151
5171
|
fill: "currentColor"
|
5152
5172
|
}
|
5153
5173
|
));
|
5154
|
-
var SkipNextIcon = (props) => /* @__PURE__ */
|
5174
|
+
var SkipNextIcon = (props) => /* @__PURE__ */ React49.createElement(Box, { as: "svg", ...props, viewBox: "0 0 30 30", fill: "none" }, /* @__PURE__ */ React49.createElement(
|
5155
5175
|
"path",
|
5156
5176
|
{
|
5157
5177
|
fillRule: "evenodd",
|
@@ -5160,7 +5180,7 @@ var SkipNextIcon = (props) => /* @__PURE__ */ React48.createElement(Box, { as: "
|
|
5160
5180
|
fill: "currentColor"
|
5161
5181
|
}
|
5162
5182
|
));
|
5163
|
-
var SkipPreviousIcon = (props) => /* @__PURE__ */
|
5183
|
+
var SkipPreviousIcon = (props) => /* @__PURE__ */ React49.createElement(Box, { as: "svg", ...props, viewBox: "0 0 30 30", fill: "none" }, /* @__PURE__ */ React49.createElement(
|
5164
5184
|
"path",
|
5165
5185
|
{
|
5166
5186
|
fillRule: "evenodd",
|
@@ -5182,7 +5202,7 @@ var JumpButton = ({
|
|
5182
5202
|
variant: "jumpSkip",
|
5183
5203
|
size: size2
|
5184
5204
|
});
|
5185
|
-
return /* @__PURE__ */
|
5205
|
+
return /* @__PURE__ */ React49__default.createElement(
|
5186
5206
|
Center,
|
5187
5207
|
{
|
5188
5208
|
as: "button",
|
@@ -5191,7 +5211,7 @@ var JumpButton = ({
|
|
5191
5211
|
disabled: isDisabled,
|
5192
5212
|
...props
|
5193
5213
|
},
|
5194
|
-
direction2 === "forward" ? /* @__PURE__ */
|
5214
|
+
direction2 === "forward" ? /* @__PURE__ */ React49__default.createElement(JumpForwardIcon, { sx: styles2.icon }) : /* @__PURE__ */ React49__default.createElement(JumpBackwardIcon, { sx: styles2.icon })
|
5195
5215
|
);
|
5196
5216
|
};
|
5197
5217
|
var texts16 = createTexts({
|
@@ -5219,7 +5239,7 @@ var PlayPauseButton = ({
|
|
5219
5239
|
variant: "play",
|
5220
5240
|
size: size2
|
5221
5241
|
});
|
5222
|
-
return /* @__PURE__ */
|
5242
|
+
return /* @__PURE__ */ React49__default.createElement(
|
5223
5243
|
Center,
|
5224
5244
|
{
|
5225
5245
|
as: "button",
|
@@ -5228,7 +5248,7 @@ var PlayPauseButton = ({
|
|
5228
5248
|
disabled: isDisabled,
|
5229
5249
|
...props
|
5230
5250
|
},
|
5231
|
-
isPlaying ? /* @__PURE__ */
|
5251
|
+
isPlaying ? /* @__PURE__ */ React49__default.createElement(PauseIcon, { sx: styles2.icon }) : /* @__PURE__ */ React49__default.createElement(PlayIcon, { sx: styles2.icon })
|
5232
5252
|
);
|
5233
5253
|
};
|
5234
5254
|
var texts17 = createTexts({
|
@@ -5256,7 +5276,7 @@ var SkipButton = ({
|
|
5256
5276
|
variant: "jumpSkip",
|
5257
5277
|
size: size2
|
5258
5278
|
});
|
5259
|
-
return /* @__PURE__ */
|
5279
|
+
return /* @__PURE__ */ React49__default.createElement(
|
5260
5280
|
Center,
|
5261
5281
|
{
|
5262
5282
|
as: "button",
|
@@ -5265,7 +5285,7 @@ var SkipButton = ({
|
|
5265
5285
|
disabled: isDisabled,
|
5266
5286
|
...props
|
5267
5287
|
},
|
5268
|
-
direction2 === "forward" ? /* @__PURE__ */
|
5288
|
+
direction2 === "forward" ? /* @__PURE__ */ React49__default.createElement(SkipNextIcon, { sx: styles2.icon }) : /* @__PURE__ */ React49__default.createElement(SkipPreviousIcon, { sx: styles2.icon })
|
5269
5289
|
);
|
5270
5290
|
};
|
5271
5291
|
var texts18 = createTexts({
|
@@ -5288,13 +5308,13 @@ var ModalHeader = forwardRef(
|
|
5288
5308
|
fontSize: size2 === "lg" ? ["mobile.lg", "desktop.lg"] : ["mobile.md", "desktop.md"],
|
5289
5309
|
textAlign: size2 === "lg" ? "center" : "left"
|
5290
5310
|
};
|
5291
|
-
return /* @__PURE__ */
|
5311
|
+
return /* @__PURE__ */ React49__default.createElement(ModalHeader$1, { ...props, ref, ...styles2 });
|
5292
5312
|
}
|
5293
5313
|
);
|
5294
5314
|
|
5295
5315
|
// src/modal/Drawer.tsx
|
5296
5316
|
var Drawer = (props) => {
|
5297
|
-
return /* @__PURE__ */
|
5317
|
+
return /* @__PURE__ */ React49__default.createElement(DrawerProvider, { placement: props.placement }, /* @__PURE__ */ React49__default.createElement(Drawer$1, { ...props }));
|
5298
5318
|
};
|
5299
5319
|
var DrawerContent = forwardRef(
|
5300
5320
|
({ children, ...props }, ref) => {
|
@@ -5311,7 +5331,7 @@ var DrawerContent = forwardRef(
|
|
5311
5331
|
});
|
5312
5332
|
const isTopOrBottom = placement === "top" || placement === "bottom";
|
5313
5333
|
const widthConstraits = isTopOrBottom ? { width: ["100%", "37.5rem"], mx: "auto" } : {};
|
5314
|
-
return /* @__PURE__ */
|
5334
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...handlers }, /* @__PURE__ */ React49__default.createElement(
|
5315
5335
|
DrawerContent$1,
|
5316
5336
|
{
|
5317
5337
|
...widthConstraits,
|
@@ -5320,13 +5340,13 @@ var DrawerContent = forwardRef(
|
|
5320
5340
|
...props,
|
5321
5341
|
ref
|
5322
5342
|
},
|
5323
|
-
/* @__PURE__ */
|
5343
|
+
/* @__PURE__ */ React49__default.createElement(Box, { position: "relative" }, /* @__PURE__ */ React49__default.createElement(Box, { maxHeight: "100vh", maxWidth: "100vw", overflow: "auto" }, isTopOrBottom && /* @__PURE__ */ React49__default.createElement(Notch, null), /* @__PURE__ */ React49__default.createElement(Box, null, children)))
|
5324
5344
|
));
|
5325
5345
|
}
|
5326
5346
|
);
|
5327
5347
|
var Notch = forwardRef((props, ref) => {
|
5328
5348
|
const placement = useDrawerContext();
|
5329
|
-
return /* @__PURE__ */
|
5349
|
+
return /* @__PURE__ */ React49__default.createElement(
|
5330
5350
|
Box,
|
5331
5351
|
{
|
5332
5352
|
position: "absolute",
|
@@ -5338,14 +5358,14 @@ var Notch = forwardRef((props, ref) => {
|
|
5338
5358
|
...props,
|
5339
5359
|
ref
|
5340
5360
|
},
|
5341
|
-
/* @__PURE__ */
|
5361
|
+
/* @__PURE__ */ React49__default.createElement(
|
5342
5362
|
Center,
|
5343
5363
|
{
|
5344
5364
|
background: `linear-gradient(to ${placement === "bottom" ? "bottom" : "top"}, white 0%, white 60%, transparent)`,
|
5345
5365
|
padding: 2,
|
5346
5366
|
borderRadius: "md"
|
5347
5367
|
},
|
5348
|
-
/* @__PURE__ */
|
5368
|
+
/* @__PURE__ */ React49__default.createElement(
|
5349
5369
|
Box,
|
5350
5370
|
{
|
5351
5371
|
width: "2.265rem",
|
@@ -5357,10 +5377,10 @@ var Notch = forwardRef((props, ref) => {
|
|
5357
5377
|
)
|
5358
5378
|
);
|
5359
5379
|
});
|
5360
|
-
var DrawerContext =
|
5361
|
-
var DrawerProvider = (props) => /* @__PURE__ */
|
5380
|
+
var DrawerContext = React49__default.createContext(void 0);
|
5381
|
+
var DrawerProvider = (props) => /* @__PURE__ */ React49__default.createElement(DrawerContext.Provider, { value: props.placement }, props.children);
|
5362
5382
|
var useDrawerContext = () => {
|
5363
|
-
return
|
5383
|
+
return React49__default.useContext(DrawerContext);
|
5364
5384
|
};
|
5365
5385
|
var SimpleDrawer = ({
|
5366
5386
|
placement,
|
@@ -5368,19 +5388,19 @@ var SimpleDrawer = ({
|
|
5368
5388
|
title,
|
5369
5389
|
...props
|
5370
5390
|
}) => {
|
5371
|
-
return /* @__PURE__ */
|
5391
|
+
return /* @__PURE__ */ React49__default.createElement(Drawer, { placement, ...props }, /* @__PURE__ */ React49__default.createElement(DrawerOverlay, null), /* @__PURE__ */ React49__default.createElement(DrawerContent, null, /* @__PURE__ */ React49__default.createElement(DrawerCloseButton, null), title && /* @__PURE__ */ React49__default.createElement(ModalHeader, null, title), /* @__PURE__ */ React49__default.createElement(DrawerBody, null, children)));
|
5372
5392
|
};
|
5373
5393
|
var PopoverWizardBody = ({ children }) => {
|
5374
|
-
const [currentStep, setCurrentStep] =
|
5375
|
-
const totalSteps =
|
5394
|
+
const [currentStep, setCurrentStep] = React49.useState(1);
|
5395
|
+
const totalSteps = React49.Children.count(children);
|
5376
5396
|
const { isOpen } = usePopoverContext();
|
5377
|
-
|
5397
|
+
React49.useEffect(() => {
|
5378
5398
|
if (!isOpen && currentStep > 1) {
|
5379
5399
|
const id = setTimeout(() => setCurrentStep(1), 500);
|
5380
5400
|
return () => clearTimeout(id);
|
5381
5401
|
}
|
5382
5402
|
}, [isOpen, currentStep]);
|
5383
|
-
return /* @__PURE__ */
|
5403
|
+
return /* @__PURE__ */ React49.createElement(PopoverBody, null, /* @__PURE__ */ React49.createElement(Stack, { spacing: 1.5 }, /* @__PURE__ */ React49.createElement(Box, null, React49.Children.toArray(children)[currentStep - 1]), /* @__PURE__ */ React49.createElement(Flex, { gap: 3 }, /* @__PURE__ */ React49.createElement(StepIndicator, { totalSteps, currentStep }), /* @__PURE__ */ React49.createElement(
|
5384
5404
|
NextStepButton,
|
5385
5405
|
{
|
5386
5406
|
isLastStep: totalSteps === currentStep,
|
@@ -5390,7 +5410,7 @@ var PopoverWizardBody = ({ children }) => {
|
|
5390
5410
|
};
|
5391
5411
|
var StepIndicator = ({ totalSteps, currentStep }) => {
|
5392
5412
|
const steps = createRange(1, totalSteps);
|
5393
|
-
return /* @__PURE__ */
|
5413
|
+
return /* @__PURE__ */ React49.createElement(Flex, { gap: 1, alignItems: "center" }, steps.map((step) => /* @__PURE__ */ React49.createElement(
|
5394
5414
|
Box,
|
5395
5415
|
{
|
5396
5416
|
key: step,
|
@@ -5409,13 +5429,13 @@ var createRange = (start, end) => {
|
|
5409
5429
|
var NextStepButton = ({ isLastStep, onNext }) => {
|
5410
5430
|
const { onClose } = usePopoverContext();
|
5411
5431
|
const { t: t2 } = useTranslation();
|
5412
|
-
return /* @__PURE__ */
|
5432
|
+
return /* @__PURE__ */ React49.createElement(
|
5413
5433
|
Button,
|
5414
5434
|
{
|
5415
5435
|
variant: "additional",
|
5416
5436
|
size: "sm",
|
5417
5437
|
color: "white",
|
5418
|
-
leftIcon: isLastStep ? void 0 : /* @__PURE__ */
|
5438
|
+
leftIcon: isLastStep ? void 0 : /* @__PURE__ */ React49.createElement(ArrowRightFill18Icon, null),
|
5419
5439
|
onClick: isLastStep ? onClose : onNext
|
5420
5440
|
},
|
5421
5441
|
t2(isLastStep ? texts19.finish : texts19.nextStep)
|
@@ -5447,7 +5467,7 @@ var SimplePopover = ({
|
|
5447
5467
|
borderRadius,
|
5448
5468
|
...props
|
5449
5469
|
}) => {
|
5450
|
-
return /* @__PURE__ */
|
5470
|
+
return /* @__PURE__ */ React49__default.createElement(DarkMode, null, /* @__PURE__ */ React49__default.createElement(
|
5451
5471
|
Popover,
|
5452
5472
|
{
|
5453
5473
|
onClose,
|
@@ -5459,8 +5479,8 @@ var SimplePopover = ({
|
|
5459
5479
|
arrowShadowColor: "none",
|
5460
5480
|
...props
|
5461
5481
|
},
|
5462
|
-
triggerElement && /* @__PURE__ */
|
5463
|
-
/* @__PURE__ */
|
5482
|
+
triggerElement && /* @__PURE__ */ React49__default.createElement(PopoverTrigger, null, triggerElement),
|
5483
|
+
/* @__PURE__ */ React49__default.createElement(PopoverContent, { borderRadius }, /* @__PURE__ */ React49__default.createElement(PopoverArrow, null), withCloseButton && /* @__PURE__ */ React49__default.createElement(PopoverCloseButton, null), /* @__PURE__ */ React49__default.createElement(PopoverBody, null, children))
|
5464
5484
|
));
|
5465
5485
|
};
|
5466
5486
|
var WizardPopover = ({
|
@@ -5468,7 +5488,7 @@ var WizardPopover = ({
|
|
5468
5488
|
triggerElement,
|
5469
5489
|
withCloseButton = false
|
5470
5490
|
}) => {
|
5471
|
-
return /* @__PURE__ */
|
5491
|
+
return /* @__PURE__ */ React49.createElement(DarkMode, null, /* @__PURE__ */ React49.createElement(Popover, { size: "lg" }, /* @__PURE__ */ React49.createElement(PopoverTrigger, null, triggerElement), /* @__PURE__ */ React49.createElement(PopoverContent, null, /* @__PURE__ */ React49.createElement(PopoverArrow, null), withCloseButton && /* @__PURE__ */ React49.createElement(PopoverCloseButton, null), /* @__PURE__ */ React49.createElement(PopoverWizardBody, null, children))));
|
5472
5492
|
};
|
5473
5493
|
var SporProvider = ({
|
5474
5494
|
theme: theme3 = theme,
|
@@ -5476,7 +5496,7 @@ var SporProvider = ({
|
|
5476
5496
|
children,
|
5477
5497
|
...props
|
5478
5498
|
}) => {
|
5479
|
-
return /* @__PURE__ */
|
5499
|
+
return /* @__PURE__ */ React49__default.createElement(LanguageProvider, { language }, /* @__PURE__ */ React49__default.createElement(ChakraProvider, { theme: theme3, ...props }, /* @__PURE__ */ React49__default.createElement(Global, { styles: fontFaces }), /* @__PURE__ */ React49__default.createElement(
|
5480
5500
|
Global,
|
5481
5501
|
{
|
5482
5502
|
styles: `
|
@@ -5486,7 +5506,7 @@ var SporProvider = ({
|
|
5486
5506
|
}
|
5487
5507
|
), children));
|
5488
5508
|
};
|
5489
|
-
var StepperContext =
|
5509
|
+
var StepperContext = React49__default.createContext(null);
|
5490
5510
|
var StepperProvider = ({
|
5491
5511
|
activeStep,
|
5492
5512
|
children,
|
@@ -5494,7 +5514,7 @@ var StepperProvider = ({
|
|
5494
5514
|
colorScheme,
|
5495
5515
|
numberOfSteps
|
5496
5516
|
}) => {
|
5497
|
-
return /* @__PURE__ */
|
5517
|
+
return /* @__PURE__ */ React49__default.createElement(
|
5498
5518
|
StepperContext.Provider,
|
5499
5519
|
{
|
5500
5520
|
value: { activeStep, onClick, colorScheme, numberOfSteps }
|
@@ -5503,7 +5523,7 @@ var StepperProvider = ({
|
|
5503
5523
|
);
|
5504
5524
|
};
|
5505
5525
|
var useStepper = () => {
|
5506
|
-
const context =
|
5526
|
+
const context = React49__default.useContext(StepperContext);
|
5507
5527
|
if (!context) {
|
5508
5528
|
throw new Error(
|
5509
5529
|
"useStepper must be used within a StepperProvider. Most likely, you forgot to wrap your StepperStep in a Stepper component"
|
@@ -5525,7 +5545,7 @@ var Stepper = ({
|
|
5525
5545
|
const numberOfSteps = steps.length;
|
5526
5546
|
const activeStep = Number(activeStepAsStringOrNumber);
|
5527
5547
|
const { t: t2 } = useTranslation();
|
5528
|
-
return /* @__PURE__ */
|
5548
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { __css: style.root }, /* @__PURE__ */ React49__default.createElement(
|
5529
5549
|
StepperProvider,
|
5530
5550
|
{
|
5531
5551
|
onClick,
|
@@ -5533,24 +5553,24 @@ var Stepper = ({
|
|
5533
5553
|
colorScheme,
|
5534
5554
|
numberOfSteps
|
5535
5555
|
},
|
5536
|
-
/* @__PURE__ */
|
5556
|
+
/* @__PURE__ */ React49__default.createElement(Box, { __css: style.container }, /* @__PURE__ */ React49__default.createElement(Box, { __css: style.innerContainer }, /* @__PURE__ */ React49__default.createElement(HStack, null, activeStep > 1 && /* @__PURE__ */ React49__default.createElement(
|
5537
5557
|
IconButton,
|
5538
5558
|
{
|
5539
5559
|
"aria-label": t2(texts20.back),
|
5540
|
-
icon: /* @__PURE__ */
|
5560
|
+
icon: /* @__PURE__ */ React49__default.createElement(DropdownLeftFill24Icon, null),
|
5541
5561
|
variant: "ghost",
|
5542
5562
|
size: "sm",
|
5543
5563
|
onClick: () => onClick(activeStep - 1),
|
5544
5564
|
__css: style.backButton
|
5545
5565
|
}
|
5546
|
-
), /* @__PURE__ */
|
5566
|
+
), /* @__PURE__ */ React49__default.createElement(
|
5547
5567
|
SimplePopover,
|
5548
5568
|
{
|
5549
|
-
triggerElement: /* @__PURE__ */
|
5569
|
+
triggerElement: /* @__PURE__ */ React49__default.createElement(Box, { as: "button", __css: style.stepCounter }, t2(texts20.stepsOf(activeStep, numberOfSteps))),
|
5550
5570
|
borderRadius: "xs"
|
5551
5571
|
},
|
5552
|
-
steps.map((step, index) => /* @__PURE__ */
|
5553
|
-
)), title && /* @__PURE__ */
|
5572
|
+
steps.map((step, index) => /* @__PURE__ */ React49__default.createElement(StepperStep, { key: step, stepNumber: index + 1 }, step))
|
5573
|
+
)), title && /* @__PURE__ */ React49__default.createElement(Box, { as: "h3", __css: style.title }, title)), /* @__PURE__ */ React49__default.createElement(Flex, { justifyContent: "center", display: ["none", "flex"] }, steps.map((step, index) => /* @__PURE__ */ React49__default.createElement(StepperStep, { key: index, stepNumber: index + 1 }, step))))
|
5554
5574
|
));
|
5555
5575
|
};
|
5556
5576
|
var texts20 = createTexts({
|
@@ -5574,7 +5594,7 @@ var StepperStep = ({ children, stepNumber }) => {
|
|
5574
5594
|
variant,
|
5575
5595
|
colorScheme
|
5576
5596
|
});
|
5577
|
-
return /* @__PURE__ */
|
5597
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { __css: style.stepContainer }, stepNumber > 1 && /* @__PURE__ */ React49__default.createElement(DropdownRightFill18Icon, { mx: 5, display: ["none", "block"] }), /* @__PURE__ */ React49__default.createElement(
|
5578
5598
|
Flex,
|
5579
5599
|
{
|
5580
5600
|
__css: style.stepButton,
|
@@ -5584,8 +5604,8 @@ var StepperStep = ({ children, stepNumber }) => {
|
|
5584
5604
|
disabled: variant === "disabled" || variant === "active",
|
5585
5605
|
onClick: () => onClick(stepNumber)
|
5586
5606
|
},
|
5587
|
-
/* @__PURE__ */
|
5588
|
-
/* @__PURE__ */
|
5607
|
+
/* @__PURE__ */ React49__default.createElement(Box, { __css: style.stepNumber }, stepNumber),
|
5608
|
+
/* @__PURE__ */ React49__default.createElement(Box, { __css: style.stepTitle }, children)
|
5589
5609
|
));
|
5590
5610
|
};
|
5591
5611
|
var getVariant = (stepNumber, activeStep) => {
|
@@ -5598,11 +5618,11 @@ var getVariant = (stepNumber, activeStep) => {
|
|
5598
5618
|
return "disabled";
|
5599
5619
|
};
|
5600
5620
|
var Tabs = forwardRef((props, ref) => {
|
5601
|
-
return /* @__PURE__ */
|
5621
|
+
return /* @__PURE__ */ React49.createElement(Tabs$1, { ...props, ref });
|
5602
5622
|
});
|
5603
5623
|
var Table = forwardRef((props, ref) => {
|
5604
5624
|
const { variant, size: size2, colorScheme, children, ...rest } = props;
|
5605
|
-
return /* @__PURE__ */
|
5625
|
+
return /* @__PURE__ */ React49__default.createElement(Box, { ...rest, ...getStyleProps(props) }, /* @__PURE__ */ React49__default.createElement(Box, { overflowX: "auto" }, /* @__PURE__ */ React49__default.createElement(
|
5606
5626
|
Table$1,
|
5607
5627
|
{
|
5608
5628
|
variant,
|
@@ -14229,12 +14249,12 @@ var theme = {
|
|
14229
14249
|
};
|
14230
14250
|
var BaseToast = ({ children, variant, id }) => {
|
14231
14251
|
const styles2 = useStyleConfig("Toast", { variant });
|
14232
|
-
return /* @__PURE__ */
|
14252
|
+
return /* @__PURE__ */ React49__default.createElement(Flex, { sx: styles2, id }, /* @__PURE__ */ React49__default.createElement(ToastIcon, { variant }), children);
|
14233
14253
|
};
|
14234
14254
|
var ToastIcon = ({ variant }) => {
|
14235
14255
|
const Icon = getIcon3(variant);
|
14236
14256
|
const { t: t2 } = useTranslation();
|
14237
|
-
return /* @__PURE__ */
|
14257
|
+
return /* @__PURE__ */ React49__default.createElement(
|
14238
14258
|
Icon,
|
14239
14259
|
{
|
14240
14260
|
flexShrink: 0,
|
@@ -14284,7 +14304,7 @@ var ActionToast = ({
|
|
14284
14304
|
buttonText,
|
14285
14305
|
id
|
14286
14306
|
}) => {
|
14287
|
-
return /* @__PURE__ */
|
14307
|
+
return /* @__PURE__ */ React49__default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React49__default.createElement(Box, { marginRight: 2, flexGrow: "1" }, children), /* @__PURE__ */ React49__default.createElement(Button, { variant: "additional", size: "sm", onClick }, buttonText));
|
14288
14308
|
};
|
14289
14309
|
var ClosableToast = ({
|
14290
14310
|
children,
|
@@ -14294,13 +14314,13 @@ var ClosableToast = ({
|
|
14294
14314
|
}) => {
|
14295
14315
|
const styles2 = useMultiStyleConfig("Toast", { variant });
|
14296
14316
|
const { t: t2 } = useTranslation();
|
14297
|
-
return /* @__PURE__ */
|
14317
|
+
return /* @__PURE__ */ React49__default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React49__default.createElement(Box, { flexGrow: "1" }, children), /* @__PURE__ */ React49__default.createElement(
|
14298
14318
|
IconButton,
|
14299
14319
|
{
|
14300
14320
|
sx: styles2.dismissButton,
|
14301
14321
|
variant: "ghost",
|
14302
14322
|
"aria-label": t2(texts22.dismiss),
|
14303
|
-
icon: /* @__PURE__ */
|
14323
|
+
icon: /* @__PURE__ */ React49__default.createElement(CloseFill18Icon, null),
|
14304
14324
|
onClick: onClose
|
14305
14325
|
}
|
14306
14326
|
));
|
@@ -14328,7 +14348,7 @@ var useToast = () => {
|
|
14328
14348
|
};
|
14329
14349
|
var getToastComponent = (opts) => {
|
14330
14350
|
if ("isClosable" in opts && opts.isClosable) {
|
14331
|
-
return ({ onClose, id }) => /* @__PURE__ */
|
14351
|
+
return ({ onClose, id }) => /* @__PURE__ */ React49__default.createElement(
|
14332
14352
|
ClosableToast,
|
14333
14353
|
{
|
14334
14354
|
id,
|
@@ -14344,7 +14364,7 @@ var getToastComponent = (opts) => {
|
|
14344
14364
|
);
|
14345
14365
|
}
|
14346
14366
|
if ("buttonText" in opts) {
|
14347
|
-
return ({ id }) => /* @__PURE__ */
|
14367
|
+
return ({ id }) => /* @__PURE__ */ React49__default.createElement(
|
14348
14368
|
ActionToast,
|
14349
14369
|
{
|
14350
14370
|
id,
|
@@ -14355,7 +14375,7 @@ var getToastComponent = (opts) => {
|
|
14355
14375
|
opts.text
|
14356
14376
|
);
|
14357
14377
|
}
|
14358
|
-
return ({ id }) => /* @__PURE__ */
|
14378
|
+
return ({ id }) => /* @__PURE__ */ React49__default.createElement(BaseToast, { id, variant: opts.variant }, opts.text);
|
14359
14379
|
};
|
14360
14380
|
|
14361
14381
|
export { Accordion, AttachedInputs, Badge, Button, ButtonGroup, Card, CardSelect, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, ColorInlineLoader, ColorSpinner, 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, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, ListBox, ModalHeader, NativeSelect, NumericStepper, PasswordInput, PhoneNumberInput, PlayPauseButton, PopoverWizardBody, ProgressBar, ProgressLoader, Radio, RadioGroup, SearchInput, SelectItemDescription, SelectItemLabel, 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 };
|