@deepnoid/ui 0.1.42 → 0.1.44

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 (43) hide show
  1. package/.turbo/turbo-build.log +186 -171
  2. package/dist/chunk-3YMMVZDL.mjs +1 -0
  3. package/dist/chunk-NZOVUADT.mjs +136 -0
  4. package/dist/{chunk-6ZL5NEEI.mjs → chunk-RIW4TT6V.mjs} +1 -1
  5. package/dist/chunk-TBZSYI6R.mjs +107 -0
  6. package/dist/{chunk-K7V4VE7R.mjs → chunk-WOEZHDJR.mjs} +1 -1
  7. package/dist/components/breadcrumb/breadcrumb.mjs +2 -2
  8. package/dist/components/breadcrumb/index.mjs +2 -2
  9. package/dist/components/button/index.mjs +6 -6
  10. package/dist/components/charts/areaCharts.d.mts +66 -0
  11. package/dist/components/charts/areaCharts.d.ts +66 -0
  12. package/dist/components/charts/areaCharts.js +471 -0
  13. package/dist/components/charts/areaCharts.mjs +10 -0
  14. package/dist/components/charts/circularProgress.d.mts +92 -0
  15. package/dist/components/charts/circularProgress.d.ts +92 -0
  16. package/dist/components/charts/circularProgress.js +441 -0
  17. package/dist/components/charts/circularProgress.mjs +11 -0
  18. package/dist/components/charts/index.d.mts +5 -0
  19. package/dist/components/charts/index.d.ts +5 -0
  20. package/dist/components/charts/index.js +573 -0
  21. package/dist/components/charts/index.mjs +15 -0
  22. package/dist/components/dateTimePicker/dateTimePicker.mjs +3 -3
  23. package/dist/components/dateTimePicker/index.mjs +3 -3
  24. package/dist/components/dateTimePicker/timePicker.mjs +2 -2
  25. package/dist/components/fileUpload/fileUpload.mjs +3 -3
  26. package/dist/components/fileUpload/index.mjs +3 -3
  27. package/dist/components/list/index.mjs +3 -3
  28. package/dist/components/modal/index.mjs +3 -3
  29. package/dist/components/modal/modal.mjs +3 -3
  30. package/dist/components/table/index.js +1 -1
  31. package/dist/components/table/index.mjs +5 -5
  32. package/dist/components/table/table.js +1 -1
  33. package/dist/components/table/table.mjs +3 -3
  34. package/dist/components/toast/index.mjs +2 -2
  35. package/dist/components/toast/use-toast.mjs +2 -2
  36. package/dist/index.d.mts +2 -0
  37. package/dist/index.d.ts +2 -0
  38. package/dist/index.js +226 -1
  39. package/dist/index.mjs +61 -52
  40. package/package.json +4 -3
  41. package/dist/{chunk-IBI3OVQI.mjs → chunk-CTBTYNSM.mjs} +3 -3
  42. package/dist/{chunk-BFOK4HVC.mjs → chunk-KYJTZPXY.mjs} +3 -3
  43. package/dist/{chunk-25QOEKXS.mjs → chunk-TRR232FS.mjs} +3 -3
