@konstructio/ui 0.1.2-alpha.5 → 0.1.2-alpha.51

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 (203) hide show
  1. package/dist/{Combination-VYaRRJBZ.js → Combination-BtmnusWq.js} +141 -138
  2. package/dist/DatePicker.css +1 -1
  3. package/dist/Modal-CjC-CIJ8.js +99 -0
  4. package/dist/assets/icons/index.js +7 -0
  5. package/dist/chevron-down-DgT-uSF9.js +5 -0
  6. package/dist/chevron-right-DYvXLeql.js +7 -0
  7. package/dist/chevron-up-DEfvgPCw.js +54 -0
  8. package/dist/chevron-up-DrQr2Fwd.js +5 -0
  9. package/dist/components/Alert/Alert.js +2 -2
  10. package/dist/components/AlertDialog/AlertDialog.js +81 -53
  11. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +3 -2
  12. package/dist/components/AlertDialog/components/index.js +1 -1
  13. package/dist/components/Badge/Badge.js +41 -44
  14. package/dist/components/Badge/Badge.variants.js +52 -13
  15. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  16. package/dist/components/Breadcrumb/Breadcrumb.variants.js +3 -3
  17. package/dist/components/Breadcrumb/components/Item/Item.js +22 -22
  18. package/dist/components/Breadcrumb/components/Item/Item.variants.js +25 -14
  19. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  20. package/dist/components/Button/Button.js +1 -1
  21. package/dist/components/Button/Button.variants.js +108 -98
  22. package/dist/components/Card/Card.variants.js +7 -12
  23. package/dist/components/Checkbox/Checkbox.js +108 -105
  24. package/dist/components/Checkbox/Checkbox.variants.js +34 -7
  25. package/dist/components/Command/Command.js +2 -2
  26. package/dist/components/Command/components/Command.js +1 -1
  27. package/dist/components/Command/components/CommandEmpty.js +1 -1
  28. package/dist/components/Command/components/CommandGroup.js +1 -1
  29. package/dist/components/Command/components/CommandInput.js +2 -2
  30. package/dist/components/Command/components/CommandItem.js +1 -1
  31. package/dist/components/Command/components/CommandList.js +1 -1
  32. package/dist/components/Command/components/CommandSeparator.js +1 -1
  33. package/dist/components/Command/components/DialogContent.js +2 -2
  34. package/dist/components/Command/components/DialogOverlay.js +1 -1
  35. package/dist/components/Counter/Counter.js +210 -0
  36. package/dist/components/Counter/Counter.variants.js +70 -0
  37. package/dist/components/Datepicker/DatePicker.js +1587 -1353
  38. package/dist/components/Divider/Divider.variants.js +1 -1
  39. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  40. package/dist/components/Filter/Filter.js +1 -1
  41. package/dist/components/Filter/Filter.variants.js +8 -7
  42. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +71 -45
  43. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +2 -2
  44. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +76 -43
  45. package/dist/components/Filter/components/ResetButton/ResetButton.js +15 -12
  46. package/dist/components/Filter/events/index.js +3 -3
  47. package/dist/components/ImageUpload/ImageUpload.js +221 -0
  48. package/dist/components/ImageUpload/ImageUpload.variants.js +109 -0
  49. package/dist/components/Input/Input.js +185 -118
  50. package/dist/components/Input/Input.variants.js +24 -19
  51. package/dist/components/Loading/Loading.js +1 -7
  52. package/dist/components/Modal/Modal.js +2 -2
  53. package/dist/components/Modal/components/Body/Body.js +1 -1
  54. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  55. package/dist/components/Modal/components/Header/Header.js +1 -1
  56. package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -4
  57. package/dist/components/Modal/components/index.js +1 -1
  58. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +34 -0
  59. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +30 -0
  60. package/dist/components/MultiSelectDropdown/components/Item/Item.js +30 -0
  61. package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +38 -0
  62. package/dist/components/MultiSelectDropdown/components/List/List.js +30 -0
  63. package/dist/components/MultiSelectDropdown/components/List/List.variants.js +25 -0
  64. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +119 -0
  65. package/dist/components/MultiSelectDropdown/components/index.js +8 -0
  66. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +21 -0
  67. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +13 -0
  68. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +138 -0
  69. package/dist/components/MultiSelectDropdown/contexts/index.js +6 -0
  70. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +32 -0
  71. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
  72. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +46 -0
  73. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +36 -0
  74. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +690 -0
  75. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +60 -0
  76. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
  77. package/dist/components/PhoneNumberInput/components/Wrapper.js +651 -0
  78. package/dist/components/PhoneNumberInput/components/index.js +6 -0
  79. package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
  80. package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
  81. package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
  82. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6144 -0
  83. package/dist/components/PhoneNumberInput/utils/index.js +11 -0
  84. package/dist/components/PieChart/PieChart.js +463 -482
  85. package/dist/components/Radio/Radio.js +47 -44
  86. package/dist/components/Radio/Radio.variants.js +12 -8
  87. package/dist/components/RadioCard/RadioCard.variants.js +1 -6
  88. package/dist/components/RadioGroup/RadioGroup.js +10 -10
  89. package/dist/components/Range/Range.js +1 -1
  90. package/dist/components/Select/Select.js +48 -0
  91. package/dist/components/{Dropdown/Dropdown.variants.js → Select/Select.variants.js} +17 -11
  92. package/dist/components/Select/components/List/List.js +172 -0
  93. package/dist/components/{Dropdown → Select}/components/List/List.variants.js +11 -8
  94. package/dist/components/Select/components/ListItem/ListItem.js +117 -0
  95. package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.variants.js +5 -4
  96. package/dist/components/Select/components/Wrapper.js +226 -0
  97. package/dist/components/Select/constants/index.js +4 -0
  98. package/dist/components/Select/constants/pagination.js +4 -0
  99. package/dist/components/Select/contexts/index.js +6 -0
  100. package/dist/components/Select/contexts/select.context.js +36 -0
  101. package/dist/components/Select/contexts/select.hook.js +11 -0
  102. package/dist/components/Select/contexts/select.provider.js +58 -0
  103. package/dist/components/Select/hooks/useNavigationList.js +50 -0
  104. package/dist/components/Select/hooks/useSelect.js +103 -0
  105. package/dist/components/Sidebar/Sidebar.variants.js +2 -2
  106. package/dist/components/Slider/Slider.js +1 -1
  107. package/dist/components/Switch/Switch.js +156 -129
  108. package/dist/components/Switch/Switch.variants.js +19 -10
  109. package/dist/components/Tabs/Tabs.js +1 -1
  110. package/dist/components/Tabs/Tabs.variants.js +4 -3
  111. package/dist/components/Tabs/components/Content.js +1 -1
  112. package/dist/components/Tabs/components/List.js +1 -1
  113. package/dist/components/Tabs/components/Trigger.js +1 -1
  114. package/dist/components/Tag/Tag.js +1 -1
  115. package/dist/components/Tag/Tag.variants.js +1 -0
  116. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +49 -98
  117. package/dist/components/TimePicker/TimePicker.js +1 -1
  118. package/dist/components/TimePicker/TimePicker.variants.js +26 -14
  119. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +30 -20
  120. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +57 -35
  121. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +53 -45
  122. package/dist/components/Toast/Toast.js +283 -256
  123. package/dist/components/Toast/Toast.variants.js +37 -24
  124. package/dist/components/Tooltip/Tooltip.js +15 -14
  125. package/dist/components/Tooltip/Tooltip.variants.js +5 -4
  126. package/dist/components/Typography/Typography.js +23 -25
  127. package/dist/components/Typography/Typography.variants.js +55 -52
  128. package/dist/components/VirtualizedTable/VirtualizedTable.js +97 -71
  129. package/dist/components/VirtualizedTable/components/Actions/Actions.js +95 -33
  130. package/dist/components/VirtualizedTable/components/Body/Body.js +73 -21
  131. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +94 -91
  132. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +20 -20
  133. package/dist/components/VirtualizedTable/components/Filter/Filter.js +61 -44
  134. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +33 -21
  135. package/dist/components/VirtualizedTable/components/Header/Header.js +61 -41
  136. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +43 -22
  137. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +106 -0
  138. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +22 -1858
  139. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
  140. package/dist/components/VirtualizedTable/components/index.js +8 -6
  141. package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
  142. package/dist/components/VirtualizedTable/contexts/table.provider.js +68 -761
  143. package/dist/components/index.js +94 -86
  144. package/dist/contexts/theme.provider.js +0 -1
  145. package/dist/{createLucideIcon-D2CN7Ma9.js → createLucideIcon-D4r5Phnh.js} +0 -24
  146. package/dist/ellipsis-vertical-BVPtjl5f.js +9 -0
  147. package/dist/{index-C1g_chDT.js → index-AV6ZtGhy.js} +2 -2
  148. package/dist/index-BG8O18ZY.js +93 -0
  149. package/dist/index-BKjcReYh.js +55 -0
  150. package/dist/{index-N2OStZoU.js → index-BOE_3f_Z.js} +4 -25
  151. package/dist/{index-Cd2vhaop.js → index-BlSRBdPy.js} +5 -6
  152. package/dist/index-BmVmDQGH.js +662 -0
  153. package/dist/index-BvoZGpli.js +60 -0
  154. package/dist/index-Byr10W8m.js +1873 -0
  155. package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
  156. package/dist/index-CeZcoQDw.js +479 -0
  157. package/dist/index-D6KzX_ef.js +135 -0
  158. package/dist/{index-B7t8D14s.js → index-D9SSJ6om.js} +4 -4
  159. package/dist/index-DKfEnhKr.js +200 -0
  160. package/dist/index-DLcqcWxM.js +29 -0
  161. package/dist/{index-ti1b9kqV.js → index-DMb4KD0b.js} +4 -4
  162. package/dist/{index-BAEWsOG1.js → index-DtEcCIrM.js} +1 -1
  163. package/dist/{index-bwWKd82e.js → index-Dy59FQl5.js} +1 -1
  164. package/dist/{index-C84F4YyO.js → index-gSPwC-1I.js} +10 -11
  165. package/dist/{index-Bnb0ezr3.js → index-vcSp8YRZ.js} +11 -12
  166. package/dist/index.d.ts +2142 -99
  167. package/dist/index.js +116 -106
  168. package/dist/libphonenumber-FTwQ9nyV.js +11549 -0
  169. package/dist/loader-juvMSJ9L.js +5 -0
  170. package/dist/package.json +43 -33
  171. package/dist/styles.css +1 -1
  172. package/dist/ui/civo-theme.css +194 -168
  173. package/dist/ui/theme.css +27 -0
  174. package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
  175. package/dist/utils/index.js +534 -501
  176. package/dist/x-BXShoIAM.js +8 -0
  177. package/dist/{x-4F_5p77m.js → x-Eoa9FJjA.js} +1 -1
  178. package/package.json +43 -33
  179. package/dist/Modal-D-NOEWMX.js +0 -98
  180. package/dist/chevron-down-MZvQoT2F.js +0 -11
  181. package/dist/chevron-right-VYBOBhRt.js +0 -19
  182. package/dist/components/Dropdown/Dropdown.js +0 -42
  183. package/dist/components/Dropdown/components/List/List.js +0 -79
  184. package/dist/components/Dropdown/components/ListItem/ListItem.js +0 -67
  185. package/dist/components/Dropdown/components/Wrapper.js +0 -205
  186. package/dist/components/Dropdown/contexts/dropdown.context.js +0 -19
  187. package/dist/components/Dropdown/contexts/dropdown.hook.js +0 -13
  188. package/dist/components/Dropdown/contexts/dropdown.provider.js +0 -30
  189. package/dist/components/Dropdown/contexts/index.js +0 -6
  190. package/dist/components/Dropdown/hooks/useDropdown.js +0 -58
  191. package/dist/components/Dropdown/hooks/useNavigationList.js +0 -62
  192. package/dist/components/NumberInput/NumberInput.js +0 -179
  193. package/dist/components/NumberInput/NumberInput.variants.js +0 -50
  194. package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +0 -16
  195. package/dist/index-BITvcJAz.js +0 -423
  196. package/dist/index-BfXxHr_2.js +0 -125
  197. package/dist/index-Cvx4lqTq.js +0 -47
  198. package/dist/index-DBbEcSUG.js +0 -31
  199. package/dist/index-DQH6odE9.js +0 -82
  200. package/dist/index-DzIBBMjs.js +0 -436
  201. package/dist/index-os7vysFS.js +0 -131
  202. /package/dist/components/{Dropdown → Select}/components/EmptyList.js +0 -0
  203. /package/dist/components/{Dropdown → Select}/components/index.js +0 -0
