@deepnoid/ui 0.1.0 → 0.1.1

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 (135) hide show
  1. package/.turbo/turbo-build.log +168 -168
  2. package/dist/{chunk-VWMXZUR2.mjs → chunk-2TJDQIKB.mjs} +1 -1
  3. package/dist/{chunk-IE2BRM7Z.mjs → chunk-2ZT6V4QR.mjs} +0 -9
  4. package/dist/{chunk-PKVQXVCS.mjs → chunk-56VCX2QR.mjs} +1 -1
  5. package/dist/{chunk-UAMIPCUD.mjs → chunk-AMA53H3C.mjs} +2 -2
  6. package/dist/{chunk-MW6Y3FSE.mjs → chunk-AYWI2CRE.mjs} +2 -2
  7. package/dist/{chunk-XAA5KY6A.mjs → chunk-CF6O6TCF.mjs} +1 -1
  8. package/dist/chunk-DUOYMLZL.mjs +283 -0
  9. package/dist/{chunk-QNA2GDTN.mjs → chunk-GLBASISV.mjs} +1 -1
  10. package/dist/{chunk-QJHZJRSQ.mjs → chunk-HKXUNG3H.mjs} +1 -1
  11. package/dist/{chunk-XTGRSVYO.mjs → chunk-J5WJD6XZ.mjs} +1 -1
  12. package/dist/chunk-M2IRRTFM.mjs +79 -0
  13. package/dist/{chunk-Q5WACGVP.mjs → chunk-N4F3R6HG.mjs} +1 -1
  14. package/dist/{chunk-WQBOPCH6.mjs → chunk-ON5SGXHZ.mjs} +1 -1
  15. package/dist/chunk-OQS4LGZK.mjs +27 -0
  16. package/dist/{chunk-KCYJYS66.mjs → chunk-RCU5MLBU.mjs} +1 -1
  17. package/dist/chunk-RT5NKQX4.mjs +285 -0
  18. package/dist/{chunk-X2MQCISM.mjs → chunk-S65S7QZ5.mjs} +1 -1
  19. package/dist/chunk-SPX2BHO2.mjs +314 -0
  20. package/dist/{chunk-3AMZ55Y6.mjs → chunk-SSEQSF5F.mjs} +3 -3
  21. package/dist/{chunk-RRL6KBU4.mjs → chunk-U2YKMXVG.mjs} +1 -1
  22. package/dist/{chunk-VBFXKJTI.mjs → chunk-VRGHUYRU.mjs} +2 -2
  23. package/dist/{chunk-5S4XGPBB.mjs → chunk-VVOOYDJS.mjs} +1 -1
  24. package/dist/{chunk-FYJZ7Q5L.mjs → chunk-XIHAABHB.mjs} +1 -1
  25. package/dist/{chunk-CATOSBI7.mjs → chunk-YCMZELLD.mjs} +2 -2
  26. package/dist/{chunk-2HSK6XGZ.mjs → chunk-YZNQ2QGK.mjs} +1 -1
  27. package/dist/{chunk-P5WT7WJO.mjs → chunk-ZEZ6ZA3N.mjs} +1 -1
  28. package/dist/components/avatar/avatar.js +0 -9
  29. package/dist/components/avatar/avatar.mjs +2 -2
  30. package/dist/components/avatar/index.js +0 -9
  31. package/dist/components/avatar/index.mjs +2 -2
  32. package/dist/components/backdrop/backdrop.js +0 -9
  33. package/dist/components/backdrop/backdrop.mjs +2 -2
  34. package/dist/components/backdrop/index.js +0 -9
  35. package/dist/components/backdrop/index.mjs +2 -2
  36. package/dist/components/breadcrumb/breadcrumb.js +0 -9
  37. package/dist/components/breadcrumb/breadcrumb.mjs +2 -2
  38. package/dist/components/breadcrumb/index.js +0 -9
  39. package/dist/components/breadcrumb/index.mjs +2 -2
  40. package/dist/components/button/button-group.js +0 -9
  41. package/dist/components/button/button-group.mjs +2 -2
  42. package/dist/components/button/button.js +0 -9
  43. package/dist/components/button/button.mjs +2 -2
  44. package/dist/components/button/index.js +0 -9
  45. package/dist/components/button/index.mjs +3 -3
  46. package/dist/components/checkbox/checkbox.js +0 -9
  47. package/dist/components/checkbox/checkbox.mjs +2 -2
  48. package/dist/components/checkbox/index.js +0 -9
  49. package/dist/components/checkbox/index.mjs +2 -2
  50. package/dist/components/chip/chip.js +0 -9
  51. package/dist/components/chip/chip.mjs +2 -2
  52. package/dist/components/chip/index.js +0 -9
  53. package/dist/components/chip/index.mjs +2 -2
  54. package/dist/components/dateTimePicker/calendar.js +0 -9
  55. package/dist/components/dateTimePicker/calendar.mjs +2 -2
  56. package/dist/components/dateTimePicker/dateTimePicker.js +0 -9
  57. package/dist/components/dateTimePicker/dateTimePicker.mjs +7 -7
  58. package/dist/components/dateTimePicker/index.js +0 -9
  59. package/dist/components/dateTimePicker/index.mjs +7 -7
  60. package/dist/components/dateTimePicker/timePicker.js +0 -9
  61. package/dist/components/dateTimePicker/timePicker.mjs +5 -5
  62. package/dist/components/input/index.d.mts +1 -1
  63. package/dist/components/input/index.d.ts +1 -1
  64. package/dist/components/input/index.js +429 -379
  65. package/dist/components/input/index.mjs +3 -2
  66. package/dist/components/input/input.d.mts +96 -81
  67. package/dist/components/input/input.d.ts +96 -81
  68. package/dist/components/input/input.js +429 -379
  69. package/dist/components/input/input.mjs +3 -2
  70. package/dist/components/list/index.js +0 -9
  71. package/dist/components/list/index.mjs +4 -4
  72. package/dist/components/list/list.js +0 -9
  73. package/dist/components/list/list.mjs +2 -2
  74. package/dist/components/list/listItem.js +0 -9
  75. package/dist/components/list/listItem.mjs +3 -3
  76. package/dist/components/modal/index.js +0 -9
  77. package/dist/components/modal/index.mjs +4 -4
  78. package/dist/components/modal/modal.js +0 -9
  79. package/dist/components/modal/modal.mjs +4 -4
  80. package/dist/components/pagination/index.d.mts +1 -1
  81. package/dist/components/pagination/index.d.ts +1 -1
  82. package/dist/components/pagination/index.js +320 -292
  83. package/dist/components/pagination/index.mjs +5 -4
  84. package/dist/components/pagination/pagination.d.mts +39 -95
  85. package/dist/components/pagination/pagination.d.ts +39 -95
  86. package/dist/components/pagination/pagination.js +322 -296
  87. package/dist/components/pagination/pagination.mjs +7 -8
  88. package/dist/components/radio/index.js +0 -9
  89. package/dist/components/radio/index.mjs +2 -2
  90. package/dist/components/radio/radio.js +0 -9
  91. package/dist/components/radio/radio.mjs +2 -2
  92. package/dist/components/select/index.js +0 -9
  93. package/dist/components/select/index.mjs +3 -3
  94. package/dist/components/select/option.js +0 -9
  95. package/dist/components/select/option.mjs +2 -2
  96. package/dist/components/select/select.js +0 -9
  97. package/dist/components/select/select.mjs +3 -3
  98. package/dist/components/table/index.js +1193 -775
  99. package/dist/components/table/index.mjs +10 -5
  100. package/dist/components/table/table-body.d.mts +10 -16
  101. package/dist/components/table/table-body.d.ts +10 -16
  102. package/dist/components/table/table-body.js +54 -3792
  103. package/dist/components/table/table-body.mjs +3 -6
  104. package/dist/components/table/table-head.d.mts +4 -6
  105. package/dist/components/table/table-head.d.ts +4 -6
  106. package/dist/components/table/table-head.js +6 -44
  107. package/dist/components/table/table-head.mjs +3 -3
  108. package/dist/components/table/table.d.mts +91 -231
  109. package/dist/components/table/table.d.ts +91 -231
  110. package/dist/components/table/table.js +1193 -775
  111. package/dist/components/table/table.mjs +10 -5
  112. package/dist/components/tabs/index.js +0 -9
  113. package/dist/components/tabs/index.mjs +2 -2
  114. package/dist/components/tabs/tabs.js +0 -9
  115. package/dist/components/tabs/tabs.mjs +2 -2
  116. package/dist/components/toast/index.js +0 -9
  117. package/dist/components/toast/index.mjs +3 -3
  118. package/dist/components/toast/toast.js +0 -9
  119. package/dist/components/toast/toast.mjs +2 -2
  120. package/dist/components/toast/use-toast.js +0 -9
  121. package/dist/components/toast/use-toast.mjs +3 -3
  122. package/dist/components/tooltip/index.js +0 -9
  123. package/dist/components/tooltip/index.mjs +2 -2
  124. package/dist/components/tooltip/tooltip.js +0 -9
  125. package/dist/components/tooltip/tooltip.mjs +2 -2
  126. package/dist/index.js +822 -958
  127. package/dist/index.mjs +46 -46
  128. package/dist/utils/tailwind-variants.js +0 -9
  129. package/dist/utils/tailwind-variants.mjs +1 -1
  130. package/package.json +1 -1
  131. package/dist/chunk-5IQKKLZY.mjs +0 -139
  132. package/dist/chunk-PFYYYUJW.mjs +0 -56
  133. package/dist/chunk-RQ76IOYC.mjs +0 -300
  134. package/dist/chunk-SK2A72R2.mjs +0 -263
  135. package/dist/chunk-YGOEKSNZ.mjs +0 -345
