@acronis-platform/shadcn-uikit 0.20.0 → 0.22.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/ui/widget-alert.d.ts +40 -0
- package/dist/components/ui/widget-alert.js +111 -0
- package/dist/components/ui/widget-alert.js.map +1 -0
- package/dist/components/ui/widget-placeholder.d.ts +25 -0
- package/dist/components/ui/widget-placeholder.js +112 -0
- package/dist/components/ui/widget-placeholder.js.map +1 -0
- package/dist/components/ui/widget-progress-chunks.d.ts +43 -0
- package/dist/components/ui/widget-progress-chunks.js +103 -0
- package/dist/components/ui/widget-progress-chunks.js.map +1 -0
- package/dist/components/ui/widget-progress-tiers.d.ts +45 -0
- package/dist/components/ui/widget-progress-tiers.js +129 -0
- package/dist/components/ui/widget-progress-tiers.js.map +1 -0
- package/dist/components/ui/widget-protection-status.d.ts +26 -0
- package/dist/components/ui/widget-protection-status.js +123 -0
- package/dist/components/ui/widget-protection-status.js.map +1 -0
- package/dist/components/ui/widget-protection-summary.d.ts +27 -0
- package/dist/components/ui/widget-protection-summary.js +118 -0
- package/dist/components/ui/widget-protection-summary.js.map +1 -0
- package/dist/components/ui/widget-table-data.d.ts +30 -0
- package/dist/components/ui/widget-table-data.js +152 -0
- package/dist/components/ui/widget-table-data.js.map +1 -0
- package/dist/components/ui/widget-text.d.ts +27 -0
- package/dist/components/ui/widget-text.js +124 -0
- package/dist/components/ui/widget-text.js.map +1 -0
- package/dist/components/ui/widget.d.ts +32 -0
- package/dist/components/ui/widget.js +143 -0
- package/dist/components/ui/widget.js.map +1 -0
- package/dist/components.css +1 -1
- package/dist/index.js +1398 -1306
- package/dist/index.js.map +1 -1
- package/dist/llms.txt +1 -1
- package/dist/react.d.ts +9 -0
- package/dist/react.js +1395 -1303
- package/dist/react.js.map +1 -1
- package/dist/shadcn-uikit.css +1 -1
- package/dist/utilities.css +1 -1
- package/package.json +7 -3
- package/tailwind.preset.d.ts +3 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { jsx as a, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { cn as o } from "../../lib/utils.js";
|
|
4
|
+
const v = i.forwardRef(
|
|
5
|
+
({ className: r, interactive: e, ...s }, d) => /* @__PURE__ */ a(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
ref: d,
|
|
9
|
+
tabIndex: e ? 0 : void 0,
|
|
10
|
+
className: o(
|
|
11
|
+
"relative flex flex-col rounded-lg border border-[var(--av-brand-light)] bg-[var(--av-inversed-primary)] text-[var(--av-fixed-primary)] transition-colors",
|
|
12
|
+
e && "cursor-pointer hover:bg-[var(--av-el-secondary-hover)] active:bg-[var(--av-el-secondary-active)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--av-fixed-focus)]",
|
|
13
|
+
r
|
|
14
|
+
),
|
|
15
|
+
...s
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
v.displayName = "WidgetProgressTiers";
|
|
20
|
+
const m = i.forwardRef(({ className: r, ...e }, s) => /* @__PURE__ */ a(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
ref: s,
|
|
24
|
+
className: o("flex items-center gap-2 px-6 pt-4 pb-2", r),
|
|
25
|
+
...e
|
|
26
|
+
}
|
|
27
|
+
));
|
|
28
|
+
m.displayName = "WidgetProgressTiersHeader";
|
|
29
|
+
const p = i.forwardRef(({ className: r, ...e }, s) => /* @__PURE__ */ a(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
ref: s,
|
|
33
|
+
className: o("flex-1 truncate text-sm font-semibold leading-6", r),
|
|
34
|
+
...e
|
|
35
|
+
}
|
|
36
|
+
));
|
|
37
|
+
p.displayName = "WidgetProgressTiersTitle";
|
|
38
|
+
const x = i.forwardRef(({ className: r, ...e }, s) => /* @__PURE__ */ a(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref: s,
|
|
42
|
+
className: o("flex-shrink-0 text-[var(--av-fixed-link)] [&>svg]:h-4 [&>svg]:w-4", r),
|
|
43
|
+
...e
|
|
44
|
+
}
|
|
45
|
+
));
|
|
46
|
+
x.displayName = "WidgetProgressTiersIcon";
|
|
47
|
+
const u = i.forwardRef(
|
|
48
|
+
({ className: r, tiers: e, total: s, ...d }, n) => {
|
|
49
|
+
const t = s ?? e.reduce((l, c) => l + c.value, 0);
|
|
50
|
+
return /* @__PURE__ */ a(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
ref: n,
|
|
54
|
+
className: o("flex h-6 w-full overflow-hidden rounded px-6", r),
|
|
55
|
+
...d,
|
|
56
|
+
children: /* @__PURE__ */ a("div", { className: "flex h-full w-full overflow-hidden rounded border border-[var(--av-fixed-invisible)]", children: e.map((l, c) => {
|
|
57
|
+
const g = t > 0 ? l.value / t * 100 : 0;
|
|
58
|
+
return /* @__PURE__ */ a(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: "h-full transition-all",
|
|
62
|
+
style: {
|
|
63
|
+
width: `${g}%`,
|
|
64
|
+
backgroundColor: l.color
|
|
65
|
+
},
|
|
66
|
+
title: `${l.label}: ${l.value}`
|
|
67
|
+
},
|
|
68
|
+
c
|
|
69
|
+
);
|
|
70
|
+
}) })
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
u.displayName = "WidgetProgressTiersBar";
|
|
76
|
+
const b = i.forwardRef(({ className: r, ...e }, s) => /* @__PURE__ */ a(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
ref: s,
|
|
80
|
+
className: o("flex flex-wrap gap-x-4 gap-y-1 px-6 py-2", r),
|
|
81
|
+
...e
|
|
82
|
+
}
|
|
83
|
+
));
|
|
84
|
+
b.displayName = "WidgetProgressTiersLegend";
|
|
85
|
+
const N = i.forwardRef(
|
|
86
|
+
({ className: r, color: e, label: s, value: d, ...n }, t) => /* @__PURE__ */ f(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
ref: t,
|
|
90
|
+
className: o("flex items-center gap-1.5 text-xs", r),
|
|
91
|
+
...n,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ a(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
className: "h-2 w-2 rounded-sm flex-shrink-0",
|
|
97
|
+
style: { backgroundColor: e }
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ a("span", { className: "text-[var(--av-fixed-primary)]", children: s }),
|
|
101
|
+
d !== void 0 && /* @__PURE__ */ a("span", { className: "font-semibold tabular-nums", children: d })
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
);
|
|
106
|
+
N.displayName = "WidgetProgressTiersLegendItem";
|
|
107
|
+
const h = i.forwardRef(({ className: r, ...e }, s) => /* @__PURE__ */ a(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
ref: s,
|
|
111
|
+
className: o(
|
|
112
|
+
"border-t border-[var(--av-brand-accent)] px-6 py-2 text-xs",
|
|
113
|
+
r
|
|
114
|
+
),
|
|
115
|
+
...e
|
|
116
|
+
}
|
|
117
|
+
));
|
|
118
|
+
h.displayName = "WidgetProgressTiersFooter";
|
|
119
|
+
export {
|
|
120
|
+
v as WidgetProgressTiers,
|
|
121
|
+
u as WidgetProgressTiersBar,
|
|
122
|
+
h as WidgetProgressTiersFooter,
|
|
123
|
+
m as WidgetProgressTiersHeader,
|
|
124
|
+
x as WidgetProgressTiersIcon,
|
|
125
|
+
b as WidgetProgressTiersLegend,
|
|
126
|
+
N as WidgetProgressTiersLegendItem,
|
|
127
|
+
p as WidgetProgressTiersTitle
|
|
128
|
+
};
|
|
129
|
+
//# sourceMappingURL=widget-progress-tiers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-progress-tiers.js","sources":["../../../src/components/ui/widget-progress-tiers.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/**\n * WidgetProgressTiers — Tiered progress bar widget for dashboard.\n * Figma: Charts-anatomy / Progress-Tiers (node 229:70578)\n *\n * Shows a horizontal stacked bar with colored tiers and labels.\n * Colors: chart-success, chart-warning, chart-critical, chart-danger, chart-neutral\n * Background: inversed-primary, Border: brand-light\n * Divider: brand-accent\n *\n * Anatomy:\n * - WidgetProgressTiers (root)\n * - Header: title + icon + dropdown\n * - Bar: stacked horizontal segments\n * - Legend: tier labels with values\n * - Footer: optional summary\n *\n * States: hover (el-secondary-hover), active (el-secondary-active), focus (fixed-focus), focus-data (fixed-focus on tier)\n */\n\nexport interface ProgressTier {\n label: string\n value: number\n color: string\n}\n\nexport interface WidgetProgressTiersProps extends React.HTMLAttributes<HTMLDivElement> {\n interactive?: boolean\n}\n\nconst WidgetProgressTiers = React.forwardRef<HTMLDivElement, WidgetProgressTiersProps>(\n ({ className, interactive, ...props }, ref) => (\n <div\n ref={ref}\n tabIndex={interactive ? 0 : undefined}\n className={cn(\n 'relative flex flex-col rounded-lg border border-[var(--av-brand-light)] bg-[var(--av-inversed-primary)] text-[var(--av-fixed-primary)] transition-colors',\n interactive && 'cursor-pointer hover:bg-[var(--av-el-secondary-hover)] active:bg-[var(--av-el-secondary-active)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--av-fixed-focus)]',\n className\n )}\n {...props}\n />\n )\n)\nWidgetProgressTiers.displayName = 'WidgetProgressTiers'\n\nconst WidgetProgressTiersHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex items-center gap-2 px-6 pt-4 pb-2', className)}\n {...props}\n />\n))\nWidgetProgressTiersHeader.displayName = 'WidgetProgressTiersHeader'\n\nconst WidgetProgressTiersTitle = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex-1 truncate text-sm font-semibold leading-6', className)}\n {...props}\n />\n))\nWidgetProgressTiersTitle.displayName = 'WidgetProgressTiersTitle'\n\nconst WidgetProgressTiersIcon = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex-shrink-0 text-[var(--av-fixed-link)] [&>svg]:h-4 [&>svg]:w-4', className)}\n {...props}\n />\n))\nWidgetProgressTiersIcon.displayName = 'WidgetProgressTiersIcon'\n\nexport interface WidgetProgressTiersBarProps extends React.HTMLAttributes<HTMLDivElement> {\n tiers: ProgressTier[]\n total?: number\n}\n\nconst WidgetProgressTiersBar = React.forwardRef<HTMLDivElement, WidgetProgressTiersBarProps>(\n ({ className, tiers, total, ...props }, ref) => {\n const sum = total ?? tiers.reduce((acc, t) => acc + t.value, 0)\n\n return (\n <div\n ref={ref}\n className={cn('flex h-6 w-full overflow-hidden rounded px-6', className)}\n {...props}\n >\n <div className=\"flex h-full w-full overflow-hidden rounded border border-[var(--av-fixed-invisible)]\">\n {tiers.map((tier, index) => {\n const pct = sum > 0 ? (tier.value / sum) * 100 : 0\n return (\n <div\n key={index}\n className=\"h-full transition-all\"\n style={{\n width: `${pct}%`,\n backgroundColor: tier.color,\n }}\n title={`${tier.label}: ${tier.value}`}\n />\n )\n })}\n </div>\n </div>\n )\n }\n)\nWidgetProgressTiersBar.displayName = 'WidgetProgressTiersBar'\n\nconst WidgetProgressTiersLegend = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-wrap gap-x-4 gap-y-1 px-6 py-2', className)}\n {...props}\n />\n))\nWidgetProgressTiersLegend.displayName = 'WidgetProgressTiersLegend'\n\nexport interface WidgetProgressTiersLegendItemProps extends React.HTMLAttributes<HTMLDivElement> {\n color: string\n label: string\n value?: string | number\n}\n\nconst WidgetProgressTiersLegendItem = React.forwardRef<HTMLDivElement, WidgetProgressTiersLegendItemProps>(\n ({ className, color, label, value, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex items-center gap-1.5 text-xs', className)}\n {...props}\n >\n <div\n className=\"h-2 w-2 rounded-sm flex-shrink-0\"\n style={{ backgroundColor: color }}\n />\n <span className=\"text-[var(--av-fixed-primary)]\">{label}</span>\n {value !== undefined && (\n <span className=\"font-semibold tabular-nums\">{value}</span>\n )}\n </div>\n )\n)\nWidgetProgressTiersLegendItem.displayName = 'WidgetProgressTiersLegendItem'\n\nconst WidgetProgressTiersFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'border-t border-[var(--av-brand-accent)] px-6 py-2 text-xs',\n className\n )}\n {...props}\n />\n))\nWidgetProgressTiersFooter.displayName = 'WidgetProgressTiersFooter'\n\nexport {\n WidgetProgressTiers,\n WidgetProgressTiersHeader,\n WidgetProgressTiersTitle,\n WidgetProgressTiersIcon,\n WidgetProgressTiersBar,\n WidgetProgressTiersLegend,\n WidgetProgressTiersLegendItem,\n WidgetProgressTiersFooter,\n}\n"],"names":["WidgetProgressTiers","React","className","interactive","props","ref","jsx","cn","WidgetProgressTiersHeader","WidgetProgressTiersTitle","WidgetProgressTiersIcon","WidgetProgressTiersBar","tiers","total","sum","acc","t","tier","index","pct","WidgetProgressTiersLegend","WidgetProgressTiersLegendItem","color","label","value","jsxs","WidgetProgressTiersFooter"],"mappings":";;;AAiCA,MAAMA,IAAsBC,EAAM;AAAA,EAChC,CAAC,EAAE,WAAAC,GAAW,aAAAC,GAAa,GAAGC,EAAA,GAASC,MACrC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,UAAUF,IAAc,IAAI;AAAA,MAC5B,WAAWI;AAAA,QACT;AAAA,QACAJ,KA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;AAE5C,MAAMK,IAA4BzB,EAAM,WAGtC,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAL;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,EAAA;AACN,CACD;AACDsB,EAA0B,cAAc;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* WidgetProtectionStatus — Protection status indicator widget.
|
|
4
|
+
* Figma: Charts-anatomy / Protection-Status (node 533:75562)
|
|
5
|
+
*
|
|
6
|
+
* Shows protection status with a visual indicator (icon/badge),
|
|
7
|
+
* status label, and optional details.
|
|
8
|
+
* Background: inversed-primary, Border: brand-light
|
|
9
|
+
*
|
|
10
|
+
* States: hover, active, focus
|
|
11
|
+
*/
|
|
12
|
+
export interface WidgetProtectionStatusProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
interactive?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const WidgetProtectionStatus: React.ForwardRefExoticComponent<WidgetProtectionStatusProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const WidgetProtectionStatusHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const WidgetProtectionStatusTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const WidgetProtectionStatusIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const WidgetProtectionStatusContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const WidgetProtectionStatusIndicator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
21
|
+
status?: "success" | "warning" | "critical" | "danger" | "info" | "neutral";
|
|
22
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const WidgetProtectionStatusValue: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const WidgetProtectionStatusLabel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const WidgetProtectionStatusFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export { WidgetProtectionStatus, WidgetProtectionStatusHeader, WidgetProtectionStatusTitle, WidgetProtectionStatusIcon, WidgetProtectionStatusContent, WidgetProtectionStatusIndicator, WidgetProtectionStatusValue, WidgetProtectionStatusLabel, WidgetProtectionStatusFooter, };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { cn as i } from "../../lib/utils.js";
|
|
4
|
+
const n = o.forwardRef(
|
|
5
|
+
({ className: a, interactive: t, ...e }, s) => /* @__PURE__ */ r(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
ref: s,
|
|
9
|
+
tabIndex: t ? 0 : void 0,
|
|
10
|
+
className: i(
|
|
11
|
+
"relative flex flex-col rounded-lg border border-[var(--av-brand-light)] bg-[var(--av-inversed-primary)] text-[var(--av-fixed-primary)] transition-colors",
|
|
12
|
+
t && "cursor-pointer hover:bg-[var(--av-el-secondary-hover)] active:bg-[var(--av-el-secondary-active)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--av-fixed-focus)]",
|
|
13
|
+
a
|
|
14
|
+
),
|
|
15
|
+
...e
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
n.displayName = "WidgetProtectionStatus";
|
|
20
|
+
const l = o.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
ref: e,
|
|
24
|
+
className: i("flex items-center gap-2 px-6 pt-4 pb-2", a),
|
|
25
|
+
...t
|
|
26
|
+
}
|
|
27
|
+
));
|
|
28
|
+
l.displayName = "WidgetProtectionStatusHeader";
|
|
29
|
+
const v = o.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
ref: e,
|
|
33
|
+
className: i("flex-1 truncate text-sm font-semibold leading-6", a),
|
|
34
|
+
...t
|
|
35
|
+
}
|
|
36
|
+
));
|
|
37
|
+
v.displayName = "WidgetProtectionStatusTitle";
|
|
38
|
+
const f = o.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref: e,
|
|
42
|
+
className: i("flex-shrink-0 text-[var(--av-fixed-link)] [&>svg]:h-4 [&>svg]:w-4", a),
|
|
43
|
+
...t
|
|
44
|
+
}
|
|
45
|
+
));
|
|
46
|
+
f.displayName = "WidgetProtectionStatusIcon";
|
|
47
|
+
const u = o.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
ref: e,
|
|
51
|
+
className: i("flex-1 flex flex-col gap-2 px-6 py-2", a),
|
|
52
|
+
...t
|
|
53
|
+
}
|
|
54
|
+
));
|
|
55
|
+
u.displayName = "WidgetProtectionStatusContent";
|
|
56
|
+
const g = o.forwardRef(({ className: a, status: t = "success", ...e }, s) => {
|
|
57
|
+
const c = {
|
|
58
|
+
success: "var(--av-chart-success)",
|
|
59
|
+
warning: "var(--av-chart-warning)",
|
|
60
|
+
critical: "var(--av-chart-critical)",
|
|
61
|
+
danger: "var(--av-chart-danger)",
|
|
62
|
+
info: "var(--av-chart-info)",
|
|
63
|
+
neutral: "var(--av-chart-neutral)"
|
|
64
|
+
};
|
|
65
|
+
return /* @__PURE__ */ d(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
ref: s,
|
|
69
|
+
className: i("flex items-center gap-2", a),
|
|
70
|
+
...e,
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ r(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: "h-3 w-3 rounded-full flex-shrink-0",
|
|
76
|
+
style: { backgroundColor: c[t] }
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
e.children
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
});
|
|
84
|
+
g.displayName = "WidgetProtectionStatusIndicator";
|
|
85
|
+
const m = o.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
ref: e,
|
|
89
|
+
className: i("text-2xl font-semibold leading-8 tabular-nums", a),
|
|
90
|
+
...t
|
|
91
|
+
}
|
|
92
|
+
));
|
|
93
|
+
m.displayName = "WidgetProtectionStatusValue";
|
|
94
|
+
const x = o.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
ref: e,
|
|
98
|
+
className: i("text-sm leading-6", a),
|
|
99
|
+
...t
|
|
100
|
+
}
|
|
101
|
+
));
|
|
102
|
+
x.displayName = "WidgetProtectionStatusLabel";
|
|
103
|
+
const p = o.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ r(
|
|
104
|
+
"div",
|
|
105
|
+
{
|
|
106
|
+
ref: e,
|
|
107
|
+
className: i("border-t border-[var(--av-brand-accent)] px-6 py-2 text-xs", a),
|
|
108
|
+
...t
|
|
109
|
+
}
|
|
110
|
+
));
|
|
111
|
+
p.displayName = "WidgetProtectionStatusFooter";
|
|
112
|
+
export {
|
|
113
|
+
n as WidgetProtectionStatus,
|
|
114
|
+
u as WidgetProtectionStatusContent,
|
|
115
|
+
p as WidgetProtectionStatusFooter,
|
|
116
|
+
l as WidgetProtectionStatusHeader,
|
|
117
|
+
f as WidgetProtectionStatusIcon,
|
|
118
|
+
g as WidgetProtectionStatusIndicator,
|
|
119
|
+
x as WidgetProtectionStatusLabel,
|
|
120
|
+
v as WidgetProtectionStatusTitle,
|
|
121
|
+
m as WidgetProtectionStatusValue
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=widget-protection-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-protection-status.js","sources":["../../../src/components/ui/widget-protection-status.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/**\n * WidgetProtectionStatus — Protection status indicator widget.\n * Figma: Charts-anatomy / Protection-Status (node 533:75562)\n *\n * Shows protection status with a visual indicator (icon/badge),\n * status label, and optional details.\n * Background: inversed-primary, Border: brand-light\n *\n * States: hover, active, focus\n */\n\nexport interface WidgetProtectionStatusProps extends React.HTMLAttributes<HTMLDivElement> {\n interactive?: boolean\n}\n\nconst WidgetProtectionStatus = React.forwardRef<HTMLDivElement, WidgetProtectionStatusProps>(\n ({ className, interactive, ...props }, ref) => (\n <div\n ref={ref}\n tabIndex={interactive ? 0 : undefined}\n className={cn(\n 'relative flex flex-col rounded-lg border border-[var(--av-brand-light)] bg-[var(--av-inversed-primary)] text-[var(--av-fixed-primary)] transition-colors',\n interactive && 'cursor-pointer hover:bg-[var(--av-el-secondary-hover)] active:bg-[var(--av-el-secondary-active)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--av-fixed-focus)]',\n className\n )}\n {...props}\n />\n )\n)\nWidgetProtectionStatus.displayName = 'WidgetProtectionStatus'\n\nconst WidgetProtectionStatusHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex items-center gap-2 px-6 pt-4 pb-2', className)}\n {...props}\n />\n))\nWidgetProtectionStatusHeader.displayName = 'WidgetProtectionStatusHeader'\n\nconst WidgetProtectionStatusTitle = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex-1 truncate text-sm font-semibold leading-6', className)}\n {...props}\n />\n))\nWidgetProtectionStatusTitle.displayName = 'WidgetProtectionStatusTitle'\n\nconst WidgetProtectionStatusIcon = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex-shrink-0 text-[var(--av-fixed-link)] [&>svg]:h-4 [&>svg]:w-4', className)}\n {...props}\n />\n))\nWidgetProtectionStatusIcon.displayName = 'WidgetProtectionStatusIcon'\n\nconst WidgetProtectionStatusContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex-1 flex flex-col gap-2 px-6 py-2', className)}\n {...props}\n />\n))\nWidgetProtectionStatusContent.displayName = 'WidgetProtectionStatusContent'\n\nconst WidgetProtectionStatusIndicator = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & {\n status?: 'success' | 'warning' | 'critical' | 'danger' | 'info' | 'neutral'\n }\n>(({ className, status = 'success', ...props }, ref) => {\n const statusColors: Record<string, string> = {\n success: 'var(--av-chart-success)',\n warning: 'var(--av-chart-warning)',\n critical: 'var(--av-chart-critical)',\n danger: 'var(--av-chart-danger)',\n info: 'var(--av-chart-info)',\n neutral: 'var(--av-chart-neutral)',\n }\n\n return (\n <div\n ref={ref}\n className={cn('flex items-center gap-2', className)}\n {...props}\n >\n <div\n className=\"h-3 w-3 rounded-full flex-shrink-0\"\n style={{ backgroundColor: statusColors[status] }}\n />\n {props.children}\n </div>\n )\n})\nWidgetProtectionStatusIndicator.displayName = 'WidgetProtectionStatusIndicator'\n\nconst WidgetProtectionStatusValue = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('text-2xl font-semibold leading-8 tabular-nums', className)}\n {...props}\n />\n))\nWidgetProtectionStatusValue.displayName = 'WidgetProtectionStatusValue'\n\nconst WidgetProtectionStatusLabel = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('text-sm leading-6', className)}\n {...props}\n />\n))\nWidgetProtectionStatusLabel.displayName = 'WidgetProtectionStatusLabel'\n\nconst WidgetProtectionStatusFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('border-t border-[var(--av-brand-accent)] px-6 py-2 text-xs', className)}\n {...props}\n />\n))\nWidgetProtectionStatusFooter.displayName = 'WidgetProtectionStatusFooter'\n\nexport {\n WidgetProtectionStatus,\n WidgetProtectionStatusHeader,\n WidgetProtectionStatusTitle,\n WidgetProtectionStatusIcon,\n WidgetProtectionStatusContent,\n WidgetProtectionStatusIndicator,\n WidgetProtectionStatusValue,\n WidgetProtectionStatusLabel,\n WidgetProtectionStatusFooter,\n}\n"],"names":["WidgetProtectionStatus","React","className","interactive","props","ref","jsx","cn","WidgetProtectionStatusHeader","WidgetProtectionStatusTitle","WidgetProtectionStatusIcon","WidgetProtectionStatusContent","WidgetProtectionStatusIndicator","status","statusColors","jsxs","WidgetProtectionStatusValue","WidgetProtectionStatusLabel","WidgetProtectionStatusFooter"],"mappings":";;;AAmBA,MAAMA,IAAyBC,EAAM;AAAA,EACnC,CAAC,EAAE,WAAAC,GAAW,aAAAC,GAAa,GAAGC,EAAA,GAASC,MACrC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AA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
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* WidgetProtectionSummary — Protection summary dashboard widget.
|
|
4
|
+
* Figma: Charts-anatomy / Protection-Summary (node 538:78584)
|
|
5
|
+
*
|
|
6
|
+
* Shows a summary of protection metrics with status indicators and values.
|
|
7
|
+
* Background: inversed-primary, Border: brand-light
|
|
8
|
+
*
|
|
9
|
+
* States: hover, active, focus
|
|
10
|
+
*/
|
|
11
|
+
export interface WidgetProtectionSummaryProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
interactive?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const WidgetProtectionSummary: React.ForwardRefExoticComponent<WidgetProtectionSummaryProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const WidgetProtectionSummaryHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const WidgetProtectionSummaryTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const WidgetProtectionSummaryIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const WidgetProtectionSummaryContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export interface WidgetProtectionSummaryRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string | number;
|
|
22
|
+
status?: 'success' | 'warning' | 'critical' | 'danger' | 'info' | 'neutral';
|
|
23
|
+
}
|
|
24
|
+
declare const WidgetProtectionSummaryRow: React.ForwardRefExoticComponent<WidgetProtectionSummaryRowProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const WidgetProtectionSummaryDivider: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHRElement> & React.RefAttributes<HTMLHRElement>>;
|
|
26
|
+
declare const WidgetProtectionSummaryFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export { WidgetProtectionSummary, WidgetProtectionSummaryHeader, WidgetProtectionSummaryTitle, WidgetProtectionSummaryIcon, WidgetProtectionSummaryContent, WidgetProtectionSummaryRow, WidgetProtectionSummaryDivider, WidgetProtectionSummaryFooter, };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { cn as i } from "../../lib/utils.js";
|
|
4
|
+
const l = o.forwardRef(
|
|
5
|
+
({ className: r, interactive: e, ...a }, s) => /* @__PURE__ */ t(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
ref: s,
|
|
9
|
+
tabIndex: e ? 0 : void 0,
|
|
10
|
+
className: i(
|
|
11
|
+
"relative flex flex-col rounded-lg border border-[var(--av-brand-light)] bg-[var(--av-inversed-primary)] text-[var(--av-fixed-primary)] transition-colors",
|
|
12
|
+
e && "cursor-pointer hover:bg-[var(--av-el-secondary-hover)] active:bg-[var(--av-el-secondary-active)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--av-fixed-focus)]",
|
|
13
|
+
r
|
|
14
|
+
),
|
|
15
|
+
...a
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
l.displayName = "WidgetProtectionSummary";
|
|
20
|
+
const v = o.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ t(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
ref: a,
|
|
24
|
+
className: i("flex items-center gap-2 px-6 pt-4 pb-2", r),
|
|
25
|
+
...e
|
|
26
|
+
}
|
|
27
|
+
));
|
|
28
|
+
v.displayName = "WidgetProtectionSummaryHeader";
|
|
29
|
+
const f = o.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ t(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
ref: a,
|
|
33
|
+
className: i("flex-1 truncate text-sm font-semibold leading-6", r),
|
|
34
|
+
...e
|
|
35
|
+
}
|
|
36
|
+
));
|
|
37
|
+
f.displayName = "WidgetProtectionSummaryTitle";
|
|
38
|
+
const u = o.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ t(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref: a,
|
|
42
|
+
className: i("flex-shrink-0 text-[var(--av-fixed-link)] [&>svg]:h-4 [&>svg]:w-4", r),
|
|
43
|
+
...e
|
|
44
|
+
}
|
|
45
|
+
));
|
|
46
|
+
u.displayName = "WidgetProtectionSummaryIcon";
|
|
47
|
+
const y = o.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ t(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
ref: a,
|
|
51
|
+
className: i("flex-1 flex flex-col gap-2 px-6 py-2", r),
|
|
52
|
+
...e
|
|
53
|
+
}
|
|
54
|
+
));
|
|
55
|
+
y.displayName = "WidgetProtectionSummaryContent";
|
|
56
|
+
const g = o.forwardRef(
|
|
57
|
+
({ className: r, label: e, value: a, status: s, ...n }, d) => {
|
|
58
|
+
const m = {
|
|
59
|
+
success: "var(--av-chart-success)",
|
|
60
|
+
warning: "var(--av-chart-warning)",
|
|
61
|
+
critical: "var(--av-chart-critical)",
|
|
62
|
+
danger: "var(--av-chart-danger)",
|
|
63
|
+
info: "var(--av-chart-info)",
|
|
64
|
+
neutral: "var(--av-chart-neutral)"
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ c(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
ref: d,
|
|
70
|
+
className: i("flex items-center justify-between py-1", r),
|
|
71
|
+
...n,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
74
|
+
s && /* @__PURE__ */ t(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
className: "h-2 w-2 rounded-full flex-shrink-0",
|
|
78
|
+
style: { backgroundColor: m[s] }
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ t("span", { children: e })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ t("span", { className: "text-sm font-semibold tabular-nums", children: a })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
g.displayName = "WidgetProtectionSummaryRow";
|
|
90
|
+
const x = o.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ t(
|
|
91
|
+
"hr",
|
|
92
|
+
{
|
|
93
|
+
ref: a,
|
|
94
|
+
className: i("border-t border-[var(--av-brand-accent)] mx-6", r),
|
|
95
|
+
...e
|
|
96
|
+
}
|
|
97
|
+
));
|
|
98
|
+
x.displayName = "WidgetProtectionSummaryDivider";
|
|
99
|
+
const p = o.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ t(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
ref: a,
|
|
103
|
+
className: i("border-t border-[var(--av-brand-accent)] px-6 py-2 text-xs", r),
|
|
104
|
+
...e
|
|
105
|
+
}
|
|
106
|
+
));
|
|
107
|
+
p.displayName = "WidgetProtectionSummaryFooter";
|
|
108
|
+
export {
|
|
109
|
+
l as WidgetProtectionSummary,
|
|
110
|
+
y as WidgetProtectionSummaryContent,
|
|
111
|
+
x as WidgetProtectionSummaryDivider,
|
|
112
|
+
p as WidgetProtectionSummaryFooter,
|
|
113
|
+
v as WidgetProtectionSummaryHeader,
|
|
114
|
+
u as WidgetProtectionSummaryIcon,
|
|
115
|
+
g as WidgetProtectionSummaryRow,
|
|
116
|
+
f as WidgetProtectionSummaryTitle
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=widget-protection-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-protection-summary.js","sources":["../../../src/components/ui/widget-protection-summary.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/**\n * WidgetProtectionSummary — Protection summary dashboard widget.\n * Figma: Charts-anatomy / Protection-Summary (node 538:78584)\n *\n * Shows a summary of protection metrics with status indicators and values.\n * Background: inversed-primary, Border: brand-light\n *\n * States: hover, active, focus\n */\n\nexport interface WidgetProtectionSummaryProps extends React.HTMLAttributes<HTMLDivElement> {\n interactive?: boolean\n}\n\nconst WidgetProtectionSummary = React.forwardRef<HTMLDivElement, WidgetProtectionSummaryProps>(\n ({ className, interactive, ...props }, ref) => (\n <div\n ref={ref}\n tabIndex={interactive ? 0 : undefined}\n className={cn(\n 'relative flex flex-col rounded-lg border border-[var(--av-brand-light)] bg-[var(--av-inversed-primary)] text-[var(--av-fixed-primary)] transition-colors',\n interactive && 'cursor-pointer hover:bg-[var(--av-el-secondary-hover)] active:bg-[var(--av-el-secondary-active)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--av-fixed-focus)]',\n className\n )}\n {...props}\n />\n )\n)\nWidgetProtectionSummary.displayName = 'WidgetProtectionSummary'\n\nconst WidgetProtectionSummaryHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex items-center gap-2 px-6 pt-4 pb-2', className)}\n {...props}\n />\n))\nWidgetProtectionSummaryHeader.displayName = 'WidgetProtectionSummaryHeader'\n\nconst WidgetProtectionSummaryTitle = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex-1 truncate text-sm font-semibold leading-6', className)}\n {...props}\n />\n))\nWidgetProtectionSummaryTitle.displayName = 'WidgetProtectionSummaryTitle'\n\nconst WidgetProtectionSummaryIcon = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex-shrink-0 text-[var(--av-fixed-link)] [&>svg]:h-4 [&>svg]:w-4', className)}\n {...props}\n />\n))\nWidgetProtectionSummaryIcon.displayName = 'WidgetProtectionSummaryIcon'\n\nconst WidgetProtectionSummaryContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex-1 flex flex-col gap-2 px-6 py-2', className)}\n {...props}\n />\n))\nWidgetProtectionSummaryContent.displayName = 'WidgetProtectionSummaryContent'\n\nexport interface WidgetProtectionSummaryRowProps extends React.HTMLAttributes<HTMLDivElement> {\n label: string\n value: string | number\n status?: 'success' | 'warning' | 'critical' | 'danger' | 'info' | 'neutral'\n}\n\nconst WidgetProtectionSummaryRow = React.forwardRef<HTMLDivElement, WidgetProtectionSummaryRowProps>(\n ({ className, label, value, status, ...props }, ref) => {\n const statusColors: Record<string, string> = {\n success: 'var(--av-chart-success)',\n warning: 'var(--av-chart-warning)',\n critical: 'var(--av-chart-critical)',\n danger: 'var(--av-chart-danger)',\n info: 'var(--av-chart-info)',\n neutral: 'var(--av-chart-neutral)',\n }\n\n return (\n <div\n ref={ref}\n className={cn('flex items-center justify-between py-1', className)}\n {...props}\n >\n <div className=\"flex items-center gap-2 text-sm\">\n {status && (\n <div\n className=\"h-2 w-2 rounded-full flex-shrink-0\"\n style={{ backgroundColor: statusColors[status] }}\n />\n )}\n <span>{label}</span>\n </div>\n <span className=\"text-sm font-semibold tabular-nums\">{value}</span>\n </div>\n )\n }\n)\nWidgetProtectionSummaryRow.displayName = 'WidgetProtectionSummaryRow'\n\nconst WidgetProtectionSummaryDivider = React.forwardRef<\n HTMLHRElement,\n React.HTMLAttributes<HTMLHRElement>\n>(({ className, ...props }, ref) => (\n <hr\n ref={ref}\n className={cn('border-t border-[var(--av-brand-accent)] mx-6', className)}\n {...props}\n />\n))\nWidgetProtectionSummaryDivider.displayName = 'WidgetProtectionSummaryDivider'\n\nconst WidgetProtectionSummaryFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('border-t border-[var(--av-brand-accent)] px-6 py-2 text-xs', className)}\n {...props}\n />\n))\nWidgetProtectionSummaryFooter.displayName = 'WidgetProtectionSummaryFooter'\n\nexport {\n WidgetProtectionSummary,\n WidgetProtectionSummaryHeader,\n WidgetProtectionSummaryTitle,\n WidgetProtectionSummaryIcon,\n WidgetProtectionSummaryContent,\n WidgetProtectionSummaryRow,\n WidgetProtectionSummaryDivider,\n WidgetProtectionSummaryFooter,\n}\n"],"names":["WidgetProtectionSummary","React","className","interactive","props","ref","jsx","cn","WidgetProtectionSummaryHeader","WidgetProtectionSummaryTitle","WidgetProtectionSummaryIcon","WidgetProtectionSummaryContent","WidgetProtectionSummaryRow","label","value","status","statusColors","jsxs","WidgetProtectionSummaryDivider","WidgetProtectionSummaryFooter"],"mappings":";;;AAkBA,MAAMA,IAA0BC,EAAM;AAAA,EACpC,CAAC,EAAE,WAAAC,GAAW,aAAAC,GAAa,GAAGC,EAAA,GAASC,MACrC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,UAAUF,IAAc,IAAI;AAAA,MAC5B,WAAWI;AAAA,QACT;AAAA,QACAJ,KAAe;AAAA,QACfD;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AACAJ,EAAwB,cAAc;AAEtC,MAAMQ,IAAgCP,EAAM,WAG1C,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,0CAA0CL,CAAS;AAAA,IAChE,GAA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AAAA,YAAAF,KACC,gBAAAT;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,OAAO,EAAE,iBAAiBU,EAAaD,CAAM,EAAA;AAAA,cAAE;AAAA,YAAA;AAAA,YAGnD,gBAAAT,EAAC,UAAM,UAAAO,EAAA,CAAM;AAAA,UAAA,GACf;AAAA,UACA,gBAAAP,EAAC,QAAA,EAAK,WAAU,sCAAsC,UAAAQ,EAAA,CAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGlE;AACF;AACAF,EAA2B,cAAc;AAEzC,MAAMM,IAAiCjB,EAAM,WAG3C,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,iDAAiDL,CAAS;AAAA,IACvE,GAAGE;AAAA,EAAA;AACN,CACD;AACDc,EAA+B,cAAc;AAE7C,MAAMC,IAAgClB,EAAM,WAG1C,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,8DAA8DL,CAAS;AAAA,IACpF,GAAGE;AAAA,EAAA;AACN,CACD;AACDe,EAA8B,cAAc;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* WidgetTableData — Data table widget for dashboard.
|
|
4
|
+
* Figma: Charts-anatomy / Table-Data (node 826:86024)
|
|
5
|
+
*
|
|
6
|
+
* Shows tabular data with optional colored background rows, links, and pagination.
|
|
7
|
+
* Two variants: full table (with header row) and compact (without header).
|
|
8
|
+
* Background: inversed-primary, Border: brand-light
|
|
9
|
+
* Colored-Background: brand-lightest
|
|
10
|
+
* Divider: brand-accent
|
|
11
|
+
*
|
|
12
|
+
* States: hover (el-secondary-hover), active (el-secondary-active), focus (fixed-focus)
|
|
13
|
+
*/
|
|
14
|
+
export interface WidgetTableDataProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
15
|
+
interactive?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const WidgetTableData: React.ForwardRefExoticComponent<WidgetTableDataProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const WidgetTableDataHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const WidgetTableDataTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const WidgetTableDataIcon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const WidgetTableDataContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const WidgetTableDataTable: React.ForwardRefExoticComponent<React.TableHTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
23
|
+
declare const WidgetTableDataThead: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
24
|
+
declare const WidgetTableDataTh: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
25
|
+
declare const WidgetTableDataTbody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
26
|
+
declare const WidgetTableDataTr: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
27
|
+
declare const WidgetTableDataTd: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
28
|
+
declare const WidgetTableDataLink: React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
|
|
29
|
+
declare const WidgetTableDataFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
export { WidgetTableData, WidgetTableDataHeader, WidgetTableDataTitle, WidgetTableDataIcon, WidgetTableDataContent, WidgetTableDataTable, WidgetTableDataThead, WidgetTableDataTh, WidgetTableDataTbody, WidgetTableDataTr, WidgetTableDataTd, WidgetTableDataLink, WidgetTableDataFooter, };
|