@gnist/design-system 5.0.0 → 5.0.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.0.1](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@5.0.0...@gnist/design-system@5.0.1) (2025-11-25)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* check group before setting group.value ([fcb7fb6](https://github.com/mollerdigital/design-system-design-system/commit/fcb7fb6c71faa1bed7a2673beaae172837df773d))
|
|
11
|
+
|
|
6
12
|
## [5.0.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@4.5.1...@gnist/design-system@5.0.0) (2025-11-24)
|
|
7
13
|
|
|
8
14
|
### ⚠ BREAKING CHANGES
|
|
@@ -57,8 +57,8 @@ function RadioButton({
|
|
|
57
57
|
validity,
|
|
58
58
|
reserveSpaceForMessage: canShowErrorMessage
|
|
59
59
|
});
|
|
60
|
-
const
|
|
61
|
-
const
|
|
60
|
+
const effectiveRequired = group?.required ?? required;
|
|
61
|
+
const effectiveChecked = group ? group.value === value : !!checked;
|
|
62
62
|
const effectiveName = group?.name ?? name;
|
|
63
63
|
const effectiveValidity = group?.validity ?? validity;
|
|
64
64
|
const effectiveDisabled = group?.disabled ?? disabled;
|
|
@@ -69,9 +69,9 @@ function RadioButton({
|
|
|
69
69
|
}
|
|
70
70
|
onChange?.(event);
|
|
71
71
|
};
|
|
72
|
-
const radioButtonElement = jsxRuntime.jsx("span", { className: classNames__default.default(shared_css.InputWrapper, className), ref, children: jsxRuntime.jsxs("label", { htmlFor: inputId, className: shared_css.LabelRecipe({ disabled: effectiveDisabled }), id: labelId, children: [jsxRuntime.jsx("input", { type: "radio", id: inputId, name: effectiveName, disabled: effectiveDisabled, required:
|
|
72
|
+
const radioButtonElement = jsxRuntime.jsx("span", { className: classNames__default.default(shared_css.InputWrapper, className), ref, children: jsxRuntime.jsxs("label", { htmlFor: inputId, className: shared_css.LabelRecipe({ disabled: effectiveDisabled }), id: labelId, children: [jsxRuntime.jsx("input", { type: "radio", id: inputId, name: effectiveName, disabled: effectiveDisabled, required: effectiveRequired, onChange: handleChange, value, checked: effectiveChecked, className: shared_css.InputStyleRecipe({
|
|
73
73
|
disabled: effectiveDisabled
|
|
74
|
-
}), tabIndex: 0, ...inputAriaProps, ...rest }), jsxRuntime.jsx(CustomRadioButton, { isChecked, disabled: effectiveDisabled, validity: effectiveValidity }), hideLabel ? jsxRuntime.jsx(ScreenReaderOnly.ScreenReaderOnly, { children: label }) : jsxRuntime.jsx("span", { className: shared_css.LabelStyle, children: label })] }) });
|
|
74
|
+
}), tabIndex: 0, ...inputAriaProps, ...rest }), jsxRuntime.jsx(CustomRadioButton, { isChecked: effectiveChecked, disabled: effectiveDisabled, validity: effectiveValidity }), hideLabel ? jsxRuntime.jsx(ScreenReaderOnly.ScreenReaderOnly, { children: label }) : jsxRuntime.jsx("span", { className: shared_css.LabelStyle, children: label })] }) });
|
|
75
75
|
const descriptionElement = description ? jsxRuntime.jsx(shared.SelectionDescription, { disabled: effectiveDisabled, children: description }) : void 0;
|
|
76
76
|
return jsxRuntime.jsx(shared.HelperTextWrapper, { ...helperTextProps, children: render && render(radioButtonElement, descriptionElement) });
|
|
77
77
|
}
|
|
@@ -53,8 +53,8 @@ function RadioButton({
|
|
|
53
53
|
validity,
|
|
54
54
|
reserveSpaceForMessage: canShowErrorMessage
|
|
55
55
|
});
|
|
56
|
-
const
|
|
57
|
-
const
|
|
56
|
+
const effectiveRequired = group?.required ?? required;
|
|
57
|
+
const effectiveChecked = group ? group.value === value : !!checked;
|
|
58
58
|
const effectiveName = group?.name ?? name;
|
|
59
59
|
const effectiveValidity = group?.validity ?? validity;
|
|
60
60
|
const effectiveDisabled = group?.disabled ?? disabled;
|
|
@@ -65,9 +65,9 @@ function RadioButton({
|
|
|
65
65
|
}
|
|
66
66
|
onChange?.(event);
|
|
67
67
|
};
|
|
68
|
-
const radioButtonElement = jsx("span", { className: classNames(InputWrapper, className), ref, children: jsxs("label", { htmlFor: inputId, className: LabelRecipe({ disabled: effectiveDisabled }), id: labelId, children: [jsx("input", { type: "radio", id: inputId, name: effectiveName, disabled: effectiveDisabled, required:
|
|
68
|
+
const radioButtonElement = jsx("span", { className: classNames(InputWrapper, className), ref, children: jsxs("label", { htmlFor: inputId, className: LabelRecipe({ disabled: effectiveDisabled }), id: labelId, children: [jsx("input", { type: "radio", id: inputId, name: effectiveName, disabled: effectiveDisabled, required: effectiveRequired, onChange: handleChange, value, checked: effectiveChecked, className: InputStyleRecipe({
|
|
69
69
|
disabled: effectiveDisabled
|
|
70
|
-
}), tabIndex: 0, ...inputAriaProps, ...rest }), jsx(CustomRadioButton, { isChecked, disabled: effectiveDisabled, validity: effectiveValidity }), hideLabel ? jsx(ScreenReaderOnly, { children: label }) : jsx("span", { className: LabelStyle, children: label })] }) });
|
|
70
|
+
}), tabIndex: 0, ...inputAriaProps, ...rest }), jsx(CustomRadioButton, { isChecked: effectiveChecked, disabled: effectiveDisabled, validity: effectiveValidity }), hideLabel ? jsx(ScreenReaderOnly, { children: label }) : jsx("span", { className: LabelStyle, children: label })] }) });
|
|
71
71
|
const descriptionElement = description ? jsx(SelectionDescription, { disabled: effectiveDisabled, children: description }) : void 0;
|
|
72
72
|
return jsx(HelperTextWrapper, { ...helperTextProps, children: render && render(radioButtonElement, descriptionElement) });
|
|
73
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnist/design-system",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"optional": true
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "c80dadbc6fea53420af1b2e956efebefbe4062d9"
|
|
106
106
|
}
|