package/dist/index.mjs CHANGED
@@ -1,14 +1,4 @@
1
1
  "use client";
2
- import "./chunk-HIE2YRGA.mjs";
3
- import {
4
- tooltip_default
5
- } from "./chunk-RRL6KBU4.mjs";
6
- import "./chunk-ZMOAFSYE.mjs";
7
- import "./chunk-WSIADHVC.mjs";
8
- import "./chunk-3MY6LO7N.mjs";
9
- import {
10
- tabs_default
11
- } from "./chunk-P5WT7WJO.mjs";
12
2
  import "./chunk-RRAZM5D3.mjs";
13
3
  import {
14
4
  textarea_default
@@ -17,89 +7,99 @@ import "./chunk-LUWGOKLG.mjs";
17
7
  import {
18
8
  ToastProvider,
19
9
  useToast
20
- } from "./chunk-QNA2GDTN.mjs";
10
+ } from "./chunk-GLBASISV.mjs";
21
11
  import "./chunk-ZOTHPHXA.mjs";
22
12
  import {
23
13
  toast_default
24
- } from "./chunk-FYJZ7Q5L.mjs";
25
- import "./chunk-LVFI2NOH.mjs";
14
+ } from "./chunk-XIHAABHB.mjs";
15
+ import "./chunk-HIE2YRGA.mjs";
26
16
  import {
27
- switch_default
28
- } from "./chunk-Z74QNVPG.mjs";
17
+ tooltip_default
18
+ } from "./chunk-U2YKMXVG.mjs";
19
+ import "./chunk-ZMOAFSYE.mjs";
20
+ import "./chunk-WSIADHVC.mjs";
29
21
  import "./chunk-2UUH2MBF.mjs";
