@uva-glass/component-library 3.57.4 → 3.57.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/{DataTable-Guuh0GZc.js → DataTable-UslvEf3c.js} +3 -3
  2. package/dist/{DataTable-Guuh0GZc.js.map → DataTable-UslvEf3c.js.map} +1 -1
  3. package/dist/{Lexical.prod-Dy5aDppc.js → Lexical.prod-BlUfEvo-.js} +1461 -1476
  4. package/dist/{Lexical.prod-Dy5aDppc.js.map → Lexical.prod-BlUfEvo-.js.map} +1 -1
  5. package/dist/{LexicalClipboard.prod-CS8a49uL.js → LexicalClipboard.prod-DQbm50C_.js} +132 -131
  6. package/dist/LexicalClipboard.prod-DQbm50C_.js.map +1 -0
  7. package/dist/LexicalHtml.prod-Czkg35Fe.js +1129 -0
  8. package/dist/LexicalHtml.prod-Czkg35Fe.js.map +1 -0
  9. package/dist/{LexicalLink.prod-DzgwWhQM.js → LexicalLink.prod-6gI2ABQo.js} +141 -141
  10. package/dist/{LexicalLink.prod-DzgwWhQM.js.map → LexicalLink.prod-6gI2ABQo.js.map} +1 -1
  11. package/dist/{LexicalList.prod-icY8mpm6.js → LexicalList.prod-CMGvSM1c.js} +265 -265
  12. package/dist/{LexicalList.prod-icY8mpm6.js.map → LexicalList.prod-CMGvSM1c.js.map} +1 -1
  13. package/dist/LexicalSelection.prod-DS_R6Cl1.js +99 -0
  14. package/dist/LexicalSelection.prod-DS_R6Cl1.js.map +1 -0
  15. package/dist/{LexicalTable.prod-Bf0is-op.js → LexicalTable.prod-D3FUVxbr.js} +582 -582
  16. package/dist/LexicalTable.prod-D3FUVxbr.js.map +1 -0
  17. package/dist/LexicalUtils.prod-CNWf_0sq.js +164 -0
  18. package/dist/LexicalUtils.prod-CNWf_0sq.js.map +1 -0
  19. package/dist/{LinkContextMenu-C8ehPbP8.js → LinkContextMenu-59-rbxa2.js} +2 -2
  20. package/dist/{LinkContextMenu-C8ehPbP8.js.map → LinkContextMenu-59-rbxa2.js.map} +1 -1
  21. package/dist/{PasteHandlerPlugin-CSo_lOE8.js → PasteHandlerPlugin-CTzYRyAx.js} +9 -9
  22. package/dist/{PasteHandlerPlugin-CSo_lOE8.js.map → PasteHandlerPlugin-CTzYRyAx.js.map} +1 -1
  23. package/dist/{Slider-Czd2xAGf.js → Slider-CqYFsgRL.js} +3 -3
  24. package/dist/{Slider-Czd2xAGf.js.map → Slider-CqYFsgRL.js.map} +1 -1
  25. package/dist/{TableCellResizerPlugin-Bb2blXnq.js → TableCellResizerPlugin-D-fX5I3p.js} +12 -5
  26. package/dist/{TableCellResizerPlugin-Bb2blXnq.js.map → TableCellResizerPlugin-D-fX5I3p.js.map} +1 -1
  27. package/dist/{chunk-5WKL7XVT-CvOIS3NE.js → chunk-SNLGT2ZI--XVeLAcq.js} +2540 -2881
  28. package/dist/chunk-SNLGT2ZI--XVeLAcq.js.map +1 -0
  29. package/dist/{client-CXlG3hNo.js → client-CTHUtwUP.js} +4 -4
  30. package/dist/{client-CXlG3hNo.js.map → client-CTHUtwUP.js.map} +1 -1
  31. package/dist/components/Accordion/Accordion.test.js +15 -14
  32. package/dist/components/Accordion/Accordion.test.js.map +1 -1
  33. package/dist/components/AccordionCard/AccordionCard.test.js +20 -19
  34. package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
  35. package/dist/components/ActionList/ActionList.test.js +26 -25
  36. package/dist/components/ActionList/ActionList.test.js.map +1 -1
  37. package/dist/components/AppStatusBar/AppStatusBar.test.js +6 -5
  38. package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
  39. package/dist/components/Attention/Attention.test.js +5 -4
  40. package/dist/components/Attention/Attention.test.js.map +1 -1
  41. package/dist/components/Backdrop/Backdrop.test.js +5 -4
  42. package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
  43. package/dist/components/Buttons/Button.stories.js +1 -1
  44. package/dist/components/Buttons/Button.test.js +20 -19
  45. package/dist/components/Buttons/Button.test.js.map +1 -1
  46. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  47. package/dist/components/Buttons/LinkButton.test.js +22 -21
  48. package/dist/components/Buttons/LinkButton.test.js.map +1 -1
  49. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  50. package/dist/components/Buttons/MenuButton.test.js +20 -19
  51. package/dist/components/Buttons/MenuButton.test.js.map +1 -1
  52. package/dist/components/Card/Card.test.js +5 -4
  53. package/dist/components/Card/Card.test.js.map +1 -1
  54. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  55. package/dist/components/Checkbox/Checkbox.test.js +9 -8
  56. package/dist/components/Checkbox/Checkbox.test.js.map +1 -1
  57. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  58. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +16 -15
  59. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
  60. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  61. package/dist/components/CheckboxTree/CheckboxTree.stories.js +3 -3
  62. package/dist/components/CheckboxTree/index.js +1 -1
  63. package/dist/components/Chip/Chip.stories.js +1 -1
  64. package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
  65. package/dist/components/DataTable/DataTable.js +1 -1
  66. package/dist/components/DataTable/DataTable.stories.js +1 -1
  67. package/dist/components/DataTable/index.js +1 -1
  68. package/dist/components/Drawer/Drawer.stories.js +1 -1
  69. package/dist/components/FeedbackBar/FeedbackBar.test.js +8 -7
  70. package/dist/components/FeedbackBar/FeedbackBar.test.js.map +1 -1
  71. package/dist/components/FormInput/FormInput.js +1 -1
  72. package/dist/components/FormInput/FormInput.stories.js +2 -2
  73. package/dist/components/FormInput/index.js +1 -1
  74. package/dist/components/IconButton/IconButton.stories.js +1 -1
  75. package/dist/components/InputField/InputField.stories.js +1 -1
  76. package/dist/components/Label/Label.test.js +12 -11
  77. package/dist/components/Label/Label.test.js.map +1 -1
  78. package/dist/components/MetaDataBar/MetaDataBar.test.js +5 -4
  79. package/dist/components/MetaDataBar/MetaDataBar.test.js.map +1 -1
  80. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  81. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  82. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  83. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  84. package/dist/components/MultiSelect/index.js +1 -1
  85. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
  86. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +12 -11
  87. package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
  88. package/dist/components/Notification/Notification.stories.js +1 -1
  89. package/dist/components/Notification/Notification.test.js +8 -7
  90. package/dist/components/Notification/Notification.test.js.map +1 -1
  91. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  92. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  93. package/dist/components/PeriodSelector/PeriodSelector.stories.js +2 -2
  94. package/dist/components/PeriodSelector/index.js +1 -1
  95. package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
  96. package/dist/components/RadioGroup/Radiogroup.test.js +10 -9
  97. package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -1
  98. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  99. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +2 -2
  100. package/dist/components/RadioTabSelector/index.js +1 -1
  101. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  102. package/dist/components/RteEditor/EditorHeader/index.js +1 -1
  103. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
  104. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +20 -20
  105. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +1 -1
  106. package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +1 -1
  107. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  108. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  109. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +1 -1
  110. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +7 -2
  111. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +1 -0
  112. package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +1 -1
  113. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +12 -12
  114. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +1 -1
  115. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js +1 -1
  116. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +1 -1
  117. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  118. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  119. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +1 -1
  120. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
  121. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  122. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +1 -1
  123. package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js +1 -1
  124. package/dist/components/RteEditor/Plugins/index.js +3 -3
  125. package/dist/components/RteEditor/RteEditor.js +1 -1
  126. package/dist/components/RteEditor/RteEditor.stories.js +1 -1
  127. package/dist/components/RteEditor/helpers.js +5 -5
  128. package/dist/components/RteEditor/index.js +1 -1
  129. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +14 -14
  130. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +20 -19
  131. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
  132. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  133. package/dist/components/SelectListbox/SelectProvider.js +2 -1
  134. package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
  135. package/dist/components/Slider/Slider.js +1 -1
  136. package/dist/components/Slider/Slider.stories.js +1 -1
  137. package/dist/components/Slider/index.js +1 -1
  138. package/dist/components/Sortable/Sortable.stories.js +1 -1
  139. package/dist/components/Sortable/components/SortableItem.js +2 -2
  140. package/dist/components/Sortable/components/SortableItem.js.map +1 -1
  141. package/dist/components/StatusBadge/StatusBadge.test.js +7 -6
  142. package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
  143. package/dist/components/TextArea/TextArea.stories.js +1 -1
  144. package/dist/components/TextArea/TextArea.test.js +14 -13
  145. package/dist/components/TextArea/TextArea.test.js.map +1 -1
  146. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
  147. package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
  148. package/dist/components/VarIndicator/VarIndicator.test.js +26 -25
  149. package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
  150. package/dist/components/hooks/useResponsive.js +1 -1
  151. package/dist/components/hooks/useResponsive.js.map +1 -1
  152. package/dist/components/index.js +3 -3
  153. package/dist/{components-CgBF6db6.js → components-D2rPfyIW.js} +438 -408
  154. package/dist/components-D2rPfyIW.js.map +1 -0
  155. package/dist/{dist-oLwM--0y.js → dist-CuwCMU7Y.js} +4 -4
  156. package/dist/{dist-oLwM--0y.js.map → dist-CuwCMU7Y.js.map} +1 -1
  157. package/dist/{react.esm-DwWzhs9e.js → dom.esm-S0SD0DBW.js} +938 -1029
  158. package/dist/dom.esm-S0SD0DBW.js.map +1 -0
  159. package/dist/{esm-BXzGXYWZ.js → esm-Bfz5h0_d.js} +5 -5
  160. package/dist/{esm-BXzGXYWZ.js.map → esm-Bfz5h0_d.js.map} +1 -1
  161. package/dist/index.js +3 -3
  162. package/dist/{react-18-BwdnKC48.js → react-18-yf-KbRra.js} +3 -3
  163. package/dist/{react-18-BwdnKC48.js.map → react-18-yf-KbRra.js.map} +1 -1
  164. package/dist/react.esm-D50lAl1F.js +226 -0
  165. package/dist/react.esm-D50lAl1F.js.map +1 -0
  166. package/dist/setupTests.js +1 -1
  167. package/dist/storybook__react.d.js +22 -22
  168. package/dist/storybook__react.d.js.map +1 -1
  169. package/dist/{test-Gtly6H2f.js → test-BjtC-Q32.js} +3684 -6919
  170. package/dist/test-BjtC-Q32.js.map +1 -0
  171. package/package.json +13 -13
  172. package/dist/LexicalClipboard.prod-CS8a49uL.js.map +0 -1
  173. package/dist/LexicalHtml.prod-BtzosUOH.js +0 -1611
  174. package/dist/LexicalHtml.prod-BtzosUOH.js.map +0 -1
  175. package/dist/LexicalTable.prod-Bf0is-op.js.map +0 -1
  176. package/dist/LexicalUtils.prod-CjGUKarD.js +0 -259
  177. package/dist/LexicalUtils.prod-CjGUKarD.js.map +0 -1
  178. package/dist/chunk-5WKL7XVT-CvOIS3NE.js.map +0 -1
  179. package/dist/components-CgBF6db6.js.map +0 -1
  180. package/dist/helpers-MMNO9vlK.js +0 -34
  181. package/dist/helpers-MMNO9vlK.js.map +0 -1
  182. package/dist/react.esm-DwWzhs9e.js.map +0 -1
  183. package/dist/test-Gtly6H2f.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../../PasteHandlerPlugin-CSo_lOE8.js";
