@gnist/design-system 5.5.1 → 5.5.3

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/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.5.3](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@5.5.2...@gnist/design-system@5.5.3) (2026-03-20)
7
+
8
+ **Note:** Version bump only for package @gnist/design-system
9
+
10
+ ## [5.5.2](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@5.5.1...@gnist/design-system@5.5.2) (2026-02-24)
11
+
12
+ ### Bug Fixes
13
+
14
+ * add reserveSpaceForMessage prop to RadioGroup ([9f5e63b](https://github.com/mollerdigital/design-system-design-system/commit/9f5e63b0f2d3895c73628316a0bb95337a4af895))
15
+
6
16
  ## [5.5.1](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@5.5.0...@gnist/design-system@5.5.1) (2026-02-23)
7
17
 
8
18
  **Note:** Version bump only for package @gnist/design-system
@@ -11,7 +11,7 @@ require("@gnist/themes/tokens.css.js");
11
11
  require("react-content-loader");
12
12
  const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
13
13
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
14
- function RadioGroup({ className, label, children, ref, name, value, onChange, required, validity, helperText, direction = "vertical", ...props }) {
14
+ function RadioGroup({ className, label, children, ref, name, value, onChange, required, validity, helperText, direction = "vertical", reserveSpaceForMessage = true, ...props }) {
15
15
  const nameId = React.useId();
16
16
  const radioName = name ?? `groupName-${nameId}`;
17
17
  const isControlledByGroup = name !== void 0 && value !== void 0 && onChange !== void 0;
@@ -24,12 +24,11 @@ function RadioGroup({ className, label, children, ref, name, value, onChange, re
24
24
  disabled: props.disabled
25
25
  } : null;
26
26
  const helperId = `${nameId}-helper`;
27
- return jsxRuntime.jsx("fieldset", { className: classNames__default.default(radiogroup_css.fieldSetStyle, className), ref, ...props, children: jsxRuntime.jsxs(RadioGroupContext, { value: contextValue, children: [jsxRuntime.jsx("legend", { className: radiogroup_css.legendStyle, children: label }), jsxRuntime.jsx("div", { className: radiogroup_css.radioContainerStyle({ direction }), children }), jsxRuntime.jsx(InputHelperText.InputHelperText, { helperText, id: helperId, validity })] }) });
27
+ return jsxRuntime.jsx("fieldset", { className: classNames__default.default(radiogroup_css.fieldSetStyle, className), ref, ...props, children: jsxRuntime.jsxs(RadioGroupContext, { value: contextValue, children: [jsxRuntime.jsx("legend", { className: radiogroup_css.legendStyle, children: label }), jsxRuntime.jsx("div", { className: radiogroup_css.radioContainerStyle({ direction }), children }), jsxRuntime.jsx(InputHelperText.InputHelperText, { helperText, id: helperId, validity, reserveSpaceForMessage })] }) });
28
28
  }
29
29
  const RadioGroupContext = React.createContext(null);
30
30
  function useRadio() {
31
- const context = React.use(RadioGroupContext);
32
- return context;
31
+ return React.use(RadioGroupContext);
33
32
  }
34
33
  exports.RadioGroup = RadioGroup;
35
34
  exports.useRadio = useRadio;
@@ -10,6 +10,7 @@ interface BaseProps extends Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElemen
10
10
  }>;
11
11
  helperText?: string;
12
12
  direction?: "horizontal" | "vertical";
13
+ reserveSpaceForMessage?: boolean;
13
14
  }
14
15
  type ControlledByGroup = {
15
16
  name: string;
@@ -29,7 +30,7 @@ export type RadioGroupProps = BaseProps & (ControlledByGroup | ControlledByItem)
29
30
  *
30
31
  * Documentation: [RadioGroup](https://gnist.moller.no/developers/components/latest/?path=/docs/components-actions-selectioncontrols-radiogroup--docs)
31
32
  **/
32
- export declare function RadioGroup({ className, label, children, ref, name, value, onChange, required, validity, helperText, direction, ...props }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function RadioGroup({ className, label, children, ref, name, value, onChange, required, validity, helperText, direction, reserveSpaceForMessage, ...props }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
33
34
  interface RadioGroupContextProps {
34
35
  name: string;
35
36
  value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/selectionControls/RadioGroup.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,kBAAkB,EAErB,0CAAsD;AAEvD,UAAU,SACN,SAAQ,IAAI,CACR,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EACjD,UAAU,GAAG,MAAM,GAAG,OAAO,CAChC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;QAAE,gBAAgB,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC;AAED,KAAK,iBAAiB,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,SAAS,GACnC,CAAC,iBAAiB,GAAG,gBAAgB,CAAC,CAAC;AAE3C;;;;;;IAMI;AACJ,wBAAgB,UAAU,CAAC,EACvB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAsB,EACtB,GAAG,KAAK,EACX,EAAE,eAAe,2CAuCjB;AAED,UAAU,sBAAsB;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;QAAE,gBAAgB,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAID,wBAAgB,QAAQ,kCAIvB"}
1
+ {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/selectionControls/RadioGroup.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,kBAAkB,EAErB,0CAAsD;AAEvD,UAAU,SACN,SAAQ,IAAI,CACR,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EACjD,UAAU,GAAG,MAAM,GAAG,OAAO,CAChC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;QAAE,gBAAgB,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,KAAK,iBAAiB,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,SAAS,GACnC,CAAC,iBAAiB,GAAG,gBAAgB,CAAC,CAAC;AAE3C;;;;;;IAMI;AACJ,wBAAgB,UAAU,CAAC,EACvB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAsB,EACtB,sBAA6B,EAC7B,GAAG,KAAK,EACX,EAAE,eAAe,2CAwCjB;AAED,UAAU,sBAAsB;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;QAAE,gBAAgB,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAID,wBAAgB,QAAQ,kCAEvB"}
@@ -7,7 +7,7 @@ import { InputHelperText } from "../../../building-blocks/inputs/InputHelperText
7
7
  import "../../../utilities/layout/Row.js";
8
8
  import "@gnist/themes/tokens.css.js";
9
9
  import "react-content-loader";
10
- function RadioGroup({ className, label, children, ref, name, value, onChange, required, validity, helperText, direction = "vertical", ...props }) {
10
+ function RadioGroup({ className, label, children, ref, name, value, onChange, required, validity, helperText, direction = "vertical", reserveSpaceForMessage = true, ...props }) {
11
11
  const nameId = useId();
12
12
  const radioName = name ?? `groupName-${nameId}`;
13
13
  const isControlledByGroup = name !== void 0 && value !== void 0 && onChange !== void 0;
@@ -20,12 +20,11 @@ function RadioGroup({ className, label, children, ref, name, value, onChange, re
20
20
  disabled: props.disabled
21
21
  } : null;
22
22
  const helperId = `${nameId}-helper`;
23
- return jsx("fieldset", { className: classNames(fieldSetStyle, className), ref, ...props, children: jsxs(RadioGroupContext, { value: contextValue, children: [jsx("legend", { className: legendStyle, children: label }), jsx("div", { className: radioContainerStyle({ direction }), children }), jsx(InputHelperText, { helperText, id: helperId, validity })] }) });
23
+ return jsx("fieldset", { className: classNames(fieldSetStyle, className), ref, ...props, children: jsxs(RadioGroupContext, { value: contextValue, children: [jsx("legend", { className: legendStyle, children: label }), jsx("div", { className: radioContainerStyle({ direction }), children }), jsx(InputHelperText, { helperText, id: helperId, validity, reserveSpaceForMessage })] }) });
24
24
  }
25
25
  const RadioGroupContext = createContext(null);
26
26
  function useRadio() {
27
- const context = use(RadioGroupContext);
28
- return context;
27
+ return use(RadioGroupContext);
29
28
  }
30
29
  export {
31
30
  RadioGroup,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnist/design-system",
3
- "version": "5.5.1",
3
+ "version": "5.5.3",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -50,7 +50,7 @@
50
50
  "@base-ui/react": "1.0.0",
51
51
  "@formkit/auto-animate": "^0.8.2",
52
52
  "@gnist/component-utils": "3.0.13",
53
- "@gnist/themes": "^3.28.0",
53
+ "@gnist/themes": "^3.28.1",
54
54
  "@vanilla-extract/css": "^1.17.4",
55
55
  "@vanilla-extract/css-utils": "^0.1.6",
56
56
  "@vanilla-extract/dynamic": "^2.1.5",
@@ -77,7 +77,7 @@
77
77
  "@types/semver": "^7.7.0",
78
78
  "@vitejs/plugin-react-swc": "^3.10.2",
79
79
  "eslint": "^9.33.0",
80
- "eslint-plugin-storybook": "^9.1.2",
80
+ "eslint-plugin-storybook": "^10.2.13",
81
81
  "globby": "^14.1.0",
82
82
  "madge": "^8.0.0",
83
83
  "prettier": "^3.6.2",
@@ -85,7 +85,7 @@
85
85
  "react-dom": "19.2.3",
86
86
  "rollup-plugin-copy": "^3.5.0",
87
87
  "semver": "^7.7.2",
88
- "svgo": "^3.3.2",
88
+ "svgo": "^3.3.3",
89
89
  "svgo-autocrop": "^1.1.2",
90
90
  "tslib": "^2.8.1",
91
91
  "tsx": "^4.20.4",
@@ -102,5 +102,5 @@
102
102
  "optional": true
103
103
  }
104
104
  },
105
- "gitHead": "bc00b5053b6e490e8dad6ae8c8f579776fa37634"
105
+ "gitHead": "d4d9fef28ded7a983f51ed4a9fbdfed424e92f9d"
106
106
  }