@vygruppen/spor-react 12.24.0 → 12.24.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.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  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
- 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, RadioCard as RadioCard$1, SeparatorProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, ComboboxRootProps, Combobox as Combobox$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, 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, TableColumnHeaderProps as TableColumnHeaderProps$1, TableRowProps as TableRowProps$1, TableBodyProps as TableBodyProps$1, Tooltip as Tooltip$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } 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, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnGroup, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, UseDisclosureProps, 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';
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, RadioCard as RadioCard$1, SeparatorProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, ComboboxRootProps, Combobox as Combobox$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, 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, TableColumnHeaderProps as TableColumnHeaderProps$1, TableBodyProps as TableBodyProps$1, Tooltip as Tooltip$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } 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, SystemConfig, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnGroup, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, Wrap, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineSlotRecipe, defineStyle, mergeConfigs, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useRecipe, useSlotRecipe, useToken } from '@chakra-ui/react';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { IconComponent } from '@vygruppen/spor-icon-react';
8
8
  import { CalendarDate, DateDuration, DateValue as DateValue$1 } from '@internationalized/date';
@@ -1222,13 +1222,13 @@ declare const attachedInputsRecipe: _chakra_ui_react.RecipeDefinition<{
1222
1222
  horizontal: {
1223
1223
  flexDirection: "row";
1224
1224
  "& > *:first-of-type:not(:last-of-type) [data-attachable]": {
1225
- borderEndRadius: number;
1225
+ borderEndRadius: "0 !important";
1226
1226
  };
1227
1227
  "& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
1228
- borderRadius: number;
1228
+ borderRadius: "0 !important";
1229
1229
  };
1230
1230
  "& > *:not(:first-of-type):last-of-type [data-attachable]": {
1231
- borderStartRadius: number;
1231
+ borderStartRadius: "0 !important";
1232
1232
  };
1233
1233
  "&[data-with-flip-button]": {
1234
1234
  "& > *:nth-of-type(2) [data-scope='field'][data-part='root']": {
@@ -1244,13 +1244,13 @@ declare const attachedInputsRecipe: _chakra_ui_react.RecipeDefinition<{
1244
1244
  vertical: {
1245
1245
  flexDirection: "column";
1246
1246
  "& > *:first-of-type:not(:last-of-type) [data-attachable]": {
1247
- borderBottomRadius: number;
1247
+ borderBottomRadius: "0 !important";
1248
1248
  };
1249
1249
  "& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
1250
- borderRadius: number;
1250
+ borderRadius: "0 !important";
1251
1251
  };
1252
1252
  "& > *:not(:first-of-type):last-of-type [data-attachable]": {
1253
- borderTopRadius: number;
1253
+ borderTopRadius: "0 !important";
1254
1254
  };
1255
1255
  };
1256
1256
  };
@@ -3579,7 +3579,6 @@ declare const tableSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "b
3579
3579
 
3580
3580
  type SortDirection = "asc" | "desc";
3581
3581
  type SortState = {
3582
- key: string | null;
3583
3582
  direction: SortDirection;
3584
3583
  columnIndex: number | null;
3585
3584
  };
@@ -3588,7 +3587,7 @@ type TableVariantProps = RecipeVariantProps<typeof tableSlotRecipe>;
3588
3587
  declare const useTableSort: () => {
3589
3588
  enabled: boolean;
3590
3589
  sortState: SortState;
3591
- onSort: (key: string, columnIndex: number) => void;
3590
+ onSort: (columnIndex: number) => void;
3592
3591
  };
3593
3592
  type TableProps = Exclude<TableRootProps, "variant" | "colorPalette"> & PropsWithChildren<TableVariantProps> & {
3594
3593
  variant?: "ghost" | "core";
@@ -3624,8 +3623,6 @@ declare const Table: React$1.ForwardRefExoticComponent<Table$1.RootProps & {
3624
3623
  } & React$1.RefAttributes<HTMLTableElement>>;
3625
3624
  type TableColumnHeaderProps = TableColumnHeaderProps$1;
3626
3625
  declare const TableColumnHeader: React$1.ForwardRefExoticComponent<Table$1.ColumnHeaderProps & React$1.RefAttributes<HTMLTableCellElement>>;
3627
- type TableRowProps = TableRowProps$1;
3628
- declare const TableRow: React$1.ForwardRefExoticComponent<Table$1.RowProps & React$1.RefAttributes<HTMLTableRowElement>>;
3629
3626
  type TableBodyProps = TableBodyProps$1;
3630
3627
  declare const TableBody: React$1.ForwardRefExoticComponent<Table$1.BodyProps & React$1.RefAttributes<HTMLTableSectionElement>>;
3631
3628
 
@@ -3743,4 +3740,4 @@ declare const Text: React$1.ForwardRefExoticComponent<Omit<TextProps$1, "textSty
3743
3740
  **/
3744
3741
  declare function slugify(text: string | string[], maxLength?: number): string;
3745
3742
 
3746
- export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, type BadgeProps, Brand, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, Calendar, CalendarCell, CalendarGrid, CalendarHeader, type CalendarMode, CalendarProvider, type CalendarValue, CardSelect, CardSelectContent, CardSelectTrigger, type CardSelectTriggerProps, CargonetLogo, type CargonetLogoProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, ChoiceChip, type ChoiceChipProps, Clipboard, ClipboardButton, CloseButton, type CloseButtonProps, CloseDrawerLine, Code, ColorInlineLoader, type ColorInlineLoaderProps, type ColorMode, ColorModeButton, ColorModeIcon, ColorModeProvider, type ColorModeProviderProps, ColorSpinner, type ColorSpinnerProps, Combobox, type ComboboxProps, ContentLoader, type ContentLoaderProps, type CountryCodeAndPhoneNumber, DarkFullScreenLoader, DarkInlineLoader, type DarkInlineLoaderProps, DarkSpinner, type DarkSpinnerProps, DatePicker, type DatePickerVariantProps, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field, type FieldBaseProps, FieldErrorText, FieldLabel, type FieldProps, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, type GroupVariantProps, Heading, type HeadingProps, IconButton, type IconButtonProps, InfoTag, type InfoTagProps, Input, type InputProps, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, type LightInlineLoaderProps, LightSpinner, type LightSpinnerProps, LineIcon, type LineIconProps, type LinkProps, List, ListBox, ListIndicator, ListItem, type MediaControllerVariantProps, NativeSelect, type NativeSelectdProps, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, type NudgeProps, NudgeTrigger, NudgeWizardStep, NumericStepper, type NumericStepperProps, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, type PasswordInputProps, type PasswordVisibilityProps, PhoneNumberInput, PlayPauseButton, Popover, PopoverContent, type PopoverProps, PopoverTrigger, PressableCard, ProgressBar, type ProgressBarProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorVariantProps, ProgressLoader, type ProgressLoaderProps, type ProgressLoaderVariantProps, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, type RadioProps, RangeCalendar, ScrollCalendar, SearchInput, type SearchInputProps, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, type SelectProps, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, SkipButton, type SpinnerProps, SporProvider, StaticCard, type StaticCardProps, Stepper, StepperStep, type StepperVariantProps, SvgBox, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableColumnHeader, type TableColumnHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useTableSort, useTranslation };
3743
+ export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, type BadgeProps, Brand, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, Calendar, CalendarCell, CalendarGrid, CalendarHeader, type CalendarMode, CalendarProvider, type CalendarValue, CardSelect, CardSelectContent, CardSelectTrigger, type CardSelectTriggerProps, CargonetLogo, type CargonetLogoProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, ChoiceChip, type ChoiceChipProps, Clipboard, ClipboardButton, CloseButton, type CloseButtonProps, CloseDrawerLine, Code, ColorInlineLoader, type ColorInlineLoaderProps, type ColorMode, ColorModeButton, ColorModeIcon, ColorModeProvider, type ColorModeProviderProps, ColorSpinner, type ColorSpinnerProps, Combobox, type ComboboxProps, ContentLoader, type ContentLoaderProps, type CountryCodeAndPhoneNumber, DarkFullScreenLoader, DarkInlineLoader, type DarkInlineLoaderProps, DarkSpinner, type DarkSpinnerProps, DatePicker, type DatePickerVariantProps, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field, type FieldBaseProps, FieldErrorText, FieldLabel, type FieldProps, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, type GroupVariantProps, Heading, type HeadingProps, IconButton, type IconButtonProps, InfoTag, type InfoTagProps, Input, type InputProps, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, type LightInlineLoaderProps, LightSpinner, type LightSpinnerProps, LineIcon, type LineIconProps, type LinkProps, List, ListBox, ListIndicator, ListItem, type MediaControllerVariantProps, NativeSelect, type NativeSelectdProps, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, type NudgeProps, NudgeTrigger, NudgeWizardStep, NumericStepper, type NumericStepperProps, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, type PasswordInputProps, type PasswordVisibilityProps, PhoneNumberInput, PlayPauseButton, Popover, PopoverContent, type PopoverProps, PopoverTrigger, PressableCard, ProgressBar, type ProgressBarProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorVariantProps, ProgressLoader, type ProgressLoaderProps, type ProgressLoaderVariantProps, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, type RadioProps, RangeCalendar, ScrollCalendar, SearchInput, type SearchInputProps, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, type SelectProps, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, SkipButton, type SpinnerProps, SporProvider, StaticCard, type StaticCardProps, Stepper, StepperStep, type StepperVariantProps, SvgBox, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableColumnHeader, type TableColumnHeaderProps, type TableProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useTableSort, useTranslation };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  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
- 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, RadioCard as RadioCard$1, SeparatorProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, ComboboxRootProps, Combobox as Combobox$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, 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, TableColumnHeaderProps as TableColumnHeaderProps$1, TableRowProps as TableRowProps$1, TableBodyProps as TableBodyProps$1, Tooltip as Tooltip$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } 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, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnGroup, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, UseDisclosureProps, 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';
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, RadioCard as RadioCard$1, SeparatorProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, ComboboxRootProps, Combobox as Combobox$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, 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, TableColumnHeaderProps as TableColumnHeaderProps$1, TableBodyProps as TableBodyProps$1, Tooltip as Tooltip$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } 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, SystemConfig, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnGroup, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, Wrap, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineSlotRecipe, defineStyle, mergeConfigs, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useRecipe, useSlotRecipe, useToken } from '@chakra-ui/react';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { IconComponent } from '@vygruppen/spor-icon-react';
8
8
  import { CalendarDate, DateDuration, DateValue as DateValue$1 } from '@internationalized/date';
