@deepnoid/ui 0.1.181 → 0.1.182

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 (83) hide show
  1. package/.turbo/turbo-build.log +149 -149
  2. package/dist/{chunk-ROXKJQSJ.mjs → chunk-6NO7GQHG.mjs} +3 -3
  3. package/dist/{chunk-GWHUQUKA.mjs → chunk-6WD32ERF.mjs} +93 -79
  4. package/dist/{chunk-NPVMCUZ4.mjs → chunk-GPJVGQ5W.mjs} +2 -2
  5. package/dist/{chunk-GG7QANQF.mjs → chunk-KDBM7UVG.mjs} +1 -1
  6. package/dist/{chunk-Q2AFTLDT.mjs → chunk-M5ZLURXE.mjs} +2 -2
  7. package/dist/{chunk-2H5EBNCD.mjs → chunk-SX2FQY4L.mjs} +4 -4
  8. package/dist/{chunk-MU6QDNYC.mjs → chunk-W67QZ4OB.mjs} +1 -1
  9. package/dist/chunk-WKTRWHDA.mjs +264 -0
  10. package/dist/{chunk-7C7RHDHV.mjs → chunk-XZTVXEOD.mjs} +4 -4
  11. package/dist/{chunk-HOQAQVDA.mjs → chunk-YTW5HJJH.mjs} +5 -5
  12. package/dist/components/backdrop/backdrop.mjs +2 -2
  13. package/dist/components/backdrop/index.mjs +2 -2
  14. package/dist/components/breadcrumb/breadcrumb.mjs +4 -4
  15. package/dist/components/breadcrumb/index.mjs +4 -4
  16. package/dist/components/button/button.mjs +1 -1
  17. package/dist/components/button/icon-button.mjs +1 -1
  18. package/dist/components/button/index.mjs +3 -3
  19. package/dist/components/button/text-button.mjs +2 -2
  20. package/dist/components/charts/areaChart.mjs +1 -1
  21. package/dist/components/charts/barChart.js +125 -111
  22. package/dist/components/charts/barChart.mjs +1 -1
  23. package/dist/components/charts/index.js +218 -190
  24. package/dist/components/charts/index.mjs +3 -3
  25. package/dist/components/charts/simpleBarChart.js +93 -79
  26. package/dist/components/charts/simpleBarChart.mjs +1 -1
  27. package/dist/components/checkbox/checkbox.mjs +2 -2
  28. package/dist/components/checkbox/index.mjs +2 -2
  29. package/dist/components/chip/chip.mjs +1 -1
  30. package/dist/components/chip/index.mjs +1 -1
  31. package/dist/components/drawer/drawer.mjs +2 -2
  32. package/dist/components/drawer/index.mjs +2 -2
  33. package/dist/components/fileUpload/fileUpload.mjs +6 -6
  34. package/dist/components/fileUpload/index.mjs +6 -6
  35. package/dist/components/input/index.mjs +3 -3
  36. package/dist/components/input/input.mjs +3 -3
  37. package/dist/components/list/index.mjs +2 -2
  38. package/dist/components/list/listItem.mjs +2 -2
  39. package/dist/components/modal/index.mjs +5 -5
  40. package/dist/components/modal/modal.mjs +5 -5
  41. package/dist/components/pagination/index.mjs +4 -4
  42. package/dist/components/pagination/pagination.mjs +4 -4
  43. package/dist/components/picker/datePicker.mjs +5 -5
  44. package/dist/components/picker/index.mjs +7 -7
  45. package/dist/components/picker/timePicker.mjs +4 -4
  46. package/dist/components/progress/index.mjs +2 -2
  47. package/dist/components/progress/progress.mjs +2 -2
  48. package/dist/components/radio/index.mjs +2 -2
  49. package/dist/components/radio/radio.mjs +2 -2
  50. package/dist/components/select/index.mjs +3 -3
  51. package/dist/components/select/select.mjs +3 -3
  52. package/dist/components/starRating/index.mjs +1 -1
  53. package/dist/components/starRating/starRating.mjs +1 -1
  54. package/dist/components/table/definition-table.mjs +2 -2
  55. package/dist/components/table/index.mjs +7 -7
  56. package/dist/components/table/table-body.mjs +6 -6
  57. package/dist/components/table/table-head.mjs +6 -6
  58. package/dist/components/table/table.mjs +6 -6
  59. package/dist/components/textarea/index.mjs +2 -2
  60. package/dist/components/textarea/textarea.mjs +2 -2
  61. package/dist/components/timePicker/calendar.mjs +1 -1
  62. package/dist/components/toast/index.mjs +5 -5
  63. package/dist/components/toast/toast.mjs +3 -3
  64. package/dist/components/toast/use-toast.mjs +4 -4
  65. package/dist/components/tree/index.mjs +2 -2
  66. package/dist/components/tree/tree.mjs +2 -2
  67. package/dist/index.js +218 -190
  68. package/dist/index.mjs +33 -33
  69. package/package.json +1 -1
  70. package/dist/chunk-JOK735WN.mjs +0 -250
  71. package/dist/{chunk-OEIEALIP.mjs → chunk-3DCUMRYP.mjs} +3 -3
  72. package/dist/{chunk-3CRSSRCH.mjs → chunk-3HXNAVAN.mjs} +3 -3
  73. package/dist/{chunk-IH3BJRTV.mjs → chunk-4X35QQTI.mjs} +3 -3
  74. package/dist/{chunk-RXDRG6MC.mjs → chunk-7H6U5XJA.mjs} +3 -3
  75. package/dist/{chunk-KH63CD55.mjs → chunk-ACZ3DQVT.mjs} +3 -3
  76. package/dist/{chunk-DS5CGU2X.mjs → chunk-BH3I4LIZ.mjs} +3 -3
  77. package/dist/{chunk-GS5X67UB.mjs → chunk-GVTYOGSV.mjs} +3 -3
  78. package/dist/{chunk-4EELFA6L.mjs → chunk-LE7PGMCV.mjs} +3 -3
  79. package/dist/{chunk-4LUASWAN.mjs → chunk-NDNIAALB.mjs} +3 -3
  80. package/dist/{chunk-MWUA62VL.mjs → chunk-NKF2TQMA.mjs} +3 -3
  81. package/dist/{chunk-A3WPBLOW.mjs → chunk-UINFH5AT.mjs} +3 -3
  82. package/dist/{chunk-PRNE3U26.mjs → chunk-XL6LZDT4.mjs} +3 -3
  83. package/dist/{chunk-45Y7ANPK.mjs → chunk-ZFC5O2V3.mjs} +3 -3
