@almanaclabs/blaze-ui 0.9.0 → 0.11.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.
Files changed (88) hide show
  1. package/dist/components/app-shell/app-shell.d.ts +81 -0
  2. package/dist/components/app-shell/app-shell.d.ts.map +1 -0
  3. package/dist/components/app-shell/app-shell.js +144 -0
  4. package/dist/components/app-shell/index.d.ts +2 -0
  5. package/dist/components/app-shell/index.d.ts.map +1 -0
  6. package/dist/components/badge/badge.d.ts +1 -1
  7. package/dist/components/chat-bar/chat-bar.d.ts +26 -0
  8. package/dist/components/chat-bar/chat-bar.d.ts.map +1 -0
  9. package/dist/components/chat-bar/chat-bar.js +58 -0
  10. package/dist/components/chat-bar/index.d.ts +2 -0
  11. package/dist/components/chat-bar/index.d.ts.map +1 -0
  12. package/dist/components/dense-table/dense-table.d.ts +36 -0
  13. package/dist/components/dense-table/dense-table.d.ts.map +1 -0
  14. package/dist/components/dense-table/dense-table.js +41 -0
  15. package/dist/components/dense-table/index.d.ts +2 -0
  16. package/dist/components/dense-table/index.d.ts.map +1 -0
  17. package/dist/components/editable-text/editable-text.d.ts +26 -0
  18. package/dist/components/editable-text/editable-text.d.ts.map +1 -0
  19. package/dist/components/editable-text/editable-text.js +82 -0
  20. package/dist/components/editable-text/index.d.ts +2 -0
  21. package/dist/components/editable-text/index.d.ts.map +1 -0
  22. package/dist/components/face-stack-button/face-stack-button.d.ts +31 -0
  23. package/dist/components/face-stack-button/face-stack-button.d.ts.map +1 -0
  24. package/dist/components/face-stack-button/face-stack-button.js +47 -0
  25. package/dist/components/face-stack-button/index.d.ts +2 -0
  26. package/dist/components/face-stack-button/index.d.ts.map +1 -0
  27. package/dist/components/goal-card/goal-card.d.ts +51 -0
  28. package/dist/components/goal-card/goal-card.d.ts.map +1 -0
  29. package/dist/components/goal-card/goal-card.js +109 -0
  30. package/dist/components/goal-card/index.d.ts +2 -0
  31. package/dist/components/goal-card/index.d.ts.map +1 -0
  32. package/dist/components/input-group/input-group.d.ts +1 -1
  33. package/dist/components/media-thumbnail/index.d.ts +2 -0
  34. package/dist/components/media-thumbnail/index.d.ts.map +1 -0
  35. package/dist/components/media-thumbnail/media-thumbnail.d.ts +21 -0
  36. package/dist/components/media-thumbnail/media-thumbnail.d.ts.map +1 -0
  37. package/dist/components/media-thumbnail/media-thumbnail.js +50 -0
  38. package/dist/components/metric-tile/index.d.ts +2 -0
  39. package/dist/components/metric-tile/index.d.ts.map +1 -0
  40. package/dist/components/metric-tile/metric-tile.d.ts +34 -0
  41. package/dist/components/metric-tile/metric-tile.d.ts.map +1 -0
  42. package/dist/components/metric-tile/metric-tile.js +75 -0
  43. package/dist/components/page-header/index.d.ts +2 -0
  44. package/dist/components/page-header/index.d.ts.map +1 -0
  45. package/dist/components/page-header/page-header.d.ts +16 -0
  46. package/dist/components/page-header/page-header.d.ts.map +1 -0
  47. package/dist/components/page-header/page-header.js +38 -0
  48. package/dist/components/platform-avatar/index.d.ts +2 -0
  49. package/dist/components/platform-avatar/index.d.ts.map +1 -0
  50. package/dist/components/platform-avatar/platform-avatar.d.ts +23 -0
  51. package/dist/components/platform-avatar/platform-avatar.d.ts.map +1 -0
  52. package/dist/components/platform-avatar/platform-avatar.js +54 -0
  53. package/dist/components/platform-icon/index.d.ts +2 -0
  54. package/dist/components/platform-icon/index.d.ts.map +1 -0
  55. package/dist/components/platform-icon/platform-icon.d.ts +33 -0
  56. package/dist/components/platform-icon/platform-icon.d.ts.map +1 -0
  57. package/dist/components/platform-icon/platform-icon.js +169 -0
  58. package/dist/components/sidebar/sidebar.js +19 -19
  59. package/dist/components/signal-strip/index.d.ts +2 -0
  60. package/dist/components/signal-strip/index.d.ts.map +1 -0
  61. package/dist/components/signal-strip/signal-strip.d.ts +34 -0
  62. package/dist/components/signal-strip/signal-strip.d.ts.map +1 -0
  63. package/dist/components/signal-strip/signal-strip.js +84 -0
  64. package/dist/components/source-avatar/index.d.ts +2 -0
  65. package/dist/components/source-avatar/index.d.ts.map +1 -0
  66. package/dist/components/source-avatar/source-avatar.d.ts +16 -0
  67. package/dist/components/source-avatar/source-avatar.d.ts.map +1 -0
  68. package/dist/components/source-avatar/source-avatar.js +15 -0
  69. package/dist/components/stacked-bar-chart/index.d.ts +2 -0
  70. package/dist/components/stacked-bar-chart/index.d.ts.map +1 -0
  71. package/dist/components/stacked-bar-chart/stacked-bar-chart.d.ts +80 -0
  72. package/dist/components/stacked-bar-chart/stacked-bar-chart.d.ts.map +1 -0
  73. package/dist/components/stacked-bar-chart/stacked-bar-chart.js +240 -0
  74. package/dist/components/state-banner/index.d.ts +2 -0
  75. package/dist/components/state-banner/index.d.ts.map +1 -0
  76. package/dist/components/state-banner/state-banner.d.ts +32 -0
  77. package/dist/components/state-banner/state-banner.d.ts.map +1 -0
  78. package/dist/components/state-banner/state-banner.js +70 -0
  79. package/dist/components/suggest-chips/index.d.ts +2 -0
  80. package/dist/components/suggest-chips/index.d.ts.map +1 -0
  81. package/dist/components/suggest-chips/suggest-chips.d.ts +13 -0
  82. package/dist/components/suggest-chips/suggest-chips.d.ts.map +1 -0
  83. package/dist/components/suggest-chips/suggest-chips.js +24 -0
  84. package/dist/index.d.ts +17 -1
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +65 -49
  87. package/package.json +1 -1
  88. package/src/styles/globals.css +69 -5
