@motor-hero/ui-kit 0.42.0 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/highlight-pill.d.ts +18 -0
- package/dist/components/highlight-pill.d.ts.map +1 -0
- package/dist/index.cjs +173 -146
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +126 -100
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/highlight-pill.tsx +43 -0
- package/src/index.ts +2 -0
package/dist/index.cjs
CHANGED
|
@@ -46,6 +46,7 @@ __export(index_exports, {
|
|
|
46
46
|
FormDialog: () => FormDialog,
|
|
47
47
|
FormDialogLayout: () => FormDialogLayout,
|
|
48
48
|
FormField: () => FormField,
|
|
49
|
+
HighlightPill: () => HighlightPill,
|
|
49
50
|
MobileCardList: () => MobileCardList,
|
|
50
51
|
ModeToggle: () => ModeToggle,
|
|
51
52
|
MultiCombobox: () => MultiCombobox,
|
|
@@ -1584,9 +1585,34 @@ function FormField({ label, htmlFor, error, required, children, className }) {
|
|
|
1584
1585
|
] });
|
|
1585
1586
|
}
|
|
1586
1587
|
|
|
1588
|
+
// src/components/highlight-pill.tsx
|
|
1589
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1590
|
+
function HighlightPill({
|
|
1591
|
+
backgroundColor,
|
|
1592
|
+
textColor,
|
|
1593
|
+
className,
|
|
1594
|
+
children
|
|
1595
|
+
}) {
|
|
1596
|
+
const style = {
|
|
1597
|
+
backgroundColor: backgroundColor ?? "var(--status-neutral-surface, #f3f4f6)",
|
|
1598
|
+
color: textColor ?? "var(--status-neutral-text, #374151)"
|
|
1599
|
+
};
|
|
1600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1601
|
+
"span",
|
|
1602
|
+
{
|
|
1603
|
+
style,
|
|
1604
|
+
className: cn(
|
|
1605
|
+
"inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium",
|
|
1606
|
+
className
|
|
1607
|
+
),
|
|
1608
|
+
children
|
|
1609
|
+
}
|
|
1610
|
+
);
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1587
1613
|
// src/components/mobile-card-list.tsx
|
|
1588
1614
|
var import_react5 = require("react");
|
|
1589
|
-
var
|
|
1615
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1590
1616
|
var SCROLL_THRESHOLD = 8;
|
|
1591
1617
|
function MobileCardList({
|
|
1592
1618
|
data,
|
|
@@ -1617,26 +1643,26 @@ function MobileCardList({
|
|
|
1617
1643
|
}
|
|
1618
1644
|
};
|
|
1619
1645
|
if (isLoading) {
|
|
1620
|
-
return /* @__PURE__ */ (0,
|
|
1621
|
-
/* @__PURE__ */ (0,
|
|
1622
|
-
/* @__PURE__ */ (0,
|
|
1623
|
-
/* @__PURE__ */ (0,
|
|
1646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: `space-y-3 ${className ?? ""}`, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "rounded-xl border p-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-3", children: [
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between", children: [
|
|
1648
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-5 w-32 animate-pulse rounded bg-muted" }),
|
|
1649
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-5 w-16 animate-pulse rounded bg-muted" })
|
|
1624
1650
|
] }),
|
|
1625
|
-
/* @__PURE__ */ (0,
|
|
1626
|
-
/* @__PURE__ */ (0,
|
|
1627
|
-
/* @__PURE__ */ (0,
|
|
1628
|
-
/* @__PURE__ */ (0,
|
|
1651
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-4 w-48 animate-pulse rounded bg-muted" }),
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between", children: [
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-4 w-20 animate-pulse rounded bg-muted" })
|
|
1629
1655
|
] })
|
|
1630
1656
|
] }) }, i)) });
|
|
1631
1657
|
}
|
|
1632
|
-
return /* @__PURE__ */ (0,
|
|
1658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1633
1659
|
"div",
|
|
1634
1660
|
{
|
|
1635
1661
|
className: `space-y-3 ${className ?? ""}`,
|
|
1636
1662
|
onTouchStart,
|
|
1637
1663
|
onTouchMove,
|
|
1638
1664
|
onClickCapture,
|
|
1639
|
-
children: data.map((item, index) => /* @__PURE__ */ (0,
|
|
1665
|
+
children: data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1640
1666
|
"div",
|
|
1641
1667
|
{
|
|
1642
1668
|
className: "rounded-xl border p-4 transition-all duration-150 hover:border-foreground/20 active:scale-[0.99]",
|
|
@@ -1681,7 +1707,7 @@ function applyCompanyTheme(root, companyTheme, mode) {
|
|
|
1681
1707
|
}
|
|
1682
1708
|
|
|
1683
1709
|
// src/components/theme-provider.tsx
|
|
1684
|
-
var
|
|
1710
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1685
1711
|
var initialState = {
|
|
1686
1712
|
theme: "system",
|
|
1687
1713
|
setTheme: () => null
|
|
@@ -1720,7 +1746,7 @@ function ThemeProvider({
|
|
|
1720
1746
|
setTheme(theme2);
|
|
1721
1747
|
}
|
|
1722
1748
|
};
|
|
1723
|
-
return /* @__PURE__ */ (0,
|
|
1749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ThemeProviderContext.Provider, { ...props, value, children });
|
|
1724
1750
|
}
|
|
1725
1751
|
function useTheme() {
|
|
1726
1752
|
const context = (0, import_react6.useContext)(ThemeProviderContext);
|
|
@@ -1731,57 +1757,57 @@ function useTheme() {
|
|
|
1731
1757
|
}
|
|
1732
1758
|
|
|
1733
1759
|
// src/components/mode-toggle.tsx
|
|
1734
|
-
var
|
|
1760
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1735
1761
|
function ModeToggle() {
|
|
1736
1762
|
const { setTheme } = useTheme();
|
|
1737
|
-
return /* @__PURE__ */ (0,
|
|
1738
|
-
/* @__PURE__ */ (0,
|
|
1763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DropdownMenu2.Root, { children: [
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1739
1765
|
"button",
|
|
1740
1766
|
{
|
|
1741
1767
|
type: "button",
|
|
1742
1768
|
className: "relative inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1743
1769
|
"aria-label": "Alternar tema",
|
|
1744
1770
|
children: [
|
|
1745
|
-
/* @__PURE__ */ (0,
|
|
1746
|
-
/* @__PURE__ */ (0,
|
|
1771
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Sun, { className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
1772
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Moon, { className: "absolute inset-0 m-auto h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
|
|
1747
1773
|
]
|
|
1748
1774
|
}
|
|
1749
1775
|
) }),
|
|
1750
|
-
/* @__PURE__ */ (0,
|
|
1776
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1751
1777
|
DropdownMenu2.Content,
|
|
1752
1778
|
{
|
|
1753
1779
|
align: "end",
|
|
1754
1780
|
className: "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",
|
|
1755
1781
|
children: [
|
|
1756
|
-
/* @__PURE__ */ (0,
|
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1757
1783
|
DropdownMenu2.Item,
|
|
1758
1784
|
{
|
|
1759
1785
|
className: "flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent",
|
|
1760
1786
|
onClick: () => setTheme("light"),
|
|
1761
1787
|
children: [
|
|
1762
|
-
/* @__PURE__ */ (0,
|
|
1788
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Sun, { className: "h-4 w-4" }),
|
|
1763
1789
|
" Claro"
|
|
1764
1790
|
]
|
|
1765
1791
|
}
|
|
1766
1792
|
),
|
|
1767
|
-
/* @__PURE__ */ (0,
|
|
1793
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1768
1794
|
DropdownMenu2.Item,
|
|
1769
1795
|
{
|
|
1770
1796
|
className: "flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent",
|
|
1771
1797
|
onClick: () => setTheme("dark"),
|
|
1772
1798
|
children: [
|
|
1773
|
-
/* @__PURE__ */ (0,
|
|
1799
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Moon, { className: "h-4 w-4" }),
|
|
1774
1800
|
" Escuro"
|
|
1775
1801
|
]
|
|
1776
1802
|
}
|
|
1777
1803
|
),
|
|
1778
|
-
/* @__PURE__ */ (0,
|
|
1804
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1779
1805
|
DropdownMenu2.Item,
|
|
1780
1806
|
{
|
|
1781
1807
|
className: "flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent",
|
|
1782
1808
|
onClick: () => setTheme("system"),
|
|
1783
1809
|
children: [
|
|
1784
|
-
/* @__PURE__ */ (0,
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Monitor, { className: "h-4 w-4" }),
|
|
1785
1811
|
" Sistema"
|
|
1786
1812
|
]
|
|
1787
1813
|
}
|
|
@@ -1798,7 +1824,7 @@ var import_cmdk2 = require("cmdk");
|
|
|
1798
1824
|
var import_lucide_react10 = require("lucide-react");
|
|
1799
1825
|
var React8 = __toESM(require("react"), 1);
|
|
1800
1826
|
var import_vaul5 = require("vaul");
|
|
1801
|
-
var
|
|
1827
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1802
1828
|
function MultiCombobox({
|
|
1803
1829
|
options,
|
|
1804
1830
|
value,
|
|
@@ -1839,7 +1865,7 @@ function MultiCombobox({
|
|
|
1839
1865
|
const removeValue = (optionValue) => {
|
|
1840
1866
|
onChange(value.filter((v) => v !== optionValue));
|
|
1841
1867
|
};
|
|
1842
|
-
const trigger = /* @__PURE__ */ (0,
|
|
1868
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1843
1869
|
"div",
|
|
1844
1870
|
{
|
|
1845
1871
|
id,
|
|
@@ -1861,13 +1887,13 @@ function MultiCombobox({
|
|
|
1861
1887
|
className
|
|
1862
1888
|
),
|
|
1863
1889
|
children: [
|
|
1864
|
-
selected.length === 0 ? /* @__PURE__ */ (0,
|
|
1890
|
+
selected.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-muted-foreground", children: placeholder }) : selected.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1865
1891
|
"span",
|
|
1866
1892
|
{
|
|
1867
1893
|
className: "inline-flex items-center gap-1 rounded bg-secondary px-1.5 py-0.5 text-xs text-secondary-foreground",
|
|
1868
1894
|
children: [
|
|
1869
1895
|
option.label,
|
|
1870
|
-
/* @__PURE__ */ (0,
|
|
1896
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1871
1897
|
"button",
|
|
1872
1898
|
{
|
|
1873
1899
|
type: "button",
|
|
@@ -1879,26 +1905,26 @@ function MultiCombobox({
|
|
|
1879
1905
|
},
|
|
1880
1906
|
onPointerDown: (event) => event.stopPropagation(),
|
|
1881
1907
|
className: "rounded-sm opacity-60 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1882
|
-
children: /* @__PURE__ */ (0,
|
|
1908
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.X, { className: "h-3 w-3" })
|
|
1883
1909
|
}
|
|
1884
1910
|
)
|
|
1885
1911
|
]
|
|
1886
1912
|
},
|
|
1887
1913
|
option.value
|
|
1888
1914
|
)),
|
|
1889
|
-
/* @__PURE__ */ (0,
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.ChevronsUpDown, { className: "ml-auto h-4 w-4 shrink-0 opacity-50" })
|
|
1890
1916
|
]
|
|
1891
1917
|
}
|
|
1892
1918
|
);
|
|
1893
|
-
const command = /* @__PURE__ */ (0,
|
|
1919
|
+
const command = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1894
1920
|
import_cmdk2.Command,
|
|
1895
1921
|
{
|
|
1896
1922
|
shouldFilter: !isServer,
|
|
1897
1923
|
className: "flex h-full w-full flex-col overflow-hidden",
|
|
1898
1924
|
children: [
|
|
1899
|
-
/* @__PURE__ */ (0,
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
1901
|
-
/* @__PURE__ */ (0,
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center border-b px-3", children: [
|
|
1926
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1902
1928
|
import_cmdk2.Command.Input,
|
|
1903
1929
|
{
|
|
1904
1930
|
placeholder: searchPlaceholder,
|
|
@@ -1907,14 +1933,14 @@ function MultiCombobox({
|
|
|
1907
1933
|
}
|
|
1908
1934
|
)
|
|
1909
1935
|
] }),
|
|
1910
|
-
/* @__PURE__ */ (0,
|
|
1936
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1911
1937
|
import_cmdk2.Command.List,
|
|
1912
1938
|
{
|
|
1913
1939
|
ref: listRef,
|
|
1914
1940
|
className: "max-h-[50vh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
|
|
1915
1941
|
children: [
|
|
1916
|
-
!isServer && /* @__PURE__ */ (0,
|
|
1917
|
-
options.map((option) => /* @__PURE__ */ (0,
|
|
1942
|
+
!isServer && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_cmdk2.Command.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
1943
|
+
options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1918
1944
|
import_cmdk2.Command.Item,
|
|
1919
1945
|
{
|
|
1920
1946
|
value: isServer ? option.value : option.label,
|
|
@@ -1922,7 +1948,7 @@ function MultiCombobox({
|
|
|
1922
1948
|
onSelect: () => toggleValue(option.value),
|
|
1923
1949
|
className: "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-2.5 text-sm outline-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 sm:py-1.5",
|
|
1924
1950
|
children: [
|
|
1925
|
-
/* @__PURE__ */ (0,
|
|
1951
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1926
1952
|
import_lucide_react10.Check,
|
|
1927
1953
|
{
|
|
1928
1954
|
className: cn(
|
|
@@ -1931,14 +1957,14 @@ function MultiCombobox({
|
|
|
1931
1957
|
)
|
|
1932
1958
|
}
|
|
1933
1959
|
),
|
|
1934
|
-
/* @__PURE__ */ (0,
|
|
1960
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "truncate", children: option.label })
|
|
1935
1961
|
]
|
|
1936
1962
|
},
|
|
1937
1963
|
option.value
|
|
1938
1964
|
)),
|
|
1939
|
-
isServer && !loading && options.length === 0 && /* @__PURE__ */ (0,
|
|
1940
|
-
isServer && loading && /* @__PURE__ */ (0,
|
|
1941
|
-
isServer && hasMore && /* @__PURE__ */ (0,
|
|
1965
|
+
isServer && !loading && options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
1966
|
+
isServer && loading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }),
|
|
1967
|
+
isServer && hasMore && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref: sentinelRef, "aria-hidden": true, className: "h-1" })
|
|
1942
1968
|
]
|
|
1943
1969
|
}
|
|
1944
1970
|
)
|
|
@@ -1946,9 +1972,9 @@ function MultiCombobox({
|
|
|
1946
1972
|
}
|
|
1947
1973
|
);
|
|
1948
1974
|
if (isDesktop) {
|
|
1949
|
-
return /* @__PURE__ */ (0,
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
1951
|
-
/* @__PURE__ */ (0,
|
|
1975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(PopoverPrimitive5.Root, { open, onOpenChange: setOpen, children: [
|
|
1976
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PopoverPrimitive5.Trigger, { asChild: true, disabled, children: trigger }),
|
|
1977
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1952
1978
|
PopoverPrimitive5.Content,
|
|
1953
1979
|
{
|
|
1954
1980
|
align: "start",
|
|
@@ -1960,13 +1986,13 @@ function MultiCombobox({
|
|
|
1960
1986
|
) })
|
|
1961
1987
|
] });
|
|
1962
1988
|
}
|
|
1963
|
-
return /* @__PURE__ */ (0,
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
1965
|
-
/* @__PURE__ */ (0,
|
|
1966
|
-
/* @__PURE__ */ (0,
|
|
1967
|
-
/* @__PURE__ */ (0,
|
|
1968
|
-
/* @__PURE__ */ (0,
|
|
1969
|
-
/* @__PURE__ */ (0,
|
|
1989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_vaul5.Drawer.Root, { open, onOpenChange: setOpen, children: [
|
|
1990
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_vaul5.Drawer.Trigger, { asChild: true, disabled, children: trigger }),
|
|
1991
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_vaul5.Drawer.Portal, { children: [
|
|
1992
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_vaul5.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1993
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_vaul5.Drawer.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
|
|
1994
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_vaul5.Drawer.Title, { className: "sr-only", children: placeholder }),
|
|
1995
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1970
1996
|
command
|
|
1971
1997
|
] })
|
|
1972
1998
|
] })
|
|
@@ -1974,25 +2000,25 @@ function MultiCombobox({
|
|
|
1974
2000
|
}
|
|
1975
2001
|
|
|
1976
2002
|
// src/components/page-header.tsx
|
|
1977
|
-
var
|
|
2003
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1978
2004
|
function PageHeader({ title, description, action, className }) {
|
|
1979
|
-
return /* @__PURE__ */ (0,
|
|
2005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1980
2006
|
"div",
|
|
1981
2007
|
{
|
|
1982
2008
|
className: `flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between ${className ?? ""}`,
|
|
1983
2009
|
children: [
|
|
1984
|
-
/* @__PURE__ */ (0,
|
|
1985
|
-
/* @__PURE__ */ (0,
|
|
1986
|
-
description && /* @__PURE__ */ (0,
|
|
2010
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "min-w-0", children: [
|
|
2011
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { className: "truncate text-2xl font-semibold tracking-tight", children: title }),
|
|
2012
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm text-muted-foreground", children: description })
|
|
1987
2013
|
] }),
|
|
1988
|
-
action && /* @__PURE__ */ (0,
|
|
2014
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "shrink-0", children: action })
|
|
1989
2015
|
]
|
|
1990
2016
|
}
|
|
1991
2017
|
);
|
|
1992
2018
|
}
|
|
1993
2019
|
|
|
1994
2020
|
// src/components/pagination.tsx
|
|
1995
|
-
var
|
|
2021
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1996
2022
|
var navButtonClass2 = "inline-flex h-8 items-center justify-center rounded-md border border-input bg-background px-3 text-xs font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground cursor-pointer disabled:pointer-events-none disabled:opacity-50";
|
|
1997
2023
|
function Pagination({
|
|
1998
2024
|
page,
|
|
@@ -2006,26 +2032,26 @@ function Pagination({
|
|
|
2006
2032
|
pageSizeOptions,
|
|
2007
2033
|
className
|
|
2008
2034
|
}) {
|
|
2009
|
-
return /* @__PURE__ */ (0,
|
|
2035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2010
2036
|
"div",
|
|
2011
2037
|
{
|
|
2012
2038
|
className: `flex items-center ${showPageSizeSelector ? "justify-between" : "justify-end"} gap-4 ${className ?? ""}`,
|
|
2013
2039
|
children: [
|
|
2014
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
2015
|
-
/* @__PURE__ */ (0,
|
|
2016
|
-
/* @__PURE__ */ (0,
|
|
2040
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "pagination-page-size", className: "text-sm text-muted-foreground", children: "Itens por p\xE1gina" }),
|
|
2042
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2017
2043
|
"select",
|
|
2018
2044
|
{
|
|
2019
2045
|
id: "pagination-page-size",
|
|
2020
2046
|
value: pageSize,
|
|
2021
2047
|
onChange: (e) => onPageSizeChange?.(Number(e.target.value)),
|
|
2022
2048
|
className: "h-8 rounded-md border border-input bg-background px-2 text-xs font-medium shadow-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring cursor-pointer",
|
|
2023
|
-
children: (pageSizeOptions ?? []).map((size) => /* @__PURE__ */ (0,
|
|
2049
|
+
children: (pageSizeOptions ?? []).map((size) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: size, children: size }, size))
|
|
2024
2050
|
}
|
|
2025
2051
|
)
|
|
2026
2052
|
] }),
|
|
2027
|
-
/* @__PURE__ */ (0,
|
|
2028
|
-
/* @__PURE__ */ (0,
|
|
2053
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
2054
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2029
2055
|
"button",
|
|
2030
2056
|
{
|
|
2031
2057
|
type: "button",
|
|
@@ -2035,12 +2061,12 @@ function Pagination({
|
|
|
2035
2061
|
children: "Anterior"
|
|
2036
2062
|
}
|
|
2037
2063
|
),
|
|
2038
|
-
/* @__PURE__ */ (0,
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
|
|
2039
2065
|
"P\xE1gina ",
|
|
2040
2066
|
page,
|
|
2041
2067
|
totalPages ? ` de ${totalPages}` : ""
|
|
2042
2068
|
] }),
|
|
2043
|
-
/* @__PURE__ */ (0,
|
|
2069
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2044
2070
|
"button",
|
|
2045
2071
|
{
|
|
2046
2072
|
type: "button",
|
|
@@ -2059,11 +2085,11 @@ function Pagination({
|
|
|
2059
2085
|
// src/components/password-input.tsx
|
|
2060
2086
|
var import_lucide_react11 = require("lucide-react");
|
|
2061
2087
|
var React9 = __toESM(require("react"), 1);
|
|
2062
|
-
var
|
|
2088
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2063
2089
|
var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props }, ref) => {
|
|
2064
2090
|
const [visible, setVisible] = React9.useState(false);
|
|
2065
|
-
return /* @__PURE__ */ (0,
|
|
2066
|
-
/* @__PURE__ */ (0,
|
|
2091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: `relative ${containerClassName ?? ""}`, children: [
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2067
2093
|
"input",
|
|
2068
2094
|
{
|
|
2069
2095
|
ref,
|
|
@@ -2072,7 +2098,7 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
2072
2098
|
...props
|
|
2073
2099
|
}
|
|
2074
2100
|
),
|
|
2075
|
-
/* @__PURE__ */ (0,
|
|
2101
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2076
2102
|
"button",
|
|
2077
2103
|
{
|
|
2078
2104
|
type: "button",
|
|
@@ -2080,7 +2106,7 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
2080
2106
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
2081
2107
|
tabIndex: -1,
|
|
2082
2108
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground",
|
|
2083
|
-
children: visible ? /* @__PURE__ */ (0,
|
|
2109
|
+
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.EyeOff, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Eye, { className: "h-4 w-4" })
|
|
2084
2110
|
}
|
|
2085
2111
|
)
|
|
2086
2112
|
] });
|
|
@@ -2088,7 +2114,7 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
2088
2114
|
PasswordInput.displayName = "PasswordInput";
|
|
2089
2115
|
|
|
2090
2116
|
// src/components/progress-bar.tsx
|
|
2091
|
-
var
|
|
2117
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2092
2118
|
var sizeClasses3 = {
|
|
2093
2119
|
sm: "h-1.5",
|
|
2094
2120
|
md: "h-2"
|
|
@@ -2102,16 +2128,16 @@ function ProgressBar({
|
|
|
2102
2128
|
indicatorClassName
|
|
2103
2129
|
}) {
|
|
2104
2130
|
const clamped = Math.min(100, Math.max(0, value));
|
|
2105
|
-
return /* @__PURE__ */ (0,
|
|
2106
|
-
(label || valueLabel) && /* @__PURE__ */ (0,
|
|
2107
|
-
label && /* @__PURE__ */ (0,
|
|
2108
|
-
valueLabel && /* @__PURE__ */ (0,
|
|
2131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: `space-y-1.5 ${className ?? ""}`, children: [
|
|
2132
|
+
(label || valueLabel) && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
2133
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm text-muted-foreground", children: label }),
|
|
2134
|
+
valueLabel && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm font-semibold", children: valueLabel })
|
|
2109
2135
|
] }),
|
|
2110
|
-
/* @__PURE__ */ (0,
|
|
2136
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2111
2137
|
"div",
|
|
2112
2138
|
{
|
|
2113
2139
|
className: `w-full overflow-hidden rounded-full bg-muted ${sizeClasses3[size]}`,
|
|
2114
|
-
children: /* @__PURE__ */ (0,
|
|
2140
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2115
2141
|
"div",
|
|
2116
2142
|
{
|
|
2117
2143
|
className: `h-full rounded-full transition-all duration-300 ${indicatorClassName ?? "bg-primary"}`,
|
|
@@ -2124,7 +2150,7 @@ function ProgressBar({
|
|
|
2124
2150
|
}
|
|
2125
2151
|
|
|
2126
2152
|
// src/components/responsive-data-view.tsx
|
|
2127
|
-
var
|
|
2153
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2128
2154
|
function ResponsiveDataView({
|
|
2129
2155
|
table,
|
|
2130
2156
|
cards,
|
|
@@ -2138,7 +2164,7 @@ function ResponsiveDataView({
|
|
|
2138
2164
|
pagination
|
|
2139
2165
|
}) {
|
|
2140
2166
|
if (!isLoading && !isBusy && isEmpty) {
|
|
2141
|
-
return /* @__PURE__ */ (0,
|
|
2167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "rounded-md border", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2142
2168
|
EmptyState,
|
|
2143
2169
|
{
|
|
2144
2170
|
icon: emptyIcon,
|
|
@@ -2149,8 +2175,8 @@ function ResponsiveDataView({
|
|
|
2149
2175
|
) });
|
|
2150
2176
|
}
|
|
2151
2177
|
const busyClass = isBusy && "pointer-events-none opacity-50";
|
|
2152
|
-
return /* @__PURE__ */ (0,
|
|
2153
|
-
/* @__PURE__ */ (0,
|
|
2178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-4", children: [
|
|
2179
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2154
2180
|
"div",
|
|
2155
2181
|
{
|
|
2156
2182
|
"aria-busy": isBusy,
|
|
@@ -2161,7 +2187,7 @@ function ResponsiveDataView({
|
|
|
2161
2187
|
children: table
|
|
2162
2188
|
}
|
|
2163
2189
|
),
|
|
2164
|
-
/* @__PURE__ */ (0,
|
|
2190
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "aria-busy": isBusy, className: cn("transition-opacity md:hidden", busyClass), children: cards }),
|
|
2165
2191
|
pagination
|
|
2166
2192
|
] });
|
|
2167
2193
|
}
|
|
@@ -2171,7 +2197,7 @@ var DropdownMenu3 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
|
2171
2197
|
var import_lucide_react12 = require("lucide-react");
|
|
2172
2198
|
var import_react7 = require("react");
|
|
2173
2199
|
var import_vaul6 = require("vaul");
|
|
2174
|
-
var
|
|
2200
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2175
2201
|
var triggerClass = "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
|
|
2176
2202
|
var itemClass2 = "flex w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
2177
2203
|
var sheetItemClass2 = "flex w-full cursor-pointer select-none items-center gap-3 rounded-md px-3 py-3 text-base outline-none transition-colors hover:bg-accent active:bg-accent disabled:pointer-events-none disabled:opacity-50";
|
|
@@ -2185,20 +2211,20 @@ function RowActionsMenu({
|
|
|
2185
2211
|
const isDesktop = useIsDesktop();
|
|
2186
2212
|
const [open, setOpen] = (0, import_react7.useState)(false);
|
|
2187
2213
|
if (actions.length === 0) return null;
|
|
2188
|
-
const trigger = /* @__PURE__ */ (0,
|
|
2214
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2189
2215
|
"button",
|
|
2190
2216
|
{
|
|
2191
2217
|
type: "button",
|
|
2192
2218
|
disabled,
|
|
2193
2219
|
"aria-label": label,
|
|
2194
2220
|
className: triggerClass,
|
|
2195
|
-
children: /* @__PURE__ */ (0,
|
|
2221
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react12.MoreVertical, { className: "h-4 w-4" })
|
|
2196
2222
|
}
|
|
2197
2223
|
);
|
|
2198
2224
|
if (isDesktop) {
|
|
2199
|
-
return /* @__PURE__ */ (0,
|
|
2200
|
-
/* @__PURE__ */ (0,
|
|
2201
|
-
/* @__PURE__ */ (0,
|
|
2225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DropdownMenu3.Root, { open, onOpenChange: setOpen, modal: false, children: [
|
|
2226
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenu3.Trigger, { asChild: true, children: trigger }),
|
|
2227
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenu3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2202
2228
|
DropdownMenu3.Content,
|
|
2203
2229
|
{
|
|
2204
2230
|
align,
|
|
@@ -2210,8 +2236,8 @@ function RowActionsMenu({
|
|
|
2210
2236
|
action.destructive && "text-destructive focus:bg-destructive/10"
|
|
2211
2237
|
);
|
|
2212
2238
|
if (action.children?.length) {
|
|
2213
|
-
return /* @__PURE__ */ (0,
|
|
2214
|
-
/* @__PURE__ */ (0,
|
|
2239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DropdownMenu3.Sub, { children: [
|
|
2240
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2215
2241
|
DropdownMenu3.SubTrigger,
|
|
2216
2242
|
{
|
|
2217
2243
|
className: cls,
|
|
@@ -2219,16 +2245,16 @@ function RowActionsMenu({
|
|
|
2219
2245
|
children: [
|
|
2220
2246
|
action.icon,
|
|
2221
2247
|
action.label,
|
|
2222
|
-
/* @__PURE__ */ (0,
|
|
2248
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react12.ChevronRight, { className: "ml-auto h-4 w-4 text-muted-foreground" })
|
|
2223
2249
|
]
|
|
2224
2250
|
}
|
|
2225
2251
|
),
|
|
2226
|
-
/* @__PURE__ */ (0,
|
|
2252
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenu3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2227
2253
|
DropdownMenu3.SubContent,
|
|
2228
2254
|
{
|
|
2229
2255
|
sideOffset: 4,
|
|
2230
2256
|
className: "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",
|
|
2231
|
-
children: action.children.map((child) => /* @__PURE__ */ (0,
|
|
2257
|
+
children: action.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2232
2258
|
DropdownMenu3.Item,
|
|
2233
2259
|
{
|
|
2234
2260
|
className: cn(
|
|
@@ -2248,7 +2274,7 @@ function RowActionsMenu({
|
|
|
2248
2274
|
) })
|
|
2249
2275
|
] }, action.label);
|
|
2250
2276
|
}
|
|
2251
|
-
return action.href ? /* @__PURE__ */ (0,
|
|
2277
|
+
return action.href ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2252
2278
|
DropdownMenu3.Item,
|
|
2253
2279
|
{
|
|
2254
2280
|
asChild: true,
|
|
@@ -2256,14 +2282,14 @@ function RowActionsMenu({
|
|
|
2256
2282
|
children: renderLink({
|
|
2257
2283
|
href: action.href,
|
|
2258
2284
|
className: cls,
|
|
2259
|
-
children: /* @__PURE__ */ (0,
|
|
2285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
2260
2286
|
action.icon,
|
|
2261
2287
|
action.label
|
|
2262
2288
|
] })
|
|
2263
2289
|
})
|
|
2264
2290
|
},
|
|
2265
2291
|
action.label
|
|
2266
|
-
) : /* @__PURE__ */ (0,
|
|
2292
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2267
2293
|
DropdownMenu3.Item,
|
|
2268
2294
|
{
|
|
2269
2295
|
className: cls,
|
|
@@ -2281,30 +2307,30 @@ function RowActionsMenu({
|
|
|
2281
2307
|
) })
|
|
2282
2308
|
] });
|
|
2283
2309
|
}
|
|
2284
|
-
return /* @__PURE__ */ (0,
|
|
2285
|
-
/* @__PURE__ */ (0,
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2287
|
-
/* @__PURE__ */ (0,
|
|
2288
|
-
/* @__PURE__ */ (0,
|
|
2289
|
-
/* @__PURE__ */ (0,
|
|
2290
|
-
/* @__PURE__ */ (0,
|
|
2310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_vaul6.Drawer.Root, { open, onOpenChange: setOpen, children: [
|
|
2311
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_vaul6.Drawer.Trigger, { asChild: true, children: trigger }),
|
|
2312
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_vaul6.Drawer.Portal, { children: [
|
|
2313
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_vaul6.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
2314
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_vaul6.Drawer.Content, { className: "fixed inset-x-0 bottom-0 z-50 flex flex-col rounded-t-2xl border bg-popover p-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] text-popover-foreground outline-none", children: [
|
|
2315
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_vaul6.Drawer.Title, { className: "sr-only", children: label }),
|
|
2316
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
2291
2317
|
actions.map((action) => {
|
|
2292
2318
|
const cls = cn(
|
|
2293
2319
|
sheetItemClass2,
|
|
2294
2320
|
action.destructive && "text-destructive"
|
|
2295
2321
|
);
|
|
2296
|
-
const inner = /* @__PURE__ */ (0,
|
|
2322
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
2297
2323
|
action.icon,
|
|
2298
2324
|
action.label
|
|
2299
2325
|
] });
|
|
2300
2326
|
if (action.children?.length) {
|
|
2301
|
-
return /* @__PURE__ */ (0,
|
|
2302
|
-
/* @__PURE__ */ (0,
|
|
2303
|
-
/* @__PURE__ */ (0,
|
|
2327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
2328
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mx-3 my-1 h-px bg-border" }),
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-3 px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: [
|
|
2304
2330
|
action.icon,
|
|
2305
2331
|
action.label
|
|
2306
2332
|
] }),
|
|
2307
|
-
action.children.map((child) => /* @__PURE__ */ (0,
|
|
2333
|
+
action.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2308
2334
|
"button",
|
|
2309
2335
|
{
|
|
2310
2336
|
type: "button",
|
|
@@ -2324,10 +2350,10 @@ function RowActionsMenu({
|
|
|
2324
2350
|
},
|
|
2325
2351
|
child.label
|
|
2326
2352
|
)),
|
|
2327
|
-
/* @__PURE__ */ (0,
|
|
2353
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mx-3 my-1 h-px bg-border" })
|
|
2328
2354
|
] }, action.label);
|
|
2329
2355
|
}
|
|
2330
|
-
return action.href ? /* @__PURE__ */ (0,
|
|
2356
|
+
return action.href ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2331
2357
|
"span",
|
|
2332
2358
|
{
|
|
2333
2359
|
onClick: () => setOpen(false),
|
|
@@ -2339,7 +2365,7 @@ function RowActionsMenu({
|
|
|
2339
2365
|
})
|
|
2340
2366
|
},
|
|
2341
2367
|
action.label
|
|
2342
|
-
) : /* @__PURE__ */ (0,
|
|
2368
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2343
2369
|
"button",
|
|
2344
2370
|
{
|
|
2345
2371
|
type: "button",
|
|
@@ -2361,11 +2387,11 @@ function RowActionsMenu({
|
|
|
2361
2387
|
|
|
2362
2388
|
// src/components/search-input.tsx
|
|
2363
2389
|
var React10 = __toESM(require("react"), 1);
|
|
2364
|
-
var
|
|
2390
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2365
2391
|
var SearchInput = React10.forwardRef(
|
|
2366
2392
|
({ containerClassName, className, ...props }, ref) => {
|
|
2367
|
-
return /* @__PURE__ */ (0,
|
|
2368
|
-
/* @__PURE__ */ (0,
|
|
2393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("relative flex-1", containerClassName), children: [
|
|
2394
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2369
2395
|
"svg",
|
|
2370
2396
|
{
|
|
2371
2397
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2380,12 +2406,12 @@ var SearchInput = React10.forwardRef(
|
|
|
2380
2406
|
"aria-hidden": "true",
|
|
2381
2407
|
className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",
|
|
2382
2408
|
children: [
|
|
2383
|
-
/* @__PURE__ */ (0,
|
|
2384
|
-
/* @__PURE__ */ (0,
|
|
2409
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2410
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", { d: "m21 21-4.3-4.3" })
|
|
2385
2411
|
]
|
|
2386
2412
|
}
|
|
2387
2413
|
),
|
|
2388
|
-
/* @__PURE__ */ (0,
|
|
2414
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2389
2415
|
"input",
|
|
2390
2416
|
{
|
|
2391
2417
|
ref,
|
|
@@ -2403,30 +2429,30 @@ var SearchInput = React10.forwardRef(
|
|
|
2403
2429
|
SearchInput.displayName = "SearchInput";
|
|
2404
2430
|
|
|
2405
2431
|
// src/components/stat-card.tsx
|
|
2406
|
-
var
|
|
2432
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2407
2433
|
function StatCard({ label, value, detail, icon, isLoading }) {
|
|
2408
2434
|
if (isLoading) {
|
|
2409
|
-
return /* @__PURE__ */ (0,
|
|
2410
|
-
/* @__PURE__ */ (0,
|
|
2411
|
-
/* @__PURE__ */ (0,
|
|
2412
|
-
/* @__PURE__ */ (0,
|
|
2435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
|
|
2436
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
|
|
2437
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
2438
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" })
|
|
2413
2439
|
] }),
|
|
2414
|
-
/* @__PURE__ */ (0,
|
|
2415
|
-
/* @__PURE__ */ (0,
|
|
2440
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mt-2 h-7 w-16 animate-pulse rounded bg-muted" }),
|
|
2441
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mt-1 h-4 w-20 animate-pulse rounded bg-muted" })
|
|
2416
2442
|
] });
|
|
2417
2443
|
}
|
|
2418
|
-
return /* @__PURE__ */ (0,
|
|
2419
|
-
/* @__PURE__ */ (0,
|
|
2420
|
-
/* @__PURE__ */ (0,
|
|
2421
|
-
icon && /* @__PURE__ */ (0,
|
|
2444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
|
|
2445
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
|
|
2446
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
|
|
2447
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-muted-foreground", children: icon })
|
|
2422
2448
|
] }),
|
|
2423
|
-
/* @__PURE__ */ (0,
|
|
2424
|
-
detail && /* @__PURE__ */ (0,
|
|
2449
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "text-2xl font-bold", children: value }),
|
|
2450
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-xs text-muted-foreground", children: detail })
|
|
2425
2451
|
] });
|
|
2426
2452
|
}
|
|
2427
2453
|
|
|
2428
2454
|
// src/components/status-badge.tsx
|
|
2429
|
-
var
|
|
2455
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2430
2456
|
var variantClasses = {
|
|
2431
2457
|
neutral: {
|
|
2432
2458
|
badge: "bg-[var(--status-neutral-surface,#f3f4f6)] text-[var(--status-neutral-text,#374151)]",
|
|
@@ -2456,12 +2482,12 @@ function StatusBadge({
|
|
|
2456
2482
|
children
|
|
2457
2483
|
}) {
|
|
2458
2484
|
const classes = variantClasses[variant];
|
|
2459
|
-
return /* @__PURE__ */ (0,
|
|
2485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2460
2486
|
"span",
|
|
2461
2487
|
{
|
|
2462
2488
|
className: `inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 text-xs font-medium ${classes.badge} ${className ?? ""}`,
|
|
2463
2489
|
children: [
|
|
2464
|
-
dot && /* @__PURE__ */ (0,
|
|
2490
|
+
dot && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2465
2491
|
"span",
|
|
2466
2492
|
{
|
|
2467
2493
|
className: `inline-block h-1.5 w-1.5 shrink-0 rounded-full ${classes.dot}`
|
|
@@ -2474,36 +2500,36 @@ function StatusBadge({
|
|
|
2474
2500
|
}
|
|
2475
2501
|
|
|
2476
2502
|
// src/components/status-dot.tsx
|
|
2477
|
-
var
|
|
2503
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2478
2504
|
function StatusDot({ active, label, className }) {
|
|
2479
|
-
return /* @__PURE__ */ (0,
|
|
2480
|
-
/* @__PURE__ */ (0,
|
|
2505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: `inline-flex items-center gap-2 ${className ?? ""}`, children: [
|
|
2506
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2481
2507
|
"span",
|
|
2482
2508
|
{
|
|
2483
2509
|
className: `h-2 w-2 rounded-full ${active ? "bg-green-500" : "bg-red-500"}`
|
|
2484
2510
|
}
|
|
2485
2511
|
),
|
|
2486
|
-
label && /* @__PURE__ */ (0,
|
|
2512
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: label })
|
|
2487
2513
|
] });
|
|
2488
2514
|
}
|
|
2489
2515
|
|
|
2490
2516
|
// src/components/table-skeleton.tsx
|
|
2491
|
-
var
|
|
2517
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2492
2518
|
function TableSkeleton({ rows = 5, columns = 4 }) {
|
|
2493
|
-
return /* @__PURE__ */ (0,
|
|
2519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: Array.from({ length: rows }).map((_, i) => (
|
|
2494
2520
|
// p-2/h-4 espelha o TableCell real. Com p-4/h-5 a linha do skeleton
|
|
2495
2521
|
// ficava ~16px mais alta que a linha de dados, e a tabela encolhia
|
|
2496
2522
|
// visivelmente quando a resposta chegava.
|
|
2497
|
-
/* @__PURE__ */ (0,
|
|
2523
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("tr", { className: "border-b transition-colors", children: Array.from({ length: columns }).map((_2, j) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "p-2 align-middle first:pl-4 last:pr-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-4 w-full animate-pulse rounded bg-muted" }) }, j)) }, i)
|
|
2498
2524
|
)) });
|
|
2499
2525
|
}
|
|
2500
2526
|
|
|
2501
2527
|
// src/components/toaster.tsx
|
|
2502
2528
|
var import_sonner = require("sonner");
|
|
2503
|
-
var
|
|
2529
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2504
2530
|
function Toaster(props) {
|
|
2505
2531
|
const { theme = "system" } = useTheme();
|
|
2506
|
-
return /* @__PURE__ */ (0,
|
|
2532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2507
2533
|
import_sonner.Toaster,
|
|
2508
2534
|
{
|
|
2509
2535
|
theme,
|
|
@@ -2630,6 +2656,7 @@ function extractApiError(err, fallbackMessage = "Ocorreu um erro inesperado.") {
|
|
|
2630
2656
|
FormDialog,
|
|
2631
2657
|
FormDialogLayout,
|
|
2632
2658
|
FormField,
|
|
2659
|
+
HighlightPill,
|
|
2633
2660
|
MobileCardList,
|
|
2634
2661
|
ModeToggle,
|
|
2635
2662
|
MultiCombobox,
|