@almanaclabs/blaze-ui 0.13.0 → 0.15.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/approval-card/approval-card.d.ts +8 -1
- package/dist/components/approval-card/approval-card.d.ts.map +1 -1
- package/dist/components/approval-card/approval-card.js +47 -34
- package/dist/components/button/button.d.ts +3 -2
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +17 -9
- package/dist/components/detail-list/detail-list.d.ts +25 -0
- package/dist/components/detail-list/detail-list.d.ts.map +1 -0
- package/dist/components/detail-list/detail-list.js +38 -0
- package/dist/components/detail-list/index.d.ts +2 -0
- package/dist/components/detail-list/index.d.ts.map +1 -0
- package/dist/components/filter-chips/filter-chips.d.ts +2 -0
- package/dist/components/filter-chips/filter-chips.d.ts.map +1 -1
- package/dist/components/filter-chips/filter-chips.js +10 -6
- package/dist/components/item/item.d.ts +1 -1
- package/dist/components/marker/marker.d.ts +1 -1
- package/dist/components/metric-tile/metric-tile.d.ts +4 -2
- package/dist/components/metric-tile/metric-tile.d.ts.map +1 -1
- package/dist/components/metric-tile/metric-tile.js +34 -32
- package/dist/components/platform-icon/index.d.ts +1 -0
- package/dist/components/platform-icon/index.d.ts.map +1 -1
- package/dist/components/platform-icon/letter-mark.d.ts +20 -0
- package/dist/components/platform-icon/letter-mark.d.ts.map +1 -0
- package/dist/components/platform-icon/letter-mark.js +34 -0
- package/dist/components/platform-icon/platform-icon.d.ts +8 -2
- package/dist/components/platform-icon/platform-icon.d.ts.map +1 -1
- package/dist/components/platform-icon/platform-icon.js +69 -45
- package/dist/components/rating/index.d.ts +2 -0
- package/dist/components/rating/index.d.ts.map +1 -0
- package/dist/components/rating/rating.d.ts +15 -0
- package/dist/components/rating/rating.d.ts.map +1 -0
- package/dist/components/rating/rating.js +27 -0
- package/dist/components/section-header/index.d.ts +2 -0
- package/dist/components/section-header/index.d.ts.map +1 -0
- package/dist/components/section-header/section-header.d.ts +20 -0
- package/dist/components/section-header/section-header.d.ts.map +1 -0
- package/dist/components/section-header/section-header.js +32 -0
- package/dist/components/sparkline/index.d.ts +2 -0
- package/dist/components/sparkline/index.d.ts.map +1 -0
- package/dist/components/sparkline/sparkline.d.ts +26 -0
- package/dist/components/sparkline/sparkline.d.ts.map +1 -0
- package/dist/components/sparkline/sparkline.js +74 -0
- package/dist/components/stacked-bar-chart/stacked-bar-chart.d.ts +6 -0
- package/dist/components/stacked-bar-chart/stacked-bar-chart.d.ts.map +1 -1
- package/dist/components/stacked-bar-chart/stacked-bar-chart.js +81 -54
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tag/index.d.ts +2 -0
- package/dist/components/tag/index.d.ts.map +1 -0
- package/dist/components/tag/tag.d.ts +25 -0
- package/dist/components/tag/tag.d.ts.map +1 -0
- package/dist/components/tag/tag.js +60 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47 -41
- package/package.json +1 -1
- package/src/styles/globals.css +11 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { IconBrandApple as a, IconBrandBing as o, IconBrandBluesky as s, IconBrandFacebookFilled as c, IconBrandLinkedinFilled as l, IconBrandMeta as u, IconBrandOpenai as d, IconBrandReddit as f, IconBrandThreads as p, IconBrandTiktokFilled as m, IconBrandWordpress as h, IconBrandXFilled as g, IconBrandYoutubeFilled as _, IconBrandZapier as v, IconMail as y, IconPhone as b } from "@tabler/icons-react";
|
|
5
5
|
//#region src/components/platform-icon/platform-icon.tsx
|
|
6
|
-
var
|
|
6
|
+
var x = [
|
|
7
7
|
"x",
|
|
8
8
|
"threads",
|
|
9
9
|
"instagram",
|
|
@@ -19,15 +19,21 @@ var h = [
|
|
|
19
19
|
"outlook",
|
|
20
20
|
"microsoft",
|
|
21
21
|
"email",
|
|
22
|
-
"phone"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
"phone",
|
|
23
|
+
"meta",
|
|
24
|
+
"wordpress",
|
|
25
|
+
"zapier",
|
|
26
|
+
"apple",
|
|
27
|
+
"bing",
|
|
28
|
+
"chatgpt"
|
|
29
|
+
], S = "var(--foreground, #000000)", C = {
|
|
30
|
+
x: S,
|
|
31
|
+
threads: S,
|
|
26
32
|
instagram: "#E1306C",
|
|
27
33
|
facebook: "#1877F2",
|
|
28
34
|
bluesky: "#1185FE",
|
|
29
35
|
linkedin: "#0A66C2",
|
|
30
|
-
tiktok:
|
|
36
|
+
tiktok: S,
|
|
31
37
|
youtube: "#FF0000",
|
|
32
38
|
google: "#4285F4",
|
|
33
39
|
beehiiv: "#FFC300",
|
|
@@ -35,9 +41,15 @@ var h = [
|
|
|
35
41
|
gmail: "#EA4335",
|
|
36
42
|
outlook: "#0078D4",
|
|
37
43
|
microsoft: "#00A4EF",
|
|
38
|
-
email:
|
|
39
|
-
phone:
|
|
40
|
-
|
|
44
|
+
email: S,
|
|
45
|
+
phone: S,
|
|
46
|
+
meta: "#0866FF",
|
|
47
|
+
wordpress: "#21759B",
|
|
48
|
+
zapier: "#FF4F00",
|
|
49
|
+
apple: S,
|
|
50
|
+
bing: "#008373",
|
|
51
|
+
chatgpt: S
|
|
52
|
+
}, w = {
|
|
41
53
|
x: "X",
|
|
42
54
|
threads: "Threads",
|
|
43
55
|
instagram: "Instagram",
|
|
@@ -53,20 +65,26 @@ var h = [
|
|
|
53
65
|
outlook: "Outlook",
|
|
54
66
|
microsoft: "Microsoft",
|
|
55
67
|
email: "Email",
|
|
56
|
-
phone: "Phone"
|
|
68
|
+
phone: "Phone",
|
|
69
|
+
meta: "Meta",
|
|
70
|
+
wordpress: "WordPress",
|
|
71
|
+
zapier: "Zapier",
|
|
72
|
+
apple: "Apple",
|
|
73
|
+
bing: "Bing",
|
|
74
|
+
chatgpt: "ChatGPT"
|
|
57
75
|
};
|
|
58
|
-
function
|
|
76
|
+
function T(e) {
|
|
59
77
|
return e ? {
|
|
60
78
|
role: "img",
|
|
61
79
|
"aria-label": e
|
|
62
80
|
} : { "aria-hidden": !0 };
|
|
63
81
|
}
|
|
64
|
-
function
|
|
82
|
+
function E(e, n, i, a) {
|
|
65
83
|
let o = e, s = t.forwardRef(({ style: e, title: t, ...s }, c) => /* @__PURE__ */ r(o, {
|
|
66
84
|
ref: c,
|
|
67
85
|
"data-platform-mark": i,
|
|
68
86
|
...a ? { fill: a } : {},
|
|
69
|
-
...
|
|
87
|
+
...T(t),
|
|
70
88
|
...s,
|
|
71
89
|
style: {
|
|
72
90
|
...e,
|
|
@@ -75,8 +93,8 @@ function b(e, n, i, a) {
|
|
|
75
93
|
}));
|
|
76
94
|
return s.displayName = `Brand${i}`, s;
|
|
77
95
|
}
|
|
78
|
-
var
|
|
79
|
-
function
|
|
96
|
+
var D = E(g, C.x, "X"), O = E(p, C.threads, "Threads"), k = E(c, C.facebook, "Facebook"), A = E(l, C.linkedin, "Linkedin"), j = E(m, C.tiktok, "Tiktok"), M = E(_, C.youtube, "Youtube"), N = E(f, C.reddit, "Reddit"), P = E(s, C.bluesky, "Bluesky", C.bluesky);
|
|
97
|
+
function F(e, n, i) {
|
|
80
98
|
let a = t.forwardRef(({ size: a = 24, title: o, className: s, style: c, ...l }, u) => {
|
|
81
99
|
let d = `${e.toLowerCase()}${t.useId().replace(/:/g, "")}`;
|
|
82
100
|
return /* @__PURE__ */ r("svg", {
|
|
@@ -88,14 +106,14 @@ function k(e, n, i) {
|
|
|
88
106
|
"data-platform-mark": e,
|
|
89
107
|
className: s,
|
|
90
108
|
style: c,
|
|
91
|
-
...
|
|
109
|
+
...T(o),
|
|
92
110
|
...l,
|
|
93
111
|
children: i(d)
|
|
94
112
|
});
|
|
95
113
|
});
|
|
96
114
|
return a.displayName = `Brand${e}`, a;
|
|
97
115
|
}
|
|
98
|
-
var
|
|
116
|
+
var I = F("Instagram", "0 0 24 24", (e) => /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("defs", { children: /* @__PURE__ */ i("radialGradient", {
|
|
99
117
|
id: e,
|
|
100
118
|
cx: "0.3",
|
|
101
119
|
cy: "1.07",
|
|
@@ -125,7 +143,7 @@ var A = k("Instagram", "0 0 24 24", (e) => /* @__PURE__ */ i(n, { children: [/*
|
|
|
125
143
|
}) }), /* @__PURE__ */ r("path", {
|
|
126
144
|
fill: `url(#${e})`,
|
|
127
145
|
d: "M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-8a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-4 5a4 4 0 0 0 -3.995 3.8l-.005 .2a4 4 0 1 0 4 -4m4.5 -1.5a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1"
|
|
128
|
-
})] })),
|
|
146
|
+
})] })), L = F("Google", "-2 -2 52 52", () => /* @__PURE__ */ i(n, { children: [
|
|
129
147
|
/* @__PURE__ */ r("path", {
|
|
130
148
|
fill: "#EA4335",
|
|
131
149
|
d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"
|
|
@@ -142,17 +160,17 @@ var A = k("Instagram", "0 0 24 24", (e) => /* @__PURE__ */ i(n, { children: [/*
|
|
|
142
160
|
fill: "#34A853",
|
|
143
161
|
d: "M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"
|
|
144
162
|
})
|
|
145
|
-
] })),
|
|
163
|
+
] })), R = F("Beehiiv", "0 0 24 24", () => /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("rect", {
|
|
146
164
|
x: "2",
|
|
147
165
|
y: "2",
|
|
148
166
|
width: "20",
|
|
149
167
|
height: "20",
|
|
150
168
|
rx: "5",
|
|
151
|
-
fill:
|
|
169
|
+
fill: C.beehiiv
|
|
152
170
|
}), /* @__PURE__ */ r("path", {
|
|
153
171
|
fill: "#111111",
|
|
154
172
|
d: "M12 6.5l4.76 2.75v5.5L12 17.5l-4.76-2.75v-5.5z"
|
|
155
|
-
})] })),
|
|
173
|
+
})] })), z = F("Gmail", "-2 -7 56 56", () => /* @__PURE__ */ i(n, { children: [
|
|
156
174
|
/* @__PURE__ */ r("path", {
|
|
157
175
|
fill: "#4285F4",
|
|
158
176
|
d: "M3.5 42h8V22.6L0 13.9v24.6C0 40.4 1.6 42 3.5 42z"
|
|
@@ -173,7 +191,7 @@ var A = k("Instagram", "0 0 24 24", (e) => /* @__PURE__ */ i(n, { children: [/*
|
|
|
173
191
|
fill: "#C5221F",
|
|
174
192
|
d: "M0 9.3v4.6l11.5 8.6V7.6L8.3 5.2C4.9 2.6 0 5.1 0 9.3z"
|
|
175
193
|
})
|
|
176
|
-
] })),
|
|
194
|
+
] })), B = F("Outlook", "0 0 24 24", () => /* @__PURE__ */ i(n, { children: [
|
|
177
195
|
/* @__PURE__ */ r("rect", {
|
|
178
196
|
x: "8",
|
|
179
197
|
y: "5",
|
|
@@ -195,7 +213,7 @@ var A = k("Instagram", "0 0 24 24", (e) => /* @__PURE__ */ i(n, { children: [/*
|
|
|
195
213
|
width: "12",
|
|
196
214
|
height: "18",
|
|
197
215
|
rx: "2",
|
|
198
|
-
fill:
|
|
216
|
+
fill: C.outlook
|
|
199
217
|
}),
|
|
200
218
|
/* @__PURE__ */ r("ellipse", {
|
|
201
219
|
cx: "8",
|
|
@@ -206,7 +224,7 @@ var A = k("Instagram", "0 0 24 24", (e) => /* @__PURE__ */ i(n, { children: [/*
|
|
|
206
224
|
stroke: "#FFFFFF",
|
|
207
225
|
strokeWidth: "1.8"
|
|
208
226
|
})
|
|
209
|
-
] })),
|
|
227
|
+
] })), V = F("Microsoft", "0 0 24 24", () => /* @__PURE__ */ i(n, { children: [
|
|
210
228
|
/* @__PURE__ */ r("rect", {
|
|
211
229
|
x: "2.5",
|
|
212
230
|
y: "2.5",
|
|
@@ -235,26 +253,32 @@ var A = k("Instagram", "0 0 24 24", (e) => /* @__PURE__ */ i(n, { children: [/*
|
|
|
235
253
|
height: "9",
|
|
236
254
|
fill: "#FFB900"
|
|
237
255
|
})
|
|
238
|
-
] })),
|
|
239
|
-
x,
|
|
240
|
-
threads:
|
|
241
|
-
instagram:
|
|
242
|
-
facebook:
|
|
243
|
-
bluesky:
|
|
244
|
-
linkedin:
|
|
245
|
-
tiktok:
|
|
246
|
-
youtube:
|
|
247
|
-
google:
|
|
248
|
-
beehiiv:
|
|
249
|
-
reddit:
|
|
250
|
-
gmail:
|
|
251
|
-
outlook:
|
|
252
|
-
microsoft:
|
|
253
|
-
email:
|
|
254
|
-
phone:
|
|
256
|
+
] })), H = E(y, C.email, "Email"), U = E(b, C.phone, "Phone"), W = E(u, C.meta, "Meta"), G = E(h, C.wordpress, "Wordpress"), K = E(v, C.zapier, "Zapier"), q = E(a, C.apple, "Apple"), J = E(o, C.bing, "Bing"), Y = E(d, C.chatgpt, "Chatgpt"), X = {
|
|
257
|
+
x: D,
|
|
258
|
+
threads: O,
|
|
259
|
+
instagram: I,
|
|
260
|
+
facebook: k,
|
|
261
|
+
bluesky: P,
|
|
262
|
+
linkedin: A,
|
|
263
|
+
tiktok: j,
|
|
264
|
+
youtube: M,
|
|
265
|
+
google: L,
|
|
266
|
+
beehiiv: R,
|
|
267
|
+
reddit: N,
|
|
268
|
+
gmail: z,
|
|
269
|
+
outlook: B,
|
|
270
|
+
microsoft: V,
|
|
271
|
+
email: H,
|
|
272
|
+
phone: U,
|
|
273
|
+
meta: W,
|
|
274
|
+
wordpress: G,
|
|
275
|
+
zapier: K,
|
|
276
|
+
apple: q,
|
|
277
|
+
bing: J,
|
|
278
|
+
chatgpt: Y
|
|
255
279
|
};
|
|
256
|
-
function
|
|
257
|
-
let s =
|
|
280
|
+
function Z({ platform: t, size: n = 16, className: i, style: a, ...o }) {
|
|
281
|
+
let s = X[t];
|
|
258
282
|
return /* @__PURE__ */ r(s, {
|
|
259
283
|
"data-slot": "platform-icon",
|
|
260
284
|
"data-platform": t,
|
|
@@ -269,4 +293,4 @@ function z({ platform: t, size: n = 16, className: i, style: a, ...o }) {
|
|
|
269
293
|
});
|
|
270
294
|
}
|
|
271
295
|
//#endregion
|
|
272
|
-
export {
|
|
296
|
+
export { q as BrandApple, R as BrandBeehiiv, J as BrandBing, P as BrandBluesky, Y as BrandChatgpt, H as BrandEmail, k as BrandFacebook, z as BrandGmail, L as BrandGoogle, I as BrandInstagram, A as BrandLinkedin, W as BrandMeta, V as BrandMicrosoft, B as BrandOutlook, U as BrandPhone, N as BrandReddit, O as BrandThreads, j as BrandTiktok, G as BrandWordpress, D as BrandX, M as BrandYoutube, K as BrandZapier, x as PLATFORMS, C as PLATFORM_COLOR, X as PLATFORM_ICON, w as PLATFORM_LABEL, Z as PlatformIcon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/rating/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type RatingProps = Omit<React.ComponentProps<'span'>, 'children'> & {
|
|
3
|
+
/** The rating, rounded to whole stars for display. */
|
|
4
|
+
value: number;
|
|
5
|
+
/** How many stars make a full score. */
|
|
6
|
+
max?: number;
|
|
7
|
+
/** Star size in pixels. */
|
|
8
|
+
size?: 12 | 14 | 16;
|
|
9
|
+
/** The accessible name. Defaults to "4 of 5 stars". */
|
|
10
|
+
label?: string;
|
|
11
|
+
};
|
|
12
|
+
/** Read-only stars for a review or an average rating. */
|
|
13
|
+
declare function Rating({ value, max, size, label, className, ...props }: RatingProps): React.JSX.Element;
|
|
14
|
+
export { Rating, type RatingProps };
|
|
15
|
+
//# sourceMappingURL=rating.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../../src/components/rating/rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,KAAK,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAClE,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;IACb,wCAAwC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2BAA2B;IAC3B,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;IACnB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAQD,yDAAyD;AACzD,iBAAS,MAAM,CAAC,EACd,KAAK,EACL,GAAO,EACP,IAAS,EACT,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,qBAuBb;AAED,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { IconStarFilled as n } from "@tabler/icons-react";
|
|
5
|
+
//#region src/components/rating/rating.tsx
|
|
6
|
+
var r = {
|
|
7
|
+
12: "size-3",
|
|
8
|
+
14: "size-3.5",
|
|
9
|
+
16: "size-4"
|
|
10
|
+
};
|
|
11
|
+
function i({ value: i, max: a = 5, size: o = 14, label: s, className: c, ...l }) {
|
|
12
|
+
let u = Math.max(0, Math.min(a, Math.round(i)));
|
|
13
|
+
return /* @__PURE__ */ t("span", {
|
|
14
|
+
"data-slot": "rating",
|
|
15
|
+
role: "img",
|
|
16
|
+
"aria-label": s ?? `${u} of ${a} stars`,
|
|
17
|
+
className: e("inline-flex flex-none items-center gap-px", c),
|
|
18
|
+
...l,
|
|
19
|
+
children: Array.from({ length: a }, (i, a) => /* @__PURE__ */ t(n, {
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
"data-filled": a < u ? "" : void 0,
|
|
22
|
+
className: e(r[o], a < u ? "text-foreground" : "text-border")
|
|
23
|
+
}, a))
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { i as Rating };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/section-header/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type SectionHeaderProps = Omit<React.ComponentProps<'div'>, 'title'> & {
|
|
3
|
+
/** The section's name. */
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
/** One muted line under the title. */
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
/** Muted text at the right, such as a count or "Google, last 28 days". */
|
|
8
|
+
meta?: React.ReactNode;
|
|
9
|
+
/** A link or button at the right, after `meta`. */
|
|
10
|
+
action?: React.ReactNode;
|
|
11
|
+
/** The heading level. Defaults to `h2`. */
|
|
12
|
+
as?: 'h2' | 'h3' | 'h4';
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The header over a page section: a title with an optional line under it, and
|
|
16
|
+
* a count, a note or an action at the right.
|
|
17
|
+
*/
|
|
18
|
+
declare function SectionHeader({ title, description, meta, action, as: Heading, className, ...props }: SectionHeaderProps): React.JSX.Element;
|
|
19
|
+
export { SectionHeader, type SectionHeaderProps };
|
|
20
|
+
//# sourceMappingURL=section-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-header.d.ts","sourceRoot":"","sources":["../../../src/components/section-header/section-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG;IACrE,0BAA0B;IAC1B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,0EAA0E;IAC1E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,mDAAmD;IACnD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,2CAA2C;IAC3C,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CACxB,CAAA;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EACrB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,MAAM,EACN,EAAE,EAAE,OAAc,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,qBA0CpB;AAED,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/section-header/section-header.tsx
|
|
5
|
+
function r({ title: r, description: i, meta: a, action: o, as: s = "h2", className: c, ...l }) {
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
"data-slot": "section-header",
|
|
8
|
+
className: e("flex flex-wrap items-start justify-between gap-x-4 gap-y-2", c),
|
|
9
|
+
...l,
|
|
10
|
+
children: [/* @__PURE__ */ n("div", {
|
|
11
|
+
className: "min-w-[min(100%,12rem)] flex-1",
|
|
12
|
+
children: [/* @__PURE__ */ t(s, {
|
|
13
|
+
"data-slot": "section-header-title",
|
|
14
|
+
className: "type-section-title",
|
|
15
|
+
children: r
|
|
16
|
+
}), i ? /* @__PURE__ */ t("p", {
|
|
17
|
+
"data-slot": "section-header-description",
|
|
18
|
+
className: "type-body mt-0.5 text-muted-foreground",
|
|
19
|
+
children: i
|
|
20
|
+
}) : null]
|
|
21
|
+
}), a != null || o != null ? /* @__PURE__ */ n("div", {
|
|
22
|
+
className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 pt-1",
|
|
23
|
+
children: [a == null ? null : /* @__PURE__ */ t("span", {
|
|
24
|
+
"data-slot": "section-header-meta",
|
|
25
|
+
className: "type-meta text-muted-foreground tabular-nums",
|
|
26
|
+
children: a
|
|
27
|
+
}), o]
|
|
28
|
+
}) : null]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { r as SectionHeader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sparkline/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type SparklineProps = Omit<React.ComponentProps<'svg'>, 'values'> & {
|
|
3
|
+
/** The points, oldest first. Null leaves a gap in the line. */
|
|
4
|
+
values: readonly (number | null)[];
|
|
5
|
+
/** Any CSS color. Defaults to the text color, so a `text-*` class sets it. */
|
|
6
|
+
color?: string;
|
|
7
|
+
/** Rendered width and height in pixels. Defaults to builder's 90 by 28. */
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
/** The line's width in pixels. */
|
|
11
|
+
strokeWidth?: number;
|
|
12
|
+
/** Fills under the line with a fading tint. */
|
|
13
|
+
area?: boolean;
|
|
14
|
+
/** Marks the last point with a dot. */
|
|
15
|
+
dot?: boolean;
|
|
16
|
+
/** Names the chart for assistive tech. Leave it out when nearby text says the value. */
|
|
17
|
+
label?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* A small trend line with no axes, as in builder's stat tiles: a 2px round
|
|
21
|
+
* stroke, with an optional tint under it and a dot on the last point.
|
|
22
|
+
* Decorative unless given a `label`.
|
|
23
|
+
*/
|
|
24
|
+
declare function Sparkline({ values, color, width, height, strokeWidth, area, dot, label, className, style, ...props }: SparklineProps): React.JSX.Element;
|
|
25
|
+
export { Sparkline, type SparklineProps };
|
|
26
|
+
//# sourceMappingURL=sparkline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sparkline.d.ts","sourceRoot":"","sources":["../../../src/components/sparkline/sparkline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,GAAG;IAClE,+DAA+D;IAC/D,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;IAClC,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uCAAuC;IACvC,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAID;;;;GAIG;AACH,iBAAS,SAAS,CAAC,EACjB,MAAM,EACN,KAAK,EACL,KAAU,EACV,MAAW,EACX,WAAe,EACf,IAAY,EACZ,GAAW,EACX,KAAK,EACL,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,cAAc,qBAqFhB;AAED,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/sparkline/sparkline.tsx
|
|
5
|
+
function i({ values: i, color: a, width: o = 90, height: s = 28, strokeWidth: c = 2, area: l = !1, dot: u = !1, label: d, className: f, style: p, ...m }) {
|
|
6
|
+
let h = `sparkline${t.useId().replace(/:/g, "")}`, g = i.filter((e) => e !== null && Number.isFinite(e)), _ = c, v = Math.min(...g), y = Math.max(...g), b = y - v || 1, x = i.length > 1 ? (o - _ * 2) / (i.length - 1) : 0, S = [[]];
|
|
7
|
+
i.forEach((e, t) => {
|
|
8
|
+
if (e === null || !Number.isFinite(e)) {
|
|
9
|
+
S[S.length - 1].length && S.push([]);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
S[S.length - 1].push({
|
|
13
|
+
x: _ + t * x,
|
|
14
|
+
y: y === v ? s / 2 : _ + (1 - (e - v) / b) * (s - _ * 2)
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
let C = S.filter((e) => e.length > 0), w = C[C.length - 1]?.at(-1), T = (e) => e.map(({ x: e, y: t }) => `${e.toFixed(2)},${t.toFixed(2)}`).join(" ");
|
|
18
|
+
return /* @__PURE__ */ r("svg", {
|
|
19
|
+
"data-slot": "sparkline",
|
|
20
|
+
viewBox: `0 0 ${o} ${s}`,
|
|
21
|
+
width: o,
|
|
22
|
+
height: s,
|
|
23
|
+
className: e("flex-none overflow-visible", f),
|
|
24
|
+
style: a ? {
|
|
25
|
+
color: a,
|
|
26
|
+
...p
|
|
27
|
+
} : p,
|
|
28
|
+
...d ? {
|
|
29
|
+
role: "img",
|
|
30
|
+
"aria-label": d
|
|
31
|
+
} : { "aria-hidden": !0 },
|
|
32
|
+
...m,
|
|
33
|
+
children: [
|
|
34
|
+
l ? /* @__PURE__ */ n("defs", { children: /* @__PURE__ */ r("linearGradient", {
|
|
35
|
+
id: h,
|
|
36
|
+
x1: "0",
|
|
37
|
+
y1: "0",
|
|
38
|
+
x2: "0",
|
|
39
|
+
y2: "1",
|
|
40
|
+
children: [/* @__PURE__ */ n("stop", {
|
|
41
|
+
offset: "0",
|
|
42
|
+
stopColor: "currentColor",
|
|
43
|
+
stopOpacity: "0.18"
|
|
44
|
+
}), /* @__PURE__ */ n("stop", {
|
|
45
|
+
offset: "1",
|
|
46
|
+
stopColor: "currentColor",
|
|
47
|
+
stopOpacity: "0"
|
|
48
|
+
})]
|
|
49
|
+
}) }) : null,
|
|
50
|
+
C.map((e, i) => e.length > 1 ? /* @__PURE__ */ r(t.Fragment, { children: [l ? /* @__PURE__ */ n("polygon", {
|
|
51
|
+
"data-slot": "sparkline-area",
|
|
52
|
+
fill: `url(#${h})`,
|
|
53
|
+
points: `${e[0].x},${s} ${T(e)} ${e[e.length - 1].x},${s}`
|
|
54
|
+
}) : null, /* @__PURE__ */ n("polyline", {
|
|
55
|
+
"data-slot": "sparkline-line",
|
|
56
|
+
fill: "none",
|
|
57
|
+
stroke: "currentColor",
|
|
58
|
+
strokeWidth: c,
|
|
59
|
+
strokeLinejoin: "round",
|
|
60
|
+
strokeLinecap: "round",
|
|
61
|
+
points: T(e)
|
|
62
|
+
})] }, i) : null),
|
|
63
|
+
u && w ? /* @__PURE__ */ n("circle", {
|
|
64
|
+
"data-slot": "sparkline-end",
|
|
65
|
+
cx: w.x,
|
|
66
|
+
cy: w.y,
|
|
67
|
+
r: c + .5,
|
|
68
|
+
fill: "currentColor"
|
|
69
|
+
}) : null
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { i as Sparkline };
|
|
@@ -26,6 +26,12 @@ export interface StackedBarChartDatum {
|
|
|
26
26
|
tooltipLabel?: React.ReactNode;
|
|
27
27
|
/** Draws the day's bars faded, for a count still coming in. */
|
|
28
28
|
partial?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Where the day is on pace to land, for a day still in progress. Draws a
|
|
31
|
+
* dashed outline from zero to this total around the bars so far, and adds
|
|
32
|
+
* "On pace for …" to the tooltip. It counts toward the y-axis.
|
|
33
|
+
*/
|
|
34
|
+
projected?: number | null;
|
|
29
35
|
/** One number per series key. Null, or a missing key, means no count that day. */
|
|
30
36
|
values: Readonly<Partial<Record<string, number | null>>>;
|
|
31
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stacked-bar-chart.d.ts","sourceRoot":"","sources":["../../../src/components/stacked-bar-chart/stacked-bar-chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAoB9B,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAA;IACX,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAA;IACb,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0CAA0C;IAC1C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kFAAkF;IAClF,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,WAAW,qBAAqB;IACpC,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,oFAAoF;IACpF,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACrC,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC,6BAA6B;IAC7B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACvC;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAChD,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,UAAU,GAAG,OAAO,CACrB;IACC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAA;IACxC,uEAAuE;IACvE,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAA;IACzC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,uCAAuC;IACvC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAC/C;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC5B,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;
|
|
1
|
+
{"version":3,"file":"stacked-bar-chart.d.ts","sourceRoot":"","sources":["../../../src/components/stacked-bar-chart/stacked-bar-chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAoB9B,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAA;IACX,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAA;IACb,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0CAA0C;IAC1C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,kFAAkF;IAClF,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,WAAW,qBAAqB;IACpC,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,oFAAoF;IACpF,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACrC,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC,6BAA6B;IAC7B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACvC;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAChD,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,UAAU,GAAG,OAAO,CACrB;IACC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAA;IACxC,uEAAuE;IACvE,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAA;IACzC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,uCAAuC;IACvC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAC/C;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC5B,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAgDD;;;;GAIG;AACH,iBAAS,eAAe,CAAC,EACvB,MAAM,EACN,OAAO,EACP,KAAK,EACL,MAAM,EAAE,UAAU,EAClB,aAAa,EACb,cAAc,EACd,YAAY,EAAE,UAAU,EACxB,mBAAwB,EACxB,oBAAoB,EACpB,OAAmB,EACnB,MAAM,EACN,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,qBAmTtB;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
|