@vygruppen/spor-react 12.8.0 → 12.8.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 +12 -12
- package/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +16 -0
- package/dist/index.cjs +162 -164
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -10
- package/dist/index.d.ts +11 -10
- package/dist/index.mjs +49 -51
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/input/CheckboxGroup.tsx +16 -27
- package/src/input/Field.tsx +4 -1
- package/src/theme/slot-recipes/field.ts +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.8.
|
4
|
+
"version": "12.8.2",
|
5
5
|
"exports": {
|
6
6
|
".": {
|
7
7
|
"types": "./dist/index.d.ts",
|
@@ -46,9 +46,9 @@
|
|
46
46
|
"react-stately": "^3.31.1",
|
47
47
|
"react-swipeable": "^7.0.1",
|
48
48
|
"usehooks-ts": "^3.1.0",
|
49
|
-
"@vygruppen/spor-design-tokens": "4.0.7",
|
50
49
|
"@vygruppen/spor-icon-react": "4.2.1",
|
51
|
-
"@vygruppen/spor-loader": "0.7.0"
|
50
|
+
"@vygruppen/spor-loader": "0.7.0",
|
51
|
+
"@vygruppen/spor-design-tokens": "4.0.7"
|
52
52
|
},
|
53
53
|
"devDependencies": {
|
54
54
|
"@react-types/datepicker": "^3.10.0",
|
@@ -67,8 +67,8 @@
|
|
67
67
|
"vitest": "^0.26.3",
|
68
68
|
"vitest-axe": "^0.1.0",
|
69
69
|
"vitest-canvas-mock": "^0.2.2",
|
70
|
-
"@vygruppen/
|
71
|
-
"@vygruppen/
|
70
|
+
"@vygruppen/eslint-config": "1.1.1",
|
71
|
+
"@vygruppen/tsconfig": "0.1.1"
|
72
72
|
},
|
73
73
|
"peerDependencies": {
|
74
74
|
"react": ">=18.0.0 <19.0.0",
|
@@ -1,21 +1,10 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
CheckboxGroupProps as ChakraCheckboxGroupProps,
|
4
|
-
Stack,
|
5
|
-
} from "@chakra-ui/react";
|
6
|
-
import React, { forwardRef } from "react";
|
1
|
+
import { CheckboxGroup as ChakraCheckboxGroup, Stack } from "@chakra-ui/react";
|
2
|
+
import React from "react";
|
7
3
|
|
8
|
-
export type CheckboxGroupProps =
|
9
|
-
|
10
|
-
"colorPalette" | "size" | "variant"
|
4
|
+
export type CheckboxGroupProps = React.ComponentProps<
|
5
|
+
typeof ChakraCheckboxGroup
|
11
6
|
> & {
|
12
|
-
/* Defaults to row */
|
13
7
|
direction?: "row" | "column";
|
14
|
-
children: React.ReactNode;
|
15
|
-
/* Defaults to 1 */
|
16
|
-
gap?: number | string;
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
18
|
-
[key: string]: any; //Find a way to not use type any
|
19
8
|
};
|
20
9
|
/**
|
21
10
|
* Used to group several checkboxes together. You can pass the default value, as well as whether or not they're all disabled
|
@@ -36,19 +25,19 @@ export type CheckboxGroupProps = Exclude<
|
|
36
25
|
* <Checkbox>Business</Checkbox>
|
37
26
|
* <Checkbox>First Class</Checkbox>
|
38
27
|
* </CheckboxGroup>
|
28
|
+
* ```
|
39
29
|
*/
|
40
30
|
|
41
|
-
export const CheckboxGroup =
|
42
|
-
|
43
|
-
|
31
|
+
export const CheckboxGroup = (props: CheckboxGroupProps) => {
|
32
|
+
// Forwardref caues issue with prop types not working. Forwardref is unessessary here, as ChakraCheckbox already has a ref prop and is deprecated in react 19.
|
33
|
+
const { direction = "row", children, gap = 1, ...rest } = props;
|
44
34
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
);
|
35
|
+
return (
|
36
|
+
<ChakraCheckboxGroup {...rest}>
|
37
|
+
<Stack direction={direction} gap={gap}>
|
38
|
+
{children}
|
39
|
+
</Stack>
|
40
|
+
</ChakraCheckboxGroup>
|
41
|
+
);
|
42
|
+
};
|
54
43
|
CheckboxGroup.displayName = "CheckboxGroup";
|
package/src/input/Field.tsx
CHANGED
@@ -28,7 +28,10 @@ export type FieldBaseProps = {
|
|
28
28
|
floatingLabel?: boolean;
|
29
29
|
};
|
30
30
|
|
31
|
-
export type FieldProps = Omit<
|
31
|
+
export type FieldProps = Omit<
|
32
|
+
ChakraField.RootProps,
|
33
|
+
"label" | "onChange" | "onBlur"
|
34
|
+
> &
|
32
35
|
React.PropsWithChildren<FieldVariantProps> &
|
33
36
|
FieldBaseProps;
|
34
37
|
|