@deepnoid/ui 0.1.57 → 0.1.59

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 (101) hide show
  1. package/.turbo/turbo-build.log +163 -158
  2. package/dist/{chunk-4T7R3PEH.mjs → chunk-2SXNFIG3.mjs} +3 -3
  3. package/dist/{chunk-N4TTHIUT.mjs → chunk-5E6GGBHC.mjs} +5 -5
  4. package/dist/chunk-ATFYXYEV.mjs +85 -0
  5. package/dist/{chunk-DLQGQUCD.mjs → chunk-CR7MUSOG.mjs} +1 -1
  6. package/dist/{chunk-PMZH6GPQ.mjs → chunk-CY2XMA4S.mjs} +5 -5
  7. package/dist/{chunk-WFMFC7R6.mjs → chunk-IVONTBFH.mjs} +32 -4
  8. package/dist/{chunk-BPEMHZH3.mjs → chunk-KJMJIFPS.mjs} +1 -1
  9. package/dist/{chunk-3ONHMYAP.mjs → chunk-OBFPPWUK.mjs} +1 -1
  10. package/dist/{chunk-LDRIZFBK.mjs → chunk-SAN7EOTJ.mjs} +3 -3
  11. package/dist/{chunk-P7YYNA6L.mjs → chunk-SBL6IHEW.mjs} +1 -1
  12. package/dist/{chunk-DLFXCMUU.mjs → chunk-XIQHJBEM.mjs} +2 -2
  13. package/dist/{chunk-LQEA2HU5.mjs → chunk-YNKC7SHK.mjs} +4 -4
  14. package/dist/components/backdrop/backdrop.mjs +2 -2
  15. package/dist/components/backdrop/index.mjs +2 -2
  16. package/dist/components/breadcrumb/breadcrumb.js +29 -1
  17. package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
  18. package/dist/components/breadcrumb/index.js +29 -1
  19. package/dist/components/breadcrumb/index.mjs +5 -5
  20. package/dist/components/button/button.mjs +2 -2
  21. package/dist/components/button/icon-button.mjs +2 -2
  22. package/dist/components/button/index.js +29 -1
  23. package/dist/components/button/index.mjs +4 -4
  24. package/dist/components/button/text-button.d.mts +12 -0
  25. package/dist/components/button/text-button.d.ts +12 -0
  26. package/dist/components/button/text-button.js +29 -1
  27. package/dist/components/button/text-button.mjs +2 -2
  28. package/dist/components/charts/areaChart.mjs +2 -2
  29. package/dist/components/charts/barChart.mjs +2 -2
  30. package/dist/components/charts/circularProgress.mjs +2 -2
  31. package/dist/components/charts/index.mjs +4 -4
  32. package/dist/components/checkbox/checkbox.mjs +2 -2
  33. package/dist/components/checkbox/index.mjs +2 -2
  34. package/dist/components/chip/chip.mjs +2 -2
  35. package/dist/components/chip/index.mjs +2 -2
  36. package/dist/components/dateTimePicker/calendar.mjs +2 -2
  37. package/dist/components/dateTimePicker/dateTimePicker.mjs +6 -6
  38. package/dist/components/dateTimePicker/index.mjs +6 -6
  39. package/dist/components/dateTimePicker/timePicker.mjs +4 -4
  40. package/dist/components/drawer/drawer.mjs +2 -2
  41. package/dist/components/drawer/index.mjs +2 -2
  42. package/dist/components/fileUpload/fileUpload.mjs +6 -6
  43. package/dist/components/fileUpload/index.mjs +6 -6
  44. package/dist/components/input/index.mjs +2 -2
  45. package/dist/components/input/input.mjs +2 -2
  46. package/dist/components/list/index.mjs +3 -3
  47. package/dist/components/list/list.mjs +2 -2
  48. package/dist/components/list/listItem.mjs +2 -2
  49. package/dist/components/modal/index.mjs +6 -6
  50. package/dist/components/modal/modal.mjs +6 -6
  51. package/dist/components/pagination/index.mjs +3 -3
  52. package/dist/components/pagination/pagination.mjs +3 -3
  53. package/dist/components/radio/index.mjs +2 -2
  54. package/dist/components/radio/radio.mjs +2 -2
  55. package/dist/components/select/index.mjs +2 -2
  56. package/dist/components/select/select.mjs +2 -2
  57. package/dist/components/table/definition-table2.d.mts +58 -0
  58. package/dist/components/table/definition-table2.d.ts +58 -0
  59. package/dist/components/table/definition-table2.js +438 -0
  60. package/dist/components/table/definition-table2.mjs +10 -0
  61. package/dist/components/table/index.d.mts +1 -0
  62. package/dist/components/table/index.d.ts +1 -0
  63. package/dist/components/table/index.js +76 -0
  64. package/dist/components/table/index.mjs +12 -8
  65. package/dist/components/table/table-body.mjs +3 -3
  66. package/dist/components/table/table-head.mjs +3 -3
  67. package/dist/components/table/table.mjs +7 -7
  68. package/dist/components/tabs/index.mjs +2 -2
  69. package/dist/components/tabs/tabs.mjs +2 -2
  70. package/dist/components/toast/index.mjs +3 -3
  71. package/dist/components/toast/toast.mjs +2 -2
  72. package/dist/components/toast/use-toast.mjs +3 -3
  73. package/dist/components/tooltip/index.mjs +2 -2
  74. package/dist/components/tooltip/tooltip.mjs +2 -2
  75. package/dist/components/tree/index.mjs +2 -2
  76. package/dist/components/tree/tree.mjs +2 -2
  77. package/dist/index.d.mts +1 -0
  78. package/dist/index.d.ts +1 -0
  79. package/dist/index.js +421 -317
  80. package/dist/index.mjs +50 -46
  81. package/package.json +1 -1
  82. package/dist/{chunk-QIRL6HY6.mjs → chunk-33LANVZV.mjs} +3 -3
  83. package/dist/{chunk-U2NPH2O3.mjs → chunk-4SDLHEKS.mjs} +3 -3
  84. package/dist/{chunk-73RWXO3Y.mjs → chunk-B2BSN6WP.mjs} +3 -3
  85. package/dist/{chunk-GL5J2BKI.mjs → chunk-BEKIKGI3.mjs} +3 -3
  86. package/dist/{chunk-DX3KXNP6.mjs → chunk-DLR42ZKG.mjs} +0 -0
  87. package/dist/{chunk-YZDZYMBP.mjs → chunk-DQX2CILT.mjs} +3 -3
  88. package/dist/{chunk-Z2537DF6.mjs → chunk-IL5ENWCR.mjs} +3 -3
  89. package/dist/{chunk-HHRKPSO6.mjs → chunk-NGHVM4SL.mjs} +3 -3
  90. package/dist/{chunk-LL6F3WDX.mjs → chunk-P5QCU457.mjs} +3 -3
  91. package/dist/{chunk-76B5LZBM.mjs → chunk-QEPJICMO.mjs} +3 -3
  92. package/dist/{chunk-LSO5QZIT.mjs → chunk-RM4PEV62.mjs} +3 -3
  93. package/dist/{chunk-DN6AW7DN.mjs → chunk-SK5HZOEH.mjs} +3 -3
  94. package/dist/{chunk-2YMAKIZ6.mjs → chunk-SSMMWMQC.mjs} +3 -3
  95. package/dist/{chunk-L3RCWZTV.mjs → chunk-SWIYZRBZ.mjs} +3 -3
  96. package/dist/{chunk-DFBPLQMN.mjs → chunk-U7LZMAHH.mjs} +3 -3
  97. package/dist/{chunk-HIVPDIEP.mjs → chunk-UFVQPPPW.mjs} +3 -3
  98. package/dist/{chunk-ZOENHWSZ.mjs → chunk-VGFGIXS6.mjs} +3 -3
  99. package/dist/{chunk-C4AGYO7C.mjs → chunk-W6H3DI2L.mjs} +3 -3
  100. package/dist/{chunk-D6QI3DJG.mjs → chunk-YLRYHUTW.mjs} +3 -3
  101. package/dist/{chunk-UETBYMGS.mjs → chunk-ZNDWOIP4.mjs} +3 -3
