@deepnoid/ui 0.1.56 → 0.1.58
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.
- package/.turbo/turbo-build.log +164 -149
- package/dist/chunk-A6HCKIVP.mjs +85 -0
- package/dist/chunk-DLR42ZKG.mjs +1 -0
- package/dist/{chunk-ZI37UH3A.mjs → chunk-DN6AW7DN.mjs} +11 -13
- package/dist/{chunk-IC3O54EM.mjs → chunk-LDRIZFBK.mjs} +2 -2
- package/dist/chunk-LSO5QZIT.mjs +174 -0
- package/dist/{chunk-BWTDELPC.mjs → chunk-N4TTHIUT.mjs} +1 -1
- package/dist/components/breadcrumb/breadcrumb.mjs +3 -3
- package/dist/components/breadcrumb/index.mjs +3 -3
- package/dist/components/button/button.d.mts +3 -9
- package/dist/components/button/button.d.ts +3 -9
- package/dist/components/button/button.js +8 -10
- package/dist/components/button/button.mjs +2 -2
- package/dist/components/button/icon-button.mjs +2 -2
- package/dist/components/button/index.js +8 -10
- package/dist/components/button/index.mjs +3 -3
- package/dist/components/drawer/drawer.d.mts +89 -0
- package/dist/components/drawer/drawer.d.ts +89 -0
- package/dist/components/drawer/drawer.js +544 -0
- package/dist/components/drawer/drawer.mjs +11 -0
- package/dist/components/drawer/index.d.mts +4 -0
- package/dist/components/drawer/index.d.ts +4 -0
- package/dist/components/drawer/index.js +550 -0
- package/dist/components/drawer/index.mjs +12 -0
- package/dist/components/fileUpload/fileUpload.js +8 -10
- package/dist/components/fileUpload/fileUpload.mjs +4 -4
- package/dist/components/fileUpload/index.js +8 -10
- package/dist/components/fileUpload/index.mjs +4 -4
- package/dist/components/modal/index.js +8 -10
- package/dist/components/modal/index.mjs +4 -4
- package/dist/components/modal/modal.js +8 -10
- package/dist/components/modal/modal.mjs +4 -4
- package/dist/components/ripple/index.mjs +3 -3
- package/dist/components/table/definition-table2.d.mts +58 -0
- package/dist/components/table/definition-table2.d.ts +58 -0
- package/dist/components/table/definition-table2.js +438 -0
- package/dist/components/table/definition-table2.mjs +10 -0
- package/dist/components/table/index.d.mts +1 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/index.js +76 -0
- package/dist/components/table/index.mjs +10 -6
- package/dist/components/table/table.mjs +2 -2
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +550 -314
- package/dist/index.mjs +40 -31
- package/package.json +1 -1
- package/dist/{chunk-DX3KXNP6.mjs → chunk-32GA3YW4.mjs} +0 -0
- package/dist/{chunk-D47SHPFE.mjs → chunk-DFBPLQMN.mjs} +3 -3
|
@@ -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
|
+
});
|
|
@@ -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
|
});
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "../../chunk-
|
|
2
|
+
import "../../chunk-DLR42ZKG.mjs";
|
|
3
|
+
import {
|
|
4
|
+
definition_table_default
|
|
5
|
+
} from "../../chunk-6TIIBU7J.mjs";
|
|
6
|
+
import {
|
|
7
|
+
definition_table2_default
|
|
8
|
+
} from "../../chunk-A6HCKIVP.mjs";
|
|
3
9
|
import {
|
|
4
10
|
table_default
|
|
5
11
|
} from "../../chunk-4T7R3PEH.mjs";
|
|
6
12
|
import "../../chunk-BPEMHZH3.mjs";
|
|
7
13
|
import "../../chunk-P7YYNA6L.mjs";
|
|
8
|
-
import "../../chunk-MZ76AA76.mjs";
|
|
9
|
-
import "../../chunk-6PN3DGOE.mjs";
|
|
10
|
-
import {
|
|
11
|
-
definition_table_default
|
|
12
|
-
} from "../../chunk-6TIIBU7J.mjs";
|
|
13
14
|
import "../../chunk-DQRAFUDA.mjs";
|
|
14
15
|
import "../../chunk-M37VBNB3.mjs";
|
|
16
|
+
import "../../chunk-MZ76AA76.mjs";
|
|
17
|
+
import "../../chunk-6PN3DGOE.mjs";
|
|
15
18
|
import "../../chunk-7B7LRG5J.mjs";
|
|
16
19
|
import "../../chunk-LQEA2HU5.mjs";
|
|
17
20
|
import "../../chunk-F3HENRVM.mjs";
|
|
@@ -28,5 +31,6 @@ import "../../chunk-E3G5QXSH.mjs";
|
|
|
28
31
|
import "../../chunk-AC6TWLRT.mjs";
|
|
29
32
|
export {
|
|
30
33
|
definition_table_default as DefinitionTable,
|
|
34
|
+
definition_table2_default as DefinitionTable2,
|
|
31
35
|
table_default as Table
|
|
32
36
|
};
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "../../chunk-4T7R3PEH.mjs";
|
|
5
5
|
import "../../chunk-BPEMHZH3.mjs";
|
|
6
6
|
import "../../chunk-P7YYNA6L.mjs";
|
|
7
|
-
import "../../chunk-MZ76AA76.mjs";
|
|
8
|
-
import "../../chunk-6PN3DGOE.mjs";
|
|
9
7
|
import "../../chunk-DQRAFUDA.mjs";
|
|
10
8
|
import "../../chunk-M37VBNB3.mjs";
|
|
9
|
+
import "../../chunk-MZ76AA76.mjs";
|
|
10
|
+
import "../../chunk-6PN3DGOE.mjs";
|
|
11
11
|
import "../../chunk-7B7LRG5J.mjs";
|
|
12
12
|
import "../../chunk-LQEA2HU5.mjs";
|
|
13
13
|
import "../../chunk-F3HENRVM.mjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -10,6 +10,7 @@ export { default as Tabs, TabsDataType } from './components/tabs/tabs.mjs';
|
|
|
10
10
|
export { default as Textarea } from './components/textarea/textarea.mjs';
|
|
11
11
|
export { default as Table, TableColumn, TableRow } from './components/table/table.mjs';
|
|
12
12
|
export { default as DefinitionTable } from './components/table/definition-table.mjs';
|
|
13
|
+
export { default as DefinitionTable2, TableRow as TableRow2 } from './components/table/definition-table2.mjs';
|
|
13
14
|
export { default as Select, SelectOption, SelectProps } from './components/select/select.mjs';
|
|
14
15
|
export { default as CheckBox } from './components/checkbox/checkbox.mjs';
|
|
15
16
|
export { default as Chip } from './components/chip/chip.mjs';
|
|
@@ -19,6 +20,7 @@ export { default as Switch } from './components/switch/switch.mjs';
|
|
|
19
20
|
export { default as Pagination } from './components/pagination/pagination.mjs';
|
|
20
21
|
export { default as Tooltip } from './components/tooltip/tooltip.mjs';
|
|
21
22
|
export { default as Modal } from './components/modal/modal.mjs';
|
|
23
|
+
export { default as Drawer } from './components/drawer/drawer.mjs';
|
|
22
24
|
export { default as List } from './components/list/list.mjs';
|
|
23
25
|
export { default as ListItem, ListItemProps } from './components/list/listItem.mjs';
|
|
24
26
|
export { default as Toast } from './components/toast/toast.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { default as Tabs, TabsDataType } from './components/tabs/tabs.js';
|
|
|
10
10
|
export { default as Textarea } from './components/textarea/textarea.js';
|
|
11
11
|
export { default as Table, TableColumn, TableRow } from './components/table/table.js';
|
|
12
12
|
export { default as DefinitionTable } from './components/table/definition-table.js';
|
|
13
|
+
export { default as DefinitionTable2, TableRow as TableRow2 } from './components/table/definition-table2.js';
|
|
13
14
|
export { default as Select, SelectOption, SelectProps } from './components/select/select.js';
|
|
14
15
|
export { default as CheckBox } from './components/checkbox/checkbox.js';
|
|
15
16
|
export { default as Chip } from './components/chip/chip.js';
|
|
@@ -19,6 +20,7 @@ export { default as Switch } from './components/switch/switch.js';
|
|
|
19
20
|
export { default as Pagination } from './components/pagination/pagination.js';
|
|
20
21
|
export { default as Tooltip } from './components/tooltip/tooltip.js';
|
|
21
22
|
export { default as Modal } from './components/modal/modal.js';
|
|
23
|
+
export { default as Drawer } from './components/drawer/drawer.js';
|
|
22
24
|
export { default as List } from './components/list/list.js';
|
|
23
25
|
export { default as ListItem, ListItemProps } from './components/list/listItem.js';
|
|
24
26
|
export { default as Toast } from './components/toast/toast.js';
|