@vygruppen/spor-react 12.8.8 → 12.8.10

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.d.cts CHANGED
@@ -2,7 +2,7 @@ import * as React$1 from 'react';
2
2
  import React__default, { ReactNode, PropsWithChildren, ComponentProps } from 'react';
3
3
  import * as _chakra_ui_react from '@chakra-ui/react';
4
4
  import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, RecipeVariantProps, ButtonProps as ButtonProps$1, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCardRootProps, CheckboxCard, Fieldset as Fieldset$1, Input as Input$1, ListRootProps, NativeSelectFieldProps, NativeSelect as NativeSelect$1, RadioGroup as RadioGroup$1, SelectRootProps, SelectLabelProps, Select as Select$1, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, RadioCard as RadioCard$1, SeparatorProps, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, SystemContext, TabsRootProps, Tabs as Tabs$1, TableRootProps, Table as Table$1, Tooltip as Tooltip$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
5
- export { Box, BoxProps, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, CenterProps, ClientOnly, Collapsible, CollapsibleRootProps, Container, ContainerProps, Em, Flex, FlexProps, For, FormatByte, FormatNumber, Grid, GridItem, GridItemProps, GridProps, HStack, Image, ImageProps, Kbd, LocaleProvider, Portal, PortalProps, Show, SimpleGrid, SimpleGridProps, Spacer, SpacerProps, Span, Stack, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnGroup, TableColumnHeader, TableColumnHeaderProps, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
5
+ export { AspectRatio, Box, BoxProps, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, CenterProps, ClientOnly, Collapsible, CollapsibleRootProps, Container, ContainerProps, Em, Flex, FlexProps, For, FormatByte, FormatNumber, Grid, GridItem, GridItemProps, GridProps, HStack, Icon, Image, ImageProps, Kbd, LocaleProvider, Portal, PortalProps, Show, SimpleGrid, SimpleGridProps, Spacer, SpacerProps, Span, Stack, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnGroup, TableColumnHeader, TableColumnHeaderProps, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useRecipe, useSlotRecipe, useToken } from '@chakra-ui/react';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { IconComponent } from '@vygruppen/spor-icon-react';
8
8
  import { ThemeProviderProps } from 'next-themes';
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as React$1 from 'react';
2
2
  import React__default, { ReactNode, PropsWithChildren, ComponentProps } from 'react';
3
3
  import * as _chakra_ui_react from '@chakra-ui/react';
4
4
  import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, RecipeVariantProps, ButtonProps as ButtonProps$1, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCardRootProps, CheckboxCard, Fieldset as Fieldset$1, Input as Input$1, ListRootProps, NativeSelectFieldProps, NativeSelect as NativeSelect$1, RadioGroup as RadioGroup$1, SelectRootProps, SelectLabelProps, Select as Select$1, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, RadioCard as RadioCard$1, SeparatorProps, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, SystemContext, TabsRootProps, Tabs as Tabs$1, TableRootProps, Table as Table$1, Tooltip as Tooltip$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
5
- export { Box, BoxProps, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, CenterProps, ClientOnly, Collapsible, CollapsibleRootProps, Container, ContainerProps, Em, Flex, FlexProps, For, FormatByte, FormatNumber, Grid, GridItem, GridItemProps, GridProps, HStack, Image, ImageProps, Kbd, LocaleProvider, Portal, PortalProps, Show, SimpleGrid, SimpleGridProps, Spacer, SpacerProps, Span, Stack, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnGroup, TableColumnHeader, TableColumnHeaderProps, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
5
+ export { AspectRatio, Box, BoxProps, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, CenterProps, ClientOnly, Collapsible, CollapsibleRootProps, Container, ContainerProps, Em, Flex, FlexProps, For, FormatByte, FormatNumber, Grid, GridItem, GridItemProps, GridProps, HStack, Icon, Image, ImageProps, Kbd, LocaleProvider, Portal, PortalProps, Show, SimpleGrid, SimpleGridProps, Spacer, SpacerProps, Span, Stack, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnGroup, TableColumnHeader, TableColumnHeaderProps, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useRecipe, useSlotRecipe, useToken } from '@chakra-ui/react';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { IconComponent } from '@vygruppen/spor-icon-react';
8
8
  import { ThemeProviderProps } from 'next-themes';
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
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, ClientOnly as ClientOnly$1, Field, defineStyle, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, Drawer as Drawer$1, Grid, GridItem, usePopoverContext, Checkbox as Checkbox$1, CheckboxCard, Fieldset as Fieldset$1, InputElement, Input as Input$1, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, RadioCard as RadioCard$1, Separator as Separator$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, CheckboxGroup as CheckboxGroup$1, ListItem, ChakraProvider, Toaster as Toaster$1, Toast, Icon } from '@chakra-ui/react';
2
- export { Box, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, ClientOnly, Collapsible, Container, Em, Flex, For, FormatByte, FormatNumber, Grid, GridItem, HStack, Image, Kbd, LocaleProvider, Portal, Show, SimpleGrid, Spacer, Span, Stack, TableBody, TableCaption, TableCell, TableColumn, TableColumnGroup, TableColumnHeader, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
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, 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 { 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, LinkOutOutline18Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, DropdownLeftFill18Icon, SuccessFill18Icon } from '@vygruppen/spor-icon-react';
4
4
  import * as React27 from 'react';
5
5
  import React27__default, { forwardRef, createContext, useId, cloneElement, useEffect, useRef, isValidElement, useState, useMemo, useLayoutEffect, useContext } from 'react';
@@ -962,11 +962,11 @@ var useScrollDirection = () => {
962
962
  var AlertIcon = forwardRef(
963
963
  ({ variant, customIcon }, ref) => {
964
964
  const { t } = useTranslation();
965
- const Icon2 = customIcon ?? getIcon(variant);
965
+ const Icon3 = customIcon ?? getIcon(variant);
966
966
  return /* @__PURE__ */ jsx(
967
967
  Box,
968
968
  {
969
- as: Icon2,
969
+ as: Icon3,
970
970
  ref,
971
971
  "aria-label": t(texts5[variant]),
972
972
  color: customIcon ? `alert.${variant}.icon` : void 0
@@ -1377,6 +1377,7 @@ var Field3 = React27.forwardRef(
1377
1377
  readOnly,
1378
1378
  required,
1379
1379
  direction,
1380
+ id,
1380
1381
  ...rest
1381
1382
  } = props;
1382
1383
  const recipe = useSlotRecipe({ key: "field" });
@@ -1391,6 +1392,7 @@ var Field3 = React27.forwardRef(
1391
1392
  required,
1392
1393
  css: styles.root,
1393
1394
  direction,
1395
+ id,
1394
1396
  children: [
1395
1397
  label && !floatingLabel && /* @__PURE__ */ jsxs(Label, { children: [
1396
1398
  label,
@@ -2813,6 +2815,7 @@ var Input = forwardRef(
2813
2815
  helperText,
2814
2816
  required,
2815
2817
  errorText,
2818
+ id: props.id,
2816
2819
  label: (
2817
2820
  // Render startElement invisibly to align label text with input content when an icon is present
2818
2821
  /* @__PURE__ */ jsxs(Flex, { children: [
@@ -2975,6 +2978,7 @@ var NativeSelect = React27.forwardRef(function NativeSelect2(props, ref) {
2975
2978
  required,
2976
2979
  helperText,
2977
2980
  errorText,
2981
+ id: rest.id,
2978
2982
  floatingLabel: true,
2979
2983
  children: /* @__PURE__ */ jsxs(
2980
2984
  NativeSelect$1.Root,
@@ -3029,7 +3033,7 @@ var NumericStepper = React27__default.forwardRef((props, ref) => {
3029
3033
  var _a5;
3030
3034
  (_a5 = addButtonRef.current) == null ? void 0 : _a5.focus();
3031
3035
  };
3032
- return /* @__PURE__ */ jsxs(Field3, { css: styles.root, width: "auto", ...rest, ref, children: [
3036
+ return /* @__PURE__ */ jsxs(Field3, { css: styles.root, width: "auto", ...rest, id: idProp, ref, children: [
3033
3037
  /* @__PURE__ */ jsx(
3034
3038
  VerySmallButton,
3035
3039
  {
@@ -3491,6 +3495,7 @@ var Select = React27.forwardRef(
3491
3495
  invalid,
3492
3496
  helperText,
3493
3497
  required: props.required,
3498
+ id: rest.id,
3494
3499
  children: /* @__PURE__ */ jsxs(
3495
3500
  Select$1.Root,
3496
3501
  {
@@ -3616,6 +3621,7 @@ var Switch = forwardRef(
3616
3621
  errorText,
3617
3622
  helperText,
3618
3623
  required: props.required,
3624
+ id: rest.id,
3619
3625
  children: /* @__PURE__ */ jsxs(
3620
3626
  Switch$1.Root,
3621
3627
  {
@@ -3823,14 +3829,14 @@ var LineIcon = forwardRef(
3823
3829
  const borderContainer = () => {
3824
3830
  return variant === "walk" && target === "travelTag" ? 0 : 0.5;
3825
3831
  };
3826
- const Icon2 = getCorrectIcon({
3832
+ const Icon3 = getCorrectIcon({
3827
3833
  variant: variant === "custom" && "customIconVariant" in rest ? rest.customIconVariant : (
3828
3834
  // eslint-disable-next-line unicorn/no-nested-ternary
3829
3835
  variant === "custom" ? "local-train" : variant
3830
3836
  ),
3831
3837
  size
3832
3838
  });
3833
- if (!Icon2) {
3839
+ if (!Icon3) {
3834
3840
  return null;
3835
3841
  }
3836
3842
  if (foregroundColor) {
@@ -3845,7 +3851,7 @@ var LineIcon = forwardRef(
3845
3851
  borderColor: variant === "walk" ? "core.outline" : "transparent",
3846
3852
  "aria-label": label,
3847
3853
  ref,
3848
- children: /* @__PURE__ */ jsx(Icon2, { css: styles.icon })
3854
+ children: /* @__PURE__ */ jsx(Icon3, { css: styles.icon })
3849
3855
  }
3850
3856
  );
3851
3857
  }