@hortiview/shared-components 2.18.0 → 2.18.1

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 (219) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{AlertBanner-aW6joVUm.js → AlertBanner-BFzaGOer.js} +3 -3
  3. package/dist/{GenericCard-IWX-Bmb_.js → GenericCard-grpa3KJR.js} +3 -3
  4. package/dist/{ListAreaService-Fsm3-gDM.js → ListAreaService-DfxJ7jFs.js} +5 -5
  5. package/dist/{_Map-D8db_GOu.js → _Map-BYxTn6ob.js} +1 -1
  6. package/dist/{_commonjsHelpers-B4e78b8K.js → _commonjsHelpers-ByX85dGu.js} +18 -13
  7. package/dist/animationframe-CqXArbwZ.js +32 -0
  8. package/dist/component-By6nyiBU.js +70 -0
  9. package/dist/{component-DEJuY56h.js → component-DYpB_4EP.js} +1 -111
  10. package/dist/components/AlertBanner/AlertBanner.js +4 -4
  11. package/dist/components/AlertBanner/LinkBanner.js +3 -3
  12. package/dist/components/AllowedButton/AllowedButton.js +1 -1
  13. package/dist/components/AllowedIconButton/AllowedIconButton.js +1 -1
  14. package/dist/components/BaseView/BaseView.js +14 -14
  15. package/dist/components/BasicHeading/BasicHeading.js +5 -5
  16. package/dist/components/BlockView/BlockView.js +2 -2
  17. package/dist/components/ButtonCard/ButtonCard.js +6 -6
  18. package/dist/components/ChipCard/ChipCard.js +13 -255
  19. package/dist/components/ConfirmationModal/ConfirmationModal.js +8 -8
  20. package/dist/components/ContextMenu/ContextMenu.js +12 -12
  21. package/dist/components/DeleteModal/DeleteModal.js +25 -25
  22. package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
  23. package/dist/components/Disclaimer/Disclaimer.js +3 -3
  24. package/dist/components/EmptyView/EmptyView.js +3 -3
  25. package/dist/components/Filter/Filter.js +15 -15
  26. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
  27. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +7 -22
  28. package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
  29. package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
  30. package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
  31. package/dist/components/FormComponents/FormSelect/FormSelect.js +4 -4
  32. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
  33. package/dist/components/FormComponents/FormSlider/FormSlider.js +10 -98
  34. package/dist/components/FormComponents/FormText/FormText.js +2 -2
  35. package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
  36. package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
  37. package/dist/components/GenericTable/GenericTable.js +36 -172
  38. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
  39. package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
  40. package/dist/components/HashTabView/HashTabView.js +10 -428
  41. package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
  42. package/dist/components/Iconify/Iconify.js +2 -2
  43. package/dist/components/InfoCard/InfoCard.js +4 -4
  44. package/dist/components/InfoGroup/InfoGroup.js +4 -4
  45. package/dist/components/ListArea/ListArea.js +6 -6
  46. package/dist/components/ListArea/ListAreaService.js +6 -6
  47. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +13 -5
  48. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +8 -74
  49. package/dist/components/Modal/Modal.js +12 -122
  50. package/dist/components/ModulePadding/ModulePadding.js +11 -11
  51. package/dist/components/OfflineView/OfflineView.js +45 -7
  52. package/dist/components/OnboardingBanner/OnboardingBanner.js +8 -8
  53. package/dist/components/OverflowTooltip/OverflowTooltip.js +2 -2
  54. package/dist/components/SearchBar/SearchBar.js +2 -2
  55. package/dist/components/Select/Select.js +2 -2
  56. package/dist/components/Stepper/Stepper.js +1 -1
  57. package/dist/components/Stepper/components/StepperButton.js +1 -1
  58. package/dist/components/Stepper/components/StepperHeader.js +3 -3
  59. package/dist/components/Stepper/components/StepperItem.js +2 -2
  60. package/dist/{correct-is-regexp-logic-Y0ToWEjF.js → correct-is-regexp-logic-BJ-OWRrn.js} +1 -1
  61. package/dist/{defineProperty-BTsGZ3c1.js → defineProperty-B7N9EBBI.js} +3 -3
  62. package/dist/{es.string.iterator-UszlTFwY.js → es.string.iterator-DBx2A42F.js} +2 -2
  63. package/dist/{find-CHg-_ooq.js → find-eU9ab_u7.js} +4 -4
  64. package/dist/{get-DxjPG00Z.js → get-BLvvbtML.js} +3 -3
  65. package/dist/get-CBFiuc3f.js +7 -0
  66. package/dist/hooks/useBreakpoints.js +37 -3
  67. package/dist/hooks/useHelperText.js +1 -1
  68. package/dist/{identity-BVIVr9qu.js → identity-B0bbReND.js} +4 -4
  69. package/dist/{index-BcGujPyk.js → index-Df2FYN-K.js} +5 -26
  70. package/dist/{index.es-B8p8KCdj.js → index.es-B19PQgzU.js} +4 -4
  71. package/dist/{index.es-BYcQTTL8.js → index.es-B9BUXRQn.js} +9 -339
  72. package/dist/{index.es-BPv5dCFQ.js → index.es-BOG3_7IM.js} +12 -12
  73. package/dist/{index.es-DGoBge9W.js → index.es-BOvO8moE.js} +4 -4
  74. package/dist/{index.es-BoUnovl_.js → index.es-BcnmoCEg.js} +8 -74
  75. package/dist/{index.es-C32E1Lcb.js → index.es-BwafUoK3.js} +82 -147
  76. package/dist/{index.es-B1h6DPYp.js → index.es-C27R5Xae.js} +2 -2
  77. package/dist/{index.es-nwjKmW7-.js → index.es-C2IOpX7R.js} +34 -111
  78. package/dist/{index.es-Da7ok-B-.js → index.es-C6I3L4U4.js} +2 -2
  79. package/dist/{index.es-BHvm4m-B.js → index.es-Cg57snrN.js} +19 -261
  80. package/dist/{index.es-DUTChZks.js → index.es-Ci3O23C_.js} +6 -72
  81. package/dist/{index.es-t87yNd9Y.js → index.es-CkB4776y.js} +6 -72
  82. package/dist/{index.es-CeQB6igi.js → index.es-Cr1PSTyq.js} +3 -3
  83. package/dist/{index.es--C-VLspF.js → index.es-D1iB_QlE.js} +8 -140
  84. package/dist/{index.es-Dgxrk6xW.js → index.es-DEBGoIKX.js} +2 -2
  85. package/dist/{index.es-CWyjqoEE.js → index.es-DHnCVuQ8.js} +7 -73
  86. package/dist/{index.es-Bo-d_yTV.js → index.es-DHoIQ8lu.js} +2 -2
  87. package/dist/{index.es-SjZ_-d7U.js → index.es-DUrjyxNI.js} +5 -5
  88. package/dist/{index.es-Cfv794DG.js → index.es-DdeCB7LW.js} +1 -1
  89. package/dist/{index.es-BanVdXEd.js → index.es-DgncYOqO.js} +2 -2
  90. package/dist/{index.es-DOnQ26kT.js → index.es-DhlgTSuU.js} +3 -3
  91. package/dist/{index.es-oxil0uFe.js → index.es-Z0aF-7Cn.js} +3 -6
  92. package/dist/{index.es-DmRhbgqK.js → index.es-l_3PNohs.js} +2 -68
  93. package/dist/{isArray-B457bpaW.js → isArray-Ce1Q96lU.js} +1 -1
  94. package/dist/isArray-olhCpv2e.js +7 -0
  95. package/dist/{isEmpty-BnfHn4bl.js → isEmpty-l2xQKl4x.js} +3 -3
  96. package/dist/{isString-DVA49FEo.js → isString-BNdV0Jpg.js} +3 -3
  97. package/dist/{isTypedArray-DziahYkI.js → isTypedArray-D39qzPYE.js} +2 -2
  98. package/dist/{keyboard-DiKJoabs.js → keyboard-DbG3oyPU.js} +3 -25
  99. package/dist/main.js +15 -15
  100. package/dist/{map-BprzXv4m.js → map-ZSVweMI1.js} +5 -5
  101. package/dist/{omit-CYY_mIYv.js → omit-BWQrFyQ-.js} +7 -7
  102. package/dist/{orderBy-DLBJlgdL.js → orderBy-Ce85KqD6.js} +7 -7
  103. package/dist/{parse-int-D-3oah_F.js → parse-int-CGpIXMGa.js} +2 -2
  104. package/dist/{react-number-format.es-DzkMiF8j.js → react-number-format.es-pczkQ4lQ.js} +0 -1
  105. package/dist/{react-tooltip.min-CVsI--2Y.js → react-tooltip.min-Dkz5ltCC.js} +1 -12
  106. package/dist/{react.esm-Bm0cAgpZ.js → react.esm-DF7i80eN.js} +2471 -2582
  107. package/dist/services/UtilService.js +9 -9
  108. package/dist/{slicedToArray-ByMQIs5x.js → slicedToArray-DC6VAZtW.js} +4 -4
  109. package/dist/test-utils.js +1 -1
  110. package/dist/{toString-B7FIT8FE.js → toString-D5bEU-DN.js} +1 -1
  111. package/dist/{uniqueId-BNVTeImh.js → uniqueId-CJo-XRQb.js} +2 -2
  112. package/dist/{util-DA21pZXj.js → util-CBo-ipCE.js} +0 -22
  113. package/package.json +2 -2
  114. package/dist/BigLoadingSpinner-DGj9_Z5J.js +0 -16
  115. package/dist/OfflineView-CIwV08EQ.js +0 -48
  116. package/dist/animationframe-BVKDmEXe.js +0 -54
  117. package/dist/component-Bz_dtX1r.js +0 -114
  118. package/dist/components/AlertBanner/AlertBanner.test.d.ts +0 -1
  119. package/dist/components/AlertBanner/AlertBanner.test.js +0 -34
  120. package/dist/components/AlertBanner/LinkBanner.test.d.ts +0 -1
  121. package/dist/components/AlertBanner/LinkBanner.test.js +0 -17
  122. package/dist/components/Allowed/Allowed.test.d.ts +0 -1
  123. package/dist/components/Allowed/Allowed.test.js +0 -49
  124. package/dist/components/AllowedButton/AllowedButton.test.d.ts +0 -1
  125. package/dist/components/AllowedButton/AllowedButton.test.js +0 -126
  126. package/dist/components/AllowedIconButton/AllowedIconButton.test.d.ts +0 -1
  127. package/dist/components/AllowedIconButton/AllowedIconButton.test.js +0 -121
  128. package/dist/components/BaseView/BaseView.test.d.ts +0 -1
  129. package/dist/components/BaseView/BaseView.test.js +0 -180
  130. package/dist/components/BasicHeading/BasicHeading.test.d.ts +0 -1
  131. package/dist/components/BasicHeading/BasicHeading.test.js +0 -36
  132. package/dist/components/BlockView/BlockView.test.d.ts +0 -1
  133. package/dist/components/BlockView/BlockView.test.js +0 -47
  134. package/dist/components/ButtonCard/ButtonCard.test.d.ts +0 -1
  135. package/dist/components/ButtonCard/ButtonCard.test.js +0 -92
  136. package/dist/components/ChipCard/ChipCard.test.d.ts +0 -1
  137. package/dist/components/ChipCard/ChipCard.test.js +0 -25
  138. package/dist/components/ConfirmationModal/ConfirmationModal.test.d.ts +0 -1
  139. package/dist/components/ConfirmationModal/ConfirmationModal.test.js +0 -221
  140. package/dist/components/ContextMenu/ContextMenu.test.d.ts +0 -1
  141. package/dist/components/ContextMenu/ContextMenu.test.js +0 -96
  142. package/dist/components/DeleteModal/DeleteModal.test.d.ts +0 -1
  143. package/dist/components/DeleteModal/DeleteModal.test.js +0 -132
  144. package/dist/components/Disclaimer/Disclaimer.test.d.ts +0 -1
  145. package/dist/components/Disclaimer/Disclaimer.test.js +0 -13
  146. package/dist/components/EmptyView/EmptyView.test.d.ts +0 -1
  147. package/dist/components/EmptyView/EmptyView.test.js +0 -50
  148. package/dist/components/Filter/Filter.test.d.ts +0 -1
  149. package/dist/components/Filter/Filter.test.js +0 -166
  150. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.d.ts +0 -1
  151. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +0 -56
  152. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.d.ts +0 -1
  153. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +0 -56
  154. package/dist/components/FormComponents/FormNumber/FormNumber.test.d.ts +0 -1
  155. package/dist/components/FormComponents/FormNumber/FormNumber.test.js +0 -51
  156. package/dist/components/FormComponents/FormRadio/FormRadio.test.d.ts +0 -1
  157. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +0 -73
  158. package/dist/components/FormComponents/FormSelect/FormSelect.test.d.ts +0 -1
  159. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +0 -226
  160. package/dist/components/FormComponents/FormSlider/FormSlider.test.d.ts +0 -1
  161. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +0 -49
  162. package/dist/components/FormComponents/FormText/FormText.test.d.ts +0 -1
  163. package/dist/components/FormComponents/FormText/FormText.test.js +0 -113
  164. package/dist/components/FormComponents/FormToggle/FormToggle.test.d.ts +0 -1
  165. package/dist/components/FormComponents/FormToggle/FormToggle.test.js +0 -54
  166. package/dist/components/GenericTable/GenericTable.test.d.ts +0 -1
  167. package/dist/components/GenericTable/GenericTable.test.js +0 -115
  168. package/dist/components/GenericTable/Mobile/GenericCard.test.d.ts +0 -1
  169. package/dist/components/GenericTable/Mobile/GenericCard.test.js +0 -76
  170. package/dist/components/GenericTable/Mobile/GenericCardList.test.d.ts +0 -1
  171. package/dist/components/GenericTable/Mobile/GenericCardList.test.js +0 -75
  172. package/dist/components/HashTabView/HashTabView.test.d.ts +0 -1
  173. package/dist/components/HashTabView/HashTabView.test.js +0 -31
  174. package/dist/components/HeaderFilter/HeaderFilter.test.d.ts +0 -1
  175. package/dist/components/HeaderFilter/HeaderFilter.test.js +0 -46
  176. package/dist/components/Iconify/Iconify.test.d.ts +0 -1
  177. package/dist/components/Iconify/Iconify.test.js +0 -28
  178. package/dist/components/InfoCard/InfoCard.test.d.ts +0 -1
  179. package/dist/components/InfoCard/InfoCard.test.js +0 -48
  180. package/dist/components/InfoGroup/InfoGroup.test.d.ts +0 -1
  181. package/dist/components/InfoGroup/InfoGroup.test.js +0 -40
  182. package/dist/components/ListArea/ListArea.test.d.ts +0 -1
  183. package/dist/components/ListArea/ListArea.test.js +0 -110
  184. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.d.ts +0 -1
  185. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +0 -15
  186. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.d.ts +0 -1
  187. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +0 -20
  188. package/dist/components/ModulePadding/ModulePadding.test.d.ts +0 -1
  189. package/dist/components/ModulePadding/ModulePadding.test.js +0 -22
  190. package/dist/components/OfflineView/OfflineView.test.d.ts +0 -1
  191. package/dist/components/OfflineView/OfflineView.test.js +0 -24
  192. package/dist/components/OnboardingBanner/OnboardingBanner.test.d.ts +0 -1
  193. package/dist/components/OnboardingBanner/OnboardingBanner.test.js +0 -72
  194. package/dist/components/OverflowTooltip/OverflowTooltip.test.d.ts +0 -1
  195. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +0 -37
  196. package/dist/components/PermissionChecks/PermissionService.test.d.ts +0 -1
  197. package/dist/components/PermissionChecks/PermissionService.test.js +0 -91
  198. package/dist/components/SafeForm/SafeForm.test.d.ts +0 -1
  199. package/dist/components/SafeForm/SafeForm.test.js +0 -91
  200. package/dist/components/Scrollbar/scrollbar.test.d.ts +0 -1
  201. package/dist/components/Scrollbar/scrollbar.test.js +0 -15
  202. package/dist/components/SearchBar/SearchBar.test.d.ts +0 -1
  203. package/dist/components/SearchBar/SearchBar.test.js +0 -23
  204. package/dist/components/Select/Select.test.d.ts +0 -1
  205. package/dist/components/Select/Select.test.js +0 -28
  206. package/dist/components/Stepper/Stepper.test.d.ts +0 -1
  207. package/dist/components/Stepper/Stepper.test.js +0 -342
  208. package/dist/components/VerticalDivider/VerticalDivider.test.d.ts +0 -1
  209. package/dist/components/VerticalDivider/VerticalDivider.test.js +0 -15
  210. package/dist/get-D8IXqiys.js +0 -7
  211. package/dist/hooks/useBreakpoints.test.d.ts +0 -1
  212. package/dist/hooks/useBreakpoints.test.js +0 -11
  213. package/dist/index-BLPBqbdx.js +0 -11025
  214. package/dist/isArray-BjSPDQ4v.js +0 -7
  215. package/dist/magic-string.es-uPKorP4O.js +0 -663
  216. package/dist/services/services.test.d.ts +0 -1
  217. package/dist/services/services.test.js +0 -106
  218. package/dist/useBreakpoints-MzTZ0tCT.js +0 -45
  219. package/dist/vi.bdSIJ99Y-B308Q-4w.js +0 -11963