30
22
  import {
31
23
  table_default
32
- } from "./chunk-YGOEKSNZ.mjs";
33
- import "./chunk-5IQKKLZY.mjs";
34
- import "./chunk-PFYYYUJW.mjs";
35
- import "./chunk-TPFN22HR.mjs";
24
+ } from "./chunk-SPX2BHO2.mjs";
25
+ import "./chunk-M2IRRTFM.mjs";
26
+ import "./chunk-OQS4LGZK.mjs";
27
+ import "./chunk-3MY6LO7N.mjs";
36
28
  import {
37
- radio_default
38
- } from "./chunk-PKVQXVCS.mjs";
29
+ tabs_default
30
+ } from "./chunk-ZEZ6ZA3N.mjs";
31
+ import "./chunk-LVFI2NOH.mjs";
32
+ import {
33
+ switch_default
34
+ } from "./chunk-Z74QNVPG.mjs";
39
35
  import "./chunk-QCEKPS7U.mjs";
40
36
  import {
41
37
  select_default
42
- } from "./chunk-VBFXKJTI.mjs";
43
- import "./chunk-2HSK6XGZ.mjs";
38
+ } from "./chunk-VRGHUYRU.mjs";
39
+ import "./chunk-YZNQ2QGK.mjs";
44
40
  import "./chunk-S3QS5B7F.mjs";
