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,33 @@
|
|
|
1
|
+
import { RadioGroup as RadioGroupPrimitive } from "@ui-sdk/react/radio";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
/** A light preset: a white by its color temperature, or a color by hue (0–360) and saturation (0–100). */
|
|
4
|
+
type LightSwatch = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
} & ({
|
|
8
|
+
kind: "temperature";
|
|
9
|
+
mireds: number;
|
|
10
|
+
} | {
|
|
11
|
+
kind: "color";
|
|
12
|
+
hue: number;
|
|
13
|
+
saturation: number;
|
|
14
|
+
});
|
|
15
|
+
/** HomeKit stores color temperature in mireds: a million divided by the kelvin. */
|
|
16
|
+
declare function kelvinToMired(kelvin: number): number;
|
|
17
|
+
declare function miredToKelvin(mireds: number): number;
|
|
18
|
+
/** The CSS color a swatch shows. Whites are softened toward white, as a lit bulb looks. */
|
|
19
|
+
declare function lightSwatchColor(swatch: LightSwatch): string;
|
|
20
|
+
declare const defaultLightSwatches: LightSwatch[];
|
|
21
|
+
type LightColorPickerProps = Omit<React.ComponentProps<typeof RadioGroupPrimitive>, "value" | "defaultValue" | "onValueChange" | "children"> & {
|
|
22
|
+
value?: string;
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
onValueChange?: (id: string) => void;
|
|
25
|
+
swatches?: LightSwatch[];
|
|
26
|
+
/** Names the group. */
|
|
27
|
+
label?: string;
|
|
28
|
+
/** Shown after the swatches, like a Color Well for a custom color. */
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
};
|
|
31
|
+
declare function LightColorPicker({ value, defaultValue, onValueChange, swatches, label, className, children, ...props }: LightColorPickerProps): React.JSX.Element;
|
|
32
|
+
export { defaultLightSwatches, kelvinToMired, LightColorPicker, lightSwatchColor, miredToKelvin };
|
|
33
|
+
export type { LightColorPickerProps, LightSwatch };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
// Client-only: the swatches are ui-sdk radios, which read the group's state from context.
|
|
4
|
+
import { Radio as RadioPrimitive, RadioGroup as RadioGroupPrimitive } from "@ui-sdk/react/radio";
|
|
5
|
+
import { cx } from "../lib/cx.js";
|
|
6
|
+
/** HomeKit stores color temperature in mireds: a million divided by the kelvin. */
|
|
7
|
+
function kelvinToMired(kelvin) {
|
|
8
|
+
return Math.round(1_000_000 / kelvin);
|
|
9
|
+
}
|
|
10
|
+
function miredToKelvin(mireds) {
|
|
11
|
+
return Math.round(1_000_000 / mireds / 100) * 100;
|
|
12
|
+
}
|
|
13
|
+
function clamp(value, min, max) {
|
|
14
|
+
return Math.min(max, Math.max(min, value));
|
|
15
|
+
}
|
|
16
|
+
// A blackbody approximation (Tanner Helland's fit), good enough to tint a swatch.
|
|
17
|
+
function kelvinToRgb(kelvin) {
|
|
18
|
+
const t = clamp(kelvin, 1000, 40000) / 100;
|
|
19
|
+
const r = t <= 66 ? 255 : 329.698727446 * (t - 60) ** -0.1332047592;
|
|
20
|
+
const g = t <= 66 ? 99.4708025861 * Math.log(t) - 161.1195681661 : 288.1221695283 * (t - 60) ** -0.0755148492;
|
|
21
|
+
const b = t >= 66 ? 255 : t <= 19 ? 0 : 138.5177312231 * Math.log(t - 10) - 305.0447927307;
|
|
22
|
+
return [r, g, b].map((channel) => Math.round(clamp(channel, 0, 255)));
|
|
23
|
+
}
|
|
24
|
+
/** The CSS color a swatch shows. Whites are softened toward white, as a lit bulb looks. */
|
|
25
|
+
function lightSwatchColor(swatch) {
|
|
26
|
+
if (swatch.kind === "color") {
|
|
27
|
+
return `hsl(${Math.round(swatch.hue)} ${Math.round(clamp(swatch.saturation, 0, 100))}% 55%)`;
|
|
28
|
+
}
|
|
29
|
+
const [r, g, b] = kelvinToRgb(1_000_000 / swatch.mireds);
|
|
30
|
+
return `color-mix(in oklch, rgb(${r} ${g} ${b}) 70%, white)`;
|
|
31
|
+
}
|
|
32
|
+
const temperature = (id, label, kelvin) => ({
|
|
33
|
+
id,
|
|
34
|
+
label: `${label}, ${kelvin} K`,
|
|
35
|
+
kind: "temperature",
|
|
36
|
+
mireds: kelvinToMired(kelvin),
|
|
37
|
+
});
|
|
38
|
+
const defaultLightSwatches = [
|
|
39
|
+
temperature("candle", "Candlelight", 2200),
|
|
40
|
+
temperature("warm", "Warm white", 2700),
|
|
41
|
+
temperature("soft", "Soft white", 3500),
|
|
42
|
+
temperature("neutral", "Neutral white", 4500),
|
|
43
|
+
temperature("daylight", "Daylight", 6500),
|
|
44
|
+
{ id: "red", label: "Red", kind: "color", hue: 4, saturation: 90 },
|
|
45
|
+
{ id: "orange", label: "Orange", kind: "color", hue: 30, saturation: 95 },
|
|
46
|
+
{ id: "green", label: "Green", kind: "color", hue: 130, saturation: 70 },
|
|
47
|
+
{ id: "blue", label: "Blue", kind: "color", hue: 215, saturation: 90 },
|
|
48
|
+
{ id: "purple", label: "Purple", kind: "color", hue: 280, saturation: 75 },
|
|
49
|
+
];
|
|
50
|
+
function LightColorPicker({ value, defaultValue, onValueChange, swatches = defaultLightSwatches, label = "Color", className, children, ...props }) {
|
|
51
|
+
return (_jsxs(RadioGroupPrimitive, { "aria-label": label, value: value, defaultValue: defaultValue, onValueChange: (next) => {
|
|
52
|
+
if (typeof next === "string")
|
|
53
|
+
onValueChange?.(next);
|
|
54
|
+
}, className: cx("mb-light-color-picker", className), ...props, children: [swatches.map((swatch) => (_jsx(RadioPrimitive, { value: swatch.id, "aria-label": swatch.label, "data-kind": swatch.kind, className: "mb-light-color-picker-swatch", style: { "--mb-light-swatch": lightSwatchColor(swatch) } }, swatch.id))), children] }));
|
|
55
|
+
}
|
|
56
|
+
export { defaultLightSwatches, kelvinToMired, LightColorPicker, lightSwatchColor, miredToKelvin };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Button as ButtonPrimitive } from "@ui-sdk/react/button";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
import type { SystemColor } from "../lib/theme.js";
|
|
4
|
+
type ListVariant = "inset-grouped" | "grouped" | "plain";
|
|
5
|
+
type ListProps = React.ComponentProps<"div"> & {
|
|
6
|
+
/** `inset-grouped` is iOS Settings and macOS System Settings; `plain` runs edge to edge. */
|
|
7
|
+
variant?: ListVariant;
|
|
8
|
+
};
|
|
9
|
+
declare function List({ variant, className, ...props }: ListProps): React.JSX.Element;
|
|
10
|
+
type ListSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
11
|
+
header?: React.ReactNode;
|
|
12
|
+
footer?: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
/** A group of rows with an optional header above and footer below. */
|
|
15
|
+
declare function ListSection({ header, footer, className, children, ...props }: ListSectionProps): React.JSX.Element;
|
|
16
|
+
type ListRowProps = Omit<React.ComponentProps<typeof ButtonPrimitive>, "className"> & {
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Makes the row a link. Use `render` for a router's link component. */
|
|
19
|
+
href?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A row. It's a button with `onClick`, a link with `href` or `render`, and
|
|
23
|
+
* static otherwise, which is what a row holding its own control (a Switch) needs.
|
|
24
|
+
*/
|
|
25
|
+
declare function ListRow({ href, render, onClick, className, children, disabled, ...props }: ListRowProps): React.JSX.Element;
|
|
26
|
+
type ListRowIconProps = React.ComponentProps<"span"> & {
|
|
27
|
+
/** The tile's color, from the system palette. */
|
|
28
|
+
color?: SystemColor | "gray" | "accent";
|
|
29
|
+
};
|
|
30
|
+
/** The rounded, colored icon tile of a Settings row. Put a white glyph inside. */
|
|
31
|
+
declare function ListRowIcon({ color, className, ...props }: ListRowIconProps): React.JSX.Element;
|
|
32
|
+
declare function ListRowTitle({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
33
|
+
declare function ListRowSubtitle({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
34
|
+
/** The secondary text at the trailing edge, like the network a Wi-Fi row is joined to. */
|
|
35
|
+
declare function ListRowValue({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
36
|
+
type ListRowAccessoryProps = React.ComponentProps<"span"> & {
|
|
37
|
+
/** A standard glyph. Leave it out and pass children for a control, like a Switch. */
|
|
38
|
+
type?: "disclosure" | "checkmark" | "info";
|
|
39
|
+
};
|
|
40
|
+
declare function ListRowAccessory({ type, className, children, ...props }: ListRowAccessoryProps): React.JSX.Element;
|
|
41
|
+
export { List, ListRow, ListRowAccessory, ListRowIcon, ListRowSubtitle, ListRowTitle, ListRowValue, ListSection };
|
|
42
|
+
export type { ListProps, ListRowAccessoryProps, ListRowIconProps, ListRowProps, ListSectionProps, ListVariant };
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
function List({ variant = "inset-grouped", className, ...props }) {
|
|
6
|
+
return _jsx("div", { "data-variant": variant, className: join("mb-list", className), ...props });
|
|
7
|
+
}
|
|
8
|
+
/** A group of rows with an optional header above and footer below. */
|
|
9
|
+
function ListSection({ header, footer, className, children, ...props }) {
|
|
10
|
+
return (_jsxs("section", { className: join("mb-list-section", className), ...props, children: [header ? _jsx("div", { className: "mb-list-section-header", children: header }) : null, _jsx("div", { className: "mb-list-group", children: children }), footer ? _jsx("div", { className: "mb-list-section-footer", children: footer }) : null] }));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A row. It's a button with `onClick`, a link with `href` or `render`, and
|
|
14
|
+
* static otherwise, which is what a row holding its own control (a Switch) needs.
|
|
15
|
+
*/
|
|
16
|
+
function ListRow({ href, render, onClick, className, children, disabled, ...props }) {
|
|
17
|
+
const interactive = href !== undefined || render !== undefined || onClick !== undefined;
|
|
18
|
+
return (_jsx("div", { className: "mb-list-item", "data-disabled": disabled ? "" : undefined, children: interactive ? (_jsx(ButtonPrimitive, { render: render ?? (href !== undefined ? _jsx("a", { href: href }) : undefined), onClick: onClick, disabled: disabled, "data-interactive": "", className: join("mb-list-row", className), ...props, children: children })) : (_jsx("div", { className: join("mb-list-row", className), "data-disabled": disabled ? "" : undefined, ...props, children: children })) }));
|
|
19
|
+
}
|
|
20
|
+
/** The rounded, colored icon tile of a Settings row. Put a white glyph inside. */
|
|
21
|
+
function ListRowIcon({ color = "gray", className, ...props }) {
|
|
22
|
+
return _jsx("span", { "aria-hidden": "true", "data-color": color, className: join("mb-list-row-icon", className), ...props });
|
|
23
|
+
}
|
|
24
|
+
function ListRowTitle({ className, ...props }) {
|
|
25
|
+
return _jsx("span", { className: join("mb-list-row-title", className), ...props });
|
|
26
|
+
}
|
|
27
|
+
function ListRowSubtitle({ className, ...props }) {
|
|
28
|
+
return _jsx("span", { className: join("mb-list-row-subtitle", className), ...props });
|
|
29
|
+
}
|
|
30
|
+
/** The secondary text at the trailing edge, like the network a Wi-Fi row is joined to. */
|
|
31
|
+
function ListRowValue({ className, ...props }) {
|
|
32
|
+
return _jsx("span", { className: join("mb-list-row-value", className), ...props });
|
|
33
|
+
}
|
|
34
|
+
const glyphs = {
|
|
35
|
+
disclosure: (_jsx("svg", { viewBox: "0 0 8 14", "aria-hidden": "true", children: _jsx("path", { d: "M1.5 1.5 6.5 7l-5 5.5" }) })),
|
|
36
|
+
checkmark: (_jsx("svg", { viewBox: "0 0 16 14", "aria-hidden": "true", children: _jsx("path", { d: "M1.75 7.75 6 12 14.25 1.75" }) })),
|
|
37
|
+
info: (_jsxs("svg", { viewBox: "0 0 22 22", "aria-hidden": "true", children: [_jsx("circle", { cx: "11", cy: "11", r: "9.75" }), _jsx("path", { d: "M11 9.75v6" }), _jsx("circle", { cx: "11", cy: "6.4", r: "0.6" })] })),
|
|
38
|
+
};
|
|
39
|
+
function ListRowAccessory({ type, className, children, ...props }) {
|
|
40
|
+
return (_jsx("span", { "data-type": type, className: join("mb-list-row-accessory", className), ...props, children: type ? glyphs[type] : children }));
|
|
41
|
+
}
|
|
42
|
+
export { List, ListRow, ListRowAccessory, ListRowIcon, ListRowSubtitle, ListRowTitle, ListRowValue, ListSection };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createListboxController, ListboxGroup as ListboxGroupPrimitive, ListboxGroupLabel as ListboxGroupLabelPrimitive, ListboxItem as ListboxItemPrimitive, ListboxItemIcon as ListboxItemIconPrimitive, ListboxItemIndicator as ListboxItemIndicatorPrimitive, ListboxItems, ListboxSeparator as ListboxSeparatorPrimitive } from "@ui-sdk/react/listbox";
|
|
2
|
+
import type { ListboxProps } from "@ui-sdk/react/listbox";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
/** An always-visible list you select from, like a Mac table or an iOS choice list. */
|
|
5
|
+
declare function Listbox<T = string, Multiple extends boolean | undefined = false>(props: ListboxProps<T, Multiple>): React.JSX.Element;
|
|
6
|
+
/** A row. Selection is a solid fill on the Mac and a trailing checkmark on iOS, which it renders. */
|
|
7
|
+
declare function ListboxItem<T = string>({ className, children, ...props }: Omit<React.ComponentProps<typeof ListboxItemPrimitive<T>>, "children"> & {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare function ListboxItemIndicator({ keepMounted, className, children, ...props }: React.ComponentProps<typeof ListboxItemIndicatorPrimitive>): React.JSX.Element;
|
|
11
|
+
declare function ListboxItemIcon({ className, ...props }: React.ComponentProps<typeof ListboxItemIconPrimitive>): React.JSX.Element;
|
|
12
|
+
declare function ListboxGroup({ className, ...props }: React.ComponentProps<typeof ListboxGroupPrimitive>): React.JSX.Element;
|
|
13
|
+
declare function ListboxGroupLabel({ className, ...props }: React.ComponentProps<typeof ListboxGroupLabelPrimitive>): React.JSX.Element;
|
|
14
|
+
declare function ListboxSeparator({ className, ...props }: React.ComponentProps<typeof ListboxSeparatorPrimitive>): React.JSX.Element;
|
|
15
|
+
export { createListboxController, Listbox, ListboxGroup, ListboxGroupLabel, ListboxItem, ListboxItemIcon, ListboxItemIndicator, ListboxItems, ListboxSeparator, };
|
|
16
|
+
export type { ListboxProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createListboxController, Listbox as ListboxPrimitive, ListboxGroup as ListboxGroupPrimitive, ListboxGroupLabel as ListboxGroupLabelPrimitive, ListboxItem as ListboxItemPrimitive, ListboxItemIcon as ListboxItemIconPrimitive, ListboxItemIndicator as ListboxItemIndicatorPrimitive, ListboxItems, ListboxSeparator as ListboxSeparatorPrimitive, } from "@ui-sdk/react/listbox";
|
|
3
|
+
import { cx } from "../lib/cx.js";
|
|
4
|
+
import { CheckGlyph } from "../lib/menu-glyphs.js";
|
|
5
|
+
/** An always-visible list you select from, like a Mac table or an iOS choice list. */
|
|
6
|
+
function Listbox(props) {
|
|
7
|
+
return _jsx(ListboxPrimitive, { ...props, className: cx("mb-listbox", props.className) });
|
|
8
|
+
}
|
|
9
|
+
/** A row. Selection is a solid fill on the Mac and a trailing checkmark on iOS, which it renders. */
|
|
10
|
+
function ListboxItem({ className, children, ...props }) {
|
|
11
|
+
return (_jsxs(ListboxItemPrimitive, { className: cx("mb-listbox-item", className), ...props, children: [children, _jsx(ListboxItemIndicator, {})] }));
|
|
12
|
+
}
|
|
13
|
+
function ListboxItemIndicator({ keepMounted = true, className, children, ...props }) {
|
|
14
|
+
return (_jsx(ListboxItemIndicatorPrimitive, { keepMounted: keepMounted, className: cx("mb-listbox-item-indicator", className), ...props, children: children ?? _jsx(CheckGlyph, {}) }));
|
|
15
|
+
}
|
|
16
|
+
function ListboxItemIcon({ className, ...props }) {
|
|
17
|
+
return _jsx(ListboxItemIconPrimitive, { className: cx("mb-listbox-item-icon", className), ...props });
|
|
18
|
+
}
|
|
19
|
+
function ListboxGroup({ className, ...props }) {
|
|
20
|
+
return _jsx(ListboxGroupPrimitive, { className: cx("mb-listbox-group", className), ...props });
|
|
21
|
+
}
|
|
22
|
+
function ListboxGroupLabel({ className, ...props }) {
|
|
23
|
+
return _jsx(ListboxGroupLabelPrimitive, { className: cx("mb-listbox-group-label", className), ...props });
|
|
24
|
+
}
|
|
25
|
+
function ListboxSeparator({ className, ...props }) {
|
|
26
|
+
return _jsx(ListboxSeparatorPrimitive, { className: cx("mb-listbox-separator", className), ...props });
|
|
27
|
+
}
|
|
28
|
+
export { createListboxController, Listbox, ListboxGroup, ListboxGroupLabel, ListboxItem, ListboxItemIcon, ListboxItemIndicator, ListboxItems, ListboxSeparator, };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type LockState = "secured" | "unsecured" | "jammed" | "unknown";
|
|
3
|
+
type LockTarget = "secured" | "unsecured";
|
|
4
|
+
type LockControlProps = Omit<React.ComponentProps<"div">, "children"> & {
|
|
5
|
+
/** The lock's current state, from HomeKit's lock mechanism current state. */
|
|
6
|
+
state: LockState;
|
|
7
|
+
/** What it was last asked to do. While it differs from `state`, the control shows Locking… or Unlocking…. */
|
|
8
|
+
target?: LockTarget;
|
|
9
|
+
onTargetChange?: (target: LockTarget) => void;
|
|
10
|
+
/** The lock's name, like "Front door". */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Asks before unlocking, as the HIG asks for actions that affect security. */
|
|
13
|
+
confirmUnlock?: boolean;
|
|
14
|
+
/** The explanation in the unlock alert. */
|
|
15
|
+
confirmDescription?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare function LockControl({ state, target, onTargetChange, name, confirmUnlock, confirmDescription, disabled, className, ...props }: LockControlProps): React.JSX.Element;
|
|
19
|
+
export { LockControl };
|
|
20
|
+
export type { LockControlProps, LockState, LockTarget };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
// Client-only: it holds the confirmation alert's open state.
|
|
4
|
+
import { Button as ButtonPrimitive } from "@ui-sdk/react/button";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { join } from "../lib/cx.js";
|
|
7
|
+
import { Alert, AlertAction, AlertActions, AlertContent, AlertDescription, AlertTitle } from "./alert.js";
|
|
8
|
+
function LockGlyph() {
|
|
9
|
+
return (_jsxs("svg", { viewBox: "0 0 48 48", "aria-hidden": "true", className: "mb-lock-control-glyph", children: [_jsx("path", { className: "mb-lock-control-shackle", d: "M15 22v-6.5a9 9 0 0 1 18 0V22" }), _jsx("path", { className: "mb-lock-control-body", fillRule: "evenodd", d: "M15.5 21h17a5.5 5.5 0 0 1 5.5 5.5v10a5.5 5.5 0 0 1-5.5 5.5h-17a5.5 5.5 0 0 1-5.5-5.5v-10a5.5 5.5 0 0 1 5.5-5.5ZM24 27.5a2.8 2.8 0 0 0-1.4 5.22V36h2.8v-3.28A2.8 2.8 0 0 0 24 27.5Z" })] }));
|
|
10
|
+
}
|
|
11
|
+
const STATUS = {
|
|
12
|
+
secured: "Locked",
|
|
13
|
+
unsecured: "Unlocked",
|
|
14
|
+
jammed: "Jammed",
|
|
15
|
+
unknown: "Status unknown",
|
|
16
|
+
};
|
|
17
|
+
function LockControl({ state, target, onTargetChange, name, confirmUnlock = true, confirmDescription, disabled, className, ...props }) {
|
|
18
|
+
const [asking, setAsking] = React.useState(false);
|
|
19
|
+
const pending = target !== undefined && target !== state && state !== "jammed";
|
|
20
|
+
const goal = pending ? target : state;
|
|
21
|
+
const next = goal === "secured" ? "unsecured" : "secured";
|
|
22
|
+
const status = pending ? (target === "secured" ? "Locking…" : "Unlocking…") : STATUS[state];
|
|
23
|
+
const action = `${next === "secured" ? "Lock" : "Unlock"} ${name}`;
|
|
24
|
+
return (_jsxs("div", { "data-state": state, "data-position": goal === "secured" ? "locked" : "unlocked", "data-pending": pending ? "" : undefined, className: join("mb-lock-control", className), ...props, children: [_jsx(ButtonPrimitive, { "aria-label": action, disabled: disabled, className: "mb-lock-control-button", onClick: () => {
|
|
25
|
+
if (next === "unsecured" && confirmUnlock)
|
|
26
|
+
setAsking(true);
|
|
27
|
+
else
|
|
28
|
+
onTargetChange?.(next);
|
|
29
|
+
}, children: _jsx(LockGlyph, {}) }), _jsx("span", { className: "mb-lock-control-status", "aria-live": "polite", children: status }), _jsx(Alert, { open: asking, onOpenChange: (open, details) => {
|
|
30
|
+
setAsking(open);
|
|
31
|
+
if (!open && details?.returnValue === "unlock")
|
|
32
|
+
onTargetChange?.("unsecured");
|
|
33
|
+
}, children: _jsxs(AlertContent, { children: [_jsxs(AlertTitle, { children: ["Unlock ", name, "?"] }), _jsx(AlertDescription, { children: confirmDescription ?? "Anyone at the door will be able to open it." }), _jsxs(AlertActions, { children: [_jsx(AlertAction, { variant: "cancel", children: "Cancel" }), _jsx(AlertAction, { variant: "primary", value: "unlock", children: "Unlock" })] })] }) })] }));
|
|
34
|
+
}
|
|
35
|
+
export { LockControl };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MenuContent as MenuContentPrimitive, MenuTrigger as MenuTriggerPrimitive } from "@ui-sdk/react/menu";
|
|
2
|
+
import { Menubar } from "@ui-sdk/react/menubar";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
/** The Mac's menu bar: one tab stop, arrow keys between menus. Put a `Menu` per title inside. */
|
|
5
|
+
declare function MenuBar({ className, ...props }: React.ComponentProps<typeof Menubar>): React.JSX.Element;
|
|
6
|
+
type MenuBarTriggerProps = React.ComponentProps<typeof MenuTriggerPrimitive> & {
|
|
7
|
+
/** The application menu's title, set in bold. */
|
|
8
|
+
app?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare function MenuBarTrigger({ app, className, ...props }: MenuBarTriggerProps): React.JSX.Element;
|
|
11
|
+
/** A menu bar's menu: it hangs from the bar and doesn't scale in. */
|
|
12
|
+
declare function MenuBarContent<Payload = unknown>({ sideOffset, className, ...props }: React.ComponentProps<typeof MenuContentPrimitive<Payload>>): React.JSX.Element;
|
|
13
|
+
export { MenuBar, MenuBarContent, MenuBarTrigger };
|
|
14
|
+
export type { MenuBarTriggerProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { MenuContent as MenuContentPrimitive, MenuTrigger as MenuTriggerPrimitive } from "@ui-sdk/react/menu";
|
|
3
|
+
import { Menubar } from "@ui-sdk/react/menubar";
|
|
4
|
+
import { cx } from "../lib/cx.js";
|
|
5
|
+
/** The Mac's menu bar: one tab stop, arrow keys between menus. Put a `Menu` per title inside. */
|
|
6
|
+
function MenuBar({ className, ...props }) {
|
|
7
|
+
return _jsx(Menubar, { className: cx("mb-menu-bar", className), ...props });
|
|
8
|
+
}
|
|
9
|
+
function MenuBarTrigger({ app, className, ...props }) {
|
|
10
|
+
return (_jsx(MenuTriggerPrimitive, { "data-app": app ? "" : undefined, className: cx("mb-menu-bar-trigger", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
/** A menu bar's menu: it hangs from the bar and doesn't scale in. */
|
|
13
|
+
function MenuBarContent({ sideOffset = 3, className, ...props }) {
|
|
14
|
+
return (_jsx(MenuContentPrimitive, { sideOffset: sideOffset, className: cx("mb-menu-content mb-menu-bar-content", className), ...props }));
|
|
15
|
+
}
|
|
16
|
+
export { MenuBar, MenuBarContent, MenuBarTrigger };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Menu, MenuCheckboxItem as MenuCheckboxItemPrimitive, MenuContent as MenuContentPrimitive, MenuContextTrigger as MenuContextTriggerPrimitive, MenuGroup as MenuGroupPrimitive, MenuGroupLabel as MenuGroupLabelPrimitive, MenuItem as MenuItemPrimitive, MenuItemIcon as MenuItemIconPrimitive, MenuItemIndicator as MenuItemIndicatorPrimitive, MenuItems, MenuRadioGroup as MenuRadioGroupPrimitive, MenuRadioItem as MenuRadioItemPrimitive, MenuSeparator as MenuSeparatorPrimitive, MenuShortcut as MenuShortcutPrimitive, MenuSub, MenuSubContent as MenuSubContentPrimitive, MenuSubTrigger as MenuSubTriggerPrimitive, MenuTrigger as MenuTriggerPrimitive, createMenuController } from "@ui-sdk/react/menu";
|
|
2
|
+
import type { MenuProps, MenuSubProps } from "@ui-sdk/react/menu";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
import type { ButtonShape, ButtonSize, ButtonTone, ButtonVariant } from "./button.js";
|
|
5
|
+
type MenuTriggerProps = Omit<React.ComponentProps<typeof MenuTriggerPrimitive>, "children"> & {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
tone?: ButtonTone;
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
shape?: ButtonShape;
|
|
11
|
+
/** Shows the pull-down chevron after the label. Turn it off for icon-only triggers. */
|
|
12
|
+
indicator?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** A pull-down button: a macbetter button that opens its menu. */
|
|
15
|
+
declare function MenuTrigger({ variant, tone, size, shape, indicator, className, children, ...props }: MenuTriggerProps): React.JSX.Element;
|
|
16
|
+
declare function MenuContextTrigger({ className, ...props }: React.ComponentProps<typeof MenuContextTriggerPrimitive>): React.JSX.Element;
|
|
17
|
+
declare function MenuContent<Payload = unknown>({ sideOffset, className, ...props }: React.ComponentProps<typeof MenuContentPrimitive<Payload>>): React.JSX.Element;
|
|
18
|
+
declare function MenuSubContent<Payload = unknown>({ sideOffset, className, ...props }: React.ComponentProps<typeof MenuSubContentPrimitive<Payload>>): React.JSX.Element;
|
|
19
|
+
declare function MenuItem({ className, ...props }: React.ComponentProps<typeof MenuItemPrimitive>): React.JSX.Element;
|
|
20
|
+
declare function MenuItemIndicator({ keepMounted, className, children, ...props }: React.ComponentProps<typeof MenuItemIndicatorPrimitive>): React.JSX.Element;
|
|
21
|
+
/** A setting that toggles. Renders its own checkmark in the menu's leading column. */
|
|
22
|
+
declare function MenuCheckboxItem({ className, children, ...props }: Omit<React.ComponentProps<typeof MenuCheckboxItemPrimitive>, "children"> & {
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}): React.JSX.Element;
|
|
25
|
+
/** One choice in a radio group. Apple menus mark it with a checkmark, like a checkbox item. */
|
|
26
|
+
declare function MenuRadioItem({ className, children, ...props }: Omit<React.ComponentProps<typeof MenuRadioItemPrimitive>, "children"> & {
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
}): React.JSX.Element;
|
|
29
|
+
declare function MenuRadioGroup<T extends string = string>({ className, ...props }: React.ComponentProps<typeof MenuRadioGroupPrimitive<T>>): React.JSX.Element;
|
|
30
|
+
declare function MenuItemIcon({ className, ...props }: React.ComponentProps<typeof MenuItemIconPrimitive>): React.JSX.Element;
|
|
31
|
+
declare function MenuShortcut({ className, ...props }: React.ComponentProps<typeof MenuShortcutPrimitive>): React.JSX.Element;
|
|
32
|
+
declare function MenuGroup({ className, ...props }: React.ComponentProps<typeof MenuGroupPrimitive>): React.JSX.Element;
|
|
33
|
+
declare function MenuGroupLabel({ className, ...props }: React.ComponentProps<typeof MenuGroupLabelPrimitive>): React.JSX.Element;
|
|
34
|
+
declare function MenuSeparator({ className, ...props }: React.ComponentProps<typeof MenuSeparatorPrimitive>): React.JSX.Element;
|
|
35
|
+
/** Opens a submenu. Renders its own trailing chevron. */
|
|
36
|
+
declare function MenuSubTrigger({ className, children, ...props }: Omit<React.ComponentProps<typeof MenuSubTriggerPrimitive>, "children"> & {
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
}): React.JSX.Element;
|
|
39
|
+
export { createMenuController, Menu, MenuCheckboxItem, MenuContent, MenuContextTrigger, MenuGroup, MenuGroupLabel, MenuItem, MenuItemIcon, MenuItemIndicator, MenuItems, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, };
|
|
40
|
+
export type { MenuProps, MenuSubProps, MenuTriggerProps };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Menu, MenuCheckboxItem as MenuCheckboxItemPrimitive, MenuContent as MenuContentPrimitive, MenuContextTrigger as MenuContextTriggerPrimitive, MenuGroup as MenuGroupPrimitive, MenuGroupLabel as MenuGroupLabelPrimitive, MenuItem as MenuItemPrimitive, MenuItemIcon as MenuItemIconPrimitive, MenuItemIndicator as MenuItemIndicatorPrimitive, MenuItems, MenuRadioGroup as MenuRadioGroupPrimitive, MenuRadioItem as MenuRadioItemPrimitive, MenuSeparator as MenuSeparatorPrimitive, MenuShortcut as MenuShortcutPrimitive, MenuSub, MenuSubContent as MenuSubContentPrimitive, MenuSubTrigger as MenuSubTriggerPrimitive, MenuTrigger as MenuTriggerPrimitive, createMenuController, } from "@ui-sdk/react/menu";
|
|
3
|
+
import { cx } from "../lib/cx.js";
|
|
4
|
+
import { CheckGlyph, ChevronGlyph } from "../lib/menu-glyphs.js";
|
|
5
|
+
/** A pull-down button: a macbetter button that opens its menu. */
|
|
6
|
+
function MenuTrigger({ variant = "bezeled", tone = "accent", size = "md", shape = "auto", indicator = true, className, children, ...props }) {
|
|
7
|
+
return (_jsxs(MenuTriggerPrimitive, { "data-variant": variant, "data-tone": tone, "data-size": size, "data-shape": shape, className: cx("mb-button mb-menu-trigger", className), ...props, children: [children, indicator ? (_jsx("span", { className: "mb-menu-trigger-indicator", "aria-hidden": "true", children: _jsx(ChevronGlyph, { direction: "down" }) })) : null] }));
|
|
8
|
+
}
|
|
9
|
+
function MenuContextTrigger({ className, ...props }) {
|
|
10
|
+
return _jsx(MenuContextTriggerPrimitive, { className: cx("mb-menu-context-trigger", className), ...props });
|
|
11
|
+
}
|
|
12
|
+
function MenuContent({ sideOffset = 4, className, ...props }) {
|
|
13
|
+
return (_jsx(MenuContentPrimitive, { sideOffset: sideOffset, className: cx("mb-menu-content", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function MenuSubContent({ sideOffset = 0, className, ...props }) {
|
|
16
|
+
return (_jsx(MenuSubContentPrimitive, { sideOffset: sideOffset, className: cx("mb-menu-content", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function MenuItem({ className, ...props }) {
|
|
19
|
+
return _jsx(MenuItemPrimitive, { className: cx("mb-menu-item", className), ...props });
|
|
20
|
+
}
|
|
21
|
+
function MenuItemIndicator({ keepMounted = true, className, children, ...props }) {
|
|
22
|
+
return (_jsx(MenuItemIndicatorPrimitive, { keepMounted: keepMounted, className: cx("mb-menu-item-indicator", className), ...props, children: children ?? _jsx(CheckGlyph, {}) }));
|
|
23
|
+
}
|
|
24
|
+
/** A setting that toggles. Renders its own checkmark in the menu's leading column. */
|
|
25
|
+
function MenuCheckboxItem({ className, children, ...props }) {
|
|
26
|
+
return (_jsxs(MenuCheckboxItemPrimitive, { className: cx("mb-menu-item mb-menu-checkable", className), ...props, children: [_jsx(MenuItemIndicator, {}), children] }));
|
|
27
|
+
}
|
|
28
|
+
/** One choice in a radio group. Apple menus mark it with a checkmark, like a checkbox item. */
|
|
29
|
+
function MenuRadioItem({ className, children, ...props }) {
|
|
30
|
+
return (_jsxs(MenuRadioItemPrimitive, { className: cx("mb-menu-item mb-menu-checkable", className), ...props, children: [_jsx(MenuItemIndicator, {}), children] }));
|
|
31
|
+
}
|
|
32
|
+
function MenuRadioGroup({ className, ...props }) {
|
|
33
|
+
return _jsx(MenuRadioGroupPrimitive, { className: cx("mb-menu-group", className), ...props });
|
|
34
|
+
}
|
|
35
|
+
function MenuItemIcon({ className, ...props }) {
|
|
36
|
+
return _jsx(MenuItemIconPrimitive, { className: cx("mb-menu-item-icon", className), ...props });
|
|
37
|
+
}
|
|
38
|
+
function MenuShortcut({ className, ...props }) {
|
|
39
|
+
return _jsx(MenuShortcutPrimitive, { className: cx("mb-menu-shortcut", className), ...props });
|
|
40
|
+
}
|
|
41
|
+
function MenuGroup({ className, ...props }) {
|
|
42
|
+
return _jsx(MenuGroupPrimitive, { className: cx("mb-menu-group", className), ...props });
|
|
43
|
+
}
|
|
44
|
+
function MenuGroupLabel({ className, ...props }) {
|
|
45
|
+
return _jsx(MenuGroupLabelPrimitive, { className: cx("mb-menu-group-label", className), ...props });
|
|
46
|
+
}
|
|
47
|
+
function MenuSeparator({ className, ...props }) {
|
|
48
|
+
return _jsx(MenuSeparatorPrimitive, { className: cx("mb-menu-separator", className), ...props });
|
|
49
|
+
}
|
|
50
|
+
/** Opens a submenu. Renders its own trailing chevron. */
|
|
51
|
+
function MenuSubTrigger({ className, children, ...props }) {
|
|
52
|
+
return (_jsxs(MenuSubTriggerPrimitive, { className: cx("mb-menu-item mb-menu-sub-trigger", className), ...props, children: [children, _jsx("span", { className: "mb-menu-sub-trigger-indicator", "aria-hidden": "true", children: _jsx(ChevronGlyph, { direction: "right" }) })] }));
|
|
53
|
+
}
|
|
54
|
+
export { createMenuController, Menu, MenuCheckboxItem, MenuContent, MenuContextTrigger, MenuGroup, MenuGroupLabel, MenuItem, MenuItemIcon, MenuItemIndicator, MenuItems, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Toggle as TogglePrimitive } from "@ui-sdk/react/toggle";
|
|
2
|
+
import { Toolbar as ToolbarPrimitive, ToolbarButton as ToolbarButtonPrimitive } from "@ui-sdk/react/toolbar";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { type MenuProps } from "./menu.js";
|
|
5
|
+
type MessageFrom = "user" | "assistant";
|
|
6
|
+
type MessageProps = React.ComponentProps<"article"> & {
|
|
7
|
+
/** Who wrote the turn. The person's turn is a trailing bubble; the assistant's is plain text. */
|
|
8
|
+
from?: MessageFrom;
|
|
9
|
+
/**
|
|
10
|
+
* Keeps the actions in view. The last message in a thread shows them anyway;
|
|
11
|
+
* older ones show them on hover or focus on pointer devices.
|
|
12
|
+
*/
|
|
13
|
+
latest?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/** One turn in a conversation. */
|
|
16
|
+
declare function Message({ from, latest, className, ...props }: MessageProps): React.JSX.Element;
|
|
17
|
+
/** The body of a turn: a bubble for the person, a `Response` for the assistant. */
|
|
18
|
+
declare function MessageContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
19
|
+
type MessageBubbleProps = React.ComponentProps<"div"> & {
|
|
20
|
+
/** `accent` fills with the theme's accent; `neutral` is a quiet gray fill. */
|
|
21
|
+
variant?: "accent" | "neutral";
|
|
22
|
+
};
|
|
23
|
+
declare function MessageBubble({ variant, className, ...props }: MessageBubbleProps): React.JSX.Element;
|
|
24
|
+
/** Files and images sent with the turn, above its bubble. */
|
|
25
|
+
declare function MessageAttachments({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
26
|
+
/** Small secondary text under a turn: the time, the model, "Edited". */
|
|
27
|
+
declare function MessageMeta({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
28
|
+
/** The row of actions under a turn: one tab stop, arrow keys between them. */
|
|
29
|
+
declare function MessageActions({ "aria-label": ariaLabel, className, ...props }: React.ComponentProps<typeof ToolbarPrimitive>): React.JSX.Element;
|
|
30
|
+
type MessageActionProps = Omit<React.ComponentProps<typeof ToolbarButtonPrimitive>, "children"> & {
|
|
31
|
+
/** Names the button for assistive tech and shows as its tooltip. */
|
|
32
|
+
label: string;
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
};
|
|
35
|
+
/** An icon button in `MessageActions`, named by `label` and showing it as a tooltip. */
|
|
36
|
+
declare function MessageAction({ label, className, children, ...props }: MessageActionProps): React.JSX.Element;
|
|
37
|
+
type MessageActionToggleProps = Omit<React.ComponentProps<typeof TogglePrimitive>, "children"> & {
|
|
38
|
+
label: string;
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
};
|
|
41
|
+
/** An action that stays pressed, like Good response or Bad response. */
|
|
42
|
+
declare function MessageActionToggle({ label, className, children, ...props }: MessageActionToggleProps): React.JSX.Element;
|
|
43
|
+
type MessageActionMenuProps = Omit<MenuProps, "children"> & {
|
|
44
|
+
/** Names the button and shows as its tooltip. */
|
|
45
|
+
label?: string;
|
|
46
|
+
/** The button's glyph. An ellipsis by default. */
|
|
47
|
+
icon?: React.ReactNode;
|
|
48
|
+
className?: string;
|
|
49
|
+
/** The menu's items. */
|
|
50
|
+
children?: React.ReactNode;
|
|
51
|
+
};
|
|
52
|
+
/** An action that opens a menu of more actions, like Branch, Share and Report. */
|
|
53
|
+
declare function MessageActionMenu({ label, icon, className, children, ...props }: MessageActionMenuProps): React.JSX.Element;
|
|
54
|
+
type MessageActionCopyProps = Omit<MessageActionProps, "label" | "children"> & {
|
|
55
|
+
/** What's copied: the reply's plain text, or a function that returns it when pressed. */
|
|
56
|
+
text: string | (() => string);
|
|
57
|
+
label?: string;
|
|
58
|
+
/** The label while the check shows, after a copy. */
|
|
59
|
+
copiedLabel?: string;
|
|
60
|
+
onCopy?: (text: string) => void;
|
|
61
|
+
};
|
|
62
|
+
/** Copies the reply and shows a check for two seconds. */
|
|
63
|
+
declare function MessageActionCopy({ text, label, copiedLabel, onCopy, onClick, ...props }: MessageActionCopyProps): React.JSX.Element;
|
|
64
|
+
export { Message, MessageAction, MessageActionCopy, MessageActionMenu, MessageActions, MessageActionToggle, MessageAttachments, MessageBubble, MessageContent, MessageMeta, };
|
|
65
|
+
export type { MessageActionCopyProps, MessageActionMenuProps, MessageActionProps, MessageActionToggleProps, MessageBubbleProps, MessageFrom, MessageProps, };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { MenuTrigger as MenuTriggerPrimitive } from "@ui-sdk/react/menu";
|
|
4
|
+
import { Toggle as TogglePrimitive } from "@ui-sdk/react/toggle";
|
|
5
|
+
import { Toolbar as ToolbarPrimitive, ToolbarButton as ToolbarButtonPrimitive } from "@ui-sdk/react/toolbar";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { cx, join } from "../lib/cx.js";
|
|
8
|
+
import { Menu, MenuContent } from "./menu.js";
|
|
9
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
10
|
+
/** One turn in a conversation. */
|
|
11
|
+
function Message({ from = "assistant", latest, className, ...props }) {
|
|
12
|
+
return (_jsx("article", { "data-from": from, "data-latest": latest ? "" : undefined, className: join("mb-message", className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
/** The body of a turn: a bubble for the person, a `Response` for the assistant. */
|
|
15
|
+
function MessageContent({ className, ...props }) {
|
|
16
|
+
return _jsx("div", { className: join("mb-message-content", className), ...props });
|
|
17
|
+
}
|
|
18
|
+
function MessageBubble({ variant = "accent", className, ...props }) {
|
|
19
|
+
return _jsx("div", { "data-variant": variant, className: join("mb-message-bubble", className), ...props });
|
|
20
|
+
}
|
|
21
|
+
/** Files and images sent with the turn, above its bubble. */
|
|
22
|
+
function MessageAttachments({ className, ...props }) {
|
|
23
|
+
return _jsx("div", { className: join("mb-message-attachments", className), ...props });
|
|
24
|
+
}
|
|
25
|
+
/** Small secondary text under a turn: the time, the model, "Edited". */
|
|
26
|
+
function MessageMeta({ className, ...props }) {
|
|
27
|
+
return _jsx("div", { className: join("mb-message-meta", className), ...props });
|
|
28
|
+
}
|
|
29
|
+
/** The row of actions under a turn: one tab stop, arrow keys between them. */
|
|
30
|
+
function MessageActions({ "aria-label": ariaLabel = "Message actions", className, ...props }) {
|
|
31
|
+
return _jsx(ToolbarPrimitive, { "aria-label": ariaLabel, className: cx("mb-message-actions", className), ...props });
|
|
32
|
+
}
|
|
33
|
+
/** An icon button in `MessageActions`, named by `label` and showing it as a tooltip. */
|
|
34
|
+
function MessageAction({ label, className, children, ...props }) {
|
|
35
|
+
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(ToolbarButtonPrimitive, { "aria-label": label, className: cx("mb-message-action", className), ...props }), children: children }), _jsx(TooltipContent, { children: label })] }));
|
|
36
|
+
}
|
|
37
|
+
/** An action that stays pressed, like Good response or Bad response. */
|
|
38
|
+
function MessageActionToggle({ label, className, children, ...props }) {
|
|
39
|
+
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(TogglePrimitive, { "aria-label": label, className: cx("mb-message-action", className), ...props }), children: children }), _jsx(TooltipContent, { children: label })] }));
|
|
40
|
+
}
|
|
41
|
+
/** An action that opens a menu of more actions, like Branch, Share and Report. */
|
|
42
|
+
function MessageActionMenu({ label = "More", icon, className, children, ...props }) {
|
|
43
|
+
return (_jsxs(Menu, { ...props, children: [_jsx(MessageAction, { label: label, className: className, render: _jsx(MenuTriggerPrimitive, {}), children: icon ?? _jsx(MoreGlyph, {}) }), _jsx(MenuContent, { children: children })] }));
|
|
44
|
+
}
|
|
45
|
+
/** Copies the reply and shows a check for two seconds. */
|
|
46
|
+
function MessageActionCopy({ text, label = "Copy", copiedLabel = "Copied", onCopy, onClick, ...props }) {
|
|
47
|
+
const [copied, setCopied] = React.useState(false);
|
|
48
|
+
const timer = React.useRef(undefined);
|
|
49
|
+
React.useEffect(() => () => clearTimeout(timer.current), []);
|
|
50
|
+
return (_jsx(MessageAction, { label: copied ? copiedLabel : label, "data-copied": copied ? "" : undefined, onClick: (event, ...rest) => {
|
|
51
|
+
onClick?.(event, ...rest);
|
|
52
|
+
const value = typeof text === "function" ? text() : text;
|
|
53
|
+
navigator.clipboard?.writeText(value).catch(() => { });
|
|
54
|
+
onCopy?.(value);
|
|
55
|
+
setCopied(true);
|
|
56
|
+
clearTimeout(timer.current);
|
|
57
|
+
timer.current = setTimeout(() => setCopied(false), 2000);
|
|
58
|
+
}, ...props, children: copied ? _jsx(CheckGlyph, {}) : _jsx(CopyGlyph, {}) }));
|
|
59
|
+
}
|
|
60
|
+
function CopyGlyph() {
|
|
61
|
+
return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", focusable: "false", children: [_jsx("rect", { x: "5.25", y: "5.25", width: "8.5", height: "8.5", rx: "2", stroke: "currentColor", strokeWidth: "1.4" }), _jsx("path", { d: "M10.5 3.5v-.25a1 1 0 0 0-1-1h-6a1.25 1.25 0 0 0-1.25 1.25v6a1 1 0 0 0 1 1h.25", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" })] }));
|
|
62
|
+
}
|
|
63
|
+
function MoreGlyph() {
|
|
64
|
+
return (_jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", children: [_jsx("circle", { cx: "3.5", cy: "8", r: "1.25", fill: "currentColor" }), _jsx("circle", { cx: "8", cy: "8", r: "1.25", fill: "currentColor" }), _jsx("circle", { cx: "12.5", cy: "8", r: "1.25", fill: "currentColor" })] }));
|
|
65
|
+
}
|
|
66
|
+
function CheckGlyph() {
|
|
67
|
+
return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "m3.25 8.4 3.1 3.1 6.4-7", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
68
|
+
}
|
|
69
|
+
export { Message, MessageAction, MessageActionCopy, MessageActionMenu, MessageActions, MessageActionToggle, MessageAttachments, MessageBubble, MessageContent, MessageMeta, };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ButtonSize } from "./button.js";
|
|
3
|
+
import { type MenuProps, MenuRadioGroup, MenuRadioItem, MenuSeparator } from "./menu.js";
|
|
4
|
+
type ModelPickerModel = {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
/** One line about when to pick it, under its name in the menu. */
|
|
8
|
+
description?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type ModelPickerEffortLevel = {
|
|
12
|
+
value: string;
|
|
13
|
+
label: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
};
|
|
16
|
+
type ModelPickerProps = Omit<MenuProps, "children"> & {
|
|
17
|
+
models: readonly ModelPickerModel[];
|
|
18
|
+
/** Effort levels, listed as a second group. Leave out for models without one. */
|
|
19
|
+
efforts?: readonly ModelPickerEffortLevel[];
|
|
20
|
+
value?: string;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
onValueChange?: (value: string) => void;
|
|
23
|
+
effort?: string;
|
|
24
|
+
defaultEffort?: string;
|
|
25
|
+
onEffortChange?: (effort: string) => void;
|
|
26
|
+
/** The heading over the models in the menu. */
|
|
27
|
+
modelsLabel?: string;
|
|
28
|
+
/** The heading over the effort levels in the menu. */
|
|
29
|
+
effortLabel?: string;
|
|
30
|
+
size?: ButtonSize;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** Names the trigger for assistive tech, when its text alone isn't enough. */
|
|
33
|
+
"aria-label"?: string;
|
|
34
|
+
className?: string;
|
|
35
|
+
/** Replaces the menu's generated body, for a layout of your own built from the ModelPicker parts. */
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
};
|
|
38
|
+
/** One compact control that shows the model and effort ("Atlas 4 · High") and opens a menu to change them. */
|
|
39
|
+
declare function ModelPicker({ models, efforts, value: valueProp, defaultValue, onValueChange, effort: effortProp, defaultEffort, onEffortChange, modelsLabel, effortLabel, size, disabled, "aria-label": ariaLabel, className, presentation, children, ...props }: ModelPickerProps): React.JSX.Element;
|
|
40
|
+
type ModelPickerGroupProps = Omit<React.ComponentProps<typeof MenuRadioGroup>, "value" | "defaultValue" | "onValueChange" | "children"> & {
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
/** The group's heading. Defaults to the picker's `modelsLabel`; pass `null` for none. */
|
|
43
|
+
label?: React.ReactNode;
|
|
44
|
+
};
|
|
45
|
+
/** The radio group of models. `ModelPickerItem`s go inside. */
|
|
46
|
+
declare function ModelPickerGroup({ label, className, children, ...props }: ModelPickerGroupProps): React.JSX.Element;
|
|
47
|
+
type ModelPickerItemProps = React.ComponentProps<typeof MenuRadioItem> & {
|
|
48
|
+
description?: React.ReactNode;
|
|
49
|
+
};
|
|
50
|
+
/** A model: its name, with a one-line description under it. */
|
|
51
|
+
declare function ModelPickerItem({ description, closeOnSelect, label, className, children, ...props }: ModelPickerItemProps): React.JSX.Element;
|
|
52
|
+
type ModelPickerEffortProps = Omit<React.ComponentProps<typeof MenuRadioGroup>, "value" | "defaultValue" | "onValueChange" | "children"> & {
|
|
53
|
+
/** The group's heading. Defaults to the picker's `effortLabel`; pass `null` for none. */
|
|
54
|
+
label?: React.ReactNode;
|
|
55
|
+
};
|
|
56
|
+
/** The radio group of effort levels, from the picker's `efforts`. */
|
|
57
|
+
declare function ModelPickerEffort({ label, className, ...props }: ModelPickerEffortProps): React.JSX.Element;
|
|
58
|
+
/** A line between groups in a custom picker layout. */
|
|
59
|
+
declare const ModelPickerSeparator: typeof MenuSeparator;
|
|
60
|
+
export { ModelPicker, ModelPickerEffort, ModelPickerGroup, ModelPickerItem, ModelPickerSeparator };
|
|
61
|
+
export type { ModelPickerEffortLevel, ModelPickerEffortProps, ModelPickerGroupProps, ModelPickerItemProps, ModelPickerModel, ModelPickerProps, };
|