@@ -1,250 +0,0 @@
1
- "use client";
2
- import {
3
- mapPropsVariants
4
- } from "./chunk-E3G5QXSH.mjs";
5
- import {
6
- tv
7
- } from "./chunk-U4DJHAM5.mjs";
8
-
9
- // src/components/charts/barChart.tsx
10
- import { forwardRef, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
11
- import { XAxis, YAxis, ResponsiveContainer, CartesianGrid, BarChart, Bar } from "recharts";
12
- import { jsx, jsxs } from "react/jsx-runtime";
13
- var BarChartComponent = forwardRef((originalProps, ref) => {
14
- const [props, variantProps] = mapPropsVariants(originalProps, barChartStyle.variantKeys);
15
- const {
16
- data = [],
17
- label,
18
- classNames,
19
- yAxisTicks = [0, 20, 40, 60, 80, 100],
20
- yAxisTickFormatter = (value) => `${value}`,
21
- yAxisDomain = [-6, 110],
22
- barGap = 20,
23
- tooltipFormatter
24
- } = { ...props, ...variantProps };
25
- const slots = useMemo(() => barChartStyle({ ...variantProps }), [variantProps]);
26
- const chartRef = useRef(null);
27
- const tooltipRef = useRef(null);
28
- const [tooltipLeft, setTooltipLeft] = useState(0);
29
- const [tickPositions, setTickPositions] = useState([]);
30
- const tickRef = useRef([]);
31
- const [tooltipState, setTooltipState] = useState(null);
32
- const handleMouseEnter = (e, dataKey) => {
33
- if (!tooltipFormatter || !chartRef.current) return;
34
- const { payload, x, y } = e;
35
- if (!payload || !payload[dataKey]) return;
36
- setTooltipState({
37
- x,
38
- y,
39
- value: payload[dataKey],
40
- dataKey,
41
- label: payload.title
42
- });
43
- };
44
- const handleMouseLeave = () => {
45
- setTooltipState(null);
46
- };
47
- const CustomBarShape = ({ x, y, width, height, fill }) => {
48
- const radius = 5;
49
- const extraHeight = 10;
50
- const adjustedHeight = height + extraHeight;
51
- const adjustedY = y;
52
- const bottomY = adjustedY + adjustedHeight;
53
- return height ? /* @__PURE__ */ jsx(
54
- "path",
55
- {
56
- 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`,
57
- fill
58
- }
59
- ) : /* @__PURE__ */ jsx("rect", { x, y, width, height: 0, fill });
60
- };
61
- const CustomTick = ({ x, y, payload }) => {
62
- if (x !== void 0) tickRef.current.push(x);
63
- return /* @__PURE__ */ jsx(
64
- "text",
65
- {
66
- x,
67
- y: y + 14,
68
- textAnchor: "middle",
69
- fontSize: 12,
70
- fontWeight: 700,
71
- fill: "currentColor",
72
- className: "text-body-foreground",
73
- children: payload.value
74
- }
75
- );
76
- };
77
- const CustomYAxisTick = ({ x, y, payload }) => /* @__PURE__ */ jsx(
78
- "text",
79
- {
80
- x: x - 10,
81
- y,
82
- textAnchor: "middle",
83
- fontSize: 12,
84
- fontWeight: 700,
85
- fill: "currentColor",
86
- className: "text-body-foreground",
87
- dy: 4,
88
- children: yAxisTickFormatter(payload.value)
89
- }
90
- );
91
- useEffect(() => {
92
- const raf = requestAnimationFrame(() => {
93
- const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
94
- const mids = [];
95
- for (let i = 0; i < unique.length - 1; i++) {
96
- mids.push((unique[i] + unique[i + 1]) / 2);
97
- }
98
- setTickPositions(mids);
99
- tickRef.current = [];
100
- });
101
- return () => cancelAnimationFrame(raf);
102
- }, [data]);
103
- useLayoutEffect(() => {
104
- if (!tooltipState || !chartRef.current || !tooltipRef.current) return;
105
- const chartRect = chartRef.current.getBoundingClientRect();
106
- const tooltipRect = tooltipRef.current.getBoundingClientRect();
107
- const chartWidth = chartRect.width;
108
- const tooltipWidth = tooltipRect.width;
109
- let left = tooltipState.x - tooltipWidth / 2;
110
- const padding = 8;
111
- if (left < padding) {
112
- left = padding;
113
- } else if (left + tooltipWidth > chartWidth - padding) {
114
- left = chartWidth - tooltipWidth - padding;
115
- }
116
- setTooltipLeft(left);
117
- }, [tooltipState]);
118
- return /* @__PURE__ */ jsxs("div", { ref: chartRef, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onMouseLeave: handleMouseLeave, children: [
119
- label && /* @__PURE__ */ jsx("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
120
- /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(
121
- BarChart,
122
- {
123
- data,
124
- margin: { left: -20 },
125
- barSize: 20,
126
- barGap,
127
- className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
128
- children: [
129
- /* @__PURE__ */ jsxs("defs", { children: [
130
- /* @__PURE__ */ jsxs("linearGradient", { id: "blueGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
131
- /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#DEC1FA" }),
132
- /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#3F9CF2" })
133
- ] }),
134
- /* @__PURE__ */ jsxs("linearGradient", { id: "greenGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
135
- /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#C2E59C" }),
136
- /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#64B3F4" })
137
- ] }),
138
- /* @__PURE__ */ jsxs("linearGradient", { id: "pinkGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
139
- /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#DDD6F3" }),
140
- /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#FAACA8" })
141
- ] })
142
- ] }),
143
- /* @__PURE__ */ jsx(
144
- CartesianGrid,
145
- {
146
- vertical: true,
147
- horizontal: false,
148
- strokeDasharray: "4 4",
149
- className: "stroke-neutral-light",
150
- verticalPoints: tickPositions
151
- }
152
- ),
153
- /* @__PURE__ */ jsx(
154
- XAxis,
155
- {
156
- dataKey: "title",
157
- axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
158
- tickLine: false,
159
- tick: CustomTick,
160
- padding: { left: 0, right: 0 }
161
- }
162
- ),
163
- /* @__PURE__ */ jsx(
164
- YAxis,
165
- {
166
- axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
167
- tickLine: false,
168
- tick: CustomYAxisTick,
169
- ticks: yAxisTicks,
170
- domain: yAxisDomain
171
- }
172
- ),
173
- /* @__PURE__ */ jsx(
174
- Bar,
175
- {
176
- dataKey: "blue",
177
- fill: "url(#blueGradient)",
178
- shape: CustomBarShape,
179
- onMouseEnter: (e) => handleMouseEnter(e, "blue"),
180
- onMouseLeave: handleMouseLeave
181
- }
182
- ),
183
- /* @__PURE__ */ jsx(
184
- Bar,
185
- {
186
- dataKey: "green",
187
- fill: "url(#greenGradient)",
188
- shape: CustomBarShape,
189
- onMouseEnter: (e) => handleMouseEnter(e, "green"),
190
- onMouseLeave: handleMouseLeave
191
- }
192
- ),
193
- /* @__PURE__ */ jsx(
194
- Bar,
195
- {
196
- dataKey: "pink",
197
- fill: "url(#pinkGradient)",
198
- shape: CustomBarShape,
199
- onMouseEnter: (e) => handleMouseEnter(e, "pink"),
200
- onMouseLeave: handleMouseLeave
201
- }
202
- )
203
- ]
204
- }
205
- ) }),
206
- tooltipFormatter && /* @__PURE__ */ jsx(
207
- "div",
208
- {
209
- ref: tooltipRef,
210
- style: {
211
- position: "absolute",
212
- left: tooltipLeft + 10,
213
- top: (tooltipState == null ? void 0 : tooltipState.y) ? tooltipState.y - 40 : 0,
214
- pointerEvents: "none",
215
- zIndex: 10,
216
- opacity: tooltipState ? 1 : 0,
217
- transition: "opacity 0.1s ease-out",
218
- visibility: tooltipState ? "visible" : "hidden",
219
- width: "fit-content",
220
- whiteSpace: "nowrap"
221
- },
222
- children: tooltipState && tooltipFormatter(tooltipState)
223
- }
224
- )
225
- ] });
226
- });
227
- BarChartComponent.displayName = "barChart";
228
- var barChart_default = BarChartComponent;
229
- var barChartStyle = tv({
230
- slots: {
231
- base: ["flex", "flex-col", "gap-[10px]", "select-none", "relative"],
232
- label: ["text-md", "font-bold", "text-body-foreground"]
233
- },
234
- variants: {},
235
- defaultVariants: {}
236
- });
237
- function BarChartTooltip({ className = "", children }) {
238
- return /* @__PURE__ */ jsx(
239
- "div",
240
- {
241
- className: `text-md text-common-white bg-common-black flex max-w-[160px] whitespace-nowrap rounded-[5px] px-[10px] py-[6px] text-center font-bold ${className}`,
242
- children
243
- }
244
- );
245
- }
246
-
247
- export {
248
- barChart_default,
249
- BarChartTooltip
250
- };
@@ -1,13 +1,13 @@
1
1
  "use client";
2
+ import {
3
+ clsx
4
+ } from "./chunk-27Y6K5NK.mjs";
2
5
  import {
3
6
  mapPropsVariants
4
7
  } from "./chunk-E3G5QXSH.mjs";
5
8
  import {
6
9
  tv
7
10
  } from "./chunk-U4DJHAM5.mjs";
8
- import {
9
- clsx
10
- } from "./chunk-27Y6K5NK.mjs";
11
11
 
12
12
  // src/components/checkbox/checkbox.tsx
13
13
  import { forwardRef, useMemo } from "react";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- mapPropsVariants
4
- } from "./chunk-E3G5QXSH.mjs";
5
2
  import {
6
3
  clsx
7
4
  } from "./chunk-27Y6K5NK.mjs";
5
+ import {
6
+ mapPropsVariants
7
+ } from "./chunk-E3G5QXSH.mjs";
8
8
 
9
9
  // src/components/textarea/textarea.tsx
10
10
  import {
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- tv
4
- } from "./chunk-U4DJHAM5.mjs";
5
2
  import {
6
3
  clsx
7
4
  } from "./chunk-27Y6K5NK.mjs";
5
+ import {
6
+ tv
7
+ } from "./chunk-U4DJHAM5.mjs";
8
8
 
9
9
  // src/components/backdrop/backdrop.tsx
10
10
  import { useEffect, useState } from "react";
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  Icon_default
4
4
  } from "./chunk-B4YBLIBE.mjs";
5
+ import {
6
+ clsx
7
+ } from "./chunk-27Y6K5NK.mjs";
5
8
  import {
6
9
  mapPropsVariants
7
10
  } from "./chunk-E3G5QXSH.mjs";
8
11
  import {
9
12
  tv
10
13
  } from "./chunk-U4DJHAM5.mjs";
11
- import {
12
- clsx
13
- } from "./chunk-27Y6K5NK.mjs";
14
14
 
15
15
  // src/components/input/input.tsx
16
16
  import {
@@ -1,13 +1,13 @@
1
1
  "use client";
2
+ import {
3
+ useIsMounted
4
+ } from "./chunk-3V4HT2K5.mjs";
2
5
  import {
3
6
  mapPropsVariants
4
7
  } from "./chunk-E3G5QXSH.mjs";
5
8
  import {
6
9
  tv
7
10
  } from "./chunk-U4DJHAM5.mjs";
8
- import {
9
- useIsMounted
10
- } from "./chunk-3V4HT2K5.mjs";
11
11
 
12
12
  // src/components/progress/progress.tsx
13
13
  import { useMemo } from "react";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- tv
4
- } from "./chunk-U4DJHAM5.mjs";
5
2
  import {
6
3
  clsx
7
4
  } from "./chunk-27Y6K5NK.mjs";
5
+ import {
6
+ tv
7
+ } from "./chunk-U4DJHAM5.mjs";
8
8
 
9
9
  // src/components/table/definition-table.tsx
10
10
  import { forwardRef, useMemo } from "react";
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  Icon_default
4
4
  } from "./chunk-B4YBLIBE.mjs";
5
+ import {
6
+ clsx
7
+ } from "./chunk-27Y6K5NK.mjs";
5
8
  import {
6
9
  mapPropsVariants
7
10
  } from "./chunk-E3G5QXSH.mjs";
8
11
  import {
9
12
  tv
10
13
  } from "./chunk-U4DJHAM5.mjs";
11
- import {
12
- clsx
13
- } from "./chunk-27Y6K5NK.mjs";
14
14
 
15
15
  // src/components/toast/toast.tsx
16
16
  import { forwardRef, useImperativeHandle, useMemo, useRef } from "react";
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  Icon_default
4
4
  } from "./chunk-B4YBLIBE.mjs";
5
+ import {
6
+ clsx
7
+ } from "./chunk-27Y6K5NK.mjs";
5
8
  import {
6
9
  mapPropsVariants
7
10
  } from "./chunk-E3G5QXSH.mjs";
8
11
  import {
9
12
  tv
10
13
  } from "./chunk-U4DJHAM5.mjs";
11
- import {
12
- clsx
13
- } from "./chunk-27Y6K5NK.mjs";
14
14
 
15
15
  // src/components/select/select.tsx
16
16
  import { forwardRef, useMemo, useState, useRef, useEffect } from "react";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
+ import {
3
+ clsx
4
+ } from "./chunk-27Y6K5NK.mjs";
2
5
  import {
3
6
  mapPropsVariants
4
7
  } from "./chunk-E3G5QXSH.mjs";
5
8
  import {
6
9
  tv
7
10
  } from "./chunk-U4DJHAM5.mjs";
8
- import {
9
- clsx
10
- } from "./chunk-27Y6K5NK.mjs";
11
11
 
12
12
  // src/components/button/text-button.tsx
13
13
  import {
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  Icon_default
4
4
  } from "./chunk-B4YBLIBE.mjs";
5
- import {
6
- tv
7
- } from "./chunk-U4DJHAM5.mjs";
8
5
  import {
9
6
  clsx
10
7
  } from "./chunk-27Y6K5NK.mjs";
8
+ import {
9
+ tv
10
+ } from "./chunk-U4DJHAM5.mjs";
11
11
 
12
12
  // src/components/tree/tree.tsx
13
13
  import { forwardRef, useMemo, useState, useCallback } from "react";
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  Icon_default
4
4
  } from "./chunk-B4YBLIBE.mjs";
5
- import {
6
- mapPropsVariants
7
- } from "./chunk-E3G5QXSH.mjs";
8
5
  import {
9
6
  avatar_default
10
7
  } from "./chunk-PCASWP2U.mjs";
8
+ import {
9
+ mapPropsVariants
10
+ } from "./chunk-E3G5QXSH.mjs";
11
11
  import {
12
12
  tv
13
13
  } from "./chunk-U4DJHAM5.mjs";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
+ import {
3
+ clsx
4
+ } from "./chunk-27Y6K5NK.mjs";
2
5
  import {
3
6
  mapPropsVariants
4
7
  } from "./chunk-E3G5QXSH.mjs";
5
8
  import {
6
9
  tv
7
10
  } from "./chunk-U4DJHAM5.mjs";
8
- import {
9
- clsx
10
- } from "./chunk-27Y6K5NK.mjs";
11
11
 
12
12
  // src/components/radio/radio.tsx
13
13
  import { forwardRef, useMemo } from "react";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
+ import {
3
+ clsx
4
+ } from "./chunk-27Y6K5NK.mjs";
2
5
  import {
3
6
  mapPropsVariants
4
7
  } from "./chunk-E3G5QXSH.mjs";
5
8
  import {
6
9
  tv
7
10
  } from "./chunk-U4DJHAM5.mjs";
8
- import {
9
- clsx
10
- } from "./chunk-27Y6K5NK.mjs";
11
11
 
12
12
  // src/components/drawer/drawer.tsx
13
13
  import { forwardRef, useMemo, useEffect, useState } from "react";