@simplybusiness/mobius 10.4.3 → 10.4.4

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.
Files changed (171) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/components/AddressLookup/AddressLookup.js +39 -36
  3. package/dist/cjs/components/AddressLookup/AddressLookup.js.map +3 -3
  4. package/dist/cjs/components/AddressLookup/index.js +39 -36
  5. package/dist/cjs/components/AddressLookup/index.js.map +3 -3
  6. package/dist/cjs/components/Breadcrumbs/Breadcrumbs.js +3 -7
  7. package/dist/cjs/components/Breadcrumbs/Breadcrumbs.js.map +2 -2
  8. package/dist/cjs/components/Breadcrumbs/index.js +3 -7
  9. package/dist/cjs/components/Breadcrumbs/index.js.map +2 -2
  10. package/dist/cjs/components/Combobox/Combobox.js +35 -32
  11. package/dist/cjs/components/Combobox/Combobox.js.map +3 -3
  12. package/dist/cjs/components/Combobox/index.js +35 -32
  13. package/dist/cjs/components/Combobox/index.js.map +3 -3
  14. package/dist/cjs/components/DateField/DateField.js +11 -8
  15. package/dist/cjs/components/DateField/DateField.js.map +3 -3
  16. package/dist/cjs/components/DateField/index.js +11 -8
  17. package/dist/cjs/components/DateField/index.js.map +3 -3
  18. package/dist/cjs/components/DropdownMenu/Item.js +3 -6
  19. package/dist/cjs/components/DropdownMenu/Item.js.map +2 -2
  20. package/dist/cjs/components/DropdownMenu/index.js +3 -6
  21. package/dist/cjs/components/DropdownMenu/index.js.map +2 -2
  22. package/dist/cjs/components/MaskedField/MaskedField.js +11 -8
  23. package/dist/cjs/components/MaskedField/MaskedField.js.map +3 -3
  24. package/dist/cjs/components/MaskedField/index.js +13 -10
  25. package/dist/cjs/components/MaskedField/index.js.map +3 -3
  26. package/dist/cjs/components/NumberField/NumberField.js +10 -7
  27. package/dist/cjs/components/NumberField/NumberField.js.map +3 -3
  28. package/dist/cjs/components/NumberField/index.js +10 -7
  29. package/dist/cjs/components/NumberField/index.js.map +3 -3
  30. package/dist/cjs/components/PasswordField/PasswordField.js +9 -6
  31. package/dist/cjs/components/PasswordField/PasswordField.js.map +3 -3
  32. package/dist/cjs/components/PasswordField/index.js +9 -6
  33. package/dist/cjs/components/PasswordField/index.js.map +3 -3
  34. package/dist/cjs/components/TextField/TextField.js +6 -3
  35. package/dist/cjs/components/TextField/TextField.js.map +3 -3
  36. package/dist/cjs/components/TextField/adornmentWithClassName.js +3 -2
  37. package/dist/cjs/components/TextField/adornmentWithClassName.js.map +2 -2
  38. package/dist/cjs/components/TextField/index.js +6 -3
  39. package/dist/cjs/components/TextField/index.js.map +3 -3
  40. package/dist/cjs/components/index.js +198 -202
  41. package/dist/cjs/components/index.js.map +3 -3
  42. package/dist/cjs/index.js +198 -202
  43. package/dist/cjs/index.js.map +3 -3
  44. package/dist/cjs/meta.json +178 -93
  45. package/dist/esm/{chunk-XNEQHHNV.js → chunk-5QMKPWB4.js} +2 -2
  46. package/dist/esm/{chunk-IQKS662C.js → chunk-6RDK3FM2.js} +5 -3
  47. package/dist/esm/chunk-6RDK3FM2.js.map +7 -0
  48. package/dist/esm/{chunk-4HI2AOBC.js → chunk-6TSYA7CJ.js} +4 -7
  49. package/dist/esm/{chunk-4HI2AOBC.js.map → chunk-6TSYA7CJ.js.map} +2 -2
  50. package/dist/esm/{chunk-IM3I5CZL.js → chunk-I6CFRGID.js} +4 -3
  51. package/dist/esm/{chunk-IM3I5CZL.js.map → chunk-I6CFRGID.js.map} +2 -2
  52. package/dist/esm/{chunk-OEDU5ZEA.js → chunk-KUH5AB5T.js} +2 -2
  53. package/dist/esm/{chunk-JFDDW3IV.js → chunk-P7TPNRU4.js} +4 -8
  54. package/dist/esm/{chunk-JFDDW3IV.js.map → chunk-P7TPNRU4.js.map} +2 -2
  55. package/dist/esm/{chunk-LGZWQZLS.js → chunk-QNOBB5HT.js} +2 -2
  56. package/dist/esm/{chunk-GV36OVX7.js → chunk-R67C5QTH.js} +2 -2
  57. package/dist/esm/{chunk-S4CU4XRB.js → chunk-VGFVSRWH.js} +2 -2
  58. package/dist/esm/{chunk-X4CMSAET.js → chunk-WSQWMVA2.js} +2 -2
  59. package/dist/esm/{chunk-NEFRXIFY.js → chunk-XEP6X7JU.js} +2 -2
  60. package/dist/esm/chunk-XEP6X7JU.js.map +7 -0
  61. package/dist/esm/components/AddressLookup/AddressLookup.js +4 -4
  62. package/dist/esm/components/AddressLookup/index.js +4 -4
  63. package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +1 -1
  64. package/dist/esm/components/Breadcrumbs/index.js +1 -1
  65. package/dist/esm/components/Combobox/Combobox.js +3 -3
  66. package/dist/esm/components/Combobox/index.js +3 -3
  67. package/dist/esm/components/DateField/DateField.js +3 -3
  68. package/dist/esm/components/DateField/index.js +3 -3
  69. package/dist/esm/components/DropdownMenu/Item.js +1 -1
  70. package/dist/esm/components/DropdownMenu/index.js +2 -2
  71. package/dist/esm/components/MaskedField/MaskedField.js +2 -2
  72. package/dist/esm/components/MaskedField/index.js +3 -3
  73. package/dist/esm/components/NumberField/NumberField.js +3 -3
  74. package/dist/esm/components/NumberField/index.js +3 -3
  75. package/dist/esm/components/PasswordField/PasswordField.js +3 -3
  76. package/dist/esm/components/PasswordField/index.js +3 -3
  77. package/dist/esm/components/TextField/TextField.js +2 -2
  78. package/dist/esm/components/TextField/adornmentWithClassName.js +1 -1
  79. package/dist/esm/components/TextField/index.js +2 -2
  80. package/dist/esm/components/index.js +11 -11
  81. package/dist/esm/index.js +11 -11
  82. package/dist/esm/meta.json +127 -117
  83. package/dist/tsconfig.build.tsbuildinfo +1 -1
  84. package/dist/types/components/Accordion/Accordion.d.ts +4 -4
  85. package/dist/types/components/Accordion/AccordionList.d.ts +4 -4
  86. package/dist/types/components/AddressLookup/AddressLookup.d.ts +4 -4
  87. package/dist/types/components/AddressLookup/LoqateAddressLookupService.d.ts +1 -1
  88. package/dist/types/components/Alert/Alert.d.ts +4 -4
  89. package/dist/types/components/Box/Box.d.ts +4 -4
  90. package/dist/types/components/Breadcrumbs/BreadcrumbItem.d.ts +4 -4
  91. package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +4 -4
  92. package/dist/types/components/Button/Button.d.ts +4 -4
  93. package/dist/types/components/Checkbox/Checkbox.d.ts +4 -4
  94. package/dist/types/components/Checkbox/CheckboxGroup.d.ts +4 -4
  95. package/dist/types/components/Combobox/Combobox.d.ts +2 -5
  96. package/dist/types/components/Combobox/useComboboxOptions.d.ts +1 -1
  97. package/dist/types/components/Container/Container.d.ts +4 -4
  98. package/dist/types/components/DateField/DateField.d.ts +4 -4
  99. package/dist/types/components/Divider/Divider.d.ts +4 -4
  100. package/dist/types/components/Drawer/Content.d.ts +4 -4
  101. package/dist/types/components/Drawer/Drawer.d.ts +4 -4
  102. package/dist/types/components/Drawer/Header.d.ts +4 -4
  103. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +4 -4
  104. package/dist/types/components/DropdownMenu/Item.d.ts +4 -4
  105. package/dist/types/components/ErrorMessage/ErrorMessage.d.ts +4 -4
  106. package/dist/types/components/ExpandableText/ExpandableText.d.ts +4 -4
  107. package/dist/types/components/Fieldset/Fieldset.d.ts +4 -4
  108. package/dist/types/components/Flex/Flex.d.ts +4 -4
  109. package/dist/types/components/Grid/Grid.d.ts +4 -4
  110. package/dist/types/components/Grid/Item.d.ts +4 -4
  111. package/dist/types/components/Image/Image.d.ts +4 -4
  112. package/dist/types/components/Label/Label.d.ts +4 -4
  113. package/dist/types/components/Link/Link.d.ts +4 -4
  114. package/dist/types/components/List/List.d.ts +4 -4
  115. package/dist/types/components/List/ListItem.d.ts +4 -4
  116. package/dist/types/components/LoadingIndicator/LoadingIndicator.d.ts +4 -4
  117. package/dist/types/components/Logo/Logo.d.ts +4 -4
  118. package/dist/types/components/MaskedField/MaskedField.d.ts +4 -4
  119. package/dist/types/components/Modal/Content.d.ts +4 -4
  120. package/dist/types/components/Modal/Header.d.ts +4 -4
  121. package/dist/types/components/Modal/Modal.d.ts +4 -4
  122. package/dist/types/components/NumberField/NumberField.d.ts +4 -4
  123. package/dist/types/components/Option/Option.d.ts +4 -4
  124. package/dist/types/components/PasswordField/PasswordField.d.ts +4 -4
  125. package/dist/types/components/Progress/Progress.d.ts +4 -4
  126. package/dist/types/components/Radio/Radio.d.ts +4 -4
  127. package/dist/types/components/Radio/RadioGroup.d.ts +4 -4
  128. package/dist/types/components/SVG/SVG.d.ts +4 -4
  129. package/dist/types/components/Segment/Segment.d.ts +4 -4
  130. package/dist/types/components/Segment/SegmentGroup.d.ts +4 -4
  131. package/dist/types/components/Select/Select.d.ts +4 -4
  132. package/dist/types/components/Stack/Stack.d.ts +4 -4
  133. package/dist/types/components/Switch/Switch.d.ts +4 -4
  134. package/dist/types/components/Table/Body.d.ts +4 -4
  135. package/dist/types/components/Table/Cell.d.ts +4 -4
  136. package/dist/types/components/Table/Foot.d.ts +4 -4
  137. package/dist/types/components/Table/Head.d.ts +4 -4
  138. package/dist/types/components/Table/HeaderCell.d.ts +4 -4
  139. package/dist/types/components/Table/Row.d.ts +4 -4
  140. package/dist/types/components/Table/Table.d.ts +4 -4
  141. package/dist/types/components/Text/Text.d.ts +4 -4
  142. package/dist/types/components/TextArea/TextArea.d.ts +4 -4
  143. package/dist/types/components/TextAreaInput/TextAreaInput.d.ts +4 -4
  144. package/dist/types/components/TextField/TextField.d.ts +1 -4
  145. package/dist/types/components/TextField/adornmentWithClassName.d.ts +3 -1
  146. package/dist/types/components/TextOrHTML/TextOrHTML.d.ts +4 -4
  147. package/dist/types/components/Title/Title.d.ts +4 -4
  148. package/dist/types/components/Toast/ToastOptionsDoc.d.ts +4 -8
  149. package/dist/types/components/Toast/Toaster.d.ts +4 -4
  150. package/dist/types/hooks/useButton/useButton.d.ts +5 -5
  151. package/dist/types/hooks/useLabel/useLabel.d.ts +1 -1
  152. package/package.json +11 -10
  153. package/src/components/Box/Box.test.tsx +1 -2
  154. package/src/components/Breadcrumbs/Breadcrumbs.tsx +3 -7
  155. package/src/components/Button/Button.stories.tsx +1 -1
  156. package/src/components/Combobox/Combobox.tsx +2 -4
  157. package/src/components/DropdownMenu/DropdownMenu.stories.tsx +1 -1
  158. package/src/components/DropdownMenu/Item.tsx +3 -6
  159. package/src/components/Grid/Grid.stories.tsx +1 -1
  160. package/src/components/TextField/TextField.tsx +3 -1
  161. package/src/components/TextField/adornmentWithClassName.ts +4 -3
  162. package/src/hooks/useBreakpoint/useBreakpoint.test.tsx +4 -4
  163. package/src/styles.d.ts +2 -0
  164. package/dist/esm/chunk-IQKS662C.js.map +0 -7
  165. package/dist/esm/chunk-NEFRXIFY.js.map +0 -7
  166. /package/dist/esm/{chunk-XNEQHHNV.js.map → chunk-5QMKPWB4.js.map} +0 -0
  167. /package/dist/esm/{chunk-OEDU5ZEA.js.map → chunk-KUH5AB5T.js.map} +0 -0
  168. /package/dist/esm/{chunk-LGZWQZLS.js.map → chunk-QNOBB5HT.js.map} +0 -0
  169. /package/dist/esm/{chunk-GV36OVX7.js.map → chunk-R67C5QTH.js.map} +0 -0
  170. /package/dist/esm/{chunk-S4CU4XRB.js.map → chunk-VGFVSRWH.js.map} +0 -0
  171. /package/dist/esm/{chunk-X4CMSAET.js.map → chunk-WSQWMVA2.js.map} +0 -0
