@vygruppen/spor-react 12.19.1 → 12.20.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 +12 -12
- package/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +21 -0
- package/dist/index.cjs +118 -99
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +118 -99
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/alert/ServiceAlert.tsx +5 -5
- package/src/button/IconButton.tsx +1 -1
- package/src/calendar/CalendarContext.tsx +8 -7
- package/src/calendar/CalendarGrid.tsx +7 -3
- package/src/calendar/ScrollCalendar.tsx +4 -4
- package/src/calendar/utils.ts +5 -5
- package/src/datepicker/CalendarGrid.tsx +1 -1
- package/src/datepicker/CalendarHeader.tsx +3 -3
- package/src/datepicker/DateField.tsx +2 -2
- package/src/datepicker/DatePicker.tsx +1 -1
- package/src/datepicker/DateRangePicker.tsx +2 -2
- package/src/dialog/Drawer.tsx +6 -6
- package/src/i18n/index.tsx +1 -1
- package/src/input/Combobox.tsx +4 -4
- package/src/input/CountryCodeSelect.tsx +1 -1
- package/src/input/ListBox.tsx +1 -6
- package/src/input/NumericStepper.tsx +14 -14
- package/src/input/PasswordInput.tsx +5 -5
- package/src/input/PhoneNumberInput.tsx +2 -2
- package/src/input/Select.tsx +8 -3
- package/src/input/useFLoatingInputState.tsx +10 -10
- package/src/linjetag/icons.tsx +6 -2
- package/src/loader/useRotatingLabel.tsx +6 -3
- package/src/nudge/Nudge.tsx +1 -1
- package/src/pagination/Pagination.tsx +1 -0
- package/src/progress-indicator/ProgressIndicator.tsx +4 -4
- package/src/theme/semantic-tokens/shadows.ts +13 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @vygruppen/spor-react@12.
|
|
2
|
+
> @vygruppen/spor-react@12.20.1 build /home/runner/work/spor/spor/packages/spor-react
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
CLI Building entry: src/index.tsx, src/icons/index.tsx
|
|
@@ -11,18 +11,18 @@ CLI Cleaning output folder
|
|
|
11
11
|
ESM Build start
|
|
12
12
|
CJS Build start
|
|
13
13
|
DTS Build start
|
|
14
|
-
|
|
15
|
-
ESM dist/index.mjs 313.28 KB
|
|
16
|
-
ESM dist/icons/index.mjs.map 157.00 B
|
|
17
|
-
ESM dist/index.mjs.map 667.32 KB
|
|
18
|
-
ESM ⚡️ Build success in 2695ms
|
|
19
|
-
CJS dist/index.cjs 336.53 KB
|
|
14
|
+
CJS dist/index.cjs 337.20 KB
|
|
20
15
|
CJS dist/icons/index.cjs 381.00 B
|
|
21
|
-
CJS dist/index.cjs.map
|
|
16
|
+
CJS dist/index.cjs.map 668.38 KB
|
|
22
17
|
CJS dist/icons/index.cjs.map 157.00 B
|
|
23
|
-
CJS ⚡️ Build success in
|
|
24
|
-
|
|
18
|
+
CJS ⚡️ Build success in 2567ms
|
|
19
|
+
ESM dist/index.mjs 313.92 KB
|
|
20
|
+
ESM dist/icons/index.mjs 110.00 B
|
|
21
|
+
ESM dist/index.mjs.map 668.38 KB
|
|
22
|
+
ESM dist/icons/index.mjs.map 157.00 B
|
|
23
|
+
ESM ⚡️ Build success in 2567ms
|
|
24
|
+
DTS ⚡️ Build success in 18616ms
|
|
25
25
|
DTS dist/icons/index.d.ts 44.00 B
|
|
26
|
-
DTS dist/index.d.ts 158.
|
|
26
|
+
DTS dist/index.d.ts 158.95 KB
|
|
27
27
|
DTS dist/icons/index.d.cts 44.00 B
|
|
28
|
-
DTS dist/index.d.cts 158.
|
|
28
|
+
DTS dist/index.d.cts 158.95 KB
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @vygruppen/spor-react@12.
|
|
2
|
+
> @vygruppen/spor-react@12.20.1 postinstall /home/runner/work/spor/spor/packages/spor-react
|
|
3
3
|
> chakra typegen src/theme/index.ts
|
|
4
4
|
|
|
5
5
|
[dotenv@17.2.2] injecting env (0) from .env -- tip: ⚙️ enable debug logging with { debug: true }
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @vygruppen/spor-react
|
|
2
2
|
|
|
3
|
+
## 12.20.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b3659ad: Don't render SelectContent portalled on server side"
|
|
8
|
+
|
|
9
|
+
## 12.20.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- d8fd719: Add ESLint rule to disallow unnecessary curly braces in JSX props.
|
|
14
|
+
Also add rule to prevent abbreviations
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 1ed4bc2: Added colors that support darkmode to shadow-token
|
|
19
|
+
- Updated dependencies [1ed4bc2]
|
|
20
|
+
- Updated dependencies [d8fd719]
|
|
21
|
+
- @vygruppen/spor-design-tokens@4.3.0
|
|
22
|
+
- @vygruppen/spor-icon-react@4.4.0
|
|
23
|
+
|
|
3
24
|
## 12.19.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -312,7 +312,10 @@ var LightSpinner = ({
|
|
|
312
312
|
children && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { marginTop: 3, fontWeight: "bold", children })
|
|
313
313
|
] });
|
|
314
314
|
};
|
|
315
|
-
var useRotatingLabel = ({
|
|
315
|
+
var useRotatingLabel = ({
|
|
316
|
+
label,
|
|
317
|
+
delay
|
|
318
|
+
}) => {
|
|
316
319
|
const loadingTextArray = React29.useMemo(
|
|
317
320
|
() => Array.isArray(label) ? label : [label],
|
|
318
321
|
[label]
|
|
@@ -320,7 +323,7 @@ var useRotatingLabel = ({ label, delay }) => {
|
|
|
320
323
|
const [currentLoadingTextIndex, setCurrentLoadingTextIndex] = React29.useState(0);
|
|
321
324
|
usehooksTs.useInterval(() => {
|
|
322
325
|
setCurrentLoadingTextIndex(
|
|
323
|
-
(
|
|
326
|
+
(previousIndex) => (previousIndex + 1) % loadingTextArray.length
|
|
324
327
|
);
|
|
325
328
|
}, delay);
|
|
326
329
|
return loadingTextArray[currentLoadingTextIndex];
|
|
@@ -1230,12 +1233,12 @@ var ServiceAlert = React29.forwardRef(
|
|
|
1230
1233
|
ServiceAlert.displayName = "ServiceAlert";
|
|
1231
1234
|
var texts6 = createTexts({
|
|
1232
1235
|
notification: (notification) => {
|
|
1233
|
-
const
|
|
1236
|
+
const numberNotification = Number(notification);
|
|
1234
1237
|
return {
|
|
1235
|
-
nb: `${
|
|
1236
|
-
nn: `${
|
|
1237
|
-
sv: `${
|
|
1238
|
-
en: `${
|
|
1238
|
+
nb: `${numberNotification} ${numberNotification > 1 ? "varsler" : "varsel"}`,
|
|
1239
|
+
nn: `${numberNotification} ${numberNotification > 1 ? "varslar" : "varsel"}`,
|
|
1240
|
+
sv: `${numberNotification} ${numberNotification > 1 ? "underr\xE4ttelser" : "underr\xE4ttelse"}`,
|
|
1241
|
+
en: `${numberNotification} ${numberNotification > 1 ? "notifications" : "notification"}`
|
|
1239
1242
|
};
|
|
1240
1243
|
},
|
|
1241
1244
|
service: {
|
|
@@ -1268,11 +1271,11 @@ var Breadcrumb = React29.forwardRef(
|
|
|
1268
1271
|
Breadcrumb.displayName = "Breadcrumb";
|
|
1269
1272
|
|
|
1270
1273
|
// src/calendar/utils.ts
|
|
1271
|
-
var capitalizeFirstLetter = (
|
|
1272
|
-
function getSafeRangeValue(
|
|
1273
|
-
if (!
|
|
1274
|
+
var capitalizeFirstLetter = (string_) => string_.replace(/^./, (c) => c.toUpperCase());
|
|
1275
|
+
function getSafeRangeValue(value) {
|
|
1276
|
+
if (!value)
|
|
1274
1277
|
return null;
|
|
1275
|
-
const [start, end] =
|
|
1278
|
+
const [start, end] = value;
|
|
1276
1279
|
const startDv = start;
|
|
1277
1280
|
const endDv = end;
|
|
1278
1281
|
if (startDv && endDv)
|
|
@@ -1310,10 +1313,10 @@ var getTimestampFromTime = (time) => {
|
|
|
1310
1313
|
};
|
|
1311
1314
|
var CalendarContext = React29.createContext(null);
|
|
1312
1315
|
function useCalendar() {
|
|
1313
|
-
const
|
|
1314
|
-
if (!
|
|
1316
|
+
const context = React29.useContext(CalendarContext);
|
|
1317
|
+
if (!context)
|
|
1315
1318
|
throw new Error("useCalendar must be used within CalendarProvider");
|
|
1316
|
-
return
|
|
1319
|
+
return context;
|
|
1317
1320
|
}
|
|
1318
1321
|
function CalendarProvider(props) {
|
|
1319
1322
|
const locale = useCurrentLocale();
|
|
@@ -1343,7 +1346,7 @@ function CalendarProvider(props) {
|
|
|
1343
1346
|
});
|
|
1344
1347
|
const {
|
|
1345
1348
|
calendarProps: singleCalendarProps,
|
|
1346
|
-
prevButtonProps:
|
|
1349
|
+
prevButtonProps: singlePreviousButtonProps,
|
|
1347
1350
|
nextButtonProps: singleNextButtonProps
|
|
1348
1351
|
} = reactAria.useCalendar(
|
|
1349
1352
|
calendarProps,
|
|
@@ -1369,7 +1372,7 @@ function CalendarProvider(props) {
|
|
|
1369
1372
|
});
|
|
1370
1373
|
const {
|
|
1371
1374
|
calendarProps: rangeCalendarProps,
|
|
1372
|
-
prevButtonProps:
|
|
1375
|
+
prevButtonProps: rangePreviousButtonProps,
|
|
1373
1376
|
nextButtonProps: rangeNextButtonProps
|
|
1374
1377
|
} = reactAria.useRangeCalendar(
|
|
1375
1378
|
calendarProps,
|
|
@@ -1401,7 +1404,7 @@ function CalendarProvider(props) {
|
|
|
1401
1404
|
mode: "range",
|
|
1402
1405
|
calendarProps: rangeCalendarProps,
|
|
1403
1406
|
nextButtonProps: rangeNextButtonProps,
|
|
1404
|
-
prevButtonProps:
|
|
1407
|
+
prevButtonProps: rangePreviousButtonProps,
|
|
1405
1408
|
startValue: getRangeStartValue(),
|
|
1406
1409
|
endValue: getRangeEndValue(),
|
|
1407
1410
|
isSelectingRange: rangeState.anchorDate !== null && !rangeState.isDragging,
|
|
@@ -1411,7 +1414,7 @@ function CalendarProvider(props) {
|
|
|
1411
1414
|
mode: "single",
|
|
1412
1415
|
calendarProps: singleCalendarProps,
|
|
1413
1416
|
nextButtonProps: singleNextButtonProps,
|
|
1414
|
-
prevButtonProps:
|
|
1417
|
+
prevButtonProps: singlePreviousButtonProps,
|
|
1415
1418
|
startValue: singleState.value,
|
|
1416
1419
|
endValue: null,
|
|
1417
1420
|
isSelectingRange: false,
|
|
@@ -1594,7 +1597,14 @@ function CalendarGrid({ offset = {} }) {
|
|
|
1594
1597
|
index
|
|
1595
1598
|
) }, index)) }) }),
|
|
1596
1599
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: weeksInMonth }, (_, weekIndex) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: state.getDatesInWeek(weekIndex, startDate).map(
|
|
1597
|
-
(date,
|
|
1600
|
+
(date, index) => date ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1601
|
+
CalendarCell,
|
|
1602
|
+
{
|
|
1603
|
+
date,
|
|
1604
|
+
currentMonth: startDate
|
|
1605
|
+
},
|
|
1606
|
+
index
|
|
1607
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("td", {}, index)
|
|
1598
1608
|
) }, weekIndex)) })
|
|
1599
1609
|
] });
|
|
1600
1610
|
}
|
|
@@ -1707,7 +1717,7 @@ function Calendar({ dualView }) {
|
|
|
1707
1717
|
}
|
|
1708
1718
|
function ScrollCalendar(boxProps) {
|
|
1709
1719
|
const { state, calendarProps, ref, startValue } = useCalendar();
|
|
1710
|
-
const
|
|
1720
|
+
const monthReferences = React29.useRef([]);
|
|
1711
1721
|
const hasScrolledRef = React29.useRef(false);
|
|
1712
1722
|
const startMonth = state.visibleRange.start.year * 12 + state.visibleRange.start.month;
|
|
1713
1723
|
const endMonth = state.visibleRange.end.year * 12 + state.visibleRange.end.month;
|
|
@@ -1725,7 +1735,7 @@ function ScrollCalendar(boxProps) {
|
|
|
1725
1735
|
const targetMonth = targetDate.year * 12 + targetDate.month;
|
|
1726
1736
|
const monthIndex = targetMonth - startMonth;
|
|
1727
1737
|
if (monthIndex > 0 && monthIndex < monthCount) {
|
|
1728
|
-
const element =
|
|
1738
|
+
const element = monthReferences.current[monthIndex];
|
|
1729
1739
|
if (element) {
|
|
1730
1740
|
element.scrollIntoView({
|
|
1731
1741
|
behavior: "instant",
|
|
@@ -1740,8 +1750,8 @@ function ScrollCalendar(boxProps) {
|
|
|
1740
1750
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { width: "fit-content", ...calendarProps, ...boxProps, ref, children: /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { flexDirection: "column", gap: 4, children: Array.from({ length: monthCount }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1741
1751
|
react.Box,
|
|
1742
1752
|
{
|
|
1743
|
-
ref: (
|
|
1744
|
-
|
|
1753
|
+
ref: (element) => {
|
|
1754
|
+
monthReferences.current[index] = element;
|
|
1745
1755
|
},
|
|
1746
1756
|
children: [
|
|
1747
1757
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1992,7 +2002,7 @@ function CalendarGrid2({
|
|
|
1992
2002
|
state
|
|
1993
2003
|
);
|
|
1994
2004
|
const weeksInMonth = date.getWeeksInMonth(state.visibleRange.start, locale);
|
|
1995
|
-
const weeksInMonthRange = Array.from({ length: weeksInMonth }).fill(0).map((_,
|
|
2005
|
+
const weeksInMonthRange = Array.from({ length: weeksInMonth }).fill(0).map((_, index) => index);
|
|
1996
2006
|
const recipe = react.useSlotRecipe({
|
|
1997
2007
|
key: "datePicker"
|
|
1998
2008
|
});
|
|
@@ -2088,7 +2098,7 @@ function CalendarHeader2({
|
|
|
2088
2098
|
)
|
|
2089
2099
|
] });
|
|
2090
2100
|
}
|
|
2091
|
-
var capitalize = (
|
|
2101
|
+
var capitalize = (string_ = "") => string_.charAt(0).toUpperCase() + string_.slice(1);
|
|
2092
2102
|
var CalendarNavigator = ({
|
|
2093
2103
|
title,
|
|
2094
2104
|
unit,
|
|
@@ -2299,14 +2309,14 @@ var DateField = React29.forwardRef(
|
|
|
2299
2309
|
] })
|
|
2300
2310
|
}
|
|
2301
2311
|
),
|
|
2302
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5", children: state.segments.map((segment,
|
|
2312
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5", children: state.segments.map((segment, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2303
2313
|
DateTimeSegment,
|
|
2304
2314
|
{
|
|
2305
2315
|
segment,
|
|
2306
2316
|
ariaDescription: t(getAriaLabel(segment.type)),
|
|
2307
2317
|
state
|
|
2308
2318
|
},
|
|
2309
|
-
|
|
2319
|
+
index
|
|
2310
2320
|
)) }),
|
|
2311
2321
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2312
2322
|
"input",
|
|
@@ -2871,8 +2881,8 @@ var DrawerContent = React29.forwardRef(
|
|
|
2871
2881
|
const { size, placement } = useRootDrawerProps();
|
|
2872
2882
|
const { setOpen } = react.useDialogContext();
|
|
2873
2883
|
const handlers = reactSwipeable.useSwipeable({
|
|
2874
|
-
onSwiped: (
|
|
2875
|
-
const shouldClose = placement === "bottom" &&
|
|
2884
|
+
onSwiped: ({ dir }) => {
|
|
2885
|
+
const shouldClose = placement === "bottom" && dir === "Down" || placement === "top" && dir === "Up" || placement === "end" && dir === "Right" || placement === "start" && dir === "Left";
|
|
2876
2886
|
if (shouldClose) {
|
|
2877
2887
|
setOpen(false);
|
|
2878
2888
|
}
|
|
@@ -3306,18 +3316,18 @@ var useInputWidth = (inputRef) => {
|
|
|
3306
3316
|
}, [inputRef]);
|
|
3307
3317
|
return inputWidth;
|
|
3308
3318
|
};
|
|
3309
|
-
function styleProps(
|
|
3319
|
+
function styleProps(object) {
|
|
3310
3320
|
return Object.fromEntries(
|
|
3311
|
-
Object.entries(
|
|
3321
|
+
Object.entries(object).filter(([, value]) => value !== void 0)
|
|
3312
3322
|
);
|
|
3313
3323
|
}
|
|
3314
|
-
var debounce = (
|
|
3324
|
+
var debounce = (function_, ms = 100) => {
|
|
3315
3325
|
let timer;
|
|
3316
3326
|
return () => {
|
|
3317
3327
|
clearTimeout(timer);
|
|
3318
3328
|
timer = setTimeout(() => {
|
|
3319
3329
|
timer = null;
|
|
3320
|
-
|
|
3330
|
+
function_();
|
|
3321
3331
|
}, ms);
|
|
3322
3332
|
};
|
|
3323
3333
|
};
|
|
@@ -3360,18 +3370,18 @@ function useFloatingInputState({
|
|
|
3360
3370
|
return () => cancelAnimationFrame(id);
|
|
3361
3371
|
}
|
|
3362
3372
|
}, [isControlled, syncFromRef]);
|
|
3363
|
-
const handleFocus = (
|
|
3364
|
-
onFocus == null ? void 0 : onFocus(
|
|
3373
|
+
const handleFocus = (event) => {
|
|
3374
|
+
onFocus == null ? void 0 : onFocus(event);
|
|
3365
3375
|
setFocused(true);
|
|
3366
3376
|
};
|
|
3367
|
-
const handleBlur = (
|
|
3368
|
-
onBlur == null ? void 0 : onBlur(
|
|
3377
|
+
const handleBlur = (event) => {
|
|
3378
|
+
onBlur == null ? void 0 : onBlur(event);
|
|
3369
3379
|
setFocused(false);
|
|
3370
3380
|
};
|
|
3371
|
-
const handleChange = (
|
|
3372
|
-
onChange == null ? void 0 : onChange(
|
|
3381
|
+
const handleChange = (event) => {
|
|
3382
|
+
onChange == null ? void 0 : onChange(event);
|
|
3373
3383
|
if (!isControlled) {
|
|
3374
|
-
setUncontrolledValue(
|
|
3384
|
+
setUncontrolledValue(event.target.value);
|
|
3375
3385
|
}
|
|
3376
3386
|
};
|
|
3377
3387
|
return {
|
|
@@ -3561,34 +3571,25 @@ function ListBoxSection({ section, state }) {
|
|
|
3561
3571
|
});
|
|
3562
3572
|
const isFirstSection = section.key === state.collection.getFirstKey();
|
|
3563
3573
|
const titleColor = useColorModeValue("darkGrey", "white");
|
|
3564
|
-
return /* @__PURE__ */ jsxRuntime.jsx(List, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
children: section.rendered
|
|
3584
|
-
}
|
|
3585
|
-
),
|
|
3586
|
-
/* @__PURE__ */ jsxRuntime.jsx(List, { ...groupProps, padding: 0, listStyleType: "none", children: Array.from(((_b4 = (_a5 = state.collection).getChildren) == null ? void 0 : _b4.call(_a5, section.key)) ?? []).map(
|
|
3587
|
-
(item) => /* @__PURE__ */ jsxRuntime.jsx(Option, { item, state }, item.key)
|
|
3588
|
-
) })
|
|
3589
|
-
]
|
|
3590
|
-
}
|
|
3591
|
-
) });
|
|
3574
|
+
return /* @__PURE__ */ jsxRuntime.jsx(List, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.ListItem, { ...itemProps, listStyleType: "none", marginLeft: "0", paddingX: "1", children: [
|
|
3575
|
+
section.rendered && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3576
|
+
react.Box,
|
|
3577
|
+
{
|
|
3578
|
+
fontSize: ["mobile.sm", "desktop.sm"],
|
|
3579
|
+
color: titleColor,
|
|
3580
|
+
paddingTop: 1,
|
|
3581
|
+
marginTop: isFirstSection ? 0 : 2,
|
|
3582
|
+
marginLeft: "1",
|
|
3583
|
+
textTransform: "uppercase",
|
|
3584
|
+
fontWeight: "bold",
|
|
3585
|
+
...headingProps,
|
|
3586
|
+
children: section.rendered
|
|
3587
|
+
}
|
|
3588
|
+
),
|
|
3589
|
+
/* @__PURE__ */ jsxRuntime.jsx(List, { ...groupProps, padding: 0, listStyleType: "none", children: Array.from(((_b4 = (_a5 = state.collection).getChildren) == null ? void 0 : _b4.call(_a5, section.key)) ?? []).map(
|
|
3590
|
+
(item) => /* @__PURE__ */ jsxRuntime.jsx(Option, { item, state }, item.key)
|
|
3591
|
+
) })
|
|
3592
|
+
] }) });
|
|
3592
3593
|
}
|
|
3593
3594
|
var NativeSelect = React29__namespace.forwardRef(function NativeSelect2(props, ref) {
|
|
3594
3595
|
const {
|
|
@@ -3641,9 +3642,9 @@ var NativeSelect = React29__namespace.forwardRef(function NativeSelect2(props, r
|
|
|
3641
3642
|
});
|
|
3642
3643
|
var NumericStepper = React29__namespace.default.forwardRef((props, ref) => {
|
|
3643
3644
|
const {
|
|
3644
|
-
name:
|
|
3645
|
-
id:
|
|
3646
|
-
value:
|
|
3645
|
+
name: nameProperty,
|
|
3646
|
+
id: idProperty,
|
|
3647
|
+
value: valueProperty,
|
|
3647
3648
|
defaultValue = 1,
|
|
3648
3649
|
onValueChange,
|
|
3649
3650
|
minValue = 0,
|
|
@@ -3659,7 +3660,7 @@ var NumericStepper = React29__namespace.default.forwardRef((props, ref) => {
|
|
|
3659
3660
|
const recipe = react.useSlotRecipe({ key: "numericStepper" });
|
|
3660
3661
|
const styles = recipe();
|
|
3661
3662
|
const [value, onChange] = react.useControllableState({
|
|
3662
|
-
value:
|
|
3663
|
+
value: valueProperty,
|
|
3663
3664
|
onChange: onValueChange,
|
|
3664
3665
|
defaultValue
|
|
3665
3666
|
});
|
|
@@ -3668,7 +3669,7 @@ var NumericStepper = React29__namespace.default.forwardRef((props, ref) => {
|
|
|
3668
3669
|
var _a5;
|
|
3669
3670
|
(_a5 = addButtonRef.current) == null ? void 0 : _a5.focus();
|
|
3670
3671
|
};
|
|
3671
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Field3, { css: styles.root, width: "auto", ...rest, id:
|
|
3672
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Field3, { css: styles.root, width: "auto", ...rest, id: idProperty, ref, children: [
|
|
3672
3673
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3673
3674
|
VerySmallButton,
|
|
3674
3675
|
{
|
|
@@ -3686,7 +3687,7 @@ var NumericStepper = React29__namespace.default.forwardRef((props, ref) => {
|
|
|
3686
3687
|
}
|
|
3687
3688
|
},
|
|
3688
3689
|
disabled: disabled || value <= minValue,
|
|
3689
|
-
id: value <= minValue ? void 0 :
|
|
3690
|
+
id: value <= minValue ? void 0 : idProperty
|
|
3690
3691
|
}
|
|
3691
3692
|
),
|
|
3692
3693
|
withInput ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3694,16 +3695,16 @@ var NumericStepper = React29__namespace.default.forwardRef((props, ref) => {
|
|
|
3694
3695
|
{
|
|
3695
3696
|
min: minValue,
|
|
3696
3697
|
max: maxValue,
|
|
3697
|
-
name:
|
|
3698
|
+
name: nameProperty,
|
|
3698
3699
|
value,
|
|
3699
3700
|
disabled,
|
|
3700
|
-
id: value === 0 ? void 0 :
|
|
3701
|
+
id: value === 0 ? void 0 : idProperty,
|
|
3701
3702
|
css: styles.input,
|
|
3702
3703
|
width: `${Math.max(value.toString().length + 1, 3)}ch`,
|
|
3703
3704
|
"aria-live": "assertive",
|
|
3704
3705
|
"aria-label": ariaLabelContext.plural === "" ? "" : t(texts14.currentNumberAriaLabel(ariaLabelContext.plural)),
|
|
3705
|
-
onChange: (
|
|
3706
|
-
const numericInput = Number(
|
|
3706
|
+
onChange: (event) => {
|
|
3707
|
+
const numericInput = Number(event.target.value);
|
|
3707
3708
|
if (Number.isNaN(numericInput)) {
|
|
3708
3709
|
return;
|
|
3709
3710
|
}
|
|
@@ -3735,7 +3736,7 @@ var NumericStepper = React29__namespace.default.forwardRef((props, ref) => {
|
|
|
3735
3736
|
),
|
|
3736
3737
|
onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
|
|
3737
3738
|
disabled: disabled || value >= maxValue,
|
|
3738
|
-
id: value >= maxValue ? void 0 :
|
|
3739
|
+
id: value >= maxValue ? void 0 : idProperty
|
|
3739
3740
|
}
|
|
3740
3741
|
)
|
|
3741
3742
|
] });
|
|
@@ -3828,14 +3829,14 @@ var PasswordInput = React29.forwardRef(
|
|
|
3828
3829
|
(props, ref) => {
|
|
3829
3830
|
const {
|
|
3830
3831
|
defaultVisible,
|
|
3831
|
-
visible:
|
|
3832
|
+
visible: visibleProperty,
|
|
3832
3833
|
onVisibleChange,
|
|
3833
3834
|
label,
|
|
3834
3835
|
startElement,
|
|
3835
3836
|
...rest
|
|
3836
3837
|
} = props;
|
|
3837
3838
|
const [visible, setVisible] = react.useControllableState({
|
|
3838
|
-
value:
|
|
3839
|
+
value: visibleProperty,
|
|
3839
3840
|
defaultValue: defaultVisible || false,
|
|
3840
3841
|
onChange: onVisibleChange
|
|
3841
3842
|
});
|
|
@@ -3852,12 +3853,12 @@ var PasswordInput = React29.forwardRef(
|
|
|
3852
3853
|
{
|
|
3853
3854
|
variant: "ghost",
|
|
3854
3855
|
disabled: rest.disabled,
|
|
3855
|
-
onPointerDown: (
|
|
3856
|
+
onPointerDown: (event) => {
|
|
3856
3857
|
if (rest.disabled)
|
|
3857
3858
|
return;
|
|
3858
|
-
if (
|
|
3859
|
+
if (event.button !== 0)
|
|
3859
3860
|
return;
|
|
3860
|
-
|
|
3861
|
+
event.preventDefault();
|
|
3861
3862
|
setVisible(!visible);
|
|
3862
3863
|
},
|
|
3863
3864
|
children: visible ? t(texts15.hidePassword) : t(texts15.showPassword)
|
|
@@ -4003,8 +4004,8 @@ var PhoneNumberInput = React29.forwardRef((props, ref) => {
|
|
|
4003
4004
|
value: value.nationalNumber,
|
|
4004
4005
|
invalid,
|
|
4005
4006
|
errorText,
|
|
4006
|
-
onChange: (
|
|
4007
|
-
const target =
|
|
4007
|
+
onChange: (event) => {
|
|
4008
|
+
const target = event.target;
|
|
4008
4009
|
const strippedValue = target.value.replaceAll(/[^\d\s-]/g, "");
|
|
4009
4010
|
onChange({
|
|
4010
4011
|
countryCode: value.countryCode,
|
|
@@ -4126,7 +4127,14 @@ var Select = React29__namespace.forwardRef(
|
|
|
4126
4127
|
children: [
|
|
4127
4128
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { "data-attachable": true, children: /* @__PURE__ */ jsxRuntime.jsx(SelectValueText, { withPlaceholder: label ? true : false }) }),
|
|
4128
4129
|
label && /* @__PURE__ */ jsxRuntime.jsx(SelectLabel, { css: styles.label, children: label }),
|
|
4129
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4130
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4131
|
+
SelectContent,
|
|
4132
|
+
{
|
|
4133
|
+
css: styles.selectContent,
|
|
4134
|
+
portalled: globalThis.window !== void 0,
|
|
4135
|
+
children
|
|
4136
|
+
}
|
|
4137
|
+
)
|
|
4130
4138
|
]
|
|
4131
4139
|
}
|
|
4132
4140
|
)
|
|
@@ -4413,7 +4421,11 @@ var icons = {
|
|
|
4413
4421
|
},
|
|
4414
4422
|
walk: { sm: spor_icon_react_star.WalkFill18Icon, md: spor_icon_react_star.WalkFill24Icon, lg: spor_icon_react_star.WalkFill30Icon }
|
|
4415
4423
|
};
|
|
4416
|
-
var LinjeTagIcon = ({
|
|
4424
|
+
var LinjeTagIcon = ({
|
|
4425
|
+
variant,
|
|
4426
|
+
size,
|
|
4427
|
+
css
|
|
4428
|
+
}) => {
|
|
4417
4429
|
var _a5;
|
|
4418
4430
|
const IconComponent2 = ((_a5 = icons[variant]) == null ? void 0 : _a5[size]) ?? react.Box;
|
|
4419
4431
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(IconComponent2, {}) });
|
|
@@ -5290,7 +5302,7 @@ var NudgeContent = React29.forwardRef(
|
|
|
5290
5302
|
{
|
|
5291
5303
|
isLastStep,
|
|
5292
5304
|
onNext: () => {
|
|
5293
|
-
setCurrentStep((
|
|
5305
|
+
setCurrentStep((previous) => previous + 1);
|
|
5294
5306
|
}
|
|
5295
5307
|
}
|
|
5296
5308
|
)
|
|
@@ -5598,13 +5610,13 @@ var ProgressIndicator = React29.forwardRef(({ numberOfSteps, activeStep }, ref)
|
|
|
5598
5610
|
"aria-valuenow": activeStep,
|
|
5599
5611
|
"aria-valuetext": t(texts25.stepsOf(activeStep, numberOfSteps)),
|
|
5600
5612
|
ref,
|
|
5601
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: styles.container, children: Array.from({ length: numberOfSteps }, (_,
|
|
5613
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: styles.container, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5602
5614
|
ProgressDot,
|
|
5603
5615
|
{
|
|
5604
|
-
"aria-valuenow":
|
|
5605
|
-
isActive: activeStep ===
|
|
5616
|
+
"aria-valuenow": index + 1,
|
|
5617
|
+
isActive: activeStep === index + 1
|
|
5606
5618
|
},
|
|
5607
|
-
|
|
5619
|
+
index
|
|
5608
5620
|
)) })
|
|
5609
5621
|
}
|
|
5610
5622
|
);
|
|
@@ -6591,17 +6603,24 @@ var radii = react.defineSemanticTokens.radii({
|
|
|
6591
6603
|
round: { value: "50%" }
|
|
6592
6604
|
});
|
|
6593
6605
|
var shadows = react.defineSemanticTokens.shadows({
|
|
6594
|
-
none: {
|
|
6595
|
-
value: "none"
|
|
6596
|
-
},
|
|
6606
|
+
none: { value: "none" },
|
|
6597
6607
|
sm: {
|
|
6598
|
-
value:
|
|
6608
|
+
value: {
|
|
6609
|
+
_light: tokens23__namespace.default.depth.shadow.sm.value._light,
|
|
6610
|
+
_dark: tokens23__namespace.default.depth.shadow.sm.value._dark
|
|
6611
|
+
}
|
|
6599
6612
|
},
|
|
6600
6613
|
md: {
|
|
6601
|
-
value:
|
|
6614
|
+
value: {
|
|
6615
|
+
_light: tokens23__namespace.default.depth.shadow.md.value._light,
|
|
6616
|
+
_dark: tokens23__namespace.default.depth.shadow.md.value._dark
|
|
6617
|
+
}
|
|
6602
6618
|
},
|
|
6603
6619
|
lg: {
|
|
6604
|
-
value:
|
|
6620
|
+
value: {
|
|
6621
|
+
_light: tokens23__namespace.default.depth.shadow.lg.value._light,
|
|
6622
|
+
_dark: tokens23__namespace.default.depth.shadow.lg.value._dark
|
|
6623
|
+
}
|
|
6605
6624
|
}
|
|
6606
6625
|
});
|
|
6607
6626
|
|