@vygruppen/spor-react 12.10.5 → 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
3
  "type": "module",
4
- "version": "12.10.5",
4
+ "version": "12.10.6",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -68,8 +68,8 @@
68
68
  "vitest": "^0.26.3",
69
69
  "vitest-axe": "^0.1.0",
70
70
  "vitest-canvas-mock": "^0.2.2",
71
- "@vygruppen/tsconfig": "0.1.1",
72
- "@vygruppen/eslint-config": "1.2.3"
71
+ "@vygruppen/eslint-config": "1.2.3",
72
+ "@vygruppen/tsconfig": "0.1.1"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "react": ">=18.0.0 <19.0.0",
@@ -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 />}
@@ -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?: string;
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 <Group ref={ref} css={styles} attached {...restProps} />;
37
+ return (
38
+ <Group ref={ref} css={styles} attached isolation="auto" {...restProps} />
39
+ );
38
40
  },
39
41
  );
40
42
  AttachedInputs.displayName = "AttachedInputs";
@@ -129,10 +129,4 @@ const texts = createTexts({
129
129
  en: "Phone number (optional)",
130
130
  sv: "Telefonnummer (valfritt)",
131
131
  },
132
- countryCodeLabel: {
133
- nb: "Landskode",
134
- nn: "Landskode",
135
- en: "Country code",
136
- sv: "Landskod",
137
- },
138
132
  });
@@ -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 { label, variant = "core", ...fieldProps } = props;
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 {...fieldProps} position="relative">
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
- {...props}
107
+ {...restProps}
89
108
  css={styles}
90
109
  className="peer"
91
110
  ref={ref}