@vygruppen/spor-react 12.3.1 → 12.3.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/dist/index.mjs CHANGED
@@ -1,17 +1,17 @@
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 as Group$1, 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, ClientOnly as ClientOnly$1, Field, defineStyle, defineSlotRecipe, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, Drawer as Drawer$1, Grid, GridItem, usePopoverContext, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, Fieldset as Fieldset$1, Input as Input$1, InputElement, List as List$1, ListItem, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, Switch as Switch$1, Textarea as Textarea$1, RadioCard as RadioCard$1, Separator as Separator$1, Link, Center, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, VisuallyHidden, defineConfig, ChakraProvider, Toaster as Toaster$1, Toast, Icon } 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 as Group$1, 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, ClientOnly as ClientOnly$1, Field, defineStyle, defineSlotRecipe, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, Drawer as Drawer$1, Grid, GridItem, usePopoverContext, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, Fieldset as Fieldset$1, Input as Input$1, InputElement, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, Switch as Switch$1, Textarea as Textarea$1, RadioCard as RadioCard$1, Separator as Separator$1, Link, List as List$1, Center, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, VisuallyHidden, defineConfig, ListItem, ChakraProvider, Toaster as Toaster$1, Toast, Icon } from '@chakra-ui/react';
2
2
  export { Box, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, Collapsible, Container, Em, Flex, For, FormatByte, FormatNumber, Grid, GridItem, HStack, Image, Kbd, LocaleProvider, Portal, Show, SimpleGrid, Spacer, Span, Stack, TableBody, TableCaption, TableCell, TableColumn, TableColumnHeader, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
3
- import { DropdownDownFill24Icon, CopyOutline18Icon, CheckmarkFill18Icon, CloseFill30Icon, CloseFill24Icon, CloseFill18Icon, DropdownDownFill18Icon, ServiceFill24Icon, WarningFill24Icon, DropdownRightFill18Icon, CalendarOutline24Icon, ArrowLeftFill24Icon, CloseOutline24Icon, SearchOutline24Icon, InformationFill24Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill24Icon, ErrorFill18Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill24Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, LinkOutOutline24Icon, QuestionFill24Icon, ErrorOutline24Icon, SuccessFill24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, DropdownLeftFill18Icon, SuccessFill18Icon } from '@vygruppen/spor-icon-react';
3
+ import { DropdownDownFill24Icon, CopyOutline18Icon, CheckmarkFill18Icon, CloseFill18Icon, CloseFill30Icon, CloseFill24Icon, ServiceFill24Icon, QuestionFill24Icon, ErrorOutline24Icon, ErrorFill24Icon, AltTransportFill24Icon, WarningFill24Icon, SuccessFill24Icon, InformationFill24Icon, DropdownDownFill18Icon, DropdownRightFill18Icon, CalendarOutline24Icon, ArrowLeftFill24Icon, CloseOutline24Icon, SearchOutline24Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill18Icon, 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, LinkOutOutline24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, DropdownLeftFill18Icon, SuccessFill18Icon } from '@vygruppen/spor-icon-react';
4
4
  import * as React28 from 'react';
5
- import React28__default, { forwardRef, createContext, useId, cloneElement, useEffect, useRef, useState, isValidElement, useMemo, useLayoutEffect, useContext } from 'react';
5
+ import React28__default, { forwardRef, createContext, useId, cloneElement, useEffect, useRef, isValidElement, useState, useMemo, useLayoutEffect, useContext } from 'react';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
7
  import { spinnerColorData, inlineLoaderColorData, contentLoaderData, fullScreenLoaderWhiteData, inlineLoaderDarkData, spinnerLightData, spinnerDarkData, fullScreenLoaderBlackData, inlineLoaderLightData } from '@vygruppen/spor-loader';
8
8
  import ReactLottie from 'lottie-react';
9
9
  import { useInterval } from 'usehooks-ts';
10
10
  export { useIsClient, useMap, useOnClickOutside } from 'usehooks-ts';
11
- import { useProgressBar, useDateSegment, useDateField, useDatePicker, I18nProvider, usePopover, DismissButton, Overlay, useFilter, useComboBox, useListBox, useOption, useListBoxSection, useCalendar, useCalendarGrid, useCalendarCell, useButton, useId as useId$1, useDateRangePicker, useRangeCalendar, useTimeField } from 'react-aria';
11
+ import { useProgressBar, useDateSegment, useDateField, useDatePicker, I18nProvider, usePopover, DismissButton, Overlay, useCalendar, useCalendarGrid, useCalendarCell, useButton, useId as useId$1, useDateRangePicker, useFilter, useComboBox, useListBox, useOption, useListBoxSection, useRangeCalendar, useTimeField } from 'react-aria';
12
12
  import { useTheme, ThemeProvider } from 'next-themes';
13
13
  import { LuMoon, LuSun } from 'react-icons/lu';
14
- import { useDateFieldState, useDatePickerState, useComboBoxState, useCalendarState, useDateRangePickerState, useTimeFieldState, useRangeCalendarState } from 'react-stately';
14
+ import { useDateFieldState, useDatePickerState, useCalendarState, useDateRangePickerState, useTimeFieldState, useComboBoxState, useRangeCalendarState } from 'react-stately';
15
15
  export { Item, Section } from 'react-stately';
16
16
  import { createAnatomy } from '@ark-ui/react/anatomy';
17
17
  import { popoverAnatomy as popoverAnatomy$1 } from '@ark-ui/react/popover';
@@ -392,7 +392,7 @@ var ProgressLoader = forwardRef(
392
392
  "aria-label": ariaLabel,
393
393
  width,
394
394
  ...rest
395
- }) => {
395
+ }, ref) => {
396
396
  const { t } = useTranslation();
397
397
  const currentLoadingText = useRotatingLabel({
398
398
  label,
@@ -420,6 +420,7 @@ var ProgressLoader = forwardRef(
420
420
  "aria-valuemax": 100,
421
421
  "aria-label": ariaLabel ?? t(texts.fallbackLabel(value ?? "?")),
422
422
  ...rest,
423
+ ref,
423
424
  children: [
424
425
  /* @__PURE__ */ jsxs(chakra.svg, { as: "svg", viewBox: "0 0 246 78", fill: "none", children: [
425
426
  /* @__PURE__ */ jsx(
@@ -605,7 +606,7 @@ var LoadingContent = ({
605
606
  }) => /* @__PURE__ */ jsxs(Fragment, { children: [
606
607
  /* @__PURE__ */ jsx(Flex, { gap: "1", visibility: "hidden", children }),
607
608
  /* @__PURE__ */ jsxs(Center, { position: "absolute", inset: "1px 0", children: [
608
- /* @__PURE__ */ jsx(ColorInlineLoader, { width: "80%", marginX: 2, marginY: 2 }),
609
+ /* @__PURE__ */ jsx(ColorInlineLoader, { maxWidth: "8", marginX: 2, marginY: 2 }),
609
610
  loadingText && /* @__PURE__ */ jsx(Box, { children: loadingText })
610
611
  ] })
611
612
  ] });
@@ -902,9 +903,9 @@ var IconButton = forwardRef(
902
903
  {
903
904
  "aria-label": props["aria-label"],
904
905
  size,
905
- ref,
906
906
  position: "relative",
907
907
  ...rest,
908
+ ref,
908
909
  children: loading ? /* @__PURE__ */ jsx(ColorSpinner, { width: "2em", height: "2em", margin: 1 }) : icon
909
910
  }
910
911
  );
@@ -917,18 +918,18 @@ var CloseButton = forwardRef(
917
918
  return /* @__PURE__ */ jsx(
918
919
  IconButton,
919
920
  {
920
- ref,
921
921
  variant: "ghost",
922
- icon: getIcon(size),
922
+ icon: /* @__PURE__ */ jsx(CloseIcon, { size }),
923
923
  size,
924
924
  "aria-label": props["aria-label"] || t(texts4.close),
925
- ...props
925
+ ...props,
926
+ ref
926
927
  }
927
928
  );
928
929
  }
929
930
  );
930
931
  CloseButton.displayName = "CloseButton";
931
- var getIcon = (size) => {
932
+ var CloseIcon = ({ size }) => {
932
933
  switch (size) {
933
934
  case "xs":
934
935
  case "sm": {
@@ -940,6 +941,9 @@ var getIcon = (size) => {
940
941
  case "lg": {
941
942
  return /* @__PURE__ */ jsx(CloseFill30Icon, {});
942
943
  }
944
+ default: {
945
+ return /* @__PURE__ */ jsx(CloseFill18Icon, {});
946
+ }
943
947
  }
944
948
  };
945
949
  var texts4 = createTexts({
@@ -1020,19 +1024,23 @@ var useScrollDirection = () => {
1020
1024
  }, [scrollDirection]);
1021
1025
  return scrollDirection;
1022
1026
  };
1023
- var AlertIcon = ({ variant, customIcon }) => {
1024
- const { t } = useTranslation();
1025
- const icon = customIcon ?? getIcon2(variant);
1026
- return /* @__PURE__ */ jsx(
1027
- Box,
1028
- {
1029
- as: icon,
1030
- "aria-label": t(texts5[variant]),
1031
- color: customIcon ? `alert.${variant}.icon` : void 0
1032
- }
1033
- );
1034
- };
1035
- var getIcon2 = (variant) => {
1027
+ var AlertIcon = forwardRef(
1028
+ ({ variant, customIcon }, ref) => {
1029
+ const { t } = useTranslation();
1030
+ const Icon2 = customIcon ?? getIcon(variant);
1031
+ return /* @__PURE__ */ jsx(
1032
+ Box,
1033
+ {
1034
+ as: Icon2,
1035
+ ref,
1036
+ "aria-label": t(texts5[variant]),
1037
+ color: customIcon ? `alert.${variant}.icon` : void 0
1038
+ }
1039
+ );
1040
+ }
1041
+ );
1042
+ AlertIcon.displayName = "AlertIcon";
1043
+ var getIcon = (variant) => {
1036
1044
  switch (variant) {
1037
1045
  case "info": {
1038
1046
  return InformationFill24Icon;
@@ -2229,14 +2237,14 @@ var texts8 = createTexts({
2229
2237
  en: "Calendar"
2230
2238
  }
2231
2239
  });
2232
- var CalendarTriggerButton = forwardRef(({ variant, disabled, ariaLabelledby, ...buttonProps }) => {
2240
+ var CalendarTriggerButton = forwardRef(({ variant, disabled, ariaLabelledby, ...buttonProps }, ref) => {
2233
2241
  const { t } = useTranslation();
2234
2242
  const recipe = useSlotRecipe({
2235
2243
  key: "datePicker",
2236
2244
  recipe: datePickerSlotRecipe
2237
2245
  });
2238
2246
  const styles = recipe({ variant });
2239
- return /* @__PURE__ */ jsx(PopoverAnchor, { ...buttonProps, children: /* @__PURE__ */ jsx(
2247
+ return /* @__PURE__ */ jsx(PopoverAnchor, { ...buttonProps, ref, children: /* @__PURE__ */ jsx(
2240
2248
  IconButton,
2241
2249
  {
2242
2250
  icon: /* @__PURE__ */ jsx(CalendarOutline24Icon, {}),
@@ -2433,6 +2441,7 @@ var DatePicker = forwardRef(
2433
2441
  width = "auto",
2434
2442
  invalid = false,
2435
2443
  helperText,
2444
+ positioning,
2436
2445
  ...props
2437
2446
  }, externalRef) => {
2438
2447
  const chakraFieldProps = useFieldContext();
@@ -2476,7 +2485,7 @@ var DatePicker = forwardRef(
2476
2485
  display: "inline-flex",
2477
2486
  flexDirection: "column",
2478
2487
  width,
2479
- children: /* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, children: [
2488
+ children: /* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, positioning, children: [
2480
2489
  /* @__PURE__ */ jsx(
2481
2490
  Field3,
2482
2491
  {
@@ -2568,6 +2577,7 @@ function DateRangePicker({
2568
2577
  errorText,
2569
2578
  helperText,
2570
2579
  invalid,
2580
+ positioning,
2571
2581
  ...props
2572
2582
  }) {
2573
2583
  const fieldContextPRops = useFieldContext();
@@ -2602,7 +2612,7 @@ function DateRangePicker({
2602
2612
  const popoverContent = /* @__PURE__ */ jsx(Popover$1.Positioner, { children: /* @__PURE__ */ jsx(Popover$1.Content, { css: styles.calendarPopover, children: /* @__PURE__ */ jsx(Popover$1.Body, { maxWidth: "60rem", children: /* @__PURE__ */ jsx(RangeCalendar, { variant: "core", ...calendarProps }) }) }) });
2603
2613
  return /* @__PURE__ */ jsx(I18nProvider, { locale, children: /* @__PURE__ */ jsxs(Box, { position: "relative", display: "inline-flex", flexDirection: "column", children: [
2604
2614
  props.label && /* @__PURE__ */ jsx("label", { ...labelProps, htmlFor: datePickerId, children: props.label }),
2605
- /* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, children: [
2615
+ /* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, positioning, children: [
2606
2616
  /* @__PURE__ */ jsx(
2607
2617
  Field3,
2608
2618
  {
@@ -3140,147 +3150,145 @@ var Popover = forwardRef(
3140
3150
  }
3141
3151
  );
3142
3152
  Popover.displayName = "Popover";
3143
- var Combobox = forwardRef(
3144
- (props) => {
3145
- const {
3146
- label,
3147
- loading,
3148
- lefticon,
3149
- righticon,
3150
- borderBottomLeftRadius = "sm",
3151
- borderBottomRightRadius = "sm",
3152
- borderTopLeftRadius = "sm",
3153
- borderTopRightRadius = "sm",
3154
- marginBottom,
3155
- marginTop,
3156
- marginX,
3157
- marginY,
3158
- marginRight,
3159
- marginLeft,
3160
- paddingBottom,
3161
- paddingRight,
3162
- paddingTop,
3163
- paddingLeft,
3164
- paddingX,
3165
- paddingY,
3166
- emptyContent,
3167
- inputRef: externalInputRef,
3168
- children,
3169
- variant
3170
- } = props;
3171
- const { contains } = useFilter({ sensitivity: "base" });
3172
- const fallbackInputRef = useRef(null);
3173
- const inputRef = externalInputRef ?? fallbackInputRef;
3174
- const listBoxRef = useRef(null);
3175
- const popoverRef = useRef(null);
3176
- const listboxId = `${useId()}-listbox`;
3177
- const inputWidth = useInputWidth(inputRef);
3178
- const state = useComboBoxState({
3179
- defaultFilter: contains,
3180
- shouldCloseOnBlur: true,
3181
- ...props
3182
- });
3183
- const comboBoxProps = {
3184
- borderTopLeftRadius,
3185
- borderTopRightRadius,
3186
- marginBottom,
3187
- marginTop,
3188
- marginRight,
3189
- marginLeft,
3190
- marginX,
3191
- marginY,
3192
- paddingBottom,
3193
- paddingRight,
3194
- paddingTop,
3195
- paddingLeft,
3196
- paddingX,
3197
- paddingY,
3198
- lefticon
3199
- };
3200
- const {
3201
- inputProps: { ...inputProps },
3202
- listBoxProps
3203
- } = useComboBox(
3153
+ var Combobox = (props) => {
3154
+ const {
3155
+ label,
3156
+ loading,
3157
+ lefticon,
3158
+ righticon,
3159
+ borderBottomLeftRadius = "sm",
3160
+ borderBottomRightRadius = "sm",
3161
+ borderTopLeftRadius = "sm",
3162
+ borderTopRightRadius = "sm",
3163
+ marginBottom,
3164
+ marginTop,
3165
+ marginX,
3166
+ marginY,
3167
+ marginRight,
3168
+ marginLeft,
3169
+ paddingBottom,
3170
+ paddingRight,
3171
+ paddingTop,
3172
+ paddingLeft,
3173
+ paddingX,
3174
+ paddingY,
3175
+ emptyContent,
3176
+ inputRef: externalInputRef,
3177
+ children,
3178
+ variant
3179
+ } = props;
3180
+ const { contains } = useFilter({ sensitivity: "base" });
3181
+ const fallbackInputRef = useRef(null);
3182
+ const inputRef = externalInputRef ?? fallbackInputRef;
3183
+ const listBoxRef = useRef(null);
3184
+ const popoverRef = useRef(null);
3185
+ const listboxId = `${useId()}-listbox`;
3186
+ const inputWidth = useInputWidth(inputRef);
3187
+ const state = useComboBoxState({
3188
+ defaultFilter: contains,
3189
+ shouldCloseOnBlur: true,
3190
+ ...props
3191
+ });
3192
+ const comboBoxProps = {
3193
+ borderTopLeftRadius,
3194
+ borderTopRightRadius,
3195
+ marginBottom,
3196
+ marginTop,
3197
+ marginRight,
3198
+ marginLeft,
3199
+ marginX,
3200
+ marginY,
3201
+ paddingBottom,
3202
+ paddingRight,
3203
+ paddingTop,
3204
+ paddingLeft,
3205
+ paddingX,
3206
+ paddingY,
3207
+ lefticon
3208
+ };
3209
+ const {
3210
+ inputProps: { ...inputProps },
3211
+ listBoxProps
3212
+ } = useComboBox(
3213
+ {
3214
+ ...props,
3215
+ inputRef,
3216
+ listBoxRef,
3217
+ popoverRef,
3218
+ label
3219
+ },
3220
+ state
3221
+ );
3222
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3223
+ /* @__PURE__ */ jsx(
3224
+ Input,
3204
3225
  {
3205
- ...props,
3206
- inputRef,
3207
- listBoxRef,
3208
- popoverRef,
3209
- label
3210
- },
3211
- state
3212
- );
3213
- return /* @__PURE__ */ jsxs(Fragment, { children: [
3214
- /* @__PURE__ */ jsx(
3215
- Input,
3216
- {
3217
- ...styleProps(comboBoxProps),
3218
- "aria-haspopup": "listbox",
3219
- ref: inputRef,
3220
- role: "combobox",
3221
- errorText: props.errorText,
3222
- helperText: props.helperText,
3223
- required: props.required,
3224
- disabled: props.disabled,
3225
- invalid: props.invalid,
3226
- label,
3227
- variant,
3228
- "aria-expanded": state.isOpen,
3229
- "aria-autocomplete": "list",
3230
- "aria-controls": listboxId,
3231
- borderBottomLeftRadius: state.isOpen && !loading ? 0 : borderBottomLeftRadius,
3232
- borderBottomRightRadius: state.isOpen && !loading ? 0 : borderBottomRightRadius,
3233
- _active: { backgroundColor: "core.surface.active" },
3234
- ...inputProps,
3235
- endElement: loading ? /* @__PURE__ */ jsx(
3236
- ColorSpinner,
3237
- {
3238
- width: "1.5rem",
3239
- alignSelf: "center",
3240
- paddingRight,
3241
- css: {
3242
- div: {
3243
- display: "flex",
3244
- alignItems: "center"
3245
- }
3226
+ ...styleProps(comboBoxProps),
3227
+ "aria-haspopup": "listbox",
3228
+ ref: inputRef,
3229
+ role: "combobox",
3230
+ errorText: props.errorText,
3231
+ helperText: props.helperText,
3232
+ required: props.required,
3233
+ disabled: props.disabled,
3234
+ invalid: props.invalid,
3235
+ label,
3236
+ variant,
3237
+ "aria-expanded": state.isOpen,
3238
+ "aria-autocomplete": "list",
3239
+ "aria-controls": listboxId,
3240
+ borderBottomLeftRadius: state.isOpen && !loading ? 0 : borderBottomLeftRadius,
3241
+ borderBottomRightRadius: state.isOpen && !loading ? 0 : borderBottomRightRadius,
3242
+ _active: { backgroundColor: "core.surface.active" },
3243
+ ...inputProps,
3244
+ endElement: loading ? /* @__PURE__ */ jsx(
3245
+ ColorSpinner,
3246
+ {
3247
+ width: "1.5rem",
3248
+ alignSelf: "center",
3249
+ paddingRight,
3250
+ css: {
3251
+ div: {
3252
+ display: "flex",
3253
+ alignItems: "center"
3246
3254
  }
3247
3255
  }
3248
- ) : righticon,
3249
- placeholder: ""
3250
- }
3251
- ),
3252
- /* @__PURE__ */ jsx("span", { "aria-hidden": "true", "data-trigger": "multiselect" }),
3253
- state.isOpen && !loading && /* @__PURE__ */ jsx(
3254
- Popover,
3255
- {
3256
- state,
3257
- triggerRef: inputRef,
3258
- ref: popoverRef,
3259
- isNonModal: true,
3260
- placement: "bottom start",
3261
- shouldFlip: false,
3262
- hasBackdrop: false,
3263
- containerPadding: 0,
3264
- children: /* @__PURE__ */ jsx(
3265
- ListBox,
3266
- {
3267
- ...{
3268
- autoFocus: typeof listBoxProps.autoFocus === "boolean" ? listBoxProps.autoFocus : void 0
3269
- },
3270
- state,
3271
- id: listboxId,
3272
- listBoxRef,
3273
- emptyContent,
3274
- maxWidth: inputWidth,
3275
- variant,
3276
- children
3277
- }
3278
- )
3279
- }
3280
- )
3281
- ] });
3282
- }
3283
- );
3256
+ }
3257
+ ) : righticon,
3258
+ placeholder: ""
3259
+ }
3260
+ ),
3261
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", "data-trigger": "multiselect" }),
3262
+ state.isOpen && !loading && /* @__PURE__ */ jsx(
3263
+ Popover,
3264
+ {
3265
+ state,
3266
+ triggerRef: inputRef,
3267
+ ref: popoverRef,
3268
+ isNonModal: true,
3269
+ placement: "bottom start",
3270
+ shouldFlip: false,
3271
+ hasBackdrop: false,
3272
+ containerPadding: 0,
3273
+ children: /* @__PURE__ */ jsx(
3274
+ ListBox,
3275
+ {
3276
+ ...{
3277
+ autoFocus: typeof listBoxProps.autoFocus === "boolean" ? listBoxProps.autoFocus : void 0
3278
+ },
3279
+ state,
3280
+ id: listboxId,
3281
+ listBoxRef,
3282
+ emptyContent,
3283
+ maxWidth: inputWidth,
3284
+ variant,
3285
+ children
3286
+ }
3287
+ )
3288
+ }
3289
+ )
3290
+ ] });
3291
+ };
3284
3292
  Combobox.displayName = "Combobox";
3285
3293
  var useInputWidth = (inputRef) => {
3286
3294
  const [inputWidth, setInputWidth] = useState("auto");
@@ -3445,31 +3453,29 @@ var Input = forwardRef(
3445
3453
  }
3446
3454
  );
3447
3455
  Input.displayName = "Input";
3448
- var ListBox = forwardRef(
3449
- (props) => {
3450
- const { loading, listBoxRef, state, maxWidth, variant, children } = props;
3451
- const { listBoxProps } = useListBox(props, state, listBoxRef);
3452
- const recipe = useSlotRecipe({ key: "listBox" });
3453
- const styles = recipe({ variant });
3454
- return /* @__PURE__ */ jsxs(
3455
- List,
3456
- {
3457
- ...listBoxProps,
3458
- ref: listBoxRef,
3459
- css: styles.root,
3460
- "aria-busy": loading,
3461
- maxWidth,
3462
- children: [
3463
- state.collection.size === 0 && props.emptyContent,
3464
- [...state.collection].map(
3465
- (item) => item.type === "section" ? /* @__PURE__ */ jsx(ListBoxSection, { section: item, state }, item.key) : /* @__PURE__ */ jsx(Option, { item, state }, item.key)
3466
- ),
3467
- children
3468
- ]
3469
- }
3470
- );
3471
- }
3472
- );
3456
+ var ListBox = (props) => {
3457
+ const { loading, listBoxRef, state, maxWidth, variant, children } = props;
3458
+ const { listBoxProps } = useListBox(props, state, listBoxRef);
3459
+ const recipe = useSlotRecipe({ key: "listBox" });
3460
+ const styles = recipe({ variant });
3461
+ return /* @__PURE__ */ jsxs(
3462
+ List,
3463
+ {
3464
+ ...listBoxProps,
3465
+ ref: listBoxRef,
3466
+ css: styles.root,
3467
+ "aria-busy": loading,
3468
+ maxWidth,
3469
+ children: [
3470
+ state.collection.size === 0 && props.emptyContent,
3471
+ [...state.collection].map(
3472
+ (item) => item.type === "section" ? /* @__PURE__ */ jsx(ListBoxSection, { section: item, state }, item.key) : /* @__PURE__ */ jsx(Option, { item, state }, item.key)
3473
+ ),
3474
+ children
3475
+ ]
3476
+ }
3477
+ );
3478
+ };
3473
3479
  ListBox.displayName = "ListBox";
3474
3480
  function ItemLabel({ children }) {
3475
3481
  const { labelProps } = useOptionContext();
@@ -3849,7 +3855,7 @@ var numericStepperRecipe = defineSlotRecipe({
3849
3855
  }
3850
3856
  }
3851
3857
  });
3852
- var NumericStepper = React28__default.forwardRef((props) => {
3858
+ var NumericStepper = React28__default.forwardRef((props, ref) => {
3853
3859
  const {
3854
3860
  name: nameProp,
3855
3861
  id: idProp,
@@ -3879,7 +3885,7 @@ var NumericStepper = React28__default.forwardRef((props) => {
3879
3885
  var _a5;
3880
3886
  (_a5 = addButtonRef.current) == null ? void 0 : _a5.focus();
3881
3887
  };
3882
- return /* @__PURE__ */ jsxs(Field3, { css: styles.root, width: "auto", ...rest, children: [
3888
+ return /* @__PURE__ */ jsxs(Field3, { css: styles.root, width: "auto", ...rest, ref, children: [
3883
3889
  /* @__PURE__ */ jsx(
3884
3890
  VerySmallButton,
3885
3891
  {
@@ -4425,42 +4431,44 @@ var SelectValueText = React28.forwardRef(function SelectValueText2(props, ref) {
4425
4431
  var SelectLabel = Select$1.Label;
4426
4432
  var SelectItemText = Select$1.ItemText;
4427
4433
  var SelectRoot = Select$1.Root;
4428
- var Switch = forwardRef((props) => {
4429
- const {
4430
- rootRef,
4431
- size = "md",
4432
- label,
4433
- invalid,
4434
- errorText,
4435
- helperText,
4436
- ...rest
4437
- } = props;
4438
- const recipe = useSlotRecipe({ key: "switch" });
4439
- const styles = recipe({ size });
4440
- return /* @__PURE__ */ jsx(
4441
- Field3,
4442
- {
4443
- style: { width: "auto" },
4434
+ var Switch = forwardRef(
4435
+ (props, ref) => {
4436
+ const {
4437
+ rootRef,
4438
+ size = "md",
4439
+ label,
4444
4440
  invalid,
4445
4441
  errorText,
4446
4442
  helperText,
4447
- children: /* @__PURE__ */ jsxs(
4448
- Switch$1.Root,
4449
- {
4450
- ref: rootRef,
4451
- ...rest,
4452
- checked: props.checked,
4453
- css: styles.root,
4454
- children: [
4455
- /* @__PURE__ */ jsx(Switch$1.Label, { children: label }),
4456
- /* @__PURE__ */ jsx(Switch$1.HiddenInput, {}),
4457
- /* @__PURE__ */ jsx(Switch$1.Control, { css: styles.control, children: /* @__PURE__ */ jsx(Switch$1.Thumb, {}) })
4458
- ]
4459
- }
4460
- )
4461
- }
4462
- );
4463
- });
4443
+ ...rest
4444
+ } = props;
4445
+ const recipe = useSlotRecipe({ key: "switch" });
4446
+ const styles = recipe({ size });
4447
+ return /* @__PURE__ */ jsx(
4448
+ Field3,
4449
+ {
4450
+ style: { width: "auto" },
4451
+ invalid,
4452
+ errorText,
4453
+ helperText,
4454
+ children: /* @__PURE__ */ jsxs(
4455
+ Switch$1.Root,
4456
+ {
4457
+ ref: rootRef,
4458
+ ...rest,
4459
+ checked: props.checked,
4460
+ css: styles.root,
4461
+ children: [
4462
+ /* @__PURE__ */ jsx(Switch$1.Label, { children: label }),
4463
+ /* @__PURE__ */ jsx(Switch$1.HiddenInput, { ref }),
4464
+ /* @__PURE__ */ jsx(Switch$1.Control, { css: styles.control, children: /* @__PURE__ */ jsx(Switch$1.Thumb, {}) })
4465
+ ]
4466
+ }
4467
+ )
4468
+ }
4469
+ );
4470
+ }
4471
+ );
4464
4472
  Switch.displayName = "Switch";
4465
4473
  var useLabelHeight = (label) => {
4466
4474
  const labelRef = useRef(null);
@@ -4841,7 +4849,7 @@ var LineIcon = forwardRef(
4841
4849
  target = "lineIcon",
4842
4850
  label,
4843
4851
  ...rest
4844
- }) {
4852
+ }, ref) {
4845
4853
  const recipe = useSlotRecipe({ key: "lineIcon" });
4846
4854
  const styles = recipe({ variant, size, ...rest });
4847
4855
  const targetPadding = () => {
@@ -4871,6 +4879,7 @@ var LineIcon = forwardRef(
4871
4879
  borderWidth: borderContainer(),
4872
4880
  borderColor: variant === "walk" ? "core.outline" : "transparent",
4873
4881
  "aria-label": label,
4882
+ ref,
4874
4883
  children: /* @__PURE__ */ jsx(Icon2, { css: styles.icon })
4875
4884
  }
4876
4885
  );
@@ -5964,7 +5973,7 @@ var ProgressDot = ({ isActive }) => {
5964
5973
  }
5965
5974
  );
5966
5975
  };
5967
- var ProgressIndicator = forwardRef(({ numberOfSteps, activeStep }) => {
5976
+ var ProgressIndicator = forwardRef(({ numberOfSteps, activeStep }, ref) => {
5968
5977
  const { t } = useTranslation();
5969
5978
  const recipe = useSlotRecipe({
5970
5979
  key: "progressIndicator"
@@ -5979,6 +5988,7 @@ var ProgressIndicator = forwardRef(({ numberOfSteps, activeStep }) => {
5979
5988
  "aria-valuemax": numberOfSteps,
5980
5989
  "aria-valuenow": activeStep,
5981
5990
  "aria-valuetext": t(texts24.stepsOf(activeStep, numberOfSteps)),
5991
+ ref,
5982
5992
  children: /* @__PURE__ */ jsx(Box, { css: styles.container, children: Array.from({ length: numberOfSteps }, (_, i) => /* @__PURE__ */ jsx(
5983
5993
  ProgressDot,
5984
5994
  {