@@ -1,23 +1,36 @@
1
1
  import { c as a } from "../../index-D29mdTf5.js";
2
- const t = a([
3
- "rounded-md",
4
- "shadow-md",
5
- "p-4",
6
- "flex",
7
- "flex-col",
8
- "relative",
9
- "border",
10
- "overflow-hidden",
11
- "data-[state=open]:animate-slide-in",
12
- "data-[state=closed]:animate-hide",
13
- "data-[swipe=move]:translate-x-4",
14
- "data-[swipe=cancel]:translate-x-0",
15
- "data-[swipe=end]:animate-swipe-out",
16
- "shadow-purple-200",
17
- "border-purple-100",
18
- "dark:border-none",
19
- "dark:shadow-none"
20
- ]), o = a([
2
+ const e = a(
3
+ [
4
+ "rounded-md",
5
+ "p-4",
6
+ "flex",
7
+ "flex-row",
8
+ "relative",
9
+ "overflow-hidden",
10
+ "h-14",
11
+ "items-center",
12
+ "gap-8",
13
+ "data-[state=open]:animate-slide-in",
14
+ "data-[state=closed]:animate-hide",
15
+ "data-[swipe=move]:translate-x-4",
16
+ "data-[swipe=cancel]:translate-x-0",
17
+ "data-[swipe=end]:animate-swipe-out",
18
+ "text-white",
19
+ "shadow-[0px_2px_4px_0px_rgba(100,116,139,0.25)]"
20
+ ],
21
+ {
22
+ variants: {
23
+ variant: {
24
+ success: ["bg-green-800"],
25
+ error: ["bg-red-800"],
26
+ warning: ["bg-amber-800"]
27
+ }
28
+ },
29
+ defaultVariants: {
30
+ variant: "success"
31
+ }
32
+ }
33
+ ), i = a([
21
34
  "fixed",
22
35
  "bottom-0",
23
36
  "right-0",
@@ -30,15 +43,15 @@ const t = a([
30
43
  "m-0",
31
44
  "z-50",
32
45
  "outline-none"
33
- ]), r = a([
46
+ ]), s = a([
34
47
  "top-2",
35
48
  "right-2",
36
49
  "w-4",
37
50
  "h-4",
38
- "text-kubefirst-primary"
51
+ "text-white"
39
52
  ]);
40
53
  export {
41
- r as closeToastVariants,
42
- t as toastVariants,
43
- o as viewportToastVariants
54
+ s as closeToastVariants,
55
+ e as toastVariants,
56
+ i as viewportToastVariants
44
57
  };
@@ -1,28 +1,29 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { S as i } from "../../index-DQH6odE9.js";
3
- import { forwardRef as v, useRef as N, useImperativeHandle as w, useMemo as h, isValidElement as x } from "react";
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import { S as u } from "../../index-BvoZGpli.js";
3
+ import { forwardRef as v, useRef as N, useImperativeHandle as h, useMemo as w, isValidElement as x } from "react";
4
4
  import { cn as o } from "../../utils/index.js";
5
5
  import { arrowVariants as R, tooltipVariants as V } from "./Tooltip.variants.js";
6
- import { useTooltip as b } from "./hooks/useTooltip.js";
6
+ import { useTooltip as T } from "./hooks/useTooltip.js";
7
+ import { Typography as b } from "../Typography/Typography.js";
7
8
  const I = v(
8
- ({ children: r, content: l, className: m, theme: n, position: a, wrapperClassName: c }, p) => {
9
- const f = N(null), { isVisible: d, componentRef: s } = b();
10
- w(p, () => s.current, [s]);
11
- const u = h(
9
+ ({ children: r, content: i, className: m, theme: l, position: a, wrapperClassName: n }, p) => {
10
+ const c = N(null), { isVisible: f, componentRef: t } = T();
11
+ h(p, () => t.current, [t]);
12
+ const d = w(
12
13
  () => x(r) ? r : /* @__PURE__ */ e("p", { className: "p-2", children: r }),
13
14
  [r]
14
15
  );
15
- return /* @__PURE__ */ e("div", { className: o("w-full", c), "data-theme": n, children: /* @__PURE__ */ t("div", { className: "relative w-max", children: [
16
- /* @__PURE__ */ e(i, { ref: s, className: o("cursor-pointer ", m), children: u }),
17
- /* @__PURE__ */ t(
16
+ return /* @__PURE__ */ e("div", { className: o("w-full", n), "data-theme": l, children: /* @__PURE__ */ s("div", { className: "relative w-max", children: [
17
+ /* @__PURE__ */ e(u, { ref: t, className: o("cursor-pointer ", m), children: d }),
18
+ /* @__PURE__ */ s(
18
19
  "div",
19
20
  {
20
- ref: f,
21
+ ref: c,
21
22
  className: o(V({ position: a })),
22
- "data-visible": d,
23
+ "data-visible": f,
23
24
  children: [
24
25
  /* @__PURE__ */ e("span", { className: o(R({ position: a })) }),
25
- /* @__PURE__ */ e(i, { children: l })
26
+ /* @__PURE__ */ e(b, { variant: "tooltip", className: "text-white", children: i })
26
27
  ]
27
28
  }
28
29
  )
@@ -3,8 +3,9 @@ const a = r(
3
3
  [
4
4
  "absolute",
5
5
  "w-max",
6
- "p-2.5",
7
- "rounded-lg",
6
+ "py-2",
7
+ "px-[6px]",
8
+ "rounded-xs",
8
9
  "shadow-md",
9
10
  "transition-all",
10
11
  "ease-linear",
@@ -12,7 +13,7 @@ const a = r(
12
13
  "duration-250",
13
14
  "[&[data-visible='true']]:opacity-100",
14
15
  "delay-100",
15
- "bg-kubefirst-primary"
16
+ "bg-slate-700"
16
17
  ],
17
18
  {
18
19
  variants: {
@@ -28,7 +29,7 @@ const a = r(
28
29
  }
29
30
  }
30
31
  ), o = r(
31
- ["absolute", "w-0", "h-0", "border-kubefirst-primary"],
32
+ ["absolute", "w-0", "h-0", "border-slate-700"],
32
33
  {
33
34
  variants: {
34
35
  position: {
@@ -1,28 +1,26 @@
1
- import { jsx as y } from "react/jsx-runtime";
2
- import { forwardRef as f } from "react";
3
- import { cn as n } from "../../utils/index.js";
4
- import { typographyVariants as c } from "./Typography.variants.js";
5
- const h = f(
6
- ({ className: r, theme: p, children: m, variant: o, component: t, ...e }, a) => {
7
- const s = t ?? (o?.includes("h") ? o : "p");
8
- return /* @__PURE__ */ y(
9
- s,
10
- {
11
- ref: a,
12
- "data-theme": p,
13
- className: n(
14
- c({
15
- className: r,
16
- variant: o
17
- })
18
- ),
19
- ...e,
20
- children: m
21
- }
22
- );
23
- }
24
- );
25
- h.displayName = "Typography";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as y } from "react";
3
+ import { cn as c } from "../../utils/index.js";
4
+ import { typographyVariants as f } from "./Typography.variants.js";
5
+ const h = y(({ className: r, theme: p, children: t, variant: o, component: m, ...e }, s) => {
6
+ const a = m ?? (o?.includes("h") ? o : "p");
7
+ return /* @__PURE__ */ n(
8
+ a,
9
+ {
10
+ ref: s,
11
+ "data-theme": p,
12
+ className: c(
13
+ f({
14
+ className: r,
15
+ variant: o
16
+ })
17
+ ),
18
+ ...e,
19
+ children: t
20
+ }
21
+ );
22
+ });
23
+ h.displayName = "KonstructTypography";
26
24
  export {
27
25
  h as Typography
28
26
  };
@@ -1,57 +1,60 @@
1
1
  import { c as t } from "../../index-D29mdTf5.js";
2
- const e = t([], {
3
- variants: {
4
- variant: {
5
- h1: ["text-[57px]", "leading-[64px]"],
6
- h2: ["text-[45px]", "leading-[52px]"],
7
- h3: ["text-[36px]", "leading-[44px]"],
8
- h4: ["text-[32px]", "leading-[40px]"],
9
- h5: ["text-[28px]", "leading-[36px]"],
10
- h6: ["text-[24px]", "font-medium", "leading-[32px]", "tracking-[0.15px]"],
11
- subtitle1: ["text-[22px]", "leading-[28px]"],
12
- subtitle2: [
13
- "text-[16px]",
14
- "font-medium",
15
- "leading-[24px]",
16
- "tracking-[0.15px]"
17
- ],
18
- subtitle3: [
19
- "text-[14px]",
20
- "font-medium",
21
- "leading-[20px]",
22
- "tracking-[0.1px]"
23
- ],
24
- labelLarge: ["text-[14px]", "leading-[20px]", "tracking-[0.1px]"],
25
- labelMedium: [
26
- "text-[12px]",
27
- "font-medium",
28
- "leading-[16px]",
29
- "tracking-[0.5px]",
30
- "uppercase"
31
- ],
32
- labelSmall: [
33
- "text-[11px]",
34
- "font-medium",
35
- "leading-[16px]",
36
- "tracking-[0.5px]",
37
- "uppercase"
38
- ],
39
- buttonSmall: [
40
- "text-[14px]",
41
- "font-semibold",
42
- "leading-[20px]",
43
- "tracking-[0.25px]"
44
- ],
45
- body1: ["text-[16px]", "leading-[24px]", "tracking-[0.5px]"],
46
- body2: ["text-[14px]", "leading-[20px]", "tracking-[0.25px]"],
47
- body3: ["text-[12px]", "leading-[16px]", "tracking-[0.4px]"],
48
- tooltip: ["text-[14px]", "leading-[22px]"]
2
+ const a = t(
3
+ ["text-slate-800", "dark:text-metal-50"],
4
+ {
5
+ variants: {
6
+ variant: {
7
+ h1: ["text-[57px]", "leading-16"],
8
+ h2: ["text-[45px]", "leading-13"],
9
+ h3: ["text-4xl", "leading-11"],
10
+ h4: ["text-[32px]", "leading-10"],
11
+ h5: ["text-[28px]", "leading-9"],
12
+ h6: ["text-2xl", "font-medium", "leading-8", "tracking-[0.15px]"],
13
+ subtitle1: ["text-[22px]", "leading-7"],
14
+ subtitle2: ["text-sm", "font-medium", "leading-6", "tracking-[0.15px]"],
15
+ subtitle3: [
16
+ "text-[14px]",
17
+ "font-medium",
18
+ "leading-5",
19
+ "tracking-[0.1px]"
20
+ ],
21
+ labelLarge: [
22
+ "text-sm",
23
+ "font-medium",
24
+ "text-slate-500",
25
+ "dark:text-metal-50"
26
+ ],
27
+ labelMedium: [
28
+ "text-[12px]",
29
+ "font-medium",
30
+ "leading-4",
31
+ "tracking-[0.5px]",
32
+ "uppercase"
33
+ ],
34
+ labelSmall: [
35
+ "text-[11px]",
36
+ "font-medium",
37
+ "leading-4",
38
+ "tracking-[0.5px]",
39
+ "uppercase"
40
+ ],
41
+ buttonSmall: [
42
+ "text-[14px]",
43
+ "font-semibold",
44
+ "leading-5",
45
+ "tracking-[0.25px]"
46
+ ],
47
+ body1: ["text-base", "leading-6", "tracking-[0.5px]"],
48
+ body2: ["text-sm", "leading-5", "tracking-[0.25px]"],
49
+ body3: ["text-xs", "leading-4", "tracking-[0.4px]"],
50
+ tooltip: ["text-sm", "leading-5.5"]
51
+ }
52
+ },
53
+ defaultVariants: {
54
+ variant: "body1"
49
55
  }
50
- },
51
- defaultVariants: {
52
- variant: "body1"
53
56
  }
54
- });
57
+ );
55
58
  export {
56
- e as typographyVariants
59
+ a as typographyVariants
57
60
  };
@@ -1,99 +1,125 @@
1
- import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
- import { useMemo as V } from "react";
3
- import { cn as g } from "../../utils/index.js";
4
- import { TableProvider as j } from "./contexts/table.provider.js";
5
- import { Filter as w } from "./components/Filter/Filter.js";
6
- import { Header as y } from "./components/Header/Header.js";
7
- import { Body as B } from "./components/Body/Body.js";
8
- import { Pagination as H } from "./components/Pagination/Pagination.js";
9
- import { TruncateText as K } from "./components/TruncateText/TruncateText.js";
10
- import { Actions as M } from "./components/Actions/Actions.js";
11
- const P = ({
12
- id: s,
13
- ariaLabel: c,
1
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
+ import { useMemo as I } from "react";
3
+ import { cn as c } from "../../utils/index.js";
4
+ import { TableProvider as K } from "./contexts/table.provider.js";
5
+ import { Filter as M } from "./components/Filter/Filter.js";
6
+ import { WrapperBody as W } from "./components/WrapperBody/WrapperBody.js";
7
+ import { Header as g } from "./components/Header/Header.js";
8
+ import { Body as q } from "./components/Body/Body.js";
9
+ import { Pagination as C } from "./components/Pagination/Pagination.js";
10
+ import { TruncateText as F } from "./components/TruncateText/TruncateText.js";
11
+ import { Actions as G } from "./components/Actions/Actions.js";
12
+ const J = ({
13
+ id: n,
14
+ ariaLabel: p,
14
15
  columns: d,
15
- data: n,
16
- totalItems: f,
17
- classNameHeaderTable: p,
18
- classNameHeaderArrows: u,
19
- classNameHeaderActiveArrows: b,
20
- fetchData: T,
16
+ data: f,
17
+ totalItems: u = -1 / 0,
18
+ className: b,
19
+ classNameHeaderActiveArrows: T,
20
+ classNameHeaderArrows: N,
21
+ classNameHeaderTable: x,
22
+ classNameTable: A,
23
+ classNameWrapperTable: y,
24
+ isLoading: a,
25
+ fetchData: h,
26
+ queryOptions: z,
21
27
  // Pagination
22
- showPagination: N,
23
- showTotalItems: o,
24
- showDropdownPagination: l,
25
- showDotPagination: a,
26
- showFormPagination: i,
27
- pageSizes: h,
28
+ showPagination: B,
29
+ showTotalItems: t,
30
+ showDropdownPagination: i,
31
+ showDotPagination: l,
32
+ showFormPagination: m,
33
+ pageSizes: V,
28
34
  // Filter
29
- showFilter: x = !1,
30
- showFilterInput: A,
35
+ showFilter: j = !1,
36
+ showFilterInput: k,
31
37
  filterSearchPlaceholder: v = "",
32
- multiSelectFilter: z
38
+ multiSelectFilter: w,
39
+ filterActions: P,
40
+ showResetButton: E = !0,
41
+ resetButtonClassName: H
33
42
  }) => {
34
- const t = V(
35
- () => N || [
36
- o,
43
+ const e = I(
44
+ () => B || [
45
+ t,
46
+ i,
37
47
  l,
38
- a,
39
- i
48
+ m
40
49
  ].some(Boolean),
41
50
  []
42
51
  );
43
52
  return /* @__PURE__ */ r(
44
- j,
53
+ K,
45
54
  {
46
- id: s,
55
+ id: n,
47
56
  columns: d,
48
- data: n,
49
- fetchData: T,
50
- totalItems: f,
51
- children: /* @__PURE__ */ m("section", { children: [
52
- x && /* @__PURE__ */ r(
53
- w,
57
+ data: f,
58
+ fetchData: h,
59
+ totalItems: u,
60
+ queryOptions: z,
61
+ isPaginationEnabled: e,
62
+ children: /* @__PURE__ */ s("section", { className: c("w-full min-w-fit", b), children: [
63
+ j && /* @__PURE__ */ r(
64
+ M,
54
65
  {
66
+ actions: P,
67
+ multiSelectFilter: w,
55
68
  placeholder: v,
56
- multiSelectFilter: z,
57
- showFilterInput: A
69
+ showFilterInput: k,
70
+ showResetButton: E,
71
+ resetButtonClassName: H
58
72
  }
59
73
  ),
60
74
  /* @__PURE__ */ r(
61
- "div",
75
+ W,
62
76
  {
63
- className: g("shadow rounded-t-lg", {
64
- "overflow-hidden rounded-lg": !t
65
- }),
66
- children: /* @__PURE__ */ m("table", { className: "w-full border-collapse", "aria-label": c, children: [
67
- /* @__PURE__ */ r(
68
- y,
69
- {
70
- className: p,
71
- classNameArrows: u,
72
- classNameActiveArrows: b
73
- }
74
- ),
75
- /* @__PURE__ */ r(B, {})
76
- ] })
77
+ showPagination: e,
78
+ classNameWrapperTable: y,
79
+ isLoading: a,
80
+ children: /* @__PURE__ */ s(
81
+ "table",
82
+ {
83
+ className: c(
84
+ "w-full border-collapse table-auto",
85
+ "dark:border-separate dark:border-spacing-0",
86
+ A
87
+ ),
88
+ "aria-label": p,
89
+ children: [
90
+ /* @__PURE__ */ r(
91
+ g,
92
+ {
93
+ className: x,
94
+ classNameArrows: N,
95
+ classNameActiveArrows: T
96
+ }
97
+ ),
98
+ /* @__PURE__ */ r(q, { isLoading: a, showPagination: e })
99
+ ]
100
+ }
101
+ )
77
102
  }
78
103
  ),
79
- t && /* @__PURE__ */ r(
80
- H,
104
+ e && /* @__PURE__ */ r(
105
+ C,
81
106
  {
82
- showTotalItems: o,
83
- showDropdownPagination: l,
84
- showDotPagination: a,
85
- showFormPagination: i,
86
- pageSizes: h
107
+ showTotalItems: t,
108
+ showDropdownPagination: i,
109
+ showDotPagination: l,
110
+ showFormPagination: m,
111
+ pageSizes: V,
112
+ isLoading: a
87
113
  }
88
114
  )
89
115
  ] })
90
116
  }
91
117
  );
92
- }, e = P;
93
- e.displayName = "KonstructVirtualizedTable";
94
- e.TruncateText = K;
95
- e.Actions = M;
118
+ }, o = J;
119
+ o.displayName = "KonstructVirtualizedTable";
120
+ o.TruncateText = F;
121
+ o.Actions = G;
96
122
  export {
97
- K as TruncateText,
98
- e as VirtualizedTable
123
+ F as TruncateText,
124
+ o as VirtualizedTable
99
125
  };
@@ -1,46 +1,108 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { Button as r } from "../../../Button/Button.js";
3
- import { c } from "../../../../createLucideIcon-D2CN7Ma9.js";
4
- /**
5
- * @license lucide-react v0.545.0 - ISC
6
- *
7
- * This source code is licensed under the ISC license.
8
- * See the LICENSE file in the root directory of this source tree.
9
- */
10
- const s = [
11
- ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
12
- ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
13
- ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
14
- ], n = c("ellipsis-vertical", s), u = ({
15
- actions: t,
16
- ...o
17
- }) => t ? /* @__PURE__ */ l("div", { className: "relative group w-fit", children: [
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
+ import { Button as a } from "../../../Button/Button.js";
3
+ import { cn as e } from "../../../../utils/index.js";
4
+ import { E as u } from "../../../../ellipsis-vertical-BVPtjl5f.js";
5
+ const b = ({
6
+ actions: o,
7
+ wrapperClassName: i,
8
+ triggerButtonClassName: n,
9
+ iconTriggerButtonClassName: s,
10
+ wrapperActionsClassName: d,
11
+ wrapperContentActionsClassName: h,
12
+ ...c
13
+ }) => o ? /* @__PURE__ */ l("div", { className: e("relative group", i), children: [
18
14
  /* @__PURE__ */ l(
19
- r,
15
+ a,
20
16
  {
21
- variant: "text",
17
+ variant: "link",
22
18
  shape: "circle",
23
19
  size: "large",
24
- className: "text-slate-400 group-hover:text-slate-800 group-hover:bg-aurora-50",
20
+ className: e(
21
+ "text-slate-400",
22
+ "group-hover:text-slate-800",
23
+ "group-hover:bg-aurora-50",
24
+ "dark:text-metal-400",
25
+ "dark:group-hover:text-aurora-500",
26
+ "dark:group-hover:bg-aurora-900",
27
+ n
28
+ ),
25
29
  role: "presentation",
26
30
  children: [
27
- /* @__PURE__ */ e(n, { "aria-hidden": "true", className: "w-7 h-7" }),
28
- /* @__PURE__ */ e("span", { className: "sr-only", children: "Show Actions" })
31
+ /* @__PURE__ */ r(
32
+ u,
33
+ {
34
+ "aria-hidden": "true",
35
+ className: e("w-7 h-7", s)
36
+ }
37
+ ),
38
+ /* @__PURE__ */ r("span", { className: "sr-only", children: "Show Actions" })
29
39
  ]
30
40
  }
31
41
  ),
32
- /* @__PURE__ */ e("div", { className: "absolute top-full right-0 w-[215px] hidden group-hover:block z-10", children: /* @__PURE__ */ e("div", { className: "bg-white mt-0.5 py-2 rounded-lg shadow-lg border border-zinc-100 animate-in fade-in-0", children: t.map(({ label: i, onClick: a }) => /* @__PURE__ */ e(
33
- r,
42
+ /* @__PURE__ */ r(
43
+ "div",
34
44
  {
35
- className: "w-full text-slate-800 cursor-pointer p-0 h-9 flex gap-2 text-sm font-normal justify-start hover:bg-gray-50 hover:text-slate-800 rounded-none px-6",
36
- variant: "text",
37
- asChild: !0,
38
- role: "presentation",
39
- children: /* @__PURE__ */ e(r, { onClick: () => a(o.row.original), children: i })
40
- },
41
- i
42
- )) }) })
45
+ className: e(
46
+ "absolute",
47
+ "top-full",
48
+ "right-0",
49
+ "w-53.75",
50
+ "hidden",
51
+ "group-hover:block",
52
+ "z-10",
53
+ d
54
+ ),
55
+ children: /* @__PURE__ */ r(
56
+ "div",
57
+ {
58
+ className: e(
59
+ "bg-white",
60
+ "mt-0.5",
61
+ "py-2",
62
+ "rounded-lg",
63
+ "shadow-lg",
64
+ "border",
65
+ "border-zinc-100",
66
+ "animate-in",
67
+ "fade-in-0",
68
+ "dark:bg-metal-800",
69
+ "dark:border-metal-700",
70
+ h
71
+ ),
72
+ children: o.map(({ label: t, className: m, onClick: p }) => /* @__PURE__ */ r(
73
+ a,
74
+ {
75
+ className: e(
76
+ "w-full",
77
+ "text-slate-800",
78
+ "cursor-pointer",
79
+ "p-0",
80
+ "h-9",
81
+ "flex",
82
+ "gap-2",
83
+ "text-sm",
84
+ "font-normal",
85
+ "justify-start",
86
+ "rounded-none",
87
+ "px-6",
88
+ "hover:bg-gray-50",
89
+ "hover:text-slate-800",
90
+ "hover:no-underline",
91
+ "dark:hover:bg-metal-700",
92
+ m
93
+ ),
94
+ variant: "link",
95
+ asChild: !0,
96
+ role: "presentation",
97
+ children: /* @__PURE__ */ r(a, { onClick: () => p(c.row.original), children: t })
98
+ },
99
+ t
100
+ ))
101
+ }
102
+ )
103
+ }
104
+ )
43
105
  ] }) : null;
44
106
  export {
45
- u as Actions
107
+ b as Actions
46
108
  };