@@ -0,0 +1,169 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import * as t from "react";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { IconBrandBluesky as a, IconBrandFacebookFilled as o, IconBrandLinkedinFilled as s, IconBrandReddit as c, IconBrandThreads as l, IconBrandTiktokFilled as u, IconBrandXFilled as d, IconBrandYoutubeFilled as f } from "@tabler/icons-react";
5
+ //#region src/components/platform-icon/platform-icon.tsx
6
+ var p = [
7
+ "x",
8
+ "threads",
9
+ "instagram",
10
+ "facebook",
11
+ "bluesky",
12
+ "linkedin",
13
+ "tiktok",
14
+ "youtube",
15
+ "google",
16
+ "beehiiv",
17
+ "reddit"
18
+ ], m = "var(--foreground, #000000)", h = {
19
+ x: m,
20
+ threads: m,
21
+ instagram: "#E1306C",
22
+ facebook: "#1877F2",
23
+ bluesky: "#1185FE",
24
+ linkedin: "#0A66C2",
25
+ tiktok: m,
26
+ youtube: "#FF0000",
27
+ google: "#4285F4",
28
+ beehiiv: "#FFC300",
29
+ reddit: "#FF4500"
30
+ }, g = {
31
+ x: "X",
32
+ threads: "Threads",
33
+ instagram: "Instagram",
34
+ facebook: "Facebook",
35
+ bluesky: "Bluesky",
36
+ linkedin: "LinkedIn",
37
+ tiktok: "TikTok",
38
+ youtube: "YouTube",
39
+ google: "Google",
40
+ beehiiv: "beehiiv",
41
+ reddit: "Reddit"
42
+ };
43
+ function _(e) {
44
+ return e ? {
45
+ role: "img",
46
+ "aria-label": e
47
+ } : { "aria-hidden": !0 };
48
+ }
49
+ function v(e, n, i, a) {
50
+ let o = e, s = t.forwardRef(({ style: e, title: t, ...s }, c) => /* @__PURE__ */ r(o, {
51
+ ref: c,
52
+ "data-platform-mark": i,
53
+ ...a ? { fill: a } : {},
54
+ ..._(t),
55
+ ...s,
56
+ style: {
57
+ ...e,
58
+ color: n
59
+ }
60
+ }));
61
+ return s.displayName = `Brand${i}`, s;
62
+ }
63
+ var y = v(d, h.x, "X"), b = v(l, h.threads, "Threads"), x = v(o, h.facebook, "Facebook"), S = v(s, h.linkedin, "Linkedin"), C = v(u, h.tiktok, "Tiktok"), w = v(f, h.youtube, "Youtube"), T = v(c, h.reddit, "Reddit"), E = v(a, h.bluesky, "Bluesky", h.bluesky);
64
+ function D(e, n, i) {
65
+ let a = t.forwardRef(({ size: a = 24, title: o, className: s, style: c, ...l }, u) => {
66
+ let d = `${e.toLowerCase()}${t.useId().replace(/:/g, "")}`;
67
+ return /* @__PURE__ */ r("svg", {
68
+ ref: u,
69
+ xmlns: "http://www.w3.org/2000/svg",
70
+ viewBox: n,
71
+ width: a,
72
+ height: a,
73
+ "data-platform-mark": e,
74
+ className: s,
75
+ style: c,
76
+ ..._(o),
77
+ ...l,
78
+ children: i(d)
79
+ });
80
+ });
81
+ return a.displayName = `Brand${e}`, a;
82
+ }
83
+ var O = D("Instagram", "0 0 24 24", (e) => /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("defs", { children: /* @__PURE__ */ i("radialGradient", {
84
+ id: e,
85
+ cx: "0.3",
86
+ cy: "1.07",
87
+ r: "1.2",
88
+ children: [
89
+ /* @__PURE__ */ r("stop", {
90
+ offset: "0",
91
+ stopColor: "#FFD776"
92
+ }),
93
+ /* @__PURE__ */ r("stop", {
94
+ offset: "0.25",
95
+ stopColor: "#F3A554"
96
+ }),
97
+ /* @__PURE__ */ r("stop", {
98
+ offset: "0.5",
99
+ stopColor: "#E1306C"
100
+ }),
101
+ /* @__PURE__ */ r("stop", {
102
+ offset: "0.8",
103
+ stopColor: "#C13584"
104
+ }),
105
+ /* @__PURE__ */ r("stop", {
106
+ offset: "1",
107
+ stopColor: "#833AB4"
108
+ })
109
+ ]
110
+ }) }), /* @__PURE__ */ r("path", {
111
+ fill: `url(#${e})`,
112
+ 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"
113
+ })] })), k = D("Google", "-2 -2 52 52", () => /* @__PURE__ */ i(n, { children: [
114
+ /* @__PURE__ */ r("path", {
115
+ fill: "#EA4335",
116
+ 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"
117
+ }),
118
+ /* @__PURE__ */ r("path", {
119
+ fill: "#4285F4",
120
+ d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"
121
+ }),
122
+ /* @__PURE__ */ r("path", {
123
+ fill: "#FBBC05",
124
+ d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"
125
+ }),
126
+ /* @__PURE__ */ r("path", {
127
+ fill: "#34A853",
128
+ 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"
129
+ })
130
+ ] })), A = D("Beehiiv", "0 0 24 24", () => /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("rect", {
131
+ x: "2",
132
+ y: "2",
133
+ width: "20",
134
+ height: "20",
135
+ rx: "5",
136
+ fill: h.beehiiv
137
+ }), /* @__PURE__ */ r("path", {
138
+ fill: "#111111",
139
+ d: "M12 6.5l4.76 2.75v5.5L12 17.5l-4.76-2.75v-5.5z"
140
+ })] })), j = {
141
+ x: y,
142
+ threads: b,
143
+ instagram: O,
144
+ facebook: x,
145
+ bluesky: E,
146
+ linkedin: S,
147
+ tiktok: C,
148
+ youtube: w,
149
+ google: k,
150
+ beehiiv: A,
151
+ reddit: T
152
+ };
153
+ function M({ platform: t, size: n = 16, className: i, style: a, ...o }) {
154
+ let s = j[t];
155
+ return /* @__PURE__ */ r(s, {
156
+ "data-slot": "platform-icon",
157
+ "data-platform": t,
158
+ size: n,
159
+ className: e("shrink-0", i),
160
+ style: {
161
+ width: n,
162
+ height: n,
163
+ ...a
164
+ },
165
+ ...o
166
+ });
167
+ }
168
+ //#endregion
169
+ export { A as BrandBeehiiv, E as BrandBluesky, x as BrandFacebook, k as BrandGoogle, O as BrandInstagram, S as BrandLinkedin, T as BrandReddit, b as BrandThreads, C as BrandTiktok, y as BrandX, w as BrandYoutube, p as PLATFORMS, h as PLATFORM_COLOR, j as PLATFORM_ICON, g as PLATFORM_LABEL, M as PlatformIcon };
@@ -3,8 +3,8 @@ import { cn as e } from "../../lib/utils.js";
3
3
  import { Button as t } from "../button/button.js";
