@vygruppen/spor-react 12.2.1 → 12.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +12 -31
- package/.turbo/turbo-typegen.log +1 -19
- package/CHANGELOG.md +18 -0
- package/dist/index.d.mts +77 -123
- package/dist/index.d.ts +77 -123
- package/dist/index.js +547 -446
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +436 -335
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/datepicker/DatePicker.tsx +10 -13
- package/src/datepicker/DateRangePicker.tsx +18 -5
- package/src/datepicker/TimePicker.tsx +34 -35
- package/src/input/AttachedInputs.tsx +7 -4
- package/src/input/ChoiceChip.tsx +13 -3
- package/src/input/Combobox.tsx +5 -0
- package/src/input/Field.tsx +56 -20
- package/src/input/FloatingLabel.tsx +38 -0
- package/src/input/Input.tsx +40 -23
- package/src/input/Label.tsx +18 -0
- package/src/input/NativeSelect.tsx +14 -5
- package/src/input/NumericStepper.tsx +102 -99
- package/src/input/PasswordInput.tsx +1 -2
- package/src/input/Select.tsx +29 -15
- package/src/input/Switch.tsx +17 -3
- package/src/input/Textarea.tsx +2 -2
- package/src/theme/slot-recipes/field.ts +1 -28
- package/src/theme/slot-recipes/numeric-stepper.ts +8 -3
- package/src/theme/slot-recipes/select.ts +4 -4
- package/src/theme/slot-recipes/table.ts +1 -0
- package/src/input/InputGroup.tsx +0 -67
package/.turbo/turbo-build.log
CHANGED
@@ -1,30 +1,12 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@12.
|
2
|
+
> @vygruppen/spor-react@12.3.1 build /home/runner/work/spor/spor/packages/spor-react
|
3
3
|
> pnpm typegen && tsup
|
4
4
|
|
5
5
|
|
6
|
-
> @vygruppen/spor-react@12.
|
6
|
+
> @vygruppen/spor-react@12.3.1 typegen /home/runner/work/spor/spor/packages/spor-react
|
7
7
|
> npx @chakra-ui/cli typegen src/theme/index.ts
|
8
8
|
|
9
9
|
[90m┌[39m Chakra CLI ⚡️
|
10
|
-
▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
|
11
|
-
|
12
|
-
../spor-design-tokens/package.json:15:6:
|
13
|
-
15 │ "types": "./dist/tokens.d.ts"
|
14
|
-
╵ ~~~~~~~
|
15
|
-
|
16
|
-
The "import" condition comes earlier and will be used for all "import" statements:
|
17
|
-
|
18
|
-
../spor-design-tokens/package.json:13:6:
|
19
|
-
13 │ "import": "./dist/tokens.mjs",
|
20
|
-
╵ ~~~~~~~~
|
21
|
-
|
22
|
-
The "require" condition comes earlier and will be used for all "require" calls:
|
23
|
-
|
24
|
-
../spor-design-tokens/package.json:14:6:
|
25
|
-
14 │ "require": "./dist/tokens.js",
|
26
|
-
╵ ~~~~~~~~~
|
27
|
-
|
28
10
|
[?25l[90m│[39m
|
29
11
|
[35m◒[39m Generating conditions types...
|
30
12
|
[999D[J[32m◇[39m ✅ Generated conditions typings
|
@@ -34,8 +16,7 @@
|
|
34
16
|
[?25h[?25l[90m│[39m
|
35
17
|
[32m◇[39m ✅ Generated utility typings
|
36
18
|
[?25h[?25l[90m│[39m
|
37
|
-
[
|
38
|
-
[999D[J[32m◇[39m ✅ Generated token typings
|
19
|
+
[32m◇[39m ✅ Generated token typings
|
39
20
|
[?25h[?25l[90m│[39m
|
40
21
|
[35m◒[39m Generating system types...
|
41
22
|
[999D[J[32m◇[39m ✅ Generated system types
|
@@ -50,12 +31,12 @@ CLI Target: node16
|
|
50
31
|
CJS Build start
|
51
32
|
ESM Build start
|
52
33
|
DTS Build start
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
DTS ⚡️ Build success in
|
60
|
-
DTS dist/index.d.ts
|
61
|
-
DTS dist/index.d.mts
|
34
|
+
ESM dist/index.mjs 294.73 KB
|
35
|
+
ESM dist/index.mjs.map 633.25 KB
|
36
|
+
ESM ⚡️ Build success in 2095ms
|
37
|
+
CJS dist/index.js 315.33 KB
|
38
|
+
CJS dist/index.js.map 633.25 KB
|
39
|
+
CJS ⚡️ Build success in 2098ms
|
40
|
+
DTS ⚡️ Build success in 21036ms
|
41
|
+
DTS dist/index.d.ts 129.93 KB
|
42
|
+
DTS dist/index.d.mts 129.93 KB
|
package/.turbo/turbo-typegen.log
CHANGED
@@ -1,26 +1,8 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@12.
|
2
|
+
> @vygruppen/spor-react@12.3.1 typegen /home/runner/work/spor/spor/packages/spor-react
|
3
3
|
> npx @chakra-ui/cli typegen src/theme/index.ts
|
4
4
|
|
5
5
|
[90m┌[39m Chakra CLI ⚡️
|
6
|
-
▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
|
7
|
-
|
8
|
-
../spor-design-tokens/package.json:15:6:
|
9
|
-
15 │ "types": "./dist/tokens.d.ts"
|
10
|
-
╵ ~~~~~~~
|
11
|
-
|
12
|
-
The "import" condition comes earlier and will be used for all "import" statements:
|
13
|
-
|
14
|
-
../spor-design-tokens/package.json:13:6:
|
15
|
-
13 │ "import": "./dist/tokens.mjs",
|
16
|
-
╵ ~~~~~~~~
|
17
|
-
|
18
|
-
The "require" condition comes earlier and will be used for all "require" calls:
|
19
|
-
|
20
|
-
../spor-design-tokens/package.json:14:6:
|
21
|
-
14 │ "require": "./dist/tokens.js",
|
22
|
-
╵ ~~~~~~~~~
|
23
|
-
|
24
6
|
[?25l[90m│[39m
|
25
7
|
[35m◒[39m Generating conditions types...
|
26
8
|
[999D[J[32m◇[39m ✅ Generated conditions typings
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 12.3.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- d137429: Table: Fix width styling on tableCell.
|
8
|
+
|
9
|
+
## 12.3.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- d7eabb1: Enhance form components to accept `invalid` and `errorText` props, leveraging Chakra UI's `Field` component for improved validation and error handling.
|
14
|
+
|
15
|
+
### Patch Changes
|
16
|
+
|
17
|
+
- 0087607: Fix lint issues
|
18
|
+
- Updated dependencies [0087607]
|
19
|
+
- @vygruppen/spor-design-tokens@4.0.6
|
20
|
+
|
3
21
|
## 12.2.1
|
4
22
|
|
5
23
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React$1 from 'react';
|
2
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,
|
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
|
-
|
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> &
|
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
|
-
} &
|
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<{
|
@@ -1062,8 +1082,10 @@ type CheckBoxIcon = {
|
|
1062
1082
|
default: React__default.ReactNode;
|
1063
1083
|
checked: React__default.ReactNode;
|
1064
1084
|
};
|
1065
|
-
type ChoiceChipProps = CheckboxCardRootProps & {
|
1085
|
+
type ChoiceChipProps = Omit<CheckboxCardRootProps, "onCheckedChange" | "checked"> & {
|
1066
1086
|
icon?: CheckBoxIcon;
|
1087
|
+
onCheckedChange?: (checked: boolean) => void;
|
1088
|
+
checked: boolean;
|
1067
1089
|
};
|
1068
1090
|
/**
|
1069
1091
|
* Choice chips are checkboxes that look like selectable buttons.
|
@@ -1096,8 +1118,10 @@ type ChoiceChipProps = CheckboxCardRootProps & {
|
|
1096
1118
|
* </Stack>
|
1097
1119
|
* ```
|
1098
1120
|
*/
|
1099
|
-
declare const ChoiceChip: React__default.ForwardRefExoticComponent<CheckboxCard.RootProps & {
|
1121
|
+
declare const ChoiceChip: React__default.ForwardRefExoticComponent<Omit<CheckboxCard.RootProps, "checked" | "onCheckedChange"> & {
|
1100
1122
|
icon?: CheckBoxIcon;
|
1123
|
+
onCheckedChange?: (checked: boolean) => void;
|
1124
|
+
checked: boolean;
|
1101
1125
|
} & React__default.RefAttributes<HTMLInputElement>>;
|
1102
1126
|
|
1103
1127
|
type ComboboxProps<T> = Exclude<InputProps, "variant" | "colorPalette" | "size"> & AriaComboBoxProps<T> & {
|
@@ -1141,12 +1165,8 @@ type ComboboxProps<T> = Exclude<InputProps, "variant" | "colorPalette" | "size">
|
|
1141
1165
|
*/
|
1142
1166
|
declare const Combobox: React__default.ForwardRefExoticComponent<_chakra_ui_react.InputProps & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
|
1143
1167
|
children?: ReactNode | undefined;
|
1144
|
-
} & {
|
1145
|
-
label
|
1146
|
-
helperText?: React__default.ReactNode;
|
1147
|
-
errorText?: React__default.ReactNode /** Optional UI to show when there are no matching items */;
|
1148
|
-
} & {
|
1149
|
-
label: string;
|
1168
|
+
} & FieldBaseProps & {
|
1169
|
+
label: ReactNode;
|
1150
1170
|
startElement?: React__default.ReactNode;
|
1151
1171
|
endElement?: React__default.ReactNode;
|
1152
1172
|
} & AriaComboBoxProps<object> & {
|
@@ -1166,69 +1186,25 @@ declare const Combobox: React__default.ForwardRefExoticComponent<_chakra_ui_reac
|
|
1166
1186
|
children?: React__default.ReactNode;
|
1167
1187
|
} & React__default.RefAttributes<HTMLDivElement>>;
|
1168
1188
|
|
1169
|
-
declare const fieldSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "label" | "requiredIndicator" | "helperText" | "errorText", _chakra_ui_react.SlotRecipeVariantRecord<"root" | "label" | "requiredIndicator" | "helperText" | "errorText">>;
|
1170
|
-
|
1171
|
-
type FieldVariantProps = RecipeVariantProps<typeof fieldSlotRecipe>;
|
1172
|
-
type FieldProps = Omit<Field$1.RootProps, "label"> & React$1.PropsWithChildren<FieldVariantProps> & {
|
1173
|
-
/** Label for the component */
|
1174
|
-
label?: React$1.ReactNode;
|
1175
|
-
/** Add helpertext underneath the input */
|
1176
|
-
helperText?: React$1.ReactNode;
|
1177
|
-
/** Add error text underneath the input */
|
1178
|
-
errorText?: React$1.ReactNode;
|
1179
|
-
};
|
1180
|
-
/**
|
1181
|
-
*
|
1182
|
-
* Field is a component that wraps around other input components, like `Input` and `Select`.
|
1183
|
-
*
|
1184
|
-
* It can have a label, helper text, and error text.
|
1185
|
-
*
|
1186
|
-
* ```tsx
|
1187
|
-
*
|
1188
|
-
* <Field label="E-mail">
|
1189
|
-
* <Input />
|
1190
|
-
* </Field>
|
1191
|
-
*
|
1192
|
-
* ```
|
1193
|
-
*
|
1194
|
-
* This component is not exported and should be used as a wrapper for other input components.
|
1195
|
-
*/
|
1196
|
-
declare const Field: React$1.ForwardRefExoticComponent<Omit<Field$1.RootProps, "label"> & {
|
1197
|
-
children?: React$1.ReactNode | undefined;
|
1198
|
-
} & {
|
1199
|
-
/** Label for the component */
|
1200
|
-
label?: React$1.ReactNode;
|
1201
|
-
/** Add helpertext underneath the input */
|
1202
|
-
helperText?: React$1.ReactNode;
|
1203
|
-
/** Add error text underneath the input */
|
1204
|
-
errorText?: React$1.ReactNode;
|
1205
|
-
} & React$1.RefAttributes<HTMLDivElement>>;
|
1206
|
-
declare const FieldErrorText: React$1.ForwardRefExoticComponent<Field$1.ErrorTextProps & React$1.RefAttributes<HTMLDivElement>>;
|
1207
|
-
declare const FieldLabel: React$1.ForwardRefExoticComponent<Field$1.LabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
1208
|
-
|
1209
1189
|
declare const Fieldset: React$1.ForwardRefExoticComponent<Fieldset$1.RootProps & React$1.RefAttributes<HTMLFieldSetElement>>;
|
1210
1190
|
declare const FieldsetLegend: React$1.ForwardRefExoticComponent<Fieldset$1.LegendProps & React$1.RefAttributes<HTMLLegendElement>>;
|
1211
1191
|
declare const FieldsetContent: React$1.ForwardRefExoticComponent<Fieldset$1.ContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
1212
1192
|
declare const FieldsetHelperText: React$1.ForwardRefExoticComponent<Fieldset$1.HelperTextProps & React$1.RefAttributes<HTMLSpanElement>>;
|
1213
1193
|
declare const FieldsetErrorText: React$1.ForwardRefExoticComponent<Fieldset$1.ErrorTextProps & React$1.RefAttributes<HTMLSpanElement>>;
|
1214
1194
|
|
1215
|
-
type InputProps = Exclude<InputProps$1, "size" | "label" | "colorPalette"> & FieldProps & {
|
1195
|
+
type InputProps = Exclude<InputProps$1, "size" | "label" | "colorPalette" | "placeholder"> & FieldProps & {
|
1216
1196
|
/** The input's label */
|
1217
|
-
label:
|
1197
|
+
label: ReactNode;
|
1218
1198
|
/** Element that shows up to the left */
|
1219
1199
|
startElement?: React__default.ReactNode;
|
1220
1200
|
/** Element that shows up to the right */
|
1221
1201
|
endElement?: React__default.ReactNode;
|
1222
1202
|
};
|
1223
1203
|
declare const Input: React__default.ForwardRefExoticComponent<InputProps$1 & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
|
1224
|
-
children?:
|
1225
|
-
} & {
|
1226
|
-
label?: React__default.ReactNode;
|
1227
|
-
helperText?: React__default.ReactNode;
|
1228
|
-
errorText?: React__default.ReactNode;
|
1229
|
-
} & {
|
1204
|
+
children?: ReactNode | undefined;
|
1205
|
+
} & FieldBaseProps & {
|
1230
1206
|
/** The input's label */
|
1231
|
-
label:
|
1207
|
+
label: ReactNode;
|
1232
1208
|
/** Element that shows up to the left */
|
1233
1209
|
startElement?: React__default.ReactNode;
|
1234
1210
|
/** Element that shows up to the right */
|
@@ -1351,11 +1327,8 @@ declare const nativeSelectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"ico
|
|
1351
1327
|
}>;
|
1352
1328
|
|
1353
1329
|
type NativeSelectVariantProps = RecipeVariantProps<typeof nativeSelectSlotRecipe>;
|
1354
|
-
type NativeSelectdProps = React$1.PropsWithChildren<NativeSelectVariantProps> & NativeSelectFieldProps & {
|
1330
|
+
type NativeSelectdProps = React$1.PropsWithChildren<NativeSelectVariantProps> & FieldBaseProps & NativeSelectFieldProps & {
|
1355
1331
|
icon?: React$1.ReactNode;
|
1356
|
-
label: string;
|
1357
|
-
invalid?: boolean;
|
1358
|
-
disabled?: boolean;
|
1359
1332
|
};
|
1360
1333
|
/**
|
1361
1334
|
* Selects let you choose between several options
|
@@ -1377,17 +1350,14 @@ declare const NativeSelect: React$1.ForwardRefExoticComponent<{
|
|
1377
1350
|
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | undefined>;
|
1378
1351
|
} & {
|
1379
1352
|
children?: React$1.ReactNode | undefined;
|
1380
|
-
} & NativeSelect$1.FieldProps & {
|
1353
|
+
} & FieldBaseProps & NativeSelect$1.FieldProps & {
|
1381
1354
|
icon?: React$1.ReactNode;
|
1382
|
-
label: string;
|
1383
|
-
invalid?: boolean;
|
1384
|
-
disabled?: boolean;
|
1385
1355
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
1386
1356
|
|
1387
1357
|
declare const numericStepperRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "input" | "text" | "button", _chakra_ui_react.SlotRecipeVariantRecord<"root" | "container" | "input" | "text" | "button">>;
|
1388
1358
|
|
1389
1359
|
type NumericStepperVariants = RecipeVariantProps<typeof numericStepperRecipe>;
|
1390
|
-
type NumericStepperProps = BoxProps & PropsWithChildren<NumericStepperVariants> & {
|
1360
|
+
type NumericStepperProps = BoxProps & FieldBaseProps & PropsWithChildren<NumericStepperVariants> & {
|
1391
1361
|
children: React__default.ReactNode;
|
1392
1362
|
/** The name of the input field */
|
1393
1363
|
name?: string;
|
@@ -1438,7 +1408,7 @@ type NumericStepperProps = BoxProps & PropsWithChildren<NumericStepperVariants>
|
|
1438
1408
|
* ```
|
1439
1409
|
* @see https://spor.vy.no/components/numeric-stepper
|
1440
1410
|
*/
|
1441
|
-
declare const NumericStepper: React__default.ForwardRefExoticComponent<BoxProps & {
|
1411
|
+
declare const NumericStepper: React__default.ForwardRefExoticComponent<BoxProps & FieldBaseProps & {
|
1442
1412
|
children?: React__default.ReactNode | undefined;
|
1443
1413
|
} & {
|
1444
1414
|
children: React__default.ReactNode;
|
@@ -1478,7 +1448,7 @@ interface PasswordVisibilityProps {
|
|
1478
1448
|
onVisibleChange?: (visible: boolean) => void;
|
1479
1449
|
}
|
1480
1450
|
interface PasswordInputProps extends InputProps, PasswordVisibilityProps {
|
1481
|
-
rootProps?:
|
1451
|
+
rootProps?: InputProps;
|
1482
1452
|
}
|
1483
1453
|
/**
|
1484
1454
|
* A password input field with a visibility toggle.
|
@@ -1526,12 +1496,8 @@ type CountryCodeAndPhoneNumber = {
|
|
1526
1496
|
*/
|
1527
1497
|
declare const PhoneNumberInput: React$1.ForwardRefExoticComponent<_chakra_ui_react.InputProps & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
|
1528
1498
|
children?: React$1.ReactNode | undefined;
|
1529
|
-
} & {
|
1530
|
-
label
|
1531
|
-
helperText?: React.ReactNode;
|
1532
|
-
errorText?: React.ReactNode;
|
1533
|
-
} & {
|
1534
|
-
label: string;
|
1499
|
+
} & FieldBaseProps & {
|
1500
|
+
label: React$1.ReactNode;
|
1535
1501
|
startElement?: React.ReactNode;
|
1536
1502
|
endElement?: React.ReactNode;
|
1537
1503
|
} & {
|
@@ -1597,12 +1563,8 @@ type SearchInputProps = InputProps & {
|
|
1597
1563
|
*/
|
1598
1564
|
declare const SearchInput: React$1.ForwardRefExoticComponent<_chakra_ui_react.InputProps & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
|
1599
1565
|
children?: React$1.ReactNode | undefined;
|
1600
|
-
} & {
|
1601
|
-
label
|
1602
|
-
helperText?: React.ReactNode;
|
1603
|
-
errorText?: React.ReactNode;
|
1604
|
-
} & {
|
1605
|
-
label: string;
|
1566
|
+
} & FieldBaseProps & {
|
1567
|
+
label: React$1.ReactNode;
|
1606
1568
|
startElement?: React.ReactNode;
|
1607
1569
|
endElement?: React.ReactNode;
|
1608
1570
|
} & {
|
@@ -1623,10 +1585,6 @@ declare const selectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "
|
|
1623
1585
|
_active: {
|
1624
1586
|
backgroundColor: "brand.surface.active";
|
1625
1587
|
};
|
1626
|
-
_invalid: {
|
1627
|
-
outline: "2px solid";
|
1628
|
-
outlineColor: "outline.error";
|
1629
|
-
};
|
1630
1588
|
_disabled: {
|
1631
1589
|
pointerEvents: "none";
|
1632
1590
|
color: "text.disabled";
|
@@ -1687,7 +1645,7 @@ declare const selectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "
|
|
1687
1645
|
}>;
|
1688
1646
|
|
1689
1647
|
type SelectVariantProps = RecipeVariantProps<typeof selectSlotRecipe>;
|
1690
|
-
type SelectProps = SelectRootProps & PropsWithChildren<SelectVariantProps> & {
|
1648
|
+
type SelectProps = SelectRootProps & FieldProps & PropsWithChildren<SelectVariantProps> & {
|
1691
1649
|
label?: string;
|
1692
1650
|
};
|
1693
1651
|
/**
|
@@ -1717,10 +1675,10 @@ type SelectProps = SelectRootProps & PropsWithChildren<SelectVariantProps> & {
|
|
1717
1675
|
* @see https://spor.vy.no/components/select
|
1718
1676
|
*
|
1719
1677
|
*/
|
1720
|
-
declare const Select: React$1.ForwardRefExoticComponent<SelectRootProps<any> & {
|
1721
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1722
|
-
} & {
|
1678
|
+
declare const Select: React$1.ForwardRefExoticComponent<SelectRootProps<any> & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
|
1723
1679
|
children?: React$1.ReactNode | undefined;
|
1680
|
+
} & FieldBaseProps & {
|
1681
|
+
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1724
1682
|
} & {
|
1725
1683
|
label?: string;
|
1726
1684
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
@@ -1805,7 +1763,7 @@ declare const switchSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "
|
|
1805
1763
|
}>;
|
1806
1764
|
|
1807
1765
|
type SwitchVariants = RecipeVariantProps<typeof switchSlotRecipe>;
|
1808
|
-
type SwitchProps = Exclude<Switch$1.RootProps, "size" | "colorPalette"> & PropsWithChildren<SwitchVariants> & {
|
1766
|
+
type SwitchProps = Exclude<Switch$1.RootProps, "size" | "colorPalette"> & FieldBaseProps & PropsWithChildren<SwitchVariants> & {
|
1809
1767
|
inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
|
1810
1768
|
rootRef?: React__default.Ref<HTMLLabelElement>;
|
1811
1769
|
trackLabel?: {
|
@@ -1837,7 +1795,7 @@ type SwitchProps = Exclude<Switch$1.RootProps, "size" | "colorPalette"> & PropsW
|
|
1837
1795
|
*
|
1838
1796
|
* ```
|
1839
1797
|
*/
|
1840
|
-
declare const Switch: React__default.ForwardRefExoticComponent<Switch$1.RootProps & {
|
1798
|
+
declare const Switch: React__default.ForwardRefExoticComponent<Switch$1.RootProps & FieldBaseProps & {
|
1841
1799
|
size?: ConditionalValue<"sm" | "md" | "lg" | undefined>;
|
1842
1800
|
} & {
|
1843
1801
|
children?: React__default.ReactNode | undefined;
|
@@ -1916,11 +1874,7 @@ type TextareaProps = Exclude<TextareaProps$1, "size" | "colorPalette"> & FieldPr
|
|
1916
1874
|
*/
|
1917
1875
|
declare const Textarea: React__default.ForwardRefExoticComponent<TextareaProps$1 & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
|
1918
1876
|
children?: ReactNode | undefined;
|
1919
|
-
} & {
|
1920
|
-
label?: React__default.ReactNode;
|
1921
|
-
helperText?: React__default.ReactNode;
|
1922
|
-
errorText?: React__default.ReactNode;
|
1923
|
-
} & {
|
1877
|
+
} & FieldBaseProps & {
|
1924
1878
|
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | undefined>;
|
1925
1879
|
} & {
|
1926
1880
|
label: ReactNode;
|
@@ -3626,7 +3580,7 @@ type ToastProps = {
|
|
3626
3580
|
variant: Variant;
|
3627
3581
|
id?: string;
|
3628
3582
|
};
|
3629
|
-
declare const createToast: ({ text, variant, id, duration, }: ToastProps) => string;
|
3583
|
+
declare const createToast: ({ text, variant, id, duration, }: ToastProps) => string | undefined;
|
3630
3584
|
|
3631
3585
|
type BadgeProps = BadgeProps$1 & {
|
3632
3586
|
icon?: IconComponent;
|
@@ -3712,4 +3666,4 @@ declare const Text: React$1.ForwardRefExoticComponent<Omit<TextProps$1, "textSty
|
|
3712
3666
|
**/
|
3713
3667
|
declare function slugify(text: string | string[], maxLength?: number): string;
|
3714
3668
|
|
3715
|
-
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 };
|