@deepnoid/ui 0.1.123 → 0.1.124

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 (107) hide show
  1. package/.turbo/turbo-build.log +180 -180
  2. package/dist/{chunk-5MINOKNM.mjs → chunk-2GFE25AI.mjs} +1 -1
  3. package/dist/{chunk-4DESGO3D.mjs → chunk-2TDHQLVV.mjs} +1 -1
  4. package/dist/{chunk-XOUAUSP4.mjs → chunk-3HY74IGR.mjs} +1 -1
  5. package/dist/{chunk-H6JGLPPF.mjs → chunk-3U5NJTRH.mjs} +1 -1
  6. package/dist/{chunk-27K5BTEL.mjs → chunk-3ZF7LQOM.mjs} +5 -5
  7. package/dist/{chunk-S7Y7XUBL.mjs → chunk-5XV45JBV.mjs} +1 -1
  8. package/dist/{chunk-VB5NKWJG.mjs → chunk-5XW5QDIW.mjs} +1 -1
  9. package/dist/{chunk-6JLHCQH7.mjs → chunk-6UKNZTOL.mjs} +1 -1
  10. package/dist/{chunk-CDXBML6O.mjs → chunk-76QIZILI.mjs} +6 -3
  11. package/dist/{chunk-NBJHZ4X2.mjs → chunk-BBRPAQON.mjs} +1 -1
  12. package/dist/{chunk-RVFSQFWS.mjs → chunk-C5IJSWWJ.mjs} +4 -4
  13. package/dist/{chunk-I3ADJOUT.mjs → chunk-CVXLLXLE.mjs} +1 -1
  14. package/dist/{chunk-LOYDOCOR.mjs → chunk-F4ORNNYB.mjs} +2 -2
  15. package/dist/{chunk-ITWKPTSD.mjs → chunk-GUTGDPXH.mjs} +1 -1
  16. package/dist/{chunk-3F6OF2QS.mjs → chunk-HKONMHXA.mjs} +1 -1
  17. package/dist/{chunk-ITDBI3X2.mjs → chunk-HO533YTO.mjs} +8 -8
  18. package/dist/chunk-IHLCZM5T.mjs +198 -0
  19. package/dist/{chunk-AF4I7ZQS.mjs → chunk-IW2MDZBW.mjs} +1 -1
  20. package/dist/{chunk-FF56E2UQ.mjs → chunk-J7IIHQNA.mjs} +1 -1
  21. package/dist/{chunk-DD6HAIW3.mjs → chunk-KJ7L6CO6.mjs} +1 -1
  22. package/dist/{chunk-HX64P3XQ.mjs → chunk-KRGI6HW7.mjs} +2 -2
  23. package/dist/{chunk-GZEAMYAO.mjs → chunk-LX7NPKFE.mjs} +1 -1
  24. package/dist/{chunk-2CLPU5LR.mjs → chunk-MCBAEW2Q.mjs} +1 -1
  25. package/dist/{chunk-JGQ5MLQ7.mjs → chunk-OEFILEL3.mjs} +1 -1
  26. package/dist/{chunk-VOKDAIUY.mjs → chunk-OL22LVBG.mjs} +1 -1
  27. package/dist/{chunk-3IILPVRA.mjs → chunk-P3PXIJTU.mjs} +1 -1
  28. package/dist/{chunk-E2LGBO2H.mjs → chunk-QXYGQPY3.mjs} +2 -2
  29. package/dist/{chunk-Q364C3FI.mjs → chunk-SDUDU3CU.mjs} +1 -1
  30. package/dist/{chunk-D6MHTE5L.mjs → chunk-SJNXRXV5.mjs} +1 -1
  31. package/dist/{chunk-DLNGJVFS.mjs → chunk-TSBG5FXL.mjs} +1 -1
  32. package/dist/{chunk-OGJONB7G.mjs → chunk-WNNOVISA.mjs} +1 -1
  33. package/dist/{chunk-AT6GNVOQ.mjs → chunk-WOGNHRNX.mjs} +1 -1
  34. package/dist/{chunk-2IOTRPCS.mjs → chunk-WUGITHV6.mjs} +4 -4
  35. package/dist/{chunk-EKLA6ZR4.mjs → chunk-XL3K55LE.mjs} +1 -1
  36. package/dist/{chunk-VEBJS4SC.mjs → chunk-Y3CGQN3I.mjs} +3 -3
  37. package/dist/{chunk-YBVJFHH6.mjs → chunk-YGOX6FBU.mjs} +1 -1
  38. package/dist/components/accordion/accordion.mjs +2 -2
  39. package/dist/components/accordion/accordionItem.mjs +2 -2
  40. package/dist/components/accordion/index.mjs +3 -3
  41. package/dist/components/avatar/avatar.mjs +2 -2
  42. package/dist/components/avatar/index.mjs +2 -2
  43. package/dist/components/backdrop/backdrop.mjs +2 -2
  44. package/dist/components/backdrop/index.mjs +2 -2
  45. package/dist/components/breadcrumb/breadcrumb.mjs +6 -6
  46. package/dist/components/breadcrumb/index.mjs +6 -6
  47. package/dist/components/button/button-group.mjs +2 -2
  48. package/dist/components/button/button.mjs +2 -2
  49. package/dist/components/button/icon-button.mjs +2 -2
  50. package/dist/components/button/index.mjs +7 -7
  51. package/dist/components/button/text-button.mjs +2 -2
  52. package/dist/components/charts/areaChart.d.mts +5 -0
  53. package/dist/components/charts/areaChart.d.ts +5 -0
  54. package/dist/components/charts/areaChart.js +191 -73
  55. package/dist/components/charts/areaChart.mjs +5 -2
  56. package/dist/components/charts/barChart.mjs +2 -2
  57. package/dist/components/charts/circularProgress.mjs +2 -2
  58. package/dist/components/charts/index.js +225 -105
  59. package/dist/components/charts/index.mjs +10 -7
  60. package/dist/components/charts/radarChart.mjs +2 -2
  61. package/dist/components/checkbox/checkbox.mjs +2 -2
  62. package/dist/components/checkbox/index.mjs +2 -2
  63. package/dist/components/chip/chip.mjs +2 -2
  64. package/dist/components/chip/index.mjs +2 -2
  65. package/dist/components/drawer/drawer.mjs +2 -2
  66. package/dist/components/drawer/index.mjs +2 -2
  67. package/dist/components/fileUpload/fileUpload.mjs +8 -8
  68. package/dist/components/fileUpload/index.mjs +8 -8
  69. package/dist/components/input/index.mjs +2 -2
  70. package/dist/components/input/input.mjs +2 -2
  71. package/dist/components/list/index.mjs +4 -4
  72. package/dist/components/list/list.mjs +2 -2
  73. package/dist/components/list/listItem.mjs +3 -3
  74. package/dist/components/modal/index.mjs +7 -7
  75. package/dist/components/modal/modal.mjs +7 -7
  76. package/dist/components/pagination/index.mjs +3 -3
  77. package/dist/components/pagination/pagination.mjs +3 -3
  78. package/dist/components/picker/datePicker.mjs +8 -8
  79. package/dist/components/picker/day.mjs +2 -2
  80. package/dist/components/picker/index.mjs +13 -13
  81. package/dist/components/picker/timePicker.mjs +3 -3
  82. package/dist/components/progress/index.mjs +2 -2
  83. package/dist/components/progress/progress.mjs +2 -2
  84. package/dist/components/radio/index.mjs +2 -2
  85. package/dist/components/radio/radio.mjs +2 -2
  86. package/dist/components/select/index.mjs +2 -2
  87. package/dist/components/select/select.mjs +2 -2
  88. package/dist/components/table/definition-table.mjs +2 -2
  89. package/dist/components/table/form-table.mjs +1 -1
  90. package/dist/components/table/index.mjs +8 -8
  91. package/dist/components/table/table-body.mjs +7 -7
  92. package/dist/components/table/table-head.mjs +7 -7
  93. package/dist/components/table/table.mjs +7 -7
  94. package/dist/components/tabs/index.mjs +2 -2
  95. package/dist/components/tabs/tabs.mjs +2 -2
  96. package/dist/components/toast/index.mjs +3 -3
  97. package/dist/components/toast/toast.mjs +2 -2
  98. package/dist/components/toast/use-toast.mjs +3 -3
  99. package/dist/components/tooltip/index.mjs +2 -2
  100. package/dist/components/tooltip/tooltip.mjs +2 -2
  101. package/dist/components/tree/index.mjs +2 -2
  102. package/dist/components/tree/tree.mjs +2 -2
  103. package/dist/index.js +112 -69
  104. package/dist/index.mjs +63 -63
  105. package/dist/utils/tailwind-variants.mjs +1 -1
  106. package/package.json +1 -1
  107. package/dist/chunk-QKRCC26D.mjs +0 -155
