@deepnoid/ui 0.1.26 → 0.1.27
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 +128 -124
- package/dist/chunk-6TIIBU7J.mjs +35 -0
- package/dist/{chunk-IVK24VIL.mjs → chunk-C7OF5HJF.mjs} +1 -1
- package/dist/{chunk-MSAULFDB.mjs → chunk-E4UUZOR4.mjs} +16 -16
- package/dist/{chunk-P5PJTJLY.mjs → chunk-GRA2LU42.mjs} +18 -18
- package/dist/chunk-PX4PFLJ3.mjs +178 -0
- package/dist/{chunk-EAK5DVWA.mjs → chunk-UNH3BCGN.mjs} +8 -1
- package/dist/{chunk-6OMHIMIA.mjs → chunk-XA6PVFTW.mjs} +2 -2
- package/dist/components/input/index.js +18 -18
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/input/input.d.mts +44 -44
- package/dist/components/input/input.d.ts +44 -44
- package/dist/components/input/input.js +18 -18
- package/dist/components/input/input.mjs +1 -1
- package/dist/components/pagination/index.js +18 -18
- package/dist/components/pagination/index.mjs +2 -2
- package/dist/components/pagination/pagination.js +18 -18
- package/dist/components/pagination/pagination.mjs +2 -2
- package/dist/components/select/index.js +16 -16
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/select/select.d.mts +38 -38
- package/dist/components/select/select.d.ts +38 -38
- package/dist/components/select/select.js +16 -16
- package/dist/components/select/select.mjs +1 -1
- package/dist/components/table/definition-table.d.mts +51 -0
- package/dist/components/table/definition-table.d.ts +51 -0
- package/dist/components/table/definition-table.js +351 -0
- package/dist/components/table/definition-table.mjs +9 -0
- package/dist/components/table/form-table.d.mts +1 -1
- package/dist/components/table/form-table.d.ts +1 -1
- package/dist/components/table/form-table.mjs +43 -3
- package/dist/components/table/index.d.mts +1 -1
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/index.js +40 -47
- package/dist/components/table/index.mjs +7 -7
- package/dist/components/table/table-head.js +8 -1
- package/dist/components/table/table-head.mjs +1 -1
- package/dist/components/table/table.js +26 -19
- package/dist/components/table/table.mjs +4 -4
- package/dist/components/tree/index.d.mts +1 -0
- package/dist/components/tree/index.d.ts +1 -0
- package/dist/components/tree/index.js +124 -49
- package/dist/components/tree/index.mjs +1 -1
- package/dist/components/tree/tree.d.mts +17 -10
- package/dist/components/tree/tree.d.ts +17 -10
- package/dist/components/tree/tree.js +129 -49
- package/dist/components/tree/tree.mjs +3 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +180 -112
- package/dist/index.mjs +9 -9
- package/package.json +1 -1
- package/dist/chunk-ICZTNO4V.mjs +0 -49
- package/dist/chunk-TEQ723QO.mjs +0 -102
|
@@ -0,0 +1,351 @@
|
|
|
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-table.tsx
|
|
103
|
+
var definition_table_exports = {};
|
|
104
|
+
__export(definition_table_exports, {
|
|
105
|
+
default: () => definition_table_default
|
|
106
|
+
});
|
|
107
|
+
module.exports = __toCommonJS(definition_table_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/components/table/definition-table.tsx
|
|
328
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
329
|
+
var DEFAULT_COLUMN_CLASSES = [
|
|
330
|
+
"w-[120px] px-[10px] py-[9.5px] font-bold text-md text-body-foreground border-r border-neutral-light",
|
|
331
|
+
"px-[10px] py-[9.5px]"
|
|
332
|
+
];
|
|
333
|
+
var DefinitionTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
|
|
334
|
+
var _a;
|
|
335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
|
|
336
|
+
}) });
|
|
337
|
+
var DefinitionTable = (0, import_react.forwardRef)(({ rows, footer, classNames }, ref) => {
|
|
338
|
+
const slots = (0, import_react.useMemo)(() => DefinitionTableStyle(), []);
|
|
339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
340
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DefinitionTableRow, { ...row }, i)) }) }),
|
|
341
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: footer })
|
|
342
|
+
] });
|
|
343
|
+
});
|
|
344
|
+
DefinitionTable.displayName = "DefinitionTable";
|
|
345
|
+
var definition_table_default = DefinitionTable;
|
|
346
|
+
var DefinitionTableStyle = tv({
|
|
347
|
+
slots: {
|
|
348
|
+
base: ["flex", "flex-col", "gap-[30px]"],
|
|
349
|
+
table: ["w-full", "table-fixed", "border", "border-neutral-light"]
|
|
350
|
+
}
|
|
351
|
+
});
|
|
@@ -14,7 +14,7 @@ interface FormTableProps {
|
|
|
14
14
|
footer?: ReactNode;
|
|
15
15
|
classNames?: SlotsToClasses<FormTableSlots>;
|
|
16
16
|
}
|
|
17
|
-
declare const FormTable: react.ForwardRefExoticComponent<FormTableProps & react.RefAttributes<
|
|
17
|
+
declare const FormTable: react.ForwardRefExoticComponent<FormTableProps & react.RefAttributes<HTMLFormElement | HTMLDivElement>>;
|
|
18
18
|
|
|
19
19
|
declare const formTableStyle: tailwind_variants.TVReturnType<{
|
|
20
20
|
[key: string]: {
|
|
@@ -14,7 +14,7 @@ interface FormTableProps {
|
|
|
14
14
|
footer?: ReactNode;
|
|
15
15
|
classNames?: SlotsToClasses<FormTableSlots>;
|
|
16
16
|
}
|
|
17
|
-
declare const FormTable: react.ForwardRefExoticComponent<FormTableProps & react.RefAttributes<
|
|
17
|
+
declare const FormTable: react.ForwardRefExoticComponent<FormTableProps & react.RefAttributes<HTMLFormElement | HTMLDivElement>>;
|
|
18
18
|
|
|
19
19
|
declare const formTableStyle: tailwind_variants.TVReturnType<{
|
|
20
20
|
[key: string]: {
|
|
@@ -1,9 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-4ZJFD3L3.mjs";
|
|
3
|
+
tv
|
|
4
|
+
} from "../../chunk-4ZJFD3L3.mjs";
|
|
6
5
|
import "../../chunk-AC6TWLRT.mjs";
|
|
6
|
+
|
|
7
|
+
// src/components/table/form-table.tsx
|
|
8
|
+
import { forwardRef, useMemo } from "react";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var DEFAULT_COLUMN_CLASSES = [
|
|
11
|
+
"w-[120px] px-[10px] py-[9.5px] font-bold text-md text-body-foreground border-r border-neutral-light",
|
|
12
|
+
"px-[10px] py-[9.5px]"
|
|
13
|
+
];
|
|
14
|
+
var FormTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ jsx("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
|
|
15
|
+
var _a;
|
|
16
|
+
return /* @__PURE__ */ jsx("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
|
|
17
|
+
}) });
|
|
18
|
+
var FormTable = forwardRef(
|
|
19
|
+
({ rows, onSubmit, footer, classNames }, ref) => {
|
|
20
|
+
const slots = useMemo(() => formTableStyle(), []);
|
|
21
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
+
/* @__PURE__ */ jsx("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => /* @__PURE__ */ jsx(FormTableRow, { ...row }, i)) }) }),
|
|
23
|
+
footer && /* @__PURE__ */ jsx("div", { children: footer })
|
|
24
|
+
] });
|
|
25
|
+
if (onSubmit) {
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"form",
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
onSubmit,
|
|
31
|
+
className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
32
|
+
children: content
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return /* @__PURE__ */ jsx("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: content });
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
FormTable.displayName = "FormTable";
|
|
40
|
+
var form_table_default = FormTable;
|
|
41
|
+
var formTableStyle = tv({
|
|
42
|
+
slots: {
|
|
43
|
+
base: ["flex", "flex-col", "gap-[30px]"],
|
|
44
|
+
table: ["w-full", "table-fixed", "border", "border-neutral-light"]
|
|
45
|
+
}
|
|
46
|
+
});
|
|
7
47
|
export {
|
|
8
48
|
form_table_default as default
|
|
9
49
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Table, TableColumn, TableRef, TableRow } from './table.mjs';
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as DefinitionTable } from './definition-table.mjs';
|
|
3
3
|
import 'tailwind-variants';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../../utils/types.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Table, TableColumn, TableRef, TableRow } from './table.js';
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as DefinitionTable } from './definition-table.js';
|
|
3
3
|
import 'tailwind-variants';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../../utils/types.js';
|
|
@@ -102,7 +102,7 @@ var require_plugin = __commonJS({
|
|
|
102
102
|
// src/components/table/index.ts
|
|
103
103
|
var table_exports = {};
|
|
104
104
|
__export(table_exports, {
|
|
105
|
-
|
|
105
|
+
DefinitionTable: () => definition_table_default,
|
|
106
106
|
Table: () => table_default
|
|
107
107
|
});
|
|
108
108
|
module.exports = __toCommonJS(table_exports);
|
|
@@ -618,7 +618,14 @@ var TableHead = ({ columns, slots, size, rowCheckbox, isCheckedAll, classNames,
|
|
|
618
618
|
},
|
|
619
619
|
`${column.field}${index}thead`
|
|
620
620
|
));
|
|
621
|
-
const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
621
|
+
const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
622
|
+
checkbox_default,
|
|
623
|
+
{
|
|
624
|
+
size,
|
|
625
|
+
checked: isCheckedAll,
|
|
626
|
+
onChange: (e) => onCheckAll(e.target.checked)
|
|
627
|
+
}
|
|
628
|
+
) }) });
|
|
622
629
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
623
630
|
renderColumnHeaders(),
|
|
624
631
|
renderSelectAllCheckbox()
|
|
@@ -4714,7 +4721,7 @@ var Icon_default = Icon;
|
|
|
4714
4721
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
4715
4722
|
var Input = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
4716
4723
|
const [props, variantProps] = mapPropsVariants(originalProps, inputStyle.variantKeys);
|
|
4717
|
-
const { classNames, label,
|
|
4724
|
+
const { classNames, label, helperMessage, errorMessage, startContent, endContent, ...inputProps } = props;
|
|
4718
4725
|
const inputRef = (0, import_react5.useRef)(null);
|
|
4719
4726
|
const slots = (0, import_react5.useMemo)(() => inputStyle({ ...variantProps }), [variantProps]);
|
|
4720
4727
|
const getContentProps = (0, import_react5.useCallback)(
|
|
@@ -4757,7 +4764,7 @@ var Input = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
4757
4764
|
className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
|
|
4758
4765
|
};
|
|
4759
4766
|
return import_react5.default.cloneElement(endContent, mergedProps);
|
|
4760
|
-
} else if (
|
|
4767
|
+
} else if (errorMessage) {
|
|
4761
4768
|
const iconProps = { ...getContentProps(), className: getContentProps().className };
|
|
4762
4769
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
|
|
4763
4770
|
} else {
|
|
@@ -4811,8 +4818,8 @@ var Input = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
4811
4818
|
]
|
|
4812
4819
|
}
|
|
4813
4820
|
),
|
|
4814
|
-
|
|
4815
|
-
|
|
4821
|
+
helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
|
|
4822
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
|
|
4816
4823
|
] })
|
|
4817
4824
|
]
|
|
4818
4825
|
}
|
|
@@ -4852,8 +4859,8 @@ var inputStyle = tv(
|
|
|
4852
4859
|
"group-has-[:hover]/input:text-neutral-dark",
|
|
4853
4860
|
"group-has-[p.error]/input:text-danger-main"
|
|
4854
4861
|
],
|
|
4855
|
-
|
|
4856
|
-
|
|
4862
|
+
helperMessage: ["text-neutral-main", "group-has-[:hover]/input:text-neutral-dark"],
|
|
4863
|
+
errorMessage: ["text-danger-main"],
|
|
4857
4864
|
readonly: ["pointer-events-none", "!text-body-foreground"]
|
|
4858
4865
|
},
|
|
4859
4866
|
variants: {
|
|
@@ -4888,7 +4895,7 @@ var inputStyle = tv(
|
|
|
4888
4895
|
"group-has-[:focus]/input:text-primary-main",
|
|
4889
4896
|
"!group-has-[p.error]:not(input:focus):hover/input:text-primary-main"
|
|
4890
4897
|
],
|
|
4891
|
-
|
|
4898
|
+
helperMessage: [
|
|
4892
4899
|
"group-has-[:focus]/input:text-primary-main",
|
|
4893
4900
|
"group-has-[:focus:hover]/input:text-primary-main",
|
|
4894
4901
|
"group-has-[:focus]/input:hover:text-primary-main"
|
|
@@ -4899,7 +4906,7 @@ var inputStyle = tv(
|
|
|
4899
4906
|
"group-has-[:focus]/input:text-secondary-main",
|
|
4900
4907
|
"!group-has-[p.error]:not(input:focus):hover/input:text-secondary-main"
|
|
4901
4908
|
],
|
|
4902
|
-
|
|
4909
|
+
helperMessage: [
|
|
4903
4910
|
"group-has-[:focus]/input:text-secondary-main",
|
|
4904
4911
|
"group-has-[:focus:hover]/input:text-secondary-main",
|
|
4905
4912
|
"group-has-[:focus]/input:hover:text-secondary-main"
|
|
@@ -4912,32 +4919,32 @@ var inputStyle = tv(
|
|
|
4912
4919
|
label: ["text-sm"],
|
|
4913
4920
|
innerWrapper: ["gap-[4px]"],
|
|
4914
4921
|
inputWrapper: ["w-[240px]", "h-[24px]", "rounded-sm", "px-[4px]", "gap-[4px]"],
|
|
4915
|
-
|
|
4916
|
-
|
|
4922
|
+
helperMessage: ["text-sm"],
|
|
4923
|
+
errorMessage: ["text-sm"]
|
|
4917
4924
|
},
|
|
4918
4925
|
md: {
|
|
4919
4926
|
base: ["text-md", "gap-[6px]"],
|
|
4920
4927
|
label: ["text-md"],
|
|
4921
4928
|
innerWrapper: ["gap-[6px]"],
|
|
4922
4929
|
inputWrapper: ["w-[240px]", "h-[32px]", "rounded-md", "px-[6px]", "gap-[6px]"],
|
|
4923
|
-
|
|
4924
|
-
|
|
4930
|
+
helperMessage: ["text-sm"],
|
|
4931
|
+
errorMessage: ["text-sm"]
|
|
4925
4932
|
},
|
|
4926
4933
|
lg: {
|
|
4927
4934
|
base: ["text-lg", "gap-[8px]"],
|
|
4928
4935
|
label: ["text-lg"],
|
|
4929
4936
|
innerWrapper: ["gap-[8px]"],
|
|
4930
4937
|
inputWrapper: ["w-[240px]", "h-[40px]", "rounded-lg", "px-[8px]", "gap-[8px]"],
|
|
4931
|
-
|
|
4932
|
-
|
|
4938
|
+
helperMessage: ["text-md"],
|
|
4939
|
+
errorMessage: ["text-md"]
|
|
4933
4940
|
},
|
|
4934
4941
|
xl: {
|
|
4935
4942
|
base: ["text-xl", "gap-[10px]"],
|
|
4936
4943
|
label: ["text-xl"],
|
|
4937
4944
|
innerWrapper: ["gap-[10px]"],
|
|
4938
4945
|
inputWrapper: ["w-[240px]", "h-[50px]", "rounded-lg", "px-[10px]", "gap-[10px]"],
|
|
4939
|
-
|
|
4940
|
-
|
|
4946
|
+
helperMessage: ["text-md"],
|
|
4947
|
+
errorMessage: ["text-md"]
|
|
4941
4948
|
}
|
|
4942
4949
|
},
|
|
4943
4950
|
direction: {
|
|
@@ -4961,8 +4968,8 @@ var inputStyle = tv(
|
|
|
4961
4968
|
"group-has-[p.error]/input:placeholder:text-danger-light"
|
|
4962
4969
|
],
|
|
4963
4970
|
content: ["text-neutral-light", "group-has-[p.error]/input:text-danger-light"],
|
|
4964
|
-
|
|
4965
|
-
|
|
4971
|
+
helperMessage: ["!text-neutral-light"],
|
|
4972
|
+
errorMessage: ["!text-danger-light"]
|
|
4966
4973
|
}
|
|
4967
4974
|
}
|
|
4968
4975
|
},
|
|
@@ -5644,41 +5651,27 @@ var tableStyle = (0, import_tailwind_variants6.tv)({
|
|
|
5644
5651
|
}
|
|
5645
5652
|
});
|
|
5646
5653
|
|
|
5647
|
-
// src/components/table/
|
|
5654
|
+
// src/components/table/definition-table.tsx
|
|
5648
5655
|
var import_react8 = require("react");
|
|
5649
5656
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
5650
5657
|
var DEFAULT_COLUMN_CLASSES = [
|
|
5651
5658
|
"w-[120px] px-[10px] py-[9.5px] font-bold text-md text-body-foreground border-r border-neutral-light",
|
|
5652
5659
|
"px-[10px] py-[9.5px]"
|
|
5653
5660
|
];
|
|
5654
|
-
var
|
|
5661
|
+
var DefinitionTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
|
|
5655
5662
|
var _a;
|
|
5656
5663
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
|
|
5657
5664
|
}) });
|
|
5658
|
-
var
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
{
|
|
5669
|
-
ref,
|
|
5670
|
-
onSubmit,
|
|
5671
|
-
className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
5672
|
-
children: content
|
|
5673
|
-
}
|
|
5674
|
-
);
|
|
5675
|
-
}
|
|
5676
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: content });
|
|
5677
|
-
}
|
|
5678
|
-
);
|
|
5679
|
-
FormTable.displayName = "FormTable";
|
|
5680
|
-
var form_table_default = FormTable;
|
|
5681
|
-
var formTableStyle = tv({
|
|
5665
|
+
var DefinitionTable = (0, import_react8.forwardRef)(({ rows, footer, classNames }, ref) => {
|
|
5666
|
+
const slots = (0, import_react8.useMemo)(() => DefinitionTableStyle(), []);
|
|
5667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
5668
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DefinitionTableRow, { ...row }, i)) }) }),
|
|
5669
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: footer })
|
|
5670
|
+
] });
|
|
5671
|
+
});
|
|
5672
|
+
DefinitionTable.displayName = "DefinitionTable";
|
|
5673
|
+
var definition_table_default = DefinitionTable;
|
|
5674
|
+
var DefinitionTableStyle = tv({
|
|
5682
5675
|
slots: {
|
|
5683
5676
|
base: ["flex", "flex-col", "gap-[30px]"],
|
|
5684
5677
|
table: ["w-full", "table-fixed", "border", "border-neutral-light"]
|
|
@@ -5686,6 +5679,6 @@ var formTableStyle = tv({
|
|
|
5686
5679
|
});
|
|
5687
5680
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5688
5681
|
0 && (module.exports = {
|
|
5689
|
-
|
|
5682
|
+
DefinitionTable,
|
|
5690
5683
|
Table
|
|
5691
5684
|
});
|