@simplybusiness/mobius 5.32.3 → 6.0.0
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 +14 -0
- package/dist/cjs/index.js +14 -3
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/index.js +14 -3
- package/dist/types/src/components/TextField/adornmentWithClassName.d.ts +1 -1
- package/package.json +9 -9
- package/src/components/Button/Button.css +20 -20
- package/src/components/Radio/Radio.tsx +19 -3
- package/src/components/TextField/TextField.css +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 31ea8ae: **BREAKING CHANGE** React 19 is now required to use Mobius.
|
|
8
|
+
|
|
9
|
+
## 5.32.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- b1e7459: text field prefix and suffix have color primary to fix color contrast accessibility bug
|
|
14
|
+
- d65deec: Change background-color to background on button
|
|
15
|
+
- 220f943: Add tokens for progress steps border
|
|
16
|
+
|
|
3
17
|
## 5.32.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -3615,12 +3615,14 @@ var Radio = (0, import_react63.forwardRef)(
|
|
|
3615
3615
|
} = props;
|
|
3616
3616
|
const realDisabled = groupDisabled || isDisabled;
|
|
3617
3617
|
const isMultiline = label && children;
|
|
3618
|
-
const
|
|
3618
|
+
const isControlled = selected !== void 0;
|
|
3619
|
+
const isChecked = isControlled ? selected === value : defaultChecked;
|
|
3619
3620
|
const hasIconFirst = (0, import_react63.useMemo)(() => {
|
|
3620
3621
|
if (!children || import_react63.Children.count(children) === 0) return false;
|
|
3621
3622
|
const firstChild = import_react63.Children.toArray(children)[0];
|
|
3622
3623
|
if (!(0, import_react63.isValidElement)(firstChild)) return false;
|
|
3623
|
-
|
|
3624
|
+
const props2 = firstChild.props;
|
|
3625
|
+
return "icon" in props2 && props2.icon !== void 0;
|
|
3624
3626
|
}, [children]);
|
|
3625
3627
|
const radioClasses = {
|
|
3626
3628
|
"--is-disabled": realDisabled,
|
|
@@ -3649,6 +3651,15 @@ var Radio = (0, import_react63.forwardRef)(
|
|
|
3649
3651
|
"aria-describedby": _ariaDescribedBy,
|
|
3650
3652
|
...rest
|
|
3651
3653
|
} = otherProps;
|
|
3654
|
+
const handleChange = (event) => {
|
|
3655
|
+
if (onChange) {
|
|
3656
|
+
const adaptedEvent = {
|
|
3657
|
+
...event.nativeEvent,
|
|
3658
|
+
target: event.target
|
|
3659
|
+
};
|
|
3660
|
+
onChange(adaptedEvent);
|
|
3661
|
+
}
|
|
3662
|
+
};
|
|
3652
3663
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
3653
3664
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Label, { className: containerClasses, children: [
|
|
3654
3665
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
@@ -3662,7 +3673,7 @@ var Radio = (0, import_react63.forwardRef)(
|
|
|
3662
3673
|
value,
|
|
3663
3674
|
tabIndex: 0,
|
|
3664
3675
|
type: "radio",
|
|
3665
|
-
defaultChecked:
|
|
3676
|
+
...isControlled ? { checked: isChecked, onChange: handleChange } : { defaultChecked: isChecked },
|
|
3666
3677
|
name,
|
|
3667
3678
|
required: isRequired,
|
|
3668
3679
|
...rest
|