@vygruppen/spor-react 12.2.0 → 12.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +31 -12
- package/.turbo/turbo-typegen.log +19 -1
- package/CHANGELOG.md +8 -0
- package/dist/index.d.mts +43 -94
- package/dist/index.d.ts +43 -94
- package/dist/index.js +346 -337
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +233 -224
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/input/ChoiceChip.tsx +39 -66
- package/src/theme/slot-recipes/anatomy.ts +10 -0
- package/src/theme/slot-recipes/choice-chip.ts +183 -0
- package/src/theme/slot-recipes/index.ts +2 -0
- package/src/theme/recipes/choice-chip.ts +0 -144
package/dist/index.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
var react = require('@chakra-ui/react');
|
4
4
|
var sporIconReact = require('@vygruppen/spor-icon-react');
|
5
|
-
var
|
5
|
+
var React29 = require('react');
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
7
7
|
var sporLoader = require('@vygruppen/spor-loader');
|
8
8
|
var ReactLottie = require('lottie-react');
|
@@ -45,7 +45,7 @@ function _interopNamespace(e) {
|
|
45
45
|
return Object.freeze(n);
|
46
46
|
}
|
47
47
|
|
48
|
-
var
|
48
|
+
var React29__namespace = /*#__PURE__*/_interopNamespace(React29);
|
49
49
|
var ReactLottie__default = /*#__PURE__*/_interopDefault(ReactLottie);
|
50
50
|
var tokens20__namespace = /*#__PURE__*/_interopNamespace(tokens20);
|
51
51
|
var cargonetJson__default = /*#__PURE__*/_interopDefault(cargonetJson);
|
@@ -86,7 +86,7 @@ var warnAboutMismatchingIcon = ({
|
|
86
86
|
}
|
87
87
|
}
|
88
88
|
};
|
89
|
-
var Accordion =
|
89
|
+
var Accordion = React29.forwardRef(
|
90
90
|
(props, ref) => {
|
91
91
|
const { variant = "core", children, gap = 2, ...rest } = props;
|
92
92
|
const recipe = react.useSlotRecipe({ key: "accordion" });
|
@@ -103,7 +103,7 @@ var Accordion = React28.forwardRef(
|
|
103
103
|
);
|
104
104
|
}
|
105
105
|
);
|
106
|
-
var AccordionItemTrigger =
|
106
|
+
var AccordionItemTrigger = React29.forwardRef(function AccordionItemTrigger2(props, ref) {
|
107
107
|
const { startElement, children, headingLevel, ...rest } = props;
|
108
108
|
warnAboutMismatchingIcon({ icon: startElement });
|
109
109
|
const recipe = react.useSlotRecipe({ key: "accordion" });
|
@@ -116,7 +116,7 @@ var AccordionItemTrigger = React28.forwardRef(function AccordionItemTrigger2(pro
|
|
116
116
|
/* @__PURE__ */ jsxRuntime.jsx(react.Accordion.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.DropdownDownFill24Icon, {}) })
|
117
117
|
] }) });
|
118
118
|
});
|
119
|
-
var AccordionItemContent =
|
119
|
+
var AccordionItemContent = React29.forwardRef(function AccordionItemContent2(props, ref) {
|
120
120
|
const { children } = props;
|
121
121
|
const recipe = react.useSlotRecipe({ key: "accordion" });
|
122
122
|
const styles = recipe();
|
@@ -124,7 +124,7 @@ var AccordionItemContent = React28.forwardRef(function AccordionItemContent2(pro
|
|
124
124
|
});
|
125
125
|
Accordion.displayName = "Accordion";
|
126
126
|
var AccordionItem = react.Accordion.Item;
|
127
|
-
var Expandable =
|
127
|
+
var Expandable = React29.forwardRef(
|
128
128
|
(props, ref) => {
|
129
129
|
const { title, children, headingLevel, startElement, ...rest } = props;
|
130
130
|
return /* @__PURE__ */ jsxRuntime.jsx(Accordion, { ...props, ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
@@ -169,7 +169,7 @@ var Language = /* @__PURE__ */ ((Language3) => {
|
|
169
169
|
Language3["English"] = "en";
|
170
170
|
return Language3;
|
171
171
|
})(Language || {});
|
172
|
-
var LanguageContext =
|
172
|
+
var LanguageContext = React29.createContext(void 0);
|
173
173
|
function LanguageProvider({
|
174
174
|
language,
|
175
175
|
children
|
@@ -177,7 +177,7 @@ function LanguageProvider({
|
|
177
177
|
return /* @__PURE__ */ jsxRuntime.jsx(LanguageContext.Provider, { value: language, children });
|
178
178
|
}
|
179
179
|
function useLanguage() {
|
180
|
-
const language =
|
180
|
+
const language = React29.useContext(LanguageContext);
|
181
181
|
if (!language) {
|
182
182
|
throw new Error("Please wrap your application in a LanguageProvider");
|
183
183
|
}
|
@@ -195,8 +195,8 @@ function createTexts(texts27) {
|
|
195
195
|
}
|
196
196
|
var hydrating = true;
|
197
197
|
function useHydrated() {
|
198
|
-
const [hydrated, setHydrated] =
|
199
|
-
|
198
|
+
const [hydrated, setHydrated] = React29.useState(() => !hydrating);
|
199
|
+
React29.useEffect(function hydrate() {
|
200
200
|
hydrating = false;
|
201
201
|
setHydrated(true);
|
202
202
|
}, []);
|
@@ -339,11 +339,11 @@ var LightSpinner = ({
|
|
339
339
|
] });
|
340
340
|
};
|
341
341
|
var useRotatingLabel = ({ label, delay }) => {
|
342
|
-
const loadingTextArray =
|
342
|
+
const loadingTextArray = React29.useMemo(
|
343
343
|
() => Array.isArray(label) ? label : [label],
|
344
344
|
[label]
|
345
345
|
);
|
346
|
-
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] =
|
346
|
+
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] = React29.useState(0);
|
347
347
|
usehooksTs.useInterval(() => {
|
348
348
|
setCurrentLoadingTextIndex(
|
349
349
|
(prevIndex) => (prevIndex + 1) % loadingTextArray.length
|
@@ -351,7 +351,7 @@ var useRotatingLabel = ({ label, delay }) => {
|
|
351
351
|
}, delay);
|
352
352
|
return loadingTextArray[currentLoadingTextIndex];
|
353
353
|
};
|
354
|
-
var ProgressBar =
|
354
|
+
var ProgressBar = React29.forwardRef(
|
355
355
|
({
|
356
356
|
value,
|
357
357
|
label,
|
@@ -397,9 +397,9 @@ var progressLoaderRecipe = react.defineRecipe({
|
|
397
397
|
}
|
398
398
|
});
|
399
399
|
var usePathLength = (value) => {
|
400
|
-
const pathRef =
|
401
|
-
const [pathLength, setPathLength] =
|
402
|
-
|
400
|
+
const pathRef = React29.useRef(null);
|
401
|
+
const [pathLength, setPathLength] = React29.useState(0);
|
402
|
+
React29.useEffect(() => {
|
403
403
|
if (pathRef.current) {
|
404
404
|
const totalLength = pathRef.current.getTotalLength();
|
405
405
|
setPathLength(totalLength);
|
@@ -409,7 +409,7 @@ var usePathLength = (value) => {
|
|
409
409
|
return { pathRef, pathLength, progressOffset };
|
410
410
|
};
|
411
411
|
var ProgressLoaderWrapper = react.chakra("div", progressLoaderRecipe);
|
412
|
-
var ProgressLoader =
|
412
|
+
var ProgressLoader = React29.forwardRef(
|
413
413
|
({
|
414
414
|
value,
|
415
415
|
label,
|
@@ -433,7 +433,7 @@ var ProgressLoader = React28.forwardRef(
|
|
433
433
|
pathLength: progressPathLength,
|
434
434
|
progressOffset
|
435
435
|
} = usePathLength(value);
|
436
|
-
const id =
|
436
|
+
const id = React29.useId();
|
437
437
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
438
438
|
ProgressLoaderWrapper,
|
439
439
|
{
|
@@ -565,7 +565,7 @@ var skeletonRecipe = react.defineRecipe({
|
|
565
565
|
}
|
566
566
|
}
|
567
567
|
});
|
568
|
-
var SkeletonCircle =
|
568
|
+
var SkeletonCircle = React29__namespace.forwardRef(function SkeletonCircle2(props, ref) {
|
569
569
|
const recipe = react.useRecipe({ recipe: skeletonRecipe });
|
570
570
|
const [recipeProps, restProps] = recipe.splitVariantProps({
|
571
571
|
loading: true,
|
@@ -575,7 +575,7 @@ var SkeletonCircle = React28__namespace.forwardRef(function SkeletonCircle2(prop
|
|
575
575
|
const { size, css, ...rest } = restProps;
|
576
576
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Circle, { size, asChild: true, ref, children: /* @__PURE__ */ jsxRuntime.jsx(react.Skeleton, { css: { ...recipe(recipeProps), ...css }, ...rest }) });
|
577
577
|
});
|
578
|
-
var SkeletonText =
|
578
|
+
var SkeletonText = React29.forwardRef(
|
579
579
|
function SkeletonText2(props, ref) {
|
580
580
|
const recipe = react.useRecipe({ recipe: skeletonRecipe });
|
581
581
|
const [recipeProps, restProps] = recipe.splitVariantProps({
|
@@ -596,7 +596,7 @@ var SkeletonText = React28.forwardRef(
|
|
596
596
|
)) });
|
597
597
|
}
|
598
598
|
);
|
599
|
-
var Skeleton =
|
599
|
+
var Skeleton = React29.forwardRef(
|
600
600
|
function SkeletonText3(props, ref) {
|
601
601
|
const recipe = react.useRecipe({ recipe: skeletonRecipe });
|
602
602
|
const [recipeProps, restProps] = recipe.splitVariantProps({
|
@@ -634,7 +634,7 @@ var LoadingContent = ({
|
|
634
634
|
loadingText && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: loadingText })
|
635
635
|
] })
|
636
636
|
] });
|
637
|
-
var Button =
|
637
|
+
var Button = React29.forwardRef(
|
638
638
|
({
|
639
639
|
loading,
|
640
640
|
disabled,
|
@@ -667,7 +667,7 @@ var Button = React28.forwardRef(
|
|
667
667
|
variant,
|
668
668
|
size,
|
669
669
|
...rest,
|
670
|
-
children: rest.asChild ?
|
670
|
+
children: rest.asChild ? React29.cloneElement(children, {
|
671
671
|
children: renderContent()
|
672
672
|
}) : renderContent()
|
673
673
|
}
|
@@ -701,7 +701,7 @@ var groupRecipe = react.defineRecipe({
|
|
701
701
|
}
|
702
702
|
});
|
703
703
|
var Group = react.chakra(react.Group, groupRecipe);
|
704
|
-
var ButtonGroup =
|
704
|
+
var ButtonGroup = React29.forwardRef(
|
705
705
|
(props, ref) => {
|
706
706
|
const { children, disabled, grow, attached, ...rest } = props;
|
707
707
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
@@ -718,7 +718,7 @@ var ButtonGroup = React28.forwardRef(
|
|
718
718
|
}
|
719
719
|
);
|
720
720
|
ButtonGroup.displayName = "ButtonGroup";
|
721
|
-
var Badge =
|
721
|
+
var Badge = React29.forwardRef(function Badge2({ icon, children, ...props }, ref) {
|
722
722
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Badge, { ref, ...props, children: [
|
723
723
|
children,
|
724
724
|
icon && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: icon })
|
@@ -841,12 +841,12 @@ var codeRecipie = react.defineRecipe({
|
|
841
841
|
}
|
842
842
|
});
|
843
843
|
var StyledCode = react.chakra(react.Code, codeRecipie);
|
844
|
-
var Code =
|
844
|
+
var Code = React29__namespace.default.forwardRef(
|
845
845
|
function Code2(props, ref) {
|
846
846
|
return /* @__PURE__ */ jsxRuntime.jsx(StyledCode, { ...props, ref });
|
847
847
|
}
|
848
848
|
);
|
849
|
-
var Heading =
|
849
|
+
var Heading = React29.forwardRef(
|
850
850
|
function Heading2(props, ref) {
|
851
851
|
const {
|
852
852
|
as,
|
@@ -869,13 +869,13 @@ var Heading = React28.forwardRef(
|
|
869
869
|
);
|
870
870
|
}
|
871
871
|
);
|
872
|
-
var Text3 =
|
872
|
+
var Text3 = React29.forwardRef(
|
873
873
|
function Text4(props, ref) {
|
874
874
|
const { variant = "sm", ...rest } = props;
|
875
875
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { ...rest, textStyle: variant, ref });
|
876
876
|
}
|
877
877
|
);
|
878
|
-
var ClipboardIcon =
|
878
|
+
var ClipboardIcon = React29__namespace.forwardRef((props, ref) => {
|
879
879
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
880
880
|
react.Clipboard.Indicator,
|
881
881
|
{
|
@@ -887,7 +887,7 @@ var ClipboardIcon = React28__namespace.forwardRef((props, ref) => {
|
|
887
887
|
);
|
888
888
|
});
|
889
889
|
ClipboardIcon.displayName = "ClipboardIcon";
|
890
|
-
var ClipboardCopyText =
|
890
|
+
var ClipboardCopyText = React29__namespace.forwardRef((props, ref) => {
|
891
891
|
const { t } = useTranslation();
|
892
892
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
893
893
|
react.Clipboard.Indicator,
|
@@ -900,7 +900,7 @@ var ClipboardCopyText = React28__namespace.forwardRef((props, ref) => {
|
|
900
900
|
);
|
901
901
|
});
|
902
902
|
ClipboardCopyText.displayName = "ClipboardCopyText";
|
903
|
-
var ClipboardButton =
|
903
|
+
var ClipboardButton = React29__namespace.forwardRef((props, ref) => {
|
904
904
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Clipboard.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { ref, size: "xs", leftIcon: /* @__PURE__ */ jsxRuntime.jsx(ClipboardIcon, {}), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(ClipboardCopyText, {}) }) });
|
905
905
|
});
|
906
906
|
ClipboardButton.displayName = "ClipboardButton";
|
@@ -919,7 +919,7 @@ var texts3 = createTexts({
|
|
919
919
|
sv: "Kopierad"
|
920
920
|
}
|
921
921
|
});
|
922
|
-
var IconButton =
|
922
|
+
var IconButton = React29.forwardRef(
|
923
923
|
(props, ref) => {
|
924
924
|
const { icon, size = "sm", loading = false, ...rest } = props;
|
925
925
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
@@ -936,7 +936,7 @@ var IconButton = React28.forwardRef(
|
|
936
936
|
}
|
937
937
|
);
|
938
938
|
IconButton.displayName = "IconButton";
|
939
|
-
var CloseButton =
|
939
|
+
var CloseButton = React29.forwardRef(
|
940
940
|
({ size = "sm", ...props }, ref) => {
|
941
941
|
const { t } = useTranslation();
|
942
942
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
@@ -975,7 +975,7 @@ var texts4 = createTexts({
|
|
975
975
|
sv: "St\xE4ng"
|
976
976
|
}
|
977
977
|
});
|
978
|
-
var FloatingActionButton =
|
978
|
+
var FloatingActionButton = React29.forwardRef(
|
979
979
|
({
|
980
980
|
children,
|
981
981
|
icon,
|
@@ -984,11 +984,11 @@ var FloatingActionButton = React28.forwardRef(
|
|
984
984
|
placement = "bottom right",
|
985
985
|
...props
|
986
986
|
}, ref) => {
|
987
|
-
const [isTextVisible, setIsTextVisible] =
|
987
|
+
const [isTextVisible, setIsTextVisible] = React29__namespace.default.useState(
|
988
988
|
externalIsTextVisible === void 0 ? false : externalIsTextVisible
|
989
989
|
);
|
990
990
|
const scrollDirection = useScrollDirection();
|
991
|
-
|
991
|
+
React29.useEffect(() => {
|
992
992
|
if (externalIsTextVisible !== void 0) {
|
993
993
|
return;
|
994
994
|
}
|
@@ -998,7 +998,7 @@ var FloatingActionButton = React28.forwardRef(
|
|
998
998
|
);
|
999
999
|
return () => globalThis.clearTimeout(id);
|
1000
1000
|
}, [scrollDirection, externalIsTextVisible]);
|
1001
|
-
|
1001
|
+
React29.useEffect(() => {
|
1002
1002
|
setIsTextVisible(!!externalIsTextVisible);
|
1003
1003
|
}, [externalIsTextVisible]);
|
1004
1004
|
const recipe = react.useSlotRecipe({ key: "floatingActionButton" });
|
@@ -1025,11 +1025,11 @@ var FloatingActionButton = React28.forwardRef(
|
|
1025
1025
|
);
|
1026
1026
|
FloatingActionButton.displayName = "FloatingActionButton";
|
1027
1027
|
var useScrollDirection = () => {
|
1028
|
-
const [scrollDirection, setScrollDirection] =
|
1029
|
-
const lastScrollPosition =
|
1028
|
+
const [scrollDirection, setScrollDirection] = React29__namespace.default.useState(null);
|
1029
|
+
const lastScrollPosition = React29__namespace.default.useRef(
|
1030
1030
|
globalThis.window === void 0 ? 0 : window.scrollY
|
1031
1031
|
);
|
1032
|
-
|
1032
|
+
React29__namespace.default.useEffect(() => {
|
1033
1033
|
const onScroll = () => {
|
1034
1034
|
const delta = window.scrollY - lastScrollPosition.current;
|
1035
1035
|
if (delta === 0) {
|
@@ -1135,7 +1135,7 @@ var texts5 = createTexts({
|
|
1135
1135
|
en: "Service"
|
1136
1136
|
}
|
1137
1137
|
});
|
1138
|
-
var Alert =
|
1138
|
+
var Alert = React29.forwardRef((props, ref) => {
|
1139
1139
|
const {
|
1140
1140
|
title,
|
1141
1141
|
showIndicator = true,
|
@@ -1182,7 +1182,7 @@ var Alert = React28.forwardRef((props, ref) => {
|
|
1182
1182
|
] });
|
1183
1183
|
});
|
1184
1184
|
Alert.displayName = "Alert";
|
1185
|
-
var ExpandableAlert =
|
1185
|
+
var ExpandableAlert = React29.forwardRef(
|
1186
1186
|
(props, ref) => {
|
1187
1187
|
const {
|
1188
1188
|
variant = "info",
|
@@ -1243,7 +1243,7 @@ var ExpandableAlert = React28.forwardRef(
|
|
1243
1243
|
}
|
1244
1244
|
);
|
1245
1245
|
ExpandableAlert.displayName = "ExpandableAlert";
|
1246
|
-
var ServiceAlert =
|
1246
|
+
var ServiceAlert = React29.forwardRef(
|
1247
1247
|
(props, ref) => {
|
1248
1248
|
const {
|
1249
1249
|
variant = "service",
|
@@ -1345,14 +1345,14 @@ var texts6 = createTexts({
|
|
1345
1345
|
en: "Traffic announcement"
|
1346
1346
|
}
|
1347
1347
|
});
|
1348
|
-
var Breadcrumb =
|
1348
|
+
var Breadcrumb = React29.forwardRef(
|
1349
1349
|
({ children, ...props }, ref) => {
|
1350
|
-
const validChildren =
|
1351
|
-
(element) =>
|
1350
|
+
const validChildren = React29__namespace.default.Children.toArray(children).filter(
|
1351
|
+
(element) => React29__namespace.default.isValidElement(element)
|
1352
1352
|
);
|
1353
1353
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Root, { ref, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.List, { children: validChildren.map((child, index) => {
|
1354
1354
|
const isLast = index === validChildren.length - 1;
|
1355
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
1355
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React29__namespace.default.Fragment, { children: [
|
1356
1356
|
/* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Item, { children: child }),
|
1357
1357
|
!isLast && /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Separator, { "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.DropdownRightFill18Icon, {}) })
|
1358
1358
|
] }, index);
|
@@ -1382,7 +1382,7 @@ function ColorModeIcon() {
|
|
1382
1382
|
const { colorMode } = useColorMode();
|
1383
1383
|
return colorMode === "dark" ? /* @__PURE__ */ jsxRuntime.jsx(lu.LuMoon, {}) : /* @__PURE__ */ jsxRuntime.jsx(lu.LuSun, {});
|
1384
1384
|
}
|
1385
|
-
var ColorModeButton =
|
1385
|
+
var ColorModeButton = React29__namespace.forwardRef(function ColorModeButton2(props, ref) {
|
1386
1386
|
const { toggleColorMode } = useColorMode();
|
1387
1387
|
return /* @__PURE__ */ jsxRuntime.jsx(react.ClientOnly, { fallback: /* @__PURE__ */ jsxRuntime.jsx(react.Skeleton, { boxSize: "8" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
1388
1388
|
react.IconButton,
|
@@ -1403,7 +1403,7 @@ var ColorModeButton = React28__namespace.forwardRef(function ColorModeButton2(pr
|
|
1403
1403
|
}
|
1404
1404
|
) });
|
1405
1405
|
});
|
1406
|
-
var Field =
|
1406
|
+
var Field = React29__namespace.forwardRef(
|
1407
1407
|
(props, ref) => {
|
1408
1408
|
const { label, children, helperText, errorText, ...rest } = props;
|
1409
1409
|
const recipe = react.useSlotRecipe({ key: "field" });
|
@@ -1417,7 +1417,7 @@ var Field = React28__namespace.forwardRef(
|
|
1417
1417
|
}
|
1418
1418
|
);
|
1419
1419
|
Field.displayName = "Field";
|
1420
|
-
var FieldErrorText =
|
1420
|
+
var FieldErrorText = React29__namespace.forwardRef((props, ref) => {
|
1421
1421
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Field.ErrorText, { ref, children: props.children });
|
1422
1422
|
});
|
1423
1423
|
FieldErrorText.displayName = "FieldErrorText";
|
@@ -1662,6 +1662,15 @@ var datepickerAnatomy = anatomy.createAnatomy("datepicker").parts(
|
|
1662
1662
|
"box",
|
1663
1663
|
"rangeCalendarPopover"
|
1664
1664
|
);
|
1665
|
+
var checkboxCardAnatomy = anatomy.createAnatomy("checkbox-card", [
|
1666
|
+
"root",
|
1667
|
+
"control",
|
1668
|
+
"label",
|
1669
|
+
"description",
|
1670
|
+
"addon",
|
1671
|
+
"indicator",
|
1672
|
+
"content"
|
1673
|
+
]);
|
1665
1674
|
|
1666
1675
|
// src/theme/slot-recipes/datepicker.ts
|
1667
1676
|
var datePickerSlotRecipe = react.defineSlotRecipe({
|
@@ -1876,7 +1885,7 @@ function CalendarCell({
|
|
1876
1885
|
currentMonth,
|
1877
1886
|
variant
|
1878
1887
|
}) {
|
1879
|
-
const ref =
|
1888
|
+
const ref = React29.useRef(null);
|
1880
1889
|
const {
|
1881
1890
|
cellProps,
|
1882
1891
|
buttonProps,
|
@@ -1904,7 +1913,7 @@ function CalendarCell({
|
|
1904
1913
|
if (isOutsideMonth) {
|
1905
1914
|
stateProps["data-unavailable"] = true;
|
1906
1915
|
}
|
1907
|
-
|
1916
|
+
React29.useEffect(() => {
|
1908
1917
|
var _a5;
|
1909
1918
|
(_a5 = ref.current) == null ? void 0 : _a5.addEventListener(
|
1910
1919
|
"touchend",
|
@@ -2015,7 +2024,7 @@ function CalendarNavigationButton({
|
|
2015
2024
|
"aria-label": ariaLabel,
|
2016
2025
|
...rest
|
2017
2026
|
}) {
|
2018
|
-
const ref =
|
2027
|
+
const ref = React29.useRef(null);
|
2019
2028
|
const { buttonProps } = reactAria.useButton(rest, ref);
|
2020
2029
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
2021
2030
|
IconButton,
|
@@ -2176,7 +2185,7 @@ var texts8 = createTexts({
|
|
2176
2185
|
en: "Calendar"
|
2177
2186
|
}
|
2178
2187
|
});
|
2179
|
-
var CalendarTriggerButton =
|
2188
|
+
var CalendarTriggerButton = React29.forwardRef(({ variant, disabled, ariaLabelledby, ...buttonProps }) => {
|
2180
2189
|
const { t } = useTranslation();
|
2181
2190
|
const recipe = react.useSlotRecipe({
|
2182
2191
|
key: "datePicker",
|
@@ -2204,9 +2213,9 @@ var texts9 = createTexts({
|
|
2204
2213
|
en: "Open calendar"
|
2205
2214
|
}
|
2206
2215
|
});
|
2207
|
-
var DateTimeSegment =
|
2216
|
+
var DateTimeSegment = React29.forwardRef(
|
2208
2217
|
({ segment, state, ariaLabel, ariaDescription }, externalRef) => {
|
2209
|
-
const internalRef =
|
2218
|
+
const internalRef = React29.useRef(null);
|
2210
2219
|
const ref = externalRef ?? internalRef;
|
2211
2220
|
const { segmentProps } = reactAria.useDateSegment(
|
2212
2221
|
segment,
|
@@ -2254,7 +2263,7 @@ function createCalendar2(identifier) {
|
|
2254
2263
|
}
|
2255
2264
|
}
|
2256
2265
|
}
|
2257
|
-
var DateField =
|
2266
|
+
var DateField = React29.forwardRef(
|
2258
2267
|
({ labelId, ...props }, externalRef) => {
|
2259
2268
|
var _a5;
|
2260
2269
|
const locale = useCurrentLocale();
|
@@ -2269,7 +2278,7 @@ var DateField = React28.forwardRef(
|
|
2269
2278
|
createCalendar: createCalendar2
|
2270
2279
|
});
|
2271
2280
|
const { t } = useTranslation();
|
2272
|
-
const internalRef =
|
2281
|
+
const internalRef = React29.useRef(null);
|
2273
2282
|
const ref = externalRef ?? internalRef;
|
2274
2283
|
const { fieldProps } = reactAria.useDateField(
|
2275
2284
|
props,
|
@@ -2346,7 +2355,7 @@ var getAriaLabel = (segmentType) => {
|
|
2346
2355
|
}
|
2347
2356
|
}
|
2348
2357
|
};
|
2349
|
-
var StyledField =
|
2358
|
+
var StyledField = React29.forwardRef(
|
2350
2359
|
function StyledField2(props, ref) {
|
2351
2360
|
const { children, variant, isDisabled, ariaLabelledby, ...otherProps } = props;
|
2352
2361
|
const { invalid } = react.useFieldContext() ?? {
|
@@ -2370,7 +2379,7 @@ var StyledField = React28.forwardRef(
|
|
2370
2379
|
);
|
2371
2380
|
}
|
2372
2381
|
);
|
2373
|
-
var DatePicker =
|
2382
|
+
var DatePicker = React29.forwardRef(
|
2374
2383
|
({
|
2375
2384
|
variant,
|
2376
2385
|
errorMessage,
|
@@ -2388,15 +2397,15 @@ var DatePicker = React28.forwardRef(
|
|
2388
2397
|
isRequired: props.isRequired ?? (chakraFieldProps == null ? void 0 : chakraFieldProps.required),
|
2389
2398
|
validationState: (chakraFieldProps == null ? void 0 : chakraFieldProps.invalid) ? "invalid" : "valid"
|
2390
2399
|
});
|
2391
|
-
const internalRef =
|
2400
|
+
const internalRef = React29.useRef(null);
|
2392
2401
|
const ref = externalRef ?? internalRef;
|
2393
2402
|
const { labelProps, fieldProps, buttonProps, dialogProps, calendarProps } = reactAria.useDatePicker(
|
2394
2403
|
props,
|
2395
2404
|
state,
|
2396
2405
|
ref
|
2397
2406
|
);
|
2398
|
-
const labelId = `label-${
|
2399
|
-
const inputGroupId = `input-group-${
|
2407
|
+
const labelId = `label-${React29.useId()}`;
|
2408
|
+
const inputGroupId = `input-group-${React29.useId()}`;
|
2400
2409
|
const recipe = react.useSlotRecipe({
|
2401
2410
|
key: "datePicker",
|
2402
2411
|
recipe: datePickerSlotRecipe
|
@@ -2485,7 +2494,7 @@ function RangeCalendar(props) {
|
|
2485
2494
|
recipe: datePickerSlotRecipe
|
2486
2495
|
});
|
2487
2496
|
const styles = recipe({});
|
2488
|
-
const ref =
|
2497
|
+
const ref = React29.useRef(null);
|
2489
2498
|
const { calendarProps, title } = reactAria.useRangeCalendar(props, state, ref);
|
2490
2499
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { ...calendarProps, ref, css: styles.rangeCalendarPopover, children: [
|
2491
2500
|
/* @__PURE__ */ jsxRuntime.jsx(CalendarHeader, { state, title }),
|
@@ -2517,7 +2526,7 @@ function DateRangePicker({
|
|
2517
2526
|
isRequired: props.isRequired ?? (fieldContextPRops == null ? void 0 : fieldContextPRops.required),
|
2518
2527
|
validationState: (fieldContextPRops == null ? void 0 : fieldContextPRops.invalid) ? "invalid" : "valid"
|
2519
2528
|
});
|
2520
|
-
const ref =
|
2529
|
+
const ref = React29.useRef(null);
|
2521
2530
|
const uniqueId = reactAria.useId();
|
2522
2531
|
const datePickerId = `date-range-picker-${uniqueId}`;
|
2523
2532
|
const {
|
@@ -2595,7 +2604,7 @@ function DateRangePicker({
|
|
2595
2604
|
] }) });
|
2596
2605
|
}
|
2597
2606
|
var TimeField = ({ state, ...props }) => {
|
2598
|
-
const ref =
|
2607
|
+
const ref = React29.useRef(null);
|
2599
2608
|
const { labelProps, fieldProps } = reactAria.useTimeField(props, state, ref);
|
2600
2609
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
|
2601
2610
|
/* @__PURE__ */ jsxRuntime.jsx(
|
@@ -2765,7 +2774,7 @@ var texts11 = createTexts({
|
|
2765
2774
|
function useFieldContext4() {
|
2766
2775
|
throw new Error("Function not implemented.");
|
2767
2776
|
}
|
2768
|
-
var DialogContent =
|
2777
|
+
var DialogContent = React29__namespace.forwardRef((props, ref) => {
|
2769
2778
|
const {
|
2770
2779
|
children,
|
2771
2780
|
portalled = true,
|
@@ -2779,7 +2788,7 @@ var DialogContent = React28__namespace.forwardRef((props, ref) => {
|
|
2779
2788
|
] });
|
2780
2789
|
});
|
2781
2790
|
DialogContent.displayName = "DialogContent";
|
2782
|
-
var DialogCloseTrigger =
|
2791
|
+
var DialogCloseTrigger = React29__namespace.forwardRef(function DialogCloseTrigger2(props, ref) {
|
2783
2792
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Dialog.CloseTrigger, { ref, ...props, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "md" }) });
|
2784
2793
|
});
|
2785
2794
|
var DialogRoot = react.Dialog.Root;
|
@@ -2794,7 +2803,7 @@ var DialogActionTrigger = react.Dialog.ActionTrigger;
|
|
2794
2803
|
var [RootDrawerProvider, useRootDrawerProps] = react.createContext({
|
2795
2804
|
name: "RootDrawerProvider"
|
2796
2805
|
});
|
2797
|
-
var DrawerContent =
|
2806
|
+
var DrawerContent = React29.forwardRef(
|
2798
2807
|
(props, ref) => {
|
2799
2808
|
const { children, portalled = true, portalRef, ...rest } = props;
|
2800
2809
|
const { size, placement } = useRootDrawerProps();
|
@@ -2807,7 +2816,7 @@ var DrawerContent = React28.forwardRef(
|
|
2807
2816
|
}
|
2808
2817
|
);
|
2809
2818
|
DrawerContent.displayName = "DrawerContent";
|
2810
|
-
var CloseDrawerLine =
|
2819
|
+
var CloseDrawerLine = React29.forwardRef((props, ref) => {
|
2811
2820
|
const { t } = useTranslation();
|
2812
2821
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
2813
2822
|
react.Drawer.CloseTrigger,
|
@@ -2834,17 +2843,17 @@ var CloseDrawerLine = React28.forwardRef((props, ref) => {
|
|
2834
2843
|
);
|
2835
2844
|
});
|
2836
2845
|
CloseDrawerLine.displayName = "CloseDrawerLine";
|
2837
|
-
var DrawerCloseTrigger =
|
2846
|
+
var DrawerCloseTrigger = React29.forwardRef(function DrawerCloseTrigger2(props, ref) {
|
2838
2847
|
const { size } = useRootDrawerProps();
|
2839
2848
|
const { t } = useTranslation();
|
2840
2849
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.CloseTrigger, { ref, ...props, asChild: true, children: size === "full" ? /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", leftIcon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.CloseFill24Icon, {}), children: t(texts12.close) }) : /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "md" }) });
|
2841
2850
|
});
|
2842
|
-
var DrawerBackTrigger =
|
2851
|
+
var DrawerBackTrigger = React29.forwardRef((props, ref) => {
|
2843
2852
|
const { t } = useTranslation();
|
2844
2853
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.CloseTrigger, { asChild: true, ...props, ref, top: "0", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", leftIcon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.ArrowLeftFill24Icon, {}), children: t(texts12.back) }) });
|
2845
2854
|
});
|
2846
2855
|
DrawerBackTrigger.displayName = "DrawerBackTrigger";
|
2847
|
-
var DrawerFullScreenHeader =
|
2856
|
+
var DrawerFullScreenHeader = React29.forwardRef((props, ref) => {
|
2848
2857
|
const { backTrigger = true, title } = props;
|
2849
2858
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.Header, { ...props, ref, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Grid, { templateColumns: "1fr auto 1fr", height: "auto", paddingX: "8", children: [
|
2850
2859
|
/* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "center", children: backTrigger && /* @__PURE__ */ jsxRuntime.jsx(DrawerBackTrigger, {}) }),
|
@@ -2923,7 +2932,7 @@ var attachedInputsRecipe = react.defineRecipe({
|
|
2923
2932
|
}
|
2924
2933
|
});
|
2925
2934
|
var StyledGroup = react.chakra(react.Group, attachedInputsRecipe);
|
2926
|
-
var AttachedInputs =
|
2935
|
+
var AttachedInputs = React29.forwardRef(
|
2927
2936
|
(props, ref) => {
|
2928
2937
|
return /* @__PURE__ */ jsxRuntime.jsx(StyledGroup, { ref, attached: true, ...props });
|
2929
2938
|
}
|
@@ -2932,7 +2941,7 @@ AttachedInputs.displayName = "AttachedInputs";
|
|
2932
2941
|
var CardSelect = ({ size = "md", ...props }) => {
|
2933
2942
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Root, { size, ...props });
|
2934
2943
|
};
|
2935
|
-
var CardSelectContent =
|
2944
|
+
var CardSelectContent = React29.forwardRef(
|
2936
2945
|
({ children, ...props }, ref) => {
|
2937
2946
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Content, { ref, padding: 0, bg: "none", children: /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Body, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
2938
2947
|
StaticCard,
|
@@ -2953,7 +2962,7 @@ var bgActiveStyleMap = {
|
|
2953
2962
|
ghost: "ghost.surface.active",
|
2954
2963
|
floating: "floating.surface.active"
|
2955
2964
|
};
|
2956
|
-
var CardSelectTrigger =
|
2965
|
+
var CardSelectTrigger = React29.forwardRef(
|
2957
2966
|
({ icon, variant = "core", withChevron = true, size, children, ...props }, ref) => {
|
2958
2967
|
const ChevronIcon = size === "sm" ? sporIconReact.DropdownDownFill18Icon : sporIconReact.DropdownDownFill24Icon;
|
2959
2968
|
const { open } = react.usePopoverContext();
|
@@ -2978,7 +2987,7 @@ var CardSelectTrigger = React28.forwardRef(
|
|
2978
2987
|
}
|
2979
2988
|
);
|
2980
2989
|
CardSelectTrigger.displayName = "CardSelectTrigger";
|
2981
|
-
var Checkbox =
|
2990
|
+
var Checkbox = React29__namespace.forwardRef(
|
2982
2991
|
(props, ref) => {
|
2983
2992
|
const { children, inputProps, rootRef, ...rest } = props;
|
2984
2993
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Checkbox.Root, { ref: rootRef, ...rest, children: [
|
@@ -2989,192 +2998,27 @@ var Checkbox = React28__namespace.forwardRef(
|
|
2989
2998
|
}
|
2990
2999
|
);
|
2991
3000
|
Checkbox.displayName = "Checkbox";
|
2992
|
-
var CheckboxGroup =
|
3001
|
+
var CheckboxGroup = React29.forwardRef(
|
2993
3002
|
(props, ref) => {
|
2994
3003
|
const { direction = "row", children, gap = 1, ...rest } = props;
|
2995
3004
|
return /* @__PURE__ */ jsxRuntime.jsx(react.CheckboxGroup, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { direction, gap, children }) });
|
2996
3005
|
}
|
2997
3006
|
);
|
2998
3007
|
CheckboxGroup.displayName = "CheckboxGroup";
|
2999
|
-
var
|
3000
|
-
|
3001
|
-
|
3002
|
-
|
3003
|
-
|
3004
|
-
|
3005
|
-
|
3006
|
-
|
3007
|
-
|
3008
|
-
|
3009
|
-
height: 6,
|
3010
|
-
paddingInlineStart: "2",
|
3011
|
-
paddingInlineEnd: "2",
|
3012
|
-
outline: "1px solid",
|
3013
|
-
outlineColor: "base.outline",
|
3014
|
-
_checked: {
|
3015
|
-
backgroundColor: "brand.surface",
|
3016
|
-
borderRadius: "sm",
|
3017
|
-
outline: "none",
|
3018
|
-
color: "brand.text",
|
3019
|
-
_hover: {
|
3020
|
-
backgroundColor: "brand.surface.hover",
|
3021
|
-
_active: {
|
3022
|
-
backgroundColor: "brand.surface.active"
|
3023
|
-
}
|
3024
|
-
}
|
3025
|
-
},
|
3026
|
-
_focusVisible: {
|
3027
|
-
outline: "2px solid",
|
3028
|
-
outlineColor: "outline.focus",
|
3029
|
-
outlineOffset: "1px"
|
3030
|
-
},
|
3031
|
-
_disabled: {
|
3032
|
-
pointerEvents: "none",
|
3033
|
-
boxShadow: "none",
|
3034
|
-
backgroundColor: "surface.disabled",
|
3035
|
-
color: "text.disabled",
|
3036
|
-
outline: "none",
|
3037
|
-
_hover: {
|
3038
|
-
backgroundColor: "core.surface.disabled",
|
3039
|
-
boxShadow: "none",
|
3040
|
-
color: "core.text.disabled"
|
3041
|
-
},
|
3042
|
-
_checked: {
|
3043
|
-
cursor: "not-allowed",
|
3044
|
-
boxShadow: "none",
|
3045
|
-
color: "core.text.disabled",
|
3046
|
-
backgroundColor: "core.surface.disabled",
|
3047
|
-
_hover: {
|
3048
|
-
backgroundColor: "core.surface.disabled",
|
3049
|
-
boxShadow: "none",
|
3050
|
-
color: "core.text.disabled"
|
3051
|
-
}
|
3052
|
-
}
|
3053
|
-
}
|
3054
|
-
},
|
3055
|
-
variants: {
|
3056
|
-
variant: {
|
3057
|
-
core: {
|
3058
|
-
color: "core.text",
|
3059
|
-
outlineColor: "core.outline",
|
3060
|
-
_hover: {
|
3061
|
-
outline: "2px solid",
|
3062
|
-
outlineColor: "core.outline.hover",
|
3063
|
-
_active: {
|
3064
|
-
outline: "1px solid",
|
3065
|
-
outlineColor: "core.outline",
|
3066
|
-
backgroundColor: "core.surface.active"
|
3067
|
-
}
|
3068
|
-
}
|
3069
|
-
},
|
3070
|
-
accent: {
|
3071
|
-
backgroundColor: "accent.surface",
|
3072
|
-
color: "accent.text",
|
3073
|
-
outline: "none",
|
3074
|
-
_hover: {
|
3075
|
-
backgroundColor: "accent.surface.hover",
|
3076
|
-
_active: {
|
3077
|
-
backgroundColor: "accent.surface.active"
|
3078
|
-
}
|
3079
|
-
}
|
3080
|
-
},
|
3081
|
-
floating: {
|
3082
|
-
backgroundColor: "floating.surface",
|
3083
|
-
outline: "1px solid",
|
3084
|
-
outlineColor: "floating.outline",
|
3085
|
-
color: "floating.text",
|
3086
|
-
boxShadow: "sm",
|
3087
|
-
_hover: {
|
3088
|
-
backgroundColor: "floating.surface.hover",
|
3089
|
-
outline: "1px solid",
|
3090
|
-
outlineColor: "floating.outline.hover",
|
3091
|
-
_active: {
|
3092
|
-
backgroundColor: "floating.surface.active",
|
3093
|
-
outline: "1px solid",
|
3094
|
-
outlineColor: "floating.outline"
|
3095
|
-
}
|
3096
|
-
}
|
3097
|
-
}
|
3098
|
-
},
|
3099
|
-
size: {
|
3100
|
-
xs: {
|
3101
|
-
_checked: {
|
3102
|
-
borderRadius: "0.563rem"
|
3103
|
-
},
|
3104
|
-
height: 5,
|
3105
|
-
paddingX: 1.5
|
3106
|
-
},
|
3107
|
-
sm: {
|
3108
|
-
_checked: {
|
3109
|
-
borderRadius: "sm"
|
3110
|
-
},
|
3111
|
-
height: 6,
|
3112
|
-
paddingX: 2
|
3113
|
-
},
|
3114
|
-
md: {
|
3115
|
-
_checked: {
|
3116
|
-
borderRadius: "sm"
|
3117
|
-
},
|
3118
|
-
height: 7,
|
3119
|
-
paddingX: 2
|
3120
|
-
},
|
3121
|
-
lg: {
|
3122
|
-
_checked: {
|
3123
|
-
borderRadius: "md"
|
3124
|
-
},
|
3125
|
-
height: 8,
|
3126
|
-
paddingX: 3
|
3127
|
-
}
|
3128
|
-
}
|
3008
|
+
var ChoiceChip = React29.forwardRef(
|
3009
|
+
({ children, icon, ...rootProps }, ref) => {
|
3010
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.CheckboxCard.Root, { ...rootProps, children: /* @__PURE__ */ jsxRuntime.jsx(react.CheckboxCard.Context, { children: ({ checked }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
3011
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CheckboxCard.HiddenInput, { ref }),
|
3012
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CheckboxCard.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(react.CheckboxCard.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.CheckboxCard.Label, { children: [
|
3013
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx(react.Span, { width: "24px", children: checked ? icon.checked : icon.default }),
|
3014
|
+
rootProps.chipType !== "icon" && children,
|
3015
|
+
rootProps.chipType === "filter" && checked && /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.CloseOutline24Icon, {})
|
3016
|
+
] }) }) })
|
3017
|
+
] }) }) });
|
3129
3018
|
}
|
3130
|
-
|
3131
|
-
|
3132
|
-
var
|
3133
|
-
children,
|
3134
|
-
icon,
|
3135
|
-
size = "sm",
|
3136
|
-
chipType = "choice",
|
3137
|
-
variant = "core",
|
3138
|
-
...props
|
3139
|
-
}) => {
|
3140
|
-
const {
|
3141
|
-
getControlProps,
|
3142
|
-
disabled,
|
3143
|
-
getLabelProps,
|
3144
|
-
getHiddenInputProps,
|
3145
|
-
setChecked,
|
3146
|
-
checked
|
3147
|
-
} = react.useCheckbox(props);
|
3148
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
3149
|
-
react.chakra.label,
|
3150
|
-
{
|
3151
|
-
...getLabelProps(),
|
3152
|
-
"aria-label": props["aria-label"] ?? String(children),
|
3153
|
-
children: [
|
3154
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
3155
|
-
react.chakra.input,
|
3156
|
-
{
|
3157
|
-
...getHiddenInputProps(),
|
3158
|
-
disabled,
|
3159
|
-
defaultChecked: checked,
|
3160
|
-
value: checked ? "on" : "off",
|
3161
|
-
type: "checkbox",
|
3162
|
-
"aria-checked": checked,
|
3163
|
-
onClick: () => {
|
3164
|
-
setChecked(!checked);
|
3165
|
-
}
|
3166
|
-
}
|
3167
|
-
),
|
3168
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ChoiceChipStyledDiv, { ...getControlProps(), size, variant, children: [
|
3169
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx(react.Span, { children: checked ? icon.checked : icon.default }),
|
3170
|
-
chipType !== "icon" && /* @__PURE__ */ jsxRuntime.jsx(react.Span, { children }),
|
3171
|
-
chipType === "filter" && checked && /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.CloseOutline24Icon, { marginLeft: 1.5 })
|
3172
|
-
] })
|
3173
|
-
]
|
3174
|
-
}
|
3175
|
-
);
|
3176
|
-
};
|
3177
|
-
var Popover = React28.forwardRef(
|
3019
|
+
);
|
3020
|
+
ChoiceChip.displayName = "ChoiceChip";
|
3021
|
+
var Popover = React29.forwardRef(
|
3178
3022
|
({
|
3179
3023
|
children,
|
3180
3024
|
state,
|
@@ -3188,7 +3032,7 @@ var Popover = React28.forwardRef(
|
|
3188
3032
|
containerPadding = 12
|
3189
3033
|
}, ref) => {
|
3190
3034
|
var _a5;
|
3191
|
-
const internalRef =
|
3035
|
+
const internalRef = React29.useRef(null);
|
3192
3036
|
const popoverRef = ref ?? internalRef;
|
3193
3037
|
const { popoverProps, underlayProps } = reactAria.usePopover(
|
3194
3038
|
{
|
@@ -3226,7 +3070,7 @@ var Popover = React28.forwardRef(
|
|
3226
3070
|
}
|
3227
3071
|
);
|
3228
3072
|
Popover.displayName = "Popover";
|
3229
|
-
var Combobox =
|
3073
|
+
var Combobox = React29.forwardRef(
|
3230
3074
|
(props) => {
|
3231
3075
|
const {
|
3232
3076
|
label,
|
@@ -3255,11 +3099,11 @@ var Combobox = React28.forwardRef(
|
|
3255
3099
|
variant
|
3256
3100
|
} = props;
|
3257
3101
|
const { contains } = reactAria.useFilter({ sensitivity: "base" });
|
3258
|
-
const fallbackInputRef =
|
3102
|
+
const fallbackInputRef = React29.useRef(null);
|
3259
3103
|
const inputRef = externalInputRef ?? fallbackInputRef;
|
3260
|
-
const listBoxRef =
|
3261
|
-
const popoverRef =
|
3262
|
-
const listboxId = `${
|
3104
|
+
const listBoxRef = React29.useRef(null);
|
3105
|
+
const popoverRef = React29.useRef(null);
|
3106
|
+
const listboxId = `${React29.useId()}-listbox`;
|
3263
3107
|
const inputWidth = useInputWidth(inputRef);
|
3264
3108
|
const state = reactStately.useComboBoxState({
|
3265
3109
|
defaultFilter: contains,
|
@@ -3364,8 +3208,8 @@ var Combobox = React28.forwardRef(
|
|
3364
3208
|
);
|
3365
3209
|
Combobox.displayName = "Combobox";
|
3366
3210
|
var useInputWidth = (inputRef) => {
|
3367
|
-
const [inputWidth, setInputWidth] =
|
3368
|
-
|
3211
|
+
const [inputWidth, setInputWidth] = React29.useState("auto");
|
3212
|
+
React29.useEffect(() => {
|
3369
3213
|
const onResize = debounce(() => {
|
3370
3214
|
if (inputRef.current) {
|
3371
3215
|
setInputWidth(`${inputRef.current.offsetWidth}px`);
|
@@ -3478,7 +3322,7 @@ var inputRecipe = react.defineRecipe({
|
|
3478
3322
|
variant: "core"
|
3479
3323
|
}
|
3480
3324
|
});
|
3481
|
-
var InputGroup =
|
3325
|
+
var InputGroup = React29__namespace.forwardRef(
|
3482
3326
|
(props, ref) => {
|
3483
3327
|
const {
|
3484
3328
|
startElement,
|
@@ -3499,7 +3343,7 @@ var InputGroup = React28__namespace.forwardRef(
|
|
3499
3343
|
children: startElement
|
3500
3344
|
}
|
3501
3345
|
),
|
3502
|
-
|
3346
|
+
React29__namespace.cloneElement(children, {
|
3503
3347
|
...children.props
|
3504
3348
|
}),
|
3505
3349
|
label && /* @__PURE__ */ jsxRuntime.jsx(FieldLabel, { left: startElement ? 4 : "0", right: endElement ? 4 : 0, children: label }),
|
@@ -3509,7 +3353,7 @@ var InputGroup = React28__namespace.forwardRef(
|
|
3509
3353
|
);
|
3510
3354
|
InputGroup.displayName = "InputGroup";
|
3511
3355
|
var StyledInput = react.chakra(react.Input, inputRecipe);
|
3512
|
-
var Input =
|
3356
|
+
var Input = React29.forwardRef(
|
3513
3357
|
({
|
3514
3358
|
startElement,
|
3515
3359
|
endElement,
|
@@ -3545,7 +3389,7 @@ var Input = React28.forwardRef(
|
|
3545
3389
|
}
|
3546
3390
|
);
|
3547
3391
|
Input.displayName = "Input";
|
3548
|
-
var ListBox =
|
3392
|
+
var ListBox = React29.forwardRef(
|
3549
3393
|
(props) => {
|
3550
3394
|
const { loading, listBoxRef, state, maxWidth, variant, children } = props;
|
3551
3395
|
const { listBoxProps } = reactAria.useListBox(props, state, listBoxRef);
|
@@ -3582,7 +3426,7 @@ function ItemDescription({ children }) {
|
|
3582
3426
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { ...descriptionProps, css: styles, fontSize: "xs", children });
|
3583
3427
|
}
|
3584
3428
|
function Option({ item, state }) {
|
3585
|
-
const ref =
|
3429
|
+
const ref = React29.useRef(null);
|
3586
3430
|
const {
|
3587
3431
|
optionProps,
|
3588
3432
|
isSelected,
|
@@ -3607,7 +3451,7 @@ function Option({ item, state }) {
|
|
3607
3451
|
if (isFocusVisible) {
|
3608
3452
|
dataFields["data-focus-visible"] = true;
|
3609
3453
|
}
|
3610
|
-
|
3454
|
+
React29.useEffect(() => {
|
3611
3455
|
var _a5;
|
3612
3456
|
(_a5 = ref == null ? void 0 : ref.current) == null ? void 0 : _a5.addEventListener(
|
3613
3457
|
"touchend",
|
@@ -3619,12 +3463,12 @@ function Option({ item, state }) {
|
|
3619
3463
|
}, []);
|
3620
3464
|
return /* @__PURE__ */ jsxRuntime.jsx(OptionContext.Provider, { value: { labelProps, descriptionProps }, children: /* @__PURE__ */ jsxRuntime.jsx(react.ListItem, { ...optionProps, ...dataFields, ref, css: styles.item, children: item.rendered }) });
|
3621
3465
|
}
|
3622
|
-
var OptionContext =
|
3466
|
+
var OptionContext = React29__namespace.default.createContext({
|
3623
3467
|
labelProps: {},
|
3624
3468
|
descriptionProps: {}
|
3625
3469
|
});
|
3626
3470
|
var useOptionContext = () => {
|
3627
|
-
return
|
3471
|
+
return React29.useContext(OptionContext);
|
3628
3472
|
};
|
3629
3473
|
function ListBoxSection({ section, state }) {
|
3630
3474
|
var _a5, _b4;
|
@@ -3839,7 +3683,7 @@ var nativeSelectSlotRecipe = react.defineSlotRecipe({
|
|
3839
3683
|
}
|
3840
3684
|
}
|
3841
3685
|
});
|
3842
|
-
var NativeSelect =
|
3686
|
+
var NativeSelect = React29__namespace.forwardRef(function NativeSelect2(props, ref) {
|
3843
3687
|
const {
|
3844
3688
|
children,
|
3845
3689
|
variant = "core",
|
@@ -3929,7 +3773,7 @@ var numericStepperRecipe = react.defineSlotRecipe({
|
|
3929
3773
|
}
|
3930
3774
|
}
|
3931
3775
|
});
|
3932
|
-
var NumericStepper =
|
3776
|
+
var NumericStepper = React29__namespace.default.forwardRef(
|
3933
3777
|
({
|
3934
3778
|
name: nameProp,
|
3935
3779
|
id: idProp,
|
@@ -3944,7 +3788,7 @@ var NumericStepper = React28__namespace.default.forwardRef(
|
|
3944
3788
|
showZero = false,
|
3945
3789
|
ariaLabelContext = { singular: "", plural: "" }
|
3946
3790
|
}) => {
|
3947
|
-
const addButtonRef =
|
3791
|
+
const addButtonRef = React29.useRef(null);
|
3948
3792
|
const { t } = useTranslation();
|
3949
3793
|
const recipe = react.useSlotRecipe({ recipe: numericStepperRecipe });
|
3950
3794
|
const styles = recipe();
|
@@ -4036,7 +3880,7 @@ var NumericStepper = React28__namespace.default.forwardRef(
|
|
4036
3880
|
}
|
4037
3881
|
);
|
4038
3882
|
NumericStepper.displayName = "NumericStepper";
|
4039
|
-
var VerySmallButton =
|
3883
|
+
var VerySmallButton = React29__namespace.default.forwardRef((props, ref) => {
|
4040
3884
|
const recipe = react.useSlotRecipe({ recipe: numericStepperRecipe });
|
4041
3885
|
const styles = recipe({ colorPalette: "default" });
|
4042
3886
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
@@ -4119,7 +3963,7 @@ var texts13 = createTexts({
|
|
4119
3963
|
};
|
4120
3964
|
}
|
4121
3965
|
});
|
4122
|
-
var PasswordInput =
|
3966
|
+
var PasswordInput = React29.forwardRef(
|
4123
3967
|
(props, ref) => {
|
4124
3968
|
const {
|
4125
3969
|
defaultVisible,
|
@@ -4164,7 +4008,7 @@ var PasswordInput = React28.forwardRef(
|
|
4164
4008
|
}
|
4165
4009
|
);
|
4166
4010
|
PasswordInput.displayName = "PasswordInput";
|
4167
|
-
var VisibilityTrigger =
|
4011
|
+
var VisibilityTrigger = React29__namespace.default.forwardRef(
|
4168
4012
|
(props, ref) => {
|
4169
4013
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
4170
4014
|
react.Button,
|
@@ -4210,7 +4054,7 @@ var sortedCallingCodes = awesomePhonenumber.getSupportedCallingCodes().sort((a,
|
|
4210
4054
|
var callingCodes = react.createListCollection({
|
4211
4055
|
items: [...prioritizedCountryCodes, ...sortedCallingCodes]
|
4212
4056
|
});
|
4213
|
-
var CountryCodeSelect =
|
4057
|
+
var CountryCodeSelect = React29.forwardRef((props, ref) => {
|
4214
4058
|
const { t } = useTranslation();
|
4215
4059
|
if (props.allowedCountryCodes) {
|
4216
4060
|
callingCodes.items = callingCodes.items.filter(
|
@@ -4243,7 +4087,7 @@ var texts15 = createTexts({
|
|
4243
4087
|
sv: "Landskod"
|
4244
4088
|
}
|
4245
4089
|
});
|
4246
|
-
var PhoneNumberInput =
|
4090
|
+
var PhoneNumberInput = React29.forwardRef((props, ref) => {
|
4247
4091
|
const {
|
4248
4092
|
label: externalLabel,
|
4249
4093
|
value: externalValue,
|
@@ -4339,7 +4183,7 @@ var texts16 = createTexts({
|
|
4339
4183
|
sv: "Landskod"
|
4340
4184
|
}
|
4341
4185
|
});
|
4342
|
-
var Radio =
|
4186
|
+
var Radio = React29.forwardRef((props, ref) => {
|
4343
4187
|
const { children, inputProps, rootRef, ...rest } = props;
|
4344
4188
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioGroup.Item, { ref: rootRef, ...rest, children: [
|
4345
4189
|
/* @__PURE__ */ jsxRuntime.jsx(react.RadioGroup.ItemHiddenInput, { ref, ...inputProps }),
|
@@ -4348,13 +4192,13 @@ var Radio = React28.forwardRef((props, ref) => {
|
|
4348
4192
|
] });
|
4349
4193
|
});
|
4350
4194
|
Radio.displayName = "Radio";
|
4351
|
-
var RadioGroup =
|
4195
|
+
var RadioGroup = React29.forwardRef(
|
4352
4196
|
(props, ref) => {
|
4353
4197
|
return /* @__PURE__ */ jsxRuntime.jsx(react.RadioGroup.Root, { ref, ...props, "aria-labelledby": "" });
|
4354
4198
|
}
|
4355
4199
|
);
|
4356
4200
|
RadioGroup.displayName = "RadioGroup";
|
4357
|
-
var SearchInput =
|
4201
|
+
var SearchInput = React29.forwardRef(
|
4358
4202
|
(props, ref) => {
|
4359
4203
|
const { t } = useTranslation();
|
4360
4204
|
const { variant = "core", onReset, label, value } = props;
|
@@ -4398,7 +4242,7 @@ var texts17 = createTexts({
|
|
4398
4242
|
en: "Reset search field"
|
4399
4243
|
}
|
4400
4244
|
});
|
4401
|
-
var Select =
|
4245
|
+
var Select = React29__namespace.forwardRef(
|
4402
4246
|
(props, ref) => {
|
4403
4247
|
const { variant = "core", children, positioning, label, ...rest } = props;
|
4404
4248
|
const recipe = react.useSlotRecipe({ key: "select" });
|
@@ -4422,7 +4266,7 @@ var Select = React28__namespace.forwardRef(
|
|
4422
4266
|
}
|
4423
4267
|
);
|
4424
4268
|
Select.displayName = "Select";
|
4425
|
-
var SelectItem =
|
4269
|
+
var SelectItem = React29__namespace.forwardRef(
|
4426
4270
|
(props, ref) => {
|
4427
4271
|
const { item, children, description, ...rest } = props;
|
4428
4272
|
const recipe = react.useSlotRecipe({ key: "select" });
|
@@ -4437,14 +4281,14 @@ var SelectItem = React28__namespace.forwardRef(
|
|
4437
4281
|
}
|
4438
4282
|
);
|
4439
4283
|
SelectItem.displayName = "SelectItem";
|
4440
|
-
var SelectItemGroup =
|
4284
|
+
var SelectItemGroup = React29__namespace.forwardRef(function SelectItemGroup2(props, ref) {
|
4441
4285
|
const { children, label, ...rest } = props;
|
4442
4286
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Select.ItemGroup, { ...rest, ref, children: [
|
4443
4287
|
/* @__PURE__ */ jsxRuntime.jsx(react.Select.ItemGroupLabel, { children: label }),
|
4444
4288
|
children
|
4445
4289
|
] });
|
4446
4290
|
});
|
4447
|
-
var SelectTrigger =
|
4291
|
+
var SelectTrigger = React29__namespace.forwardRef(function SelectTrigger2(props, ref) {
|
4448
4292
|
const { children, clearable, ...rest } = props;
|
4449
4293
|
const recipe = react.useSlotRecipe({ key: "select" });
|
4450
4294
|
const styles = recipe();
|
@@ -4456,7 +4300,7 @@ var SelectTrigger = React28__namespace.forwardRef(function SelectTrigger2(props,
|
|
4456
4300
|
] })
|
4457
4301
|
] });
|
4458
4302
|
});
|
4459
|
-
var SelectClearTrigger =
|
4303
|
+
var SelectClearTrigger = React29__namespace.forwardRef(function SelectClearTrigger2(props, ref) {
|
4460
4304
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Select.ClearTrigger, { asChild: true, ...props, ref, children: /* @__PURE__ */ jsxRuntime.jsx(
|
4461
4305
|
CloseButton,
|
4462
4306
|
{
|
@@ -4467,11 +4311,11 @@ var SelectClearTrigger = React28__namespace.forwardRef(function SelectClearTrigg
|
|
4467
4311
|
}
|
4468
4312
|
) });
|
4469
4313
|
});
|
4470
|
-
var SelectContent =
|
4314
|
+
var SelectContent = React29__namespace.forwardRef(function SelectContent2(props, ref) {
|
4471
4315
|
const { portalled = true, portalRef, ...rest } = props;
|
4472
4316
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsxRuntime.jsx(react.Select.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Select.Content, { ...rest, ref }) }) });
|
4473
4317
|
});
|
4474
|
-
var SelectValueText =
|
4318
|
+
var SelectValueText = React29__namespace.forwardRef(function SelectValueText2(props, ref) {
|
4475
4319
|
const { children, withPlaceholder, placeholder, ...rest } = props;
|
4476
4320
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
4477
4321
|
react.Select.ValueText,
|
@@ -4496,7 +4340,7 @@ var SelectValueText = React28__namespace.forwardRef(function SelectValueText2(pr
|
|
4496
4340
|
var SelectLabel = react.Select.Label;
|
4497
4341
|
var SelectItemText = react.Select.ItemText;
|
4498
4342
|
var SelectRoot = react.Select.Root;
|
4499
|
-
var Switch =
|
4343
|
+
var Switch = React29.forwardRef((props) => {
|
4500
4344
|
const { rootRef, size = "md", label, ...rest } = props;
|
4501
4345
|
const recipe = react.useSlotRecipe({ key: "switch" });
|
4502
4346
|
const styles = recipe({ size });
|
@@ -4517,9 +4361,9 @@ var Switch = React28.forwardRef((props) => {
|
|
4517
4361
|
});
|
4518
4362
|
Switch.displayName = "Switch";
|
4519
4363
|
var useLabelHeight = (label) => {
|
4520
|
-
const labelRef =
|
4521
|
-
const [labelHeight, setLabelHeight] =
|
4522
|
-
|
4364
|
+
const labelRef = React29.useRef(null);
|
4365
|
+
const [labelHeight, setLabelHeight] = React29.useState(0);
|
4366
|
+
React29.useLayoutEffect(() => {
|
4523
4367
|
const updateLabelHeight = () => {
|
4524
4368
|
if (labelRef.current) {
|
4525
4369
|
setLabelHeight(labelRef.current.offsetHeight);
|
@@ -4539,7 +4383,7 @@ var useLabelHeight = (label) => {
|
|
4539
4383
|
}, [label]);
|
4540
4384
|
return { labelRef, labelHeight };
|
4541
4385
|
};
|
4542
|
-
var Textarea =
|
4386
|
+
var Textarea = React29.forwardRef(
|
4543
4387
|
(props, ref) => {
|
4544
4388
|
const { label, variant = "core", ...fieldProps } = props;
|
4545
4389
|
const recipe = react.useRecipe({ key: "textarea" });
|
@@ -4650,13 +4494,13 @@ var pressableCardRecipe = react.defineRecipe({
|
|
4650
4494
|
}
|
4651
4495
|
});
|
4652
4496
|
var PressableCardButton = react.chakra("button", pressableCardRecipe);
|
4653
|
-
var PressableCard =
|
4497
|
+
var PressableCard = React29.forwardRef(
|
4654
4498
|
(props, ref) => {
|
4655
4499
|
return /* @__PURE__ */ jsxRuntime.jsx(PressableCardButton, { ...props, ref });
|
4656
4500
|
}
|
4657
4501
|
);
|
4658
4502
|
PressableCard.displayName = "PressableCard";
|
4659
|
-
var RadioCard =
|
4503
|
+
var RadioCard = React29.forwardRef(
|
4660
4504
|
(props, ref) => {
|
4661
4505
|
const { inputProps, children, value, ariaLabel } = props;
|
4662
4506
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.Item, { ...props, children: [
|
@@ -4673,7 +4517,7 @@ var RadioCard = React28.forwardRef(
|
|
4673
4517
|
}
|
4674
4518
|
);
|
4675
4519
|
RadioCard.displayName = "RadioCard";
|
4676
|
-
var RadioCardGroup =
|
4520
|
+
var RadioCardGroup = React29.forwardRef(
|
4677
4521
|
(props, ref) => {
|
4678
4522
|
const {
|
4679
4523
|
children,
|
@@ -4782,7 +4626,7 @@ var separatorRecipe = react.defineRecipe({
|
|
4782
4626
|
}
|
4783
4627
|
]
|
4784
4628
|
});
|
4785
|
-
var Separator =
|
4629
|
+
var Separator = React29.forwardRef(
|
4786
4630
|
(props, ref) => {
|
4787
4631
|
const {
|
4788
4632
|
size = "md",
|
@@ -4833,7 +4677,7 @@ var staticCardRecipe = react.defineRecipe({
|
|
4833
4677
|
}
|
4834
4678
|
});
|
4835
4679
|
var StyledCardBox = react.chakra("div", staticCardRecipe);
|
4836
|
-
var StaticCard =
|
4680
|
+
var StaticCard = React29.forwardRef(
|
4837
4681
|
(props, ref) => {
|
4838
4682
|
return /* @__PURE__ */ jsxRuntime.jsx(StyledCardBox, { ...props, ref });
|
4839
4683
|
}
|
@@ -4885,7 +4729,7 @@ var getCorrectIcon = ({ variant, size }) => {
|
|
4885
4729
|
var _a5;
|
4886
4730
|
return ((_a5 = icons[variant]) == null ? void 0 : _a5[size]) ?? react.Box;
|
4887
4731
|
};
|
4888
|
-
var LineIcon =
|
4732
|
+
var LineIcon = React29.forwardRef(
|
4889
4733
|
function LineIcon2({
|
4890
4734
|
variant,
|
4891
4735
|
size = "md",
|
@@ -4960,7 +4804,7 @@ var InfoTag = ({
|
|
4960
4804
|
] })
|
4961
4805
|
] });
|
4962
4806
|
};
|
4963
|
-
var TravelTag =
|
4807
|
+
var TravelTag = React29.forwardRef(
|
4964
4808
|
function TravelTag2({
|
4965
4809
|
variant,
|
4966
4810
|
size = "md",
|
@@ -5037,13 +4881,13 @@ var ExternalIcon = ({ label }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fra
|
|
5037
4881
|
/* @__PURE__ */ jsxRuntime.jsx(sporIconReact.LinkOutOutline24Icon, { "aria-hidden": true }),
|
5038
4882
|
/* @__PURE__ */ jsxRuntime.jsx(react.VisuallyHidden, { children: label })
|
5039
4883
|
] });
|
5040
|
-
var TextLink =
|
4884
|
+
var TextLink = React29.forwardRef(
|
5041
4885
|
({ children, external, href, ...props }, ref) => {
|
5042
4886
|
const { t } = useTranslation();
|
5043
4887
|
const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
|
5044
4888
|
const externalLabel = t ? t(texts18.externalLink) : texts18.externalLink.en;
|
5045
|
-
if (props.asChild &&
|
5046
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Link, { href, ...props, ref, children:
|
4889
|
+
if (props.asChild && React29.isValidElement(children)) {
|
4890
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Link, { href, ...props, ref, children: React29.cloneElement(children, {
|
5047
4891
|
...children.props,
|
5048
4892
|
children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
5049
4893
|
children.props.children,
|
@@ -5069,7 +4913,7 @@ var texts18 = createTexts({
|
|
5069
4913
|
var List = react.List.Root;
|
5070
4914
|
var ListItem2 = react.List.Item;
|
5071
4915
|
var ListIndicator = react.List.Indicator;
|
5072
|
-
var CargonetLogo =
|
4916
|
+
var CargonetLogo = React29.forwardRef(
|
5073
4917
|
(props, ref) => {
|
5074
4918
|
const { colorPalette } = props;
|
5075
4919
|
const mainColor = "#DF8200";
|
@@ -5228,8 +5072,8 @@ var fillRecipe = {
|
|
5228
5072
|
};
|
5229
5073
|
var Path = react.chakra("path", fillRecipe);
|
5230
5074
|
var SVGGroup = react.chakra("g", fillRecipe);
|
5231
|
-
var VyLogo =
|
5232
|
-
const id =
|
5075
|
+
var VyLogo = React29.forwardRef((props, ref) => {
|
5076
|
+
const id = React29.useId();
|
5233
5077
|
return /* @__PURE__ */ jsxRuntime.jsxs(SvgBox, { ref, viewBox: "0 0 107 54", ...props, children: [
|
5234
5078
|
/* @__PURE__ */ jsxRuntime.jsx("title", { children: "Vy logo" }),
|
5235
5079
|
/* @__PURE__ */ jsxRuntime.jsx(
|
@@ -5349,7 +5193,7 @@ var VyLogo = React28.forwardRef((props, ref) => {
|
|
5349
5193
|
] });
|
5350
5194
|
});
|
5351
5195
|
VyLogo.displayName = "VyLogo";
|
5352
|
-
var VyLogoPride =
|
5196
|
+
var VyLogoPride = React29.forwardRef(
|
5353
5197
|
(props, ref) => {
|
5354
5198
|
const pinkColor = "#ED6F99";
|
5355
5199
|
const purpleColor = "#C06CF7";
|
@@ -5360,7 +5204,7 @@ var VyLogoPride = React28.forwardRef(
|
|
5360
5204
|
const redColor = "#EA3323";
|
5361
5205
|
const orangeColor = "#F09436";
|
5362
5206
|
const yellowColor = "#FFFF54";
|
5363
|
-
const id =
|
5207
|
+
const id = React29.useId();
|
5364
5208
|
return (
|
5365
5209
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
5366
5210
|
/* @__PURE__ */ jsxRuntime.jsxs(SvgBox, { ref, viewBox: "0 0 107 54", ...props, children: [
|
@@ -5563,7 +5407,7 @@ var VyLogoPride = React28.forwardRef(
|
|
5563
5407
|
}
|
5564
5408
|
);
|
5565
5409
|
VyLogoPride.displayName = "VyLogoPride";
|
5566
|
-
var JumpButton =
|
5410
|
+
var JumpButton = React29.forwardRef(
|
5567
5411
|
(props, ref) => {
|
5568
5412
|
const { direction, disabled, size = "sm" } = props;
|
5569
5413
|
const { t } = useTranslation();
|
@@ -5598,7 +5442,7 @@ var texts19 = createTexts({
|
|
5598
5442
|
en: "15 seconds backward"
|
5599
5443
|
}
|
5600
5444
|
});
|
5601
|
-
var PlayPauseButton =
|
5445
|
+
var PlayPauseButton = React29.forwardRef((props, ref) => {
|
5602
5446
|
const { playing, disabled, size = "sm" } = props;
|
5603
5447
|
const { t } = useTranslation();
|
5604
5448
|
const recipe = react.useSlotRecipe({ key: "mediaControllerButton" });
|
@@ -5631,7 +5475,7 @@ var texts20 = createTexts({
|
|
5631
5475
|
en: "Play"
|
5632
5476
|
}
|
5633
5477
|
});
|
5634
|
-
var SkipButton =
|
5478
|
+
var SkipButton = React29.forwardRef(
|
5635
5479
|
(props, ref) => {
|
5636
5480
|
const { direction, disabled, size = "sm" } = props;
|
5637
5481
|
const { t } = useTranslation();
|
@@ -5687,23 +5531,23 @@ var Nudge = (props) => {
|
|
5687
5531
|
}
|
5688
5532
|
return /* @__PURE__ */ jsxRuntime.jsx(Popover2, { defaultOpen: true, size, ...rest });
|
5689
5533
|
};
|
5690
|
-
var NudgeTrigger =
|
5534
|
+
var NudgeTrigger = React29.forwardRef(({ ...props }, ref) => {
|
5691
5535
|
return /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { ...props, ref });
|
5692
5536
|
});
|
5693
5537
|
NudgeTrigger.displayName = "NudgeTrigger";
|
5694
|
-
var NudgeContent =
|
5538
|
+
var NudgeContent = React29.forwardRef(
|
5695
5539
|
({ showCloseButton = true, children, ...props }, ref) => {
|
5696
|
-
const [currentStep, setCurrentStep] =
|
5697
|
-
const childrenArray =
|
5540
|
+
const [currentStep, setCurrentStep] = React29.useState(1);
|
5541
|
+
const childrenArray = React29__namespace.default.Children.toArray(children);
|
5698
5542
|
const { open } = react$1.usePopoverContext();
|
5699
|
-
|
5543
|
+
React29.useEffect(() => {
|
5700
5544
|
setCurrentStep(1);
|
5701
5545
|
}, [children, open]);
|
5702
5546
|
const wizardPages = childrenArray.filter(
|
5703
|
-
(child) =>
|
5547
|
+
(child) => React29__namespace.default.isValidElement(child) && child.type.displayName === "NudgeWizardStep"
|
5704
5548
|
);
|
5705
5549
|
const restChildren = childrenArray.filter(
|
5706
|
-
(child) => !
|
5550
|
+
(child) => !React29__namespace.default.isValidElement(child) || child.type.displayName !== "NudgeWizardStep"
|
5707
5551
|
);
|
5708
5552
|
const totalSteps = wizardPages.length;
|
5709
5553
|
const isLastStep = totalSteps === currentStep;
|
@@ -5784,7 +5628,7 @@ var NudgeWizardStep = ({ children }) => {
|
|
5784
5628
|
return /* @__PURE__ */ jsxRuntime.jsx(react.chakra.div, { display: "flex", flexDirection: "column", gap: "1rem", width: "100%", children });
|
5785
5629
|
};
|
5786
5630
|
NudgeWizardStep.displayName = "NudgeWizardStep";
|
5787
|
-
var NudgeCloseTrigger =
|
5631
|
+
var NudgeCloseTrigger = React29.forwardRef(({ children, ...props }, ref) => {
|
5788
5632
|
const isStringChild = typeof children === "string";
|
5789
5633
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Popover.CloseTrigger, { ...props, ref, asChild: !isStringChild, children });
|
5790
5634
|
});
|
@@ -5792,7 +5636,7 @@ NudgeCloseTrigger.displayName = "NudgeCloseTrigger";
|
|
5792
5636
|
var [RootPropsProvider, useRootProps] = react.createContext({
|
5793
5637
|
name: "RootPropsProvider"
|
5794
5638
|
});
|
5795
|
-
var Pagination =
|
5639
|
+
var Pagination = React29__namespace.forwardRef(
|
5796
5640
|
(props, ref) => {
|
5797
5641
|
const { getHref, children, ...rest } = props;
|
5798
5642
|
const recipe = react.useSlotRecipe({ key: "pagination" });
|
@@ -5817,11 +5661,11 @@ var Pagination = React28__namespace.forwardRef(
|
|
5817
5661
|
}
|
5818
5662
|
);
|
5819
5663
|
Pagination.displayName = "Pagination";
|
5820
|
-
var PaginationEllipsis =
|
5664
|
+
var PaginationEllipsis = React29__namespace.forwardRef((props, ref) => {
|
5821
5665
|
return /* @__PURE__ */ jsxRuntime.jsx(ListItem2, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Pagination.Ellipsis, { ref, ...props, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { cursor: "default", children: "..." }) }) });
|
5822
5666
|
});
|
5823
5667
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
5824
|
-
var PaginationItem =
|
5668
|
+
var PaginationItem = React29__namespace.forwardRef((props, ref) => {
|
5825
5669
|
const rootProps = useRootProps();
|
5826
5670
|
const { t } = useTranslation();
|
5827
5671
|
const { page, totalPages } = react.usePaginationContext();
|
@@ -5854,7 +5698,7 @@ var PaginationItem = React28__namespace.forwardRef((props, ref) => {
|
|
5854
5698
|
) });
|
5855
5699
|
});
|
5856
5700
|
PaginationItem.displayName = "PaginationItem";
|
5857
|
-
var PaginationPrevTrigger =
|
5701
|
+
var PaginationPrevTrigger = React29__namespace.forwardRef((props, ref) => {
|
5858
5702
|
const { page } = react.usePaginationContext();
|
5859
5703
|
const recipe = react.useSlotRecipe({ key: "pagination" });
|
5860
5704
|
const styles = recipe();
|
@@ -5894,7 +5738,7 @@ var PaginationPrevTrigger = React28__namespace.forwardRef((props, ref) => {
|
|
5894
5738
|
) });
|
5895
5739
|
});
|
5896
5740
|
PaginationPrevTrigger.displayName = "PaginationPrevTrigger";
|
5897
|
-
var PaginationNextTrigger =
|
5741
|
+
var PaginationNextTrigger = React29__namespace.forwardRef((props, ref) => {
|
5898
5742
|
const { page, totalPages } = react.usePaginationContext();
|
5899
5743
|
const recipe = react.useSlotRecipe({ key: "pagination" });
|
5900
5744
|
const styles = recipe();
|
@@ -5974,17 +5818,17 @@ var texts23 = createTexts({
|
|
5974
5818
|
}
|
5975
5819
|
});
|
5976
5820
|
var Popover2 = react.Popover.Root;
|
5977
|
-
var PopoverTrigger =
|
5821
|
+
var PopoverTrigger = React29.forwardRef(({ children, ...props }, ref) => {
|
5978
5822
|
const isStringChild = typeof children === "string";
|
5979
5823
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Trigger, { ...props, ref, asChild: !isStringChild, children });
|
5980
5824
|
});
|
5981
5825
|
PopoverTrigger.displayName = "PopoverTrigger";
|
5982
|
-
var PopoverContent =
|
5826
|
+
var PopoverContent = React29.forwardRef(
|
5983
5827
|
({ children, showCloseButton = false, ...props }, ref) => {
|
5984
5828
|
const { colorMode } = useColorMode();
|
5985
|
-
const closeButtonRef =
|
5829
|
+
const closeButtonRef = React29__namespace.default.useRef(null);
|
5986
5830
|
const { open } = react.usePopoverContext();
|
5987
|
-
|
5831
|
+
React29.useEffect(() => {
|
5988
5832
|
if (showCloseButton && open && closeButtonRef.current) {
|
5989
5833
|
closeButtonRef.current.focus();
|
5990
5834
|
}
|
@@ -6018,7 +5862,7 @@ var ProgressDot = ({ isActive }) => {
|
|
6018
5862
|
}
|
6019
5863
|
);
|
6020
5864
|
};
|
6021
|
-
var ProgressIndicator =
|
5865
|
+
var ProgressIndicator = React29.forwardRef(({ numberOfSteps, activeStep }) => {
|
6022
5866
|
const { t } = useTranslation();
|
6023
5867
|
const recipe = react.useSlotRecipe({
|
6024
5868
|
key: "progressIndicator"
|
@@ -6192,7 +6036,7 @@ var SporProvider = ({
|
|
6192
6036
|
children
|
6193
6037
|
] }) }) });
|
6194
6038
|
};
|
6195
|
-
var StepperContext =
|
6039
|
+
var StepperContext = React29__namespace.default.createContext(null);
|
6196
6040
|
var StepperProvider = ({
|
6197
6041
|
activeStep,
|
6198
6042
|
children,
|
@@ -6209,7 +6053,7 @@ var StepperProvider = ({
|
|
6209
6053
|
);
|
6210
6054
|
};
|
6211
6055
|
var useStepper = () => {
|
6212
|
-
const context =
|
6056
|
+
const context = React29__namespace.default.useContext(StepperContext);
|
6213
6057
|
if (!context) {
|
6214
6058
|
throw new Error(
|
6215
6059
|
"useStepper must be used within a StepperProvider. Most likely, you forgot to wrap your StepperStep in a Stepper component"
|
@@ -6217,7 +6061,7 @@ var useStepper = () => {
|
|
6217
6061
|
}
|
6218
6062
|
return context;
|
6219
6063
|
};
|
6220
|
-
var Stepper =
|
6064
|
+
var Stepper = React29.forwardRef(
|
6221
6065
|
function Stepper2(props, ref) {
|
6222
6066
|
const {
|
6223
6067
|
onClick = () => {
|
@@ -6365,7 +6209,7 @@ var getState = (stepNumber, activeStep) => {
|
|
6365
6209
|
}
|
6366
6210
|
return "disabled";
|
6367
6211
|
};
|
6368
|
-
var Tabs =
|
6212
|
+
var Tabs = React29.forwardRef((props, ref) => {
|
6369
6213
|
const { variant = "core", size = "sm" } = props;
|
6370
6214
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Tabs.Root, { ...props, ref, variant, size });
|
6371
6215
|
});
|
@@ -6567,7 +6411,7 @@ var tableSlotRecipe = react.defineSlotRecipe({
|
|
6567
6411
|
}
|
6568
6412
|
}
|
6569
6413
|
});
|
6570
|
-
var Table =
|
6414
|
+
var Table = React29.forwardRef((props, ref) => {
|
6571
6415
|
const { variant = "ghost", size, colorPalette = "green", children } = props;
|
6572
6416
|
const recipe = react.useSlotRecipe({ recipe: tableSlotRecipe });
|
6573
6417
|
const styles = recipe({ variant, size });
|
@@ -7522,6 +7366,170 @@ var checkboxSlotRecipe = react.defineSlotRecipe({
|
|
7522
7366
|
}
|
7523
7367
|
}
|
7524
7368
|
});
|
7369
|
+
var choiceChipSlotRecipe = react.defineSlotRecipe({
|
7370
|
+
slots: checkboxCardAnatomy.keys(),
|
7371
|
+
className: "chakra-checkbox-card",
|
7372
|
+
base: {
|
7373
|
+
root: {
|
7374
|
+
display: "inline-flex",
|
7375
|
+
alignItems: "center",
|
7376
|
+
boxAlign: "center",
|
7377
|
+
fontSize: "xs",
|
7378
|
+
cursor: "pointer",
|
7379
|
+
transitionProperty: "all",
|
7380
|
+
borderRadius: "xl",
|
7381
|
+
transitionDuration: "fast",
|
7382
|
+
paddingInlineStart: "2",
|
7383
|
+
paddingInlineEnd: "2",
|
7384
|
+
outline: "1px solid",
|
7385
|
+
outlineColor: "base.outline",
|
7386
|
+
_checked: {
|
7387
|
+
backgroundColor: "brand.surface",
|
7388
|
+
borderRadius: "sm",
|
7389
|
+
outline: "none",
|
7390
|
+
color: "brand.text",
|
7391
|
+
_hover: {
|
7392
|
+
backgroundColor: "brand.surface.hover",
|
7393
|
+
_active: {
|
7394
|
+
backgroundColor: "brand.surface.active"
|
7395
|
+
}
|
7396
|
+
}
|
7397
|
+
},
|
7398
|
+
_focusVisible: {
|
7399
|
+
outline: "2px solid",
|
7400
|
+
outlineColor: "outline.focus",
|
7401
|
+
outlineOffset: "1px"
|
7402
|
+
},
|
7403
|
+
_disabled: {
|
7404
|
+
pointerEvents: "none",
|
7405
|
+
boxShadow: "none",
|
7406
|
+
backgroundColor: "surface.disabled",
|
7407
|
+
color: "text.disabled",
|
7408
|
+
outline: "none",
|
7409
|
+
_hover: {
|
7410
|
+
backgroundColor: "core.surface.disabled",
|
7411
|
+
boxShadow: "none",
|
7412
|
+
color: "core.text.disabled"
|
7413
|
+
},
|
7414
|
+
_checked: {
|
7415
|
+
cursor: "not-allowed",
|
7416
|
+
boxShadow: "none",
|
7417
|
+
color: "core.text.disabled",
|
7418
|
+
backgroundColor: "core.surface.disabled",
|
7419
|
+
_hover: {
|
7420
|
+
backgroundColor: "core.surface.disabled",
|
7421
|
+
boxShadow: "none",
|
7422
|
+
color: "core.text.disabled"
|
7423
|
+
}
|
7424
|
+
}
|
7425
|
+
}
|
7426
|
+
},
|
7427
|
+
label: {
|
7428
|
+
display: "flex",
|
7429
|
+
alignItems: "center",
|
7430
|
+
fontSize: "xs"
|
7431
|
+
}
|
7432
|
+
},
|
7433
|
+
variants: {
|
7434
|
+
size: {
|
7435
|
+
xs: {
|
7436
|
+
root: {
|
7437
|
+
_checked: {
|
7438
|
+
borderRadius: "0.563rem"
|
7439
|
+
},
|
7440
|
+
height: 5,
|
7441
|
+
paddingX: 1.5
|
7442
|
+
}
|
7443
|
+
},
|
7444
|
+
sm: {
|
7445
|
+
root: {
|
7446
|
+
_checked: {
|
7447
|
+
borderRadius: "sm"
|
7448
|
+
},
|
7449
|
+
height: 6,
|
7450
|
+
paddingX: 2
|
7451
|
+
}
|
7452
|
+
},
|
7453
|
+
md: {
|
7454
|
+
root: {
|
7455
|
+
_checked: {
|
7456
|
+
borderRadius: "sm"
|
7457
|
+
},
|
7458
|
+
height: 7,
|
7459
|
+
paddingX: 2
|
7460
|
+
}
|
7461
|
+
},
|
7462
|
+
lg: {
|
7463
|
+
root: {
|
7464
|
+
_checked: {
|
7465
|
+
borderRadius: "md"
|
7466
|
+
},
|
7467
|
+
height: 8,
|
7468
|
+
paddingX: 3
|
7469
|
+
}
|
7470
|
+
}
|
7471
|
+
},
|
7472
|
+
variant: {
|
7473
|
+
core: {
|
7474
|
+
root: {
|
7475
|
+
color: "core.text",
|
7476
|
+
outlineColor: "core.outline",
|
7477
|
+
_hover: {
|
7478
|
+
outline: "2px solid",
|
7479
|
+
outlineColor: "core.outline.hover",
|
7480
|
+
_active: {
|
7481
|
+
outline: "1px solid",
|
7482
|
+
outlineColor: "core.outline",
|
7483
|
+
backgroundColor: "core.surface.active"
|
7484
|
+
}
|
7485
|
+
}
|
7486
|
+
}
|
7487
|
+
},
|
7488
|
+
accent: {
|
7489
|
+
root: {
|
7490
|
+
backgroundColor: "accent.surface",
|
7491
|
+
color: "accent.text",
|
7492
|
+
outline: "none",
|
7493
|
+
_hover: {
|
7494
|
+
backgroundColor: "accent.surface.hover",
|
7495
|
+
_active: {
|
7496
|
+
backgroundColor: "accent.surface.active"
|
7497
|
+
}
|
7498
|
+
}
|
7499
|
+
}
|
7500
|
+
},
|
7501
|
+
floating: {
|
7502
|
+
root: {
|
7503
|
+
backgroundColor: "floating.surface",
|
7504
|
+
outline: "1px solid",
|
7505
|
+
outlineColor: "floating.outline",
|
7506
|
+
color: "floating.text",
|
7507
|
+
boxShadow: "sm",
|
7508
|
+
_hover: {
|
7509
|
+
backgroundColor: "floating.surface.hover",
|
7510
|
+
outline: "1px solid",
|
7511
|
+
outlineColor: "floating.outline.hover",
|
7512
|
+
_active: {
|
7513
|
+
backgroundColor: "floating.surface.active",
|
7514
|
+
outline: "1px solid",
|
7515
|
+
outlineColor: "floating.outline"
|
7516
|
+
}
|
7517
|
+
}
|
7518
|
+
}
|
7519
|
+
}
|
7520
|
+
},
|
7521
|
+
chipType: {
|
7522
|
+
icon: {},
|
7523
|
+
choice: {},
|
7524
|
+
filter: {}
|
7525
|
+
}
|
7526
|
+
},
|
7527
|
+
defaultVariants: {
|
7528
|
+
size: "md",
|
7529
|
+
variant: "core",
|
7530
|
+
chipType: "choice"
|
7531
|
+
}
|
7532
|
+
});
|
7525
7533
|
var dialogSlotRecipe = react.defineSlotRecipe({
|
7526
7534
|
slots: dialogAnatomy.keys(),
|
7527
7535
|
className: "spor-dialog",
|
@@ -9844,7 +9852,8 @@ var slotRecipes = {
|
|
9844
9852
|
table: tableSlotRecipe,
|
9845
9853
|
tabs: tabsSlotRecipe,
|
9846
9854
|
travelTag: travelTagSlotRecipe,
|
9847
|
-
toast: toastSlotRecipe
|
9855
|
+
toast: toastSlotRecipe,
|
9856
|
+
checkboxCard: choiceChipSlotRecipe
|
9848
9857
|
};
|
9849
9858
|
var animations = react.defineTokens.animations({
|
9850
9859
|
spin: {
|