@@ -1,23 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { a as r, s as t, f as h } from "../../react.esm-Bm0cAgpZ.js";
3
- import { act as l } from "react";
4
- import { SearchBar as s } from "./SearchBar.js";
5
- import { d as m, t as o, a as n, g as e } from "../../vi.bdSIJ99Y-B308Q-4w.js";
6
- m("SearchBar Test", () => {
7
- o("renders SearchBar component", () => {
8
- r(
9
- /* @__PURE__ */ a(s, { searchTerm: "searchValue", setSearchTerm: n.fn(), placeholder: "search" })
10
- ), e(t.getByRole("textbox")).toBeInTheDocument(), e(t.getByTestId("search-bar-icon-button")).toBeInTheDocument(), e(t.getByTestId("search-bar-input")).toBeInTheDocument(), e(t.getByRole("textbox")).toHaveAttribute("value", "searchValue"), e(t.getByRole("textbox").parentElement).not.toHaveClass("lmnt-text-field--dense"), e(t.getByText("close")).toBeInTheDocument();
11
- }), o("renders SearchBar component with custom classname", () => {
12
- r(/* @__PURE__ */ a(s, { searchTerm: "search", setSearchTerm: n.fn(), className: "searchClass" })), e(t.getByRole("textbox").parentElement).toHaveClass("searchClass");
13
- }), o("renders SearchBar component with dense look", () => {
14
- r(/* @__PURE__ */ a(s, { searchTerm: "search", setSearchTerm: n.fn(), dense: !0 })), e(t.getByRole("textbox").parentElement).toHaveClass("lmnt-text-field--dense");
15
- }), o("renders SearchBar component with search icon", () => {
16
- r(/* @__PURE__ */ a(s, { searchTerm: "", setSearchTerm: n.fn(), dense: !0 })), e(t.getByText("search")).toBeInTheDocument();
17
- }), o("renders SearchBar and changes value", () => {
18
- const c = n.fn();
19
- r(/* @__PURE__ */ a(s, { searchTerm: "", setSearchTerm: c })), e(t.getByText("search")).toBeInTheDocument(), e(t.getByRole("textbox")).toHaveAttribute("value", ""), h.change(t.getByRole("textbox"), { target: { value: "searchValue" } }), l(() => {
20
- e(c).toHaveBeenCalledTimes(1), e(c).toHaveBeenCalledWith("searchValue");
21
- });
22
- });
23
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,28 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { a, s as c } from "../../react.esm-Bm0cAgpZ.js";
3
- import { Select as n } from "./Select.js";
4
- import { d as l, t as m, g as e } from "../../vi.bdSIJ99Y-B308Q-4w.js";
5
- l("Select", () => {
6
- const o = [
7
- { value: "1", text: "Option 1" },
8
- { value: "2", text: "Option 2" },
9
- { value: "3", text: "Option 3" }
10
- ];
11
- m("render select without portal when not hoisted and with default data-testid", () => {
12
- a(/* @__PURE__ */ s(n, { options: o })), e(c.getByTestId("custom-select")).toBeInTheDocument();
13
- const t = c.queryByTestId("custom-portal");
14
- e(t).not.toBeInTheDocument();
15
- }), m("render select with custom data-testid", () => {
16
- a(/* @__PURE__ */ s(n, { options: o, "data-testid": "custom-test-id" })), e(c.getByTestId("custom-test-id")).toBeInTheDocument();
17
- const t = c.queryByTestId("custom-select");
18
- e(t).not.toBeInTheDocument();
19
- }), m("render select with default portal class name", () => {
20
- a(/* @__PURE__ */ s(n, { hoisted: !0, options: o }));
21
- const t = document.getElementById("custom-portal-default");
22
- e(t).toBeInTheDocument();
23
- }), m("render select with custom portal class name", () => {
24
- a(/* @__PURE__ */ s(n, { hoisted: !0, options: o, portalClassName: "test-custom-portal-class-name" }));
25
- const t = document.getElementById("custom-portal-test-custom-portal-class-name");
26
- e(t).toBeInTheDocument();
27
- });
28
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,342 +0,0 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { a as p, s as t, f as y, c as C } from "../../react.esm-Bm0cAgpZ.js";
3
- import { a as S } from "../../useBreakpoints-MzTZ0tCT.js";
4
- import { Stepper as s } from "./Stepper.js";
5
- import { StepperStyle as i } from "./stepperStyles.js";
6
- import { d as B, b as T, t as c, g as e, v as l } from "../../vi.bdSIJ99Y-B308Q-4w.js";
7
- const u = () => [
8
- {
9
- id: "step1",
10
- stepNumber: 1,
11
- text: "Description 1",
12
- secondaryText: "Secondary Description 1",
13
- optional: !1,
14
- nextButtonProps: { onClick: l.fn(), label: "Next" },
15
- prevButtonProps: { onClick: l.fn(), label: "Back" }
16
- },
17
- {
18
- id: "step2",
19
- stepNumber: 2,
20
- text: "Description 2",
21
- secondaryText: "Secondary Description 2",
22
- optional: !1,
23
- nextButtonProps: { onClick: l.fn(), label: "Next" },
24
- prevButtonProps: { onClick: l.fn(), label: "Back" }
25
- },
26
- {
27
- id: "step3",
28
- stepNumber: 3,
29
- text: "Description 3",
30
- secondaryText: "Secondary Description 3",
31
- optional: !0,
32
- nextButtonProps: { onClick: l.fn(), label: "Finish" },
33
- prevButtonProps: { onClick: l.fn(), label: "Back" }
34
- }
35
- ];
36
- B("Generic Stepper Tests (StepperStyle.DESKTOP)", () => {
37
- let o;
38
- T(() => {
39
- o = u();
40
- }), c("Default Render", () => {
41
- p(
42
- /* @__PURE__ */ n(s, { steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
43
- ), e(t.getByText(
44
- 1
45
- /* STEP_1 */
46
- )).toBeInTheDocument(), e(t.getByText(
47
- 2
48
- /* STEP_2 */
49
- )).toBeInTheDocument(), e(t.getByText(
50
- 3
51
- /* STEP_3 */
52
- )).toBeInTheDocument(), e(t.getByText(
53
- "Description 1"
54
- /* STEP_1 */
55
- )).toBeInTheDocument(), e(t.getByText(
56
- "Description 2"
57
- /* STEP_2 */
58
- )).toBeInTheDocument(), e(t.getByText(
59
- "Description 3"
60
- /* STEP_3 */
61
- )).toBeInTheDocument(), e(t.getByText("Step Content")).toBeInTheDocument(), e(t.getByText("Next")).toBeInTheDocument();
62
- }), c("isStepLoading disables buttons", () => {
63
- p(
64
- /* @__PURE__ */ n(s, { steps: o, currentStepId: "step1", isStepLoading: !0, children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
65
- );
66
- const r = t.getByText("Next").closest("button");
67
- e(r).toBeDisabled();
68
- }), c("calls nextButtonProps.onClick when next button is clicked", () => {
69
- const r = l.fn();
70
- o[1].nextButtonProps.onClick = r, p(
71
- /* @__PURE__ */ n(s, { steps: o, currentStepId: "step2", isStepLoading: !1, children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
72
- ), y.click(t.getByText("Next")), e(r).toHaveBeenCalled();
73
- }), c("calls prevButtonProps.onClick when prev button is clicked", () => {
74
- const r = l.fn();
75
- o[1].prevButtonProps.onClick = r, p(
76
- /* @__PURE__ */ n(s, { steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
77
- ), y.click(t.getByText("Back")), e(r).toHaveBeenCalled();
78
- }), c("does not render the prev button on the first step", () => {
79
- p(
80
- /* @__PURE__ */ n(s, { steps: o, currentStepId: "step1", isStepLoading: !1, children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
81
- ), e(t.queryByText("Back")).not.toBeInTheDocument();
82
- }), c("renders the next button as submit on last step", () => {
83
- p(
84
- /* @__PURE__ */ n(s, { steps: o, currentStepId: "step3", isStepLoading: !1, children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
85
- );
86
- const r = t.getByText("Finish").closest("button");
87
- e(r).toHaveAttribute("type", "submit");
88
- }), c("hide stepper header when showStepperHeader is false", () => {
89
- p(
90
- /* @__PURE__ */ n(
91
- s,
92
- {
93
- steps: o,
94
- currentStepId: "step2",
95
- isStepLoading: !1,
96
- showStepperHeader: !1,
97
- children: /* @__PURE__ */ n("div", { children: "Step Content" })
98
- }
99
- )
100
- ), e(t.queryByTestId("stepper-header")).not.toBeInTheDocument();
101
- }), c("hide stepper buttons when showStepperButtons is false", () => {
102
- p(
103
- /* @__PURE__ */ n(
104
- s,
105
- {
106
- steps: o,
107
- currentStepId: "step2",
108
- isStepLoading: !1,
109
- showStepperButtons: !1,
110
- children: /* @__PURE__ */ n("div", { children: "Step Content" })
111
- }
112
- )
113
- ), e(t.queryByText("Next")).not.toBeInTheDocument(), e(t.queryByText("Back")).not.toBeInTheDocument();
114
- }), c("does not render stepper button icons when showArrowIcon is false", () => {
115
- o[1].nextButtonProps.showArrowIcon = !1, o[1].prevButtonProps.showArrowIcon = !1, p(
116
- /* @__PURE__ */ n(s, { steps: o, currentStepId: "step2", isStepLoading: !1, children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
117
- ), e(t.queryByText("arrow_forward")).not.toBeInTheDocument(), e(t.queryByText("arrow_back")).not.toBeInTheDocument();
118
- }), c("prints an error when current step is not found", () => {
119
- const r = l.spyOn(console, "error").mockImplementation(() => {
120
- });
121
- p(
122
- /* @__PURE__ */ n(s, { steps: o, currentStepId: "unknownId", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
123
- ), e(r).toHaveBeenCalledWith(
124
- "Current step with id unknownId not found in steps array. Bad configuration?"
125
- ), r.mockRestore(), e(t.queryByTestId("description-stepper-header")).not.toBeInTheDocument();
126
- }), c("does not render buttons when props are not provided", () => {
127
- const r = u();
128
- r[0].nextButtonProps = void 0, r[0].prevButtonProps = void 0, p(
129
- /* @__PURE__ */ n(s, { steps: r, currentStepId: "step1", showPreviousButtonOnFirstStep: !0, children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
130
- ), e(t.queryByText("Next")).not.toBeInTheDocument(), e(t.queryByText("Back")).not.toBeInTheDocument();
131
- }), c("renders only one button if the other is missing", () => {
132
- const r = u();
133
- r[1].prevButtonProps = void 0, p(
134
- /* @__PURE__ */ n(s, { steps: r, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
135
- ), e(t.getByText("Next")).toBeInTheDocument(), e(t.queryByText("Back")).not.toBeInTheDocument();
136
- });
137
- });
138
- B("Stepper Type DESKTOP Tests", () => {
139
- let o;
140
- T(() => {
141
- o = u();
142
- }), c("renders numbers, text and secondary text", () => {
143
- p(
144
- /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
145
- ), e(t.getByTestId("desktop-stepper-header")).toBeInTheDocument(), e(t.getByText(
146
- 1
147
- /* STEP_1 */
148
- )).toBeInTheDocument(), e(t.getByText(
149
- 2
150
- /* STEP_2 */
151
- )).toBeInTheDocument(), e(t.getByText(
152
- 3
153
- /* STEP_3 */
154
- )).toBeInTheDocument(), e(t.getByText(
155
- "Description 1"
156
- /* STEP_1 */
157
- )).toBeInTheDocument(), e(t.getByText(
158
- "Description 2"
159
- /* STEP_2 */
160
- )).toBeInTheDocument(), e(t.getByText(
161
- "Description 3"
162
- /* STEP_3 */
163
- )).toBeInTheDocument(), e(t.getByText(
164
- "Secondary Description 1"
165
- /* STEP_1 */
166
- )).toBeInTheDocument(), e(t.getByText(
167
- "Secondary Description 2"
168
- /* STEP_2 */
169
- )).toBeInTheDocument(), e(t.getByText(
170
- "Secondary Description 3"
171
- /* STEP_3 */
172
- )).toBeInTheDocument(), e(t.getByTestId("stepper-connector-before-step2")).toBeInTheDocument(), e(t.getByTestId("stepper-connector-before-step3")).toBeInTheDocument(), e(
173
- t.queryByTestId("stepper-connector-before-step1")
174
- ).not.toBeInTheDocument(), e(t.getByText("Step Content")).toBeInTheDocument(), e(t.getByText("Next")).toBeInTheDocument();
175
- }), c("show numbers for active and incompleted step", () => {
176
- p(
177
- /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
178
- ), e(t.queryByText(
179
- 1
180
- /* STEP_1 */
181
- )).not.toBeInTheDocument(), e(t.getByText(
182
- 2
183
- /* STEP_2 */
184
- )).toBeInTheDocument(), e(t.getByText(
185
- 3
186
- /* STEP_3 */
187
- )).toBeInTheDocument();
188
- }), c("show checkmark for completed step", () => {
189
- p(
190
- /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
191
- ), e(t.queryByText(
192
- 1
193
- /* STEP_1 */
194
- )).not.toBeInTheDocument(), e(t.queryByText(
195
- 2
196
- /* STEP_2 */
197
- )).not.toBeInTheDocument(), e(t.getByTestId("stepper-item-check-for-step1")).toBeInTheDocument(), e(t.getByTestId("stepper-item-check-for-step2")).toBeInTheDocument();
198
- }), c("has correct color styles for completed and active steps", () => {
199
- p(
200
- /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
201
- );
202
- const r = t.getByTestId("stepper-item-circle-for-step1"), d = t.getByTestId(
203
- "stepper-connector-before-step2"
204
- ), a = t.getByTestId("stepper-item-circle-for-step2"), m = t.getByTestId("stepper-connector-before-step3"), I = t.getByTestId("stepper-item-circle-for-step3");
205
- e(r.className).toContain("stepperItemNumberActive"), e(d.className).toContain("stepperItemConnectorCompleted"), e(a.className).toContain("stepperItemNumberActive"), e(m.className).not.toContain("stepperItemConnectorCompleted"), e(I.className).not.toContain("stepperItemNumberActive");
206
- }), c("advancing step changes number to checkmark and adjusts color", () => {
207
- const { rerender: r } = p(
208
- /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
209
- ), d = t.getByTestId("stepper-item-circle-for-step1"), a = t.getByTestId("stepper-connector-before-step2"), m = t.getByTestId("stepper-item-circle-for-step2"), I = t.getByTestId("stepper-connector-before-step3"), h = t.getByTestId("stepper-item-circle-for-step3");
210
- e(d.className).toContain("stepperItemNumberActive"), e(a.className).not.toContain("stepperItemConnectorCompleted"), e(m.className).not.toContain("stepperItemNumberActive"), e(I.className).not.toContain("stepperItemConnectorCompleted"), e(h.className).not.toContain("stepperItemNumberActive"), r(
211
- /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
212
- ), e(d.className).toContain("stepperItemNumberActive"), e(a.className).toContain("stepperItemConnectorCompleted"), e(m.className).toContain("stepperItemNumberActive"), e(I.className).not.toContain("stepperItemConnectorCompleted"), e(h.className).not.toContain("stepperItemNumberActive"), r(
213
- /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
214
- ), e(d.className).toContain("stepperItemNumberActive"), e(a.className).toContain("stepperItemConnectorCompleted"), e(m.className).toContain("stepperItemNumberActive"), e(I.className).toContain("stepperItemConnectorCompleted"), e(h.className).toContain("stepperItemNumberActive");
215
- }), c("custom button icons are shown as expected", () => {
216
- o[1].nextButtonProps.showArrowIcon = !1, o[1].nextButtonProps.trailingIcon = "flag", o[1].prevButtonProps.showArrowIcon = !1, o[1].prevButtonProps.leadingIcon = "wifi", p(
217
- /* @__PURE__ */ n(s, { steps: o, currentStepId: "step2", isStepLoading: !1, children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
218
- ), e(t.getByText("flag")).toBeInTheDocument(), e(t.getByText("wifi")).toBeInTheDocument();
219
- }), c("handles excludeFromHeader and excludedStepCompletesPreviousStep correctly", () => {
220
- const r = u();
221
- r.push({
222
- id: "step4",
223
- stepNumber: 4,
224
- text: "Description 4",
225
- excludeFromHeader: !0,
226
- excludedStepCompletesPreviousStep: !1,
227
- secondaryText: "Secondary Description 4",
228
- nextButtonProps: { onClick: l.fn(), label: "Next" },
229
- prevButtonProps: { onClick: l.fn(), label: "Back" }
230
- }), r[1].excludedStepCompletesPreviousStep = !0, r[1].excludeFromHeader = !0, p(
231
- /* @__PURE__ */ n(
232
- s,
233
- {
234
- stepperStyle: i.DESKTOP,
235
- steps: r,
236
- currentStepId: "step2",
237
- children: /* @__PURE__ */ n("div", { children: "Step Content" })
238
- }
239
- )
240
- ), e(t.getByTestId("stepper-item-check-for-step1")).toBeInTheDocument();
241
- const d = t.getByTestId("stepper-connector-before-step3");
242
- e(d.className).not.toContain("stepperItemConnectorCompleted"), e(t.queryByTestId("stepper-item-step2")).not.toBeInTheDocument(), e(t.queryByTestId("stepper-item-step4")).not.toBeInTheDocument(), C(), p(
243
- /* @__PURE__ */ n(
244
- s,
245
- {
246
- stepperStyle: i.DESKTOP,
247
- steps: r,
248
- currentStepId: "step4",
249
- children: /* @__PURE__ */ n("div", { children: "Step Content" })
250
- }
251
- )
252
- );
253
- const a = t.getByTestId("stepper-connector-before-step3");
254
- e(a.className).toContain("stepperItemConnectorCompleted"), e(
255
- t.queryByTestId("stepper-item-check-for-step3")
256
- ).not.toBeInTheDocument();
257
- }), c("shows mobile view breakpoint is triggered (<600px)", () => {
258
- l.spyOn(S, "useBreakpoints").mockReturnValue({
259
- isMobile: !0,
260
- isDesktop: !1,
261
- isDesktopNavbar: !1,
262
- isTablet: !1
263
- }), p(
264
- /* @__PURE__ */ n(s, { stepperStyle: i.DESKTOP, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
265
- ), e(t.getByTestId("desktop-stepper-header")).toBeInTheDocument(), e(t.getByTestId("stepper-item-step2")).toBeInTheDocument(), e(t.queryByTestId("stepper-item-step1")).not.toBeInTheDocument(), e(t.queryByTestId("stepper-item-step3")).not.toBeInTheDocument(), l.spyOn(S, "useBreakpoints").mockRestore();
266
- });
267
- });
268
- B("Stepper Type DOTS Tests", () => {
269
- let o;
270
- T(() => {
271
- o = u();
272
- }), c("renders dots and text", () => {
273
- p(
274
- /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
275
- ), e(t.getByTestId("dots-stepper-header")).toBeInTheDocument(), e(t.getByTestId("stepper-indicator")).toBeInTheDocument(), e(t.getByTestId("stepper-indicator-step1")).toBeInTheDocument(), e(t.getByTestId("stepper-indicator-step2")).toBeInTheDocument(), e(t.getByTestId("stepper-indicator-step3")).toBeInTheDocument(), e(t.getByText(
276
- "Description 1"
277
- /* STEP_1 */
278
- )).toBeInTheDocument(), e(t.queryByText(
279
- "Description 2"
280
- /* STEP_2 */
281
- )).not.toBeInTheDocument(), e(t.queryByText(
282
- "Description 3"
283
- /* STEP_3 */
284
- )).not.toBeInTheDocument(), e(t.getByText("Step Content")).toBeInTheDocument(), e(t.getByText("Next")).toBeInTheDocument();
285
- }), c("show active style for completed, active and incompleted steps", () => {
286
- p(
287
- /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
288
- );
289
- const r = t.getByTestId("stepper-indicator-step1"), d = t.getByTestId("stepper-indicator-step2"), a = t.getByTestId("stepper-indicator-step3");
290
- e(r.className).toContain("stepperIndicatorItemActive"), e(d.className).toContain("stepperIndicatorItemActive"), e(a.className).not.toContain("stepperIndicatorItemActive");
291
- }), c("show optional style", () => {
292
- p(
293
- /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
294
- );
295
- const r = t.getByTestId("stepper-indicator-step3");
296
- e(r.className).toContain("stepperIndicatorItemOptional");
297
- }), c("advancing step adjusts styles accordingly", () => {
298
- const { rerender: r } = p(
299
- /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
300
- ), d = t.getByTestId("stepper-indicator-step1"), a = t.getByTestId("stepper-indicator-step2"), m = t.getByTestId("stepper-indicator-step3");
301
- e(d.className).toContain("stepperIndicatorItemActive"), e(a.className).not.toContain("stepperIndicatorItemActive"), e(m.className).not.toContain("stepperIndicatorItemActive"), r(
302
- /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
303
- ), e(d.className).toContain("stepperIndicatorItemActive"), e(a.className).toContain("stepperIndicatorItemActive"), e(m.className).not.toContain("stepperIndicatorItemActive"), r(
304
- /* @__PURE__ */ n(s, { stepperStyle: i.DOTS, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
305
- ), e(d.className).toContain("stepperIndicatorItemActive"), e(a.className).toContain("stepperIndicatorItemActive"), e(m.className).toContain("stepperIndicatorItemActive");
306
- });
307
- });
308
- B("Stepper Type SMALL Tests", () => {
309
- let o;
310
- T(() => {
311
- o = u();
312
- }), c("renders step number, total steps and text", () => {
313
- p(
314
- /* @__PURE__ */ n(s, { stepperStyle: i.SMALL, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
315
- ), e(t.getByTestId("description-stepper-header")).toBeInTheDocument(), e(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("1/3"), e(t.getByTestId("description-stepper-header-description")).toHaveTextContent(
316
- "Description 1"
317
- /* STEP_1 */
318
- ), e(t.getByText("Step Content")).toBeInTheDocument(), e(t.getByText("Next")).toBeInTheDocument();
319
- }), c("advancing step adjusts progress accordingly", () => {
320
- const { rerender: r } = p(
321
- /* @__PURE__ */ n(s, { stepperStyle: i.SMALL, steps: o, currentStepId: "step1", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
322
- );
323
- e(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("1/3"), r(
324
- /* @__PURE__ */ n(s, { stepperStyle: i.SMALL, steps: o, currentStepId: "step2", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
325
- ), e(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("2/3"), r(
326
- /* @__PURE__ */ n(s, { stepperStyle: i.SMALL, steps: o, currentStepId: "step3", children: /* @__PURE__ */ n("div", { children: "Step Content" }) })
327
- ), e(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("3/3");
328
- }), c("overwriting total steps accordingly", () => {
329
- p(
330
- /* @__PURE__ */ n(
331
- s,
332
- {
333
- stepperStyle: i.SMALL,
334
- steps: o,
335
- currentStepId: "step3",
336
- overwriteTotalSteps: 5,
337
- children: /* @__PURE__ */ n("div", { children: "Step Content" })
338
- }
339
- )
340
- ), e(t.getByTestId("description-stepper-header-progress")).toHaveTextContent("3/5");
341
- });
342
- });
@@ -1,15 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { a as r } from "../../react.esm-Bm0cAgpZ.js";
3
- import { VerticalDivider as s } from "./VerticalDivider.js";
4
- import { d as o, t as l, g as i } from "../../vi.bdSIJ99Y-B308Q-4w.js";
5
- o("VerticalDivider Test", () => {
6
- l("it should render with basic styling", () => {
7
- r(/* @__PURE__ */ e(s, {}));
8
- const t = document.body.firstElementChild;
9
- i(t?.firstChild).toHaveClass(/divider/), i(t?.firstChild).toHaveStyle({ height: "2rem" });
10
- }), l("it should render with custom styling", () => {
11
- r(/* @__PURE__ */ e(s, { height: "3rem", className: "plus" }));
12
- const t = document.body.firstElementChild;
13
- i(t?.firstChild).toHaveClass(/divider/), i(t?.firstChild).toHaveClass(/plus/), i(t?.firstChild).toHaveStyle({ height: "3rem" });
14
- });
15
- });
@@ -1,7 +0,0 @@
1
- import { g as r } from "./_commonjsHelpers-B4e78b8K.js";
2
- import { r as t } from "./get-DxjPG00Z.js";
3
- var o = t();
4
- const a = /* @__PURE__ */ r(o);
5
- export {
6
- a as g
7
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import { r as t, w as s } from "../react.esm-Bm0cAgpZ.js";
2
- import { u as o } from "../useBreakpoints-MzTZ0tCT.js";
3
- import { d as a, t as i, g as r } from "../vi.bdSIJ99Y-B308Q-4w.js";
4
- a("useBreakpoint Test", () => {
5
- i("returns object", () => {
6
- const { result: e } = t(() => o());
7
- s(() => {
8
- r(e.current.isDesktop).toBe(!1), r(e.current.isTablet).toBe(!1), r(e.current.isMobile).toBe(!1);
9
- });
10
- });
11
- });