@@ -0,0 +1,441 @@
1
+ "use client";
2
+ "use strict";
3
+ "use client";
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __commonJS = (cb, mod) => function __require() {
11
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
+ };
13
+ var __export = (target, all) => {
14
+ for (var name in all)
15
+ __defProp(target, name, { get: all[name], enumerable: true });
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
33
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
+
35
+ // ../../node_modules/tailwindcss/lib/util/createPlugin.js
36
+ var require_createPlugin = __commonJS({
37
+ "../../node_modules/tailwindcss/lib/util/createPlugin.js"(exports2) {
38
+ "use strict";
39
+ Object.defineProperty(exports2, "__esModule", {
40
+ value: true
41
+ });
42
+ Object.defineProperty(exports2, "default", {
43
+ enumerable: true,
44
+ get: function() {
45
+ return _default;
46
+ }
47
+ });
48
+ function createPlugin(plugin2, config) {
49
+ return {
50
+ handler: plugin2,
51
+ config
52
+ };
53
+ }
54
+ createPlugin.withOptions = function(pluginFunction, configFunction = () => ({})) {
55
+ const optionsFunction = function(options) {
56
+ return {
57
+ __options: options,
58
+ handler: pluginFunction(options),
59
+ config: configFunction(options)
60
+ };
61
+ };
62
+ optionsFunction.__isOptionsFunction = true;
63
+ optionsFunction.__pluginFunction = pluginFunction;
64
+ optionsFunction.__configFunction = configFunction;
65
+ return optionsFunction;
66
+ };
67
+ var _default = createPlugin;
68
+ }
69
+ });
70
+
71
+ // ../../node_modules/tailwindcss/lib/public/create-plugin.js
72
+ var require_create_plugin = __commonJS({
73
+ "../../node_modules/tailwindcss/lib/public/create-plugin.js"(exports2) {
74
+ "use strict";
75
+ Object.defineProperty(exports2, "__esModule", {
76
+ value: true
77
+ });
78
+ Object.defineProperty(exports2, "default", {
79
+ enumerable: true,
80
+ get: function() {
81
+ return _default;
82
+ }
83
+ });
84
+ var _createPlugin = /* @__PURE__ */ _interop_require_default(require_createPlugin());
85
+ function _interop_require_default(obj) {
86
+ return obj && obj.__esModule ? obj : {
87
+ default: obj
88
+ };
89
+ }
90
+ var _default = _createPlugin.default;
91
+ }
92
+ });
93
+
94
+ // ../../node_modules/tailwindcss/plugin.js
95
+ var require_plugin = __commonJS({
96
+ "../../node_modules/tailwindcss/plugin.js"(exports2, module2) {
97
+ "use strict";
98
+ var createPlugin = require_create_plugin();
99
+ module2.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
100
+ }
101
+ });
102
+
103
+ // src/components/charts/circularProgress.tsx
104
+ var circularProgress_exports = {};
105
+ __export(circularProgress_exports, {
106
+ default: () => circularProgress_default
107
+ });
108
+ module.exports = __toCommonJS(circularProgress_exports);
109
+ var import_recharts = require("recharts");
110
+ var import_react = require("react");
111
+
112
+ // src/utils/props.ts
113
+ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
114
+ if (!variantKeys) {
115
+ return [props, {}];
116
+ }
117
+ const picked = variantKeys.reduce((acc, key) => {
118
+ if (key in props) {
119
+ return { ...acc, [key]: props[key] };
120
+ } else {
121
+ return acc;
122
+ }
123
+ }, {});
124
+ if (removeVariantProps) {
125
+ const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
126
+ return [omitted, picked];
127
+ } else {
128
+ return [props, picked];
129
+ }
130
+ };
131
+
132
+ // src/utils/tailwind-variants.ts
133
+ var import_tailwind_variants = require("tailwind-variants");
134
+
135
+ // ../tailwind-config/src/plugin.ts
136
+ var import_plugin = __toESM(require_plugin());
137
+
138
+ // ../tailwind-config/src/typography/font.ts
139
+ var fontSize = {
140
+ h1: [
141
+ "40px",
142
+ {
143
+ fontWeight: "700"
144
+ }
145
+ ],
146
+ h2: [
147
+ "34px",
148
+ {
149
+ fontWeight: "700"
150
+ }
151
+ ],
152
+ h3: [
153
+ "28px",
154
+ {
155
+ fontWeight: "700"
156
+ }
157
+ ],
158
+ h4: [
159
+ "24px",
160
+ {
161
+ fontWeight: "700"
162
+ }
163
+ ],
164
+ h5: [
165
+ "20px",
166
+ {
167
+ fontWeight: "600"
168
+ }
169
+ ],
170
+ sm: [
171
+ "12px",
172
+ {
173
+ lineHeight: "18px",
174
+ fontWeight: "400"
175
+ }
176
+ ],
177
+ md: [
178
+ "14px",
179
+ {
180
+ lineHeight: "21px",
181
+ fontWeight: "400"
182
+ }
183
+ ],
184
+ lg: [
185
+ "16px",
186
+ {
187
+ lineHeight: "24px",
188
+ fontWeight: "400"
189
+ }
190
+ ],
191
+ xl: [
192
+ "18px",
193
+ {
194
+ lineHeight: "27px",
195
+ fontWeight: "400"
196
+ }
197
+ ]
198
+ };
199
+
200
+ // ../tailwind-config/src/animation/slide.ts
201
+ var sliceAnimation = {
202
+ slideInFromTop: "slideInFromTop 0.5s ease-out",
203
+ slideInFromBottom: "slideInFromBottom 0.5s ease-out",
204
+ slideInFromLeft: "slideInFromLeft 0.5s ease-out",
205
+ slideInFromRight: "slideInFromRight 0.5s ease-out",
206
+ slideOutToTop: "slideOutToTop 0.5s ease-in",
207
+ slideOutToBottom: "slideOutToBottom 0.5s ease-in",
208
+ slideOutToLeft: "slideOutToLeft 0.5s ease-in",
209
+ slideOutToRight: "slideOutToRight 0.5s ease-in"
210
+ };
211
+ var sliceKeyframe = {
212
+ slideInFromTop: {
213
+ "0%": {
214
+ transform: "translateY(-10px)",
215
+ opacity: "0"
216
+ },
217
+ "100%": {
218
+ transform: "translateY(0)",
219
+ opacity: "1"
220
+ }
221
+ },
222
+ slideInFromBottom: {
223
+ "0%": {
224
+ transform: "translateY(10px)",
225
+ opacity: "0"
226
+ },
227
+ "100%": {
228
+ transform: "translateY(0)",
229
+ opacity: "1"
230
+ }
231
+ },
232
+ slideInFromLeft: {
233
+ "0%": {
234
+ transform: "translateX(-10px)",
235
+ opacity: "0"
236
+ },
237
+ "100%": {
238
+ transform: "translateX(0)",
239
+ opacity: "1"
240
+ }
241
+ },
242
+ slideInFromRight: {
243
+ "0%": {
244
+ transform: "translateX(10px)",
245
+ opacity: "0"
246
+ },
247
+ "100%": {
248
+ transform: "translateX(0)",
249
+ opacity: "1"
250
+ }
251
+ },
252
+ slideOutToTop: {
253
+ "0%": {
254
+ transform: "translateY(0)",
255
+ opacity: "1"
256
+ },
257
+ "100%": {
258
+ transform: "translateY(-10px)",
259
+ opacity: "0"
260
+ }
261
+ },
262
+ slideOutToBottom: {
263
+ "0%": {
264
+ transform: "translateY(0)",
265
+ opacity: "1"
266
+ },
267
+ "100%": {
268
+ transform: "translateY(10px)",
269
+ opacity: "0"
270
+ }
271
+ },
272
+ slideOutToLeft: {
273
+ "0%": {
274
+ transform: "translateX(0)",
275
+ opacity: "1"
276
+ },
277
+ "100%": {
278
+ transform: "translateX(-10px)",
279
+ opacity: "0"
280
+ }
281
+ },
282
+ slideOutToRight: {
283
+ "0%": {
284
+ transform: "translateX(0)",
285
+ opacity: "1"
286
+ },
287
+ "100%": {
288
+ transform: "translateX(10px)",
289
+ opacity: "0"
290
+ }
291
+ }
292
+ };
293
+
294
+ // ../tailwind-config/src/animation/index.ts
295
+ var animation = { ...sliceAnimation };
296
+ var keyframes = { ...sliceKeyframe };
297
+
298
+ // ../tailwind-config/src/shadow/index.ts
299
+ var boxShadow = {
300
+ "border-1": "inner 0 0 0 1px inset",
301
+ "border-2": "inner 0 0 0 2px inset",
302
+ "border-3": "inner 0 0 0 3px inset",
303
+ "border-4": "inner 0 0 0 4px inset",
304
+ "border-5": "inner 0 0 0 5px inset",
305
+ "border-6": "inner 0 0 0 6px inset",
306
+ "border-7": "inner 0 0 0 7px inset",
307
+ "border-8": "inner 0 0 0 8px inset",
308
+ "border-9": "inner 0 0 0 9px inset",
309
+ "border-10": "inner 0 0 0 10px inset",
310
+ inner: "inset 0 4px 8px 0 rgba(36, 39, 44, 0.2)",
311
+ drop: "0 20px 40px 0 rgba(36, 39, 44, 0.2)"
312
+ };
313
+
314
+ // ../tailwind-config/src/border/radius.ts
315
+ var borderRadius = {
316
+ sm: "4px",
317
+ md: "6px",
318
+ lg: "8px",
319
+ xl: "10px",
320
+ none: "0",
321
+ full: "9999px"
322
+ };
323
+
324
+ // ../tailwind-config/src/space/gap.ts
325
+ var gap = {
326
+ sm: "4px",
327
+ md: "6px",
328
+ lg: "8px",
329
+ xl: "10px"
330
+ };
331
+
332
+ // src/utils/tailwind-variants.ts
333
+ function typedKeys(obj) {
334
+ return Object.keys(obj);
335
+ }
336
+ var COMMON_SIZE = ["sm", "md", "lg", "xl"];
337
+ var tv = (0, import_tailwind_variants.createTV)({
338
+ twMergeConfig: {
339
+ classGroups: {
340
+ fontSize: [{ text: [...typedKeys(fontSize)] }],
341
+ borderRadius: [{ rounded: [...typedKeys(borderRadius)] }],
342
+ boxShadow: [{ shadow: [...typedKeys(boxShadow)] }],
343
+ padding: [{ p: [...COMMON_SIZE] }],
344
+ gap: [{ gap: [...typedKeys(gap)] }]
345
+ }
346
+ }
347
+ });
348
+
349
+ // src/components/charts/circularProgress.tsx
350
+ var import_jsx_runtime = require("react/jsx-runtime");
351
+ var CircularProgress = (0, import_react.forwardRef)((originalProps, ref) => {
352
+ const [props, variantProps] = mapPropsVariants(originalProps, circularProgressStyle.variantKeys);
353
+ const { title, size = 150, color, percentage, unit, classNames } = { ...props, ...variantProps };
354
+ const slots = (0, import_react.useMemo)(() => circularProgressStyle({ ...variantProps }), [variantProps]);
355
+ const data = [
356
+ {
357
+ name: title,
358
+ value: percentage
359
+ }
360
+ ];
361
+ const BAR_SIZE = 24;
362
+ const OUTER_RADIUS = 88;
363
+ const INNER_RADIUS = OUTER_RADIUS - BAR_SIZE;
364
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
365
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `relative h-[${size}px] w-[${size}px]`, children: [
366
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
367
+ import_recharts.RadialBarChart,
368
+ {
369
+ width: size,
370
+ height: size,
371
+ innerRadius: INNER_RADIUS,
372
+ outerRadius: OUTER_RADIUS,
373
+ barSize: BAR_SIZE,
374
+ data,
375
+ startAngle: 90,
376
+ endAngle: -270,
377
+ children: [
378
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
379
+ "circle",
380
+ {
381
+ cx: size / 2,
382
+ cy: size / 2,
383
+ r: INNER_RADIUS + BAR_SIZE / 2,
384
+ className: slots.background({ class: classNames == null ? void 0 : classNames.background }),
385
+ fill: "currentColor"
386
+ }
387
+ ),
388
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.PolarAngleAxis, { type: "number", domain: [0, 100], angleAxisId: 0, tick: false }),
389
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
390
+ import_recharts.RadialBar,
391
+ {
392
+ dataKey: "value",
393
+ cornerRadius: 12,
394
+ animationDuration: 1e3,
395
+ className: slots.progress({ class: classNames == null ? void 0 : classNames.progress })
396
+ }
397
+ )
398
+ ]
399
+ }
400
+ ),
401
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: slots.text({ class: classNames == null ? void 0 : classNames.text }), children: [
402
+ percentage,
403
+ unit
404
+ ] }) })
405
+ ] }),
406
+ title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title })
407
+ ] });
408
+ });
409
+ CircularProgress.displayName = "CircularProgress";
410
+ var circularProgress_default = CircularProgress;
411
+ var circularProgressStyle = tv({
412
+ slots: {
413
+ base: ["flex", "flex-col", "items-center", "gap-[20px]"],
414
+ background: [],
415
+ progress: ["transition-all", "duration-1000 ease-out"],
416
+ text: ["text-xl", "font-bold"],
417
+ title: ["text-md", "font-bold", "text-center", "text-body-foreground"]
418
+ },
419
+ variants: {
420
+ color: {
421
+ primary: {
422
+ background: ["fill-primary-soft"],
423
+ progress: ["fill-primary-main"],
424
+ text: ["text-primary-dark"]
425
+ },
426
+ secondary: {
427
+ background: ["fill-secondary-soft"],
428
+ progress: ["fill-secondary-main"],
429
+ text: ["text-secondary-dark"]
430
+ },
431
+ warning: {
432
+ background: ["fill-warning-soft"],
433
+ progress: ["fill-warning-main"],
434
+ text: ["text-warning-dark"]
435
+ }
436
+ }
437
+ },
438
+ defaultVariants: {
439
+ color: "primary"
440
+ }
441
+ });
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ "use client";
3
+ import {
4
+ circularProgress_default
5
+ } from "../../chunk-TBZSYI6R.mjs";
6
+ import "../../chunk-4ZJFD3L3.mjs";
7
+ import "../../chunk-E3G5QXSH.mjs";
8
+ import "../../chunk-AC6TWLRT.mjs";
9
+ export {
10
+ circularProgress_default as default
11
+ };
@@ -0,0 +1,5 @@
1
+ export { default as CircularProgress } from './circularProgress.mjs';
2
+ export { default as AreaChart } from './areaCharts.mjs';
3
+ import 'tailwind-variants';
4
+ import 'react';
5
+ import '../../utils/types.mjs';
@@ -0,0 +1,5 @@
1
+ export { default as CircularProgress } from './circularProgress.js';
2
+ export { default as AreaChart } from './areaCharts.js';
3
+ import 'tailwind-variants';
4
+ import 'react';
5
+ import '../../utils/types.js';