@siyahi/ui 0.1.9-next.34 → 0.1.9-next.36
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/DESIGN.md +43 -26
- package/README.md +12 -14
- package/THIRD_PARTY_NOTICES.md +10 -11
- package/agents/examples/app-sidebar.tsx +0 -2
- package/agents/examples/chart-panels.tsx +0 -4
- package/agents/examples/{section-cards-select.tsx → metric-strip-select.tsx} +5 -5
- package/agents/examples/metric-strip-trend.tsx +33 -0
- package/agents/examples/overview-dashboard.tsx +4 -4
- package/agents/examples/scatter-chart.tsx +0 -1
- package/agents/examples/stale-blocks.tsx +9 -9
- package/agents/examples/surfaces.tsx +2 -3
- package/agents/manifest.json +27 -49
- package/dist/components/registry/dashboardcn/kpi-row-card.d.ts +14 -6
- package/dist/components/registry/dashboardcn/kpi-row-card.js +49 -32
- package/dist/components/registry/niko-table/core/data-table-error-boundary.js +1 -1
- package/dist/components/registry/niko-table/filters/table-faceted-filter.js +2 -2
- package/dist/components/siyahi/panel-grid.d.ts +5 -6
- package/dist/components/siyahi/panel-grid.js +10 -9
- package/dist/components/siyahi/scatter-chart.d.ts +3 -3
- package/dist/components/siyahi/scatter-chart.js +6 -3
- package/dist/components/siyahi/siyahi-provider.d.ts +5 -6
- package/dist/components/siyahi/siyahi-provider.js +1 -1
- package/dist/components/siyahi/status-badge.js +1 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.js +94 -0
- package/dist/components/ui/aspect-ratio.d.ts +6 -0
- package/dist/components/ui/aspect-ratio.js +13 -0
- package/dist/components/ui/attachment.d.ts +25 -0
- package/dist/components/ui/attachment.js +104 -0
- package/dist/components/ui/bubble.d.ts +18 -0
- package/dist/components/ui/bubble.js +73 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.js +41 -0
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/carousel.d.ts +30 -0
- package/dist/components/ui/carousel.js +131 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.js +20 -0
- package/dist/components/ui/combobox.d.ts +26 -0
- package/dist/components/ui/combobox.js +162 -0
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.js +1 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +123 -0
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.js +59 -0
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.js +36 -0
- package/dist/components/ui/input-otp.d.ts +13 -0
- package/dist/components/ui/input-otp.js +46 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.js +121 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.js +19 -0
- package/dist/components/ui/marker.d.ts +12 -0
- package/dist/components/ui/marker.js +43 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.js +136 -0
- package/dist/components/ui/message-scroller.d.ts +12 -0
- package/dist/components/ui/message-scroller.js +60 -0
- package/dist/components/ui/message.d.ts +12 -0
- package/dist/components/ui/message.js +49 -0
- package/dist/components/ui/native-select.d.ts +10 -0
- package/dist/components/ui/native-select.js +38 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.js +82 -0
- package/dist/components/ui/pagination.d.ts +19 -0
- package/dist/components/ui/pagination.js +80 -0
- package/dist/components/ui/questionnaire.d.ts +21 -0
- package/dist/components/ui/questionnaire.js +170 -0
- package/dist/components/ui/radio-group.d.ts +7 -0
- package/dist/components/ui/radio-group.js +26 -0
- package/dist/components/ui/resizable.d.ts +9 -0
- package/dist/components/ui/resizable.js +28 -0
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.js +15 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.js +19 -0
- package/dist/components/ui/toast.d.ts +18 -0
- package/dist/components/ui/toast.js +123 -0
- package/dist/components/ui/trace.d.ts +20 -0
- package/dist/components/ui/trace.js +75 -0
- package/dist/index.d.ts +32 -3
- package/dist/index.js +35 -5
- package/dist/lib/chart-frame.d.ts +1 -1
- package/dist/lib/chart-frame.js +3 -1
- package/dist/lib/chart-series.d.ts +10 -2
- package/dist/lib/chart-series.js +10 -0
- package/package.json +5 -3
- package/registry.lock.json +0 -8
- package/styles/siyahi.css +257 -109
- package/agents/examples/section-cards-trend.tsx +0 -32
- package/agents/examples/section-cards.tsx +0 -48
- package/agents/report-rules.json +0 -7
- package/dist/components/registry/dashboard-01/section-cards.d.ts +0 -30
- package/dist/components/registry/dashboard-01/section-cards.js +0 -74
- package/report.css +0 -146
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Badge } from "../../ui/badge.js";
|
|
3
|
-
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../../ui/card.js";
|
|
4
|
-
import { cn } from "../../../lib/utils.js";
|
|
5
|
-
import { StaleNote } from "../../siyahi/stale-note.js";
|
|
6
|
-
import { useSurface } from "../../siyahi/siyahi-provider.js";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import "react";
|
|
9
|
-
//#region src/components/registry/dashboard-01/section-cards.tsx
|
|
10
|
-
const COLUMNS = {
|
|
11
|
-
2: "@xl/main:grid-cols-2",
|
|
12
|
-
3: "@3xl/main:grid-cols-3",
|
|
13
|
-
4: "@xl/main:grid-cols-2 @5xl/main:grid-cols-4",
|
|
14
|
-
5: "@3xl/main:grid-cols-3 @7xl/main:grid-cols-5",
|
|
15
|
-
6: "@3xl/main:grid-cols-3"
|
|
16
|
-
};
|
|
17
|
-
function SectionCards({ items, selected, onSelect }) {
|
|
18
|
-
const surface = useSurface();
|
|
19
|
-
const ruled = surface === "ruled";
|
|
20
|
-
return /* @__PURE__ */ jsx("div", {
|
|
21
|
-
"data-surface": surface,
|
|
22
|
-
className: cn("@container/main", ruled && "overflow-hidden border-y"),
|
|
23
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
24
|
-
className: cn("grid grid-cols-1", ruled ? "-me-px -mb-px bg-card" : surface === "open" ? "gap-4" : "gap-2", COLUMNS[items.length] ?? COLUMNS[4]),
|
|
25
|
-
children: items.map((item) => /* @__PURE__ */ jsx("div", {
|
|
26
|
-
"data-slot": "section-card",
|
|
27
|
-
className: cn("min-w-0", ruled && "border-e border-b"),
|
|
28
|
-
children: /* @__PURE__ */ jsxs(Card, {
|
|
29
|
-
"data-tone": item.tone,
|
|
30
|
-
"data-stale": item.stale ? "" : void 0,
|
|
31
|
-
className: cn("@container/card h-full [--card-spacing:--spacing(3)]", onSelect && "relative", item.label === selected && "ring-2 ring-primary!", item.label === selected && ruled && "ring-inset", onSelect && item.disabled && "opacity-60"),
|
|
32
|
-
children: [
|
|
33
|
-
onSelect && /* @__PURE__ */ jsx("button", {
|
|
34
|
-
type: "button",
|
|
35
|
-
"aria-label": item.label,
|
|
36
|
-
"aria-pressed": item.label === selected,
|
|
37
|
-
disabled: item.disabled,
|
|
38
|
-
onClick: () => onSelect(item.label),
|
|
39
|
-
className: "absolute inset-0 z-10 rounded-[inherit] outline-none focus-visible:ring-3 focus-visible:ring-ring focus-visible:ring-inset"
|
|
40
|
-
}),
|
|
41
|
-
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
42
|
-
/* @__PURE__ */ jsx(CardDescription, {
|
|
43
|
-
className: "font-mono text-2xs tracking-wider uppercase",
|
|
44
|
-
children: item.label
|
|
45
|
-
}),
|
|
46
|
-
item.stale && /* @__PURE__ */ jsx(StaleNote, { since: item.stale }),
|
|
47
|
-
/* @__PURE__ */ jsx(CardTitle, {
|
|
48
|
-
className: "text-2xl font-semibold tabular-nums",
|
|
49
|
-
children: item.value
|
|
50
|
-
}),
|
|
51
|
-
item.badge && /* @__PURE__ */ jsx(CardAction, { children: /* @__PURE__ */ jsx(Badge, {
|
|
52
|
-
variant: "outline",
|
|
53
|
-
children: item.badge
|
|
54
|
-
}) })
|
|
55
|
-
] }),
|
|
56
|
-
item.trend && /* @__PURE__ */ jsx(CardContent, { children: item.trend }),
|
|
57
|
-
(item.headline || item.detail) && /* @__PURE__ */ jsxs(CardFooter, {
|
|
58
|
-
className: "flex-col items-start gap-1 font-mono text-2xs tracking-wider uppercase",
|
|
59
|
-
children: [item.headline && /* @__PURE__ */ jsx("div", {
|
|
60
|
-
className: "flex flex-wrap gap-2 font-medium",
|
|
61
|
-
children: item.headline
|
|
62
|
-
}), item.detail && /* @__PURE__ */ jsx("div", {
|
|
63
|
-
className: "text-muted-foreground",
|
|
64
|
-
children: item.detail
|
|
65
|
-
})]
|
|
66
|
-
})
|
|
67
|
-
]
|
|
68
|
-
})
|
|
69
|
-
}, item.label))
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
//#endregion
|
|
74
|
-
export { SectionCards };
|
package/report.css
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Siyahi report stylesheet, generated from @siyahi/ui styles/siyahi.css.
|
|
3
|
-
* Inline it into a report's <style>. It makes no network requests: Geist is
|
|
4
|
-
* used when the viewer has it installed, and the system font otherwise.
|
|
5
|
-
*/
|
|
6
|
-
:root {
|
|
7
|
-
color-scheme: light dark;
|
|
8
|
-
--radius: 0rem;
|
|
9
|
-
--background: oklch(0.985 0 0);
|
|
10
|
-
--foreground: oklch(0.145 0 0);
|
|
11
|
-
--card: oklch(1 0 0);
|
|
12
|
-
--card-foreground: oklch(0.145 0 0);
|
|
13
|
-
--popover: oklch(1 0 0);
|
|
14
|
-
--popover-foreground: oklch(0.145 0 0);
|
|
15
|
-
--primary: oklch(0.205 0 0);
|
|
16
|
-
--primary-foreground: oklch(0.985 0 0);
|
|
17
|
-
--secondary: oklch(0.97 0 0);
|
|
18
|
-
--secondary-foreground: oklch(0.205 0 0);
|
|
19
|
-
--muted: oklch(0.97 0 0);
|
|
20
|
-
--muted-foreground: oklch(0.51 0 0);
|
|
21
|
-
--accent: oklch(0.97 0 0);
|
|
22
|
-
--accent-foreground: oklch(0.205 0 0);
|
|
23
|
-
--destructive: oklch(0.49 0.19 27.325);
|
|
24
|
-
--border: oklch(0.145 0 0 / 18%);
|
|
25
|
-
--input: oklch(0.64 0 0);
|
|
26
|
-
--ring: oklch(0.145 0 0);
|
|
27
|
-
--positive: oklch(0.527 0.145 150.069);
|
|
28
|
-
--positive-foreground: oklch(0.985 0 0);
|
|
29
|
-
--negative: oklch(0.577 0.235 27.325);
|
|
30
|
-
--negative-foreground: oklch(0.985 0 0);
|
|
31
|
-
--warning: oklch(0.555 0.149 48.998);
|
|
32
|
-
--warning-foreground: oklch(0.985 0 0);
|
|
33
|
-
--heat-1: 12%;
|
|
34
|
-
--heat-2: 24%;
|
|
35
|
-
--heat-3: 36%;
|
|
36
|
-
--heat-4: 48%;
|
|
37
|
-
--heat-5: 60%;
|
|
38
|
-
--wash: 7%;
|
|
39
|
-
--wash-edge: 45%;
|
|
40
|
-
--field-wash: 8%;
|
|
41
|
-
--bar-tint: 50%;
|
|
42
|
-
--link: oklch(0.51 0.2 275);
|
|
43
|
-
--chart-1: oklch(0.4 0.17 275);
|
|
44
|
-
--chart-2: oklch(0.66 0.13 70);
|
|
45
|
-
--chart-3: oklch(0.38 0.13 335);
|
|
46
|
-
--chart-4: oklch(0.65 0.11 235);
|
|
47
|
-
--chart-5: oklch(0.36 0.06 205);
|
|
48
|
-
--sidebar: oklch(0.985 0 0);
|
|
49
|
-
--sidebar-foreground: oklch(0.145 0 0);
|
|
50
|
-
--sidebar-primary: oklch(0.205 0 0);
|
|
51
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
52
|
-
--sidebar-accent: oklch(0.97 0 0);
|
|
53
|
-
--sidebar-accent-foreground: oklch(0.45 0.2 275);
|
|
54
|
-
--sidebar-border: oklch(0.145 0 0 / 18%);
|
|
55
|
-
--sidebar-ring: oklch(0.145 0 0);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@media (prefers-color-scheme: dark) {
|
|
59
|
-
:root {
|
|
60
|
-
--background: oklch(0.14 0 0);
|
|
61
|
-
--foreground: oklch(0.922 0 0);
|
|
62
|
-
--card: oklch(0.215 0 0);
|
|
63
|
-
--card-foreground: oklch(0.922 0 0);
|
|
64
|
-
--popover: oklch(0.215 0 0);
|
|
65
|
-
--popover-foreground: oklch(0.922 0 0);
|
|
66
|
-
--primary: oklch(0.922 0 0);
|
|
67
|
-
--primary-foreground: oklch(0.205 0 0);
|
|
68
|
-
--secondary: oklch(0.269 0 0);
|
|
69
|
-
--secondary-foreground: oklch(0.922 0 0);
|
|
70
|
-
--muted: oklch(0.269 0 0);
|
|
71
|
-
--muted-foreground: oklch(0.74 0 0);
|
|
72
|
-
--accent: oklch(0.269 0 0);
|
|
73
|
-
--accent-foreground: oklch(0.922 0 0);
|
|
74
|
-
--destructive: oklch(0.8 0.1 22.216);
|
|
75
|
-
--border: oklch(1 0 0 / 20%);
|
|
76
|
-
--input: oklch(0.62 0 0);
|
|
77
|
-
--ring: oklch(0.922 0 0);
|
|
78
|
-
--positive: oklch(0.69 0.16 151.711);
|
|
79
|
-
--positive-foreground: oklch(0.145 0 0);
|
|
80
|
-
--negative: oklch(0.704 0.187 22.216);
|
|
81
|
-
--negative-foreground: oklch(0.145 0 0);
|
|
82
|
-
--warning: oklch(0.828 0.169 84.429);
|
|
83
|
-
--warning-foreground: oklch(0.145 0 0);
|
|
84
|
-
--heat-1: 25%;
|
|
85
|
-
--heat-2: 33.75%;
|
|
86
|
-
--heat-3: 42.5%;
|
|
87
|
-
--heat-4: 51.25%;
|
|
88
|
-
--wash: 12%;
|
|
89
|
-
--wash-edge: 55%;
|
|
90
|
-
--field-wash: 12%;
|
|
91
|
-
--link: oklch(0.75 0.128 275);
|
|
92
|
-
--chart-1: oklch(0.58 0.2 275);
|
|
93
|
-
--chart-2: oklch(0.88 0.08 75);
|
|
94
|
-
--chart-3: oklch(0.58 0.16 335);
|
|
95
|
-
--chart-4: oklch(0.88 0.05 235);
|
|
96
|
-
--chart-5: oklch(0.56 0.08 205);
|
|
97
|
-
--sidebar: oklch(0.145 0 0);
|
|
98
|
-
--sidebar-foreground: oklch(0.922 0 0);
|
|
99
|
-
--sidebar-primary: oklch(0.922 0 0);
|
|
100
|
-
--sidebar-primary-foreground: oklch(0.205 0 0);
|
|
101
|
-
--sidebar-accent: oklch(0.269 0 0);
|
|
102
|
-
--sidebar-accent-foreground: oklch(0.8 0.1 275);
|
|
103
|
-
--sidebar-border: oklch(1 0 0 / 20%);
|
|
104
|
-
--sidebar-ring: oklch(0.922 0 0);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
*,
|
|
109
|
-
::before,
|
|
110
|
-
::after {
|
|
111
|
-
box-sizing: border-box;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
body {
|
|
115
|
-
margin: 0;
|
|
116
|
-
padding: 16px;
|
|
117
|
-
background: var(--background);
|
|
118
|
-
color: var(--foreground);
|
|
119
|
-
font-family: "Geist", "Geist Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
120
|
-
font-size: 14px;
|
|
121
|
-
line-height: 1.5;
|
|
122
|
-
font-variant-numeric: tabular-nums;
|
|
123
|
-
-webkit-font-smoothing: antialiased;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
code,
|
|
127
|
-
kbd,
|
|
128
|
-
pre,
|
|
129
|
-
samp {
|
|
130
|
-
font-family: "Geist Mono", "Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
a {
|
|
134
|
-
color: var(--link);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
@media (prefers-reduced-motion: reduce) {
|
|
138
|
-
*,
|
|
139
|
-
::before,
|
|
140
|
-
::after {
|
|
141
|
-
animation-duration: 0.01ms !important;
|
|
142
|
-
animation-iteration-count: 1 !important;
|
|
143
|
-
transition-duration: 0.01ms !important;
|
|
144
|
-
scroll-behavior: auto !important;
|
|
145
|
-
}
|
|
146
|
-
}
|