@@ -0,0 +1,58 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as tailwind_merge from 'tailwind-merge';
3
+ import * as react from 'react';
4
+ import { ReactNode } from 'react';
5
+ import { SlotsToClasses } from '../../utils/types.mjs';
6
+
7
+ type CellProps = {
8
+ content: ReactNode;
9
+ className?: string;
10
+ colSpan?: number;
11
+ rowSpan?: number;
12
+ width?: string;
13
+ };
14
+ type TableRow = {
15
+ cells: CellProps[];
16
+ className?: string;
17
+ };
18
+ interface DefinitionTableProps {
19
+ rows: TableRow[];
20
+ footer?: ReactNode;
21
+ classNames?: SlotsToClasses<DefinitionTableSlots>;
22
+ }
23
+ declare const DefinitionTable2: react.ForwardRefExoticComponent<DefinitionTableProps & react.RefAttributes<HTMLDivElement>>;
24
+
25
+ declare const DefinitionTableStyle: tailwind_variants.TVReturnType<{
26
+ [key: string]: {
27
+ [key: string]: tailwind_merge.ClassNameValue | {
28
+ base?: tailwind_merge.ClassNameValue;
29
+ table?: tailwind_merge.ClassNameValue;
30
+ };
31
+ };
32
+ } | {
33
+ [x: string]: {
34
+ [x: string]: tailwind_merge.ClassNameValue | {
35
+ base?: tailwind_merge.ClassNameValue;
36
+ table?: tailwind_merge.ClassNameValue;
37
+ };
38
+ };
39
+ } | {}, {
40
+ base: string[];
41
+ table: string[];
42
+ }, undefined, {
43
+ [key: string]: {
44
+ [key: string]: tailwind_merge.ClassNameValue | {
45
+ base?: tailwind_merge.ClassNameValue;
46
+ table?: tailwind_merge.ClassNameValue;
47
+ };
48
+ };
49
+ } | {}, {
50
+ base: string[];
51
+ table: string[];
52
+ }, tailwind_variants.TVReturnType<unknown, {
53
+ base: string[];
54
+ table: string[];
55
+ }, undefined, unknown, unknown, undefined>>;
56
+ type DefinitionTableSlots = keyof ReturnType<typeof DefinitionTableStyle>;
57
+
58
+ export { type TableRow, DefinitionTable2 as default };
@@ -0,0 +1,58 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as tailwind_merge from 'tailwind-merge';
3
+ import * as react from 'react';
4
+ import { ReactNode } from 'react';
5
+ import { SlotsToClasses } from '../../utils/types.js';
6
+
7
+ type CellProps = {
8
+ content: ReactNode;
9
+ className?: string;
10
+ colSpan?: number;
11
+ rowSpan?: number;
12
+ width?: string;
13
+ };
14
+ type TableRow = {
15
+ cells: CellProps[];
16
+ className?: string;
17
+ };
18
+ interface DefinitionTableProps {
19
+ rows: TableRow[];
20
+ footer?: ReactNode;
21
+ classNames?: SlotsToClasses<DefinitionTableSlots>;
22
+ }
23
+ declare const DefinitionTable2: react.ForwardRefExoticComponent<DefinitionTableProps & react.RefAttributes<HTMLDivElement>>;
24
+
25
+ declare const DefinitionTableStyle: tailwind_variants.TVReturnType<{
26
+ [key: string]: {
27
+ [key: string]: tailwind_merge.ClassNameValue | {
28
+ base?: tailwind_merge.ClassNameValue;
29
+ table?: tailwind_merge.ClassNameValue;
30
+ };
31
+ };
32
+ } | {
33
+ [x: string]: {
34
+ [x: string]: tailwind_merge.ClassNameValue | {
35
+ base?: tailwind_merge.ClassNameValue;
36
+ table?: tailwind_merge.ClassNameValue;
37
+ };
38
+ };
39
+ } | {}, {
40
+ base: string[];
41
+ table: string[];
42
+ }, undefined, {
43
+ [key: string]: {
44
+ [key: string]: tailwind_merge.ClassNameValue | {
45
+ base?: tailwind_merge.ClassNameValue;
46
+ table?: tailwind_merge.ClassNameValue;
47
+ };
48
+ };
49
+ } | {}, {
50
+ base: string[];
51
+ table: string[];
52
+ }, tailwind_variants.TVReturnType<unknown, {
53
+ base: string[];
54
+ table: string[];
55
+ }, undefined, unknown, unknown, undefined>>;
56
+ type DefinitionTableSlots = keyof ReturnType<typeof DefinitionTableStyle>;
57
+
58
+ export { type TableRow, DefinitionTable2 as default };
@@ -0,0 +1,438 @@
1
+ "use client";
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJS = (cb, mod) => function __require() {
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
+ };
12
+ var __export = (target, all) => {
13
+ for (var name in all)
14
+ __defProp(target, name, { get: all[name], enumerable: true });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from))
19
+ if (!__hasOwnProp.call(to, key) && key !== except)
20
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
+ mod
31
+ ));
32
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
+
34
+ // ../../node_modules/tailwindcss/lib/util/createPlugin.js
35
+ var require_createPlugin = __commonJS({
36
+ "../../node_modules/tailwindcss/lib/util/createPlugin.js"(exports2) {
37
+ "use strict";
38
+ Object.defineProperty(exports2, "__esModule", {
39
+ value: true
40
+ });
41
+ Object.defineProperty(exports2, "default", {
42
+ enumerable: true,
43
+ get: function() {
44
+ return _default;
45
+ }
46
+ });
47
+ function createPlugin(plugin2, config) {
48
+ return {
49
+ handler: plugin2,
50
+ config
51
+ };
52
+ }
53
+ createPlugin.withOptions = function(pluginFunction, configFunction = () => ({})) {
54
+ const optionsFunction = function(options) {
55
+ return {
56
+ __options: options,
57
+ handler: pluginFunction(options),
58
+ config: configFunction(options)
59
+ };
60
+ };
61
+ optionsFunction.__isOptionsFunction = true;
62
+ optionsFunction.__pluginFunction = pluginFunction;
63
+ optionsFunction.__configFunction = configFunction;
64
+ return optionsFunction;
65
+ };
66
+ var _default = createPlugin;
67
+ }
68
+ });
69
+
70
+ // ../../node_modules/tailwindcss/lib/public/create-plugin.js
71
+ var require_create_plugin = __commonJS({
72
+ "../../node_modules/tailwindcss/lib/public/create-plugin.js"(exports2) {
73
+ "use strict";
74
+ Object.defineProperty(exports2, "__esModule", {
75
+ value: true
76
+ });
77
+ Object.defineProperty(exports2, "default", {
78
+ enumerable: true,
79
+ get: function() {
80
+ return _default;
81
+ }
82
+ });
83
+ var _createPlugin = /* @__PURE__ */ _interop_require_default(require_createPlugin());
84
+ function _interop_require_default(obj) {
85
+ return obj && obj.__esModule ? obj : {
86
+ default: obj
87
+ };
88
+ }
89
+ var _default = _createPlugin.default;
90
+ }
91
+ });
92
+
93
+ // ../../node_modules/tailwindcss/plugin.js
94
+ var require_plugin = __commonJS({
95
+ "../../node_modules/tailwindcss/plugin.js"(exports2, module2) {
96
+ "use strict";
97
+ var createPlugin = require_create_plugin();
98
+ module2.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
99
+ }
100
+ });
101
+
102
+ // src/components/table/definition-table2.tsx
103
+ var definition_table2_exports = {};
104
+ __export(definition_table2_exports, {
105
+ default: () => definition_table2_default
106
+ });
107
+ module.exports = __toCommonJS(definition_table2_exports);
108
+ var import_react = require("react");
109
+
110
+ // src/utils/tailwind-variants.ts
111
+ var import_tailwind_variants = require("tailwind-variants");
112
+
113
+ // ../tailwind-config/src/plugin.ts
114
+ var import_plugin = __toESM(require_plugin());
115
+
116
+ // ../tailwind-config/src/typography/font.ts
117
+ var fontSize = {
118
+ h1: [
119
+ "40px",
120
+ {
121
+ fontWeight: "700"
122
+ }
123
+ ],
124
+ h2: [
125
+ "34px",
126
+ {
127
+ fontWeight: "700"
128
+ }
129
+ ],
130
+ h3: [
131
+ "28px",
132
+ {
133
+ fontWeight: "700"
134
+ }
135
+ ],
136
+ h4: [
137
+ "24px",
138
+ {
139
+ fontWeight: "700"
140
+ }
141
+ ],
142
+ h5: [
143
+ "20px",
144
+ {
145
+ fontWeight: "600"
146
+ }
147
+ ],
148
+ sm: [
149
+ "12px",
150
+ {
151
+ lineHeight: "18px",
152
+ fontWeight: "400"
153
+ }
154
+ ],
155
+ md: [
156
+ "14px",
157
+ {
158
+ lineHeight: "21px",
159
+ fontWeight: "400"
160
+ }
161
+ ],
162
+ lg: [
163
+ "16px",
164
+ {
165
+ lineHeight: "24px",
166
+ fontWeight: "400"
167
+ }
168
+ ],
169
+ xl: [
170
+ "18px",
171
+ {
172
+ lineHeight: "27px",
173
+ fontWeight: "400"
174
+ }
175
+ ]
176
+ };
177
+
178
+ // ../tailwind-config/src/animation/slide.ts
179
+ var sliceAnimation = {
180
+ slideInFromTop: "slideInFromTop 0.5s ease-out",
181
+ slideInFromBottom: "slideInFromBottom 0.5s ease-out",
182
+ slideInFromLeft: "slideInFromLeft 0.5s ease-out",
183
+ slideInFromRight: "slideInFromRight 0.5s ease-out",
184
+ slideOutToTop: "slideOutToTop 0.5s ease-in",
185
+ slideOutToBottom: "slideOutToBottom 0.5s ease-in",
186
+ slideOutToLeft: "slideOutToLeft 0.5s ease-in",
187
+ slideOutToRight: "slideOutToRight 0.5s ease-in"
188
+ };
189
+ var sliceKeyframe = {
190
+ slideInFromTop: {
191
+ "0%": {
192
+ transform: "translateY(-10px)",
193
+ opacity: "0"
194
+ },
195
+ "100%": {
196
+ transform: "translateY(0)",
197
+ opacity: "1"
198
+ }
199
+ },
200
+ slideInFromBottom: {
201
+ "0%": {
202
+ transform: "translateY(10px)",
203
+ opacity: "0"
204
+ },
205
+ "100%": {
206
+ transform: "translateY(0)",
207
+ opacity: "1"
208
+ }
209
+ },
210
+ slideInFromLeft: {
211
+ "0%": {
212
+ transform: "translateX(-10px)",
213
+ opacity: "0"
214
+ },
215
+ "100%": {
216
+ transform: "translateX(0)",
217
+ opacity: "1"
218
+ }
219
+ },
220
+ slideInFromRight: {
221
+ "0%": {
222
+ transform: "translateX(10px)",
223
+ opacity: "0"
224
+ },
225
+ "100%": {
226
+ transform: "translateX(0)",
227
+ opacity: "1"
228
+ }
229
+ },
230
+ slideOutToTop: {
231
+ "0%": {
232
+ transform: "translateY(0)",
233
+ opacity: "1"
234
+ },
235
+ "100%": {
236
+ transform: "translateY(-10px)",
237
+ opacity: "0"
238
+ }
239
+ },
240
+ slideOutToBottom: {
241
+ "0%": {
242
+ transform: "translateY(0)",
243
+ opacity: "1"
244
+ },
245
+ "100%": {
246
+ transform: "translateY(10px)",
247
+ opacity: "0"
248
+ }
249
+ },
250
+ slideOutToLeft: {
251
+ "0%": {
252
+ transform: "translateX(0)",
253
+ opacity: "1"
254
+ },
255
+ "100%": {
256
+ transform: "translateX(-10px)",
257
+ opacity: "0"
258
+ }
259
+ },
260
+ slideOutToRight: {
261
+ "0%": {
262
+ transform: "translateX(0)",
263
+ opacity: "1"
264
+ },
265
+ "100%": {
266
+ transform: "translateX(10px)",
267
+ opacity: "0"
268
+ }
269
+ }
270
+ };
271
+
272
+ // ../tailwind-config/src/animation/index.ts
273
+ var animation = { ...sliceAnimation };
274
+ var keyframes = { ...sliceKeyframe };
275
+
276
+ // ../tailwind-config/src/shadow/index.ts
277
+ var boxShadow = {
278
+ "border-1": "inner 0 0 0 1px inset",
279
+ "border-2": "inner 0 0 0 2px inset",
280
+ "border-3": "inner 0 0 0 3px inset",
281
+ "border-4": "inner 0 0 0 4px inset",
282
+ "border-5": "inner 0 0 0 5px inset",
283
+ "border-6": "inner 0 0 0 6px inset",
284
+ "border-7": "inner 0 0 0 7px inset",
285
+ "border-8": "inner 0 0 0 8px inset",
286
+ "border-9": "inner 0 0 0 9px inset",
287
+ "border-10": "inner 0 0 0 10px inset",
288
+ inner: "inset 0 4px 8px 0 rgba(36, 39, 44, 0.2)",
289
+ drop: "0 20px 40px 0 rgba(36, 39, 44, 0.2)"
290
+ };
291
+
292
+ // ../tailwind-config/src/border/radius.ts
293
+ var borderRadius = {
294
+ sm: "4px",
295
+ md: "6px",
296
+ lg: "8px",
297
+ xl: "10px",
298
+ none: "0",
299
+ full: "9999px"
300
+ };
301
+
302
+ // ../tailwind-config/src/space/gap.ts
303
+ var gap = {
304
+ sm: "4px",
305
+ md: "6px",
306
+ lg: "8px",
307
+ xl: "10px"
308
+ };
309
+
310
+ // src/utils/tailwind-variants.ts
311
+ function typedKeys(obj) {
312
+ return Object.keys(obj);
313
+ }
314
+ var COMMON_SIZE = ["sm", "md", "lg", "xl"];
315
+ var tv = (0, import_tailwind_variants.createTV)({
316
+ twMergeConfig: {
317
+ classGroups: {
318
+ fontSize: [{ text: [...typedKeys(fontSize)] }],
319
+ borderRadius: [{ rounded: [...typedKeys(borderRadius)] }],
320
+ boxShadow: [{ shadow: [...typedKeys(boxShadow)] }],
321
+ padding: [{ p: [...COMMON_SIZE] }],
322
+ gap: [{ gap: [...typedKeys(gap)] }]
323
+ }
324
+ }
325
+ });
326
+
327
+ // src/utils/clsx.ts
328
+ function clsx(...args) {
329
+ var i = 0, tmp, x, str = "";
330
+ while (i < args.length) {
331
+ if (tmp = args[i++]) {
332
+ if (x = toVal(tmp)) {
333
+ str && (str += " ");
334
+ str += x;
335
+ }
336
+ }
337
+ }
338
+ return str;
339
+ }
340
+ function toVal(mix) {
341
+ var k, y, str = "";
342
+ if (typeof mix === "string" || typeof mix === "number") {
343
+ str += mix;
344
+ } else if (typeof mix === "object") {
345
+ if (Array.isArray(mix)) {
346
+ var len = mix.length;
347
+ for (k = 0; k < len; k++) {
348
+ if (mix[k]) {
349
+ if (y = toVal(mix[k])) {
350
+ str && (str += " ");
351
+ str += y;
352
+ }
353
+ }
354
+ }
355
+ } else {
356
+ for (y in mix) {
357
+ if (mix[y]) {
358
+ str && (str += " ");
359
+ str += y;
360
+ }
361
+ }
362
+ }
363
+ }
364
+ return str;
365
+ }
366
+
367
+ // src/components/table/definition-table2.tsx
368
+ var import_jsx_runtime = require("react/jsx-runtime");
369
+ var DEFAULT_CELL_CLASSES = "px-[10px] py-[9.5px] text-md border-r border-neutral-light";
370
+ var FIRST_CELL_WIDTH_CLASS = "w-[120px] font-bold text-md text-body-foreground";
371
+ var renderColGroup = (rows) => {
372
+ let maxCols = 0;
373
+ const colWidths = [];
374
+ rows.forEach((row) => {
375
+ let currentColCount = 0;
376
+ row.cells.forEach((cell) => {
377
+ currentColCount += cell.colSpan || 1;
378
+ });
379
+ maxCols = Math.max(maxCols, currentColCount);
380
+ });
381
+ colWidths[0] = "120px";
382
+ rows.forEach((row) => {
383
+ let colIndex = 0;
384
+ row.cells.forEach((cell) => {
385
+ const span = cell.colSpan || 1;
386
+ if (colIndex > 0 && cell.width && cell.width !== "auto" && colIndex < maxCols) {
387
+ colWidths[colIndex] = cell.width;
388
+ }
389
+ colIndex += span;
390
+ });
391
+ });
392
+ const cols = [];
393
+ for (let i = 0; i < maxCols; i++) {
394
+ cols.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)("col", { style: colWidths[i] ? { width: colWidths[i] } : { width: "auto" } }, `col-${i}`));
395
+ }
396
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("colgroup", { children: cols });
397
+ };
398
+ var DefinitionTableRow = ({ cells, className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { className: `border-neutral-light min-h-[50px] border-b ${className || ""}`, children: cells.map((cell, colIndex) => {
399
+ const isFirstCell = colIndex === 0;
400
+ const combinedClassName = [isFirstCell ? FIRST_CELL_WIDTH_CLASS : "", clsx(DEFAULT_CELL_CLASSES, cell.className)].filter(Boolean).join(" ");
401
+ let cellStyle;
402
+ if (isFirstCell) {
403
+ cellStyle = { width: "120px", minWidth: "120px", maxWidth: "120px" };
404
+ } else if (cell.width && cell.width !== "auto") {
405
+ cellStyle = { width: cell.width, minWidth: cell.width, maxWidth: cell.width };
406
+ } else {
407
+ cellStyle = { width: "100%" };
408
+ }
409
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
410
+ "td",
411
+ {
412
+ className: combinedClassName,
413
+ colSpan: cell.colSpan,
414
+ rowSpan: cell.rowSpan,
415
+ style: cellStyle,
416
+ children: cell.content
417
+ },
418
+ colIndex
419
+ );
420
+ }) });
421
+ var DefinitionTable2 = (0, import_react.forwardRef)(({ rows = [], footer, classNames }, ref) => {
422
+ const slots = (0, import_react.useMemo)(() => DefinitionTableStyle(), []);
423
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
424
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: [
425
+ renderColGroup(rows),
426
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DefinitionTableRow, { ...row, className: `${row.className || ""} ${i === 0 ? "first-row" : ""}` }, i)) })
427
+ ] }),
428
+ footer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: footer })
429
+ ] });
430
+ });
431
+ DefinitionTable2.displayName = "DefinitionTable2";
432
+ var definition_table2_default = DefinitionTable2;
433
+ var DefinitionTableStyle = tv({
434
+ slots: {
435
+ base: ["flex", "flex-col", "gap-[30px]"],
436
+ table: ["w-full", "table-auto", "border", "border-neutral-light"]
437
+ }
438
+ });
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import {
3
+ definition_table2_default
4
+ } from "../../chunk-ATFYXYEV.mjs";
5
+ import "../../chunk-27Y6K5NK.mjs";
6
+ import "../../chunk-4ZJFD3L3.mjs";
7
+ import "../../chunk-AC6TWLRT.mjs";
8
+ export {
9
+ definition_table2_default as default
10
+ };
@@ -1,5 +1,6 @@
1
1
  export { default as Table, TableColumn, TableRef, TableRow } from './table.mjs';
