@simplybusiness/mobius 6.3.2 → 6.3.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 +7 -0
- package/dist/cjs/index.js +11 -4
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/index.js +12 -5
- package/dist/types/src/components/AddressLookup/types.d.ts +3 -0
- package/dist/types/src/components/ExpandableText/ExpandableText.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/AddressLookup/types.tsx +4 -0
- package/src/components/ExpandableText/ExpandableText.test.tsx +10 -4
- package/src/components/ExpandableText/ExpandableText.tsx +5 -3
- package/src/components/MaskedField/MaskedField.test.tsx +145 -0
- package/src/components/MaskedField/MaskedField.tsx +11 -2
package/CHANGELOG.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -4496,7 +4496,7 @@ var ExpandableText = (0, import_react82.forwardRef)((props, ref) => {
|
|
|
4496
4496
|
setIsCollapsed(isOverflowing);
|
|
4497
4497
|
}, [text, shouldCollapse, maxLines]);
|
|
4498
4498
|
if (breakpoint && !shouldCollapse) {
|
|
4499
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { ref, className, ...otherProps, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Text, { ...textProps, children: text }) });
|
|
4499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { ref, className, ...otherProps, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Text, { ...textProps, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { dangerouslySetInnerHTML: { __html: text } }) }) });
|
|
4500
4500
|
}
|
|
4501
4501
|
const handleAccordionChange = (expanded) => {
|
|
4502
4502
|
setIsExpanded(expanded);
|
|
@@ -4525,7 +4525,7 @@ var ExpandableText = (0, import_react82.forwardRef)((props, ref) => {
|
|
|
4525
4525
|
style: textContainerStyle,
|
|
4526
4526
|
"data-testid": "expandable-text-content",
|
|
4527
4527
|
"aria-describedby": isCollapsed ? expandButtonId : void 0,
|
|
4528
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Text, { elementType: "span", ...textProps, children: text })
|
|
4528
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Text, { elementType: "span", ...textProps, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { dangerouslySetInnerHTML: { __html: text } }) })
|
|
4529
4529
|
}
|
|
4530
4530
|
),
|
|
4531
4531
|
isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
@@ -4584,10 +4584,17 @@ var MaskedField = (0, import_react83.forwardRef)((props, ref) => {
|
|
|
4584
4584
|
const {
|
|
4585
4585
|
ref: maskRef,
|
|
4586
4586
|
value: maskedValue,
|
|
4587
|
-
unmaskedValue
|
|
4587
|
+
unmaskedValue,
|
|
4588
|
+
setValue
|
|
4588
4589
|
} = (0, import_react_imask.useIMask)(mask, {
|
|
4589
|
-
defaultValue
|
|
4590
|
+
defaultValue: value || defaultValue
|
|
4590
4591
|
});
|
|
4592
|
+
(0, import_react83.useEffect)(() => {
|
|
4593
|
+
const valueToCompare = useMaskedValue ? maskedValue : unmaskedValue;
|
|
4594
|
+
if (value !== void 0 && value !== valueToCompare) {
|
|
4595
|
+
setValue(value);
|
|
4596
|
+
}
|
|
4597
|
+
}, [value, setValue]);
|
|
4591
4598
|
const handleChange = (event) => {
|
|
4592
4599
|
if (onChange) {
|
|
4593
4600
|
onChange(
|