quirk-ui 0.0.6 → 0.0.7

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 (241) hide show
  1. package/dist/arrow-right-CnuUc2oD.js +25 -0
  2. package/dist/assets/index.css +1 -1
  3. package/dist/assets/index.css.d.ts +1 -7
  4. package/dist/assets/index10.css +1 -1
  5. package/dist/assets/index10.css.d.ts +5 -2
  6. package/dist/assets/index11.css +1 -1
  7. package/dist/assets/index11.css.d.ts +3 -3
  8. package/dist/assets/index13.css +1 -1
  9. package/dist/assets/index13.css.d.ts +4 -4
  10. package/dist/assets/index16.css +1 -1
  11. package/dist/assets/index16.css.d.ts +1 -4
  12. package/dist/assets/index2.css +1 -1
  13. package/dist/assets/index2.css.d.ts +7 -5
  14. package/dist/assets/index20.css +1 -1
  15. package/dist/assets/index20.css.d.ts +2 -1
  16. package/dist/assets/index21.css +1 -1
  17. package/dist/assets/index21.css.d.ts +15 -4
  18. package/dist/assets/index22.css +1 -1
  19. package/dist/assets/index22.css.d.ts +10 -2
  20. package/dist/assets/index23.css +1 -1
  21. package/dist/assets/index23.css.d.ts +9 -3
  22. package/dist/assets/index24.css +1 -1
  23. package/dist/assets/index24.css.d.ts +6 -3
  24. package/dist/assets/index25.css +1 -1
  25. package/dist/assets/index25.css.d.ts +9 -5
  26. package/dist/assets/index26.css +1 -1
  27. package/dist/assets/index26.css.d.ts +8 -17
  28. package/dist/assets/index27.css +1 -1
  29. package/dist/assets/index27.css.d.ts +10 -5
  30. package/dist/assets/index28.css +1 -1
  31. package/dist/assets/index28.css.d.ts +1 -8
  32. package/dist/assets/index29.css +1 -0
  33. package/dist/assets/index29.css.d.ts +12 -0
  34. package/dist/assets/index3.css +1 -1
  35. package/dist/assets/index3.css.d.ts +3 -4
  36. package/dist/assets/index30.css +1 -0
  37. package/dist/assets/index30.css.d.ts +15 -0
  38. package/dist/assets/index31.css +1 -0
  39. package/dist/assets/index31.css.d.ts +12 -0
  40. package/dist/assets/index32.css +1 -0
  41. package/dist/assets/index32.css.d.ts +14 -0
  42. package/dist/assets/index33.css +1 -0
  43. package/dist/assets/index33.css.d.ts +5 -0
  44. package/dist/assets/index34.css +1 -0
  45. package/dist/assets/index34.css.d.ts +8 -0
  46. package/dist/assets/index35.css +1 -0
  47. package/dist/assets/index35.css.d.ts +6 -0
  48. package/dist/assets/index36.css +1 -0
  49. package/dist/assets/index36.css.d.ts +7 -0
  50. package/dist/assets/index37.css +1 -0
  51. package/dist/assets/index37.css.d.ts +7 -0
  52. package/dist/assets/index38.css +1 -0
  53. package/dist/assets/index38.css.d.ts +6 -0
  54. package/dist/assets/index39.css +1 -0
  55. package/dist/assets/index39.css.d.ts +6 -0
  56. package/dist/assets/index4.css +1 -1
  57. package/dist/assets/index4.css.d.ts +5 -4
  58. package/dist/assets/index40.css +1 -0
  59. package/dist/assets/index40.css.d.ts +7 -0
  60. package/dist/assets/index41.css +1 -0
  61. package/dist/assets/index41.css.d.ts +10 -0
  62. package/dist/assets/index42.css +1 -0
  63. package/dist/assets/index42.css.d.ts +9 -0
  64. package/dist/assets/index43.css +1 -0
  65. package/dist/assets/index43.css.d.ts +20 -0
  66. package/dist/assets/index44.css +1 -0
  67. package/dist/assets/index44.css.d.ts +21 -0
  68. package/dist/assets/index45.css +1 -0
  69. package/dist/assets/index45.css.d.ts +9 -0
  70. package/dist/assets/index46.css +1 -0
  71. package/dist/assets/index46.css.d.ts +12 -0
  72. package/dist/assets/index5.css +1 -1
  73. package/dist/assets/index5.css.d.ts +4 -17
  74. package/dist/assets/index6.css +1 -1
  75. package/dist/assets/index6.css.d.ts +4 -7
  76. package/dist/assets/index7.css +1 -1
  77. package/dist/assets/index7.css.d.ts +17 -2
  78. package/dist/assets/index8.css +1 -1
  79. package/dist/assets/index8.css.d.ts +10 -6
  80. package/dist/assets/index9.css +1 -1
  81. package/dist/assets/index9.css.d.ts +7 -3
  82. package/dist/chevron-down-DSUzBz9F.js +11 -0
  83. package/dist/components/Accordion/Accordion.test.js +45 -0
  84. package/dist/components/Accordion/index.js +49 -0
  85. package/dist/components/Alert/Alert.test.js +52 -0
  86. package/dist/components/Alert/__mocks__/styles.module.css.js +11 -0
  87. package/dist/components/Alert/index.js +57 -0
  88. package/dist/components/Avatar/Avatar.test.js +51 -0
  89. package/dist/components/Avatar/index.js +51 -0
  90. package/dist/components/Badge/Badge.test.js +62 -0
  91. package/dist/components/Badge/__mocks__/styles.module.css.js +10 -0
  92. package/dist/components/Badge/index.js +41 -0
  93. package/dist/components/Box/Box.test.js +2 -1
  94. package/dist/components/Button/Button.test.js +2 -1
  95. package/dist/components/Button/index.js +14 -14
  96. package/dist/components/ButtonGroup/ButtonGroup.test.js +2 -1
  97. package/dist/components/ButtonGroup/index.js +11 -11
  98. package/dist/components/Calendar/Calendar.test.js +5 -4
  99. package/dist/components/Calendar/index.js +4 -2
  100. package/dist/components/Card/Card.test.js +49 -0
  101. package/dist/components/Card/__mocks__/styles.module.css.js +11 -0
  102. package/dist/components/Card/index.js +77 -0
  103. package/dist/components/Carousel/Carousel.test.js +41 -0
  104. package/dist/components/Carousel/index.js +96 -0
  105. package/dist/components/Checkbox/Checkbox.test.js +2 -1
  106. package/dist/components/Checkbox/index.js +10 -9
  107. package/dist/components/Container/Container.test.js +2 -1
  108. package/dist/components/DatePicker/DatePicker.test.js +3 -2
  109. package/dist/components/DatePicker/index.js +16 -15
  110. package/dist/components/Divider/Divider.test.js +10 -9
  111. package/dist/components/Drawer/Drawer.test.js +35 -0
  112. package/dist/components/Drawer/__mocks__/styles.module.css.js +9 -0
  113. package/dist/components/Drawer/index.js +55 -0
  114. package/dist/components/Fieldset/Fieldset.test.js +3 -2
  115. package/dist/components/Fieldset/index.js +1 -1
  116. package/dist/components/FileUpload/FileUpload.test.js +2 -1
  117. package/dist/components/FileUpload/index.js +4 -3
  118. package/dist/components/FloatingActionButton/FloatingActionButton.test.js +11 -20
  119. package/dist/components/Form/Form.test.js +2 -1
  120. package/dist/components/Form/index.js +1 -1
  121. package/dist/components/Grid/Grid.test.js +14 -13
  122. package/dist/components/Grid/index.js +53 -17
  123. package/dist/components/Heading/Heading.test.js +2 -1
  124. package/dist/components/IconButton/IconButton.test.js +10 -9
  125. package/dist/components/Input/Input.test.js +5 -4
  126. package/dist/components/Input/index.js +13 -12
  127. package/dist/components/Label/Label.test.js +2 -1
  128. package/dist/components/Label/index.js +25 -26
  129. package/dist/components/Link/Link.test.js +3 -2
  130. package/dist/components/Link/index.js +1 -1
  131. package/dist/components/List/List.test.js +78 -0
  132. package/dist/components/List/index.js +24 -0
  133. package/dist/components/Modal/Modal.test.js +94 -0
  134. package/dist/components/Modal/index.js +37 -0
  135. package/dist/components/MultiSelect/MultiSelect.test.js +2 -1
  136. package/dist/components/MultiSelect/index.js +4 -3
  137. package/dist/components/NavBar/NavBar.test.js +54 -0
  138. package/dist/components/NavBar/index.js +139 -0
  139. package/dist/components/Notification/Notification.test.js +64 -0
  140. package/dist/components/Notification/__mocks__/styles.module.css.js +9 -0
  141. package/dist/components/Notification/index.js +61 -0
  142. package/dist/components/NotificationContainer/NotificationContainer.test.js +28 -0
  143. package/dist/components/NotificationContainer/index.js +15 -0
  144. package/dist/components/ProgressBar/ProgressBar.test.js +24 -0
  145. package/dist/components/ProgressBar/__mocks__/styles.module.css.js +9 -0
  146. package/dist/components/ProgressBar/index.js +50 -0
  147. package/dist/components/Radio/Radio.test.js +8 -7
  148. package/dist/components/Radio/index.js +10 -10
  149. package/dist/components/Range/Range.test.js +5 -4
  150. package/dist/components/Range/index.js +13 -12
  151. package/dist/components/Select/Select.test.js +6 -5
  152. package/dist/components/Select/index.js +8 -7
  153. package/dist/components/Skeleton/Skeleton.test.js +26 -0
  154. package/dist/components/Skeleton/__mocks__/styles.module.css.js +8 -0
  155. package/dist/components/Skeleton/index.js +34 -0
  156. package/dist/components/Spacer/Spacer.test.js +2 -1
  157. package/dist/components/Spacer/index.js +1 -1
  158. package/dist/components/Spinner/Spinner.test.js +18 -0
  159. package/dist/components/Spinner/__mocks__/styles.module.css.js +12 -0
  160. package/dist/components/Spinner/index.js +39 -0
  161. package/dist/components/Stack/Stack.test.js +2 -1
  162. package/dist/components/Stack/index.js +1 -1
  163. package/dist/components/Switch/Switch.test.js +4 -3
  164. package/dist/components/Switch/index.js +9 -8
  165. package/dist/components/Table/Table.test.js +2 -1
  166. package/dist/components/Table/index.js +1 -1
  167. package/dist/components/Tabs/Context.js +11 -0
  168. package/dist/components/Tabs/Tabs.test.js +49 -0
  169. package/dist/components/Tabs/__mocks__/styles.module.css.js +8 -0
  170. package/dist/components/Tabs/index.js +89 -0
  171. package/dist/components/Text/Text.test.js +2 -1
  172. package/dist/components/Text/index.js +1 -1
  173. package/dist/components/Textarea/Textarea.test.js +2 -1
  174. package/dist/components/Textarea/index.js +13 -12
  175. package/dist/components/Tooltip/Tooltip.test.js +43 -0
  176. package/dist/components/Tooltip/index.js +45 -0
  177. package/dist/{index-BtY6pil2.js → index-BXkubhGb.js} +1 -1
  178. package/dist/index-Bgo8MuTU.js +4279 -0
  179. package/dist/{index-DhqFdMqD.js → index-RF23qrF-.js} +172 -190
  180. package/dist/lib/components/Accordion/Accordion.test.d.ts +0 -0
  181. package/dist/lib/components/Accordion/index.d.ts +13 -0
  182. package/dist/lib/components/Alert/Alert.test.d.ts +0 -0
  183. package/dist/lib/components/Alert/__mocks__/styles.module.css.d.ts +9 -0
  184. package/dist/lib/components/Alert/index.d.ts +15 -0
  185. package/dist/lib/components/Avatar/Avatar.test.d.ts +0 -0
  186. package/dist/lib/components/Avatar/index.d.ts +25 -0
  187. package/dist/lib/components/Badge/Badge.test.d.ts +0 -0
  188. package/dist/lib/components/Badge/__mocks__/styles.module.css.d.ts +8 -0
  189. package/dist/lib/components/Badge/index.d.ts +18 -0
  190. package/dist/lib/components/Card/Card.test.d.ts +0 -0
  191. package/dist/lib/components/Card/__mocks__/styles.module.css.d.ts +9 -0
  192. package/dist/lib/components/Card/index.d.ts +22 -0
  193. package/dist/lib/components/Carousel/Carousel.test.d.ts +0 -0
  194. package/dist/lib/components/Carousel/index.d.ts +9 -0
  195. package/dist/lib/components/Drawer/Drawer.test.d.ts +0 -0
  196. package/dist/lib/components/Drawer/__mocks__/styles.module.css.d.ts +7 -0
  197. package/dist/lib/components/Drawer/index.d.ts +19 -0
  198. package/dist/lib/components/Grid/index.d.ts +9 -1
  199. package/dist/lib/components/Heading/index.d.ts +0 -2
  200. package/dist/lib/components/List/List.test.d.ts +1 -0
  201. package/dist/lib/components/List/index.d.ts +15 -0
  202. package/dist/lib/components/Modal/Modal.test.d.ts +1 -0
  203. package/dist/lib/components/Modal/index.d.ts +10 -0
  204. package/dist/lib/components/NavBar/NavBar.test.d.ts +1 -0
  205. package/dist/lib/components/NavBar/index.d.ts +16 -0
  206. package/dist/lib/components/Notification/Notification.test.d.ts +1 -0
  207. package/dist/lib/components/Notification/__mocks__/styles.module.css.d.ts +7 -0
  208. package/dist/lib/components/Notification/index.d.ts +17 -0
  209. package/dist/lib/components/NotificationContainer/NotificationContainer.test.d.ts +1 -0
  210. package/dist/lib/components/NotificationContainer/index.d.ts +6 -0
  211. package/dist/lib/components/ProgressBar/ProgressBar.test.d.ts +1 -0
  212. package/dist/lib/components/ProgressBar/__mocks__/styles.module.css.d.ts +7 -0
  213. package/dist/lib/components/ProgressBar/index.d.ts +15 -0
  214. package/dist/lib/components/Skeleton/Skeleton.test.d.ts +1 -0
  215. package/dist/lib/components/Skeleton/__mocks__/styles.module.css.d.ts +6 -0
  216. package/dist/lib/components/Skeleton/index.d.ts +15 -0
  217. package/dist/lib/components/Spinner/Spinner.test.d.ts +1 -0
  218. package/dist/lib/components/Spinner/__mocks__/styles.module.css.d.ts +10 -0
  219. package/dist/lib/components/Spinner/index.d.ts +20 -0
  220. package/dist/lib/components/Tabs/Context.d.ts +10 -0
  221. package/dist/lib/components/Tabs/Tabs.test.d.ts +0 -0
  222. package/dist/lib/components/Tabs/__mocks__/styles.module.css.d.ts +6 -0
  223. package/dist/lib/components/Tabs/index.d.ts +27 -0
  224. package/dist/lib/components/Tooltip/Tooltip.test.d.ts +0 -0
  225. package/dist/lib/components/Tooltip/index.d.ts +16 -0
  226. package/dist/lib/main.d.ts +19 -0
  227. package/dist/lib/utils/NotificationManager/NotificationManager.test.d.ts +1 -0
  228. package/dist/lib/utils/NotificationManager/index.d.ts +10 -0
  229. package/dist/lib/utils/ThemeProvider/index.d.ts +7 -0
  230. package/dist/main.js +78 -44
  231. package/dist/plus-Cs7TaIK9.js +14 -0
  232. package/dist/utils/NotificationManager/NotificationManager.test.js +34 -0
  233. package/dist/utils/NotificationManager/index.js +70 -0
  234. package/dist/utils/RenderAsRichtext.tsx/index.js +5 -0
  235. package/dist/utils/ThemeProvider/index.js +13 -0
  236. package/dist/vi.B-PuvDzu-a048kFcX.js +41965 -0
  237. package/dist/x-CnsEH4Ox.js +14 -0
  238. package/package.json +3 -2
  239. package/dist/index-BWTAh3RO.js +0 -57529
  240. /package/dist/lib/utils/{renderRichText.d.ts → RenderAsRichtext.tsx/index.d.ts} +0 -0
  241. /package/dist/utils/{renderRichText.js → RenderAsRichtext.js} +0 -0