1
+ import { t as e } from "../../../../PasteHandlerPlugin-CTzYRyAx.js";
2
2
  export { e as PasteHandlerPlugin };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../../PasteHandlerPlugin-CSo_lOE8.js";
1
+ import { t as e } from "../../../../PasteHandlerPlugin-CTzYRyAx.js";
2
2
  export { e as PasteHandlerPlugin };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../../TableCellResizerPlugin-Bb2blXnq.js";
1
+ import { t as e } from "../../../../TableCellResizerPlugin-D-fX5I3p.js";
2
2
  export { e as TableCellResizerPlugin };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../../TableCellResizerPlugin-Bb2blXnq.js";
1
+ import { t as e } from "../../../../TableCellResizerPlugin-D-fX5I3p.js";
2
2
  export { e as TableCellResizerPlugin };
@@ -1,2 +1,2 @@
1
- import { a as e } from "../../../../components-CgBF6db6.js";
1
+ import { a as e } from "../../../../components-D2rPfyIW.js";
2
2
  export { e as AddTableForm };
@@ -1,2 +1,2 @@
1
- import { i as e } from "../../../../components-CgBF6db6.js";
1
+ import { i as e } from "../../../../components-D2rPfyIW.js";
2
2
  export { e as TablePlugin };
@@ -1,5 +1,5 @@
1
- import { gr as e } from "../../../../Lexical.prod-Dy5aDppc.js";
2
- import { C as t, a as n, b as r, f as i, g as a, i as o, m as s, o as c, u as l, v as u, w as d, y as f } from "../../../../LexicalTable.prod-Bf0is-op.js";
1
+ import { sr as e } from "../../../../Lexical.prod-BlUfEvo-.js";
2
+ import { C as t, a as n, b as r, f as i, g as a, i as o, m as s, o as c, u as l, v as u, w as d, y as f } from "../../../../LexicalTable.prod-D3FUVxbr.js";
3
3
  import { TableWrapperNode as p } from "../../nodes/TableWrapperNode/TableWrapperNode.js";
4
4
  //#region src/components/RteEditor/Plugins/TablePlugin/helpers.ts