4
4
  import { Separator as n } from "../separator/separator.js";
5
5
  import { Input as r } from "../input/input.js";
6
- import { Sheet as i, SheetContent as a, SheetDescription as o, SheetHeader as s, SheetTitle as c } from "../sheet/sheet.js";
7
- import { useIsMobile as l } from "../../hooks/use-mobile.js";
6
+ import { useIsMobile as i } from "../../hooks/use-mobile.js";
7
+ import { Sheet as a, SheetContent as o, SheetDescription as s, SheetHeader as c, SheetTitle as l } from "../sheet/sheet.js";
8
8
  import { Skeleton as u } from "../skeleton/skeleton.js";
9
9
  import { Tooltip as d, TooltipContent as f, TooltipTrigger as p } from "../tooltip/tooltip.js";
10
10
  import * as m from "react";
@@ -20,12 +20,12 @@ function O() {
20
20
  if (!e) throw Error("useSidebar must be used within a SidebarProvider.");
21
21
  return e;
22
22
  }
23
- function k({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style: a, children: o, ...s }) {
24
- let c = l(), [u, d] = m.useState(!1), [f, p] = m.useState(t), h = n ?? f, _ = m.useCallback((e) => {
23
+ function k({ defaultOpen: t = !0, open: n, onOpenChange: r, className: a, style: o, children: s, ...c }) {
24
+ let l = i(), [u, d] = m.useState(!1), [f, p] = m.useState(t), h = n ?? f, _ = m.useCallback((e) => {
25
25
  let t = typeof e == "function" ? e(h) : e;
26
26
  r ? r(t) : p(t), document.cookie = `${x}=${t}; path=/; max-age=${S}`;
27
- }, [r, h]), v = m.useCallback(() => c ? d((e) => !e) : _((e) => !e), [
28
- c,
27
+ }, [r, h]), v = m.useCallback(() => l ? d((e) => !e) : _((e) => !e), [
28
+ l,
29
29
  _,
30
30
  d
31
31
  ]);
@@ -39,7 +39,7 @@ function k({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style:
39
39
  state: y,
40
40
  open: h,
41
41
  setOpen: _,
42
- isMobile: c,
42
+ isMobile: l,
43
43
  openMobile: u,
44
44
  setOpenMobile: d,
45
45
  toggleSidebar: v
@@ -47,7 +47,7 @@ function k({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style:
47
47
  y,
48
48
  h,
49
49
  _,
50
- c,
50
+ l,
51
51
  u,
52
52
  d,
53
53
  v
@@ -59,26 +59,26 @@ function k({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style:
59
59
  style: {
60
60
  "--sidebar-width": C,
61
61
  "--sidebar-width-icon": T,
62
- ...a
62
+ ...o
63
63
  },
64
- className: e("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", i),
65
- ...s,
66
- children: o
64
+ className: e("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", a),
65
+ ...c,
66
+ children: s
67
67
  })
68
68
  });
69
69
  }
70
- function A({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanvas", className: l, children: u, dir: d, ...f }) {
70
+ function A({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanvas", className: i, children: u, dir: d, ...f }) {
71
71
  let { isMobile: p, state: m, openMobile: h, setOpenMobile: v } = O();
72
72
  return r === "none" ? /* @__PURE__ */ g("div", {
73
73
  "data-slot": "sidebar",
74
- className: e("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", l),
74
+ className: e("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", i),
75
75
  ...f,
76
76
  children: u
77
- }) : p ? /* @__PURE__ */ g(i, {
77
+ }) : p ? /* @__PURE__ */ g(a, {
78
78
  open: h,
79
79
  onOpenChange: v,
80
80
  ...f,
81
- children: /* @__PURE__ */ _(a, {
81
+ children: /* @__PURE__ */ _(o, {
82
82
  dir: d,
83
83
  "data-sidebar": "sidebar",
84
84
  "data-slot": "sidebar",
@@ -86,9 +86,9 @@ function A({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanv
86
86
  className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
87
87
  style: { "--sidebar-width": w },
88
88
  side: t,
89
- children: [/* @__PURE__ */ _(s, {
89
+ children: [/* @__PURE__ */ _(c, {
90
90
  className: "sr-only",
91
- children: [/* @__PURE__ */ g(c, { children: "Sidebar" }), /* @__PURE__ */ g(o, { children: "Displays the mobile sidebar." })]
91
+ children: [/* @__PURE__ */ g(l, { children: "Sidebar" }), /* @__PURE__ */ g(s, { children: "Displays the mobile sidebar." })]
92
92
  }), /* @__PURE__ */ g("div", {
93
93
  className: "flex h-full w-full flex-col",
94
94
  children: u
@@ -107,7 +107,7 @@ function A({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanv
107
107
  }), /* @__PURE__ */ g("div", {
108
108
  "data-slot": "sidebar-container",
109
109
  "data-side": t,
110
- className: e("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", n === "floating" || n === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", l),
110
+ className: e("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", n === "floating" || n === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", i),
111
111
  ...f,
112
112
  children: /* @__PURE__ */ g("div", {
113
113
  "data-sidebar": "sidebar",
@@ -0,0 +1,2 @@
1
+ export * from './signal-strip';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/signal-strip/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ export interface SignalDotsProps extends Omit<React.ComponentProps<'span'>, 'children'> {
3
+ /** How many dots are filled. Clamped to 0 through `max`. */
4
+ value: number;
5
+ /** How many dots the strip has. */
6
+ max?: number;
7
+ }
8
+ /** A short run of dots, `value` of `max` filled: a score read at a glance. */
9
+ declare function SignalDots({ value, max, className, 'aria-label': ariaLabel, ...props }: SignalDotsProps): React.JSX.Element;
10
+ export interface SignalStripItem {
11
+ /** The signal's name, such as "Proven". */
12
+ label: React.ReactNode;
13
+ /** Filled dots. Leave out, or pass null, for a signal that has no score. */
14
+ value?: number | null;
15
+ max?: number;
16
+ /** The short reading beside the dots, such as "Strong". */
17
+ note?: React.ReactNode;
18
+ /** The line behind the reading. Shown only in the `detail` layout. */
19
+ description?: React.ReactNode;
20
+ /** Accessible name for the dots when "n of max" is not enough. */
21
+ dotsLabel?: string;
22
+ }
23
+ export interface SignalStripProps extends Omit<React.ComponentProps<'dl'>, 'children'> {
24
+ items: readonly SignalStripItem[];
25
+ /**
26
+ * `inline` wraps the signals in one line; `stacked` aligns them as rows of
27
+ * label, dots and note; `detail` adds each signal's description under it.
28
+ */
29
+ layout?: 'inline' | 'stacked' | 'detail';
30
+ }
31
+ /** A few named signals, each a label, its dots and a short note. */
32
+ declare function SignalStrip({ items, layout, className, ...props }: SignalStripProps): React.JSX.Element;
33
+ export { SignalDots, SignalStrip };
34
+ //# sourceMappingURL=signal-strip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signal-strip.d.ts","sourceRoot":"","sources":["../../../src/components/signal-strip/signal-strip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAC5B,UAAU,CACX;IACC,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAA;IACb,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,8EAA8E;AAC9E,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,GAAO,EACP,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,eAAe,qBAuBjB;AAED,MAAM,WAAW,eAAe;IAC9B,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2DAA2D;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,sEAAsE;IACtE,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAC1B,UAAU,CACX;IACC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAA;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;CACzC;AAED,oEAAoE;AACpE,iBAAS,WAAW,CAAC,EACnB,KAAK,EACL,MAAiB,EACjB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,qBA6FlB;AAED,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,84 @@
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/signal-strip/signal-strip.tsx
5
+ function r({ value: n, max: r = 5, className: i, "aria-label": a, ...o }) {
6
+ let s = Math.max(0, Math.min(r, Math.round(n)));
7
+ return /* @__PURE__ */ t("span", {
8
+ "data-slot": "signal-dots",
9
+ role: "img",
10
+ "aria-label": a ?? `${s} of ${r}`,
11
+ className: e("flex items-center gap-[3px]", i),
12
+ ...o,
13
+ children: Array.from({ length: r }, (n, r) => /* @__PURE__ */ t("span", {
14
+ "data-slot": "signal-dot",
15
+ "data-filled": r < s ? "" : void 0,
16
+ className: e("size-1.5 rounded-full", r < s ? "bg-primary" : "bg-surface-muted")
17
+ }, r))
18
+ });
19
+ }
20
+ function i({ items: i, layout: a = "inline", className: o, ...s }) {
21
+ let c = (e) => e.value == null ? null : /* @__PURE__ */ t(r, {
22
+ value: e.value,
23
+ max: e.max,
24
+ "aria-label": e.dotsLabel
25
+ });
26
+ return a === "detail" ? /* @__PURE__ */ t("dl", {
27
+ "data-slot": "signal-strip",
28
+ "data-layout": a,
29
+ className: e("flex flex-col gap-3", o),
30
+ ...s,
31
+ children: i.map((e, r) => /* @__PURE__ */ n("div", {
32
+ "data-slot": "signal-strip-item",
33
+ className: "grid grid-cols-[96px_minmax(0,1fr)] gap-x-3",
34
+ children: [/* @__PURE__ */ t("dt", {
35
+ className: "type-meta pt-0.5 text-muted-foreground",
36
+ children: e.label
37
+ }), /* @__PURE__ */ n("dd", {
38
+ className: "min-w-0",
39
+ children: [/* @__PURE__ */ n("p", {
40
+ className: "type-body flex items-center gap-2",
41
+ children: [c(e), e.note]
42
+ }), e.description ? /* @__PURE__ */ t("p", {
43
+ className: "type-meta mt-0.5 text-muted-foreground",
44
+ children: e.description
45
+ }) : null]
46
+ })]
47
+ }, r))
48
+ }) : a === "stacked" ? /* @__PURE__ */ t("dl", {
49
+ "data-slot": "signal-strip",
50
+ "data-layout": a,
51
+ className: e("type-meta grid grid-cols-[max-content_max-content_minmax(0,1fr)] items-center gap-x-2 gap-y-1 text-muted-foreground", o),
52
+ ...s,
53
+ children: i.map((e, r) => /* @__PURE__ */ n("div", {
54
+ "data-slot": "signal-strip-item",
55
+ className: "contents",
56
+ children: [
57
+ /* @__PURE__ */ t("dt", { children: e.label }),
58
+ /* @__PURE__ */ t("dd", { children: c(e) }),
59
+ /* @__PURE__ */ t("dd", {
60
+ className: "truncate text-foreground",
61
+ children: e.note
62
+ })
63
+ ]
64
+ }, r))
65
+ }) : /* @__PURE__ */ t("dl", {
66
+ "data-slot": "signal-strip",
67
+ "data-layout": a,
68
+ className: e("type-meta flex flex-wrap gap-x-5 gap-y-1.5 text-muted-foreground", o),
69
+ ...s,
70
+ children: i.map((e, r) => /* @__PURE__ */ n("div", {
71
+ "data-slot": "signal-strip-item",
72
+ className: "flex items-center gap-1.5",
73
+ children: [/* @__PURE__ */ t("dt", { children: e.label }), /* @__PURE__ */ n("dd", {
74
+ className: "flex items-center gap-1.5 text-foreground",
75
+ children: [c(e), e.note ? /* @__PURE__ */ t("span", {
76
+ className: "font-normal",
77
+ children: e.note
78
+ }) : null]
79
+ })]
80
+ }, r))
81
+ });
82
+ }
83
+ //#endregion
84
+ export { r as SignalDots, i as SignalStrip };
@@ -0,0 +1,2 @@
1
+ export * from './source-avatar';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/source-avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { PlatformAvatarProps } from '../platform-avatar/platform-avatar';
2
+ type SourceAvatarProps = Omit<PlatformAvatarProps, 'fit'> & {
3
+ /**
4
+ * `photo` for a person or account (a round photo, or their initial); `logo` for a
5
+ * company or site mark, inset on the card surface with a hairline ring.
6
+ */
7
+ variant?: 'photo' | 'logo';
8
+ };
9
+ /**
10
+ * Who an item came from, as a small face beside its meta line: an account's photo,
11
+ * a company's logo, or an initial when there is neither. Built on PlatformAvatar,
12
+ * so it can also carry the platform it came from.
13
+ */
14
+ declare function SourceAvatar({ variant, size, className, ...props }: SourceAvatarProps): import("react").JSX.Element;
15
+ export { SourceAvatar, type SourceAvatarProps };
16
+ //# sourceMappingURL=source-avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-avatar.d.ts","sourceRoot":"","sources":["../../../src/components/source-avatar/source-avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,oCAAoC,CAAA;AAE3C,KAAK,iBAAiB,GAAG,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,GAAG;IAC1D;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CAC3B,CAAA;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,EACpB,OAAiB,EACjB,IAAS,EACT,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAUnB;AAED,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { PlatformAvatar as t } from "../platform-avatar/platform-avatar.js";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ //#region src/components/source-avatar/source-avatar.tsx
5
+ function r({ variant: r = "photo", size: i = 20, className: a, ...o }) {
6
+ return /* @__PURE__ */ n(t, {
7
+ "data-source-variant": r,
8
+ size: i,
9
+ fit: r === "logo" ? "contain" : "cover",
10
+ className: e(a),
11
+ ...o
12
+ });
13
+ }
14
+ //#endregion
15
+ export { r as SourceAvatar };
@@ -0,0 +1,2 @@
1
+ export * from './stacked-bar-chart';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/stacked-bar-chart/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1,80 @@
1
+ import * as React from 'react';
2
+ export interface StackedBarChartSeries {
3
+ /** The key of this series in each datum's `values`. */
4
+ key: string;
5
+ /** The series' name, on its toggle and in the tooltip. */
6
+ label: string;
7
+ /** Any CSS color, such as `var(--area-social)`. Its 12% tint fills the pressed toggle. */
8
+ color: string;
9
+ /**
10
+ * The pressed toggle's text color, for a `color` under 4.5:1 on its own
11
+ * tint, such as `var(--area-social-foreground)`. Defaults to `color`.
12
+ */
13
+ foreground?: string;
14
+ /**
15
+ * The pressed toggle's background, such as `var(--area-social-soft)`.
16
+ * Defaults to a 12% tint of `color`.
17
+ */
18
+ tint?: string;
19
+ /** A small mark on the series' toggle. */
20
+ icon?: React.ReactNode;
21
+ }
22
+ export interface StackedBarChartDatum {
23
+ /** The axis label, such as "Nov 3". */
24
+ label: string;
25
+ /** The tooltip's heading. Defaults to `label`. */
26
+ tooltipLabel?: React.ReactNode;
27
+ /** Draws the day's bars faded, for a count still coming in. */
28
+ partial?: boolean;
29
+ /** One number per series key. Null, or a missing key, means no count that day. */
30
+ values: Readonly<Partial<Record<string, number | null>>>;
31
+ }
32
+ export interface StackedBarChartMetric {
33
+ /** The metric's id, used by `metric` and `onMetricChange`. */
34
+ value: string;
35
+ /** The metric's name on the switch, such as "Followers". */
36
+ label: React.ReactNode;
37
+ /** The chart's title while this metric shows. Falls back to the chart's `title`. */
38
+ title?: React.ReactNode;
39
+ /** The chart's accessible name while this metric shows. */
40
+ ariaLabel?: string;
41
+ data: readonly StackedBarChartDatum[];
42
+ /** Formats a value in the tooltip. */
43
+ formatValue?: (value: number) => string;
44
+ /** Formats a y-axis tick. */
45
+ formatTick?: (value: number) => string;
46
+ }
47
+ export interface StackedBarChartProps extends Omit<React.ComponentProps<'div'>, 'children' | 'title'> {
48
+ series: readonly StackedBarChartSeries[];
49
+ /** One or more metrics on the same days. Two or more show a switch. */
50
+ metrics: readonly StackedBarChartMetric[];
51
+ title?: React.ReactNode;
52
+ metric?: string;
53
+ defaultMetric?: string;
54
+ onMetricChange?: (metric: string) => void;
55
+ /** Keys of the series switched off. */
56
+ hiddenSeries?: readonly string[];
57
+ defaultHiddenSeries?: readonly string[];
58
+ onHiddenSeriesChange?: (keys: string[]) => void;
59
+ /**
60
+ * `section` is a page section: a section title, the switches, then a tall
61
+ * chart. `card` is a bordered card with a small title, a shorter chart with
62
+ * thin bars, and the switches under it.
63
+ */
64
+ variant?: 'section' | 'card';
65
+ /** The plot's height in pixels. Defaults to 300 for a section, 220 for a card. */
66
+ height?: number;
67
+ /**
68
+ * Label every nth day, counted back from the last. Defaults to every day for
69
+ * ten days or fewer, otherwise every seventh.
70
+ */
71
+ labelEvery?: number;
72
+ }
73
+ /**
74
+ * Bars per day, stacked by series, on Blaze UI's Chart. Gains stack up from
75
+ * zero and losses down from it. Series switch on and off from their toggles,
76
+ * and a metric switch changes what the bars count.
77
+ */
78
+ declare function StackedBarChart({ series, metrics, title, metric: metricProp, defaultMetric, onMetricChange, hiddenSeries: hiddenProp, defaultHiddenSeries, onHiddenSeriesChange, variant, height, labelEvery, className, ...props }: StackedBarChartProps): React.JSX.Element;
79
+ export { StackedBarChart };
80
+ //# sourceMappingURL=stacked-bar-chart.d.ts.map
@@ -0,0 +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;AA4CD;;;;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,qBAqRtB;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}