@yuva-devlab/ui 1.3.1 → 1.4.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/dist/components/button/button.css +1 -1
- package/dist/components/copy-button/copy-button.css +32 -0
- package/dist/components/dialog/dialog.css +5 -4
- package/dist/components/input/input.css +2 -2
- package/dist/components/label/label.css +5 -1
- package/dist/components/metric-card/metric-card.css +68 -0
- package/dist/components/secret-reveal-card/secret-reveal-card.css +37 -0
- package/dist/components/sonner/sonner.css +35 -6
- package/dist/components/textarea/textarea.css +1 -1
- package/dist/components.css +192 -15
- package/dist/index.cjs +174 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +90 -3
- package/dist/index.d.ts +90 -3
- package/dist/index.js +223 -84
- package/dist/index.js.map +1 -1
- package/dist/styles/components.css +192 -15
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -1637,14 +1637,18 @@ import {
|
|
|
1637
1637
|
import * as React21 from "react";
|
|
1638
1638
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
1639
1639
|
import { cva as cva4 } from "class-variance-authority";
|
|
1640
|
-
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1640
|
+
import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1641
1641
|
var labelVariants = cva4("dl-label");
|
|
1642
|
-
var Label3 = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1642
|
+
var Label3 = React21.forwardRef(({ className, children, required = false, ...props }, ref) => /* @__PURE__ */ jsxs13(
|
|
1643
1643
|
LabelPrimitive.Root,
|
|
1644
1644
|
{
|
|
1645
1645
|
ref,
|
|
1646
1646
|
className: cn(labelVariants(), className),
|
|
1647
|
-
...props
|
|
1647
|
+
...props,
|
|
1648
|
+
children: [
|
|
1649
|
+
children,
|
|
1650
|
+
required && /* @__PURE__ */ jsx22("span", { className: "dl-label-required text-destructive ml-0.5", children: "*" })
|
|
1651
|
+
]
|
|
1648
1652
|
}
|
|
1649
1653
|
));
|
|
1650
1654
|
Label3.displayName = LabelPrimitive.Root.displayName;
|
|
@@ -1766,7 +1770,7 @@ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
|
1766
1770
|
|
|
1767
1771
|
// src/components/input/input.tsx
|
|
1768
1772
|
import * as React24 from "react";
|
|
1769
|
-
import { jsx as jsx25, jsxs as
|
|
1773
|
+
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1770
1774
|
var Input = React24.forwardRef(
|
|
1771
1775
|
({ className, type, startIcon, endIcon, ...props }, ref) => {
|
|
1772
1776
|
const inputEl = /* @__PURE__ */ jsx25(
|
|
@@ -1786,7 +1790,7 @@ var Input = React24.forwardRef(
|
|
|
1786
1790
|
if (!startIcon && !endIcon) {
|
|
1787
1791
|
return inputEl;
|
|
1788
1792
|
}
|
|
1789
|
-
return /* @__PURE__ */
|
|
1793
|
+
return /* @__PURE__ */ jsxs14("div", { className: "dl-input-wrapper", children: [
|
|
1790
1794
|
startIcon && /* @__PURE__ */ jsx25("span", { className: "dl-input-icon dl-input-icon--start", children: startIcon }),
|
|
1791
1795
|
inputEl,
|
|
1792
1796
|
endIcon && /* @__PURE__ */ jsx25("span", { className: "dl-input-icon dl-input-icon--end", children: endIcon })
|
|
@@ -1799,7 +1803,7 @@ Input.displayName = "Input";
|
|
|
1799
1803
|
import * as React25 from "react";
|
|
1800
1804
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
1801
1805
|
import { Minus } from "lucide-react";
|
|
1802
|
-
import { jsx as jsx26, jsxs as
|
|
1806
|
+
import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1803
1807
|
var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1804
1808
|
OTPInput,
|
|
1805
1809
|
{
|
|
@@ -1819,7 +1823,7 @@ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1819
1823
|
hasFakeCaret: false,
|
|
1820
1824
|
isActive: false
|
|
1821
1825
|
};
|
|
1822
|
-
return /* @__PURE__ */
|
|
1826
|
+
return /* @__PURE__ */ jsxs15(
|
|
1823
1827
|
"div",
|
|
1824
1828
|
{
|
|
1825
1829
|
ref,
|
|
@@ -1847,7 +1851,7 @@ function Skeleton({ className, ...props }) {
|
|
|
1847
1851
|
}
|
|
1848
1852
|
|
|
1849
1853
|
// src/components/loading-state/loading-state.tsx
|
|
1850
|
-
import { jsx as jsx28, jsxs as
|
|
1854
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1851
1855
|
function LoadingState({
|
|
1852
1856
|
rows = 3,
|
|
1853
1857
|
message,
|
|
@@ -1855,7 +1859,7 @@ function LoadingState({
|
|
|
1855
1859
|
...props
|
|
1856
1860
|
}) {
|
|
1857
1861
|
if (message) {
|
|
1858
|
-
return /* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ jsxs16("div", { className: cn("dl-loading", className), ...props, children: [
|
|
1859
1863
|
/* @__PURE__ */ jsx28(
|
|
1860
1864
|
"svg",
|
|
1861
1865
|
{
|
|
@@ -1874,7 +1878,7 @@ function LoadingState({
|
|
|
1874
1878
|
/* @__PURE__ */ jsx28("span", { children: message })
|
|
1875
1879
|
] });
|
|
1876
1880
|
}
|
|
1877
|
-
return /* @__PURE__ */
|
|
1881
|
+
return /* @__PURE__ */ jsxs16("div", { className: cn("dl-loading-skeleton", className), ...props, children: [
|
|
1878
1882
|
/* @__PURE__ */ jsx28(Skeleton, { style: { height: "2rem", width: "33.333%" } }),
|
|
1879
1883
|
/* @__PURE__ */ jsx28("div", { className: "dl-loading-skeleton__list", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsx28(
|
|
1880
1884
|
Skeleton,
|
|
@@ -1894,7 +1898,7 @@ function LoadingState({
|
|
|
1894
1898
|
import * as React26 from "react";
|
|
1895
1899
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
1896
1900
|
import { Check as Check4, ChevronRight as ChevronRight4, Circle as Circle3 } from "lucide-react";
|
|
1897
|
-
import { jsx as jsx29, jsxs as
|
|
1901
|
+
import { jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1898
1902
|
function MenubarMenu(props) {
|
|
1899
1903
|
return /* @__PURE__ */ jsx29(MenubarPrimitive.Menu, { ...props });
|
|
1900
1904
|
}
|
|
@@ -1928,7 +1932,7 @@ var MenubarTrigger = React26.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1928
1932
|
}
|
|
1929
1933
|
));
|
|
1930
1934
|
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
1931
|
-
var MenubarSubTrigger = React26.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */
|
|
1935
|
+
var MenubarSubTrigger = React26.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs17(
|
|
1932
1936
|
MenubarPrimitive.SubTrigger,
|
|
1933
1937
|
{
|
|
1934
1938
|
ref,
|
|
@@ -1977,7 +1981,7 @@ var MenubarItem = React26.forwardRef(({ className, inset, ...props }, ref) => /*
|
|
|
1977
1981
|
}
|
|
1978
1982
|
));
|
|
1979
1983
|
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
1980
|
-
var MenubarCheckboxItem = React26.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */
|
|
1984
|
+
var MenubarCheckboxItem = React26.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs17(
|
|
1981
1985
|
MenubarPrimitive.CheckboxItem,
|
|
1982
1986
|
{
|
|
1983
1987
|
ref,
|
|
@@ -1991,7 +1995,7 @@ var MenubarCheckboxItem = React26.forwardRef(({ className, children, checked, ..
|
|
|
1991
1995
|
}
|
|
1992
1996
|
));
|
|
1993
1997
|
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
1994
|
-
var MenubarRadioItem = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
1998
|
+
var MenubarRadioItem = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs17(
|
|
1995
1999
|
MenubarPrimitive.RadioItem,
|
|
1996
2000
|
{
|
|
1997
2001
|
ref,
|
|
@@ -2032,8 +2036,8 @@ import * as React27 from "react";
|
|
|
2032
2036
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
2033
2037
|
import { cva as cva5 } from "class-variance-authority";
|
|
2034
2038
|
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
2035
|
-
import { jsx as jsx30, jsxs as
|
|
2036
|
-
var NavigationMenu = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
2039
|
+
import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2040
|
+
var NavigationMenu = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs18(
|
|
2037
2041
|
NavigationMenuPrimitive.Root,
|
|
2038
2042
|
{
|
|
2039
2043
|
ref,
|
|
@@ -2057,7 +2061,7 @@ var NavigationMenuList = React27.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2057
2061
|
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
2058
2062
|
var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
2059
2063
|
var navigationMenuTriggerStyle = cva5("dl-navigation-menu-trigger");
|
|
2060
|
-
var NavigationMenuTrigger = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
2064
|
+
var NavigationMenuTrigger = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs18(
|
|
2061
2065
|
NavigationMenuPrimitive.Trigger,
|
|
2062
2066
|
{
|
|
2063
2067
|
ref,
|
|
@@ -2104,7 +2108,7 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
|
|
|
2104
2108
|
// src/components/pagination/pagination.tsx
|
|
2105
2109
|
import * as React28 from "react";
|
|
2106
2110
|
import { ChevronLeft, ChevronRight as ChevronRight5, MoreHorizontal as MoreHorizontal2 } from "lucide-react";
|
|
2107
|
-
import { jsx as jsx31, jsxs as
|
|
2111
|
+
import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2108
2112
|
var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx31(
|
|
2109
2113
|
"nav",
|
|
2110
2114
|
{
|
|
@@ -2144,7 +2148,7 @@ PaginationLink.displayName = "PaginationLink";
|
|
|
2144
2148
|
var PaginationPrevious = ({
|
|
2145
2149
|
className,
|
|
2146
2150
|
...props
|
|
2147
|
-
}) => /* @__PURE__ */
|
|
2151
|
+
}) => /* @__PURE__ */ jsxs19(
|
|
2148
2152
|
PaginationLink,
|
|
2149
2153
|
{
|
|
2150
2154
|
"aria-label": "Go to previous page",
|
|
@@ -2158,7 +2162,7 @@ var PaginationPrevious = ({
|
|
|
2158
2162
|
}
|
|
2159
2163
|
);
|
|
2160
2164
|
PaginationPrevious.displayName = "PaginationPrevious";
|
|
2161
|
-
var PaginationNext = ({ className, ...props }) => /* @__PURE__ */
|
|
2165
|
+
var PaginationNext = ({ className, ...props }) => /* @__PURE__ */ jsxs19(
|
|
2162
2166
|
PaginationLink,
|
|
2163
2167
|
{
|
|
2164
2168
|
"aria-label": "Go to next page",
|
|
@@ -2175,7 +2179,7 @@ PaginationNext.displayName = "PaginationNext";
|
|
|
2175
2179
|
var PaginationEllipsis = ({
|
|
2176
2180
|
className,
|
|
2177
2181
|
...props
|
|
2178
|
-
}) => /* @__PURE__ */
|
|
2182
|
+
}) => /* @__PURE__ */ jsxs19(
|
|
2179
2183
|
"span",
|
|
2180
2184
|
{
|
|
2181
2185
|
"aria-hidden": true,
|
|
@@ -2191,11 +2195,11 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
|
2191
2195
|
|
|
2192
2196
|
// src/components/panel/panel.tsx
|
|
2193
2197
|
import * as React29 from "react";
|
|
2194
|
-
import { jsx as jsx32, jsxs as
|
|
2198
|
+
import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2195
2199
|
var Panel = React29.forwardRef(
|
|
2196
2200
|
({ title, meta, children, className, ...props }, ref) => {
|
|
2197
|
-
return /* @__PURE__ */
|
|
2198
|
-
title ? /* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ jsxs20("section", { ref, className: cn("dl-panel", className), ...props, children: [
|
|
2202
|
+
title ? /* @__PURE__ */ jsxs20("div", { className: "dl-panel__header", children: [
|
|
2199
2203
|
/* @__PURE__ */ jsx32("h2", { className: "dl-panel__title", children: title }),
|
|
2200
2204
|
meta ? /* @__PURE__ */ jsx32("div", { className: "dl-panel__meta", children: meta }) : null
|
|
2201
2205
|
] }) : null,
|
|
@@ -2273,8 +2277,8 @@ var ResizableHandle = ({
|
|
|
2273
2277
|
// src/components/scroll-area/scroll-area.tsx
|
|
2274
2278
|
import * as React32 from "react";
|
|
2275
2279
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
2276
|
-
import { jsx as jsx36, jsxs as
|
|
2277
|
-
var ScrollArea = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
2280
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2281
|
+
var ScrollArea = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs21(
|
|
2278
2282
|
ScrollAreaPrimitive.Root,
|
|
2279
2283
|
{
|
|
2280
2284
|
ref,
|
|
@@ -2303,7 +2307,7 @@ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
|
2303
2307
|
// src/components/searchable-select/searchable-select.tsx
|
|
2304
2308
|
import * as React33 from "react";
|
|
2305
2309
|
import { Search as Search2, Plus, Check as Check5, ChevronDown as ChevronDown3 } from "lucide-react";
|
|
2306
|
-
import { jsx as jsx37, jsxs as
|
|
2310
|
+
import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2307
2311
|
function SearchableSelect({
|
|
2308
2312
|
options,
|
|
2309
2313
|
value,
|
|
@@ -2411,8 +2415,8 @@ function SearchableSelect({
|
|
|
2411
2415
|
}
|
|
2412
2416
|
};
|
|
2413
2417
|
let currentIndex = 0;
|
|
2414
|
-
return /* @__PURE__ */
|
|
2415
|
-
/* @__PURE__ */ jsx37(PopoverTrigger, { asChild: true, children: /* @__PURE__ */
|
|
2418
|
+
return /* @__PURE__ */ jsxs22(Popover, { open, onOpenChange: handleOpenChange, children: [
|
|
2419
|
+
/* @__PURE__ */ jsx37(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs22(
|
|
2416
2420
|
Button,
|
|
2417
2421
|
{
|
|
2418
2422
|
id,
|
|
@@ -2432,14 +2436,14 @@ function SearchableSelect({
|
|
|
2432
2436
|
]
|
|
2433
2437
|
}
|
|
2434
2438
|
) }),
|
|
2435
|
-
/* @__PURE__ */
|
|
2439
|
+
/* @__PURE__ */ jsxs22(
|
|
2436
2440
|
PopoverContent,
|
|
2437
2441
|
{
|
|
2438
2442
|
align: "start",
|
|
2439
2443
|
className: "dl-searchable-select-content",
|
|
2440
2444
|
onKeyDown: handleKeyDown,
|
|
2441
2445
|
children: [
|
|
2442
|
-
/* @__PURE__ */
|
|
2446
|
+
/* @__PURE__ */ jsxs22("div", { className: "dl-searchable-select-search", children: [
|
|
2443
2447
|
/* @__PURE__ */ jsx37(Search2, { className: "dl-searchable-select-search-icon" }),
|
|
2444
2448
|
/* @__PURE__ */ jsx37(
|
|
2445
2449
|
Input,
|
|
@@ -2458,13 +2462,13 @@ function SearchableSelect({
|
|
|
2458
2462
|
ref: listRef,
|
|
2459
2463
|
onWheel: (e) => e.stopPropagation(),
|
|
2460
2464
|
className: "dl-searchable-select-list",
|
|
2461
|
-
children: Object.keys(groupedOptions).length === 0 || filteredOptions.length === 0 && !onAddNew ? /* @__PURE__ */ jsx37("div", { className: "dl-searchable-select-empty", children: "No matching options found." }) : Object.entries(groupedOptions).map(([groupName, groupOpts]) => /* @__PURE__ */
|
|
2465
|
+
children: Object.keys(groupedOptions).length === 0 || filteredOptions.length === 0 && !onAddNew ? /* @__PURE__ */ jsx37("div", { className: "dl-searchable-select-empty", children: "No matching options found." }) : Object.entries(groupedOptions).map(([groupName, groupOpts]) => /* @__PURE__ */ jsxs22("div", { className: "py-1", children: [
|
|
2462
2466
|
groupName !== "Default" && /* @__PURE__ */ jsx37("div", { className: "dl-searchable-select-group-header", children: groupName }),
|
|
2463
2467
|
groupOpts.map((option) => {
|
|
2464
2468
|
const isSelected = option.value === value;
|
|
2465
2469
|
const itemIndex = currentIndex++;
|
|
2466
2470
|
const isHighlighted = itemIndex === highlightedIndex;
|
|
2467
|
-
return /* @__PURE__ */
|
|
2471
|
+
return /* @__PURE__ */ jsxs22(
|
|
2468
2472
|
"div",
|
|
2469
2473
|
{
|
|
2470
2474
|
"data-highlighted": isHighlighted,
|
|
@@ -2486,7 +2490,7 @@ function SearchableSelect({
|
|
|
2486
2490
|
] }, groupName))
|
|
2487
2491
|
}
|
|
2488
2492
|
),
|
|
2489
|
-
onAddNew && /* @__PURE__ */ jsx37("div", { className: "dl-searchable-select-add", children: /* @__PURE__ */
|
|
2493
|
+
onAddNew && /* @__PURE__ */ jsx37("div", { className: "dl-searchable-select-add", children: /* @__PURE__ */ jsxs22(
|
|
2490
2494
|
"button",
|
|
2491
2495
|
{
|
|
2492
2496
|
type: "button",
|
|
@@ -2508,11 +2512,11 @@ function SearchableSelect({
|
|
|
2508
2512
|
import * as React34 from "react";
|
|
2509
2513
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2510
2514
|
import { Check as Check6, ChevronDown as ChevronDown4, ChevronUp } from "lucide-react";
|
|
2511
|
-
import { jsx as jsx38, jsxs as
|
|
2515
|
+
import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2512
2516
|
var Select = SelectPrimitive.Root;
|
|
2513
2517
|
var SelectGroup = SelectPrimitive.Group;
|
|
2514
2518
|
var SelectValue = SelectPrimitive.Value;
|
|
2515
|
-
var SelectTrigger = React34.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
2519
|
+
var SelectTrigger = React34.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
2516
2520
|
SelectPrimitive.Trigger,
|
|
2517
2521
|
{
|
|
2518
2522
|
ref,
|
|
@@ -2550,7 +2554,7 @@ var SelectScrollDownButton = React34.forwardRef(({ className, ...props }, ref) =
|
|
|
2550
2554
|
}
|
|
2551
2555
|
));
|
|
2552
2556
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2553
|
-
var SelectContent = React34.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx38(SelectPrimitive.Portal, { children: /* @__PURE__ */
|
|
2557
|
+
var SelectContent = React34.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx38(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs23(
|
|
2554
2558
|
SelectPrimitive.Content,
|
|
2555
2559
|
{
|
|
2556
2560
|
ref,
|
|
@@ -2574,7 +2578,7 @@ var SelectLabel = React34.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2574
2578
|
}
|
|
2575
2579
|
));
|
|
2576
2580
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2577
|
-
var SelectItem = React34.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
2581
|
+
var SelectItem = React34.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
2578
2582
|
SelectPrimitive.Item,
|
|
2579
2583
|
{
|
|
2580
2584
|
ref,
|
|
@@ -2620,7 +2624,7 @@ import * as React36 from "react";
|
|
|
2620
2624
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
2621
2625
|
import { cva as cva6 } from "class-variance-authority";
|
|
2622
2626
|
import { X as X2 } from "lucide-react";
|
|
2623
|
-
import { jsx as jsx40, jsxs as
|
|
2627
|
+
import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2624
2628
|
var Sheet = SheetPrimitive.Root;
|
|
2625
2629
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
2626
2630
|
var SheetClose = SheetPrimitive.Close;
|
|
@@ -2647,9 +2651,9 @@ var sheetVariants = cva6("dl-sheet-content", {
|
|
|
2647
2651
|
side: "right"
|
|
2648
2652
|
}
|
|
2649
2653
|
});
|
|
2650
|
-
var SheetContent = React36.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */
|
|
2654
|
+
var SheetContent = React36.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs24(SheetPortal, { children: [
|
|
2651
2655
|
/* @__PURE__ */ jsx40(SheetOverlay, {}),
|
|
2652
|
-
/* @__PURE__ */
|
|
2656
|
+
/* @__PURE__ */ jsxs24(
|
|
2653
2657
|
SheetPrimitive.Content,
|
|
2654
2658
|
{
|
|
2655
2659
|
ref,
|
|
@@ -2657,7 +2661,7 @@ var SheetContent = React36.forwardRef(({ side = "right", className, children, ..
|
|
|
2657
2661
|
"data-side": side,
|
|
2658
2662
|
...props,
|
|
2659
2663
|
children: [
|
|
2660
|
-
/* @__PURE__ */
|
|
2664
|
+
/* @__PURE__ */ jsxs24(SheetPrimitive.Close, { className: "dl-sheet-close", children: [
|
|
2661
2665
|
/* @__PURE__ */ jsx40(X2, { style: { width: "1rem", height: "1rem" } }),
|
|
2662
2666
|
/* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Close" })
|
|
2663
2667
|
] }),
|
|
@@ -2721,7 +2725,7 @@ var TooltipContent = React37.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
2721
2725
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
2722
2726
|
|
|
2723
2727
|
// src/components/sidebar/sidebar.tsx
|
|
2724
|
-
import { jsx as jsx42, jsxs as
|
|
2728
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2725
2729
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
2726
2730
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
2727
2731
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -2841,7 +2845,7 @@ var Sidebar = React38.forwardRef(
|
|
|
2841
2845
|
);
|
|
2842
2846
|
}
|
|
2843
2847
|
if (isMobile) {
|
|
2844
|
-
return /* @__PURE__ */ jsx42(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */
|
|
2848
|
+
return /* @__PURE__ */ jsx42(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs25(
|
|
2845
2849
|
SheetContent,
|
|
2846
2850
|
{
|
|
2847
2851
|
"data-sidebar": "sidebar",
|
|
@@ -2852,7 +2856,7 @@ var Sidebar = React38.forwardRef(
|
|
|
2852
2856
|
},
|
|
2853
2857
|
side,
|
|
2854
2858
|
children: [
|
|
2855
|
-
/* @__PURE__ */
|
|
2859
|
+
/* @__PURE__ */ jsxs25(SheetHeader, { className: "sr-only", children: [
|
|
2856
2860
|
/* @__PURE__ */ jsx42(SheetTitle, { children: "Sidebar" }),
|
|
2857
2861
|
/* @__PURE__ */ jsx42(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
2858
2862
|
] }),
|
|
@@ -2861,7 +2865,7 @@ var Sidebar = React38.forwardRef(
|
|
|
2861
2865
|
}
|
|
2862
2866
|
) });
|
|
2863
2867
|
}
|
|
2864
|
-
return /* @__PURE__ */
|
|
2868
|
+
return /* @__PURE__ */ jsxs25(
|
|
2865
2869
|
"div",
|
|
2866
2870
|
{
|
|
2867
2871
|
ref,
|
|
@@ -2911,7 +2915,7 @@ var Sidebar = React38.forwardRef(
|
|
|
2911
2915
|
Sidebar.displayName = "Sidebar";
|
|
2912
2916
|
var SidebarTrigger = React38.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
2913
2917
|
const { toggleSidebar } = useSidebar();
|
|
2914
|
-
return /* @__PURE__ */
|
|
2918
|
+
return /* @__PURE__ */ jsxs25(
|
|
2915
2919
|
Button,
|
|
2916
2920
|
{
|
|
2917
2921
|
ref,
|
|
@@ -3180,7 +3184,7 @@ var SidebarMenuButton = React38.forwardRef(
|
|
|
3180
3184
|
children: tooltip
|
|
3181
3185
|
};
|
|
3182
3186
|
}
|
|
3183
|
-
return /* @__PURE__ */
|
|
3187
|
+
return /* @__PURE__ */ jsxs25(Tooltip2, { children: [
|
|
3184
3188
|
/* @__PURE__ */ jsx42(TooltipTrigger, { asChild: true, children: button }),
|
|
3185
3189
|
/* @__PURE__ */ jsx42(
|
|
3186
3190
|
TooltipContent,
|
|
@@ -3240,7 +3244,7 @@ var SidebarMenuSkeleton = React38.forwardRef(({ className, showIcon = false, ...
|
|
|
3240
3244
|
const width = React38.useMemo(() => {
|
|
3241
3245
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
3242
3246
|
}, []);
|
|
3243
|
-
return /* @__PURE__ */
|
|
3247
|
+
return /* @__PURE__ */ jsxs25(
|
|
3244
3248
|
"div",
|
|
3245
3249
|
{
|
|
3246
3250
|
ref,
|
|
@@ -3314,8 +3318,8 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
3314
3318
|
// src/components/slider/slider.tsx
|
|
3315
3319
|
import * as React39 from "react";
|
|
3316
3320
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3317
|
-
import { jsx as jsx43, jsxs as
|
|
3318
|
-
var Slider = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
3321
|
+
import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3322
|
+
var Slider = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs26(
|
|
3319
3323
|
SliderPrimitive.Root,
|
|
3320
3324
|
{
|
|
3321
3325
|
ref,
|
|
@@ -3330,12 +3334,37 @@ var Slider = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
3330
3334
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
3331
3335
|
|
|
3332
3336
|
// src/components/sonner/sonner.tsx
|
|
3337
|
+
import { useEffect as useEffect7, useState as useState6 } from "react";
|
|
3333
3338
|
import { Toaster as Sonner, toast } from "sonner";
|
|
3334
3339
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
3335
|
-
var Toaster = ({ ...props }) => {
|
|
3340
|
+
var Toaster = ({ theme: propTheme, ...props }) => {
|
|
3341
|
+
const [resolvedTheme, setResolvedTheme] = useState6("system");
|
|
3342
|
+
useEffect7(() => {
|
|
3343
|
+
if (propTheme) return;
|
|
3344
|
+
const root = document.documentElement;
|
|
3345
|
+
const detect = () => {
|
|
3346
|
+
const isDark = root.classList.contains("dark") || (root.getAttribute("data-theme")?.includes("dark") ?? false);
|
|
3347
|
+
const isLight = root.classList.contains("light") || (root.getAttribute("data-theme")?.includes("light") ?? false);
|
|
3348
|
+
if (isDark) {
|
|
3349
|
+
setResolvedTheme("dark");
|
|
3350
|
+
} else if (isLight) {
|
|
3351
|
+
setResolvedTheme("light");
|
|
3352
|
+
} else {
|
|
3353
|
+
setResolvedTheme("system");
|
|
3354
|
+
}
|
|
3355
|
+
};
|
|
3356
|
+
detect();
|
|
3357
|
+
const observer = new MutationObserver(detect);
|
|
3358
|
+
observer.observe(root, {
|
|
3359
|
+
attributes: true,
|
|
3360
|
+
attributeFilter: ["class", "data-theme"]
|
|
3361
|
+
});
|
|
3362
|
+
return () => observer.disconnect();
|
|
3363
|
+
}, [propTheme]);
|
|
3336
3364
|
return /* @__PURE__ */ jsx44(
|
|
3337
3365
|
Sonner,
|
|
3338
3366
|
{
|
|
3367
|
+
theme: propTheme ?? resolvedTheme,
|
|
3339
3368
|
className: "dl-toaster",
|
|
3340
3369
|
toastOptions: {
|
|
3341
3370
|
classNames: {
|
|
@@ -3351,8 +3380,8 @@ var Toaster = ({ ...props }) => {
|
|
|
3351
3380
|
};
|
|
3352
3381
|
|
|
3353
3382
|
// src/components/status-badge/status-badge.tsx
|
|
3354
|
-
import * as
|
|
3355
|
-
import { jsx as jsx45, jsxs as
|
|
3383
|
+
import * as React41 from "react";
|
|
3384
|
+
import { jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3356
3385
|
var statusCategoryMap = {
|
|
3357
3386
|
Completed: "dl-status-badge--success",
|
|
3358
3387
|
COMPLETED: "dl-status-badge--success",
|
|
@@ -3372,11 +3401,11 @@ var statusCategoryMap = {
|
|
|
3372
3401
|
DISABLED: "dl-status-badge--muted",
|
|
3373
3402
|
IDLE: "dl-status-badge--muted"
|
|
3374
3403
|
};
|
|
3375
|
-
var StatusBadge =
|
|
3404
|
+
var StatusBadge = React41.forwardRef(
|
|
3376
3405
|
({ status, className, ...props }, ref) => {
|
|
3377
3406
|
const normalizedStatus = status?.trim() ?? "";
|
|
3378
3407
|
const colorClass = statusCategoryMap[normalizedStatus] ?? "dl-status-badge--muted";
|
|
3379
|
-
return /* @__PURE__ */
|
|
3408
|
+
return /* @__PURE__ */ jsxs27(
|
|
3380
3409
|
"span",
|
|
3381
3410
|
{
|
|
3382
3411
|
ref,
|
|
@@ -3393,8 +3422,8 @@ var StatusBadge = React40.forwardRef(
|
|
|
3393
3422
|
StatusBadge.displayName = "StatusBadge";
|
|
3394
3423
|
|
|
3395
3424
|
// src/components/status-chip/status-chip.tsx
|
|
3396
|
-
import * as
|
|
3397
|
-
import { jsx as jsx46, jsxs as
|
|
3425
|
+
import * as React42 from "react";
|
|
3426
|
+
import { jsx as jsx46, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3398
3427
|
var statusToneMap = {
|
|
3399
3428
|
active: "dl-status-chip--primary",
|
|
3400
3429
|
running: "dl-status-chip--primary",
|
|
@@ -3416,10 +3445,10 @@ var statusToneMap = {
|
|
|
3416
3445
|
error: "dl-status-chip--destructive",
|
|
3417
3446
|
offline: "dl-status-chip--destructive"
|
|
3418
3447
|
};
|
|
3419
|
-
var StatusChip =
|
|
3448
|
+
var StatusChip = React42.forwardRef(
|
|
3420
3449
|
({ status, className, ...props }, ref) => {
|
|
3421
3450
|
const toneClass = statusToneMap[status] ?? "dl-status-chip--muted";
|
|
3422
|
-
return /* @__PURE__ */
|
|
3451
|
+
return /* @__PURE__ */ jsxs28(
|
|
3423
3452
|
"span",
|
|
3424
3453
|
{
|
|
3425
3454
|
ref,
|
|
@@ -3436,10 +3465,10 @@ var StatusChip = React41.forwardRef(
|
|
|
3436
3465
|
StatusChip.displayName = "StatusChip";
|
|
3437
3466
|
|
|
3438
3467
|
// src/components/switch/switch.tsx
|
|
3439
|
-
import * as
|
|
3468
|
+
import * as React43 from "react";
|
|
3440
3469
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3441
3470
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3442
|
-
var Switch =
|
|
3471
|
+
var Switch = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
3443
3472
|
SwitchPrimitives.Root,
|
|
3444
3473
|
{
|
|
3445
3474
|
className: cn("dl-switch", className),
|
|
@@ -3451,37 +3480,37 @@ var Switch = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
3451
3480
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
3452
3481
|
|
|
3453
3482
|
// src/components/table/table.tsx
|
|
3454
|
-
import * as
|
|
3483
|
+
import * as React44 from "react";
|
|
3455
3484
|
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
3456
|
-
var Table =
|
|
3485
|
+
var Table = React44.forwardRef(
|
|
3457
3486
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx48("div", { className: "dl-table-wrapper", children: /* @__PURE__ */ jsx48("table", { ref, className: cn("dl-table", className), ...props }) })
|
|
3458
3487
|
);
|
|
3459
3488
|
Table.displayName = "Table";
|
|
3460
|
-
var TableHeader =
|
|
3489
|
+
var TableHeader = React44.forwardRef(
|
|
3461
3490
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx48("thead", { ref, className: cn("dl-table__head", className), ...props })
|
|
3462
3491
|
);
|
|
3463
3492
|
TableHeader.displayName = "TableHeader";
|
|
3464
|
-
var TableBody =
|
|
3493
|
+
var TableBody = React44.forwardRef(
|
|
3465
3494
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx48("tbody", { ref, className: cn("dl-table__body", className), ...props })
|
|
3466
3495
|
);
|
|
3467
3496
|
TableBody.displayName = "TableBody";
|
|
3468
|
-
var TableFooter =
|
|
3497
|
+
var TableFooter = React44.forwardRef(
|
|
3469
3498
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx48("tfoot", { ref, className: cn("dl-table__foot", className), ...props })
|
|
3470
3499
|
);
|
|
3471
3500
|
TableFooter.displayName = "TableFooter";
|
|
3472
|
-
var TableRow =
|
|
3501
|
+
var TableRow = React44.forwardRef(
|
|
3473
3502
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx48("tr", { ref, className: cn("dl-table__row", className), ...props })
|
|
3474
3503
|
);
|
|
3475
3504
|
TableRow.displayName = "TableRow";
|
|
3476
|
-
var TableHead =
|
|
3505
|
+
var TableHead = React44.forwardRef(
|
|
3477
3506
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx48("th", { ref, className: cn("dl-table__head-cell", className), ...props })
|
|
3478
3507
|
);
|
|
3479
3508
|
TableHead.displayName = "TableHead";
|
|
3480
|
-
var TableCell =
|
|
3509
|
+
var TableCell = React44.forwardRef(
|
|
3481
3510
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx48("td", { ref, className: cn("dl-table__cell", className), ...props })
|
|
3482
3511
|
);
|
|
3483
3512
|
TableCell.displayName = "TableCell";
|
|
3484
|
-
var TableCaption =
|
|
3513
|
+
var TableCaption = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
3485
3514
|
"caption",
|
|
3486
3515
|
{
|
|
3487
3516
|
ref,
|
|
@@ -3492,11 +3521,11 @@ var TableCaption = React43.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3492
3521
|
TableCaption.displayName = "TableCaption";
|
|
3493
3522
|
|
|
3494
3523
|
// src/components/tabs/tabs.tsx
|
|
3495
|
-
import * as
|
|
3524
|
+
import * as React45 from "react";
|
|
3496
3525
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3497
3526
|
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
3498
3527
|
var Tabs = TabsPrimitive.Root;
|
|
3499
|
-
var TabsList =
|
|
3528
|
+
var TabsList = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
|
|
3500
3529
|
TabsPrimitive.List,
|
|
3501
3530
|
{
|
|
3502
3531
|
ref,
|
|
@@ -3505,7 +3534,7 @@ var TabsList = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3505
3534
|
}
|
|
3506
3535
|
));
|
|
3507
3536
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3508
|
-
var TabsTrigger =
|
|
3537
|
+
var TabsTrigger = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
|
|
3509
3538
|
TabsPrimitive.Trigger,
|
|
3510
3539
|
{
|
|
3511
3540
|
ref,
|
|
@@ -3514,7 +3543,7 @@ var TabsTrigger = React44.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3514
3543
|
}
|
|
3515
3544
|
));
|
|
3516
3545
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3517
|
-
var TabsContent =
|
|
3546
|
+
var TabsContent = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
|
|
3518
3547
|
TabsPrimitive.Content,
|
|
3519
3548
|
{
|
|
3520
3549
|
ref,
|
|
@@ -3525,15 +3554,15 @@ var TabsContent = React44.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3525
3554
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3526
3555
|
|
|
3527
3556
|
// src/components/textarea/textarea.tsx
|
|
3528
|
-
import * as
|
|
3557
|
+
import * as React46 from "react";
|
|
3529
3558
|
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
3530
|
-
var Textarea =
|
|
3559
|
+
var Textarea = React46.forwardRef(
|
|
3531
3560
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx50("textarea", { className: cn("dl-textarea", className), ref, ...props })
|
|
3532
3561
|
);
|
|
3533
3562
|
Textarea.displayName = "Textarea";
|
|
3534
3563
|
|
|
3535
3564
|
// src/components/toggle/toggle.tsx
|
|
3536
|
-
import * as
|
|
3565
|
+
import * as React47 from "react";
|
|
3537
3566
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
3538
3567
|
import { cva as cva8 } from "class-variance-authority";
|
|
3539
3568
|
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
@@ -3554,7 +3583,7 @@ var toggleVariants = cva8("dl-toggle", {
|
|
|
3554
3583
|
size: "default"
|
|
3555
3584
|
}
|
|
3556
3585
|
});
|
|
3557
|
-
var Toggle =
|
|
3586
|
+
var Toggle = React47.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx51(
|
|
3558
3587
|
TogglePrimitive.Root,
|
|
3559
3588
|
{
|
|
3560
3589
|
ref,
|
|
@@ -3565,14 +3594,14 @@ var Toggle = React46.forwardRef(({ className, variant, size, ...props }, ref) =>
|
|
|
3565
3594
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
3566
3595
|
|
|
3567
3596
|
// src/components/toggle-group/toggle-group.tsx
|
|
3568
|
-
import * as
|
|
3597
|
+
import * as React48 from "react";
|
|
3569
3598
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
3570
3599
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
3571
|
-
var ToggleGroupContext =
|
|
3600
|
+
var ToggleGroupContext = React48.createContext({
|
|
3572
3601
|
size: "default",
|
|
3573
3602
|
variant: "default"
|
|
3574
3603
|
});
|
|
3575
|
-
var ToggleGroup =
|
|
3604
|
+
var ToggleGroup = React48.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx52(
|
|
3576
3605
|
ToggleGroupPrimitive.Root,
|
|
3577
3606
|
{
|
|
3578
3607
|
ref,
|
|
@@ -3582,8 +3611,8 @@ var ToggleGroup = React47.forwardRef(({ className, variant, size, children, ...p
|
|
|
3582
3611
|
}
|
|
3583
3612
|
));
|
|
3584
3613
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
3585
|
-
var ToggleGroupItem =
|
|
3586
|
-
const context =
|
|
3614
|
+
var ToggleGroupItem = React48.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
3615
|
+
const context = React48.useContext(ToggleGroupContext);
|
|
3587
3616
|
return /* @__PURE__ */ jsx52(
|
|
3588
3617
|
ToggleGroupPrimitive.Item,
|
|
3589
3618
|
{
|
|
@@ -3601,6 +3630,112 @@ var ToggleGroupItem = React47.forwardRef(({ className, children, variant, size,
|
|
|
3601
3630
|
);
|
|
3602
3631
|
});
|
|
3603
3632
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
3633
|
+
|
|
3634
|
+
// src/components/metric-card/metric-card.tsx
|
|
3635
|
+
import * as React49 from "react";
|
|
3636
|
+
import { jsx as jsx53, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3637
|
+
var MetricCard = React49.forwardRef(
|
|
3638
|
+
({ label, value, note, positive, icon, className, ...props }, ref) => {
|
|
3639
|
+
return /* @__PURE__ */ jsxs29("div", { ref, className: cn("dl-metric-card", className), ...props, children: [
|
|
3640
|
+
/* @__PURE__ */ jsxs29("div", { className: "dl-metric-card__header", children: [
|
|
3641
|
+
/* @__PURE__ */ jsx53("span", { className: "dl-metric-card__label", children: label }),
|
|
3642
|
+
icon && /* @__PURE__ */ jsx53("span", { className: "dl-metric-card__icon", children: icon })
|
|
3643
|
+
] }),
|
|
3644
|
+
/* @__PURE__ */ jsx53("div", { className: "dl-metric-card__value-row", children: /* @__PURE__ */ jsx53("span", { className: "dl-metric-card__value", children: value }) }),
|
|
3645
|
+
note && /* @__PURE__ */ jsx53(
|
|
3646
|
+
"div",
|
|
3647
|
+
{
|
|
3648
|
+
className: cn(
|
|
3649
|
+
"dl-metric-card__note",
|
|
3650
|
+
positive === true && "dl-metric-card__note--positive",
|
|
3651
|
+
positive === false && "dl-metric-card__note--negative"
|
|
3652
|
+
),
|
|
3653
|
+
children: note
|
|
3654
|
+
}
|
|
3655
|
+
)
|
|
3656
|
+
] });
|
|
3657
|
+
}
|
|
3658
|
+
);
|
|
3659
|
+
MetricCard.displayName = "MetricCard";
|
|
3660
|
+
var MetricsGrid = React49.forwardRef(
|
|
3661
|
+
({ children, className, ...props }, ref) => {
|
|
3662
|
+
return /* @__PURE__ */ jsx53("div", { ref, className: cn("dl-metrics-grid", className), ...props, children });
|
|
3663
|
+
}
|
|
3664
|
+
);
|
|
3665
|
+
MetricsGrid.displayName = "MetricsGrid";
|
|
3666
|
+
|
|
3667
|
+
// src/components/copy-button/copy-button.tsx
|
|
3668
|
+
import * as React50 from "react";
|
|
3669
|
+
import { Check as Check7, Copy } from "lucide-react";
|
|
3670
|
+
import { jsx as jsx54, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3671
|
+
var CopyButton = React50.forwardRef(
|
|
3672
|
+
({
|
|
3673
|
+
textToCopy,
|
|
3674
|
+
label = "Copy",
|
|
3675
|
+
copiedLabel = "Copied",
|
|
3676
|
+
resetTimeoutMs = 2e3,
|
|
3677
|
+
className,
|
|
3678
|
+
onClick,
|
|
3679
|
+
...props
|
|
3680
|
+
}, ref) => {
|
|
3681
|
+
const [isCopied, setIsCopied] = React50.useState(false);
|
|
3682
|
+
const handleCopy = async (e) => {
|
|
3683
|
+
onClick?.(e);
|
|
3684
|
+
if (e.defaultPrevented) return;
|
|
3685
|
+
try {
|
|
3686
|
+
await navigator.clipboard.writeText(textToCopy);
|
|
3687
|
+
setIsCopied(true);
|
|
3688
|
+
setTimeout(() => setIsCopied(false), resetTimeoutMs);
|
|
3689
|
+
} catch {
|
|
3690
|
+
}
|
|
3691
|
+
};
|
|
3692
|
+
return /* @__PURE__ */ jsxs30(
|
|
3693
|
+
"button",
|
|
3694
|
+
{
|
|
3695
|
+
ref,
|
|
3696
|
+
type: "button",
|
|
3697
|
+
className: cn(
|
|
3698
|
+
"dl-copy-button",
|
|
3699
|
+
isCopied && "dl-copy-button--copied",
|
|
3700
|
+
className
|
|
3701
|
+
),
|
|
3702
|
+
onClick: handleCopy,
|
|
3703
|
+
...props,
|
|
3704
|
+
children: [
|
|
3705
|
+
isCopied ? /* @__PURE__ */ jsx54(Check7, { className: "dl-copy-button__icon" }) : /* @__PURE__ */ jsx54(Copy, { className: "dl-copy-button__icon" }),
|
|
3706
|
+
/* @__PURE__ */ jsx54("span", { children: isCopied ? copiedLabel : label })
|
|
3707
|
+
]
|
|
3708
|
+
}
|
|
3709
|
+
);
|
|
3710
|
+
}
|
|
3711
|
+
);
|
|
3712
|
+
CopyButton.displayName = "CopyButton";
|
|
3713
|
+
|
|
3714
|
+
// src/components/secret-reveal-card/secret-reveal-card.tsx
|
|
3715
|
+
import * as React51 from "react";
|
|
3716
|
+
import { AlertTriangle } from "lucide-react";
|
|
3717
|
+
import { jsx as jsx55, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3718
|
+
var SecretRevealCard = React51.forwardRef(
|
|
3719
|
+
({
|
|
3720
|
+
secret,
|
|
3721
|
+
warningMessage = "One-time reveal. Please copy and store this credential securely before closing.",
|
|
3722
|
+
copyLabel = "Copy Secret",
|
|
3723
|
+
className,
|
|
3724
|
+
...props
|
|
3725
|
+
}, ref) => {
|
|
3726
|
+
return /* @__PURE__ */ jsxs31("div", { ref, className: cn("dl-secret-reveal", className), ...props, children: [
|
|
3727
|
+
warningMessage && /* @__PURE__ */ jsxs31("div", { className: "dl-secret-reveal__warning", children: [
|
|
3728
|
+
/* @__PURE__ */ jsx55(AlertTriangle, { className: "shrink-0 size-4" }),
|
|
3729
|
+
/* @__PURE__ */ jsx55("span", { children: warningMessage })
|
|
3730
|
+
] }),
|
|
3731
|
+
/* @__PURE__ */ jsxs31("div", { className: "dl-secret-reveal__code-wrap", children: [
|
|
3732
|
+
/* @__PURE__ */ jsx55("code", { className: "dl-secret-reveal__code", children: secret }),
|
|
3733
|
+
/* @__PURE__ */ jsx55(CopyButton, { textToCopy: secret, label: copyLabel })
|
|
3734
|
+
] })
|
|
3735
|
+
] });
|
|
3736
|
+
}
|
|
3737
|
+
);
|
|
3738
|
+
SecretRevealCard.displayName = "SecretRevealCard";
|
|
3604
3739
|
export {
|
|
3605
3740
|
Accordion,
|
|
3606
3741
|
AccordionContent,
|
|
@@ -3682,6 +3817,7 @@ export {
|
|
|
3682
3817
|
ContextMenuSubContent,
|
|
3683
3818
|
ContextMenuSubTrigger,
|
|
3684
3819
|
ContextMenuTrigger,
|
|
3820
|
+
CopyButton,
|
|
3685
3821
|
DatePicker,
|
|
3686
3822
|
Dialog,
|
|
3687
3823
|
DialogBody,
|
|
@@ -3752,6 +3888,8 @@ export {
|
|
|
3752
3888
|
MenubarSubContent,
|
|
3753
3889
|
MenubarSubTrigger,
|
|
3754
3890
|
MenubarTrigger,
|
|
3891
|
+
MetricCard,
|
|
3892
|
+
MetricsGrid,
|
|
3755
3893
|
NavigationMenu,
|
|
3756
3894
|
NavigationMenuContent,
|
|
3757
3895
|
NavigationMenuIndicator,
|
|
@@ -3781,6 +3919,7 @@ export {
|
|
|
3781
3919
|
ScrollArea,
|
|
3782
3920
|
ScrollBar,
|
|
3783
3921
|
SearchableSelect,
|
|
3922
|
+
SecretRevealCard,
|
|
3784
3923
|
Select,
|
|
3785
3924
|
SelectContent,
|
|
3786
3925
|
SelectGroup,
|