@@ -1222,13 +1222,13 @@ declare const attachedInputsRecipe: _chakra_ui_react.RecipeDefinition<{
1222
1222
  horizontal: {
1223
1223
  flexDirection: "row";
1224
1224
  "& > *:first-of-type:not(:last-of-type) [data-attachable]": {
1225
- borderEndRadius: number;
1225
+ borderEndRadius: "0 !important";
1226
1226
  };
1227
1227
  "& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
1228
- borderRadius: number;
1228
+ borderRadius: "0 !important";
1229
1229
  };
1230
1230
  "& > *:not(:first-of-type):last-of-type [data-attachable]": {
1231
- borderStartRadius: number;
1231
+ borderStartRadius: "0 !important";
1232
1232
  };
1233
1233
  "&[data-with-flip-button]": {
1234
1234
  "& > *:nth-of-type(2) [data-scope='field'][data-part='root']": {
@@ -1244,13 +1244,13 @@ declare const attachedInputsRecipe: _chakra_ui_react.RecipeDefinition<{
1244
1244
  vertical: {
1245
1245
  flexDirection: "column";
1246
1246
  "& > *:first-of-type:not(:last-of-type) [data-attachable]": {
1247
- borderBottomRadius: number;
1247
+ borderBottomRadius: "0 !important";
1248
1248
  };
1249
1249
  "& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
1250
- borderRadius: number;
1250
+ borderRadius: "0 !important";
1251
1251
  };
1252
1252
  "& > *:not(:first-of-type):last-of-type [data-attachable]": {
1253
- borderTopRadius: number;
1253
+ borderTopRadius: "0 !important";
1254
1254
  };
1255
1255
  };
1256
1256
  };
@@ -3579,7 +3579,6 @@ declare const tableSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "b
3579
3579
 
3580
3580
  type SortDirection = "asc" | "desc";
3581
3581
  type SortState = {
3582
- key: string | null;
3583
3582
  direction: SortDirection;
3584
3583
  columnIndex: number | null;
3585
3584
  };
@@ -3588,7 +3587,7 @@ type TableVariantProps = RecipeVariantProps<typeof tableSlotRecipe>;
3588
3587
  declare const useTableSort: () => {
3589
3588
  enabled: boolean;
3590
3589
  sortState: SortState;
3591
- onSort: (key: string, columnIndex: number) => void;
3590
+ onSort: (columnIndex: number) => void;
3592
3591
  };
3593
3592
  type TableProps = Exclude<TableRootProps, "variant" | "colorPalette"> & PropsWithChildren<TableVariantProps> & {
3594
3593
  variant?: "ghost" | "core";
@@ -3624,8 +3623,6 @@ declare const Table: React$1.ForwardRefExoticComponent<Table$1.RootProps & {
3624
3623
  } & React$1.RefAttributes<HTMLTableElement>>;
3625
3624
  type TableColumnHeaderProps = TableColumnHeaderProps$1;
3626
3625
  declare const TableColumnHeader: React$1.ForwardRefExoticComponent<Table$1.ColumnHeaderProps & React$1.RefAttributes<HTMLTableCellElement>>;
3627
- type TableRowProps = TableRowProps$1;
3628
- declare const TableRow: React$1.ForwardRefExoticComponent<Table$1.RowProps & React$1.RefAttributes<HTMLTableRowElement>>;
3629
3626
  type TableBodyProps = TableBodyProps$1;
3630
3627
  declare const TableBody: React$1.ForwardRefExoticComponent<Table$1.BodyProps & React$1.RefAttributes<HTMLTableSectionElement>>;
3631
3628
 
@@ -3743,4 +3740,4 @@ declare const Text: React$1.ForwardRefExoticComponent<Omit<TextProps$1, "textSty
3743
3740
  **/
3744
3741
  declare function slugify(text: string | string[], maxLength?: number): string;
3745
3742
 
3746
- export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, type BadgeProps, Brand, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, Calendar, CalendarCell, CalendarGrid, CalendarHeader, type CalendarMode, CalendarProvider, type CalendarValue, CardSelect, CardSelectContent, CardSelectTrigger, type CardSelectTriggerProps, CargonetLogo, type CargonetLogoProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, ChoiceChip, type ChoiceChipProps, Clipboard, ClipboardButton, CloseButton, type CloseButtonProps, CloseDrawerLine, Code, ColorInlineLoader, type ColorInlineLoaderProps, type ColorMode, ColorModeButton, ColorModeIcon, ColorModeProvider, type ColorModeProviderProps, ColorSpinner, type ColorSpinnerProps, Combobox, type ComboboxProps, ContentLoader, type ContentLoaderProps, type CountryCodeAndPhoneNumber, DarkFullScreenLoader, DarkInlineLoader, type DarkInlineLoaderProps, DarkSpinner, type DarkSpinnerProps, DatePicker, type DatePickerVariantProps, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field, type FieldBaseProps, FieldErrorText, FieldLabel, type FieldProps, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, type GroupVariantProps, Heading, type HeadingProps, IconButton, type IconButtonProps, InfoTag, type InfoTagProps, Input, type InputProps, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, type LightInlineLoaderProps, LightSpinner, type LightSpinnerProps, LineIcon, type LineIconProps, type LinkProps, List, ListBox, ListIndicator, ListItem, type MediaControllerVariantProps, NativeSelect, type NativeSelectdProps, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, type NudgeProps, NudgeTrigger, NudgeWizardStep, NumericStepper, type NumericStepperProps, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, type PasswordInputProps, type PasswordVisibilityProps, PhoneNumberInput, PlayPauseButton, Popover, PopoverContent, type PopoverProps, PopoverTrigger, PressableCard, ProgressBar, type ProgressBarProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorVariantProps, ProgressLoader, type ProgressLoaderProps, type ProgressLoaderVariantProps, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, type RadioProps, RangeCalendar, ScrollCalendar, SearchInput, type SearchInputProps, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, type SelectProps, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, SkipButton, type SpinnerProps, SporProvider, StaticCard, type StaticCardProps, Stepper, StepperStep, type StepperVariantProps, SvgBox, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableColumnHeader, type TableColumnHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useTableSort, useTranslation };
3743
+ export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, type BadgeProps, Brand, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, Calendar, CalendarCell, CalendarGrid, CalendarHeader, type CalendarMode, CalendarProvider, type CalendarValue, CardSelect, CardSelectContent, CardSelectTrigger, type CardSelectTriggerProps, CargonetLogo, type CargonetLogoProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, ChoiceChip, type ChoiceChipProps, Clipboard, ClipboardButton, CloseButton, type CloseButtonProps, CloseDrawerLine, Code, ColorInlineLoader, type ColorInlineLoaderProps, type ColorMode, ColorModeButton, ColorModeIcon, ColorModeProvider, type ColorModeProviderProps, ColorSpinner, type ColorSpinnerProps, Combobox, type ComboboxProps, ContentLoader, type ContentLoaderProps, type CountryCodeAndPhoneNumber, DarkFullScreenLoader, DarkInlineLoader, type DarkInlineLoaderProps, DarkSpinner, type DarkSpinnerProps, DatePicker, type DatePickerVariantProps, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field, type FieldBaseProps, FieldErrorText, FieldLabel, type FieldProps, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, type GroupVariantProps, Heading, type HeadingProps, IconButton, type IconButtonProps, InfoTag, type InfoTagProps, Input, type InputProps, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, type LightInlineLoaderProps, LightSpinner, type LightSpinnerProps, LineIcon, type LineIconProps, type LinkProps, List, ListBox, ListIndicator, ListItem, type MediaControllerVariantProps, NativeSelect, type NativeSelectdProps, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, type NudgeProps, NudgeTrigger, NudgeWizardStep, NumericStepper, type NumericStepperProps, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, type PasswordInputProps, type PasswordVisibilityProps, PhoneNumberInput, PlayPauseButton, Popover, PopoverContent, type PopoverProps, PopoverTrigger, PressableCard, ProgressBar, type ProgressBarProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorVariantProps, ProgressLoader, type ProgressLoaderProps, type ProgressLoaderVariantProps, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, type RadioProps, RangeCalendar, ScrollCalendar, SearchInput, type SearchInputProps, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, type SelectProps, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, SkipButton, type SpinnerProps, SporProvider, StaticCard, type StaticCardProps, Stepper, StepperStep, type StepperVariantProps, SvgBox, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableColumnHeader, type TableColumnHeaderProps, type TableProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useTableSort, useTranslation };
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
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, 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
- export { AspectRatio, Box, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, ClientOnly, Collapsible, Container, Em, Flex, For, FormatByte, FormatNumber, Grid, GridItem, HStack, Icon, Image, Kbd, LocaleProvider, Portal, Show, SimpleGrid, Spacer, Span, Stack, TableCaption, TableCell, TableColumn, TableColumnGroup, TableFooter, TableHeader, TableRoot, 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';
2
+ export { AspectRatio, Box, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, ClientOnly, Collapsible, Container, Em, Flex, For, FormatByte, FormatNumber, Grid, GridItem, HStack, Icon, Image, Kbd, LocaleProvider, Portal, Show, SimpleGrid, Spacer, Span, Stack, TableCaption, TableCell, TableColumn, TableColumnGroup, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, Wrap, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineSlotRecipe, defineStyle, mergeConfigs, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useRecipe, useSlotRecipe, useToken } from '@chakra-ui/react';
3
3
  import * as spor_icon_react_star from '@vygruppen/spor-icon-react';
4
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, ArrowUpFill18Icon, ArrowDownFill18Icon, ChangeDirectionFill18Icon, 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';
5
5
  import * as React20 from 'react';
6
- import React20__default, { forwardRef, createContext, useId, cloneElement, useRef, useImperativeHandle, useMemo, isValidElement, useState, useEffect, useContext, Children, useLayoutEffect } from 'react';
6
+ import React20__default, { forwardRef, createContext, useId, cloneElement, useRef, useImperativeHandle, useMemo, isValidElement, useState, useEffect, useContext, useLayoutEffect } from 'react';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import { spinnerColorData, inlineLoaderColorData, contentLoaderData, fullScreenLoaderWhiteData, inlineLoaderDarkData, spinnerLightData, spinnerDarkData, fullScreenLoaderBlackData, inlineLoaderLightData } from '@vygruppen/spor-loader';
9
9
  import ReactLottie from 'lottie-react';
@@ -1971,13 +1971,14 @@ var Field3 = React20.forwardRef(
1971
1971
  direction,
1972
1972
  id,
1973
1973
  children: [
1974
- label && !floatingLabel && /* @__PURE__ */ jsx(Label, { asChild: labelAsChild, children: renderLabelWithIndicator(label, labelAsChild) }),
1974
+ label && !floatingLabel && /* @__PURE__ */ jsx(Label, { asChild: labelAsChild, "aria-hidden": true, children: renderLabelWithIndicator(label, labelAsChild) }),
1975
1975
  children,
1976
1976
  label && floatingLabel && /* @__PURE__ */ jsx(
1977
1977
  FloatingLabel,
1978
1978
  {
1979
1979
  "data-float": shouldFloat ? true : void 0,
1980
1980
  asChild: labelAsChild,
1981
+ "aria-hidden": true,
1981
1982
  children: renderLabelWithIndicator(label, labelAsChild)
1982
1983
  }
1983
1984
  ),
@@ -4674,7 +4675,7 @@ var Textarea = forwardRef(
4674
4675
  floatingLabel,
4675
4676
  shouldFloat,
4676
4677
  position: "relative",
4677
- label: /* @__PURE__ */ jsx(Box, { id: labelId, "aria-hidden": true, children: /* @__PURE__ */ jsx("label", { ref: labelRef, children: label }) }),
4678
+ label: /* @__PURE__ */ jsx(Box, { id: labelId, children: /* @__PURE__ */ jsx("label", { ref: labelRef, children: label }) }),
4678
4679
  id: restProps.id,
4679
4680
  children: /* @__PURE__ */ jsx(
4680
4681
  Textarea$1,
@@ -6261,38 +6262,49 @@ var TabsList = Tabs$1.List;
6261
6262
  var TabsTrigger = Tabs$1.Trigger;
6262
6263
  var TabsIndicator = Tabs$1.Indicator;
6263
6264
  var TabsContent = Tabs$1.Content;
6264
- var getNextSortState = (current, key, columnIndex) => {
6265
- if (current.key !== key)
6266
- return { key, columnIndex, direction: "asc" };
6265
+
6266
+ // src/table/sort-utils.ts
6267
+ var getNextSortState = (current, columnIndex) => {
6268
+ if (current.columnIndex !== columnIndex)
6269
+ return { columnIndex, direction: "asc" };
6267
6270
  if (current.direction === "asc")
6268
- return { key, columnIndex, direction: "desc" };
6269
- return { key: null, direction: "asc", columnIndex: null };
6271
+ return { columnIndex, direction: "desc" };
6272
+ return { direction: "asc", columnIndex: null };
6270
6273
  };
6271
- var getSortKey = (children) => typeof children === "string" ? children.trim() : null;
6272
6274
  var getColumnIndex = (element) => {
6273
6275
  var _a5;
6274
6276
  return Array.prototype.indexOf.call((_a5 = element.parentElement) == null ? void 0 : _a5.children, element);
6275
6277
  };
6276
- var getCellText = (row, columnIndex) => {
6277
- const cell = Children.toArray(
6278
- row.props.children
6279
- )[columnIndex];
6280
- if (!isValidElement(cell))
6278
+ var getCellSortText = (row, columnIndex) => {
6279
+ var _a5;
6280
+ const cell = row.cells[columnIndex];
6281
+ if (!cell)
6281
6282
  return "";
6282
- const props = cell.props;
6283
- return typeof props["data-sort"] === "string" && props["data-sort"] || typeof props.children === "string" && props.children.trim() || "";
6283
+ return cell.dataset.sort || ((_a5 = cell.textContent) == null ? void 0 : _a5.trim()) || "";
6284
6284
  };
6285
- var sortRows = (children, columnIndex, direction) => Children.toArray(children).toSorted((a, b) => {
6286
- if (!isValidElement(a) || !isValidElement(b))
6287
- return 0;
6288
- const cmp = getCellText(a, columnIndex).localeCompare(
6289
- getCellText(b, columnIndex)
6290
- );
6291
- return direction === "asc" ? cmp : -cmp;
6292
- });
6285
+ var applyDomSort = (tbody, sortState, originalRows) => {
6286
+ if (sortState.columnIndex == null) {
6287
+ for (const row of originalRows)
6288
+ tbody.append(row);
6289
+ } else {
6290
+ const rows = Array.from(tbody.rows);
6291
+ rows.sort((a, b) => {
6292
+ const cmp = getCellSortText(a, sortState.columnIndex).localeCompare(
6293
+ getCellSortText(b, sortState.columnIndex)
6294
+ );
6295
+ return sortState.direction === "asc" ? cmp : -cmp;
6296
+ });
6297
+ for (const row of rows)
6298
+ tbody.append(row);
6299
+ }
6300
+ };
6301
+ var captureRowOrder = (tbody) => (
6302
+ // eslint-disable-next-line unicorn/prefer-spread -- HTMLCollectionOf is not spreadable
6303
+ Array.from(tbody.rows)
6304
+ );
6293
6305
  var SortContext = createContext({
6294
6306
  enabled: false,
6295
- sortState: { key: null, direction: "asc", columnIndex: null },
6307
+ sortState: { direction: "asc", columnIndex: null },
6296
6308
  onSort: () => {
6297
6309
  }
6298
6310
  });
@@ -6307,14 +6319,13 @@ var Table = forwardRef(
6307
6319
  ...rest
6308
6320
  }, ref) => {
6309
6321
  const [sortState, setSortState] = useState({
6310
- key: null,
6311
6322
  direction: "asc",
6312
6323
  columnIndex: null
6313
6324
  });
6314
- const handleSort = (key, columnIndex) => {
6325
+ const handleSort = (columnIndex) => {
6315
6326
  if (!sortable)
6316
6327
  return;
6317
- setSortState(getNextSortState(sortState, key, columnIndex));
6328
+ setSortState(getNextSortState(sortState, columnIndex));
6318
6329
  };
6319
6330
  const recipe = useSlotRecipe({ key: "table" });
6320
6331
  const styles = recipe({ variant, size });
@@ -6341,47 +6352,75 @@ var Table = forwardRef(
6341
6352
  Table.displayName = "Table";
6342
6353
  var TableColumnHeader = forwardRef(({ children, ...rest }, ref) => {
6343
6354
  const { enabled, sortState, onSort } = useTableSort();
6344
- const key = getSortKey(children);
6355
+ const [columnIndex, setColumnIndex] = useState(null);
6345
6356
  const props = rest;
6346
- const columnSortable = enabled && key != null && !("data-nosort" in props);
6347
- const isActive = columnSortable && key === sortState.key;
6348
- return /* @__PURE__ */ jsx(Table$1.ColumnHeader, { ref, ...rest, children: /* @__PURE__ */ jsxs(HStack, { children: [
6349
- children,
6350
- columnSortable && /* @__PURE__ */ jsx(
6351
- Button$1,
6352
- {
6353
- variant: "ghost",
6354
- onClick: (event) => {
6355
- const th = event.currentTarget.closest("th");
6356
- if (th)
6357
- onSort(key, getColumnIndex(th));
6358
- },
6359
- p: "0px !important",
6360
- size: "xs",
6361
- children: isActive ? sortState.direction === "asc" ? /* @__PURE__ */ jsx(ArrowUpFill18Icon, { color: "outline.focus" }) : /* @__PURE__ */ jsx(ArrowDownFill18Icon, { color: "outline.focus" }) : /* @__PURE__ */ jsx(
6362
- ChangeDirectionFill18Icon,
6357
+ const columnSortable = enabled && !("data-nosort" in props);
6358
+ const isActive = columnSortable && columnIndex != null && columnIndex === sortState.columnIndex;
6359
+ return /* @__PURE__ */ jsx(
6360
+ Table$1.ColumnHeader,
6361
+ {
6362
+ ref: (element) => {
6363
+ if (element)
6364
+ setColumnIndex(getColumnIndex(element));
6365
+ if (typeof ref === "function")
6366
+ ref(element);
6367
+ else if (ref)
6368
+ ref.current = element;
6369
+ },
6370
+ ...rest,
6371
+ children: /* @__PURE__ */ jsxs(HStack, { children: [
6372
+ children,
6373
+ columnSortable && columnIndex != null && /* @__PURE__ */ jsx(
6374
+ Button$1,
6363
6375
  {
6364
- transform: "rotate(90deg)",
6365
- color: "icon.disabled"
6376
+ variant: "ghost",
6377
+ onClick: () => onSort(columnIndex),
6378
+ p: "0px !important",
6379
+ size: "xs",
6380
+ children: isActive ? sortState.direction === "asc" ? /* @__PURE__ */ jsx(ArrowUpFill18Icon, { color: "outline.focus" }) : /* @__PURE__ */ jsx(ArrowDownFill18Icon, { color: "outline.focus" }) : /* @__PURE__ */ jsx(
6381
+ ChangeDirectionFill18Icon,
6382
+ {
6383
+ transform: "rotate(90deg)",
6384
+ color: "icon.disabled"
6385
+ }
6386
+ )
6366
6387
  }
6367
6388
  )
6368
- }
6369
- )
6370
- ] }) });
6389
+ ] })
6390
+ }
6391
+ );
6371
6392
  });
6372
6393
  TableColumnHeader.displayName = "ColumnHeader";
6373
- var TableRow = forwardRef(
6374
- (props, ref) => /* @__PURE__ */ jsx(Table$1.Row, { ref, ...props })
6375
- );
6376
- TableRow.displayName = "TableRow";
6377
6394
  var TableBody = forwardRef(
6378
6395
  ({ children, ...rest }, ref) => {
6379
6396
  const { sortState } = useTableSort();
6380
- const sorted = useMemo(
6381
- () => sortState.columnIndex == null ? children : sortRows(children, sortState.columnIndex, sortState.direction),
6382
- [children, sortState]
6397
+ const tbodyRef = useRef(null);
6398
+ const originalOrder = useRef([]);
6399
+ const previousChildren = useRef(children);
6400
+ useLayoutEffect(() => {
6401
+ const tbody = tbodyRef.current;
6402
+ if (!tbody)
6403
+ return;
6404
+ if (previousChildren.current !== children || originalOrder.current.length === 0) {
6405
+ originalOrder.current = captureRowOrder(tbody);
6406
+ previousChildren.current = children;
6407
+ }
6408
+ applyDomSort(tbody, sortState, originalOrder.current);
6409
+ }, [sortState, children]);
6410
+ return /* @__PURE__ */ jsx(
6411
+ Table$1.Body,
6412
+ {
6413
+ ref: (element) => {
6414
+ tbodyRef.current = element;
6415
+ if (typeof ref === "function")
6416
+ ref(element);
6417
+ else if (ref)
6418
+ ref.current = element;
6419
+ },
6420
+ ...rest,
6421
+ children
6422
+ }
6383
6423
  );
6384
- return /* @__PURE__ */ jsx(Table$1.Body, { ref, ...rest, children: sorted });
6385
6424
  }
6386
6425
  );
6387
6426
  TableBody.displayName = "TableBody";
@@ -6391,7 +6430,7 @@ var attachedInputsRecipe = defineRecipe({
6391
6430
  gap: "0.1rem",
6392
6431
  width: "100%",
6393
6432
  "& select": {
6394
- borderEndRadius: 0
6433
+ borderEndRadius: "0 !important"
6395
6434
  },
6396
6435
  "& > *": {
6397
6436
  position: "relative",
@@ -6406,13 +6445,13 @@ var attachedInputsRecipe = defineRecipe({
6406
6445
  horizontal: {
6407
6446
  flexDirection: "row",
6408
6447
  "& > *:first-of-type:not(:last-of-type) [data-attachable]": {
6409
- borderEndRadius: 0
6448
+ borderEndRadius: "0 !important"
6410
6449
  },
6411
6450
  "& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
6412
- borderRadius: 0
6451
+ borderRadius: "0 !important"
6413
6452
  },
6414
6453
  "& > *:not(:first-of-type):last-of-type [data-attachable]": {
6415
- borderStartRadius: 0
6454
+ borderStartRadius: "0 !important"
6416
6455
  },
6417
6456
  "&[data-with-flip-button]": {
6418
6457
  "& > *:nth-of-type(2) [data-scope='field'][data-part='root']": {
@@ -6428,13 +6467,13 @@ var attachedInputsRecipe = defineRecipe({
6428
6467
  vertical: {
6429
6468
  flexDirection: "column",
6430
6469
  "& > *:first-of-type:not(:last-of-type) [data-attachable]": {
6431
- borderBottomRadius: 0
6470
+ borderBottomRadius: "0 !important"
6432
6471
  },
6433
6472
  "& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
6434
- borderRadius: 0
6473
+ borderRadius: "0 !important"
6435
6474
  },
6436
6475
  "& > *:not(:first-of-type):last-of-type [data-attachable]": {
6437
- borderTopRadius: 0
6476
+ borderTopRadius: "0 !important"
6438
6477
  }
6439
6478
  }
6440
6479
  }
@@ -9661,7 +9700,12 @@ var nativeSelectSlotRecipe = defineSlotRecipe({
9661
9700
  root: {
9662
9701
  width: "100%",
9663
9702
  height: "fit-content",
9664
- position: "relative"
9703
+ position: "relative",
9704
+ backgroundColor: "surface",
9705
+ "& option, & optgroup": {
9706
+ color: "text",
9707
+ backgroundColor: "surface"
9708
+ }
9665
9709
  },
9666
9710
  field: {
9667
9711
  ...inputRecipe.base
@@ -11844,6 +11888,6 @@ var TooltipContent = forwardRef(
11844
11888
  );
11845
11889
  TooltipContent.displayName = "TooltipContent";
11846
11890
 
11847
- export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, AttachedInputs, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, Brand, Breadcrumb, Button, ButtonGroup, Calendar, CalendarCell, CalendarGrid, CalendarHeader, CalendarProvider, CardSelect, CardSelectContent, CardSelectTrigger, CargonetLogo, Checkbox, CheckboxGroup, ChoiceChip, Clipboard, ClipboardButton, CloseButton, CloseDrawerLine, Code, ColorInlineLoader, ColorModeButton, ColorModeIcon, ColorModeProvider, ColorSpinner, Combobox2 as Combobox, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkSpinner, DatePicker, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field3 as Field, FieldErrorText, FieldLabel, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, Heading, IconButton, InfoTag, Input, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, List, ListBox, ListIndicator, ListItem2 as ListItem, NativeSelect, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, NudgeTrigger, NudgeWizardStep, NumericStepper, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover2 as Popover, PopoverContent, PopoverTrigger, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, RangeCalendar, ScrollCalendar, SearchInput, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, SkeletonText, SkipButton, SporProvider, StaticCard, Stepper, StepperStep, SvgBox, Switch, Table, TableBody, TableColumnHeader, TableRow, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Text3 as Text, TextLink, Textarea, TimePicker, Tooltip, TooltipContent, TooltipTrigger, TravelTag, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useTableSort, useTranslation };
11891
+ export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, AttachedInputs, Autocomplete, AutocompleteItem, AutocompleteItemGroup, AutocompleteItemGroupLabel, Badge, Brand, Breadcrumb, Button, ButtonGroup, Calendar, CalendarCell, CalendarGrid, CalendarHeader, CalendarProvider, CardSelect, CardSelectContent, CardSelectTrigger, CargonetLogo, Checkbox, CheckboxGroup, ChoiceChip, Clipboard, ClipboardButton, CloseButton, CloseDrawerLine, Code, ColorInlineLoader, ColorModeButton, ColorModeIcon, ColorModeProvider, ColorSpinner, Combobox2 as Combobox, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkSpinner, DatePicker, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Field3 as Field, FieldErrorText, FieldLabel, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, Heading, IconButton, InfoTag, Input, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, List, ListBox, ListIndicator, ListItem2 as ListItem, NativeSelect, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, NudgeTrigger, NudgeWizardStep, NumericStepper, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover2 as Popover, PopoverContent, PopoverTrigger, PressableCard, ProgressBar, ProgressIndicator, ProgressLoader, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, RangeCalendar, ScrollCalendar, SearchInput, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, SkeletonText, SkipButton, SporProvider, StaticCard, Stepper, StepperStep, SvgBox, Switch, Table, TableBody, TableColumnHeader, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Text3 as Text, TextLink, Textarea, TimePicker, Tooltip, TooltipContent, TooltipTrigger, TravelTag, VyLogo, VyLogoPride, createTexts, createToast, fontFaces, slugify, system, themes, useCalendar, useColorMode, useColorModeValue, useTableSort, useTranslation };
11848
11892
  //# sourceMappingURL=out.js.map
11849
11893
  //# sourceMappingURL=index.mjs.map