@almanaclabs/blaze-ui 0.22.0 → 0.23.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/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/app-shell/app-shell.js +4 -3
- package/dist/components/post-card/index.d.ts +2 -0
- package/dist/components/post-card/index.d.ts.map +1 -0
- package/dist/components/post-card/post-card.d.ts +67 -0
- package/dist/components/post-card/post-card.d.ts.map +1 -0
- package/dist/components/post-card/post-card.js +335 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -22
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../../src/components/app-shell/app-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA8B9B,2GAA2G;AAC3G,QAAA,MAAM,yBAAyB,MAAM,CAAA;AACrC,QAAA,MAAM,qBAAqB,MAAM,CAAA;AACjC,QAAA,MAAM,qBAAqB,MAAM,CAAA;AACjC,+BAA+B;AAC/B,QAAA,MAAM,sBAAsB,KAAK,CAAA;AAiDjC,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACjD,oEAAoE;IACpE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gEAAgE;IAChE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,wCAAwC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,qDAAqD;IACrD,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAClC,CAAA;AAED;;;;;;GAMG;AACH,iBAAS,QAAQ,CAAC,EAChB,OAAO,EACP,MAAM,EACN,aAAa,EACb,mBAA+C,EAC/C,uBAA+B,EAC/B,iBAA2C,EAC3C,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../../src/components/app-shell/app-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA8B9B,2GAA2G;AAC3G,QAAA,MAAM,yBAAyB,MAAM,CAAA;AACrC,QAAA,MAAM,qBAAqB,MAAM,CAAA;AACjC,QAAA,MAAM,qBAAqB,MAAM,CAAA;AACjC,+BAA+B;AAC/B,QAAA,MAAM,sBAAsB,KAAK,CAAA;AAiDjC,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACjD,oEAAoE;IACpE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gEAAgE;IAChE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,wCAAwC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,qDAAqD;IACrD,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAClC,CAAA;AAED;;;;;;GAMG;AACH,iBAAS,QAAQ,CAAC,EAChB,OAAO,EACP,MAAM,EACN,aAAa,EACb,mBAA+C,EAC/C,uBAA+B,EAC/B,iBAA2C,EAC3C,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,aAAa,qBAuEf;AAsID,KAAK,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IACrD,iEAAiE;IACjE,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACtB,CAAA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ell-top-bar-placeholder" }),
|
|
67
67
|
/* @__PURE__ */ y("main", {
|
|
68
68
|
"data-slot": "app-shell-main",
|
|
69
|
-
|
|
69
|
+
tabIndex: -1,
|
|
70
|
+
className: e("relative min-w-0 rounded-2xl bg-card shadow-[0_1px_2px_rgb(0_0_0/0.04),0_6px_20px_rgb(0_0_0/0.07)] outline-none", r),
|
|
70
71
|
children: l
|
|
71
72
|
}),
|
|
72
73
|
t ? /* @__PURE__ */ y(I, {
|
|
@@ -278,14 +279,14 @@ function G({ workspace: t, newItem: n, sections: r, bottomItems: i, activeId: a,
|
|
|
278
279
|
return /* @__PURE__ */ y("aside", {
|
|
279
280
|
"data-slot": "app-sidebar",
|
|
280
281
|
"data-state": m ? "collapsed" : "expanded",
|
|
281
|
-
className: e("group/app-sidebar sticky top-0 row-span-2 flex h-screen min-w-0 flex-col self-start overflow-x-hidden overflow-y-auto
|
|
282
|
+
className: e("group/app-sidebar sticky top-0 row-span-2 flex h-screen min-w-0 flex-col self-start overflow-x-hidden overflow-y-auto pb-3", u),
|
|
282
283
|
...d,
|
|
283
284
|
children: /* @__PURE__ */ b(U.Provider, {
|
|
284
285
|
value: m,
|
|
285
286
|
children: [
|
|
286
287
|
/* @__PURE__ */ b("div", {
|
|
287
288
|
"data-slot": "app-sidebar-header",
|
|
288
|
-
className: e("
|
|
289
|
+
className: e("flex h-14 flex-none items-center gap-1", m && "group/app-sidebar-header relative"),
|
|
289
290
|
children: [/* @__PURE__ */ y("div", {
|
|
290
291
|
className: "w-full min-w-0 flex-1",
|
|
291
292
|
children: t
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-card/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type PostCardListProps = React.ComponentProps<'ol'> & {
|
|
3
|
+
/**
|
|
4
|
+
* Called when the owner drags a post or moves it with the keyboard, with
|
|
5
|
+
* 0-based indexes: where it was and where it now goes. The caller reorders
|
|
6
|
+
* its posts; each `PostCard` needs `position`. Without it, no handles show.
|
|
7
|
+
*/
|
|
8
|
+
onReorder?: (from: number, to: number) => void;
|
|
9
|
+
};
|
|
10
|
+
/** A thread's posts, in order, joined by a connector line. Holds `PostCard`s. */
|
|
11
|
+
declare function PostCardList({ onReorder, className, children, ...props }: PostCardListProps): React.JSX.Element;
|
|
12
|
+
type PostCardProps = Omit<React.HTMLAttributes<HTMLElement>, 'children'> & {
|
|
13
|
+
/** Who it posts as. `avatar` takes your own avatar, such as a `PlatformAvatar`; otherwise `avatarSrc` with initials. */
|
|
14
|
+
author: {
|
|
15
|
+
name: string;
|
|
16
|
+
handle?: string;
|
|
17
|
+
avatar?: React.ReactNode;
|
|
18
|
+
avatarSrc?: string;
|
|
19
|
+
};
|
|
20
|
+
/** The post's text, edited in place by the card. Leave it out and pass your own editor as `children`. */
|
|
21
|
+
text?: string;
|
|
22
|
+
/** Called with the new text when the owner edits `text` in place and leaves the field. Without it the text is read-only. */
|
|
23
|
+
onSave?: (text: string) => void;
|
|
24
|
+
/** Your own editor for the post's text, set as post copy with no padding. Replaces the built-in `text` editing. */
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/** The count and limit when you bring your own editor. Overrides the count of `text` and `limit`. */
|
|
27
|
+
length?: {
|
|
28
|
+
count: number;
|
|
29
|
+
limit: number;
|
|
30
|
+
};
|
|
31
|
+
/** Blaze is rewriting this post: the text dims, and editing, the actions and the handle are off. */
|
|
32
|
+
busy?: boolean;
|
|
33
|
+
/** The platform's character limit. */
|
|
34
|
+
limit?: number;
|
|
35
|
+
/** At rest, the count ring shows from this many characters; while editing it always shows. Defaults to 30 under the limit. */
|
|
36
|
+
countFrom?: number;
|
|
37
|
+
/** Images or other media under the text. */
|
|
38
|
+
media?: React.ReactNode;
|
|
39
|
+
/** Where the post sits in its thread, 1-based. Shows "2/5" with the actions when there is more than one, and names the reorder handle. */
|
|
40
|
+
position?: {
|
|
41
|
+
index: number;
|
|
42
|
+
total: number;
|
|
43
|
+
};
|
|
44
|
+
/** Adds a post after this one. Shows the + action. */
|
|
45
|
+
onInsertBelow?: () => void;
|
|
46
|
+
/** Adds an image straight away. Shows the image action, unless `imageMenu` gives it a menu instead. */
|
|
47
|
+
onAddImage?: () => void;
|
|
48
|
+
/** `DropdownMenuItem`s under the image action, such as "Upload" and "From Media". */
|
|
49
|
+
imageMenu?: React.ReactNode;
|
|
50
|
+
/** `DropdownMenuItem`s under the sparkle action: what Blaze can do to this post. */
|
|
51
|
+
assistMenu?: React.ReactNode;
|
|
52
|
+
/** `DropdownMenuItem`s under the ⋯ action. In a reorderable list, Move up and Move down follow them. */
|
|
53
|
+
moreMenu?: React.ReactNode;
|
|
54
|
+
/** Draw the thread line down to the next post. */
|
|
55
|
+
connector?: boolean;
|
|
56
|
+
/** The text field's accessible name. Defaults to "Post 2" from `position`, or "Post". */
|
|
57
|
+
textLabel?: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* One post, clean at rest: who it posts as, the text and any media, with a
|
|
61
|
+
* faint ring only near the limit. The text edits in place, or in your own
|
|
62
|
+
* editor as `children`. Its actions, place ("2/5") and drag handle fade in on
|
|
63
|
+
* hover or focus (ADR 0034).
|
|
64
|
+
*/
|
|
65
|
+
declare function PostCard({ author, text, onSave, children, length, busy, limit: textLimit, countFrom, media, position, onInsertBelow, onAddImage, imageMenu, assistMenu, moreMenu, connector, textLabel, className, ...props }: PostCardProps): React.JSX.Element;
|
|
66
|
+
export { PostCard, PostCardList, type PostCardListProps, type PostCardProps };
|
|
67
|
+
//# sourceMappingURL=post-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-card.d.ts","sourceRoot":"","sources":["../../../src/components/post-card/post-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgC9B,KAAK,i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tD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uGAAuG;IACvG,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,qFAAqF;IACrF,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,oFAAoF;IACpF,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,wGAAwG;IACxG,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAOD;;;;;GAKG;AACH,iBAAS,QAAQ,CAAC,EAChB,MAAM,EACN,IAAS,EACT,MAAM,EACN,QAAQ,EACR,MAAM,EACN,IAAY,EACZ,KAAK,EAAE,SAAe,EACtB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,SAAS,EACT,UAAU,EACV,QAAQ,EACR,SAAiB,EACjB,SAAS,EACT,SAAS,EACT,GAAG,KAAK,EACT,EAAE,aAAa,qBAsVf;AAiHD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import { DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuSeparator as a, DropdownMenuTrigger as o } from "../dropdown-menu/dropdown-menu.js";
|
|
4
|
+
import { Avatar as s, AvatarFallback as c, AvatarImage as ee } from "../avatar/avatar.js";
|
|
5
|
+
import * as l from "react";
|
|
6
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
|
+
import { IconDots as te, IconGripVertical as ne, IconPhoto as p, IconPlus as re, IconSparkles as ie } from "@tabler/icons-react";
|
|
8
|
+
//#region src/components/post-card/post-card.tsx
|
|
9
|
+
var m = l.createContext(null);
|
|
10
|
+
function h({ onReorder: t, className: n, children: r, ...i }) {
|
|
11
|
+
let [a, o] = l.useState(""), s = l.useRef(null), c = l.useMemo(() => ({
|
|
12
|
+
reorder: t,
|
|
13
|
+
announce: o,
|
|
14
|
+
dragging: s
|
|
15
|
+
}), [t]);
|
|
16
|
+
return /* @__PURE__ */ f(m.Provider, {
|
|
17
|
+
value: c,
|
|
18
|
+
children: [/* @__PURE__ */ d("ol", {
|
|
19
|
+
"data-slot": "post-card-list",
|
|
20
|
+
className: e("m-0 flex list-none flex-col rounded-2xl bg-card p-0 shadow-[0_0_0_1px_var(--border),0_2px_4px_rgb(0_0_0/0.04)]", n),
|
|
21
|
+
...i,
|
|
22
|
+
children: r
|
|
23
|
+
}), /* @__PURE__ */ d("span", {
|
|
24
|
+
role: "status",
|
|
25
|
+
className: "sr-only",
|
|
26
|
+
children: a
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
var g = "opacity-0 transition-opacity group-hover/post:opacity-100 group-focus-within/post:opacity-100 group-has-[[data-popup-open]]/post:opacity-100 pointer-coarse:opacity-100";
|
|
31
|
+
function _({ author: t, text: n = "", onSave: r, children: o, length: h, busy: _ = !1, limit: oe = 280, countFrom: b, media: x, position: S, onInsertBelow: C, onAddImage: w, imageMenu: T, assistMenu: E, moreMenu: D, connector: se = !1, textLabel: ce, className: le, ...ue }) {
|
|
32
|
+
let O = l.useContext(m), k = ce ?? (S ? `Post ${S.index}` : "Post"), [A, j] = l.useState(!1), [M, N] = l.useState(n), [P, F] = l.useState("idle"), [I, L] = l.useState(null), R = l.useRef(null), z = l.useRef(null), B = l.useRef(null), V = l.useRef(!1), H = l.useRef(!1), U = l.useId(), W = l.useId();
|
|
33
|
+
l.useEffect(() => {
|
|
34
|
+
A || N(n);
|
|
35
|
+
}, [n, A]), l.useEffect(() => {
|
|
36
|
+
_ && j(!1);
|
|
37
|
+
}, [_]), l.useEffect(() => {
|
|
38
|
+
A || !H.current || (H.current = !1, B.current?.focus());
|
|
39
|
+
}, [A]), l.useEffect(() => {
|
|
40
|
+
if (P !== "armed") return;
|
|
41
|
+
let e = () => F((e) => e === "armed" ? "idle" : e);
|
|
42
|
+
return window.addEventListener("pointerup", e), window.addEventListener("pointercancel", e), () => {
|
|
43
|
+
window.removeEventListener("pointerup", e), window.removeEventListener("pointercancel", e);
|
|
44
|
+
};
|
|
45
|
+
}, [P]), l.useLayoutEffect(() => {
|
|
46
|
+
let e = R.current;
|
|
47
|
+
!A || !e || (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
48
|
+
}, [A, M]), l.useEffect(() => {
|
|
49
|
+
V.current && (V.current = !1, z.current?.focus());
|
|
50
|
+
}, [S?.index]);
|
|
51
|
+
let G = h?.limit ?? oe, K = h?.count ?? (A ? M.length : n.length), q = A || K > G || K >= (b ?? G - 30), de = () => {
|
|
52
|
+
j(!1);
|
|
53
|
+
let e = M.trim();
|
|
54
|
+
e === n ? N(n) : r?.(e);
|
|
55
|
+
}, fe = t.name.trim().slice(0, 1).toUpperCase(), J = O?.reorder && S && !_ ? O.reorder : void 0, Y = (S?.index ?? 1) - 1, X = S?.total ?? 1, Z = (e, t) => {
|
|
56
|
+
!J || e < 0 || e >= X || e === Y || (V.current = t, J(Y, e), O?.announce(`${k} moved to ${e + 1} of ${X}.`));
|
|
57
|
+
}, pe = (e) => {
|
|
58
|
+
let t = O?.dragging.current;
|
|
59
|
+
if (t == null) return null;
|
|
60
|
+
let n = e === "after" ? Y + 1 : Y;
|
|
61
|
+
return n > t ? n - 1 : n;
|
|
62
|
+
}, me = O ? "li" : "div", Q = !!(S && X > 1), $ = !!(C || w || T || E || D || J);
|
|
63
|
+
return /* @__PURE__ */ f(me, {
|
|
64
|
+
"data-slot": "post-card",
|
|
65
|
+
"aria-busy": _ || void 0,
|
|
66
|
+
"data-dragging": P === "dragging" ? "" : void 0,
|
|
67
|
+
"data-drop": I ?? void 0,
|
|
68
|
+
draggable: P !== "idle",
|
|
69
|
+
onDragStart: (e) => {
|
|
70
|
+
P === "idle" || !O || (O.dragging.current = Y, e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", k), F("dragging"));
|
|
71
|
+
},
|
|
72
|
+
onDragEnd: () => {
|
|
73
|
+
O && (O.dragging.current = null), F("idle");
|
|
74
|
+
},
|
|
75
|
+
onDragOver: (e) => {
|
|
76
|
+
if (O?.dragging.current == null || !J) return;
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
let t = e.currentTarget.getBoundingClientRect();
|
|
79
|
+
L(e.clientY < t.top + t.height / 2 ? "before" : "after");
|
|
80
|
+
},
|
|
81
|
+
onDragLeave: () => L(null),
|
|
82
|
+
onDrop: (e) => {
|
|
83
|
+
if (!I) return;
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
let t = O?.dragging.current, n = pe(I);
|
|
86
|
+
L(null), t != null && n != null && n !== t && (J?.(t, n), O?.announce(`Post ${t + 1} moved to ${n + 1} of ${X}.`));
|
|
87
|
+
},
|
|
88
|
+
className: e("group/post relative flex gap-2.5 px-4 pt-3 pb-1 pl-6", "data-[drop=after]:after:absolute data-[drop=after]:after:inset-x-4 data-[drop=after]:after:-bottom-px data-[drop=after]:after:h-0.5 data-[drop=after]:after:rounded-full data-[drop=after]:after:bg-primary data-[drop=before]:before:absolute data-[drop=before]:before:inset-x-4 data-[drop=before]:before:-top-px data-[drop=before]:before:h-0.5 data-[drop=before]:before:rounded-full data-[drop=before]:before:bg-primary", "data-dragging:opacity-50", le),
|
|
89
|
+
...ue,
|
|
90
|
+
children: [
|
|
91
|
+
J ? /* @__PURE__ */ f("button", {
|
|
92
|
+
ref: z,
|
|
93
|
+
type: "button",
|
|
94
|
+
"data-slot": "post-card-handle",
|
|
95
|
+
"aria-label": `Reorder ${k}, ${S.index} of ${X}`,
|
|
96
|
+
"aria-describedby": U,
|
|
97
|
+
onPointerDown: () => F("armed"),
|
|
98
|
+
onKeyDown: (e) => {
|
|
99
|
+
if (e.key === "ArrowUp") Z(Y - 1, !0);
|
|
100
|
+
else if (e.key === "ArrowDown") Z(Y + 1, !0);
|
|
101
|
+
else return;
|
|
102
|
+
e.preventDefault();
|
|
103
|
+
},
|
|
104
|
+
className: e("absolute top-4 left-0.5 flex h-7 w-5 cursor-grab touch-none items-center justify-center rounded-sm text-foreground-tertiary outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:cursor-grabbing", g),
|
|
105
|
+
children: [/* @__PURE__ */ d(ne, {
|
|
106
|
+
"aria-hidden": "true",
|
|
107
|
+
className: "size-4"
|
|
108
|
+
}), /* @__PURE__ */ d("span", {
|
|
109
|
+
id: U,
|
|
110
|
+
className: "sr-only",
|
|
111
|
+
children: "Drag, or use the up and down arrow keys, to move it."
|
|
112
|
+
})]
|
|
113
|
+
}) : null,
|
|
114
|
+
/* @__PURE__ */ f("span", {
|
|
115
|
+
className: "flex w-10 flex-none flex-col items-center",
|
|
116
|
+
children: [t.avatar ?? /* @__PURE__ */ f(s, {
|
|
117
|
+
size: "lg",
|
|
118
|
+
children: [t.avatarSrc ? /* @__PURE__ */ d(ee, {
|
|
119
|
+
src: t.avatarSrc,
|
|
120
|
+
alt: ""
|
|
121
|
+
}) : null, /* @__PURE__ */ d(c, { children: fe })]
|
|
122
|
+
}), se ? /* @__PURE__ */ d("span", {
|
|
123
|
+
"aria-hidden": "true",
|
|
124
|
+
className: "mt-1 w-0.5 flex-1 rounded-full bg-border"
|
|
125
|
+
}) : null]
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ f("div", {
|
|
128
|
+
className: "flex min-w-0 flex-1 flex-col pb-2",
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ f("div", {
|
|
131
|
+
className: "type-body flex items-center gap-1",
|
|
132
|
+
children: [/* @__PURE__ */ d("span", {
|
|
133
|
+
className: "truncate font-medium",
|
|
134
|
+
children: t.name
|
|
135
|
+
}), t.handle ? /* @__PURE__ */ d("span", {
|
|
136
|
+
className: "truncate text-muted-foreground",
|
|
137
|
+
children: t.handle
|
|
138
|
+
}) : null]
|
|
139
|
+
}),
|
|
140
|
+
o == null ? A ? /* @__PURE__ */ d("textarea", {
|
|
141
|
+
ref: R,
|
|
142
|
+
"aria-label": k,
|
|
143
|
+
autoFocus: !0,
|
|
144
|
+
value: M,
|
|
145
|
+
onChange: (e) => N(e.target.value),
|
|
146
|
+
onFocus: (e) => {
|
|
147
|
+
let t = e.currentTarget.value.length;
|
|
148
|
+
e.currentTarget.setSelectionRange(t, t);
|
|
149
|
+
},
|
|
150
|
+
onBlur: de,
|
|
151
|
+
onKeyDown: (e) => {
|
|
152
|
+
e.key === "Escape" && (H.current = !0, N(n), j(!1));
|
|
153
|
+
},
|
|
154
|
+
className: "type-content -mx-1 mt-0.5 block w-full resize-none rounded-md bg-muted p-1 text-foreground outline-none focus-visible:ring-3 focus-visible:ring-ring/50"
|
|
155
|
+
}) : r && !_ ? /* @__PURE__ */ f("button", {
|
|
156
|
+
ref: B,
|
|
157
|
+
type: "button",
|
|
158
|
+
"data-slot": "post-card-text",
|
|
159
|
+
"aria-describedby": W,
|
|
160
|
+
onClick: () => j(!0),
|
|
161
|
+
className: "type-content -mx-1 mt-0.5 block w-full cursor-text rounded-md p-1 text-left whitespace-pre-wrap text-foreground [overflow-wrap:anywhere] outline-none hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
162
|
+
children: [n, /* @__PURE__ */ f("span", {
|
|
163
|
+
id: W,
|
|
164
|
+
"aria-hidden": "true",
|
|
165
|
+
className: "sr-only",
|
|
166
|
+
children: ["Edit ", k]
|
|
167
|
+
})]
|
|
168
|
+
}) : /* @__PURE__ */ d("p", {
|
|
169
|
+
"data-slot": "post-card-text",
|
|
170
|
+
className: e("type-content m-0 mt-0.5 p-1 -mx-1 whitespace-pre-wrap text-foreground transition-colors [overflow-wrap:anywhere]", _ && "text-muted-foreground"),
|
|
171
|
+
children: n
|
|
172
|
+
}) : /* @__PURE__ */ d("div", {
|
|
173
|
+
"data-slot": "post-card-text",
|
|
174
|
+
inert: _,
|
|
175
|
+
className: e("type-content mt-0.5 text-foreground transition-colors", _ && "text-muted-foreground"),
|
|
176
|
+
children: o
|
|
177
|
+
}),
|
|
178
|
+
x ? /* @__PURE__ */ d("div", {
|
|
179
|
+
className: "mt-2 flex flex-col gap-2",
|
|
180
|
+
children: x
|
|
181
|
+
}) : null,
|
|
182
|
+
$ || q || Q ? /* @__PURE__ */ f("div", {
|
|
183
|
+
className: "mt-1 flex min-h-8 items-center gap-1",
|
|
184
|
+
children: [
|
|
185
|
+
$ ? /* @__PURE__ */ f("div", {
|
|
186
|
+
role: "group",
|
|
187
|
+
"aria-label": `${k} actions`,
|
|
188
|
+
"data-slot": "post-card-actions",
|
|
189
|
+
className: e("-ml-1.5 flex items-center gap-0.5", g),
|
|
190
|
+
children: [
|
|
191
|
+
C ? /* @__PURE__ */ d(v, {
|
|
192
|
+
label: "Add a post below",
|
|
193
|
+
onClick: C,
|
|
194
|
+
disabled: _,
|
|
195
|
+
children: /* @__PURE__ */ d(re, { "aria-hidden": "true" })
|
|
196
|
+
}) : null,
|
|
197
|
+
T ? /* @__PURE__ */ d(y, {
|
|
198
|
+
label: "Add an image",
|
|
199
|
+
items: T,
|
|
200
|
+
disabled: _,
|
|
201
|
+
children: /* @__PURE__ */ d(p, { "aria-hidden": "true" })
|
|
202
|
+
}) : w ? /* @__PURE__ */ d(v, {
|
|
203
|
+
label: "Add an image",
|
|
204
|
+
onClick: w,
|
|
205
|
+
disabled: _,
|
|
206
|
+
children: /* @__PURE__ */ d(p, { "aria-hidden": "true" })
|
|
207
|
+
}) : null,
|
|
208
|
+
E ? /* @__PURE__ */ d(y, {
|
|
209
|
+
label: "Ask Blaze",
|
|
210
|
+
items: E,
|
|
211
|
+
disabled: _,
|
|
212
|
+
children: /* @__PURE__ */ d(ie, { "aria-hidden": "true" })
|
|
213
|
+
}) : null,
|
|
214
|
+
D || J ? /* @__PURE__ */ d(y, {
|
|
215
|
+
label: `More for ${k}`,
|
|
216
|
+
disabled: _,
|
|
217
|
+
items: /* @__PURE__ */ f(u, { children: [
|
|
218
|
+
D,
|
|
219
|
+
D && J ? /* @__PURE__ */ d(a, {}) : null,
|
|
220
|
+
J ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(i, {
|
|
221
|
+
disabled: Y === 0,
|
|
222
|
+
onClick: () => Z(Y - 1, !1),
|
|
223
|
+
children: "Move up"
|
|
224
|
+
}), /* @__PURE__ */ d(i, {
|
|
225
|
+
disabled: Y === X - 1,
|
|
226
|
+
onClick: () => Z(Y + 1, !1),
|
|
227
|
+
children: "Move down"
|
|
228
|
+
})] }) : null
|
|
229
|
+
] }),
|
|
230
|
+
children: /* @__PURE__ */ d(te, { "aria-hidden": "true" })
|
|
231
|
+
}) : null
|
|
232
|
+
]
|
|
233
|
+
}) : null,
|
|
234
|
+
Q ? /* @__PURE__ */ f("span", {
|
|
235
|
+
"data-slot": "post-card-position",
|
|
236
|
+
className: e("type-meta flex-none text-foreground-tertiary tabular-nums", g),
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ d("span", {
|
|
239
|
+
className: "sr-only",
|
|
240
|
+
children: "Post "
|
|
241
|
+
}),
|
|
242
|
+
S.index,
|
|
243
|
+
"/",
|
|
244
|
+
X
|
|
245
|
+
]
|
|
246
|
+
}) : null,
|
|
247
|
+
q ? /* @__PURE__ */ d(ae, {
|
|
248
|
+
count: K,
|
|
249
|
+
limit: G
|
|
250
|
+
}) : null
|
|
251
|
+
]
|
|
252
|
+
}) : null
|
|
253
|
+
]
|
|
254
|
+
})
|
|
255
|
+
]
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
function v({ label: e, children: n, ...r }) {
|
|
259
|
+
return /* @__PURE__ */ d(t, {
|
|
260
|
+
type: "button",
|
|
261
|
+
"aria-label": e,
|
|
262
|
+
title: e,
|
|
263
|
+
size: "icon-md",
|
|
264
|
+
variant: "tertiary",
|
|
265
|
+
...r,
|
|
266
|
+
children: n
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
function y({ label: e, items: i, disabled: a, children: s }) {
|
|
270
|
+
return /* @__PURE__ */ f(n, { children: [/* @__PURE__ */ d(o, {
|
|
271
|
+
render: /* @__PURE__ */ d(t, {
|
|
272
|
+
type: "button",
|
|
273
|
+
"aria-label": e,
|
|
274
|
+
title: e,
|
|
275
|
+
size: "icon-md",
|
|
276
|
+
variant: "tertiary",
|
|
277
|
+
disabled: a
|
|
278
|
+
}),
|
|
279
|
+
children: s
|
|
280
|
+
}), /* @__PURE__ */ d(r, {
|
|
281
|
+
align: "start",
|
|
282
|
+
children: i
|
|
283
|
+
})] });
|
|
284
|
+
}
|
|
285
|
+
function ae({ count: t, limit: n }) {
|
|
286
|
+
let r = n - t, i = r < 0 ? "text-destructive" : r <= 20 ? "text-warning" : "text-foreground-tertiary", a = 2 * Math.PI * 8, o = Math.min(t / n, 1);
|
|
287
|
+
return /* @__PURE__ */ f("span", {
|
|
288
|
+
"data-slot": "post-card-count",
|
|
289
|
+
"data-over": r < 0 ? "" : void 0,
|
|
290
|
+
className: e("type-meta ml-auto flex items-center gap-1.5", i),
|
|
291
|
+
children: [
|
|
292
|
+
/* @__PURE__ */ f("span", {
|
|
293
|
+
className: "sr-only",
|
|
294
|
+
children: [
|
|
295
|
+
t,
|
|
296
|
+
" of ",
|
|
297
|
+
n,
|
|
298
|
+
" characters"
|
|
299
|
+
]
|
|
300
|
+
}),
|
|
301
|
+
r <= 20 ? /* @__PURE__ */ d("span", {
|
|
302
|
+
"aria-hidden": "true",
|
|
303
|
+
className: "tabular-nums",
|
|
304
|
+
children: r
|
|
305
|
+
}) : null,
|
|
306
|
+
/* @__PURE__ */ f("svg", {
|
|
307
|
+
"aria-hidden": "true",
|
|
308
|
+
viewBox: "0 0 20 20",
|
|
309
|
+
width: "20",
|
|
310
|
+
height: "20",
|
|
311
|
+
className: "flex-none -rotate-90",
|
|
312
|
+
children: [/* @__PURE__ */ d("circle", {
|
|
313
|
+
cx: "10",
|
|
314
|
+
cy: "10",
|
|
315
|
+
r: 8,
|
|
316
|
+
fill: "none",
|
|
317
|
+
strokeWidth: "2",
|
|
318
|
+
className: "stroke-border"
|
|
319
|
+
}), /* @__PURE__ */ d("circle", {
|
|
320
|
+
cx: "10",
|
|
321
|
+
cy: "10",
|
|
322
|
+
r: 8,
|
|
323
|
+
fill: "none",
|
|
324
|
+
strokeWidth: "2",
|
|
325
|
+
strokeLinecap: "round",
|
|
326
|
+
strokeDasharray: a,
|
|
327
|
+
strokeDashoffset: a * (1 - o),
|
|
328
|
+
className: "stroke-current"
|
|
329
|
+
})]
|
|
330
|
+
})
|
|
331
|
+
]
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
//#endregion
|
|
335
|
+
export { _ as PostCard, h as PostCardList };
|
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export * from './components/pagination';
|
|
|
52
52
|
export * from './components/platform-avatar';
|
|
53
53
|
export * from './components/platform-icon';
|
|
54
54
|
export * from './components/popover';
|
|
55
|
+
export * from './components/post-card';
|
|
55
56
|
export * from './components/progress';
|
|
56
57
|
export * from './components/questionnaire';
|
|
57
58
|
export * from './components/radio-group';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EACX,cAAc,EACd,KAAK,WAAW,GACjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,IAAI,EACJ,UAAU,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,GACV,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAA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AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -63,25 +63,26 @@ import { PageHeader as Yi } from "./components/page-header/page-header.js";
|
|
|
63
63
|
import { Pagination as Xi, PaginationContent as Zi, PaginationEllipsis as Qi, PaginationItem as $i, PaginationLink as ea, PaginationNext as ta, PaginationPrevious as na } from "./components/pagination/pagination.js";
|
|
64
64
|
import { CHANNELS as ra, CHANNEL_COLOR as ia } from "./components/platform-icon/channel-color.js";
|
|
65
65
|
import { LetterMark as aa } from "./components/platform-icon/letter-mark.js";
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
|
|
66
|
+
import { PostCard as oa, PostCardList as sa } from "./components/post-card/post-card.js";
|
|
67
|
+
import { Questionnaire as ca, QuestionnaireActions as la, QuestionnaireChoice as ua, QuestionnaireChoiceDescription as da, QuestionnaireChoices as fa, QuestionnaireDescription as pa, QuestionnaireError as ma, QuestionnaireInput as ha, QuestionnaireItem as ga, QuestionnaireNext as _a, QuestionnairePrevious as va, QuestionnaireProgress as ya, QuestionnaireSkip as ba, QuestionnaireSubmit as xa, QuestionnaireTitle as Sa } from "./components/questionnaire/questionnaire.js";
|
|
68
|
+
import { RadioGroup as Ca, RadioGroupItem as wa } from "./components/radio-group/radio-group.js";
|
|
69
|
+
import { Rating as Ta } from "./components/rating/rating.js";
|
|
70
|
+
import { ScrollArea as Ea, ScrollBar as Da } from "./components/scroll-area/scroll-area.js";
|
|
71
|
+
import { SectionHeader as Oa } from "./components/section-header/section-header.js";
|
|
72
|
+
import { Select as ka, SelectContent as Aa, SelectGroup as ja, SelectItem as Ma, SelectLabel as Na, SelectScrollDownButton as Pa, SelectScrollUpButton as Fa, SelectSeparator as Ia, SelectTrigger as La, SelectValue as Ra } from "./components/select/select.js";
|
|
73
|
+
import { SignalDots as za, SignalStrip as Ba } from "./components/signal-strip/signal-strip.js";
|
|
74
|
+
import { Slider as Va } from "./components/slider/slider.js";
|
|
75
|
+
import { SourceAvatar as Ha } from "./components/source-avatar/source-avatar.js";
|
|
76
|
+
import { Sparkline as Ua } from "./components/sparkline/sparkline.js";
|
|
77
|
+
import { Spinner as Wa } from "./components/spinner/spinner.js";
|
|
78
|
+
import { StaleBanner as Ga, StateBanner as Ka, stateBannerVariants as qa } from "./components/state-banner/state-banner.js";
|
|
79
|
+
import { SuggestChips as Ja } from "./components/suggest-chips/suggest-chips.js";
|
|
80
|
+
import { Tabs as Ya, TabsContent as Xa, TabsList as Za, TabsTrigger as Qa, tabsListVariants as $a } from "./components/tabs/tabs.js";
|
|
81
|
+
import { Toggle as eo, toggleVariants as to } from "./components/toggle/toggle.js";
|
|
82
|
+
import { StackedBarChart as no } from "./components/stacked-bar-chart/stacked-bar-chart.js";
|
|
83
|
+
import { Switch as ro } from "./components/switch/switch.js";
|
|
84
|
+
import { Tag as io, TagList as ao } from "./components/tag/tag.js";
|
|
85
|
+
import { Toast as oo, ToastAction as so, ToastClose as co, ToastContent as lo, ToastDescription as uo, ToastPortal as fo, ToastProvider as po, ToastTitle as mo, ToastViewport as ho, Toaster as go, createToastManager as _o, toast as vo, useToastManager as yo } from "./components/toast/toast.js";
|
|
86
|
+
import { ToggleGroup as bo, ToggleGroupItem as xo } from "./components/toggle-group/toggle-group.js";
|
|
87
|
+
import { TurnSteps as So } from "./components/turn-steps/turn-steps.js";
|
|
88
|
+
export { He as APP_SIDEBAR_DEFAULT_WIDTH, Ue as APP_SIDEBAR_MAX_WIDTH, We as APP_SIDEBAR_MIN_WIDTH, Ge as APP_SIDEBAR_RAIL_WIDTH, w as Accordion, T as AccordionContent, E as AccordionItem, D as AccordionTrigger, O as Alert, k as AlertAction, A as AlertDescription, M as AlertDialog, N as AlertDialogAction, P as AlertDialogCancel, F as AlertDialogContent, I as AlertDialogDescription, L as AlertDialogFooter, R as AlertDialogHeader, z as AlertDialogMedia, B as AlertDialogOverlay, V as AlertDialogPortal, H as AlertDialogTitle, U as AlertDialogTrigger, j as AlertTitle, Ke as AppShell, qe as AppSidebar, Je as AppSidebarWorkspace, Ye as AppTopBar, Xe as ApprovalCard, Ze as AspectRatio, Qe as Attachment, $e as AttachmentAction, et as AttachmentActions, tt as AttachmentContent, nt as AttachmentDescription, rt as AttachmentGroup, it as AttachmentMedia, at as AttachmentTitle, ot as AttachmentTrigger, st as Avatar, ct as AvatarBadge, lt as AvatarFallback, ut as AvatarGroup, dt as AvatarGroupCount, ft as AvatarImage, pt as Badge, xr as BrandApple, Sr as BrandBeehiiv, Cr as BrandBing, wr as BrandBluesky, Tr as BrandChatgpt, Er as BrandEmail, Dr as BrandFacebook, Or as BrandGithub, kr as BrandGmail, Ar as BrandGodaddy, jr as BrandGoogle, Mr as BrandGoogleDocs, Nr as BrandInstagram, Pr as BrandLinkedin, Fr as BrandMeta, Ir as BrandMicrosoft, Lr as BrandOutlook, Rr as BrandPerplexity, zr as BrandPhone, Br as BrandReddit, Vr as BrandSearchConsole, Hr as BrandShopify, Ur as BrandSquarespace, Wr as BrandThreads, Gr as BrandTiktok, Kr as BrandWordpress, qr as BrandX, Jr as BrandYelp, Yr as BrandYoutube, Xr as BrandZapier, ht as Breadcrumb, gt as BreadcrumbEllipsis, _t as BreadcrumbItem, vt as BreadcrumbLink, yt as BreadcrumbList, bt as BreadcrumbPage, xt as BreadcrumbSeparator, St as Bubble, Ct as BubbleContent, wt as BubbleGroup, Tt as BubbleReactions, t as Button, Et as ButtonGroup, Dt as ButtonGroupSeparator, Ot as ButtonGroupText, n as ButtonLabel, ra as CHANNELS, ia as CHANNEL_COLOR, At as Calendar, jt as CalendarDayButton, i as Card, a as CardAction, o as CardContent, s as CardDescription, c as CardFooter, l as CardHeader, u as CardTitle, Mt as Carousel, Nt as CarouselContent, Pt as CarouselItem, Ft as CarouselNext, It as CarouselPrevious, Rt as ChartContainer, zt as ChartLegend, Bt as ChartLegendContent, Vt as ChartStyle, Ht as ChartTooltip, Ut as ChartTooltipContent, Wt as ChatBar, Gt as ChatBarAddButton, Kt as ChatBarAttachment, Jt as Checkbox, Yt as Collapsible, Xt as CollapsibleContent, Zt as CollapsibleTrigger, on as Combobox, sn as ComboboxChip, cn as ComboboxChips, ln as ComboboxChipsInput, un as ComboboxCollection, dn as ComboboxContent, fn as ComboboxEmpty, pn as ComboboxGroup, mn as ComboboxInput, hn as ComboboxItem, gn as ComboboxLabel, _n as ComboboxList, vn as ComboboxSeparator, yn as ComboboxTrigger, bn as ComboboxValue, wn as ConnectNotice, Nn as DataTable, Bn as DatePicker, Vn as DenseTable, Hn as DenseTableCell, Un as DenseTableRow, Gn as DetailList, Kn as DetailListItem, qn as Dialog, Jn as DialogClose, Yn as DialogContent, Xn as DialogDescription, Zn as DialogFooter, Qn as DialogHeader, $n as DialogOverlay, er as DialogPortal, tr as DialogTitle, nr as DialogTrigger, rr as Drawer, ir as DrawerClose, ar as DrawerContent, or as DrawerDescription, sr as DrawerFooter, cr as DrawerHeader, lr as DrawerOverlay, ur as DrawerPortal, dr as DrawerSwipeHandle, fr as DrawerTitle, pr as DrawerTrigger, W as DropdownMenu, G as DropdownMenuCheckboxItem, K as DropdownMenuContent, q as DropdownMenuGroup, J as DropdownMenuItem, Y as DropdownMenuLabel, X as DropdownMenuPortal, Z as DropdownMenuRadioGroup, Q as DropdownMenuRadioItem, $ as DropdownMenuSeparator, ee as DropdownMenuShortcut, te as DropdownMenuSub, ne as DropdownMenuSubContent, re as DropdownMenuSubTrigger, ie as DropdownMenuTrigger, mr as EditableText, hr as Empty, gr as EmptyContent, _r as EmptyDescription, vr as EmptyHeader, yr as EmptyMedia, br as EmptyTitle, ri as FaceStackButton, p as Field, m as FieldContent, h as FieldDescription, g as FieldError, _ as FieldGroup, v as FieldLabel, y as FieldLegend, b as FieldSeparator, x as FieldSet, S as FieldTitle, ii as FilterChips, ui as GoalCard, mi as HoverCard, hi as HoverCardContent, gi as HoverCardTrigger, _i as IdentityMark, vi as IdentityMarkImage, C as Input, $t as InputGroup, en as InputGroupAddon, tn as InputGroupButton, nn as InputGroupInput, rn as InputGroupText, an as InputGroupTextarea, yi as Item, bi as ItemActions, xi as ItemContent, Si as ItemDescription, Ci as ItemFooter, wi as ItemGroup, Ti as ItemHeader, Ei as ItemMedia, Di as ItemSeparator, Oi as ItemTitle, d as Label, aa as LetterMark, ki as Marker, Ai as MarkerContent, ji as MarkerIcon, Ni as MediaThumbnail, Fi as Message, Ii as MessageAvatar, Li as MessageContent, Ri as MessageFooter, zi as MessageGroup, Bi as MessageHeader, Vi as MetricOverview, Hi as MetricTile, Wi as NativeSelect, Gi as NativeSelectOptGroup, Ki as NativeSelectOption, qi as NavigationAction, Zr as PLATFORMS, Qr as PLATFORM_COLOR, $r as PLATFORM_ICON, ei as PLATFORM_LABEL, di as PaceBadge, fi as PaceMeter, Yi as PageHeader, Xi as Pagination, Zi as PaginationContent, Qi as PaginationEllipsis, $i as PaginationItem, ea as PaginationLink, ta as PaginationNext, na as PaginationPrevious, ni as PlatformAvatar, ti as PlatformIcon, Pn as Popover, Fn as PopoverContent, In as PopoverDescription, Ln as PopoverHeader, Rn as PopoverTitle, zn as PopoverTrigger, oa as PostCard, sa as PostCardList, ai as Progress, oi as ProgressIndicator, si as ProgressLabel, ci as ProgressTrack, li as ProgressValue, ca as Questionnaire, la as QuestionnaireActions, ua as QuestionnaireChoice, da as QuestionnaireChoiceDescription, fa as QuestionnaireChoices, pa as QuestionnaireDescription, ma as QuestionnaireError, ha as QuestionnaireInput, ga as QuestionnaireItem, _a as QuestionnaireNext, va as QuestionnairePrevious, ya as QuestionnaireProgress, ba as QuestionnaireSkip, xa as QuestionnaireSubmit, Sa as QuestionnaireTitle, Ca as RadioGroup, wa as RadioGroupItem, Ta as Rating, Ea as ScrollArea, Da as ScrollBar, Oa as SectionHeader, ka as Select, Aa as SelectContent, ja as SelectGroup, Ma as SelectItem, Na as SelectLabel, Pa as SelectScrollDownButton, Fa as SelectScrollUpButton, Ia as SelectSeparator, La as SelectTrigger, Ra as SelectValue, f as Separator, ae as Sheet, oe as SheetClose, se as SheetContent, ce as SheetDescription, le as SheetFooter, ue as SheetHeader, de as SheetTitle, fe as SheetTrigger, ve as Sidebar, ye as SidebarContent, be as SidebarFooter, xe as SidebarGroup, Se as SidebarGroupAction, Ce as SidebarGroupContent, we as SidebarGroupLabel, Te as SidebarHeader, Ee as SidebarInput, De as SidebarInset, Oe as SidebarMenu, ke as SidebarMenuAction, Ae as SidebarMenuBadge, je as SidebarMenuButton, Me as SidebarMenuItem, Ne as SidebarMenuSkeleton, Pe as SidebarMenuSub, Fe as SidebarMenuSubButton, Ie as SidebarMenuSubItem, Le as SidebarProvider, Re as SidebarRail, ze as SidebarSeparator, Be as SidebarTrigger, za as SignalDots, Ba as SignalStrip, pe as Skeleton, Va as Slider, Ha as SourceAvatar, Ua as Sparkline, Wa as Spinner, no as StackedBarChart, Ga as StaleBanner, Ka as StateBanner, Sn as StatusIndicator, Ja as SuggestChips, ro as Switch, Tn as Table, En as TableBody, Dn as TableCaption, On as TableCell, kn as TableFooter, An as TableHead, jn as TableHeader, Mn as TableRow, Ya as Tabs, Xa as TabsContent, Za as TabsList, Qa as TabsTrigger, io as Tag, ao as TagList, Qt as Textarea, oo as Toast, so as ToastAction, co as ToastClose, lo as ToastContent, uo as ToastDescription, fo as ToastPortal, po as ToastProvider, mo as ToastTitle, ho as ToastViewport, go as Toaster, eo as Toggle, bo as ToggleGroup, xo as ToggleGroupItem, me as Tooltip, he as TooltipContent, ge as TooltipProvider, _e as TooltipTrigger, So as TurnSteps, mt as badgeVariants, kt as buttonGroupVariants, r as buttonVariants, qt as chatBarFormVariants, e as cn, _o as createToastManager, Mi as markerVariants, Pi as mediaThumbnailVariants, Ui as metricTileVariants, Ji as navigationActionVariants, pi as paceStatusOf, Wn as sortDenseTableRows, qa as stateBannerVariants, Cn as statusDotVariants, $a as tabsListVariants, vo as toast, to as toggleVariants, Lt as useCarousel, xn as useComboboxAnchor, Ve as useSidebar, yo as useToastManager };
|