45
- import "./chunk-DJOG6Z35.mjs";
46
- import {
47
- modal_default
48
- } from "./chunk-UAMIPCUD.mjs";
49
41
  import "./chunk-7B7LRG5J.mjs";
50
42
  import {
51
43
  pagination_default
52
- } from "./chunk-RQ76IOYC.mjs";
53
- import "./chunk-F3HENRVM.mjs";
44
+ } from "./chunk-DUOYMLZL.mjs";
54
45
  import "./chunk-2GCSFWHD.mjs";
55
46
  import {
56
47
  input_default
57
- } from "./chunk-SK2A72R2.mjs";
48
+ } from "./chunk-RT5NKQX4.mjs";
49
+ import "./chunk-F3HENRVM.mjs";
50
+ import "./chunk-DJOG6Z35.mjs";
51
+ import {
52
+ modal_default
53
+ } from "./chunk-AMA53H3C.mjs";
54
+ import "./chunk-TPFN22HR.mjs";
55
+ import {
56
+ radio_default
57
+ } from "./chunk-56VCX2QR.mjs";
58
58
  import "./chunk-75HLCORR.mjs";
59
59
  import {
60
60
  dateTimePicker_default
61
- } from "./chunk-3AMZ55Y6.mjs";
62
- import "./chunk-CATOSBI7.mjs";
61
+ } from "./chunk-SSEQSF5F.mjs";
62
+ import "./chunk-YCMZELLD.mjs";
63
63
  import "./chunk-7MVEAQ7Z.mjs";
64
64
  import {
65
65
  list_default
66
- } from "./chunk-5S4XGPBB.mjs";
66
+ } from "./chunk-VVOOYDJS.mjs";
67
67
  import {
68
68
  listItem_default
69
- } from "./chunk-MW6Y3FSE.mjs";
69
+ } from "./chunk-AYWI2CRE.mjs";
70
70
  import "./chunk-FWJ2ZKH6.mjs";
71
71
  import "./chunk-VUYUQGLF.mjs";
72
72
  import {
73
73
  button_group_default
74
- } from "./chunk-Q5WACGVP.mjs";
74
+ } from "./chunk-N4F3R6HG.mjs";
75
75
  import {
76
76
  button_default
77
- } from "./chunk-X2MQCISM.mjs";
77
+ } from "./chunk-S65S7QZ5.mjs";
78
78
  import "./chunk-6WSACUIB.mjs";
79
79
  import "./chunk-LXHUO6VM.mjs";
80
80
  import "./chunk-6PNKRBUT.mjs";
81
81
  import "./chunk-QZ3LVYJW.mjs";
82
82
  import {
83
83
  checkbox_default
84
- } from "./chunk-XTGRSVYO.mjs";
84
+ } from "./chunk-J5WJD6XZ.mjs";
85
85
  import "./chunk-MGEWSREV.mjs";
86
86
  import {
87
87
  chip_default
88
- } from "./chunk-KCYJYS66.mjs";
89
- import "./chunk-QJHZJRSQ.mjs";
88
+ } from "./chunk-RCU5MLBU.mjs";
89
+ import "./chunk-HKXUNG3H.mjs";
90
90
  import "./chunk-P732YGHO.mjs";
91
- import "./chunk-7DLOYKVC.mjs";
92
- import {
93
- avatar_default
94
- } from "./chunk-XAA5KY6A.mjs";
95
91
  import "./chunk-SE5TU755.mjs";
