@vygruppen/spor-react 12.22.1 → 12.22.2
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 +10 -10
- package/.turbo/turbo-postinstall.log +2 -2
- package/CHANGELOG.md +14 -0
- package/dist/index.cjs +71 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +84 -91
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/alert/AlertIcon.tsx +5 -1
- package/src/input/AttachedInputs.tsx +2 -2
- package/src/input/Autocomplete.tsx +42 -22
- package/src/input/Field.tsx +3 -1
- package/src/input/FloatingLabel.tsx +2 -2
- package/src/input/Input.tsx +2 -1
- package/src/input/NumericStepper.tsx +1 -4
- package/src/theme/recipes/attached-inputs.ts +3 -2
- package/src/theme/slot-recipes/autocomplete.ts +0 -1
- package/src/theme/tokens/text-styles.ts +0 -18
package/dist/index.d.cts
CHANGED
|
@@ -1283,8 +1283,10 @@ type Props = {
|
|
|
1283
1283
|
leftIcon?: React__default.ReactNode;
|
|
1284
1284
|
filteredExternally?: boolean;
|
|
1285
1285
|
loading?: boolean;
|
|
1286
|
+
emptyLabel?: React__default.ReactNode;
|
|
1287
|
+
openOnFocus?: boolean;
|
|
1286
1288
|
} & Omit<ComboboxRootProps, "collection"> & FieldProps;
|
|
1287
|
-
declare const Autocomplete: ({ variant, children, label, leftIcon, onInputValueChange, invalid, helperText, errorText, required, filteredExternally, loading, disabled, ...rest }: Props) => react_jsx_runtime.JSX.Element;
|
|
1289
|
+
declare const Autocomplete: ({ variant, children, label, leftIcon, onInputValueChange, invalid, helperText, errorText, required, filteredExternally, loading, disabled, emptyLabel, openOnClick, openOnFocus, ...rest }: Props) => react_jsx_runtime.JSX.Element;
|
|
1288
1290
|
declare const AutocompleteItemGroup: React__default.ForwardRefExoticComponent<Combobox$1.ItemGroupProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1289
1291
|
declare const AutocompleteItemGroupLabel: React__default.ForwardRefExoticComponent<_chakra_ui_react.ComboboxItemGroupLabelProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1290
1292
|
declare const AutocompleteItem: React__default.ForwardRefExoticComponent<Combobox$1.ItemProps & React__default.RefAttributes<HTMLDivElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1283,8 +1283,10 @@ type Props = {
|
|
|
1283
1283
|
leftIcon?: React__default.ReactNode;
|
|
1284
1284
|
filteredExternally?: boolean;
|
|
1285
1285
|
loading?: boolean;
|
|
1286
|
+
emptyLabel?: React__default.ReactNode;
|
|
1287
|
+
openOnFocus?: boolean;
|
|
1286
1288
|
} & Omit<ComboboxRootProps, "collection"> & FieldProps;
|
|
1287
|
-
declare const Autocomplete: ({ variant, children, label, leftIcon, onInputValueChange, invalid, helperText, errorText, required, filteredExternally, loading, disabled, ...rest }: Props) => react_jsx_runtime.JSX.Element;
|
|
1289
|
+
declare const Autocomplete: ({ variant, children, label, leftIcon, onInputValueChange, invalid, helperText, errorText, required, filteredExternally, loading, disabled, emptyLabel, openOnClick, openOnFocus, ...rest }: Props) => react_jsx_runtime.JSX.Element;
|
|
1288
1290
|
declare const AutocompleteItemGroup: React__default.ForwardRefExoticComponent<Combobox$1.ItemGroupProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1289
1291
|
declare const AutocompleteItemGroupLabel: React__default.ForwardRefExoticComponent<_chakra_ui_react.ComboboxItemGroupLabelProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1290
1292
|
declare const AutocompleteItem: React__default.ForwardRefExoticComponent<Combobox$1.ItemProps & React__default.RefAttributes<HTMLDivElement>>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useSlotRecipe, Accordion as Accordion$1, Stack, Box, HStack, Progress, defineRecipe, chakra, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group, Badge as Badge$1, Code as Code$1, Clipboard as Clipboard$1, IconButton as IconButton$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, RadioCard as RadioCard$1, Separator as Separator$1, ClientOnly, Field, defineStyle, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, useDialogContext, Drawer as Drawer$1, InputElement, Input as Input$1, Combobox, useComboboxContext, usePopoverContext, Checkbox as Checkbox$1, CheckboxCard, Fieldset as Fieldset$1, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, Link, List as List$1, Center, PopoverCloseTrigger, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineSlotRecipe, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, Tooltip as Tooltip$1, VisuallyHidden, defineConfig, useFilter, useListCollection, CheckboxGroup as CheckboxGroup$1, ListItem, ChakraProvider, Toaster as Toaster$1, Toast } from '@chakra-ui/react';
|
|
1
|
+
import { useSlotRecipe, Accordion as Accordion$1, Stack, Box, HStack, Progress, defineRecipe, chakra, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group, Badge as Badge$1, Code as Code$1, Clipboard as Clipboard$1, IconButton as IconButton$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, RadioCard as RadioCard$1, Separator as Separator$1, ClientOnly, Field, defineStyle, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, useDialogContext, Drawer as Drawer$1, InputElement, Input as Input$1, Combobox, useComboboxContext, usePopoverContext, Checkbox as Checkbox$1, CheckboxCard, Fieldset as Fieldset$1, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, Link, List as List$1, Center, PopoverCloseTrigger, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineSlotRecipe, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, Tooltip as Tooltip$1, VisuallyHidden as VisuallyHidden$1, defineConfig, useFilter, useListCollection, useCombobox, CheckboxGroup as CheckboxGroup$1, ListItem, ChakraProvider, 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, TableBody, TableCaption, TableCell, TableColumn, TableColumnGroup, TableColumnHeader, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, Wrap, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, 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
4
|
import { DropdownDownFill24Icon, CopyOutline18Icon, CheckmarkFill18Icon, CloseFill18Icon, CloseFill30Icon, CloseFill24Icon, InformationFill24Icon, ServiceFill24Icon, QuestionFill24Icon, ErrorOutline24Icon, ErrorFill24Icon, AltTransportFill24Icon, WarningFill24Icon, SuccessFill24Icon, DropdownDownFill18Icon, DropdownRightFill18Icon, CalendarOutline24Icon, ArrowLeftFill24Icon, ChangeDirectionOutline24Icon, CloseOutline24Icon, SearchOutline24Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill18Icon, LinkOutOutline24Icon, LinkOutOutline18Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, DropdownLeftFill18Icon } from '@vygruppen/spor-icon-react';
|
|
@@ -9,7 +9,7 @@ import { spinnerColorData, inlineLoaderColorData, contentLoaderData, fullScreenL
|
|
|
9
9
|
import ReactLottie from 'lottie-react';
|
|
10
10
|
import { useInterval } from 'usehooks-ts';
|
|
11
11
|
export { useIsClient, useMap, useOnClickOutside } from 'usehooks-ts';
|
|
12
|
-
import { useProgressBar, useDateSegment, useDateField, useDatePicker, I18nProvider, usePopover, DismissButton, Overlay, useCalendar as useCalendar$1, useCalendarGrid, useCalendarCell, useButton, useRangeCalendar, useFocusRing, mergeProps, useDateFormatter,
|
|
12
|
+
import { useProgressBar, VisuallyHidden, useDateSegment, useDateField, useDatePicker, I18nProvider, usePopover, DismissButton, Overlay, useCalendar as useCalendar$1, useCalendarGrid, useCalendarCell, useButton, useRangeCalendar, useFocusRing, mergeProps, useDateFormatter, useId as useId$1, useDateRangePicker, useFilter as useFilter$1, useComboBox, useListBox, useOption, useListBoxSection, useTimeField } from 'react-aria';
|
|
13
13
|
import { GregorianCalendar, createCalendar, getLocalTimeZone, endOfMonth, getWeeksInMonth, isSameMonth, isToday, toCalendarDate, isSameDay, parseTime } from '@internationalized/date';
|
|
14
14
|
export { Time } from '@internationalized/date';
|
|
15
15
|
import { useDateFieldState, useDatePickerState, useCalendarState, useRangeCalendarState, useDateRangePickerState, useTimeFieldState, useComboBoxState } from 'react-stately';
|
|
@@ -194,7 +194,7 @@ var ColorInlineLoader = ({
|
|
|
194
194
|
}) => {
|
|
195
195
|
return /* @__PURE__ */ jsxs(Center, { role: "status", "aria-live": "polite", ...props, children: [
|
|
196
196
|
/* @__PURE__ */ jsx(Box, { width, maxWidth, children: /* @__PURE__ */ jsx(ClientOnly, { children: /* @__PURE__ */ jsx(Lottie, { animationData: inlineLoaderColorData }) }) }),
|
|
197
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: "Loading..." })
|
|
197
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Loading..." })
|
|
198
198
|
] });
|
|
199
199
|
};
|
|
200
200
|
var ColorSpinner = ({
|
|
@@ -205,14 +205,14 @@ var ColorSpinner = ({
|
|
|
205
205
|
}) => {
|
|
206
206
|
return /* @__PURE__ */ jsxs(Center, { flexDirection: "column", role: "status", "aria-live": "polite", ...props, children: [
|
|
207
207
|
/* @__PURE__ */ jsx(Box, { width, maxWidth, children: /* @__PURE__ */ jsx(ClientOnly, { children: /* @__PURE__ */ jsx(Lottie, { animationData: spinnerColorData }) }) }),
|
|
208
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: "Loading..." }),
|
|
208
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Loading..." }),
|
|
209
209
|
children && /* @__PURE__ */ jsx(Box, { marginTop: 3, fontWeight: "bold", children })
|
|
210
210
|
] });
|
|
211
211
|
};
|
|
212
212
|
var ContentLoader = ({ children, ...props }) => {
|
|
213
213
|
return /* @__PURE__ */ jsxs(Box, { role: "status", "aria-live": "polite", ...props, children: [
|
|
214
214
|
/* @__PURE__ */ jsx(Box, { maxWidth: "140px", marginX: "auto", children: /* @__PURE__ */ jsx(ClientOnly, { children: /* @__PURE__ */ jsx(Lottie, { animationData: contentLoaderData }) }) }),
|
|
215
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: "Loading..." }),
|
|
215
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Loading..." }),
|
|
216
216
|
children && /* @__PURE__ */ jsx(Box, { textAlign: "center", fontWeight: "bold", children })
|
|
217
217
|
] });
|
|
218
218
|
};
|
|
@@ -232,7 +232,7 @@ var DarkFullScreenLoader = ({
|
|
|
232
232
|
...props,
|
|
233
233
|
children: [
|
|
234
234
|
/* @__PURE__ */ jsx(Box, { width, maxWidth, children: /* @__PURE__ */ jsx(ClientOnly, { children: /* @__PURE__ */ jsx(Lottie, { animationData: fullScreenLoaderWhiteData }) }) }),
|
|
235
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: "Loading..." })
|
|
235
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Loading..." })
|
|
236
236
|
]
|
|
237
237
|
}
|
|
238
238
|
);
|
|
@@ -244,7 +244,7 @@ var DarkInlineLoader = ({
|
|
|
244
244
|
}) => {
|
|
245
245
|
return /* @__PURE__ */ jsxs(Center, { role: "status", "aria-live": "polite", ...props, children: [
|
|
246
246
|
/* @__PURE__ */ jsx(Box, { width, maxWidth, children: /* @__PURE__ */ jsx(ClientOnly, { children: /* @__PURE__ */ jsx(Lottie, { animationData: inlineLoaderDarkData }) }) }),
|
|
247
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: "Loading..." })
|
|
247
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Loading..." })
|
|
248
248
|
] });
|
|
249
249
|
};
|
|
250
250
|
var DarkSpinner = ({
|
|
@@ -257,7 +257,7 @@ var DarkSpinner = ({
|
|
|
257
257
|
const spinnerData = colorMode === "dark" ? spinnerLightData : spinnerDarkData;
|
|
258
258
|
return /* @__PURE__ */ jsxs(Center, { flexDirection: "column", role: "status", "aria-live": "polite", ...props, children: [
|
|
259
259
|
/* @__PURE__ */ jsx(Box, { width, maxWidth, children: /* @__PURE__ */ jsx(ClientOnly, { children: /* @__PURE__ */ jsx(Lottie, { animationData: spinnerData }) }) }),
|
|
260
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: "Loading..." }),
|
|
260
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Loading..." }),
|
|
261
261
|
children && /* @__PURE__ */ jsx(Box, { marginTop: 3, fontWeight: "bold", children })
|
|
262
262
|
] });
|
|
263
263
|
};
|
|
@@ -268,7 +268,7 @@ var LightFullScreenLoader = ({
|
|
|
268
268
|
}) => {
|
|
269
269
|
return /* @__PURE__ */ jsxs(Center, { height: "100%", role: "status", "aria-live": "polite", ...props, children: [
|
|
270
270
|
/* @__PURE__ */ jsx(Box, { width, maxWidth, children: /* @__PURE__ */ jsx(ClientOnly, { children: /* @__PURE__ */ jsx(Lottie, { animationData: fullScreenLoaderBlackData }) }) }),
|
|
271
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: "Loading..." })
|
|
271
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Loading..." })
|
|
272
272
|
] });
|
|
273
273
|
};
|
|
274
274
|
var LightInlineLoader = ({
|
|
@@ -278,7 +278,7 @@ var LightInlineLoader = ({
|
|
|
278
278
|
}) => {
|
|
279
279
|
return /* @__PURE__ */ jsxs(Center, { height: "100%", role: "status", "aria-live": "polite", ...props, children: [
|
|
280
280
|
/* @__PURE__ */ jsx(Box, { width, maxWidth, children: /* @__PURE__ */ jsx(ClientOnly, { children: /* @__PURE__ */ jsx(Lottie, { animationData: inlineLoaderLightData }) }) }),
|
|
281
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: "Loading..." })
|
|
281
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Loading..." })
|
|
282
282
|
] });
|
|
283
283
|
};
|
|
284
284
|
var LightSpinner = ({
|
|
@@ -289,7 +289,7 @@ var LightSpinner = ({
|
|
|
289
289
|
}) => {
|
|
290
290
|
return /* @__PURE__ */ jsxs(Center, { flexDirection: "column", role: "status", "aria-live": "polite", ...props, children: [
|
|
291
291
|
/* @__PURE__ */ jsx(Box, { width, maxWidth, children: /* @__PURE__ */ jsx(ClientOnly, { children: /* @__PURE__ */ jsx(Lottie, { animationData: spinnerLightData }) }) }),
|
|
292
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: "Loading..." }),
|
|
292
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: "Loading..." }),
|
|
293
293
|
children && /* @__PURE__ */ jsx(Box, { marginTop: 3, fontWeight: "bold", children })
|
|
294
294
|
] });
|
|
295
295
|
};
|
|
@@ -1023,7 +1023,10 @@ var useScrollDirection = () => {
|
|
|
1023
1023
|
var AlertIcon = forwardRef(
|
|
1024
1024
|
({ variant, customIcon: CustomAlertIcon }, ref) => {
|
|
1025
1025
|
const { t } = useTranslation();
|
|
1026
|
-
return /* @__PURE__ */
|
|
1026
|
+
return /* @__PURE__ */ jsxs(Box, { ref, children: [
|
|
1027
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: t(texts5[variant]) }),
|
|
1028
|
+
CustomAlertIcon ? /* @__PURE__ */ jsx(CustomAlertIcon, { color: `alert.${variant}.icon` }) : /* @__PURE__ */ jsx(BaseAlertIcon, { variant })
|
|
1029
|
+
] });
|
|
1027
1030
|
}
|
|
1028
1031
|
);
|
|
1029
1032
|
AlertIcon.displayName = "AlertIcon";
|
|
@@ -1694,7 +1697,7 @@ function CalendarHeader({ dualView }) {
|
|
|
1694
1697
|
state.focusNextPage();
|
|
1695
1698
|
}
|
|
1696
1699
|
return /* @__PURE__ */ jsxs(Flex, { flex: 1, alignItems: "center", paddingBottom: 4, children: [
|
|
1697
|
-
/* @__PURE__ */ jsx(VisuallyHidden
|
|
1700
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("h2", { children: calendarProps["aria-label"] }) }),
|
|
1698
1701
|
/* @__PURE__ */ jsx(
|
|
1699
1702
|
IconButton,
|
|
1700
1703
|
{
|
|
@@ -1899,12 +1902,12 @@ var floatingLabelStyles = defineStyle({
|
|
|
1899
1902
|
opacity: 0.4
|
|
1900
1903
|
},
|
|
1901
1904
|
pos: "absolute",
|
|
1902
|
-
transition: "
|
|
1905
|
+
transition: "top 160ms ease, font-size 160ms ease",
|
|
1903
1906
|
top: "0.9rem",
|
|
1904
1907
|
color: "text",
|
|
1905
1908
|
fontSize: ["mobile.sm", "desktop.sm"],
|
|
1906
1909
|
"&[data-float]": {
|
|
1907
|
-
fontSize: ["mobile.
|
|
1910
|
+
fontSize: ["mobile.2xs", "desktop.2xs"],
|
|
1908
1911
|
color: "text",
|
|
1909
1912
|
top: "0.3rem"
|
|
1910
1913
|
}
|
|
@@ -1978,7 +1981,7 @@ var Field3 = React20.forwardRef(
|
|
|
1978
1981
|
children: renderLabelWithIndicator(label, labelAsChild)
|
|
1979
1982
|
}
|
|
1980
1983
|
),
|
|
1981
|
-
errorText && /* @__PURE__ */ jsx(Field.ErrorText, { children: errorText })
|
|
1984
|
+
errorText && /* @__PURE__ */ jsx(Field.ErrorText, { "aria-live": "polite", children: errorText })
|
|
1982
1985
|
]
|
|
1983
1986
|
}
|
|
1984
1987
|
),
|
|
@@ -3103,7 +3106,7 @@ var SwitchButton = chakra(
|
|
|
3103
3106
|
defineRecipe({
|
|
3104
3107
|
base: {
|
|
3105
3108
|
position: "absolute !important",
|
|
3106
|
-
zIndex: "
|
|
3109
|
+
zIndex: "101 !important",
|
|
3107
3110
|
// eslint-disable-next-line spor/use-semantic-tokens
|
|
3108
3111
|
bg: "bg !important",
|
|
3109
3112
|
outlineWidth: "1px !important",
|
|
@@ -3119,7 +3122,7 @@ var SwitchButton = chakra(
|
|
|
3119
3122
|
},
|
|
3120
3123
|
vertical: {
|
|
3121
3124
|
top: "calc(50% - 15px)",
|
|
3122
|
-
right: "
|
|
3125
|
+
right: "3rem",
|
|
3123
3126
|
transform: "rotate(90deg)"
|
|
3124
3127
|
}
|
|
3125
3128
|
}
|
|
@@ -3234,7 +3237,7 @@ var Input = forwardRef(
|
|
|
3234
3237
|
errorText,
|
|
3235
3238
|
id: props.id,
|
|
3236
3239
|
labelAsChild,
|
|
3237
|
-
label: /* @__PURE__ */ jsxs(Flex, {
|
|
3240
|
+
label: /* @__PURE__ */ jsxs(Flex, { children: [
|
|
3238
3241
|
/* @__PURE__ */ jsx(Box, { visibility: "hidden", children: startElement }),
|
|
3239
3242
|
label
|
|
3240
3243
|
] }),
|
|
@@ -3246,6 +3249,7 @@ var Input = forwardRef(
|
|
|
3246
3249
|
{
|
|
3247
3250
|
pointerEvents: "none",
|
|
3248
3251
|
paddingX: 2,
|
|
3252
|
+
"aria-hidden": "true",
|
|
3249
3253
|
fontSize: fontSize ?? "mobile.md",
|
|
3250
3254
|
children: startElement
|
|
3251
3255
|
}
|
|
@@ -3298,6 +3302,9 @@ var Autocomplete = ({
|
|
|
3298
3302
|
filteredExternally,
|
|
3299
3303
|
loading,
|
|
3300
3304
|
disabled,
|
|
3305
|
+
emptyLabel,
|
|
3306
|
+
openOnClick = true,
|
|
3307
|
+
openOnFocus = true,
|
|
3301
3308
|
...rest
|
|
3302
3309
|
}) => {
|
|
3303
3310
|
const { contains } = useFilter({ sensitivity: "base" });
|
|
@@ -3318,50 +3325,52 @@ var Autocomplete = ({
|
|
|
3318
3325
|
() => filterChildren(children, collection.items),
|
|
3319
3326
|
[children, collection.items]
|
|
3320
3327
|
);
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
mainAxis: 3,
|
|
3336
|
-
crossAxis: -1
|
|
3337
|
-
},
|
|
3338
|
-
flip: false
|
|
3328
|
+
const combobox = useCombobox({
|
|
3329
|
+
collection,
|
|
3330
|
+
openOnClick,
|
|
3331
|
+
onInputValueChange: (event) => {
|
|
3332
|
+
if (!filteredExternally) {
|
|
3333
|
+
filter(event.inputValue);
|
|
3334
|
+
}
|
|
3335
|
+
onInputValueChange == null ? void 0 : onInputValueChange(event);
|
|
3336
|
+
},
|
|
3337
|
+
positioning: {
|
|
3338
|
+
placement: "bottom",
|
|
3339
|
+
offset: {
|
|
3340
|
+
mainAxis: 3,
|
|
3341
|
+
crossAxis: -1
|
|
3339
3342
|
},
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3343
|
+
flip: false
|
|
3344
|
+
},
|
|
3345
|
+
disabled,
|
|
3346
|
+
...rest
|
|
3347
|
+
});
|
|
3348
|
+
return /* @__PURE__ */ jsxs(Combobox.RootProvider, { value: combobox, children: [
|
|
3349
|
+
/* @__PURE__ */ jsxs(Combobox.Control, { children: [
|
|
3350
|
+
/* @__PURE__ */ jsx(Combobox.Input, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
3351
|
+
Input,
|
|
3352
|
+
{
|
|
3353
|
+
label: /* @__PURE__ */ jsx(Combobox.Label, { children: label }),
|
|
3354
|
+
variant,
|
|
3355
|
+
labelAsChild: true,
|
|
3356
|
+
startElement: leftIcon,
|
|
3357
|
+
invalid,
|
|
3358
|
+
helperText,
|
|
3359
|
+
errorText,
|
|
3360
|
+
required,
|
|
3361
|
+
onFocus: () => {
|
|
3362
|
+
if (openOnFocus)
|
|
3363
|
+
combobox.setOpen(true);
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
) }),
|
|
3367
|
+
/* @__PURE__ */ jsx(Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsx(Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts14.clearValue), children: /* @__PURE__ */ jsx(CloseButton, { size: "xs" }) }) })
|
|
3368
|
+
] }),
|
|
3369
|
+
/* @__PURE__ */ jsx(Combobox.Positioner, { children: /* @__PURE__ */ jsxs(Combobox.Content, { children: [
|
|
3370
|
+
/* @__PURE__ */ jsx(Combobox.Empty, { children: !loading && (emptyLabel ?? t(texts14.noItemsFound)) }),
|
|
3371
|
+
loading ? /* @__PURE__ */ jsx(ColorSpinner, { width: "1.5rem", p: "2" }) : /* @__PURE__ */ jsx(Fragment, { children: filteredChildren })
|
|
3372
|
+
] }) })
|
|
3373
|
+
] });
|
|
3365
3374
|
};
|
|
3366
3375
|
var AutocompleteItemGroup = Combobox.ItemGroup;
|
|
3367
3376
|
var AutocompleteItemGroupLabel = Combobox.ItemGroupLabel;
|
|
@@ -3431,6 +3440,12 @@ var texts14 = createTexts({
|
|
|
3431
3440
|
nn: "Ingen resultat",
|
|
3432
3441
|
sv: "Inga resultat",
|
|
3433
3442
|
en: "No results found"
|
|
3443
|
+
},
|
|
3444
|
+
clearValue: {
|
|
3445
|
+
nb: "T\xF8m verdi",
|
|
3446
|
+
nn: "T\xF8m verdi",
|
|
3447
|
+
sv: "Rensa v\xE4rde",
|
|
3448
|
+
en: "Clear value"
|
|
3434
3449
|
}
|
|
3435
3450
|
});
|
|
3436
3451
|
var CardSelect = ({ size = "md", ...props }) => {
|
|
@@ -3996,7 +4011,6 @@ var NumericStepper = React20__default.forwardRef((props, ref) => {
|
|
|
3996
4011
|
{
|
|
3997
4012
|
css: styles.root,
|
|
3998
4013
|
width: "auto",
|
|
3999
|
-
id: idProperty,
|
|
4000
4014
|
ref,
|
|
4001
4015
|
label,
|
|
4002
4016
|
helperText,
|
|
@@ -4021,8 +4035,7 @@ var NumericStepper = React20__default.forwardRef((props, ref) => {
|
|
|
4021
4035
|
focusOnAddButton();
|
|
4022
4036
|
}
|
|
4023
4037
|
},
|
|
4024
|
-
disabled: disabled || value <= minValue
|
|
4025
|
-
id: value <= minValue ? void 0 : idProperty
|
|
4038
|
+
disabled: disabled || value <= minValue
|
|
4026
4039
|
}
|
|
4027
4040
|
),
|
|
4028
4041
|
withInput ? /* @__PURE__ */ jsx(
|
|
@@ -4033,7 +4046,7 @@ var NumericStepper = React20__default.forwardRef((props, ref) => {
|
|
|
4033
4046
|
name: nameProperty,
|
|
4034
4047
|
value,
|
|
4035
4048
|
disabled,
|
|
4036
|
-
id:
|
|
4049
|
+
id: idProperty,
|
|
4037
4050
|
css: styles.input,
|
|
4038
4051
|
width: `${Math.max(value.toString().length + 1, 3)}ch`,
|
|
4039
4052
|
"aria-live": "assertive",
|
|
@@ -4071,8 +4084,7 @@ var NumericStepper = React20__default.forwardRef((props, ref) => {
|
|
|
4071
4084
|
)
|
|
4072
4085
|
),
|
|
4073
4086
|
onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
|
|
4074
|
-
disabled: disabled || value >= maxValue
|
|
4075
|
-
id: value >= maxValue ? void 0 : idProperty
|
|
4087
|
+
disabled: disabled || value >= maxValue
|
|
4076
4088
|
}
|
|
4077
4089
|
)
|
|
4078
4090
|
]
|
|
@@ -4918,7 +4930,7 @@ var ExternalIcon = ({
|
|
|
4918
4930
|
size
|
|
4919
4931
|
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4920
4932
|
size === "lg" || size === "md" ? /* @__PURE__ */ jsx(LinkOutOutline24Icon, { "aria-hidden": true, display: "inline" }) : /* @__PURE__ */ jsx(LinkOutOutline18Icon, { "aria-hidden": true, display: "inline" }),
|
|
4921
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { children: label })
|
|
4933
|
+
/* @__PURE__ */ jsx(VisuallyHidden$1, { children: label })
|
|
4922
4934
|
] });
|
|
4923
4935
|
var TextLink = forwardRef(
|
|
4924
4936
|
({ children, external, href, ...props }, ref) => {
|
|
@@ -6280,10 +6292,10 @@ var attachedInputsRecipe = defineRecipe({
|
|
|
6280
6292
|
},
|
|
6281
6293
|
"& > *": {
|
|
6282
6294
|
position: "relative",
|
|
6283
|
-
zIndex:
|
|
6295
|
+
zIndex: 100
|
|
6284
6296
|
},
|
|
6285
6297
|
"& > *:focus-within": {
|
|
6286
|
-
zIndex:
|
|
6298
|
+
zIndex: 101
|
|
6287
6299
|
}
|
|
6288
6300
|
},
|
|
6289
6301
|
variants: {
|
|
@@ -7675,8 +7687,7 @@ var comboboxSlotRecipe = defineSlotRecipe({
|
|
|
7675
7687
|
},
|
|
7676
7688
|
label: {
|
|
7677
7689
|
fontWeight: "medium",
|
|
7678
|
-
userSelect: "none"
|
|
7679
|
-
textStyle: "sm"
|
|
7690
|
+
userSelect: "none"
|
|
7680
7691
|
},
|
|
7681
7692
|
input: {
|
|
7682
7693
|
transition: "border-radius",
|
|
@@ -11596,8 +11607,6 @@ var textStyles = defineTextStyles({
|
|
|
11596
11607
|
value: {
|
|
11597
11608
|
fontSize: [
|
|
11598
11609
|
tokens23__default.font.style.xxl["font-size"].mobile,
|
|
11599
|
-
null,
|
|
11600
|
-
null,
|
|
11601
11610
|
tokens23__default.font.style.xxl["font-size"].desktop
|
|
11602
11611
|
],
|
|
11603
11612
|
fontFamily: tokens23__default.font.style.xxl["font-family"],
|
|
@@ -11608,8 +11617,6 @@ var textStyles = defineTextStyles({
|
|
|
11608
11617
|
value: {
|
|
11609
11618
|
fontSize: [
|
|
11610
11619
|
tokens23__default.font.style["xl-display"]["font-size"].mobile,
|
|
11611
|
-
null,
|
|
11612
|
-
null,
|
|
11613
11620
|
tokens23__default.font.style["xl-display"]["font-size"].desktop
|
|
11614
11621
|
],
|
|
11615
11622
|
fontFamily: tokens23__default.font.style["xl-display"]["font-family"],
|
|
@@ -11620,8 +11627,6 @@ var textStyles = defineTextStyles({
|
|
|
11620
11627
|
value: {
|
|
11621
11628
|
fontSize: [
|
|
11622
11629
|
tokens23__default.font.style["xl-sans"]["font-size"].mobile,
|
|
11623
|
-
null,
|
|
11624
|
-
null,
|
|
11625
11630
|
tokens23__default.font.style["xl-sans"]["font-size"].desktop
|
|
11626
11631
|
],
|
|
11627
11632
|
fontFamily: tokens23__default.font.style["xl-sans"]["font-family"],
|
|
@@ -11632,8 +11637,6 @@ var textStyles = defineTextStyles({
|
|
|
11632
11637
|
value: {
|
|
11633
11638
|
fontSize: [
|
|
11634
11639
|
tokens23__default.font.style.lg["font-size"].mobile,
|
|
11635
|
-
null,
|
|
11636
|
-
null,
|
|
11637
11640
|
tokens23__default.font.style.lg["font-size"].desktop
|
|
11638
11641
|
],
|
|
11639
11642
|
fontFamily: tokens23__default.font.style.lg["font-family"],
|
|
@@ -11644,8 +11647,6 @@ var textStyles = defineTextStyles({
|
|
|
11644
11647
|
value: {
|
|
11645
11648
|
fontSize: [
|
|
11646
11649
|
tokens23__default.font.style["md-lg"]["font-size"].mobile,
|
|
11647
|
-
null,
|
|
11648
|
-
null,
|
|
11649
11650
|
tokens23__default.font.style["md-lg"]["font-size"].desktop
|
|
11650
11651
|
],
|
|
11651
11652
|
fontFamily: tokens23__default.font.style["md-lg"]["font-family"],
|
|
@@ -11656,8 +11657,6 @@ var textStyles = defineTextStyles({
|
|
|
11656
11657
|
value: {
|
|
11657
11658
|
fontSize: [
|
|
11658
11659
|
tokens23__default.font.style.md["font-size"].mobile,
|
|
11659
|
-
null,
|
|
11660
|
-
null,
|
|
11661
11660
|
tokens23__default.font.style.md["font-size"].desktop
|
|
11662
11661
|
],
|
|
11663
11662
|
fontFamily: tokens23__default.font.style.md["font-family"],
|
|
@@ -11668,8 +11667,6 @@ var textStyles = defineTextStyles({
|
|
|
11668
11667
|
value: {
|
|
11669
11668
|
fontSize: [
|
|
11670
11669
|
tokens23__default.font.style.sm["font-size"].mobile,
|
|
11671
|
-
null,
|
|
11672
|
-
null,
|
|
11673
11670
|
tokens23__default.font.style.sm["font-size"].desktop
|
|
11674
11671
|
],
|
|
11675
11672
|
fontFamily: tokens23__default.font.style.sm["font-family"],
|
|
@@ -11680,8 +11677,6 @@ var textStyles = defineTextStyles({
|
|
|
11680
11677
|
value: {
|
|
11681
11678
|
fontSize: [
|
|
11682
11679
|
tokens23__default.font.style.xs["font-size"].mobile,
|
|
11683
|
-
null,
|
|
11684
|
-
null,
|
|
11685
11680
|
tokens23__default.font.style.xs["font-size"].desktop
|
|
11686
11681
|
],
|
|
11687
11682
|
fontFamily: tokens23__default.font.style.xs["font-family"],
|
|
@@ -11692,8 +11687,6 @@ var textStyles = defineTextStyles({
|
|
|
11692
11687
|
value: {
|
|
11693
11688
|
fontSize: [
|
|
11694
11689
|
tokens23__default.font.style["2xs"]["font-size"].mobile,
|
|
11695
|
-
null,
|
|
11696
|
-
null,
|
|
11697
11690
|
tokens23__default.font.style["2xs"]["font-size"].desktop
|
|
11698
11691
|
],
|
|
11699
11692
|
fontFamily: tokens23__default.font.style["2xs"]["font-family"],
|