2
2
  export { default as DefinitionTable } from './definition-table.mjs';
3
+ export { default as DefinitionTable2, TableRow as TableRow2 } from './definition-table2.mjs';
3
4
  import 'tailwind-variants';
4
5
  import 'react';
5
6
  import '../../utils/types.mjs';
@@ -1,5 +1,6 @@
1
1
  export { default as Table, TableColumn, TableRef, TableRow } from './table.js';
2
2
  export { default as DefinitionTable } from './definition-table.js';
3
+ export { default as DefinitionTable2, TableRow as TableRow2 } from './definition-table2.js';
3
4
  import 'tailwind-variants';
4
5
  import 'react';
5
6
  import '../../utils/types.js';
@@ -103,6 +103,7 @@ var require_plugin = __commonJS({
103
103
  var table_exports = {};
104
104
  __export(table_exports, {
105
105
  DefinitionTable: () => definition_table_default,
106
+ DefinitionTable2: () => definition_table2_default,
106
107
  Table: () => table_default
107
108
  });
108
109
  module.exports = __toCommonJS(table_exports);
@@ -5851,8 +5852,83 @@ var DefinitionTableStyle = tv({
5851
5852
  table: ["w-full", "table-fixed", "border", "border-neutral-light"]
5852
5853
  }
5853
5854
  });
5855
+
5856
+ // src/components/table/definition-table2.tsx
5857
+ var import_react7 = require("react");
5858
+ var import_jsx_runtime12 = require("react/jsx-runtime");
5859
+ var DEFAULT_CELL_CLASSES = "px-[10px] py-[9.5px] text-md border-r border-neutral-light";
5860
+ var FIRST_CELL_WIDTH_CLASS = "w-[120px] font-bold text-md text-body-foreground";
5861
+ var renderColGroup = (rows) => {
5862
+ let maxCols = 0;
5863
+ const colWidths = [];
5864
+ rows.forEach((row) => {
5865
+ let currentColCount = 0;
5866
+ row.cells.forEach((cell) => {
5867
+ currentColCount += cell.colSpan || 1;
5868
+ });
5869
+ maxCols = Math.max(maxCols, currentColCount);
5870
+ });
5871
+ colWidths[0] = "120px";
5872
+ rows.forEach((row) => {
5873
+ let colIndex = 0;
5874
+ row.cells.forEach((cell) => {
5875
+ const span = cell.colSpan || 1;
5876
+ if (colIndex > 0 && cell.width && cell.width !== "auto" && colIndex < maxCols) {
5877
+ colWidths[colIndex] = cell.width;
5878
+ }
5879
+ colIndex += span;
5880
+ });
5881
+ });
5882
+ const cols = [];
5883
+ for (let i = 0; i < maxCols; i++) {
5884
+ cols.push(/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("col", { style: colWidths[i] ? { width: colWidths[i] } : { width: "auto" } }, `col-${i}`));
5885
+ }
5886
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("colgroup", { children: cols });
5887
+ };
5888
+ var DefinitionTableRow2 = ({ cells, className }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tr", { className: `border-neutral-light min-h-[50px] border-b ${className || ""}`, children: cells.map((cell, colIndex) => {
5889
+ const isFirstCell = colIndex === 0;
5890
+ const combinedClassName = [isFirstCell ? FIRST_CELL_WIDTH_CLASS : "", clsx(DEFAULT_CELL_CLASSES, cell.className)].filter(Boolean).join(" ");
5891
+ let cellStyle;
5892
+ if (isFirstCell) {
5893
+ cellStyle = { width: "120px", minWidth: "120px", maxWidth: "120px" };
5894
+ } else if (cell.width && cell.width !== "auto") {
5895
+ cellStyle = { width: cell.width, minWidth: cell.width, maxWidth: cell.width };
5896
+ } else {
5897
+ cellStyle = { width: "100%" };
5898
+ }
5899
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
5900
+ "td",
5901
+ {
5902
+ className: combinedClassName,
5903
+ colSpan: cell.colSpan,
5904
+ rowSpan: cell.rowSpan,
5905
+ style: cellStyle,
5906
+ children: cell.content
5907
+ },
5908
+ colIndex
5909
+ );
5910
+ }) });
5911
+ var DefinitionTable2 = (0, import_react7.forwardRef)(({ rows = [], footer, classNames }, ref) => {
5912
+ const slots = (0, import_react7.useMemo)(() => DefinitionTableStyle2(), []);
5913
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
5914
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: [
5915
+ renderColGroup(rows),
5916
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DefinitionTableRow2, { ...row, className: `${row.className || ""} ${i === 0 ? "first-row" : ""}` }, i)) })
5917
+ ] }),
5918
+ footer && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: footer })
5919
+ ] });
5920
+ });
5921
+ DefinitionTable2.displayName = "DefinitionTable2";
5922
+ var definition_table2_default = DefinitionTable2;
5923
+ var DefinitionTableStyle2 = tv({
5924
+ slots: {
5925
+ base: ["flex", "flex-col", "gap-[30px]"],
5926
+ table: ["w-full", "table-auto", "border", "border-neutral-light"]
5927
+ }
5928
+ });
5854
5929
  // Annotate the CommonJS export names for ESM import in node:
5855
5930
  0 && (module.exports = {
5856
5931
  DefinitionTable,
5932
+ DefinitionTable2,
5857
5933
  Table
5858
5934
  });