@ck-ui/component-library 0.3.0 → 1.0.0

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 (122) hide show
  1. package/dist/DropdownFooter-CYkg2g5d.js +89 -0
  2. package/dist/{OptionList-BNaH2PnX.js → OptionList-DN1xZbnV.js} +29 -29
  3. package/dist/assets/DropdownFooter-DjdPf69A.css +1 -0
  4. package/dist/assets/index-B81zpOpq.css +1 -0
  5. package/dist/assets/index-BoQKDmZt.css +1 -0
  6. package/dist/assets/index-Cdmws__2.css +1 -0
  7. package/dist/assets/index-CtR-jzNi.css +1 -0
  8. package/dist/assets/index-PKpDB4Cl.css +1 -0
  9. package/dist/assets/index-i-aBFBOq.css +1 -0
  10. package/dist/assets/{styles-CbbBUzsN.css → styles-Bqfs9eXV.css} +1 -1
  11. package/dist/assets/styles-CYxKrBqL.css +1 -0
  12. package/dist/assets/styles-CZCmGNUn.css +1 -0
  13. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  14. package/dist/components/Breadcrumb/index.js +53 -47
  15. package/dist/components/CKCheckbox/index.d.ts.map +1 -1
  16. package/dist/components/CKCheckbox/index.js +22 -21
  17. package/dist/components/CostComparatorTable/_helpers/CostCell.d.ts +3 -1
  18. package/dist/components/CostComparatorTable/_helpers/CostCell.d.ts.map +1 -1
  19. package/dist/components/CostComparatorTable/_helpers/CostCell.js +30 -28
  20. package/dist/components/CostComparatorTable/_helpers/HeaderCheckbox.js +1 -1
  21. package/dist/components/CostComparatorTable/_types/costComparatorTable.types.d.ts +7 -0
  22. package/dist/components/CostComparatorTable/_types/costComparatorTable.types.d.ts.map +1 -1
  23. package/dist/components/CostComparatorTable/index.d.ts +1 -1
  24. package/dist/components/CostComparatorTable/index.d.ts.map +1 -1
  25. package/dist/components/CostComparatorTable/index.js +93 -85
  26. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  27. package/dist/components/DateRangePicker/DateRangePicker.js +1685 -1651
  28. package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts +10 -0
  29. package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts.map +1 -1
  30. package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
  31. package/dist/components/FusionChart/_config/builders.js +141 -141
  32. package/dist/components/FusionChart/_config/helpers.js +2 -2
  33. package/dist/components/FusionChart/_helpers/doughnutHelper.d.ts.map +1 -1
  34. package/dist/components/FusionChart/_helpers/doughnutHelper.js +56 -43
  35. package/dist/components/FusionChart/index.d.ts.map +1 -1
  36. package/dist/components/FusionChart/index.js +356 -340
  37. package/dist/components/Loader/_types/loader.types.d.ts +10 -0
  38. package/dist/components/Loader/_types/loader.types.d.ts.map +1 -0
  39. package/dist/components/Loader/_types/loader.types.js +1 -0
  40. package/dist/components/Loader/index.d.ts +6 -0
  41. package/dist/components/Loader/index.d.ts.map +1 -0
  42. package/dist/components/Loader/index.js +37 -0
  43. package/dist/components/MAVDropdown/_types/mavDropdown.types.d.ts +27 -0
  44. package/dist/components/MAVDropdown/_types/mavDropdown.types.d.ts.map +1 -0
  45. package/dist/components/MAVDropdown/_types/mavDropdown.types.js +1 -0
  46. package/dist/components/MAVDropdown/index.d.ts +6 -0
  47. package/dist/components/MAVDropdown/index.d.ts.map +1 -0
  48. package/dist/components/MAVDropdown/index.js +162 -0
  49. package/dist/components/MetricCards/Component/CardWithIconAndForecast/index.js +33 -33
  50. package/dist/components/MultiSelect/SimpleMultiSelect.d.ts +22 -0
  51. package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -0
  52. package/dist/components/MultiSelect/SimpleMultiSelect.js +221 -0
  53. package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
  54. package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
  55. package/dist/components/MultiSelect/_helpers/OverflowMenu.js +1 -1
  56. package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
  57. package/dist/components/MultiSelect/_helpers/SearchResult.js +1 -1
  58. package/dist/components/MultiSelect/_helpers/TagContent.d.ts.map +1 -1
  59. package/dist/components/MultiSelect/_helpers/TagContent.js +20 -19
  60. package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
  61. package/dist/components/MultiSelect/_helpers/TriggerButton.js +39 -34
  62. package/dist/components/MultiSelect/_types/type.d.ts +3 -0
  63. package/dist/components/MultiSelect/_types/type.d.ts.map +1 -1
  64. package/dist/components/MultiSelect/index.d.ts +1 -1
  65. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  66. package/dist/components/MultiSelect/index.js +133 -131
  67. package/dist/components/ProfileDropdown/_types/profileDropdown.types.d.ts +28 -0
  68. package/dist/components/ProfileDropdown/_types/profileDropdown.types.d.ts.map +1 -0
  69. package/dist/components/ProfileDropdown/_types/profileDropdown.types.js +13 -0
  70. package/dist/components/ProfileDropdown/constants.d.ts +3 -0
  71. package/dist/components/ProfileDropdown/constants.d.ts.map +1 -0
  72. package/dist/components/ProfileDropdown/constants.js +8 -0
  73. package/dist/components/ProfileDropdown/index.d.ts +6 -0
  74. package/dist/components/ProfileDropdown/index.d.ts.map +1 -0
  75. package/dist/components/ProfileDropdown/index.js +154 -0
  76. package/dist/components/Search/index.js +35 -35
  77. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.d.ts +2 -1
  78. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.d.ts.map +1 -1
  79. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +7 -3
  80. package/dist/components/SingleSelectDropdown/_types/singleSelectDropdown.types.d.ts +2 -2
  81. package/dist/components/SingleSelectDropdown/_types/singleSelectDropdown.types.d.ts.map +1 -1
  82. package/dist/components/SingleSelectDropdown/index.d.ts +1 -1
  83. package/dist/components/SingleSelectDropdown/index.d.ts.map +1 -1
  84. package/dist/components/SingleSelectDropdown/index.js +61 -57
  85. package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.d.ts +1 -0
  86. package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.d.ts.map +1 -1
  87. package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.js +39 -40
  88. package/dist/components/Table/_helpers/ColumnManager/index.d.ts.map +1 -1
  89. package/dist/components/Table/_helpers/ColumnManager/index.js +453 -448
  90. package/dist/components/Table/_helpers/ExpandableRow/index.d.ts.map +1 -1
  91. package/dist/components/Table/_helpers/ExpandableRow/index.js +30 -20
  92. package/dist/components/Table/_helpers/GroupedHeader/index.d.ts +2 -2
  93. package/dist/components/Table/_helpers/GroupedHeader/index.d.ts.map +1 -1
  94. package/dist/components/Table/_helpers/GroupedHeader/index.js +79 -87
  95. package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +1 -1
  96. package/dist/components/Table/_helpers/TableFilterModal/index.js +14 -14
  97. package/dist/components/Table/_helpers/TableRows.d.ts +1 -1
  98. package/dist/components/Table/_helpers/TableRows.d.ts.map +1 -1
  99. package/dist/components/Table/_helpers/TableRows.js +288 -283
  100. package/dist/components/Table/_types/table.types.d.ts +9 -3
  101. package/dist/components/Table/_types/table.types.d.ts.map +1 -1
  102. package/dist/components/Table/_utils/table.utils.d.ts +3 -0
  103. package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
  104. package/dist/components/Table/_utils/table.utils.js +73 -23
  105. package/dist/components/Table/index.d.ts +1 -1
  106. package/dist/components/Table/index.d.ts.map +1 -1
  107. package/dist/components/Table/index.js +382 -357
  108. package/dist/main.d.ts +5 -0
  109. package/dist/main.d.ts.map +1 -1
  110. package/dist/main.js +91 -81
  111. package/dist/styles.module-BXby6f8d.js +16 -0
  112. package/dist/styles.module-Dojg5FTS.js +41 -0
  113. package/package.json +1 -1
  114. package/dist/DropdownFooter-C20yRiDR.js +0 -84
  115. package/dist/assets/DropdownFooter-C7Cml53c.css +0 -1
  116. package/dist/assets/index-BQ0m7FKV.css +0 -1
  117. package/dist/assets/index-Dudb2XKF.css +0 -1
  118. package/dist/assets/index-w7AdSPwF.css +0 -1
  119. package/dist/assets/styles-BA66-SUu.css +0 -1
  120. package/dist/assets/styles-CflOKRvX.css +0 -1
  121. package/dist/styles.module-CCyijXTv.js +0 -16
  122. package/dist/styles.module-CmWIIYpK.js +0 -41
