macbetter 0.0.0-stage → 0.1.0-beta.2
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/LICENSE +201 -0
- package/README.md +92 -2
- package/dist/components/accessory-tile.d.ts +50 -0
- package/dist/components/accessory-tile.js +46 -0
- package/dist/components/activity-indicator.d.ts +15 -0
- package/dist/components/activity-indicator.js +15 -0
- package/dist/components/alert.d.ts +29 -0
- package/dist/components/alert.js +30 -0
- package/dist/components/artifact-card.d.ts +41 -0
- package/dist/components/artifact-card.js +57 -0
- package/dist/components/artwork.d.ts +44 -0
- package/dist/components/artwork.js +935 -0
- package/dist/components/attachment.d.ts +48 -0
- package/dist/components/attachment.js +65 -0
- package/dist/components/automation-row.d.ts +24 -0
- package/dist/components/automation-row.js +12 -0
- package/dist/components/avatar.d.ts +33 -0
- package/dist/components/avatar.js +45 -0
- package/dist/components/badge.d.ts +24 -0
- package/dist/components/badge.js +19 -0
- package/dist/components/button.d.ts +20 -0
- package/dist/components/button.js +10 -0
- package/dist/components/calendar.d.ts +30 -0
- package/dist/components/calendar.js +47 -0
- package/dist/components/camera-view.d.ts +40 -0
- package/dist/components/camera-view.js +44 -0
- package/dist/components/card.d.ts +14 -0
- package/dist/components/card.js +21 -0
- package/dist/components/carousel.d.ts +18 -0
- package/dist/components/carousel.js +33 -0
- package/dist/components/chat.d.ts +29 -0
- package/dist/components/chat.js +29 -0
- package/dist/components/checkbox.d.ts +13 -0
- package/dist/components/checkbox.js +16 -0
- package/dist/components/code-block.d.ts +39 -0
- package/dist/components/code-block.js +65 -0
- package/dist/components/code-field.d.ts +16 -0
- package/dist/components/code-field.js +29 -0
- package/dist/components/color-well.d.ts +23 -0
- package/dist/components/color-well.js +27 -0
- package/dist/components/combo-box.d.ts +42 -0
- package/dist/components/combo-box.js +102 -0
- package/dist/components/command-palette.d.ts +33 -0
- package/dist/components/command-palette.js +55 -0
- package/dist/components/confirmation.d.ts +24 -0
- package/dist/components/confirmation.js +50 -0
- package/dist/components/content-unavailable.d.ts +19 -0
- package/dist/components/content-unavailable.js +21 -0
- package/dist/components/context-menu.d.ts +9 -0
- package/dist/components/context-menu.js +15 -0
- package/dist/components/date-picker.d.ts +53 -0
- package/dist/components/date-picker.js +86 -0
- package/dist/components/description-list.d.ts +18 -0
- package/dist/components/description-list.js +17 -0
- package/dist/components/device-frame.d.ts +18 -0
- package/dist/components/device-frame.js +16 -0
- package/dist/components/dialog.d.ts +27 -0
- package/dist/components/dialog.js +35 -0
- package/dist/components/disclosure.d.ts +32 -0
- package/dist/components/disclosure.js +35 -0
- package/dist/components/dock.d.ts +28 -0
- package/dist/components/dock.js +80 -0
- package/dist/components/door-control.d.ts +20 -0
- package/dist/components/door-control.js +43 -0
- package/dist/components/energy-readout.d.ts +32 -0
- package/dist/components/energy-readout.js +27 -0
- package/dist/components/field.d.ts +28 -0
- package/dist/components/field.js +32 -0
- package/dist/components/gauge.d.ts +25 -0
- package/dist/components/gauge.js +42 -0
- package/dist/components/generated-image.d.ts +39 -0
- package/dist/components/generated-image.js +47 -0
- package/dist/components/glass.d.ts +34 -0
- package/dist/components/glass.js +31 -0
- package/dist/components/home-backdrop.d.ts +23 -0
- package/dist/components/home-backdrop.js +12 -0
- package/dist/components/home-section.d.ts +19 -0
- package/dist/components/home-section.js +21 -0
- package/dist/components/home-status.d.ts +24 -0
- package/dist/components/home-status.js +14 -0
- package/dist/components/hover-card.d.ts +14 -0
- package/dist/components/hover-card.js +16 -0
- package/dist/components/inspector.d.ts +29 -0
- package/dist/components/inspector.js +40 -0
- package/dist/components/level-control.d.ts +19 -0
- package/dist/components/level-control.js +13 -0
- package/dist/components/light-color-picker.d.ts +33 -0
- package/dist/components/light-color-picker.js +56 -0
- package/dist/components/list.d.ts +42 -0
- package/dist/components/list.js +42 -0
- package/dist/components/listbox.d.ts +16 -0
- package/dist/components/listbox.js +28 -0
- package/dist/components/lock-control.d.ts +20 -0
- package/dist/components/lock-control.js +35 -0
- package/dist/components/menu-bar.d.ts +14 -0
- package/dist/components/menu-bar.js +16 -0
- package/dist/components/menu.d.ts +40 -0
- package/dist/components/menu.js +54 -0
- package/dist/components/message.d.ts +65 -0
- package/dist/components/message.js +69 -0
- package/dist/components/model-picker.d.ts +61 -0
- package/dist/components/model-picker.js +59 -0
- package/dist/components/navigation-bar.d.ts +24 -0
- package/dist/components/navigation-bar.js +54 -0
- package/dist/components/outline.d.ts +21 -0
- package/dist/components/outline.js +40 -0
- package/dist/components/page-control.d.ts +10 -0
- package/dist/components/page-control.js +8 -0
- package/dist/components/plan.d.ts +25 -0
- package/dist/components/plan.js +43 -0
- package/dist/components/popover.d.ts +16 -0
- package/dist/components/popover.js +24 -0
- package/dist/components/progress.d.ts +27 -0
- package/dist/components/progress.js +27 -0
- package/dist/components/prompt-input.d.ts +93 -0
- package/dist/components/prompt-input.js +172 -0
- package/dist/components/radio.d.ts +16 -0
- package/dist/components/radio.js +13 -0
- package/dist/components/rating.d.ts +10 -0
- package/dist/components/rating.js +12 -0
- package/dist/components/reasoning.d.ts +28 -0
- package/dist/components/reasoning.js +52 -0
- package/dist/components/response.d.ts +14 -0
- package/dist/components/response.js +14 -0
- package/dist/components/scene-tile.d.ts +22 -0
- package/dist/components/scene-tile.js +13 -0
- package/dist/components/scroll-view.d.ts +21 -0
- package/dist/components/scroll-view.js +13 -0
- package/dist/components/search-field.d.ts +16 -0
- package/dist/components/search-field.js +12 -0
- package/dist/components/secure-field.d.ts +23 -0
- package/dist/components/secure-field.js +21 -0
- package/dist/components/segmented-control.d.ts +12 -0
- package/dist/components/segmented-control.js +10 -0
- package/dist/components/select.d.ts +45 -0
- package/dist/components/select.js +79 -0
- package/dist/components/sensor-readout.d.ts +29 -0
- package/dist/components/sensor-readout.js +12 -0
- package/dist/components/separator.d.ts +14 -0
- package/dist/components/separator.js +11 -0
- package/dist/components/setup-code.d.ts +29 -0
- package/dist/components/setup-code.js +47 -0
- package/dist/components/sheet.d.ts +31 -0
- package/dist/components/sheet.js +51 -0
- package/dist/components/shimmer.d.ts +18 -0
- package/dist/components/shimmer.js +17 -0
- package/dist/components/sidebar.d.ts +30 -0
- package/dist/components/sidebar.js +26 -0
- package/dist/components/slider.d.ts +27 -0
- package/dist/components/slider.js +43 -0
- package/dist/components/sources.d.ts +51 -0
- package/dist/components/sources.js +46 -0
- package/dist/components/split-view.d.ts +11 -0
- package/dist/components/split-view.js +13 -0
- package/dist/components/squircle.d.ts +41 -0
- package/dist/components/squircle.js +63 -0
- package/dist/components/stepper.d.ts +30 -0
- package/dist/components/stepper.js +28 -0
- package/dist/components/suggestion.d.ts +23 -0
- package/dist/components/suggestion.js +29 -0
- package/dist/components/switch.d.ts +10 -0
- package/dist/components/switch.js +10 -0
- package/dist/components/tab-bar.d.ts +20 -0
- package/dist/components/tab-bar.js +17 -0
- package/dist/components/table.d.ts +49 -0
- package/dist/components/table.js +179 -0
- package/dist/components/tabs.d.ts +16 -0
- package/dist/components/tabs.js +19 -0
- package/dist/components/text-area.d.ts +14 -0
- package/dist/components/text-area.js +9 -0
- package/dist/components/text-field.d.ts +26 -0
- package/dist/components/text-field.js +23 -0
- package/dist/components/thermostat-control.d.ts +30 -0
- package/dist/components/thermostat-control.js +139 -0
- package/dist/components/toast.d.ts +30 -0
- package/dist/components/toast.js +114 -0
- package/dist/components/toggle.d.ts +21 -0
- package/dist/components/toggle.js +19 -0
- package/dist/components/token-field.d.ts +31 -0
- package/dist/components/token-field.js +78 -0
- package/dist/components/tool-call.d.ts +48 -0
- package/dist/components/tool-call.js +77 -0
- package/dist/components/toolbar.d.ts +27 -0
- package/dist/components/toolbar.js +39 -0
- package/dist/components/tooltip.d.ts +11 -0
- package/dist/components/tooltip.js +18 -0
- package/dist/components/window.d.ts +56 -0
- package/dist/components/window.js +61 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.js +98 -0
- package/dist/lib/agent-glyphs.d.ts +10 -0
- package/dist/lib/agent-glyphs.js +19 -0
- package/dist/lib/cx.d.ts +9 -0
- package/dist/lib/cx.js +14 -0
- package/dist/lib/derive.d.ts +53 -0
- package/dist/lib/derive.js +255 -0
- package/dist/lib/field-glyphs.d.ts +13 -0
- package/dist/lib/field-glyphs.js +28 -0
- package/dist/lib/menu-glyphs.d.ts +6 -0
- package/dist/lib/menu-glyphs.js +15 -0
- package/dist/lib/platform.d.ts +18 -0
- package/dist/lib/platform.js +17 -0
- package/dist/lib/squircle.d.ts +23 -0
- package/dist/lib/squircle.js +69 -0
- package/dist/lib/theme.d.ts +42 -0
- package/dist/lib/theme.js +62 -0
- package/dist/styles/base.css +115 -0
- package/dist/styles/components/accessory-tile.css +461 -0
- package/dist/styles/components/activity-indicator.css +63 -0
- package/dist/styles/components/alert.css +433 -0
- package/dist/styles/components/artifact-card.css +238 -0
- package/dist/styles/components/artwork.css +380 -0
- package/dist/styles/components/attachment.css +540 -0
- package/dist/styles/components/automation-row.css +52 -0
- package/dist/styles/components/avatar.css +230 -0
- package/dist/styles/components/badge.css +204 -0
- package/dist/styles/components/button.css +298 -0
- package/dist/styles/components/calendar.css +287 -0
- package/dist/styles/components/camera-view.css +239 -0
- package/dist/styles/components/card.css +100 -0
- package/dist/styles/components/carousel.css +210 -0
- package/dist/styles/components/chat.css +209 -0
- package/dist/styles/components/checkbox.css +212 -0
- package/dist/styles/components/code-block.css +162 -0
- package/dist/styles/components/code-field.css +163 -0
- package/dist/styles/components/color-well.css +452 -0
- package/dist/styles/components/combo-box.css +222 -0
- package/dist/styles/components/command-palette.css +379 -0
- package/dist/styles/components/confirmation.css +189 -0
- package/dist/styles/components/content-unavailable.css +105 -0
- package/dist/styles/components/context-menu.css +43 -0
- package/dist/styles/components/date-picker.css +356 -0
- package/dist/styles/components/description-list.css +92 -0
- package/dist/styles/components/device-frame.css +202 -0
- package/dist/styles/components/dialog.css +366 -0
- package/dist/styles/components/disclosure.css +197 -0
- package/dist/styles/components/dock.css +404 -0
- package/dist/styles/components/door-control.css +187 -0
- package/dist/styles/components/energy-readout.css +161 -0
- package/dist/styles/components/field.css +175 -0
- package/dist/styles/components/gauge.css +239 -0
- package/dist/styles/components/generated-image.css +248 -0
- package/dist/styles/components/glass.css +113 -0
- package/dist/styles/components/home-backdrop.css +81 -0
- package/dist/styles/components/home-section.css +100 -0
- package/dist/styles/components/home-status.css +215 -0
- package/dist/styles/components/hover-card.css +145 -0
- package/dist/styles/components/index.css +94 -0
- package/dist/styles/components/inspector.css +236 -0
- package/dist/styles/components/level-control.css +247 -0
- package/dist/styles/components/light-color-picker.css +94 -0
- package/dist/styles/components/list.css +411 -0
- package/dist/styles/components/listbox.css +168 -0
- package/dist/styles/components/lock-control.css +164 -0
- package/dist/styles/components/menu-bar.css +94 -0
- package/dist/styles/components/menu.css +454 -0
- package/dist/styles/components/message.css +236 -0
- package/dist/styles/components/model-picker.css +64 -0
- package/dist/styles/components/navigation-bar.css +249 -0
- package/dist/styles/components/outline.css +248 -0
- package/dist/styles/components/page-control.css +127 -0
- package/dist/styles/components/plan.css +212 -0
- package/dist/styles/components/popover.css +186 -0
- package/dist/styles/components/progress.css +228 -0
- package/dist/styles/components/prompt-input.css +503 -0
- package/dist/styles/components/radio.css +281 -0
- package/dist/styles/components/rating.css +122 -0
- package/dist/styles/components/reasoning.css +214 -0
- package/dist/styles/components/response.css +303 -0
- package/dist/styles/components/scene-tile.css +295 -0
- package/dist/styles/components/scroll-view.css +195 -0
- package/dist/styles/components/search-field.css +128 -0
- package/dist/styles/components/secure-field.css +189 -0
- package/dist/styles/components/segmented-control.css +183 -0
- package/dist/styles/components/select.css +290 -0
- package/dist/styles/components/sensor-readout.css +231 -0
- package/dist/styles/components/separator.css +62 -0
- package/dist/styles/components/setup-code.css +138 -0
- package/dist/styles/components/sheet.css +345 -0
- package/dist/styles/components/shimmer.css +60 -0
- package/dist/styles/components/sidebar.css +261 -0
- package/dist/styles/components/slider.css +208 -0
- package/dist/styles/components/sources.css +349 -0
- package/dist/styles/components/split-view.css +75 -0
- package/dist/styles/components/squircle.css +44 -0
- package/dist/styles/components/stepper.css +278 -0
- package/dist/styles/components/suggestion.css +203 -0
- package/dist/styles/components/switch.css +115 -0
- package/dist/styles/components/tab-bar.css +223 -0
- package/dist/styles/components/table.css +313 -0
- package/dist/styles/components/tabs.css +262 -0
- package/dist/styles/components/text-area.css +94 -0
- package/dist/styles/components/text-field.css +294 -0
- package/dist/styles/components/thermostat-control.css +214 -0
- package/dist/styles/components/toast.css +418 -0
- package/dist/styles/components/toggle.css +312 -0
- package/dist/styles/components/token-field.css +193 -0
- package/dist/styles/components/tool-call.css +391 -0
- package/dist/styles/components/toolbar.css +370 -0
- package/dist/styles/components/tooltip.css +69 -0
- package/dist/styles/components/window.css +428 -0
- package/dist/styles/index.css +17 -0
- package/dist/styles/materials.css +263 -0
- package/dist/styles/platforms.css +214 -0
- package/dist/styles/themes/ember.css +24 -0
- package/dist/styles/themes/graphite.css +16 -0
- package/dist/styles/themes/nebula.css +16 -0
- package/dist/styles/themes/system.css +28 -0
- package/dist/styles/tokens.css +299 -0
- package/package.json +82 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Button as ButtonPrimitive } from "@ui-sdk/react/button";
|
|
2
|
+
import { type RenderProp } from "@ui-sdk/react/primitive";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import type { SystemColor } from "../lib/theme.js";
|
|
5
|
+
type AttachmentVariant = "chip" | "tile" | "thumbnail" | "row";
|
|
6
|
+
type AttachmentState = "uploading" | "ready" | "error";
|
|
7
|
+
type AttachmentsProps = React.ComponentProps<"ul"> & {
|
|
8
|
+
/** `wrap` flows onto more lines, `scroll` keeps one line that scrolls sideways, `column` stacks rows. */
|
|
9
|
+
layout?: "wrap" | "scroll" | "column";
|
|
10
|
+
};
|
|
11
|
+
/** A list of attachments. Each Attachment inside becomes a list item. */
|
|
12
|
+
declare function Attachments({ layout, className, ...props }: AttachmentsProps): React.JSX.Element;
|
|
13
|
+
type AttachmentProps = React.ComponentProps<"div"> & {
|
|
14
|
+
/** `chip` for a composer, `tile` for a grid, `thumbnail` for an image alone, `row` for a list in an inspector. */
|
|
15
|
+
variant?: AttachmentVariant;
|
|
16
|
+
state?: AttachmentState;
|
|
17
|
+
/** Upload progress from 0 to 100 while `state` is `uploading`. Leave it out when the size isn't known. */
|
|
18
|
+
progress?: number;
|
|
19
|
+
/** Renders the attachment as a link or button, such as `<a href="…" />`. Use it only without AttachmentRemove. */
|
|
20
|
+
render?: RenderProp;
|
|
21
|
+
};
|
|
22
|
+
declare function Attachment({ variant, state, progress, className, render, ...props }: AttachmentProps): React.JSX.Element;
|
|
23
|
+
type AttachmentPreviewProps = React.ComponentProps<"span"> & {
|
|
24
|
+
/** An image to show. Without it, and without children, a document glyph is drawn. */
|
|
25
|
+
src?: string;
|
|
26
|
+
/** The image's description. Empty by default, since AttachmentName names the file. */
|
|
27
|
+
alt?: string;
|
|
28
|
+
/** A short type label printed on the document glyph, like `PDF` or `CSV`, where there's room. */
|
|
29
|
+
extension?: string;
|
|
30
|
+
/** The glyph's label color. */
|
|
31
|
+
color?: SystemColor | "gray" | "accent";
|
|
32
|
+
};
|
|
33
|
+
/** The image or file glyph. While uploading it shows the progress ring; after a failure, an alert badge. */
|
|
34
|
+
declare function AttachmentPreview({ src, alt, extension, color, className, style, children, ...props }: AttachmentPreviewProps): React.JSX.Element;
|
|
35
|
+
type AttachmentNameProps = React.ComponentProps<"span"> & {
|
|
36
|
+
/**
|
|
37
|
+
* Makes the name a link or button, such as `<a href="…" />`, whose hit area covers the whole
|
|
38
|
+
* attachment. Use this instead of Attachment's `render` when there's also a remove button.
|
|
39
|
+
*/
|
|
40
|
+
render?: RenderProp;
|
|
41
|
+
};
|
|
42
|
+
declare function AttachmentName({ className, render, id, ...props }: AttachmentNameProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
43
|
+
/** The kind and size, like `PDF · 2.4 MB`, or what went wrong. */
|
|
44
|
+
declare function AttachmentMeta({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
45
|
+
/** Removes the attachment. It's named "Remove" plus the attachment's name. */
|
|
46
|
+
declare function AttachmentRemove({ className, children, id, "aria-label": label, ...props }: React.ComponentProps<typeof ButtonPrimitive>): React.JSX.Element;
|
|
47
|
+
export { Attachment, AttachmentMeta, AttachmentName, AttachmentPreview, AttachmentRemove, Attachments };
|
|
48
|
+
export type { AttachmentNameProps, AttachmentPreviewProps, AttachmentProps, AttachmentsProps, AttachmentState, AttachmentVariant, };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Button as ButtonPrimitive } from "@ui-sdk/react/button";
|
|
4
|
+
import { renderElement } from "@ui-sdk/react/primitive";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { cx, join } from "../lib/cx.js";
|
|
7
|
+
import { ProgressCircle } from "./progress.js";
|
|
8
|
+
const AttachmentContext = React.createContext(null);
|
|
9
|
+
const ListContext = React.createContext(false);
|
|
10
|
+
function useAttachment() {
|
|
11
|
+
return React.useContext(AttachmentContext) ?? { state: "ready", progress: null, nameId: "" };
|
|
12
|
+
}
|
|
13
|
+
/** A list of attachments. Each Attachment inside becomes a list item. */
|
|
14
|
+
function Attachments({ layout = "wrap", className, ...props }) {
|
|
15
|
+
// Safari drops the list role from a list styled without markers unless it's restated.
|
|
16
|
+
return (_jsx(ListContext.Provider, { value: true, children: _jsx("ul", { role: "list", "data-layout": layout, className: join("mb-attachments", className), ...props }) }));
|
|
17
|
+
}
|
|
18
|
+
function Attachment({ variant = "chip", state = "ready", progress, className, render, ...props }) {
|
|
19
|
+
const inList = React.useContext(ListContext);
|
|
20
|
+
const nameId = React.useId();
|
|
21
|
+
const context = React.useMemo(() => ({ state, progress: progress ?? null, nameId }), [state, progress, nameId]);
|
|
22
|
+
const element = renderElement("div", {
|
|
23
|
+
...props,
|
|
24
|
+
"aria-busy": state === "uploading" ? true : undefined,
|
|
25
|
+
"data-variant": variant,
|
|
26
|
+
"data-state": state,
|
|
27
|
+
"data-interactive": render ? "" : undefined,
|
|
28
|
+
className: join("mb-attachment", className),
|
|
29
|
+
}, render);
|
|
30
|
+
return (_jsx(AttachmentContext.Provider, { value: context, children: inList ? _jsx("li", { className: "mb-attachments-item", children: element }) : element }));
|
|
31
|
+
}
|
|
32
|
+
function DocumentGlyph() {
|
|
33
|
+
return (_jsxs("svg", { viewBox: "0 0 32 40", "aria-hidden": "true", focusable: "false", className: "mb-attachment-glyph", children: [_jsx("path", { className: "mb-attachment-glyph-page", d: "M6 1.75h14.2a2 2 0 0 1 1.42.59l6.04 6.04a2 2 0 0 1 .59 1.42V36.25a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V3.75a2 2 0 0 1 2-2Z" }), _jsx("path", { className: "mb-attachment-glyph-fold", d: "M21 1.9v5.6a1.75 1.75 0 0 0 1.75 1.75h5.6" }), _jsx("path", { className: "mb-attachment-glyph-lines", d: "M9 15.5h14M9 20h14M9 24.5h14M9 29h9" })] }));
|
|
34
|
+
}
|
|
35
|
+
function ErrorGlyph() {
|
|
36
|
+
return (_jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", className: "mb-attachment-error", children: [_jsx("circle", { cx: "8", cy: "8", r: "7.25" }), _jsx("path", { d: "M8 4.5v4.25" }), _jsx("circle", { cx: "8", cy: "11.4", r: "0.6" })] }));
|
|
37
|
+
}
|
|
38
|
+
/** The image or file glyph. While uploading it shows the progress ring; after a failure, an alert badge. */
|
|
39
|
+
function AttachmentPreview({ src, alt = "", extension, color, className, style, children, ...props }) {
|
|
40
|
+
const { state, progress } = useAttachment();
|
|
41
|
+
const tint = color ? (color === "gray" ? "var(--mb-label-secondary)" : `var(--mb-${color})`) : undefined;
|
|
42
|
+
return (_jsxs("span", { "data-image": src ? "" : undefined, className: join("mb-attachment-preview", className), style: tint ? { "--mb-attachment-tint": tint, ...style } : style, ...props, children: [children ??
|
|
43
|
+
(src ? (_jsx("img", { src: src, alt: alt, className: "mb-attachment-image" })) : (_jsxs("span", { className: "mb-attachment-document", children: [_jsx(DocumentGlyph, {}), extension ? _jsx("span", { "aria-hidden": "true", className: "mb-attachment-extension", children: extension }) : null] }))), state === "uploading" ? (_jsx("span", { className: "mb-attachment-progress", children: _jsx(ProgressCircle, { size: "sm", value: progress, "aria-label": "Uploading", className: "mb-attachment-progress-ring" }) })) : null, state === "error" ? _jsx(ErrorGlyph, {}) : null] }));
|
|
44
|
+
}
|
|
45
|
+
function AttachmentName({ className, render, id, ...props }) {
|
|
46
|
+
const { nameId } = useAttachment();
|
|
47
|
+
return renderElement("span", {
|
|
48
|
+
...props,
|
|
49
|
+
id: id ?? (nameId || undefined),
|
|
50
|
+
"data-interactive": render ? "" : undefined,
|
|
51
|
+
className: join("mb-attachment-name", className),
|
|
52
|
+
}, render);
|
|
53
|
+
}
|
|
54
|
+
/** The kind and size, like `PDF · 2.4 MB`, or what went wrong. */
|
|
55
|
+
function AttachmentMeta({ className, ...props }) {
|
|
56
|
+
return _jsx("span", { className: join("mb-attachment-meta", className), ...props });
|
|
57
|
+
}
|
|
58
|
+
/** Removes the attachment. It's named "Remove" plus the attachment's name. */
|
|
59
|
+
function AttachmentRemove({ className, children, id, "aria-label": label = "Remove", ...props }) {
|
|
60
|
+
const { nameId } = useAttachment();
|
|
61
|
+
const ownId = React.useId();
|
|
62
|
+
const buttonId = id ?? ownId;
|
|
63
|
+
return (_jsx(ButtonPrimitive, { id: buttonId, "aria-label": label, "aria-labelledby": nameId ? `${buttonId} ${nameId}` : undefined, className: cx("mb-attachment-remove", className), ...props, children: children ?? (_jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "m4.75 4.75 6.5 6.5m0-6.5-6.5 6.5" }) })) }));
|
|
64
|
+
}
|
|
65
|
+
export { Attachment, AttachmentMeta, AttachmentName, AttachmentPreview, AttachmentRemove, Attachments };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { SystemColor } from "../lib/theme.js";
|
|
3
|
+
type AutomationRowProps = {
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
/** The icon tile's color. */
|
|
6
|
+
iconColor?: SystemColor | "gray" | "accent";
|
|
7
|
+
/** When it runs: "When I arrive home", "Sunset", "When Back door opens". */
|
|
8
|
+
title: string;
|
|
9
|
+
/** What it does: "Unlock Front door and turn on 3 lights". */
|
|
10
|
+
detail?: React.ReactNode;
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
defaultEnabled?: boolean;
|
|
13
|
+
onEnabledChange?: (enabled: boolean) => void;
|
|
14
|
+
/** Runs when the row is pressed: open the automation's editor. */
|
|
15
|
+
onOpen?: () => void;
|
|
16
|
+
/** Names the switch. Defaults to the title. */
|
|
17
|
+
switchLabel?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
/** An automation in the Automation tab: when it runs, what it does, and a switch to turn it off. Put it in a List. */
|
|
22
|
+
declare function AutomationRow({ icon, iconColor, title, detail, enabled, defaultEnabled, onEnabledChange, onOpen, switchLabel, disabled, className, }: AutomationRowProps): React.JSX.Element;
|
|
23
|
+
export { AutomationRow };
|
|
24
|
+
export type { AutomationRowProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Button as ButtonPrimitive } from "@ui-sdk/react/button";
|
|
4
|
+
import { join } from "../lib/cx.js";
|
|
5
|
+
import { ListRow, ListRowAccessory, ListRowIcon, ListRowSubtitle, ListRowTitle } from "./list.js";
|
|
6
|
+
import { Switch } from "./switch.js";
|
|
7
|
+
/** An automation in the Automation tab: when it runs, what it does, and a switch to turn it off. Put it in a List. */
|
|
8
|
+
function AutomationRow({ icon, iconColor = "accent", title, detail, enabled, defaultEnabled, onEnabledChange, onOpen, switchLabel, disabled, className, }) {
|
|
9
|
+
const off = enabled === false;
|
|
10
|
+
return (_jsxs(ListRow, { className: join("mb-automation-row", className), disabled: disabled, children: [icon ? _jsx(ListRowIcon, { color: iconColor, children: icon }) : null, _jsx(ListRowTitle, { children: title }), detail ? _jsx(ListRowSubtitle, { children: detail }) : null, onOpen ? (_jsx(ButtonPrimitive, { className: "mb-automation-row-open", onClick: onOpen, disabled: disabled, children: _jsx("span", { className: "mb-visually-hidden", children: title }) })) : null, _jsx(ListRowAccessory, { className: "mb-automation-row-switch", "data-off": off ? "" : undefined, children: _jsx(Switch, { "aria-label": switchLabel ?? title, checked: enabled, defaultChecked: defaultEnabled, onCheckedChange: onEnabledChange ? (checked) => onEnabledChange(checked) : undefined, disabled: disabled }) })] }));
|
|
11
|
+
}
|
|
12
|
+
export { AutomationRow };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Avatar as AvatarPrimitive, AvatarFallback as AvatarFallbackPrimitive, AvatarImage as AvatarImagePrimitive } from "@ui-sdk/react/avatar";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { SystemColor } from "../lib/theme.js";
|
|
4
|
+
type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
|
+
type AvatarStatus = "online" | "away" | "busy" | "offline";
|
|
6
|
+
type AvatarProps = Omit<React.ComponentProps<typeof AvatarPrimitive>, "color" | "children"> & {
|
|
7
|
+
/** Your own AvatarImage and AvatarFallback, in place of the ones made from `src` and `name`. */
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/** The person or thing pictured. Gives the image its alt text and the fallback its initials. */
|
|
10
|
+
name?: string;
|
|
11
|
+
src?: string;
|
|
12
|
+
/** Inside an AvatarGroup, leave it out to take the group's size. Otherwise `md`. */
|
|
13
|
+
size?: AvatarSize;
|
|
14
|
+
/** `app` is the rounded square of an app icon, for apps, teams and workspaces. */
|
|
15
|
+
shape?: "circle" | "app";
|
|
16
|
+
/** The fallback's gradient. `gray` is the Contacts monogram; `auto` picks a color from the name. */
|
|
17
|
+
color?: SystemColor | "gray" | "auto";
|
|
18
|
+
status?: AvatarStatus;
|
|
19
|
+
/** Read after the name, in place of the default word for `status`. */
|
|
20
|
+
statusLabel?: string;
|
|
21
|
+
};
|
|
22
|
+
declare function Avatar({ name, src, size, shape, color, status, statusLabel, className, children, ...props }: AvatarProps): React.JSX.Element;
|
|
23
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarImagePrimitive>): React.JSX.Element;
|
|
24
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarFallbackPrimitive>): React.JSX.Element;
|
|
25
|
+
type AvatarGroupProps = React.ComponentProps<"div"> & {
|
|
26
|
+
size?: AvatarSize;
|
|
27
|
+
/** Avatars past this many collapse into a "+N" count. */
|
|
28
|
+
max?: number;
|
|
29
|
+
};
|
|
30
|
+
/** Overlapping avatars for the people on a document or in a thread. Give it an `aria-label`. */
|
|
31
|
+
declare function AvatarGroup({ size, max, className, children, ...props }: AvatarGroupProps): React.JSX.Element;
|
|
32
|
+
export { Avatar, AvatarFallback, AvatarGroup, AvatarImage };
|
|
33
|
+
export type { AvatarGroupProps, AvatarProps, AvatarSize, AvatarStatus };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar as AvatarPrimitive, AvatarFallback as AvatarFallbackPrimitive, AvatarImage as AvatarImagePrimitive, } from "@ui-sdk/react/avatar";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cx, join } from "../lib/cx.js";
|
|
5
|
+
const statusLabels = {
|
|
6
|
+
online: "Online",
|
|
7
|
+
away: "Away",
|
|
8
|
+
busy: "Do not disturb",
|
|
9
|
+
offline: "Offline",
|
|
10
|
+
};
|
|
11
|
+
const autoColors = ["orange", "green", "teal", "blue", "indigo", "purple", "pink", "brown"];
|
|
12
|
+
function initialsOf(name) {
|
|
13
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
14
|
+
const letters = words.length > 1 ? [words[0], words[words.length - 1]] : words;
|
|
15
|
+
return letters.map((word) => Array.from(word)[0]?.toLocaleUpperCase() ?? "").join("");
|
|
16
|
+
}
|
|
17
|
+
function colorOf(name) {
|
|
18
|
+
let hash = 0x811c9dc5;
|
|
19
|
+
for (const char of name)
|
|
20
|
+
hash = Math.imul(hash ^ (char.codePointAt(0) ?? 0), 0x01000193);
|
|
21
|
+
return autoColors[(hash >>> 0) % autoColors.length];
|
|
22
|
+
}
|
|
23
|
+
function Avatar({ name, src, size, shape = "circle", color = "gray", status, statusLabel, className, children, ...props }) {
|
|
24
|
+
const resolvedColor = color === "auto" ? (name ? colorOf(name) : "gray") : color;
|
|
25
|
+
const content = children ?? (_jsxs(_Fragment, { children: [src ? _jsx(AvatarImage, { src: src, alt: name ?? "" }) : null, _jsx(AvatarFallback, { children: name ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": "true", children: initialsOf(name) }), _jsx("span", { className: "mb-visually-hidden", children: name })] })) : (_jsx(AvatarPlaceholder, {})) })] }));
|
|
26
|
+
return (_jsxs(AvatarPrimitive, { "data-size": size, "data-shape": shape, "data-color": resolvedColor, className: cx("mb-avatar", className), ...props, children: [content, status ? (_jsx("span", { "data-status": status, className: "mb-avatar-status", children: _jsx("span", { className: "mb-visually-hidden", children: statusLabel ?? statusLabels[status] }) })) : null] }));
|
|
27
|
+
}
|
|
28
|
+
function AvatarImage({ className, ...props }) {
|
|
29
|
+
return _jsx(AvatarImagePrimitive, { className: cx("mb-avatar-image", className), ...props });
|
|
30
|
+
}
|
|
31
|
+
function AvatarFallback({ className, ...props }) {
|
|
32
|
+
return _jsx(AvatarFallbackPrimitive, { className: cx("mb-avatar-fallback", className), ...props });
|
|
33
|
+
}
|
|
34
|
+
/** The silhouette shown when there's neither an image nor a name. */
|
|
35
|
+
function AvatarPlaceholder() {
|
|
36
|
+
return (_jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 32 32", className: "mb-avatar-placeholder", children: [_jsx("circle", { cx: "16", cy: "12.5", r: "5.75" }), _jsx("path", { d: "M5.5 28.5c1.4-5.6 5.6-8.6 10.5-8.6s9.1 3 10.5 8.6" })] }));
|
|
37
|
+
}
|
|
38
|
+
/** Overlapping avatars for the people on a document or in a thread. Give it an `aria-label`. */
|
|
39
|
+
function AvatarGroup({ size = "md", max, className, children, ...props }) {
|
|
40
|
+
const items = React.Children.toArray(children);
|
|
41
|
+
const shown = max !== undefined && items.length > max ? items.slice(0, Math.max(max - 1, 0)) : items;
|
|
42
|
+
const hidden = items.length - shown.length;
|
|
43
|
+
return (_jsxs("div", { role: "group", "data-size": size, className: join("mb-avatar-group", className), ...props, children: [shown, hidden > 0 ? (_jsxs("span", { "data-shape": "circle", className: "mb-avatar mb-avatar-overflow", children: [_jsxs("span", { "aria-hidden": "true", children: ["+", hidden] }), _jsx("span", { className: "mb-visually-hidden", children: `and ${hidden} more` })] })) : null] }));
|
|
44
|
+
}
|
|
45
|
+
export { Avatar, AvatarFallback, AvatarGroup, AvatarImage };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { SystemColor } from "../lib/theme.js";
|
|
3
|
+
type BadgeColor = SystemColor | "accent" | "gray";
|
|
4
|
+
type BadgeProps = Omit<React.ComponentProps<"span">, "color"> & {
|
|
5
|
+
/** `dot` is a colored dot beside plain text, for a status in a table or list. */
|
|
6
|
+
variant?: "tinted" | "filled" | "outline" | "dot";
|
|
7
|
+
color?: BadgeColor;
|
|
8
|
+
size?: "sm" | "md";
|
|
9
|
+
};
|
|
10
|
+
declare function Badge({ variant, color, size, className, children, ...props }: BadgeProps): React.JSX.Element;
|
|
11
|
+
type NotificationBadgeProps = Omit<React.ComponentProps<"span">, "children"> & {
|
|
12
|
+
/** Leave it out for a plain dot that says only "something new". */
|
|
13
|
+
count?: number;
|
|
14
|
+
/** Counts above this read as `max+`. */
|
|
15
|
+
max?: number;
|
|
16
|
+
/** What is being counted, read after the number: "unread messages". */
|
|
17
|
+
label?: string;
|
|
18
|
+
size?: "sm" | "md" | "lg";
|
|
19
|
+
};
|
|
20
|
+
declare function NotificationBadge({ count, max, label, size, className, ...props }: NotificationBadgeProps): React.JSX.Element | null;
|
|
21
|
+
/** Pins a NotificationBadge to the top trailing corner of an icon, an avatar or a button. */
|
|
22
|
+
declare function BadgeAnchor({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
23
|
+
export { Badge, BadgeAnchor, NotificationBadge };
|
|
24
|
+
export type { BadgeColor, BadgeProps, NotificationBadgeProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { join } from "../lib/cx.js";
|
|
3
|
+
function Badge({ variant = "tinted", color = "accent", size = "md", className, children, ...props }) {
|
|
4
|
+
return (_jsxs("span", { "data-variant": variant, "data-color": color, "data-size": size, className: join("mb-badge", className), ...props, children: [variant === "dot" ? _jsx("span", { "aria-hidden": "true", className: "mb-badge-dot" }) : null, children] }));
|
|
5
|
+
}
|
|
6
|
+
function NotificationBadge({ count, max = 99, label, size = "md", className, ...props }) {
|
|
7
|
+
if (count !== undefined && count <= 0)
|
|
8
|
+
return null;
|
|
9
|
+
const text = count === undefined ? undefined : count > max ? `${max}+` : String(count);
|
|
10
|
+
const spoken = [count === undefined ? undefined : count > max ? `More than ${max}` : String(count), label]
|
|
11
|
+
.filter(Boolean)
|
|
12
|
+
.join(" ");
|
|
13
|
+
return (_jsxs("span", { "data-size": size, "data-dot": text === undefined ? "" : undefined, className: join("mb-notification-badge", className), ...props, children: [text === undefined ? null : _jsx("span", { "aria-hidden": "true", children: text }), spoken ? _jsx("span", { className: "mb-visually-hidden", children: spoken }) : null] }));
|
|
14
|
+
}
|
|
15
|
+
/** Pins a NotificationBadge to the top trailing corner of an icon, an avatar or a button. */
|
|
16
|
+
function BadgeAnchor({ className, ...props }) {
|
|
17
|
+
return _jsx("span", { className: join("mb-badge-anchor", className), ...props });
|
|
18
|
+
}
|
|
19
|
+
export { Badge, BadgeAnchor, NotificationBadge };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Button as ButtonPrimitive } from "@ui-sdk/react/button";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
type ButtonVariant = "filled" | "tinted" | "bezeled" | "plain" | "glass";
|
|
4
|
+
type ButtonTone = "accent" | "neutral" | "destructive";
|
|
5
|
+
type ButtonSize = "sm" | "md" | "lg";
|
|
6
|
+
type ButtonShape = "auto" | "capsule" | "circle";
|
|
7
|
+
type ButtonProps = React.ComponentProps<typeof ButtonPrimitive> & {
|
|
8
|
+
/** `bezeled` is the standard push button; `filled` is the one default action in a view. */
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
tone?: ButtonTone;
|
|
11
|
+
size?: ButtonSize;
|
|
12
|
+
/** `auto` follows the platform: rounded rectangles on macOS, capsules on touch. */
|
|
13
|
+
shape?: ButtonShape;
|
|
14
|
+
/** Stretches to the container's width, like a sheet's primary action on iOS. */
|
|
15
|
+
block?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare function Button({ variant, tone, size, shape, block, className, ...props }: ButtonProps): React.JSX.Element;
|
|
18
|
+
declare function ButtonSpinner({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
19
|
+
export { Button, ButtonSpinner };
|
|
20
|
+
export type { ButtonProps, ButtonShape, ButtonSize, ButtonTone, ButtonVariant };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button as ButtonPrimitive } from "@ui-sdk/react/button";
|
|
3
|
+
import { cx, join } from "../lib/cx.js";
|
|
4
|
+
function Button({ variant = "bezeled", tone = "accent", size = "md", shape = "auto", block, className, ...props }) {
|
|
5
|
+
return (_jsx(ButtonPrimitive, { "data-variant": variant, "data-tone": tone, "data-size": size, "data-shape": shape, "data-block": block ? "" : undefined, className: cx("mb-button", className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
function ButtonSpinner({ className, ...props }) {
|
|
8
|
+
return (_jsx("span", { "aria-hidden": "true", "data-show": "pending", "data-motion": "essential", className: join("mb-button-spinner", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
export { Button, ButtonSpinner };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Calendar as CalendarPrimitive, CalendarDay as CalendarDayPrimitive, CalendarGrid as CalendarGridPrimitive, CalendarHeading as CalendarHeadingPrimitive, CalendarNext as CalendarNextPrimitive, CalendarPrevious as CalendarPreviousPrimitive, CalendarWeekday as CalendarWeekdayPrimitive, CalendarWeekdays as CalendarWeekdaysPrimitive, CalendarWeeks as CalendarWeeksPrimitive } from "@ui-sdk/react/calendar";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
type CalendarSize = "sm" | "md";
|
|
4
|
+
type CalendarProps = React.ComponentProps<typeof CalendarPrimitive> & {
|
|
5
|
+
/** `sm` is the compact month of a macOS date popover; `md` is the graphical date picker. */
|
|
6
|
+
size?: CalendarSize;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The graphical date picker: a month title with chevrons, a weekday row and
|
|
10
|
+
* circular days. Without children it renders a header and a grid per month.
|
|
11
|
+
*/
|
|
12
|
+
declare function Calendar({ size, months, weekdayFormat, showOutsideDays, className, children, ...props }: CalendarProps): React.JSX.Element;
|
|
13
|
+
/** The header and one grid per month. Shared with the date picker's popover. */
|
|
14
|
+
declare function CalendarBody({ months }: {
|
|
15
|
+
months?: number;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
/** The month title, with Previous and Next at the trailing edge. */
|
|
18
|
+
declare function CalendarHeader({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
19
|
+
declare function CalendarHeading({ className, ...props }: React.ComponentProps<typeof CalendarHeadingPrimitive>): React.JSX.Element;
|
|
20
|
+
declare function CalendarPrevious({ className, children, ...props }: React.ComponentProps<typeof CalendarPreviousPrimitive>): React.JSX.Element;
|
|
21
|
+
declare function CalendarNext({ className, children, ...props }: React.ComponentProps<typeof CalendarNextPrimitive>): React.JSX.Element;
|
|
22
|
+
/** One month. Without children it renders its weekday row and weeks. */
|
|
23
|
+
declare function CalendarGrid({ offset, className, children, ...props }: React.ComponentProps<typeof CalendarGridPrimitive>): React.JSX.Element;
|
|
24
|
+
declare function CalendarWeekdays({ className, ...props }: React.ComponentProps<typeof CalendarWeekdaysPrimitive>): React.JSX.Element;
|
|
25
|
+
declare function CalendarWeekday({ className, ...props }: React.ComponentProps<typeof CalendarWeekdayPrimitive>): React.JSX.Element;
|
|
26
|
+
declare function CalendarWeeks({ className, ...props }: React.ComponentProps<typeof CalendarWeeksPrimitive>): React.JSX.Element;
|
|
27
|
+
/** A day: a circle that fills with the accent when it's picked. */
|
|
28
|
+
declare function CalendarDay({ className, children, ...props }: React.ComponentProps<typeof CalendarDayPrimitive>): React.JSX.Element;
|
|
29
|
+
export { Calendar, CalendarBody, CalendarDay, CalendarGrid, CalendarHeader, CalendarHeading, CalendarNext, CalendarPrevious, CalendarWeekday, CalendarWeekdays, CalendarWeeks, };
|
|
30
|
+
export type { CalendarProps, CalendarSize };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Calendar as CalendarPrimitive, CalendarDay as CalendarDayPrimitive, CalendarGrid as CalendarGridPrimitive, CalendarHeading as CalendarHeadingPrimitive, CalendarNext as CalendarNextPrimitive, CalendarPrevious as CalendarPreviousPrimitive, CalendarWeekday as CalendarWeekdayPrimitive, CalendarWeekdays as CalendarWeekdaysPrimitive, CalendarWeeks as CalendarWeeksPrimitive, } from "@ui-sdk/react/calendar";
|
|
4
|
+
import { cx, join } from "../lib/cx.js";
|
|
5
|
+
import { ChevronGlyph } from "../lib/field-glyphs.js";
|
|
6
|
+
/**
|
|
7
|
+
* The graphical date picker: a month title with chevrons, a weekday row and
|
|
8
|
+
* circular days. Without children it renders a header and a grid per month.
|
|
9
|
+
*/
|
|
10
|
+
function Calendar({ size = "md", months = 1, weekdayFormat, showOutsideDays = false, className, children, ...props }) {
|
|
11
|
+
return (_jsx(CalendarPrimitive, { months: months, showOutsideDays: showOutsideDays, weekdayFormat: weekdayFormat ?? (size === "sm" ? "narrow" : "short"), "data-size": size, className: cx("mb-calendar", className), ...props, children: children ?? _jsx(CalendarBody, { months: months }) }));
|
|
12
|
+
}
|
|
13
|
+
/** The header and one grid per month. Shared with the date picker's popover. */
|
|
14
|
+
function CalendarBody({ months = 1 }) {
|
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx(CalendarHeader, {}), _jsx("div", { className: "mb-calendar-months", children: Array.from({ length: months }, (_, offset) => (_jsx(CalendarGrid, { offset: offset }, offset))) })] }));
|
|
16
|
+
}
|
|
17
|
+
/** The month title, with Previous and Next at the trailing edge. */
|
|
18
|
+
function CalendarHeader({ className, children, ...props }) {
|
|
19
|
+
return (_jsx("div", { className: join("mb-calendar-header", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(CalendarHeading, {}), _jsxs("div", { className: "mb-calendar-nav", children: [_jsx(CalendarPrevious, {}), _jsx(CalendarNext, {})] })] })) }));
|
|
20
|
+
}
|
|
21
|
+
function CalendarHeading({ className, ...props }) {
|
|
22
|
+
return _jsx(CalendarHeadingPrimitive, { className: cx("mb-calendar-heading", className), ...props });
|
|
23
|
+
}
|
|
24
|
+
function CalendarPrevious({ className, children, ...props }) {
|
|
25
|
+
return (_jsx(CalendarPreviousPrimitive, { className: cx("mb-calendar-step", className), ...props, children: children ?? _jsx(ChevronGlyph, { direction: "left", className: "mb-calendar-chevron" }) }));
|
|
26
|
+
}
|
|
27
|
+
function CalendarNext({ className, children, ...props }) {
|
|
28
|
+
return (_jsx(CalendarNextPrimitive, { className: cx("mb-calendar-step", className), ...props, children: children ?? _jsx(ChevronGlyph, { direction: "right", className: "mb-calendar-chevron" }) }));
|
|
29
|
+
}
|
|
30
|
+
/** One month. Without children it renders its weekday row and weeks. */
|
|
31
|
+
function CalendarGrid({ offset = 0, className, children, ...props }) {
|
|
32
|
+
return (_jsx(CalendarGridPrimitive, { offset: offset, className: cx("mb-calendar-grid", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(CalendarWeekdays, { children: (index) => _jsx(CalendarWeekday, { index: index }) }), _jsx(CalendarWeeks, { children: (cell) => _jsx(CalendarDay, { value: cell.date }) })] })) }));
|
|
33
|
+
}
|
|
34
|
+
function CalendarWeekdays({ className, ...props }) {
|
|
35
|
+
return _jsx(CalendarWeekdaysPrimitive, { className: join("mb-calendar-weekdays", className), ...props });
|
|
36
|
+
}
|
|
37
|
+
function CalendarWeekday({ className, ...props }) {
|
|
38
|
+
return _jsx(CalendarWeekdayPrimitive, { className: cx("mb-calendar-weekday", className), ...props });
|
|
39
|
+
}
|
|
40
|
+
function CalendarWeeks({ className, ...props }) {
|
|
41
|
+
return _jsx(CalendarWeeksPrimitive, { className: join("mb-calendar-weeks", className), ...props });
|
|
42
|
+
}
|
|
43
|
+
/** A day: a circle that fills with the accent when it's picked. */
|
|
44
|
+
function CalendarDay({ className, children, ...props }) {
|
|
45
|
+
return (_jsx(CalendarDayPrimitive, { className: cx("mb-calendar-day", className), ...props, children: children ?? ((state) => _jsx("span", { className: "mb-calendar-day-label", children: state.label })) }));
|
|
46
|
+
}
|
|
47
|
+
export { Calendar, CalendarBody, CalendarDay, CalendarGrid, CalendarHeader, CalendarHeading, CalendarNext, CalendarPrevious, CalendarWeekday, CalendarWeekdays, CalendarWeeks, };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Button as ButtonPrimitive } from "@ui-sdk/react/button";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type ArtworkProps } from "./artwork.js";
|
|
4
|
+
type CameraState = "streaming" | "snapshot" | "connecting" | "offline";
|
|
5
|
+
type CameraFrameOptions = {
|
|
6
|
+
name?: React.ReactNode;
|
|
7
|
+
room?: React.ReactNode;
|
|
8
|
+
/** Shows the Live badge while the stream plays. */
|
|
9
|
+
live?: boolean;
|
|
10
|
+
/** When the picture was taken, already formatted: "9:41 AM". */
|
|
11
|
+
timestamp?: string;
|
|
12
|
+
state?: CameraState;
|
|
13
|
+
/** What `offline` says, in the page's language. */
|
|
14
|
+
offlineLabel?: string;
|
|
15
|
+
liveLabel?: string;
|
|
16
|
+
/** The picture: a `<video>`, an `<img>` of the latest snapshot, or any element. Without it, an abstract placeholder seeded by `name`. */
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
};
|
|
19
|
+
type CameraViewProps = Omit<React.ComponentProps<"figure">, "children"> & CameraFrameOptions & {
|
|
20
|
+
/** Buttons along the bottom edge: talk, mute, full screen. Show a microphone only if the camera has a speaker. */
|
|
21
|
+
controls?: React.ReactNode;
|
|
22
|
+
};
|
|
23
|
+
/** A camera's picture: the live stream or its most recent snapshot, with its name and state in the corners. */
|
|
24
|
+
declare function CameraView({ name, room, live, timestamp, state, offlineLabel, liveLabel, controls, className, children, ...props }: CameraViewProps): React.JSX.Element;
|
|
25
|
+
type CameraTileProps = Omit<React.ComponentProps<typeof ButtonPrimitive>, "children"> & CameraFrameOptions;
|
|
26
|
+
/** A camera in the Home tab's Cameras row. Pressing it opens the camera. */
|
|
27
|
+
declare function CameraTile({ name, room, live, timestamp, state, offlineLabel, liveLabel, className, children, ...props }: CameraTileProps): React.JSX.Element;
|
|
28
|
+
type CameraSceneProps = Omit<ArtworkProps, "seed" | "variant" | "time"> & {
|
|
29
|
+
/** Seeds the picture. The names are kept from the drawn scenes this replaced. */
|
|
30
|
+
variant?: "porch" | "driveway" | "kitchen" | "backyard";
|
|
31
|
+
/** `night` drains the color, like the gray infrared picture a camera switches to in the dark. */
|
|
32
|
+
time?: "day" | "night";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Leave a camera's `children` out to get its placeholder, or pass your own picture. This now draws
|
|
36
|
+
* the same abstract placeholder, seeded by `variant`, instead of an illustrated place.
|
|
37
|
+
*/
|
|
38
|
+
declare function CameraScene({ variant, time, className, ...props }: CameraSceneProps): React.JSX.Element;
|
|
39
|
+
export { CameraScene, CameraTile, CameraView };
|
|
40
|
+
export type { CameraSceneProps, CameraState, CameraTileProps, CameraViewProps };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Button as ButtonPrimitive } from "@ui-sdk/react/button";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cx, join } from "../lib/cx.js";
|
|
6
|
+
import { ActivityIndicator } from "./activity-indicator.js";
|
|
7
|
+
import { Artwork } from "./artwork.js";
|
|
8
|
+
function frameParts({ name, room, live, timestamp, state = "streaming", offlineLabel = "Camera not available", liveLabel = "Live", children }, Tag) {
|
|
9
|
+
const showLive = live && state === "streaming";
|
|
10
|
+
return (_jsxs(_Fragment, { children: [_jsx(Tag, { className: "mb-camera-view-frame", "aria-hidden": state === "offline" ? true : undefined, children: children ?? _jsx(CameraPlaceholder, { name: name, room: room }) }), name || room ? (_jsxs(Tag, { className: "mb-camera-view-caption", children: [name ? _jsx(Tag, { className: "mb-camera-view-name", children: name }) : null, room ? _jsx(Tag, { className: "mb-camera-view-room", children: room }) : null] })) : null, showLive || timestamp || state === "connecting" ? (_jsxs(Tag, { className: "mb-camera-view-badges", children: [state === "connecting" ? (_jsx(ActivityIndicator, { size: "sm", "aria-label": "Connecting", className: "mb-camera-view-spinner" })) : null, timestamp && !showLive ? _jsx(Tag, { className: "mb-camera-view-time", children: timestamp }) : null, showLive ? (_jsxs(Tag, { className: "mb-camera-view-live", children: [_jsx(Tag, { className: "mb-camera-view-live-dot", "aria-hidden": "true" }), liveLabel] })) : null] })) : null, state === "offline" ? _jsx(Tag, { className: "mb-camera-view-offline", children: offlineLabel }) : null] }));
|
|
11
|
+
}
|
|
12
|
+
const placeholderPalettes = ["slate", "water", "amber", "night", "forest"];
|
|
13
|
+
/** Stands in for a camera's picture when there's none: dim, out of focus, and the same for the same camera. Decorative. */
|
|
14
|
+
function CameraPlaceholder({ name, room }) {
|
|
15
|
+
const seed = [name, room].filter((part) => typeof part === "string" || typeof part === "number").join(" ") || "Camera";
|
|
16
|
+
let sum = 0;
|
|
17
|
+
for (let i = 0; i < seed.length; i++)
|
|
18
|
+
sum = (Math.imul(sum, 31) + seed.charCodeAt(i)) >>> 0;
|
|
19
|
+
sum = Math.imul(sum ^ (sum >>> 15), 0x85ebca6b) >>> 0;
|
|
20
|
+
sum = (sum ^ (sum >>> 12)) >>> 0;
|
|
21
|
+
return (_jsx(Artwork, { seed: seed, variant: "lens", palette: placeholderPalettes[sum % placeholderPalettes.length], aspect: 16 / 9, shape: "square", className: "mb-camera-view-placeholder" }));
|
|
22
|
+
}
|
|
23
|
+
/** A camera's picture: the live stream or its most recent snapshot, with its name and state in the corners. */
|
|
24
|
+
function CameraView({ name, room, live, timestamp, state = "streaming", offlineLabel, liveLabel, controls, className, children, ...props }) {
|
|
25
|
+
return (_jsxs("figure", { "data-state": state, className: join("mb-camera-view", className), ...props, children: [frameParts({ name, room, live, timestamp, state, offlineLabel, liveLabel, children }, "div"), controls ? _jsx("div", { className: "mb-camera-view-controls", children: controls }) : null] }));
|
|
26
|
+
}
|
|
27
|
+
/** A camera in the Home tab's Cameras row. Pressing it opens the camera. */
|
|
28
|
+
function CameraTile({ name, room, live, timestamp, state = "streaming", offlineLabel, liveLabel, className, children, ...props }) {
|
|
29
|
+
return (_jsx(ButtonPrimitive, { "data-state": state, className: cx("mb-camera-view mb-camera-tile", className), ...props, children: frameParts({ name, room, live, timestamp, state, offlineLabel, liveLabel, children }, "span") }));
|
|
30
|
+
}
|
|
31
|
+
const scenePalettes = {
|
|
32
|
+
porch: "amber",
|
|
33
|
+
driveway: "slate",
|
|
34
|
+
kitchen: "water",
|
|
35
|
+
backyard: "forest",
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Leave a camera's `children` out to get its placeholder, or pass your own picture. This now draws
|
|
39
|
+
* the same abstract placeholder, seeded by `variant`, instead of an illustrated place.
|
|
40
|
+
*/
|
|
41
|
+
function CameraScene({ variant = "porch", time = "day", className, ...props }) {
|
|
42
|
+
return (_jsx(Artwork, { seed: variant, variant: "lens", palette: scenePalettes[variant], time: time, aspect: 16 / 9, shape: "square", className: join("mb-camera-scene", className), ...props }));
|
|
43
|
+
}
|
|
44
|
+
export { CameraScene, CameraTile, CameraView };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
type CardVariant = "grouped" | "elevated" | "material" | "outline";
|
|
3
|
+
type CardProps = React.ComponentProps<"div"> & {
|
|
4
|
+
/** `grouped` is a macOS group box or an iOS grouped cell; `material` floats over content. */
|
|
5
|
+
variant?: CardVariant;
|
|
6
|
+
};
|
|
7
|
+
declare function Card({ variant, className, ...props }: CardProps): React.JSX.Element;
|
|
8
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"h3">): React.JSX.Element;
|
|
10
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
11
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
12
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
14
|
+
export type { CardProps, CardVariant };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { join } from "../lib/cx.js";
|
|
3
|
+
function Card({ variant = "grouped", className, ...props }) {
|
|
4
|
+
return _jsx("div", { "data-variant": variant, className: join("mb-card", className), ...props });
|
|
5
|
+
}
|
|
6
|
+
function CardHeader({ className, ...props }) {
|
|
7
|
+
return _jsx("div", { className: join("mb-card-header", className), ...props });
|
|
8
|
+
}
|
|
9
|
+
function CardTitle({ className, ...props }) {
|
|
10
|
+
return _jsx("h3", { className: join("mb-card-title", className), ...props });
|
|
11
|
+
}
|
|
12
|
+
function CardDescription({ className, ...props }) {
|
|
13
|
+
return _jsx("p", { className: join("mb-card-description", className), ...props });
|
|
14
|
+
}
|
|
15
|
+
function CardContent({ className, ...props }) {
|
|
16
|
+
return _jsx("div", { className: join("mb-card-content", className), ...props });
|
|
17
|
+
}
|
|
18
|
+
function CardFooter({ className, ...props }) {
|
|
19
|
+
return _jsx("div", { className: join("mb-card-footer", className), ...props });
|
|
20
|
+
}
|
|
21
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Carousel as CarouselPrimitive, CarouselContent as CarouselContentPrimitive, CarouselIndicator as CarouselIndicatorPrimitive, CarouselIndicatorGroup as CarouselIndicatorGroupPrimitive, CarouselItem as CarouselItemPrimitive, CarouselNext as CarouselNextPrimitive, CarouselPrevious as CarouselPreviousPrimitive, CarouselViewport as CarouselViewportPrimitive } from "@ui-sdk/react/carousel";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
type CarouselProps = React.ComponentProps<typeof CarouselPrimitive> & {
|
|
4
|
+
/** `peek` shows the edge of the next card, like the App Store; `full` shows one page at a time. */
|
|
5
|
+
layout?: "peek" | "full";
|
|
6
|
+
};
|
|
7
|
+
/** A paging scroll view: slides snap into place, with glass arrows on pointer devices and page dots. */
|
|
8
|
+
declare function Carousel({ layout, className, ...props }: CarouselProps): React.JSX.Element;
|
|
9
|
+
declare function CarouselViewport({ className, ...props }: React.ComponentProps<typeof CarouselViewportPrimitive>): React.JSX.Element;
|
|
10
|
+
declare function CarouselContent({ className, ...props }: React.ComponentProps<typeof CarouselContentPrimitive>): React.JSX.Element;
|
|
11
|
+
declare function CarouselItem({ className, ...props }: React.ComponentProps<typeof CarouselItemPrimitive>): React.JSX.Element;
|
|
12
|
+
declare function CarouselPrevious({ className, children, "aria-label": ariaLabel, ...props }: React.ComponentProps<typeof CarouselPreviousPrimitive>): React.JSX.Element;
|
|
13
|
+
declare function CarouselNext({ className, children, "aria-label": ariaLabel, ...props }: React.ComponentProps<typeof CarouselNextPrimitive>): React.JSX.Element;
|
|
14
|
+
/** The page dots. Write one `CarouselIndicator` per slide; dots past the page count hide themselves. */
|
|
15
|
+
declare function CarouselIndicatorGroup({ className, ...props }: React.ComponentProps<typeof CarouselIndicatorGroupPrimitive>): React.JSX.Element;
|
|
16
|
+
declare function CarouselIndicator({ className, ...props }: React.ComponentProps<typeof CarouselIndicatorPrimitive>): React.JSX.Element;
|
|
17
|
+
export { Carousel, CarouselContent, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselNext, CarouselPrevious, CarouselViewport, };
|
|
18
|
+
export type { CarouselProps };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Carousel as CarouselPrimitive, CarouselContent as CarouselContentPrimitive, CarouselIndicator as CarouselIndicatorPrimitive, CarouselIndicatorGroup as CarouselIndicatorGroupPrimitive, CarouselItem as CarouselItemPrimitive, CarouselNext as CarouselNextPrimitive, CarouselPrevious as CarouselPreviousPrimitive, CarouselViewport as CarouselViewportPrimitive, } from "@ui-sdk/react/carousel";
|
|
3
|
+
import { cx } from "../lib/cx.js";
|
|
4
|
+
/** A paging scroll view: slides snap into place, with glass arrows on pointer devices and page dots. */
|
|
5
|
+
function Carousel({ layout = "peek", className, ...props }) {
|
|
6
|
+
return _jsx(CarouselPrimitive, { "data-layout": layout, className: cx("mb-carousel", className), ...props });
|
|
7
|
+
}
|
|
8
|
+
function CarouselViewport({ className, ...props }) {
|
|
9
|
+
return _jsx(CarouselViewportPrimitive, { className: cx("mb-carousel-viewport", className), ...props });
|
|
10
|
+
}
|
|
11
|
+
function CarouselContent({ className, ...props }) {
|
|
12
|
+
return _jsx(CarouselContentPrimitive, { className: cx("mb-carousel-content", className), ...props });
|
|
13
|
+
}
|
|
14
|
+
function CarouselItem({ className, ...props }) {
|
|
15
|
+
return _jsx(CarouselItemPrimitive, { className: cx("mb-carousel-item", className), ...props });
|
|
16
|
+
}
|
|
17
|
+
function ChevronIcon({ direction }) {
|
|
18
|
+
return (_jsx("svg", { viewBox: "0 0 10 16", "aria-hidden": "true", "data-direction": direction, children: _jsx("path", { d: direction === "previous" ? "M7.5 2 2 8l5.5 6" : "M2.5 2 8 8l-5.5 6" }) }));
|
|
19
|
+
}
|
|
20
|
+
function CarouselPrevious({ className, children, "aria-label": ariaLabel = "Previous", ...props }) {
|
|
21
|
+
return (_jsx(CarouselPreviousPrimitive, { "aria-label": ariaLabel, className: cx("mb-carousel-button mb-carousel-previous", className), ...props, children: children ?? _jsx(ChevronIcon, { direction: "previous" }) }));
|
|
22
|
+
}
|
|
23
|
+
function CarouselNext({ className, children, "aria-label": ariaLabel = "Next", ...props }) {
|
|
24
|
+
return (_jsx(CarouselNextPrimitive, { "aria-label": ariaLabel, className: cx("mb-carousel-button mb-carousel-next", className), ...props, children: children ?? _jsx(ChevronIcon, { direction: "next" }) }));
|
|
25
|
+
}
|
|
26
|
+
/** The page dots. Write one `CarouselIndicator` per slide; dots past the page count hide themselves. */
|
|
27
|
+
function CarouselIndicatorGroup({ className, ...props }) {
|
|
28
|
+
return _jsx(CarouselIndicatorGroupPrimitive, { className: cx("mb-carousel-indicators", className), ...props });
|
|
29
|
+
}
|
|
30
|
+
function CarouselIndicator({ className, ...props }) {
|
|
31
|
+
return _jsx(CarouselIndicatorPrimitive, { className: cx("mb-carousel-indicator", className), ...props });
|
|
32
|
+
}
|
|
33
|
+
export { Carousel, CarouselContent, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselNext, CarouselPrevious, CarouselViewport, };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ScrollArea, ScrollAreaContent, ScrollAreaScrollToEnd, ScrollAreaViewport } from "@ui-sdk/react/scroll-area";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type ChatProps = React.ComponentProps<typeof ScrollArea> & {
|
|
4
|
+
/**
|
|
5
|
+
* Set while a reply streams. The log is marked busy, so screen readers wait
|
|
6
|
+
* and read the finished reply instead of each word as it arrives.
|
|
7
|
+
*/
|
|
8
|
+
busy?: boolean;
|
|
9
|
+
};
|
|
10
|
+
/** The thread. It follows the reply while you're at the end and lets go when you scroll up. */
|
|
11
|
+
declare function Chat({ stickToEnd, type, busy, className, children, ...props }: ChatProps): React.JSX.Element;
|
|
12
|
+
/** The scrolling log of turns. Name it with `aria-label`. */
|
|
13
|
+
declare function ChatViewport({ "aria-label": ariaLabel, className, ...props }: React.ComponentProps<typeof ScrollAreaViewport>): React.JSX.Element;
|
|
14
|
+
/** The centered column the turns sit in, with even gaps between them. */
|
|
15
|
+
declare function ChatContent({ className, ...props }: React.ComponentProps<typeof ScrollAreaContent>): React.JSX.Element;
|
|
16
|
+
/** A floating glass button that jumps back to the latest turn. It shows only once you've scrolled away. */
|
|
17
|
+
declare function ChatScrollButton({ "aria-label": ariaLabel, className, children, ...props }: React.ComponentProps<typeof ScrollAreaScrollToEnd>): React.JSX.Element;
|
|
18
|
+
type ChatGreetingProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
19
|
+
/** A mark above the title, like your app's icon. Decorative. */
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
title: React.ReactNode;
|
|
22
|
+
description?: React.ReactNode;
|
|
23
|
+
/** The title's heading level. A new-chat screen's greeting is usually its page heading. */
|
|
24
|
+
level?: 1 | 2 | 3;
|
|
25
|
+
};
|
|
26
|
+
/** The empty state of a new chat: a large greeting, with the composer and suggestions as children. */
|
|
27
|
+
declare function ChatGreeting({ icon, title, description, level, className, children, ...props }: ChatGreetingProps): React.JSX.Element;
|
|
28
|
+
export { Chat, ChatContent, ChatGreeting, ChatScrollButton, ChatViewport };
|
|
29
|
+
export type { ChatGreetingProps, ChatProps };
|