5
5
  var m = 32, h = 48, g = 1, _ = 200, v = 320, y = (t, n) => {
@@ -1,3 +1,3 @@
1
- import { i as e } from "../../../../components-CgBF6db6.js";
1
+ import { i as e } from "../../../../components-D2rPfyIW.js";
2
2
  import { t } from "../../../../TableCellContextMenu-Cu5iXYSJ.js";
3
3
  export { t as TableCellContextMenu, e as TablePlugin };
@@ -1,2 +1,2 @@
1
- import { l as e } from "../../../../components-CgBF6db6.js";
1
+ import { l as e } from "../../../../components-D2rPfyIW.js";
2
2
  export { e as ToolBarPlugin };
@@ -1,2 +1,2 @@
1
- import { l as e } from "../../../../components-CgBF6db6.js";
1
+ import { l as e } from "../../../../components-D2rPfyIW.js";
2
2
  export { e as ToolBarPlugin };
@@ -1,7 +1,7 @@
1
- import { i as e, l as t, o as n, s as r } from "../../../components-CgBF6db6.js";
2
- import { t as i } from "../../../TableCellResizerPlugin-Bb2blXnq.js";
1
+ import { i as e, l as t, o as n, s as r } from "../../../components-D2rPfyIW.js";
2
+ import { t as i } from "../../../TableCellResizerPlugin-D-fX5I3p.js";
3
3
  import { BlockFormatPlugin as a } from "./BlockFormatPlugin/BlockFormatPlugin.js";
4
4
  import { ListPlugin as o } from "./ListPlugin/ListPlugin.js";
5
5
  import { t as s } from "../../../TableCellContextMenu-Cu5iXYSJ.js";
6
- import { t as c } from "../../../PasteHandlerPlugin-CSo_lOE8.js";
6
+ import { t as c } from "../../../PasteHandlerPlugin-CTzYRyAx.js";
7
7
  export { a as BlockFormatPlugin, n as HistoryPlugin, r as LinkPlugin, o as ListPlugin, c as PasteHandlerPlugin, s as TableCellContextMenu, i as TableCellResizerPlugin, e as TablePlugin, t as ToolBarPlugin };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../../components-CgBF6db6.js";
1
+ import { n as e, t } from "../../components-D2rPfyIW.js";
2
2
  export { t as Rte, e as RteEditor };
@@ -1,4 +1,4 @@
1
- import { n as e } from "../../components-CgBF6db6.js";
1
+ import { n as e } from "../../components-D2rPfyIW.js";
2
2
  import { t } from "../../Container-DOcrVe7u.js";
3
3
  import "../../storyComponents/Container/index.js";
4
4
  import { MOCK_RTE_CONTENT as n } from "./mockRteContent.js";
@@ -1,7 +1,7 @@
1
- import { mt as e, nr as t } from "../../Lexical.prod-Dy5aDppc.js";
2
- import { a as n, t as r } from "../../LexicalList.prod-icY8mpm6.js";
3
- import { c as i } from "../../LexicalLink.prod-DzgwWhQM.js";
4
- import { c as a } from "../../LexicalTable.prod-Bf0is-op.js";
1
+ import { Jn as e, dt as t } from "../../Lexical.prod-BlUfEvo-.js";
2
+ import { a as n, t as r } from "../../LexicalList.prod-CMGvSM1c.js";
3
+ import { c as i } from "../../LexicalLink.prod-6gI2ABQo.js";
4
+ import { c as a } from "../../LexicalTable.prod-D3FUVxbr.js";
5
5
  import { CourseCatalogueNode as o } from "./nodes/CourseCatalogueNode/CourseCatalogueNode.js";
6
6
  //#region src/components/RteEditor/helpers.ts
7
7
  var s = (e) => {
@@ -12,8 +12,8 @@ var s = (e) => {
12
12
  if (n && n.element instanceof HTMLElement) for (let e of [n.element, ...n.element.querySelectorAll("[style],[class],[dir=\"ltr\"]")]) e.removeAttribute("class"), e.getAttribute("style") && (e.setAttribute("style", ""), e.removeAttribute("style")), e.getAttribute("dir") === "ltr" && e.removeAttribute("dir");
13
13
  return n;
14
14
  }, u = /* @__PURE__ */ new Map([
15
- [e, l],
16
15
  [t, l],
16
+ [e, l],
17
17
  [r, l],
18
18
  [n, l],
19
19
  [a, l],
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../../components-CgBF6db6.js";
1
+ import { n as e, t } from "../../components-D2rPfyIW.js";
2
2
  export { t as Rte, e as RteEditor };
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "../../../../LexicalComposerContext.prod-D4HOlWII.js";
2
- import { K as t, L as n, ar as r, gn as i, lt as a, wn as o, x as s } from "../../../../Lexical.prod-Dy5aDppc.js";
3
- import { l as c } from "../../../../LexicalUtils.prod-CjGUKarD.js";
2
+ import { I as t, W as n, Xn as r, b as i, gn as a, ln as o, ot as s } from "../../../../Lexical.prod-BlUfEvo-.js";
3
+ import { l as c } from "../../../../LexicalUtils.prod-CNWf_0sq.js";
4
4
  import { useEffect as l } from "react";
5
5
  //#region src/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.tsx
6
- var u = class e extends a {
6
+ var u = class e extends s {
7
7
  __linkType;
8
8
  __code;
9
9
  __label;
@@ -72,19 +72,19 @@ function f(e) {
72
72
  function p(e) {
73
73
  return f(e) ? e.__linkType : null;
74
74
  }
75
- var m = s("insertCourseCatalogueLink"), h = s("removeCourseCatalogueLink");
75
+ var m = i("insertCourseCatalogueLink"), h = i("removeCourseCatalogueLink");
76
76
  function g() {
77
- let [a] = e();
78
- if (!a.hasNodes([u])) throw Error("CourseCataloguePlugin: CourseCatalogueNode is not registered on editor");
77
+ let [i] = e();
78
+ if (!i.hasNodes([u])) throw Error("CourseCataloguePlugin: CourseCatalogueNode is not registered on editor");
79
79
  return l(() => {
80
- let e = a.registerCommand(m, (e) => {
81
- let t = d(e.linkType, e.code, e.label), i = r(e.label);
82
- return t.append(i), n([t]), !0;
83
- }, 2), s = a.registerCommand(h, () => {
84
- let e = t();
85
- if (i(e)) {
80
+ let e = i.registerCommand(m, (e) => {
81
+ let n = d(e.linkType, e.code, e.label), i = r(e.label);
82
+ return n.append(i), t([n]), !0;
83
+ }, 2), s = i.registerCommand(h, () => {
84
+ let e = n();
85
+ if (o(e)) {
86
86
  let t = e.anchor.getNode(), n = e.anchor.offset, i = c(t, u);
87
- if (o(t) && n === t.getTextContentSize() && t.getNextSibling() instanceof u && (i = t.getNextSibling()), i) {
87
+ if (a(t) && n === t.getTextContentSize() && t.getNextSibling() instanceof u && (i = t.getNextSibling()), i) {
88
88
  let e = i.getParent();
89
89
  i.remove(), e && e.append(r(" "));
90
90
  }
@@ -94,7 +94,7 @@ function g() {
94
94
  return () => {
95
95
  e(), s();
96
96
  };
97
- }, [a]), null;
97
+ }, [i]), null;
98
98
  }
99
99
  //#endregion
100
100
  export { d as $createCourseCatalogueNode, p as $getLinkTypeFromNode, f as $isCourseCatalogueNode, g as CourseCatalogueLinkPlugin, u as CourseCatalogueNode, m as INSERT_COURSE_CATALOGUE_LINK, h as REMOVE_COURSE_CATALOGUE_LINK };
@@ -1,6 +1,7 @@
1
1
  import { t as e } from "../../../../LexicalComposerContext.prod-D4HOlWII.js";
2
- import { K as t, g as n, gn as r, gr as i, lt as a, x as o } from "../../../../Lexical.prod-Dy5aDppc.js";
3
- import { f as s, l as c } from "../../../../LexicalUtils.prod-CjGUKarD.js";
2
+ import { W as t, b as n, h as r, ln as i, ot as a, sr as o } from "../../../../Lexical.prod-BlUfEvo-.js";
3
+ import { t as s } from "../../../../LexicalSelection.prod-DS_R6Cl1.js";
4
+ import { l as c } from "../../../../LexicalUtils.prod-CNWf_0sq.js";
4
5
  import { useEffect as l } from "react";
5
6
  //#region src/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.tsx
6
7
  var u = class e extends a {
@@ -18,7 +19,7 @@ var u = class e extends a {
18
19
  return !1;
19
20
  }
20
21
  insertNewAfter(e, t) {
21
- let n = i(), r = this.getDirection();
22
+ let n = o(), r = this.getDirection();
22
23
  return n.setDirection(r), this.insertAfter(n, t), n;
23
24
  }
24
25
  };
@@ -28,32 +29,32 @@ function d() {
28
29
  function f(e) {
29
30
  return e instanceof u;
30
31
  }
31
- var p = o("insertTableWrapperNode"), m = o("removeTableWrapperNode");
32
+ var p = n("insertTableWrapperNode"), m = n("removeTableWrapperNode");
32
33
  function h() {
33
- let [a] = e();
34
- if (!a.hasNodes([u])) throw Error("TableWrapperPlugin: TableWrapperNode is not registered on editor");
34
+ let [n] = e();
35
+ if (!n.hasNodes([u])) throw Error("TableWrapperPlugin: TableWrapperNode is not registered on editor");
35
36
  return l(() => {
36
- let e = a.registerCommand(p, () => {
37
+ let e = n.registerCommand(p, () => {
37
38
  let e = t();
38
- return r(e) && s(e, d), !0;
39
- }, 2), o = a.registerCommand(m, () => {
39
+ return i(e) && s(e, d), !0;
40
+ }, 2), a = n.registerCommand(m, () => {
40
41
  let e = t();
41
- if (r(e)) {
42
+ if (i(e)) {
42
43
  let t = e.anchor.getNode();
43
- if (!n(t)) return !1;
44
- let r = c(t, u);
45
- if (!r) return !1;
46
- let a = r?.getChildren();
47
- if (!a) return !1;
48
- let o = i();
49
- a.forEach((e) => o.append(e)), r.replace(o);
44
+ if (!r(t)) return !1;
45
+ let n = c(t, u);
46
+ if (!n) return !1;
47
+ let i = n?.getChildren();
48
+ if (!i) return !1;
49
+ let a = o();
50
+ i.forEach((e) => a.append(e)), n.replace(a);
50
51
  }
51
52
  return !0;
52
53
  }, 2);
53
54
  return () => {
54
- e(), o();
55
+ e(), a();
55
56
  };
56
- }, [a]), null;
57
+ }, [n]), null;
57
58
  }
58
59
  //#endregion
59
60
  export { d as $createTableWrapperNode, f as $isTableWrapperNode, p as INSERT_TABLE_WRAPPER, m as REMOVE_TABLE_WRAPPER, u as TableWrapperNode, h as TableWrapperPlugin };
@@ -1 +1 @@
1
- {"version":3,"file":"TableWrapperNode.js","names":[],"sources":["../../../../../src/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\r\nimport {\r\n $createParagraphNode,\r\n $getSelection,\r\n $isElementNode,\r\n $isRangeSelection,\r\n COMMAND_PRIORITY_NORMAL,\r\n createCommand,\r\n ElementNode,\r\n} from 'lexical';\r\nimport { $getNearestNodeOfType } from '@lexical/utils';\r\nimport { $setBlocksType } from '@lexical/selection';\r\nimport { useEffect } from 'react';\r\n\r\nimport type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode';\r\nimport type { EditorConfig, LexicalNode, RangeSelection } from 'lexical';\r\n\r\nexport type SerializedTableWrapperNode = SerializedDecoratorBlockNode;\r\n\r\nexport class TableWrapperNode extends ElementNode {\r\n static getType(): string {\r\n return 'tableWrapper';\r\n }\r\n\r\n static clone(node: TableWrapperNode): TableWrapperNode {\r\n return new TableWrapperNode(node.__key);\r\n }\r\n\r\n createDOM(config: EditorConfig): HTMLElement {\r\n const element = document.createElement('div');\r\n element.className = config.theme.tableWrapper;\r\n return element;\r\n }\r\n\r\n updateDOM(): false {\r\n return false;\r\n }\r\n\r\n insertNewAfter(_selection: RangeSelection, restoreSelection?: boolean | undefined): LexicalNode | null {\r\n const newBlock = $createParagraphNode();\r\n const direction = this.getDirection();\r\n newBlock.setDirection(direction);\r\n this.insertAfter(newBlock, restoreSelection);\r\n return newBlock;\r\n }\r\n}\r\n\r\nexport function $createTableWrapperNode(): TableWrapperNode {\r\n return new TableWrapperNode();\r\n}\r\n\r\nexport function $isTableWrapperNode(node: LexicalNode): node is TableWrapperNode {\r\n return node instanceof TableWrapperNode;\r\n}\r\n\r\nexport const INSERT_TABLE_WRAPPER = createCommand('insertTableWrapperNode');\r\n\r\nexport const REMOVE_TABLE_WRAPPER = createCommand('removeTableWrapperNode');\r\n\r\nexport function TableWrapperPlugin(): null {\r\n const [editor] = useLexicalComposerContext();\r\n if (!editor.hasNodes([TableWrapperNode])) {\r\n throw new Error('TableWrapperPlugin: TableWrapperNode is not registered on editor');\r\n }\r\n useEffect(() => {\r\n const insertTableWrapper = editor.registerCommand(\r\n INSERT_TABLE_WRAPPER,\r\n () => {\r\n const selection = $getSelection();\r\n if ($isRangeSelection(selection)) {\r\n $setBlocksType(selection, $createTableWrapperNode);\r\n }\r\n return true;\r\n },\r\n COMMAND_PRIORITY_NORMAL\r\n );\r\n\r\n const removeTableWrapper = editor.registerCommand(\r\n REMOVE_TABLE_WRAPPER,\r\n () => {\r\n const selection = $getSelection();\r\n if ($isRangeSelection(selection)) {\r\n const node = selection.anchor.getNode();\r\n if (!$isElementNode(node)) return false;\r\n const tableWrapperNode = $getNearestNodeOfType(node, TableWrapperNode);\r\n if (!tableWrapperNode) return false;\r\n const childrenNodes = tableWrapperNode?.getChildren();\r\n if (!childrenNodes) return false;\r\n const paragraphNode = $createParagraphNode();\r\n childrenNodes.forEach((child) => paragraphNode.append(child));\r\n tableWrapperNode.replace(paragraphNode);\r\n }\r\n return true;\r\n },\r\n COMMAND_PRIORITY_NORMAL\r\n );\r\n\r\n return () => {\r\n insertTableWrapper();\r\n removeTableWrapper();\r\n };\r\n }, [editor]);\r\n return null;\r\n}\r\n"],"mappings":";;;;;AAmBA,IAAa,IAAb,MAAa,UAAyB,EAAY;CAChD,OAAO,UAAkB;EACvB,OAAO;CACT;CAEA,OAAO,MAAM,GAA0C;EACrD,OAAO,IAAI,EAAiB,EAAK,KAAK;CACxC;CAEA,UAAU,GAAmC;EAC3C,IAAM,IAAU,SAAS,cAAc,KAAK;EAE5C,OADA,EAAQ,YAAY,EAAO,MAAM,cAC1B;CACT;CAEA,YAAmB;EACjB,OAAO;CACT;CAEA,eAAe,GAA4B,GAA4D;EACrG,IAAM,IAAW,EAAqB,GAChC,IAAY,KAAK,aAAa;EAGpC,OAFA,EAAS,aAAa,CAAS,GAC/B,KAAK,YAAY,GAAU,CAAgB,GACpC;CACT;AACF;AAEA,SAAgB,IAA4C;CAC1D,OAAO,IAAI,EAAiB;AAC9B;AAEA,SAAgB,EAAoB,GAA6C;CAC/E,OAAO,aAAgB;AACzB;AAEA,IAAa,IAAuB,EAAc,wBAAwB,GAE7D,IAAuB,EAAc,wBAAwB;AAE1E,SAAgB,IAA2B;CACzC,IAAM,CAAC,KAAU,EAA0B;CAC3C,IAAI,CAAC,EAAO,SAAS,CAAC,CAAgB,CAAC,GACrC,MAAU,MAAM,kEAAkE;CAwCpF,OAtCA,QAAgB;EACd,IAAM,IAAqB,EAAO,gBAChC,SACM;GACJ,IAAM,IAAY,EAAc;GAIhC,OAHI,EAAkB,CAAS,KAC7B,EAAe,GAAW,CAAuB,GAE5C;EACT,GAAA,CAEF,GAEM,IAAqB,EAAO,gBAChC,SACM;GACJ,IAAM,IAAY,EAAc;GAChC,IAAI,EAAkB,CAAS,GAAG;IAChC,IAAM,IAAO,EAAU,OAAO,QAAQ;IACtC,IAAI,CAAC,EAAe,CAAI,GAAG,OAAO;IAClC,IAAM,IAAmB,EAAsB,GAAM,CAAgB;IACrE,IAAI,CAAC,GAAkB,OAAO;IAC9B,IAAM,IAAgB,GAAkB,YAAY;IACpD,IAAI,CAAC,GAAe,OAAO;IAC3B,IAAM,IAAgB,EAAqB;IAE3C,AADA,EAAc,SAAS,MAAU,EAAc,OAAO,CAAK,CAAC,GAC5D,EAAiB,QAAQ,CAAa;GACxC;GACA,OAAO;EACT,GAAA,CAEF;EAEA,aAAa;GAEX,AADA,EAAmB,GACnB,EAAmB;EACrB;CACF,GAAG,CAAC,CAAM,CAAC,GACJ;AACT"}
1
+ {"version":3,"file":"TableWrapperNode.js","names":[],"sources":["../../../../../src/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\r\nimport {\r\n $createParagraphNode,\r\n $getSelection,\r\n $isElementNode,\r\n $isRangeSelection,\r\n COMMAND_PRIORITY_NORMAL,\r\n createCommand,\r\n ElementNode,\r\n} from 'lexical';\r\nimport { $getNearestNodeOfType } from '@lexical/utils';\r\nimport { $setBlocksType } from '@lexical/selection';\r\nimport { useEffect } from 'react';\r\n\r\nimport type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode';\r\nimport type { EditorConfig, LexicalNode, RangeSelection } from 'lexical';\r\n\r\nexport type SerializedTableWrapperNode = SerializedDecoratorBlockNode;\r\n\r\nexport class TableWrapperNode extends ElementNode {\r\n static getType(): string {\r\n return 'tableWrapper';\r\n }\r\n\r\n static clone(node: TableWrapperNode): TableWrapperNode {\r\n return new TableWrapperNode(node.__key);\r\n }\r\n\r\n createDOM(config: EditorConfig): HTMLElement {\r\n const element = document.createElement('div');\r\n element.className = config.theme.tableWrapper;\r\n return element;\r\n }\r\n\r\n updateDOM(): false {\r\n return false;\r\n }\r\n\r\n insertNewAfter(_selection: RangeSelection, restoreSelection?: boolean | undefined): LexicalNode | null {\r\n const newBlock = $createParagraphNode();\r\n const direction = this.getDirection();\r\n newBlock.setDirection(direction);\r\n this.insertAfter(newBlock, restoreSelection);\r\n return newBlock;\r\n }\r\n}\r\n\r\nexport function $createTableWrapperNode(): TableWrapperNode {\r\n return new TableWrapperNode();\r\n}\r\n\r\nexport function $isTableWrapperNode(node: LexicalNode): node is TableWrapperNode {\r\n return node instanceof TableWrapperNode;\r\n}\r\n\r\nexport const INSERT_TABLE_WRAPPER = createCommand('insertTableWrapperNode');\r\n\r\nexport const REMOVE_TABLE_WRAPPER = createCommand('removeTableWrapperNode');\r\n\r\nexport function TableWrapperPlugin(): null {\r\n const [editor] = useLexicalComposerContext();\r\n if (!editor.hasNodes([TableWrapperNode])) {\r\n throw new Error('TableWrapperPlugin: TableWrapperNode is not registered on editor');\r\n }\r\n useEffect(() => {\r\n const insertTableWrapper = editor.registerCommand(\r\n INSERT_TABLE_WRAPPER,\r\n () => {\r\n const selection = $getSelection();\r\n if ($isRangeSelection(selection)) {\r\n $setBlocksType(selection, $createTableWrapperNode);\r\n }\r\n return true;\r\n },\r\n COMMAND_PRIORITY_NORMAL\r\n );\r\n\r\n const removeTableWrapper = editor.registerCommand(\r\n REMOVE_TABLE_WRAPPER,\r\n () => {\r\n const selection = $getSelection();\r\n if ($isRangeSelection(selection)) {\r\n const node = selection.anchor.getNode();\r\n if (!$isElementNode(node)) return false;\r\n const tableWrapperNode = $getNearestNodeOfType(node, TableWrapperNode);\r\n if (!tableWrapperNode) return false;\r\n const childrenNodes = tableWrapperNode?.getChildren();\r\n if (!childrenNodes) return false;\r\n const paragraphNode = $createParagraphNode();\r\n childrenNodes.forEach((child) => paragraphNode.append(child));\r\n tableWrapperNode.replace(paragraphNode);\r\n }\r\n return true;\r\n },\r\n COMMAND_PRIORITY_NORMAL\r\n );\r\n\r\n return () => {\r\n insertTableWrapper();\r\n removeTableWrapper();\r\n };\r\n }, [editor]);\r\n return null;\r\n}\r\n"],"mappings":";;;;;;AAmBA,IAAa,IAAb,MAAa,UAAyB,EAAY;CAChD,OAAO,UAAkB;EACvB,OAAO;CACT;CAEA,OAAO,MAAM,GAA0C;EACrD,OAAO,IAAI,EAAiB,EAAK,KAAK;CACxC;CAEA,UAAU,GAAmC;EAC3C,IAAM,IAAU,SAAS,cAAc,KAAK;EAE5C,OADA,EAAQ,YAAY,EAAO,MAAM,cAC1B;CACT;CAEA,YAAmB;EACjB,OAAO;CACT;CAEA,eAAe,GAA4B,GAA4D;EACrG,IAAM,IAAW,EAAqB,GAChC,IAAY,KAAK,aAAa;EAGpC,OAFA,EAAS,aAAa,CAAS,GAC/B,KAAK,YAAY,GAAU,CAAgB,GACpC;CACT;AACF;AAEA,SAAgB,IAA4C;CAC1D,OAAO,IAAI,EAAiB;AAC9B;AAEA,SAAgB,EAAoB,GAA6C;CAC/E,OAAO,aAAgB;AACzB;AAEA,IAAa,IAAuB,EAAc,wBAAwB,GAE7D,IAAuB,EAAc,wBAAwB;AAE1E,SAAgB,IAA2B;CACzC,IAAM,CAAC,KAAU,EAA0B;CAC3C,IAAI,CAAC,EAAO,SAAS,CAAC,CAAgB,CAAC,GACrC,MAAU,MAAM,kEAAkE;CAwCpF,OAtCA,QAAgB;EACd,IAAM,IAAqB,EAAO,gBAChC,SACM;GACJ,IAAM,IAAY,EAAc;GAIhC,OAHI,EAAkB,CAAS,KAC7B,EAAe,GAAW,CAAuB,GAE5C;EACT,GAAA,CAEF,GAEM,IAAqB,EAAO,gBAChC,SACM;GACJ,IAAM,IAAY,EAAc;GAChC,IAAI,EAAkB,CAAS,GAAG;IAChC,IAAM,IAAO,EAAU,OAAO,QAAQ;IACtC,IAAI,CAAC,EAAe,CAAI,GAAG,OAAO;IAClC,IAAM,IAAmB,EAAsB,GAAM,CAAgB;IACrE,IAAI,CAAC,GAAkB,OAAO;IAC9B,IAAM,IAAgB,GAAkB,YAAY;IACpD,IAAI,CAAC,GAAe,OAAO;IAC3B,IAAM,IAAgB,EAAqB;IAE3C,AADA,EAAc,SAAS,MAAU,EAAc,OAAO,CAAK,CAAC,GAC5D,EAAiB,QAAQ,CAAa;GACxC;GACA,OAAO;EACT,GAAA,CAEF;EAEA,aAAa;GAEX,AADA,EAAmB,GACnB,EAAmB;EACrB;CACF,GAAG,CAAC,CAAM,CAAC,GACJ;AACT"}
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../test-Gtly6H2f.js";
1
+ import { r as e } from "../../test-BjtC-Q32.js";
2
2
  import { SelectListbox as t } from "./SelectListbox.js";
3
3
  import "react";
4
4
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
@@ -12,7 +12,8 @@ var s = e({}), c = ({ options: e, defaultValue: t, children: c }) => {
12
12
  label: "",
13
13
  selectedLabel: "-"
14
14
  }, b = (t, n = !1) => {
15
- m(e.findIndex((e) => e.value === t.value)), u(t), f(!1), g(!n);
15
+ let r = e.findIndex((e) => e.value === t.value);
16
+ m(r), u(t), f(!1), g(!n);
16
17
  };
17
18
  return t !== -1 && !l.value && b(y(t), !0), n(() => {
18
19
  y(l.value || t).label !== l.label && b(y(l.value || t));
@@ -1 +1 @@
1
- {"version":3,"file":"SelectProvider.js","names":[],"sources":["../../../src/components/SelectListbox/SelectProvider.tsx"],"sourcesContent":["import { createContext, useContext, useState, useId, useRef, useEffect } from 'react';\n\nimport type { PropsWithChildren } from 'react';\n\nexport type SelectValue = string | number | null;\n\nexport type OptionValue = {\n value: SelectValue;\n label: string;\n selectedLabel?: string;\n disabled?: boolean;\n};\nexport interface SelectListboxContext {\n options: OptionValue[];\n selectedValue: OptionValue;\n setSelectedValue: (v: OptionValue) => void;\n isOpen: boolean;\n setIsOpen: (v: boolean) => void;\n toggleListbox: () => void;\n getValue: (value: SelectValue) => OptionValue;\n activeIndex: number;\n setActiveIndex: (v: number) => void;\n listboxId: string;\n isDirty: boolean;\n}\n\nconst SelectContext = createContext<SelectListboxContext>({} as SelectListboxContext);\n\ninterface Props {\n options: OptionValue[];\n defaultValue: SelectValue;\n}\n\nexport const SelectProvider = ({ options, defaultValue, children }: PropsWithChildren<Props>) => {\n const [value, setValue] = useState<OptionValue>({ value: '', label: '' });\n const [isOpen, setIsOpen] = useState(false);\n const [activeIndex, setActiveIndex] = useState(-1);\n const [isDirty, setIsDirty] = useState(false);\n const listboxId = useRef<string>(useId());\n\n const toggleListbox = () => {\n setIsOpen((status) => !status);\n setIsDirty(false);\n };\n\n const getValue = (value: SelectValue) => {\n return (\n options.find((option) => option.value === value) || {\n value: -1,\n label: '',\n selectedLabel: '-',\n }\n );\n };\n\n const setSelectedValue = (value: OptionValue, isDefault = false) => {\n const selectedIndex = options.findIndex((option) => option.value === value.value);\n setActiveIndex(selectedIndex);\n setValue(value);\n setIsOpen(false);\n setIsDirty(!isDefault);\n };\n\n if (defaultValue !== -1 && !value.value) {\n setSelectedValue(getValue(defaultValue), true);\n }\n\n useEffect(() => {\n const newLabel = getValue(value.value || defaultValue).label;\n if (newLabel !== value.label) {\n setSelectedValue(getValue(value.value || defaultValue));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [options, defaultValue]);\n\n return (\n <SelectContext.Provider\n value={{\n options,\n selectedValue: value,\n setSelectedValue,\n isOpen,\n setIsOpen,\n toggleListbox,\n getValue,\n activeIndex,\n setActiveIndex,\n listboxId: listboxId.current,\n isDirty,\n }}\n >\n {children}\n </SelectContext.Provider>\n );\n};\n\nexport const useSelect = () => {\n const context = useContext(SelectContext);\n\n if (context === undefined) throw new Error('useSelect can only be used in an SelectProvider');\n\n return context;\n};\n"],"mappings":";;;AA0BA,IAAM,IAAgB,EAAoC,CAAC,CAAyB,GAOvE,KAAkB,EAAE,YAAS,iBAAc,kBAAyC;CAC/F,IAAM,CAAC,GAAO,KAAY,EAAsB;EAAE,OAAO;EAAI,OAAO;CAAG,CAAC,GAClE,CAAC,GAAQ,KAAa,EAAS,EAAK,GACpC,CAAC,GAAa,KAAkB,EAAS,EAAE,GAC3C,CAAC,GAAS,KAAc,EAAS,EAAK,GACtC,IAAY,EAAe,EAAM,CAAC,GAElC,UAAsB;EAE1B,AADA,GAAW,MAAW,CAAC,CAAM,GAC7B,EAAW,EAAK;CAClB,GAEM,KAAY,MAEd,EAAQ,MAAM,MAAW,EAAO,UAAU,CAAK,KAAK;EAClD,OAAO;EACP,OAAO;EACP,eAAe;CACjB,GAIE,KAAoB,GAAoB,IAAY,OAAU;EAKlE,AAHA,EADsB,EAAQ,WAAW,MAAW,EAAO,UAAU,EAAM,KAC5D,CAAa,GAC5B,EAAS,CAAK,GACd,EAAU,EAAK,GACf,EAAW,CAAC,CAAS;CACvB;CAcA,OAZI,MAAiB,MAAM,CAAC,EAAM,SAChC,EAAiB,EAAS,CAAY,GAAG,EAAI,GAG/C,QAAgB;EAEd,AADiB,EAAS,EAAM,SAAS,CAAY,CAAC,CAAC,UACtC,EAAM,SACrB,EAAiB,EAAS,EAAM,SAAS,CAAY,CAAC;CAG1D,GAAG,CAAC,GAAS,CAAY,CAAC,GAGxB,kBAAC,EAAc,UAAf;EACE,OAAO;GACL;GACA,eAAe;GACf;GACA;GACA;GACA;GACA;GACA;GACA;GACA,WAAW,EAAU;GACrB;EACF;EAEC;CACqB,CAAA;AAE5B,GAEa,UAAkB;CAC7B,IAAM,IAAU,EAAW,CAAa;CAExC,IAAI,MAAY,KAAA,GAAW,MAAU,MAAM,iDAAiD;CAE5F,OAAO;AACT"}
1
+ {"version":3,"file":"SelectProvider.js","names":[],"sources":["../../../src/components/SelectListbox/SelectProvider.tsx"],"sourcesContent":["import { createContext, useContext, useState, useId, useRef, useEffect } from 'react';\n\nimport type { PropsWithChildren } from 'react';\n\nexport type SelectValue = string | number | null;\n\nexport type OptionValue = {\n value: SelectValue;\n label: string;\n selectedLabel?: string;\n disabled?: boolean;\n};\nexport interface SelectListboxContext {\n options: OptionValue[];\n selectedValue: OptionValue;\n setSelectedValue: (v: OptionValue) => void;\n isOpen: boolean;\n setIsOpen: (v: boolean) => void;\n toggleListbox: () => void;\n getValue: (value: SelectValue) => OptionValue;\n activeIndex: number;\n setActiveIndex: (v: number) => void;\n listboxId: string;\n isDirty: boolean;\n}\n\nconst SelectContext = createContext<SelectListboxContext>({} as SelectListboxContext);\n\ninterface Props {\n options: OptionValue[];\n defaultValue: SelectValue;\n}\n\nexport const SelectProvider = ({ options, defaultValue, children }: PropsWithChildren<Props>) => {\n const [value, setValue] = useState<OptionValue>({ value: '', label: '' });\n const [isOpen, setIsOpen] = useState(false);\n const [activeIndex, setActiveIndex] = useState(-1);\n const [isDirty, setIsDirty] = useState(false);\n const listboxId = useRef<string>(useId());\n\n const toggleListbox = () => {\n setIsOpen((status) => !status);\n setIsDirty(false);\n };\n\n const getValue = (value: SelectValue) => {\n return (\n options.find((option) => option.value === value) || {\n value: -1,\n label: '',\n selectedLabel: '-',\n }\n );\n };\n\n const setSelectedValue = (value: OptionValue, isDefault = false) => {\n const selectedIndex = options.findIndex((option) => option.value === value.value);\n setActiveIndex(selectedIndex);\n setValue(value);\n setIsOpen(false);\n setIsDirty(!isDefault);\n };\n\n if (defaultValue !== -1 && !value.value) {\n setSelectedValue(getValue(defaultValue), true);\n }\n\n useEffect(() => {\n const newLabel = getValue(value.value || defaultValue).label;\n if (newLabel !== value.label) {\n setSelectedValue(getValue(value.value || defaultValue));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [options, defaultValue]);\n\n return (\n <SelectContext.Provider\n value={{\n options,\n selectedValue: value,\n setSelectedValue,\n isOpen,\n setIsOpen,\n toggleListbox,\n getValue,\n activeIndex,\n setActiveIndex,\n listboxId: listboxId.current,\n isDirty,\n }}\n >\n {children}\n </SelectContext.Provider>\n );\n};\n\nexport const useSelect = () => {\n const context = useContext(SelectContext);\n\n if (context === undefined) throw new Error('useSelect can only be used in an SelectProvider');\n\n return context;\n};\n"],"mappings":";;;AA0BA,IAAM,IAAgB,EAAoC,CAAC,CAAyB,GAOvE,KAAkB,EAAE,YAAS,iBAAc,kBAAyC;CAC/F,IAAM,CAAC,GAAO,KAAY,EAAsB;EAAE,OAAO;EAAI,OAAO;CAAG,CAAC,GAClE,CAAC,GAAQ,KAAa,EAAS,EAAK,GACpC,CAAC,GAAa,KAAkB,EAAS,EAAE,GAC3C,CAAC,GAAS,KAAc,EAAS,EAAK,GACtC,IAAY,EAAe,EAAM,CAAC,GAElC,UAAsB;EAE1B,AADA,GAAW,MAAW,CAAC,CAAM,GAC7B,EAAW,EAAK;CAClB,GAEM,KAAY,MAEd,EAAQ,MAAM,MAAW,EAAO,UAAU,CAAK,KAAK;EAClD,OAAO;EACP,OAAO;EACP,eAAe;CACjB,GAIE,KAAoB,GAAoB,IAAY,OAAU;EAClE,IAAM,IAAgB,EAAQ,WAAW,MAAW,EAAO,UAAU,EAAM,KAAK;EAIhF,AAHA,EAAe,CAAa,GAC5B,EAAS,CAAK,GACd,EAAU,EAAK,GACf,EAAW,CAAC,CAAS;CACvB;CAcA,OAZI,MAAiB,MAAM,CAAC,EAAM,SAChC,EAAiB,EAAS,CAAY,GAAG,EAAI,GAG/C,QAAgB;EAEd,AADiB,EAAS,EAAM,SAAS,CAAY,CAAC,CAAC,UACtC,EAAM,SACrB,EAAiB,EAAS,EAAM,SAAS,CAAY,CAAC;CAG1D,GAAG,CAAC,GAAS,CAAY,CAAC,GAGxB,kBAAC,EAAc,UAAf;EACE,OAAO;GACL;GACA,eAAe;GACf;GACA;GACA;GACA;GACA;GACA;GACA;GACA,WAAW,EAAU;GACrB;EACF;EAEC;CACqB,CAAA;AAE5B,GAEa,UAAkB;CAC7B,IAAM,IAAU,EAAW,CAAa;CAExC,IAAI,MAAY,KAAA,GAAW,MAAU,MAAM,iDAAiD;CAE5F,OAAO;AACT"}
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../Slider-Czd2xAGf.js";
1
+ import { t as e } from "../../Slider-CqYFsgRL.js";
2
2
  export { e as Slider };
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../Slider-Czd2xAGf.js";
1
+ import { t as e } from "../../Slider-CqYFsgRL.js";
2
2
  import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
3
  var i = {
4
4
  title: "Atoms/Slider",
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../Slider-Czd2xAGf.js";
1
+ import { t as e } from "../../Slider-CqYFsgRL.js";
2
2
  export { e as Slider };
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../test-Gtly6H2f.js";
1
+ import { r as e } from "../../test-BjtC-Q32.js";
2
2
  import { Icon as t } from "../Icon/Icon.js";
3
3
  import { Button as n } from "../Buttons/Button.js";
4
4
  import { t as r } from "../../InputField-asFsxHvx.js";
@@ -50,8 +50,8 @@ function m({ children: m, handlePlacement: h, disabled: g, sortableItemColor: _,
50
50
  function R(e) {
51
51
  if (e.preventDefault(), !P) return;
52
52
  C(v);
53
- let { direction: t } = e.currentTarget.dataset;
54
- w(t === "up" ? v - 1 : v + 1);
53
+ let { direction: t } = e.currentTarget.dataset, n = t === "up" ? v - 1 : v + 1;
54
+ w(n);
55
55
  }
56
56
  return /* @__PURE__ */ u("div", {
57
57
  className: e(n["sortable__sort-item"], n[`sortable__sort-item--${_}`]),
@@ -1 +1 @@
1
- {"version":3,"file":"SortableItem.js","names":[],"sources":["../../../../src/components/Sortable/components/SortableItem.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { DragEvent, MouseEvent, KeyboardEvent as ReactKeyboardEvent, ReactNode } from 'react';\nimport type { SortableHandleProps } from './SortableHandle';\nimport type { SortableItemColors } from 'components/Sortable/Sortable';\n\nimport { Icon } from 'components/Icon';\nimport { SortableHandle } from 'components/Sortable/components/SortableHandle';\nimport styles from 'components/Sortable/Sortable.module.css';\nimport { useSortable } from 'components/Sortable/SortableProvider';\n\nexport interface SortableItemProps {\n children: ReactNode;\n handlePlacement: SortableHandleProps['placement'];\n disabled?: boolean;\n sortableItemColor: SortableItemColors;\n index: number;\n}\n\nconst ACCESS_KEYS = ['Space', 'ArrowDown', 'ArrowUp'];\nconst noSupportTouch = 'ontouchstart' in globalThis.document.documentElement;\nconst dragImage = new Image(0, 0);\n\ndragImage.src =\n // 1px transparent png\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==';\n\nexport function SortableItem({ children, handlePlacement, disabled, sortableItemColor, index }: SortableItemProps) {\n const {\n clone,\n dragEnd,\n draggingSource,\n draggingTarget,\n dragStart,\n drop,\n maxIndex,\n moveToPosition,\n setClone,\n setDraggingSource,\n } = useSortable();\n const [grabbing, setGrabbing] = useState(false);\n const [moving, setmoving] = useState(false);\n const itemRef = useRef<HTMLDivElement>(null);\n const hasIndex = index !== undefined && index >= 0;\n\n useEffect(() => {\n if (!itemRef.current) return;\n if (globalThis.document.activeElement === itemRef.current) return;\n\n if (index === draggingTarget && draggingTarget === draggingSource) {\n // Manually setting focus after an item has been moved with the keyboard; focus is lost after rerender\n itemRef.current.focus();\n setmoving(true);\n } else {\n setmoving(false);\n }\n }, [index, draggingTarget, draggingSource, setDraggingSource]);\n\n function handleDragStart(event: DragEvent<HTMLDivElement>) {\n event.stopPropagation();\n\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setDragImage(dragImage, 0, 0);\n\n if (itemRef.current) {\n const cloned = itemRef.current.cloneNode(true) as Element;\n\n cloned.classList.add(styles['sortable__sort-item--ghost']);\n\n setClone(cloned);\n }\n\n if (hasIndex) dragStart(index);\n setGrabbing(true);\n }\n\n function handleDragEnd() {\n if (grabbing) return;\n\n if (clone) document.body.removeChild(clone);\n\n setGrabbing(false);\n dragEnd();\n }\n\n function handleKeyUp(event: ReactKeyboardEvent<HTMLDivElement>) {\n const { code } = event;\n\n if (code === 'Tab' && draggingSource !== undefined) {\n dragEnd();\n return;\n }\n\n if (ACCESS_KEYS.includes(code) === false) return;\n\n if (!hasIndex) return;\n\n if (code === 'Space') {\n if (moving) {\n setmoving(false);\n dragEnd();\n } else {\n setmoving(true);\n dragStart(index);\n }\n\n return;\n }\n\n if (draggingSource === undefined) return;\n\n const newTarget = code === 'ArrowUp' ? index - 1 : index + 1;\n\n if (newTarget < 0 || newTarget > maxIndex) return;\n\n moveToPosition(newTarget);\n }\n\n function handleMove(event: MouseEvent<HTMLButtonElement>) {\n event.preventDefault();\n\n if (!hasIndex) return;\n\n dragStart(index);\n\n const { direction } = event.currentTarget.dataset;\n const newTarget = direction === 'up' ? index - 1 : index + 1;\n\n drop(newTarget);\n }\n\n return (\n <div\n className={clsx(styles['sortable__sort-item'], styles[`sortable__sort-item--${sortableItemColor}`])}\n draggable={!disabled}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n onKeyUpCapture={handleKeyUp}\n ref={itemRef}\n role=\"presentation\"\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n >\n <div\n className={`${styles['sortable__sort-item__contents']} ${styles[`sortable__sort-item__contents--handle-${handlePlacement}`]}`}\n >\n {handlePlacement === 'left' && <SortableHandle placement=\"left\" />}\n {children}\n {handlePlacement === 'right' && <SortableHandle placement=\"right\" />}\n </div>\n\n <div className={styles['sortable__sort-item__button-container']} data-touch={noSupportTouch}>\n {!disabled && hasIndex && (\n <>\n {hasIndex && (\n <>\n {index > 0 && (\n <button\n className={`${styles['sortable__sort-item__handle']} ${styles['sortable__sort-item__handle--up']}`}\n data-direction=\"up\"\n onClickCapture={handleMove}\n >\n <div className={styles['sortable__sort-item__handle--icon']}>\n <Icon name=\"CheveronDown\" />\n </div>\n <span className={styles['sortable__visually-hidden']}>Move up</span>\n </button>\n )}\n\n {index < maxIndex && (\n <button\n className={`${styles['sortable__sort-item__handle']} ${styles['sortable__sort-item__handle--down']}`}\n data-direction=\"down\"\n onClickCapture={handleMove}\n >\n <div className={styles['sortable__sort-item__handle--icon']}>\n <Icon name=\"CheveronDown\" />\n </div>\n <span className={styles['sortable__visually-hidden']}>Move down</span>\n </button>\n )}\n </>\n )}\n </>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"SortableItem.js","names":[],"sources":["../../../../src/components/Sortable/components/SortableItem.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { DragEvent, MouseEvent, KeyboardEvent as ReactKeyboardEvent, ReactNode } from 'react';\nimport type { SortableHandleProps } from './SortableHandle';\nimport type { SortableItemColors } from 'components/Sortable/Sortable';\n\nimport { Icon } from 'components/Icon';\nimport { SortableHandle } from 'components/Sortable/components/SortableHandle';\nimport styles from 'components/Sortable/Sortable.module.css';\nimport { useSortable } from 'components/Sortable/SortableProvider';\n\nexport interface SortableItemProps {\n children: ReactNode;\n handlePlacement: SortableHandleProps['placement'];\n disabled?: boolean;\n sortableItemColor: SortableItemColors;\n index: number;\n}\n\nconst ACCESS_KEYS = ['Space', 'ArrowDown', 'ArrowUp'];\nconst noSupportTouch = 'ontouchstart' in globalThis.document.documentElement;\nconst dragImage = new Image(0, 0);\n\ndragImage.src =\n // 1px transparent png\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==';\n\nexport function SortableItem({ children, handlePlacement, disabled, sortableItemColor, index }: SortableItemProps) {\n const {\n clone,\n dragEnd,\n draggingSource,\n draggingTarget,\n dragStart,\n drop,\n maxIndex,\n moveToPosition,\n setClone,\n setDraggingSource,\n } = useSortable();\n const [grabbing, setGrabbing] = useState(false);\n const [moving, setmoving] = useState(false);\n const itemRef = useRef<HTMLDivElement>(null);\n const hasIndex = index !== undefined && index >= 0;\n\n useEffect(() => {\n if (!itemRef.current) return;\n if (globalThis.document.activeElement === itemRef.current) return;\n\n if (index === draggingTarget && draggingTarget === draggingSource) {\n // Manually setting focus after an item has been moved with the keyboard; focus is lost after rerender\n itemRef.current.focus();\n setmoving(true);\n } else {\n setmoving(false);\n }\n }, [index, draggingTarget, draggingSource, setDraggingSource]);\n\n function handleDragStart(event: DragEvent<HTMLDivElement>) {\n event.stopPropagation();\n\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setDragImage(dragImage, 0, 0);\n\n if (itemRef.current) {\n const cloned = itemRef.current.cloneNode(true) as Element;\n\n cloned.classList.add(styles['sortable__sort-item--ghost']);\n\n setClone(cloned);\n }\n\n if (hasIndex) dragStart(index);\n setGrabbing(true);\n }\n\n function handleDragEnd() {\n if (grabbing) return;\n\n if (clone) document.body.removeChild(clone);\n\n setGrabbing(false);\n dragEnd();\n }\n\n function handleKeyUp(event: ReactKeyboardEvent<HTMLDivElement>) {\n const { code } = event;\n\n if (code === 'Tab' && draggingSource !== undefined) {\n dragEnd();\n return;\n }\n\n if (ACCESS_KEYS.includes(code) === false) return;\n\n if (!hasIndex) return;\n\n if (code === 'Space') {\n if (moving) {\n setmoving(false);\n dragEnd();\n } else {\n setmoving(true);\n dragStart(index);\n }\n\n return;\n }\n\n if (draggingSource === undefined) return;\n\n const newTarget = code === 'ArrowUp' ? index - 1 : index + 1;\n\n if (newTarget < 0 || newTarget > maxIndex) return;\n\n moveToPosition(newTarget);\n }\n\n function handleMove(event: MouseEvent<HTMLButtonElement>) {\n event.preventDefault();\n\n if (!hasIndex) return;\n\n dragStart(index);\n\n const { direction } = event.currentTarget.dataset;\n const newTarget = direction === 'up' ? index - 1 : index + 1;\n\n drop(newTarget);\n }\n\n return (\n <div\n className={clsx(styles['sortable__sort-item'], styles[`sortable__sort-item--${sortableItemColor}`])}\n draggable={!disabled}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n onKeyUpCapture={handleKeyUp}\n ref={itemRef}\n role=\"presentation\"\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n >\n <div\n className={`${styles['sortable__sort-item__contents']} ${styles[`sortable__sort-item__contents--handle-${handlePlacement}`]}`}\n >\n {handlePlacement === 'left' && <SortableHandle placement=\"left\" />}\n {children}\n {handlePlacement === 'right' && <SortableHandle placement=\"right\" />}\n </div>\n\n <div className={styles['sortable__sort-item__button-container']} data-touch={noSupportTouch}>\n {!disabled && hasIndex && (\n <>\n {hasIndex && (\n <>\n {index > 0 && (\n <button\n className={`${styles['sortable__sort-item__handle']} ${styles['sortable__sort-item__handle--up']}`}\n data-direction=\"up\"\n onClickCapture={handleMove}\n >\n <div className={styles['sortable__sort-item__handle--icon']}>\n <Icon name=\"CheveronDown\" />\n </div>\n <span className={styles['sortable__visually-hidden']}>Move up</span>\n </button>\n )}\n\n {index < maxIndex && (\n <button\n className={`${styles['sortable__sort-item__handle']} ${styles['sortable__sort-item__handle--down']}`}\n data-direction=\"down\"\n onClickCapture={handleMove}\n >\n <div className={styles['sortable__sort-item__handle--icon']}>\n <Icon name=\"CheveronDown\" />\n </div>\n <span className={styles['sortable__visually-hidden']}>Move down</span>\n </button>\n )}\n </>\n )}\n </>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":"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"}
@@ -1,16 +1,17 @@
1
- import "../../dist-oLwM--0y.js";
2
- import { t as e } from "../../StatusBage-hJmNPqtk.js";
3
- import { i as t, n } from "../../react.esm-DwWzhs9e.js";
1
+ import { s as e } from "../../dom.esm-S0SD0DBW.js";
2
+ import "../../dist-CuwCMU7Y.js";
3
+ import { t } from "../../StatusBage-hJmNPqtk.js";
4
+ import { n } from "../../react.esm-D50lAl1F.js";
4
5
  import { jsx as r } from "react/jsx-runtime";
5
6
  //#region src/components/StatusBadge/StatusBadge.test.tsx
6
7
  describe("StatusBadge", () => {
7
8
  it("should render with message", () => {
8
- n(/* @__PURE__ */ r(e, { label: "Status message" })), expect(t.getByText("Status message")).toBeInTheDocument();
9
+ n(/* @__PURE__ */ r(t, { label: "Status message" })), expect(e.getByText("Status message")).toBeInTheDocument();
9
10
  }), it("should render with highContract", () => {
10
- n(/* @__PURE__ */ r(e, {
11
+ n(/* @__PURE__ */ r(t, {
11
12
  label: "Status message",
12
13
  highContrast: !0
13
- })), expect(t.getByText("Status message")).toHaveClass("statusbadge--high-contrast");
14
+ })), expect(e.getByText("Status message")).toHaveClass("statusbadge--high-contrast");
14
15
  });
15
16
  });
16
17
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBadge.test.js","names":[],"sources":["../../../src/components/StatusBadge/StatusBadge.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { StatusBadge } from './StatusBage';\n\ndescribe('StatusBadge', () => {\n it('should render with message', () => {\n render(<StatusBadge label=\"Status message\" />);\n expect(screen.getByText('Status message')).toBeInTheDocument();\n });\n\n it('should render with highContract', () => {\n render(<StatusBadge label=\"Status message\" highContrast={true} />);\n expect(screen.getByText('Status message')).toHaveClass('statusbadge--high-contrast');\n });\n});\n"],"mappings":";;;;;AAKA,SAAS,qBAAqB;CAM5B,AALA,GAAG,oCAAoC;EAErC,AADA,EAAO,kBAAC,GAAD,EAAa,OAAM,iBAAkB,CAAA,CAAC,GAC7C,OAAO,EAAO,UAAU,gBAAgB,CAAC,CAAC,CAAC,kBAAkB;CAC/D,CAAC,GAED,GAAG,yCAAyC;EAE1C,AADA,EAAO,kBAAC,GAAD;GAAa,OAAM;GAAiB,cAAc;EAAO,CAAA,CAAC,GACjE,OAAO,EAAO,UAAU,gBAAgB,CAAC,CAAC,CAAC,YAAY,4BAA4B;CACrF,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"StatusBadge.test.js","names":[],"sources":["../../../src/components/StatusBadge/StatusBadge.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { StatusBadge } from './StatusBage';\n\ndescribe('StatusBadge', () => {\n it('should render with message', () => {\n render(<StatusBadge label=\"Status message\" />);\n expect(screen.getByText('Status message')).toBeInTheDocument();\n });\n\n it('should render with highContract', () => {\n render(<StatusBadge label=\"Status message\" highContrast={true} />);\n expect(screen.getByText('Status message')).toHaveClass('statusbadge--high-contrast');\n });\n});\n"],"mappings":";;;;;;AAKA,SAAS,qBAAqB;CAM5B,AALA,GAAG,oCAAoC;EAErC,AADA,EAAO,kBAAC,GAAD,EAAa,OAAM,iBAAkB,CAAA,CAAC,GAC7C,OAAO,EAAO,UAAU,gBAAgB,CAAC,CAAC,CAAC,kBAAkB;CAC/D,CAAC,GAED,GAAG,yCAAyC;EAE1C,AADA,EAAO,kBAAC,GAAD;GAAa,OAAM;GAAiB,cAAc;EAAO,CAAA,CAAC,GACjE,OAAO,EAAO,UAAU,gBAAgB,CAAC,CAAC,CAAC,YAAY,4BAA4B;CACrF,CAAC;AACH,CAAC"}
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../test-Gtly6H2f.js";
1
+ import { r as e } from "../../test-BjtC-Q32.js";
2
2
  import { t } from "../../TextArea-D_VoyGIO.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  var r = {
@@ -1,35 +1,36 @@
1
- import "../../dist-oLwM--0y.js";
2
- import { t as e } from "../../TextArea-D_VoyGIO.js";
3
- import { i as t, n, t as r } from "../../react.esm-DwWzhs9e.js";
4
- import { t as i } from "../../esm-BXzGXYWZ.js";
1
+ import { s as e } from "../../dom.esm-S0SD0DBW.js";
2
+ import "../../dist-CuwCMU7Y.js";
3
+ import { t } from "../../TextArea-D_VoyGIO.js";
4
+ import { n, t as r } from "../../react.esm-D50lAl1F.js";
5
+ import { t as i } from "../../esm-Bfz5h0_d.js";
5
6
  import { jsx as a } from "react/jsx-runtime";
6
7
  //#region src/components/TextArea/TextArea.test.tsx
7
8
  describe("TextArea", () => {
8
9
  it("should render correctly with label", () => {
9
- n(/* @__PURE__ */ a(e, {
10
+ n(/* @__PURE__ */ a(t, {
10
11
  onChange: jest.fn(),
11
12
  label: "Test Label"
12
- })), expect(t.getByText("Test Label")).toBeInTheDocument();
13
+ })), expect(e.getByText("Test Label")).toBeInTheDocument();
13
14
  }), it("should call onChange when text is entered", () => {
14
15
  let i = jest.fn();
15
- n(/* @__PURE__ */ a(e, { onChange: i }));
16
- let o = t.getByRole("textbox");
16
+ n(/* @__PURE__ */ a(t, { onChange: i }));
17
+ let o = e.getByRole("textbox");
17
18
  r.input(o, { target: { value: "Hello" } }), expect(i).toHaveBeenCalledWith("Hello");
18
19
  }), it("should update character count", () => {
19
- n(/* @__PURE__ */ a(e, {
20
+ n(/* @__PURE__ */ a(t, {
20
21
  onChange: jest.fn(),
21
22
  label: "Test",
22
23
  maxCharacters: 10
23
24
  }));
24
- let i = t.getByRole("textbox");
25
- r.input(i, { target: { value: "Test" } }), expect(t.getByText("4")).toBeInTheDocument(), expect(t.getByText("/ 10")).toBeInTheDocument();
25
+ let i = e.getByRole("textbox");
26
+ r.input(i, { target: { value: "Test" } }), expect(e.getByText("4")).toBeInTheDocument(), expect(e.getByText("/ 10")).toBeInTheDocument();
26
27
  }), it("should not exceed max characters limit", async () => {
27
28
  let r = jest.fn();
28
- n(/* @__PURE__ */ a(e, {
29
+ n(/* @__PURE__ */ a(t, {
29
30
  onChange: r,
30
31
  maxCharacters: 5
31
32
  }));
32
- let o = t.getByRole("textbox");
33
+ let o = e.getByRole("textbox");
33
34
  await i.type(o, "ExceedsLimit"), expect(r).toHaveBeenCalled(), expect(r.mock.calls[r.mock.calls.length - 1][0].length).toBe(5);
34
35
  });
35
36
  });
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.test.js","names":[],"sources":["../../../src/components/TextArea/TextArea.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { TextArea } from './TextArea';\n\ndescribe('TextArea', () => {\n it('should render correctly with label', () => {\n render(<TextArea onChange={jest.fn()} label=\"Test Label\" />);\n expect(screen.getByText('Test Label')).toBeInTheDocument();\n });\n\n it('should call onChange when text is entered', () => {\n const handleChange = jest.fn();\n render(<TextArea onChange={handleChange} />);\n\n const textarea = screen.getByRole('textbox');\n fireEvent.input(textarea, { target: { value: 'Hello' } });\n expect(handleChange).toHaveBeenCalledWith('Hello');\n });\n\n it('should update character count', () => {\n render(<TextArea onChange={jest.fn()} label=\"Test\" maxCharacters={10} />);\n\n const textarea = screen.getByRole('textbox');\n fireEvent.input(textarea, { target: { value: 'Test' } });\n\n expect(screen.getByText('4')).toBeInTheDocument();\n expect(screen.getByText('/ 10')).toBeInTheDocument();\n });\n\n it('should not exceed max characters limit', async () => {\n const handleChange = jest.fn();\n render(<TextArea onChange={handleChange} maxCharacters={5} />);\n\n const textarea = screen.getByRole('textbox');\n\n await userEvent.type(textarea, 'ExceedsLimit');\n\n expect(handleChange).toHaveBeenCalled();\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n expect(handleChange.mock.calls[handleChange.mock.calls.length - 1][0].length).toBe(5);\n });\n});\n"],"mappings":";;;;;;AAMA,SAAS,kBAAkB;CAyBzB,AAxBA,GAAG,4CAA4C;EAE7C,AADA,EAAO,kBAAC,GAAD;GAAU,UAAU,KAAK,GAAG;GAAG,OAAM;EAAc,CAAA,CAAC,GAC3D,OAAO,EAAO,UAAU,YAAY,CAAC,CAAC,CAAC,kBAAkB;CAC3D,CAAC,GAED,GAAG,mDAAmD;EACpD,IAAM,IAAe,KAAK,GAAG;EAC7B,EAAO,kBAAC,GAAD,EAAU,UAAU,EAAe,CAAA,CAAC;EAE3C,IAAM,IAAW,EAAO,UAAU,SAAS;EAE3C,AADA,EAAU,MAAM,GAAU,EAAE,QAAQ,EAAE,OAAO,QAAQ,EAAE,CAAC,GACxD,OAAO,CAAY,CAAC,CAAC,qBAAqB,OAAO;CACnD,CAAC,GAED,GAAG,uCAAuC;EACxC,EAAO,kBAAC,GAAD;GAAU,UAAU,KAAK,GAAG;GAAG,OAAM;GAAO,eAAe;EAAK,CAAA,CAAC;EAExE,IAAM,IAAW,EAAO,UAAU,SAAS;EAI3C,AAHA,EAAU,MAAM,GAAU,EAAE,QAAQ,EAAE,OAAO,OAAO,EAAE,CAAC,GAEvD,OAAO,EAAO,UAAU,GAAG,CAAC,CAAC,CAAC,kBAAkB,GAChD,OAAO,EAAO,UAAU,MAAM,CAAC,CAAC,CAAC,kBAAkB;CACrD,CAAC,GAED,GAAG,0CAA0C,YAAY;EACvD,IAAM,IAAe,KAAK,GAAG;EAC7B,EAAO,kBAAC,GAAD;GAAU,UAAU;GAAc,eAAe;EAAI,CAAA,CAAC;EAE7D,IAAM,IAAW,EAAO,UAAU,SAAS;EAM3C,AAJA,MAAM,EAAU,KAAK,GAAU,cAAc,GAE7C,OAAO,CAAY,CAAC,CAAC,iBAAiB,GAEtC,OAAO,EAAa,KAAK,MAAM,EAAa,KAAK,MAAM,SAAS,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC;CACtF,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"TextArea.test.js","names":[],"sources":["../../../src/components/TextArea/TextArea.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\n\nimport { TextArea } from './TextArea';\n\ndescribe('TextArea', () => {\n it('should render correctly with label', () => {\n render(<TextArea onChange={jest.fn()} label=\"Test Label\" />);\n expect(screen.getByText('Test Label')).toBeInTheDocument();\n });\n\n it('should call onChange when text is entered', () => {\n const handleChange = jest.fn();\n render(<TextArea onChange={handleChange} />);\n\n const textarea = screen.getByRole('textbox');\n fireEvent.input(textarea, { target: { value: 'Hello' } });\n expect(handleChange).toHaveBeenCalledWith('Hello');\n });\n\n it('should update character count', () => {\n render(<TextArea onChange={jest.fn()} label=\"Test\" maxCharacters={10} />);\n\n const textarea = screen.getByRole('textbox');\n fireEvent.input(textarea, { target: { value: 'Test' } });\n\n expect(screen.getByText('4')).toBeInTheDocument();\n expect(screen.getByText('/ 10')).toBeInTheDocument();\n });\n\n it('should not exceed max characters limit', async () => {\n const handleChange = jest.fn();\n render(<TextArea onChange={handleChange} maxCharacters={5} />);\n\n const textarea = screen.getByRole('textbox');\n\n await userEvent.type(textarea, 'ExceedsLimit');\n\n expect(handleChange).toHaveBeenCalled();\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n expect(handleChange.mock.calls[handleChange.mock.calls.length - 1][0].length).toBe(5);\n });\n});\n"],"mappings":";;;;;;;AAMA,SAAS,kBAAkB;CAyBzB,AAxBA,GAAG,4CAA4C;EAE7C,AADA,EAAO,kBAAC,GAAD;GAAU,UAAU,KAAK,GAAG;GAAG,OAAM;EAAc,CAAA,CAAC,GAC3D,OAAO,EAAO,UAAU,YAAY,CAAC,CAAC,CAAC,kBAAkB;CAC3D,CAAC,GAED,GAAG,mDAAmD;EACpD,IAAM,IAAe,KAAK,GAAG;EAC7B,EAAO,kBAAC,GAAD,EAAU,UAAU,EAAe,CAAA,CAAC;EAE3C,IAAM,IAAW,EAAO,UAAU,SAAS;EAE3C,AADA,EAAU,MAAM,GAAU,EAAE,QAAQ,EAAE,OAAO,QAAQ,EAAE,CAAC,GACxD,OAAO,CAAY,CAAC,CAAC,qBAAqB,OAAO;CACnD,CAAC,GAED,GAAG,uCAAuC;EACxC,EAAO,kBAAC,GAAD;GAAU,UAAU,KAAK,GAAG;GAAG,OAAM;GAAO,eAAe;EAAK,CAAA,CAAC;EAExE,IAAM,IAAW,EAAO,UAAU,SAAS;EAI3C,AAHA,EAAU,MAAM,GAAU,EAAE,QAAQ,EAAE,OAAO,OAAO,EAAE,CAAC,GAEvD,OAAO,EAAO,UAAU,GAAG,CAAC,CAAC,CAAC,kBAAkB,GAChD,OAAO,EAAO,UAAU,MAAM,CAAC,CAAC,CAAC,kBAAkB;CACrD,CAAC,GAED,GAAG,0CAA0C,YAAY;EACvD,IAAM,IAAe,KAAK,GAAG;EAC7B,EAAO,kBAAC,GAAD;GAAU,UAAU;GAAc,eAAe;EAAI,CAAA,CAAC;EAE7D,IAAM,IAAW,EAAO,UAAU,SAAS;EAM3C,AAJA,MAAM,EAAU,KAAK,GAAU,cAAc,GAE7C,OAAO,CAAY,CAAC,CAAC,iBAAiB,GAEtC,OAAO,EAAa,KAAK,MAAM,EAAa,KAAK,MAAM,SAAS,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC;CACtF,CAAC;AACH,CAAC"}
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../test-Gtly6H2f.js";
1
+ import { r as e } from "../../test-BjtC-Q32.js";
2
2
  import { t } from "../../ToggleSwitch-ev4Jh4y-.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  var r = {
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../test-Gtly6H2f.js";
1
+ import { r as e } from "../../test-BjtC-Q32.js";
2
2
  import { t } from "../../VarIndicator-D0cnlcIf.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  //#region src/components/VarIndicator/VarIndicator.stories.tsx
@@ -1,7 +1,8 @@
1
- import "../../dist-oLwM--0y.js";
2
- import { t as e } from "../../VarIndicator-D0cnlcIf.js";
3
- import { a as t, i as n, n as r } from "../../react.esm-DwWzhs9e.js";
4
- import { t as i } from "../../esm-BXzGXYWZ.js";
1
+ import { c as e, s as t } from "../../dom.esm-S0SD0DBW.js";
2
+ import "../../dist-CuwCMU7Y.js";
3
+ import { t as n } from "../../VarIndicator-D0cnlcIf.js";
4
+ import { n as r } from "../../react.esm-D50lAl1F.js";
5
+ import { t as i } from "../../esm-Bfz5h0_d.js";
5
6
  import { useState as a } from "react";
6
7
  import { jsx as o } from "react/jsx-runtime";
7
8
  //#region src/components/VarIndicator/VarIndicator.test.tsx
@@ -13,13 +14,13 @@ var s = {
13
14
  };
14
15
  jest.mock("components/Icon", () => ({ Icon: ({ name: e }) => /* @__PURE__ */ o("svg", { "data-testid": e }) }));
15
16
  var c = () => {
16
- let [t, n] = a(1);
17
- return /* @__PURE__ */ o(e, {
17
+ let [e, t] = a(1);
18
+ return /* @__PURE__ */ o(n, {
18
19
  label: s,
19
20
  variant: "SUBMITTED",
20
21
  maxSteps: 3,
21
- currentStep: t,
22
- onClick: () => n(2)
22
+ currentStep: e,
23
+ onClick: () => t(2)
23
24
  });
24
25
  };
25
26
  describe("VarIndicator", () => {
@@ -27,44 +28,44 @@ describe("VarIndicator", () => {
27
28
  beforeEach(() => {
28
29
  a.mockClear();
29
30
  }), it("should render Concept (DRAFT)", () => {
30
- r(/* @__PURE__ */ o(e, {
31
+ r(/* @__PURE__ */ o(n, {
31
32
  label: s,
32
33
  variant: "DRAFT"
33
- })), expect(n.getByText("Concept")).toBeInTheDocument();
34
+ })), expect(t.getByText("Concept")).toBeInTheDocument();
34
35
  }), it("should render Concept (REJECTED)", () => {
35
- r(/* @__PURE__ */ o(e, {
36
+ r(/* @__PURE__ */ o(n, {
36
37
  label: s,
37
38
  variant: "REJECTED"
38
- })), expect(n.getByText("Concept")).toBeInTheDocument();
39
+ })), expect(t.getByText("Concept")).toBeInTheDocument();
39
40
  }), it("should render Concept (ACTIVE)", () => {
40
- r(/* @__PURE__ */ o(e, {
41
+ r(/* @__PURE__ */ o(n, {
41
42
  label: s,
42
43
  variant: "ACTIVE"
43
- })), expect(n.getByText("Actief")).toBeInTheDocument();
44
+ })), expect(t.getByText("Actief")).toBeInTheDocument();
44
45
  }), it("should render dots (SUBMITTED)", () => {
45
- r(/* @__PURE__ */ o(e, {
46
+ r(/* @__PURE__ */ o(n, {
46
47
  label: s,
47
48
  variant: "SUBMITTED",
48
49
  maxSteps: 3,
49
50
  currentStep: 0
50
- })), expect(n.getByText("Verificatie")).toBeInTheDocument(), expect(n.getAllByTestId("CircleSmall")).toHaveLength(3), expect(n.queryByTestId("CircleSmallFilled")).not.toBeInTheDocument();
51
+ })), expect(t.getByText("Verificatie")).toBeInTheDocument(), expect(t.getAllByTestId("CircleSmall")).toHaveLength(3), expect(t.queryByTestId("CircleSmallFilled")).not.toBeInTheDocument();
51
52
  }), it("should render filled dots when currentStep != 0 (SUBMITTED)", () => {
52
- r(/* @__PURE__ */ o(e, {
53
+ r(/* @__PURE__ */ o(n, {
53
54
  label: s,
54
55
  variant: "SUBMITTED",
55
56
  maxSteps: 3,
56
57
  currentStep: 1,
57
58
  onClick: a
58
59
  }));
59
- let t = n.getByText("Verificatie");
60
- expect(t).toBeInTheDocument(), expect(n.getAllByTestId("CircleSmallFilled")).toHaveLength(1), expect(n.getAllByTestId("CircleSmall")).toHaveLength(2);
60
+ let e = t.getByText("Verificatie");
61
+ expect(e).toBeInTheDocument(), expect(t.getAllByTestId("CircleSmallFilled")).toHaveLength(1), expect(t.getAllByTestId("CircleSmall")).toHaveLength(2);
61
62
  }), it("should render filled dots currentStep is updated (SUBMITTED)", async () => {
62
- r(/* @__PURE__ */ o(c, {})), expect(n.getAllByTestId("CircleSmallFilled")).toHaveLength(1), expect(n.getAllByTestId("CircleSmall")).toHaveLength(2);
63
- let e = n.getByText("Verificatie");
64
- await i.click(e), await t(() => {
65
- expect(n.getAllByTestId("CircleSmallFilled")).toHaveLength(2);
66
- }), await t(() => {
67
- expect(n.getAllByTestId("CircleSmall")).toHaveLength(1);
63
+ r(/* @__PURE__ */ o(c, {})), expect(t.getAllByTestId("CircleSmallFilled")).toHaveLength(1), expect(t.getAllByTestId("CircleSmall")).toHaveLength(2);
64
+ let n = t.getByText("Verificatie");
65
+ await i.click(n), await e(() => {
66
+ expect(t.getAllByTestId("CircleSmallFilled")).toHaveLength(2);
67
+ }), await e(() => {
68
+ expect(t.getAllByTestId("CircleSmall")).toHaveLength(1);
68
69
  });
69
70
  });
70
71
  });