@simplybusiness/mobius 5.29.4 → 5.29.5
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 +54 -29
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/index.js +54 -29
- package/dist/types/src/components/Combobox/Combobox.d.ts +2 -1
- package/dist/types/src/components/Fieldset/Fieldset.d.ts +1 -1
- package/dist/types/src/components/Image/Image.d.ts +2 -1
- package/dist/types/src/components/Label/Label.d.ts +2 -1
- package/dist/types/src/hooks/useOnClickOutside/useOnClickOutside.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Breadcrumbs/BreadcrumbItem.tsx +6 -3
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +7 -3
- package/src/components/Checkbox/CheckboxGroup.tsx +15 -10
- package/src/components/Combobox/Combobox.tsx +2 -1
- package/src/components/DropdownMenu/DropdownMenu.tsx +9 -3
- package/src/components/DropdownMenu/Item.tsx +10 -4
- package/src/components/Fieldset/Fieldset.tsx +1 -1
- package/src/components/Image/Image.tsx +2 -1
- package/src/components/Label/Label.tsx +2 -1
- package/src/components/List/List.tsx +2 -1
- package/src/components/Popover/Popover.tsx +5 -2
- package/src/components/Radio/RadioGroup.tsx +13 -10
- package/src/components/TextField/adornmentWithClassName.ts +2 -2
- package/src/hooks/useOnClickOutside/useOnClickOutside.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.29.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4ce860b: fix(useOnClickOutside): Allow null in RefObject type parameter
|
|
8
|
+
|
|
9
|
+
Updated useOnClickOutside hook to accept RefObject<HTMLElement | null> instead of RefObject<HTMLElement>, improving type safety and compatibility with React refs that can be null.
|
|
10
|
+
|
|
11
|
+
- 845388a: fix: improve strong typing for React cloneElement usage
|
|
12
|
+
|
|
13
|
+
Adds proper TypeScript typing for all React.cloneElement calls throughout the codebase to improve type safety and remove unsafe type assertions where possible.
|
|
14
|
+
|
|
15
|
+
- 39b6975: Updated all JSX type references to use React.JSX namespace instead of the global JSX namespace for better TypeScript compatibility with React 19.
|
|
16
|
+
|
|
3
17
|
## 5.29.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -1995,9 +1995,13 @@ var Breadcrumbs = (0, import_react29.forwardRef)((props, ref) => {
|
|
|
1995
1995
|
otherProps.className
|
|
1996
1996
|
);
|
|
1997
1997
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { children: childArray.map(
|
|
1998
|
-
(child, i) => (0, import_react29.cloneElement)(
|
|
1999
|
-
|
|
2000
|
-
|
|
1998
|
+
(child, i) => (0, import_react29.cloneElement)(
|
|
1999
|
+
child,
|
|
2000
|
+
{
|
|
2001
|
+
key: i,
|
|
2002
|
+
isCurrent: i === childArray.length - 1
|
|
2003
|
+
}
|
|
2004
|
+
)
|
|
2001
2005
|
) }) });
|
|
2002
2006
|
});
|
|
2003
2007
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
@@ -2029,7 +2033,11 @@ var BreadcrumbItem = (0, import_react30.forwardRef)((props, ref) => {
|
|
|
2029
2033
|
);
|
|
2030
2034
|
const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { ...itemProps, children }) : import_react30.Children.only(children);
|
|
2031
2035
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: classes, children: [
|
|
2032
|
-
(0, import_react30.cloneElement)(child, {
|
|
2036
|
+
(0, import_react30.cloneElement)(child, {
|
|
2037
|
+
...child.props,
|
|
2038
|
+
...itemProps,
|
|
2039
|
+
ref
|
|
2040
|
+
}),
|
|
2033
2041
|
!props.isCurrent && separator
|
|
2034
2042
|
] });
|
|
2035
2043
|
});
|
|
@@ -2310,16 +2318,21 @@ var CheckboxGroup = (0, import_react33.forwardRef)((props, ref) => {
|
|
|
2310
2318
|
if ((0, import_react33.isValidElement)(child)) {
|
|
2311
2319
|
const isLastItem = child === lastCheckbox;
|
|
2312
2320
|
const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
|
|
2313
|
-
return (0, import_react33.cloneElement)(
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2321
|
+
return (0, import_react33.cloneElement)(
|
|
2322
|
+
child,
|
|
2323
|
+
{
|
|
2324
|
+
isDisabled: isChildDisabled,
|
|
2325
|
+
isRequired,
|
|
2326
|
+
isReadOnly,
|
|
2327
|
+
isInvalid,
|
|
2328
|
+
isLastItem,
|
|
2329
|
+
selected: selected.includes(
|
|
2330
|
+
child.props.value
|
|
2331
|
+
),
|
|
2332
|
+
onChange: handleChange,
|
|
2333
|
+
"aria-describedby": describedBy
|
|
2334
|
+
}
|
|
2335
|
+
);
|
|
2323
2336
|
}
|
|
2324
2337
|
return child;
|
|
2325
2338
|
}) }),
|
|
@@ -2693,10 +2706,16 @@ var Item = (0, import_react42.forwardRef)(
|
|
|
2693
2706
|
);
|
|
2694
2707
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Element, { ref, onClick, ...otherProps, children: import_react42.Children.map(children, (child) => {
|
|
2695
2708
|
if ((0, import_react42.isValidElement)(child)) {
|
|
2696
|
-
const childClasses = (0, import_dedupe23.default)(
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2709
|
+
const childClasses = (0, import_dedupe23.default)(
|
|
2710
|
+
child.props.className,
|
|
2711
|
+
classes
|
|
2712
|
+
);
|
|
2713
|
+
return (0, import_react42.cloneElement)(
|
|
2714
|
+
child,
|
|
2715
|
+
{
|
|
2716
|
+
className: childClasses
|
|
2717
|
+
}
|
|
2718
|
+
);
|
|
2700
2719
|
}
|
|
2701
2720
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: classes, children: child });
|
|
2702
2721
|
}) });
|
|
@@ -3348,7 +3367,10 @@ var Popover = (props) => {
|
|
|
3348
3367
|
};
|
|
3349
3368
|
const triggerComponent = (0, import_react61.cloneElement)(trigger, {
|
|
3350
3369
|
ref: refs.setReference,
|
|
3351
|
-
className: (0, import_classnames3.default)(
|
|
3370
|
+
className: (0, import_classnames3.default)(
|
|
3371
|
+
trigger.props.className,
|
|
3372
|
+
"mobius-popover__toggle"
|
|
3373
|
+
),
|
|
3352
3374
|
onClick: toggleVisibility,
|
|
3353
3375
|
...getReferenceProps()
|
|
3354
3376
|
});
|
|
@@ -3667,16 +3689,19 @@ var RadioGroup = (0, import_react64.forwardRef)((props, ref) => {
|
|
|
3667
3689
|
label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
3668
3690
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: radioWrapperClasses, children: import_react64.Children.map(children, (child) => {
|
|
3669
3691
|
if ((0, import_react64.isValidElement)(child)) {
|
|
3670
|
-
return (0, import_react64.cloneElement)(
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3692
|
+
return (0, import_react64.cloneElement)(
|
|
3693
|
+
child,
|
|
3694
|
+
{
|
|
3695
|
+
orientation,
|
|
3696
|
+
groupDisabled: isDisabled,
|
|
3697
|
+
name: nameAttribute,
|
|
3698
|
+
selected,
|
|
3699
|
+
setSelected,
|
|
3700
|
+
isRequired,
|
|
3701
|
+
"aria-describedby": describedBy,
|
|
3702
|
+
onChange
|
|
3703
|
+
}
|
|
3704
|
+
);
|
|
3680
3705
|
}
|
|
3681
3706
|
return child;
|
|
3682
3707
|
}) }),
|