@konstructio/ui 0.1.3 → 0.1.4

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 (95) hide show
  1. package/dist/{Breadcrumb-DzavonoC.js → Breadcrumb-BiiOnn0p.js} +1 -1
  2. package/dist/{CollapsedSteps-CkMuzOHx.js → CollapsedSteps-Dy2I7XDd.js} +35 -35
  3. package/dist/{Input-C1Js3pbF.js → Input-CE6J6HIW.js} +6 -6
  4. package/dist/components/Alert/Alert.js +19 -18
  5. package/dist/components/Alert/Alert.variants.js +11 -4
  6. package/dist/components/Autocomplete/Autocomplete.variants.js +6 -5
  7. package/dist/components/Badge/Badge.js +20 -20
  8. package/dist/components/Badge/Badge.variants.js +5 -0
  9. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  10. package/dist/components/Breadcrumb/components/BackButton/BackButton.variants.js +1 -1
  11. package/dist/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.js +1 -1
  12. package/dist/components/Breadcrumb/components/Item/Item.variants.js +2 -2
  13. package/dist/components/Breadcrumb/components/index.js +1 -1
  14. package/dist/components/Button/Button.variants.js +2 -1
  15. package/dist/components/ButtonGroup/ButtonGroup.js +67 -63
  16. package/dist/components/ButtonGroup/ButtonGroup.variants.js +18 -5
  17. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +51 -32
  18. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +56 -8
  19. package/dist/components/Checkbox/Checkbox.variants.js +8 -4
  20. package/dist/components/Command/components/DialogContent.js +5 -5
  21. package/dist/components/ConfirmDialog/ConfirmDialog.js +1 -1
  22. package/dist/components/CopyButton/CopyButton.variants.js +4 -3
  23. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +1 -1
  24. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
  25. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.js +1 -1
  26. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
  27. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
  28. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
  29. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
  30. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +1 -1
  31. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +1 -1
  32. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
  33. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
  34. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
  35. package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +15 -14
  36. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +22 -22
  37. package/dist/components/Input/Input.js +1 -1
  38. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +6 -2
  39. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +5 -5
  40. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +1 -1
  41. package/dist/components/Range/Range.variants.js +9 -4
  42. package/dist/components/Select/Select.js +21 -20
  43. package/dist/components/Select/components/ListItem/ListItem.js +47 -37
  44. package/dist/components/Select/contexts/select.context.js +1 -0
  45. package/dist/components/Select/contexts/select.provider.js +28 -27
  46. package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.js +3 -1
  47. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.variants.js +6 -3
  48. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +1 -0
  49. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +4 -2
  50. package/dist/components/Slider/Slider.variants.js +9 -4
  51. package/dist/components/Switch/Switch.variants.js +8 -4
  52. package/dist/components/Table/components/Filter.js +1 -1
  53. package/dist/components/Toast/Toast.variants.js +7 -3
  54. package/dist/components/VirtualizedTable/assets/chevron-down.js +6 -6
  55. package/dist/components/VirtualizedTable/assets/chevron-up.js +4 -4
  56. package/dist/components/VirtualizedTable/components/Body/Body.js +59 -56
  57. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +42 -40
  58. package/dist/components/VirtualizedTable/components/Filter/Filter.js +85 -68
  59. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
  60. package/dist/components/VirtualizedTable/components/Header/Header.js +51 -49
  61. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +34 -33
  62. package/dist/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.js +11 -11
  63. package/dist/components/VirtualizedTable/constants/index.js +10 -5
  64. package/dist/components/VirtualizedTable/constants/responsive.js +70 -1
  65. package/dist/components/VirtualizedTable/hooks/index.js +6 -2
  66. package/dist/components/VirtualizedTable/hooks/useDisplayedColumnCount/index.js +4 -0
  67. package/dist/components/VirtualizedTable/hooks/useDisplayedColumnCount/useDisplayedColumnCount.js +20 -0
  68. package/dist/components/VirtualizedTable/hooks/useIsFlexWrapped/index.js +4 -0
  69. package/dist/components/VirtualizedTable/hooks/useIsFlexWrapped/useIsFlexWrapped.js +18 -0
  70. package/dist/components/VirtualizedTable/utils/index.js +10 -8
  71. package/dist/components/VirtualizedTable/utils/responsive-edges/responsive-edges.js +8 -0
  72. package/dist/components/index.js +77 -73
  73. package/dist/{constants-q2QnJrOb.js → constants-YCGllWdf.js} +1 -1
  74. package/dist/index.js +77 -73
  75. package/dist/lib/components/ButtonGroup/ButtonGroup.types.d.ts +2 -0
  76. package/dist/lib/components/ButtonGroup/ButtonGroup.variants.d.ts +1 -0
  77. package/dist/lib/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +2 -1
  78. package/dist/lib/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +9 -0
  79. package/dist/lib/components/Select/Select.types.d.ts +2 -0
  80. package/dist/lib/components/Select/contexts/select.context.d.ts +1 -0
  81. package/dist/lib/components/Select/contexts/select.provider.d.ts +1 -0
  82. package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +5 -0
  83. package/dist/lib/components/VirtualizedTable/assets/chevron-down.d.ts +1 -2
  84. package/dist/lib/components/VirtualizedTable/assets/chevron-up.d.ts +1 -2
  85. package/dist/lib/components/VirtualizedTable/constants/responsive.d.ts +10 -0
  86. package/dist/lib/components/VirtualizedTable/hooks/index.d.ts +2 -0
  87. package/dist/lib/components/VirtualizedTable/hooks/useDisplayedColumnCount/index.d.ts +1 -0
  88. package/dist/lib/components/VirtualizedTable/hooks/useDisplayedColumnCount/useDisplayedColumnCount.d.ts +1 -0
  89. package/dist/lib/components/VirtualizedTable/hooks/useIsFlexWrapped/index.d.ts +1 -0
  90. package/dist/lib/components/VirtualizedTable/hooks/useIsFlexWrapped/useIsFlexWrapped.d.ts +2 -0
  91. package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
  92. package/dist/lib/components/VirtualizedTable/utils/responsive-edges/responsive-edges.d.ts +6 -0
  93. package/dist/package.json +8 -8
  94. package/dist/styles.css +1 -1
  95. package/package.json +8 -8
