@deepnoid/ui 0.1.47 → 0.1.49
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 +203 -198
- package/dist/chunk-4F6RULPS.mjs +147 -0
- package/dist/chunk-A7GHXG3K.mjs +129 -0
- package/dist/{chunk-UHT6GDT2.mjs → chunk-BPEMHZH3.mjs} +1 -1
- package/dist/{chunk-Y7NTREVJ.mjs → chunk-G67WUZO3.mjs} +3 -3
- package/dist/{chunk-QJXYG2OC.mjs → chunk-IBI3OVQI.mjs} +1 -1
- package/dist/{chunk-LR3SWRB4.mjs → chunk-IC25OKBJ.mjs} +5 -5
- package/dist/{chunk-NR7MGDUE.mjs → chunk-KYJTZPXY.mjs} +2 -2
- package/dist/{chunk-YOSWY5QO.mjs → chunk-MCNCHQ33.mjs} +5 -5
- package/dist/{chunk-UCU5ON5M.mjs → chunk-P7YYNA6L.mjs} +1 -1
- package/dist/{chunk-K2J5B7WI.mjs → chunk-RIW4TT6V.mjs} +6 -6
- package/dist/{chunk-Z4RNZ4HQ.mjs → chunk-TRR232FS.mjs} +5 -5
- package/dist/{chunk-FEAPUDMZ.mjs → chunk-U2NPH2O3.mjs} +7 -7
- package/dist/{chunk-D7XSWNZ7.mjs → chunk-WOEZHDJR.mjs} +8 -8
- package/dist/{chunk-TWLYGLXN.mjs → chunk-ZYWQWFVT.mjs} +7 -7
- package/dist/components/backdrop/backdrop.mjs +2 -2
- package/dist/components/backdrop/index.mjs +2 -2
- package/dist/components/breadcrumb/breadcrumb.mjs +6 -6
- package/dist/components/breadcrumb/index.mjs +6 -6
- package/dist/components/button/button.mjs +2 -2
- package/dist/components/button/icon-button.mjs +2 -2
- package/dist/components/button/index.mjs +9 -9
- package/dist/components/button/text-button.mjs +3 -3
- package/dist/components/charts/{areaCharts.d.mts → areaChart.d.mts} +8 -4
- package/dist/components/charts/{areaCharts.d.ts → areaChart.d.ts} +8 -4
- package/dist/components/charts/{areaCharts.js → areaChart.js} +70 -66
- package/dist/components/charts/{areaCharts.mjs → areaChart.mjs} +4 -4
- package/dist/components/charts/barChart.d.mts +33 -0
- package/dist/components/charts/barChart.d.ts +33 -0
- package/dist/components/charts/barChart.js +464 -0
- package/dist/components/charts/barChart.mjs +10 -0
- package/dist/components/charts/circularProgress.d.mts +4 -4
- package/dist/components/charts/circularProgress.d.ts +4 -4
- package/dist/components/charts/circularProgress.js +4 -4
- package/dist/components/charts/circularProgress.mjs +2 -2
- package/dist/components/charts/index.d.mts +2 -1
- package/dist/components/charts/index.d.ts +2 -1
- package/dist/components/charts/index.js +189 -65
- package/dist/components/charts/index.mjs +10 -6
- package/dist/components/checkbox/checkbox.mjs +3 -3
- package/dist/components/checkbox/index.mjs +3 -3
- package/dist/components/chip/chip.mjs +2 -2
- package/dist/components/chip/index.mjs +2 -2
- package/dist/components/dateTimePicker/calendar.mjs +2 -2
- package/dist/components/dateTimePicker/dateTimePicker.mjs +8 -8
- package/dist/components/dateTimePicker/index.mjs +8 -8
- package/dist/components/dateTimePicker/timePicker.mjs +5 -5
- package/dist/components/fileUpload/fileUpload.mjs +7 -7
- package/dist/components/fileUpload/index.mjs +7 -7
- package/dist/components/input/index.mjs +3 -3
- package/dist/components/input/input.mjs +3 -3
- package/dist/components/list/index.mjs +4 -4
- package/dist/components/list/list.mjs +2 -2
- package/dist/components/list/listItem.mjs +3 -3
- package/dist/components/modal/index.mjs +8 -8
- package/dist/components/modal/modal.mjs +8 -8
- package/dist/components/pagination/index.mjs +4 -4
- package/dist/components/pagination/pagination.mjs +4 -4
- package/dist/components/radio/index.mjs +3 -3
- package/dist/components/radio/radio.mjs +3 -3
- package/dist/components/select/index.js +3 -3
- package/dist/components/select/index.mjs +3 -3
- package/dist/components/select/select.js +3 -3
- package/dist/components/select/select.mjs +3 -3
- package/dist/components/table/index.mjs +8 -8
- package/dist/components/table/table-body.mjs +4 -4
- package/dist/components/table/table-head.mjs +4 -4
- package/dist/components/table/table.mjs +8 -8
- package/dist/components/tabs/index.mjs +2 -2
- package/dist/components/tabs/tabs.mjs +2 -2
- package/dist/components/textarea/index.mjs +2 -2
- package/dist/components/textarea/textarea.mjs +2 -2
- package/dist/components/toast/index.mjs +4 -4
- package/dist/components/toast/toast.mjs +3 -3
- package/dist/components/toast/use-toast.mjs +4 -4
- package/dist/components/tooltip/index.mjs +2 -2
- package/dist/components/tooltip/tooltip.mjs +2 -2
- package/dist/components/tree/index.mjs +2 -2
- package/dist/components/tree/tree.mjs +2 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +192 -68
- package/dist/index.mjs +67 -63
- package/package.json +1 -1
- package/dist/chunk-VYLYF6G5.mjs +0 -143
- package/dist/{chunk-SSMMWMQC.mjs → chunk-2YMAKIZ6.mjs} +3 -3
- package/dist/{chunk-6Q2BXHJL.mjs → chunk-4EIGHKUO.mjs} +3 -3
- package/dist/{chunk-6K3E5BVO.mjs → chunk-7TAGGLNY.mjs} +3 -3
- package/dist/{chunk-X6D7C7QZ.mjs → chunk-A7RU3FU5.mjs} +3 -3
- package/dist/{chunk-7H5XPHY6.mjs → chunk-D6QI3DJG.mjs} +4 -4
- package/dist/{chunk-33C4DOPJ.mjs → chunk-GH6CPGFN.mjs} +4 -4
- package/dist/{chunk-UFVQPPPW.mjs → chunk-HIVPDIEP.mjs} +3 -3
- package/dist/{chunk-P5QCU457.mjs → chunk-LL6F3WDX.mjs} +3 -3
- package/dist/{chunk-UCIH2BJI.mjs → chunk-MEY4IL7D.mjs} +4 -4
- package/dist/{chunk-WPIFIRCJ.mjs → chunk-NFQMXW4Z.mjs} +3 -3
- package/dist/{chunk-YIIFWADW.mjs → chunk-QIRL6HY6.mjs} +4 -4
- package/dist/{chunk-QWIURBUH.mjs → chunk-RT3S3VVJ.mjs} +6 -6
- package/dist/{chunk-7J3KVOTS.mjs → chunk-UB4YBFOT.mjs} +3 -3
- package/dist/{chunk-KCOHU7X7.mjs → chunk-WFMFC7R6.mjs} +4 -4
- package/dist/{chunk-Y6XQTWB5.mjs → chunk-WLNLVX7Q.mjs} +3 -3
- package/dist/{chunk-3YMMVZDL.mjs → chunk-XOH6GWRD.mjs} +0 -0
- package/dist/{chunk-IL5ENWCR.mjs → chunk-Z2537DF6.mjs} +3 -3
|
@@ -0,0 +1,464 @@
|
|
|
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/charts/barChart.tsx
|
|
103
|
+
var barChart_exports = {};
|
|
104
|
+
__export(barChart_exports, {
|
|
105
|
+
default: () => barChart_default
|
|
106
|
+
});
|
|
107
|
+
module.exports = __toCommonJS(barChart_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/charts/barChart.tsx
|
|
328
|
+
var import_recharts = require("recharts");
|
|
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/components/charts/barChart.tsx
|
|
351
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
352
|
+
var BarChartComponent = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
353
|
+
const [props, variantProps] = mapPropsVariants(originalProps, barChartStyle.variantKeys);
|
|
354
|
+
const { data, label, classNames } = { ...props, ...variantProps };
|
|
355
|
+
const slots = (0, import_react.useMemo)(() => barChartStyle({ ...variantProps }), [variantProps]);
|
|
356
|
+
const COLOR_MAP = {
|
|
357
|
+
primary: "#C7E5FA",
|
|
358
|
+
secondary: "#DEC1FA",
|
|
359
|
+
warning: "#F9C967"
|
|
360
|
+
};
|
|
361
|
+
const [tickPositions, setTickPositions] = (0, import_react.useState)([]);
|
|
362
|
+
const tickRef = (0, import_react.useRef)([]);
|
|
363
|
+
const CustomBarShape = (barProps) => {
|
|
364
|
+
const { x, y, width, height, fill } = barProps;
|
|
365
|
+
const radius = 5;
|
|
366
|
+
const extraHeight = 12;
|
|
367
|
+
const adjustedHeight = height + extraHeight;
|
|
368
|
+
const adjustedY = y;
|
|
369
|
+
const bottomY = adjustedY + adjustedHeight;
|
|
370
|
+
return height ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
371
|
+
"path",
|
|
372
|
+
{
|
|
373
|
+
d: `M${x},${bottomY} L${x},${adjustedY + radius} Q${x},${adjustedY} ${x + radius},${adjustedY} L${x + width - radius},${adjustedY} Q${x + width},${adjustedY} ${x + width},${adjustedY + radius} L${x + width},${bottomY} Z`,
|
|
374
|
+
fill
|
|
375
|
+
}
|
|
376
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x, y, width, height: 0, fill });
|
|
377
|
+
};
|
|
378
|
+
const CustomTick = ({ x, y, payload }) => {
|
|
379
|
+
if (x !== void 0) {
|
|
380
|
+
tickRef.current.push(x);
|
|
381
|
+
}
|
|
382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
383
|
+
"text",
|
|
384
|
+
{
|
|
385
|
+
x,
|
|
386
|
+
y: y + 14,
|
|
387
|
+
textAnchor: "middle",
|
|
388
|
+
fontSize: 12,
|
|
389
|
+
fontWeight: 700,
|
|
390
|
+
fill: "currentColor",
|
|
391
|
+
className: "text-body-foreground",
|
|
392
|
+
children: payload.value
|
|
393
|
+
}
|
|
394
|
+
);
|
|
395
|
+
};
|
|
396
|
+
(0, import_react.useEffect)(() => {
|
|
397
|
+
const raf = requestAnimationFrame(() => {
|
|
398
|
+
const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
|
|
399
|
+
const mids = [];
|
|
400
|
+
for (let i = 0; i < unique.length - 1; i++) {
|
|
401
|
+
mids.push((unique[i] + unique[i + 1]) / 2);
|
|
402
|
+
}
|
|
403
|
+
setTickPositions(mids);
|
|
404
|
+
tickRef.current = [];
|
|
405
|
+
});
|
|
406
|
+
return () => cancelAnimationFrame(raf);
|
|
407
|
+
}, [data]);
|
|
408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
409
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_recharts.BarChart, { data, margin: { left: -30 }, barSize: 20, barGap: 10, children: [
|
|
411
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
412
|
+
import_recharts.CartesianGrid,
|
|
413
|
+
{
|
|
414
|
+
vertical: true,
|
|
415
|
+
horizontal: false,
|
|
416
|
+
strokeDasharray: "3 3",
|
|
417
|
+
className: "stroke-neutral-light",
|
|
418
|
+
verticalPoints: tickPositions
|
|
419
|
+
}
|
|
420
|
+
),
|
|
421
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
422
|
+
import_recharts.XAxis,
|
|
423
|
+
{
|
|
424
|
+
dataKey: "name",
|
|
425
|
+
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
426
|
+
tickLine: false,
|
|
427
|
+
tick: CustomTick,
|
|
428
|
+
padding: { left: 32, right: 32 }
|
|
429
|
+
}
|
|
430
|
+
),
|
|
431
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
432
|
+
import_recharts.YAxis,
|
|
433
|
+
{
|
|
434
|
+
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
435
|
+
tickLine: false,
|
|
436
|
+
tick: {
|
|
437
|
+
fontSize: 12,
|
|
438
|
+
fontWeight: 700,
|
|
439
|
+
fill: "text-body-foreground",
|
|
440
|
+
textAnchor: "middle",
|
|
441
|
+
dx: -10
|
|
442
|
+
},
|
|
443
|
+
ticks: [0, 20, 40, 60, 80, 100],
|
|
444
|
+
domain: [-6, 110]
|
|
445
|
+
}
|
|
446
|
+
),
|
|
447
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.Bar, { dataKey: "avg", fill: COLOR_MAP.primary, width: 20, shape: CustomBarShape }),
|
|
448
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.Bar, { dataKey: "high", fill: COLOR_MAP.secondary, width: 20, shape: CustomBarShape }),
|
|
449
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.Bar, { dataKey: "low", fill: COLOR_MAP.warning, width: 20, shape: CustomBarShape })
|
|
450
|
+
] }) })
|
|
451
|
+
] });
|
|
452
|
+
});
|
|
453
|
+
BarChartComponent.displayName = "barChart";
|
|
454
|
+
var barChart_default = BarChartComponent;
|
|
455
|
+
var barChartStyle = tv({
|
|
456
|
+
slots: {
|
|
457
|
+
base: ["flex", "flex-col", "gap-[10px]"],
|
|
458
|
+
label: ["text-md", "font-bold", "text-body-foreground"]
|
|
459
|
+
},
|
|
460
|
+
variants: {},
|
|
461
|
+
defaultVariants: {
|
|
462
|
+
color: "primary"
|
|
463
|
+
}
|
|
464
|
+
});
|
|
@@ -6,7 +6,7 @@ import { SlotsToClasses } from '../../utils/types.mjs';
|
|
|
6
6
|
type Props = {
|
|
7
7
|
percentage: number;
|
|
8
8
|
unit?: string;
|
|
9
|
-
|
|
9
|
+
label?: string;
|
|
10
10
|
size?: number;
|
|
11
11
|
classNames?: SlotsToClasses<CircularProgressSlots>;
|
|
12
12
|
};
|
|
@@ -36,7 +36,7 @@ declare const circularProgressStyle: tailwind_variants.TVReturnType<{
|
|
|
36
36
|
background: never[];
|
|
37
37
|
progress: string[];
|
|
38
38
|
text: string[];
|
|
39
|
-
|
|
39
|
+
label: string[];
|
|
40
40
|
}, undefined, {
|
|
41
41
|
color: {
|
|
42
42
|
primary: {
|
|
@@ -60,7 +60,7 @@ declare const circularProgressStyle: tailwind_variants.TVReturnType<{
|
|
|
60
60
|
background: never[];
|
|
61
61
|
progress: string[];
|
|
62
62
|
text: string[];
|
|
63
|
-
|
|
63
|
+
label: string[];
|
|
64
64
|
}, tailwind_variants.TVReturnType<{
|
|
65
65
|
color: {
|
|
66
66
|
primary: {
|
|
@@ -84,7 +84,7 @@ declare const circularProgressStyle: tailwind_variants.TVReturnType<{
|
|
|
84
84
|
background: never[];
|
|
85
85
|
progress: string[];
|
|
86
86
|
text: string[];
|
|
87
|
-
|
|
87
|
+
label: string[];
|
|
88
88
|
}, undefined, unknown, unknown, undefined>>;
|
|
89
89
|
type CircularProgressVariantProps = VariantProps<typeof circularProgressStyle>;
|
|
90
90
|
type CircularProgressSlots = keyof ReturnType<typeof circularProgressStyle>;
|
|
@@ -6,7 +6,7 @@ import { SlotsToClasses } from '../../utils/types.js';
|
|
|
6
6
|
type Props = {
|
|
7
7
|
percentage: number;
|
|
8
8
|
unit?: string;
|
|
9
|
-
|
|
9
|
+
label?: string;
|
|
10
10
|
size?: number;
|
|
11
11
|
classNames?: SlotsToClasses<CircularProgressSlots>;
|
|
12
12
|
};
|
|
@@ -36,7 +36,7 @@ declare const circularProgressStyle: tailwind_variants.TVReturnType<{
|
|
|
36
36
|
background: never[];
|
|
37
37
|
progress: string[];
|
|
38
38
|
text: string[];
|
|
39
|
-
|
|
39
|
+
label: string[];
|
|
40
40
|
}, undefined, {
|
|
41
41
|
color: {
|
|
42
42
|
primary: {
|
|
@@ -60,7 +60,7 @@ declare const circularProgressStyle: tailwind_variants.TVReturnType<{
|
|
|
60
60
|
background: never[];
|
|
61
61
|
progress: string[];
|
|
62
62
|
text: string[];
|
|
63
|
-
|
|
63
|
+
label: string[];
|
|
64
64
|
}, tailwind_variants.TVReturnType<{
|
|
65
65
|
color: {
|
|
66
66
|
primary: {
|
|
@@ -84,7 +84,7 @@ declare const circularProgressStyle: tailwind_variants.TVReturnType<{
|
|
|
84
84
|
background: never[];
|
|
85
85
|
progress: string[];
|
|
86
86
|
text: string[];
|
|
87
|
-
|
|
87
|
+
label: string[];
|
|
88
88
|
}, undefined, unknown, unknown, undefined>>;
|
|
89
89
|
type CircularProgressVariantProps = VariantProps<typeof circularProgressStyle>;
|
|
90
90
|
type CircularProgressSlots = keyof ReturnType<typeof circularProgressStyle>;
|
|
@@ -350,11 +350,11 @@ var tv = (0, import_tailwind_variants.createTV)({
|
|
|
350
350
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
351
351
|
var CircularProgress = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
352
352
|
const [props, variantProps] = mapPropsVariants(originalProps, circularProgressStyle.variantKeys);
|
|
353
|
-
const {
|
|
353
|
+
const { label, size = 150, percentage, unit, classNames } = { ...props, ...variantProps };
|
|
354
354
|
const slots = (0, import_react.useMemo)(() => circularProgressStyle({ ...variantProps }), [variantProps]);
|
|
355
355
|
const data = [
|
|
356
356
|
{
|
|
357
|
-
name:
|
|
357
|
+
name: label,
|
|
358
358
|
value: percentage
|
|
359
359
|
}
|
|
360
360
|
];
|
|
@@ -403,7 +403,7 @@ var CircularProgress = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
403
403
|
unit
|
|
404
404
|
] }) })
|
|
405
405
|
] }),
|
|
406
|
-
|
|
406
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label })
|
|
407
407
|
] });
|
|
408
408
|
});
|
|
409
409
|
CircularProgress.displayName = "CircularProgress";
|
|
@@ -414,7 +414,7 @@ var circularProgressStyle = tv({
|
|
|
414
414
|
background: [],
|
|
415
415
|
progress: ["transition-all", "duration-1000 ease-out"],
|
|
416
416
|
text: ["text-xl", "font-bold"],
|
|
417
|
-
|
|
417
|
+
label: ["text-md", "font-bold", "text-left", "text-body-foreground"]
|
|
418
418
|
},
|
|
419
419
|
variants: {
|
|
420
420
|
color: {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import {
|
|
4
4
|
circularProgress_default
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-E3G5QXSH.mjs";
|
|
5
|
+
} from "../../chunk-U2NPH2O3.mjs";
|
|
7
6
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
7
|
+
import "../../chunk-E3G5QXSH.mjs";
|
|
8
8
|
import "../../chunk-AC6TWLRT.mjs";
|
|
9
9
|
export {
|
|
10
10
|
circularProgress_default as default
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as CircularProgress } from './circularProgress.mjs';
|
|
2
|
-
export { default as AreaChart } from './
|
|
2
|
+
export { default as AreaChart } from './areaChart.mjs';
|
|
3
|
+
export { default as BarChart } from './barChart.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 CircularProgress } from './circularProgress.js';
|
|
2
|
-
export { default as AreaChart } from './
|
|
2
|
+
export { default as AreaChart } from './areaChart.js';
|
|
3
|
+
export { default as BarChart } from './barChart.js';
|
|
3
4
|
import 'tailwind-variants';
|
|
4
5
|
import 'react';
|
|
5
6
|
import '../../utils/types.js';
|