@vygruppen/spor-react 13.0.0 → 13.0.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/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-postinstall.log +4 -6
- package/CHANGELOG.md +15 -0
- package/dist/index.cjs +97 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -85
- package/dist/index.d.ts +85 -85
- package/dist/index.mjs +97 -134
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/accordion/Accordion.tsx +3 -3
- package/src/accordion/Expandable.tsx +1 -1
- package/src/alert/Alert.tsx +1 -1
- package/src/alert/AlertIcon.tsx +1 -57
- package/src/alert/ExpandableAlert.tsx +1 -1
- package/src/alert/ServiceAlert.tsx +1 -1
- package/src/breadcrumb/Breadcrumb.tsx +1 -1
- package/src/button/Button.tsx +1 -1
- package/src/button/ButtonGroup.tsx +1 -1
- package/src/button/Clipboard.tsx +3 -3
- package/src/button/CloseButton.tsx +1 -1
- package/src/button/FloatingActionButton.tsx +1 -1
- package/src/button/IconButton.tsx +1 -1
- package/src/calendar/CalendarContext.tsx +1 -1
- package/src/color-mode/color-mode.tsx +1 -1
- package/src/datepicker/CalendarTriggerButton.tsx +1 -1
- package/src/datepicker/DateField.tsx +1 -1
- package/src/datepicker/DatePicker.tsx +1 -1
- package/src/datepicker/DateTimeSegment.tsx +1 -1
- package/src/datepicker/StyledField.tsx +1 -1
- package/src/dialog/Dialog.tsx +2 -2
- package/src/dialog/Drawer.tsx +4 -4
- package/src/input/AttachedInputs.tsx +1 -1
- package/src/input/Autocomplete.tsx +1 -1
- package/src/input/CardSelect.tsx +2 -2
- package/src/input/Checkbox.tsx +1 -1
- package/src/input/ChoiceChip.tsx +1 -1
- package/src/input/CountryCodeSelect.tsx +1 -1
- package/src/input/Field.tsx +2 -2
- package/src/input/FloatingLabel.tsx +1 -1
- package/src/input/Input.tsx +1 -1
- package/src/input/NativeSelect.tsx +1 -1
- package/src/input/NumericStepper.tsx +2 -2
- package/src/input/PasswordInput.tsx +2 -2
- package/src/input/PhoneNumberInput.tsx +1 -1
- package/src/input/Popover.tsx +1 -1
- package/src/input/Radio.tsx +2 -2
- package/src/input/SearchInput.tsx +1 -1
- package/src/input/Select.tsx +7 -7
- package/src/input/Switch.tsx +10 -2
- package/src/input/Textarea.tsx +1 -1
- package/src/input/useFLoatingInputState.tsx +1 -1
- package/src/layout/PressableCard.tsx +1 -1
- package/src/layout/RadioCard.tsx +2 -2
- package/src/layout/Separator.tsx +2 -2
- package/src/layout/StaticCard.tsx +1 -1
- package/src/linjetag/LineIcon.tsx +1 -1
- package/src/linjetag/TravelTag.tsx +1 -1
- package/src/link/TextLink.tsx +1 -1
- package/src/loader/ProgressBar.tsx +1 -1
- package/src/loader/ProgressLoader.tsx +1 -1
- package/src/loader/Skeleton.tsx +1 -1
- package/src/logo/CargonetLogo.tsx +1 -1
- package/src/logo/VyLogo.tsx +1 -1
- package/src/logo/VyLogoPride.tsx +1 -1
- package/src/media-controller/JumpButton.tsx +1 -1
- package/src/media-controller/PlayPauseButton.tsx +1 -1
- package/src/media-controller/SkipButton.tsx +1 -1
- package/src/nudge/Nudge.tsx +3 -3
- package/src/pagination/Pagination.tsx +5 -5
- package/src/popover/index.tsx +2 -2
- package/src/progress-indicator/ProgressIndicator.tsx +1 -1
- package/src/stepper/Stepper.tsx +1 -1
- package/src/tab/Tabs.tsx +1 -1
- package/src/theme/recipes/link.ts +1 -0
- package/src/toast/toast.tsx +5 -2
- package/src/tooltip.tsx +2 -2
- package/src/typography/Badge.tsx +1 -1
- package/src/typography/Code.tsx +1 -1
- package/src/typography/Heading.tsx +1 -1
- package/src/typography/Text.tsx +1 -1
package/package.json
CHANGED
|
@@ -56,7 +56,7 @@ export const Accordion = ({
|
|
|
56
56
|
ref,
|
|
57
57
|
...props
|
|
58
58
|
}: AccordionProps & {
|
|
59
|
-
ref?: React.
|
|
59
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
60
60
|
}) => {
|
|
61
61
|
const { variant = "core", children, gap = 2, css, ...rest } = props;
|
|
62
62
|
const recipe = useSlotRecipe({ key: "accordion" });
|
|
@@ -77,7 +77,7 @@ export const AccordionItemTrigger = function AccordionItemTrigger({
|
|
|
77
77
|
ref,
|
|
78
78
|
...props
|
|
79
79
|
}: AccordionItemTriggerProps & {
|
|
80
|
-
ref?: React.
|
|
80
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
81
81
|
}) {
|
|
82
82
|
const {
|
|
83
83
|
startElement,
|
|
@@ -115,7 +115,7 @@ export const AccordionItemContent = function AccordionItemContent({
|
|
|
115
115
|
ref,
|
|
116
116
|
...props
|
|
117
117
|
}: AccordionItemContentProps & {
|
|
118
|
-
ref?: React.
|
|
118
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
119
119
|
}) {
|
|
120
120
|
const {
|
|
121
121
|
children,
|
package/src/alert/Alert.tsx
CHANGED
package/src/alert/AlertIcon.tsx
CHANGED
|
@@ -12,9 +12,7 @@ import {
|
|
|
12
12
|
SuccessFill24Icon,
|
|
13
13
|
WarningFill24Icon,
|
|
14
14
|
} from "@vygruppen/spor-icon-react";
|
|
15
|
-
import { VisuallyHidden } from "react-aria";
|
|
16
15
|
|
|
17
|
-
import { createTexts, useTranslation } from "../i18n";
|
|
18
16
|
import { AlertProps } from "./Alert";
|
|
19
17
|
|
|
20
18
|
type AlertIconProps = {
|
|
@@ -30,13 +28,10 @@ export const AlertIcon = ({
|
|
|
30
28
|
variant,
|
|
31
29
|
customIcon: CustomAlertIcon,
|
|
32
30
|
}: AlertIconProps & {
|
|
33
|
-
ref?: React.
|
|
31
|
+
ref?: React.Ref<SVGSVGElement>;
|
|
34
32
|
}) => {
|
|
35
|
-
const { t } = useTranslation();
|
|
36
|
-
|
|
37
33
|
return (
|
|
38
34
|
<Box ref={ref}>
|
|
39
|
-
<VisuallyHidden>{t(texts[variant as keyof typeof texts])}</VisuallyHidden>
|
|
40
35
|
{CustomAlertIcon ? (
|
|
41
36
|
<CustomAlertIcon color={`alert.${variant}.icon`} />
|
|
42
37
|
) : (
|
|
@@ -90,54 +85,3 @@ export const BaseAlertIcon = ({
|
|
|
90
85
|
}
|
|
91
86
|
}
|
|
92
87
|
};
|
|
93
|
-
|
|
94
|
-
const texts = createTexts({
|
|
95
|
-
info: {
|
|
96
|
-
nb: "Informasjon",
|
|
97
|
-
nn: "Informasjon",
|
|
98
|
-
sv: "Information",
|
|
99
|
-
en: "Information",
|
|
100
|
-
},
|
|
101
|
-
success: {
|
|
102
|
-
nb: "Suksess",
|
|
103
|
-
nn: "Suksess",
|
|
104
|
-
sv: "Succé",
|
|
105
|
-
en: "Success",
|
|
106
|
-
},
|
|
107
|
-
important: {
|
|
108
|
-
nb: "Viktig",
|
|
109
|
-
nn: "Viktig",
|
|
110
|
-
sv: "Viktig",
|
|
111
|
-
en: "Important",
|
|
112
|
-
},
|
|
113
|
-
alt: {
|
|
114
|
-
nb: "Alternativ",
|
|
115
|
-
nn: "Alternativ",
|
|
116
|
-
sv: "Alternativ",
|
|
117
|
-
en: "Alternative",
|
|
118
|
-
},
|
|
119
|
-
error: {
|
|
120
|
-
nb: "Feil",
|
|
121
|
-
nn: "Feil",
|
|
122
|
-
sv: "Fel",
|
|
123
|
-
en: "Error",
|
|
124
|
-
},
|
|
125
|
-
"error-secondary": {
|
|
126
|
-
nb: "Feil",
|
|
127
|
-
nn: "Feil",
|
|
128
|
-
sv: "Fel",
|
|
129
|
-
en: "Error",
|
|
130
|
-
},
|
|
131
|
-
neutral: {
|
|
132
|
-
nb: "Nøytral",
|
|
133
|
-
nn: "Nøytral",
|
|
134
|
-
sv: "Neutral",
|
|
135
|
-
en: "Neutral",
|
|
136
|
-
},
|
|
137
|
-
service: {
|
|
138
|
-
nb: "Service",
|
|
139
|
-
nn: "Service",
|
|
140
|
-
sv: "Service",
|
|
141
|
-
en: "Service",
|
|
142
|
-
},
|
|
143
|
-
});
|
|
@@ -26,7 +26,7 @@ export const Breadcrumb = ({
|
|
|
26
26
|
css,
|
|
27
27
|
...props
|
|
28
28
|
}: BreadcrumbRootProps & {
|
|
29
|
-
ref?: React.
|
|
29
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
30
30
|
}) => {
|
|
31
31
|
const validChildren = React.Children.toArray(children).filter((element) =>
|
|
32
32
|
React.isValidElement(element),
|
package/src/button/Button.tsx
CHANGED
|
@@ -52,7 +52,7 @@ export const ButtonGroup = ({
|
|
|
52
52
|
ref,
|
|
53
53
|
...props
|
|
54
54
|
}: ButtonGroupProps & {
|
|
55
|
-
ref?: React.
|
|
55
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
56
56
|
}) => {
|
|
57
57
|
const recipe = useRecipe({ key: "buttonGroup" });
|
|
58
58
|
const [recipeProps, restProps] = recipe.splitVariantProps(props);
|
package/src/button/Clipboard.tsx
CHANGED
|
@@ -24,7 +24,7 @@ const ClipboardIcon = ({
|
|
|
24
24
|
ref,
|
|
25
25
|
...props
|
|
26
26
|
}: ChakraClipboard.IndicatorProps & {
|
|
27
|
-
ref?: React.
|
|
27
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
28
28
|
}) => {
|
|
29
29
|
return (
|
|
30
30
|
<ChakraClipboard.Indicator
|
|
@@ -41,7 +41,7 @@ const ClipboardCopyText = ({
|
|
|
41
41
|
ref,
|
|
42
42
|
...props
|
|
43
43
|
}: ChakraClipboard.IndicatorProps & {
|
|
44
|
-
ref?: React.
|
|
44
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
45
45
|
}) => {
|
|
46
46
|
const { t } = useTranslation();
|
|
47
47
|
return (
|
|
@@ -61,7 +61,7 @@ export const ClipboardButton = ({
|
|
|
61
61
|
ref,
|
|
62
62
|
...props
|
|
63
63
|
}: ClipboardButtonProps & {
|
|
64
|
-
ref?: React.
|
|
64
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
65
65
|
}) => {
|
|
66
66
|
return (
|
|
67
67
|
<ChakraClipboard.Trigger asChild>
|
|
@@ -45,7 +45,7 @@ export const FloatingActionButton = ({
|
|
|
45
45
|
placement = "bottom right",
|
|
46
46
|
...props
|
|
47
47
|
}: FloatingActionButtonProps & {
|
|
48
|
-
ref?: React.
|
|
48
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
49
49
|
}) => {
|
|
50
50
|
const scrollDirection = useScrollDirection();
|
|
51
51
|
|
|
@@ -60,7 +60,7 @@ export const IconButton = ({
|
|
|
60
60
|
ref,
|
|
61
61
|
...props
|
|
62
62
|
}: IconButtonProps & {
|
|
63
|
-
ref?: React.
|
|
63
|
+
ref?: React.Ref<HTMLButtonElement | null>;
|
|
64
64
|
}) => {
|
|
65
65
|
const { icon, size = "sm", loading = false, ...rest } = props;
|
|
66
66
|
return (
|
|
@@ -34,7 +34,7 @@ type BaseCalendarState = {
|
|
|
34
34
|
prevButtonProps: AriaButtonProps<"button">;
|
|
35
35
|
startValue: CalendarDate | null;
|
|
36
36
|
isSelectingRange: boolean;
|
|
37
|
-
ref?: React.
|
|
37
|
+
ref?: React.Ref<HTMLDivElement | null>;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
type SingleCalendarState = BaseCalendarState & {
|
|
@@ -27,7 +27,7 @@ export const DateTimeSegment = ({
|
|
|
27
27
|
ariaDescription,
|
|
28
28
|
variant,
|
|
29
29
|
}: DateTimeSegmentProps & {
|
|
30
|
-
ref?: React.
|
|
30
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
31
31
|
}) => {
|
|
32
32
|
const internalRef = useRef(null);
|
|
33
33
|
const ref = externalRef ?? internalRef;
|
package/src/dialog/Dialog.tsx
CHANGED
|
@@ -15,7 +15,7 @@ export const DialogContent = ({
|
|
|
15
15
|
ref,
|
|
16
16
|
...props
|
|
17
17
|
}: DialogContentProps & {
|
|
18
|
-
ref?: React.
|
|
18
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
19
19
|
}) => {
|
|
20
20
|
const {
|
|
21
21
|
children,
|
|
@@ -41,7 +41,7 @@ export const DialogCloseTrigger = function DialogCloseTrigger({
|
|
|
41
41
|
ref,
|
|
42
42
|
...props
|
|
43
43
|
}: ChakraDialog.CloseTriggerProps & {
|
|
44
|
-
ref?: React.
|
|
44
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
45
45
|
}) {
|
|
46
46
|
return (
|
|
47
47
|
<ChakraDialog.CloseTrigger ref={ref} position="absolute" {...props} asChild>
|
package/src/dialog/Drawer.tsx
CHANGED
|
@@ -58,7 +58,7 @@ export const DrawerContent = ({
|
|
|
58
58
|
ref,
|
|
59
59
|
...props
|
|
60
60
|
}: DrawerContentProps & {
|
|
61
|
-
ref?: React.
|
|
61
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
62
62
|
}) => {
|
|
63
63
|
const {
|
|
64
64
|
children,
|
|
@@ -127,7 +127,7 @@ export const DrawerCloseTrigger = function DrawerCloseTrigger({
|
|
|
127
127
|
ref,
|
|
128
128
|
...props
|
|
129
129
|
}: DrawerCloseTriggerProps & {
|
|
130
|
-
ref?: React.
|
|
130
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
131
131
|
}) {
|
|
132
132
|
const { showText = false, ...rest } = props;
|
|
133
133
|
const { size } = useRootDrawerProps();
|
|
@@ -151,7 +151,7 @@ export const DrawerBackTrigger = ({
|
|
|
151
151
|
ref,
|
|
152
152
|
...props
|
|
153
153
|
}: ChakraDrawer.CloseTriggerProps & {
|
|
154
|
-
ref?: React.
|
|
154
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
155
155
|
}) => {
|
|
156
156
|
const { t } = useTranslation();
|
|
157
157
|
return (
|
|
@@ -169,7 +169,7 @@ export const DrawerFullScreenHeader = ({
|
|
|
169
169
|
ref,
|
|
170
170
|
...props
|
|
171
171
|
}: DrawerFullScreenHeaderProps & {
|
|
172
|
-
ref?: React.
|
|
172
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
173
173
|
}) => {
|
|
174
174
|
const { backTrigger = true, closeTrigger = true, children } = props;
|
|
175
175
|
return (
|
|
@@ -46,7 +46,7 @@ export const AttachedInputs = ({
|
|
|
46
46
|
ref,
|
|
47
47
|
...props
|
|
48
48
|
}: AttachedInputsProps & {
|
|
49
|
-
ref?: React.
|
|
49
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
50
50
|
}) => {
|
|
51
51
|
const recipe = useRecipe({ key: "attachedInputs" });
|
|
52
52
|
const [recipeProps, { onFlip, flipAriaLabel, ...restProps }] =
|
package/src/input/CardSelect.tsx
CHANGED
|
@@ -22,7 +22,7 @@ export const CardSelectContent = ({
|
|
|
22
22
|
children,
|
|
23
23
|
...props
|
|
24
24
|
}: StaticCardProps & {
|
|
25
|
-
ref?: React.
|
|
25
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
26
26
|
}) => {
|
|
27
27
|
return (
|
|
28
28
|
<Portal>
|
|
@@ -75,7 +75,7 @@ export const CardSelectTrigger = ({
|
|
|
75
75
|
children,
|
|
76
76
|
...props
|
|
77
77
|
}: CardSelectTriggerProps & {
|
|
78
|
-
ref?: React.
|
|
78
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
79
79
|
}) => {
|
|
80
80
|
const ChevronIcon =
|
|
81
81
|
size === "sm" ? DropdownDownFill18Icon : DropdownDownFill24Icon;
|
package/src/input/Checkbox.tsx
CHANGED
package/src/input/ChoiceChip.tsx
CHANGED
package/src/input/Field.tsx
CHANGED
|
@@ -84,7 +84,7 @@ export const Field = ({
|
|
|
84
84
|
ref,
|
|
85
85
|
...props
|
|
86
86
|
}: FieldProps & {
|
|
87
|
-
ref?: React.
|
|
87
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
88
88
|
}) => {
|
|
89
89
|
const {
|
|
90
90
|
label,
|
|
@@ -152,7 +152,7 @@ export const FieldErrorText = ({
|
|
|
152
152
|
ref,
|
|
153
153
|
...props
|
|
154
154
|
}: ChakraField.ErrorTextProps & {
|
|
155
|
-
ref?: React.
|
|
155
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
156
156
|
}) => {
|
|
157
157
|
return (
|
|
158
158
|
<ChakraField.ErrorText ref={ref}>{props.children}</ChakraField.ErrorText>
|
|
@@ -4,7 +4,7 @@ export const FloatingLabel = ({
|
|
|
4
4
|
ref,
|
|
5
5
|
...props
|
|
6
6
|
}: FieldLabelProps & {
|
|
7
|
-
ref?: React.
|
|
7
|
+
ref?: React.Ref<HTMLLabelElement | null>;
|
|
8
8
|
}) => <Field.Label ref={ref} {...props} css={floatingLabelStyles} />;
|
|
9
9
|
|
|
10
10
|
const floatingLabelStyles = defineStyle({
|
package/src/input/Input.tsx
CHANGED
|
@@ -77,7 +77,7 @@ export const Input = ({
|
|
|
77
77
|
labelAsChild,
|
|
78
78
|
...props
|
|
79
79
|
}: InputProps & {
|
|
80
|
-
ref?: React.
|
|
80
|
+
ref?: React.Ref<HTMLInputElement | null>;
|
|
81
81
|
}) => {
|
|
82
82
|
const recipe = useRecipe({ key: "input" });
|
|
83
83
|
const [recipeProps, restProps] = recipe.splitVariantProps(props);
|
|
@@ -67,7 +67,7 @@ export const NumericStepper = ({
|
|
|
67
67
|
ref,
|
|
68
68
|
...props
|
|
69
69
|
}: NumericStepperProps & {
|
|
70
|
-
ref?: React.
|
|
70
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
71
71
|
}) => {
|
|
72
72
|
const {
|
|
73
73
|
name: nameProperty,
|
|
@@ -218,7 +218,7 @@ const VerySmallButton = ({
|
|
|
218
218
|
ref,
|
|
219
219
|
...props
|
|
220
220
|
}: VerySmallButtonProps & {
|
|
221
|
-
ref?: React.
|
|
221
|
+
ref?: React.Ref<HTMLButtonElement | null>;
|
|
222
222
|
}) => {
|
|
223
223
|
const { withStepLabel = false, ...rest } = props;
|
|
224
224
|
|
|
@@ -46,7 +46,7 @@ export const PasswordInput = ({
|
|
|
46
46
|
ref,
|
|
47
47
|
...props
|
|
48
48
|
}: PasswordInputProps & {
|
|
49
|
-
ref?: React.
|
|
49
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
50
50
|
}) => {
|
|
51
51
|
const {
|
|
52
52
|
defaultVisible,
|
|
@@ -94,7 +94,7 @@ const VisibilityTrigger = ({
|
|
|
94
94
|
ref,
|
|
95
95
|
...props
|
|
96
96
|
}: ButtonProps & {
|
|
97
|
-
ref?: React.
|
|
97
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
98
98
|
}) => {
|
|
99
99
|
return (
|
|
100
100
|
<Button
|
package/src/input/Popover.tsx
CHANGED
|
@@ -69,7 +69,7 @@ export const Popover = ({
|
|
|
69
69
|
hasBackdrop = true,
|
|
70
70
|
containerPadding = 12,
|
|
71
71
|
}: PopoverProps & {
|
|
72
|
-
ref?: React.
|
|
72
|
+
ref?: React.Ref<HTMLDivElement | null>;
|
|
73
73
|
}) => {
|
|
74
74
|
const internalRef = useRef<HTMLDivElement>(null);
|
|
75
75
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/src/input/Radio.tsx
CHANGED
|
@@ -32,7 +32,7 @@ export const Radio = ({
|
|
|
32
32
|
ref,
|
|
33
33
|
...props
|
|
34
34
|
}: RadioProps & {
|
|
35
|
-
ref?: React.
|
|
35
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
36
36
|
}) => {
|
|
37
37
|
const { children, inputProps, rootRef, ...rest } = props;
|
|
38
38
|
|
|
@@ -55,7 +55,7 @@ export const RadioGroup = ({
|
|
|
55
55
|
ref,
|
|
56
56
|
...props
|
|
57
57
|
}: RadioGroupProps & {
|
|
58
|
-
ref?: React.
|
|
58
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
59
59
|
}) => {
|
|
60
60
|
return <ChakraRadioGroup.Root ref={ref} {...props} aria-labelledby="" />;
|
|
61
61
|
};
|
|
@@ -22,7 +22,7 @@ export const SearchInput = ({
|
|
|
22
22
|
ref,
|
|
23
23
|
...props
|
|
24
24
|
}: SearchInputProps & {
|
|
25
|
-
ref?: React.
|
|
25
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
26
26
|
}) => {
|
|
27
27
|
const { t } = useTranslation();
|
|
28
28
|
const { variant = "core", onReset, label, value } = props;
|
package/src/input/Select.tsx
CHANGED
|
@@ -61,7 +61,7 @@ export const Select = ({
|
|
|
61
61
|
ref,
|
|
62
62
|
...props
|
|
63
63
|
}: SelectProps & {
|
|
64
|
-
ref?: React.
|
|
64
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
65
65
|
}) => {
|
|
66
66
|
const {
|
|
67
67
|
variant = "core",
|
|
@@ -126,7 +126,7 @@ export const SelectItem = ({
|
|
|
126
126
|
ref,
|
|
127
127
|
...props
|
|
128
128
|
}: SelectItemProps & {
|
|
129
|
-
ref?: React.
|
|
129
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
130
130
|
}) => {
|
|
131
131
|
const { item, children, description, ...rest } = props;
|
|
132
132
|
const recipe = useSlotRecipe({ key: "select" });
|
|
@@ -158,7 +158,7 @@ export const SelectItemGroup = function SelectItemGroup({
|
|
|
158
158
|
ref,
|
|
159
159
|
...props
|
|
160
160
|
}: SelectItemGroupProps & {
|
|
161
|
-
ref?: React.
|
|
161
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
162
162
|
}) {
|
|
163
163
|
const { children, label, ...rest } = props;
|
|
164
164
|
return (
|
|
@@ -178,7 +178,7 @@ export const SelectTrigger = function SelectTrigger({
|
|
|
178
178
|
ref,
|
|
179
179
|
...props
|
|
180
180
|
}: SelectTriggerProps & {
|
|
181
|
-
ref?: React.
|
|
181
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
182
182
|
}) {
|
|
183
183
|
const { children, clearable, ...rest } = props;
|
|
184
184
|
const recipe = useSlotRecipe({ key: "select" });
|
|
@@ -209,7 +209,7 @@ const SelectClearTrigger = function SelectClearTrigger({
|
|
|
209
209
|
ref,
|
|
210
210
|
...props
|
|
211
211
|
}: SelectClearTriggerProps & {
|
|
212
|
-
ref?: React.
|
|
212
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
213
213
|
}) {
|
|
214
214
|
return (
|
|
215
215
|
<ChakraSelect.ClearTrigger asChild {...props} ref={ref}>
|
|
@@ -233,7 +233,7 @@ export const SelectContent = function SelectContent({
|
|
|
233
233
|
ref,
|
|
234
234
|
...props
|
|
235
235
|
}: SelectContentProps & {
|
|
236
|
-
ref?: React.
|
|
236
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
237
237
|
}) {
|
|
238
238
|
const { portalled = true, portalRef, baseStyle, ...rest } = props;
|
|
239
239
|
return (
|
|
@@ -255,7 +255,7 @@ export const SelectValueText = function SelectValueText({
|
|
|
255
255
|
ref,
|
|
256
256
|
...props
|
|
257
257
|
}: SelectValueTextProps & {
|
|
258
|
-
ref?: React.
|
|
258
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
259
259
|
}) {
|
|
260
260
|
const { children, withPlaceholder, placeholder, ...rest } = props;
|
|
261
261
|
return (
|