@ezfit/ui 1.0.0
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/README.md +49 -0
- package/dist/components/Accordion/Accordion.d.ts +5 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +8 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Banner/Banner.d.ts +10 -0
- package/dist/components/Banner/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +12 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Chart/AreaChart.d.ts +12 -0
- package/dist/components/Chart/BarChart.d.ts +12 -0
- package/dist/components/Chart/ChartEmptyState.d.ts +7 -0
- package/dist/components/Chart/ChartLegend.d.ts +10 -0
- package/dist/components/Chart/ChartTooltip.d.ts +10 -0
- package/dist/components/Chart/DonutChart.d.ts +14 -0
- package/dist/components/Chart/index.d.ts +6 -0
- package/dist/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/DataTable/DataTable.d.ts +12 -0
- package/dist/components/DataTable/index.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +20 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/EmptyState/EmptyState.d.ts +9 -0
- package/dist/components/EmptyState/index.d.ts +1 -0
- package/dist/components/FilterChips/FilterChips.d.ts +14 -0
- package/dist/components/FilterChips/index.d.ts +1 -0
- package/dist/components/HydrationTracker/HydrationTracker.d.ts +7 -0
- package/dist/components/HydrationTracker/index.d.ts +1 -0
- package/dist/components/IconTile/IconTile.d.ts +10 -0
- package/dist/components/IconTile/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +9 -0
- package/dist/components/Input/SearchInput.d.ts +3 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/ListItem/ListItem.d.ts +29 -0
- package/dist/components/ListItem/index.d.ts +1 -0
- package/dist/components/MacroBreakdown/MacroBreakdown.d.ts +12 -0
- package/dist/components/MacroBreakdown/index.d.ts +1 -0
- package/dist/components/ProfileCard/ProfileCard.d.ts +8 -0
- package/dist/components/ProfileCard/index.d.ts +1 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +8 -0
- package/dist/components/ProgressBar/index.d.ts +1 -0
- package/dist/components/ProgressRing/ProgressRing.d.ts +10 -0
- package/dist/components/ProgressRing/index.d.ts +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +8 -0
- package/dist/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +7 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Sidebar/NavItem.d.ts +7 -0
- package/dist/components/Sidebar/Sidebar.d.ts +12 -0
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +3 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Slider/Slider.d.ts +4 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.d.ts +8 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/StatCard/StatCard.d.ts +22 -0
- package/dist/components/StatCard/index.d.ts +1 -0
- package/dist/components/Switch/Switch.d.ts +4 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +18 -0
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +13 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Topbar/Topbar.d.ts +8 -0
- package/dist/components/Topbar/index.d.ts +1 -0
- package/dist/components/TrendItem/TrendItem.d.ts +9 -0
- package/dist/components/TrendItem/index.d.ts +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +1501 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/tokens.d.ts +49 -0
- package/dist/styles.css +1 -0
- package/package.json +83 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1501 @@
|
|
|
1
|
+
import { clsx as Q } from "clsx";
|
|
2
|
+
import { twMerge as Y } from "tailwind-merge";
|
|
3
|
+
import { jsx as e, jsxs as l, Fragment as A } from "react/jsx-runtime";
|
|
4
|
+
import { ArrowDown01Icon as W, InformationCircleIcon as Z, AlertCircleIcon as ee, Alert01Icon as te, CheckmarkCircle01Icon as re, Cancel01Icon as P, Loading03Icon as ae, BarChartIcon as ne, Tick02Icon as E, DropletIcon as oe, Search01Icon as se, UserIcon as ie, ChartUpIcon as le, ChartDownIcon as ce } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as u } from "@hugeicons/react";
|
|
6
|
+
import * as k from "@radix-ui/react-accordion";
|
|
7
|
+
import { forwardRef as c, useId as j, useState as de, useCallback as V, useMemo as pe, useContext as me, createContext as ue } from "react";
|
|
8
|
+
import { ResponsiveContainer as _, AreaChart as xe, Tooltip as G, Area as ge, BarChart as fe, XAxis as be, Bar as he, Cell as H, PieChart as Ne, Pie as ve } from "recharts";
|
|
9
|
+
import { cva as w } from "class-variance-authority";
|
|
10
|
+
import * as $ from "@radix-ui/react-checkbox";
|
|
11
|
+
import * as N from "@radix-ui/react-dialog";
|
|
12
|
+
import * as O from "@radix-ui/react-radio-group";
|
|
13
|
+
import * as b from "@radix-ui/react-select";
|
|
14
|
+
import * as T from "@radix-ui/react-slider";
|
|
15
|
+
import * as L from "@radix-ui/react-switch";
|
|
16
|
+
import * as I from "@radix-ui/react-tabs";
|
|
17
|
+
import * as C from "@radix-ui/react-toast";
|
|
18
|
+
import * as h from "@radix-ui/react-tooltip";
|
|
19
|
+
function s(...a) {
|
|
20
|
+
return Y(Q(a));
|
|
21
|
+
}
|
|
22
|
+
const Gt = k.Root, ye = c(({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
23
|
+
k.Item,
|
|
24
|
+
{
|
|
25
|
+
ref: t,
|
|
26
|
+
className: s("overflow-hidden rounded-list border border-border-soft", a),
|
|
27
|
+
...r
|
|
28
|
+
}
|
|
29
|
+
));
|
|
30
|
+
ye.displayName = "AccordionItem";
|
|
31
|
+
const we = c(({ className: a, children: r, ...t }, n) => /* @__PURE__ */ e(k.Header, { className: "flex", children: /* @__PURE__ */ l(
|
|
32
|
+
k.Trigger,
|
|
33
|
+
{
|
|
34
|
+
ref: n,
|
|
35
|
+
className: s(
|
|
36
|
+
"group flex flex-1 cursor-pointer items-center justify-between p-4 text-left text-sm font-semibold outline-none focus-visible:ring-3 focus-visible:ring-ring/25",
|
|
37
|
+
a
|
|
38
|
+
),
|
|
39
|
+
...t,
|
|
40
|
+
children: [
|
|
41
|
+
r,
|
|
42
|
+
/* @__PURE__ */ e(
|
|
43
|
+
u,
|
|
44
|
+
{
|
|
45
|
+
icon: W,
|
|
46
|
+
className: "size-[18px] flex-none text-subtle-foreground transition-transform group-data-[state=open]:rotate-180"
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
) }));
|
|
52
|
+
we.displayName = "AccordionTrigger";
|
|
53
|
+
const Ce = c(({ className: a, children: r, ...t }, n) => /* @__PURE__ */ e(
|
|
54
|
+
k.Content,
|
|
55
|
+
{
|
|
56
|
+
ref: n,
|
|
57
|
+
className: "overflow-hidden text-[13px] leading-relaxed text-muted-foreground data-[state=closed]:animate-[ezfade_0.18s_ease] data-[state=open]:animate-[ezfade_0.18s_ease]",
|
|
58
|
+
...t,
|
|
59
|
+
children: /* @__PURE__ */ e("div", { className: s("px-4 pb-4", a), children: r })
|
|
60
|
+
}
|
|
61
|
+
));
|
|
62
|
+
Ce.displayName = "AccordionContent";
|
|
63
|
+
const ke = w(
|
|
64
|
+
"inline-flex items-center gap-1.5 rounded-pill font-semibold whitespace-nowrap",
|
|
65
|
+
{
|
|
66
|
+
variants: {
|
|
67
|
+
variant: {
|
|
68
|
+
active: "bg-accent-300 text-accent-foreground",
|
|
69
|
+
pro: "bg-accent-300 text-accent-muted-foreground",
|
|
70
|
+
info: "bg-info-bg text-info",
|
|
71
|
+
success: "bg-success-bg text-success",
|
|
72
|
+
warning: "bg-warning-bg text-warning",
|
|
73
|
+
error: "bg-error-bg text-error",
|
|
74
|
+
neutral: "bg-secondary text-muted-foreground"
|
|
75
|
+
},
|
|
76
|
+
size: {
|
|
77
|
+
sm: "px-2.5 py-1 text-[11px]",
|
|
78
|
+
md: "px-3 py-[5px] text-xs"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
defaultVariants: { variant: "neutral", size: "md" }
|
|
82
|
+
}
|
|
83
|
+
), Te = c(
|
|
84
|
+
({ className: a, variant: r, size: t, ...n }, o) => /* @__PURE__ */ e("span", { ref: o, className: s(ke({ variant: r, size: t }), a), ...n })
|
|
85
|
+
);
|
|
86
|
+
Te.displayName = "Badge";
|
|
87
|
+
const Ie = w("flex items-center gap-3.5 rounded-list border p-[15px] px-[18px]", {
|
|
88
|
+
variants: {
|
|
89
|
+
variant: {
|
|
90
|
+
success: "border-success-border bg-success-bg",
|
|
91
|
+
warning: "border-warning-border bg-warning-bg",
|
|
92
|
+
error: "border-error-border bg-error-bg",
|
|
93
|
+
info: "border-info-border bg-info-bg"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
defaultVariants: { variant: "info" }
|
|
97
|
+
}), Fe = {
|
|
98
|
+
success: re,
|
|
99
|
+
warning: te,
|
|
100
|
+
error: ee,
|
|
101
|
+
info: Z
|
|
102
|
+
}, M = {
|
|
103
|
+
success: "text-success",
|
|
104
|
+
warning: "text-warning",
|
|
105
|
+
error: "text-error",
|
|
106
|
+
info: "text-info"
|
|
107
|
+
}, ze = {
|
|
108
|
+
success: "text-[#166534]",
|
|
109
|
+
warning: "text-[#92400E]",
|
|
110
|
+
error: "text-[#991B1B]",
|
|
111
|
+
info: "text-[#1E40AF]"
|
|
112
|
+
}, Se = {
|
|
113
|
+
success: "text-[#15803D]",
|
|
114
|
+
warning: "text-[#B45309]",
|
|
115
|
+
error: "text-[#B91C1C]",
|
|
116
|
+
info: "text-[#1D4ED8]"
|
|
117
|
+
}, Be = c(
|
|
118
|
+
({ className: a, variant: r = "info", title: t, children: n, onDismiss: o, ...i }, p) => {
|
|
119
|
+
const d = r ?? "info", m = Fe[d];
|
|
120
|
+
return /* @__PURE__ */ l("div", { ref: p, role: "alert", className: s(Ie({ variant: r }), a), ...i, children: [
|
|
121
|
+
/* @__PURE__ */ e(
|
|
122
|
+
u,
|
|
123
|
+
{
|
|
124
|
+
icon: m,
|
|
125
|
+
className: s("size-5 flex-none", M[d]),
|
|
126
|
+
strokeWidth: 2
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
/* @__PURE__ */ l("div", { className: "flex-1 text-sm", children: [
|
|
130
|
+
t ? /* @__PURE__ */ l("span", { className: s("font-semibold", ze[d]), children: [
|
|
131
|
+
t,
|
|
132
|
+
" "
|
|
133
|
+
] }) : null,
|
|
134
|
+
/* @__PURE__ */ e("span", { className: Se[d], children: n })
|
|
135
|
+
] }),
|
|
136
|
+
o ? /* @__PURE__ */ e(
|
|
137
|
+
"button",
|
|
138
|
+
{
|
|
139
|
+
type: "button",
|
|
140
|
+
onClick: o,
|
|
141
|
+
"aria-label": "Fechar",
|
|
142
|
+
className: s(
|
|
143
|
+
"flex-none cursor-pointer opacity-60 transition-opacity hover:opacity-100",
|
|
144
|
+
M[d]
|
|
145
|
+
),
|
|
146
|
+
children: /* @__PURE__ */ e(u, { icon: P, className: "size-[17px]" })
|
|
147
|
+
}
|
|
148
|
+
) : null
|
|
149
|
+
] });
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
Be.displayName = "Banner";
|
|
153
|
+
const De = w(
|
|
154
|
+
"inline-flex items-center justify-center gap-2 font-sans font-semibold whitespace-nowrap transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/25 disabled:pointer-events-none disabled:opacity-70",
|
|
155
|
+
{
|
|
156
|
+
variants: {
|
|
157
|
+
variant: {
|
|
158
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary-hover",
|
|
159
|
+
accent: "bg-accent-300 text-accent-foreground hover:bg-accent",
|
|
160
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary-hover",
|
|
161
|
+
ghost: "bg-transparent text-muted-foreground hover:bg-secondary hover:text-foreground",
|
|
162
|
+
destructive: "bg-error-bg text-error hover:bg-error/15"
|
|
163
|
+
},
|
|
164
|
+
size: {
|
|
165
|
+
sm: "h-9 rounded-button px-4 text-[13px]",
|
|
166
|
+
md: "h-11 rounded-button px-[22px] text-sm",
|
|
167
|
+
icon: "h-11 w-11 rounded-button"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
defaultVariants: {
|
|
171
|
+
variant: "primary",
|
|
172
|
+
size: "md"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
), Ae = c(
|
|
176
|
+
({ className: a, variant: r, size: t, loading: n = !1, disabled: o, children: i, type: p = "button", ...d }, m) => /* @__PURE__ */ e(
|
|
177
|
+
"button",
|
|
178
|
+
{
|
|
179
|
+
ref: m,
|
|
180
|
+
type: p,
|
|
181
|
+
className: s(De({ variant: r, size: t }), a),
|
|
182
|
+
disabled: o || n,
|
|
183
|
+
...d,
|
|
184
|
+
children: n ? /* @__PURE__ */ e(u, { icon: ae, className: "size-[18px] animate-spin-slow" }) : i
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
);
|
|
188
|
+
Ae.displayName = "Button";
|
|
189
|
+
const Pe = w("rounded-card", {
|
|
190
|
+
variants: {
|
|
191
|
+
variant: {
|
|
192
|
+
light: "bg-card text-card-foreground shadow-card",
|
|
193
|
+
dark: "bg-primary text-primary-foreground shadow-dark",
|
|
194
|
+
accent: "bg-accent text-accent-foreground shadow-accent"
|
|
195
|
+
},
|
|
196
|
+
padding: {
|
|
197
|
+
none: "p-0",
|
|
198
|
+
sm: "p-5",
|
|
199
|
+
md: "p-7"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
defaultVariants: { variant: "light", padding: "md" }
|
|
203
|
+
}), Ee = c(
|
|
204
|
+
({ className: a, variant: r, padding: t, ...n }, o) => /* @__PURE__ */ e("div", { ref: o, className: s(Pe({ variant: r, padding: t }), a), ...n })
|
|
205
|
+
);
|
|
206
|
+
Ee.displayName = "Card";
|
|
207
|
+
const je = c(
|
|
208
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
209
|
+
"div",
|
|
210
|
+
{
|
|
211
|
+
ref: t,
|
|
212
|
+
className: s("mb-4 flex items-start justify-between gap-3", a),
|
|
213
|
+
...r
|
|
214
|
+
}
|
|
215
|
+
)
|
|
216
|
+
);
|
|
217
|
+
je.displayName = "CardHeader";
|
|
218
|
+
const _e = c(
|
|
219
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e("h3", { ref: t, className: s("text-base font-semibold", a), ...r })
|
|
220
|
+
);
|
|
221
|
+
_e.displayName = "CardTitle";
|
|
222
|
+
const Re = c(({ className: a, ...r }, t) => /* @__PURE__ */ e("p", { ref: t, className: s("text-[13px] text-subtle-foreground", a), ...r }));
|
|
223
|
+
Re.displayName = "CardDescription";
|
|
224
|
+
const Ve = c(
|
|
225
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e("div", { ref: t, className: s(a), ...r })
|
|
226
|
+
);
|
|
227
|
+
Ve.displayName = "CardContent";
|
|
228
|
+
const y = {
|
|
229
|
+
primary: "#1E293B",
|
|
230
|
+
primaryForeground: "#FFFFFF",
|
|
231
|
+
accent: "#A3E635",
|
|
232
|
+
accent300: "#BEF264",
|
|
233
|
+
background: "#FFFFFF",
|
|
234
|
+
foreground: "#1E293B",
|
|
235
|
+
appBg: "#EEF1F5",
|
|
236
|
+
muted: "#F8FAFC",
|
|
237
|
+
mutedForeground: "#64748B",
|
|
238
|
+
subtleForeground: "#94A3B8",
|
|
239
|
+
secondary: "#F1F5F9",
|
|
240
|
+
secondaryForeground: "#0F172A",
|
|
241
|
+
border: "#E2E8F0",
|
|
242
|
+
ring: "#1E293B",
|
|
243
|
+
success: "#22C55E",
|
|
244
|
+
warning: "#F59E0B",
|
|
245
|
+
error: "#EF4444",
|
|
246
|
+
info: "#3B82F6",
|
|
247
|
+
protein: "#3B82F6",
|
|
248
|
+
carbs: "#EAB308",
|
|
249
|
+
carbsText: "#CA8A04",
|
|
250
|
+
fat: "#F97316",
|
|
251
|
+
cardio: "#22C55E"
|
|
252
|
+
}, F = {
|
|
253
|
+
protein: y.protein,
|
|
254
|
+
carbs: y.carbs,
|
|
255
|
+
fat: y.fat,
|
|
256
|
+
cardio: y.cardio,
|
|
257
|
+
accent: y.accent,
|
|
258
|
+
primary: y.primary,
|
|
259
|
+
muted: y.secondary,
|
|
260
|
+
grid: "#F1F5F9"
|
|
261
|
+
}, Ht = {
|
|
262
|
+
input: "8px",
|
|
263
|
+
field: "12px",
|
|
264
|
+
button: "14px",
|
|
265
|
+
list: "16px",
|
|
266
|
+
tile: "18px",
|
|
267
|
+
card: "24px",
|
|
268
|
+
pill: "999px"
|
|
269
|
+
}, Ot = {
|
|
270
|
+
sans: "'Space Grotesk', ui-sans-serif, system-ui, sans-serif",
|
|
271
|
+
mono: "'Space Mono', ui-monospace, monospace"
|
|
272
|
+
}, R = c(
|
|
273
|
+
({ className: a, title: r, rows: t, ...n }, o) => /* @__PURE__ */ l(
|
|
274
|
+
"div",
|
|
275
|
+
{
|
|
276
|
+
ref: o,
|
|
277
|
+
className: s(
|
|
278
|
+
"min-w-[150px] rounded-[14px] bg-primary px-4 py-3 text-primary-foreground shadow-[0_8px_24px_rgba(15,23,42,0.25)]",
|
|
279
|
+
a
|
|
280
|
+
),
|
|
281
|
+
...n,
|
|
282
|
+
children: [
|
|
283
|
+
r ? /* @__PURE__ */ e("div", { className: "mb-1.5 text-[11px] text-subtle-foreground", children: r }) : null,
|
|
284
|
+
t.map((i) => /* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-[13px] font-semibold", children: [
|
|
285
|
+
i.color ? /* @__PURE__ */ e("span", { className: "size-[9px] flex-none rounded-full", style: { background: i.color } }) : null,
|
|
286
|
+
i.label,
|
|
287
|
+
/* @__PURE__ */ e("span", { className: "ml-auto", children: i.value })
|
|
288
|
+
] }, i.label))
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
)
|
|
292
|
+
);
|
|
293
|
+
R.displayName = "ChartTooltip";
|
|
294
|
+
function $e(a) {
|
|
295
|
+
return function({ active: t, payload: n, label: o }) {
|
|
296
|
+
if (!t || !(n != null && n.length)) return null;
|
|
297
|
+
const i = n[0];
|
|
298
|
+
return /* @__PURE__ */ e(
|
|
299
|
+
R,
|
|
300
|
+
{
|
|
301
|
+
title: String(o),
|
|
302
|
+
rows: [
|
|
303
|
+
{
|
|
304
|
+
label: "Valor",
|
|
305
|
+
value: `${(i == null ? void 0 : i.value) ?? 0}${a ? ` ${a}` : ""}`,
|
|
306
|
+
color: F.accent
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
);
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function Kt({
|
|
314
|
+
data: a,
|
|
315
|
+
height: r = 180,
|
|
316
|
+
color: t = F.accent,
|
|
317
|
+
unit: n = "",
|
|
318
|
+
className: o
|
|
319
|
+
}) {
|
|
320
|
+
const i = "ezfit-area-gradient";
|
|
321
|
+
return /* @__PURE__ */ e("div", { className: s("w-full", o), style: { height: r }, children: /* @__PURE__ */ e(_, { width: "100%", height: "100%", children: /* @__PURE__ */ l(xe, { data: a, margin: { top: 8, right: 8, bottom: 0, left: 8 }, children: [
|
|
322
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ l("linearGradient", { id: i, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
323
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: t, stopOpacity: 0.45 }),
|
|
324
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: t, stopOpacity: 0 })
|
|
325
|
+
] }) }),
|
|
326
|
+
/* @__PURE__ */ e(G, { cursor: !1, content: $e(n) }),
|
|
327
|
+
/* @__PURE__ */ e(
|
|
328
|
+
ge,
|
|
329
|
+
{
|
|
330
|
+
type: "monotone",
|
|
331
|
+
dataKey: "value",
|
|
332
|
+
stroke: t,
|
|
333
|
+
strokeWidth: 3,
|
|
334
|
+
strokeLinecap: "round",
|
|
335
|
+
fill: `url(#${i})`,
|
|
336
|
+
dot: !1,
|
|
337
|
+
activeDot: { r: 5, fill: "#fff", stroke: t, strokeWidth: 3 }
|
|
338
|
+
}
|
|
339
|
+
)
|
|
340
|
+
] }) }) });
|
|
341
|
+
}
|
|
342
|
+
function Le(a) {
|
|
343
|
+
return function({ active: t, payload: n, label: o }) {
|
|
344
|
+
if (!t || !(n != null && n.length)) return null;
|
|
345
|
+
const i = n[0];
|
|
346
|
+
return /* @__PURE__ */ e(
|
|
347
|
+
R,
|
|
348
|
+
{
|
|
349
|
+
title: String(o),
|
|
350
|
+
rows: [
|
|
351
|
+
{
|
|
352
|
+
label: "Valor",
|
|
353
|
+
value: `${(i == null ? void 0 : i.value) ?? 0}${a ? ` ${a}` : ""}`,
|
|
354
|
+
color: F.accent
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
function qt({ data: a, activeIndex: r, height: t = 220, unit: n = "", className: o }) {
|
|
362
|
+
return /* @__PURE__ */ e("div", { className: s("w-full", o), style: { height: t }, children: /* @__PURE__ */ e(_, { width: "100%", height: "100%", children: /* @__PURE__ */ l(fe, { data: a, margin: { top: 24, right: 0, bottom: 0, left: 0 }, children: [
|
|
363
|
+
/* @__PURE__ */ e(
|
|
364
|
+
be,
|
|
365
|
+
{
|
|
366
|
+
dataKey: "label",
|
|
367
|
+
axisLine: !1,
|
|
368
|
+
tickLine: !1,
|
|
369
|
+
tick: { fontSize: 11, fill: "#94A3B8" },
|
|
370
|
+
dy: 8
|
|
371
|
+
}
|
|
372
|
+
),
|
|
373
|
+
/* @__PURE__ */ e(G, { cursor: !1, content: Le(n) }),
|
|
374
|
+
/* @__PURE__ */ e(he, { dataKey: "value", radius: [10, 10, 10, 10], maxBarSize: 40, children: a.map((i, p) => /* @__PURE__ */ e(
|
|
375
|
+
H,
|
|
376
|
+
{
|
|
377
|
+
fill: p === r ? F.accent : "#CBD5E1"
|
|
378
|
+
},
|
|
379
|
+
i.label
|
|
380
|
+
)) })
|
|
381
|
+
] }) }) });
|
|
382
|
+
}
|
|
383
|
+
const Me = c(
|
|
384
|
+
({
|
|
385
|
+
className: a,
|
|
386
|
+
icon: r = ne,
|
|
387
|
+
title: t = "0",
|
|
388
|
+
description: n = "Sem dados para o periodo",
|
|
389
|
+
...o
|
|
390
|
+
}, i) => /* @__PURE__ */ l(
|
|
391
|
+
"div",
|
|
392
|
+
{
|
|
393
|
+
ref: i,
|
|
394
|
+
className: s(
|
|
395
|
+
"flex h-[148px] flex-col items-center justify-center rounded-tile border-2 border-dashed border-border text-center",
|
|
396
|
+
a
|
|
397
|
+
),
|
|
398
|
+
...o,
|
|
399
|
+
children: [
|
|
400
|
+
/* @__PURE__ */ e("div", { className: "mb-3 flex size-[46px] items-center justify-center rounded-[14px] bg-secondary", children: /* @__PURE__ */ e(u, { icon: r, className: "size-[22px] text-subtle-foreground", strokeWidth: 2 }) }),
|
|
401
|
+
/* @__PURE__ */ e("div", { className: "text-[32px] leading-none font-bold text-[#CBD5E1]", children: t }),
|
|
402
|
+
/* @__PURE__ */ e("div", { className: "mt-1.5 text-xs text-subtle-foreground", children: n })
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
)
|
|
406
|
+
);
|
|
407
|
+
Me.displayName = "ChartEmptyState";
|
|
408
|
+
const We = c(
|
|
409
|
+
({ className: a, items: r, ...t }, n) => /* @__PURE__ */ e("div", { ref: n, className: s("flex flex-wrap gap-3", a), ...t, children: r.map((o) => /* @__PURE__ */ l("div", { className: "inline-flex items-center gap-[7px] text-[13px]", children: [
|
|
410
|
+
/* @__PURE__ */ e(
|
|
411
|
+
"span",
|
|
412
|
+
{
|
|
413
|
+
className: s(
|
|
414
|
+
"size-[11px] flex-none",
|
|
415
|
+
o.shape === "square" ? "rounded-[4px]" : "rounded-full"
|
|
416
|
+
),
|
|
417
|
+
style: { background: o.color }
|
|
418
|
+
}
|
|
419
|
+
),
|
|
420
|
+
o.label,
|
|
421
|
+
o.value ? /* @__PURE__ */ e("span", { className: "text-subtle-foreground", children: o.value }) : null
|
|
422
|
+
] }, o.label)) })
|
|
423
|
+
);
|
|
424
|
+
We.displayName = "ChartLegend";
|
|
425
|
+
function Ut({
|
|
426
|
+
data: a,
|
|
427
|
+
size: r = 120,
|
|
428
|
+
thickness: t = 18,
|
|
429
|
+
centerValue: n,
|
|
430
|
+
centerCaption: o,
|
|
431
|
+
className: i
|
|
432
|
+
}) {
|
|
433
|
+
return /* @__PURE__ */ l("div", { className: s("relative flex-none", i), style: { width: r, height: r }, children: [
|
|
434
|
+
/* @__PURE__ */ e(_, { width: "100%", height: "100%", children: /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(
|
|
435
|
+
ve,
|
|
436
|
+
{
|
|
437
|
+
data: a,
|
|
438
|
+
dataKey: "value",
|
|
439
|
+
nameKey: "name",
|
|
440
|
+
cx: "50%",
|
|
441
|
+
cy: "50%",
|
|
442
|
+
innerRadius: r / 2 - t,
|
|
443
|
+
outerRadius: r / 2,
|
|
444
|
+
startAngle: 90,
|
|
445
|
+
endAngle: -270,
|
|
446
|
+
paddingAngle: 0,
|
|
447
|
+
stroke: "none",
|
|
448
|
+
children: a.map((p) => /* @__PURE__ */ e(H, { fill: p.color }, p.name))
|
|
449
|
+
}
|
|
450
|
+
) }) }),
|
|
451
|
+
n || o ? /* @__PURE__ */ l("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
452
|
+
n ? /* @__PURE__ */ e("span", { className: "text-[22px] font-bold", children: n }) : null,
|
|
453
|
+
o ? /* @__PURE__ */ e("span", { className: "text-[10px] tracking-wide text-subtle-foreground uppercase", children: o }) : null
|
|
454
|
+
] }) : null
|
|
455
|
+
] });
|
|
456
|
+
}
|
|
457
|
+
const Ge = c(
|
|
458
|
+
({ className: a, label: r, id: t, ...n }, o) => {
|
|
459
|
+
const i = j(), p = t ?? i, d = /* @__PURE__ */ e(
|
|
460
|
+
$.Root,
|
|
461
|
+
{
|
|
462
|
+
ref: o,
|
|
463
|
+
id: p,
|
|
464
|
+
className: s(
|
|
465
|
+
"flex size-[22px] flex-none cursor-pointer items-center justify-center rounded-[7px] border-2 transition-colors outline-none",
|
|
466
|
+
"border-input bg-background",
|
|
467
|
+
"data-[state=checked]:border-accent data-[state=checked]:bg-accent",
|
|
468
|
+
"focus-visible:ring-3 focus-visible:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-60",
|
|
469
|
+
a
|
|
470
|
+
),
|
|
471
|
+
...n,
|
|
472
|
+
children: /* @__PURE__ */ e($.Indicator, { children: /* @__PURE__ */ e(
|
|
473
|
+
u,
|
|
474
|
+
{
|
|
475
|
+
icon: E,
|
|
476
|
+
className: "size-[15px] text-accent-foreground",
|
|
477
|
+
strokeWidth: 3
|
|
478
|
+
}
|
|
479
|
+
) })
|
|
480
|
+
}
|
|
481
|
+
);
|
|
482
|
+
return r ? /* @__PURE__ */ l("label", { htmlFor: p, className: "flex cursor-pointer items-center gap-3.5", children: [
|
|
483
|
+
d,
|
|
484
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: r })
|
|
485
|
+
] }) : d;
|
|
486
|
+
}
|
|
487
|
+
);
|
|
488
|
+
Ge.displayName = "Checkbox";
|
|
489
|
+
function Xt({ columns: a, data: r, getRowKey: t, className: n, ...o }) {
|
|
490
|
+
return /* @__PURE__ */ l("table", { className: s("w-full border-collapse", n), ...o, children: [
|
|
491
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: a.map((i) => /* @__PURE__ */ e(
|
|
492
|
+
"th",
|
|
493
|
+
{
|
|
494
|
+
className: s(
|
|
495
|
+
"pb-3.5 font-mono text-[11px] font-bold tracking-wider text-subtle-foreground uppercase",
|
|
496
|
+
i.align === "right" ? "text-right" : "text-left"
|
|
497
|
+
),
|
|
498
|
+
children: i.header
|
|
499
|
+
},
|
|
500
|
+
i.header
|
|
501
|
+
)) }) }),
|
|
502
|
+
/* @__PURE__ */ e("tbody", { children: r.map((i, p) => /* @__PURE__ */ e("tr", { className: "border-t border-border-soft", children: a.map((d) => /* @__PURE__ */ e(
|
|
503
|
+
"td",
|
|
504
|
+
{
|
|
505
|
+
className: s(
|
|
506
|
+
"py-3.5 text-sm",
|
|
507
|
+
d.align === "right" ? "text-right" : "text-left"
|
|
508
|
+
),
|
|
509
|
+
children: d.cell(i)
|
|
510
|
+
},
|
|
511
|
+
d.header
|
|
512
|
+
)) }, t(i, p))) })
|
|
513
|
+
] });
|
|
514
|
+
}
|
|
515
|
+
const Jt = N.Root, Qt = N.Trigger, Yt = N.Close, He = N.Portal, K = c(({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
516
|
+
N.Overlay,
|
|
517
|
+
{
|
|
518
|
+
ref: t,
|
|
519
|
+
className: s(
|
|
520
|
+
"fixed inset-0 z-90 flex items-center justify-center bg-[rgba(15,23,42,0.45)] p-6 backdrop-blur-[3px] data-[state=open]:animate-fade-in",
|
|
521
|
+
a
|
|
522
|
+
),
|
|
523
|
+
...r
|
|
524
|
+
}
|
|
525
|
+
));
|
|
526
|
+
K.displayName = "DialogOverlay";
|
|
527
|
+
const Oe = c(({ className: a, children: r, showClose: t = !0, ...n }, o) => /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(K, { children: /* @__PURE__ */ l(
|
|
528
|
+
N.Content,
|
|
529
|
+
{
|
|
530
|
+
ref: o,
|
|
531
|
+
className: s(
|
|
532
|
+
"relative w-full max-w-[420px] rounded-card bg-card p-[30px] shadow-[0_24px_64px_rgba(15,23,42,0.3)] outline-none data-[state=open]:animate-toast-in",
|
|
533
|
+
a
|
|
534
|
+
),
|
|
535
|
+
onOpenAutoFocus: (i) => i.preventDefault(),
|
|
536
|
+
...n,
|
|
537
|
+
children: [
|
|
538
|
+
r,
|
|
539
|
+
t ? /* @__PURE__ */ e(
|
|
540
|
+
N.Close,
|
|
541
|
+
{
|
|
542
|
+
className: "absolute top-[30px] right-[30px] flex size-[34px] cursor-pointer items-center justify-center rounded-[11px] bg-secondary text-muted-foreground transition-colors hover:bg-secondary-hover outline-none focus-visible:ring-3 focus-visible:ring-ring/25",
|
|
543
|
+
"aria-label": "Fechar",
|
|
544
|
+
children: /* @__PURE__ */ e(u, { icon: P, className: "size-[18px]" })
|
|
545
|
+
}
|
|
546
|
+
) : null
|
|
547
|
+
]
|
|
548
|
+
}
|
|
549
|
+
) }) }));
|
|
550
|
+
Oe.displayName = "DialogContent";
|
|
551
|
+
const Ke = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: s("mb-2 flex items-start justify-between gap-3", a), ...r });
|
|
552
|
+
Ke.displayName = "DialogHeader";
|
|
553
|
+
const qe = c(({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
554
|
+
N.Title,
|
|
555
|
+
{
|
|
556
|
+
ref: t,
|
|
557
|
+
className: s("mt-3.5 mb-1.5 text-xl font-bold", a),
|
|
558
|
+
...r
|
|
559
|
+
}
|
|
560
|
+
));
|
|
561
|
+
qe.displayName = "DialogTitle";
|
|
562
|
+
const Ue = c(({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
563
|
+
N.Description,
|
|
564
|
+
{
|
|
565
|
+
ref: t,
|
|
566
|
+
className: s("mb-6 text-sm leading-relaxed text-muted-foreground", a),
|
|
567
|
+
...r
|
|
568
|
+
}
|
|
569
|
+
));
|
|
570
|
+
Ue.displayName = "DialogDescription";
|
|
571
|
+
const Xe = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: s("flex gap-3", a), ...r });
|
|
572
|
+
Xe.displayName = "DialogFooter";
|
|
573
|
+
const Je = w("flex flex-none items-center justify-center", {
|
|
574
|
+
variants: {
|
|
575
|
+
tone: {
|
|
576
|
+
neutral: "bg-secondary text-foreground",
|
|
577
|
+
protein: "bg-protein-bg text-protein",
|
|
578
|
+
carbs: "bg-carbs-bg text-carbs-text",
|
|
579
|
+
fat: "bg-fat-bg text-fat",
|
|
580
|
+
cardio: "bg-cardio-bg text-cardio",
|
|
581
|
+
success: "bg-success-bg text-success",
|
|
582
|
+
warning: "bg-warning-bg text-warning",
|
|
583
|
+
error: "bg-error-bg text-error",
|
|
584
|
+
info: "bg-info-bg text-info",
|
|
585
|
+
accent: "bg-accent text-accent-foreground",
|
|
586
|
+
onDark: "bg-white/10 text-accent",
|
|
587
|
+
onAccent: "bg-primary/10 text-primary"
|
|
588
|
+
},
|
|
589
|
+
size: {
|
|
590
|
+
sm: "size-[34px] rounded-[10px]",
|
|
591
|
+
md: "size-[42px] rounded-[14px]",
|
|
592
|
+
lg: "size-[46px] rounded-[14px]",
|
|
593
|
+
xl: "size-[72px] rounded-[22px]"
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
defaultVariants: { tone: "neutral", size: "md" }
|
|
597
|
+
}), Qe = {
|
|
598
|
+
sm: "size-[18px]",
|
|
599
|
+
md: "size-5",
|
|
600
|
+
lg: "size-[22px]",
|
|
601
|
+
xl: "size-8"
|
|
602
|
+
}, z = c(
|
|
603
|
+
({ className: a, tone: r, size: t = "md", icon: n, ...o }, i) => /* @__PURE__ */ e("div", { ref: i, className: s(Je({ tone: r, size: t }), a), ...o, children: /* @__PURE__ */ e(u, { icon: n, className: Qe[t ?? "md"], strokeWidth: 2 }) })
|
|
604
|
+
);
|
|
605
|
+
z.displayName = "IconTile";
|
|
606
|
+
const Ye = c(
|
|
607
|
+
({ className: a, icon: r, title: t, description: n, action: o, ...i }, p) => /* @__PURE__ */ l(
|
|
608
|
+
"div",
|
|
609
|
+
{
|
|
610
|
+
ref: p,
|
|
611
|
+
className: s(
|
|
612
|
+
"flex flex-col items-center rounded-card bg-card p-12 text-center shadow-card",
|
|
613
|
+
a
|
|
614
|
+
),
|
|
615
|
+
...i,
|
|
616
|
+
children: [
|
|
617
|
+
/* @__PURE__ */ e(z, { icon: r, tone: "neutral", size: "xl", className: "mb-5 text-subtle-foreground" }),
|
|
618
|
+
/* @__PURE__ */ e("h3", { className: "mb-1.5 text-lg font-bold", children: t }),
|
|
619
|
+
n ? /* @__PURE__ */ e("p", { className: "mb-[22px] max-w-[340px] text-sm leading-relaxed text-subtle-foreground", children: n }) : null,
|
|
620
|
+
o
|
|
621
|
+
]
|
|
622
|
+
}
|
|
623
|
+
)
|
|
624
|
+
);
|
|
625
|
+
Ye.displayName = "EmptyState";
|
|
626
|
+
const q = c(
|
|
627
|
+
({ className: a, selected: r = !1, ...t }, n) => /* @__PURE__ */ e(
|
|
628
|
+
"button",
|
|
629
|
+
{
|
|
630
|
+
ref: n,
|
|
631
|
+
type: "button",
|
|
632
|
+
"aria-pressed": r,
|
|
633
|
+
className: s(
|
|
634
|
+
"cursor-pointer rounded-pill px-3.5 py-[7px] font-sans text-[13px] whitespace-nowrap transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/25",
|
|
635
|
+
r ? "bg-primary font-semibold text-primary-foreground" : "bg-secondary font-medium text-muted-foreground hover:bg-secondary-hover",
|
|
636
|
+
a
|
|
637
|
+
),
|
|
638
|
+
...t
|
|
639
|
+
}
|
|
640
|
+
)
|
|
641
|
+
);
|
|
642
|
+
q.displayName = "FilterChip";
|
|
643
|
+
const Ze = c(
|
|
644
|
+
({ className: a, items: r, value: t, onValueChange: n, ...o }, i) => /* @__PURE__ */ e("div", { ref: i, className: s("flex flex-wrap gap-2", a), ...o, children: r.map((p) => /* @__PURE__ */ e(
|
|
645
|
+
q,
|
|
646
|
+
{
|
|
647
|
+
selected: p.value === t,
|
|
648
|
+
onClick: () => n(p.value),
|
|
649
|
+
children: p.label
|
|
650
|
+
},
|
|
651
|
+
p.value
|
|
652
|
+
)) })
|
|
653
|
+
);
|
|
654
|
+
Ze.displayName = "FilterChips";
|
|
655
|
+
const et = c(
|
|
656
|
+
({ className: a, total: r, filled: t, caption: n, onCupClick: o, ...i }, p) => /* @__PURE__ */ l("div", { ref: p, className: s("flex flex-col", a), ...i, children: [
|
|
657
|
+
/* @__PURE__ */ e("div", { className: "flex gap-2.5", children: Array.from({ length: r }).map((d, m) => {
|
|
658
|
+
const x = m < t;
|
|
659
|
+
return /* @__PURE__ */ e(
|
|
660
|
+
"button",
|
|
661
|
+
{
|
|
662
|
+
type: "button",
|
|
663
|
+
"aria-label": `Copo ${m + 1}${x ? " preenchido" : ""}`,
|
|
664
|
+
onClick: o ? () => o(m) : void 0,
|
|
665
|
+
disabled: !o,
|
|
666
|
+
className: s(
|
|
667
|
+
"flex h-11 flex-1 items-center justify-center rounded-[14px] transition-colors",
|
|
668
|
+
o && "cursor-pointer",
|
|
669
|
+
x ? "bg-protein" : "bg-info-bg"
|
|
670
|
+
),
|
|
671
|
+
children: /* @__PURE__ */ e(
|
|
672
|
+
u,
|
|
673
|
+
{
|
|
674
|
+
icon: oe,
|
|
675
|
+
className: s("size-[18px]", x ? "text-white" : "text-[#BFDBFE]"),
|
|
676
|
+
strokeWidth: 2
|
|
677
|
+
}
|
|
678
|
+
)
|
|
679
|
+
},
|
|
680
|
+
m
|
|
681
|
+
);
|
|
682
|
+
}) }),
|
|
683
|
+
n ? /* @__PURE__ */ e("div", { className: "mt-2.5 text-xs text-subtle-foreground", children: n }) : null
|
|
684
|
+
] })
|
|
685
|
+
);
|
|
686
|
+
et.displayName = "HydrationTracker";
|
|
687
|
+
const U = c(
|
|
688
|
+
({ className: a, label: r, error: t, hint: n, startIcon: o, suffix: i, id: p, disabled: d, ...m }, x) => {
|
|
689
|
+
const g = j(), f = p ?? g, v = !!t, B = s(
|
|
690
|
+
"flex items-center gap-2.5 rounded-field border bg-background px-3.5 transition-colors",
|
|
691
|
+
"focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/10",
|
|
692
|
+
v && "border-error ring-3 ring-error/10 focus-within:border-error focus-within:ring-error/10",
|
|
693
|
+
!v && "border-input",
|
|
694
|
+
d && "opacity-60"
|
|
695
|
+
);
|
|
696
|
+
return /* @__PURE__ */ l("div", { className: s("flex flex-col", a), children: [
|
|
697
|
+
r ? /* @__PURE__ */ e(
|
|
698
|
+
"label",
|
|
699
|
+
{
|
|
700
|
+
htmlFor: f,
|
|
701
|
+
className: s("mb-[7px] text-[13px] font-semibold", v && "text-error"),
|
|
702
|
+
children: r
|
|
703
|
+
}
|
|
704
|
+
) : null,
|
|
705
|
+
/* @__PURE__ */ l("div", { className: B, children: [
|
|
706
|
+
o ? /* @__PURE__ */ e(
|
|
707
|
+
u,
|
|
708
|
+
{
|
|
709
|
+
icon: o,
|
|
710
|
+
className: "size-[17px] text-subtle-foreground",
|
|
711
|
+
strokeWidth: 2
|
|
712
|
+
}
|
|
713
|
+
) : null,
|
|
714
|
+
/* @__PURE__ */ e(
|
|
715
|
+
"input",
|
|
716
|
+
{
|
|
717
|
+
ref: x,
|
|
718
|
+
id: f,
|
|
719
|
+
disabled: d,
|
|
720
|
+
"aria-invalid": v,
|
|
721
|
+
className: "w-full min-w-0 bg-transparent py-3 font-sans text-sm text-foreground outline-none placeholder:text-subtle-foreground",
|
|
722
|
+
...m
|
|
723
|
+
}
|
|
724
|
+
),
|
|
725
|
+
i ? /* @__PURE__ */ e("span", { className: "font-mono text-xs text-subtle-foreground", children: i }) : null
|
|
726
|
+
] }),
|
|
727
|
+
t ? /* @__PURE__ */ e("p", { className: "mt-1.5 text-xs text-error", children: t }) : null,
|
|
728
|
+
!t && n ? /* @__PURE__ */ e("p", { className: "mt-1.5 text-xs text-subtle-foreground", children: n }) : null
|
|
729
|
+
] });
|
|
730
|
+
}
|
|
731
|
+
);
|
|
732
|
+
U.displayName = "Input";
|
|
733
|
+
const tt = c(
|
|
734
|
+
({ placeholder: a = "Buscar...", ...r }, t) => /* @__PURE__ */ e(U, { ref: t, type: "search", startIcon: se, placeholder: a, ...r })
|
|
735
|
+
);
|
|
736
|
+
tt.displayName = "SearchInput";
|
|
737
|
+
const S = c(
|
|
738
|
+
({
|
|
739
|
+
className: a,
|
|
740
|
+
icon: r,
|
|
741
|
+
iconTone: t = "neutral",
|
|
742
|
+
title: n,
|
|
743
|
+
subtitle: o,
|
|
744
|
+
trailing: i,
|
|
745
|
+
interactive: p = !1,
|
|
746
|
+
...d
|
|
747
|
+
}, m) => /* @__PURE__ */ l(
|
|
748
|
+
"div",
|
|
749
|
+
{
|
|
750
|
+
ref: m,
|
|
751
|
+
className: s(
|
|
752
|
+
"flex items-center gap-4 rounded-list bg-muted p-4",
|
|
753
|
+
p && "cursor-pointer transition-colors hover:bg-secondary",
|
|
754
|
+
a
|
|
755
|
+
),
|
|
756
|
+
...d,
|
|
757
|
+
children: [
|
|
758
|
+
/* @__PURE__ */ e(z, { icon: r, tone: t, size: "lg" }),
|
|
759
|
+
/* @__PURE__ */ l("div", { className: "min-w-0 flex-1", children: [
|
|
760
|
+
/* @__PURE__ */ e("div", { className: "truncate text-[15px] font-semibold", children: n }),
|
|
761
|
+
o ? /* @__PURE__ */ e("div", { className: "truncate text-xs text-subtle-foreground", children: o }) : null
|
|
762
|
+
] }),
|
|
763
|
+
i ? /* @__PURE__ */ e("div", { className: "flex items-center gap-3.5", children: i }) : null
|
|
764
|
+
]
|
|
765
|
+
}
|
|
766
|
+
)
|
|
767
|
+
);
|
|
768
|
+
S.displayName = "ListItem";
|
|
769
|
+
const rt = c(
|
|
770
|
+
({ protein: a, carbs: r, fat: t, calories: n, ...o }, i) => /* @__PURE__ */ e(
|
|
771
|
+
S,
|
|
772
|
+
{
|
|
773
|
+
ref: i,
|
|
774
|
+
trailing: /* @__PURE__ */ l(A, { children: [
|
|
775
|
+
/* @__PURE__ */ l("span", { className: "text-xs font-semibold text-protein", children: [
|
|
776
|
+
"P ",
|
|
777
|
+
a,
|
|
778
|
+
"g"
|
|
779
|
+
] }),
|
|
780
|
+
/* @__PURE__ */ l("span", { className: "text-xs font-semibold text-carbs-text", children: [
|
|
781
|
+
"C ",
|
|
782
|
+
r,
|
|
783
|
+
"g"
|
|
784
|
+
] }),
|
|
785
|
+
/* @__PURE__ */ l("span", { className: "text-xs font-semibold text-fat", children: [
|
|
786
|
+
"G ",
|
|
787
|
+
t,
|
|
788
|
+
"g"
|
|
789
|
+
] }),
|
|
790
|
+
/* @__PURE__ */ l("span", { className: "min-w-16 text-right text-[15px] font-bold", children: [
|
|
791
|
+
n,
|
|
792
|
+
" kcal"
|
|
793
|
+
] })
|
|
794
|
+
] }),
|
|
795
|
+
...o
|
|
796
|
+
}
|
|
797
|
+
)
|
|
798
|
+
);
|
|
799
|
+
rt.displayName = "MealListItem";
|
|
800
|
+
const at = c(
|
|
801
|
+
({ duration: a, calories: r, ...t }, n) => /* @__PURE__ */ e(
|
|
802
|
+
S,
|
|
803
|
+
{
|
|
804
|
+
ref: n,
|
|
805
|
+
trailing: /* @__PURE__ */ l(A, { children: [
|
|
806
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] font-semibold text-muted-foreground", children: a }),
|
|
807
|
+
/* @__PURE__ */ l("span", { className: "min-w-20 text-right text-[15px] font-bold", children: [
|
|
808
|
+
r,
|
|
809
|
+
" kcal"
|
|
810
|
+
] })
|
|
811
|
+
] }),
|
|
812
|
+
...t
|
|
813
|
+
}
|
|
814
|
+
)
|
|
815
|
+
);
|
|
816
|
+
at.displayName = "WorkoutListItem";
|
|
817
|
+
const nt = c(
|
|
818
|
+
({ amount: a, muted: r = !1, ...t }, n) => /* @__PURE__ */ e(
|
|
819
|
+
S,
|
|
820
|
+
{
|
|
821
|
+
ref: n,
|
|
822
|
+
trailing: /* @__PURE__ */ e("span", { className: s("text-[15px] font-bold", r && "text-subtle-foreground"), children: a }),
|
|
823
|
+
...t
|
|
824
|
+
}
|
|
825
|
+
)
|
|
826
|
+
);
|
|
827
|
+
nt.displayName = "HydrationListItem";
|
|
828
|
+
const ot = {
|
|
829
|
+
protein: { bg: "bg-protein-bg", text: "text-protein" },
|
|
830
|
+
carbs: { bg: "bg-carbs-bg", text: "text-carbs-text" },
|
|
831
|
+
fat: { bg: "bg-fat-bg", text: "text-fat" },
|
|
832
|
+
cardio: { bg: "bg-cardio-bg", text: "text-cardio" },
|
|
833
|
+
accent: { bg: "bg-accent/15", text: "text-accent-foreground" },
|
|
834
|
+
primary: { bg: "bg-secondary", text: "text-foreground" }
|
|
835
|
+
}, st = {
|
|
836
|
+
protein: "var(--protein)",
|
|
837
|
+
carbs: "var(--carbs)",
|
|
838
|
+
fat: "var(--fat)",
|
|
839
|
+
cardio: "var(--cardio)",
|
|
840
|
+
accent: "var(--accent)",
|
|
841
|
+
primary: "var(--primary)"
|
|
842
|
+
}, it = c(
|
|
843
|
+
({ className: a, items: r, ...t }, n) => /* @__PURE__ */ l("div", { ref: n, className: s("flex flex-col", a), ...t, children: [
|
|
844
|
+
/* @__PURE__ */ e("div", { className: "grid gap-3.5", style: { gridTemplateColumns: `repeat(${r.length}, 1fr)` }, children: r.map((o) => {
|
|
845
|
+
const i = ot[o.color];
|
|
846
|
+
return /* @__PURE__ */ l("div", { className: s("rounded-tile p-5 text-center", i.bg), children: [
|
|
847
|
+
/* @__PURE__ */ e("div", { className: s("text-[26px] font-bold", i.text), children: o.value }),
|
|
848
|
+
/* @__PURE__ */ e("div", { className: s("mt-0.5 text-[13px] font-semibold", i.text), children: o.label }),
|
|
849
|
+
o.goal ? /* @__PURE__ */ e("div", { className: "mt-1.5 text-[11px] text-subtle-foreground", children: o.goal }) : null
|
|
850
|
+
] }, o.label);
|
|
851
|
+
}) }),
|
|
852
|
+
/* @__PURE__ */ e("div", { className: "mt-5 flex h-3 overflow-hidden rounded-pill", children: r.map((o) => /* @__PURE__ */ e(
|
|
853
|
+
"div",
|
|
854
|
+
{
|
|
855
|
+
style: { width: `${o.percent}%`, background: st[o.color] }
|
|
856
|
+
},
|
|
857
|
+
o.label
|
|
858
|
+
)) }),
|
|
859
|
+
/* @__PURE__ */ e("div", { className: "mt-2 flex justify-between text-[11px] text-subtle-foreground", children: r.map((o) => /* @__PURE__ */ l("span", { children: [
|
|
860
|
+
o.label,
|
|
861
|
+
" ",
|
|
862
|
+
o.percent,
|
|
863
|
+
"%"
|
|
864
|
+
] }, o.label)) })
|
|
865
|
+
] })
|
|
866
|
+
);
|
|
867
|
+
it.displayName = "MacroBreakdown";
|
|
868
|
+
const lt = c(
|
|
869
|
+
({ className: a, name: r, badge: t, online: n = !0, avatar: o, ...i }, p) => /* @__PURE__ */ l(
|
|
870
|
+
"div",
|
|
871
|
+
{
|
|
872
|
+
ref: p,
|
|
873
|
+
className: s(
|
|
874
|
+
"inline-flex items-center gap-3.5 rounded-pill bg-card py-3 pr-[18px] pl-3 shadow-card",
|
|
875
|
+
a
|
|
876
|
+
),
|
|
877
|
+
...i,
|
|
878
|
+
children: [
|
|
879
|
+
/* @__PURE__ */ l("div", { className: "relative", children: [
|
|
880
|
+
/* @__PURE__ */ e("div", { className: "flex size-[46px] items-center justify-center overflow-hidden rounded-full bg-linear-[135deg,#BEF264,#A3E635]", children: o ?? /* @__PURE__ */ e(
|
|
881
|
+
u,
|
|
882
|
+
{
|
|
883
|
+
icon: ie,
|
|
884
|
+
className: "size-[22px] text-accent-foreground",
|
|
885
|
+
strokeWidth: 2
|
|
886
|
+
}
|
|
887
|
+
) }),
|
|
888
|
+
n ? /* @__PURE__ */ e("span", { className: "absolute right-px bottom-px size-3 rounded-full border-2 border-card bg-success" }) : null
|
|
889
|
+
] }),
|
|
890
|
+
/* @__PURE__ */ l("div", { className: "pr-2", children: [
|
|
891
|
+
/* @__PURE__ */ e("div", { className: "text-[15px] font-bold", children: r }),
|
|
892
|
+
t ? /* @__PURE__ */ e("div", { className: "mt-[3px]", children: t }) : null
|
|
893
|
+
] })
|
|
894
|
+
]
|
|
895
|
+
}
|
|
896
|
+
)
|
|
897
|
+
);
|
|
898
|
+
lt.displayName = "ProfileCard";
|
|
899
|
+
const ct = {
|
|
900
|
+
protein: "var(--protein)",
|
|
901
|
+
carbs: "var(--carbs)",
|
|
902
|
+
fat: "var(--fat)",
|
|
903
|
+
cardio: "var(--cardio)",
|
|
904
|
+
accent: "var(--accent)",
|
|
905
|
+
primary: "var(--primary)"
|
|
906
|
+
}, dt = c(
|
|
907
|
+
({ className: a, value: r, label: t, valueLabel: n, color: o = "accent", ...i }, p) => {
|
|
908
|
+
const d = Math.min(100, Math.max(0, r));
|
|
909
|
+
return /* @__PURE__ */ l("div", { ref: p, className: s("flex flex-col", a), ...i, children: [
|
|
910
|
+
t || n ? /* @__PURE__ */ l("div", { className: "mb-2 flex justify-between text-[13px]", children: [
|
|
911
|
+
t ? /* @__PURE__ */ e("span", { className: "font-semibold", children: t }) : /* @__PURE__ */ e("span", {}),
|
|
912
|
+
n ? /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: n }) : null
|
|
913
|
+
] }) : null,
|
|
914
|
+
/* @__PURE__ */ e(
|
|
915
|
+
"div",
|
|
916
|
+
{
|
|
917
|
+
role: "progressbar",
|
|
918
|
+
"aria-valuenow": d,
|
|
919
|
+
"aria-valuemin": 0,
|
|
920
|
+
"aria-valuemax": 100,
|
|
921
|
+
className: "h-[9px] overflow-hidden rounded-pill bg-secondary",
|
|
922
|
+
children: /* @__PURE__ */ e(
|
|
923
|
+
"div",
|
|
924
|
+
{
|
|
925
|
+
className: "h-full rounded-pill transition-[width] duration-300",
|
|
926
|
+
style: { width: `${d}%`, background: ct[o] }
|
|
927
|
+
}
|
|
928
|
+
)
|
|
929
|
+
}
|
|
930
|
+
)
|
|
931
|
+
] });
|
|
932
|
+
}
|
|
933
|
+
);
|
|
934
|
+
dt.displayName = "ProgressBar";
|
|
935
|
+
const pt = c(
|
|
936
|
+
({
|
|
937
|
+
className: a,
|
|
938
|
+
value: r,
|
|
939
|
+
size: t = 140,
|
|
940
|
+
strokeWidth: n = 14,
|
|
941
|
+
color: o = "var(--accent)",
|
|
942
|
+
trackColor: i = "var(--secondary)",
|
|
943
|
+
label: p,
|
|
944
|
+
caption: d,
|
|
945
|
+
...m
|
|
946
|
+
}, x) => {
|
|
947
|
+
const g = Math.min(100, Math.max(0, r)), f = (t - n) / 2, v = 2 * Math.PI * f, B = v * (1 - g / 100);
|
|
948
|
+
return /* @__PURE__ */ l(
|
|
949
|
+
"div",
|
|
950
|
+
{
|
|
951
|
+
ref: x,
|
|
952
|
+
className: s("relative", a),
|
|
953
|
+
style: { width: t, height: t },
|
|
954
|
+
role: "progressbar",
|
|
955
|
+
"aria-valuenow": g,
|
|
956
|
+
"aria-valuemin": 0,
|
|
957
|
+
"aria-valuemax": 100,
|
|
958
|
+
...m,
|
|
959
|
+
children: [
|
|
960
|
+
/* @__PURE__ */ l("svg", { width: t, height: t, viewBox: `0 0 ${t} ${t}`, className: "-rotate-90", children: [
|
|
961
|
+
/* @__PURE__ */ e(
|
|
962
|
+
"circle",
|
|
963
|
+
{
|
|
964
|
+
cx: t / 2,
|
|
965
|
+
cy: t / 2,
|
|
966
|
+
r: f,
|
|
967
|
+
fill: "none",
|
|
968
|
+
stroke: i,
|
|
969
|
+
strokeWidth: n
|
|
970
|
+
}
|
|
971
|
+
),
|
|
972
|
+
/* @__PURE__ */ e(
|
|
973
|
+
"circle",
|
|
974
|
+
{
|
|
975
|
+
cx: t / 2,
|
|
976
|
+
cy: t / 2,
|
|
977
|
+
r: f,
|
|
978
|
+
fill: "none",
|
|
979
|
+
stroke: o,
|
|
980
|
+
strokeWidth: n,
|
|
981
|
+
strokeLinecap: "round",
|
|
982
|
+
strokeDasharray: v,
|
|
983
|
+
strokeDashoffset: B,
|
|
984
|
+
className: "transition-[stroke-dashoffset] duration-500"
|
|
985
|
+
}
|
|
986
|
+
)
|
|
987
|
+
] }),
|
|
988
|
+
/* @__PURE__ */ l("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
989
|
+
/* @__PURE__ */ e("span", { className: "text-[30px] font-bold", children: p ?? `${Math.round(g)}%` }),
|
|
990
|
+
d ? /* @__PURE__ */ e("span", { className: "text-xs text-subtle-foreground", children: d }) : null
|
|
991
|
+
] })
|
|
992
|
+
]
|
|
993
|
+
}
|
|
994
|
+
);
|
|
995
|
+
}
|
|
996
|
+
);
|
|
997
|
+
pt.displayName = "ProgressRing";
|
|
998
|
+
const mt = c(({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
999
|
+
O.Root,
|
|
1000
|
+
{
|
|
1001
|
+
ref: t,
|
|
1002
|
+
className: s("flex flex-col gap-3.5", a),
|
|
1003
|
+
...r
|
|
1004
|
+
}
|
|
1005
|
+
));
|
|
1006
|
+
mt.displayName = "RadioGroup";
|
|
1007
|
+
const ut = c(({ className: a, label: r, id: t, ...n }, o) => {
|
|
1008
|
+
const i = j(), p = t ?? i, d = /* @__PURE__ */ e(
|
|
1009
|
+
O.Item,
|
|
1010
|
+
{
|
|
1011
|
+
ref: o,
|
|
1012
|
+
id: p,
|
|
1013
|
+
className: s(
|
|
1014
|
+
"flex size-[22px] flex-none cursor-pointer items-center justify-center rounded-full border-2 bg-background transition-all outline-none",
|
|
1015
|
+
"border-input data-[state=checked]:border-[6px] data-[state=checked]:border-primary",
|
|
1016
|
+
"focus-visible:ring-3 focus-visible:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-60",
|
|
1017
|
+
a
|
|
1018
|
+
),
|
|
1019
|
+
...n
|
|
1020
|
+
}
|
|
1021
|
+
);
|
|
1022
|
+
return r ? /* @__PURE__ */ l("label", { htmlFor: p, className: "flex cursor-pointer items-center gap-3.5", children: [
|
|
1023
|
+
d,
|
|
1024
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: r })
|
|
1025
|
+
] }) : d;
|
|
1026
|
+
});
|
|
1027
|
+
ut.displayName = "RadioGroupItem";
|
|
1028
|
+
const Zt = b.Root, er = b.Group, tr = b.Value, xt = c(({ className: a, children: r, ...t }, n) => /* @__PURE__ */ l(
|
|
1029
|
+
b.Trigger,
|
|
1030
|
+
{
|
|
1031
|
+
ref: n,
|
|
1032
|
+
className: s(
|
|
1033
|
+
"flex w-full cursor-pointer items-center justify-between gap-2 rounded-field border border-input bg-background px-3.5 py-[11px] font-sans text-sm font-medium text-foreground transition-colors outline-none",
|
|
1034
|
+
"hover:border-subtle-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/10 disabled:cursor-not-allowed disabled:opacity-60 data-[placeholder]:text-subtle-foreground",
|
|
1035
|
+
a
|
|
1036
|
+
),
|
|
1037
|
+
...t,
|
|
1038
|
+
children: [
|
|
1039
|
+
r,
|
|
1040
|
+
/* @__PURE__ */ e(b.Icon, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1041
|
+
u,
|
|
1042
|
+
{
|
|
1043
|
+
icon: W,
|
|
1044
|
+
className: "size-4 text-muted-foreground transition-transform"
|
|
1045
|
+
}
|
|
1046
|
+
) })
|
|
1047
|
+
]
|
|
1048
|
+
}
|
|
1049
|
+
));
|
|
1050
|
+
xt.displayName = "SelectTrigger";
|
|
1051
|
+
const gt = c(({ className: a, children: r, position: t = "popper", ...n }, o) => /* @__PURE__ */ e(b.Portal, { children: /* @__PURE__ */ e(
|
|
1052
|
+
b.Content,
|
|
1053
|
+
{
|
|
1054
|
+
ref: o,
|
|
1055
|
+
position: t,
|
|
1056
|
+
className: s(
|
|
1057
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-list border border-border bg-card p-1.5 shadow-[0_12px_32px_rgba(15,23,42,0.14)]",
|
|
1058
|
+
t === "popper" && "data-[side=bottom]:translate-y-1",
|
|
1059
|
+
a
|
|
1060
|
+
),
|
|
1061
|
+
...n,
|
|
1062
|
+
children: /* @__PURE__ */ e(
|
|
1063
|
+
b.Viewport,
|
|
1064
|
+
{
|
|
1065
|
+
className: s(t === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]"),
|
|
1066
|
+
children: r
|
|
1067
|
+
}
|
|
1068
|
+
)
|
|
1069
|
+
}
|
|
1070
|
+
) }));
|
|
1071
|
+
gt.displayName = "SelectContent";
|
|
1072
|
+
const ft = c(({ className: a, children: r, ...t }, n) => /* @__PURE__ */ l(
|
|
1073
|
+
b.Item,
|
|
1074
|
+
{
|
|
1075
|
+
ref: n,
|
|
1076
|
+
className: s(
|
|
1077
|
+
"relative flex cursor-pointer items-center justify-between rounded-[9px] px-3 py-[9px] text-sm outline-none select-none",
|
|
1078
|
+
"focus:bg-secondary data-[state=checked]:font-semibold data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1079
|
+
a
|
|
1080
|
+
),
|
|
1081
|
+
...t,
|
|
1082
|
+
children: [
|
|
1083
|
+
/* @__PURE__ */ e(b.ItemText, { children: r }),
|
|
1084
|
+
/* @__PURE__ */ e(b.ItemIndicator, { children: /* @__PURE__ */ e(u, { icon: E, className: "size-4 text-accent-foreground", strokeWidth: 3 }) })
|
|
1085
|
+
]
|
|
1086
|
+
}
|
|
1087
|
+
));
|
|
1088
|
+
ft.displayName = "SelectItem";
|
|
1089
|
+
const bt = c(
|
|
1090
|
+
({ className: a, icon: r, label: t, active: n = !1, ...o }, i) => /* @__PURE__ */ l(
|
|
1091
|
+
"button",
|
|
1092
|
+
{
|
|
1093
|
+
ref: i,
|
|
1094
|
+
type: "button",
|
|
1095
|
+
"aria-current": n ? "page" : void 0,
|
|
1096
|
+
className: s(
|
|
1097
|
+
"flex w-full cursor-pointer items-center gap-3 rounded-pill px-4 py-[13px] text-left font-sans text-sm font-semibold transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/25",
|
|
1098
|
+
n ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-secondary hover:text-foreground",
|
|
1099
|
+
a
|
|
1100
|
+
),
|
|
1101
|
+
...o,
|
|
1102
|
+
children: [
|
|
1103
|
+
/* @__PURE__ */ e(u, { icon: r, className: "size-[19px] flex-none", strokeWidth: 2 }),
|
|
1104
|
+
/* @__PURE__ */ e("span", { children: t })
|
|
1105
|
+
]
|
|
1106
|
+
}
|
|
1107
|
+
)
|
|
1108
|
+
);
|
|
1109
|
+
bt.displayName = "NavItem";
|
|
1110
|
+
const ht = c(
|
|
1111
|
+
({ className: a, children: r, ...t }, n) => /* @__PURE__ */ e(
|
|
1112
|
+
"nav",
|
|
1113
|
+
{
|
|
1114
|
+
ref: n,
|
|
1115
|
+
className: s("rounded-card bg-card p-[18px] pt-[22px] shadow-card", a),
|
|
1116
|
+
...t,
|
|
1117
|
+
children: r
|
|
1118
|
+
}
|
|
1119
|
+
)
|
|
1120
|
+
);
|
|
1121
|
+
ht.displayName = "Sidebar";
|
|
1122
|
+
const Nt = c(
|
|
1123
|
+
({ className: a, name: r, logo: t, ...n }, o) => /* @__PURE__ */ l(
|
|
1124
|
+
"div",
|
|
1125
|
+
{
|
|
1126
|
+
ref: o,
|
|
1127
|
+
className: s("flex items-center gap-3 px-2.5 pt-1.5 pb-[22px]", a),
|
|
1128
|
+
...n,
|
|
1129
|
+
children: [
|
|
1130
|
+
/* @__PURE__ */ e("div", { className: "flex size-[42px] items-center justify-center rounded-[14px] bg-accent text-lg font-bold text-accent-foreground", children: t ?? r.charAt(0) }),
|
|
1131
|
+
/* @__PURE__ */ e("span", { className: "text-lg font-bold", children: r })
|
|
1132
|
+
]
|
|
1133
|
+
}
|
|
1134
|
+
)
|
|
1135
|
+
);
|
|
1136
|
+
Nt.displayName = "SidebarBrand";
|
|
1137
|
+
const vt = c(
|
|
1138
|
+
({ className: a, label: r, children: t, ...n }, o) => /* @__PURE__ */ l("div", { ref: o, className: s("flex flex-col", a), ...n, children: [
|
|
1139
|
+
r ? /* @__PURE__ */ e("span", { className: "px-2.5 pt-5 pb-2.5 font-mono text-[11px] tracking-widest text-subtle-foreground uppercase", children: r }) : null,
|
|
1140
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-1", children: t })
|
|
1141
|
+
] })
|
|
1142
|
+
);
|
|
1143
|
+
vt.displayName = "SidebarSection";
|
|
1144
|
+
const yt = c(
|
|
1145
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e("div", { ref: t, className: s("skeleton rounded-[7px]", a), ...r })
|
|
1146
|
+
);
|
|
1147
|
+
yt.displayName = "Skeleton";
|
|
1148
|
+
const wt = c(
|
|
1149
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ l(
|
|
1150
|
+
T.Root,
|
|
1151
|
+
{
|
|
1152
|
+
ref: t,
|
|
1153
|
+
className: s("relative flex h-[22px] w-full touch-none items-center select-none", a),
|
|
1154
|
+
...r,
|
|
1155
|
+
children: [
|
|
1156
|
+
/* @__PURE__ */ e(T.Track, { className: "relative h-2 w-full grow rounded-pill bg-secondary", children: /* @__PURE__ */ e(T.Range, { className: "absolute h-full rounded-pill bg-accent" }) }),
|
|
1157
|
+
/* @__PURE__ */ e(
|
|
1158
|
+
T.Thumb,
|
|
1159
|
+
{
|
|
1160
|
+
className: "block size-[22px] rounded-full border-[3px] border-primary bg-white shadow-[0_2px_6px_rgba(15,23,42,0.2)] outline-none focus-visible:ring-3 focus-visible:ring-ring/25 disabled:opacity-60",
|
|
1161
|
+
"aria-label": "Valor"
|
|
1162
|
+
}
|
|
1163
|
+
)
|
|
1164
|
+
]
|
|
1165
|
+
}
|
|
1166
|
+
)
|
|
1167
|
+
);
|
|
1168
|
+
wt.displayName = "Slider";
|
|
1169
|
+
const Ct = w("animate-spin-slow rounded-full border-secondary border-t-accent", {
|
|
1170
|
+
variants: {
|
|
1171
|
+
size: {
|
|
1172
|
+
sm: "size-6 border-[3px]",
|
|
1173
|
+
md: "size-9 border-4",
|
|
1174
|
+
lg: "size-[54px] border-[5px]"
|
|
1175
|
+
}
|
|
1176
|
+
},
|
|
1177
|
+
defaultVariants: { size: "md" }
|
|
1178
|
+
}), kt = c(
|
|
1179
|
+
({ className: a, size: r, ...t }, n) => /* @__PURE__ */ e(
|
|
1180
|
+
"div",
|
|
1181
|
+
{
|
|
1182
|
+
ref: n,
|
|
1183
|
+
role: "status",
|
|
1184
|
+
"aria-label": "Carregando",
|
|
1185
|
+
className: s(Ct({ size: r }), a),
|
|
1186
|
+
...t
|
|
1187
|
+
}
|
|
1188
|
+
)
|
|
1189
|
+
);
|
|
1190
|
+
kt.displayName = "Spinner";
|
|
1191
|
+
const Tt = w("rounded-card p-6", {
|
|
1192
|
+
variants: {
|
|
1193
|
+
variant: {
|
|
1194
|
+
light: "bg-card text-card-foreground shadow-card",
|
|
1195
|
+
accent: "bg-accent text-accent-foreground shadow-accent",
|
|
1196
|
+
dark: "bg-primary text-primary-foreground shadow-dark"
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
defaultVariants: { variant: "light" }
|
|
1200
|
+
}), D = {
|
|
1201
|
+
light: "text-muted-foreground",
|
|
1202
|
+
accent: "text-accent-muted-foreground",
|
|
1203
|
+
dark: "text-subtle-foreground"
|
|
1204
|
+
}, It = {
|
|
1205
|
+
light: "neutral",
|
|
1206
|
+
accent: "onAccent",
|
|
1207
|
+
dark: "onDark"
|
|
1208
|
+
}, Ft = c(
|
|
1209
|
+
({ className: a, variant: r = "light", icon: t, iconTone: n, label: o, value: i, unit: p, trend: d, progress: m, ...x }, g) => {
|
|
1210
|
+
const f = r ?? "light";
|
|
1211
|
+
return /* @__PURE__ */ l("div", { ref: g, className: s(Tt({ variant: r }), a), ...x, children: [
|
|
1212
|
+
/* @__PURE__ */ l("div", { className: "mb-[18px] flex items-start justify-between", children: [
|
|
1213
|
+
/* @__PURE__ */ e(z, { icon: t, tone: n ?? It[f] }),
|
|
1214
|
+
d ? /* @__PURE__ */ e("div", { children: d }) : null
|
|
1215
|
+
] }),
|
|
1216
|
+
/* @__PURE__ */ e("div", { className: s("mb-1 text-[13px]", D[f]), children: o }),
|
|
1217
|
+
/* @__PURE__ */ l("div", { className: "text-[34px] leading-none font-bold tracking-tight", children: [
|
|
1218
|
+
i,
|
|
1219
|
+
p ? /* @__PURE__ */ e("span", { className: s("ml-1 text-[15px] font-medium", D[f]), children: p }) : null
|
|
1220
|
+
] }),
|
|
1221
|
+
m ? /* @__PURE__ */ l(A, { children: [
|
|
1222
|
+
/* @__PURE__ */ e("div", { className: "mt-4 h-1.5 overflow-hidden rounded-pill bg-secondary", children: /* @__PURE__ */ e(
|
|
1223
|
+
"div",
|
|
1224
|
+
{
|
|
1225
|
+
className: "h-full rounded-pill",
|
|
1226
|
+
style: {
|
|
1227
|
+
width: `${m.value}%`,
|
|
1228
|
+
background: m.color ?? "var(--accent)"
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
) }),
|
|
1232
|
+
m.caption ? /* @__PURE__ */ e("div", { className: s("mt-2 text-xs", D[f]), children: m.caption }) : null
|
|
1233
|
+
] }) : null
|
|
1234
|
+
] });
|
|
1235
|
+
}
|
|
1236
|
+
);
|
|
1237
|
+
Ft.displayName = "StatCard";
|
|
1238
|
+
const zt = c(
|
|
1239
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
1240
|
+
L.Root,
|
|
1241
|
+
{
|
|
1242
|
+
ref: t,
|
|
1243
|
+
className: s(
|
|
1244
|
+
"peer inline-flex h-[27px] w-[46px] flex-none cursor-pointer items-center rounded-pill p-[3px] transition-colors outline-none",
|
|
1245
|
+
"focus-visible:ring-3 focus-visible:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-60",
|
|
1246
|
+
"bg-input data-[state=checked]:bg-accent",
|
|
1247
|
+
a
|
|
1248
|
+
),
|
|
1249
|
+
...r,
|
|
1250
|
+
children: /* @__PURE__ */ e(L.Thumb, { className: "pointer-events-none block size-[21px] rounded-full bg-white shadow-[0_1px_3px_rgba(15,23,42,0.3)] transition-transform data-[state=checked]:translate-x-[19px]" })
|
|
1251
|
+
}
|
|
1252
|
+
)
|
|
1253
|
+
);
|
|
1254
|
+
zt.displayName = "Switch";
|
|
1255
|
+
const rr = I.Root, St = c(({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
1256
|
+
I.List,
|
|
1257
|
+
{
|
|
1258
|
+
ref: t,
|
|
1259
|
+
className: s("inline-flex items-center gap-1.5 rounded-pill bg-secondary p-1.5", a),
|
|
1260
|
+
...r
|
|
1261
|
+
}
|
|
1262
|
+
));
|
|
1263
|
+
St.displayName = "TabsList";
|
|
1264
|
+
const Bt = c(({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
1265
|
+
I.Trigger,
|
|
1266
|
+
{
|
|
1267
|
+
ref: t,
|
|
1268
|
+
className: s(
|
|
1269
|
+
"cursor-pointer rounded-pill px-[18px] py-[9px] font-sans text-sm font-semibold whitespace-nowrap text-muted-foreground transition-colors outline-none",
|
|
1270
|
+
"hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/25",
|
|
1271
|
+
"data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:hover:text-primary-foreground",
|
|
1272
|
+
a
|
|
1273
|
+
),
|
|
1274
|
+
...r
|
|
1275
|
+
}
|
|
1276
|
+
));
|
|
1277
|
+
Bt.displayName = "TabsTrigger";
|
|
1278
|
+
const Dt = c(({ className: a, ...r }, t) => /* @__PURE__ */ e(
|
|
1279
|
+
I.Content,
|
|
1280
|
+
{
|
|
1281
|
+
ref: t,
|
|
1282
|
+
className: s("mt-5 outline-none focus-visible:ring-3 focus-visible:ring-ring/25", a),
|
|
1283
|
+
...r
|
|
1284
|
+
}
|
|
1285
|
+
));
|
|
1286
|
+
Dt.displayName = "TabsContent";
|
|
1287
|
+
const X = ue(null);
|
|
1288
|
+
function ar() {
|
|
1289
|
+
const a = me(X);
|
|
1290
|
+
if (!a) throw new Error("useToast deve ser usado dentro de ToastProvider");
|
|
1291
|
+
return a;
|
|
1292
|
+
}
|
|
1293
|
+
function nr({ children: a, duration: r = 3600 }) {
|
|
1294
|
+
const [t, n] = de([]), o = V((d) => {
|
|
1295
|
+
n((m) => {
|
|
1296
|
+
var g;
|
|
1297
|
+
const x = (((g = m[m.length - 1]) == null ? void 0 : g.id) ?? 0) + 1;
|
|
1298
|
+
return [...m, { ...d, id: x, open: !0 }];
|
|
1299
|
+
});
|
|
1300
|
+
}, []), i = V((d, m) => {
|
|
1301
|
+
m || n((x) => x.filter((g) => g.id !== d));
|
|
1302
|
+
}, []), p = pe(() => ({ toast: o }), [o]);
|
|
1303
|
+
return /* @__PURE__ */ e(X.Provider, { value: p, children: /* @__PURE__ */ l(C.Provider, { duration: r, swipeDirection: "right", children: [
|
|
1304
|
+
a,
|
|
1305
|
+
t.map((d) => {
|
|
1306
|
+
const m = d.icon ?? E;
|
|
1307
|
+
return /* @__PURE__ */ l(
|
|
1308
|
+
C.Root,
|
|
1309
|
+
{
|
|
1310
|
+
open: d.open,
|
|
1311
|
+
duration: d.duration ?? r,
|
|
1312
|
+
onOpenChange: (x) => i(d.id, x),
|
|
1313
|
+
className: "flex items-center gap-3.5 rounded-list bg-primary px-[18px] py-[15px] text-primary-foreground shadow-[0_16px_40px_rgba(15,23,42,0.35)] data-[state=open]:animate-toast-in",
|
|
1314
|
+
children: [
|
|
1315
|
+
/* @__PURE__ */ e("div", { className: "flex size-[38px] flex-none items-center justify-center rounded-[12px] bg-accent/20", children: /* @__PURE__ */ e(u, { icon: m, className: "size-[19px] text-accent", strokeWidth: 3 }) }),
|
|
1316
|
+
/* @__PURE__ */ l("div", { className: "flex-1", children: [
|
|
1317
|
+
/* @__PURE__ */ e(C.Title, { className: "text-sm font-semibold", children: d.title }),
|
|
1318
|
+
d.description ? /* @__PURE__ */ e(C.Description, { className: "text-xs text-subtle-foreground", children: d.description }) : null
|
|
1319
|
+
] }),
|
|
1320
|
+
/* @__PURE__ */ e(
|
|
1321
|
+
C.Close,
|
|
1322
|
+
{
|
|
1323
|
+
"aria-label": "Fechar",
|
|
1324
|
+
className: "flex-none cursor-pointer text-muted-foreground transition-colors hover:text-primary-foreground",
|
|
1325
|
+
children: /* @__PURE__ */ e(u, { icon: P, className: "size-[17px]" })
|
|
1326
|
+
}
|
|
1327
|
+
)
|
|
1328
|
+
]
|
|
1329
|
+
},
|
|
1330
|
+
d.id
|
|
1331
|
+
);
|
|
1332
|
+
}),
|
|
1333
|
+
/* @__PURE__ */ e(
|
|
1334
|
+
C.Viewport,
|
|
1335
|
+
{
|
|
1336
|
+
className: s(
|
|
1337
|
+
"fixed right-6 bottom-6 z-95 flex w-[340px] max-w-[calc(100vw-2rem)] flex-col gap-3 outline-none"
|
|
1338
|
+
)
|
|
1339
|
+
}
|
|
1340
|
+
)
|
|
1341
|
+
] }) });
|
|
1342
|
+
}
|
|
1343
|
+
const or = h.Provider, sr = h.Root, ir = h.Trigger, J = c(({ className: a, sideOffset: r = 8, children: t, ...n }, o) => /* @__PURE__ */ e(h.Portal, { children: /* @__PURE__ */ l(
|
|
1344
|
+
h.Content,
|
|
1345
|
+
{
|
|
1346
|
+
ref: o,
|
|
1347
|
+
sideOffset: r,
|
|
1348
|
+
className: s(
|
|
1349
|
+
"z-95 rounded-[10px] bg-primary px-3 py-2 text-xs font-medium text-primary-foreground shadow-[0_6px_18px_rgba(15,23,42,0.25)] data-[state=delayed-open]:animate-fade-in",
|
|
1350
|
+
a
|
|
1351
|
+
),
|
|
1352
|
+
...n,
|
|
1353
|
+
children: [
|
|
1354
|
+
t,
|
|
1355
|
+
/* @__PURE__ */ e(h.Arrow, { className: "fill-primary", width: 10, height: 5 })
|
|
1356
|
+
]
|
|
1357
|
+
}
|
|
1358
|
+
) }));
|
|
1359
|
+
J.displayName = "TooltipContent";
|
|
1360
|
+
function lr({ content: a, children: r, side: t = "top", delayDuration: n = 150 }) {
|
|
1361
|
+
return /* @__PURE__ */ e(h.Provider, { delayDuration: n, children: /* @__PURE__ */ l(h.Root, { children: [
|
|
1362
|
+
/* @__PURE__ */ e(h.Trigger, { asChild: !0, children: r }),
|
|
1363
|
+
/* @__PURE__ */ e(J, { side: t, children: a })
|
|
1364
|
+
] }) });
|
|
1365
|
+
}
|
|
1366
|
+
const At = c(
|
|
1367
|
+
({ className: a, brand: r, actions: t, title: n, subtitle: o, children: i, ...p }, d) => /* @__PURE__ */ l(
|
|
1368
|
+
"div",
|
|
1369
|
+
{
|
|
1370
|
+
ref: d,
|
|
1371
|
+
className: s("overflow-hidden rounded-card bg-card shadow-card", a),
|
|
1372
|
+
...p,
|
|
1373
|
+
children: [
|
|
1374
|
+
/* @__PURE__ */ l("div", { className: "flex items-center justify-between border-b border-border-soft px-6 py-[18px]", children: [
|
|
1375
|
+
/* @__PURE__ */ e("div", { className: "text-[15px] font-bold tracking-wide", children: r }),
|
|
1376
|
+
t ? /* @__PURE__ */ e("div", { className: "flex items-center gap-[18px] text-muted-foreground", children: t }) : null
|
|
1377
|
+
] }),
|
|
1378
|
+
n || o || i ? /* @__PURE__ */ l("div", { className: "p-6", children: [
|
|
1379
|
+
n ? /* @__PURE__ */ e("h3", { className: "mb-1 text-[28px] font-bold tracking-tight", children: n }) : null,
|
|
1380
|
+
o ? /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: o }) : null,
|
|
1381
|
+
i
|
|
1382
|
+
] }) : null
|
|
1383
|
+
]
|
|
1384
|
+
}
|
|
1385
|
+
)
|
|
1386
|
+
);
|
|
1387
|
+
At.displayName = "Topbar";
|
|
1388
|
+
const Pt = c(
|
|
1389
|
+
({ className: a, label: r, delta: t, direction: n, positiveIsUp: o = !0, ...i }, p) => {
|
|
1390
|
+
const d = n === "up" ? o : !o, m = n === "up" ? le : ce;
|
|
1391
|
+
return /* @__PURE__ */ l("div", { ref: p, className: s("flex items-center justify-between", a), ...i, children: [
|
|
1392
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-semibold", children: r }),
|
|
1393
|
+
/* @__PURE__ */ l(
|
|
1394
|
+
"span",
|
|
1395
|
+
{
|
|
1396
|
+
className: s(
|
|
1397
|
+
"inline-flex items-center gap-1.5 text-sm font-bold",
|
|
1398
|
+
d ? "text-success" : "text-error"
|
|
1399
|
+
),
|
|
1400
|
+
children: [
|
|
1401
|
+
/* @__PURE__ */ e(u, { icon: m, className: "size-4" }),
|
|
1402
|
+
t
|
|
1403
|
+
]
|
|
1404
|
+
}
|
|
1405
|
+
)
|
|
1406
|
+
] });
|
|
1407
|
+
}
|
|
1408
|
+
);
|
|
1409
|
+
Pt.displayName = "TrendItem";
|
|
1410
|
+
const Et = c(
|
|
1411
|
+
({ className: a, ...r }, t) => /* @__PURE__ */ e("div", { ref: t, className: s("flex flex-col gap-4", a), ...r })
|
|
1412
|
+
);
|
|
1413
|
+
Et.displayName = "TrendList";
|
|
1414
|
+
export {
|
|
1415
|
+
Gt as Accordion,
|
|
1416
|
+
Ce as AccordionContent,
|
|
1417
|
+
ye as AccordionItem,
|
|
1418
|
+
we as AccordionTrigger,
|
|
1419
|
+
Kt as AreaChart,
|
|
1420
|
+
Te as Badge,
|
|
1421
|
+
Be as Banner,
|
|
1422
|
+
qt as BarChart,
|
|
1423
|
+
Ae as Button,
|
|
1424
|
+
Ee as Card,
|
|
1425
|
+
Ve as CardContent,
|
|
1426
|
+
Re as CardDescription,
|
|
1427
|
+
je as CardHeader,
|
|
1428
|
+
_e as CardTitle,
|
|
1429
|
+
Me as ChartEmptyState,
|
|
1430
|
+
We as ChartLegend,
|
|
1431
|
+
R as ChartTooltip,
|
|
1432
|
+
Ge as Checkbox,
|
|
1433
|
+
Xt as DataTable,
|
|
1434
|
+
Jt as Dialog,
|
|
1435
|
+
Yt as DialogClose,
|
|
1436
|
+
Oe as DialogContent,
|
|
1437
|
+
Ue as DialogDescription,
|
|
1438
|
+
Xe as DialogFooter,
|
|
1439
|
+
Ke as DialogHeader,
|
|
1440
|
+
K as DialogOverlay,
|
|
1441
|
+
He as DialogPortal,
|
|
1442
|
+
qe as DialogTitle,
|
|
1443
|
+
Qt as DialogTrigger,
|
|
1444
|
+
Ut as DonutChart,
|
|
1445
|
+
Ye as EmptyState,
|
|
1446
|
+
q as FilterChip,
|
|
1447
|
+
Ze as FilterChips,
|
|
1448
|
+
nt as HydrationListItem,
|
|
1449
|
+
et as HydrationTracker,
|
|
1450
|
+
z as IconTile,
|
|
1451
|
+
U as Input,
|
|
1452
|
+
S as ListItem,
|
|
1453
|
+
it as MacroBreakdown,
|
|
1454
|
+
rt as MealListItem,
|
|
1455
|
+
Jt as Modal,
|
|
1456
|
+
bt as NavItem,
|
|
1457
|
+
lt as ProfileCard,
|
|
1458
|
+
dt as ProgressBar,
|
|
1459
|
+
pt as ProgressRing,
|
|
1460
|
+
mt as RadioGroup,
|
|
1461
|
+
ut as RadioGroupItem,
|
|
1462
|
+
tt as SearchInput,
|
|
1463
|
+
Zt as Select,
|
|
1464
|
+
gt as SelectContent,
|
|
1465
|
+
er as SelectGroup,
|
|
1466
|
+
ft as SelectItem,
|
|
1467
|
+
xt as SelectTrigger,
|
|
1468
|
+
tr as SelectValue,
|
|
1469
|
+
ht as Sidebar,
|
|
1470
|
+
Nt as SidebarBrand,
|
|
1471
|
+
vt as SidebarSection,
|
|
1472
|
+
yt as Skeleton,
|
|
1473
|
+
wt as Slider,
|
|
1474
|
+
kt as Spinner,
|
|
1475
|
+
Ft as StatCard,
|
|
1476
|
+
zt as Switch,
|
|
1477
|
+
rr as Tabs,
|
|
1478
|
+
Dt as TabsContent,
|
|
1479
|
+
St as TabsList,
|
|
1480
|
+
Bt as TabsTrigger,
|
|
1481
|
+
nr as ToastProvider,
|
|
1482
|
+
lr as Tooltip,
|
|
1483
|
+
J as TooltipContent,
|
|
1484
|
+
or as TooltipProvider,
|
|
1485
|
+
sr as TooltipRoot,
|
|
1486
|
+
ir as TooltipTrigger,
|
|
1487
|
+
At as Topbar,
|
|
1488
|
+
Pt as TrendItem,
|
|
1489
|
+
Et as TrendList,
|
|
1490
|
+
at as WorkoutListItem,
|
|
1491
|
+
ke as badgeVariants,
|
|
1492
|
+
De as buttonVariants,
|
|
1493
|
+
Pe as cardVariants,
|
|
1494
|
+
F as chartColors,
|
|
1495
|
+
s as cn,
|
|
1496
|
+
y as colors,
|
|
1497
|
+
Ot as fontFamily,
|
|
1498
|
+
Je as iconTileVariants,
|
|
1499
|
+
Ht as radius,
|
|
1500
|
+
ar as useToast
|
|
1501
|
+
};
|