@exponential-at/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +54 -0
- package/README.md +360 -2
- package/catalog/a11y.json +668 -0
- package/catalog/basic-map.json +104 -0
- package/catalog/code.json +58 -0
- package/catalog/core.catalog.json +4752 -0
- package/catalog/core.schema.json +22667 -0
- package/catalog/host.json +64 -0
- package/catalog/layout.json +20 -0
- package/catalog/limits.json +9 -0
- package/catalog/locale.json +48 -0
- package/catalog/macros.json +3417 -0
- package/catalog/recipes.json +61 -0
- package/catalog/strings.json +72 -0
- package/catalog/style.json +128 -0
- package/catalog/theme.schema.json +42543 -0
- package/catalog/tokens.json +47 -0
- package/conformance/README.md +217 -0
- package/conformance/baseline.ts +101 -0
- package/conformance/browser-page.ts +146 -0
- package/conformance/browser-suites.ts +683 -0
- package/conformance/compare.ts +201 -0
- package/conformance/dom.ts +96 -0
- package/conformance/dump.ts +163 -0
- package/conformance/fonts.json +154 -0
- package/conformance/manifest.json +224 -0
- package/conformance/parity-compare.ts +191 -0
- package/conformance/parity-report.schema.json +73 -0
- package/conformance/parity.ts +412 -0
- package/conformance/pixel.ts +177 -0
- package/conformance/primitives-page.ts +49 -0
- package/conformance/report.schema.json +66 -0
- package/conformance/run.ts +118 -0
- package/dist/chunks/index-98npjvsd.js +3940 -0
- package/dist/chunks/index-98npjvsd.js.map +27 -0
- package/dist/chunks/index-gwkt14w3.js +7314 -0
- package/dist/chunks/index-gwkt14w3.js.map +10 -0
- package/dist/chunks/index-njt7yzzm.js +134 -0
- package/dist/chunks/index-njt7yzzm.js.map +9 -0
- package/dist/chunks/index-we7va6v6.js +7984 -0
- package/dist/chunks/index-we7va6v6.js.map +15 -0
- package/dist/chunks/index-xrm6f7wc.js +2563 -0
- package/dist/chunks/index-xrm6f7wc.js.map +10 -0
- package/dist/conformance.js +182749 -0
- package/dist/conformance.js.map +10 -0
- package/dist/entries/prompt.js +251 -0
- package/dist/entries/prompt.js.map +11 -0
- package/dist/entries/schema.js +1725 -0
- package/dist/entries/schema.js.map +11 -0
- package/dist/host/index.js +122 -0
- package/dist/host/index.js.map +9 -0
- package/dist/index.js +3213 -0
- package/dist/index.js.map +27 -0
- package/dist/types/src/a11y.d.ts +21 -0
- package/dist/types/src/animation.d.ts +76 -0
- package/dist/types/src/basic-map.d.ts +38 -0
- package/dist/types/src/builder.d.ts +50 -0
- package/dist/types/src/catalog.d.ts +54 -0
- package/dist/types/src/catalog.described.d.ts +33 -0
- package/dist/types/src/catalog.generated.d.ts +829 -0
- package/dist/types/src/chart.d.ts +46 -0
- package/dist/types/src/code.d.ts +44 -0
- package/dist/types/src/color.d.ts +20 -0
- package/dist/types/src/conformance.d.ts +39 -0
- package/dist/types/src/connector/app.d.ts +14 -0
- package/dist/types/src/connector/connector.d.ts +77 -0
- package/dist/types/src/connector/index.d.ts +4 -0
- package/dist/types/src/css.d.ts +29 -0
- package/dist/types/src/define.d.ts +66 -0
- package/dist/types/src/direction.d.ts +16 -0
- package/dist/types/src/dynamic.d.ts +159 -0
- package/dist/types/src/entries/prompt.d.ts +11 -0
- package/dist/types/src/entries/schema.d.ts +8 -0
- package/dist/types/src/expr.d.ts +71 -0
- package/dist/types/src/extension.d.ts +4 -0
- package/dist/types/src/format.d.ts +112 -0
- package/dist/types/src/geometry.d.ts +40 -0
- package/dist/types/src/host/contract.d.ts +188 -0
- package/dist/types/src/host/decoders.d.ts +61 -0
- package/dist/types/src/host/index.d.ts +11 -0
- package/dist/types/src/host/package.d.ts +58 -0
- package/dist/types/src/host/policy.d.ts +105 -0
- package/dist/types/src/host/router.d.ts +34 -0
- package/dist/types/src/host/runtime.d.ts +205 -0
- package/dist/types/src/host/sources.d.ts +15 -0
- package/dist/types/src/host/transports.d.ts +109 -0
- package/dist/types/src/index.d.ts +63 -0
- package/dist/types/src/layout.d.ts +20 -0
- package/dist/types/src/limits.d.ts +21 -0
- package/dist/types/src/list.d.ts +133 -0
- package/dist/types/src/locale.d.ts +22 -0
- package/dist/types/src/macros.d.ts +29 -0
- package/dist/types/src/overlay.d.ts +27 -0
- package/dist/types/src/prompt.d.ts +44 -0
- package/dist/types/src/recipes.d.ts +17 -0
- package/dist/types/src/reducer.d.ts +41 -0
- package/dist/types/src/resizable.d.ts +38 -0
- package/dist/types/src/schema.d.ts +7 -0
- package/dist/types/src/strings.d.ts +13 -0
- package/dist/types/src/style.d.ts +201 -0
- package/dist/types/src/test-preload.d.ts +1 -0
- package/dist/types/src/text-shimmer.d.ts +24 -0
- package/dist/types/src/theme-types.d.ts +162 -0
- package/dist/types/src/theme.d.ts +73 -0
- package/dist/types/src/themes.d.ts +22 -0
- package/dist/types/src/tree-guides.d.ts +17 -0
- package/dist/types/src/types.d.ts +314 -0
- package/dist/types/src/validate.d.ts +31 -0
- package/dist/types/src/web/base-css.d.ts +1 -0
- package/dist/types/src/web/box-css.d.ts +55 -0
- package/dist/types/src/web/coerce.d.ts +32 -0
- package/dist/types/src/web/data.d.ts +105 -0
- package/dist/types/src/web/dates.d.ts +12 -0
- package/dist/types/src/web/form.d.ts +44 -0
- package/dist/types/src/web/host-types.d.ts +119 -0
- package/dist/types/src/web/index.d.ts +28 -0
- package/dist/types/src/web/inputs.d.ts +55 -0
- package/dist/types/src/web/list.d.ts +13 -0
- package/dist/types/src/web/listbox.d.ts +14 -0
- package/dist/types/src/web/markdown.d.ts +96 -0
- package/dist/types/src/web/media.d.ts +62 -0
- package/dist/types/src/web/parts.d.ts +4 -0
- package/dist/types/src/web/primitives/alert-dialog.d.ts +10 -0
- package/dist/types/src/web/primitives/alert.d.ts +9 -0
- package/dist/types/src/web/primitives/avatar-color.d.ts +2 -0
- package/dist/types/src/web/primitives/avatar.d.ts +13 -0
- package/dist/types/src/web/primitives/badge.d.ts +10 -0
- package/dist/types/src/web/primitives/breadcrumb.d.ts +10 -0
- package/dist/types/src/web/primitives/button.d.ts +6 -0
- package/dist/types/src/web/primitives/calendar.d.ts +43 -0
- package/dist/types/src/web/primitives/card.d.ts +9 -0
- package/dist/types/src/web/primitives/checkbox.d.ts +5 -0
- package/dist/types/src/web/primitives/choice-tiles.d.ts +32 -0
- package/dist/types/src/web/primitives/cn.d.ts +3 -0
- package/dist/types/src/web/primitives/code-block.d.ts +24 -0
- package/dist/types/src/web/primitives/command.d.ts +134 -0
- package/dist/types/src/web/primitives/context-ring.d.ts +24 -0
- package/dist/types/src/web/primitives/dialog-arms.d.ts +6 -0
- package/dist/types/src/web/primitives/dialog.d.ts +24 -0
- package/dist/types/src/web/primitives/disclosure-header.d.ts +5 -0
- package/dist/types/src/web/primitives/dock.d.ts +42 -0
- package/dist/types/src/web/primitives/dropdown-menu.d.ts +14 -0
- package/dist/types/src/web/primitives/empty-state.d.ts +15 -0
- package/dist/types/src/web/primitives/glass-card.d.ts +4 -0
- package/dist/types/src/web/primitives/hover-card.d.ts +7 -0
- package/dist/types/src/web/primitives/icon-disc.d.ts +12 -0
- package/dist/types/src/web/primitives/index.d.ts +48 -0
- package/dist/types/src/web/primitives/input.d.ts +5 -0
- package/dist/types/src/web/primitives/kbd.d.ts +4 -0
- package/dist/types/src/web/primitives/label.d.ts +3 -0
- package/dist/types/src/web/primitives/menu-surface.d.ts +17 -0
- package/dist/types/src/web/primitives/meter.d.ts +21 -0
- package/dist/types/src/web/primitives/popover.d.ts +3 -0
- package/dist/types/src/web/primitives/progress-ring.d.ts +5 -0
- package/dist/types/src/web/primitives/progress.d.ts +8 -0
- package/dist/types/src/web/primitives/scroll-area.d.ts +49 -0
- package/dist/types/src/web/primitives/segmented-control.d.ts +5 -0
- package/dist/types/src/web/primitives/select.d.ts +47 -0
- package/dist/types/src/web/primitives/separator.d.ts +3 -0
- package/dist/types/src/web/primitives/sheet-chrome.d.ts +4 -0
- package/dist/types/src/web/primitives/sheet.d.ts +20 -0
- package/dist/types/src/web/primitives/skeleton.d.ts +3 -0
- package/dist/types/src/web/primitives/spinner.d.ts +3 -0
- package/dist/types/src/web/primitives/switch.d.ts +4 -0
- package/dist/types/src/web/primitives/table.d.ts +11 -0
- package/dist/types/src/web/primitives/tabs.d.ts +13 -0
- package/dist/types/src/web/primitives/textarea.d.ts +3 -0
- package/dist/types/src/web/primitives/toast.d.ts +163 -0
- package/dist/types/src/web/primitives/tooltip.d.ts +3 -0
- package/dist/types/src/web/primitives/truncate.d.ts +7 -0
- package/dist/types/src/web/primitives/typeahead-portal.d.ts +12 -0
- package/dist/types/src/web/share.d.ts +6 -0
- package/dist/types/src/web/table.d.ts +20 -0
- package/dist/types/src/web/theme-css.d.ts +69 -0
- package/dist/types/src/web/urls.d.ts +21 -0
- package/dist/web/index.js +2303 -0
- package/dist/web/index.js.map +26 -0
- package/dist/web/primitives/index.js +1450 -0
- package/dist/web/primitives/index.js.map +57 -0
- package/docs/components.generated.json +6238 -0
- package/docs/round-1-contract.md +679 -0
- package/docs/round-2-contract.md +476 -0
- package/docs/round-3-contract.md +174 -0
- package/docs/themes.generated.json +3503 -0
- package/fixtures/animations.json +2890 -0
- package/fixtures/bench-list.json +58 -0
- package/fixtures/bind-time.json +30664 -0
- package/fixtures/catalog-basic-map.json +1692 -0
- package/fixtures/catalog-components.json +9323 -0
- package/fixtures/catalog-extension.json +620 -0
- package/fixtures/catalog-macros.json +36370 -0
- package/fixtures/code-tokens.json +1993 -0
- package/fixtures/conformance-baseline.json +55544 -0
- package/fixtures/conformance-cases.json +49 -0
- package/fixtures/conformance-known.json +2123 -0
- package/fixtures/control-geometry.json +4200 -0
- package/fixtures/dashboard.data.json +74 -0
- package/fixtures/dashboard.json +752 -0
- package/fixtures/demo-surface.json +47 -0
- package/fixtures/format.json +870 -0
- package/fixtures/host-policy.json +1067 -0
- package/fixtures/host-router.json +1152 -0
- package/fixtures/host-transport.json +590 -0
- package/fixtures/interactions-round1.json +773 -0
- package/fixtures/kitchen-sink.expanded.json +10844 -0
- package/fixtures/kitchen-sink.json +3049 -0
- package/fixtures/layout-geometry-round1.json +7278 -0
- package/fixtures/layout-geometry.json +2072 -0
- package/fixtures/overlay-geometry.json +272 -0
- package/fixtures/primitive-specimens.json +58 -0
- package/fixtures/prompt-budget.json +33 -0
- package/fixtures/resizable.json +714 -0
- package/fixtures/round4-contract.json +2985 -0
- package/fixtures/specimens.json +9832 -0
- package/fixtures/style-conditions.json +336 -0
- package/fixtures/template-items.json +2215 -0
- package/fixtures/text-direction.json +309 -0
- package/fixtures/text-shimmer.json +96 -0
- package/fixtures/theme-extends.json +573 -0
- package/fixtures/theme-invalid.json +1296 -0
- package/fixtures/theme-recipes.json +58600 -0
- package/fixtures/theme-resolved.json +23949 -0
- package/fixtures/toast-stack.json +215 -0
- package/fixtures/tree-guides.json +224 -0
- package/fixtures/virtual-list.json +733 -0
- package/generated/ExponentialUICatalog.generated.kt +67 -0
- package/generated/ExponentialUICatalog.generated.swift +67 -0
- package/generated/ExponentialUIThemes.generated.kt +23 -0
- package/generated/ExponentialUIThemes.generated.swift +23 -0
- package/generated/catalog.descriptions.generated.rs +6 -0
- package/generated/catalog.generated.rs +80 -0
- package/generated/catalog.themes.generated.rs +34 -0
- package/generated/core.descriptions.json +2505 -0
- package/generated/core.runtime.json +3609 -0
- package/package.json +87 -4
- package/themes/exponential.recipes.json +49 -0
- package/themes/exponential.theme.json +755 -0
- package/themes/neutral.theme.json +5676 -0
- package/themes/orange.theme.json +43 -0
- package/themes/playful.theme.json +219 -0
- package/vendor/a2ui/LICENSE.txt +203 -0
- package/vendor/a2ui/README.md +27 -0
- package/vendor/a2ui/v0_9/basic_catalog.json +1387 -0
- package/vendor/a2ui/v0_9/basic_catalog_rules.txt +5 -0
- package/vendor/a2ui/v0_9/client_capabilities.json +97 -0
- package/vendor/a2ui/v0_9/client_to_server.json +104 -0
- package/vendor/a2ui/v0_9/common_types.json +315 -0
- package/vendor/a2ui/v0_9/server_to_client.json +132 -0
- package/vendor/json-render/LICENSE.txt +201 -0
- package/vendor/json-render/README.md +13 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
export declare const COMMAND_CLASSES: {
|
|
2
|
+
readonly root: "flex h-full w-full flex-col overflow-hidden rounded-md bg-transparent text-popover-foreground";
|
|
3
|
+
readonly inputWrapper: "flex h-9 items-center gap-2 border-b border-glass-stroke px-3";
|
|
4
|
+
readonly inputGlyph: "size-4 shrink-0 opacity-50";
|
|
5
|
+
readonly input: "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-foreground/50 disabled:cursor-not-allowed disabled:opacity-50";
|
|
6
|
+
readonly inputClear: string;
|
|
7
|
+
readonly list: "max-h-[18.75rem] scroll-py-1 overflow-x-hidden overflow-y-auto";
|
|
8
|
+
readonly empty: "py-6 text-center text-sm";
|
|
9
|
+
readonly group: "overflow-hidden p-(--menu-surface-padding) text-foreground";
|
|
10
|
+
readonly groupHeading: "px-(--menu-item-padding-x) py-1.5 text-xs font-medium text-muted-foreground";
|
|
11
|
+
readonly item: "relative flex min-h-(--menu-item-height) cursor-pointer items-center gap-(--menu-item-gap) rounded-sm px-(--menu-item-padding-x) py-1 text-sm text-foreground/90 outline-hidden select-none data-[disabled=true]:cursor-default data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-glass-active data-[selected=true]:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--menu-icon-size) [&_svg:not([class*='text-'])]:text-muted-foreground";
|
|
12
|
+
readonly separator: "-mx-(--menu-surface-padding) my-(--menu-surface-padding) h-px bg-glass-stroke";
|
|
13
|
+
readonly shortcut: "ml-auto text-xs tracking-widest text-muted-foreground";
|
|
14
|
+
};
|
|
15
|
+
/** cmdk's visually hidden `<label>` (its inline style, in its order). */
|
|
16
|
+
export declare const COMMAND_LABEL_STYLE: {
|
|
17
|
+
readonly position: "absolute";
|
|
18
|
+
readonly width: "1px";
|
|
19
|
+
readonly height: "1px";
|
|
20
|
+
readonly padding: "0";
|
|
21
|
+
readonly margin: "-1px";
|
|
22
|
+
readonly overflow: "hidden";
|
|
23
|
+
readonly clip: "rect(0, 0, 0, 0)";
|
|
24
|
+
readonly whiteSpace: "nowrap";
|
|
25
|
+
readonly borderWidth: "0";
|
|
26
|
+
};
|
|
27
|
+
/** cmdk's `command-score`: 1 = exact, prefix > word boundary > fuzzy,
|
|
28
|
+
* 0 = no match. `keywords` extend the value (`value + " " + keywords`). */
|
|
29
|
+
export declare function commandScore(value: string, query: string, keywords?: readonly string[]): number;
|
|
30
|
+
export type CommandFilter = (value: string, query: string, keywords?: readonly string[]) => number;
|
|
31
|
+
export interface CommandFilterItem {
|
|
32
|
+
id: string;
|
|
33
|
+
value: string;
|
|
34
|
+
keywords?: readonly string[];
|
|
35
|
+
/** The group's id; none = an ungrouped item. */
|
|
36
|
+
group?: string;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** Always visible, never counted (cmdk's `forceMount`). */
|
|
39
|
+
forceMount?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface CommandFilterResult {
|
|
42
|
+
/** Matching (non-forced) items: 0 = the empty state. */
|
|
43
|
+
count: number;
|
|
44
|
+
/** Ungrouped items first, then the groups by their best score; ids by score. */
|
|
45
|
+
groups: {
|
|
46
|
+
group: string | undefined;
|
|
47
|
+
ids: string[];
|
|
48
|
+
}[];
|
|
49
|
+
scores: Map<string, number>;
|
|
50
|
+
}
|
|
51
|
+
/** The visible ids per group, in display order. An empty query keeps the
|
|
52
|
+
* registration order and shows everything; otherwise score > 0 shows,
|
|
53
|
+
* items sort by score (stable), groups by their best item. */
|
|
54
|
+
export declare function filterCommandItems(items: readonly CommandFilterItem[], query: string, filter?: CommandFilter): CommandFilterResult;
|
|
55
|
+
export declare const COMMAND_SELECT_EVENT = "command-item-select";
|
|
56
|
+
type Kind = `item` | `group` | `separator`;
|
|
57
|
+
interface Entry {
|
|
58
|
+
id: string;
|
|
59
|
+
kind: Kind;
|
|
60
|
+
seq: number;
|
|
61
|
+
el: HTMLElement | null;
|
|
62
|
+
value: string;
|
|
63
|
+
keywords?: string[];
|
|
64
|
+
group?: string;
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
forceMount?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface CommandStoreOptions {
|
|
69
|
+
/** The root's live props. */
|
|
70
|
+
props: () => {
|
|
71
|
+
value?: string;
|
|
72
|
+
onValueChange?: (value: string) => void;
|
|
73
|
+
filter?: CommandFilter;
|
|
74
|
+
shouldFilter?: boolean;
|
|
75
|
+
loop?: boolean;
|
|
76
|
+
};
|
|
77
|
+
/** Ask the renderer for a flush after the DOM caught up (React: a root
|
|
78
|
+
* re-render + layout effect; Solid: a microtask). */
|
|
79
|
+
schedule: () => void;
|
|
80
|
+
}
|
|
81
|
+
/** The command root's state (cmdk's store), framework-free: the query, the
|
|
82
|
+
* selected value, the registry (items, groups, separators in creation
|
|
83
|
+
* order) and the post-render pass (`flush`: DOM order, first-item
|
|
84
|
+
* selection, the active descendant, scroll). Renderers subscribe and
|
|
85
|
+
* re-render on `emit`. */
|
|
86
|
+
export declare function createCommandStore(o: CommandStoreOptions): {
|
|
87
|
+
readonly version: number;
|
|
88
|
+
readonly search: string;
|
|
89
|
+
readonly value: string;
|
|
90
|
+
readonly selectedId: string | undefined;
|
|
91
|
+
subscribe(listener: () => void): () => undefined;
|
|
92
|
+
nextSeq: () => number;
|
|
93
|
+
/** The query (the input); `silent` = during the first render. */
|
|
94
|
+
setSearch(next: string, silent?: boolean): void;
|
|
95
|
+
setValue: (next: string, opts?: {
|
|
96
|
+
pointer?: boolean;
|
|
97
|
+
}) => void;
|
|
98
|
+
/** Re-read the controlled `value` prop (no callback). */
|
|
99
|
+
syncValue(): boolean;
|
|
100
|
+
setSizer(el: HTMLElement | null): void;
|
|
101
|
+
filtering: () => boolean;
|
|
102
|
+
/** An item's score now (1 when nothing filters). */
|
|
103
|
+
score(itemValue: string, keywords?: readonly string[]): number;
|
|
104
|
+
/** Whether a group shows (some registered item of it matches). */
|
|
105
|
+
groupVisible(groupId: string): boolean;
|
|
106
|
+
/** The empty state: no matching (non-forced) item. */
|
|
107
|
+
empty(): boolean;
|
|
108
|
+
register(entry: {
|
|
109
|
+
id: string;
|
|
110
|
+
kind: Kind;
|
|
111
|
+
seq: number;
|
|
112
|
+
value?: string;
|
|
113
|
+
keywords?: string[];
|
|
114
|
+
group?: string;
|
|
115
|
+
disabled?: boolean;
|
|
116
|
+
forceMount?: boolean;
|
|
117
|
+
}): () => void;
|
|
118
|
+
/** An entry's element (null = not rendered) or item fields. */
|
|
119
|
+
update(id: string, patch: Partial<Pick<Entry, `el` | `value` | `keywords` | `disabled`>>): void;
|
|
120
|
+
/** The post-render pass: DOM order, the first item selected (after a
|
|
121
|
+
* query change or when nothing is selected), the active descendant,
|
|
122
|
+
* the selected item scrolled into view. Idempotent. */
|
|
123
|
+
flush(): void;
|
|
124
|
+
/** cmdk's root keys. */
|
|
125
|
+
onKeyDown(e: KeyboardEvent): void;
|
|
126
|
+
};
|
|
127
|
+
export type CommandStore = ReturnType<typeof createCommandStore>;
|
|
128
|
+
/** An item's value: the `value` prop, else string children, else the
|
|
129
|
+
* rendered text (trimmed), else the last known one. */
|
|
130
|
+
export declare function commandItemValue(value: string | undefined, children: unknown, el: Element | null | undefined, known: string): string;
|
|
131
|
+
/** CommandList's `--cmdk-list-height` (cmdk: the sizer's offsetHeight,
|
|
132
|
+
* ResizeObserver → rAF). Returns the disposer. */
|
|
133
|
+
export declare function observeCommandListHeight(list: HTMLElement, sizer: HTMLElement): () => void;
|
|
134
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** The ring's box, in px — a footer glyph, the size of a small icon. */
|
|
2
|
+
export declare const RING_SIZE = 16;
|
|
3
|
+
/** Stroke width of both the track and the progress arc. */
|
|
4
|
+
export declare const RING_STROKE = 2;
|
|
5
|
+
/** Radius of the stroked circle: the box minus one stroke, halved, so the
|
|
6
|
+
* stroke sits fully inside the box (`(16 - 2) / 2 = 7`… minus a hair, so the
|
|
7
|
+
* arc's round join never clips). */
|
|
8
|
+
export declare const RING_RADIUS = 6;
|
|
9
|
+
export interface RingGeometry {
|
|
10
|
+
/** The full circle's length — the dash array. */
|
|
11
|
+
circumference: number;
|
|
12
|
+
/** How much of it to hide: the UNfilled remainder. */
|
|
13
|
+
dashOffset: number;
|
|
14
|
+
}
|
|
15
|
+
/** The arc for `percent`, clamped to 0..100 (a NaN reads as empty). */
|
|
16
|
+
export declare function ringGeometry(percent: number): RingGeometry;
|
|
17
|
+
/** The three tones every usage surface shares — the app maps its thresholds
|
|
18
|
+
* (`severity`, lib/agent-usage.ts) onto them, never the other way round. */
|
|
19
|
+
export type RingTone = `normal` | `warning` | `danger`;
|
|
20
|
+
export declare const RING_TONE_CLASS: Record<RingTone, string>;
|
|
21
|
+
export declare const CONTEXT_RING_CLASSES: {
|
|
22
|
+
readonly root: "shrink-0";
|
|
23
|
+
readonly svg: "-rotate-90";
|
|
24
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const MOBILE_SHEET = "max-sm:inset-x-0 max-sm:bottom-0 max-sm:w-full max-sm:rounded-t-3xl max-sm:border-t max-sm:border-glass-stroke-card max-sm:bg-glass-bottom max-sm:px-4 max-sm:pt-0 max-sm:pb-[max(1rem,env(safe-area-inset-bottom))] max-sm:motion-sheet max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=open]:slide-in-from-bottom sm:p-6 max-sm:h-auto max-sm:max-h-[90dvh]";
|
|
2
|
+
export declare const MOBILE_SHEET_FULL = "max-sm:inset-x-0 max-sm:bottom-0 max-sm:w-full max-sm:rounded-t-3xl max-sm:border-t max-sm:border-glass-stroke-card max-sm:bg-glass-bottom max-sm:px-4 max-sm:pt-0 max-sm:pb-[max(1rem,env(safe-area-inset-bottom))] max-sm:motion-sheet max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=open]:slide-in-from-bottom sm:p-6 max-sm:h-[94dvh]";
|
|
3
|
+
export declare const MOBILE_ALERT = "max-sm:top-1/2 max-sm:left-1/2 max-sm:w-[calc(100%-3rem)] max-sm:max-w-sm max-sm:max-h-[calc(100dvh-3rem)] max-sm:-translate-x-1/2 max-sm:-translate-y-1/2 max-sm:rounded-2xl max-sm:border max-sm:border-glass-stroke-card max-sm:bg-glass-bottom max-sm:p-5 sm:p-6";
|
|
4
|
+
export declare const MOBILE_PAGE = "max-sm:inset-0 max-sm:w-full max-sm:bg-background max-sm:p-6 sm:p-6";
|
|
5
|
+
export type DialogMobileArm = `sheet` | `sheet-full` | `alert` | `page`;
|
|
6
|
+
export declare const MOBILE_ARMS: Record<DialogMobileArm, string>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Below `sm` a sheet-arm dialog IS the bottom sheet (EXP-687 → the UI
|
|
2
|
+
* cleanup batch's "one phone sheet"). */
|
|
3
|
+
export declare const DIALOG_PHONE_QUERY = "(max-width: 639px)";
|
|
4
|
+
export declare const DIALOG_CLASSES: {
|
|
5
|
+
readonly overlay: "fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-fast data-[state=closed]:ease-accelerate data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-standard data-[state=open]:ease-decelerate";
|
|
6
|
+
readonly phoneSheet: "gap-4 overflow-hidden px-4 pt-0 pb-[max(1rem,env(safe-area-inset-bottom))] outline-none";
|
|
7
|
+
readonly phoneSheetFull: "h-[94dvh] max-h-[94dvh]";
|
|
8
|
+
readonly content: "fixed z-50 flex flex-col gap-4 overflow-hidden shadow-lg outline-none motion-dialog sm:inset-auto sm:top-[50%] sm:left-[50%] sm:max-h-[calc(100dvh-2rem)] sm:w-[calc(100%-2rem)] sm:max-w-lg sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded-2xl sm:border sm:border-glass-stroke-card sm:bg-card/85 sm:shadow-2xl sm:shadow-black/40 sm:backdrop-blur-2xl";
|
|
9
|
+
/** The sheet arms' grabber on the centred panel: a phone only. */
|
|
10
|
+
readonly grabber: "hidden max-sm:block";
|
|
11
|
+
/** The hidden Close a drag-to-dismiss clicks. */
|
|
12
|
+
readonly dragClose: "hidden";
|
|
13
|
+
readonly close: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
14
|
+
readonly closePhoneHidden: "max-sm:hidden";
|
|
15
|
+
readonly srOnly: "sr-only";
|
|
16
|
+
readonly header: "flex flex-col gap-2 text-left";
|
|
17
|
+
readonly body: "min-h-0 flex-1 overflow-y-auto";
|
|
18
|
+
readonly footer: "flex flex-col-reverse gap-2 max-sm:[&>[data-slot=button]]:h-10 max-sm:[&>[data-slot=button]]:w-full max-sm:[&>[data-slot=button]]:px-6 sm:flex-row sm:justify-end";
|
|
19
|
+
/** The Cancel of a sheet arm on a phone (EXP-687): hidden, a sheet is
|
|
20
|
+
* dismissed by dragging it down or tapping outside; `alert`/`page` keep it. */
|
|
21
|
+
readonly cancelPhoneHidden: "max-sm:hidden";
|
|
22
|
+
readonly title: "text-lg leading-none font-semibold";
|
|
23
|
+
readonly description: "text-sm text-muted-foreground";
|
|
24
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const DISCLOSURE_HEADER_CLASSES: {
|
|
2
|
+
readonly root: "flex w-full min-w-0 cursor-pointer items-center gap-2 rounded-sm text-left text-muted-foreground transition-colors duration-fast outline-none hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50";
|
|
3
|
+
readonly chevron: "size-3 shrink-0";
|
|
4
|
+
readonly chevronTrailing: "ml-auto";
|
|
5
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type StackConstants, type ToastStackItem } from "./toast.js";
|
|
2
|
+
export declare const DOCK_PILE_CONSTANTS: StackConstants;
|
|
3
|
+
export type DockCardTint = `plan` | `question` | `muted` | `warning`;
|
|
4
|
+
export declare const DOCK_CARD_CLASSES: {
|
|
5
|
+
/** THE card: the glass card (ONE gray: the opaque card fill under the
|
|
6
|
+
* card hairline), padded. */
|
|
7
|
+
readonly root: "rounded-xl border border-glass-stroke-card bg-glass-card-opaque block w-full p-3 text-left outline-none";
|
|
8
|
+
/** A card that opens (a press, Enter or Space). */
|
|
9
|
+
readonly pressable: "cursor-pointer transition-colors duration-fast hover:bg-glass-active focus-visible:ring-[3px] focus-visible:ring-ring/50";
|
|
10
|
+
/** The glyph + text row; a card behind the front one hides its words. */
|
|
11
|
+
readonly body: "flex items-start gap-2 data-[hidden=true]:opacity-0";
|
|
12
|
+
readonly icon: "mt-0.5 size-3.5 shrink-0";
|
|
13
|
+
readonly text: "min-w-0 flex-1";
|
|
14
|
+
readonly header: "mb-1 flex items-center gap-2";
|
|
15
|
+
readonly label: "truncate text-xs font-medium";
|
|
16
|
+
readonly caption: "min-w-0 truncate text-xs text-muted-foreground";
|
|
17
|
+
readonly meta: "ml-auto shrink-0 text-xs text-muted-foreground";
|
|
18
|
+
readonly row: "flex min-w-0 items-center gap-2";
|
|
19
|
+
readonly title: "min-w-0 flex-1 truncate text-sm text-foreground/90";
|
|
20
|
+
readonly chevron: "size-3.5 shrink-0 text-muted-foreground";
|
|
21
|
+
readonly trailing: "shrink-0";
|
|
22
|
+
/** The tint sits on the glyph and the label alone. */
|
|
23
|
+
readonly tint: {
|
|
24
|
+
plan: string;
|
|
25
|
+
question: string;
|
|
26
|
+
muted: string;
|
|
27
|
+
warning: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const DOCK_PILE_CLASSES: {
|
|
31
|
+
/** The pile box: its height = the geometry's, animated over `slow`. */
|
|
32
|
+
readonly root: "relative transition-[height] duration-slow ease-standard motion-reduce:transition-none";
|
|
33
|
+
/** One card, placed by `--offset`/`--scale`; it shrinks about the TOP
|
|
34
|
+
* edge (the one that peeks out above the front card). */
|
|
35
|
+
readonly item: "absolute inset-x-0 top-(--offset) origin-top scale-(--scale) transition-[top,scale,opacity] duration-slow ease-standard motion-reduce:transition-none data-[visible=false]:pointer-events-none data-[visible=false]:opacity-0";
|
|
36
|
+
};
|
|
37
|
+
/** The pile's geometry: `stackGeometry` with the Dock's numbers, anchored
|
|
38
|
+
* at the bottom (the front card is the LAST height). */
|
|
39
|
+
export declare function dockPileGeometry(heights: readonly number[], expanded: boolean): {
|
|
40
|
+
height: number;
|
|
41
|
+
items: ToastStackItem[];
|
|
42
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const DROPDOWN_MENU_CLASSES: {
|
|
2
|
+
readonly content: "z-50 rounded-lg border border-glass-stroke-card bg-glass-card-opaque text-popover-foreground motion-popover min-w-(--menu-min-width) max-w-(--menu-max-width) p-(--menu-surface-padding) max-h-(--radix-dropdown-menu-content-available-height) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto";
|
|
3
|
+
readonly item: "relative flex min-h-(--menu-item-height) cursor-pointer items-center gap-(--menu-item-gap) rounded-sm px-(--menu-item-padding-x) py-1 text-sm text-foreground/90 outline-hidden select-none focus:bg-glass-active focus:text-foreground data-[disabled]:cursor-default data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--menu-icon-size) [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive! data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
4
|
+
readonly checkItem: "relative flex min-h-(--menu-item-height) cursor-pointer items-center gap-(--menu-item-gap) rounded-sm py-1 pr-(--menu-item-padding-x) pl-8 text-sm text-foreground/90 outline-hidden select-none focus:bg-glass-active focus:text-foreground data-[disabled]:cursor-default data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--menu-icon-size)";
|
|
5
|
+
readonly itemIndicator: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center";
|
|
6
|
+
readonly checkIcon: "size-4";
|
|
7
|
+
readonly radioIcon: "size-2 fill-current";
|
|
8
|
+
readonly label: "px-(--menu-item-padding-x) py-1.5 text-sm font-medium data-[inset]:pl-8";
|
|
9
|
+
readonly separator: "-mx-(--menu-surface-padding) my-(--menu-surface-padding) h-px bg-glass-stroke";
|
|
10
|
+
readonly shortcut: "ml-auto text-xs tracking-widest text-muted-foreground";
|
|
11
|
+
readonly subTrigger: "flex min-h-(--menu-item-height) cursor-pointer items-center gap-(--menu-item-gap) rounded-sm px-(--menu-item-padding-x) py-1 text-sm text-foreground/90 outline-hidden select-none focus:bg-glass-active focus:text-foreground data-[disabled]:cursor-default data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--menu-icon-size) [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive! whitespace-nowrap data-[state=open]:bg-glass-active data-[variant=destructive]:data-[state=open]:bg-destructive/10 data-[variant=destructive]:data-[state=open]:text-destructive [&>span+svg:last-child]:ml-0";
|
|
12
|
+
readonly subChevron: "ml-auto size-(--menu-icon-size) shrink-0";
|
|
13
|
+
readonly subContent: "z-50 rounded-lg border border-glass-stroke-card bg-glass-card-opaque text-popover-foreground motion-popover min-w-(--menu-min-width) max-w-(--menu-max-width) p-(--menu-surface-padding) origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden";
|
|
14
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const EMPTY_STATE_SIZES: readonly ["page", "list"];
|
|
2
|
+
export type EmptyStateSize = (typeof EMPTY_STATE_SIZES)[number];
|
|
3
|
+
export declare const EMPTY_STATE_CLASSES: {
|
|
4
|
+
readonly list: "flex w-full flex-col items-center gap-1.5 px-3 py-6 text-center text-sm text-muted-foreground";
|
|
5
|
+
readonly listIcon: "size-5 shrink-0 text-muted-foreground/60";
|
|
6
|
+
readonly page: "mx-auto flex max-w-md flex-col items-center gap-3 px-6 py-12 text-center";
|
|
7
|
+
readonly pageTitle: "text-lg font-semibold";
|
|
8
|
+
readonly pageDescription: "text-sm text-muted-foreground";
|
|
9
|
+
readonly pageActions: "mt-2 flex flex-wrap items-center justify-center gap-2";
|
|
10
|
+
readonly listEmpty: "px-3 py-6 text-center text-sm text-muted-foreground";
|
|
11
|
+
readonly cta: "flex w-full cursor-pointer flex-col items-start gap-1 rounded-md border border-dashed border-glass-stroke-strong p-3 text-left text-sm text-muted-foreground transition-colors duration-fast outline-none hover:bg-glass-row hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50";
|
|
12
|
+
readonly ctaTitle: "flex items-center gap-2";
|
|
13
|
+
readonly ctaIcon: "size-4 shrink-0";
|
|
14
|
+
readonly ctaDescription: "text-xs";
|
|
15
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const HOVER_CARD_DELAYS: {
|
|
2
|
+
readonly openDelay: 400;
|
|
3
|
+
readonly closeDelay: 100;
|
|
4
|
+
};
|
|
5
|
+
export declare const HOVER_CARD_CLASSES: {
|
|
6
|
+
readonly content: "z-50 rounded-lg border border-glass-stroke-card bg-glass-card-opaque text-popover-foreground motion-popover w-80 origin-(--radix-hover-card-content-transform-origin) p-3 outline-hidden";
|
|
7
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const ICON_DISC_TONES: readonly ["primary", "success", "danger", "muted"];
|
|
2
|
+
export type IconDiscTone = (typeof ICON_DISC_TONES)[number];
|
|
3
|
+
export declare const ICON_DISC_CLASSES: {
|
|
4
|
+
readonly root: "flex size-12 shrink-0 items-center justify-center rounded-full";
|
|
5
|
+
readonly tones: {
|
|
6
|
+
primary: string;
|
|
7
|
+
success: string;
|
|
8
|
+
danger: string;
|
|
9
|
+
muted: string;
|
|
10
|
+
};
|
|
11
|
+
readonly icon: "size-6";
|
|
12
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export * from "./alert-dialog.js";
|
|
2
|
+
export * from "./alert.js";
|
|
3
|
+
export * from "./avatar-color.js";
|
|
4
|
+
export * from "./avatar.js";
|
|
5
|
+
export * from "./badge.js";
|
|
6
|
+
export * from "./breadcrumb.js";
|
|
7
|
+
export * from "./button.js";
|
|
8
|
+
export * from "./calendar.js";
|
|
9
|
+
export * from "./card.js";
|
|
10
|
+
export * from "./checkbox.js";
|
|
11
|
+
export * from "./choice-tiles.js";
|
|
12
|
+
export * from "./cn.js";
|
|
13
|
+
export * from "./code-block.js";
|
|
14
|
+
export * from "./command.js";
|
|
15
|
+
export * from "./context-ring.js";
|
|
16
|
+
export * from "./dialog-arms.js";
|
|
17
|
+
export * from "./dialog.js";
|
|
18
|
+
export * from "./disclosure-header.js";
|
|
19
|
+
export * from "./dock.js";
|
|
20
|
+
export * from "./dropdown-menu.js";
|
|
21
|
+
export * from "./empty-state.js";
|
|
22
|
+
export * from "./glass-card.js";
|
|
23
|
+
export * from "./hover-card.js";
|
|
24
|
+
export * from "./icon-disc.js";
|
|
25
|
+
export * from "./input.js";
|
|
26
|
+
export * from "./kbd.js";
|
|
27
|
+
export * from "./label.js";
|
|
28
|
+
export * from "./menu-surface.js";
|
|
29
|
+
export * from "./meter.js";
|
|
30
|
+
export * from "./popover.js";
|
|
31
|
+
export * from "./progress-ring.js";
|
|
32
|
+
export * from "./progress.js";
|
|
33
|
+
export * from "./scroll-area.js";
|
|
34
|
+
export * from "./segmented-control.js";
|
|
35
|
+
export * from "./select.js";
|
|
36
|
+
export * from "./separator.js";
|
|
37
|
+
export * from "./sheet-chrome.js";
|
|
38
|
+
export * from "./sheet.js";
|
|
39
|
+
export * from "./skeleton.js";
|
|
40
|
+
export * from "./spinner.js";
|
|
41
|
+
export * from "./switch.js";
|
|
42
|
+
export * from "./table.js";
|
|
43
|
+
export * from "./tabs.js";
|
|
44
|
+
export * from "./textarea.js";
|
|
45
|
+
export * from "./toast.js";
|
|
46
|
+
export * from "./tooltip.js";
|
|
47
|
+
export * from "./truncate.js";
|
|
48
|
+
export * from "./typeahead-portal.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const BARE_FIELD_CLASS = "h-auto min-w-0 flex-1 rounded-none border-0 bg-transparent p-0 text-sm shadow-none focus-visible:border-0 focus-visible:ring-0 md:text-sm";
|
|
2
|
+
export declare const FIELD_CHROME_CLASS = "h-9 w-full min-w-0 rounded-lg border border-glass-stroke-card bg-glass-card px-3 py-1 text-base shadow-none transition-[color,border-color] duration-fast outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-foreground/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-glass-stroke-active focus-visible:ring-0";
|
|
3
|
+
export declare const INPUT_CLASSES: {
|
|
4
|
+
readonly root: "h-9 w-full min-w-0 rounded-lg border border-glass-stroke-card bg-glass-card px-3 py-1 text-base shadow-none transition-[color,border-color] duration-fast outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-foreground/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-glass-stroke-active focus-visible:ring-0 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40";
|
|
5
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const KBD_CLASSES: {
|
|
2
|
+
readonly root: "pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none [&_svg:not([class*='size-'])]:size-3";
|
|
3
|
+
readonly group: "inline-flex items-center gap-1";
|
|
4
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const MENU_SURFACE_CLASS = "z-50 rounded-lg border border-glass-stroke-card bg-glass-card-opaque text-popover-foreground motion-popover";
|
|
2
|
+
export declare const MENU_CONTENT_CLASS = "min-w-(--menu-min-width) max-w-(--menu-max-width) p-(--menu-surface-padding)";
|
|
3
|
+
export declare const MENU_ITEM_CLASS = "relative flex min-h-(--menu-item-height) cursor-pointer items-center gap-(--menu-item-gap) rounded-sm px-(--menu-item-padding-x) py-1 text-sm text-foreground/90 outline-hidden select-none focus:bg-glass-active focus:text-foreground data-[disabled]:cursor-default data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--menu-icon-size) [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive! data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
4
|
+
/** A submenu's label never wraps: the value beside it truncates instead.
|
|
5
|
+
* The value (a `MENU_VALUE_CLASS` span) and the chevron both push right;
|
|
6
|
+
* with a value present the chevron gives up its auto margin, so every value
|
|
7
|
+
* ends flush against the chevron column instead of floating mid-row. */
|
|
8
|
+
export declare const MENU_SUB_TRIGGER_CLASS = "flex min-h-(--menu-item-height) cursor-pointer items-center gap-(--menu-item-gap) rounded-sm px-(--menu-item-padding-x) py-1 text-sm text-foreground/90 outline-hidden select-none focus:bg-glass-active focus:text-foreground data-[disabled]:cursor-default data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--menu-icon-size) [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive! whitespace-nowrap data-[state=open]:bg-glass-active data-[variant=destructive]:data-[state=open]:bg-destructive/10 data-[variant=destructive]:data-[state=open]:text-destructive [&>span+svg:last-child]:ml-0";
|
|
9
|
+
/** The checkbox / radio rows: the indicator sits in the `pl-8` inset. */
|
|
10
|
+
export declare const MENU_CHECK_ITEM_CLASS = "relative flex min-h-(--menu-item-height) cursor-pointer items-center gap-(--menu-item-gap) rounded-sm py-1 pr-(--menu-item-padding-x) pl-8 text-sm text-foreground/90 outline-hidden select-none focus:bg-glass-active focus:text-foreground data-[disabled]:cursor-default data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--menu-icon-size)";
|
|
11
|
+
export declare const MENU_LABEL_CLASS = "px-(--menu-item-padding-x) py-1.5 text-sm font-medium data-[inset]:pl-8";
|
|
12
|
+
export declare const MENU_SEPARATOR_CLASS = "-mx-(--menu-surface-padding) my-(--menu-surface-padding) h-px bg-glass-stroke";
|
|
13
|
+
export declare const MENU_SHORTCUT_CLASS = "ml-auto text-xs tracking-widest text-muted-foreground";
|
|
14
|
+
/** The current VALUE beside a submenu's label ("Status Backlog ›"): takes
|
|
15
|
+
* what is left of the row and truncates, never the label's room. */
|
|
16
|
+
export declare const MENU_VALUE_CLASS = "min-w-0 max-w-[7rem] shrink text-right normal-case tracking-normal truncate";
|
|
17
|
+
export declare const MENU_CHEVRON_CLASS = "ml-auto size-(--menu-icon-size) shrink-0";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** EXP-909: the ONE bar every usage surface draws — the rate-limit windows,
|
|
2
|
+
* the run's context, and the tiny three-bar mini line. Before this there were
|
|
3
|
+
* two: a bare `Progress` (primary fill, no tone) under the Context block and a
|
|
4
|
+
* hand-rolled `<span>` track with its own tone map inside the usage cards, so
|
|
5
|
+
* the same 67% was two different colours two rows apart.
|
|
6
|
+
*
|
|
7
|
+
* It IS `Progress` — the Radix root, its track and its indicator — with the
|
|
8
|
+
* severity tone painted on the indicator (`lib/agent-usage.ts` `severity`,
|
|
9
|
+
* hand-mirrored ×4 with the desktop's `usage_bar::meter`, iOS `AgentUsageTrack`
|
|
10
|
+
* and Android `UsageTrack`). Height comes from `className` (`h-1` for the mini
|
|
11
|
+
* line, `h-1.5` for a full window), never from a prop: the tone is the only
|
|
12
|
+
* thing a caller has to think about. */
|
|
13
|
+
export type MeterTone = `normal` | `warning` | `danger`;
|
|
14
|
+
export declare const METER_CLASSES: {
|
|
15
|
+
readonly root: "h-1.5 bg-glass-stroke-strong";
|
|
16
|
+
readonly tones: {
|
|
17
|
+
normal: string;
|
|
18
|
+
warning: string;
|
|
19
|
+
danger: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PROGRESS_CLASSES: {
|
|
2
|
+
readonly root: "bg-primary/20 relative h-2 w-full overflow-hidden rounded-full";
|
|
3
|
+
readonly indicator: "bg-primary h-full flex-1 transition-all";
|
|
4
|
+
readonly indicatorIndeterminate: "w-1/3 motion-safe:animate-progress-indeterminate motion-reduce:opacity-60";
|
|
5
|
+
readonly indicatorDeterminate: "w-full";
|
|
6
|
+
};
|
|
7
|
+
/** The determinate indicator's offset for `value` (0-100). */
|
|
8
|
+
export declare function progressIndicatorTransform(value: number | null | undefined): string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare const SCROLL_AREA_CLASSES: {
|
|
2
|
+
readonly root: "relative";
|
|
3
|
+
readonly viewport: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1";
|
|
4
|
+
readonly scrollbar: "flex touch-none p-px transition-colors select-none";
|
|
5
|
+
readonly orientations: {
|
|
6
|
+
readonly vertical: "h-full w-2.5 border-l border-l-transparent";
|
|
7
|
+
readonly horizontal: "h-2.5 flex-col border-t border-t-transparent";
|
|
8
|
+
};
|
|
9
|
+
readonly thumb: "relative flex-1 rounded-full bg-border";
|
|
10
|
+
};
|
|
11
|
+
export type ScrollAreaDir = `ltr` | `rtl`;
|
|
12
|
+
export type ScrollAreaOrientation = `vertical` | `horizontal`;
|
|
13
|
+
/** Radix's viewport <style>: the native scrollbar hidden. */
|
|
14
|
+
export declare const SCROLL_AREA_VIEWPORT_CSS = "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}";
|
|
15
|
+
export declare function scrollAreaRootStyle(cornerWidth: number, cornerHeight: number): Record<string, string>;
|
|
16
|
+
export declare function scrollAreaViewportStyle(xEnabled: boolean, yEnabled: boolean): Record<string, string>;
|
|
17
|
+
/** The viewport's `display: table` sizer. */
|
|
18
|
+
export declare const SCROLL_AREA_CONTENT_STYLE: {
|
|
19
|
+
readonly "min-width": "100%";
|
|
20
|
+
readonly display: "table";
|
|
21
|
+
};
|
|
22
|
+
export declare function scrollAreaScrollbarStyle(orientation: ScrollAreaOrientation, dir: ScrollAreaDir, thumbSize: number): Record<string, string>;
|
|
23
|
+
export declare const SCROLL_AREA_THUMB_STYLE: {
|
|
24
|
+
readonly width: "var(--radix-scroll-area-thumb-width)";
|
|
25
|
+
readonly height: "var(--radix-scroll-area-thumb-height)";
|
|
26
|
+
};
|
|
27
|
+
export declare function scrollAreaCornerStyle(width: number, height: number, dir: ScrollAreaDir): Record<string, string>;
|
|
28
|
+
/** A scrollbar's / thumb's `data-state`. */
|
|
29
|
+
export declare const scrollAreaVisibility: (visible: boolean) => `visible` | `hidden`;
|
|
30
|
+
export type ScrollAreaScrollState = `hidden` | `scrolling` | `interacting` | `idle`;
|
|
31
|
+
/** Radix's `type="scroll"` machine. */
|
|
32
|
+
export declare const SCROLL_AREA_SCROLL_MACHINE: Record<ScrollAreaScrollState, Partial<Record<string, ScrollAreaScrollState>>>;
|
|
33
|
+
export declare const SCROLL_AREA_SCROLL_INITIAL: ScrollAreaScrollState;
|
|
34
|
+
export interface ScrollAreaSizes {
|
|
35
|
+
content: number;
|
|
36
|
+
viewport: number;
|
|
37
|
+
scrollbar: {
|
|
38
|
+
size: number;
|
|
39
|
+
paddingStart: number;
|
|
40
|
+
paddingEnd: number;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export declare const scrollAreaThumbRatio: (viewport: number, content: number) => number;
|
|
44
|
+
/** Radix's `getThumbSize`: the ratio of the track, at least 18px. */
|
|
45
|
+
export declare function scrollAreaThumbSize(sizes: ScrollAreaSizes): number;
|
|
46
|
+
/** Radix's `getScrollPositionFromPointer`. */
|
|
47
|
+
export declare function scrollAreaScrollFromPointer(pointer: number, pointerOffset: number, sizes: ScrollAreaSizes, dir?: ScrollAreaDir): number;
|
|
48
|
+
/** Radix's `getThumbOffsetFromScroll`. */
|
|
49
|
+
export declare function scrollAreaThumbOffset(scroll: number, sizes: ScrollAreaSizes, dir?: ScrollAreaDir): number;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const SELECT_CLASSES: {
|
|
2
|
+
readonly trigger: "flex w-fit items-center justify-between gap-2 rounded-lg border border-glass-stroke-card bg-glass-card px-3 py-2 text-sm whitespace-nowrap shadow-none transition-[color,border-color] duration-fast outline-none hover:bg-glass-active/50 focus-visible:border-glass-stroke-active focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-foreground/50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--menu-icon-size) [&_svg:not([class*='text-'])]:text-muted-foreground";
|
|
3
|
+
readonly triggerIcon: "size-4 opacity-50";
|
|
4
|
+
readonly content: "z-50 rounded-lg border border-glass-stroke-card bg-glass-card-opaque text-popover-foreground motion-popover relative max-h-(--radix-select-content-available-height) min-w-(--menu-min-width) max-w-(--menu-max-width) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto";
|
|
5
|
+
/** `position="popper"` only. */
|
|
6
|
+
readonly contentPopper: "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";
|
|
7
|
+
readonly viewport: "p-(--menu-surface-padding)";
|
|
8
|
+
/** `position="popper"` only. */
|
|
9
|
+
readonly viewportPopper: "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";
|
|
10
|
+
readonly label: "px-(--menu-item-padding-x) py-1.5 text-xs text-muted-foreground";
|
|
11
|
+
readonly item: "relative flex min-h-(--menu-item-height) w-full cursor-pointer items-center gap-(--menu-item-gap) rounded-sm py-1 pr-8 pl-(--menu-item-padding-x) text-sm text-foreground/90 outline-hidden select-none focus:bg-glass-active focus:text-foreground data-[disabled]:cursor-default data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--menu-icon-size) [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2";
|
|
12
|
+
readonly itemIndicator: "absolute right-2 flex size-3.5 items-center justify-center";
|
|
13
|
+
readonly itemCheck: "size-4";
|
|
14
|
+
readonly separator: "pointer-events-none -mx-1 my-1 h-px bg-glass-stroke";
|
|
15
|
+
readonly scrollButton: "flex cursor-default items-center justify-center py-1";
|
|
16
|
+
readonly scrollIcon: "size-4";
|
|
17
|
+
};
|
|
18
|
+
export declare const SELECT_INLINE: {
|
|
19
|
+
readonly value: {
|
|
20
|
+
readonly "pointer-events": "none";
|
|
21
|
+
};
|
|
22
|
+
/** The item-aligned position's fixed wrapper (before `position()` runs). */
|
|
23
|
+
readonly wrapper: {
|
|
24
|
+
readonly display: "flex";
|
|
25
|
+
readonly "flex-direction": "column";
|
|
26
|
+
readonly position: "fixed";
|
|
27
|
+
};
|
|
28
|
+
readonly viewport: {
|
|
29
|
+
readonly position: "relative";
|
|
30
|
+
readonly flex: "1";
|
|
31
|
+
readonly overflow: "hidden auto";
|
|
32
|
+
};
|
|
33
|
+
readonly scrollButton: {
|
|
34
|
+
readonly "flex-shrink": "0";
|
|
35
|
+
};
|
|
36
|
+
/** The wrapper's `justify-content` once an expand-on-scroll pinned it to the bottom. */
|
|
37
|
+
readonly expandEnd: "flex-end";
|
|
38
|
+
};
|
|
39
|
+
export declare const SELECT_VIEWPORT_ATTR = "data-radix-select-viewport";
|
|
40
|
+
/** Radix Select's viewport sheet (the native scrollbar hidden). */
|
|
41
|
+
export declare const SELECT_VIEWPORT_CSS = "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}";
|
|
42
|
+
/** The content's style, `item-aligned`: box sizing + max height, the
|
|
43
|
+
* dismissable layer's pointer events, the flex column, no outline. */
|
|
44
|
+
export declare function selectItemAlignedContentStyle(pointerEvents: string | undefined): Record<string, string | undefined>;
|
|
45
|
+
/** The content's style, `popper`: Radix's PopperContent order (its
|
|
46
|
+
* `--radix-select-*` aliases, `animation: none` until placed). */
|
|
47
|
+
export declare function selectPopperContentStyle(pointerEvents: string | undefined, positioned: boolean): Record<string, string | undefined>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type SheetSide = `top` | `right` | `bottom` | `left`;
|
|
2
|
+
export declare const SHEET_CLASSES: {
|
|
3
|
+
readonly overlay: "fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-standard data-[state=closed]:ease-accelerate data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-slow data-[state=open]:ease-decelerate";
|
|
4
|
+
readonly content: "group/sheet fixed z-50 flex flex-col gap-4 border-glass-stroke-card shadow-lg motion-sheet";
|
|
5
|
+
readonly sides: {
|
|
6
|
+
right: string;
|
|
7
|
+
left: string;
|
|
8
|
+
top: string;
|
|
9
|
+
bottom: string;
|
|
10
|
+
};
|
|
11
|
+
/** The hidden Close a drag-to-dismiss clicks. */
|
|
12
|
+
readonly dragClose: "hidden";
|
|
13
|
+
readonly close: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary";
|
|
14
|
+
readonly closeIcon: "size-4";
|
|
15
|
+
readonly srOnly: "sr-only";
|
|
16
|
+
readonly header: "flex flex-col gap-1.5 p-4 text-left";
|
|
17
|
+
readonly footer: "mt-auto flex flex-col gap-2 p-4";
|
|
18
|
+
readonly title: "font-semibold text-foreground max-sm:group-data-[side=bottom]/sheet:text-lg max-sm:group-data-[side=bottom]/sheet:leading-none";
|
|
19
|
+
readonly description: "text-sm text-muted-foreground";
|
|
20
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const SWITCH_CLASSES: {
|
|
2
|
+
readonly root: "peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-none transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-5 data-[size=default]:w-9 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-glass-active";
|
|
3
|
+
readonly thumb: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 group-data-[size=default]/switch:data-[state=checked]:translate-x-[calc(100%+2px)] dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground";
|
|
4
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const TABLE_CLASSES: {
|
|
2
|
+
readonly container: "relative w-full overflow-x-auto";
|
|
3
|
+
readonly root: "w-full caption-bottom border-collapse text-sm";
|
|
4
|
+
readonly header: "[&_tr]:hover:bg-transparent";
|
|
5
|
+
readonly body: "[&_tr:last-child]:border-0";
|
|
6
|
+
readonly footer: "border-t border-border font-medium [&>tr]:last:border-b-0";
|
|
7
|
+
readonly row: "border-b border-border transition-colors duration-fast hover:bg-glass-row data-[state=selected]:bg-glass-active";
|
|
8
|
+
readonly head: "px-3 py-2 text-left align-middle text-xs font-medium whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0";
|
|
9
|
+
readonly cell: "px-3 py-2 align-middle text-sm whitespace-nowrap [&:has([role=checkbox])]:pr-0";
|
|
10
|
+
readonly caption: "mt-4 text-sm text-muted-foreground";
|
|
11
|
+
};
|