96
92
  import {
97
93
  backdrop_default
98
- } from "./chunk-WQBOPCH6.mjs";
94
+ } from "./chunk-ON5SGXHZ.mjs";
95
+ import "./chunk-7DLOYKVC.mjs";
96
+ import {
97
+ avatar_default
98
+ } from "./chunk-CF6O6TCF.mjs";
99
99
  import "./chunk-KYIODWXL.mjs";
100
100
  import {
101
101
  breadcrumb_default
102
- } from "./chunk-VWMXZUR2.mjs";
102
+ } from "./chunk-2TJDQIKB.mjs";
103
103
  import "./chunk-ZYIIXWVY.mjs";
104
104
  import {
105
105
  Icon_default,
@@ -109,7 +109,7 @@ import "./chunk-P2TMIZRH.mjs";
109
109
  import {
110
110
  deepnoidUi,
111
111
  tv
112
- } from "./chunk-IE2BRM7Z.mjs";
112
+ } from "./chunk-2ZT6V4QR.mjs";
113
113
  import "./chunk-27Y6K5NK.mjs";
114
114
  import "./chunk-E3G5QXSH.mjs";
115
115
  import "./chunk-AC6TWLRT.mjs";
@@ -115,35 +115,30 @@ var fontSize = {
115
115
  h1: [
116
116
  "40px",
117
117
  {
118
- letterSpacing: "-2%",
119
118
  fontWeight: "700"
120
119
  }
121
120
  ],
122
121
  h2: [
123
122
  "34px",
124
123
  {
125
- letterSpacing: "-2%",
126
124
  fontWeight: "700"
127
125
  }
128
126
  ],
129
127
  h3: [
130
128
  "28px",
131
129
  {
132
- letterSpacing: "-2%",
133
130
  fontWeight: "700"
134
131
  }
135
132
  ],
136
133
  h4: [
137
134
  "24px",
138
135
  {
139
- letterSpacing: "-2%",
140
136
  fontWeight: "700"
141
137
  }
142
138
  ],
143
139
  h5: [
144
140
  "20px",
145
141
  {
146
- letterSpacing: "-2%",
147
142
  fontWeight: "600"
148
143
  }
149
144
  ],
@@ -151,7 +146,6 @@ var fontSize = {
151
146
  "12px",
152
147
  {
153
148
  lineHeight: "18px",
154
- letterSpacing: "-2%",
155
149
  fontWeight: "400"
156
150
  }
157
151
  ],
@@ -159,7 +153,6 @@ var fontSize = {
159
153
  "14px",
160
154
  {
161
155
  lineHeight: "21px",
162
- letterSpacing: "-2%",
163
156
  fontWeight: "400"
164
157
  }
165
158
  ],
@@ -167,7 +160,6 @@ var fontSize = {
167
160
  "16px",
168
161
  {
169
162
  lineHeight: "24px",
170
- letterSpacing: "-2%",
171
163
  fontWeight: "400"
172
164
  }
173
165
  ],
@@ -175,7 +167,6 @@ var fontSize = {
175
167
  "18px",
176
168
  {
177
169
  lineHeight: "27px",
178
- letterSpacing: "-2%",
179
170
  fontWeight: "400"
180
171
  }
181
172
  ]
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  tv
4
- } from "../chunk-IE2BRM7Z.mjs";
4
+ } from "../chunk-2ZT6V4QR.mjs";
5
5
  import "../chunk-AC6TWLRT.mjs";
