@vygruppen/spor-react 12.2.0 → 12.3.0

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.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { PropsWithChildren, ReactNode, ChangeEvent } from 'react';
2
+ import React__default, { PropsWithChildren, ReactNode } 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, Dialog, Drawer as Drawer$1, InputElementProps, PopoverRootProps, Checkbox as Checkbox$1, CheckboxGroupProps as CheckboxGroupProps$1, Field as Field$1, Fieldset as Fieldset$1, InputProps as InputProps$1, ListRootProps, NativeSelectFieldProps, NativeSelect as NativeSelect$1, RadioGroup as RadioGroup$1, SelectRootProps, 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, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } 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, Field as Field$1, Dialog, Drawer as Drawer$1, PopoverRootProps, Checkbox as Checkbox$1, CheckboxGroupProps as CheckboxGroupProps$1, CheckboxCardRootProps, CheckboxCard, Fieldset as Fieldset$1, InputProps as InputProps$1, ListRootProps, NativeSelectFieldProps, NativeSelect as NativeSelect$1, RadioGroup as RadioGroup$1, SelectRootProps, 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, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
5
5
  export { Box, BoxProps, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, CenterProps, 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, TableColumnHeader, TableColumnHeaderProps, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, 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';
@@ -492,6 +492,43 @@ declare function ColorModeIcon(): react_jsx_runtime.JSX.Element;
492
492
  type ColorModeButtonProps = Omit<IconButtonProps$1, "aria-label">;
493
493
  declare const ColorModeButton: React$1.ForwardRefExoticComponent<ColorModeButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
494
494
 
495
+ declare const fieldSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "label" | "requiredIndicator" | "helperText" | "errorText", _chakra_ui_react.SlotRecipeVariantRecord<"root" | "label" | "requiredIndicator" | "helperText" | "errorText">>;
496
+
497
+ type FieldVariantProps = RecipeVariantProps<typeof fieldSlotRecipe>;
498
+ type FieldBaseProps = {
499
+ direction?: "row" | "column";
500
+ disabled?: boolean;
501
+ invalid?: boolean;
502
+ readOnly?: boolean;
503
+ required?: boolean;
504
+ label?: React$1.ReactNode;
505
+ helperText?: React$1.ReactNode;
506
+ errorText?: React$1.ReactNode;
507
+ floatingLabel?: boolean;
508
+ };
509
+ type FieldProps = Omit<Field$1.RootProps, "label"> & React$1.PropsWithChildren<FieldVariantProps> & FieldBaseProps;
510
+ /**
511
+ *
512
+ * Field is a component that wraps around other input components, like `Input` and `Select`.
513
+ *
514
+ * It can have a label, helper text, and error text.
515
+ *
516
+ * ```tsx
517
+ *
518
+ * <Field label="E-mail">
519
+ * <Input />
520
+ * </Field>
521
+ *
522
+ * ```
523
+ *
524
+ * This component is not exported and should be used as a wrapper for other input components.
525
+ */
526
+ declare const Field: React$1.ForwardRefExoticComponent<Omit<Field$1.RootProps, "label"> & {
527
+ children?: React$1.ReactNode | undefined;
528
+ } & FieldBaseProps & React$1.RefAttributes<HTMLDivElement>>;
529
+ declare const FieldErrorText: React$1.ForwardRefExoticComponent<Field$1.ErrorTextProps & React$1.RefAttributes<HTMLDivElement>>;
530
+ declare const FieldLabel: React$1.ForwardRefExoticComponent<Field$1.LabelProps & React$1.RefAttributes<HTMLLabelElement>>;
531
+
495
532
  declare const datePickerSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"cell" | "arrow" | "wrapper" | "calendarTriggerButton" | "calendarPopover" | "calendar" | "weekdays" | "weekend" | "dateCell" | "inputLabel" | "dateTimeSegment" | "box" | "rangeCalendarPopover", {
496
533
  variant: {
497
534
  core: {
@@ -575,16 +612,15 @@ type DatePickerVariantProps = RecipeVariantProps<typeof datePickerSlotRecipe>;
575
612
  declare const DatePicker: React__default.ForwardRefExoticComponent<Omit<AriaDatePickerProps<DateValue>, "onChange"> & Pick<BoxProps, "minHeight" | "width"> & {
576
613
  variant?: _chakra_ui_react.ConditionalValue<"floating" | "ghost" | "core" | undefined>;
577
614
  } & {
578
- children?: ReactNode | undefined;
615
+ children?: React__default.ReactNode | undefined;
579
616
  } & CalendarVariants & {
580
617
  name?: string;
581
618
  showYearNavigation?: boolean;
582
619
  withPortal?: boolean;
583
620
  onChange?: (value: DateValue | null) => void;
584
- errorMessage?: ReactNode;
585
- } & React__default.RefAttributes<HTMLDivElement>>;
621
+ } & FieldBaseProps & React__default.RefAttributes<HTMLDivElement>>;
586
622
 
587
- type DateRangePickerProps = Omit<AriaDateRangePickerProps<DateValue$1>, "onChange"> & Pick<BoxProps, "minHeight"> & PropsWithChildren<DatePickerVariantProps> & CalendarVariants & {
623
+ type DateRangePickerProps = Omit<AriaDateRangePickerProps<DateValue$1>, "onChange" | "errorMessage" | "isInvalid" | "isRequired"> & Pick<BoxProps, "minHeight"> & PropsWithChildren<DatePickerVariantProps> & CalendarVariants & {
588
624
  startLabel?: string;
589
625
  startName?: string;
590
626
  endLabel?: string;
@@ -594,7 +630,7 @@ type DateRangePickerProps = Omit<AriaDateRangePickerProps<DateValue$1>, "onChang
594
630
  start: DateValue$1 | null;
595
631
  end: DateValue$1 | null;
596
632
  } | null) => void;
597
- };
633
+ } & FieldBaseProps;
598
634
  /**
599
635
  * A date range picker component.
600
636
  *
@@ -603,9 +639,9 @@ type DateRangePickerProps = Omit<AriaDateRangePickerProps<DateValue$1>, "onChang
603
639
  * ```tsx
604
640
  * <DateRangePicker startLabel="From" startName="from" endLabel="To" endName="to" variant="core" />
605
641
  * ```
606
- */ declare function DateRangePicker({ variant, minHeight, startName, endName, withPortal, ...props }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
642
+ */ declare function DateRangePicker({ variant, minHeight, startName, endName, withPortal, errorText, helperText, invalid, ...props }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
607
643
 
608
- type TimePickerProps = Omit<BoxProps, "defaultValue" | "onChange"> & {
644
+ type TimePickerProps = Omit<BoxProps, "defaultValue" | "onChange"> & FieldBaseProps & {
609
645
  /** The label. Defaults to a localized version of "Time" */
610
646
  label?: string;
611
647
  /** The name of the form field, if used in a regular form */
@@ -946,15 +982,6 @@ declare const attachedInputsRecipe: _chakra_ui_react.RecipeDefinition<{
946
982
  };
947
983
  }>;
948
984
 
949
- type InputGroupProps = GroupProps & {
950
- startElementProps?: InputElementProps;
951
- endElementProps?: InputElementProps;
952
- startElement?: React$1.ReactNode;
953
- endElement?: React$1.ReactNode;
954
- children: React$1.ReactElement;
955
- label?: string;
956
- };
957
-
958
985
  /**
959
986
  * Attaches several inputs together, so that they look like one input.
960
987
  *
@@ -967,17 +994,10 @@ type InputGroupProps = GroupProps & {
967
994
  * </AttachedInputs>
968
995
  * ```
969
996
  */
970
- type AttachedInputsProps = RecipeVariantProps<typeof attachedInputsRecipe> & InputGroupProps;
997
+ type AttachedInputsProps = RecipeVariantProps<typeof attachedInputsRecipe> & GroupProps;
971
998
  declare const AttachedInputs: React$1.ForwardRefExoticComponent<{
972
999
  orientation?: _chakra_ui_react.ConditionalValue<"horizontal" | "vertical" | undefined>;
973
- } & _chakra_ui_react.GroupProps & {
974
- startElementProps?: _chakra_ui_react.InputElementProps;
975
- endElementProps?: _chakra_ui_react.InputElementProps;
976
- startElement?: React.ReactNode;
977
- endElement?: React.ReactNode;
978
- children: React.ReactElement;
979
- label?: string;
980
- } & React$1.RefAttributes<HTMLDivElement>>;
1000
+ } & GroupProps & React$1.RefAttributes<HTMLDivElement>>;
981
1001
 
982
1002
  declare const CardSelect: ({ size, ...props }: PopoverRootProps) => react_jsx_runtime.JSX.Element;
983
1003
  declare const CardSelectContent: React$1.ForwardRefExoticComponent<{
@@ -1058,98 +1078,51 @@ type CheckboxGroupProps = Exclude<CheckboxGroupProps$1, "colorPalette" | "size"
1058
1078
  */
1059
1079
  declare const CheckboxGroup: React__default.ForwardRefExoticComponent<Omit<CheckboxGroupProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
1060
1080
 
1061
- declare const choiceChipRecipe: _chakra_ui_react.RecipeDefinition<{
1062
- variant: {
1063
- core: {
1064
- color: "core.text";
1065
- outlineColor: "core.outline";
1066
- _hover: {
1067
- outline: "2px solid";
1068
- outlineColor: "core.outline.hover";
1069
- _active: {
1070
- outline: "1px solid";
1071
- outlineColor: "core.outline";
1072
- backgroundColor: "core.surface.active";
1073
- };
1074
- };
1075
- };
1076
- accent: {
1077
- backgroundColor: "accent.surface";
1078
- color: "accent.text";
1079
- outline: "none";
1080
- _hover: {
1081
- backgroundColor: "accent.surface.hover";
1082
- _active: {
1083
- backgroundColor: "accent.surface.active";
1084
- };
1085
- };
1086
- };
1087
- floating: {
1088
- backgroundColor: "floating.surface";
1089
- outline: "1px solid";
1090
- outlineColor: "floating.outline";
1091
- color: "floating.text";
1092
- boxShadow: "sm";
1093
- _hover: {
1094
- backgroundColor: "floating.surface.hover";
1095
- outline: "1px solid";
1096
- outlineColor: "floating.outline.hover";
1097
- _active: {
1098
- backgroundColor: "floating.surface.active";
1099
- outline: "1px solid";
1100
- outlineColor: "floating.outline";
1101
- };
1102
- };
1103
- };
1104
- };
1105
- size: {
1106
- xs: {
1107
- _checked: {
1108
- borderRadius: "0.563rem";
1109
- };
1110
- height: number;
1111
- paddingX: number;
1112
- };
1113
- sm: {
1114
- _checked: {
1115
- borderRadius: "sm";
1116
- };
1117
- height: number;
1118
- paddingX: number;
1119
- };
1120
- md: {
1121
- _checked: {
1122
- borderRadius: "sm";
1123
- };
1124
- height: number;
1125
- paddingX: number;
1126
- };
1127
- lg: {
1128
- _checked: {
1129
- borderRadius: "md";
1130
- };
1131
- height: number;
1132
- paddingX: number;
1133
- };
1134
- };
1135
- }>;
1136
-
1137
- type ChoiceChipVariantProps = RecipeVariantProps<typeof choiceChipRecipe>;
1138
- type ChoiceChipProps = PropsWithChildren<ChoiceChipVariantProps> & {
1139
- onChange?: (value: ChangeEvent<HTMLInputElement>) => void;
1140
- checked?: boolean;
1141
- disabled?: boolean;
1142
- defaultChecked?: boolean;
1143
- /** The button text */
1144
- children: React__default.ReactNode;
1145
- icon?: {
1146
- default: React__default.ReactNode;
1147
- checked: React__default.ReactNode;
1148
- };
1149
- chipType?: "icon" | "choice" | "filter";
1150
- "aria-label"?: string;
1081
+ type CheckBoxIcon = {
1082
+ default: React__default.ReactNode;
1083
+ checked: React__default.ReactNode;
1084
+ };
1085
+ type ChoiceChipProps = Omit<CheckboxCardRootProps, "onCheckedChange" | "checked"> & {
1086
+ icon?: CheckBoxIcon;
1087
+ onCheckedChange?: (checked: boolean) => void;
1088
+ checked: boolean;
1151
1089
  };
1152
- declare const ChoiceChip: ({ children, icon, size, chipType, variant, ...props }: ChoiceChipProps) => react_jsx_runtime.JSX.Element;
1090
+ /**
1091
+ * Choice chips are checkboxes that look like selectable buttons.
1092
+ *
1093
+ * Choice chips are available in four different sizes - `xs`, `sm`, `md` and `lg`.
1094
+ *
1095
+ * ```tsx
1096
+ * <Stack flexDirection="row">
1097
+ * <ChoiceChip size="lg">Bus</ChoiceChip>
1098
+ * <ChoiceChip size="lg">Train</ChoiceChip>
1099
+ * </Stack>
1100
+ * ```
1101
+ *
1102
+ * There are also three different chipType - `icon`, `choice` and `filter`.
1103
+ *
1104
+ * ```tsx
1105
+ * <Stack flexDirection="row">
1106
+ * <ChoiceChip chipType="icon" icon={<Bus24Icon />}>Bus</ChoiceChip>
1107
+ * <ChoiceChip chipType="choice" icon={<Bus24Icon />}>Bus</ChoiceChip>
1108
+ * <ChoiceChip chipType="filter" icon={<Bus24Icon />}>Bus</ChoiceChip>
1109
+ * </Stack>
1110
+ *
1111
+ * There are also three different variants - `core`, `accent` and `floating`.
1112
+ *
1113
+ * ```tsx
1114
+ * <Stack flexDirection="row">
1115
+ * <ChoiceChip variant="core">Bus</ChoiceChip>
1116
+ * <ChoiceChip variant="accent">Boat</ChoiceChip>
1117
+ * <ChoiceChip variant="floating">Train</ChoiceChip>
1118
+ * </Stack>
1119
+ * ```
1120
+ */
1121
+ declare const ChoiceChip: React__default.ForwardRefExoticComponent<Omit<CheckboxCard.RootProps, "checked" | "onCheckedChange"> & {
1122
+ icon?: CheckBoxIcon;
1123
+ onCheckedChange?: (checked: boolean) => void;
1124
+ checked: boolean;
1125
+ } & React__default.RefAttributes<HTMLInputElement>>;
1153
1126
 
1154
1127
  type ComboboxProps<T> = Exclude<InputProps, "variant" | "colorPalette" | "size"> & AriaComboBoxProps<T> & {
1155
1128
  /** The label of the combobox */
@@ -1192,12 +1165,8 @@ type ComboboxProps<T> = Exclude<InputProps, "variant" | "colorPalette" | "size">
1192
1165
  */
1193
1166
  declare const Combobox: React__default.ForwardRefExoticComponent<_chakra_ui_react.InputProps & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
1194
1167
  children?: ReactNode | undefined;
1195
- } & {
1196
- label?: React__default.ReactNode;
1197
- helperText?: React__default.ReactNode;
1198
- errorText?: React__default.ReactNode /** Optional UI to show when there are no matching items */;
1199
- } & {
1200
- label: string;
1168
+ } & FieldBaseProps & {
1169
+ label: ReactNode;
1201
1170
  startElement?: React__default.ReactNode;
1202
1171
  endElement?: React__default.ReactNode;
1203
1172
  } & AriaComboBoxProps<object> & {
@@ -1217,69 +1186,25 @@ declare const Combobox: React__default.ForwardRefExoticComponent<_chakra_ui_reac
1217
1186
  children?: React__default.ReactNode;
1218
1187
  } & React__default.RefAttributes<HTMLDivElement>>;
1219
1188
 
1220
- declare const fieldSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "label" | "requiredIndicator" | "helperText" | "errorText", _chakra_ui_react.SlotRecipeVariantRecord<"root" | "label" | "requiredIndicator" | "helperText" | "errorText">>;
1221
-
1222
- type FieldVariantProps = RecipeVariantProps<typeof fieldSlotRecipe>;
1223
- type FieldProps = Omit<Field$1.RootProps, "label"> & React$1.PropsWithChildren<FieldVariantProps> & {
1224
- /** Label for the component */
1225
- label?: React$1.ReactNode;
1226
- /** Add helpertext underneath the input */
1227
- helperText?: React$1.ReactNode;
1228
- /** Add error text underneath the input */
1229
- errorText?: React$1.ReactNode;
1230
- };
1231
- /**
1232
- *
1233
- * Field is a component that wraps around other input components, like `Input` and `Select`.
1234
- *
1235
- * It can have a label, helper text, and error text.
1236
- *
1237
- * ```tsx
1238
- *
1239
- * <Field label="E-mail">
1240
- * <Input />
1241
- * </Field>
1242
- *
1243
- * ```
1244
- *
1245
- * This component is not exported and should be used as a wrapper for other input components.
1246
- */
1247
- declare const Field: React$1.ForwardRefExoticComponent<Omit<Field$1.RootProps, "label"> & {
1248
- children?: React$1.ReactNode | undefined;
1249
- } & {
1250
- /** Label for the component */
1251
- label?: React$1.ReactNode;
1252
- /** Add helpertext underneath the input */
1253
- helperText?: React$1.ReactNode;
1254
- /** Add error text underneath the input */
1255
- errorText?: React$1.ReactNode;
1256
- } & React$1.RefAttributes<HTMLDivElement>>;
1257
- declare const FieldErrorText: React$1.ForwardRefExoticComponent<Field$1.ErrorTextProps & React$1.RefAttributes<HTMLDivElement>>;
1258
- declare const FieldLabel: React$1.ForwardRefExoticComponent<Field$1.LabelProps & React$1.RefAttributes<HTMLLabelElement>>;
1259
-
1260
1189
  declare const Fieldset: React$1.ForwardRefExoticComponent<Fieldset$1.RootProps & React$1.RefAttributes<HTMLFieldSetElement>>;
1261
1190
  declare const FieldsetLegend: React$1.ForwardRefExoticComponent<Fieldset$1.LegendProps & React$1.RefAttributes<HTMLLegendElement>>;
1262
1191
  declare const FieldsetContent: React$1.ForwardRefExoticComponent<Fieldset$1.ContentProps & React$1.RefAttributes<HTMLDivElement>>;
1263
1192
  declare const FieldsetHelperText: React$1.ForwardRefExoticComponent<Fieldset$1.HelperTextProps & React$1.RefAttributes<HTMLSpanElement>>;
1264
1193
  declare const FieldsetErrorText: React$1.ForwardRefExoticComponent<Fieldset$1.ErrorTextProps & React$1.RefAttributes<HTMLSpanElement>>;
1265
1194
 
1266
- type InputProps = Exclude<InputProps$1, "size" | "label" | "colorPalette"> & FieldProps & {
1195
+ type InputProps = Exclude<InputProps$1, "size" | "label" | "colorPalette" | "placeholder"> & FieldProps & {
1267
1196
  /** The input's label */
1268
- label: string;
1197
+ label: ReactNode;
1269
1198
  /** Element that shows up to the left */
1270
1199
  startElement?: React__default.ReactNode;
1271
1200
  /** Element that shows up to the right */
1272
1201
  endElement?: React__default.ReactNode;
1273
1202
  };
1274
1203
  declare const Input: React__default.ForwardRefExoticComponent<InputProps$1 & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
1275
- children?: React__default.ReactNode | undefined;
1276
- } & {
1277
- label?: React__default.ReactNode;
1278
- helperText?: React__default.ReactNode;
1279
- errorText?: React__default.ReactNode;
1280
- } & {
1204
+ children?: ReactNode | undefined;
1205
+ } & FieldBaseProps & {
1281
1206
  /** The input's label */
1282
- label: string;
1207
+ label: ReactNode;
1283
1208
  /** Element that shows up to the left */
1284
1209
  startElement?: React__default.ReactNode;
1285
1210
  /** Element that shows up to the right */
@@ -1402,11 +1327,8 @@ declare const nativeSelectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"ico
1402
1327
  }>;
1403
1328
 
1404
1329
  type NativeSelectVariantProps = RecipeVariantProps<typeof nativeSelectSlotRecipe>;
1405
- type NativeSelectdProps = React$1.PropsWithChildren<NativeSelectVariantProps> & NativeSelectFieldProps & {
1330
+ type NativeSelectdProps = React$1.PropsWithChildren<NativeSelectVariantProps> & FieldBaseProps & NativeSelectFieldProps & {
1406
1331
  icon?: React$1.ReactNode;
1407
- label: string;
1408
- invalid?: boolean;
1409
- disabled?: boolean;
1410
1332
  };
1411
1333
  /**
1412
1334
  * Selects let you choose between several options
@@ -1428,17 +1350,14 @@ declare const NativeSelect: React$1.ForwardRefExoticComponent<{
1428
1350
  variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | undefined>;
1429
1351
  } & {
1430
1352
  children?: React$1.ReactNode | undefined;
1431
- } & NativeSelect$1.FieldProps & {
1353
+ } & FieldBaseProps & NativeSelect$1.FieldProps & {
1432
1354
  icon?: React$1.ReactNode;
1433
- label: string;
1434
- invalid?: boolean;
1435
- disabled?: boolean;
1436
1355
  } & React$1.RefAttributes<HTMLDivElement>>;
1437
1356
 
1438
1357
  declare const numericStepperRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "input" | "text" | "button", _chakra_ui_react.SlotRecipeVariantRecord<"root" | "container" | "input" | "text" | "button">>;
1439
1358
 
1440
1359
  type NumericStepperVariants = RecipeVariantProps<typeof numericStepperRecipe>;
1441
- type NumericStepperProps = BoxProps & PropsWithChildren<NumericStepperVariants> & {
1360
+ type NumericStepperProps = BoxProps & FieldBaseProps & PropsWithChildren<NumericStepperVariants> & {
1442
1361
  children: React__default.ReactNode;
1443
1362
  /** The name of the input field */
1444
1363
  name?: string;
@@ -1489,7 +1408,7 @@ type NumericStepperProps = BoxProps & PropsWithChildren<NumericStepperVariants>
1489
1408
  * ```
1490
1409
  * @see https://spor.vy.no/components/numeric-stepper
1491
1410
  */
1492
- declare const NumericStepper: React__default.ForwardRefExoticComponent<BoxProps & {
1411
+ declare const NumericStepper: React__default.ForwardRefExoticComponent<BoxProps & FieldBaseProps & {
1493
1412
  children?: React__default.ReactNode | undefined;
1494
1413
  } & {
1495
1414
  children: React__default.ReactNode;
@@ -1529,7 +1448,7 @@ interface PasswordVisibilityProps {
1529
1448
  onVisibleChange?: (visible: boolean) => void;
1530
1449
  }
1531
1450
  interface PasswordInputProps extends InputProps, PasswordVisibilityProps {
1532
- rootProps?: InputGroupProps;
1451
+ rootProps?: InputProps;
1533
1452
  }
1534
1453
  /**
1535
1454
  * A password input field with a visibility toggle.
@@ -1577,12 +1496,8 @@ type CountryCodeAndPhoneNumber = {
1577
1496
  */
1578
1497
  declare const PhoneNumberInput: React$1.ForwardRefExoticComponent<_chakra_ui_react.InputProps & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
1579
1498
  children?: React$1.ReactNode | undefined;
1580
- } & {
1581
- label?: React.ReactNode;
1582
- helperText?: React.ReactNode;
1583
- errorText?: React.ReactNode;
1584
- } & {
1585
- label: string;
1499
+ } & FieldBaseProps & {
1500
+ label: React$1.ReactNode;
1586
1501
  startElement?: React.ReactNode;
1587
1502
  endElement?: React.ReactNode;
1588
1503
  } & {
@@ -1648,12 +1563,8 @@ type SearchInputProps = InputProps & {
1648
1563
  */
1649
1564
  declare const SearchInput: React$1.ForwardRefExoticComponent<_chakra_ui_react.InputProps & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
1650
1565
  children?: React$1.ReactNode | undefined;
1651
- } & {
1652
- label?: React.ReactNode;
1653
- helperText?: React.ReactNode;
1654
- errorText?: React.ReactNode;
1655
- } & {
1656
- label: string;
1566
+ } & FieldBaseProps & {
1567
+ label: React$1.ReactNode;
1657
1568
  startElement?: React.ReactNode;
1658
1569
  endElement?: React.ReactNode;
1659
1570
  } & {
@@ -1674,10 +1585,6 @@ declare const selectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "
1674
1585
  _active: {
1675
1586
  backgroundColor: "brand.surface.active";
1676
1587
  };
1677
- _invalid: {
1678
- outline: "2px solid";
1679
- outlineColor: "outline.error";
1680
- };
1681
1588
  _disabled: {
1682
1589
  pointerEvents: "none";
1683
1590
  color: "text.disabled";
@@ -1738,7 +1645,7 @@ declare const selectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "
1738
1645
  }>;
1739
1646
 
1740
1647
  type SelectVariantProps = RecipeVariantProps<typeof selectSlotRecipe>;
1741
- type SelectProps = SelectRootProps & PropsWithChildren<SelectVariantProps> & {
1648
+ type SelectProps = SelectRootProps & FieldProps & PropsWithChildren<SelectVariantProps> & {
1742
1649
  label?: string;
1743
1650
  };
1744
1651
  /**
@@ -1768,10 +1675,10 @@ type SelectProps = SelectRootProps & PropsWithChildren<SelectVariantProps> & {
1768
1675
  * @see https://spor.vy.no/components/select
1769
1676
  *
1770
1677
  */
1771
- declare const Select: React$1.ForwardRefExoticComponent<SelectRootProps<any> & {
1772
- variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
1773
- } & {
1678
+ declare const Select: React$1.ForwardRefExoticComponent<SelectRootProps<any> & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
1774
1679
  children?: React$1.ReactNode | undefined;
1680
+ } & FieldBaseProps & {
1681
+ variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
1775
1682
  } & {
1776
1683
  label?: string;
1777
1684
  } & React$1.RefAttributes<HTMLDivElement>>;
@@ -1856,7 +1763,7 @@ declare const switchSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "
1856
1763
  }>;
1857
1764
 
1858
1765
  type SwitchVariants = RecipeVariantProps<typeof switchSlotRecipe>;
1859
- type SwitchProps = Exclude<Switch$1.RootProps, "size" | "colorPalette"> & PropsWithChildren<SwitchVariants> & {
1766
+ type SwitchProps = Exclude<Switch$1.RootProps, "size" | "colorPalette"> & FieldBaseProps & PropsWithChildren<SwitchVariants> & {
1860
1767
  inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
1861
1768
  rootRef?: React__default.Ref<HTMLLabelElement>;
1862
1769
  trackLabel?: {
@@ -1888,7 +1795,7 @@ type SwitchProps = Exclude<Switch$1.RootProps, "size" | "colorPalette"> & PropsW
1888
1795
  *
1889
1796
  * ```
1890
1797
  */
1891
- declare const Switch: React__default.ForwardRefExoticComponent<Switch$1.RootProps & {
1798
+ declare const Switch: React__default.ForwardRefExoticComponent<Switch$1.RootProps & FieldBaseProps & {
1892
1799
  size?: ConditionalValue<"sm" | "md" | "lg" | undefined>;
1893
1800
  } & {
1894
1801
  children?: React__default.ReactNode | undefined;
@@ -1967,11 +1874,7 @@ type TextareaProps = Exclude<TextareaProps$1, "size" | "colorPalette"> & FieldPr
1967
1874
  */
1968
1875
  declare const Textarea: React__default.ForwardRefExoticComponent<TextareaProps$1 & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
1969
1876
  children?: ReactNode | undefined;
1970
- } & {
1971
- label?: React__default.ReactNode;
1972
- helperText?: React__default.ReactNode;
1973
- errorText?: React__default.ReactNode;
1974
- } & {
1877
+ } & FieldBaseProps & {
1975
1878
  variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | undefined>;
1976
1879
  } & {
1977
1880
  label: ReactNode;
@@ -3763,4 +3666,4 @@ declare const Text: React$1.ForwardRefExoticComponent<Omit<TextProps$1, "textSty
3763
3666
  **/
3764
3667
  declare function slugify(text: string | string[], maxLength?: number): string;
3765
3668
 
3766
- export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Badge, type BadgeProps, Brand, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, 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, 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, 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, type TableProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, type VyLogoPrideProps, createTexts, createToast, fontFaces, slugify, system, themes, useColorMode, useColorModeValue, useTranslation };
3669
+ export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Badge, type BadgeProps, Brand, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, 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, 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, type TableProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, type VyLogoPrideProps, createTexts, createToast, fontFaces, slugify, system, themes, useColorMode, useColorModeValue, useTranslation };