@deepnoid/ui 0.1.56 → 0.1.57
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 +156 -146
- package/dist/chunk-32GA3YW4.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/index.mjs +5 -5
- package/dist/components/table/table.mjs +2 -2
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +385 -225
- package/dist/index.mjs +28 -23
- package/package.json +1 -1
- package/dist/{chunk-D47SHPFE.mjs → chunk-DFBPLQMN.mjs} +3 -3
|
@@ -0,0 +1,550 @@
|
|
|
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/drawer/index.ts
|
|
103
|
+
var drawer_exports = {};
|
|
104
|
+
__export(drawer_exports, {
|
|
105
|
+
Drawer: () => drawer_default
|
|
106
|
+
});
|
|
107
|
+
module.exports = __toCommonJS(drawer_exports);
|
|
108
|
+
|
|
109
|
+
// src/components/drawer/drawer.tsx
|
|
110
|
+
var import_react = require("react");
|
|
111
|
+
var import_react_dom = require("react-dom");
|
|
112
|
+
|
|
113
|
+
// src/utils/tailwind-variants.ts
|
|
114
|
+
var import_tailwind_variants = require("tailwind-variants");
|
|
115
|
+
|
|
116
|
+
// ../tailwind-config/src/plugin.ts
|
|
117
|
+
var import_plugin = __toESM(require_plugin());
|
|
118
|
+
|
|
119
|
+
// ../tailwind-config/src/typography/font.ts
|
|
120
|
+
var fontSize = {
|
|
121
|
+
h1: [
|
|
122
|
+
"40px",
|
|
123
|
+
{
|
|
124
|
+
fontWeight: "700"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
h2: [
|
|
128
|
+
"34px",
|
|
129
|
+
{
|
|
130
|
+
fontWeight: "700"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
h3: [
|
|
134
|
+
"28px",
|
|
135
|
+
{
|
|
136
|
+
fontWeight: "700"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
h4: [
|
|
140
|
+
"24px",
|
|
141
|
+
{
|
|
142
|
+
fontWeight: "700"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
h5: [
|
|
146
|
+
"20px",
|
|
147
|
+
{
|
|
148
|
+
fontWeight: "600"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
sm: [
|
|
152
|
+
"12px",
|
|
153
|
+
{
|
|
154
|
+
lineHeight: "18px",
|
|
155
|
+
fontWeight: "400"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
md: [
|
|
159
|
+
"14px",
|
|
160
|
+
{
|
|
161
|
+
lineHeight: "21px",
|
|
162
|
+
fontWeight: "400"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
lg: [
|
|
166
|
+
"16px",
|
|
167
|
+
{
|
|
168
|
+
lineHeight: "24px",
|
|
169
|
+
fontWeight: "400"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
xl: [
|
|
173
|
+
"18px",
|
|
174
|
+
{
|
|
175
|
+
lineHeight: "27px",
|
|
176
|
+
fontWeight: "400"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// ../tailwind-config/src/animation/slide.ts
|
|
182
|
+
var sliceAnimation = {
|
|
183
|
+
slideInFromTop: "slideInFromTop 0.5s ease-out",
|
|
184
|
+
slideInFromBottom: "slideInFromBottom 0.5s ease-out",
|
|
185
|
+
slideInFromLeft: "slideInFromLeft 0.5s ease-out",
|
|
186
|
+
slideInFromRight: "slideInFromRight 0.5s ease-out",
|
|
187
|
+
slideOutToTop: "slideOutToTop 0.5s ease-in",
|
|
188
|
+
slideOutToBottom: "slideOutToBottom 0.5s ease-in",
|
|
189
|
+
slideOutToLeft: "slideOutToLeft 0.5s ease-in",
|
|
190
|
+
slideOutToRight: "slideOutToRight 0.5s ease-in"
|
|
191
|
+
};
|
|
192
|
+
var sliceKeyframe = {
|
|
193
|
+
slideInFromTop: {
|
|
194
|
+
"0%": {
|
|
195
|
+
transform: "translateY(-10px)",
|
|
196
|
+
opacity: "0"
|
|
197
|
+
},
|
|
198
|
+
"100%": {
|
|
199
|
+
transform: "translateY(0)",
|
|
200
|
+
opacity: "1"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
slideInFromBottom: {
|
|
204
|
+
"0%": {
|
|
205
|
+
transform: "translateY(10px)",
|
|
206
|
+
opacity: "0"
|
|
207
|
+
},
|
|
208
|
+
"100%": {
|
|
209
|
+
transform: "translateY(0)",
|
|
210
|
+
opacity: "1"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
slideInFromLeft: {
|
|
214
|
+
"0%": {
|
|
215
|
+
transform: "translateX(-10px)",
|
|
216
|
+
opacity: "0"
|
|
217
|
+
},
|
|
218
|
+
"100%": {
|
|
219
|
+
transform: "translateX(0)",
|
|
220
|
+
opacity: "1"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
slideInFromRight: {
|
|
224
|
+
"0%": {
|
|
225
|
+
transform: "translateX(10px)",
|
|
226
|
+
opacity: "0"
|
|
227
|
+
},
|
|
228
|
+
"100%": {
|
|
229
|
+
transform: "translateX(0)",
|
|
230
|
+
opacity: "1"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
slideOutToTop: {
|
|
234
|
+
"0%": {
|
|
235
|
+
transform: "translateY(0)",
|
|
236
|
+
opacity: "1"
|
|
237
|
+
},
|
|
238
|
+
"100%": {
|
|
239
|
+
transform: "translateY(-10px)",
|
|
240
|
+
opacity: "0"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
slideOutToBottom: {
|
|
244
|
+
"0%": {
|
|
245
|
+
transform: "translateY(0)",
|
|
246
|
+
opacity: "1"
|
|
247
|
+
},
|
|
248
|
+
"100%": {
|
|
249
|
+
transform: "translateY(10px)",
|
|
250
|
+
opacity: "0"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
slideOutToLeft: {
|
|
254
|
+
"0%": {
|
|
255
|
+
transform: "translateX(0)",
|
|
256
|
+
opacity: "1"
|
|
257
|
+
},
|
|
258
|
+
"100%": {
|
|
259
|
+
transform: "translateX(-10px)",
|
|
260
|
+
opacity: "0"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
slideOutToRight: {
|
|
264
|
+
"0%": {
|
|
265
|
+
transform: "translateX(0)",
|
|
266
|
+
opacity: "1"
|
|
267
|
+
},
|
|
268
|
+
"100%": {
|
|
269
|
+
transform: "translateX(10px)",
|
|
270
|
+
opacity: "0"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
// ../tailwind-config/src/animation/index.ts
|
|
276
|
+
var animation = { ...sliceAnimation };
|
|
277
|
+
var keyframes = { ...sliceKeyframe };
|
|
278
|
+
|
|
279
|
+
// ../tailwind-config/src/shadow/index.ts
|
|
280
|
+
var boxShadow = {
|
|
281
|
+
"border-1": "inner 0 0 0 1px inset",
|
|
282
|
+
"border-2": "inner 0 0 0 2px inset",
|
|
283
|
+
"border-3": "inner 0 0 0 3px inset",
|
|
284
|
+
"border-4": "inner 0 0 0 4px inset",
|
|
285
|
+
"border-5": "inner 0 0 0 5px inset",
|
|
286
|
+
"border-6": "inner 0 0 0 6px inset",
|
|
287
|
+
"border-7": "inner 0 0 0 7px inset",
|
|
288
|
+
"border-8": "inner 0 0 0 8px inset",
|
|
289
|
+
"border-9": "inner 0 0 0 9px inset",
|
|
290
|
+
"border-10": "inner 0 0 0 10px inset",
|
|
291
|
+
inner: "inset 0 4px 8px 0 rgba(36, 39, 44, 0.2)",
|
|
292
|
+
drop: "0 20px 40px 0 rgba(36, 39, 44, 0.2)"
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
// ../tailwind-config/src/border/radius.ts
|
|
296
|
+
var borderRadius = {
|
|
297
|
+
sm: "4px",
|
|
298
|
+
md: "6px",
|
|
299
|
+
lg: "8px",
|
|
300
|
+
xl: "10px",
|
|
301
|
+
none: "0",
|
|
302
|
+
full: "9999px"
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
// ../tailwind-config/src/space/gap.ts
|
|
306
|
+
var gap = {
|
|
307
|
+
sm: "4px",
|
|
308
|
+
md: "6px",
|
|
309
|
+
lg: "8px",
|
|
310
|
+
xl: "10px"
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
// src/utils/tailwind-variants.ts
|
|
314
|
+
function typedKeys(obj) {
|
|
315
|
+
return Object.keys(obj);
|
|
316
|
+
}
|
|
317
|
+
var COMMON_SIZE = ["sm", "md", "lg", "xl"];
|
|
318
|
+
var tv = (0, import_tailwind_variants.createTV)({
|
|
319
|
+
twMergeConfig: {
|
|
320
|
+
classGroups: {
|
|
321
|
+
fontSize: [{ text: [...typedKeys(fontSize)] }],
|
|
322
|
+
borderRadius: [{ rounded: [...typedKeys(borderRadius)] }],
|
|
323
|
+
boxShadow: [{ shadow: [...typedKeys(boxShadow)] }],
|
|
324
|
+
padding: [{ p: [...COMMON_SIZE] }],
|
|
325
|
+
gap: [{ gap: [...typedKeys(gap)] }]
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
// src/utils/props.ts
|
|
331
|
+
var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
|
|
332
|
+
if (!variantKeys) {
|
|
333
|
+
return [props, {}];
|
|
334
|
+
}
|
|
335
|
+
const picked = variantKeys.reduce((acc, key) => {
|
|
336
|
+
if (key in props) {
|
|
337
|
+
return { ...acc, [key]: props[key] };
|
|
338
|
+
} else {
|
|
339
|
+
return acc;
|
|
340
|
+
}
|
|
341
|
+
}, {});
|
|
342
|
+
if (removeVariantProps) {
|
|
343
|
+
const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
|
|
344
|
+
return [omitted, picked];
|
|
345
|
+
} else {
|
|
346
|
+
return [props, picked];
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
// src/utils/clsx.ts
|
|
351
|
+
function clsx(...args) {
|
|
352
|
+
var i = 0, tmp, x, str = "";
|
|
353
|
+
while (i < args.length) {
|
|
354
|
+
if (tmp = args[i++]) {
|
|
355
|
+
if (x = toVal(tmp)) {
|
|
356
|
+
str && (str += " ");
|
|
357
|
+
str += x;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return str;
|
|
362
|
+
}
|
|
363
|
+
function toVal(mix) {
|
|
364
|
+
var k, y, str = "";
|
|
365
|
+
if (typeof mix === "string" || typeof mix === "number") {
|
|
366
|
+
str += mix;
|
|
367
|
+
} else if (typeof mix === "object") {
|
|
368
|
+
if (Array.isArray(mix)) {
|
|
369
|
+
var len = mix.length;
|
|
370
|
+
for (k = 0; k < len; k++) {
|
|
371
|
+
if (mix[k]) {
|
|
372
|
+
if (y = toVal(mix[k])) {
|
|
373
|
+
str && (str += " ");
|
|
374
|
+
str += y;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
} else {
|
|
379
|
+
for (y in mix) {
|
|
380
|
+
if (mix[y]) {
|
|
381
|
+
str && (str += " ");
|
|
382
|
+
str += y;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
return str;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// src/components/drawer/drawer.tsx
|
|
391
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
392
|
+
var Drawer = (0, import_react.forwardRef)((props, ref) => {
|
|
393
|
+
const [localProps, variantProps] = mapPropsVariants(props, drawer.variantKeys);
|
|
394
|
+
const { classNames, isOpen, content, isKeyboardDismissDisabled = false, onClose, backdrop = true } = localProps;
|
|
395
|
+
const position = props.position || "right";
|
|
396
|
+
const [shouldRender, setShouldRender] = (0, import_react.useState)(isOpen);
|
|
397
|
+
const [isAnimating, setIsAnimating] = (0, import_react.useState)(isOpen);
|
|
398
|
+
const [isContentAnimating, setIsContentAnimating] = (0, import_react.useState)(isOpen);
|
|
399
|
+
const slots = (0, import_react.useMemo)(() => drawer(variantProps), [variantProps]);
|
|
400
|
+
(0, import_react.useEffect)(() => {
|
|
401
|
+
if (isOpen) {
|
|
402
|
+
setShouldRender(true);
|
|
403
|
+
requestAnimationFrame(() => {
|
|
404
|
+
setIsAnimating(true);
|
|
405
|
+
setTimeout(() => {
|
|
406
|
+
setIsContentAnimating(true);
|
|
407
|
+
}, 50);
|
|
408
|
+
});
|
|
409
|
+
} else {
|
|
410
|
+
setIsContentAnimating(false);
|
|
411
|
+
setIsAnimating(false);
|
|
412
|
+
const timer = setTimeout(() => {
|
|
413
|
+
setShouldRender(false);
|
|
414
|
+
}, 300);
|
|
415
|
+
return () => clearTimeout(timer);
|
|
416
|
+
}
|
|
417
|
+
}, [isOpen]);
|
|
418
|
+
(0, import_react.useEffect)(() => {
|
|
419
|
+
if (shouldRender) {
|
|
420
|
+
document.body.classList.add("overflow-hidden");
|
|
421
|
+
} else {
|
|
422
|
+
document.body.classList.remove("overflow-hidden");
|
|
423
|
+
}
|
|
424
|
+
if (!isOpen || isKeyboardDismissDisabled) return;
|
|
425
|
+
const handleKeyDown = (e) => {
|
|
426
|
+
if (e.key === "Escape") onClose == null ? void 0 : onClose();
|
|
427
|
+
};
|
|
428
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
429
|
+
return () => {
|
|
430
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
431
|
+
};
|
|
432
|
+
}, [shouldRender, isOpen, isKeyboardDismissDisabled, onClose]);
|
|
433
|
+
const getAnimationClasses = () => {
|
|
434
|
+
const baseTransition = "transform transition-all duration-300 ease-in-out";
|
|
435
|
+
if (!isContentAnimating) {
|
|
436
|
+
switch (position) {
|
|
437
|
+
case "left":
|
|
438
|
+
return `${baseTransition} -translate-x-full`;
|
|
439
|
+
case "right":
|
|
440
|
+
return `${baseTransition} translate-x-full`;
|
|
441
|
+
case "top":
|
|
442
|
+
return `${baseTransition} -translate-y-full`;
|
|
443
|
+
case "bottom":
|
|
444
|
+
return `${baseTransition} translate-y-full`;
|
|
445
|
+
default:
|
|
446
|
+
return `${baseTransition} translate-x-full`;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
return `${baseTransition} translate-x-0 translate-y-0`;
|
|
450
|
+
};
|
|
451
|
+
if (!shouldRender) return null;
|
|
452
|
+
return (0, import_react_dom.createPortal)(
|
|
453
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
454
|
+
"div",
|
|
455
|
+
{
|
|
456
|
+
ref,
|
|
457
|
+
className: slots.base({
|
|
458
|
+
class: clsx(
|
|
459
|
+
classNames == null ? void 0 : classNames.base,
|
|
460
|
+
isAnimating ? "visible opacity-100" : "invisible opacity-0",
|
|
461
|
+
"transition-all duration-300 ease-in-out"
|
|
462
|
+
)
|
|
463
|
+
}),
|
|
464
|
+
"aria-labelledby": "drawer",
|
|
465
|
+
role: "dialog",
|
|
466
|
+
"aria-modal": "true",
|
|
467
|
+
children: [
|
|
468
|
+
backdrop && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 bg-black/50 backdrop-blur-sm", onClick: onClose }),
|
|
469
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
470
|
+
"div",
|
|
471
|
+
{
|
|
472
|
+
className: slots.drawerWrapper({
|
|
473
|
+
class: clsx(classNames == null ? void 0 : classNames.drawerWrapper, getAnimationClasses())
|
|
474
|
+
}),
|
|
475
|
+
onClick: (e) => e.stopPropagation(),
|
|
476
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: content })
|
|
477
|
+
}
|
|
478
|
+
)
|
|
479
|
+
]
|
|
480
|
+
}
|
|
481
|
+
),
|
|
482
|
+
document.body
|
|
483
|
+
);
|
|
484
|
+
});
|
|
485
|
+
Drawer.displayName = "Drawer";
|
|
486
|
+
var drawer = tv({
|
|
487
|
+
slots: {
|
|
488
|
+
base: ["fixed", "inset-0", "z-50", "flex", "transition-all", "duration-300", "ease-in-out"],
|
|
489
|
+
drawerWrapper: ["relative", "flex", "flex-col", "bg-white", "shadow-xl", "overflow-hidden", "z-10"],
|
|
490
|
+
wrapper: ["flex", "flex-col", "h-full", "overflow-y-auto"]
|
|
491
|
+
},
|
|
492
|
+
variants: {
|
|
493
|
+
position: {
|
|
494
|
+
left: {
|
|
495
|
+
base: "justify-start",
|
|
496
|
+
drawerWrapper: "h-full border-r"
|
|
497
|
+
},
|
|
498
|
+
right: {
|
|
499
|
+
base: "justify-end",
|
|
500
|
+
drawerWrapper: "h-full border-l"
|
|
501
|
+
},
|
|
502
|
+
top: {
|
|
503
|
+
base: "items-start",
|
|
504
|
+
drawerWrapper: "w-full border-b"
|
|
505
|
+
},
|
|
506
|
+
bottom: {
|
|
507
|
+
base: "items-end",
|
|
508
|
+
drawerWrapper: "w-full border-t"
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
compoundVariants: [
|
|
513
|
+
{
|
|
514
|
+
position: ["top", "bottom"],
|
|
515
|
+
size: "sm",
|
|
516
|
+
class: {
|
|
517
|
+
drawerWrapper: "max-h-[25vh] max-w-none w-full"
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
position: ["top", "bottom"],
|
|
522
|
+
size: "md",
|
|
523
|
+
class: {
|
|
524
|
+
drawerWrapper: "max-h-[40vh] max-w-none w-full"
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
position: ["top", "bottom"],
|
|
529
|
+
size: "lg",
|
|
530
|
+
class: {
|
|
531
|
+
drawerWrapper: "max-h-[60vh] max-w-none w-full"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
position: ["top", "bottom"],
|
|
536
|
+
size: "xl",
|
|
537
|
+
class: {
|
|
538
|
+
drawerWrapper: "max-h-[80vh] max-w-none w-full"
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
defaultVariants: {
|
|
543
|
+
position: "right"
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
var drawer_default = Drawer;
|
|
547
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
548
|
+
0 && (module.exports = {
|
|
549
|
+
Drawer
|
|
550
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-32GA3YW4.mjs";
|
|
3
|
+
import {
|
|
4
|
+
drawer_default
|
|
5
|
+
} from "../../chunk-LSO5QZIT.mjs";
|
|
6
|
+
import "../../chunk-4ZJFD3L3.mjs";
|
|
7
|
+
import "../../chunk-27Y6K5NK.mjs";
|
|
8
|
+
import "../../chunk-E3G5QXSH.mjs";
|
|
9
|
+
import "../../chunk-AC6TWLRT.mjs";
|
|
10
|
+
export {
|
|
11
|
+
drawer_default as Drawer
|
|
12
|
+
};
|
|
@@ -4927,9 +4927,7 @@ var buttonStyle = tv({
|
|
|
4927
4927
|
variant: {
|
|
4928
4928
|
solid: "",
|
|
4929
4929
|
soft: "",
|
|
4930
|
-
outline:
|
|
4931
|
-
base: "bg-transparent border-transparent"
|
|
4932
|
-
},
|
|
4930
|
+
outline: "",
|
|
4933
4931
|
ghost: ""
|
|
4934
4932
|
},
|
|
4935
4933
|
color: {
|
|
@@ -5100,49 +5098,49 @@ var buttonStyle = tv({
|
|
|
5100
5098
|
variant: "outline",
|
|
5101
5099
|
color: "primary",
|
|
5102
5100
|
class: {
|
|
5103
|
-
base: ["bg-
|
|
5101
|
+
base: ["bg-body-background", "border-primary-main", "text-primary-main", "hover:bg-primary-soft"]
|
|
5104
5102
|
}
|
|
5105
5103
|
},
|
|
5106
5104
|
{
|
|
5107
5105
|
variant: "outline",
|
|
5108
5106
|
color: "secondary",
|
|
5109
5107
|
class: {
|
|
5110
|
-
base: ["bg-
|
|
5108
|
+
base: ["bg-body-background", "border-secondary-main", "text-secondary-main", "hover:bg-secondary-soft"]
|
|
5111
5109
|
}
|
|
5112
5110
|
},
|
|
5113
5111
|
{
|
|
5114
5112
|
variant: "outline",
|
|
5115
5113
|
color: "neutral",
|
|
5116
5114
|
class: {
|
|
5117
|
-
base: ["bg-
|
|
5115
|
+
base: ["bg-body-background", "border-neutral-main", "text-neutral-main", "hover:bg-neutral-soft"]
|
|
5118
5116
|
}
|
|
5119
5117
|
},
|
|
5120
5118
|
{
|
|
5121
5119
|
variant: "outline",
|
|
5122
5120
|
color: "info",
|
|
5123
5121
|
class: {
|
|
5124
|
-
base: ["bg-
|
|
5122
|
+
base: ["bg-body-background", "border-info-main", "text-info-main", "hover:bg-info-soft"]
|
|
5125
5123
|
}
|
|
5126
5124
|
},
|
|
5127
5125
|
{
|
|
5128
5126
|
variant: "outline",
|
|
5129
5127
|
color: "success",
|
|
5130
5128
|
class: {
|
|
5131
|
-
base: ["bg-
|
|
5129
|
+
base: ["bg-body-background", "border-success-main", "text-success-main", "hover:bg-success-soft"]
|
|
5132
5130
|
}
|
|
5133
5131
|
},
|
|
5134
5132
|
{
|
|
5135
5133
|
variant: "outline",
|
|
5136
5134
|
color: "warning",
|
|
5137
5135
|
class: {
|
|
5138
|
-
base: ["bg-
|
|
5136
|
+
base: ["bg-body-background", "border-warning-main", "text-warning-main", "hover:bg-warning-soft"]
|
|
5139
5137
|
}
|
|
5140
5138
|
},
|
|
5141
5139
|
{
|
|
5142
5140
|
variant: "outline",
|
|
5143
5141
|
color: "danger",
|
|
5144
5142
|
class: {
|
|
5145
|
-
base: ["bg-
|
|
5143
|
+
base: ["bg-body-background", "border-danger-main", "text-danger-main", "hover:bg-danger-soft"]
|
|
5146
5144
|
}
|
|
5147
5145
|
},
|
|
5148
5146
|
// ghost & color
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
FileUpload,
|
|
4
4
|
fileUploadStyle,
|
|
5
5
|
fileUpload_default
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-LDRIZFBK.mjs";
|
|
7
7
|
import "../../chunk-2GCSFWHD.mjs";
|
|
8
8
|
import "../../chunk-UETBYMGS.mjs";
|
|
9
9
|
import "../../chunk-MY5U63QO.mjs";
|
|
10
10
|
import "../../chunk-LPZOH3RP.mjs";
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-DN6AW7DN.mjs";
|
|
12
|
+
import "../../chunk-DFBPLQMN.mjs";
|
|
13
13
|
import "../../chunk-6WSACUIB.mjs";
|
|
14
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
15
14
|
import "../../chunk-6PNKRBUT.mjs";
|
|
15
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
16
16
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
17
17
|
import "../../chunk-DZ6QJCDZ.mjs";
|
|
18
18
|
import "../../chunk-WFMFC7R6.mjs";
|