@obosbbl/grunnmuren-react 1.2.0 → 1.2.1
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/dist/Radio/Radio.d.ts
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
export interface RadioProps extends React.ComponentPropsWithoutRef<'input'> {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
}
|
|
5
|
-
export declare const Radio: (
|
|
5
|
+
export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -15,4 +15,4 @@ export interface RadioGroupProps extends Omit<React.ComponentPropsWithoutRef<'di
|
|
|
15
15
|
/** The value of the selected radio button. For controlled usage */
|
|
16
16
|
value?: string;
|
|
17
17
|
}
|
|
18
|
-
export declare const RadioGroup: (
|
|
18
|
+
export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/grunnmuren.es.js
CHANGED
|
@@ -983,7 +983,7 @@ const RadioContext = createContext({
|
|
|
983
983
|
required: false,
|
|
984
984
|
value: void 0
|
|
985
985
|
});
|
|
986
|
-
const Radio = (props) => {
|
|
986
|
+
const Radio = forwardRef((props, ref) => {
|
|
987
987
|
const _a = props, {
|
|
988
988
|
children,
|
|
989
989
|
className
|
|
@@ -1008,11 +1008,12 @@ const Radio = (props) => {
|
|
|
1008
1008
|
name,
|
|
1009
1009
|
onChange: isControlled ? onChange : void 0,
|
|
1010
1010
|
required,
|
|
1011
|
-
type: "radio"
|
|
1011
|
+
type: "radio",
|
|
1012
|
+
ref
|
|
1012
1013
|
}, rest)), children]
|
|
1013
1014
|
});
|
|
1014
|
-
};
|
|
1015
|
-
const RadioGroup = (props) => {
|
|
1015
|
+
});
|
|
1016
|
+
const RadioGroup = forwardRef((props, ref) => {
|
|
1016
1017
|
const isControlled = "value" in props;
|
|
1017
1018
|
const _a = props, {
|
|
1018
1019
|
className,
|
|
@@ -1056,7 +1057,8 @@ const RadioGroup = (props) => {
|
|
|
1056
1057
|
"aria-describedby": description ? helpId : void 0,
|
|
1057
1058
|
"aria-labelledby": label ? labelId : void 0,
|
|
1058
1059
|
className: classNames(className, "flex flex-col gap-4"),
|
|
1059
|
-
role: "radiogroup"
|
|
1060
|
+
role: "radiogroup",
|
|
1061
|
+
ref
|
|
1060
1062
|
}, rest), {
|
|
1061
1063
|
children: [label && /* @__PURE__ */ jsx(FormLabel, {
|
|
1062
1064
|
id: labelId,
|
|
@@ -1068,7 +1070,7 @@ const RadioGroup = (props) => {
|
|
|
1068
1070
|
})]
|
|
1069
1071
|
}))
|
|
1070
1072
|
});
|
|
1071
|
-
};
|
|
1073
|
+
});
|
|
1072
1074
|
const Snackbar = (props) => {
|
|
1073
1075
|
const {
|
|
1074
1076
|
heading,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obosbbl/grunnmuren-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "OBOS Grunnmuren design system React components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@babel/core": "7.18.10",
|
|
21
|
-
"@obosbbl/grunnmuren-tailwind": "0.5.
|
|
21
|
+
"@obosbbl/grunnmuren-tailwind": "0.5.1",
|
|
22
22
|
"@storybook/addon-controls": "6.5.10",
|
|
23
23
|
"@storybook/addon-docs": "6.5.10",
|
|
24
24
|
"@storybook/addon-postcss": "2.0.0",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"react": "18.2.0",
|
|
33
33
|
"react-dom": "18.2.0",
|
|
34
34
|
"require-from-string": "2.0.2",
|
|
35
|
+
"rimraf": "3.0.2",
|
|
35
36
|
"tailwindcss": "3.1.8",
|
|
36
37
|
"vite": "2.9.15",
|
|
37
38
|
"webpack": "5.74.0"
|
|
@@ -41,8 +42,8 @@
|
|
|
41
42
|
"clsx": "1.2.1"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
45
|
+
"@obosbbl/grunnmuren-tailwind": "^0.5.1",
|
|
46
|
+
"react": "^18"
|
|
46
47
|
},
|
|
47
48
|
"peerDependenciesMeta": {
|
|
48
49
|
"@obosbbl/grunnmuren-tailwind": {
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
"scripts": {
|
|
53
54
|
"build": "pnpm run build:lib && pnpm run build:types",
|
|
54
55
|
"build:lib": "vite build",
|
|
55
|
-
"build:types": "tsc --emitDeclarationOnly --declaration",
|
|
56
|
+
"build:types": "tsc --emitDeclarationOnly --declaration && rimraf 'dist/**/stories/'",
|
|
56
57
|
"dev": "start-storybook -p 6006 --ci",
|
|
57
58
|
"build:storybook": "build-storybook"
|
|
58
59
|
}
|