@@ -1,403 +1,408 @@
1
- import { jsx as e, Fragment as V, jsxs as E } from "react/jsx-runtime";
2
- import { f as _ } from "../../../index-f7TB87Mf.js";
3
- import { useRef as B, useState as K, useCallback as Q } from "react";
4
- import { pinnedStyle as O } from "../_utils/table.utils.js";
5
- import { ROW_MIN_HEIGHT as A } from "../constants.js";
6
- import { SelectionCell as H } from "./SelectionCell/index.js";
7
- import { ExpandableRowToggle as J } from "./ExpandableRow/index.js";
1
+ import { jsx as t, Fragment as V, jsxs as I } from "react/jsx-runtime";
2
+ import { f as z } from "../../../index-f7TB87Mf.js";
3
+ import { useRef as q, useState as K, useCallback as Q } from "react";
4
+ import { columnLayoutStyle as O, pinnedStyle as T } from "../_utils/table.utils.js";
5
+ import { ROW_MIN_HEIGHT as W } from "../constants.js";
6
+ import { SelectionCell as j } from "./SelectionCell/index.js";
7
+ import { ExpandableRowToggle as G } from "./ExpandableRow/index.js";
8
8
  import { Tooltip as U } from "../../Tooltip/index.js";
9
- import { mergeClasses as j } from "../../../utils/mergeClasses.js";
10
- function G(r) {
11
- const s = r?.align;
12
- if (s === "right") return "flex-end";
13
- if (s === "center") return "center";
9
+ import { mergeClasses as B } from "../../../utils/mergeClasses.js";
10
+ const _ = [
11
+ "var(--ckcl-primary-50, #F8FBFF)",
12
+ // depth 1
13
+ "var(--ckcl-primary-80, #F1F6FF)",
14
+ // depth 2
15
+ "var(--ckcl-primary-100, #D9E6FB)"
16
+ // depth 3+
17
+ ];
18
+ function X(r) {
19
+ if (r < 1) return;
20
+ const e = Math.min(r - 1, _.length - 1);
21
+ return _[e];
14
22
  }
15
- function P(r) {
16
- const s = r?.align;
17
- if (s === "right") return "right";
18
- if (s === "center") return "center";
23
+ function E(r, e, m) {
24
+ const l = X(r);
25
+ return l || (e && m % 2 !== 0 ? "var(--ckds-cell-bg-striped, var(--ckcl-primary-50))" : "var(--ckds-cell-bg-default, #ffffff)");
26
+ }
27
+ function H(r) {
28
+ const e = r?.align;
29
+ if (e === "right") return "flex-end";
30
+ if (e === "center") return "center";
31
+ }
32
+ function R(r) {
33
+ const e = r?.align;
34
+ if (e === "right") return "right";
35
+ if (e === "center") return "center";
19
36
  }
20
37
  function M({
21
38
  title: r,
22
- wrapText: s,
23
- children: g
39
+ wrapText: e,
40
+ children: m
24
41
  }) {
25
- const m = B(null), [x, p] = K(!1), u = Q(() => {
26
- m.current && p(m.current.scrollWidth > m.current.offsetWidth);
27
- }, []), d = /* @__PURE__ */ e(
42
+ const l = q(null), [y, g] = K(!1), d = Q(() => {
43
+ l.current && g(l.current.scrollWidth > l.current.offsetWidth);
44
+ }, []), o = /* @__PURE__ */ t(
28
45
  "div",
29
46
  {
30
- ref: m,
31
- onMouseEnter: s ? void 0 : u,
32
- className: `${s ? "whitespace-normal wrap-break-word" : "whitespace-nowrap overflow-hidden text-ellipsis"} w-full`,
33
- children: g
47
+ ref: l,
48
+ onMouseEnter: e ? void 0 : d,
49
+ className: `${e ? "whitespace-normal wrap-break-word" : "whitespace-nowrap overflow-hidden text-ellipsis"} w-full`,
50
+ children: m
34
51
  }
35
52
  );
36
- return s || !x ? d : /* @__PURE__ */ e(U, { title: r, placement: "top", arrow: !0, children: d });
53
+ return e || !y ? o : /* @__PURE__ */ t(U, { title: r, placement: "top", arrow: !0, children: o });
37
54
  }
38
- function le({
55
+ function ae({
39
56
  rows: r,
40
- virtualization: s,
41
- rowVirtualizer: g,
42
- handleMeasure: m,
43
- getEstimatedSize: x,
44
- lastColId: p,
45
- lastNonPinnedColId: u,
57
+ virtualization: e,
58
+ rowVirtualizer: m,
59
+ handleMeasure: l,
60
+ getEstimatedSize: y,
61
+ columnSizing: g,
46
62
  tableConfig: d,
47
- table: h,
48
- selectionState: l,
49
- selectionConfig: k,
50
- onToggleRowSelection: a,
51
- expandableConfig: o,
52
- expandedIds: y,
53
- onToggleExpand: b,
63
+ table: o,
64
+ selectionState: i,
65
+ selectionConfig: h,
66
+ onToggleRowSelection: k,
67
+ expandableConfig: a,
68
+ expandedIds: b,
69
+ onToggleExpand: p,
54
70
  depth: D = 0
55
71
  }) {
56
- const f = (k?.enabled ?? !1) && !o?.enabled, v = f ? 40 : 0, W = o?.enabled ?? !1, w = o?.indentSize ?? 20, C = o?.childrenKey ?? "children";
57
- return s ? /* @__PURE__ */ e(V, { children: g.getVirtualItems().map((i) => {
58
- const t = r[i.index], z = t.id, c = f && l?.selectedIds.has(z);
59
- return /* @__PURE__ */ E(
72
+ const f = (h?.enabled ?? !1) && !a?.enabled, u = f ? 40 : 0, F = a?.enabled ?? !1, v = a?.indentSize ?? 20, C = a?.childrenKey ?? "children";
73
+ return e ? /* @__PURE__ */ t(V, { children: m.getVirtualItems().map((n) => {
74
+ const s = r[n.index], w = s.id, x = f && i?.selectedIds.has(w);
75
+ return /* @__PURE__ */ I(
60
76
  "tr",
61
77
  {
62
- ref: (n) => m(i.index, n),
63
- "data-index": i.index,
64
- className: j("ckds-dragable-tr flex absolute top-0 left-0 w-full"),
78
+ ref: (c) => l(n.index, c),
79
+ "data-index": n.index,
80
+ className: B("ckds-dragable-tr flex absolute top-0 left-0 w-full"),
65
81
  style: {
66
- transform: `translateY(${i.start}px)`,
67
- minHeight: x(i.index)
82
+ transform: `translateY(${n.start}px)`,
83
+ minHeight: y(n.index),
84
+ borderBottom: "1px solid var(--ckcl-black-50, #F4F4F4)"
68
85
  },
69
86
  children: [
70
- f && /* @__PURE__ */ e("td", { className: "ckds-dragable-td flex items-center justify-center", style: { width: 40, minWidth: 40, maxWidth: 40, height: A, flex: "0 0 40px", position: "sticky", left: 0, zIndex: 2, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: /* @__PURE__ */ e(H, { checked: !!c, onChange: () => a?.(z) }) }),
71
- t.getVisibleCells().map((n, N) => {
72
- const I = n.column.id === p, $ = n.column.getIsPinned(), S = I && !$ || n.column.id === u, F = t.original?.status?.toLowerCase?.() === "inactive", T = N === 0;
73
- return /* @__PURE__ */ e(
87
+ f && /* @__PURE__ */ t("td", { className: "ckds-dragable-td flex items-center justify-center", style: { width: 40, minWidth: 40, maxWidth: 40, height: W, flex: "0 0 40px", position: "sticky", left: 0, zIndex: 2, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: /* @__PURE__ */ t(j, { checked: !!x, onChange: () => k?.(w) }) }),
88
+ s.getVisibleCells().map((c, $) => {
89
+ const N = s.original?.status?.toLowerCase?.() === "inactive", L = $ === 0;
90
+ return /* @__PURE__ */ t(
74
91
  "td",
75
92
  {
76
- className: j("ckds-dragable-td flex items-center", F ? "text-base-400" : "text-base-content"),
93
+ className: "ckds-dragable-td flex items-center",
77
94
  style: {
78
- ...O(n.column, h, v),
79
- minHeight: `${x(i.index)}px`,
80
- width: S ? "100%" : n.column.getSize(),
81
- minWidth: n.column.getSize(),
82
- maxWidth: S ? void 0 : n.column.getSize(),
83
- flex: S ? "1 1 auto" : `0 0 ${n.column.getSize()}px`,
84
- justifyContent: G(n.column.columnDef),
85
- textAlign: P(n.column.columnDef),
86
- // Explicit background — Tailwind bg-base-* tokens can be
87
- // overridden by the host app, making sticky cells transparent.
88
- backgroundColor: d.stripedRows && i.index % 2 !== 0 ? "var(--ckds-cell-bg-striped, var(--ckcl-primary-50))" : "var(--ckds-cell-bg-default, #ffffff)"
95
+ ...T(c.column, o, u),
96
+ minHeight: `${y(n.index)}px`,
97
+ ...O(c.column, o.getVisibleLeafColumns(), g),
98
+ justifyContent: H(c.column.columnDef),
99
+ textAlign: R(c.column.columnDef),
100
+ // Explicit color avoids DaisyUI text-base-* token dependency
101
+ color: N ? "var(--ckcl-black-400, #737373)" : "var(--ckcl-black-500, #2b2b2b)",
102
+ backgroundColor: E(D, d.stripedRows, n.index)
89
103
  },
90
- children: /* @__PURE__ */ e(M, { title: String(n.getValue() ?? ""), wrapText: d.wrapText, children: /* @__PURE__ */ e(
91
- R,
104
+ children: /* @__PURE__ */ t(M, { title: String(c.getValue() ?? ""), wrapText: d.wrapText, children: /* @__PURE__ */ t(
105
+ J,
92
106
  {
93
- isFirstDataCol: T,
94
- hasExpansion: W,
95
- row: t,
107
+ isFirstDataCol: L,
108
+ hasExpansion: F,
109
+ row: s,
96
110
  childrenKey: C,
97
- expandedIds: y,
98
- onToggleExpand: b,
111
+ expandedIds: b,
112
+ onToggleExpand: p,
99
113
  depth: D,
100
- indentSize: w,
101
- expandableConfig: o,
102
- children: _(n.column.columnDef.cell ?? n.column.columnDef.header, n.getContext())
114
+ indentSize: v,
115
+ expandableConfig: a,
116
+ children: z(c.column.columnDef.cell ?? c.column.columnDef.header, c.getContext())
103
117
  }
104
118
  ) })
105
119
  },
106
- n.id
120
+ c.id
107
121
  );
108
122
  })
109
123
  ]
110
124
  },
111
- t.id
125
+ s.id
112
126
  );
113
- }) }) : /* @__PURE__ */ e(V, { children: r.map((i, t) => {
114
- const z = i.original, c = z?.status?.toLowerCase?.() === "inactive", n = i.id, N = f && l?.selectedIds.has(n), I = W && y?.has(n), $ = W ? z[C] : void 0, S = Array.isArray($) && $.length > 0;
115
- return /* @__PURE__ */ e(
116
- X,
127
+ }) }) : /* @__PURE__ */ t(V, { children: r.map((n, s) => {
128
+ const w = n.original, x = w?.status?.toLowerCase?.() === "inactive", c = n.id, $ = f && i?.selectedIds.has(c), A = F && b?.has(c), N = F ? w[C] : void 0, L = Array.isArray(N) && N.length > 0;
129
+ return /* @__PURE__ */ t(
130
+ Z,
117
131
  {
118
- row: i,
119
- rowIndex: t,
120
- isInactive: c,
121
- isSelected: !!N,
122
- isExpanded: !!I,
123
- hasChildren: S,
124
- nestedChildren: $,
125
- lastColId: p,
126
- lastNonPinnedColId: u,
132
+ row: n,
133
+ rowIndex: s,
134
+ isInactive: x,
135
+ isSelected: !!$,
136
+ isExpanded: !!A,
137
+ hasChildren: L,
138
+ nestedChildren: N,
139
+ columnSizing: g,
127
140
  tableConfig: d,
128
- table: h,
141
+ table: o,
129
142
  hasSelection: f,
130
- selectionState: l,
131
- onToggleRowSelection: a,
132
- expandedIds: y,
133
- onToggleExpand: b,
134
- expandableConfig: o,
143
+ selectionState: i,
144
+ onToggleRowSelection: k,
145
+ expandedIds: b,
146
+ onToggleExpand: p,
147
+ expandableConfig: a,
135
148
  depth: D,
136
- indentSize: w,
149
+ indentSize: v,
137
150
  childrenKey: C
138
151
  },
139
- i.id
152
+ n.id
140
153
  );
141
154
  }) });
142
155
  }
143
- function R({
156
+ function J({
144
157
  isFirstDataCol: r,
145
- hasExpansion: s,
146
- row: g,
147
- childrenKey: m,
148
- expandedIds: x,
149
- onToggleExpand: p,
150
- depth: u,
151
- indentSize: d,
152
- expandableConfig: h,
153
- children: l
158
+ hasExpansion: e,
159
+ row: m,
160
+ childrenKey: l,
161
+ expandedIds: y,
162
+ onToggleExpand: g,
163
+ depth: d,
164
+ indentSize: o,
165
+ expandableConfig: i,
166
+ children: h
154
167
  }) {
155
- if (!r || !s) return /* @__PURE__ */ e(V, { children: l });
156
- const a = g.original[m], o = Array.isArray(a) && a.length > 0 || !!h?.renderExpandedContent, y = x?.has(g.id) ?? !1;
157
- return /* @__PURE__ */ e(
158
- J,
168
+ if (!r || !e) return /* @__PURE__ */ t(V, { children: h });
169
+ const a = m.original[l], b = Array.isArray(a) && a.length > 0 || !!i?.renderExpandedContent, p = y?.has(m.id) ?? !1;
170
+ return /* @__PURE__ */ t(
171
+ G,
159
172
  {
160
- isExpanded: y,
161
- hasChildren: o,
162
- depth: u,
163
- indentSize: d,
164
- onToggle: () => p?.(g.id),
165
- children: l
173
+ isExpanded: p,
174
+ hasChildren: b,
175
+ depth: d,
176
+ indentSize: o,
177
+ onToggle: () => g?.(m.id),
178
+ children: h
166
179
  }
167
180
  );
168
181
  }
169
- function X({
182
+ function Z({
170
183
  row: r,
171
- rowIndex: s,
172
- isInactive: g,
173
- isSelected: m,
174
- isExpanded: x,
175
- hasChildren: p,
176
- nestedChildren: u,
177
- lastColId: d,
178
- lastNonPinnedColId: h,
179
- tableConfig: l,
180
- table: k,
181
- hasSelection: a,
182
- selectionState: o,
183
- onToggleRowSelection: y,
184
- expandedIds: b,
184
+ rowIndex: e,
185
+ isInactive: m,
186
+ isSelected: l,
187
+ isExpanded: y,
188
+ hasChildren: g,
189
+ nestedChildren: d,
190
+ columnSizing: o,
191
+ tableConfig: i,
192
+ table: h,
193
+ hasSelection: k,
194
+ selectionState: a,
195
+ onToggleRowSelection: b,
196
+ expandedIds: p,
185
197
  onToggleExpand: D,
186
198
  expandableConfig: f,
187
- depth: v,
188
- indentSize: W,
189
- childrenKey: w
199
+ depth: u,
200
+ indentSize: F,
201
+ childrenKey: v
190
202
  }) {
191
- const C = f?.enabled ?? !1, i = a ? 40 : 0;
192
- return /* @__PURE__ */ E(V, { children: [
193
- /* @__PURE__ */ E("tr", { className: j("ckds-dragable-tr flex w-full"), "data-depth": v, style: { position: "relative", zIndex: 0 }, children: [
194
- a && /* @__PURE__ */ e("td", { className: "ckds-dragable-td flex items-center justify-center", style: { width: 40, minWidth: 40, maxWidth: 40, height: A, flex: "0 0 40px", position: "sticky", left: 0, zIndex: 2, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: /* @__PURE__ */ e(H, { checked: m, onChange: () => y?.(r.id) }) }),
195
- r.getVisibleCells().map((t, z) => {
196
- const c = t.column.id === d, n = t.column.getIsPinned(), N = c && !n || t.column.id === h, I = z === 0, $ = l.stripedRows && s % 2 !== 0 ? "var(--ckds-cell-bg-striped, var(--ckcl-primary-50))" : "var(--ckds-cell-bg-default, #ffffff)";
197
- return /* @__PURE__ */ e(
203
+ const C = f?.enabled ?? !1, n = k ? 40 : 0;
204
+ return /* @__PURE__ */ I(V, { children: [
205
+ /* @__PURE__ */ I("tr", { className: B("ckds-dragable-tr flex w-full"), "data-depth": u, style: { position: "relative", zIndex: 0, borderBottom: "1px solid var(--ckcl-black-50, #F4F4F4)" }, children: [
206
+ k && /* @__PURE__ */ t("td", { className: "ckds-dragable-td flex items-center justify-center", style: { width: 40, minWidth: 40, maxWidth: 40, height: W, flex: "0 0 40px", position: "sticky", left: 0, zIndex: 2, backgroundColor: E(u, i.stripedRows, e) }, children: /* @__PURE__ */ t(j, { checked: l, onChange: () => b?.(r.id) }) }),
207
+ r.getVisibleCells().map((s, w) => {
208
+ const x = w === 0, c = E(u, i.stripedRows, e);
209
+ return /* @__PURE__ */ t(
198
210
  "td",
199
211
  {
200
- className: j("ckds-dragable-td flex items-center", g ? "text-base-400" : "text-base-content"),
212
+ className: "ckds-dragable-td flex items-center",
201
213
  style: {
202
- ...O(t.column, k, i),
203
- ...l.wrapText ? { minHeight: `${A}px` } : { height: `${A}px` },
204
- width: N ? "100%" : t.column.getSize(),
205
- minWidth: t.column.getSize(),
206
- maxWidth: N ? void 0 : t.column.getSize(),
207
- flex: N ? "1 1 auto" : `0 0 ${t.column.getSize()}px`,
208
- justifyContent: G(t.column.columnDef),
209
- textAlign: P(t.column.columnDef),
210
- backgroundColor: $
214
+ ...T(s.column, h, n),
215
+ ...i.wrapText ? { minHeight: `${W}px` } : { height: `${W}px` },
216
+ ...O(s.column, h.getVisibleLeafColumns(), o),
217
+ justifyContent: H(s.column.columnDef),
218
+ textAlign: R(s.column.columnDef),
219
+ // Explicit color avoids DaisyUI text-base-* token dependency
220
+ color: m ? "var(--ckcl-black-400, #737373)" : "var(--ckcl-black-500, #2b2b2b)",
221
+ backgroundColor: c
211
222
  },
212
- children: /* @__PURE__ */ e(M, { title: String(t.getValue() ?? ""), wrapText: l.wrapText, children: /* @__PURE__ */ e(
213
- R,
223
+ children: /* @__PURE__ */ t(M, { title: String(s.getValue() ?? ""), wrapText: i.wrapText, children: /* @__PURE__ */ t(
224
+ J,
214
225
  {
215
- isFirstDataCol: I,
226
+ isFirstDataCol: x,
216
227
  hasExpansion: C,
217
228
  row: r,
218
- childrenKey: w,
219
- expandedIds: b,
229
+ childrenKey: v,
230
+ expandedIds: p,
220
231
  onToggleExpand: D,
221
- depth: v,
222
- indentSize: W,
232
+ depth: u,
233
+ indentSize: F,
223
234
  expandableConfig: f,
224
- children: _(t.column.columnDef.cell ?? t.column.columnDef.header, t.getContext())
235
+ children: z(s.column.columnDef.cell ?? s.column.columnDef.header, s.getContext())
225
236
  }
226
237
  ) })
227
238
  },
228
- t.id
239
+ s.id
229
240
  );
230
241
  })
231
242
  ] }),
232
- x && f?.renderExpandedContent && /* @__PURE__ */ E("tr", { className: "ckds-dragable-tr flex w-full", "data-depth": v, children: [
233
- a && /* @__PURE__ */ e("td", { className: "ckds-dragable-td", style: { width: 40, minWidth: 40, maxWidth: 40, flex: "0 0 40px", backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" } }),
234
- /* @__PURE__ */ e(
243
+ y && f?.renderExpandedContent && /* @__PURE__ */ I("tr", { className: "ckds-dragable-tr flex w-full", "data-depth": u, children: [
244
+ k && /* @__PURE__ */ t("td", { className: "ckds-dragable-td", style: { width: 40, minWidth: 40, maxWidth: 40, flex: "0 0 40px", backgroundColor: E(u, i.stripedRows, e) } }),
245
+ /* @__PURE__ */ t(
235
246
  "td",
236
247
  {
237
248
  className: "ckds-dragable-td",
238
- colSpan: k.getVisibleLeafColumns().length,
239
- style: { flex: "1 1 auto", padding: 0, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" },
240
- children: f.renderExpandedContent(r.original, v)
249
+ colSpan: h.getVisibleLeafColumns().length,
250
+ style: { flex: "1 1 auto", padding: 0, backgroundColor: E(u, i.stripedRows, e) },
251
+ children: f.renderExpandedContent(r.original, u)
241
252
  }
242
253
  )
243
254
  ] }),
244
- x && p && u && !f?.renderExpandedContent && /* @__PURE__ */ e(
245
- Y,
255
+ y && g && d && !f?.renderExpandedContent && /* @__PURE__ */ t(
256
+ P,
246
257
  {
247
- nestedChildren: u,
258
+ nestedChildren: d,
248
259
  parentId: r.id,
249
- depth: v + 1,
250
- lastColId: d,
251
- lastNonPinnedColId: h,
252
- tableConfig: l,
253
- table: k,
254
- hasSelection: a,
255
- selectionState: o,
256
- onToggleRowSelection: y,
257
- expandedIds: b,
260
+ depth: u + 1,
261
+ columnSizing: o,
262
+ tableConfig: i,
263
+ table: h,
264
+ hasSelection: k,
265
+ selectionState: a,
266
+ onToggleRowSelection: b,
267
+ expandedIds: p,
258
268
  onToggleExpand: D,
259
269
  expandableConfig: f,
260
- indentSize: W,
261
- childrenKey: w
270
+ indentSize: F,
271
+ childrenKey: v
262
272
  }
263
273
  )
264
274
  ] });
265
275
  }
266
- function Y({
276
+ function P({
267
277
  nestedChildren: r,
268
- parentId: s,
269
- depth: g,
270
- lastColId: m,
271
- lastNonPinnedColId: x,
272
- tableConfig: p,
273
- table: u,
278
+ parentId: e,
279
+ depth: m,
280
+ columnSizing: l,
281
+ tableConfig: y,
282
+ table: g,
274
283
  hasSelection: d,
275
- selectionState: h,
276
- onToggleRowSelection: l,
277
- expandedIds: k,
278
- onToggleExpand: a,
279
- expandableConfig: o,
280
- indentSize: y,
281
- childrenKey: b
284
+ selectionState: o,
285
+ onToggleRowSelection: i,
286
+ expandedIds: h,
287
+ onToggleExpand: k,
288
+ expandableConfig: a,
289
+ indentSize: b,
290
+ childrenKey: p
282
291
  }) {
283
- const D = u.getVisibleLeafColumns(), f = o?.enabled ?? !1;
284
- return /* @__PURE__ */ e(V, { children: r.map((v, W) => {
285
- const w = v, C = `${s}.${W}`, i = w[b], t = Array.isArray(i) && i.length > 0, z = k?.has(C) ?? !1, c = d && (h?.selectedIds.has(C) ?? !1), n = w?.status?.toLowerCase?.() === "inactive";
286
- return /* @__PURE__ */ e(
287
- Z,
292
+ const D = g.getVisibleLeafColumns(), f = a?.enabled ?? !1;
293
+ return /* @__PURE__ */ t(V, { children: r.map((u, F) => {
294
+ const v = u, C = `${e}.${F}`, n = v[p], s = Array.isArray(n) && n.length > 0, w = h?.has(C) ?? !1, x = d && (o?.selectedIds.has(C) ?? !1), c = v?.status?.toLowerCase?.() === "inactive";
295
+ return /* @__PURE__ */ t(
296
+ S,
288
297
  {
289
- childRecord: w,
298
+ childRecord: v,
290
299
  childRowId: C,
291
- childIndex: W,
292
- childIsInactive: n,
293
- childIsSelected: c,
294
- childIsExpanded: z,
295
- childHasChildren: t,
296
- childChildren: i,
297
- depth: g,
298
- lastColId: m,
299
- lastNonPinnedColId: x,
300
- tableConfig: p,
301
- table: u,
300
+ childIndex: F,
301
+ childIsInactive: c,
302
+ childIsSelected: x,
303
+ childIsExpanded: w,
304
+ childHasChildren: s,
305
+ childChildren: n,
306
+ depth: m,
307
+ columnSizing: l,
308
+ tableConfig: y,
309
+ table: g,
302
310
  visibleCols: D,
303
311
  hasSelection: d,
304
312
  hasExpansion: f,
305
- selectionState: h,
306
- onToggleRowSelection: l,
307
- expandedIds: k,
308
- onToggleExpand: a,
309
- expandableConfig: o,
310
- indentSize: y,
311
- childrenKey: b
313
+ selectionState: o,
314
+ onToggleRowSelection: i,
315
+ expandedIds: h,
316
+ onToggleExpand: k,
317
+ expandableConfig: a,
318
+ indentSize: b,
319
+ childrenKey: p
312
320
  },
313
321
  C
314
322
  );
315
323
  }) });
316
324
  }
317
- function Z({
325
+ function S({
318
326
  childRecord: r,
319
- childRowId: s,
320
- childIndex: g,
321
- childIsInactive: m,
322
- childIsSelected: x,
323
- childIsExpanded: p,
324
- childHasChildren: u,
325
- childChildren: d,
326
- depth: h,
327
- lastColId: l,
328
- lastNonPinnedColId: k,
329
- tableConfig: a,
330
- table: o,
331
- visibleCols: y,
332
- hasSelection: b,
327
+ childRowId: e,
328
+ childIndex: m,
329
+ childIsInactive: l,
330
+ childIsSelected: y,
331
+ childIsExpanded: g,
332
+ childHasChildren: d,
333
+ childChildren: o,
334
+ depth: i,
335
+ columnSizing: h,
336
+ tableConfig: k,
337
+ table: a,
338
+ visibleCols: b,
339
+ hasSelection: p,
333
340
  hasExpansion: D,
334
341
  selectionState: f,
335
- onToggleRowSelection: v,
336
- expandedIds: W,
337
- onToggleExpand: w,
342
+ onToggleRowSelection: u,
343
+ expandedIds: F,
344
+ onToggleExpand: v,
338
345
  expandableConfig: C,
339
- indentSize: i,
340
- childrenKey: t
346
+ indentSize: n,
347
+ childrenKey: s
341
348
  }) {
342
- const z = b ? 40 : 0;
343
- return /* @__PURE__ */ E(V, { children: [
344
- /* @__PURE__ */ E("tr", { className: j("ckds-dragable-tr flex w-full"), "data-depth": h, style: { position: "relative", zIndex: 0 }, children: [
345
- b && /* @__PURE__ */ e("td", { className: "ckds-dragable-td flex items-center justify-center", style: { width: 40, minWidth: 40, maxWidth: 40, height: A, flex: "0 0 40px", position: "sticky", left: 0, zIndex: 2, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: /* @__PURE__ */ e(H, { checked: x, onChange: () => v?.(s) }) }),
346
- y.map((c, n) => {
347
- const N = c.id === l, I = c.getIsPinned(), $ = N && !I || c.id === k, S = n === 0, L = r[c.id], F = L != null ? String(L) : "", T = a.stripedRows && g % 2 !== 0 ? "var(--ckds-cell-bg-striped, var(--ckcl-primary-50))" : "var(--ckds-cell-bg-default, #ffffff)", q = S && D ? /* @__PURE__ */ e(
348
- J,
349
+ const w = p ? 40 : 0;
350
+ return /* @__PURE__ */ I(V, { children: [
351
+ /* @__PURE__ */ I("tr", { className: B("ckds-dragable-tr flex w-full"), "data-depth": i, style: { position: "relative", zIndex: 0, borderBottom: "1px solid var(--ckcl-black-50, #F4F4F4)" }, children: [
352
+ p && /* @__PURE__ */ t("td", { className: "ckds-dragable-td flex items-center justify-center", style: { width: 40, minWidth: 40, maxWidth: 40, height: W, flex: "0 0 40px", position: "sticky", left: 0, zIndex: 2, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: /* @__PURE__ */ t(j, { checked: y, onChange: () => u?.(e) }) }),
353
+ b.map((x, c) => {
354
+ const $ = c === 0, A = r[x.id], N = A != null ? String(A) : "", L = E(i, k.stripedRows, m), Y = $ && D ? /* @__PURE__ */ t(
355
+ G,
349
356
  {
350
- isExpanded: p,
351
- hasChildren: u,
352
- depth: h,
353
- indentSize: i,
354
- onToggle: () => w?.(s),
355
- children: F
357
+ isExpanded: g,
358
+ hasChildren: d,
359
+ depth: i,
360
+ indentSize: n,
361
+ onToggle: () => v?.(e),
362
+ children: N
356
363
  }
357
- ) : F;
358
- return /* @__PURE__ */ e(
364
+ ) : N;
365
+ return /* @__PURE__ */ t(
359
366
  "td",
360
367
  {
361
- className: j("ckds-dragable-td flex items-center", m ? "text-base-400" : "text-base-content"),
368
+ className: "ckds-dragable-td flex items-center",
362
369
  style: {
363
- ...O(c, o, z),
364
- ...a.wrapText ? { minHeight: `${A}px` } : { height: `${A}px` },
365
- width: $ ? "100%" : c.getSize(),
366
- minWidth: c.getSize(),
367
- maxWidth: $ ? void 0 : c.getSize(),
368
- flex: $ ? "1 1 auto" : `0 0 ${c.getSize()}px`,
369
- backgroundColor: T,
370
- justifyContent: G(c.columnDef),
371
- textAlign: P(c.columnDef)
370
+ ...T(x, a, w),
371
+ ...k.wrapText ? { minHeight: `${W}px` } : { height: `${W}px` },
372
+ ...O(x, b, h),
373
+ backgroundColor: L,
374
+ // Explicit color avoids DaisyUI text-base-* token dependency
375
+ color: l ? "var(--ckcl-black-400, #737373)" : "var(--ckcl-black-500, #2b2b2b)",
376
+ justifyContent: H(x.columnDef),
377
+ textAlign: R(x.columnDef)
372
378
  },
373
- children: /* @__PURE__ */ e(M, { title: F, wrapText: a.wrapText, children: q })
379
+ children: /* @__PURE__ */ t(M, { title: N, wrapText: k.wrapText, children: Y })
374
380
  },
375
- `${s}-${c.id}`
381
+ `${e}-${x.id}`
376
382
  );
377
383
  })
378
384
  ] }),
379
- p && u && d && /* @__PURE__ */ e(
380
- Y,
385
+ g && d && o && /* @__PURE__ */ t(
386
+ P,
381
387
  {
382
- nestedChildren: d,
383
- parentId: s,
384
- depth: h + 1,
385
- lastColId: l,
386
- lastNonPinnedColId: k,
387
- tableConfig: a,
388
- table: o,
389
- hasSelection: b,
388
+ nestedChildren: o,
389
+ parentId: e,
390
+ depth: i + 1,
391
+ columnSizing: h,
392
+ tableConfig: k,
393
+ table: a,
394
+ hasSelection: p,
390
395
  selectionState: f,
391
- onToggleRowSelection: v,
392
- expandedIds: W,
393
- onToggleExpand: w,
396
+ onToggleRowSelection: u,
397
+ expandedIds: F,
398
+ onToggleExpand: v,
394
399
  expandableConfig: C,
395
- indentSize: i,
396
- childrenKey: t
400
+ indentSize: n,
401
+ childrenKey: s
397
402
  }
398
403
  )
399
404
  ] });
400
405
  }
401
406
  export {
402
- le as default
407
+ ae as default
403
408
  };