@@ -1,155 +0,0 @@
1
- "use client";
2
- import {
3
- mapPropsVariants
4
- } from "./chunk-E3G5QXSH.mjs";
5
- import {
6
- tv
7
- } from "./chunk-CDXBML6O.mjs";
8
-
9
- // src/components/charts/areaChart.tsx
10
- import { forwardRef, useMemo, useState, useRef, useEffect, useId } from "react";
11
- import { AreaChart, Area, XAxis, YAxis, ResponsiveContainer, CartesianGrid } from "recharts";
12
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
- var AreaChartComponent = forwardRef((originalProps, ref) => {
14
- const uniqueId = useId();
15
- const [props, variantProps] = mapPropsVariants(originalProps, areaChartStyle.variantKeys);
16
- const { data, label, color = "primary", classNames } = { ...props, ...variantProps };
17
- const slots = useMemo(() => areaChartStyle({ ...variantProps }), [variantProps]);
18
- const COLOR_MAP = {
19
- primary: "#3F9CF2",
20
- danger: "#FF4684"
21
- };
22
- const colorHex = useMemo(() => COLOR_MAP[color], [color]);
23
- const [tickPositions, setTickPositions] = useState([]);
24
- const tickRef = useRef([]);
25
- const CustomTick = ({ x, y, payload }) => {
26
- if (x !== void 0) {
27
- tickRef.current.push(x);
28
- }
29
- return /* @__PURE__ */ jsx(
30
- "text",
31
- {
32
- x,
33
- y: y + 14,
34
- textAnchor: "middle",
35
- fontSize: 12,
36
- fontWeight: 700,
37
- fill: "currentColor",
38
- className: "text-body-foreground",
39
- children: payload.value
40
- }
41
- );
42
- };
43
- useEffect(() => {
44
- const raf = requestAnimationFrame(() => {
45
- const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
46
- const mids = [];
47
- for (let i = 0; i < unique.length - 1; i++) {
48
- mids.push((unique[i] + unique[i + 1]) / 2);
49
- }
50
- setTickPositions(mids);
51
- tickRef.current = [];
52
- });
53
- return () => cancelAnimationFrame(raf);
54
- }, [data]);
55
- const CustomDotWithShadow = (props2) => {
56
- const { cx, cy, fill, stroke } = props2;
57
- if (cx === void 0 || cy === void 0) return null;
58
- return /* @__PURE__ */ jsxs(Fragment, { children: [
59
- /* @__PURE__ */ jsx("circle", { cx, cy, r: 8, fill, opacity: 0.2 }),
60
- /* @__PURE__ */ jsx("circle", { cx, cy, r: 3.5, fill, stroke, strokeWidth: 2 })
61
- ] });
62
- };
63
- return /* @__PURE__ */ jsxs("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
64
- label && /* @__PURE__ */ jsx("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
65
- /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(
66
- AreaChart,
67
- {
68
- data,
69
- margin: { left: -30 },
70
- className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
71
- children: [
72
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: `colorGradient-${uniqueId}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
73
- /* @__PURE__ */ jsx("stop", { offset: "5%", stopColor: colorHex, stopOpacity: 0.3 }),
74
- /* @__PURE__ */ jsx("stop", { offset: "95%", stopColor: colorHex, stopOpacity: 0 })
75
- ] }) }),
76
- /* @__PURE__ */ jsx(
77
- CartesianGrid,
78
- {
79
- vertical: true,
80
- horizontal: false,
81
- strokeDasharray: "3 3",
82
- className: "stroke-neutral-light",
83
- verticalPoints: tickPositions
84
- }
85
- ),
86
- /* @__PURE__ */ jsx(
87
- XAxis,
88
- {
89
- dataKey: "name",
90
- axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
91
- tickLine: false,
92
- tick: CustomTick,
93
- padding: { left: 35.5, right: 35.5 }
94
- }
95
- ),
96
- /* @__PURE__ */ jsx(
97
- YAxis,
98
- {
99
- axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
100
- tickLine: false,
101
- tick: {
102
- fontSize: 12,
103
- fontWeight: 700,
104
- fill: "text-body-foreground",
105
- textAnchor: "middle",
106
- dx: -10
107
- },
108
- ticks: [0, 20, 40, 60, 80, 100],
109
- domain: [-6, 110]
110
- }
111
- ),
112
- /* @__PURE__ */ jsx(
113
- Area,
114
- {
115
- type: "monotone",
116
- dataKey: "value",
117
- stroke: colorHex,
118
- strokeWidth: 2,
119
- fill: `url(#colorGradient-${uniqueId})`,
120
- dot: /* @__PURE__ */ jsx(CustomDotWithShadow, { stroke: colorHex, fill: colorHex }),
121
- activeDot: { r: 7, fill: colorHex }
122
- }
123
- )
124
- ]
125
- }
126
- ) })
127
- ] });
128
- });
129
- AreaChartComponent.displayName = "AreaChart";
130
- var areaChart_default = AreaChartComponent;
131
- var areaChartStyle = tv({
132
- slots: {
133
- base: ["flex", "flex-col", "gap-[10px]", "select-none"],
134
- color: [],
135
- axis: ["text-sm", "font-bold", "text-center", "text-body-foreground"],
136
- label: ["text-md", "font-bold", "text-body-foreground"]
137
- },
138
- variants: {
139
- color: {
140
- primary: {
141
- color: ["text-primary-main"]
142
- },
143
- danger: {
144
- color: ["text-danger-main"]
145
- }
146
- }
147
- },
148
- defaultVariants: {
149
- color: "primary"
150
- }
151
- });
152
-
153
- export {
154
- areaChart_default
155
- };