@@ -1,15 +1,16 @@
1
- import { jsxs as h, jsx as t } from "react/jsx-runtime";
2
- import { useState as n } from "react";
1
+ import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
+ import { useState as i } from "react";
3
+ import "../Tabs/index.js";
3
4
  import { Label as w } from "../Label/index.js";
4
- import { f as x, C as D } from "../../index-DhqFdMqD.js";
5
- import '../../assets/index24.css';const S = "_wrapper_13tha_1", N = "_input_13tha_7", O = "_popover_13tha_25", s = {
5
+ import { f as x, C as D } from "../../index-RF23qrF-.js";
6
+ import '../../assets/index40.css';const S = "_wrapper_13tha_1", N = "_input_13tha_7", O = "_popover_13tha_25", s = {
6
7
  wrapper: S,
7
8
  input: N,
8
9
  popover: O
9
10
  };
10
- function F({
11
+ function I({
11
12
  id: o,
12
- name: i,
13
+ name: n,
13
14
  label: m,
14
15
  onValueChange: r,
15
16
  required: a = !1,
@@ -19,18 +20,18 @@ function F({
19
20
  className: d,
20
21
  ...v
21
22
  }) {
22
- const [p, y] = n(null), [u, l] = n(!1);
23
+ const [p, y] = i(null), [u, l] = i(!1);
23
24
  return /* @__PURE__ */ h("div", { className: `${s.wrapper} ${d ?? ""}`, children: [
24
- /* @__PURE__ */ t(w, { htmlFor: o, required: a, disabled: c, children: m }),
25
- /* @__PURE__ */ t(
25
+ /* @__PURE__ */ e(w, { htmlFor: o, required: a, disabled: c, children: m }),
26
+ /* @__PURE__ */ e(
26
27
  "input",
27
28
  {
28
29
  id: o,
29
- name: i,
30
+ name: n,
30
31
  type: "text",
31
32
  readOnly: !0,
32
33
  value: p ? x(p, "yyyy-MM-dd") : "",
33
- onClick: () => l((e) => !e),
34
+ onClick: () => l((t) => !t),
34
35
  placeholder: "Select date",
35
36
  required: a,
36
37
  disabled: c,
@@ -40,17 +41,17 @@ function F({
40
41
  ...v
41
42
  }
42
43
  ),
43
- u && /* @__PURE__ */ t("div", { className: s.popover, children: /* @__PURE__ */ t(
44
+ u && /* @__PURE__ */ e("div", { className: s.popover, children: /* @__PURE__ */ e(
44
45
  D,
45
46
  {
46
47
  selectedDate: p,
47
- onSelectDate: (e) => {
48
- r == null || r(e), y(e), l(!1);
48
+ onSelectDate: (t) => {
49
+ r == null || r(t), y(t), l(!1);
49
50
  }
50
51
  }
51
52
  ) })
52
53
  ] });
53
54
  }
54
55
  export {
55
- F as DatePicker
56
+ I as DatePicker
56
57
  };
@@ -1,18 +1,19 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { d as c, i as e, r as i, g as a } from "../../index-BWTAh3RO.js";
3
- import { Divider as t } from "./index.js";
4
- c("Spacer", () => {
2
+ import { d as o, i as e, r as i, g as t } from "../../vi.B-PuvDzu-a048kFcX.js";
3
+ import { Divider as a } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
5
+ o("Spacer", () => {
5
6
  e("renders with default props", () => {
6
- const { container: s } = i(/* @__PURE__ */ r(t, {}));
7
- a(s.firstChild).toHaveClass("horizontal", "divider");
7
+ const { container: s } = i(/* @__PURE__ */ r(a, {}));
8
+ t(s.firstChild).toHaveClass("horizontal", "divider");
8
9
  }), e("renders the correct classes", () => {
9
- const { container: s } = i(/* @__PURE__ */ r(t, { axis: "vertical" }));
10
- a(s.firstChild).toHaveClass("vertical", "divider");
10
+ const { container: s } = i(/* @__PURE__ */ r(a, { axis: "vertical" }));
11
+ t(s.firstChild).toHaveClass("vertical", "divider");
11
12
  }), e("renders custom classes", () => {
12
13
  const { container: s } = i(
13
- /* @__PURE__ */ r(t, { className: "custom-class", axis: "vertical" })
14
+ /* @__PURE__ */ r(a, { className: "custom-class", axis: "vertical" })
14
15
  );
15
- a(s.firstChild).toHaveClass(
16
+ t(s.firstChild).toHaveClass(
16
17
  "custom-class",
17
18
  "vertical",
18
19
  "divider"
@@ -0,0 +1,35 @@
1
+ import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
+ import { d as h, i as r, r as s, v as t, g as l, s as c, f as a } from "../../vi.B-PuvDzu-a048kFcX.js";
3
+ import { Drawer as i } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
5
+ h("Drawer", () => {
6
+ const n = /* @__PURE__ */ e("nav", { children: /* @__PURE__ */ f("ul", { children: [
7
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("a", { href: "/profile", children: "Profile" }) }),
8
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("a", { href: "/settings", children: "Settings" }) })
9
+ ] }) });
10
+ r("renders drawer content when open", () => {
11
+ s(
12
+ /* @__PURE__ */ e(i, { isOpen: !0, onClose: t.fn(), position: "left", overlay: !0, children: n })
13
+ ), l(c.getByRole("dialog")).toHaveClass("open");
14
+ }), r("does not render drawer content when open", () => {
15
+ s(
16
+ /* @__PURE__ */ e(i, { isOpen: !1, onClose: t.fn(), position: "left", overlay: !0, children: n })
17
+ ), l(c.getByRole("dialog")).not.toHaveClass("open");
18
+ }), r("calls onClose when clicking outside the drawer", () => {
19
+ const o = t.fn();
20
+ s(
21
+ /* @__PURE__ */ e(i, { isOpen: !0, onClose: o, position: "left", overlay: !0, children: n })
22
+ ), a.mouseDown(document.body), l(o).toHaveBeenCalled();
23
+ }), r("does not call onClose when clicking inside the drawer", () => {
24
+ const o = t.fn(), { container: p } = s(
25
+ /* @__PURE__ */ e(i, { isOpen: !1, onClose: o, position: "left", overlay: !0, children: n })
26
+ ), d = p.querySelector(".drawer");
27
+ if (!d) throw new Error("Drawer not found");
28
+ a.mouseDown(d), l(o).not.toHaveBeenCalled();
29
+ }), r("calls onClose when Escape key is pressed", () => {
30
+ const o = t.fn();
31
+ s(
32
+ /* @__PURE__ */ e(i, { isOpen: !0, onClose: o, position: "left", overlay: !0, children: n })
33
+ ), a.keyDown(document, { key: "Escape", code: "Escape" }), l(o).toHaveBeenCalled();
34
+ });
35
+ });
@@ -0,0 +1,9 @@
1
+ const t = {
2
+ left: "left",
3
+ right: "right",
4
+ top: "top",
5
+ bottom: "bottom"
6
+ };
7
+ export {
8
+ t as default
9
+ };
@@ -0,0 +1,55 @@
1
+ import { jsxs as f, Fragment as y, jsx as s } from "react/jsx-runtime";
2
+ import { useRef as w, useEffect as d } from "react";
3
+ import '../../assets/index31.css';const l = "_drawer_55xty_1", h = "_right_55xty_12", p = "_left_55xty_18", x = "_top_55xty_24", v = "_bottom_55xty_32", g = "_open_55xty_40", b = "_overlay_55xty_50", E = "_show_55xty_60", e = {
4
+ drawer: l,
5
+ right: h,
6
+ left: p,
7
+ top: x,
8
+ bottom: v,
9
+ open: g,
10
+ overlay: b,
11
+ show: E
12
+ }, $ = {
13
+ left: e.left,
14
+ right: e.right,
15
+ top: e.top,
16
+ bottom: e.bottom
17
+ };
18
+ function j({
19
+ isOpen: o,
20
+ onClose: t,
21
+ position: _ = "left",
22
+ overlay: c = !0,
23
+ ariaLabel: i = "Sidebar",
24
+ children: m,
25
+ className: u
26
+ }) {
27
+ const n = w(null);
28
+ return d(() => {
29
+ const r = (a) => {
30
+ a.key === "Escape" && (t == null || t());
31
+ };
32
+ return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
33
+ }, [t]), d(() => {
34
+ const r = (a) => {
35
+ o && n.current && !n.current.contains(a.target) && (t == null || t());
36
+ };
37
+ return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
38
+ }, [o, t, c]), /* @__PURE__ */ f(y, { children: [
39
+ c && /* @__PURE__ */ s("div", { className: `${e.overlay} ${o ? e.show : ""}` }),
40
+ /* @__PURE__ */ s(
41
+ "aside",
42
+ {
43
+ ref: n,
44
+ className: `${e.drawer} ${$[_]} ${o ? e.open : ""} ${u ?? ""}`,
45
+ role: "dialog",
46
+ "aria-label": i,
47
+ "aria-modal": "true",
48
+ children: m
49
+ }
50
+ )
51
+ ] });
52
+ }
53
+ export {
54
+ j as Drawer
55
+ };
@@ -1,7 +1,8 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { d as l, i as t, r, g as n, s as d } from "../../index-BWTAh3RO.js";
2
+ import { d as o, i as t, r, g as n, s as d } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { Fieldset as i } from "./index.js";
4
- l("Fieldset", () => {
4
+ import "../../index-Bgo8MuTU.js";
5
+ o("Fieldset", () => {
5
6
  t("renders children", () => {
6
7
  r(
7
8
  /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("input", { type: "text", placeholder: "Text input" }) })
@@ -1,5 +1,5 @@
1
1
  import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
- import '../../assets/index22.css';const c = "_fieldset_1i2zv_1", f = "_legend_1i2zv_8", s = {
2
+ import '../../assets/index35.css';const c = "_fieldset_1i2zv_1", f = "_legend_1i2zv_8", s = {
3
3
  fieldset: c,
4
4
  legend: f
5
5
  };
@@ -1,6 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { d as c, i as t, r as l, g as s, s as n, v as a, f as d } from "../../index-BWTAh3RO.js";
2
+ import { d as c, i as t, r as l, g as s, s as n, v as a, f as d } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { FileUpload as r } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  c("FileUpload", () => {
5
6
  t("renders the label correctly", () => {
6
7
  l(/* @__PURE__ */ o(r, { label: "Upload your resume", onFilesChange: () => {
@@ -1,16 +1,17 @@
1
1
  import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
2
  import { useRef as x, useState as h } from "react";
3
3
  import { IconButton as N } from "../IconButton/index.js";
4
+ import "../Tabs/index.js";
4
5
  import { Label as Z } from "../Label/index.js";
5
6
  import { T as z } from "../../trash-2-2Rn0a4s6.js";
6
- import '../../assets/index25.css';const I = "_wrapper_s8dew_1", R = "_dropZone_s8dew_7", T = "_dragging_s8dew_25", j = "_input_s8dew_30", A = "_fileList_s8dew_34", i = {
7
+ import '../../assets/index42.css';const I = "_wrapper_s8dew_1", R = "_dropZone_s8dew_7", T = "_dragging_s8dew_25", j = "_input_s8dew_30", A = "_fileList_s8dew_34", i = {
7
8
  wrapper: I,
8
9
  dropZone: R,
9
10
  dragging: T,
10
11
  input: j,
11
12
  fileList: A
12
13
  };
13
- function b({
14
+ function E({
14
15
  id: D,
15
16
  name: w,
16
17
  label: p = "Upload files",
@@ -95,5 +96,5 @@ function b({
95
96
  ] });
96
97
  }
97
98
  export {
98
- b as FileUpload
99
+ E as FileUpload
99
100
  };
@@ -1,36 +1,27 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { d as r, i as o, r as c, g as i, s, v as d, f as m } from "../../index-BWTAh3RO.js";
3
- import { FloatingActionButton as l } from "./index.js";
4
- import { c as h } from "../../createLucideIcon-C8GTh_Qx.js";
5
- /**
6
- * @license lucide-react v0.488.0 - ISC
7
- *
8
- * This source code is licensed under the ISC license.
9
- * See the LICENSE file in the root directory of this source tree.
10
- */
11
- const p = [
12
- ["path", { d: "M5 12h14", key: "1ays0h" }],
13
- ["path", { d: "M12 5v14", key: "s699le" }]
14
- ], n = h("plus", p);
2
+ import { d as r, i as o, r as i, g as l, s, v as d, f as m } from "../../vi.B-PuvDzu-a048kFcX.js";
3
+ import { FloatingActionButton as c } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
5
+ import { P as n } from "../../plus-Cs7TaIK9.js";
15
6
  r("FloatingActionButton", () => {
16
7
  o("renders the icon", () => {
17
- c(/* @__PURE__ */ e(l, { icon: /* @__PURE__ */ e(n, {}), "aria-label": "Add" })), i(s.getByLabelText("Add")).toBeInTheDocument();
8
+ i(/* @__PURE__ */ e(c, { icon: /* @__PURE__ */ e(n, {}), "aria-label": "Add" })), l(s.getByLabelText("Add")).toBeInTheDocument();
18
9
  }), o("calls onClick when clicked", () => {
19
10
  const t = d.fn();
20
- c(
11
+ i(
21
12
  /* @__PURE__ */ e(
22
- l,
13
+ c,
23
14
  {
24
15
  onClick: t,
25
16
  icon: /* @__PURE__ */ e(n, {}),
26
17
  "aria-label": "Add"
27
18
  }
28
19
  )
29
- ), m.click(s.getByLabelText("Add")), i(t).toHaveBeenCalledTimes(1);
20
+ ), m.click(s.getByLabelText("Add")), l(t).toHaveBeenCalledTimes(1);
30
21
  }), o("applies the correct size class", () => {
31
- const { container: t } = c(
32
- /* @__PURE__ */ e(l, { icon: /* @__PURE__ */ e(n, {}), "aria-label": "Add", size: "lg" })
22
+ const { container: t } = i(
23
+ /* @__PURE__ */ e(c, { icon: /* @__PURE__ */ e(n, {}), "aria-label": "Add", size: "lg" })
33
24
  ), a = t.querySelector("button");
34
- i(a == null ? void 0 : a.className).toMatch(/lg/);
25
+ l(a == null ? void 0 : a.className).toMatch(/lg/);
35
26
  });
36
27
  });
@@ -1,6 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { d as i, i as o, r, g as s, s as a } from "../../index-BWTAh3RO.js";
2
+ import { d as i, i as o, r, g as s, s as a } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { Form as m } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  i("Form", () => {
5
6
  o("renders children", () => {
6
7
  r(
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import '../../assets/index20.css';const c = "_form_s0yvj_1", a = {
2
+ import '../../assets/index33.css';const c = "_form_s0yvj_1", a = {
3
3
  form: c
4
4
  };
5
5
  function p({
@@ -1,17 +1,18 @@
1
1
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import { d as o, i as d, r as s, g as i, s as m } from "../../index-BWTAh3RO.js";
3
- import { Grid as l } from "./index.js";
2
+ import { d as o, i as d, r as m, g as i, s as l } from "../../vi.B-PuvDzu-a048kFcX.js";
3
+ import { Grid as s } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  o("Grid", () => {
5
6
  d("renders children", () => {
6
- s(
7
- /* @__PURE__ */ n(l, { columns: 2, children: [
7
+ m(
8
+ /* @__PURE__ */ n(s, { columns: 2, children: [
8
9
  /* @__PURE__ */ e("div", { children: "Item 1" }),
9
10
  /* @__PURE__ */ e("div", { children: "Item 2" })
10
11
  ] })
11
- ), i(m.getByText("Item 1")).toBeInTheDocument(), i(m.getByText("Item 2")).toBeInTheDocument();
12
+ ), i(l.getByText("Item 1")).toBeInTheDocument(), i(l.getByText("Item 2")).toBeInTheDocument();
12
13
  }), d("applies correct number of columns", () => {
13
- const { container: t } = s(
14
- /* @__PURE__ */ n(l, { columns: 3, children: [
14
+ const { container: t } = m(
15
+ /* @__PURE__ */ n(s, { columns: 3, children: [
15
16
  /* @__PURE__ */ e("div", { children: "Item 1" }),
16
17
  /* @__PURE__ */ e("div", { children: "Item 2" }),
17
18
  /* @__PURE__ */ e("div", { children: "Item 3" })
@@ -19,8 +20,8 @@ o("Grid", () => {
19
20
  ), r = t.firstChild;
20
21
  i(r.style.gridTemplateColumns).toBe("repeat(3, 1fr)");
21
22
  }), d("uses auto-fit minmax", () => {
22
- const { container: t } = s(
23
- /* @__PURE__ */ n(l, { columns: 3, autoFitMinMax: "250px", gap: "2rem", children: [
23
+ const { container: t } = m(
24
+ /* @__PURE__ */ n(s, { columns: 3, autoFitMinMax: "250px", gap: "2rem", children: [
24
25
  /* @__PURE__ */ e("div", { children: "Item 1" }),
25
26
  /* @__PURE__ */ e("div", { children: "Item 2" }),
26
27
  /* @__PURE__ */ e("div", { children: "Item 3" })
@@ -34,8 +35,8 @@ o("Grid", () => {
34
35
  ["header", "header"],
35
36
  ["sidebar", "main"],
36
37
  ["footer, footer"]
37
- ], { container: r } = s(
38
- /* @__PURE__ */ n(l, { columns: 3, areas: t, gap: "2rem", children: [
38
+ ], { container: r } = m(
39
+ /* @__PURE__ */ n(s, { columns: 3, areas: t, gap: "2rem", children: [
39
40
  /* @__PURE__ */ e("div", { children: "Item 1" }),
40
41
  /* @__PURE__ */ e("div", { children: "Item 2" }),
41
42
  /* @__PURE__ */ e("div", { children: "Item 3" })
@@ -47,8 +48,8 @@ o("Grid", () => {
47
48
  r.firstChild.style.gridTemplateAreas
48
49
  ).toContain("main");
49
50
  }), d("applies custom gap", () => {
50
- const { container: t } = s(
51
- /* @__PURE__ */ n(l, { columns: 3, gap: "2rem", children: [
51
+ const { container: t } = m(
52
+ /* @__PURE__ */ n(s, { columns: 3, gap: "2rem", children: [
52
53
  /* @__PURE__ */ e("div", { children: "Item 1" }),
53
54
  /* @__PURE__ */ e("div", { children: "Item 2" }),
54
55
  /* @__PURE__ */ e("div", { children: "Item 3" })
@@ -1,32 +1,68 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import '../../assets/index16.css';const g = "_grid_1ua6c_1", n = {
3
- grid: g
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import '../../assets/index16.css';const y = "_grid_1pzcn_1", $ = {
3
+ grid: y
4
4
  };
5
- function y({
5
+ function v({
6
6
  columns: r = 1,
7
- gap: d = "1rem",
8
- areas: i,
9
- autoFitMinMax: t,
7
+ gap: a = "1rem",
8
+ areas: o,
9
+ autoFitMinMax: l,
10
10
  className: s,
11
- children: m,
12
- style: l,
13
- ...o
11
+ children: p,
12
+ style: n,
13
+ ...m
14
14
  }) {
15
15
  const e = {
16
- ...l,
16
+ ...n,
17
17
  display: "grid",
18
- gap: d
18
+ gap: a
19
19
  };
20
- return i ? e.gridTemplateAreas = i.map((p) => `"${p.join(" ")}"`).join(" ") : t ? e.gridTemplateColumns = `repeat(auto-fit, minmax(${t}, 1fr))` : e.gridTemplateColumns = typeof r == "number" ? `repeat(${r}, 1fr)` : r, /* @__PURE__ */ a(
20
+ if (o)
21
+ e.gridTemplateAreas = o.map((t) => `"${t.join(" ")}"`).join(" ");
22
+ else if (l)
23
+ e.gridTemplateColumns = `repeat(auto-fit, minmax(${l}, 1fr))`;
24
+ else if (typeof r == "object") {
25
+ const { xs: t, sm: d, md: f, lg: g, xl: x, "2xl": b } = r;
26
+ [
27
+ {
28
+ breakpoint: "xs",
29
+ value: t
30
+ },
31
+ {
32
+ breakpoint: "sm",
33
+ value: d
34
+ },
35
+ {
36
+ breakpoint: "md",
37
+ value: f
38
+ },
39
+ {
40
+ breakpoint: "lg",
41
+ value: g
42
+ },
43
+ {
44
+ breakpoint: "xl",
45
+ value: x
46
+ },
47
+ {
48
+ breakpoint: "2xl",
49
+ value: b
50
+ }
51
+ ].forEach(({ breakpoint: c, value: i }) => {
52
+ i && (e[`--${c}-columns`] = typeof i == "number" ? `repeat(${i}, 1fr)` : i);
53
+ });
54
+ } else
55
+ e.gridTemplateColumns = typeof r == "number" ? `repeat(${r}, 1fr)` : r;
56
+ return console.log(e), /* @__PURE__ */ u(
21
57
  "div",
22
58
  {
23
- className: `${n.grid} ${s ?? ""}`,
59
+ className: `${$.grid} ${s ?? ""}`,
24
60
  style: e,
25
- ...o,
26
- children: m
61
+ ...m,
62
+ children: p
27
63
  }
28
64
  );
29
65
  }
30
66
  export {
31
- y as Grid
67
+ v as Grid
32
68
  };
@@ -1,6 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { d as i, i as a, r as s, s as d, g as l } from "../../index-BWTAh3RO.js";
2
+ import { d as i, i as a, r as s, s as d, g as l } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { Heading as n } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  i("Heading", () => {
5
6
  a("renders with default level (h1)", () => {
6
7
  s(/* @__PURE__ */ t(n, { children: "Test Heading" }));
@@ -1,16 +1,17 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { d as r, i as a, r as o, s as n, g as s, v as m, f as b } from "../../index-BWTAh3RO.js";
2
+ import { d as r, i as o, r as a, s as n, g as s, v as m, f as b } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { IconButton as l } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  import { T as c } from "../../trash-2-2Rn0a4s6.js";
5
6
  r("IconButton", () => {
6
- a("renders with icon and accessible label", () => {
7
- o(
7
+ o("renders with icon and accessible label", () => {
8
+ a(
8
9
  /* @__PURE__ */ t(l, { icon: /* @__PURE__ */ t(c, { size: 21 }), srOnlyLabel: "Delete item" })
9
10
  );
10
11
  const e = n.getByRole("button", { name: /delete item/i });
11
12
  s(e).toBeInTheDocument();
12
- }), a("applies the correct size and intent classes", () => {
13
- o(
13
+ }), o("applies the correct size and intent classes", () => {
14
+ a(
14
15
  /* @__PURE__ */ t(
15
16
  l,
16
17
  {
@@ -24,15 +25,15 @@ r("IconButton", () => {
24
25
  );
25
26
  const e = n.getByRole("button", { name: /delete item/i });
26
27
  s(e.className).toMatch("custom-class"), s(e.className).toMatch("iconButton"), s(e.className).toMatch("lg"), s(e.className).toMatch("error");
27
- }), a("can be disabled", () => {
28
- o(
28
+ }), o("can be disabled", () => {
29
+ a(
29
30
  /* @__PURE__ */ t(l, { icon: /* @__PURE__ */ t(c, { size: 21 }), disabled: !0, srOnlyLabel: "Disabled" })
30
31
  );
31
32
  const e = n.getByRole("button", { name: /disabled/i });
32
33
  s(e.className).toBeDisabled;
33
- }), a("calls onClick when clicked", () => {
34
+ }), o("calls onClick when clicked", () => {
34
35
  const e = m.fn();
35
- o(
36
+ a(
36
37
  /* @__PURE__ */ t(
37
38
  l,
38
39
  {
@@ -1,11 +1,12 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { d as m, i, r as t, g as e, s as a } from "../../index-BWTAh3RO.js";
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { d as m, i, r as t, g as e, s as r } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { Input as l } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  m("Input", () => {
5
6
  i("renders an input with a label", () => {
6
- t(/* @__PURE__ */ r(l, { label: "email", name: "email" })), e(a.getByLabelText("email")).toBeInTheDocument();
7
+ t(/* @__PURE__ */ a(l, { label: "email", name: "email" })), e(r.getByLabelText("email")).toBeInTheDocument();
7
8
  }), i("renders an error message if provided", () => {
8
- t(/* @__PURE__ */ r(l, { label: "email", name: "email", error: "Required field" })), e(a.getByText("Required field")).toBeInTheDocument(), e(a.getByLabelText("email")).toHaveAttribute(
9
+ t(/* @__PURE__ */ a(l, { label: "email", name: "email", error: "Required field" })), e(r.getByText("Required field")).toBeInTheDocument(), e(r.getByLabelText("email")).toHaveAttribute(
9
10
  "aria-invalid",
10
11
  "true"
11
12
  );
@@ -1,37 +1,38 @@
1
- import { jsxs as m, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as _, jsx as t } from "react/jsx-runtime";
2
2
  import "react";
3
+ import "../Tabs/index.js";
3
4
  import { Label as u } from "../Label/index.js";
4
- import '../../assets/index21.css';const d = "_wrapper_1fwv5_1", l = "_input_1fwv5_7", w = "_error_1fwv5_25", f = "_errorMessage_1fwv5_29", e = {
5
+ import '../../assets/index34.css';const d = "_wrapper_1fwv5_1", l = "_input_1fwv5_7", w = "_error_1fwv5_25", f = "_errorMessage_1fwv5_29", e = {
5
6
  wrapper: d,
6
7
  input: l,
7
8
  error: w,
8
9
  errorMessage: f
9
10
  };
10
- function M({
11
- label: t,
11
+ function $({
12
+ label: n,
12
13
  id: o,
13
14
  className: a,
14
15
  error: r,
15
16
  required: p,
16
17
  optional: c,
17
- tooltip: _,
18
+ tooltip: m,
18
19
  ...s
19
20
  }) {
20
21
  const i = o ?? s.name ?? `input-${Math.random().toString(36).slice(2)}`;
21
- return /* @__PURE__ */ m("div", { className: `${e.wrapper} ${a ?? ""}`, children: [
22
- t && /* @__PURE__ */ n(
22
+ return /* @__PURE__ */ _("div", { className: `${e.wrapper} ${a ?? ""}`, children: [
23
+ n && /* @__PURE__ */ t(
23
24
  u,
24
25
  {
25
26
  htmlFor: i,
26
27
  required: p,
27
28
  optional: c,
28
29
  intent: r ? "error" : "default",
29
- tooltip: _,
30
+ tooltip: m,
30
31
  showErrorIcon: !!r,
31
- children: t
32
+ children: n
32
33
  }
33
34
  ),
34
- /* @__PURE__ */ n(
35
+ /* @__PURE__ */ t(
35
36
  "input",
36
37
  {
37
38
  id: i,
@@ -40,9 +41,9 @@ function M({
40
41
  ...s
41
42
  }
42
43
  ),
43
- r && /* @__PURE__ */ n("div", { className: e.errorMessage, children: r })
44
+ r && /* @__PURE__ */ t("div", { className: e.errorMessage, children: r })
44
45
  ] });
45
46
  }
46
47
  export {
47
- M as Input
48
+ $ as Input
48
49
  };
@@ -1,6 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { d as s, i as o, r as n, g as e, s as r } from "../../index-BWTAh3RO.js";
2
+ import { d as s, i as o, r as n, g as e, s as r } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { Label as l } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  s("Label", () => {
5
6
  o("renders label text", () => {
6
7
  n(/* @__PURE__ */ t(l, { htmlFor: "username", children: "Username" })), e(r.getByText("Username")).toBeInTheDocument();