@deepnoid/ui 0.1.168 → 0.1.170
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 +173 -173
- package/dist/{chunk-2LRPY6DW.mjs → chunk-GWHUQUKA.mjs} +33 -16
- package/dist/{chunk-5GAHDSWH.mjs → chunk-JOK735WN.mjs} +8 -2
- package/dist/components/breadcrumb/breadcrumb.mjs +2 -2
- package/dist/components/breadcrumb/index.mjs +2 -2
- package/dist/components/button/index.mjs +3 -3
- package/dist/components/charts/barChart.d.mts +4 -2
- package/dist/components/charts/barChart.d.ts +4 -2
- package/dist/components/charts/barChart.js +8 -2
- package/dist/components/charts/barChart.mjs +1 -1
- package/dist/components/charts/index.js +41 -18
- package/dist/components/charts/index.mjs +7 -7
- package/dist/components/charts/simpleBarChart.js +33 -16
- package/dist/components/charts/simpleBarChart.mjs +1 -1
- package/dist/components/fileUpload/fileUpload.mjs +1 -1
- package/dist/components/fileUpload/index.mjs +1 -1
- package/dist/components/modal/index.mjs +1 -1
- package/dist/components/modal/modal.mjs +1 -1
- package/dist/components/picker/datePicker.mjs +2 -2
- package/dist/components/picker/index.mjs +2 -2
- package/dist/components/table/index.mjs +3 -3
- package/dist/components/table/table-body.mjs +3 -3
- package/dist/components/table/table-head.mjs +3 -3
- package/dist/components/table/table.mjs +3 -3
- package/dist/index.js +41 -18
- package/dist/index.mjs +27 -27
- package/package.json +1 -1
- package/dist/{chunk-7HMERBCT.mjs → chunk-6DOAZ27E.mjs} +3 -3
- package/dist/{chunk-DWW4ZESK.mjs → chunk-PX4RCHOE.mjs} +3 -3
- package/dist/{chunk-I3SXSUFN.mjs → chunk-W66K4FK5.mjs} +3 -3
package/dist/index.js
CHANGED
|
@@ -13111,8 +13111,14 @@ var barChartStyle = tv({
|
|
|
13111
13111
|
variants: {},
|
|
13112
13112
|
defaultVariants: {}
|
|
13113
13113
|
});
|
|
13114
|
-
function BarChartTooltip({ children }) {
|
|
13115
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13114
|
+
function BarChartTooltip({ className = "", children }) {
|
|
13115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13116
|
+
"div",
|
|
13117
|
+
{
|
|
13118
|
+
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}`,
|
|
13119
|
+
children
|
|
13120
|
+
}
|
|
13121
|
+
);
|
|
13116
13122
|
}
|
|
13117
13123
|
|
|
13118
13124
|
// src/components/charts/radarChart.tsx
|
|
@@ -13239,8 +13245,38 @@ var SimpleBarChartComponent = (0, import_react42.forwardRef)((originalProps, ref
|
|
|
13239
13245
|
const tooltipRef = (0, import_react42.useRef)(null);
|
|
13240
13246
|
const [tooltipLeft, setTooltipLeft] = (0, import_react42.useState)(0);
|
|
13241
13247
|
const [tickPositions, setTickPositions] = (0, import_react42.useState)([]);
|
|
13242
|
-
const tickRef = (0, import_react42.useRef)([]);
|
|
13243
13248
|
const [tooltipState, setTooltipState] = (0, import_react42.useState)(null);
|
|
13249
|
+
(0, import_react42.useEffect)(() => {
|
|
13250
|
+
if (!chartRef.current || !data.length) return;
|
|
13251
|
+
const updateDimensions = () => {
|
|
13252
|
+
if (!chartRef.current) return;
|
|
13253
|
+
const rect = chartRef.current.getBoundingClientRect();
|
|
13254
|
+
const chartWidth = rect.width;
|
|
13255
|
+
const leftPadding = 0;
|
|
13256
|
+
const rightPadding = 0;
|
|
13257
|
+
const availableWidth = chartWidth - leftPadding - rightPadding;
|
|
13258
|
+
const barCount = data.length;
|
|
13259
|
+
if (barCount <= 1) {
|
|
13260
|
+
setTickPositions([]);
|
|
13261
|
+
return;
|
|
13262
|
+
}
|
|
13263
|
+
const barWidth = availableWidth / barCount;
|
|
13264
|
+
const gridPositions = [];
|
|
13265
|
+
for (let i = 0; i < barCount - 1; i++) {
|
|
13266
|
+
const firstBarCenter = leftPadding + (i + 0.5) * barWidth;
|
|
13267
|
+
const secondBarCenter = leftPadding + (i + 1.5) * barWidth;
|
|
13268
|
+
const gridPosition = (firstBarCenter + secondBarCenter) / 2;
|
|
13269
|
+
gridPositions.push(gridPosition);
|
|
13270
|
+
}
|
|
13271
|
+
setTickPositions(gridPositions);
|
|
13272
|
+
};
|
|
13273
|
+
updateDimensions();
|
|
13274
|
+
const resizeObserver = new ResizeObserver(updateDimensions);
|
|
13275
|
+
resizeObserver.observe(chartRef.current);
|
|
13276
|
+
return () => {
|
|
13277
|
+
resizeObserver.disconnect();
|
|
13278
|
+
};
|
|
13279
|
+
}, [data]);
|
|
13244
13280
|
const handleMouseEnter = (e) => {
|
|
13245
13281
|
if (!tooltipFormatter || !chartRef.current) return;
|
|
13246
13282
|
const { payload, x, y } = e;
|
|
@@ -13270,7 +13306,6 @@ var SimpleBarChartComponent = (0, import_react42.forwardRef)((originalProps, ref
|
|
|
13270
13306
|
) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("rect", { x, y, width, height: 0, fill });
|
|
13271
13307
|
};
|
|
13272
13308
|
const CustomTick = ({ x, y, payload }) => {
|
|
13273
|
-
if (x !== void 0) tickRef.current.push(x);
|
|
13274
13309
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
13275
13310
|
"text",
|
|
13276
13311
|
{
|
|
@@ -13285,18 +13320,6 @@ var SimpleBarChartComponent = (0, import_react42.forwardRef)((originalProps, ref
|
|
|
13285
13320
|
}
|
|
13286
13321
|
);
|
|
13287
13322
|
};
|
|
13288
|
-
(0, import_react42.useEffect)(() => {
|
|
13289
|
-
const raf = requestAnimationFrame(() => {
|
|
13290
|
-
const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
|
|
13291
|
-
const mids = [];
|
|
13292
|
-
for (let i = 0; i < unique.length - 1; i++) {
|
|
13293
|
-
mids.push((unique[i] + unique[i + 1]) / 2);
|
|
13294
|
-
}
|
|
13295
|
-
setTickPositions(mids);
|
|
13296
|
-
tickRef.current = [];
|
|
13297
|
-
});
|
|
13298
|
-
return () => cancelAnimationFrame(raf);
|
|
13299
|
-
}, [data]);
|
|
13300
13323
|
(0, import_react42.useLayoutEffect)(() => {
|
|
13301
13324
|
if (!tooltipState || !chartRef.current || !tooltipRef.current) return;
|
|
13302
13325
|
const chartRect = chartRef.current.getBoundingClientRect();
|
|
@@ -13374,8 +13397,8 @@ var SimpleBarChartComponent = (0, import_react42.forwardRef)((originalProps, ref
|
|
|
13374
13397
|
ref: tooltipRef,
|
|
13375
13398
|
style: {
|
|
13376
13399
|
position: "absolute",
|
|
13377
|
-
left: tooltipLeft +
|
|
13378
|
-
top: (tooltipState == null ? void 0 : tooltipState.y) ? tooltipState.y -
|
|
13400
|
+
left: tooltipLeft + 5,
|
|
13401
|
+
top: (tooltipState == null ? void 0 : tooltipState.y) ? tooltipState.y - 20 : 0,
|
|
13379
13402
|
pointerEvents: "none",
|
|
13380
13403
|
zIndex: 10,
|
|
13381
13404
|
opacity: tooltipState ? 1 : 0,
|
package/dist/index.mjs
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./chunk-DS5CGU2X.mjs";
|
|
37
37
|
import {
|
|
38
38
|
table_default
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-PX4RCHOE.mjs";
|
|
40
40
|
import "./chunk-MZ76AA76.mjs";
|
|
41
41
|
import {
|
|
42
42
|
skeleton_default
|
|
@@ -57,7 +57,7 @@ import "./chunk-F3HENRVM.mjs";
|
|
|
57
57
|
import "./chunk-4VWG4726.mjs";
|
|
58
58
|
import {
|
|
59
59
|
datePicker_default
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-W66K4FK5.mjs";
|
|
61
61
|
import "./chunk-FWFEKWWD.mjs";
|
|
62
62
|
import {
|
|
63
63
|
day_default
|
|
@@ -101,6 +101,27 @@ import "./chunk-2GCSFWHD.mjs";
|
|
|
101
101
|
import {
|
|
102
102
|
input_default
|
|
103
103
|
} from "./chunk-VNRGOOSY.mjs";
|
|
104
|
+
import "./chunk-3OCNT22V.mjs";
|
|
105
|
+
import {
|
|
106
|
+
areaChart_default
|
|
107
|
+
} from "./chunk-LH6Z7SDZ.mjs";
|
|
108
|
+
import "./chunk-DQRAFUDA.mjs";
|
|
109
|
+
import {
|
|
110
|
+
scrollArea_default
|
|
111
|
+
} from "./chunk-EWS3FESG.mjs";
|
|
112
|
+
import {
|
|
113
|
+
BarChartTooltip,
|
|
114
|
+
barChart_default
|
|
115
|
+
} from "./chunk-JOK735WN.mjs";
|
|
116
|
+
import {
|
|
117
|
+
circularProgress_default
|
|
118
|
+
} from "./chunk-WA7CSZQ3.mjs";
|
|
119
|
+
import {
|
|
120
|
+
radarChart_default
|
|
121
|
+
} from "./chunk-U7SYKG2C.mjs";
|
|
122
|
+
import {
|
|
123
|
+
simpleBarChart_default
|
|
124
|
+
} from "./chunk-GWHUQUKA.mjs";
|
|
104
125
|
import {
|
|
105
126
|
checkbox_default
|
|
106
127
|
} from "./chunk-OEIEALIP.mjs";
|
|
@@ -111,8 +132,11 @@ import {
|
|
|
111
132
|
import "./chunk-KYIODWXL.mjs";
|
|
112
133
|
import {
|
|
113
134
|
breadcrumb_default
|
|
114
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-6DOAZ27E.mjs";
|
|
115
136
|
import "./chunk-MY5U63QO.mjs";
|
|
137
|
+
import {
|
|
138
|
+
text_button_default
|
|
139
|
+
} from "./chunk-4LUASWAN.mjs";
|
|
116
140
|
import {
|
|
117
141
|
button_group_default
|
|
118
142
|
} from "./chunk-5VTYO3RF.mjs";
|
|
@@ -130,30 +154,6 @@ import {
|
|
|
130
154
|
Icon_default,
|
|
131
155
|
iconTemplate
|
|
132
156
|
} from "./chunk-R7KUEH3N.mjs";
|
|
133
|
-
import {
|
|
134
|
-
text_button_default
|
|
135
|
-
} from "./chunk-4LUASWAN.mjs";
|
|
136
|
-
import "./chunk-3OCNT22V.mjs";
|
|
137
|
-
import {
|
|
138
|
-
radarChart_default
|
|
139
|
-
} from "./chunk-U7SYKG2C.mjs";
|
|
140
|
-
import {
|
|
141
|
-
simpleBarChart_default
|
|
142
|
-
} from "./chunk-2LRPY6DW.mjs";
|
|
143
|
-
import {
|
|
144
|
-
areaChart_default
|
|
145
|
-
} from "./chunk-LH6Z7SDZ.mjs";
|
|
146
|
-
import "./chunk-DQRAFUDA.mjs";
|
|
147
|
-
import {
|
|
148
|
-
scrollArea_default
|
|
149
|
-
} from "./chunk-EWS3FESG.mjs";
|
|
150
|
-
import {
|
|
151
|
-
BarChartTooltip,
|
|
152
|
-
barChart_default
|
|
153
|
-
} from "./chunk-5GAHDSWH.mjs";
|
|
154
|
-
import {
|
|
155
|
-
circularProgress_default
|
|
156
|
-
} from "./chunk-WA7CSZQ3.mjs";
|
|
157
157
|
import "./chunk-NMSDSEBD.mjs";
|
|
158
158
|
import {
|
|
159
159
|
accordion_default
|
package/package.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
pagination_default
|
|
4
4
|
} from "./chunk-WLTBJF4I.mjs";
|
|
5
|
-
import {
|
|
6
|
-
checkbox_default
|
|
7
|
-
} from "./chunk-OEIEALIP.mjs";
|
|
8
5
|
import {
|
|
9
6
|
scrollArea_default
|
|
10
7
|
} from "./chunk-EWS3FESG.mjs";
|
|
8
|
+
import {
|
|
9
|
+
checkbox_default
|
|
10
|
+
} from "./chunk-OEIEALIP.mjs";
|
|
11
11
|
import {
|
|
12
12
|
mapPropsVariants
|
|
13
13
|
} from "./chunk-E3G5QXSH.mjs";
|
|
@@ -9,6 +9,9 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
input_default
|
|
11
11
|
} from "./chunk-VNRGOOSY.mjs";
|
|
12
|
+
import {
|
|
13
|
+
text_button_default
|
|
14
|
+
} from "./chunk-4LUASWAN.mjs";
|
|
12
15
|
import {
|
|
13
16
|
button_default
|
|
14
17
|
} from "./chunk-DO56H4BN.mjs";
|
|
@@ -18,9 +21,6 @@ import {
|
|
|
18
21
|
import {
|
|
19
22
|
Icon_default
|
|
20
23
|
} from "./chunk-R7KUEH3N.mjs";
|
|
21
|
-
import {
|
|
22
|
-
text_button_default
|
|
23
|
-
} from "./chunk-4LUASWAN.mjs";
|
|
24
24
|
import {
|
|
25
25
|
mapPropsVariants
|
|
26
26
|
} from "./chunk-E3G5QXSH.mjs";
|