@clasing/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.
- package/dist/badge-BnerQ2lF.js +85 -0
- package/dist/badge-Czof3oqL.cjs +1 -0
- package/dist/button-Cegl49Yi.cjs +1 -0
- package/dist/button-DddHyyHa.js +504 -0
- package/dist/calendar-BAQkzm4v.js +117 -0
- package/dist/calendar-DL8gqdRp.cjs +1 -0
- package/dist/card-BCgtou88.cjs +1 -0
- package/dist/card-BfBXE5Kq.js +90 -0
- package/dist/chip-A32aAc-8.cjs +1 -0
- package/dist/chip-ZZHZ8i1Q.js +127 -0
- package/dist/command-BGCSJ9vX.js +506 -0
- package/dist/command-D9M8dk1M.cjs +1 -0
- package/dist/components/accordion.cjs.js +1 -0
- package/dist/components/accordion.es.js +70 -0
- package/dist/components/alert-dialog.cjs.js +1 -0
- package/dist/components/alert-dialog.es.js +146 -0
- package/dist/components/alert.cjs.js +1 -0
- package/dist/components/alert.es.js +97 -0
- package/dist/components/avatar.cjs.js +1 -0
- package/dist/components/avatar.es.js +53 -0
- package/dist/components/badge.cjs.js +1 -0
- package/dist/components/badge.es.js +4 -0
- package/dist/components/blocks/date-picker.cjs.js +1 -0
- package/dist/components/blocks/date-picker.es.js +181 -0
- package/dist/components/blocks/date-range-picker.cjs.js +1 -0
- package/dist/components/blocks/date-range-picker.es.js +238 -0
- package/dist/components/blocks/interactive-card.cjs.js +1 -0
- package/dist/components/blocks/interactive-card.es.js +138 -0
- package/dist/components/blocks/selectable-chips.cjs.js +1 -0
- package/dist/components/blocks/selectable-chips.es.js +57 -0
- package/dist/components/breadcrumb.cjs.js +1 -0
- package/dist/components/breadcrumb.es.js +106 -0
- package/dist/components/button.cjs.js +1 -0
- package/dist/components/button.es.js +7 -0
- package/dist/components/calendar.cjs.js +1 -0
- package/dist/components/calendar.es.js +4 -0
- package/dist/components/card.cjs.js +1 -0
- package/dist/components/card.es.js +10 -0
- package/dist/components/chart.cjs.js +7 -0
- package/dist/components/chart.es.js +213 -0
- package/dist/components/checkbox.cjs.js +1 -0
- package/dist/components/checkbox.es.js +31 -0
- package/dist/components/chip.cjs.js +1 -0
- package/dist/components/chip.es.js +5 -0
- package/dist/components/collapsible.cjs.js +1 -0
- package/dist/components/collapsible.es.js +34 -0
- package/dist/components/command.cjs.js +1 -0
- package/dist/components/command.es.js +12 -0
- package/dist/components/context-menu.cjs.js +1 -0
- package/dist/components/context-menu.es.js +229 -0
- package/dist/components/dialog.cjs.js +1 -0
- package/dist/components/dialog.es.js +13 -0
- package/dist/components/divider.cjs.js +1 -0
- package/dist/components/divider.es.js +21 -0
- package/dist/components/drawer.cjs.js +3 -0
- package/dist/components/drawer.es.js +1161 -0
- package/dist/components/dropdown-menu.cjs.js +1 -0
- package/dist/components/dropdown-menu.es.js +237 -0
- package/dist/components/hover-card.cjs.js +1 -0
- package/dist/components/hover-card.es.js +38 -0
- package/dist/components/icon-component.cjs.js +1 -0
- package/dist/components/icon-component.es.js +4 -0
- package/dist/components/input-otp.cjs.js +20 -0
- package/dist/components/input-otp.es.js +253 -0
- package/dist/components/input.cjs.js +1 -0
- package/dist/components/input.es.js +4 -0
- package/dist/components/label.cjs.js +1 -0
- package/dist/components/label.es.js +4 -0
- package/dist/components/menubar.cjs.js +1 -0
- package/dist/components/menubar.es.js +257 -0
- package/dist/components/multi-select.cjs.js +1 -0
- package/dist/components/multi-select.es.js +233 -0
- package/dist/components/navigation-menu.cjs.js +1 -0
- package/dist/components/navigation-menu.es.js +171 -0
- package/dist/components/phone-input.cjs.js +1 -0
- package/dist/components/phone-input.es.js +253 -0
- package/dist/components/popover.cjs.js +1 -0
- package/dist/components/popover.es.js +7 -0
- package/dist/components/progress.cjs.js +1 -0
- package/dist/components/progress.es.js +31 -0
- package/dist/components/resizable.cjs.js +1 -0
- package/dist/components/resizable.es.js +1551 -0
- package/dist/components/scroll-area.cjs.js +1 -0
- package/dist/components/scroll-area.es.js +5 -0
- package/dist/components/select.cjs.js +1 -0
- package/dist/components/select.es.js +179 -0
- package/dist/components/sheet.cjs.js +1 -0
- package/dist/components/sheet.es.js +126 -0
- package/dist/components/skeleton.cjs.js +1 -0
- package/dist/components/skeleton.es.js +15 -0
- package/dist/components/slider.cjs.js +1 -0
- package/dist/components/slider.es.js +63 -0
- package/dist/components/sonner.cjs.js +1 -0
- package/dist/components/sonner.es.js +68 -0
- package/dist/components/switch.cjs.js +1 -0
- package/dist/components/switch.es.js +82 -0
- package/dist/components/table.cjs.js +1 -0
- package/dist/components/table.es.js +114 -0
- package/dist/components/toggle-group.cjs.js +1 -0
- package/dist/components/toggle-group.es.js +62 -0
- package/dist/components/toggle.cjs.js +1 -0
- package/dist/components/toggle.es.js +5 -0
- package/dist/components/tooltip.cjs.js +1 -0
- package/dist/components/tooltip.es.js +7 -0
- package/dist/dialog-BKm2PZl2.cjs +1 -0
- package/dist/dialog-DZpF7OXg.js +136 -0
- package/dist/hooks/useOutsideClick.cjs.js +1 -0
- package/dist/hooks/useOutsideClick.es.js +14 -0
- package/dist/icon-component-BZ-4FDV6.js +49 -0
- package/dist/icon-component-LY_vGYHZ.cjs +1 -0
- package/dist/index-BqtVL8d-.js +34 -0
- package/dist/index-C8P6Mn4U.cjs +1 -0
- package/dist/index-CRiPKpXj.js +2743 -0
- package/dist/index-DoxiiusW.cjs +1 -0
- package/dist/input-DFPJ_mtM.cjs +1 -0
- package/dist/input-DwPDvbRE.js +174 -0
- package/dist/jsx-runtime-C5mzlN2N.js +284 -0
- package/dist/jsx-runtime-DUiatUiq.cjs +22 -0
- package/dist/label-BpDUqtrC.js +22 -0
- package/dist/label-CbzkBbPT.cjs +1 -0
- package/dist/popover-B8wp2cHF.cjs +1 -0
- package/dist/popover-BoDRCUh2.js +44 -0
- package/dist/scroll-area-CNsThIs_.js +60 -0
- package/dist/scroll-area-Dr-7opp_.cjs +1 -0
- package/dist/style-BNIXVvBA.js +1172 -0
- package/dist/style-CA5976Oh.cjs +1 -0
- package/dist/toggle-Dgd7L2Mq.cjs +1 -0
- package/dist/toggle-DjbiWYXD.js +44 -0
- package/dist/tooltip-Btr9ROSo.js +55 -0
- package/dist/tooltip-W9iE1O--.cjs +1 -0
- package/dist/ui.css +427 -16
- package/dist/utils/types.cjs.js +1 -0
- package/dist/utils/types.es.js +1 -0
- package/package.json +299 -37
- package/dist/index.d.ts +0 -566
- package/dist/index.es.js +0 -7538
- package/dist/index.umd.js +0 -22
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { j as e } from "../../jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { L as z } from "../../label-BpDUqtrC.js";
|
|
3
|
+
import { c, a as D } from "../../index-CRiPKpXj.js";
|
|
4
|
+
import { c as $ } from "../../index-BqtVL8d-.js";
|
|
5
|
+
import { format as a } from "date-fns";
|
|
6
|
+
import { forwardRef as I, useState as L, useEffect as T } from "react";
|
|
7
|
+
import { DayPicker as B } from "react-day-picker";
|
|
8
|
+
import { e as E, a as G, f as q, b as U } from "../../style-BNIXVvBA.js";
|
|
9
|
+
import { I as y } from "../../icon-component-BZ-4FDV6.js";
|
|
10
|
+
import { P as V, c as F, b as O } from "../../popover-BoDRCUh2.js";
|
|
11
|
+
const A = $(
|
|
12
|
+
"border-neutral-050 focus-visible:ring-ring-default lg:hover:bg-neutral-000 flex w-full items-center gap-2 border-[0.5px] bg-white text-base whitespace-pre-wrap focus-visible:ring-[1.5px] focus-visible:ring-offset-1 focus-visible:outline-hidden disabled:border-neutral-100 disabled:bg-neutral-100 disabled:text-neutral-700 lg:disabled:hover:bg-neutral-100",
|
|
13
|
+
{
|
|
14
|
+
variants: {
|
|
15
|
+
size: {
|
|
16
|
+
sm: "text-label-md h-8 rounded-sm px-2 py-1",
|
|
17
|
+
md: "text-label-lg h-12 rounded-md px-3 py-1",
|
|
18
|
+
lg: "text-label-xl h-16 rounded-lg px-4 py-2"
|
|
19
|
+
},
|
|
20
|
+
rounded: {
|
|
21
|
+
default: "",
|
|
22
|
+
full: "rounded-full"
|
|
23
|
+
},
|
|
24
|
+
state: {
|
|
25
|
+
default: "",
|
|
26
|
+
selected: "bg-blue-050 focus:blue-800 border-blue-800 font-semibold text-blue-800 active:border-blue-800 lg:hover:bg-blue-100",
|
|
27
|
+
error: "border-error-main"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
size: "md",
|
|
32
|
+
rounded: "default",
|
|
33
|
+
state: "default"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
), H = ({ onChange: d, value: r, options: f }) => /* @__PURE__ */ e.jsx(
|
|
37
|
+
"select",
|
|
38
|
+
{
|
|
39
|
+
className: "text-md focus-visible:ring-ring-default h-fit w-fit! cursor-pointer appearance-none rounded-md border-none pr-9 pl-1 font-semibold transition-colors focus:border-0 focus:border-transparent focus:ring-0 focus:ring-transparent focus:outline-hidden focus-visible:ring-[1.5px] focus-visible:ring-offset-1 focus-visible:outline-hidden",
|
|
40
|
+
onChange: d,
|
|
41
|
+
value: r,
|
|
42
|
+
children: f?.map((n, m) => {
|
|
43
|
+
const g = n.value === r;
|
|
44
|
+
return /* @__PURE__ */ e.jsx(
|
|
45
|
+
"option",
|
|
46
|
+
{
|
|
47
|
+
value: n.value,
|
|
48
|
+
disabled: n.disabled,
|
|
49
|
+
className: c("disabled:hidden", {
|
|
50
|
+
"bg-blue-050 font-semibold text-blue-800": g
|
|
51
|
+
}),
|
|
52
|
+
children: n.label
|
|
53
|
+
},
|
|
54
|
+
m
|
|
55
|
+
);
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
), J = ({
|
|
59
|
+
orientation: d = "down",
|
|
60
|
+
size: r = 16
|
|
61
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
62
|
+
y,
|
|
63
|
+
{
|
|
64
|
+
iconName: d === "left" ? "IconChevronLeft" : "IconChevronRight",
|
|
65
|
+
stroke: "1.5",
|
|
66
|
+
size: r
|
|
67
|
+
}
|
|
68
|
+
), K = I(
|
|
69
|
+
({
|
|
70
|
+
className: d,
|
|
71
|
+
locale: r = "enGB",
|
|
72
|
+
placeholder: f,
|
|
73
|
+
label: n,
|
|
74
|
+
size: m = "md",
|
|
75
|
+
rounded: g = "default",
|
|
76
|
+
disabledDates: j,
|
|
77
|
+
helperText: N,
|
|
78
|
+
side: P = "bottom",
|
|
79
|
+
align: C = "center",
|
|
80
|
+
error: b,
|
|
81
|
+
touched: x,
|
|
82
|
+
startDate: s,
|
|
83
|
+
endDate: i,
|
|
84
|
+
calendarDropdowns: M = !0,
|
|
85
|
+
onChange: w,
|
|
86
|
+
minDate: R,
|
|
87
|
+
maxDate: S,
|
|
88
|
+
disabled: p = !1,
|
|
89
|
+
...u
|
|
90
|
+
}, _) => {
|
|
91
|
+
const [t, h] = L({
|
|
92
|
+
from: s ? new Date(s) : void 0,
|
|
93
|
+
to: i ? new Date(i) : void 0
|
|
94
|
+
}), k = (o) => {
|
|
95
|
+
if (h(o), w) {
|
|
96
|
+
const l = {
|
|
97
|
+
from: o.from ? a(o.from, "yyyy-MM-dd") : "",
|
|
98
|
+
to: o.to ? a(o.to, "yyyy-MM-dd") : ""
|
|
99
|
+
};
|
|
100
|
+
w({
|
|
101
|
+
target: {
|
|
102
|
+
name: u.name,
|
|
103
|
+
value: l
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
T(() => {
|
|
109
|
+
if (s) {
|
|
110
|
+
const o = new Date(s);
|
|
111
|
+
isNaN(o.getTime()) || h((l) => ({ ...l, from: o }));
|
|
112
|
+
}
|
|
113
|
+
if (i) {
|
|
114
|
+
const o = new Date(i);
|
|
115
|
+
isNaN(o.getTime()) || h((l) => ({ ...l, to: o }));
|
|
116
|
+
}
|
|
117
|
+
}, [s, i]);
|
|
118
|
+
const v = r === "enGB" ? E : r === "enUS" ? G : r === "fr" ? q : U;
|
|
119
|
+
return /* @__PURE__ */ e.jsxs(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
ref: _,
|
|
123
|
+
className: c("flex flex-col gap-3", d),
|
|
124
|
+
...u,
|
|
125
|
+
children: [
|
|
126
|
+
n && /* @__PURE__ */ e.jsx(
|
|
127
|
+
z,
|
|
128
|
+
{
|
|
129
|
+
htmlFor: u.id,
|
|
130
|
+
className: c({ "text-neutral-700": p }),
|
|
131
|
+
children: n
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ e.jsxs(V, { children: [
|
|
135
|
+
/* @__PURE__ */ e.jsx(F, { children: /* @__PURE__ */ e.jsxs(
|
|
136
|
+
"button",
|
|
137
|
+
{
|
|
138
|
+
type: "button",
|
|
139
|
+
className: c(
|
|
140
|
+
A({
|
|
141
|
+
size: m,
|
|
142
|
+
rounded: g,
|
|
143
|
+
state: t.from && t.to || x && !b ? "selected" : b && x ? "error" : "default"
|
|
144
|
+
}),
|
|
145
|
+
{
|
|
146
|
+
"text-neutral-800": !t.from && !t.to
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
disabled: p,
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ e.jsx(
|
|
152
|
+
y,
|
|
153
|
+
{
|
|
154
|
+
iconName: "IconCalendar",
|
|
155
|
+
size: 20,
|
|
156
|
+
className: "pointer-events-none"
|
|
157
|
+
}
|
|
158
|
+
),
|
|
159
|
+
t.from && t.to ? `${a(t.from, "PPP", { locale: v })} - ${a(t.to, "PPP", { locale: v })}` : f || "Select a date range",
|
|
160
|
+
/* @__PURE__ */ e.jsx(
|
|
161
|
+
"input",
|
|
162
|
+
{
|
|
163
|
+
hidden: !0,
|
|
164
|
+
onChange: () => null,
|
|
165
|
+
value: t.from && t.to ? `${a(t.from, "yyyy-MM-dd")} to ${a(t.to, "yyyy-MM-dd")}` : `${s || ""} to ${i || ""}`
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
) }),
|
|
171
|
+
/* @__PURE__ */ e.jsx(O, { side: P, align: C, children: /* @__PURE__ */ e.jsx(
|
|
172
|
+
B,
|
|
173
|
+
{
|
|
174
|
+
mode: "range",
|
|
175
|
+
captionLayout: M ? "dropdown" : "label",
|
|
176
|
+
selected: t,
|
|
177
|
+
onSelect: k,
|
|
178
|
+
locale: v,
|
|
179
|
+
startMonth: R || new Date(1900, 0, 1),
|
|
180
|
+
endMonth: S || new Date(2100, 11, 31),
|
|
181
|
+
showOutsideDays: !0,
|
|
182
|
+
disabled: j,
|
|
183
|
+
className: "p-2",
|
|
184
|
+
required: !0,
|
|
185
|
+
classNames: {
|
|
186
|
+
root: "w-fit text-sm text-center",
|
|
187
|
+
weekday: "text-muted-foreground font-regular",
|
|
188
|
+
month_grid: "border-separate",
|
|
189
|
+
month_caption: "h-9 relative flex items-center w-full",
|
|
190
|
+
dropdowns: "absolute w-fit items-center justify-center z-10 left-1/2 flex -translate-x-1/2 top-1/2 -translate-y-1/2",
|
|
191
|
+
button_next: "rounded-2xl border-none lg:hover:bg-neutral-050 transition-colors z-1 p-2 disabled:opacity-50 focus-visible:ring-ring-default focus-visible:outline-hidden focus-visible:ring-[1.5px] focus-visible:ring-offset-1",
|
|
192
|
+
button_previous: "rounded-2xl border-none lg:hover:bg-neutral-050 transition-colors z-1 p-2 disabled:opacity-50 focus-visible:ring-ring-default focus-visible:outline-hidden focus-visible:ring-[1.5px] focus-visible:ring-offset-1",
|
|
193
|
+
nav: "w-full h-9 top-0 left-0 absolute flex justify-between items-center gap-2",
|
|
194
|
+
selected: "bg-blue-800 text-white border-[0.5px] border-blue-800! lg:hover:bg-blue-900 transition-colors font-semibold",
|
|
195
|
+
today: "bg-blue-050 border-[0.5px] text-blue-800 lg:hover:bg-blue-100",
|
|
196
|
+
outside: "bg-white text-neutral-200 border-[0.5px] border-neutral-000",
|
|
197
|
+
day_button: "text-sm h-9 w-9 whitespace-nowrap border-none focus-visible:ring-ring-default focus-visible:outline-hidden focus-visible:ring-[1.5px] rounded-2xl",
|
|
198
|
+
caption_label: "text-neutral-1000 text-base font-semibold leading-none self-center w-full",
|
|
199
|
+
disabled: "bg-white text-neutral-200 border-[0.5px] border-neutral-000 lg:hover:bg-white!",
|
|
200
|
+
day: "h-9 w-9 aspect-square text-sm rounded-2xl border-[0.5px] border-neutral-050 lg:hover:bg-blue-050 transition-colors p-0 whitespace-nowrap",
|
|
201
|
+
range_end: "bg-blue-800 text-white border-[0.5px] border-blue-800! lg:hover:bg-blue-900 transition-colors font-semibold",
|
|
202
|
+
range_start: "bg-blue-800 text-white border-[0.5px] border-blue-800! lg:hover:bg-blue-900 transition-colors font-semibold",
|
|
203
|
+
range_middle: "bg-blue-050! border-[0.5px] border-blue-800! text-blue-800! lg:hover:bg-blue-100 transition-colors font-semibold"
|
|
204
|
+
},
|
|
205
|
+
components: {
|
|
206
|
+
Dropdown: H,
|
|
207
|
+
Chevron: ({ orientation: o, size: l }) => /* @__PURE__ */ e.jsx(J, { orientation: o, size: l })
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
) })
|
|
211
|
+
] }),
|
|
212
|
+
b && x ? /* @__PURE__ */ e.jsx(
|
|
213
|
+
"span",
|
|
214
|
+
{
|
|
215
|
+
"aria-describedby": u.id,
|
|
216
|
+
"aria-invalid": "true",
|
|
217
|
+
className: "text-error-main text-label-md -mt-1",
|
|
218
|
+
children: b
|
|
219
|
+
}
|
|
220
|
+
) : /* @__PURE__ */ e.jsx(
|
|
221
|
+
"span",
|
|
222
|
+
{
|
|
223
|
+
className: D("text-muted-foreground -mt-1", {
|
|
224
|
+
"text-neutral-700": p
|
|
225
|
+
}),
|
|
226
|
+
"aria-describedby": u.id,
|
|
227
|
+
children: N
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
), Q = K;
|
|
235
|
+
Q.displayName = "DateRangePicker";
|
|
236
|
+
export {
|
|
237
|
+
Q as DateRangePicker
|
|
238
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-DUiatUiq.cjs"),I=require("../../badge-Czof3oqL.cjs"),i=require("../../card-BCgtou88.cjs"),j=require("../../icon-component-LY_vGYHZ.cjs"),u=require("../../tooltip-W9iE1O--.cjs"),n=require("../../index-DoxiiusW.cjs"),q=require("../../index-C8P6Mn4U.cjs"),w=require("react"),y=q.cva("focus-visible:border-ring focus-visible:ring-ring/50 transition-[color,box-shadow] focus-visible:ring-[3px]"),g=w.forwardRef(({className:h,isActive:s,title:m,text:d,helperText:p,badgeText:l,disabled:r,badgeVariant:f,badgeSize:R="xs",iconName:o,iconText:a,tooltipIconName:b="IconHelpCircleFilled",tooltipText:t,tooltipTitle:x,tooltipSide:C,tooltipSideOffset:E,tooltipAlign:N,...c},v)=>e.jsxRuntimeExports.jsxs(i.Card,{ref:v,className:n.cn(y({className:h}),{"bg-blue-050 border-blue-950":s,"border-neutral-100 bg-neutral-100":r,"cursor-pointer lg:active:bg-blue-100":c.onClick&&s&&!r,"lg:active:bg-blue-050 cursor-pointer":c.onClick&&!s&&!r}),role:"button",tabIndex:0,...c,children:[l||o||a?e.jsxRuntimeExports.jsxs(i.CardHeader,{className:"flex items-center justify-between gap-2",children:[o||a?e.jsxRuntimeExports.jsx("div",{className:n.cn("rounded-full p-1",{"bg-neutral-000 text-muted-foreground":!s,"bg-white text-blue-800":s,"bg-white text-neutral-700":r}),children:e.jsxRuntimeExports.jsx(j.IconComponent,{iconName:o,iconText:a,size:20})}):null,(l||t)&&e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[l?e.jsxRuntimeExports.jsx(I.Badge,{variant:f,size:R,weight:"semibold",className:n.cn({"opacity-50":r}),children:l}):null,t&&e.jsxRuntimeExports.jsxs(u.Tooltip,{children:[e.jsxRuntimeExports.jsx(u.TooltipTrigger,{children:e.jsxRuntimeExports.jsx(j.IconComponent,{iconName:b??"IconHelpCircleFilled",size:20,className:"z-10 min-h-5 min-w-5"})}),e.jsxRuntimeExports.jsx(u.TooltipContent,{side:C,sideOffset:E,align:N,children:x||t&&e.jsxRuntimeExports.jsxs("div",{className:"text-neutral-1000 flex flex-col gap-1",children:[x&&e.jsxRuntimeExports.jsx("p",{className:"text-paragraph-md font-semibold",children:x}),t&&e.jsxRuntimeExports.jsx("p",{className:"text-paragraph-md",children:t})]})})]})]})]}):null,e.jsxRuntimeExports.jsxs(i.CardContent,{className:"flex flex-col gap-1",children:[m?e.jsxRuntimeExports.jsx("p",{className:n.cn("text-foreground text-label-xl font-semibold",{"text-neutral-700":r}),children:m}):null,d?e.jsxRuntimeExports.jsx("p",{className:n.cn("text-muted-foreground text-paragraph-md",{"text-neutral-700":r}),children:d}):null]}),p?e.jsxRuntimeExports.jsx(i.CardFooter,{children:e.jsxRuntimeExports.jsx("p",{className:n.cn("text-paragraph-sm text-neutral-800",{"text-neutral-700":r}),children:p})}):null]}));g.displayName="InteractiveCard";const z=g;exports.InteractiveCard=z;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { j as e } from "../../jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { B as I } from "../../badge-BnerQ2lF.js";
|
|
3
|
+
import { C as w, e as y, b as z, d as F } from "../../card-BfBXE5Kq.js";
|
|
4
|
+
import { I as x } from "../../icon-component-BZ-4FDV6.js";
|
|
5
|
+
import { T as H, c as k, a as B } from "../../tooltip-Btr9ROSo.js";
|
|
6
|
+
import { c as a } from "../../index-CRiPKpXj.js";
|
|
7
|
+
import { c as R } from "../../index-BqtVL8d-.js";
|
|
8
|
+
import { forwardRef as E } from "react";
|
|
9
|
+
const O = R(
|
|
10
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 transition-[color,box-shadow] focus-visible:ring-[3px]"
|
|
11
|
+
), p = E(
|
|
12
|
+
({
|
|
13
|
+
className: f,
|
|
14
|
+
isActive: s,
|
|
15
|
+
title: m,
|
|
16
|
+
text: d,
|
|
17
|
+
helperText: u,
|
|
18
|
+
badgeText: n,
|
|
19
|
+
disabled: r,
|
|
20
|
+
badgeVariant: g,
|
|
21
|
+
badgeSize: h = "xs",
|
|
22
|
+
iconName: t,
|
|
23
|
+
iconText: o,
|
|
24
|
+
tooltipIconName: j = "IconHelpCircleFilled",
|
|
25
|
+
tooltipText: l,
|
|
26
|
+
tooltipTitle: c,
|
|
27
|
+
tooltipSide: b,
|
|
28
|
+
tooltipSideOffset: C,
|
|
29
|
+
tooltipAlign: N,
|
|
30
|
+
...i
|
|
31
|
+
}, v) => /* @__PURE__ */ e.jsxs(
|
|
32
|
+
w,
|
|
33
|
+
{
|
|
34
|
+
ref: v,
|
|
35
|
+
className: a(O({ className: f }), {
|
|
36
|
+
"bg-blue-050 border-blue-950": s,
|
|
37
|
+
"border-neutral-100 bg-neutral-100": r,
|
|
38
|
+
"cursor-pointer lg:active:bg-blue-100": i.onClick && s && !r,
|
|
39
|
+
"lg:active:bg-blue-050 cursor-pointer": i.onClick && !s && !r
|
|
40
|
+
}),
|
|
41
|
+
role: "button",
|
|
42
|
+
tabIndex: 0,
|
|
43
|
+
...i,
|
|
44
|
+
children: [
|
|
45
|
+
n || t || o ? /* @__PURE__ */ e.jsxs(y, { className: "flex items-center justify-between gap-2", children: [
|
|
46
|
+
t || o ? /* @__PURE__ */ e.jsx(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
className: a("rounded-full p-1", {
|
|
50
|
+
"bg-neutral-000 text-muted-foreground": !s,
|
|
51
|
+
"bg-white text-blue-800": s,
|
|
52
|
+
"bg-white text-neutral-700": r
|
|
53
|
+
}),
|
|
54
|
+
children: /* @__PURE__ */ e.jsx(
|
|
55
|
+
x,
|
|
56
|
+
{
|
|
57
|
+
iconName: t,
|
|
58
|
+
iconText: o,
|
|
59
|
+
size: 20
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
) : null,
|
|
64
|
+
(n || l) && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
65
|
+
n ? /* @__PURE__ */ e.jsx(
|
|
66
|
+
I,
|
|
67
|
+
{
|
|
68
|
+
variant: g,
|
|
69
|
+
size: h,
|
|
70
|
+
weight: "semibold",
|
|
71
|
+
className: a({
|
|
72
|
+
"opacity-50": r
|
|
73
|
+
}),
|
|
74
|
+
children: n
|
|
75
|
+
}
|
|
76
|
+
) : null,
|
|
77
|
+
l && /* @__PURE__ */ e.jsxs(H, { children: [
|
|
78
|
+
/* @__PURE__ */ e.jsx(k, { children: /* @__PURE__ */ e.jsx(
|
|
79
|
+
x,
|
|
80
|
+
{
|
|
81
|
+
iconName: j ?? "IconHelpCircleFilled",
|
|
82
|
+
size: 20,
|
|
83
|
+
className: "z-10 min-h-5 min-w-5"
|
|
84
|
+
}
|
|
85
|
+
) }),
|
|
86
|
+
/* @__PURE__ */ e.jsx(
|
|
87
|
+
B,
|
|
88
|
+
{
|
|
89
|
+
side: b,
|
|
90
|
+
sideOffset: C,
|
|
91
|
+
align: N,
|
|
92
|
+
children: c || l && /* @__PURE__ */ e.jsxs("div", { className: "text-neutral-1000 flex flex-col gap-1", children: [
|
|
93
|
+
c && /* @__PURE__ */ e.jsx("p", { className: "text-paragraph-md font-semibold", children: c }),
|
|
94
|
+
l && /* @__PURE__ */ e.jsx("p", { className: "text-paragraph-md", children: l })
|
|
95
|
+
] })
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] })
|
|
99
|
+
] })
|
|
100
|
+
] }) : null,
|
|
101
|
+
/* @__PURE__ */ e.jsxs(z, { className: "flex flex-col gap-1", children: [
|
|
102
|
+
m ? /* @__PURE__ */ e.jsx(
|
|
103
|
+
"p",
|
|
104
|
+
{
|
|
105
|
+
className: a("text-foreground text-label-xl font-semibold", {
|
|
106
|
+
"text-neutral-700": r
|
|
107
|
+
}),
|
|
108
|
+
children: m
|
|
109
|
+
}
|
|
110
|
+
) : null,
|
|
111
|
+
d ? /* @__PURE__ */ e.jsx(
|
|
112
|
+
"p",
|
|
113
|
+
{
|
|
114
|
+
className: a("text-muted-foreground text-paragraph-md", {
|
|
115
|
+
"text-neutral-700": r
|
|
116
|
+
}),
|
|
117
|
+
children: d
|
|
118
|
+
}
|
|
119
|
+
) : null
|
|
120
|
+
] }),
|
|
121
|
+
u ? /* @__PURE__ */ e.jsx(F, { children: /* @__PURE__ */ e.jsx(
|
|
122
|
+
"p",
|
|
123
|
+
{
|
|
124
|
+
className: a("text-paragraph-sm text-neutral-800", {
|
|
125
|
+
"text-neutral-700": r
|
|
126
|
+
}),
|
|
127
|
+
children: u
|
|
128
|
+
}
|
|
129
|
+
) }) : null
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
);
|
|
134
|
+
p.displayName = "InteractiveCard";
|
|
135
|
+
const P = p;
|
|
136
|
+
export {
|
|
137
|
+
P as InteractiveCard
|
|
138
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../jsx-runtime-DUiatUiq.cjs"),p=require("../../chip-A32aAc-8.cjs"),y=require("../../label-CbzkBbPT.cjs"),x=require("../../index-DoxiiusW.cjs"),R=({id:d,label:u,options:i,multiple:m=!1,selectedOptions:a,setSelectedOptions:j,className:v,disabled:c,helperText:h,error:s,touched:r})=>{const n=a,f=e=>{if(!m)return j(e.value),e.value;let l=[];return l=Array.isArray(n)?n.includes(e.value)?n.filter(S=>S!==e.value):[...n,e.value]:[e.value],j(l),l},b=e=>m&&Array.isArray(a)?a.includes(e.value):a===e.value;return i.length===0?null:t.jsxRuntimeExports.jsxs("div",{className:x.cn("flex flex-col gap-3",v),children:[u&&t.jsxRuntimeExports.jsx(y.Label,{htmlFor:d,className:x.cn({"text-neutral-700":c}),children:u}),t.jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-2",children:i.map(e=>{const l=b(e);return t.jsxRuntimeExports.jsx(p.ChipComponent,{intent:l?"selected":"unselected",iconLeft:l?"IconCheck":void 0,onClick:()=>f(e),className:"py-1",disabled:c,children:e.label},e.label)})}),s&&r?t.jsxRuntimeExports.jsx("span",{className:"text-error-main text-label-md -mt-1",children:s}):t.jsxRuntimeExports.jsx("span",{className:x.clsx("text-label-md -mt-1",{"text-neutral-1000":!s&&!r,"text-error-main":s&&r,"text-success-main":r&&!s,"text-neutral-700":c}),children:h})]})};exports.SelectableChips=R;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { j as l } from "../../jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { C as y } from "../../chip-ZZHZ8i1Q.js";
|
|
3
|
+
import { L as S } from "../../label-BpDUqtrC.js";
|
|
4
|
+
import { c as f, a as p } from "../../index-CRiPKpXj.js";
|
|
5
|
+
const k = ({
|
|
6
|
+
id: v,
|
|
7
|
+
label: m,
|
|
8
|
+
options: x,
|
|
9
|
+
multiple: u = !1,
|
|
10
|
+
selectedOptions: r,
|
|
11
|
+
setSelectedOptions: i,
|
|
12
|
+
className: d,
|
|
13
|
+
disabled: n,
|
|
14
|
+
helperText: h,
|
|
15
|
+
error: s,
|
|
16
|
+
touched: t
|
|
17
|
+
}) => {
|
|
18
|
+
const c = r, j = (e) => {
|
|
19
|
+
if (!u)
|
|
20
|
+
return i(e.value), e.value;
|
|
21
|
+
let a = [];
|
|
22
|
+
return a = Array.isArray(c) ? c.includes(e.value) ? c.filter((N) => N !== e.value) : [...c, e.value] : [e.value], i(a), a;
|
|
23
|
+
}, C = (e) => u && Array.isArray(r) ? r.includes(e.value) : r === e.value;
|
|
24
|
+
return x.length === 0 ? null : /* @__PURE__ */ l.jsxs("div", { className: f("flex flex-col gap-3", d), children: [
|
|
25
|
+
m && /* @__PURE__ */ l.jsx(S, { htmlFor: v, className: f({ "text-neutral-700": n }), children: m }),
|
|
26
|
+
/* @__PURE__ */ l.jsx("div", { className: "flex flex-wrap gap-2", children: x.map((e) => {
|
|
27
|
+
const a = C(e);
|
|
28
|
+
return /* @__PURE__ */ l.jsx(
|
|
29
|
+
y,
|
|
30
|
+
{
|
|
31
|
+
intent: a ? "selected" : "unselected",
|
|
32
|
+
iconLeft: a ? "IconCheck" : void 0,
|
|
33
|
+
onClick: () => j(e),
|
|
34
|
+
className: "py-1",
|
|
35
|
+
disabled: n,
|
|
36
|
+
children: e.label
|
|
37
|
+
},
|
|
38
|
+
e.label
|
|
39
|
+
);
|
|
40
|
+
}) }),
|
|
41
|
+
s && t ? /* @__PURE__ */ l.jsx("span", { className: "text-error-main text-label-md -mt-1", children: s }) : /* @__PURE__ */ l.jsx(
|
|
42
|
+
"span",
|
|
43
|
+
{
|
|
44
|
+
className: p("text-label-md -mt-1", {
|
|
45
|
+
"text-neutral-1000": !s && !t,
|
|
46
|
+
"text-error-main": s && t,
|
|
47
|
+
"text-success-main": t && !s,
|
|
48
|
+
"text-neutral-700": n
|
|
49
|
+
}),
|
|
50
|
+
children: h
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] });
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
k as SelectableChips
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../jsx-runtime-DUiatUiq.cjs"),i=require("@radix-ui/react-slot"),s=require("../index-DoxiiusW.cjs"),a=require("../icon-component-LY_vGYHZ.cjs");function c({...e}){return t.jsxRuntimeExports.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function u({className:e,...r}){return t.jsxRuntimeExports.jsx("ol",{"data-slot":"breadcrumb-list",className:s.cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...r})}function m({className:e,...r}){return t.jsxRuntimeExports.jsx("li",{"data-slot":"breadcrumb-item",className:s.cn("inline-flex items-center gap-1.5",e),...r})}function l({asChild:e,className:r,...n}){const o=e?i.Slot:"a";return t.jsxRuntimeExports.jsx(o,{"data-slot":"breadcrumb-link",className:s.cn("hover:text-foreground transition-colors",r),...n})}function d({className:e,...r}){return t.jsxRuntimeExports.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s.cn("text-foreground font-semibold",e),...r})}function x({children:e,className:r,...n}){return t.jsxRuntimeExports.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:s.cn("[&>svg]:size-3.5",r),...n,children:e??t.jsxRuntimeExports.jsx(a.IconComponent,{iconName:"IconChevronRight"})})}function b({className:e,...r}){return t.jsxRuntimeExports.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:s.cn("flex size-9 items-center justify-center [&>svg]:size-3.5",e),...r,children:[t.jsxRuntimeExports.jsx(a.IconComponent,{iconName:"IconDots"}),t.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"More"})]})}exports.Breadcrumb=c;exports.BreadcrumbEllipsis=b;exports.BreadcrumbItem=m;exports.BreadcrumbLink=l;exports.BreadcrumbList=u;exports.BreadcrumbPage=d;exports.BreadcrumbSeparator=x;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { j as a } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { Slot as i } from "@radix-ui/react-slot";
|
|
3
|
+
import { c as t } from "../index-CRiPKpXj.js";
|
|
4
|
+
import { I as n } from "../icon-component-BZ-4FDV6.js";
|
|
5
|
+
function d({ ...r }) {
|
|
6
|
+
return /* @__PURE__ */ a.jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...r });
|
|
7
|
+
}
|
|
8
|
+
function b({ className: r, ...e }) {
|
|
9
|
+
return /* @__PURE__ */ a.jsx(
|
|
10
|
+
"ol",
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "breadcrumb-list",
|
|
13
|
+
className: t(
|
|
14
|
+
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
15
|
+
r
|
|
16
|
+
),
|
|
17
|
+
...e
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function p({ className: r, ...e }) {
|
|
22
|
+
return /* @__PURE__ */ a.jsx(
|
|
23
|
+
"li",
|
|
24
|
+
{
|
|
25
|
+
"data-slot": "breadcrumb-item",
|
|
26
|
+
className: t("inline-flex items-center gap-1.5", r),
|
|
27
|
+
...e
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function x({
|
|
32
|
+
asChild: r,
|
|
33
|
+
className: e,
|
|
34
|
+
...s
|
|
35
|
+
}) {
|
|
36
|
+
const o = r ? i : "a";
|
|
37
|
+
return /* @__PURE__ */ a.jsx(
|
|
38
|
+
o,
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "breadcrumb-link",
|
|
41
|
+
className: t("hover:text-foreground transition-colors", e),
|
|
42
|
+
...s
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function f({ className: r, ...e }) {
|
|
47
|
+
return /* @__PURE__ */ a.jsx(
|
|
48
|
+
"span",
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "breadcrumb-page",
|
|
51
|
+
role: "link",
|
|
52
|
+
"aria-disabled": "true",
|
|
53
|
+
"aria-current": "page",
|
|
54
|
+
className: t("text-foreground font-semibold", r),
|
|
55
|
+
...e
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function j({
|
|
60
|
+
children: r,
|
|
61
|
+
className: e,
|
|
62
|
+
...s
|
|
63
|
+
}) {
|
|
64
|
+
return /* @__PURE__ */ a.jsx(
|
|
65
|
+
"li",
|
|
66
|
+
{
|
|
67
|
+
"data-slot": "breadcrumb-separator",
|
|
68
|
+
role: "presentation",
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
className: t("[&>svg]:size-3.5", e),
|
|
71
|
+
...s,
|
|
72
|
+
children: r ?? /* @__PURE__ */ a.jsx(n, { iconName: "IconChevronRight" })
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
function g({
|
|
77
|
+
className: r,
|
|
78
|
+
...e
|
|
79
|
+
}) {
|
|
80
|
+
return /* @__PURE__ */ a.jsxs(
|
|
81
|
+
"span",
|
|
82
|
+
{
|
|
83
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
84
|
+
role: "presentation",
|
|
85
|
+
"aria-hidden": "true",
|
|
86
|
+
className: t(
|
|
87
|
+
"flex size-9 items-center justify-center [&>svg]:size-3.5",
|
|
88
|
+
r
|
|
89
|
+
),
|
|
90
|
+
...e,
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ a.jsx(n, { iconName: "IconDots" }),
|
|
93
|
+
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "More" })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
d as Breadcrumb,
|
|
100
|
+
g as BreadcrumbEllipsis,
|
|
101
|
+
p as BreadcrumbItem,
|
|
102
|
+
x as BreadcrumbLink,
|
|
103
|
+
b as BreadcrumbList,
|
|
104
|
+
f as BreadcrumbPage,
|
|
105
|
+
j as BreadcrumbSeparator
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../button-Cegl49Yi.cjs");exports.Button=t.Button;exports.buttonActiveStyles=t.buttonActiveStyles;exports.buttonLoadingStyles=t.buttonLoadingStyles;exports.buttonStyles=t.buttonStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../calendar-DL8gqdRp.cjs");exports.Calendar=e.Calendar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../card-BCgtou88.cjs");exports.Card=r.Card;exports.CardAction=r.CardAction;exports.CardContent=r.CardContent;exports.CardDescription=r.CardDescription;exports.CardFooter=r.CardFooter;exports.CardHeader=r.CardHeader;exports.CardTitle=r.CardTitle;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../jsx-runtime-DUiatUiq.cjs"),P=require("react"),S=require("recharts"),a=require("../index-DoxiiusW.cjs");function _(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const r in s)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(e,r,t.get?t:{enumerable:!0,get:()=>s[r]})}}return e.default=s,Object.freeze(e)}const m=_(P),b=_(S),T={light:"",dark:".dark"},k=m.createContext(null);function y(){const s=m.useContext(k);if(!s)throw new Error("useChart must be used within a <ChartContainer />");return s}function $({id:s,className:e,children:r,config:t,...i}){const u=m.useId(),c=`chart-${s||u.replace(/:/g,"")}`;return n.jsxRuntimeExports.jsx(k.Provider,{value:{config:t},children:n.jsxRuntimeExports.jsxs("div",{"data-slot":"chart","data-chart":c,className:a.cn("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",e),...i,children:[n.jsxRuntimeExports.jsx(w,{id:c,config:t}),n.jsxRuntimeExports.jsx(b.ResponsiveContainer,{children:r})]})})}const w=({id:s,config:e})=>{const r=Object.entries(e).filter(([,t])=>t.theme||t.color);return r.length?n.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(T).map(([t,i])=>`
|
|
2
|
+
${i} [data-chart=${s}] {
|
|
3
|
+
${r.map(([u,c])=>{const l=c.theme?.[t]||c.color;return l?` --color-${u}: ${l};`:null}).join(`
|
|
4
|
+
`)}
|
|
5
|
+
}
|
|
6
|
+
`).join(`
|
|
7
|
+
`)}}):null},O=b.Tooltip;function q({active:s,payload:e,className:r,indicator:t="dot",hideLabel:i=!1,hideIndicator:u=!1,label:c,labelFormatter:l,labelClassName:d,formatter:C,color:N,nameKey:L,labelKey:p}){const{config:h}=y(),R=m.useMemo(()=>{if(i||!e?.length)return null;const[o]=e,g=`${p||o?.dataKey||o?.name||"value"}`,j=v(h,o,g),x=!p&&typeof c=="string"?h[c]?.label||c:j?.label;return l?n.jsxRuntimeExports.jsx("div",{className:a.cn("font-semibold",d),children:l(x,e)}):x?n.jsxRuntimeExports.jsx("div",{className:a.cn("font-semibold",d),children:x}):null},[c,l,e,i,d,h,p]);if(!s||!e?.length)return null;const f=e.length===1&&t!=="dot";return n.jsxRuntimeExports.jsxs("div",{className:a.cn("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",r),children:[f?null:R,n.jsxRuntimeExports.jsx("div",{className:"grid gap-1.5",children:e.map((o,g)=>{const j=`${L||o.name||o.dataKey||"value"}`,x=v(h,o,j),E=N||o.payload.fill||o.color;return n.jsxRuntimeExports.jsx("div",{className:a.cn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",t==="dot"&&"items-center"),children:C&&o?.value!==void 0&&o.name?C(o.value,o.name,o,g,o.payload):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[x?.icon?n.jsxRuntimeExports.jsx(x.icon,{}):!u&&n.jsxRuntimeExports.jsx("div",{className:a.cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":t==="dot","w-1":t==="line","w-0 border-[1.5px] border-dashed bg-transparent":t==="dashed","my-0.5":f&&t==="dashed"}),style:{"--color-bg":E,"--color-border":E}}),n.jsxRuntimeExports.jsxs("div",{className:a.cn("flex flex-1 justify-between leading-none",f?"items-end":"items-center"),children:[n.jsxRuntimeExports.jsxs("div",{className:"grid gap-1.5",children:[f?R:null,n.jsxRuntimeExports.jsx("span",{className:"text-muted-foreground",children:x?.label||o.name})]}),o.value&&n.jsxRuntimeExports.jsx("span",{className:"text-foreground font-mono font-semibold tabular-nums",children:o.value.toLocaleString()})]})]})},o.dataKey)})})]})}const M=b.Legend;function I({className:s,hideIcon:e=!1,payload:r,verticalAlign:t="bottom",nameKey:i}){const{config:u}=y();return r?.length?n.jsxRuntimeExports.jsx("div",{className:a.cn("flex items-center justify-center gap-4",t==="top"?"pb-3":"pt-3",s),children:r?.map(c=>{const l=`${i||c.dataKey||"value"}`,d=v(u,c,l);return n.jsxRuntimeExports.jsxs("div",{className:a.cn("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[d?.icon&&!e?n.jsxRuntimeExports.jsx(d.icon,{}):n.jsxRuntimeExports.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:c.color}}),d?.label]},c.value)})}):null}function v(s,e,r){if(typeof e!="object"||e===null)return;const t="payload"in e&&typeof e.payload=="object"&&e.payload!==null?e.payload:void 0;let i=r;return r in e&&typeof e[r]=="string"?i=e[r]:t&&r in t&&typeof t[r]=="string"&&(i=t[r]),i in s?s[i]:s[r]}exports.ChartContainer=$;exports.ChartLegend=M;exports.ChartLegendContent=I;exports.ChartStyle=w;exports.ChartTooltip=O;exports.ChartTooltipContent=q;
|