6
6
  export {
7
7
  tv
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepnoid/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -1,139 +0,0 @@
1
- "use client";
2
- import {
3
- checkbox_default
4
- } from "./chunk-XTGRSVYO.mjs";
5
- import {
6
- Icon_default
7
- } from "./chunk-24NQEB73.mjs";
8
- import {
9
- clsx
10
- } from "./chunk-27Y6K5NK.mjs";
11
-
12
- // src/components/table/table-body.tsx
13
- import React, { useState, useCallback, useEffect } from "react";
14
- import { jsx, jsxs } from "react/jsx-runtime";
15
- import { createElement } from "react";
16
- var TableBody = ({
17
- classNames,
18
- size,
19
- color,
20
- slots,
21
- rows,
22
- columns,
23
- isExpanded,
24
- isSelected,
25
- isChecked,
26
- isCheckedRow,
27
- checkedRows,
28
- emptyContent,
29
- onCheckedRow,
30
- onRowAction
31
- }) => {
32
- const COL_SPAN_COUNT = columns.length + (isExpanded ? 1 : 0) + (isChecked ? 1 : 0);
33
- const [expandedRows, setExpandedRows] = useState(/* @__PURE__ */ new Set());
34
- useEffect(() => {
35
- setExpandedRows(/* @__PURE__ */ new Set());
36
- }, [rows]);
37
- const getTbodyProps = useCallback(
38
- () => ({
39
- className: slots.tbody({ class: clsx(classNames == null ? void 0 : classNames.tbody) })
40
- }),
41
- [classNames == null ? void 0 : classNames.tbody, slots]
42
- );
43
- const getTrProps = useCallback(
44
- ({ index, isSelectedRow }) => ({
45
- className: clsx(
46
- slots.tr({ class: [classNames == null ? void 0 : classNames.tr, (isSelected || isCheckedRow || isExpanded) && "cursor-pointer"] })
47
- ),
48
- "data-odd": index % 2 !== 0,
49
- "data-expanded": expandedRows.has(index),
50
- "data-selected": isSelectedRow
51
- }),
52
- [classNames == null ? void 0 : classNames.tr, expandedRows, isCheckedRow, isExpanded, isSelected, slots]
53
- );
54
- const getExpandedContentProps = useCallback(
55
- () => ({
56
- className: slots.expandedTr({ class: clsx(classNames == null ? void 0 : classNames.expandedTr) })
57
- }),
58
- [classNames == null ? void 0 : classNames.expandedTr, slots]
59
- );
60
- const getTdProps = useCallback(
61
- (column, row, keys) => {
62
- const { field, className, valueFormatter, renderCell } = column;
63
- const key = keys.find((value2) => value2 === field);
64
- const value = key && row[key];
65
- const children = renderCell ? renderCell({
66
- field,
67
- id: field,
68
- row,
69
- value,
70
- formattedValue: valueFormatter && valueFormatter({
71
- id: field,
72
- field,
73
- value
74
- })
75
- }) : valueFormatter ? valueFormatter({
76
- id: field,
77
- field,
78
- value
79
- }) : value;
80
- return {
81
- children,
82
- className: slots.td({ class: clsx(classNames == null ? void 0 : classNames.td, className) })
83
- };
84
- },
85
- [classNames == null ? void 0 : classNames.td, columns, slots]
86
- );
87
- const onChangeExpandedRow = (index) => {
88
- setExpandedRows((prevIndices) => {
89
- const newIndices = new Set(prevIndices);
90
- if (newIndices.has(index)) {
91
- newIndices.delete(index);
92
- } else {
93
- newIndices.add(index);
94
- }
95
- return newIndices;
96
- });
97
- };
98
- const handleRowClick = (index) => (e) => {
99
- var _a;
100
- e.stopPropagation();
101
- e.preventDefault();
102
- if (isExpanded) onChangeExpandedRow(index);
103
- if (isChecked && isCheckedRow) onCheckedRow(index);
104
- const row = rows[index];
105
- if (row) {
106
- (_a = row.onRowAction) == null ? void 0 : _a.call(row, e, row);
107
- }
108
- };
109
- return /* @__PURE__ */ jsx("tbody", { ...getTbodyProps(), children: rows.length > 0 ? rows.map((row, rowIndex) => {
110
- const keys = Object.keys(row);
111
- return /* @__PURE__ */ jsxs(React.Fragment, { children: [
112
- /* @__PURE__ */ jsxs(
113
- "tr",
114
- {
115
- ...getTrProps({ index: rowIndex, isSelectedRow: row.isSelectedRow }),
116
- onClick: handleRowClick(rowIndex),
117
- children: [
118
- isChecked && /* @__PURE__ */ jsx("td", { ...getTdProps({ field: "checkbox" }, row, keys), onClick: () => onCheckedRow(rowIndex), children: /* @__PURE__ */ jsx(checkbox_default, { color, size, checked: checkedRows.has(rowIndex) }) }),
119
- isExpanded && /* @__PURE__ */ jsx("td", { ...getTdProps({ field: "expandIcon" }, row, keys), children: /* @__PURE__ */ jsx(
120
- Icon_default,
121
- {
122
- name: expandedRows.has(rowIndex) ? "brace-down" : "brace-right",
123
- className: `ml-2 transition-transform`,
124
- size
125
- }
126
- ) }),
127
- columns.map((column, colIndex) => /* @__PURE__ */ createElement("td", { ...getTdProps(column, row, keys), key: colIndex }))
128
- ]
129
- }
130
- ),
131
- isExpanded && expandedRows.has(rowIndex) && /* @__PURE__ */ jsx("tr", { ...getExpandedContentProps(), children: /* @__PURE__ */ jsx("td", { colSpan: COL_SPAN_COUNT, ...getTdProps({ field: "expandedRow" }, row, keys), children: row.renderExpandedRow && row.renderExpandedRow() }) })
132
- ] }, rowIndex);
133
- }) : /* @__PURE__ */ jsx("tr", { ...getTrProps({ index: -1 }), children: /* @__PURE__ */ jsx("td", { colSpan: COL_SPAN_COUNT, children: emptyContent }) }) });
134
- };
135
- var table_body_default = TableBody;
136
-
137
- export {
138
- table_body_default
139
- };
@@ -1,56 +0,0 @@
1
- "use client";
2
- import {
3
- checkbox_default
4
- } from "./chunk-XTGRSVYO.mjs";
5
- import {
6
- clsx
7
- } from "./chunk-27Y6K5NK.mjs";
8
-
9
- // src/components/table/table-head.tsx
10
- import { useCallback } from "react";
11
- import { jsx, jsxs } from "react/jsx-runtime";
12
- import { createElement } from "react";
13
- var TableHead = ({
14
- columns,
15
- slots,
16
- size,
17
- color,
18
- isExpanded,
19
- isChecked,
20
- isCheckedAll,
21
- classNames,
22
- onCheckAll
23
- }) => {
24
- const getTheadProps = useCallback(
25
- () => ({
26
- className: slots.thead({ class: clsx(classNames == null ? void 0 : classNames.thead) })
27
- }),
28
- [classNames == null ? void 0 : classNames.thead, slots]
29
- );
30
- const getTrProps = useCallback(
31
- () => ({
32
- className: slots.tr({ class: clsx(classNames == null ? void 0 : classNames.tr) })
33
- }),
34
- [classNames == null ? void 0 : classNames.tr, slots]
35
- );
36
- const getThProps = useCallback(
37
- ({ className }) => ({
38
- className: slots.th({ class: clsx(classNames == null ? void 0 : classNames.th, className) })
39
- }),
40
- [classNames == null ? void 0 : classNames.th, slots]
41
- );
42
- const handleClickCheckAll = (e) => {
43
- e.preventDefault();
44
- onCheckAll(!isCheckedAll);
45
- };
46
- return /* @__PURE__ */ jsx("thead", { ...getTheadProps(), children: /* @__PURE__ */ jsxs("tr", { ...getTrProps(), children: [
47
- isChecked && /* @__PURE__ */ jsx("th", { className: "w-[40px]", onClick: handleClickCheckAll, children: /* @__PURE__ */ jsx(checkbox_default, { size, color, checked: isCheckedAll, classNames: { wrapper: "bg-background" } }) }),
48
- isExpanded && /* @__PURE__ */ jsx("th", { className: "w-[40px]" }),
49
- columns.map((column, index) => /* @__PURE__ */ createElement("th", { ...getThProps(column), key: column.field + index + "th" }, column.headerName))
50
- ] }) });
51
- };
52
- var table_head_default = TableHead;
53
-
54
- export {
55
- table_head_default
56
- };