@vygruppen/spor-react 12.10.4 → 12.10.6
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 -12
- package/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/index.cjs +42 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +42 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/dialog/Drawer.tsx +1 -1
- package/src/dialog/types.ts +2 -2
- package/src/input/AttachedInputs.tsx +3 -1
- package/src/input/PhoneNumberInput.tsx +0 -6
- package/src/input/Textarea.tsx +22 -3
- package/src/linjetag/TravelTag.tsx +1 -0
- package/src/toast/toast.tsx +1 -1
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vygruppen/spor-react",
|
3
3
|
"type": "module",
|
4
|
-
"version": "12.10.
|
4
|
+
"version": "12.10.6",
|
5
5
|
"exports": {
|
6
6
|
".": {
|
7
7
|
"types": "./dist/index.d.ts",
|
@@ -47,8 +47,8 @@
|
|
47
47
|
"react-swipeable": "^7.0.1",
|
48
48
|
"usehooks-ts": "^3.1.0",
|
49
49
|
"@vygruppen/spor-design-tokens": "4.0.8",
|
50
|
-
"@vygruppen/spor-
|
51
|
-
"@vygruppen/spor-
|
50
|
+
"@vygruppen/spor-icon-react": "4.2.1",
|
51
|
+
"@vygruppen/spor-loader": "0.7.0"
|
52
52
|
},
|
53
53
|
"devDependencies": {
|
54
54
|
"@react-types/datepicker": "^3.10.0",
|
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 />}
|
package/src/dialog/types.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Drawer as ChakraDrawer, RecipeVariantProps } from "@chakra-ui/react";
|
2
|
-
import { PropsWithChildren } from "react";
|
2
|
+
import { PropsWithChildren, ReactNode } from "react";
|
3
3
|
|
4
4
|
import { drawerSlotRecipe } from "@/theme/slot-recipes/drawer";
|
5
5
|
|
@@ -24,5 +24,5 @@ export type DrawerProps = Omit<
|
|
24
24
|
export type DrawerFullScreenHeaderProps = ChakraDrawer.HeaderProps & {
|
25
25
|
backTrigger?: boolean;
|
26
26
|
closeTrigger?: boolean;
|
27
|
-
title?:
|
27
|
+
title?: ReactNode;
|
28
28
|
};
|
@@ -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}
|