@vygruppen/spor-react 13.2.0 → 13.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +12 -12
- package/.turbo/turbo-postinstall.log +2 -2
- package/CHANGELOG.md +23 -0
- package/dist/index.cjs +406 -255
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.mjs +336 -187
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -5
- package/src/alert/Alert.tsx +42 -1
- package/src/error-summary/index.tsx +79 -0
- package/src/index.tsx +1 -0
- package/src/input/Field.tsx +4 -1
- package/src/input/NumericStepper.tsx +6 -1
- package/src/theme/recipes/badge.ts +19 -3
- package/src/theme/recipes/pressable-card.ts +3 -3
- package/src/theme/slot-recipes/anatomy.ts +7 -0
- package/src/theme/slot-recipes/error-summary.ts +32 -0
- package/src/theme/slot-recipes/index.ts +2 -0
- package/src/theme/slot-recipes/numeric-stepper.ts +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Accordion as Accordion$1, defineRecipe, chakra, Code as Code$1, Clipboard as Clipboard$1, RadioCard as RadioCard$1, defineStyle, Field, Dialog, createContext as createContext$1, Drawer as Drawer$1, Combobox, Fieldset as Fieldset$1, createListCollection, Select as Select$1,
|
|
1
|
+
import { Accordion as Accordion$1, defineRecipe, chakra, Code as Code$1, Clipboard as Clipboard$1, RadioCard as RadioCard$1, defineStyle, Field, Dialog, createContext as createContext$1, Drawer as Drawer$1, List as List$1, Combobox, Fieldset as Fieldset$1, createListCollection, Select as Select$1, Popover as Popover$1, createToaster, Tabs as Tabs$1, defineSemanticTokens, defineSlotRecipe, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, Tooltip as Tooltip$1, IconButton as IconButton$1, defineConfig, Center, Box, ClientOnly, VisuallyHidden, useSlotRecipe, Stack, HStack, Progress, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group, Badge as Badge$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, Separator as Separator$1, useFieldContext, PopoverAnchor, Portal, useDialogContext, Link, InputElement, Input as Input$1, useFilter, useListCollection, useCombobox, useComboboxContext, usePopoverContext, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, Tag, ListItem as ListItem$1, Menu as Menu$1, useMenuContext as useMenuContext$1, NativeSelect as NativeSelect$1, useControllableState, RadioGroup as RadioGroup$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, PopoverCloseTrigger, Pagination as Pagination$1, usePaginationContext, ChakraProvider, Table as Table$1, Toaster as Toaster$1, Toast } from '@chakra-ui/react';
|
|
2
2
|
export { AspectRatio, Box, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, ClientOnly, Collapsible, Container, Em, Flex, For, FormatByte, FormatNumber, Grid, GridItem, HStack, Icon, Image, Kbd, LocaleProvider, Portal, Show, SimpleGrid, Spacer, Span, Stack, TableCaption, TableCell, TableColumn, TableColumnGroup, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, Wrap, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineSlotRecipe, defineStyle, mergeConfigs, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useRecipe, useSlotRecipe, useToken } from '@chakra-ui/react';
|
|
3
3
|
import * as spor_icon_react_star from '@vygruppen/spor-icon-react';
|
|
4
|
-
import { DropdownDownFill24Icon, CloseFill18Icon, CloseFill30Icon, CloseFill24Icon, DropdownDownFill18Icon, ServiceFill24Icon, WarningFill24Icon, DropdownRightFill18Icon, CalendarOutline24Icon, DropdownLeftFill18Icon, ArrowLeftFill24Icon, ChangeDirectionOutline24Icon, CheckmarkFill18Icon, CloseOutline24Icon, SearchOutline24Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, ArrowUpFill18Icon, ArrowDownFill18Icon, ChangeDirectionFill18Icon, CopyOutline18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill24Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, InformationFill24Icon, InformationFill18Icon, WarningFill18Icon,
|
|
4
|
+
import { DropdownDownFill24Icon, CloseFill18Icon, CloseFill30Icon, CloseFill24Icon, DropdownDownFill18Icon, ServiceFill24Icon, WarningFill24Icon, DropdownRightFill18Icon, CalendarOutline24Icon, DropdownLeftFill18Icon, ArrowLeftFill24Icon, ErrorFill24Icon, ChangeDirectionOutline24Icon, CheckmarkFill18Icon, CloseOutline24Icon, SearchOutline24Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, ArrowUpFill18Icon, ArrowDownFill18Icon, ChangeDirectionFill18Icon, CopyOutline18Icon, LinkOutOutline24Icon, LinkOutOutline18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill24Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, InformationFill24Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill18Icon, QuestionFill24Icon, ErrorOutline24Icon, SuccessFill24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon } from '@vygruppen/spor-icon-react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
6
|
+
import * as React14 from 'react';
|
|
7
|
+
import React14__default, { createContext, useContext, useId, cloneElement, isValidElement, useRef, useEffect, useImperativeHandle, useState, useLayoutEffect, useMemo } from 'react';
|
|
8
8
|
import { spinnerColorData, inlineLoaderColorData, contentLoaderData, fullScreenLoaderWhiteData, inlineLoaderDarkData, spinnerLightData, spinnerDarkData, fullScreenLoaderBlackData, inlineLoaderLightData } from '@vygruppen/spor-loader';
|
|
9
9
|
import { useLottie } from 'lottie-react';
|
|
10
10
|
import { useInterval } from 'usehooks-ts';
|
|
@@ -208,8 +208,8 @@ function useTranslation() {
|
|
|
208
208
|
};
|
|
209
209
|
return { t, language };
|
|
210
210
|
}
|
|
211
|
-
function createTexts(
|
|
212
|
-
return
|
|
211
|
+
function createTexts(texts28) {
|
|
212
|
+
return texts28;
|
|
213
213
|
}
|
|
214
214
|
function Lottie({ animationData }) {
|
|
215
215
|
const { View } = useLottie({ animationData });
|
|
@@ -732,25 +732,41 @@ var badgeRecipie = defineRecipe({
|
|
|
732
732
|
"& svg": {
|
|
733
733
|
color: "icon.critical"
|
|
734
734
|
}
|
|
735
|
+
},
|
|
736
|
+
brightRed: {
|
|
737
|
+
backgroundColor: {
|
|
738
|
+
_light: "brightRed",
|
|
739
|
+
_dark: "brightRed"
|
|
740
|
+
},
|
|
741
|
+
color: {
|
|
742
|
+
_light: "pink",
|
|
743
|
+
_dark: "pink"
|
|
744
|
+
},
|
|
745
|
+
"& svg": {
|
|
746
|
+
color: {
|
|
747
|
+
_light: "pink",
|
|
748
|
+
_dark: "pink"
|
|
749
|
+
}
|
|
750
|
+
}
|
|
735
751
|
}
|
|
736
752
|
},
|
|
737
753
|
size: {
|
|
738
754
|
sm: {
|
|
739
|
-
fontSize: "desktop.
|
|
755
|
+
fontSize: "desktop.2xs",
|
|
740
756
|
paddingX: "0.5",
|
|
741
757
|
paddingY: "0",
|
|
742
758
|
fontWeight: "normal",
|
|
743
759
|
borderRadius: "xxs"
|
|
744
760
|
},
|
|
745
761
|
md: {
|
|
746
|
-
fontSize: "desktop.
|
|
762
|
+
fontSize: "desktop.2xs",
|
|
747
763
|
paddingX: "1",
|
|
748
764
|
paddingY: "0.5",
|
|
749
765
|
fontWeight: "bold",
|
|
750
766
|
borderRadius: "xs"
|
|
751
767
|
},
|
|
752
768
|
lg: {
|
|
753
|
-
fontSize: "desktop.
|
|
769
|
+
fontSize: "desktop.xs",
|
|
754
770
|
paddingX: "1.5",
|
|
755
771
|
paddingY: "0.5",
|
|
756
772
|
fontWeight: "bold",
|
|
@@ -1143,11 +1159,11 @@ var FloatingActionButton = ({
|
|
|
1143
1159
|
);
|
|
1144
1160
|
};
|
|
1145
1161
|
var useScrollDirection = () => {
|
|
1146
|
-
const [scrollDirection, setScrollDirection] =
|
|
1147
|
-
const lastScrollPosition =
|
|
1162
|
+
const [scrollDirection, setScrollDirection] = React14__default.useState(null);
|
|
1163
|
+
const lastScrollPosition = React14__default.useRef(
|
|
1148
1164
|
globalThis.window === void 0 ? 0 : window.scrollY
|
|
1149
1165
|
);
|
|
1150
|
-
|
|
1166
|
+
React14__default.useEffect(() => {
|
|
1151
1167
|
const onScroll = () => {
|
|
1152
1168
|
const delta = window.scrollY - lastScrollPosition.current;
|
|
1153
1169
|
if (delta === 0) {
|
|
@@ -1224,15 +1240,27 @@ var Alert = ({
|
|
|
1224
1240
|
children
|
|
1225
1241
|
} = props;
|
|
1226
1242
|
const { open, onClose } = useDisclosure({ defaultOpen: true });
|
|
1243
|
+
const { t } = useTranslation();
|
|
1227
1244
|
const handleAlertClose = () => {
|
|
1228
1245
|
onClose();
|
|
1229
1246
|
onAlertClose == null ? void 0 : onAlertClose();
|
|
1230
1247
|
};
|
|
1231
1248
|
const recipe = useSlotRecipe({ key: "alert" });
|
|
1232
1249
|
const styles = recipe({ variant: props.variant });
|
|
1250
|
+
const getAriaLabelText = () => {
|
|
1251
|
+
const variant = props.variant;
|
|
1252
|
+
if (variant === "important" || variant === "alt")
|
|
1253
|
+
return texts5.ariaLabelAlertWarning;
|
|
1254
|
+
if (variant === "error" || variant === "error-secondary")
|
|
1255
|
+
return texts5.ariaLabelAlertError;
|
|
1256
|
+
if (variant === "success")
|
|
1257
|
+
return texts5.ariaLabelAlertSuccess;
|
|
1258
|
+
return texts5.ariaLabelAlertInformative;
|
|
1259
|
+
};
|
|
1260
|
+
const ariaLabel = t(getAriaLabelText());
|
|
1233
1261
|
if (!open)
|
|
1234
1262
|
return null;
|
|
1235
|
-
return /* @__PURE__ */ jsxs(Alert$1.Root, { ref, ...props, children: [
|
|
1263
|
+
return /* @__PURE__ */ jsxs(Alert$1.Root, { ref, role: "alert", "aria-label": ariaLabel, ...props, children: [
|
|
1236
1264
|
/* @__PURE__ */ jsxs(
|
|
1237
1265
|
Alert$1.Content,
|
|
1238
1266
|
{
|
|
@@ -1277,6 +1305,32 @@ var Alert = ({
|
|
|
1277
1305
|
)
|
|
1278
1306
|
] });
|
|
1279
1307
|
};
|
|
1308
|
+
var texts5 = createTexts({
|
|
1309
|
+
ariaLabelAlertInformative: {
|
|
1310
|
+
en: "Announcement",
|
|
1311
|
+
nb: "Kunngj\xF8ring",
|
|
1312
|
+
nn: "Kunngjering",
|
|
1313
|
+
sv: "Meddelande"
|
|
1314
|
+
},
|
|
1315
|
+
ariaLabelAlertWarning: {
|
|
1316
|
+
en: "Warning",
|
|
1317
|
+
nb: "Advarsel",
|
|
1318
|
+
nn: "Varsel",
|
|
1319
|
+
sv: "Varning"
|
|
1320
|
+
},
|
|
1321
|
+
ariaLabelAlertError: {
|
|
1322
|
+
en: "Error",
|
|
1323
|
+
nb: "Feil",
|
|
1324
|
+
nn: "Feil",
|
|
1325
|
+
sv: "Fel"
|
|
1326
|
+
},
|
|
1327
|
+
ariaLabelAlertSuccess: {
|
|
1328
|
+
en: "Success",
|
|
1329
|
+
nb: "Suksess",
|
|
1330
|
+
nn: "Suksess",
|
|
1331
|
+
sv: "Framg\xE5ng"
|
|
1332
|
+
}
|
|
1333
|
+
});
|
|
1280
1334
|
var ExpandableAlert = ({
|
|
1281
1335
|
ref,
|
|
1282
1336
|
...props
|
|
@@ -1377,7 +1431,7 @@ var ServiceAlert = ({
|
|
|
1377
1431
|
maxWidth: contentWidth,
|
|
1378
1432
|
children: [
|
|
1379
1433
|
/* @__PURE__ */ jsxs(HStack, { as: headingLevel, alignItems: "center", gap: "1", children: [
|
|
1380
|
-
variant === "service" ? /* @__PURE__ */ jsx(ServiceFill24Icon, { "aria-label": t(
|
|
1434
|
+
variant === "service" ? /* @__PURE__ */ jsx(ServiceFill24Icon, { "aria-label": t(texts6.service) }) : /* @__PURE__ */ jsx(WarningFill24Icon, { "aria-label": t(texts6["global-deviation"]) }),
|
|
1381
1435
|
/* @__PURE__ */ jsx(
|
|
1382
1436
|
Span,
|
|
1383
1437
|
{
|
|
@@ -1394,7 +1448,7 @@ var ServiceAlert = ({
|
|
|
1394
1448
|
)
|
|
1395
1449
|
] }),
|
|
1396
1450
|
/* @__PURE__ */ jsxs(Flex, { alignItems: "center", gap: [0.5, null, null, 1], children: [
|
|
1397
|
-
notification && /* @__PURE__ */ jsx(Text, { css: styles.notificationText, children: t(
|
|
1451
|
+
notification && /* @__PURE__ */ jsx(Text, { css: styles.notificationText, children: t(texts6.notification(notification)) }),
|
|
1398
1452
|
/* @__PURE__ */ jsx(Accordion$1.ItemIndicator, { children: /* @__PURE__ */ jsx(DropdownDownFill24Icon, { color: "icon.brand" }) })
|
|
1399
1453
|
] })
|
|
1400
1454
|
]
|
|
@@ -1405,7 +1459,7 @@ var ServiceAlert = ({
|
|
|
1405
1459
|
}
|
|
1406
1460
|
);
|
|
1407
1461
|
};
|
|
1408
|
-
var
|
|
1462
|
+
var texts6 = createTexts({
|
|
1409
1463
|
notification: (notification) => {
|
|
1410
1464
|
const numberNotification = Number(notification);
|
|
1411
1465
|
return {
|
|
@@ -1434,12 +1488,12 @@ var Breadcrumb = ({
|
|
|
1434
1488
|
css,
|
|
1435
1489
|
...props
|
|
1436
1490
|
}) => {
|
|
1437
|
-
const validChildren =
|
|
1438
|
-
(element) =>
|
|
1491
|
+
const validChildren = React14__default.Children.toArray(children).filter(
|
|
1492
|
+
(element) => React14__default.isValidElement(element)
|
|
1439
1493
|
);
|
|
1440
1494
|
return /* @__PURE__ */ jsx(Breadcrumb$1.Root, { ref, css, ...props, children: /* @__PURE__ */ jsx(Breadcrumb$1.List, { "data-part": "list", children: validChildren.map((child, index) => {
|
|
1441
1495
|
const isLast = index === validChildren.length - 1;
|
|
1442
|
-
return /* @__PURE__ */ jsxs(
|
|
1496
|
+
return /* @__PURE__ */ jsxs(React14__default.Fragment, { children: [
|
|
1443
1497
|
/* @__PURE__ */ jsx(Breadcrumb$1.Item, { "data-part": "item", children: child }),
|
|
1444
1498
|
!isLast && /* @__PURE__ */ jsx(
|
|
1445
1499
|
Breadcrumb$1.Separator,
|
|
@@ -1865,7 +1919,7 @@ function CalendarHeader({ dualView }) {
|
|
|
1865
1919
|
variant: "ghost",
|
|
1866
1920
|
marginLeft: 1,
|
|
1867
1921
|
disabled: prevButtonProps.isDisabled,
|
|
1868
|
-
"aria-label": t(
|
|
1922
|
+
"aria-label": t(texts7.previousMonth),
|
|
1869
1923
|
icon: /* @__PURE__ */ jsx(icons_exports.DropdownLeftFill24Icon, {})
|
|
1870
1924
|
}
|
|
1871
1925
|
),
|
|
@@ -1907,7 +1961,7 @@ function CalendarHeader({ dualView }) {
|
|
|
1907
1961
|
marginRight: 1,
|
|
1908
1962
|
variant: "ghost",
|
|
1909
1963
|
disabled: nextButtonProps.isDisabled,
|
|
1910
|
-
"aria-label": t(
|
|
1964
|
+
"aria-label": t(texts7.nextMonth),
|
|
1911
1965
|
icon: /* @__PURE__ */ jsx(icons_exports.DropdownRightFill24Icon, {})
|
|
1912
1966
|
}
|
|
1913
1967
|
)
|
|
@@ -1915,7 +1969,7 @@ function CalendarHeader({ dualView }) {
|
|
|
1915
1969
|
}
|
|
1916
1970
|
);
|
|
1917
1971
|
}
|
|
1918
|
-
var
|
|
1972
|
+
var texts7 = createTexts({
|
|
1919
1973
|
previousMonth: {
|
|
1920
1974
|
nb: "Forrige m\xE5ned",
|
|
1921
1975
|
nn: "F\xF8rre m\xE5nad",
|
|
@@ -2110,13 +2164,13 @@ var labelStyles = defineStyle({
|
|
|
2110
2164
|
}
|
|
2111
2165
|
});
|
|
2112
2166
|
function renderLabelWithIndicator(label, labelAsChild) {
|
|
2113
|
-
if (!labelAsChild || !
|
|
2167
|
+
if (!labelAsChild || !React14.isValidElement(label)) {
|
|
2114
2168
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2115
2169
|
label,
|
|
2116
2170
|
/* @__PURE__ */ jsx(Field.RequiredIndicator, {})
|
|
2117
2171
|
] });
|
|
2118
2172
|
}
|
|
2119
|
-
return
|
|
2173
|
+
return React14.cloneElement(
|
|
2120
2174
|
label,
|
|
2121
2175
|
{},
|
|
2122
2176
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -2143,11 +2197,12 @@ var Field3 = ({
|
|
|
2143
2197
|
id,
|
|
2144
2198
|
shouldFloat,
|
|
2145
2199
|
labelAsChild,
|
|
2200
|
+
gap,
|
|
2146
2201
|
...rest
|
|
2147
2202
|
} = props;
|
|
2148
2203
|
const recipe = useSlotRecipe({ key: "field" });
|
|
2149
2204
|
const styles = recipe();
|
|
2150
|
-
return /* @__PURE__ */ jsxs(Stack, {
|
|
2205
|
+
return /* @__PURE__ */ jsxs(Stack, { ref, width: "100%", ...rest, children: [
|
|
2151
2206
|
/* @__PURE__ */ jsxs(
|
|
2152
2207
|
Field.Root,
|
|
2153
2208
|
{
|
|
@@ -2158,6 +2213,7 @@ var Field3 = ({
|
|
|
2158
2213
|
css: styles.root,
|
|
2159
2214
|
direction,
|
|
2160
2215
|
id,
|
|
2216
|
+
gap,
|
|
2161
2217
|
children: [
|
|
2162
2218
|
label && !floatingLabel && /* @__PURE__ */ jsx(Label, { asChild: labelAsChild, "aria-hidden": true, children: renderLabelWithIndicator(label, labelAsChild) }),
|
|
2163
2219
|
children,
|
|
@@ -2400,7 +2456,7 @@ var CalendarNavigator = ({
|
|
|
2400
2456
|
onPress: onPrevious,
|
|
2401
2457
|
isDisabled: isPreviousDisabled,
|
|
2402
2458
|
icon: /* @__PURE__ */ jsx(ArrowLeftOutline24Icon, {}),
|
|
2403
|
-
"aria-label": `${t(
|
|
2459
|
+
"aria-label": `${t(texts8.previous)} ${t(texts8[unit])}`
|
|
2404
2460
|
}
|
|
2405
2461
|
),
|
|
2406
2462
|
/* @__PURE__ */ jsx(
|
|
@@ -2421,12 +2477,12 @@ var CalendarNavigator = ({
|
|
|
2421
2477
|
onPress: onNext,
|
|
2422
2478
|
isDisabled: isNextDisabled,
|
|
2423
2479
|
icon: /* @__PURE__ */ jsx(ArrowRightOutline24Icon, {}),
|
|
2424
|
-
"aria-label": `${t(
|
|
2480
|
+
"aria-label": `${t(texts8.next)} ${t(texts8[unit])}`
|
|
2425
2481
|
}
|
|
2426
2482
|
)
|
|
2427
2483
|
] });
|
|
2428
2484
|
};
|
|
2429
|
-
var
|
|
2485
|
+
var texts8 = createTexts({
|
|
2430
2486
|
previous: {
|
|
2431
2487
|
nb: "Forrige",
|
|
2432
2488
|
nn: "Forrige",
|
|
@@ -2471,7 +2527,7 @@ function Calendar2({
|
|
|
2471
2527
|
const styles = recipe({ variant });
|
|
2472
2528
|
const { calendarProps } = useCalendar$1(props, state);
|
|
2473
2529
|
const calendarAriaLabel = calendarProps["aria-label"];
|
|
2474
|
-
const ariaLabel = t(
|
|
2530
|
+
const ariaLabel = t(texts9.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
|
|
2475
2531
|
return /* @__PURE__ */ jsxs(
|
|
2476
2532
|
Box,
|
|
2477
2533
|
{
|
|
@@ -2485,7 +2541,7 @@ function Calendar2({
|
|
|
2485
2541
|
}
|
|
2486
2542
|
);
|
|
2487
2543
|
}
|
|
2488
|
-
var
|
|
2544
|
+
var texts9 = createTexts({
|
|
2489
2545
|
calendar: {
|
|
2490
2546
|
nb: "Kalender",
|
|
2491
2547
|
nn: "Kalender",
|
|
@@ -2511,14 +2567,14 @@ var CalendarTriggerButton = ({
|
|
|
2511
2567
|
IconButton,
|
|
2512
2568
|
{
|
|
2513
2569
|
icon: /* @__PURE__ */ jsx(CalendarOutline24Icon, {}),
|
|
2514
|
-
"aria-label": t(
|
|
2570
|
+
"aria-label": t(texts10.openCalendar),
|
|
2515
2571
|
css: styles.calendarTriggerButton,
|
|
2516
2572
|
variant: "ghost",
|
|
2517
2573
|
disabled
|
|
2518
2574
|
}
|
|
2519
2575
|
) });
|
|
2520
2576
|
};
|
|
2521
|
-
var
|
|
2577
|
+
var texts10 = createTexts({
|
|
2522
2578
|
openCalendar: {
|
|
2523
2579
|
nb: "\xC5pne kalender",
|
|
2524
2580
|
nn: "\xC5pne kalendar",
|
|
@@ -2627,7 +2683,7 @@ var DateField = ({
|
|
|
2627
2683
|
)
|
|
2628
2684
|
] });
|
|
2629
2685
|
};
|
|
2630
|
-
var
|
|
2686
|
+
var texts11 = createTexts({
|
|
2631
2687
|
day: {
|
|
2632
2688
|
nb: "Velg dag",
|
|
2633
2689
|
nn: "Vel dag",
|
|
@@ -2650,16 +2706,16 @@ var texts10 = createTexts({
|
|
|
2650
2706
|
var getAriaLabel = (segmentType) => {
|
|
2651
2707
|
switch (segmentType) {
|
|
2652
2708
|
case "day": {
|
|
2653
|
-
return
|
|
2709
|
+
return texts11.day;
|
|
2654
2710
|
}
|
|
2655
2711
|
case "month": {
|
|
2656
|
-
return
|
|
2712
|
+
return texts11.month;
|
|
2657
2713
|
}
|
|
2658
2714
|
case "year": {
|
|
2659
|
-
return
|
|
2715
|
+
return texts11.year;
|
|
2660
2716
|
}
|
|
2661
2717
|
default: {
|
|
2662
|
-
return
|
|
2718
|
+
return texts11.day;
|
|
2663
2719
|
}
|
|
2664
2720
|
}
|
|
2665
2721
|
};
|
|
@@ -2994,7 +3050,7 @@ var TimePicker = ({
|
|
|
2994
3050
|
const isDisabled = isDisabledExternally ?? fieldDisabled ?? false;
|
|
2995
3051
|
const { t } = useTranslation();
|
|
2996
3052
|
const locale = useCurrentLocale();
|
|
2997
|
-
const label = externalLabel ?? t(
|
|
3053
|
+
const label = externalLabel ?? t(texts12.time);
|
|
2998
3054
|
const state = useTimeFieldState({
|
|
2999
3055
|
value,
|
|
3000
3056
|
defaultValue,
|
|
@@ -3027,15 +3083,15 @@ var TimePicker = ({
|
|
|
3027
3083
|
})
|
|
3028
3084
|
);
|
|
3029
3085
|
};
|
|
3030
|
-
const backwardsLabel = `${t(
|
|
3031
|
-
|
|
3086
|
+
const backwardsLabel = `${t(texts12.backwards)} ${minuteInterval} ${t(
|
|
3087
|
+
texts12.minutes
|
|
3032
3088
|
)}`;
|
|
3033
|
-
const forwardsLabel = `${t(
|
|
3034
|
-
|
|
3089
|
+
const forwardsLabel = `${t(texts12.forwards)} ${minuteInterval} ${t(
|
|
3090
|
+
texts12.minutes
|
|
3035
3091
|
)}`;
|
|
3036
|
-
const inputLabel = label ?? t(
|
|
3092
|
+
const inputLabel = label ?? t(texts12.time);
|
|
3037
3093
|
const ariaLabel = `${inputLabel} \u2013 ${t(
|
|
3038
|
-
|
|
3094
|
+
texts12.selectedTimeIs(`${(dateTime == null ? void 0 : dateTime.hour) ?? 0} ${(dateTime == null ? void 0 : dateTime.minute) ?? 0}`)
|
|
3039
3095
|
)}`;
|
|
3040
3096
|
return /* @__PURE__ */ jsx(Field3, { as: "time", ...boxProps, children: /* @__PURE__ */ jsxs(
|
|
3041
3097
|
StyledField,
|
|
@@ -3088,7 +3144,7 @@ var TimePicker = ({
|
|
|
3088
3144
|
}
|
|
3089
3145
|
) });
|
|
3090
3146
|
};
|
|
3091
|
-
var
|
|
3147
|
+
var texts12 = createTexts({
|
|
3092
3148
|
selectedTimeIs: (time) => ({
|
|
3093
3149
|
nb: `Valgt tidspunkt er ${time}`,
|
|
3094
3150
|
nn: `Valt tidspunkt er ${time}`,
|
|
@@ -3229,7 +3285,7 @@ var DrawerCloseTrigger = function DrawerCloseTrigger2({
|
|
|
3229
3285
|
{
|
|
3230
3286
|
variant: "ghost",
|
|
3231
3287
|
icon: /* @__PURE__ */ jsx(CloseFill24Icon, {}),
|
|
3232
|
-
label: t(
|
|
3288
|
+
label: t(texts13.close)
|
|
3233
3289
|
}
|
|
3234
3290
|
) : /* @__PURE__ */ jsx(CloseButton, { size: "md" }) });
|
|
3235
3291
|
};
|
|
@@ -3243,7 +3299,7 @@ var DrawerBackTrigger = ({
|
|
|
3243
3299
|
{
|
|
3244
3300
|
variant: "ghost",
|
|
3245
3301
|
icon: /* @__PURE__ */ jsx(ArrowLeftFill24Icon, {}),
|
|
3246
|
-
label: t(
|
|
3302
|
+
label: t(texts13.back)
|
|
3247
3303
|
}
|
|
3248
3304
|
) });
|
|
3249
3305
|
};
|
|
@@ -3275,7 +3331,7 @@ var DrawerBackdrop = Drawer$1.Backdrop;
|
|
|
3275
3331
|
var DrawerTitle = Drawer$1.Title;
|
|
3276
3332
|
var DrawerActionTrigger = Drawer$1.ActionTrigger;
|
|
3277
3333
|
var DrawerHeader = Drawer$1.Header;
|
|
3278
|
-
var
|
|
3334
|
+
var texts13 = createTexts({
|
|
3279
3335
|
back: {
|
|
3280
3336
|
en: "Back",
|
|
3281
3337
|
nb: "Tilbake",
|
|
@@ -3289,6 +3345,124 @@ var texts12 = createTexts({
|
|
|
3289
3345
|
sv: "St\xE4ng"
|
|
3290
3346
|
}
|
|
3291
3347
|
});
|
|
3348
|
+
var ExternalIcon = ({
|
|
3349
|
+
label,
|
|
3350
|
+
size
|
|
3351
|
+
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3352
|
+
size === "lg" || size === "md" ? /* @__PURE__ */ jsx(LinkOutOutline24Icon, { "aria-hidden": true, display: "inline" }) : /* @__PURE__ */ jsx(LinkOutOutline18Icon, { "aria-hidden": true, display: "inline" }),
|
|
3353
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: label })
|
|
3354
|
+
] });
|
|
3355
|
+
var TextLink = ({
|
|
3356
|
+
ref,
|
|
3357
|
+
children,
|
|
3358
|
+
external,
|
|
3359
|
+
href,
|
|
3360
|
+
...props
|
|
3361
|
+
}) => {
|
|
3362
|
+
const { t } = useTranslation();
|
|
3363
|
+
const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
|
|
3364
|
+
const externalLabel = t ? t(texts14.externalLink) : texts14.externalLink.en;
|
|
3365
|
+
if (props.asChild && isValidElement(children)) {
|
|
3366
|
+
return /* @__PURE__ */ jsx(
|
|
3367
|
+
Link,
|
|
3368
|
+
{
|
|
3369
|
+
href,
|
|
3370
|
+
...props,
|
|
3371
|
+
ref,
|
|
3372
|
+
...isExternal && {
|
|
3373
|
+
target: "_blank",
|
|
3374
|
+
rel: "noopener noreferrer"
|
|
3375
|
+
},
|
|
3376
|
+
children: cloneElement(children, {
|
|
3377
|
+
...children.props,
|
|
3378
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3379
|
+
children.props.children,
|
|
3380
|
+
isExternal && /* @__PURE__ */ jsx(ExternalIcon, { label: externalLabel, size: props.size })
|
|
3381
|
+
] })
|
|
3382
|
+
})
|
|
3383
|
+
}
|
|
3384
|
+
);
|
|
3385
|
+
}
|
|
3386
|
+
return /* @__PURE__ */ jsxs(
|
|
3387
|
+
Link,
|
|
3388
|
+
{
|
|
3389
|
+
href,
|
|
3390
|
+
...props,
|
|
3391
|
+
ref,
|
|
3392
|
+
...isExternal && {
|
|
3393
|
+
target: "_blank",
|
|
3394
|
+
rel: "noopener noreferrer"
|
|
3395
|
+
},
|
|
3396
|
+
children: [
|
|
3397
|
+
children,
|
|
3398
|
+
isExternal && /* @__PURE__ */ jsx(ExternalIcon, { label: externalLabel, size: props.size })
|
|
3399
|
+
]
|
|
3400
|
+
}
|
|
3401
|
+
);
|
|
3402
|
+
};
|
|
3403
|
+
var texts14 = createTexts({
|
|
3404
|
+
externalLink: {
|
|
3405
|
+
nb: "Ekstern lenke",
|
|
3406
|
+
nn: "Ekstern lenke",
|
|
3407
|
+
sv: "Extern l\xE4nk",
|
|
3408
|
+
en: "External link"
|
|
3409
|
+
}
|
|
3410
|
+
});
|
|
3411
|
+
var List = List$1.Root;
|
|
3412
|
+
var ListItem = List$1.Item;
|
|
3413
|
+
var ListIndicator = List$1.Indicator;
|
|
3414
|
+
var ErrorSummary = ({
|
|
3415
|
+
ref: externalRef,
|
|
3416
|
+
children,
|
|
3417
|
+
headingLevel = "h2",
|
|
3418
|
+
heading,
|
|
3419
|
+
...rest
|
|
3420
|
+
}) => {
|
|
3421
|
+
const recipe = useSlotRecipe({ key: "errorSummary" });
|
|
3422
|
+
const styles = recipe();
|
|
3423
|
+
const wrapperRef = useRef(null);
|
|
3424
|
+
const headingRef = useRef(null);
|
|
3425
|
+
const ref = externalRef ?? wrapperRef;
|
|
3426
|
+
return /* @__PURE__ */ jsxs(
|
|
3427
|
+
Box,
|
|
3428
|
+
{
|
|
3429
|
+
css: styles.container,
|
|
3430
|
+
ref,
|
|
3431
|
+
...rest,
|
|
3432
|
+
"aria-labelledby": slugify(heading),
|
|
3433
|
+
tabIndex: -1,
|
|
3434
|
+
children: [
|
|
3435
|
+
heading && /* @__PURE__ */ jsxs(Flex, { css: styles.heading, children: [
|
|
3436
|
+
/* @__PURE__ */ jsx(
|
|
3437
|
+
ErrorFill24Icon,
|
|
3438
|
+
{
|
|
3439
|
+
css: {
|
|
3440
|
+
flexShrink: 0,
|
|
3441
|
+
"& path:first-of-type": {
|
|
3442
|
+
fill: `icon.critical`
|
|
3443
|
+
},
|
|
3444
|
+
"& path:not(:first-of-type)": {
|
|
3445
|
+
fill: `surface.critical`
|
|
3446
|
+
}
|
|
3447
|
+
}
|
|
3448
|
+
}
|
|
3449
|
+
),
|
|
3450
|
+
/* @__PURE__ */ jsx(Heading, { as: headingLevel, variant: "md", autoId: true, ref: headingRef, children: heading })
|
|
3451
|
+
] }),
|
|
3452
|
+
/* @__PURE__ */ jsx(List, { css: styles.list, gap: 2, children })
|
|
3453
|
+
]
|
|
3454
|
+
}
|
|
3455
|
+
);
|
|
3456
|
+
};
|
|
3457
|
+
var ErrorSummaryItem = ({
|
|
3458
|
+
children,
|
|
3459
|
+
href,
|
|
3460
|
+
...rest
|
|
3461
|
+
}) => {
|
|
3462
|
+
const recipe = useSlotRecipe({ key: "errorSummary" });
|
|
3463
|
+
const styles = recipe();
|
|
3464
|
+
return /* @__PURE__ */ jsx(ListItem, { css: styles.item, ...rest, children: /* @__PURE__ */ jsx(TextLink, { href, children }) });
|
|
3465
|
+
};
|
|
3292
3466
|
var AttachedInputs = ({
|
|
3293
3467
|
ref,
|
|
3294
3468
|
...props
|
|
@@ -3370,7 +3544,7 @@ function useFloatingInputState({
|
|
|
3370
3544
|
);
|
|
3371
3545
|
const inputValue = isControlled ? String(value ?? "") : uncontrolledValue;
|
|
3372
3546
|
const shouldFloat = inputValue.length > 0 || focused;
|
|
3373
|
-
const syncFromRef =
|
|
3547
|
+
const syncFromRef = React14__default.useCallback(() => {
|
|
3374
3548
|
if (!isControlled && (inputRef == null ? void 0 : inputRef.current)) {
|
|
3375
3549
|
const v = inputRef.current.value;
|
|
3376
3550
|
if (v !== uncontrolledValue) {
|
|
@@ -3534,7 +3708,7 @@ function Autocomplete({
|
|
|
3534
3708
|
}) {
|
|
3535
3709
|
const { contains } = useFilter({ sensitivity: "base" });
|
|
3536
3710
|
const { t } = useTranslation();
|
|
3537
|
-
const extractedItems =
|
|
3711
|
+
const extractedItems = React14__default.useMemo(
|
|
3538
3712
|
() => extractItemsFromChildren(children),
|
|
3539
3713
|
[children]
|
|
3540
3714
|
);
|
|
@@ -3542,11 +3716,11 @@ function Autocomplete({
|
|
|
3542
3716
|
initialItems: extractedItems,
|
|
3543
3717
|
filter: filteredExternally ? void 0 : contains
|
|
3544
3718
|
});
|
|
3545
|
-
|
|
3719
|
+
React14__default.useEffect(() => {
|
|
3546
3720
|
if (filteredExternally)
|
|
3547
3721
|
reset();
|
|
3548
3722
|
}, [extractedItems, reset, filteredExternally]);
|
|
3549
|
-
const filteredChildren =
|
|
3723
|
+
const filteredChildren = React14__default.useMemo(
|
|
3550
3724
|
() => filterChildren(children, collection.items),
|
|
3551
3725
|
[children, collection.items]
|
|
3552
3726
|
);
|
|
@@ -3591,10 +3765,10 @@ function Autocomplete({
|
|
|
3591
3765
|
}
|
|
3592
3766
|
}
|
|
3593
3767
|
) }),
|
|
3594
|
-
/* @__PURE__ */ jsx(Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsx(Combobox.ClearTrigger, { asChild: true, "aria-label": t(
|
|
3768
|
+
/* @__PURE__ */ jsx(Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsx(Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts15.clearValue), children: /* @__PURE__ */ jsx(CloseButton, { size: "xs", tabIndex: 0 }) }) })
|
|
3595
3769
|
] }),
|
|
3596
3770
|
/* @__PURE__ */ jsx(Combobox.Positioner, { children: /* @__PURE__ */ jsxs(Combobox.Content, { children: [
|
|
3597
|
-
!loading && /* @__PURE__ */ jsx(Combobox.Empty, { children: emptyLabel ?? t(
|
|
3771
|
+
!loading && /* @__PURE__ */ jsx(Combobox.Empty, { children: emptyLabel ?? t(texts15.noItemsFound) }),
|
|
3598
3772
|
loading ? /* @__PURE__ */ jsx(ColorSpinner, { width: "1.5rem", p: "2" }) : filteredChildren
|
|
3599
3773
|
] }) })
|
|
3600
3774
|
] });
|
|
@@ -3610,9 +3784,9 @@ var AutocompleteItem = ({ children, ...props }) => {
|
|
|
3610
3784
|
};
|
|
3611
3785
|
var filterChildren = (children, collectionItems) => {
|
|
3612
3786
|
const collectionValues = new Set(collectionItems.map((item) => item.value));
|
|
3613
|
-
return
|
|
3787
|
+
return React14__default.Children.toArray(children).map((child) => {
|
|
3614
3788
|
var _a6;
|
|
3615
|
-
if (!
|
|
3789
|
+
if (!React14__default.isValidElement(child))
|
|
3616
3790
|
return null;
|
|
3617
3791
|
if (child.type === AutocompleteItemGroup) {
|
|
3618
3792
|
const groupProps = child.props;
|
|
@@ -3621,11 +3795,11 @@ var filterChildren = (children, collectionItems) => {
|
|
|
3621
3795
|
collectionItems
|
|
3622
3796
|
);
|
|
3623
3797
|
const hasItems = filteredGroupChildren.some(
|
|
3624
|
-
(groupChild) =>
|
|
3798
|
+
(groupChild) => React14__default.isValidElement(groupChild) && groupChild.type !== AutocompleteItemGroupLabel
|
|
3625
3799
|
);
|
|
3626
3800
|
if (!hasItems)
|
|
3627
3801
|
return null;
|
|
3628
|
-
return
|
|
3802
|
+
return React14__default.cloneElement(child, groupProps, ...filteredGroupChildren);
|
|
3629
3803
|
}
|
|
3630
3804
|
const itemProps = (_a6 = child.props) == null ? void 0 : _a6.item;
|
|
3631
3805
|
if (itemProps) {
|
|
@@ -3636,8 +3810,8 @@ var filterChildren = (children, collectionItems) => {
|
|
|
3636
3810
|
};
|
|
3637
3811
|
var extractItemsFromChildren = (children) => {
|
|
3638
3812
|
const items = [];
|
|
3639
|
-
|
|
3640
|
-
if (!
|
|
3813
|
+
React14__default.Children.forEach(children, (child) => {
|
|
3814
|
+
if (!React14__default.isValidElement(child))
|
|
3641
3815
|
return;
|
|
3642
3816
|
if (child.type === AutocompleteItemGroup) {
|
|
3643
3817
|
items.push(
|
|
@@ -3653,7 +3827,7 @@ var extractItemsFromChildren = (children) => {
|
|
|
3653
3827
|
});
|
|
3654
3828
|
return items;
|
|
3655
3829
|
};
|
|
3656
|
-
var
|
|
3830
|
+
var texts15 = createTexts({
|
|
3657
3831
|
noItemsFound: {
|
|
3658
3832
|
nb: "Ingen resultater",
|
|
3659
3833
|
nn: "Ingen resultat",
|
|
@@ -4174,7 +4348,7 @@ function Option({ item, state }) {
|
|
|
4174
4348
|
);
|
|
4175
4349
|
}, []);
|
|
4176
4350
|
return /* @__PURE__ */ jsx(OptionContext.Provider, { value: { labelProps, descriptionProps }, children: /* @__PURE__ */ jsx(
|
|
4177
|
-
ListItem,
|
|
4351
|
+
ListItem$1,
|
|
4178
4352
|
{
|
|
4179
4353
|
...optionProps,
|
|
4180
4354
|
...dataFields,
|
|
@@ -4186,7 +4360,7 @@ function Option({ item, state }) {
|
|
|
4186
4360
|
}
|
|
4187
4361
|
) });
|
|
4188
4362
|
}
|
|
4189
|
-
var OptionContext =
|
|
4363
|
+
var OptionContext = React14__default.createContext({
|
|
4190
4364
|
labelProps: {},
|
|
4191
4365
|
descriptionProps: {}
|
|
4192
4366
|
});
|
|
@@ -4201,7 +4375,7 @@ function ListBoxSection({ section, state }) {
|
|
|
4201
4375
|
});
|
|
4202
4376
|
const isFirstSection = section.key === state.collection.getFirstKey();
|
|
4203
4377
|
const titleColor = useColorModeValue("darkGrey", "white");
|
|
4204
|
-
return /* @__PURE__ */ jsx(List, { children: /* @__PURE__ */ jsxs(ListItem, { ...itemProps, listStyleType: "none", marginLeft: "0", paddingX: "1", children: [
|
|
4378
|
+
return /* @__PURE__ */ jsx(List, { children: /* @__PURE__ */ jsxs(ListItem$1, { ...itemProps, listStyleType: "none", marginLeft: "0", paddingX: "1", children: [
|
|
4205
4379
|
section.rendered && /* @__PURE__ */ jsx(
|
|
4206
4380
|
Box,
|
|
4207
4381
|
{
|
|
@@ -4433,6 +4607,7 @@ var NumericStepper = ({
|
|
|
4433
4607
|
label,
|
|
4434
4608
|
helperText,
|
|
4435
4609
|
errorText,
|
|
4610
|
+
gap,
|
|
4436
4611
|
...rest
|
|
4437
4612
|
} = props;
|
|
4438
4613
|
const addButtonRef = useRef(null);
|
|
@@ -4461,13 +4636,14 @@ var NumericStepper = ({
|
|
|
4461
4636
|
invalid,
|
|
4462
4637
|
readOnly,
|
|
4463
4638
|
required,
|
|
4639
|
+
gap,
|
|
4464
4640
|
children: [
|
|
4465
4641
|
/* @__PURE__ */ jsx(
|
|
4466
4642
|
VerySmallButton,
|
|
4467
4643
|
{
|
|
4468
4644
|
icon: /* @__PURE__ */ jsx(SubtractIcon, { stepLabel: clampedStepSize }),
|
|
4469
4645
|
"aria-label": t(
|
|
4470
|
-
|
|
4646
|
+
texts16.decrementButtonAriaLabel(
|
|
4471
4647
|
clampedStepSize,
|
|
4472
4648
|
stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
|
|
4473
4649
|
)
|
|
@@ -4494,7 +4670,7 @@ var NumericStepper = ({
|
|
|
4494
4670
|
css: styles.input,
|
|
4495
4671
|
width: `${Math.max(value.toString().length + 1, 3)}ch`,
|
|
4496
4672
|
"aria-live": "assertive",
|
|
4497
|
-
"aria-label": ariaLabelContext.plural === "" ? "" : t(
|
|
4673
|
+
"aria-label": ariaLabelContext.plural === "" ? "" : t(texts16.currentNumberAriaLabel(ariaLabelContext.plural)),
|
|
4498
4674
|
onChange: (event) => {
|
|
4499
4675
|
const numericInput = Number(event.target.value);
|
|
4500
4676
|
if (Number.isNaN(numericInput)) {
|
|
@@ -4511,8 +4687,11 @@ var NumericStepper = ({
|
|
|
4511
4687
|
Text3,
|
|
4512
4688
|
{
|
|
4513
4689
|
"aria-live": "assertive",
|
|
4514
|
-
|
|
4515
|
-
|
|
4690
|
+
width: `${Math.max(value.toString().length + 1, 3)}ch`,
|
|
4691
|
+
paddingX: 0.5,
|
|
4692
|
+
padding: 0,
|
|
4693
|
+
textAlign: "center",
|
|
4694
|
+
"aria-label": ariaLabelContext.plural === "" ? "" : t(texts16.currentNumberAriaLabel(ariaLabelContext.plural)),
|
|
4516
4695
|
children: value
|
|
4517
4696
|
}
|
|
4518
4697
|
),
|
|
@@ -4522,7 +4701,7 @@ var NumericStepper = ({
|
|
|
4522
4701
|
ref: addButtonRef,
|
|
4523
4702
|
icon: /* @__PURE__ */ jsx(AddIcon, { stepLabel: clampedStepSize }),
|
|
4524
4703
|
"aria-label": t(
|
|
4525
|
-
|
|
4704
|
+
texts16.incrementButtonAriaLabel(
|
|
4526
4705
|
clampedStepSize,
|
|
4527
4706
|
stepSize === 1 ? ariaLabelContext.singular : ariaLabelContext.plural
|
|
4528
4707
|
)
|
|
@@ -4596,7 +4775,7 @@ var AddIcon = ({ stepLabel }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
|
4596
4775
|
] }),
|
|
4597
4776
|
stepLabel > 1 && /* @__PURE__ */ jsx(chakra.span, { paddingRight: "1", children: stepLabel.toString() })
|
|
4598
4777
|
] });
|
|
4599
|
-
var
|
|
4778
|
+
var texts16 = createTexts({
|
|
4600
4779
|
currentNumberAriaLabel(ariaContext) {
|
|
4601
4780
|
return {
|
|
4602
4781
|
nb: `Valgt antall ${ariaContext}`,
|
|
@@ -4660,7 +4839,7 @@ var PasswordInput = ({
|
|
|
4660
4839
|
event.preventDefault();
|
|
4661
4840
|
setVisible(!visible);
|
|
4662
4841
|
},
|
|
4663
|
-
children: visible ? t(
|
|
4842
|
+
children: visible ? t(texts17.hidePassword) : t(texts17.showPassword)
|
|
4664
4843
|
}
|
|
4665
4844
|
),
|
|
4666
4845
|
...rest
|
|
@@ -4685,7 +4864,7 @@ var VisibilityTrigger = ({
|
|
|
4685
4864
|
}
|
|
4686
4865
|
);
|
|
4687
4866
|
};
|
|
4688
|
-
var
|
|
4867
|
+
var texts17 = createTexts({
|
|
4689
4868
|
showPassword: {
|
|
4690
4869
|
nb: "Vis",
|
|
4691
4870
|
nn: "Vis",
|
|
@@ -4737,14 +4916,14 @@ var CountryCodeSelect = ({
|
|
|
4737
4916
|
positioning: { placement: "bottom", flip: false },
|
|
4738
4917
|
collection: filteredCallingCodes,
|
|
4739
4918
|
lazyMount: true,
|
|
4740
|
-
"aria-label": t(
|
|
4919
|
+
"aria-label": t(texts18.countryCode),
|
|
4741
4920
|
sideRadiusVariant: "rightSideSquare",
|
|
4742
4921
|
role: "combobox",
|
|
4743
4922
|
children: filteredCallingCodes.items.map((code) => /* @__PURE__ */ jsx(SelectItem, { item: code, children: code.label }, code.label))
|
|
4744
4923
|
}
|
|
4745
4924
|
);
|
|
4746
4925
|
};
|
|
4747
|
-
var
|
|
4926
|
+
var texts18 = createTexts({
|
|
4748
4927
|
countryCode: {
|
|
4749
4928
|
nb: "Landkode",
|
|
4750
4929
|
nn: "Landskode",
|
|
@@ -4767,7 +4946,7 @@ var PhoneNumberInput = ({
|
|
|
4767
4946
|
errorText
|
|
4768
4947
|
} = props;
|
|
4769
4948
|
const { t } = useTranslation();
|
|
4770
|
-
const label = externalLabel ?? (optional ? t(
|
|
4949
|
+
const label = externalLabel ?? (optional ? t(texts19.phoneNumberOptional) : t(texts19.phoneNumber));
|
|
4771
4950
|
const [value, onChange] = useControllableState({
|
|
4772
4951
|
value: externalValue,
|
|
4773
4952
|
onChange: externalOnChange,
|
|
@@ -4822,7 +5001,7 @@ var PhoneNumberInput = ({
|
|
|
4822
5001
|
)
|
|
4823
5002
|
] });
|
|
4824
5003
|
};
|
|
4825
|
-
var
|
|
5004
|
+
var texts19 = createTexts({
|
|
4826
5005
|
phoneNumber: {
|
|
4827
5006
|
nb: "Telefonnummer",
|
|
4828
5007
|
nn: "Telefonnummer",
|
|
@@ -4874,16 +5053,16 @@ var SearchInput = ({
|
|
|
4874
5053
|
variant: "ghost",
|
|
4875
5054
|
type: "button",
|
|
4876
5055
|
size: "sm",
|
|
4877
|
-
"aria-label": t(
|
|
5056
|
+
"aria-label": t(texts20.reset),
|
|
4878
5057
|
icon: /* @__PURE__ */ jsx(CloseOutline24Icon, {}),
|
|
4879
5058
|
onClick: onReset
|
|
4880
5059
|
}
|
|
4881
5060
|
),
|
|
4882
|
-
label: label ?? t(
|
|
5061
|
+
label: label ?? t(texts20.label)
|
|
4883
5062
|
}
|
|
4884
5063
|
);
|
|
4885
5064
|
};
|
|
4886
|
-
var
|
|
5065
|
+
var texts20 = createTexts({
|
|
4887
5066
|
label: {
|
|
4888
5067
|
nb: "S\xF8k",
|
|
4889
5068
|
nn: "S\xF8k",
|
|
@@ -5419,72 +5598,6 @@ var TravelTag = function TravelTag2({
|
|
|
5419
5598
|
}
|
|
5420
5599
|
);
|
|
5421
5600
|
};
|
|
5422
|
-
var ExternalIcon = ({
|
|
5423
|
-
label,
|
|
5424
|
-
size
|
|
5425
|
-
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5426
|
-
size === "lg" || size === "md" ? /* @__PURE__ */ jsx(LinkOutOutline24Icon, { "aria-hidden": true, display: "inline" }) : /* @__PURE__ */ jsx(LinkOutOutline18Icon, { "aria-hidden": true, display: "inline" }),
|
|
5427
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: label })
|
|
5428
|
-
] });
|
|
5429
|
-
var TextLink = ({
|
|
5430
|
-
ref,
|
|
5431
|
-
children,
|
|
5432
|
-
external,
|
|
5433
|
-
href,
|
|
5434
|
-
...props
|
|
5435
|
-
}) => {
|
|
5436
|
-
const { t } = useTranslation();
|
|
5437
|
-
const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
|
|
5438
|
-
const externalLabel = t ? t(texts19.externalLink) : texts19.externalLink.en;
|
|
5439
|
-
if (props.asChild && isValidElement(children)) {
|
|
5440
|
-
return /* @__PURE__ */ jsx(
|
|
5441
|
-
Link,
|
|
5442
|
-
{
|
|
5443
|
-
href,
|
|
5444
|
-
...props,
|
|
5445
|
-
ref,
|
|
5446
|
-
...isExternal && {
|
|
5447
|
-
target: "_blank",
|
|
5448
|
-
rel: "noopener noreferrer"
|
|
5449
|
-
},
|
|
5450
|
-
children: cloneElement(children, {
|
|
5451
|
-
...children.props,
|
|
5452
|
-
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5453
|
-
children.props.children,
|
|
5454
|
-
isExternal && /* @__PURE__ */ jsx(ExternalIcon, { label: externalLabel, size: props.size })
|
|
5455
|
-
] })
|
|
5456
|
-
})
|
|
5457
|
-
}
|
|
5458
|
-
);
|
|
5459
|
-
}
|
|
5460
|
-
return /* @__PURE__ */ jsxs(
|
|
5461
|
-
Link,
|
|
5462
|
-
{
|
|
5463
|
-
href,
|
|
5464
|
-
...props,
|
|
5465
|
-
ref,
|
|
5466
|
-
...isExternal && {
|
|
5467
|
-
target: "_blank",
|
|
5468
|
-
rel: "noopener noreferrer"
|
|
5469
|
-
},
|
|
5470
|
-
children: [
|
|
5471
|
-
children,
|
|
5472
|
-
isExternal && /* @__PURE__ */ jsx(ExternalIcon, { label: externalLabel, size: props.size })
|
|
5473
|
-
]
|
|
5474
|
-
}
|
|
5475
|
-
);
|
|
5476
|
-
};
|
|
5477
|
-
var texts19 = createTexts({
|
|
5478
|
-
externalLink: {
|
|
5479
|
-
nb: "Ekstern lenke",
|
|
5480
|
-
nn: "Ekstern lenke",
|
|
5481
|
-
sv: "Extern l\xE4nk",
|
|
5482
|
-
en: "External link"
|
|
5483
|
-
}
|
|
5484
|
-
});
|
|
5485
|
-
var List = List$1.Root;
|
|
5486
|
-
var ListItem2 = List$1.Item;
|
|
5487
|
-
var ListIndicator = List$1.Indicator;
|
|
5488
5601
|
var CargonetLogo = ({
|
|
5489
5602
|
ref,
|
|
5490
5603
|
...props
|
|
@@ -6011,14 +6124,14 @@ var JumpButton = ({
|
|
|
6011
6124
|
as: "button",
|
|
6012
6125
|
ref,
|
|
6013
6126
|
css: styles.root,
|
|
6014
|
-
"aria-label": direction === "forward" ? t(
|
|
6127
|
+
"aria-label": direction === "forward" ? t(texts21.forward) : t(texts21.backward),
|
|
6015
6128
|
disabled,
|
|
6016
6129
|
...props,
|
|
6017
6130
|
children: direction === "forward" ? /* @__PURE__ */ jsx(Forward15MediaControllerFill30Icon, { css: styles.icon }) : /* @__PURE__ */ jsx(Backward15MediaControllerFill30Icon, { css: styles.icon })
|
|
6018
6131
|
}
|
|
6019
6132
|
);
|
|
6020
6133
|
};
|
|
6021
|
-
var
|
|
6134
|
+
var texts21 = createTexts({
|
|
6022
6135
|
forward: {
|
|
6023
6136
|
nb: "15 sekunder frem",
|
|
6024
6137
|
nn: "15 sekunder fram",
|
|
@@ -6046,14 +6159,14 @@ var PlayPauseButton = ({
|
|
|
6046
6159
|
ref,
|
|
6047
6160
|
as: "button",
|
|
6048
6161
|
css: styles.root,
|
|
6049
|
-
"aria-label": playing ? t(
|
|
6162
|
+
"aria-label": playing ? t(texts22.pause) : t(texts22.play),
|
|
6050
6163
|
disabled,
|
|
6051
6164
|
...props,
|
|
6052
6165
|
children: playing ? /* @__PURE__ */ jsx(PauseMediaControllerFill24Icon, { css: styles.icon }) : /* @__PURE__ */ jsx(PlayMediaControllerFill24Icon, { css: styles.icon })
|
|
6053
6166
|
}
|
|
6054
6167
|
);
|
|
6055
6168
|
};
|
|
6056
|
-
var
|
|
6169
|
+
var texts22 = createTexts({
|
|
6057
6170
|
pause: {
|
|
6058
6171
|
nb: "Pause",
|
|
6059
6172
|
nn: "Pause",
|
|
@@ -6081,14 +6194,14 @@ var SkipButton = ({
|
|
|
6081
6194
|
ref,
|
|
6082
6195
|
as: "button",
|
|
6083
6196
|
css: styles.root,
|
|
6084
|
-
"aria-label": direction === "forward" ? t(
|
|
6197
|
+
"aria-label": direction === "forward" ? t(texts23.next) : t(texts23.previous),
|
|
6085
6198
|
disabled,
|
|
6086
6199
|
...props,
|
|
6087
6200
|
children: direction === "forward" ? /* @__PURE__ */ jsx(NextMediaControllerFill30Icon, { css: styles.icon }) : /* @__PURE__ */ jsx(PreviousMediaControllerFill30Icon, { css: styles.icon })
|
|
6088
6201
|
}
|
|
6089
6202
|
);
|
|
6090
6203
|
};
|
|
6091
|
-
var
|
|
6204
|
+
var texts23 = createTexts({
|
|
6092
6205
|
next: {
|
|
6093
6206
|
nb: "Neste",
|
|
6094
6207
|
nn: "Neste",
|
|
@@ -6145,16 +6258,16 @@ var NudgeContent = ({
|
|
|
6145
6258
|
...props
|
|
6146
6259
|
}) => {
|
|
6147
6260
|
const [currentStep, setCurrentStep] = useState(1);
|
|
6148
|
-
const childrenArray =
|
|
6261
|
+
const childrenArray = React14__default.Children.toArray(children);
|
|
6149
6262
|
const { open } = usePopoverContext();
|
|
6150
6263
|
useEffect(() => {
|
|
6151
6264
|
setCurrentStep(1);
|
|
6152
6265
|
}, [children, open]);
|
|
6153
6266
|
const wizardPages = childrenArray.filter(
|
|
6154
|
-
(child) =>
|
|
6267
|
+
(child) => React14__default.isValidElement(child) && child.type === NudgeWizardStep
|
|
6155
6268
|
);
|
|
6156
6269
|
const restChildren = childrenArray.filter(
|
|
6157
|
-
(child) => !
|
|
6270
|
+
(child) => !React14__default.isValidElement(child) || child.type !== NudgeWizardStep
|
|
6158
6271
|
);
|
|
6159
6272
|
const totalSteps = wizardPages.length;
|
|
6160
6273
|
const isLastStep = totalSteps === currentStep;
|
|
@@ -6203,7 +6316,7 @@ var NudgeActions = ({ ...props }) => {
|
|
|
6203
6316
|
var NextButton = ({ isLastStep, onNext }) => {
|
|
6204
6317
|
const { t } = useTranslation();
|
|
6205
6318
|
if (isLastStep)
|
|
6206
|
-
return /* @__PURE__ */ jsx(PopoverCloseTrigger, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "xs", children: t(
|
|
6319
|
+
return /* @__PURE__ */ jsx(PopoverCloseTrigger, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "xs", children: t(texts24.close) }) });
|
|
6207
6320
|
return /* @__PURE__ */ jsx(
|
|
6208
6321
|
Button,
|
|
6209
6322
|
{
|
|
@@ -6211,11 +6324,11 @@ var NextButton = ({ isLastStep, onNext }) => {
|
|
|
6211
6324
|
size: "xs",
|
|
6212
6325
|
rightIcon: /* @__PURE__ */ jsx(ArrowRightFill18Icon, {}),
|
|
6213
6326
|
onClick: onNext,
|
|
6214
|
-
children: t(
|
|
6327
|
+
children: t(texts24.nextStep)
|
|
6215
6328
|
}
|
|
6216
6329
|
);
|
|
6217
6330
|
};
|
|
6218
|
-
var
|
|
6331
|
+
var texts24 = createTexts({
|
|
6219
6332
|
nextStep: {
|
|
6220
6333
|
nb: "Neste",
|
|
6221
6334
|
nn: "Neste",
|
|
@@ -6272,7 +6385,7 @@ var PaginationEllipsis = ({
|
|
|
6272
6385
|
ref,
|
|
6273
6386
|
...props
|
|
6274
6387
|
}) => {
|
|
6275
|
-
return /* @__PURE__ */ jsx(
|
|
6388
|
+
return /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(Pagination$1.Ellipsis, { ref, ...props, asChild: true, children: /* @__PURE__ */ jsx(Box, { cursor: "default", children: "..." }) }) });
|
|
6276
6389
|
};
|
|
6277
6390
|
var PaginationItem = ({
|
|
6278
6391
|
ref,
|
|
@@ -6282,7 +6395,7 @@ var PaginationItem = ({
|
|
|
6282
6395
|
const { t } = useTranslation();
|
|
6283
6396
|
const { page, totalPages } = usePaginationContext();
|
|
6284
6397
|
if (rootProps.getHref) {
|
|
6285
|
-
return /* @__PURE__ */ jsx(
|
|
6398
|
+
return /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(
|
|
6286
6399
|
Pagination$1.Item,
|
|
6287
6400
|
{
|
|
6288
6401
|
as: props.as ?? "a",
|
|
@@ -6291,18 +6404,18 @@ var PaginationItem = ({
|
|
|
6291
6404
|
to: rootProps.getHref(props.value)
|
|
6292
6405
|
},
|
|
6293
6406
|
ref,
|
|
6294
|
-
"aria-label": t(
|
|
6407
|
+
"aria-label": t(texts25.pageOf(props.value, totalPages)),
|
|
6295
6408
|
...props,
|
|
6296
6409
|
children: props.value
|
|
6297
6410
|
}
|
|
6298
6411
|
) });
|
|
6299
6412
|
}
|
|
6300
|
-
return /* @__PURE__ */ jsx(
|
|
6413
|
+
return /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(
|
|
6301
6414
|
Pagination$1.Item,
|
|
6302
6415
|
{
|
|
6303
6416
|
as: props.as ?? "button",
|
|
6304
6417
|
ref,
|
|
6305
|
-
"aria-label": t(
|
|
6418
|
+
"aria-label": t(texts25.pageOf(props.value, totalPages)),
|
|
6306
6419
|
"aria-current": page === props.value,
|
|
6307
6420
|
...props,
|
|
6308
6421
|
children: props.value
|
|
@@ -6321,7 +6434,7 @@ var PaginationPrevTrigger = ({
|
|
|
6321
6434
|
if (page <= 1)
|
|
6322
6435
|
return null;
|
|
6323
6436
|
if (rootProps.getHref) {
|
|
6324
|
-
return /* @__PURE__ */ jsx(
|
|
6437
|
+
return /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(
|
|
6325
6438
|
Pagination$1.PrevTrigger,
|
|
6326
6439
|
{
|
|
6327
6440
|
as: props.as ?? "a",
|
|
@@ -6332,18 +6445,18 @@ var PaginationPrevTrigger = ({
|
|
|
6332
6445
|
},
|
|
6333
6446
|
ref,
|
|
6334
6447
|
css: styles.item,
|
|
6335
|
-
"aria-label": t(
|
|
6448
|
+
"aria-label": t(texts25.previousPage),
|
|
6336
6449
|
...props,
|
|
6337
6450
|
children: /* @__PURE__ */ jsx(DropdownLeftOutline18Icon, {})
|
|
6338
6451
|
}
|
|
6339
6452
|
) });
|
|
6340
6453
|
}
|
|
6341
|
-
return /* @__PURE__ */ jsx(
|
|
6454
|
+
return /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(
|
|
6342
6455
|
Pagination$1.PrevTrigger,
|
|
6343
6456
|
{
|
|
6344
6457
|
ref,
|
|
6345
6458
|
asChild: true,
|
|
6346
|
-
"aria-label": t(
|
|
6459
|
+
"aria-label": t(texts25.previousPage),
|
|
6347
6460
|
as: props.as || "button",
|
|
6348
6461
|
css: styles.item,
|
|
6349
6462
|
...props,
|
|
@@ -6363,7 +6476,7 @@ var PaginationNextTrigger = ({
|
|
|
6363
6476
|
if (page >= totalPages)
|
|
6364
6477
|
return null;
|
|
6365
6478
|
if (rootProps.getHref) {
|
|
6366
|
-
return /* @__PURE__ */ jsx(
|
|
6479
|
+
return /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(
|
|
6367
6480
|
Pagination$1.NextTrigger,
|
|
6368
6481
|
{
|
|
6369
6482
|
ref,
|
|
@@ -6372,18 +6485,18 @@ var PaginationNextTrigger = ({
|
|
|
6372
6485
|
to: rootProps.getHref(props.value)
|
|
6373
6486
|
},
|
|
6374
6487
|
css: styles.item,
|
|
6375
|
-
"aria-label": t(
|
|
6488
|
+
"aria-label": t(texts25.nextPage),
|
|
6376
6489
|
...props,
|
|
6377
6490
|
children: /* @__PURE__ */ jsx(DropdownRightOutline18Icon, {})
|
|
6378
6491
|
}
|
|
6379
6492
|
) });
|
|
6380
6493
|
}
|
|
6381
|
-
return /* @__PURE__ */ jsx(
|
|
6494
|
+
return /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(
|
|
6382
6495
|
Pagination$1.NextTrigger,
|
|
6383
6496
|
{
|
|
6384
6497
|
ref,
|
|
6385
6498
|
css: styles.item,
|
|
6386
|
-
"aria-label": t(
|
|
6499
|
+
"aria-label": t(texts25.nextPage),
|
|
6387
6500
|
as: props.as || "button",
|
|
6388
6501
|
...props,
|
|
6389
6502
|
children: /* @__PURE__ */ jsx(DropdownRightOutline18Icon, {})
|
|
@@ -6410,7 +6523,7 @@ var PaginationItems = (props) => {
|
|
|
6410
6523
|
);
|
|
6411
6524
|
}) });
|
|
6412
6525
|
};
|
|
6413
|
-
var
|
|
6526
|
+
var texts25 = createTexts({
|
|
6414
6527
|
previousPage: {
|
|
6415
6528
|
nb: "Forrige side",
|
|
6416
6529
|
nn: "F\xF8rre side",
|
|
@@ -6457,7 +6570,7 @@ var PopoverContent = ({
|
|
|
6457
6570
|
...props
|
|
6458
6571
|
}) => {
|
|
6459
6572
|
const { colorMode } = useColorMode();
|
|
6460
|
-
const closeButtonRef =
|
|
6573
|
+
const closeButtonRef = React14__default.useRef(null);
|
|
6461
6574
|
const { open } = usePopoverContext();
|
|
6462
6575
|
useEffect(() => {
|
|
6463
6576
|
if (showCloseButton && open && closeButtonRef.current) {
|
|
@@ -6510,7 +6623,7 @@ var ProgressIndicator = ({
|
|
|
6510
6623
|
"aria-valuemin": 1,
|
|
6511
6624
|
"aria-valuemax": numberOfSteps,
|
|
6512
6625
|
"aria-valuenow": activeStep,
|
|
6513
|
-
"aria-valuetext": t(
|
|
6626
|
+
"aria-valuetext": t(texts26.stepsOf(activeStep, numberOfSteps)),
|
|
6514
6627
|
ref,
|
|
6515
6628
|
children: /* @__PURE__ */ jsx(Box, { css: { ...styles.container, ...css }, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsx(
|
|
6516
6629
|
Box,
|
|
@@ -6529,7 +6642,7 @@ var ProgressIndicator = ({
|
|
|
6529
6642
|
}
|
|
6530
6643
|
);
|
|
6531
6644
|
};
|
|
6532
|
-
var
|
|
6645
|
+
var texts26 = createTexts({
|
|
6533
6646
|
stepsOf: (activeStep, numberOfSteps) => ({
|
|
6534
6647
|
nb: `Steg ${activeStep} av ${numberOfSteps}`,
|
|
6535
6648
|
nn: `Steg ${activeStep} av ${numberOfSteps}`,
|
|
@@ -6659,7 +6772,7 @@ var SporProvider = ({
|
|
|
6659
6772
|
children
|
|
6660
6773
|
] }) }) });
|
|
6661
6774
|
};
|
|
6662
|
-
var StepperContext =
|
|
6775
|
+
var StepperContext = React14__default.createContext(null);
|
|
6663
6776
|
var StepperProvider = ({
|
|
6664
6777
|
activeStep,
|
|
6665
6778
|
children,
|
|
@@ -6676,7 +6789,7 @@ var StepperProvider = ({
|
|
|
6676
6789
|
);
|
|
6677
6790
|
};
|
|
6678
6791
|
var useStepper = () => {
|
|
6679
|
-
const context =
|
|
6792
|
+
const context = React14__default.useContext(StepperContext);
|
|
6680
6793
|
if (!context) {
|
|
6681
6794
|
throw new Error(
|
|
6682
6795
|
"useStepper must be used within a StepperProvider. Most likely, you forgot to wrap your StepperStep in a Stepper component"
|
|
@@ -6725,7 +6838,7 @@ var Stepper = function Stepper2({
|
|
|
6725
6838
|
/* @__PURE__ */ jsx(
|
|
6726
6839
|
IconButton,
|
|
6727
6840
|
{
|
|
6728
|
-
"aria-label": t(
|
|
6841
|
+
"aria-label": t(texts27.back),
|
|
6729
6842
|
icon: /* @__PURE__ */ jsx(ArrowLeftFill24Icon, {}),
|
|
6730
6843
|
variant: "ghost",
|
|
6731
6844
|
size: "sm",
|
|
@@ -6749,7 +6862,7 @@ var Stepper = function Stepper2({
|
|
|
6749
6862
|
children: heading
|
|
6750
6863
|
}
|
|
6751
6864
|
),
|
|
6752
|
-
/* @__PURE__ */ jsx(Box, { css: style.stepCounter, "data-part": "step-counter", children: t(
|
|
6865
|
+
/* @__PURE__ */ jsx(Box, { css: style.stepCounter, "data-part": "step-counter", children: t(texts27.stepsOf(activeStep, numberOfSteps)) })
|
|
6753
6866
|
]
|
|
6754
6867
|
}
|
|
6755
6868
|
) }),
|
|
@@ -6768,7 +6881,7 @@ var Stepper = function Stepper2({
|
|
|
6768
6881
|
}
|
|
6769
6882
|
) });
|
|
6770
6883
|
};
|
|
6771
|
-
var
|
|
6884
|
+
var texts27 = createTexts({
|
|
6772
6885
|
stepsOf: (activeStep, numberOfSteps) => ({
|
|
6773
6886
|
nb: `Steg ${activeStep}/${numberOfSteps}`,
|
|
6774
6887
|
nn: `Steg ${activeStep}/${numberOfSteps}`,
|
|
@@ -7466,12 +7579,12 @@ var pressableCardRecipe = defineRecipe({
|
|
|
7466
7579
|
accent: {
|
|
7467
7580
|
boxShadow: "0px 1px 3px 0px var(--shadow-color)",
|
|
7468
7581
|
shadowColor: "surface.disabled",
|
|
7469
|
-
background: "surface.
|
|
7582
|
+
background: "surface.accent",
|
|
7470
7583
|
_hover: {
|
|
7471
|
-
background: "surface.
|
|
7584
|
+
background: "surface.accent.hover",
|
|
7472
7585
|
boxShadow: "0px 2px 6px 0px var(--shadow-color)",
|
|
7473
7586
|
_active: {
|
|
7474
|
-
background: "surface.
|
|
7587
|
+
background: "surface.accent.active",
|
|
7475
7588
|
boxShadow: "none"
|
|
7476
7589
|
}
|
|
7477
7590
|
}
|
|
@@ -8004,6 +8117,12 @@ var menuAnatomy = createAnatomy("menu").parts(
|
|
|
8004
8117
|
"triggerItem",
|
|
8005
8118
|
"checkboxItem"
|
|
8006
8119
|
);
|
|
8120
|
+
var errorSummaryAnatomy = createAnatomy("error-summary").parts(
|
|
8121
|
+
"container",
|
|
8122
|
+
"heading",
|
|
8123
|
+
"list",
|
|
8124
|
+
"item"
|
|
8125
|
+
);
|
|
8007
8126
|
|
|
8008
8127
|
// src/theme/slot-recipes/accordion.ts
|
|
8009
8128
|
var accordionSlotRecipe = defineSlotRecipe({
|
|
@@ -9540,6 +9659,34 @@ var drawerSlotRecipe = defineSlotRecipe({
|
|
|
9540
9659
|
}
|
|
9541
9660
|
}
|
|
9542
9661
|
});
|
|
9662
|
+
var errorSummarySlotRecipe = defineSlotRecipe({
|
|
9663
|
+
slots: errorSummaryAnatomy.keys(),
|
|
9664
|
+
className: "spor-error-summary",
|
|
9665
|
+
base: {
|
|
9666
|
+
container: {
|
|
9667
|
+
display: "flex",
|
|
9668
|
+
flexDirection: "column",
|
|
9669
|
+
padding: [3, 5],
|
|
9670
|
+
backgroundColor: "surface.critical",
|
|
9671
|
+
borderRadius: "md"
|
|
9672
|
+
},
|
|
9673
|
+
heading: {
|
|
9674
|
+
fontSize: "md",
|
|
9675
|
+
fontWeight: "bold",
|
|
9676
|
+
color: "text.critical",
|
|
9677
|
+
gap: [1, 1.5],
|
|
9678
|
+
alignItems: "center"
|
|
9679
|
+
},
|
|
9680
|
+
list: {
|
|
9681
|
+
alignItems: "flex-start",
|
|
9682
|
+
paddingLeft: [4, 5]
|
|
9683
|
+
},
|
|
9684
|
+
item: {
|
|
9685
|
+
color: "text.critical.subtle",
|
|
9686
|
+
marginTop: [2, 1.5]
|
|
9687
|
+
}
|
|
9688
|
+
}
|
|
9689
|
+
});
|
|
9543
9690
|
var fieldSlotRecipe = defineSlotRecipe({
|
|
9544
9691
|
className: "spor-field",
|
|
9545
9692
|
slots: fieldAnatomy.keys(),
|
|
@@ -10786,17 +10933,18 @@ var numericStepperRecipe = defineSlotRecipe({
|
|
|
10786
10933
|
"& > div": {
|
|
10787
10934
|
display: "flex",
|
|
10788
10935
|
flexDirection: "row",
|
|
10789
|
-
alignItems: "center"
|
|
10936
|
+
alignItems: "center",
|
|
10937
|
+
gap: 1
|
|
10790
10938
|
}
|
|
10791
10939
|
},
|
|
10792
10940
|
input: {
|
|
10793
10941
|
fontSize: "sm",
|
|
10794
10942
|
fontWeight: "bold",
|
|
10795
|
-
marginX: 0.5,
|
|
10796
10943
|
padding: 0,
|
|
10797
10944
|
paddingX: 0.5,
|
|
10798
10945
|
borderRadius: "xs",
|
|
10799
|
-
outline: "
|
|
10946
|
+
outline: "1px solid",
|
|
10947
|
+
outlineColor: "outline.core",
|
|
10800
10948
|
height: "auto",
|
|
10801
10949
|
textAlign: "center",
|
|
10802
10950
|
transitionProperty: "common",
|
|
@@ -12088,7 +12236,8 @@ var slotRecipes = {
|
|
|
12088
12236
|
tooltip: popoverSlotRecipe,
|
|
12089
12237
|
tag: inputChipSlotRecipe,
|
|
12090
12238
|
menu: menuSlotRecipe,
|
|
12091
|
-
choiceChip: choiceChipSlotRecipe
|
|
12239
|
+
choiceChip: choiceChipSlotRecipe,
|
|
12240
|
+
errorSummary: errorSummarySlotRecipe
|
|
12092
12241
|
};
|
|
12093
12242
|
var animations = defineTokens.animations({
|
|
12094
12243
|
spin: {
|
|
@@ -12936,6 +13085,6 @@ var TooltipContent = ({
|
|
|
12936
13085
|
] }) }) });
|
|
12937
13086
|
};
|
|
12938
13087
|
|
|
12939
|
-
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, AttachedInputs, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, Brand, Breadcrumb, Button, ButtonGroup, Calendar, CalendarCell, CalendarGrid, CalendarHeader, CalendarProvider, CardSelect, CardSelectContent, CardSelectTrigger, CargonetLogo, Checkbox, CheckboxGroup, ChoiceChip, ChoiceChipGroup, ChoiceChipLabel, Clipboard, ClipboardButton, CloseButton, CloseDrawerLine, Code, ColorInlineLoader, ColorModeButton, ColorModeIcon, ColorModeProvider, ColorSpinner, Combobox2 as Combobox, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkSpinner, DatePicker, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field3 as Field, FieldErrorText, FieldLabel, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FilterChip, FloatingActionButton, Heading, IconButton, InfoTag, Input, InputChip, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, List, ListBox, ListIndicator,
|
|
13088
|
+
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, AttachedInputs, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, Brand, Breadcrumb, Button, ButtonGroup, Calendar, CalendarCell, CalendarGrid, CalendarHeader, CalendarProvider, CardSelect, CardSelectContent, CardSelectTrigger, CargonetLogo, Checkbox, CheckboxGroup, ChoiceChip, ChoiceChipGroup, ChoiceChipLabel, Clipboard, ClipboardButton, CloseButton, CloseDrawerLine, Code, ColorInlineLoader, ColorModeButton, ColorModeIcon, ColorModeProvider, ColorSpinner, Combobox2 as Combobox, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkSpinner, DatePicker, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, ErrorSummary, ErrorSummaryItem, Expandable, ExpandableAlert, ExpandableItem, Field3 as Field, FieldErrorText, FieldLabel, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FilterChip, FloatingActionButton, Heading, IconButton, InfoTag, Input, InputChip, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, List, ListBox, ListIndicator, ListItem, Menu, MenuCheckboxItem, MenuContent, MenuItem, MenuItemGroup, MenuRadioItem, MenuRadioItemGroup, MenuSeparator, MenuTrigger, MenuTriggerItem, NativeSelect, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, NudgeTrigger, NudgeWizardStep, NumericStepper, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover2 as Popover, PopoverContent, PopoverTrigger, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, RangeCalendar, ScrollCalendar, SearchInput, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, SkeletonText, SkipButton, SporProvider, StaticCard, Stepper, StepperStep, SvgBox, Switch, Table, TableBody, TableColumnHeader, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Text3 as Text, TextLink, Textarea, TimePicker, Tooltip, TooltipContent, TooltipTrigger, TravelTag, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useMenuContext, useTableSort, useTranslation };
|
|
12940
13089
|
//# sourceMappingURL=out.js.map
|
|
12941
13090
|
//# sourceMappingURL=index.mjs.map
|