package/dist/cjs/index.js CHANGED
@@ -946,9 +946,10 @@ var init_adornmentWithClassName = __esm({
946
946
  import_react10 = require("react");
947
947
  adornmentWithClassName = (component, validationClasses, className) => {
948
948
  if (!component) return null;
949
- return (0, import_react10.cloneElement)(component, {
949
+ const typedComponent = component;
950
+ return (0, import_react10.cloneElement)(typedComponent, {
950
951
  className: (0, import_dedupe12.default)(
951
- component.props.className,
952
+ typedComponent.props.className,
952
953
  validationClasses,
953
954
  className
954
955
  )
@@ -958,12 +959,13 @@ var init_adornmentWithClassName = __esm({
958
959
  });
959
960
 
960
961
  // src/components/TextField/TextField.tsx
961
- var import_dedupe13, import_TextField, import_jsx_runtime12, TextField;
962
+ var import_dedupe13, import_react11, import_TextField, import_jsx_runtime12, TextFieldInner, TextField;
962
963
  var init_TextField = __esm({
963
964
  "src/components/TextField/TextField.tsx"() {
964
965
  "use strict";
965
966
  "use client";
966
967
  import_dedupe13 = __toESM(require("classnames/dedupe"));
968
+ import_react11 = require("react");
967
969
  init_hooks();
968
970
  init_ErrorMessage2();
969
971
  init_Label2();
@@ -971,7 +973,7 @@ var init_TextField = __esm({
971
973
  init_adornmentWithClassName();
972
974
  import_TextField = require("@simplybusiness/mobius/src/components/TextField/TextField.css");
973
975
  import_jsx_runtime12 = require("react/jsx-runtime");
974
- TextField = ({ ref, ...props }) => {
976
+ TextFieldInner = ({ ref, ...props }) => {
975
977
  const {
976
978
  isDisabled,
977
979
  type = "text",
@@ -1065,6 +1067,7 @@ var init_TextField = __esm({
1065
1067
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
1066
1068
  ] });
1067
1069
  };
1070
+ TextField = (0, import_react11.memo)(TextFieldInner);
1068
1071
  TextField.displayName = "TextField";
1069
1072
  }
1070
1073
  });
@@ -1082,17 +1085,17 @@ var MaskedField_exports = {};
1082
1085
  __export(MaskedField_exports, {
1083
1086
  MaskedField: () => MaskedField
1084
1087
  });
1085
- var import_react50, import_react_imask, import_jsx_runtime76, useAcceptHandler, useCombinedRef, useBlurHandler, ControlledMaskedField, UncontrolledMaskedField, MaskedField;
1088
+ var import_react51, import_react_imask, import_jsx_runtime76, useAcceptHandler, useCombinedRef, useBlurHandler, ControlledMaskedField, UncontrolledMaskedField, MaskedField;
1086
1089
  var init_MaskedField = __esm({
1087
1090
  "src/components/MaskedField/MaskedField.tsx"() {
1088
1091
  "use strict";
1089
1092
  "use client";
1090
- import_react50 = require("react");
1093
+ import_react51 = require("react");
1091
1094
  import_react_imask = require("react-imask");
1092
1095
  init_TextField2();
1093
1096
  import_jsx_runtime76 = require("react/jsx-runtime");
1094
1097
  useAcceptHandler = (onChange, useMaskedValue, name) => {
1095
- return (0, import_react50.useCallback)(
1098
+ return (0, import_react51.useCallback)(
1096
1099
  (maskedValue, maskInstance) => {
1097
1100
  if (!onChange) {
1098
1101
  return;
@@ -1108,7 +1111,7 @@ var init_MaskedField = __esm({
1108
1111
  );
1109
1112
  };
1110
1113
  useCombinedRef = (imaskRef, forwardedRef) => {
1111
- return (0, import_react50.useCallback)(
1114
+ return (0, import_react51.useCallback)(
1112
1115
  (element) => {
1113
1116
  imaskRef.current = element;
1114
1117
  if (typeof forwardedRef === "function") {
@@ -1121,7 +1124,7 @@ var init_MaskedField = __esm({
1121
1124
  );
1122
1125
  };
1123
1126
  useBlurHandler = (onBlur, maskRef, useMaskedValue, name) => {
1124
- return (0, import_react50.useCallback)(
1127
+ return (0, import_react51.useCallback)(
1125
1128
  (event) => {
1126
1129
  if (!onBlur || !maskRef.current) {
1127
1130
  return;
@@ -1151,7 +1154,7 @@ var init_MaskedField = __esm({
1151
1154
  const { ref: imaskRef, maskRef, setValue } = (0, import_react_imask.useIMask)(mask, { onAccept });
1152
1155
  const combinedRef = useCombinedRef(imaskRef, forwardedRef);
1153
1156
  const handleBlur = useBlurHandler(onBlur, maskRef, useMaskedValue, name);
1154
- (0, import_react50.useEffect)(() => {
1157
+ (0, import_react51.useEffect)(() => {
1155
1158
  if (!maskRef.current) {
1156
1159
  return;
1157
1160
  }
@@ -1671,12 +1674,12 @@ AccordionList.displayName = "AccordionList";
1671
1674
 
1672
1675
  // src/components/AddressLookup/AddressLookup.tsx
1673
1676
  var import_icons3 = require("@simplybusiness/icons");
1674
- var import_react15 = require("react");
1677
+ var import_react16 = require("react");
1675
1678
 
1676
1679
  // src/components/Combobox/Combobox.tsx
1677
1680
  var import_mobius_hooks5 = require("@simplybusiness/mobius-hooks");
1678
1681
  var import_dedupe16 = __toESM(require("classnames/dedupe"));
1679
- var import_react14 = require("react");
1682
+ var import_react15 = require("react");
1680
1683
  init_hooks();
1681
1684
  init_TextField2();
1682
1685
 
@@ -1715,7 +1718,7 @@ function VisuallyHidden(props) {
1715
1718
  var import_dedupe15 = __toESM(require("classnames/dedupe"));
1716
1719
 
1717
1720
  // src/components/Combobox/Option.tsx
1718
- var import_react11 = require("react");
1721
+ var import_react12 = require("react");
1719
1722
  var import_dedupe14 = __toESM(require("classnames/dedupe"));
1720
1723
 
1721
1724
  // src/components/Combobox/utils.tsx
@@ -1750,13 +1753,13 @@ var Option = ({
1750
1753
  optionTestIdPrefix,
1751
1754
  id
1752
1755
  }) => {
1753
- const optionRef = (0, import_react11.useRef)(null);
1756
+ const optionRef = (0, import_react12.useRef)(null);
1754
1757
  const optionValue = getOptionValue(option) || "";
1755
1758
  const testId = buildOptionTestId(
1756
1759
  optionTestIdPrefix || "combobox-option",
1757
1760
  optionValue
1758
1761
  );
1759
- (0, import_react11.useEffect)(() => {
1762
+ (0, import_react12.useEffect)(() => {
1760
1763
  if (isHighlighted && optionRef.current && optionRef.current.scrollIntoView) {
1761
1764
  optionRef.current.scrollIntoView({ block: "nearest" });
1762
1765
  }
@@ -1860,12 +1863,12 @@ var Listbox = ({
1860
1863
  };
1861
1864
 
1862
1865
  // src/components/Combobox/useComboboxHighlight.tsx
1863
- var import_react12 = require("react");
1866
+ var import_react13 = require("react");
1864
1867
  function useComboboxHighlight(options) {
1865
- const [highlightedIndex, setHighlightedIndex] = (0, import_react12.useState)(
1868
+ const [highlightedIndex, setHighlightedIndex] = (0, import_react13.useState)(
1866
1869
  options && options.length ? 0 : -1
1867
1870
  );
1868
- const [highlightedGroupIndex, setHighlightedGroupIndex] = (0, import_react12.useState)(0);
1871
+ const [highlightedGroupIndex, setHighlightedGroupIndex] = (0, import_react13.useState)(0);
1869
1872
  function highlightNextOption() {
1870
1873
  const isGroup = isOptionGroup(options);
1871
1874
  if (!options) {
@@ -1944,7 +1947,7 @@ function useComboboxHighlight(options) {
1944
1947
 
1945
1948
  // src/components/Combobox/useComboboxOptions.ts
1946
1949
  var import_mobius_hooks4 = require("@simplybusiness/mobius-hooks");
1947
- var import_react13 = require("react");
1950
+ var import_react14 = require("react");
1948
1951
  function useComboboxOptions({
1949
1952
  options,
1950
1953
  asyncOptions,
@@ -1954,19 +1957,19 @@ function useComboboxOptions({
1954
1957
  skipNextDebounceRef,
1955
1958
  onSearched
1956
1959
  }) {
1957
- const [filteredOptions, setFilteredOptions] = (0, import_react13.useState)(void 0);
1960
+ const [filteredOptions, setFilteredOptions] = (0, import_react14.useState)(void 0);
1958
1961
  const debouncedInputValue = (0, import_mobius_hooks4.useDebouncedValue)(
1959
1962
  inputValue,
1960
1963
  // Don't debounce synchronous options
1961
1964
  options ? 0 : delay
1962
1965
  );
1963
- const [isLoading, setIsLoading] = (0, import_react13.useState)(false);
1964
- const [error3, setError] = (0, import_react13.useState)(null);
1965
- const asyncOptionsRef = (0, import_react13.useRef)(asyncOptions);
1966
+ const [isLoading, setIsLoading] = (0, import_react14.useState)(false);
1967
+ const [error3, setError] = (0, import_react14.useState)(null);
1968
+ const asyncOptionsRef = (0, import_react14.useRef)(asyncOptions);
1966
1969
  asyncOptionsRef.current = asyncOptions;
1967
- const onSearchedRef = (0, import_react13.useRef)(onSearched);
1970
+ const onSearchedRef = (0, import_react14.useRef)(onSearched);
1968
1971
  onSearchedRef.current = onSearched;
1969
- (0, import_react13.useEffect)(() => {
1972
+ (0, import_react14.useEffect)(() => {
1970
1973
  const controller = new AbortController();
1971
1974
  const { signal } = controller;
1972
1975
  const fetchOptions = async () => {
@@ -2053,11 +2056,11 @@ var ComboboxInner = ({
2053
2056
  errorMessage,
2054
2057
  ...otherProps
2055
2058
  } = props;
2056
- const skipNextDebounceRef = (0, import_react14.useRef)(false);
2057
- const fallbackRef = (0, import_react14.useRef)(null);
2058
- const [inputValue, setInputValue] = (0, import_react14.useState)(defaultValue || "");
2059
- const [isOpen, setIsOpen] = (0, import_react14.useState)(false);
2060
- const [isChanging, setIsChanging] = (0, import_react14.useState)(false);
2059
+ const skipNextDebounceRef = (0, import_react15.useRef)(false);
2060
+ const fallbackRef = (0, import_react15.useRef)(null);
2061
+ const [inputValue, setInputValue] = (0, import_react15.useState)(defaultValue || "");
2062
+ const [isOpen, setIsOpen] = (0, import_react15.useState)(false);
2063
+ const [isChanging, setIsChanging] = (0, import_react15.useState)(false);
2061
2064
  const { filteredOptions, updateFilteredOptions, isLoading, error: error3 } = useComboboxOptions({
2062
2065
  options,
2063
2066
  asyncOptions,
@@ -2066,7 +2069,7 @@ var ComboboxInner = ({
2066
2069
  minSearchLength,
2067
2070
  skipNextDebounceRef
2068
2071
  });
2069
- const [validationError, setValidationError] = (0, import_react14.useState)(
2072
+ const [validationError, setValidationError] = (0, import_react15.useState)(
2070
2073
  error3?.message || errorMessage
2071
2074
  );
2072
2075
  const {
@@ -2079,14 +2082,14 @@ var ComboboxInner = ({
2079
2082
  clearHighlight
2080
2083
  } = useComboboxHighlight(filteredOptions);
2081
2084
  const inputRef = ref || fallbackRef;
2082
- const listboxId = (0, import_react14.useId)();
2083
- const statusId = (0, import_react14.useId)();
2084
- const blurTimeoutRef = (0, import_react14.useRef)(null);
2085
- const userInteractedRef = (0, import_react14.useRef)(false);
2086
- const justSelectedRef = (0, import_react14.useRef)(false);
2085
+ const listboxId = (0, import_react15.useId)();
2086
+ const statusId = (0, import_react15.useId)();
2087
+ const blurTimeoutRef = (0, import_react15.useRef)(null);
2088
+ const userInteractedRef = (0, import_react15.useRef)(false);
2089
+ const justSelectedRef = (0, import_react15.useRef)(false);
2087
2090
  const { down } = useBreakpoint();
2088
2091
  const isMobile = down("md");
2089
- (0, import_react14.useEffect)(() => {
2092
+ (0, import_react15.useEffect)(() => {
2090
2093
  setValidationError(error3?.message || errorMessage);
2091
2094
  }, [error3, errorMessage]);
2092
2095
  const getEmptyValue = () => {
@@ -2115,7 +2118,7 @@ var ComboboxInner = ({
2115
2118
  justSelectedRef.current = false;
2116
2119
  }
2117
2120
  };
2118
- (0, import_react14.useEffect)(() => {
2121
+ (0, import_react15.useEffect)(() => {
2119
2122
  if (!inputRef || typeof inputRef === "function") return;
2120
2123
  const inputElement = inputRef.current;
2121
2124
  if (!inputElement) return;
@@ -2268,12 +2271,12 @@ var ComboboxInner = ({
2268
2271
  default:
2269
2272
  }
2270
2273
  };
2271
- (0, import_react14.useEffect)(() => {
2274
+ (0, import_react15.useEffect)(() => {
2272
2275
  if (value) {
2273
2276
  setInputValue(value);
2274
2277
  }
2275
2278
  }, [value]);
2276
- (0, import_react14.useEffect)(() => {
2279
+ (0, import_react15.useEffect)(() => {
2277
2280
  if (asyncOptions && isChanging) {
2278
2281
  setIsOpen(!!filteredOptions && filteredOptions.length > 0);
2279
2282
  }
@@ -2387,15 +2390,15 @@ var AddressLookup = ({
2387
2390
  errorMessage,
2388
2391
  ...otherProps
2389
2392
  }) => {
2390
- const [error3, _setError] = (0, import_react15.useState)(null);
2391
- const setError = (0, import_react15.useCallback)(
2393
+ const [error3, _setError] = (0, import_react16.useState)(null);
2394
+ const setError = (0, import_react16.useCallback)(
2392
2395
  (newError) => {
2393
2396
  if (newError != null) onError?.(newError);
2394
2397
  _setError(newError);
2395
2398
  },
2396
2399
  [onError]
2397
2400
  );
2398
- const asyncOptions = (0, import_react15.useCallback)(
2401
+ const asyncOptions = (0, import_react16.useCallback)(
2399
2402
  async (searchTerm) => {
2400
2403
  try {
2401
2404
  const response = await addressLookupService.search(searchTerm);
@@ -2642,7 +2645,7 @@ var Box = ({ ref, ...props }) => {
2642
2645
  Box.displayName = "Box";
2643
2646
 
2644
2647
  // src/components/Breadcrumbs/Breadcrumbs.tsx
2645
- var import_react16 = require("react");
2648
+ var import_react17 = require("react");
2646
2649
  var import_dedupe19 = __toESM(require("classnames/dedupe"));
2647
2650
  var import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
2648
2651
  var import_jsx_runtime20 = require("react/jsx-runtime");
@@ -2650,26 +2653,22 @@ var Breadcrumbs = ({ ref, ...props }) => {
2650
2653
  const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
2651
2654
  const { navProps } = { navProps: { "aria-label": ariaLabel } };
2652
2655
  const { children, ...otherProps } = props;
2653
- const childArray = import_react16.Children.toArray(children);
2656
+ const childArray = import_react17.Children.toArray(children);
2654
2657
  const classes = (0, import_dedupe19.default)(
2655
2658
  "mobius",
2656
2659
  "mobius-breadcrumb",
2657
2660
  otherProps.className
2658
2661
  );
2659
2662
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", { children: childArray.map(
2660
- (child, i) => (0, import_react16.cloneElement)(
2661
- child,
2662
- {
2663
- key: i,
2664
- isCurrent: i === childArray.length - 1
2665
- }
2666
- )
2663
+ (child, i) => (0, import_react17.cloneElement)(child, {
2664
+ isCurrent: i === childArray.length - 1
2665
+ })
2667
2666
  ) }) });
2668
2667
  };
2669
2668
  Breadcrumbs.displayName = "Breadcrumbs";
2670
2669
 
2671
2670
  // src/components/Breadcrumbs/BreadcrumbItem.tsx
2672
- var import_react17 = require("react");
2671
+ var import_react18 = require("react");
2673
2672
  var import_dedupe20 = __toESM(require("classnames/dedupe"));
2674
2673
  var import_jsx_runtime21 = require("react/jsx-runtime");
2675
2674
  var BreadcrumbItem = ({ ref, ...props }) => {
@@ -2693,9 +2692,9 @@ var BreadcrumbItem = ({ ref, ...props }) => {
2693
2692
  "mobius-breadcrumb__item",
2694
2693
  props.className
2695
2694
  );
2696
- const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { ...itemProps, children }) : import_react17.Children.only(children);
2695
+ const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { ...itemProps, children }) : import_react18.Children.only(children);
2697
2696
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("li", { className: classes, children: [
2698
- (0, import_react17.cloneElement)(child, {
2697
+ (0, import_react18.cloneElement)(child, {
2699
2698
  ...child.props,
2700
2699
  ...itemProps,
2701
2700
  ref
@@ -2770,7 +2769,7 @@ var Button = ({ ref, ...props }) => {
2770
2769
  Button.displayName = "Button";
2771
2770
 
2772
2771
  // src/components/Checkbox/Checkbox.tsx
2773
- var import_react18 = require("react");
2772
+ var import_react19 = require("react");
2774
2773
  var import_dedupe22 = __toESM(require("classnames/dedupe"));
2775
2774
  var import_icons7 = require("@simplybusiness/icons");
2776
2775
  init_ErrorMessage2();
@@ -2799,12 +2798,12 @@ var Checkbox = ({ ref, ...props }) => {
2799
2798
  ["aria-describedby"]: ariaDescribedBy,
2800
2799
  ...rest
2801
2800
  } = props;
2802
- const [checked, setChecked] = (0, import_react18.useState)(defaultSelected);
2803
- const fallbackRef = (0, import_react18.useRef)(null);
2801
+ const [checked, setChecked] = (0, import_react19.useState)(defaultSelected);
2802
+ const fallbackRef = (0, import_react19.useRef)(null);
2804
2803
  const refObj = ref || fallbackRef;
2805
- const inputId = (0, import_react18.useId)();
2804
+ const inputId = (0, import_react19.useId)();
2806
2805
  const isControlled = typeof selected === "boolean";
2807
- (0, import_react18.useEffect)(() => {
2806
+ (0, import_react19.useEffect)(() => {
2808
2807
  if (isControlled) {
2809
2808
  setChecked(selected);
2810
2809
  }
@@ -2828,13 +2827,13 @@ var Checkbox = ({ ref, ...props }) => {
2828
2827
  const labelClasses = (0, import_dedupe22.default)("mobius-checkbox__label", sharedClasses);
2829
2828
  const inputClasses = (0, import_dedupe22.default)("mobius-checkbox__input", sharedClasses);
2830
2829
  const iconClasses = (0, import_dedupe22.default)("mobius-checkbox__icon", sharedClasses);
2831
- const errorMessageId = (0, import_react18.useId)();
2830
+ const errorMessageId = (0, import_react19.useId)();
2832
2831
  const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
2833
2832
  const describedBy = spaceDelimitedList([
2834
2833
  shouldErrorMessageShow,
2835
2834
  ariaDescribedBy
2836
2835
  ]);
2837
- const labelId = (0, import_react18.useId)();
2836
+ const labelId = (0, import_react19.useId)();
2838
2837
  const handleChange = (event) => {
2839
2838
  setChecked(!checked);
2840
2839
  if (onChange) {
@@ -2881,7 +2880,7 @@ Checkbox.displayName = "Checkbox";
2881
2880
 
2882
2881
  // src/components/Checkbox/CheckboxGroup.tsx
2883
2882
  var import_dedupe23 = __toESM(require("classnames/dedupe"));
2884
- var import_react19 = require("react");
2883
+ var import_react20 = require("react");
2885
2884
  init_hooks();
2886
2885
  init_spaceDelimitedList();
2887
2886
  init_ErrorMessage2();
@@ -2905,10 +2904,10 @@ var CheckboxGroup = ({ ref, ...props }) => {
2905
2904
  lastItemDisables = false,
2906
2905
  ...rest
2907
2906
  } = props;
2908
- const [selected, setSelected] = (0, import_react19.useState)(defaultValue);
2909
- const isInitializedRef = (0, import_react19.useRef)(false);
2910
- const prevDefaultValueRef = (0, import_react19.useRef)(defaultValue);
2911
- (0, import_react19.useEffect)(() => {
2907
+ const [selected, setSelected] = (0, import_react20.useState)(defaultValue);
2908
+ const isInitializedRef = (0, import_react20.useRef)(false);
2909
+ const prevDefaultValueRef = (0, import_react20.useRef)(defaultValue);
2910
+ (0, import_react20.useEffect)(() => {
2912
2911
  const hasChanged = defaultValue.length !== prevDefaultValueRef.current.length || defaultValue.some(
2913
2912
  (val, index) => val !== prevDefaultValueRef.current[index]
2914
2913
  );
@@ -2936,13 +2935,13 @@ var CheckboxGroup = ({ ref, ...props }) => {
2936
2935
  },
2937
2936
  validationClasses
2938
2937
  );
2939
- const errorMessageId = (0, import_react19.useId)();
2938
+ const errorMessageId = (0, import_react20.useId)();
2940
2939
  const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
2941
2940
  const describedBy = spaceDelimitedList([
2942
2941
  shouldErrorMessageShow,
2943
2942
  props["aria-describedby"]
2944
2943
  ]);
2945
- const labelId = (0, import_react19.useId)();
2944
+ const labelId = (0, import_react20.useId)();
2946
2945
  const handleChange = (event, isLastItem = false) => {
2947
2946
  const {
2948
2947
  target: { value, checked }
@@ -2960,9 +2959,9 @@ var CheckboxGroup = ({ ref, ...props }) => {
2960
2959
  setSelected(newValue);
2961
2960
  onChange?.(newValue);
2962
2961
  };
2963
- const childrenArray = import_react19.Children.toArray(children);
2962
+ const childrenArray = import_react20.Children.toArray(children);
2964
2963
  const lastCheckbox = childrenArray.filter(
2965
- (child) => (0, import_react19.isValidElement)(child) && child.type === Checkbox
2964
+ (child) => (0, import_react20.isValidElement)(child) && child.type === Checkbox
2966
2965
  ).pop();
2967
2966
  const lastCheckboxIsChecked = lastCheckbox && selected.includes(lastCheckbox.props.value);
2968
2967
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
@@ -2974,16 +2973,16 @@ var CheckboxGroup = ({ ref, ...props }) => {
2974
2973
  className: checkboxGroupClasses,
2975
2974
  role: "group",
2976
2975
  style: {
2977
- "--checkbox-items-per-row": itemsPerRow || import_react19.Children.count(children)
2976
+ "--checkbox-items-per-row": itemsPerRow || import_react20.Children.count(children)
2978
2977
  },
2979
2978
  children: [
2980
2979
  label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Label, { elementType: "span", id: labelId, className: labelClasses, children: label }),
2981
2980
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mobius-checkbox-group__wrapper", children: childrenArray.map((child) => {
2982
- if ((0, import_react19.isValidElement)(child)) {
2981
+ if ((0, import_react20.isValidElement)(child)) {
2983
2982
  const isLastItem = child === lastCheckbox;
2984
2983
  const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
2985
2984
  const childProps = child.props;
2986
- return (0, import_react19.cloneElement)(
2985
+ return (0, import_react20.cloneElement)(
2987
2986
  child,
2988
2987
  {
2989
2988
  isDisabled: isChildDisabled,
@@ -3025,7 +3024,7 @@ Container.displayName = "Container";
3025
3024
 
3026
3025
  // src/components/DateField/DateField.tsx
3027
3026
  var import_dedupe25 = __toESM(require("classnames/dedupe"));
3028
- var import_react20 = require("react");
3027
+ var import_react21 = require("react");
3029
3028
  init_mergeRefs();
3030
3029
  init_TextField2();
3031
3030
 
@@ -3075,9 +3074,9 @@ var DateField = ({ ref, ...props }) => {
3075
3074
  value,
3076
3075
  ...otherProps
3077
3076
  } = props;
3078
- const [error3, setError] = (0, import_react20.useState)(errorMessage);
3079
- const [isInvalid, setIsInvalid] = (0, import_react20.useState)(void 0);
3080
- const localRef = (0, import_react20.useRef)(null);
3077
+ const [error3, setError] = (0, import_react21.useState)(errorMessage);
3078
+ const [isInvalid, setIsInvalid] = (0, import_react21.useState)(void 0);
3079
+ const localRef = (0, import_react21.useRef)(null);
3081
3080
  const classes = (0, import_dedupe25.default)("mobius-date-field", className);
3082
3081
  const formattedMin = min ? convertToDateFormat(min, format) : void 0;
3083
3082
  const formattedMax = max ? convertToDateFormat(max, format) : void 0;
@@ -3091,7 +3090,7 @@ var DateField = ({ ref, ...props }) => {
3091
3090
  setError(props.errorMessage);
3092
3091
  setIsInvalid(false);
3093
3092
  };
3094
- (0, import_react20.useEffect)(() => {
3093
+ (0, import_react21.useEffect)(() => {
3095
3094
  if (!isValidDate(min, format)) {
3096
3095
  setInvalidState(`Invalid min date: ${min}`);
3097
3096
  return;
@@ -3150,13 +3149,13 @@ Content.displayName = "Content";
3150
3149
 
3151
3150
  // src/components/Drawer/Drawer.tsx
3152
3151
  var import_dedupe26 = __toESM(require("classnames/dedupe"));
3153
- var import_react22 = require("react");
3152
+ var import_react23 = require("react");
3154
3153
  init_hooks();
3155
3154
  init_utils();
3156
3155
 
3157
3156
  // src/components/Drawer/DrawerContext.tsx
3158
- var import_react21 = require("react");
3159
- var DrawerContext = (0, import_react21.createContext)({
3157
+ var import_react22 = require("react");
3158
+ var DrawerContext = (0, import_react22.createContext)({
3160
3159
  onClose: () => {
3161
3160
  },
3162
3161
  closeLabel: void 0,
@@ -3178,8 +3177,8 @@ var Drawer = ({ ref, ...props }) => {
3178
3177
  onClose,
3179
3178
  children
3180
3179
  } = props;
3181
- const dialogRef = (0, import_react22.useRef)(null);
3182
- const [shouldTransition, setShouldTransition] = (0, import_react22.useState)(false);
3180
+ const dialogRef = (0, import_react23.useRef)(null);
3181
+ const [shouldTransition, setShouldTransition] = (0, import_react23.useState)(false);
3183
3182
  const { close } = useDialog({
3184
3183
  ref: dialogRef,
3185
3184
  isOpen,
@@ -3190,8 +3189,8 @@ var Drawer = ({ ref, ...props }) => {
3190
3189
  CSSVariable: TRANSITION_CSS_VARIABLE
3191
3190
  }
3192
3191
  });
3193
- const hiddenId = `dialog-screen-reader-announce-${(0, import_react22.useId)()}`;
3194
- const headerId = `dialog-header-${(0, import_react22.useId)()}`;
3192
+ const hiddenId = `dialog-screen-reader-announce-${(0, import_react23.useId)()}`;
3193
+ const headerId = `dialog-header-${(0, import_react23.useId)()}`;
3195
3194
  const dialogClasses = (0, import_dedupe26.default)(
3196
3195
  "mobius",
3197
3196
  "mobius-drawer",
@@ -3201,10 +3200,10 @@ var Drawer = ({ ref, ...props }) => {
3201
3200
  "--should-transition": shouldTransition
3202
3201
  }
3203
3202
  );
3204
- (0, import_react22.useEffect)(() => {
3203
+ (0, import_react23.useEffect)(() => {
3205
3204
  setShouldTransition(supportsDialog());
3206
3205
  }, []);
3207
- const contextValue = (0, import_react22.useMemo)(
3206
+ const contextValue = (0, import_react23.useMemo)(
3208
3207
  () => ({
3209
3208
  onClose: close,
3210
3209
  closeLabel,
@@ -3215,7 +3214,7 @@ var Drawer = ({ ref, ...props }) => {
3215
3214
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3216
3215
  "dialog",
3217
3216
  {
3218
- id: (0, import_react22.useId)(),
3217
+ id: (0, import_react23.useId)(),
3219
3218
  ref: mergeRefs([dialogRef, ref]),
3220
3219
  onCancel: close,
3221
3220
  className: dialogClasses,
@@ -3231,9 +3230,9 @@ var Drawer = ({ ref, ...props }) => {
3231
3230
  Drawer.displayName = "Drawer";
3232
3231
 
3233
3232
  // src/components/Drawer/useDrawer.ts
3234
- var import_react23 = require("react");
3233
+ var import_react24 = require("react");
3235
3234
  var useDrawer = () => {
3236
- const { onClose, closeLabel, headerId } = (0, import_react23.useContext)(DrawerContext);
3235
+ const { onClose, closeLabel, headerId } = (0, import_react24.useContext)(DrawerContext);
3237
3236
  return { onClose, closeLabel, headerId };
3238
3237
  };
3239
3238
 
@@ -3272,7 +3271,7 @@ var Drawer2 = Object.assign(Drawer, {
3272
3271
  Drawer2.displayName = "Drawer";
3273
3272
 
3274
3273
  // src/components/DropdownMenu/DropdownMenu.tsx
3275
- var import_react24 = require("react");
3274
+ var import_react25 = require("react");
3276
3275
  var import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
3277
3276
  var import_dedupe27 = __toESM(require("classnames/dedupe"));
3278
3277
  var import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
@@ -3285,8 +3284,8 @@ var DropdownMenu = ({ ref, ...props }) => {
3285
3284
  children,
3286
3285
  ...otherProps
3287
3286
  } = props;
3288
- const [activeId, setActiveId] = (0, import_react24.useState)(null);
3289
- const numberOfItems = import_react24.Children.count(children);
3287
+ const [activeId, setActiveId] = (0, import_react25.useState)(null);
3288
+ const numberOfItems = import_react25.Children.count(children);
3290
3289
  const {
3291
3290
  buttonProps,
3292
3291
  itemProps,
@@ -3310,15 +3309,15 @@ var DropdownMenu = ({ ref, ...props }) => {
3310
3309
  }
3311
3310
  };
3312
3311
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
3313
- trigger ? (0, import_react24.cloneElement)(trigger, {
3312
+ trigger ? (0, import_react25.cloneElement)(trigger, {
3314
3313
  className: triggerClasses,
3315
3314
  open,
3316
3315
  label,
3317
3316
  ...buttonProps
3318
3317
  }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
3319
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: listClasses, role: "menu", children: import_react24.Children.map(children, (child, index) => {
3320
- if ((0, import_react24.isValidElement)(child)) {
3321
- return (0, import_react24.cloneElement)(child, {
3318
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: listClasses, role: "menu", children: import_react25.Children.map(children, (child, index) => {
3319
+ if ((0, import_react25.isValidElement)(child)) {
3320
+ return (0, import_react25.cloneElement)(child, {
3322
3321
  onClick: () => handleChildClick(child.props, index),
3323
3322
  active: index === activeId,
3324
3323
  ...itemProps[index]
@@ -3331,7 +3330,7 @@ var DropdownMenu = ({ ref, ...props }) => {
3331
3330
  DropdownMenu.displayName = "DropdownMenu";
3332
3331
 
3333
3332
  // src/components/DropdownMenu/Item.tsx
3334
- var import_react25 = require("react");
3333
+ var import_react26 = require("react");
3335
3334
  var import_dedupe28 = __toESM(require("classnames/dedupe"));
3336
3335
  var import_jsx_runtime33 = require("react/jsx-runtime");
3337
3336
  var Item = ({ ref, ...props }) => {
@@ -3348,18 +3347,15 @@ var Item = ({ ref, ...props }) => {
3348
3347
  { "--is-active": active },
3349
3348
  otherProps.className
3350
3349
  );
3351
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Element, { ref, onClick, ...otherProps, children: import_react25.Children.map(children, (child) => {
3352
- if ((0, import_react25.isValidElement)(child)) {
3350
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Element, { ref, onClick, ...otherProps, children: import_react26.Children.map(children, (child) => {
3351
+ if ((0, import_react26.isValidElement)(child)) {
3353
3352
  const childClasses = (0, import_dedupe28.default)(
3354
3353
  child.props.className,
3355
3354
  classes
3356
3355
  );
3357
- return (0, import_react25.cloneElement)(
3358
- child,
3359
- {
3360
- className: childClasses
3361
- }
3362
- );
3356
+ return (0, import_react26.cloneElement)(child, {
3357
+ className: childClasses
3358
+ });
3363
3359
  }
3364
3360
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: classes, children: child });
3365
3361
  }) });
@@ -3377,7 +3373,7 @@ DropdownMenu2.displayName = "DropdownMenu";
3377
3373
 
3378
3374
  // src/components/Fieldset/Fieldset.tsx
3379
3375
  var import_dedupe29 = __toESM(require("classnames/dedupe"));
3380
- var import_react26 = require("react");
3376
+ var import_react27 = require("react");
3381
3377
  var import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
3382
3378
  var import_jsx_runtime34 = require("react/jsx-runtime");
3383
3379
  var useFieldset = (props) => {
@@ -3386,7 +3382,7 @@ var useFieldset = (props) => {
3386
3382
  let containerProps = {
3387
3383
  role: "group"
3388
3384
  };
3389
- const legendId = (0, import_react26.useId)();
3385
+ const legendId = (0, import_react27.useId)();
3390
3386
  if (legend) {
3391
3387
  legendProps = {
3392
3388
  ...legendProps,
@@ -3413,7 +3409,7 @@ var Fieldset = ({ ref: _ref, ...props }) => {
3413
3409
  const classes = (0, import_dedupe29.default)("mobius", "mobius-fieldset", props.className);
3414
3410
  legendProps.className = "mobius-fieldset__legend";
3415
3411
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
3416
- legend && (0, import_react26.cloneElement)(legendComponent, { ...legendProps }, [legend]),
3412
+ legend && (0, import_react27.cloneElement)(legendComponent, { ...legendProps }, [legend]),
3417
3413
  children
3418
3414
  ] });
3419
3415
  };
@@ -3456,7 +3452,7 @@ var Grid = ({ ref, ...props }) => {
3456
3452
  Grid.displayName = "Grid";
3457
3453
 
3458
3454
  // src/components/Grid/Item.tsx
3459
- var import_react27 = require("react");
3455
+ var import_react28 = require("react");
3460
3456
  var import_dedupe31 = __toESM(require("classnames/dedupe"));
3461
3457
  init_hooks();
3462
3458
  var import_jsx_runtime36 = require("react/jsx-runtime");
@@ -3494,9 +3490,9 @@ var GridItem = ({ ref, ...props }) => {
3494
3490
  xl,
3495
3491
  xxl
3496
3492
  });
3497
- const [responsiveSpan, setResponsiveSpan] = (0, import_react27.useState)();
3493
+ const [responsiveSpan, setResponsiveSpan] = (0, import_react28.useState)();
3498
3494
  const classes = (0, import_dedupe31.default)("mobius", "mobius-grid__item", className);
3499
- (0, import_react27.useEffect)(() => {
3495
+ (0, import_react28.useEffect)(() => {
3500
3496
  setResponsiveSpan(breakpointMap[breakpointSize]);
3501
3497
  }, [breakpointSize, breakpointMap]);
3502
3498
  const styles = {
@@ -3586,7 +3582,7 @@ function LinkButton({
3586
3582
  }
3587
3583
 
3588
3584
  // src/components/List/List.tsx
3589
- var import_react28 = require("react");
3585
+ var import_react29 = require("react");
3590
3586
  var import_dedupe35 = __toESM(require("classnames/dedupe"));
3591
3587
  var import_List = require("@simplybusiness/mobius/src/components/List/List.css");
3592
3588
  var import_jsx_runtime40 = require("react/jsx-runtime");
@@ -3613,9 +3609,9 @@ var List = ({ ref, ...props }) => {
3613
3609
  ref,
3614
3610
  ...mappedProps,
3615
3611
  className: classes,
3616
- children: import_react28.Children.map(children, (child) => {
3617
- if ((0, import_react28.isValidElement)(child)) {
3618
- return (0, import_react28.cloneElement)(child, {
3612
+ children: import_react29.Children.map(children, (child) => {
3613
+ if ((0, import_react29.isValidElement)(child)) {
3614
+ return (0, import_react29.cloneElement)(child, {
3619
3615
  parentIcon: icon
3620
3616
  });
3621
3617
  }
@@ -3734,16 +3730,16 @@ var Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_
3734
3730
  Content2.displayName = "Content";
3735
3731
 
3736
3732
  // src/components/Modal/Header.tsx
3737
- var import_react31 = require("react");
3733
+ var import_react32 = require("react");
3738
3734
  var import_icons10 = require("@simplybusiness/icons");
3739
3735
  init_Icon2();
3740
3736
 
3741
3737
  // src/components/Modal/useModal.ts
3742
- var import_react30 = require("react");
3738
+ var import_react31 = require("react");
3743
3739
 
3744
3740
  // src/components/Modal/ModalContext.tsx
3745
- var import_react29 = require("react");
3746
- var ModalContext = (0, import_react29.createContext)({
3741
+ var import_react30 = require("react");
3742
+ var ModalContext = (0, import_react30.createContext)({
3747
3743
  onClose: () => {
3748
3744
  },
3749
3745
  closeLabel: void 0,
@@ -3754,7 +3750,7 @@ var ModalContext = (0, import_react29.createContext)({
3754
3750
 
3755
3751
  // src/components/Modal/useModal.ts
3756
3752
  var useModal = () => {
3757
- const { onClose, closeLabel, titleId, setTitleId } = (0, import_react30.useContext)(ModalContext);
3753
+ const { onClose, closeLabel, titleId, setTitleId } = (0, import_react31.useContext)(ModalContext);
3758
3754
  return { onClose, closeLabel, titleId, setTitleId };
3759
3755
  };
3760
3756
 
@@ -3762,8 +3758,8 @@ var useModal = () => {
3762
3758
  var import_jsx_runtime45 = require("react/jsx-runtime");
3763
3759
  var Header2 = ({ ref, children, ...otherProps }) => {
3764
3760
  const { onClose, closeLabel, setTitleId } = useModal();
3765
- const titleId = (0, import_react31.useId)();
3766
- (0, import_react31.useEffect)(() => {
3761
+ const titleId = (0, import_react32.useId)();
3762
+ (0, import_react32.useEffect)(() => {
3767
3763
  setTitleId(titleId);
3768
3764
  }, [titleId, setTitleId]);
3769
3765
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
@@ -3797,7 +3793,7 @@ Header2.displayName = "Header";
3797
3793
 
3798
3794
  // src/components/Modal/Modal.tsx
3799
3795
  var import_dedupe39 = __toESM(require("classnames/dedupe"));
3800
- var import_react32 = require("react");
3796
+ var import_react33 = require("react");
3801
3797
  init_hooks();
3802
3798
  init_utils();
3803
3799
  init_polyfill_tests();
@@ -3817,11 +3813,11 @@ var Modal = ({ ref, ...props }) => {
3817
3813
  animation,
3818
3814
  ...rest
3819
3815
  } = props;
3820
- const [shouldTransition, setShouldTransition] = (0, import_react32.useState)(false);
3821
- (0, import_react32.useEffect)(() => {
3816
+ const [shouldTransition, setShouldTransition] = (0, import_react33.useState)(false);
3817
+ (0, import_react33.useEffect)(() => {
3822
3818
  setShouldTransition(supportsDialog());
3823
3819
  }, []);
3824
- const dialogRef = (0, import_react32.useRef)(null);
3820
+ const dialogRef = (0, import_react33.useRef)(null);
3825
3821
  const { close } = useDialog({
3826
3822
  ref: dialogRef,
3827
3823
  isOpen,
@@ -3845,11 +3841,11 @@ var Modal = ({ ref, ...props }) => {
3845
3841
  },
3846
3842
  className
3847
3843
  );
3848
- const [titleId, setTitleId] = (0, import_react32.useState)(void 0);
3849
- const handleSetTitleId = (0, import_react32.useCallback)((id) => {
3844
+ const [titleId, setTitleId] = (0, import_react33.useState)(void 0);
3845
+ const handleSetTitleId = (0, import_react33.useCallback)((id) => {
3850
3846
  setTitleId(id);
3851
3847
  }, []);
3852
- const contextValue = (0, import_react32.useMemo)(
3848
+ const contextValue = (0, import_react33.useMemo)(
3853
3849
  () => ({
3854
3850
  onClose: close,
3855
3851
  closeLabel,
@@ -3886,7 +3882,7 @@ Modal2.displayName = "Modal";
3886
3882
 
3887
3883
  // src/components/NumberField/NumberField.tsx
3888
3884
  var import_dedupe40 = __toESM(require("classnames/dedupe"));
3889
- var import_react33 = require("react");
3885
+ var import_react34 = require("react");
3890
3886
  init_TextField2();
3891
3887
  var import_NumberField = require("@simplybusiness/mobius/src/components/NumberField/NumberField.css");
3892
3888
  var import_jsx_runtime47 = require("react/jsx-runtime");
@@ -3905,9 +3901,9 @@ var NumberField = ({ ref, ...props }) => {
3905
3901
  onBlur: customOnBlur,
3906
3902
  ...rest
3907
3903
  } = otherProps;
3908
- const focusedInputRef = (0, import_react33.useRef)(null);
3909
- const wheelHandler = (0, import_react33.useCallback)((ev) => ev.preventDefault(), []);
3910
- (0, import_react33.useEffect)(() => {
3904
+ const focusedInputRef = (0, import_react34.useRef)(null);
3905
+ const wheelHandler = (0, import_react34.useCallback)((ev) => ev.preventDefault(), []);
3906
+ (0, import_react34.useEffect)(() => {
3911
3907
  return () => {
3912
3908
  focusedInputRef.current?.removeEventListener("wheel", wheelHandler);
3913
3909
  focusedInputRef.current = null;
@@ -3988,7 +3984,7 @@ Option2.displayName = "Option";
3988
3984
 
3989
3985
  // src/components/PasswordField/PasswordField.tsx
3990
3986
  var import_dedupe41 = __toESM(require("classnames/dedupe"));
3991
- var import_react34 = require("react");
3987
+ var import_react35 = require("react");
3992
3988
  init_mergeRefs();
3993
3989
  init_TextField2();
3994
3990
 
@@ -4023,10 +4019,10 @@ var PasswordField = ({
4023
4019
  autoComplete = "current-password",
4024
4020
  ...props
4025
4021
  }) => {
4026
- const [show, setShow] = (0, import_react34.useState)(false);
4022
+ const [show, setShow] = (0, import_react35.useState)(false);
4027
4023
  const type = show ? "text" : "password";
4028
4024
  const classes = (0, import_dedupe41.default)("mobius-password-field", className);
4029
- const localRef = (0, import_react34.useRef)(null);
4025
+ const localRef = (0, import_react35.useRef)(null);
4030
4026
  const handleShowHideButtonClick = () => {
4031
4027
  const selectionStart = localRef.current?.selectionStart;
4032
4028
  const selectionEnd = localRef.current?.selectionEnd;
@@ -4055,7 +4051,7 @@ PasswordField.displayName = "PasswordField";
4055
4051
  // src/components/Popover/Popover.tsx
4056
4052
  var import_icons12 = require("@simplybusiness/icons");
4057
4053
  var import_dedupe42 = __toESM(require("classnames/dedupe"));
4058
- var import_react38 = require("react");
4054
+ var import_react39 = require("react");
4059
4055
  var import_react_dom = require("react-dom");
4060
4056
  var import_mobius_hooks6 = require("@simplybusiness/mobius-hooks");
4061
4057
  init_Icon2();
@@ -4080,14 +4076,14 @@ var Arrow = ({ ref, width = 20, className, style }) => {
4080
4076
  };
4081
4077
 
4082
4078
  // src/components/Popover/useAutoUpdate.ts
4083
- var import_react35 = require("react");
4079
+ var import_react36 = require("react");
4084
4080
  var useAutoUpdate = ({
4085
4081
  referenceRef,
4086
4082
  floatingRef,
4087
4083
  onUpdate,
4088
4084
  enabled
4089
4085
  }) => {
4090
- (0, import_react35.useEffect)(() => {
4086
+ (0, import_react36.useEffect)(() => {
4091
4087
  if (!enabled) return;
4092
4088
  const reference = referenceRef.current;
4093
4089
  const floating = floatingRef.current;
@@ -4109,7 +4105,7 @@ var useAutoUpdate = ({
4109
4105
  };
4110
4106
 
4111
4107
  // src/components/Popover/useFloatingPosition.ts
4112
- var import_react36 = require("react");
4108
+ var import_react37 = require("react");
4113
4109
  var ABSOLUTE_FLOATING_STYLES = {
4114
4110
  position: "absolute",
4115
4111
  top: 0,
@@ -4139,7 +4135,7 @@ var useFloatingPosition = ({
4139
4135
  arrowWidth,
4140
4136
  useFixedStrategy
4141
4137
  }) => {
4142
- const update = (0, import_react36.useCallback)(() => {
4138
+ const update = (0, import_react37.useCallback)(() => {
4143
4139
  const reference = referenceRef.current;
4144
4140
  const floating = floatingRef.current;
4145
4141
  if (!reference || !floating) return;
@@ -4201,7 +4197,7 @@ var useFloatingPosition = ({
4201
4197
  arrowWidth,
4202
4198
  useFixedStrategy
4203
4199
  ]);
4204
- (0, import_react36.useLayoutEffect)(() => {
4200
+ (0, import_react37.useLayoutEffect)(() => {
4205
4201
  if (!isOpen) return;
4206
4202
  update();
4207
4203
  }, [isOpen, update]);
@@ -4213,14 +4209,14 @@ var useFloatingPosition = ({
4213
4209
  };
4214
4210
 
4215
4211
  // src/components/Popover/useOutsidePress.ts
4216
- var import_react37 = require("react");
4212
+ var import_react38 = require("react");
4217
4213
  var useOutsidePress = ({
4218
4214
  referenceRef,
4219
4215
  floatingRef,
4220
4216
  enabled,
4221
4217
  onOutsidePress
4222
4218
  }) => {
4223
- (0, import_react37.useEffect)(() => {
4219
+ (0, import_react38.useEffect)(() => {
4224
4220
  if (!enabled) return;
4225
4221
  const handler = (event) => {
4226
4222
  const target = event.target;
@@ -4241,11 +4237,11 @@ var OFFSET_FROM_CONTENT_DEFAULT = 10;
4241
4237
  var ARROW_WIDTH = 20;
4242
4238
  var Popover = (props) => {
4243
4239
  const { trigger, children, onOpen, onClose, className } = props;
4244
- const referenceRef = (0, import_react38.useRef)(null);
4245
- const floatingRef = (0, import_react38.useRef)(null);
4246
- const arrowRef = (0, import_react38.useRef)(null);
4247
- const [isOpen, setIsOpen] = (0, import_react38.useState)(false);
4248
- const [portalTarget, setPortalTarget] = (0, import_react38.useState)(null);
4240
+ const referenceRef = (0, import_react39.useRef)(null);
4241
+ const floatingRef = (0, import_react39.useRef)(null);
4242
+ const arrowRef = (0, import_react39.useRef)(null);
4243
+ const [isOpen, setIsOpen] = (0, import_react39.useState)(false);
4244
+ const [portalTarget, setPortalTarget] = (0, import_react39.useState)(null);
4249
4245
  const isInsideDialog = portalTarget !== null && portalTarget.tagName === "DIALOG";
4250
4246
  const { initialFloatingStyles, initialArrowStyles, update } = useFloatingPosition({
4251
4247
  referenceRef,
@@ -4276,7 +4272,7 @@ var Popover = (props) => {
4276
4272
  "mobius-popover__container",
4277
4273
  className
4278
4274
  );
4279
- (0, import_react38.useEffect)(() => {
4275
+ (0, import_react39.useEffect)(() => {
4280
4276
  const el = floatingRef.current;
4281
4277
  if (!el) return;
4282
4278
  const preventLabelActivation = (e) => {
@@ -4299,10 +4295,10 @@ var Popover = (props) => {
4299
4295
  setIsOpen(true);
4300
4296
  onOpen?.();
4301
4297
  };
4302
- const setReferenceRef = (0, import_react38.useCallback)((node) => {
4298
+ const setReferenceRef = (0, import_react39.useCallback)((node) => {
4303
4299
  referenceRef.current = node;
4304
4300
  }, []);
4305
- const triggerComponent = (0, import_react38.cloneElement)(trigger, {
4301
+ const triggerComponent = (0, import_react39.cloneElement)(trigger, {
4306
4302
  ref: setReferenceRef,
4307
4303
  className: (0, import_dedupe42.default)(
4308
4304
  trigger.props.className,
@@ -4366,7 +4362,7 @@ var Popover = (props) => {
4366
4362
 
4367
4363
  // src/components/Progress/Progress.tsx
4368
4364
  var import_dedupe43 = __toESM(require("classnames/dedupe"));
4369
- var import_react39 = require("react");
4365
+ var import_react40 = require("react");
4370
4366
  init_Label2();
4371
4367
  var import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
4372
4368
  var import_jsx_runtime53 = require("react/jsx-runtime");
@@ -4413,8 +4409,8 @@ var DEFAULT_VALUE = 0;
4413
4409
  var DEFAULT_MIN_VALUE = 0;
4414
4410
  var DEFAULT_MAX_VALUE = 100;
4415
4411
  var Progress = ({ ref, ...props }) => {
4416
- const progressId = (0, import_react39.useId)();
4417
- const progressLabelId = (0, import_react39.useId)();
4412
+ const progressId = (0, import_react40.useId)();
4413
+ const progressLabelId = (0, import_react40.useId)();
4418
4414
  const {
4419
4415
  id,
4420
4416
  label,
@@ -4470,7 +4466,7 @@ Progress.displayName = "Progress";
4470
4466
 
4471
4467
  // src/components/Radio/Radio.tsx
4472
4468
  var import_dedupe44 = __toESM(require("classnames/dedupe"));
4473
- var import_react40 = require("react");
4469
+ var import_react41 = require("react");
4474
4470
  init_ErrorMessage2();
4475
4471
  init_Label2();
4476
4472
  var import_Radio = require("@simplybusiness/mobius/src/components/Radio/Radio.css");
@@ -4498,19 +4494,19 @@ var Radio = ({ ref, ...props }) => {
4498
4494
  const isMultiline = label && children;
4499
4495
  const isControlled = selected !== void 0;
4500
4496
  const isChecked = isControlled ? selected === value : defaultChecked;
4501
- const contentRef = (0, import_react40.useRef)(null);
4502
- const prevOverflowRef = (0, import_react40.useRef)({
4497
+ const contentRef = (0, import_react41.useRef)(null);
4498
+ const prevOverflowRef = (0, import_react41.useRef)({
4503
4499
  vertical: false,
4504
4500
  horizontal: false
4505
4501
  });
4506
- const hasIconFirst = (0, import_react40.useMemo)(() => {
4507
- if (!children || import_react40.Children.count(children) === 0) return false;
4508
- const firstChild = import_react40.Children.toArray(children)[0];
4509
- if (!(0, import_react40.isValidElement)(firstChild)) return false;
4502
+ const hasIconFirst = (0, import_react41.useMemo)(() => {
4503
+ if (!children || import_react41.Children.count(children) === 0) return false;
4504
+ const firstChild = import_react41.Children.toArray(children)[0];
4505
+ if (!(0, import_react41.isValidElement)(firstChild)) return false;
4510
4506
  const props2 = firstChild.props;
4511
4507
  return "icon" in props2 && props2.icon !== void 0;
4512
4508
  }, [children]);
4513
- (0, import_react40.useLayoutEffect)(() => {
4509
+ (0, import_react41.useLayoutEffect)(() => {
4514
4510
  if (!contentRef.current || !onOverflow) return;
4515
4511
  if (orientation === "vertical") {
4516
4512
  return;
@@ -4590,7 +4586,7 @@ Radio.displayName = "Radio";
4590
4586
 
4591
4587
  // src/components/Radio/RadioGroup.tsx
4592
4588
  var import_dedupe45 = __toESM(require("classnames/dedupe"));
4593
- var import_react41 = require("react");
4589
+ var import_react42 = require("react");
4594
4590
  init_hooks();
4595
4591
  init_spaceDelimitedList();
4596
4592
  init_ErrorMessage2();
@@ -4624,15 +4620,15 @@ var RadioGroup = ({ ref, ...props }) => {
4624
4620
  ...rest
4625
4621
  } = props;
4626
4622
  const defaultSelected = getDefaultVal(children, value || defaultValue);
4627
- const [selected, setSelected] = (0, import_react41.useState)(defaultSelected);
4628
- const overflowsRef = (0, import_react41.useRef)({});
4629
- const [hasOverflow, setHasOverflow] = (0, import_react41.useState)(false);
4630
- (0, import_react41.useEffect)(() => {
4623
+ const [selected, setSelected] = (0, import_react42.useState)(defaultSelected);
4624
+ const overflowsRef = (0, import_react42.useRef)({});
4625
+ const [hasOverflow, setHasOverflow] = (0, import_react42.useState)(false);
4626
+ (0, import_react42.useEffect)(() => {
4631
4627
  if (value !== void 0) {
4632
4628
  setSelected(value);
4633
4629
  }
4634
4630
  }, [value]);
4635
- const handleOverflow = (0, import_react41.useCallback)(
4631
+ const handleOverflow = (0, import_react42.useCallback)(
4636
4632
  (radioValue, overflow) => {
4637
4633
  overflowsRef.current = {
4638
4634
  ...overflowsRef.current,
@@ -4666,15 +4662,15 @@ var RadioGroup = ({ ref, ...props }) => {
4666
4662
  [`--is-${effectiveOrientation}`]: true
4667
4663
  });
4668
4664
  const labelClasses = (0, import_dedupe45.default)(radioClasses, validationClasses);
4669
- const errorMessageId = (0, import_react41.useId)();
4670
- const defaultNameAttrId = (0, import_react41.useId)();
4665
+ const errorMessageId = (0, import_react42.useId)();
4666
+ const defaultNameAttrId = (0, import_react42.useId)();
4671
4667
  const nameAttribute = name || defaultNameAttrId;
4672
4668
  const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
4673
4669
  const describedBy = spaceDelimitedList([
4674
4670
  shouldErrorMessageShow,
4675
4671
  props["aria-describedby"]
4676
4672
  ]);
4677
- const labelId = (0, import_react41.useId)();
4673
+ const labelId = (0, import_react42.useId)();
4678
4674
  return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4679
4675
  "div",
4680
4676
  {
@@ -4693,10 +4689,10 @@ var RadioGroup = ({ ref, ...props }) => {
4693
4689
  role: "radiogroup",
4694
4690
  children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Stack, { gap: "xs", children: [
4695
4691
  label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
4696
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: radioWrapperClasses, children: import_react41.Children.map(children, (child) => {
4697
- if ((0, import_react41.isValidElement)(child)) {
4692
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: radioWrapperClasses, children: import_react42.Children.map(children, (child) => {
4693
+ if ((0, import_react42.isValidElement)(child)) {
4698
4694
  const childValue = child.props.value;
4699
- return (0, import_react41.cloneElement)(
4695
+ return (0, import_react42.cloneElement)(
4700
4696
  child,
4701
4697
  {
4702
4698
  orientation: effectiveOrientation,
@@ -4761,7 +4757,7 @@ Segment.displayName = "Segment";
4761
4757
  // src/components/Select/Select.tsx
4762
4758
  var import_icons13 = require("@simplybusiness/icons");
4763
4759
  var import_dedupe48 = __toESM(require("classnames/dedupe"));
4764
- var import_react42 = require("react");
4760
+ var import_react43 = require("react");
4765
4761
  init_hooks();
4766
4762
  init_useLabel2();
4767
4763
  init_spaceDelimitedList();
@@ -4808,7 +4804,7 @@ var Select = ({ ref, ...props }) => {
4808
4804
  otherProps.className
4809
4805
  );
4810
4806
  const iconClasses = (0, import_dedupe48.default)("mobius-select__icon", sharedClasses);
4811
- const errorMessageId = (0, import_react42.useId)();
4807
+ const errorMessageId = (0, import_react43.useId)();
4812
4808
  const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
4813
4809
  const describedBy = spaceDelimitedList([
4814
4810
  shouldErrorMessageShow,
@@ -4847,12 +4843,12 @@ Select.displayName = "Select";
4847
4843
 
4848
4844
  // src/components/Slider/Slider.tsx
4849
4845
  var import_dedupe49 = __toESM(require("classnames/dedupe"));
4850
- var import_react44 = require("react");
4846
+ var import_react45 = require("react");
4851
4847
  init_hooks();
4852
4848
  init_Label2();
4853
4849
 
4854
4850
  // src/components/Slider/helpers.ts
4855
- var import_react43 = require("react");
4851
+ var import_react44 = require("react");
4856
4852
  function numberFormatter(value, formatOptions, locale = navigator.languages?.[0] || "en-GB") {
4857
4853
  if (!formatOptions) {
4858
4854
  return value?.toString() || "";
@@ -4883,11 +4879,11 @@ var Slider = (props) => {
4883
4879
  formatOptions,
4884
4880
  isDisabled = false
4885
4881
  } = props;
4886
- const trackRef = (0, import_react44.useRef)(null);
4887
- const [currentValue, setCurrentValue] = (0, import_react44.useState)(
4882
+ const trackRef = (0, import_react45.useRef)(null);
4883
+ const [currentValue, setCurrentValue] = (0, import_react45.useState)(
4888
4884
  value || defaultValue || 0
4889
4885
  );
4890
- const [isDragging, setIsDraggging] = (0, import_react44.useState)(false);
4886
+ const [isDragging, setIsDraggging] = (0, import_react45.useState)(false);
4891
4887
  const { labelProps, fieldProps } = useLabel({
4892
4888
  id,
4893
4889
  label,
@@ -4949,13 +4945,13 @@ var Slider = (props) => {
4949
4945
  };
4950
4946
 
4951
4947
  // src/components/SVG/SVG.tsx
4952
- var import_react45 = require("react");
4948
+ var import_react46 = require("react");
4953
4949
  var import_dedupe50 = __toESM(require("classnames/dedupe"));
4954
4950
  var import_jsx_runtime60 = require("react/jsx-runtime");
4955
4951
  var SVG = ({ ref, ...props }) => {
4956
4952
  const { children, className, ...otherProps } = props;
4957
4953
  const classes = (0, import_dedupe50.default)("mobius", "mobius-svg", className);
4958
- const svgNode = import_react45.Children.only(children);
4954
+ const svgNode = import_react46.Children.only(children);
4959
4955
  const { children: svgChildren, viewBox, xmlns } = svgNode.props;
4960
4956
  return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4961
4957
  "svg",
@@ -4972,7 +4968,7 @@ var SVG = ({ ref, ...props }) => {
4972
4968
  SVG.displayName = "SVG";
4973
4969
 
4974
4970
  // src/components/Switch/Switch.tsx
4975
- var import_react46 = require("react");
4971
+ var import_react47 = require("react");
4976
4972
  var import_dedupe51 = __toESM(require("classnames/dedupe"));
4977
4973
  var import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
4978
4974
  var import_jsx_runtime61 = require("react/jsx-runtime");
@@ -4984,8 +4980,8 @@ var Switch = ({ ref, ...props }) => {
4984
4980
  isDisabled = false,
4985
4981
  ...otherProps
4986
4982
  } = props;
4987
- const [enabled, setEnabled] = (0, import_react46.useState)(checked);
4988
- (0, import_react46.useEffect)(() => {
4983
+ const [enabled, setEnabled] = (0, import_react47.useState)(checked);
4984
+ (0, import_react47.useEffect)(() => {
4989
4985
  setEnabled(checked);
4990
4986
  }, [checked]);
4991
4987
  const classes = (0, import_dedupe51.default)(
@@ -5315,7 +5311,7 @@ var toast = {
5315
5311
  };
5316
5312
 
5317
5313
  // src/components/Toast/Toaster.tsx
5318
- var import_react47 = require("react");
5314
+ var import_react48 = require("react");
5319
5315
  var import_sonner2 = require("sonner");
5320
5316
  var import_jsx_runtime73 = require("react/jsx-runtime");
5321
5317
  var Toaster = ({
@@ -5326,7 +5322,7 @@ var Toaster = ({
5326
5322
  visibleToasts = 3,
5327
5323
  gap = 8
5328
5324
  }) => {
5329
- (0, import_react47.useEffect)(() => {
5325
+ (0, import_react48.useEffect)(() => {
5330
5326
  toastState.showCloseButton = closeButton;
5331
5327
  }, [closeButton]);
5332
5328
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
@@ -5345,7 +5341,7 @@ Toaster.displayName = "Toaster";
5345
5341
 
5346
5342
  // src/components/Trust/Trust.tsx
5347
5343
  var import_dedupe63 = __toESM(require("classnames/dedupe"));
5348
- var import_react48 = require("react");
5344
+ var import_react49 = require("react");
5349
5345
  init_utils();
5350
5346
 
5351
5347
  // src/components/Trust/constants.ts
@@ -5422,8 +5418,8 @@ var Trust = ({ ref, ...props }) => {
5422
5418
  stars,
5423
5419
  className
5424
5420
  } = props;
5425
- const [isMounted, setIsMounted] = (0, import_react48.useState)(false);
5426
- const trustRef = (0, import_react48.useRef)(null);
5421
+ const [isMounted, setIsMounted] = (0, import_react49.useState)(false);
5422
+ const trustRef = (0, import_react49.useRef)(null);
5427
5423
  const {
5428
5424
  templateId,
5429
5425
  className: variantClassName,
@@ -5450,13 +5446,13 @@ var Trust = ({ ref, ...props }) => {
5450
5446
  },
5451
5447
  className
5452
5448
  );
5453
- (0, import_react48.useEffect)(() => {
5449
+ (0, import_react49.useEffect)(() => {
5454
5450
  const hasTrustpilotLoaded = trustRef.current && window?.Trustpilot && window?.Trustpilot.loadFromElement;
5455
5451
  if (isMounted && hasTrustpilotLoaded) {
5456
5452
  window.Trustpilot.loadFromElement(trustRef.current, true);
5457
5453
  }
5458
5454
  }, [isMounted]);
5459
- (0, import_react48.useEffect)(() => {
5455
+ (0, import_react49.useEffect)(() => {
5460
5456
  setIsMounted(true);
5461
5457
  }, []);
5462
5458
  if (!isMounted) return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { style: styles });
@@ -5483,7 +5479,7 @@ var Trust = ({ ref, ...props }) => {
5483
5479
 
5484
5480
  // src/components/ExpandableText/ExpandableText.tsx
5485
5481
  var import_dedupe64 = __toESM(require("classnames/dedupe"));
5486
- var import_react49 = require("react");
5482
+ var import_react50 = require("react");
5487
5483
  init_hooks();
5488
5484
  init_TextOrHTML2();
5489
5485
  var import_ExpandableText = require("@simplybusiness/mobius/src/components/ExpandableText/ExpandableText.css");
@@ -5501,14 +5497,14 @@ var ExpandableText = ({ ref, ...props }) => {
5501
5497
  onToggle,
5502
5498
  ...otherProps
5503
5499
  } = props;
5504
- const [isExpanded, setIsExpanded] = (0, import_react49.useState)(false);
5505
- const [isCollapsed, setIsCollapsed] = (0, import_react49.useState)(false);
5506
- const textRef = (0, import_react49.useRef)(null);
5500
+ const [isExpanded, setIsExpanded] = (0, import_react50.useState)(false);
5501
+ const [isCollapsed, setIsCollapsed] = (0, import_react50.useState)(false);
5502
+ const textRef = (0, import_react50.useRef)(null);
5507
5503
  const { down } = useBreakpoint();
5508
- const baseId = (0, import_react49.useId)();
5504
+ const baseId = (0, import_react50.useId)();
5509
5505
  const expandButtonId = `expandable-text-expand-${baseId}`;
5510
5506
  const shouldCollapse = breakpoint ? down(breakpoint) : true;
5511
- (0, import_react49.useEffect)(() => {
5507
+ (0, import_react50.useEffect)(() => {
5512
5508
  if (!shouldCollapse || !textRef.current) {
5513
5509
  setIsCollapsed(false);
5514
5510
  return;