@spaced-out/ui-design-system 0.3.20 → 0.3.21
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
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.3.21](https://github.com/spaced-out/ui-design-system/compare/v0.3.20...v0.3.21) (2025-02-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* add class name for radio in radio button ([#319](https://github.com/spaced-out/ui-design-system/issues/319)) ([971a645](https://github.com/spaced-out/ui-design-system/commit/971a645761da0620d643c99d25f941b91b5aab66))
|
|
11
|
+
|
|
5
12
|
### [0.3.20](https://github.com/spaced-out/ui-design-system/compare/v0.3.19...v0.3.20) (2025-02-03)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -64,7 +64,7 @@ const RadioButton = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
64
64
|
[_RadioButtonModule.default.selected]: checked && !disabled && !error,
|
|
65
65
|
[_RadioButtonModule.default.disabled]: disabled,
|
|
66
66
|
[_RadioButtonModule.default.error]: error && !disabled
|
|
67
|
-
}),
|
|
67
|
+
}, classNames?.radio),
|
|
68
68
|
ref: radioInput,
|
|
69
69
|
onChange: onChangeHandler,
|
|
70
70
|
onKeyDown: onKeyDownHandler,
|
|
@@ -14,7 +14,7 @@ import css from './RadioButton.module.css';
|
|
|
14
14
|
* nesting labels is a bad idea.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
type ClassNames = $ReadOnly<{wrapper?: string, label?: string}>;
|
|
17
|
+
type ClassNames = $ReadOnly<{wrapper?: string, label?: string, radio?: string}>;
|
|
18
18
|
|
|
19
19
|
export type RadioButtonProps = {
|
|
20
20
|
children?: React.Node,
|
|
@@ -97,12 +97,16 @@ export const RadioButton: React$AbstractComponent<
|
|
|
97
97
|
type="radio"
|
|
98
98
|
checked={checked}
|
|
99
99
|
disabled={disabled}
|
|
100
|
-
className={classify(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
className={classify(
|
|
101
|
+
css.radio,
|
|
102
|
+
{
|
|
103
|
+
[css.unselected]: !checked && !disabled && !error,
|
|
104
|
+
[css.selected]: checked && !disabled && !error,
|
|
105
|
+
[css.disabled]: disabled,
|
|
106
|
+
[css.error]: error && !disabled,
|
|
107
|
+
},
|
|
108
|
+
classNames?.radio,
|
|
109
|
+
)}
|
|
106
110
|
ref={radioInput}
|
|
107
111
|
onChange={onChangeHandler}
|
|
108
112
|
onKeyDown={onKeyDownHandler}
|