@vygruppen/spor-react 12.10.5 → 12.11.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/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/index.cjs +42 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.mjs +42 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dialog/Drawer.tsx +3 -3
- package/src/dialog/types.ts +4 -2
- package/src/input/AttachedInputs.tsx +3 -1
- package/src/input/PhoneNumberInput.tsx +0 -6
- package/src/input/Textarea.tsx +22 -3
package/package.json
CHANGED
package/src/dialog/Drawer.tsx
CHANGED
@@ -75,7 +75,7 @@ export const DrawerContent = forwardRef<HTMLDivElement, DrawerContentProps>(
|
|
75
75
|
const sizeNotFull = size !== "full";
|
76
76
|
return (
|
77
77
|
<Portal disabled={!portalled} container={portalRef}>
|
78
|
-
<ChakraDrawer.Positioner>
|
78
|
+
<ChakraDrawer.Positioner asChild>
|
79
79
|
<Box {...handlers} width="100%">
|
80
80
|
<ChakraDrawer.Content ref={ref} {...rest}>
|
81
81
|
{sizeNotFull && placement === "bottom" && <CloseDrawerLine />}
|
@@ -145,7 +145,7 @@ export const DrawerFullScreenHeader = forwardRef<
|
|
145
145
|
HTMLDivElement,
|
146
146
|
DrawerFullScreenHeaderProps
|
147
147
|
>((props, ref) => {
|
148
|
-
const { backTrigger = true, closeTrigger = true,
|
148
|
+
const { backTrigger = true, closeTrigger = true, children } = props;
|
149
149
|
return (
|
150
150
|
<ChakraDrawer.Header {...props} ref={ref} asChild>
|
151
151
|
<Grid templateColumns="1fr auto 1fr" height="auto" paddingX="8">
|
@@ -153,7 +153,7 @@ export const DrawerFullScreenHeader = forwardRef<
|
|
153
153
|
{backTrigger && <DrawerBackTrigger />}
|
154
154
|
</GridItem>
|
155
155
|
<GridItem width="full" alignSelf="end" asChild>
|
156
|
-
{
|
156
|
+
{children && <DrawerTitle>{children}</DrawerTitle>}
|
157
157
|
</GridItem>
|
158
158
|
{closeTrigger && (
|
159
159
|
<GridItem width="full" alignSelf="end">
|
package/src/dialog/types.ts
CHANGED
@@ -21,8 +21,10 @@ export type DrawerProps = Omit<
|
|
21
21
|
children: React.ReactNode;
|
22
22
|
};
|
23
23
|
|
24
|
-
export type DrawerFullScreenHeaderProps =
|
24
|
+
export type DrawerFullScreenHeaderProps = Omit<
|
25
|
+
ChakraDrawer.HeaderProps,
|
26
|
+
"title"
|
27
|
+
> & {
|
25
28
|
backTrigger?: boolean;
|
26
29
|
closeTrigger?: boolean;
|
27
|
-
title?: string;
|
28
30
|
};
|
@@ -34,7 +34,9 @@ export const AttachedInputs = forwardRef<HTMLDivElement, AttachedInputsProps>(
|
|
34
34
|
const [recipeProps, restProps] = recipe.splitVariantProps(props);
|
35
35
|
const styles = recipe(recipeProps);
|
36
36
|
|
37
|
-
return
|
37
|
+
return (
|
38
|
+
<Group ref={ref} css={styles} attached isolation="auto" {...restProps} />
|
39
|
+
);
|
38
40
|
},
|
39
41
|
);
|
40
42
|
AttachedInputs.displayName = "AttachedInputs";
|
package/src/input/Textarea.tsx
CHANGED
@@ -76,16 +76,35 @@ const useLabelHeight = (label: ReactNode | undefined) => {
|
|
76
76
|
|
77
77
|
export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
78
78
|
(props, ref) => {
|
79
|
-
const {
|
79
|
+
const {
|
80
|
+
label,
|
81
|
+
variant = "core",
|
82
|
+
invalid,
|
83
|
+
required,
|
84
|
+
errorText,
|
85
|
+
readOnly,
|
86
|
+
helperText,
|
87
|
+
floatingLabel,
|
88
|
+
...restProps
|
89
|
+
} = props;
|
80
90
|
const recipe = useRecipe({ key: "textarea" });
|
81
91
|
const styles = recipe({ variant });
|
82
92
|
|
83
93
|
const { labelRef, labelHeight } = useLabelHeight(label);
|
84
94
|
|
85
95
|
return (
|
86
|
-
<Field
|
96
|
+
<Field
|
97
|
+
label={label}
|
98
|
+
errorText={errorText}
|
99
|
+
helperText={helperText}
|
100
|
+
invalid={invalid}
|
101
|
+
required={required}
|
102
|
+
readOnly={readOnly}
|
103
|
+
floatingLabel={floatingLabel}
|
104
|
+
position="relative"
|
105
|
+
>
|
87
106
|
<ChakraTextarea
|
88
|
-
{...
|
107
|
+
{...restProps}
|
89
108
|
css={styles}
|
90
109
|
className="peer"
|
91
110
|
ref={ref}
|