@vegait/lyra-ds-v2 0.1.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 +134 -0
- package/dist/chunk-32QWDFOV.js +96 -0
- package/dist/chunk-32QWDFOV.js.map +1 -0
- package/dist/chunk-4EEFY4FU.cjs +96 -0
- package/dist/chunk-4EEFY4FU.cjs.map +1 -0
- package/dist/chunk-562W4FCG.cjs +88 -0
- package/dist/chunk-562W4FCG.cjs.map +1 -0
- package/dist/chunk-5SCF3EGT.cjs +13 -0
- package/dist/chunk-5SCF3EGT.cjs.map +1 -0
- package/dist/chunk-5XB7CPVP.cjs +34 -0
- package/dist/chunk-5XB7CPVP.cjs.map +1 -0
- package/dist/chunk-62OTWTBL.cjs +274 -0
- package/dist/chunk-62OTWTBL.cjs.map +1 -0
- package/dist/chunk-6GT2L3FX.js +63 -0
- package/dist/chunk-6GT2L3FX.js.map +1 -0
- package/dist/chunk-6HFYY5KR.cjs +67 -0
- package/dist/chunk-6HFYY5KR.cjs.map +1 -0
- package/dist/chunk-6NZHRSXB.cjs +61 -0
- package/dist/chunk-6NZHRSXB.cjs.map +1 -0
- package/dist/chunk-76G7PKIJ.cjs +42 -0
- package/dist/chunk-76G7PKIJ.cjs.map +1 -0
- package/dist/chunk-7PRTXARY.js +87 -0
- package/dist/chunk-7PRTXARY.js.map +1 -0
- package/dist/chunk-A665K552.cjs +75 -0
- package/dist/chunk-A665K552.cjs.map +1 -0
- package/dist/chunk-ABFMWZVI.cjs +89 -0
- package/dist/chunk-ABFMWZVI.cjs.map +1 -0
- package/dist/chunk-ACADNUHF.js +196 -0
- package/dist/chunk-ACADNUHF.js.map +1 -0
- package/dist/chunk-AFMNLT45.js +70 -0
- package/dist/chunk-AFMNLT45.js.map +1 -0
- package/dist/chunk-BAUTON3J.js +89 -0
- package/dist/chunk-BAUTON3J.js.map +1 -0
- package/dist/chunk-BNDEIZZQ.js +40 -0
- package/dist/chunk-BNDEIZZQ.js.map +1 -0
- package/dist/chunk-BXKWAQYI.cjs +157 -0
- package/dist/chunk-BXKWAQYI.cjs.map +1 -0
- package/dist/chunk-COFNZ2CM.js +70 -0
- package/dist/chunk-COFNZ2CM.js.map +1 -0
- package/dist/chunk-COV6FW4J.cjs +63 -0
- package/dist/chunk-COV6FW4J.cjs.map +1 -0
- package/dist/chunk-CUW7MUCY.js +55 -0
- package/dist/chunk-CUW7MUCY.js.map +1 -0
- package/dist/chunk-DKHG23OR.js +61 -0
- package/dist/chunk-DKHG23OR.js.map +1 -0
- package/dist/chunk-EMKU3IZY.js +85 -0
- package/dist/chunk-EMKU3IZY.js.map +1 -0
- package/dist/chunk-FZD2ZXN2.js +81 -0
- package/dist/chunk-FZD2ZXN2.js.map +1 -0
- package/dist/chunk-FZFA24YL.js +90 -0
- package/dist/chunk-FZFA24YL.js.map +1 -0
- package/dist/chunk-G5SLIXQ5.cjs +87 -0
- package/dist/chunk-G5SLIXQ5.cjs.map +1 -0
- package/dist/chunk-G6T2BYPC.js +88 -0
- package/dist/chunk-G6T2BYPC.js.map +1 -0
- package/dist/chunk-GGZSDAN3.cjs +43 -0
- package/dist/chunk-GGZSDAN3.cjs.map +1 -0
- package/dist/chunk-GLMTTY4G.js +34 -0
- package/dist/chunk-GLMTTY4G.js.map +1 -0
- package/dist/chunk-JQ5LATTJ.cjs +196 -0
- package/dist/chunk-JQ5LATTJ.cjs.map +1 -0
- package/dist/chunk-KLHQMRAY.js +42 -0
- package/dist/chunk-KLHQMRAY.js.map +1 -0
- package/dist/chunk-KQJCGTS3.js +13 -0
- package/dist/chunk-KQJCGTS3.js.map +1 -0
- package/dist/chunk-LBHO3VC4.cjs +81 -0
- package/dist/chunk-LBHO3VC4.cjs.map +1 -0
- package/dist/chunk-LUQS7LYG.cjs +85 -0
- package/dist/chunk-LUQS7LYG.cjs.map +1 -0
- package/dist/chunk-MMQZ7YMO.js +274 -0
- package/dist/chunk-MMQZ7YMO.js.map +1 -0
- package/dist/chunk-N7M2UZM6.js +67 -0
- package/dist/chunk-N7M2UZM6.js.map +1 -0
- package/dist/chunk-NLOLOFBX.js +43 -0
- package/dist/chunk-NLOLOFBX.js.map +1 -0
- package/dist/chunk-NPXSB4WO.js +48 -0
- package/dist/chunk-NPXSB4WO.js.map +1 -0
- package/dist/chunk-NVCGKCTH.cjs +90 -0
- package/dist/chunk-NVCGKCTH.cjs.map +1 -0
- package/dist/chunk-NZOAZF3W.cjs +67 -0
- package/dist/chunk-NZOAZF3W.cjs.map +1 -0
- package/dist/chunk-OS2O66IV.cjs +40 -0
- package/dist/chunk-OS2O66IV.cjs.map +1 -0
- package/dist/chunk-P5BKGZY2.cjs +55 -0
- package/dist/chunk-P5BKGZY2.cjs.map +1 -0
- package/dist/chunk-POMJPII4.cjs +70 -0
- package/dist/chunk-POMJPII4.cjs.map +1 -0
- package/dist/chunk-QSRVMLAL.cjs +40 -0
- package/dist/chunk-QSRVMLAL.cjs.map +1 -0
- package/dist/chunk-R5SUYP2F.cjs +14 -0
- package/dist/chunk-R5SUYP2F.cjs.map +1 -0
- package/dist/chunk-RBPMBCU3.js +157 -0
- package/dist/chunk-RBPMBCU3.js.map +1 -0
- package/dist/chunk-RZQAADXK.cjs +274 -0
- package/dist/chunk-RZQAADXK.cjs.map +1 -0
- package/dist/chunk-SPAC4VNO.js +67 -0
- package/dist/chunk-SPAC4VNO.js.map +1 -0
- package/dist/chunk-TONUCO3E.cjs +70 -0
- package/dist/chunk-TONUCO3E.cjs.map +1 -0
- package/dist/chunk-V7DPKW5E.cjs +48 -0
- package/dist/chunk-V7DPKW5E.cjs.map +1 -0
- package/dist/chunk-W3H3KWRL.js +274 -0
- package/dist/chunk-W3H3KWRL.js.map +1 -0
- package/dist/chunk-XFMTGORU.js +40 -0
- package/dist/chunk-XFMTGORU.js.map +1 -0
- package/dist/chunk-YVPOTKKQ.js +75 -0
- package/dist/chunk-YVPOTKKQ.js.map +1 -0
- package/dist/chunk-ZYPEUNSY.js +14 -0
- package/dist/chunk-ZYPEUNSY.js.map +1 -0
- package/dist/components/alert.cjs +9 -0
- package/dist/components/alert.cjs.map +1 -0
- package/dist/components/alert.d.cts +17 -0
- package/dist/components/alert.d.ts +17 -0
- package/dist/components/alert.js +9 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/avatar.cjs +9 -0
- package/dist/components/avatar.cjs.map +1 -0
- package/dist/components/avatar.d.cts +12 -0
- package/dist/components/avatar.d.ts +12 -0
- package/dist/components/avatar.js +9 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.cjs +11 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.d.cts +12 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +11 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/bulk-bar.cjs +11 -0
- package/dist/components/bulk-bar.cjs.map +1 -0
- package/dist/components/bulk-bar.d.cts +19 -0
- package/dist/components/bulk-bar.d.ts +19 -0
- package/dist/components/bulk-bar.js +11 -0
- package/dist/components/bulk-bar.js.map +1 -0
- package/dist/components/button.cjs +11 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.d.cts +15 -0
- package/dist/components/button.d.ts +15 -0
- package/dist/components/button.js +11 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.cjs +15 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.d.cts +8 -0
- package/dist/components/card.d.ts +8 -0
- package/dist/components/card.js +15 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/data-table.cjs +10 -0
- package/dist/components/data-table.cjs.map +1 -0
- package/dist/components/data-table.d.cts +33 -0
- package/dist/components/data-table.d.ts +33 -0
- package/dist/components/data-table.js +10 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/date-picker.cjs +10 -0
- package/dist/components/date-picker.cjs.map +1 -0
- package/dist/components/date-picker.d.cts +16 -0
- package/dist/components/date-picker.d.ts +16 -0
- package/dist/components/date-picker.js +10 -0
- package/dist/components/date-picker.js.map +1 -0
- package/dist/components/destructive-dialog.cjs +13 -0
- package/dist/components/destructive-dialog.cjs.map +1 -0
- package/dist/components/destructive-dialog.d.cts +19 -0
- package/dist/components/destructive-dialog.d.ts +19 -0
- package/dist/components/destructive-dialog.js +13 -0
- package/dist/components/destructive-dialog.js.map +1 -0
- package/dist/components/dropdown-menu.cjs +38 -0
- package/dist/components/dropdown-menu.cjs.map +1 -0
- package/dist/components/dropdown-menu.d.cts +32 -0
- package/dist/components/dropdown-menu.d.ts +32 -0
- package/dist/components/dropdown-menu.js +38 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/empty-state.cjs +10 -0
- package/dist/components/empty-state.cjs.map +1 -0
- package/dist/components/empty-state.d.cts +23 -0
- package/dist/components/empty-state.d.ts +23 -0
- package/dist/components/empty-state.js +10 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/filter-chips.cjs +9 -0
- package/dist/components/filter-chips.cjs.map +1 -0
- package/dist/components/filter-chips.d.cts +15 -0
- package/dist/components/filter-chips.d.ts +15 -0
- package/dist/components/filter-chips.js +9 -0
- package/dist/components/filter-chips.js.map +1 -0
- package/dist/components/input.cjs +9 -0
- package/dist/components/input.cjs.map +1 -0
- package/dist/components/input.d.cts +10 -0
- package/dist/components/input.d.ts +10 -0
- package/dist/components/input.js +9 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/kpi-cards.cjs +8 -0
- package/dist/components/kpi-cards.cjs.map +1 -0
- package/dist/components/kpi-cards.d.cts +15 -0
- package/dist/components/kpi-cards.d.ts +15 -0
- package/dist/components/kpi-cards.js +8 -0
- package/dist/components/kpi-cards.js.map +1 -0
- package/dist/components/list-page.cjs +21 -0
- package/dist/components/list-page.cjs.map +1 -0
- package/dist/components/list-page.d.cts +87 -0
- package/dist/components/list-page.d.ts +87 -0
- package/dist/components/list-page.js +21 -0
- package/dist/components/list-page.js.map +1 -0
- package/dist/components/modal.cjs +10 -0
- package/dist/components/modal.cjs.map +1 -0
- package/dist/components/modal.d.cts +16 -0
- package/dist/components/modal.d.ts +16 -0
- package/dist/components/modal.js +10 -0
- package/dist/components/modal.js.map +1 -0
- package/dist/components/pagination-bar.cjs +10 -0
- package/dist/components/pagination-bar.cjs.map +1 -0
- package/dist/components/pagination-bar.d.cts +11 -0
- package/dist/components/pagination-bar.d.ts +11 -0
- package/dist/components/pagination-bar.js +10 -0
- package/dist/components/pagination-bar.js.map +1 -0
- package/dist/components/progress-bar.cjs +9 -0
- package/dist/components/progress-bar.cjs.map +1 -0
- package/dist/components/progress-bar.d.cts +21 -0
- package/dist/components/progress-bar.d.ts +21 -0
- package/dist/components/progress-bar.js +9 -0
- package/dist/components/progress-bar.js.map +1 -0
- package/dist/components/radio-group.cjs +12 -0
- package/dist/components/radio-group.cjs.map +1 -0
- package/dist/components/radio-group.d.cts +22 -0
- package/dist/components/radio-group.d.ts +22 -0
- package/dist/components/radio-group.js +12 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/sidebar.cjs +11 -0
- package/dist/components/sidebar.cjs.map +1 -0
- package/dist/components/sidebar.d.cts +24 -0
- package/dist/components/sidebar.d.ts +24 -0
- package/dist/components/sidebar.js +11 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/skeleton.cjs +17 -0
- package/dist/components/skeleton.cjs.map +1 -0
- package/dist/components/skeleton.d.cts +15 -0
- package/dist/components/skeleton.d.ts +15 -0
- package/dist/components/skeleton.js +17 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/status-tag.cjs +9 -0
- package/dist/components/status-tag.cjs.map +1 -0
- package/dist/components/status-tag.d.cts +11 -0
- package/dist/components/status-tag.d.ts +11 -0
- package/dist/components/status-tag.js +9 -0
- package/dist/components/status-tag.js.map +1 -0
- package/dist/components/tabs.cjs +16 -0
- package/dist/components/tabs.cjs.map +1 -0
- package/dist/components/tabs.d.cts +9 -0
- package/dist/components/tabs.d.ts +9 -0
- package/dist/components/tabs.js +16 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/toggle.cjs +10 -0
- package/dist/components/toggle.cjs.map +1 -0
- package/dist/components/toggle.d.cts +14 -0
- package/dist/components/toggle.d.ts +14 -0
- package/dist/components/toggle.js +10 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tooltip.cjs +10 -0
- package/dist/components/tooltip.cjs.map +1 -0
- package/dist/components/tooltip.d.cts +13 -0
- package/dist/components/tooltip.d.ts +13 -0
- package/dist/components/tooltip.js +10 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/index.cjs +160 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +160 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/global.css +322 -0
- package/package.json +71 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
PaginationBar
|
|
4
|
+
} from "./chunk-BNDEIZZQ.js";
|
|
5
|
+
import {
|
|
6
|
+
safeHref
|
|
7
|
+
} from "./chunk-ZYPEUNSY.js";
|
|
8
|
+
import {
|
|
9
|
+
DestructiveDialog
|
|
10
|
+
} from "./chunk-BAUTON3J.js";
|
|
11
|
+
import {
|
|
12
|
+
EmptyState
|
|
13
|
+
} from "./chunk-32QWDFOV.js";
|
|
14
|
+
import {
|
|
15
|
+
FilterChips
|
|
16
|
+
} from "./chunk-GLMTTY4G.js";
|
|
17
|
+
import {
|
|
18
|
+
KpiCards
|
|
19
|
+
} from "./chunk-KLHQMRAY.js";
|
|
20
|
+
import {
|
|
21
|
+
BulkBar
|
|
22
|
+
} from "./chunk-NLOLOFBX.js";
|
|
23
|
+
import {
|
|
24
|
+
Button
|
|
25
|
+
} from "./chunk-EMKU3IZY.js";
|
|
26
|
+
import {
|
|
27
|
+
DataTable
|
|
28
|
+
} from "./chunk-MMQZ7YMO.js";
|
|
29
|
+
import {
|
|
30
|
+
cn
|
|
31
|
+
} from "./chunk-KQJCGTS3.js";
|
|
32
|
+
|
|
33
|
+
// src/components/list-page.tsx
|
|
34
|
+
import * as React from "react";
|
|
35
|
+
import { Search } from "lucide-react";
|
|
36
|
+
import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
|
|
37
|
+
var Root = React.forwardRef(
|
|
38
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col", className), ...props })
|
|
39
|
+
);
|
|
40
|
+
Root.displayName = "ListPage.Root";
|
|
41
|
+
function Header({
|
|
42
|
+
title,
|
|
43
|
+
description,
|
|
44
|
+
breadcrumbs,
|
|
45
|
+
primaryAction,
|
|
46
|
+
secondaryActions
|
|
47
|
+
}) {
|
|
48
|
+
return /* @__PURE__ */ jsxs("div", { className: "mb-[var(--space-block)]", children: [
|
|
49
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx("nav", { className: "flex items-center gap-1 mb-2 text-body-sm text-[var(--color-on-surface-var)]", children: breadcrumbs.map((b, i) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
50
|
+
i > 0 && /* @__PURE__ */ jsx("span", { children: "/" }),
|
|
51
|
+
b.href ? /* @__PURE__ */ jsx(
|
|
52
|
+
"a",
|
|
53
|
+
{
|
|
54
|
+
href: safeHref(b.href),
|
|
55
|
+
className: "hover:text-[var(--color-on-surface)] transition-colors",
|
|
56
|
+
children: b.label
|
|
57
|
+
}
|
|
58
|
+
) : /* @__PURE__ */ jsx("span", { children: b.label })
|
|
59
|
+
] }, i)) }),
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
61
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
62
|
+
/* @__PURE__ */ jsx("h1", { className: "text-display-sm text-[var(--color-on-surface)]", children: title }),
|
|
63
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-body-md text-[var(--color-on-surface-var)] mt-1", children: description })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
66
|
+
secondaryActions?.map((a) => {
|
|
67
|
+
const Icon = a.icon;
|
|
68
|
+
return /* @__PURE__ */ jsxs(Button, { variant: "outlined", size: "sm", onClick: a.onClick, children: [
|
|
69
|
+
Icon && /* @__PURE__ */ jsx(Icon, { className: "size-4" }),
|
|
70
|
+
a.label
|
|
71
|
+
] }, a.label);
|
|
72
|
+
}),
|
|
73
|
+
primaryAction && /* @__PURE__ */ jsx(Button, { variant: "primary", size: "md", onClick: primaryAction.onClick, children: primaryAction.label })
|
|
74
|
+
] })
|
|
75
|
+
] })
|
|
76
|
+
] });
|
|
77
|
+
}
|
|
78
|
+
function Metrics({ metrics }) {
|
|
79
|
+
if (!metrics.length) return null;
|
|
80
|
+
return /* @__PURE__ */ jsx(KpiCards, { metrics });
|
|
81
|
+
}
|
|
82
|
+
var Card = React.forwardRef(
|
|
83
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
ref,
|
|
87
|
+
className: cn(
|
|
88
|
+
"bg-[var(--color-surface)] border border-[var(--color-outline-variant)]",
|
|
89
|
+
"rounded-[var(--radius-lg)] overflow-hidden",
|
|
90
|
+
className
|
|
91
|
+
),
|
|
92
|
+
...props
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
);
|
|
96
|
+
Card.displayName = "ListPage.Card";
|
|
97
|
+
var Toolbar = React.forwardRef(
|
|
98
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
ref,
|
|
102
|
+
className: cn(
|
|
103
|
+
"border-b border-[var(--color-outline-variant)]",
|
|
104
|
+
"flex items-center gap-3 px-4 py-3",
|
|
105
|
+
className
|
|
106
|
+
),
|
|
107
|
+
...props,
|
|
108
|
+
children
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
Toolbar.displayName = "ListPage.Toolbar";
|
|
113
|
+
var SearchInput = React.forwardRef(
|
|
114
|
+
({ placeholder = "Buscar...", value, onChange }, ref) => /* @__PURE__ */ jsxs("div", { className: "relative flex-1 max-w-xs", children: [
|
|
115
|
+
/* @__PURE__ */ jsx(
|
|
116
|
+
Search,
|
|
117
|
+
{
|
|
118
|
+
className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 size-4 text-[var(--color-on-surface-var)]",
|
|
119
|
+
"aria-hidden": "true"
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ jsx(
|
|
123
|
+
"input",
|
|
124
|
+
{
|
|
125
|
+
ref,
|
|
126
|
+
type: "search",
|
|
127
|
+
placeholder,
|
|
128
|
+
value,
|
|
129
|
+
onChange: (e) => onChange?.(e.target.value),
|
|
130
|
+
className: cn(
|
|
131
|
+
"w-full h-8 pl-9 pr-3 text-body-md rounded-[var(--radius-md)]",
|
|
132
|
+
"border border-[var(--color-outline)] bg-[var(--color-surf-container)]",
|
|
133
|
+
"text-[var(--color-on-surface)] placeholder:text-[var(--color-on-surface-var)]",
|
|
134
|
+
"focus:outline-none focus:border-[var(--color-action-primary)] focus:ring-2 focus:ring-[var(--state-focus-ring)]"
|
|
135
|
+
)
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
] })
|
|
139
|
+
);
|
|
140
|
+
SearchInput.displayName = "ListPage.Search";
|
|
141
|
+
function Filters({ filters, active, onChange }) {
|
|
142
|
+
return /* @__PURE__ */ jsx(FilterChips, { filters, active, onChange });
|
|
143
|
+
}
|
|
144
|
+
function BulkBar2({ selectedRows, actions, onClear }) {
|
|
145
|
+
const [pendingAction, setPendingAction] = React.useState(null);
|
|
146
|
+
function handleAction(action) {
|
|
147
|
+
if (action.destructive) {
|
|
148
|
+
setPendingAction(action);
|
|
149
|
+
} else {
|
|
150
|
+
action.onClick(selectedRows);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function handleConfirm() {
|
|
154
|
+
if (!pendingAction) return;
|
|
155
|
+
pendingAction.onClick(selectedRows);
|
|
156
|
+
setPendingAction(null);
|
|
157
|
+
onClear();
|
|
158
|
+
}
|
|
159
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
160
|
+
/* @__PURE__ */ jsx(
|
|
161
|
+
BulkBar,
|
|
162
|
+
{
|
|
163
|
+
count: selectedRows.length,
|
|
164
|
+
bulkActions: actions,
|
|
165
|
+
onClear,
|
|
166
|
+
onAction: handleAction
|
|
167
|
+
}
|
|
168
|
+
),
|
|
169
|
+
pendingAction && /* @__PURE__ */ jsx(
|
|
170
|
+
DestructiveDialog,
|
|
171
|
+
{
|
|
172
|
+
open: !!pendingAction,
|
|
173
|
+
onClose: () => setPendingAction(null),
|
|
174
|
+
onConfirm: handleConfirm,
|
|
175
|
+
title: pendingAction.confirmTitle ?? pendingAction.label,
|
|
176
|
+
description: `Esta a\xE7\xE3o ser\xE1 aplicada a ${selectedRows.length} item${selectedRows.length !== 1 ? "s" : ""} e n\xE3o pode ser desfeita.`,
|
|
177
|
+
consequenceList: pendingAction.consequenceList,
|
|
178
|
+
confirmLabel: pendingAction.confirmLabel ?? pendingAction.label
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
] });
|
|
182
|
+
}
|
|
183
|
+
function Body({
|
|
184
|
+
columns,
|
|
185
|
+
rows,
|
|
186
|
+
rowKey,
|
|
187
|
+
selectedRows,
|
|
188
|
+
onSelectRows,
|
|
189
|
+
loading,
|
|
190
|
+
empty,
|
|
191
|
+
emptyState,
|
|
192
|
+
noResults,
|
|
193
|
+
error,
|
|
194
|
+
onRetry,
|
|
195
|
+
defaultSort,
|
|
196
|
+
onSortChange,
|
|
197
|
+
virtualized,
|
|
198
|
+
maxHeight,
|
|
199
|
+
rowHeight
|
|
200
|
+
}) {
|
|
201
|
+
const showEmpty = !loading && (empty || rows.length === 0) && !noResults && !error;
|
|
202
|
+
const showNoResults = !loading && noResults && rows.length === 0;
|
|
203
|
+
const showError = !loading && error;
|
|
204
|
+
if (showError) {
|
|
205
|
+
return /* @__PURE__ */ jsx(
|
|
206
|
+
EmptyState,
|
|
207
|
+
{
|
|
208
|
+
variant: "error",
|
|
209
|
+
title: "Erro ao carregar",
|
|
210
|
+
description: "N\xE3o foi poss\xEDvel carregar os dados.",
|
|
211
|
+
size: "inline",
|
|
212
|
+
primaryAction: onRetry ? { label: "Tentar novamente", onClick: onRetry } : void 0
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
if (showNoResults) {
|
|
217
|
+
return /* @__PURE__ */ jsx(
|
|
218
|
+
EmptyState,
|
|
219
|
+
{
|
|
220
|
+
variant: "no-results",
|
|
221
|
+
title: "Nenhum resultado",
|
|
222
|
+
description: "Tente ajustar os filtros ou a busca.",
|
|
223
|
+
size: "inline"
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
if (showEmpty) {
|
|
228
|
+
return /* @__PURE__ */ jsx(
|
|
229
|
+
EmptyState,
|
|
230
|
+
{
|
|
231
|
+
variant: "no-data",
|
|
232
|
+
title: "Nenhum item encontrado",
|
|
233
|
+
size: "inline",
|
|
234
|
+
...emptyState
|
|
235
|
+
}
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
return /* @__PURE__ */ jsx(
|
|
239
|
+
DataTable,
|
|
240
|
+
{
|
|
241
|
+
columns,
|
|
242
|
+
rows,
|
|
243
|
+
rowKey,
|
|
244
|
+
selectedRows,
|
|
245
|
+
onSelectRows,
|
|
246
|
+
loading,
|
|
247
|
+
defaultSort,
|
|
248
|
+
onSortChange,
|
|
249
|
+
virtualized,
|
|
250
|
+
maxHeight,
|
|
251
|
+
rowHeight
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
function Pagination(props) {
|
|
256
|
+
return /* @__PURE__ */ jsx(PaginationBar, { ...props });
|
|
257
|
+
}
|
|
258
|
+
var ListPage = {
|
|
259
|
+
Root,
|
|
260
|
+
Header,
|
|
261
|
+
Metrics,
|
|
262
|
+
Card,
|
|
263
|
+
Toolbar,
|
|
264
|
+
Search: SearchInput,
|
|
265
|
+
Filters,
|
|
266
|
+
BulkBar: BulkBar2,
|
|
267
|
+
Body,
|
|
268
|
+
Pagination
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export {
|
|
272
|
+
ListPage
|
|
273
|
+
};
|
|
274
|
+
//# sourceMappingURL=chunk-W3H3KWRL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/list-page.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Search } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Button } from \"./button\";\nimport { EmptyState, type EmptyStateProps } from \"./empty-state\";\nimport { DestructiveDialog } from \"./destructive-dialog\";\nimport { KpiCards, type MetricCard } from \"./kpi-cards\";\nimport { FilterChips, type ListPageFilter } from \"./filter-chips\";\nimport { BulkBar as BaseBulkBar, type ListPageBulkAction } from \"./bulk-bar\";\nimport {\n DataTable,\n type DataTableColumn,\n type DataTableSort,\n} from \"./data-table\";\nimport { PaginationBar } from \"./pagination-bar\";\nimport { cn } from \"../lib/utils\";\nimport { safeHref } from \"../lib/safe-href\";\n\nexport type {\n MetricCard,\n ListPageFilter,\n ListPageBulkAction,\n DataTableColumn,\n DataTableSort,\n};\n\n// ─── Root ─────────────────────────────────────────────────────────────────────\n\nconst Root = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex flex-col\", className)} {...props} />\n )\n);\nRoot.displayName = \"ListPage.Root\";\n\n// ─── Header ───────────────────────────────────────────────────────────────────\n\nexport interface ListPageHeaderProps {\n title: string;\n description?: string;\n breadcrumbs?: { label: string; href?: string }[];\n primaryAction?: { label: string; onClick: () => void };\n secondaryActions?: { label: string; onClick: () => void; icon?: LucideIcon }[];\n}\n\nfunction Header({\n title,\n description,\n breadcrumbs,\n primaryAction,\n secondaryActions,\n}: ListPageHeaderProps) {\n return (\n <div className=\"mb-[var(--space-block)]\">\n {breadcrumbs && breadcrumbs.length > 0 && (\n <nav className=\"flex items-center gap-1 mb-2 text-body-sm text-[var(--color-on-surface-var)]\">\n {breadcrumbs.map((b, i) => (\n <React.Fragment key={i}>\n {i > 0 && <span>/</span>}\n {b.href ? (\n <a\n href={safeHref(b.href)}\n className=\"hover:text-[var(--color-on-surface)] transition-colors\"\n >\n {b.label}\n </a>\n ) : (\n <span>{b.label}</span>\n )}\n </React.Fragment>\n ))}\n </nav>\n )}\n <div className=\"flex items-start justify-between gap-4\">\n <div>\n <h1 className=\"text-display-sm text-[var(--color-on-surface)]\">{title}</h1>\n {description && (\n <p className=\"text-body-md text-[var(--color-on-surface-var)] mt-1\">\n {description}\n </p>\n )}\n </div>\n <div className=\"flex items-center gap-2 shrink-0\">\n {secondaryActions?.map((a) => {\n const Icon = a.icon;\n return (\n <Button key={a.label} variant=\"outlined\" size=\"sm\" onClick={a.onClick}>\n {Icon && <Icon className=\"size-4\" />}\n {a.label}\n </Button>\n );\n })}\n {primaryAction && (\n <Button variant=\"primary\" size=\"md\" onClick={primaryAction.onClick}>\n {primaryAction.label}\n </Button>\n )}\n </div>\n </div>\n </div>\n );\n}\n\n// ─── Metrics ──────────────────────────────────────────────────────────────────\n\nfunction Metrics({ metrics }: { metrics: MetricCard[] }) {\n if (!metrics.length) return null;\n return <KpiCards metrics={metrics} />;\n}\n\n// ─── Card ─────────────────────────────────────────────────────────────────────\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"bg-[var(--color-surface)] border border-[var(--color-outline-variant)]\",\n \"rounded-[var(--radius-lg)] overflow-hidden\",\n className\n )}\n {...props}\n />\n )\n);\nCard.displayName = \"ListPage.Card\";\n\n// ─── Toolbar ──────────────────────────────────────────────────────────────────\n\nconst Toolbar = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"border-b border-[var(--color-outline-variant)]\",\n \"flex items-center gap-3 px-4 py-3\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n);\nToolbar.displayName = \"ListPage.Toolbar\";\n\n// ─── Search ───────────────────────────────────────────────────────────────────\n\nexport interface ListPageSearchProps {\n placeholder?: string;\n value?: string;\n onChange?: (value: string) => void;\n}\n\nconst SearchInput = React.forwardRef<HTMLInputElement, ListPageSearchProps>(\n ({ placeholder = \"Buscar...\", value, onChange }, ref) => (\n <div className=\"relative flex-1 max-w-xs\">\n <Search\n className=\"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 size-4 text-[var(--color-on-surface-var)]\"\n aria-hidden=\"true\"\n />\n <input\n ref={ref}\n type=\"search\"\n placeholder={placeholder}\n value={value}\n onChange={(e) => onChange?.(e.target.value)}\n className={cn(\n \"w-full h-8 pl-9 pr-3 text-body-md rounded-[var(--radius-md)]\",\n \"border border-[var(--color-outline)] bg-[var(--color-surf-container)]\",\n \"text-[var(--color-on-surface)] placeholder:text-[var(--color-on-surface-var)]\",\n \"focus:outline-none focus:border-[var(--color-action-primary)] focus:ring-2 focus:ring-[var(--state-focus-ring)]\"\n )}\n />\n </div>\n )\n);\nSearchInput.displayName = \"ListPage.Search\";\n\n// ─── Filters ──────────────────────────────────────────────────────────────────\n\nexport interface ListPageFiltersProps {\n filters: ListPageFilter[];\n active: string;\n onChange: (value: string) => void;\n}\n\nfunction Filters({ filters, active, onChange }: ListPageFiltersProps) {\n return <FilterChips filters={filters} active={active} onChange={onChange} />;\n}\n\n// ─── BulkBar ──────────────────────────────────────────────────────────────────\n\nexport interface ListPageBulkBarProps {\n selectedRows: string[];\n actions: ListPageBulkAction[];\n onClear: () => void;\n}\n\nfunction BulkBar({ selectedRows, actions, onClear }: ListPageBulkBarProps) {\n const [pendingAction, setPendingAction] =\n React.useState<ListPageBulkAction | null>(null);\n\n function handleAction(action: ListPageBulkAction) {\n if (action.destructive) {\n setPendingAction(action);\n } else {\n action.onClick(selectedRows);\n }\n }\n\n function handleConfirm() {\n if (!pendingAction) return;\n pendingAction.onClick(selectedRows);\n setPendingAction(null);\n onClear();\n }\n\n return (\n <>\n <BaseBulkBar\n count={selectedRows.length}\n bulkActions={actions}\n onClear={onClear}\n onAction={handleAction}\n />\n {pendingAction && (\n <DestructiveDialog\n open={!!pendingAction}\n onClose={() => setPendingAction(null)}\n onConfirm={handleConfirm}\n title={pendingAction.confirmTitle ?? pendingAction.label}\n description={`Esta ação será aplicada a ${selectedRows.length} item${\n selectedRows.length !== 1 ? \"s\" : \"\"\n } e não pode ser desfeita.`}\n consequenceList={pendingAction.consequenceList}\n confirmLabel={pendingAction.confirmLabel ?? pendingAction.label}\n />\n )}\n </>\n );\n}\n\n// ─── Body ─────────────────────────────────────────────────────────────────────\n\nexport interface ListPageBodyProps<T> {\n columns: DataTableColumn<T>[];\n rows: T[];\n rowKey: keyof T | ((row: T) => string);\n selectedRows?: string[];\n onSelectRows?: (ids: string[]) => void;\n loading?: boolean;\n empty?: boolean;\n emptyState?: Partial<EmptyStateProps>;\n noResults?: boolean;\n error?: boolean;\n onRetry?: () => void;\n defaultSort?: DataTableSort;\n onSortChange?: (sort: DataTableSort | null) => void;\n virtualized?: boolean;\n maxHeight?: string | number;\n rowHeight?: number;\n}\n\nfunction Body<T>({\n columns,\n rows,\n rowKey,\n selectedRows,\n onSelectRows,\n loading,\n empty,\n emptyState,\n noResults,\n error,\n onRetry,\n defaultSort,\n onSortChange,\n virtualized,\n maxHeight,\n rowHeight,\n}: ListPageBodyProps<T>) {\n const showEmpty = !loading && (empty || rows.length === 0) && !noResults && !error;\n const showNoResults = !loading && noResults && rows.length === 0;\n const showError = !loading && error;\n\n if (showError) {\n return (\n <EmptyState\n variant=\"error\"\n title=\"Erro ao carregar\"\n description=\"Não foi possível carregar os dados.\"\n size=\"inline\"\n primaryAction={\n onRetry ? { label: \"Tentar novamente\", onClick: onRetry } : undefined\n }\n />\n );\n }\n if (showNoResults) {\n return (\n <EmptyState\n variant=\"no-results\"\n title=\"Nenhum resultado\"\n description=\"Tente ajustar os filtros ou a busca.\"\n size=\"inline\"\n />\n );\n }\n if (showEmpty) {\n return (\n <EmptyState\n variant=\"no-data\"\n title=\"Nenhum item encontrado\"\n size=\"inline\"\n {...emptyState}\n />\n );\n }\n return (\n <DataTable\n columns={columns}\n rows={rows}\n rowKey={rowKey}\n selectedRows={selectedRows}\n onSelectRows={onSelectRows}\n loading={loading}\n defaultSort={defaultSort}\n onSortChange={onSortChange}\n virtualized={virtualized}\n maxHeight={maxHeight}\n rowHeight={rowHeight}\n />\n );\n}\n\n// ─── Pagination ───────────────────────────────────────────────────────────────\n\nexport interface ListPagePaginationProps {\n page: number;\n pageSize: number;\n total: number;\n onPageChange: (page: number) => void;\n}\n\nfunction Pagination(props: ListPagePaginationProps) {\n return <PaginationBar {...props} />;\n}\n\n// ─── Compound export ─────────────────────────────────────────────────────────\n\nconst ListPage = {\n Root,\n Header,\n Metrics,\n Card,\n Toolbar,\n Search: SearchInput,\n Filters,\n BulkBar,\n Body,\n Pagination,\n};\n\nexport { ListPage };\n"],"mappings":"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","names":["Fragment","BulkBar"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-KQJCGTS3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/skeleton.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function toPx(value) {
|
|
10
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
11
|
+
}
|
|
12
|
+
var Skeleton = React.forwardRef(
|
|
13
|
+
({ width = "100%", height = "16px", borderRadius = "4px", className }, ref) => /* @__PURE__ */ jsx(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
className: cn("lyra-skeleton bg-[var(--color-surf-container-high)]", className),
|
|
18
|
+
style: { width: toPx(width), height: toPx(height), borderRadius },
|
|
19
|
+
"aria-hidden": "true"
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
Skeleton.displayName = "Skeleton";
|
|
24
|
+
var SkeletonText = React.forwardRef(({ width, className }, ref) => /* @__PURE__ */ jsx(Skeleton, { ref, width, height: "14px", borderRadius: "4px", className }));
|
|
25
|
+
SkeletonText.displayName = "SkeletonText";
|
|
26
|
+
var SkeletonAvatar = React.forwardRef(({ className }, ref) => /* @__PURE__ */ jsx(Skeleton, { ref, width: "32px", height: "32px", borderRadius: "50%", className }));
|
|
27
|
+
SkeletonAvatar.displayName = "SkeletonAvatar";
|
|
28
|
+
var SkeletonCard = React.forwardRef(({ width, className }, ref) => /* @__PURE__ */ jsx(Skeleton, { ref, width, height: "120px", borderRadius: "8px", className }));
|
|
29
|
+
SkeletonCard.displayName = "SkeletonCard";
|
|
30
|
+
var SkeletonButton = React.forwardRef(({ className }, ref) => /* @__PURE__ */ jsx(Skeleton, { ref, width: "120px", height: "36px", borderRadius: "6px", className }));
|
|
31
|
+
SkeletonButton.displayName = "SkeletonButton";
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
Skeleton,
|
|
35
|
+
SkeletonText,
|
|
36
|
+
SkeletonAvatar,
|
|
37
|
+
SkeletonCard,
|
|
38
|
+
SkeletonButton
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=chunk-XFMTGORU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/skeleton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport interface SkeletonProps {\n width?: string | number;\n height?: string | number;\n borderRadius?: string;\n className?: string;\n}\n\nfunction toPx(value: string | number): string {\n return typeof value === \"number\" ? `${value}px` : value;\n}\n\nconst Skeleton = React.forwardRef<HTMLDivElement, SkeletonProps>(\n ({ width = \"100%\", height = \"16px\", borderRadius = \"4px\", className }, ref) => (\n <div\n ref={ref}\n className={cn(\"lyra-skeleton bg-[var(--color-surf-container-high)]\", className)}\n style={{ width: toPx(width), height: toPx(height), borderRadius }}\n aria-hidden=\"true\"\n />\n )\n);\nSkeleton.displayName = \"Skeleton\";\n\nconst SkeletonText = React.forwardRef<\n HTMLDivElement,\n Pick<SkeletonProps, \"width\" | \"className\">\n>(({ width, className }, ref) => (\n <Skeleton ref={ref} width={width} height=\"14px\" borderRadius=\"4px\" className={className} />\n));\nSkeletonText.displayName = \"SkeletonText\";\n\nconst SkeletonAvatar = React.forwardRef<\n HTMLDivElement,\n Pick<SkeletonProps, \"className\">\n>(({ className }, ref) => (\n <Skeleton ref={ref} width=\"32px\" height=\"32px\" borderRadius=\"50%\" className={className} />\n));\nSkeletonAvatar.displayName = \"SkeletonAvatar\";\n\nconst SkeletonCard = React.forwardRef<\n HTMLDivElement,\n Pick<SkeletonProps, \"width\" | \"className\">\n>(({ width, className }, ref) => (\n <Skeleton ref={ref} width={width} height=\"120px\" borderRadius=\"8px\" className={className} />\n));\nSkeletonCard.displayName = \"SkeletonCard\";\n\nconst SkeletonButton = React.forwardRef<\n HTMLDivElement,\n Pick<SkeletonProps, \"className\">\n>(({ className }, ref) => (\n <Skeleton ref={ref} width=\"120px\" height=\"36px\" borderRadius=\"6px\" className={className} />\n));\nSkeletonButton.displayName = \"SkeletonButton\";\n\nexport { Skeleton, SkeletonText, SkeletonAvatar, SkeletonCard, SkeletonButton };\n"],"mappings":";;;;;;AAAA,YAAY,WAAW;AAgBnB;AANJ,SAAS,KAAK,OAAgC;AAC5C,SAAO,OAAO,UAAU,WAAW,GAAG,KAAK,OAAO;AACpD;AAEA,IAAM,WAAiB;AAAA,EACrB,CAAC,EAAE,QAAQ,QAAQ,SAAS,QAAQ,eAAe,OAAO,UAAU,GAAG,QACrE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,uDAAuD,SAAS;AAAA,MAC9E,OAAO,EAAE,OAAO,KAAK,KAAK,GAAG,QAAQ,KAAK,MAAM,GAAG,aAAa;AAAA,MAChE,eAAY;AAAA;AAAA,EACd;AAEJ;AACA,SAAS,cAAc;AAEvB,IAAM,eAAqB,iBAGzB,CAAC,EAAE,OAAO,UAAU,GAAG,QACvB,oBAAC,YAAS,KAAU,OAAc,QAAO,QAAO,cAAa,OAAM,WAAsB,CAC1F;AACD,aAAa,cAAc;AAE3B,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,UAAU,GAAG,QAChB,oBAAC,YAAS,KAAU,OAAM,QAAO,QAAO,QAAO,cAAa,OAAM,WAAsB,CACzF;AACD,eAAe,cAAc;AAE7B,IAAM,eAAqB,iBAGzB,CAAC,EAAE,OAAO,UAAU,GAAG,QACvB,oBAAC,YAAS,KAAU,OAAc,QAAO,SAAQ,cAAa,OAAM,WAAsB,CAC3F;AACD,aAAa,cAAc;AAE3B,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,UAAU,GAAG,QAChB,oBAAC,YAAS,KAAU,OAAM,SAAQ,QAAO,QAAO,cAAa,OAAM,WAAsB,CAC1F;AACD,eAAe,cAAc;","names":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-KQJCGTS3.js";
|
|
5
|
+
|
|
6
|
+
// src/components/avatar.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import * as RadixAvatar from "@radix-ui/react-avatar";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var FALLBACK_COLORS = [
|
|
11
|
+
{ bg: "var(--color-primary-container)", text: "var(--color-on-primary-container)" },
|
|
12
|
+
{ bg: "var(--color-success-container)", text: "var(--color-on-success-container)" },
|
|
13
|
+
{ bg: "var(--color-info-container)", text: "var(--color-on-info-container)" },
|
|
14
|
+
{ bg: "var(--color-warning-container)", text: "var(--color-on-warning-container)" },
|
|
15
|
+
{ bg: "var(--color-error-container)", text: "var(--color-on-error-container)" },
|
|
16
|
+
{ bg: "var(--color-action-secondary)", text: "var(--color-on-action-secondary)" }
|
|
17
|
+
];
|
|
18
|
+
function hashColor(name) {
|
|
19
|
+
const hash = name.split("").reduce((acc, c) => acc + c.charCodeAt(0), 0);
|
|
20
|
+
return FALLBACK_COLORS[hash % FALLBACK_COLORS.length];
|
|
21
|
+
}
|
|
22
|
+
function initials(name) {
|
|
23
|
+
const parts = name.trim().split(/\s+/);
|
|
24
|
+
if (parts.length === 1) return parts[0].charAt(0).toUpperCase();
|
|
25
|
+
return parts[0].charAt(0).toUpperCase() + parts[parts.length - 1].charAt(0).toUpperCase();
|
|
26
|
+
}
|
|
27
|
+
var SIZE = {
|
|
28
|
+
sm: { root: "size-6", text: "text-[10px]" },
|
|
29
|
+
md: { root: "size-8", text: "text-[12px]" },
|
|
30
|
+
lg: { root: "size-10", text: "text-[14px]" }
|
|
31
|
+
};
|
|
32
|
+
var Avatar = React.forwardRef(({ name, src, size = "md", className, style }, ref) => {
|
|
33
|
+
const { bg, text } = hashColor(name);
|
|
34
|
+
const { root, text: textSize } = SIZE[size];
|
|
35
|
+
return /* @__PURE__ */ jsxs(
|
|
36
|
+
RadixAvatar.Root,
|
|
37
|
+
{
|
|
38
|
+
ref,
|
|
39
|
+
className: cn(
|
|
40
|
+
"relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full",
|
|
41
|
+
root,
|
|
42
|
+
className
|
|
43
|
+
),
|
|
44
|
+
style,
|
|
45
|
+
children: [
|
|
46
|
+
src && /* @__PURE__ */ jsx(
|
|
47
|
+
RadixAvatar.Image,
|
|
48
|
+
{
|
|
49
|
+
src,
|
|
50
|
+
alt: name,
|
|
51
|
+
className: "size-full object-cover"
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
RadixAvatar.Fallback,
|
|
56
|
+
{
|
|
57
|
+
className: cn(
|
|
58
|
+
"flex size-full items-center justify-center rounded-full font-semibold select-none",
|
|
59
|
+
textSize
|
|
60
|
+
),
|
|
61
|
+
style: { backgroundColor: bg, color: text },
|
|
62
|
+
delayMs: src ? 300 : 0,
|
|
63
|
+
children: initials(name)
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
Avatar.displayName = "Avatar";
|
|
71
|
+
|
|
72
|
+
export {
|
|
73
|
+
Avatar
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=chunk-YVPOTKKQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/avatar.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as RadixAvatar from \"@radix-ui/react-avatar\";\nimport { cn } from \"../lib/utils\";\n\n// ─── Fallback color derivada do nome ─────────────────────────────────────────\n\nconst FALLBACK_COLORS = [\n { bg: \"var(--color-primary-container)\", text: \"var(--color-on-primary-container)\" },\n { bg: \"var(--color-success-container)\", text: \"var(--color-on-success-container)\" },\n { bg: \"var(--color-info-container)\", text: \"var(--color-on-info-container)\" },\n { bg: \"var(--color-warning-container)\", text: \"var(--color-on-warning-container)\" },\n { bg: \"var(--color-error-container)\", text: \"var(--color-on-error-container)\" },\n { bg: \"var(--color-action-secondary)\", text: \"var(--color-on-action-secondary)\" },\n] as const;\n\nfunction hashColor(name: string) {\n const hash = name.split(\"\").reduce((acc, c) => acc + c.charCodeAt(0), 0);\n return FALLBACK_COLORS[hash % FALLBACK_COLORS.length];\n}\n\nfunction initials(name: string): string {\n const parts = name.trim().split(/\\s+/);\n if (parts.length === 1) return parts[0].charAt(0).toUpperCase();\n return (\n parts[0].charAt(0).toUpperCase() +\n parts[parts.length - 1].charAt(0).toUpperCase()\n );\n}\n\n// ─── Size map ────────────────────────────────────────────────────────────────\n\nconst SIZE: Record<string, { root: string; text: string }> = {\n sm: { root: \"size-6\", text: \"text-[10px]\" },\n md: { root: \"size-8\", text: \"text-[12px]\" },\n lg: { root: \"size-10\", text: \"text-[14px]\" },\n};\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport interface AvatarProps {\n name: string;\n src?: string;\n size?: \"sm\" | \"md\" | \"lg\";\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst Avatar = React.forwardRef<\n React.ComponentRef<typeof RadixAvatar.Root>,\n AvatarProps\n>(({ name, src, size = \"md\", className, style }, ref) => {\n const { bg, text } = hashColor(name);\n const { root, text: textSize } = SIZE[size];\n\n return (\n <RadixAvatar.Root\n ref={ref}\n className={cn(\n \"relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full\",\n root,\n className\n )}\n style={style}\n >\n {src && (\n <RadixAvatar.Image\n src={src}\n alt={name}\n className=\"size-full object-cover\"\n />\n )}\n <RadixAvatar.Fallback\n className={cn(\n \"flex size-full items-center justify-center rounded-full font-semibold select-none\",\n textSize\n )}\n style={{ backgroundColor: bg, color: text }}\n delayMs={src ? 300 : 0}\n >\n {initials(name)}\n </RadixAvatar.Fallback>\n </RadixAvatar.Root>\n );\n});\nAvatar.displayName = \"Avatar\";\n\nexport { Avatar };\n"],"mappings":";;;;;;AAAA,YAAY,WAAW;AACvB,YAAY,iBAAiB;AAsDzB,SAUI,KAVJ;AAjDJ,IAAM,kBAAkB;AAAA,EACtB,EAAE,IAAI,kCAAmC,MAAM,oCAAqC;AAAA,EACpF,EAAE,IAAI,kCAAmC,MAAM,oCAAqC;AAAA,EACpF,EAAE,IAAI,+BAAmC,MAAM,iCAAqC;AAAA,EACpF,EAAE,IAAI,kCAAmC,MAAM,oCAAqC;AAAA,EACpF,EAAE,IAAI,gCAAmC,MAAM,kCAAqC;AAAA,EACpF,EAAE,IAAI,iCAAmC,MAAM,mCAAqC;AACtF;AAEA,SAAS,UAAU,MAAc;AAC/B,QAAM,OAAO,KAAK,MAAM,EAAE,EAAE,OAAO,CAAC,KAAK,MAAM,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC;AACvE,SAAO,gBAAgB,OAAO,gBAAgB,MAAM;AACtD;AAEA,SAAS,SAAS,MAAsB;AACtC,QAAM,QAAQ,KAAK,KAAK,EAAE,MAAM,KAAK;AACrC,MAAI,MAAM,WAAW,EAAG,QAAO,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY;AAC9D,SACE,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,IAC/B,MAAM,MAAM,SAAS,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY;AAElD;AAIA,IAAM,OAAuD;AAAA,EAC3D,IAAI,EAAE,MAAM,UAAW,MAAM,cAAc;AAAA,EAC3C,IAAI,EAAE,MAAM,UAAW,MAAM,cAAc;AAAA,EAC3C,IAAI,EAAE,MAAM,WAAW,MAAM,cAAc;AAC7C;AAYA,IAAM,SAAe,iBAGnB,CAAC,EAAE,MAAM,KAAK,OAAO,MAAM,WAAW,MAAM,GAAG,QAAQ;AACvD,QAAM,EAAE,IAAI,KAAK,IAAI,UAAU,IAAI;AACnC,QAAM,EAAE,MAAM,MAAM,SAAS,IAAI,KAAK,IAAI;AAE1C,SACE;AAAA,IAAa;AAAA,IAAZ;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,MAEC;AAAA,eACC;AAAA,UAAa;AAAA,UAAZ;AAAA,YACC;AAAA,YACA,KAAK;AAAA,YACL,WAAU;AAAA;AAAA,QACZ;AAAA,QAEF;AAAA,UAAa;AAAA,UAAZ;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA;AAAA,YACF;AAAA,YACA,OAAO,EAAE,iBAAiB,IAAI,OAAO,KAAK;AAAA,YAC1C,SAAS,MAAM,MAAM;AAAA,YAEpB,mBAAS,IAAI;AAAA;AAAA,QAChB;AAAA;AAAA;AAAA,EACF;AAEJ,CAAC;AACD,OAAO,cAAc;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/lib/safe-href.ts
|
|
4
|
+
var UNSAFE_PROTOCOL = /^\s*(javascript|data|vbscript|file):/i;
|
|
5
|
+
function safeHref(href) {
|
|
6
|
+
if (!href) return "#";
|
|
7
|
+
if (UNSAFE_PROTOCOL.test(href)) return "#";
|
|
8
|
+
return href;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
safeHref
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=chunk-ZYPEUNSY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/safe-href.ts"],"sourcesContent":["const UNSAFE_PROTOCOL = /^\\s*(javascript|data|vbscript|file):/i;\n\n/**\n * Sanitiza URLs vindas via props para mitigar XSS por protocolo\n * (`javascript:`, `data:`, `vbscript:`, `file:`).\n * Retorna `\"#\"` quando a URL é considerada perigosa ou ausente.\n */\nexport function safeHref(href: string | undefined | null): string {\n if (!href) return \"#\";\n if (UNSAFE_PROTOCOL.test(href)) return \"#\";\n return href;\n}\n"],"mappings":";;;AAAA,IAAM,kBAAkB;AAOjB,SAAS,SAAS,MAAyC;AAChE,MAAI,CAAC,KAAM,QAAO;AAClB,MAAI,gBAAgB,KAAK,IAAI,EAAG,QAAO;AACvC,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkNVCGKCTHcjs = require('../chunk-NVCGKCTH.cjs');
|
|
5
|
+
require('../chunk-5SCF3EGT.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.Alert = _chunkNVCGKCTHcjs.Alert;
|
|
9
|
+
//# sourceMappingURL=alert.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/isaac/vega/lyra/lyra-ds.v3/packages/lyra-ds/dist/components/alert.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,wCAAC","file":"/home/isaac/vega/lyra/lyra-ds.v3/packages/lyra-ds/dist/components/alert.cjs"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
|
|
4
|
+
interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
variant: "info" | "success" | "warning" | "error";
|
|
6
|
+
title?: string;
|
|
7
|
+
description: string;
|
|
8
|
+
icon?: LucideIcon;
|
|
9
|
+
onDismiss?: () => void;
|
|
10
|
+
action?: {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
|
|
17
|
+
export { Alert, type AlertProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
|
|
4
|
+
interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
variant: "info" | "success" | "warning" | "error";
|
|
6
|
+
title?: string;
|
|
7
|
+
description: string;
|
|
8
|
+
icon?: LucideIcon;
|
|
9
|
+
onDismiss?: () => void;
|
|
10
|
+
action?: {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
|
|
17
|
+
export { Alert, type AlertProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkA665K552cjs = require('../chunk-A665K552.cjs');
|
|
5
|
+
require('../chunk-5SCF3EGT.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.Avatar = _chunkA665K552cjs.Avatar;
|
|
9
|
+
//# sourceMappingURL=avatar.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/isaac/vega/lyra/lyra-ds.v3/packages/lyra-ds/dist/components/avatar.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,0CAAC","file":"/home/isaac/vega/lyra/lyra-ds.v3/packages/lyra-ds/dist/components/avatar.cjs"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface AvatarProps {
|
|
4
|
+
name: string;
|
|
5
|
+
src?: string;
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
|
|
12
|
+
export { Avatar, type AvatarProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface AvatarProps {
|
|
4
|
+
name: string;
|
|
5
|
+
src?: string;
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
|
|
12
|
+
export { Avatar, type AvatarProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkPOMJPII4cjs = require('../chunk-POMJPII4.cjs');
|
|
6
|
+
require('../chunk-5SCF3EGT.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.Badge = _chunkPOMJPII4cjs.Badge; exports.badgeVariants = _chunkPOMJPII4cjs.badgeVariants;
|
|
11
|
+
//# sourceMappingURL=badge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/isaac/vega/lyra/lyra-ds.v3/packages/lyra-ds/dist/components/badge.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACF,iGAAC","file":"/home/isaac/vega/lyra/lyra-ds.v3/packages/lyra-ds/dist/components/badge.cjs"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const badgeVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "success" | "info" | "warning" | "error" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
9
|
+
}
|
|
10
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
|
|
12
|
+
export { Badge, type BadgeProps, badgeVariants };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const badgeVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "success" | "info" | "warning" | "error" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
9
|
+
}
|
|
10
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
|
|
12
|
+
export { Badge, type BadgeProps, badgeVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|