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
@@ -0,0 +1,62 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { d as u, i as a, r as c, s as o, g as s, v as d, f as r } from "../../vi.B-PuvDzu-a048kFcX.js";
3
+ import { Badge as l } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
5
+ import { P as i } from "../../plus-Cs7TaIK9.js";
6
+ u("Badge", () => {
7
+ a("renders default badge", () => {
8
+ c(/* @__PURE__ */ t(l, { text: "Default" }));
9
+ const e = o.getByRole("status");
10
+ s(e).toBeInTheDocument(), s(e.className).toContain("default");
11
+ }), a("applies correct variant class", () => {
12
+ c(/* @__PURE__ */ t(l, { text: "Success", variant: "success" })), s(o.getByRole("status")).toHaveClass("success");
13
+ }), a("renders icon when provided", () => {
14
+ c(
15
+ /* @__PURE__ */ t(
16
+ l,
17
+ {
18
+ text: "Success",
19
+ variant: "success",
20
+ icon: /* @__PURE__ */ t(i, { "data-testid": "icon" })
21
+ }
22
+ )
23
+ );
24
+ const e = o.getByTestId("icon");
25
+ s(e).toBeInTheDocument();
26
+ }), a("calls onClick handler when clickable", () => {
27
+ const e = d.fn();
28
+ c(
29
+ /* @__PURE__ */ t(
30
+ l,
31
+ {
32
+ text: "Clickable",
33
+ variant: "success",
34
+ icon: /* @__PURE__ */ t(i, { "data-testid": "icon" }),
35
+ onClick: e
36
+ }
37
+ )
38
+ );
39
+ const n = o.getByRole("button");
40
+ s(n.className).toContain("clickable"), r.click(n), s(e).toHaveBeenCalledTimes(1);
41
+ }), a("does not call onClick handler when not clickable", () => {
42
+ const e = d.fn();
43
+ c(
44
+ /* @__PURE__ */ t(
45
+ l,
46
+ {
47
+ text: "Not Clickable",
48
+ variant: "success",
49
+ icon: /* @__PURE__ */ t(i, { "data-testid": "icon" })
50
+ }
51
+ )
52
+ );
53
+ const n = o.getByRole("status");
54
+ r.click(n), s(e).not.toHaveBeenCalledTimes(1);
55
+ }), a("applies custom className", () => {
56
+ c(
57
+ /* @__PURE__ */ t(l, { text: "Default", className: "custom-class" })
58
+ );
59
+ const e = o.getByRole("status");
60
+ s(e).toHaveClass("custom-class");
61
+ });
62
+ });
@@ -0,0 +1,10 @@
1
+ const s = {
2
+ default: "default",
3
+ success: "success",
4
+ warning: "warning",
5
+ error: "error",
6
+ info: "info"
7
+ };
8
+ export {
9
+ s as default
10
+ };
@@ -0,0 +1,41 @@
1
+ import { jsxs as o, jsx as c } from "react/jsx-runtime";
2
+ import '../../assets/index23.css';const _ = "_badge_18z15_19", i = "_clickable_18z15_31", l = "_icon_18z15_35", u = "_text_18z15_41", d = "_success_18z15_50", f = "_warning_18z15_55", g = "_error_18z15_60", b = "_info_18z15_65", s = {
3
+ badge: _,
4
+ clickable: i,
5
+ icon: l,
6
+ text: u,
7
+ default: "_default_18z15_45",
8
+ success: d,
9
+ warning: f,
10
+ error: g,
11
+ info: b
12
+ }, z = {
13
+ default: s.default,
14
+ success: s.success,
15
+ warning: s.warning,
16
+ error: s.error,
17
+ info: s.info
18
+ };
19
+ function p({
20
+ text: a,
21
+ variant: t = "default",
22
+ icon: n,
23
+ onClick: e,
24
+ className: r
25
+ }) {
26
+ return /* @__PURE__ */ o(
27
+ "span",
28
+ {
29
+ className: `${s.badge} ${z[t]} ${e ? s.clickable : ""} ${r ?? ""}`,
30
+ onClick: e,
31
+ role: e ? "button" : "status",
32
+ children: [
33
+ n && /* @__PURE__ */ c("span", { className: s.icon, children: n }),
34
+ /* @__PURE__ */ c("span", { className: s.text, children: a })
35
+ ]
36
+ }
37
+ );
38
+ }
39
+ export {
40
+ p as Badge
41
+ };
@@ -1,6 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { d as r, i as o, r as n, s, g as a } from "../../index-BWTAh3RO.js";
2
+ import { d as r, i as o, r as n, s, g as a } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { Box as i } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  r("Box", () => {
5
6
  o("renders with default props", () => {
6
7
  n(/* @__PURE__ */ t(i, { children: "Content" }));
@@ -1,6 +1,7 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { d as l, i as o, r as n, s as a, g as e, v as c, f as r } from "../../index-BWTAh3RO.js";
2
+ import { d as l, i as o, r as n, s as a, g as e, v as c, f as r } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { Button as i } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  l("Button", () => {
5
6
  o('renders with default "primary" variant', () => {
6
7
  n(/* @__PURE__ */ s(i, { children: "Click me" }));
@@ -1,22 +1,22 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import '../../assets/index13.css';const c = "_button_v8ol8_1", y = "_primary_v8ol8_21", _ = "_secondary_v8ol8_29", e = "_ghost_v8ol8_37", o = {
2
+ import '../../assets/index13.css';const c = "_button_17sgm_1", m = "_primary_17sgm_21", y = "_secondary_17sgm_29", _ = "_ghost_17sgm_39", t = {
3
3
  button: c,
4
- primary: y,
5
- secondary: _,
6
- ghost: e
7
- }, i = {
8
- primary: o.primary,
9
- secondary: o.secondary,
10
- ghost: o.ghost
4
+ primary: m,
5
+ secondary: y,
6
+ ghost: _
7
+ }, e = {
8
+ primary: t.primary,
9
+ secondary: t.secondary,
10
+ ghost: t.ghost
11
11
  };
12
- function p({
13
- variant: t = "primary",
14
- className: r,
15
- children: s,
12
+ function i({
13
+ variant: s = "primary",
14
+ className: o,
15
+ children: r,
16
16
  ...n
17
17
  }) {
18
- return /* @__PURE__ */ a("button", { className: `${r ?? ""} ${o.button} ${i[t]}`, ...n, children: s });
18
+ return /* @__PURE__ */ a("button", { className: `${o ?? ""} ${t.button} ${e[s]}`, ...n, children: r });
19
19
  }
20
20
  export {
21
- p as Button
21
+ i as Button
22
22
  };
@@ -1,6 +1,7 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { d as a, i, r, g as n, s as c } from "../../index-BWTAh3RO.js";
2
+ import { d as a, i, r, g as n, s as c } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { ButtonGroup as s } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  a("ButtonGroup", () => {
5
6
  i("renders children", () => {
6
7
  r(
@@ -1,26 +1,26 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import '../../assets/index11.css';const l = "_buttonGroup_c695y_1", u = "_vertical_c695y_10", s = "_horizontal_c695y_14", o = {
3
- buttonGroup: l,
4
- vertical: u,
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import '../../assets/index11.css';const u = "_buttonGroup_18kpd_1", c = "_vertical_18kpd_6", s = "_horizontal_18kpd_10", o = {
3
+ buttonGroup: u,
4
+ vertical: c,
5
5
  horizontal: s
6
6
  };
7
- function p({
7
+ function _({
8
8
  children: t,
9
9
  className: r,
10
10
  orientation: n = "horizontal",
11
11
  role: e = "group",
12
- ...c
12
+ ...i
13
13
  }) {
14
- const i = n === "vertical" ? o.vertical : o.horizontal;
15
- return /* @__PURE__ */ a(
14
+ const a = n === "vertical" ? o.vertical : o.horizontal;
15
+ return /* @__PURE__ */ l(
16
16
  "div",
17
17
  {
18
- className: `${o.buttonGroup} ${i} ${r ?? ""}`,
19
- ...c,
18
+ className: `${o.buttonGroup} ${a} ${r ?? ""}`,
19
+ ...i,
20
20
  children: t
21
21
  }
22
22
  );
23
23
  }
24
24
  export {
25
- p as ButtonGroup
25
+ _ as ButtonGroup
26
26
  };
@@ -1,6 +1,7 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import { d as D, i as s, r as l, g as n, s as a, v as y, f as d } from "../../index-BWTAh3RO.js";
3
- import { f as h, C as r } from "../../index-DhqFdMqD.js";
2
+ import { d as D, i as s, r as l, g as n, s as a, v as m, f as d } from "../../vi.B-PuvDzu-a048kFcX.js";
3
+ import { f as y, C as r } from "../../index-RF23qrF-.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  D("Calendar", () => {
5
6
  s("renders the current month and year", () => {
6
7
  const t = new Date(2025, 4, 15);
@@ -20,14 +21,14 @@ D("Calendar", () => {
20
21
  );
21
22
  n(e.length).toBeGreaterThanOrEqual(28);
22
23
  }), s("calls onSelectDate with the correct date when a day is clicked", () => {
23
- const t = new Date(2025, 4, 1), o = y.fn();
24
+ const t = new Date(2025, 4, 1), o = m.fn();
24
25
  l(
25
26
  /* @__PURE__ */ c(r, { selectedDate: t, onSelectDate: o })
26
27
  );
27
28
  const e = a.getAllByRole("button").find((u) => u.textContent === "15");
28
29
  n(e).toBeTruthy(), e && d.click(e), n(o).toHaveBeenCalledTimes(1);
29
30
  const i = o.mock.calls[0][0];
30
- n(h(i, "yyyy-MM-dd")).toBe("2025-05-15");
31
+ n(y(i, "yyyy-MM-dd")).toBe("2025-05-15");
31
32
  }), s("navigates to previous and next months", () => {
32
33
  const t = new Date(2025, 4, 1);
33
34
  l(/* @__PURE__ */ c(r, { selectedDate: t, onSelectDate: () => {
@@ -1,7 +1,9 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../IconButton/index.js";
4
- import { C as a } from "../../index-DhqFdMqD.js";
4
+ import "../Tabs/index.js";
5
+ import { C as e } from "../../index-RF23qrF-.js";
6
+ import "../../arrow-right-CnuUc2oD.js";
5
7
  export {
6
- a as Calendar
8
+ e as Calendar
7
9
  };
@@ -0,0 +1,49 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { d as l, i as n, r, g as t, s as e, v as a, f as d } from "../../vi.B-PuvDzu-a048kFcX.js";
3
+ import { Card as i } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
5
+ l("Card", () => {
6
+ n("renders with title, content and footer", () => {
7
+ r(
8
+ /* @__PURE__ */ o(
9
+ i,
10
+ {
11
+ title: "Test Title",
12
+ content: "Test Content",
13
+ footer: /* @__PURE__ */ o("button", { children: "Footer Button" })
14
+ }
15
+ )
16
+ ), t(e.getByText("Test Title")).toBeInTheDocument(), t(e.getByText("Test Content")).toBeInTheDocument(), t(
17
+ e.getByRole("button", { name: /footer button/i })
18
+ ).toBeInTheDocument();
19
+ }), n("calls onClick when card is clicked", () => {
20
+ const s = a.fn();
21
+ r(
22
+ /* @__PURE__ */ o(
23
+ i,
24
+ {
25
+ title: "Test Title",
26
+ content: "Test Content",
27
+ footer: /* @__PURE__ */ o("button", { children: "Footer Button" }),
28
+ onClick: s
29
+ }
30
+ )
31
+ ), d.click(e.getByText("Test Title")), t(s).toHaveBeenCalledTimes(1);
32
+ }), n("does not render title if not provided", () => {
33
+ r(
34
+ /* @__PURE__ */ o(i, { content: "Test Content", footer: /* @__PURE__ */ o("button", { children: "Footer Button" }) })
35
+ ), t(e.queryByRole("heading")).not.toBeInTheDocument(), t(e.getByText("Test Content")).toBeInTheDocument();
36
+ }), n("does not render content if not provided", () => {
37
+ r(/* @__PURE__ */ o(i, { title: "Test Title", footer: /* @__PURE__ */ o("button", { children: "Footer Button" }) })), t(e.getByRole("button")).toBeInTheDocument(), t(e.queryByText("Test Content")).not.toBeInTheDocument();
38
+ }), n("does not render footer if not provided", () => {
39
+ r(/* @__PURE__ */ o(i, { title: "Test Title" })), t(e.getByRole("presentation")).toBeInTheDocument(), t(e.queryByRole("button")).not.toBeInTheDocument();
40
+ }), n("renders with the outlined variant", () => {
41
+ r(/* @__PURE__ */ o(i, { title: "Test Title", variant: "outlined" }));
42
+ const s = e.getByRole("presentation");
43
+ t(s).toHaveClass("outlined");
44
+ }), n("renders with the shadow variant", () => {
45
+ r(/* @__PURE__ */ o(i, { title: "Test Title", variant: "shadow" }));
46
+ const s = e.getByRole("presentation");
47
+ t(s).toHaveClass("shadow");
48
+ });
49
+ });
@@ -0,0 +1,11 @@
1
+ const a = {
2
+ card: "card",
3
+ default: "default",
4
+ outlined: "outlined",
5
+ shadow: "shadow",
6
+ imageTop: "imageTop",
7
+ imageBackground: "imageBackground"
8
+ };
9
+ export {
10
+ a as default
11
+ };
@@ -0,0 +1,77 @@
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import { Heading as t } from "../Heading/index.js";
3
+ import "react";
4
+ import "../Tabs/index.js";
5
+ import '../../assets/index21.css';const g = "_card_7amar_1", u = "_clickable_7amar_15", h = "_outlined_7amar_27", k = "_shadow_7amar_31", v = "_imageTop_7amar_35", p = "_imageContainer_7amar_45", f = "_image_7amar_35", B = "_content_7amar_60", N = "_imageBackground_7amar_64", C = "_imageBackgroundContainer_7amar_75", b = "_backgroundImage_7amar_83", x = "_overlay_7amar_93", T = "_text_7amar_109", w = "_footer_7amar_131", a = {
6
+ card: g,
7
+ clickable: u,
8
+ default: "_default_7amar_23",
9
+ outlined: h,
10
+ shadow: k,
11
+ imageTop: v,
12
+ imageContainer: p,
13
+ image: f,
14
+ content: B,
15
+ imageBackground: N,
16
+ imageBackgroundContainer: C,
17
+ backgroundImage: b,
18
+ overlay: x,
19
+ text: T,
20
+ footer: w
21
+ }, y = {
22
+ default: a.default,
23
+ outlined: a.outlined,
24
+ shadow: a.shadow,
25
+ imageTop: a.imageTop,
26
+ imageBackground: a.imageBackground
27
+ };
28
+ function M({
29
+ title: n,
30
+ content: r,
31
+ footer: c,
32
+ imageSrc: i,
33
+ imageAlt: m = "Card image",
34
+ onClick: s,
35
+ variant: d = "default",
36
+ clickable: l = !1,
37
+ className: _
38
+ }) {
39
+ return /* @__PURE__ */ o(
40
+ "div",
41
+ {
42
+ className: `${a.card} ${y[d]} ${l ? a.clickable : ""} ${_ ?? ""}`,
43
+ onClick: s,
44
+ role: s ? "button" : "presentation",
45
+ children: [
46
+ d === "imageTop" && i && /* @__PURE__ */ e("div", { className: a.imageContainer, children: /* @__PURE__ */ e("img", { src: i, alt: m, className: a.image }) }),
47
+ d === "imageBackground" && i && /* @__PURE__ */ o("div", { className: a.imageBackgroundContainer, children: [
48
+ /* @__PURE__ */ e(
49
+ "img",
50
+ {
51
+ src: i,
52
+ alt: m,
53
+ className: a.backgroundImage
54
+ }
55
+ ),
56
+ /* @__PURE__ */ o("div", { className: a.overlay, children: [
57
+ /* @__PURE__ */ o("div", { children: [
58
+ n && /* @__PURE__ */ e(t, { level: 3, children: n }),
59
+ r && /* @__PURE__ */ e("div", { className: a.text, children: r })
60
+ ] }),
61
+ c && /* @__PURE__ */ e("div", { className: a.footer, children: c })
62
+ ] })
63
+ ] }),
64
+ d !== "imageBackground" && /* @__PURE__ */ o("div", { className: a.content, children: [
65
+ /* @__PURE__ */ o("div", { children: [
66
+ n && /* @__PURE__ */ e(t, { level: 3, children: n }),
67
+ r && /* @__PURE__ */ e("div", { className: a.text, children: r })
68
+ ] }),
69
+ c && /* @__PURE__ */ e("div", { className: a.footer, children: c })
70
+ ] })
71
+ ]
72
+ }
73
+ );
74
+ }
75
+ export {
76
+ M as Card
77
+ };
@@ -0,0 +1,41 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { d as h, v as d, i as s, r as a, g as i, s as t, f as r } from "../../vi.B-PuvDzu-a048kFcX.js";
3
+ import { Carousel as l } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
5
+ const c = [
6
+ /* @__PURE__ */ n("div", { children: "Slide 1" }, "1"),
7
+ /* @__PURE__ */ n("div", { children: "Slide 2" }, "2"),
8
+ /* @__PURE__ */ n("div", { children: "Slide 3" }, "3"),
9
+ /* @__PURE__ */ n("div", { children: "Slide 4" }, "4"),
10
+ /* @__PURE__ */ n("div", { children: "Slide 5" }, "5"),
11
+ /* @__PURE__ */ n("div", { children: "Slide 6" }, "6")
12
+ ];
13
+ h("Carousel", () => {
14
+ beforeEach(() => {
15
+ d.useFakeTimers();
16
+ }), afterEach(() => {
17
+ d.useRealTimers();
18
+ }), s("renders the correct number of slides", () => {
19
+ a(/* @__PURE__ */ n(l, { items: c })), i(t.getByText("Slide 1")).toBeInTheDocument(), i(t.getByText("Slide 6")).toBeInTheDocument();
20
+ }), s("shows the correct number of indicators based on visible slides", () => {
21
+ window.innerWidth = 1024, window.dispatchEvent(new Event("resize")), a(/* @__PURE__ */ n(l, { items: c }));
22
+ const e = t.getAllByRole("button", { name: /Go to group/i });
23
+ i(e).toHaveLength(2);
24
+ }), s("advances to the next group on the next button click", () => {
25
+ window.innerWidth = 1024, window.dispatchEvent(new Event("resize")), a(/* @__PURE__ */ n(l, { items: c }));
26
+ const e = t.getByRole("list"), o = t.getByLabelText("Next slide");
27
+ i(e).toHaveStyle({ transform: "translateX(-0%)" }), r.click(o), i(e).toHaveStyle({ transform: "translateX(-100%)" });
28
+ }), s("does not advance past the last group if autoplay is false", () => {
29
+ window.innerWidth = 1024, window.dispatchEvent(new Event("resize")), a(/* @__PURE__ */ n(l, { items: c, autoPlay: !1 }));
30
+ const e = t.getByRole("list"), o = t.getByLabelText("Next slide");
31
+ r.click(o), i(e).toHaveStyle({ transform: "translateX(-100%)" }), r.click(o), i(e).toHaveStyle({ transform: "translateX(-100%)" });
32
+ }), s("advances to the previous group on the previous button click", () => {
33
+ window.innerWidth = 1024, window.dispatchEvent(new Event("resize")), a(/* @__PURE__ */ n(l, { items: c }));
34
+ const e = t.getByRole("list"), o = t.getByLabelText("Next slide"), v = t.getByLabelText("Previous slide");
35
+ r.click(o), i(e).toHaveStyle({ transform: "translateX(-100%)" }), r.click(v), i(e).toHaveStyle({ transform: "translateX(-0%)" });
36
+ }), s("centers the active card and shows cards peeking on mobile", () => {
37
+ window.innerWidth = 375, window.dispatchEvent(new Event("resize")), a(/* @__PURE__ */ n(l, { items: c }));
38
+ const e = t.getByRole("list"), o = t.getByLabelText("Next slide");
39
+ i(e).toHaveStyle({ transform: "translateX(calc(-0% + 10%))" }), r.click(o), i(e).toHaveStyle({ transform: "translateX(calc(-80% + 10%))" });
40
+ });
41
+ });
@@ -0,0 +1,96 @@
1
+ import { jsxs as _, jsx as r } from "react/jsx-runtime";
2
+ import { useState as m, useRef as A, useCallback as C, useEffect as u } from "react";
3
+ import { A as I, a as M } from "../../arrow-right-CnuUc2oD.js";
4
+ import '../../assets/index30.css';const S = "_carousel_1h8mt_5", E = "_track_1h8mt_12", L = "_slide_1h8mt_18", R = "_controls_1h8mt_30", j = "_indicators_1h8mt_47", z = "_indicator_1h8mt_47", G = "_active_1h8mt_62", T = "_buttons_1h8mt_66", V = "_prev_1h8mt_71", X = "_disabled_1h8mt_71", q = "_next_1h8mt_72", e = {
5
+ carousel: S,
6
+ track: E,
7
+ slide: L,
8
+ controls: R,
9
+ indicators: j,
10
+ indicator: z,
11
+ active: G,
12
+ buttons: T,
13
+ prev: V,
14
+ disabled: X,
15
+ next: q
16
+ };
17
+ function J({
18
+ items: c,
19
+ autoPlay: i = !1,
20
+ autoPlayInterval: b = 3e3,
21
+ className: f
22
+ }) {
23
+ const [s, l] = m(0), [n, v] = m(
24
+ window.innerWidth < 768 ? 1 : 3
25
+ ), [w, N] = m(window.innerWidth < 768), d = A(null), $ = s === 0, g = s === c.length - 1, p = Math.ceil(c.length / n), a = C(() => {
26
+ l(0);
27
+ const t = window.innerWidth < 768;
28
+ N(t), v(t ? 1 : 3);
29
+ }, []);
30
+ u(() => (a(), window.addEventListener("resize", a), () => window.removeEventListener("resize", a)), [a]);
31
+ const h = () => {
32
+ (i || !g) && l(
33
+ (t) => t < c.length - n ? t + n : t
34
+ );
35
+ }, x = () => {
36
+ (i || !$) && l((t) => t > 0 ? t - n : 0);
37
+ }, k = (t) => {
38
+ l(t * n);
39
+ };
40
+ u(() => (i && (d.current = setInterval(h, b)), () => {
41
+ d.current && clearInterval(d.current);
42
+ }), [i, b, h]);
43
+ const W = () => {
44
+ if (w)
45
+ return `translateX(calc(-${s * 80}% + 10%))`;
46
+ const t = 100 / n;
47
+ return `translateX(-${s * t}%)`;
48
+ };
49
+ return /* @__PURE__ */ _("div", { className: `${e.carousel} ${f ?? ""}`, children: [
50
+ /* @__PURE__ */ r(
51
+ "div",
52
+ {
53
+ className: e.track,
54
+ style: { transform: W() },
55
+ role: "list",
56
+ children: c.map((t, o) => /* @__PURE__ */ r("div", { className: e.slide, children: t }, o))
57
+ }
58
+ ),
59
+ /* @__PURE__ */ _("div", { className: e.controls, children: [
60
+ /* @__PURE__ */ r("div", { className: e.indicators, children: Array.from({ length: p }).map((t, o) => /* @__PURE__ */ r(
61
+ "button",
62
+ {
63
+ className: `${e.indicator} ${o === Math.floor(s / n) ? e.active : ""}`,
64
+ onClick: () => k(o),
65
+ "aria-label": `Go to group ${o + 1}`
66
+ },
67
+ o
68
+ )) }),
69
+ /* @__PURE__ */ _("div", { className: e.buttons, children: [
70
+ /* @__PURE__ */ r(
71
+ "button",
72
+ {
73
+ className: `${e.prev} ${!i && s === 0 ? e.disabled : ""}`,
74
+ onClick: x,
75
+ "aria-label": "Previous slide",
76
+ disabled: !i && s === 0,
77
+ children: /* @__PURE__ */ r(I, {})
78
+ }
79
+ ),
80
+ /* @__PURE__ */ r(
81
+ "button",
82
+ {
83
+ className: `${e.next} ${!i && s >= c.length - n ? e.disabled : ""}`,
84
+ onClick: h,
85
+ "aria-label": "Next slide",
86
+ disabled: !i && s >= c.length - n,
87
+ children: /* @__PURE__ */ r(M, {})
88
+ }
89
+ )
90
+ ] })
91
+ ] })
92
+ ] });
93
+ }
94
+ export {
95
+ J as Carousel
96
+ };
@@ -1,6 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { d as n, i as b, r as s, g as c, s as o, v as h } from "../../index-BWTAh3RO.js";
2
+ import { d as n, i as b, r as s, g as c, s as o, v as h } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { Checkbox as a } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  n("Checkbox", () => {
5
6
  b("renders correctly", () => {
6
7
  s(
@@ -1,39 +1,40 @@
1
- import { jsxs as m, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as l } from "react/jsx-runtime";
2
2
  import "react";
3
+ import "../Tabs/index.js";
3
4
  import { Label as x } from "../Label/index.js";
4
- import '../../assets/index23.css';const b = "_wrapper_zxmf0_1", n = "_checkbox_zxmf0_7", h = "_label_zxmf0_29", e = {
5
+ import '../../assets/index37.css';const b = "_wrapper_zxmf0_1", n = "_checkbox_zxmf0_7", h = "_label_zxmf0_29", e = {
5
6
  wrapper: b,
6
7
  checkbox: n,
7
8
  label: h
8
9
  };
9
- function i({
10
+ function w({
10
11
  id: c,
11
12
  name: a,
12
13
  label: s,
13
14
  disabled: o = !1,
14
- required: l = !1,
15
+ required: r = !1,
15
16
  className: p,
16
17
  ...t
17
18
  }) {
18
19
  return /* @__PURE__ */ m("div", { className: `${e.wrapper} ${p ?? ""}`, children: [
19
- /* @__PURE__ */ r(
20
+ /* @__PURE__ */ l(
20
21
  "input",
21
22
  {
22
23
  type: "checkbox",
23
24
  id: c,
24
25
  name: a,
25
26
  disabled: o,
26
- required: l,
27
+ required: r,
27
28
  className: e.checkbox,
28
29
  ...t
29
30
  }
30
31
  ),
31
- /* @__PURE__ */ r(
32
+ /* @__PURE__ */ l(
32
33
  x,
33
34
  {
34
35
  htmlFor: c,
35
36
  disabled: o,
36
- required: l,
37
+ required: r,
37
38
  className: e.label,
38
39
  children: s
39
40
  }
@@ -41,5 +42,5 @@ function i({
41
42
  ] });
42
43
  }
43
44
  export {
44
- i as Checkbox
45
+ w as Checkbox
45
46
  };
@@ -1,6 +1,7 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { d as c, i as t, r as i, g as n, s as o } from "../../index-BWTAh3RO.js";
2
+ import { d as c, i as t, r as i, g as n, s as o } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { Container as a } from "./index.js";
4
+ import "../../index-Bgo8MuTU.js";
4
5
  c("Container", () => {
5
6
  t("renders children", () => {
6
7
  i(/* @__PURE__ */ s(a, { children: "Test content" })), n(o.getByText("Test content")).toBeInTheDocument();
@@ -1,7 +1,8 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { v as r, d as k, i as c, r as d, g as t, s as a, f as l } from "../../index-BWTAh3RO.js";
2
+ import { v as r, d as k, i as c, r as d, g as t, s as a, f as l } from "../../vi.B-PuvDzu-a048kFcX.js";
3
3
  import { DatePicker as o } from "./index.js";
4
- import { f as u } from "../../index-DhqFdMqD.js";
4
+ import "../../index-Bgo8MuTU.js";
5
+ import { f as u } from "../../index-RF23qrF-.js";
5
6
  r.mock("../Calendar", () => ({
6
7
  Calendar: ({ onSelectDate: e }) => /* @__PURE__ */ n(
7
8
  "button",