@@ -1,60 +1,62 @@
1
- import { n as N } from "../../../../table.provider-Dhs7WtwK.js";
1
+ import { n as y } from "../../../../table.provider-Dhs7WtwK.js";
2
2
  import { t } from "../../../../utils-DnIJruo0.js";
3
- import w from "../../assets/chevron-down.js";
4
- import y from "../../assets/chevron-up.js";
5
- import { HIDE_BELOW_CLASS as P } from "../../constants/responsive.js";
6
- import { useTableContext as D } from "../../contexts/table.hook.js";
7
- import { getPinnedCellProps as H } from "../../utils/pinned-columns/pinned-columns.js";
8
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
9
- var G = ({ className: p, classNameArrows: f, classNameActiveArrows: l, classNameHeaderContent: h }) => {
10
- const { table: o, headerContent: d, onSorting: n, pinnedWidths: x, getPinnedHeaderRef: b } = D(), g = (a) => {
11
- n([{
12
- id: a.id,
13
- desc: !1
14
- }]);
15
- }, k = (a) => {
16
- n([{
17
- id: a.id,
18
- desc: !0
3
+ import B from "../../assets/chevron-down.js";
4
+ import P from "../../assets/chevron-up.js";
5
+ import { BORDER_EDGE_CLASSES as L, HIDE_BELOW_CLASS as O, ROUNDED_TOP_EDGE_CLASSES as H } from "../../constants/responsive.js";
6
+ import { useTableContext as I } from "../../contexts/table.hook.js";
7
+ import { getPinnedCellProps as T } from "../../utils/pinned-columns/pinned-columns.js";
8
+ import { getResponsiveEdgeClasses as k } from "../../utils/responsive-edges/responsive-edges.js";
9
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
10
+ var j = {
11
+ asc: "ascending",
12
+ desc: "descending",
13
+ none: "none"
14
+ }, J = ({ className: S, classNameArrows: v, classNameActiveArrows: m, classNameHeaderContent: C }) => {
15
+ const { table: n, headerContent: o, onSorting: E, pinnedWidths: N, getPinnedHeaderRef: D } = I(), w = (s) => {
16
+ E([{
17
+ id: s.id,
18
+ desc: s.getIsSorted() === "asc"
19
19
  }]);
20
20
  };
21
- return /* @__PURE__ */ s("thead", {
22
- className: t("kvt-header", "font-semibold", "uppercase", "text-slate-500", "text-xs", "not-italic", "bg-slate-100", "overflow-hidden", "dark:text-slate-300", "dark:bg-metal-800", p),
23
- children: [d && /* @__PURE__ */ r("tr", {
21
+ return /* @__PURE__ */ c("thead", {
22
+ className: t("kvt-header", "font-semibold", "uppercase", "text-slate-500", "text-xs", "not-italic", "bg-slate-100", "overflow-hidden", "dark:text-slate-300", "dark:bg-metal-800", S),
23
+ children: [o && /* @__PURE__ */ r("tr", {
24
24
  "data-header-content": !0,
25
25
  children: /* @__PURE__ */ r("th", {
26
- colSpan: o.getVisibleLeafColumns().length,
27
- className: t("kvt-header-content", "px-6", "py-4", "text-left", "text-sm", "font-normal", "normal-case", "text-slate-800", "bg-white", "rounded-tl-lg", "rounded-tr-lg", "border-b", "border-b-gray-200", "dark:border-b-0", "dark:text-metal-50", "dark:bg-metal-900", "dark:border-t", "dark:border-x", "dark:border-metal-700", h),
28
- children: d
26
+ colSpan: n.getVisibleLeafColumns().length,
27
+ className: t("kvt-header-content", "px-6", "py-4", "text-left", "text-sm", "font-normal", "normal-case", "text-slate-800", "bg-white", "rounded-tl-lg", "rounded-tr-lg", "border-b", "border-b-gray-200", "dark:border-b-0", "dark:text-metal-50", "dark:bg-metal-900", "dark:border-t", "dark:border-x", "dark:border-metal-700", C),
28
+ children: o
29
29
  })
30
- }), o.getHeaderGroups().map(({ id: a, headers: u }) => /* @__PURE__ */ r("tr", {
31
- className: "kvt-header-row",
32
- children: u.map(({ id: C, column: e, getContext: S }) => {
33
- const { hideBelow: i, headerClassName: v } = e.columnDef.meta ?? {}, c = !!e.getIsPinned(), m = H(o, e, x);
34
- return /* @__PURE__ */ r("th", {
35
- scope: "col",
36
- ref: c ? b(e.id) : void 0,
37
- className: t("kvt-header-cell", "px-4", "py-3", "text-left", "text-xs", !d && "first:rounded-tl-lg", !d && "last:rounded-tr-lg", "border-transparent", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", c && "bg-slate-100 dark:bg-metal-800", m.className, i && P[i], v),
38
- style: m.style,
39
- children: /* @__PURE__ */ s("span", {
40
- className: "flex items-center gap-2 w-full",
41
- children: [N(e.columnDef.header, S()), e.getCanSort() && /* @__PURE__ */ s("div", {
42
- className: t("flex flex-col text-slate-400 justify-center items-center gap-1", f),
43
- role: "presentation",
44
- children: [/* @__PURE__ */ r(y, {
45
- className: t("w-2 h-2 cursor-pointer", { "text-blue-600 dark:text-aurora-500": e.getIsSorted() === "asc" }, l),
46
- onClick: () => g(e)
47
- }), /* @__PURE__ */ r(w, {
48
- className: t("w-2 h-2 cursor-pointer", { "text-blue-600 dark:text-aurora-500": e.getIsSorted() === "desc" }, l),
49
- onClick: () => k(e)
30
+ }), n.getHeaderGroups().map(({ id: s, headers: p }) => {
31
+ const d = p.map(({ column: l }) => l.columnDef.meta?.hideBelow), a = d.some(Boolean);
32
+ return /* @__PURE__ */ r("tr", {
33
+ className: "kvt-header-row",
34
+ children: p.map(({ id: l, column: e, getContext: R }, g) => {
35
+ const { hideBelow: f, headerClassName: _ } = e.columnDef.meta ?? {}, b = !!e.getIsPinned(), h = T(n, e, N), x = e.getCanSort(), i = e.getIsSorted(), u = y(e.columnDef.header, R());
36
+ return /* @__PURE__ */ r("th", {
37
+ scope: "col",
38
+ ref: b ? D(e.id) : void 0,
39
+ className: t("kvt-header-cell", "px-4", "py-3", "text-left", "text-xs", !o && !a && "first:rounded-tl-lg", !o && !a && "last:rounded-tr-lg", !o && a && k(d, g, H), "border-transparent", "dark:border-t", "dark:border-metal-700", !a && "dark:first:border-l", !a && "dark:last:border-r", a && k(d, g, L), b && "bg-slate-100 dark:bg-metal-800", h.className, f && O[f], _),
40
+ style: h.style,
41
+ "aria-sort": x ? j[i || "none"] : void 0,
42
+ children: x ? /* @__PURE__ */ c("button", {
43
+ type: "button",
44
+ className: t("relative flex w-full items-center gap-2 text-left", "cursor-pointer rounded-xs outline-none [text-transform:inherit]", "tap-target touch-hit-area", "focus-visible:ring-1 focus-visible:ring-aurora-500"),
45
+ onClick: () => w(e),
46
+ children: [u, /* @__PURE__ */ c("span", {
47
+ className: t("flex flex-col text-slate-400 justify-center items-center gap-1", v),
48
+ children: [/* @__PURE__ */ r(P, { className: t("w-2 h-2", { "text-blue-600 dark:text-aurora-500": i === "asc" }, m) }), /* @__PURE__ */ r(B, { className: t("w-2 h-2", { "text-blue-600 dark:text-aurora-500": i === "desc" }, m) })]
50
49
  })]
51
- })]
52
- })
53
- }, C);
54
- })
55
- }, a))]
50
+ }) : /* @__PURE__ */ r("span", {
51
+ className: "flex items-center gap-2 w-full",
52
+ children: u
53
+ })
54
+ }, l);
55
+ })
56
+ }, s);
57
+ })]
56
58
  });
57
59
  };
58
60
  export {
59
- G as Header
61
+ J as Header
60
62
  };
@@ -1,50 +1,51 @@
1
- import { t as p } from "../../../../ellipsis-vertical-C_yX7aQe.js";
2
- import { Button as g } from "../../../Button/Button.js";
3
- import { HIDE_BELOW_CLASS as m } from "../../constants/responsive.js";
4
- import { useTableContext as f } from "../../contexts/table.hook.js";
5
- import { getPinnedCellProps as k } from "../../utils/pinned-columns/pinned-columns.js";
6
- import { t as l } from "../../../../utils-DnIJruo0.js";
7
- import { jsx as e } from "react/jsx-runtime";
8
- var w = ({ numberOfRows: b, table: n }) => {
9
- const { tableLoading: c, pinnedWidths: h } = f(), r = Array.from({ length: b });
10
- return /* @__PURE__ */ e("tbody", {
1
+ import { t as y } from "../../../../ellipsis-vertical-C_yX7aQe.js";
2
+ import { Button as _ } from "../../../Button/Button.js";
3
+ import { BORDER_EDGE_CLASSES as E, HIDE_BELOW_CLASS as h, ROUNDED_BOTTOM_EDGE_CLASSES as N } from "../../constants/responsive.js";
4
+ import { useTableContext as u } from "../../contexts/table.hook.js";
5
+ import { getPinnedCellProps as D } from "../../utils/pinned-columns/pinned-columns.js";
6
+ import { getResponsiveEdgeClasses as c } from "../../utils/responsive-edges/responsive-edges.js";
7
+ import { t as i } from "../../../../utils-DnIJruo0.js";
8
+ import { jsx as r } from "react/jsx-runtime";
9
+ var T = ({ numberOfRows: g, table: b }) => {
10
+ const { tableLoading: f, pinnedWidths: k } = u(), a = Array.from({ length: g });
11
+ return /* @__PURE__ */ r("tbody", {
11
12
  className: "kvt-skeleton text-slate-800 text-sm font-normal relative",
12
- children: r.map((y, a) => {
13
- const o = n.getVisibleLeafColumns();
14
- return /* @__PURE__ */ e("tr", {
15
- className: l("border-b", "border-b-gray-200", "bg-transparent", "last:border-b-transparent"),
16
- children: o.map((t, s) => {
17
- const { hideBelow: d } = t.columnDef.meta ?? {}, i = k(n, t, h);
18
- return t.id !== "actions" ? /* @__PURE__ */ e("td", {
19
- style: i.style,
20
- className: l("px-4", "py-1", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", "dark:[tr:last-child_&]:border-b", i.className, d && m[d], t.columnDef.meta?.className, {
21
- "[tr:last-child_&:first-of-type]:rounded-bl-lg": a === r.length - 1 && s === 0,
22
- "[tr:last-child_&:last-of-type]:rounded-br-lg": a === r.length - 1 && s === o.length - 1
13
+ children: a.map((S, s) => {
14
+ const d = b.getVisibleLeafColumns(), m = d.map((e) => e.columnDef.meta?.hideBelow), t = m.some(Boolean), p = (e) => [c(m, e, E), s === a.length - 1 && c(m, e, N)];
15
+ return /* @__PURE__ */ r("tr", {
16
+ className: i("border-b", "border-b-gray-200", "bg-transparent", "last:border-b-transparent"),
17
+ children: d.map((e, l) => {
18
+ const { hideBelow: o } = e.columnDef.meta ?? {}, n = D(b, e, k);
19
+ return e.id !== "actions" ? /* @__PURE__ */ r("td", {
20
+ style: n.style,
21
+ className: i("px-4", "py-1", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", !t && "dark:first:border-l", !t && "dark:last:border-r", t && p(l), "dark:[tr:last-child_&]:border-b", n.className, o && h[o], e.columnDef.meta?.className, {
22
+ "[tr:last-child_&:first-of-type]:rounded-bl-lg": !t && s === a.length - 1 && l === 0,
23
+ "[tr:last-child_&:last-of-type]:rounded-br-lg": !t && s === a.length - 1 && l === d.length - 1
23
24
  }),
24
- children: /* @__PURE__ */ e("div", {
25
+ children: /* @__PURE__ */ r("div", {
25
26
  className: "animate-in fade-in-0",
26
- children: /* @__PURE__ */ e("div", { className: l("bg-gray-200", "dark:bg-metal-700", "animate-pulse", "rounded", "h-5", "w-full") })
27
+ children: /* @__PURE__ */ r("div", { className: i("bg-gray-200", "dark:bg-metal-700", "animate-pulse", "rounded", "h-5", "w-full") })
27
28
  })
28
- }, `skeleton-${t.id}`) : /* @__PURE__ */ e("td", {
29
- style: i.style,
30
- className: l("px-4", "py-1", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", "dark:[tr:last-child_&]:border-b", i.className, d && m[d], t.columnDef.meta?.className, {
31
- "[tr:last-child_&:first-of-type]:rounded-bl-lg": a === r.length - 1 && s === 0,
32
- "[tr:last-child_&:last-of-type]:rounded-br-lg": a === r.length - 1 && s === o.length - 1
29
+ }, `skeleton-${e.id}`) : /* @__PURE__ */ r("td", {
30
+ style: n.style,
31
+ className: i("px-4", "py-1", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", !t && "dark:first:border-l", !t && "dark:last:border-r", t && p(l), "dark:[tr:last-child_&]:border-b", n.className, o && h[o], e.columnDef.meta?.className, {
32
+ "[tr:last-child_&:first-of-type]:rounded-bl-lg": !t && s === a.length - 1 && l === 0,
33
+ "[tr:last-child_&:last-of-type]:rounded-br-lg": !t && s === a.length - 1 && l === d.length - 1
33
34
  }),
34
- children: /* @__PURE__ */ e(g, {
35
+ children: /* @__PURE__ */ r(_, {
35
36
  variant: "link",
36
37
  shape: "circle",
37
38
  size: "large",
38
39
  disabled: !0,
39
40
  "aria-hidden": "true",
40
- children: /* @__PURE__ */ e(p, { className: l("w-5", "h-5", "text-slate-400", "dark:text-metal-700", { "text-gray-300 animate-pulse": c }) })
41
+ children: /* @__PURE__ */ r(y, { className: i("w-5", "h-5", "text-slate-400", "dark:text-metal-700", { "text-gray-300 animate-pulse": f }) })
41
42
  })
42
- }, `skeleton-${t.id}`);
43
+ }, `skeleton-${e.id}`);
43
44
  })
44
- }, `skeleton-row-${a}`);
45
+ }, `skeleton-row-${s}`);
45
46
  })
46
47
  });
47
48
  };
48
49
  export {
49
- w as Skeleton
50
+ T as Skeleton
50
51
  };
@@ -1,4 +1,4 @@
1
- import { t as p } from "../../../../utils-DnIJruo0.js";
1
+ import { t as d } from "../../../../utils-DnIJruo0.js";
2
2
  import { t as rr } from "../../../../table.provider-Dhs7WtwK.js";
3
3
  import { Body as er } from "../Body/Body.js";
4
4
  import { Filter as ar } from "../Filter/Filter.js";
@@ -7,18 +7,18 @@ import { Pagination as lr } from "../Pagination/Pagination.js";
7
7
  import { ScrollContainer as or } from "../ScrollContainer/ScrollContainer.js";
8
8
  import { WrapperBody as ir } from "../WrapperBody/WrapperBody.js";
9
9
  import { jsx as r, jsxs as l } from "react/jsx-runtime";
10
- var ur = ({ id: o, ariaLabel: d, columns: n, data: b, totalItems: h = -1 / 0, className: u, classNameHeaderActiveArrows: v, classNameHeaderArrows: N, classNameHeaderTable: k, classNameTable: x, classNameWrapperTable: y, isLoading: a, emptyState: A, errorState: B, headerContent: j, classNameHeaderContent: w, classNameScrollContainer: i, columnPinning: t, getRowId: C, fetchData: P, queryOptions: g, showPagination: z, showTotalItems: s, showDropdownPagination: m, showDotPagination: c, showFormPagination: f, pageSizes: E, dropdownPaginationDirection: H, showFilter: T = !1, showFilterInput: V, filterSearchPlaceholder: W = "", filters: q, multiSelectFilter: F, filterActions: G, showResetButton: I = !0, resetButtonClassName: J, closeOnApply: K = !0, enableHoverRow: M, classNameHoverRow: O, enableExpandedRow: Q, expandedState: R, defaultExpanded: S, classNameExpandedRow: U, classNameExpandedCell: X, classNameExpandedContent: Y, classNameExpandedHeader: Z, classNameActiveExpandedRow: _, onExpandedChange: $, renderExpandedRow: L, keepExpandColumnVisible: D }) => {
10
+ var ur = ({ id: o, ariaLabel: f, columns: n, data: b, totalItems: h = -1 / 0, className: u, classNameHeaderActiveArrows: v, classNameHeaderArrows: N, classNameHeaderTable: k, classNameTable: w, classNameWrapperTable: y, isLoading: a, emptyState: x, errorState: A, headerContent: B, classNameHeaderContent: j, classNameScrollContainer: i, columnPinning: t, getRowId: C, fetchData: P, queryOptions: g, showPagination: z, showTotalItems: s, showDropdownPagination: m, showDotPagination: c, showFormPagination: p, pageSizes: E, dropdownPaginationDirection: H, showFilter: T = !1, showFilterInput: V, filterSearchPlaceholder: W = "", filters: q, multiSelectFilter: F, filterActions: G, showResetButton: I = !0, resetButtonClassName: J, closeOnApply: K = !0, enableHoverRow: M, classNameHoverRow: O, enableExpandedRow: Q, expandedState: R, defaultExpanded: S, classNameExpandedRow: U, classNameExpandedCell: X, classNameExpandedContent: Y, classNameExpandedHeader: Z, classNameActiveExpandedRow: _, onExpandedChange: $, renderExpandedRow: L, keepExpandColumnVisible: D }) => {
11
11
  const e = z || [
12
12
  s,
13
13
  m,
14
14
  c,
15
- f
15
+ p
16
16
  ].some(Boolean);
17
17
  return /* @__PURE__ */ r(rr, {
18
18
  id: o,
19
19
  columns: n,
20
20
  data: b,
21
- headerContent: j,
21
+ headerContent: B,
22
22
  getRowId: C,
23
23
  fetchData: P,
24
24
  totalItems: h,
@@ -39,7 +39,7 @@ var ur = ({ id: o, ariaLabel: d, columns: n, data: b, totalItems: h = -1 / 0, cl
39
39
  keepExpandColumnVisible: D,
40
40
  columnPinning: t,
41
41
  children: /* @__PURE__ */ l("section", {
42
- className: p("kvt", "w-full min-w-fit", u),
42
+ className: d("kvt", "w-full min-w-fit", u),
43
43
  children: [T && /* @__PURE__ */ r(ar, {
44
44
  id: o,
45
45
  actions: G,
@@ -58,25 +58,25 @@ var ur = ({ id: o, ariaLabel: d, columns: n, data: b, totalItems: h = -1 / 0, cl
58
58
  classNameWrapperTable: y,
59
59
  isLoading: a,
60
60
  children: /* @__PURE__ */ l("table", {
61
- className: p("kvt-table", "w-full border-collapse table-auto", "dark:border-separate dark:border-spacing-0", x),
62
- "aria-label": d,
61
+ className: d("kvt-table", "w-full border-collapse table-auto", "dark:border-separate dark:border-spacing-0", w, "has-[[data-empty-row]]:min-w-0!"),
62
+ "aria-label": f,
63
63
  children: [/* @__PURE__ */ r(tr, {
64
64
  className: k,
65
65
  classNameArrows: N,
66
66
  classNameActiveArrows: v,
67
- classNameHeaderContent: w
67
+ classNameHeaderContent: j
68
68
  }), /* @__PURE__ */ r(er, {
69
69
  isLoading: a,
70
70
  showPagination: e,
71
- emptyState: A,
72
- errorState: B
71
+ emptyState: x,
72
+ errorState: A
73
73
  })]
74
74
  })
75
75
  }), e && /* @__PURE__ */ r(lr, {
76
76
  showTotalItems: s,
77
77
  showDropdownPagination: m,
78
78
  showDotPagination: c,
79
- showFormPagination: f,
79
+ showFormPagination: p,
80
80
  pageSizes: E,
81
81
  isLoading: a,
82
82
  isListPortal: !!i,
@@ -1,7 +1,12 @@
1
- import { DEFAULT_PAGE_SIZE as _, DEFAULT_PAGE_SIZES as o } from "./pagination.js";
2
- import { HIDE_BELOW_CLASS as A } from "./responsive.js";
1
+ import { DEFAULT_PAGE_SIZE as S, DEFAULT_PAGE_SIZES as _ } from "./pagination.js";
2
+ import { BORDER_EDGE_CLASSES as O, HIDE_BELOW_CLASS as A, RESPONSIVE_TIERS as L, ROUNDED_BOTTOM_EDGE_CLASSES as R, ROUNDED_TOP_EDGE_CLASSES as T, SHOW_BELOW_CLASS as o } from "./responsive.js";
3
3
  export {
4
- _ as DEFAULT_PAGE_SIZE,
5
- o as DEFAULT_PAGE_SIZES,
6
- A as HIDE_BELOW_CLASS
4
+ O as BORDER_EDGE_CLASSES,
5
+ S as DEFAULT_PAGE_SIZE,
6
+ _ as DEFAULT_PAGE_SIZES,
7
+ A as HIDE_BELOW_CLASS,
8
+ L as RESPONSIVE_TIERS,
9
+ R as ROUNDED_BOTTOM_EDGE_CLASSES,
10
+ T as ROUNDED_TOP_EDGE_CLASSES,
11
+ o as SHOW_BELOW_CLASS
7
12
  };
@@ -4,7 +4,76 @@ var d = {
4
4
  lg: "max-lg:hidden",
5
5
  xl: "max-xl:hidden",
6
6
  "2xl": "max-2xl:hidden"
7
+ }, l = {
8
+ sm: "sm:hidden",
9
+ md: "md:hidden",
10
+ lg: "lg:hidden",
11
+ xl: "xl:hidden",
12
+ "2xl": "2xl:hidden"
13
+ }, r = [
14
+ "base",
15
+ "sm",
16
+ "md",
17
+ "lg",
18
+ "xl",
19
+ "2xl"
20
+ ], x = {
21
+ left: {
22
+ base: "max-sm:dark:border-l",
23
+ sm: "sm:max-md:dark:border-l",
24
+ md: "md:max-lg:dark:border-l",
25
+ lg: "lg:max-xl:dark:border-l",
26
+ xl: "xl:max-2xl:dark:border-l",
27
+ "2xl": "2xl:dark:border-l"
28
+ },
29
+ right: {
30
+ base: "max-sm:dark:border-r",
31
+ sm: "sm:max-md:dark:border-r",
32
+ md: "md:max-lg:dark:border-r",
33
+ lg: "lg:max-xl:dark:border-r",
34
+ xl: "xl:max-2xl:dark:border-r",
35
+ "2xl": "2xl:dark:border-r"
36
+ }
37
+ }, m = {
38
+ left: {
39
+ base: "max-sm:rounded-tl-lg",
40
+ sm: "sm:max-md:rounded-tl-lg",
41
+ md: "md:max-lg:rounded-tl-lg",
42
+ lg: "lg:max-xl:rounded-tl-lg",
43
+ xl: "xl:max-2xl:rounded-tl-lg",
44
+ "2xl": "2xl:rounded-tl-lg"
45
+ },
46
+ right: {
47
+ base: "max-sm:rounded-tr-lg",
48
+ sm: "sm:max-md:rounded-tr-lg",
49
+ md: "md:max-lg:rounded-tr-lg",
50
+ lg: "lg:max-xl:rounded-tr-lg",
51
+ xl: "xl:max-2xl:rounded-tr-lg",
52
+ "2xl": "2xl:rounded-tr-lg"
53
+ }
54
+ }, a = {
55
+ left: {
56
+ base: "max-sm:rounded-bl-lg",
57
+ sm: "sm:max-md:rounded-bl-lg",
58
+ md: "md:max-lg:rounded-bl-lg",
59
+ lg: "lg:max-xl:rounded-bl-lg",
60
+ xl: "xl:max-2xl:rounded-bl-lg",
61
+ "2xl": "2xl:rounded-bl-lg"
62
+ },
63
+ right: {
64
+ base: "max-sm:rounded-br-lg",
65
+ sm: "sm:max-md:rounded-br-lg",
66
+ md: "md:max-lg:rounded-br-lg",
67
+ lg: "lg:max-xl:rounded-br-lg",
68
+ xl: "xl:max-2xl:rounded-br-lg",
69
+ "2xl": "2xl:rounded-br-lg"
70
+ }
7
71
  };
8
72
  export {
9
- d as HIDE_BELOW_CLASS
73
+ x as BORDER_EDGE_CLASSES,
74
+ d as HIDE_BELOW_CLASS,
75
+ r as RESPONSIVE_TIERS,
76
+ a as ROUNDED_BOTTOM_EDGE_CLASSES,
77
+ m as ROUNDED_TOP_EDGE_CLASSES,
78
+ l as SHOW_BELOW_CLASS
10
79
  };
@@ -1,4 +1,8 @@
1
- import { useVirtualizedTableReady as r } from "./useVirtualizedTableReady/useVirtualizedTableReady.js";
1
+ import { useVirtualizedTableReady as o } from "./useVirtualizedTableReady/useVirtualizedTableReady.js";
2
+ import { useIsFlexWrapped as m } from "./useIsFlexWrapped/useIsFlexWrapped.js";
3
+ import { useDisplayedColumnCount as i } from "./useDisplayedColumnCount/useDisplayedColumnCount.js";
2
4
  export {
3
- r as useVirtualizedTableReady
5
+ i as useDisplayedColumnCount,
6
+ m as useIsFlexWrapped,
7
+ o as useVirtualizedTableReady
4
8
  };
@@ -0,0 +1,4 @@
1
+ import { useDisplayedColumnCount as e } from "./useDisplayedColumnCount.js";
2
+ export {
3
+ e as useDisplayedColumnCount
4
+ };
@@ -0,0 +1,20 @@
1
+ import { useEffect as c, useState as u } from "react";
2
+ var d = (t) => {
3
+ const o = t.tHead?.rows[t.tHead.rows.length - 1];
4
+ if (!o) return;
5
+ const r = Array.from(o.cells).reduce((n, e) => getComputedStyle(e).display === "none" ? n : n + e.colSpan, 0);
6
+ return r > 0 ? r : void 0;
7
+ }, a = () => {
8
+ const [t, o] = u(null), [r, n] = u();
9
+ return c(() => {
10
+ const e = t?.closest("table");
11
+ if (!e || typeof ResizeObserver > "u") return;
12
+ const s = new ResizeObserver(() => {
13
+ n(d(e));
14
+ });
15
+ return s.observe(e), () => s.disconnect();
16
+ }, [t]), [o, r];
17
+ };
18
+ export {
19
+ a as useDisplayedColumnCount
20
+ };
@@ -0,0 +1,4 @@
1
+ import { useIsFlexWrapped as p } from "./useIsFlexWrapped.js";
2
+ export {
3
+ p as useIsFlexWrapped
4
+ };
@@ -0,0 +1,18 @@
1
+ import { useEffect as o, useState as f } from "react";
2
+ var i = (e) => {
3
+ const r = e.firstElementChild, s = e.lastElementChild;
4
+ return !r || !s || r === s ? !1 : s.offsetTop > r.offsetTop;
5
+ }, a = (e) => {
6
+ const [r, s] = f(!1);
7
+ return o(() => {
8
+ const t = e.current;
9
+ if (!t || typeof ResizeObserver > "u") return;
10
+ const n = new ResizeObserver(() => {
11
+ s(i(t));
12
+ });
13
+ return n.observe(t), () => n.disconnect();
14
+ }, [e]), r;
15
+ };
16
+ export {
17
+ a as useIsFlexWrapped
18
+ };
@@ -1,16 +1,18 @@
1
1
  import { getTableId as i } from "./get-table-id.js";
2
- import { getLoadedVirtualizedTableContent as o, isVirtualizedTableContentLoaded as a, loadVirtualizedTableContent as r, preloadVirtualizedTable as n, subscribeToVirtualizedTableContent as d } from "./load-content/load-content.js";
3
- import { isPaginationBarVisible as b } from "./pagination.js";
4
- import { getPinnedCellProps as s, getPinnedOffset as p, isPinnedBoundary as u } from "./pinned-columns/pinned-columns.js";
2
+ import { getLoadedVirtualizedTableContent as o, isVirtualizedTableContentLoaded as r, loadVirtualizedTableContent as a, preloadVirtualizedTable as n, subscribeToVirtualizedTableContent as d } from "./load-content/load-content.js";
3
+ import { isPaginationBarVisible as s } from "./pagination.js";
4
+ import { getPinnedCellProps as b, getPinnedOffset as p, isPinnedBoundary as f } from "./pinned-columns/pinned-columns.js";
5
+ import { getResponsiveEdgeClasses as u } from "./responsive-edges/responsive-edges.js";
5
6
  export {
6
7
  o as getLoadedVirtualizedTableContent,
7
- s as getPinnedCellProps,
8
+ b as getPinnedCellProps,
8
9
  p as getPinnedOffset,
10
+ u as getResponsiveEdgeClasses,
9
11
  i as getTableId,
10
- b as isPaginationBarVisible,
11
- u as isPinnedBoundary,
12
- a as isVirtualizedTableContentLoaded,
13
- r as loadVirtualizedTableContent,
12
+ s as isPaginationBarVisible,
13
+ f as isPinnedBoundary,
14
+ r as isVirtualizedTableContentLoaded,
15
+ a as loadVirtualizedTableContent,
14
16
  n as preloadVirtualizedTable,
15
17
  d as subscribeToVirtualizedTableContent
16
18
  };
@@ -0,0 +1,8 @@
1
+ import { RESPONSIVE_TIERS as f } from "../../constants/responsive.js";
2
+ var o = (s, t) => !s || f.indexOf(s) <= t, v = (s, t, e) => f.flatMap((i, p) => {
3
+ const a = s.flatMap((n, l) => o(n, p) ? [l] : []), r = [];
4
+ return a[0] === t && r.push(e.left[i]), a.at(-1) === t && r.push(e.right[i]), r;
5
+ });
6
+ export {
7
+ v as getResponsiveEdgeClasses
8
+ };