@cueplusplus/ui 0.11.1 → 0.12.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/CHANGELOG.md +198 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/layout/_ground.d.ts +22 -0
- package/dist/layout/_ground.js +9 -0
- package/dist/layout/bento.js +1 -1
- package/dist/layout/frames.d.ts +70 -0
- package/dist/layout/frames.js +298 -0
- package/dist/layout/index.d.ts +4 -2
- package/dist/layout/index.js +2 -1
- package/dist/layout/preview.d.ts +50 -3
- package/dist/layout/preview.js +179 -31
- package/dist/overlays/drawer.js +1 -1
- package/dist/primitives/chip.d.ts +1 -1
- package/manifest/components/bento.json +1 -1
- package/manifest/components/frames.json +210 -0
- package/manifest/components/preview.json +85 -8
- package/manifest/manifest.json +18 -5
- package/manifest/tokens.json +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,203 @@
|
|
|
1
1
|
# @cueplusplus/ui
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 11c7307: A design canvas — `Frames` — and a `Preview` that knows how to sit on one.
|
|
8
|
+
|
|
9
|
+
**Nothing to do.** `Frames` is a new export, all five of `Preview`'s new props are optional, and no
|
|
10
|
+
prop that already existed changed shape. A `Preview` called the way you call one today renders
|
|
11
|
+
**byte-identical markup** — the same string, class for class — and this package's suite holds it to
|
|
12
|
+
three goldens captured from the tree before the change rather than to a promise.
|
|
13
|
+
`@cueplusplus/tokens` and `@cueplusplus/brand-tokens` move with it as one fixed family, and neither
|
|
14
|
+
changes. The snippets below are fragments.
|
|
15
|
+
|
|
16
|
+
**`Frames`** (`@cueplusplus/ui`, and `@cueplusplus/ui/layout`) is a new compound in two parts:
|
|
17
|
+
`Frames.Root` is the canvas, `Frames.Item` is one captioned cell on it. `FramesHeight`,
|
|
18
|
+
`FramesRootProps` and `FramesItemProps` ship beside them.
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { Button } from "@cueplusplus/ui";
|
|
22
|
+
import { Frames, Preview } from "@cueplusplus/ui/layout";
|
|
23
|
+
|
|
24
|
+
<Frames.Root label="Button frames" hint="drag to pan · 2 frames">
|
|
25
|
+
<Preview presentation="frame" label="Tone" count={2}>
|
|
26
|
+
<div className="flex flex-wrap items-end gap-(--cue-space-6)">
|
|
27
|
+
<Frames.Item caption="accent">
|
|
28
|
+
<Button variant="primary">Take cue</Button>
|
|
29
|
+
</Frames.Item>
|
|
30
|
+
<Frames.Item caption="default">
|
|
31
|
+
<Button>Take cue</Button>
|
|
32
|
+
</Frames.Item>
|
|
33
|
+
</div>
|
|
34
|
+
</Preview>
|
|
35
|
+
<Preview presentation="frame" label="Size" count={3}>
|
|
36
|
+
…
|
|
37
|
+
</Preview>
|
|
38
|
+
</Frames.Root>;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- **Short and wide on purpose.** `height` is `"short"` (18.5rem, the default) or `"tall"` (27rem),
|
|
42
|
+
and a CSS length in `style` beats both. The canvas scrolls sideways and never down.
|
|
43
|
+
- **`label` is required**, and it is not decoration: the canvas is a `role="region"` with
|
|
44
|
+
`tabIndex={0}`, and a scroll region with no name is one a screen reader announces as nothing.
|
|
45
|
+
- **The keyboard scrolls it.** Left and Right step one rung of `--cue-space-8` — read off the canvas
|
|
46
|
+
itself, so a board inside a `<Density>` island steps by that density's rung — PageUp and PageDown
|
|
47
|
+
step a viewport, and Home and End reach the ends. Smoothly, or instantly for a reader who asked
|
|
48
|
+
for less motion.
|
|
49
|
+
- **Dragging pans it**, by `scrollLeft` and not by a transform, so the scrollbar stays real and a
|
|
50
|
+
popover opened inside a frame stays anchored. Only the primary button drags, and a drag that
|
|
51
|
+
starts on a `button`, `a`, `input`, `select`, `textarea`, or an element carrying a `role` of its
|
|
52
|
+
own, is never a pan — so a frame's own controls keep working. `pan={false}` binds no pointer
|
|
53
|
+
listener at all and leaves the keyboard alone.
|
|
54
|
+
- `ground` is `"plain"`, `"dots"` (the default) or `"none"`, and `hint` is an optional node in the
|
|
55
|
+
bottom-right corner, which is where a line like "drag to pan · 8 frames" goes.
|
|
56
|
+
- **It does not zoom, and it does not inspect its children** — it never counts them, indexes them or
|
|
57
|
+
selects one. The count in `hint` is one you passed it. Zoom is a refusal rather than a gap: a
|
|
58
|
+
transformed subtree breaks every popover anchored inside it.
|
|
59
|
+
- **`Frames.Item` goes inside a `Preview`**, not directly inside `Frames.Root`: the canvas holds
|
|
60
|
+
frames, a frame holds a stage, and the stage holds these. `caption` is the line under the
|
|
61
|
+
specimen, and `selected` draws the outline on the one a reader is inspecting.
|
|
62
|
+
- **A stage does not arrange several items — you do.** A stage is a centred grid in both
|
|
63
|
+
presentations, so two items left to it stack. Put them in a row wrapper:
|
|
64
|
+
`<div className="flex flex-wrap items-end gap-(--cue-space-6)">` — `items-end` so specimens of
|
|
65
|
+
different heights share a baseline, `flex-wrap` so a narrow frame folds rather than clips. Every
|
|
66
|
+
example in this library uses that one spelling.
|
|
67
|
+
- The whole `Frames` module is a client component (`"use client"`), as `Preview` already was — so
|
|
68
|
+
`Frames.Item` is one too.
|
|
69
|
+
|
|
70
|
+
**`Preview` gains five optional props.** `name` and `count` are drawn only in the new `"frame"`
|
|
71
|
+
presentation; `ground` and `captions` apply to a panel's stage just as well.
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
<Preview
|
|
75
|
+
presentation="frame"
|
|
76
|
+
label="Button tone"
|
|
77
|
+
name={<ToneMenu />}
|
|
78
|
+
count={3}
|
|
79
|
+
captions={false}
|
|
80
|
+
>
|
|
81
|
+
…
|
|
82
|
+
</Preview>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
- **`presentation`** is `"panel" | "frame"`. `"panel"` is the default and is what `Preview` has
|
|
86
|
+
always drawn: a bordered card, `tools` floating over the stage's top right, a footer under it.
|
|
87
|
+
`"frame"` draws the label row _above_ the stage instead of over it, moves `tools` into that row
|
|
88
|
+
(where they reserve no room on the stage), makes the stage transparent so whatever it sits on
|
|
89
|
+
shows through, and puts four crosshair marks at its outer corners.
|
|
90
|
+
- **`name`** is the label row's leading slot, drawn only in a frame — a plain node, or your own
|
|
91
|
+
control: pass a `DropdownMenu` whose trigger is the frame's name. Unset, the row opens with
|
|
92
|
+
`label` as text. A slot and not a built-in menu, because this component imports no overlay, and a
|
|
93
|
+
page that draws seventeen Previews should not have to pay for one.
|
|
94
|
+
- **`count`** is the figure drawn after the name, in a frame only. Nothing is counted for you, and
|
|
95
|
+
`0` is a figure it draws.
|
|
96
|
+
- **`ground`** is the stage's ground — `"plain"`, `"dots"` or `"none"`. It defaults to `"dots"` in a
|
|
97
|
+
panel, which is the bench this library has always drawn, and to `"none"` in a frame, where the
|
|
98
|
+
canvas under it already carries a ground and two dot grids at different pitches read as a moiré.
|
|
99
|
+
- **`captions={false}`** turns the `Frames.Item` captions off on that stage, and it is paint and
|
|
100
|
+
nothing more: `opacity: 0` and `pointer-events: none`, never `visibility: hidden` and never
|
|
101
|
+
`display: none`. Each caption keeps its box, so nothing re-flows, and keeps its place in the
|
|
102
|
+
accessibility tree, so a screen reader still reads it — a caption is what names one specimen apart
|
|
103
|
+
from the next. Drop the `caption` prop if the words should not be in the page at all.
|
|
104
|
+
|
|
105
|
+
`PreviewPresentation` and `PreviewGround` are exported beside `PreviewProps`.
|
|
106
|
+
|
|
107
|
+
**Frame chrome follows the page, exactly as a panel's does.** `theme`, `mode`, `density` and `font`
|
|
108
|
+
still land on the stage and nowhere else; the label row, the `name` slot, the count, the tools, the
|
|
109
|
+
crosshairs and the footer stay in the scope around the Preview.
|
|
110
|
+
|
|
111
|
+
`manifest/manifest.json`, `manifest/components/frames.json` and `manifest/components/preview.json`
|
|
112
|
+
were regenerated with them.
|
|
113
|
+
|
|
114
|
+
### Patch Changes
|
|
115
|
+
|
|
116
|
+
- 7e8857d: Frame captions, preview footers and bento eyebrows are small again, instead of taking their size from whatever sat above them.
|
|
117
|
+
|
|
118
|
+
**Nothing to do.** No prop changed shape, no element moved, no slot was renamed. Six class strings
|
|
119
|
+
changed one word each; a page that looked right before looks the same, and the lines described
|
|
120
|
+
below get smaller.
|
|
121
|
+
|
|
122
|
+
**What you saw.** Five lines of chrome across three components drew at the size of the text around
|
|
123
|
+
them rather than at the smallest rung of the type ladder:
|
|
124
|
+
|
|
125
|
+
- `Preview`'s footer row, and the count beside a frame's name (`presentation="frame"`) — which sat
|
|
126
|
+
_larger_ than the name it followed, though it is the quieter of the two;
|
|
127
|
+
- `Frames.Root`'s corner hint, the "drag to pan · 8 frames" line;
|
|
128
|
+
- `Frames.Item`'s caption under each specimen;
|
|
129
|
+
- `Bento.Tile`'s eyebrow, the mono line above a tile's title.
|
|
130
|
+
|
|
131
|
+
Each rendered at the font size of its nearest styled ancestor, so the same caption was one size on
|
|
132
|
+
a page whose section set a size and another size on a page that did not.
|
|
133
|
+
|
|
134
|
+
**Why.** All five asked for `--cue-text-meta`, and there is no such token: `@cueplusplus/tokens`
|
|
135
|
+
publishes six type rungs — `micro`, `label`, `ui`, `body`, `emphasis`, `title` — and `meta` is not
|
|
136
|
+
one of them. A `var()` naming a property nothing declares makes the whole declaration invalid at
|
|
137
|
+
computed-value time, so the browser threw the `font-size` away and the element inherited. That is
|
|
138
|
+
why nothing warned: the class attribute was well-formed, the markup was identical, and only the
|
|
139
|
+
rendered page was wrong.
|
|
140
|
+
|
|
141
|
+
They now ask for `--cue-text-micro`, the rung those lines were always meant to sit on and the one
|
|
142
|
+
this library already uses for every other mono eyebrow and caption. That is **8px** at the
|
|
143
|
+
`compact` default, and 8 / 8 / 9 / 10 / 11 px across `ultra-compact` through `ultra-large`, before
|
|
144
|
+
any `fontScale` you have set on the provider.
|
|
145
|
+
|
|
146
|
+
**A sixth line, found by the guard below once it was extended, and a different mistake.** `Drawer`'s grab handle — the
|
|
147
|
+
little bar at the top of a bottom drawer, or the side of a side one — asked for
|
|
148
|
+
`rounded-(--radius-full)`, and there is no such Tailwind theme variable: this system's bridge
|
|
149
|
+
publishes `--radius-control`, `--radius-surface` and `--radius-overlay`, and Tailwind's own scale
|
|
150
|
+
runs `--radius-xs` through `--radius-4xl`. So the handle drew a 4px-thick rectangle with square
|
|
151
|
+
ends where it should have been a pill. It is now `rounded-full`, which is the spelling the other
|
|
152
|
+
184 pill-shaped elements in this library already use — `StatusDot`, `Avatar`, `Spinner`,
|
|
153
|
+
`InfoTip` — and which needs no theme variable at all.
|
|
154
|
+
|
|
155
|
+
**A guard came with it.** `packages/ui` now fails its own suite if a class string anywhere under
|
|
156
|
+
`src/` names a custom property nothing declares — checked against **both** vocabularies a class can
|
|
157
|
+
spend from: the `--cue-*` token layer this package builds on, and the Tailwind `@theme` layer,
|
|
158
|
+
which is this system's bridge (`--radius-control`, `--text-body`, `--color-accent`) together with
|
|
159
|
+
Tailwind's own default scale, since an app that imports `tailwindcss` keeps both. So the next
|
|
160
|
+
misspelling in either is a red test rather than a page nobody measured. A property a component
|
|
161
|
+
sets on its own element, and one spent with a `var()` fallback, are both still allowed — neither
|
|
162
|
+
can go invalid. Properties another library publishes on its elements (Base UI's `--popup-width`,
|
|
163
|
+
`--available-height`) are left alone: nothing in this repository could be the authority on whether
|
|
164
|
+
one of those exists.
|
|
165
|
+
|
|
166
|
+
`manifest/manifest.json`, `manifest/components/preview.json`, `manifest/components/frames.json` and
|
|
167
|
+
`manifest/components/bento.json` were regenerated: each recorded `--cue-text-meta` in its
|
|
168
|
+
`tokensUsed`, which is how an unresolvable property had been published as part of the contract.
|
|
169
|
+
|
|
170
|
+
- 3f1aa4a: A click on a control's own words inside a `Frames` canvas is no longer swallowed by the board.
|
|
171
|
+
|
|
172
|
+
**Nothing to do.** No prop changed shape and no markup moved; a canvas that behaved correctly
|
|
173
|
+
before behaves the same way now.
|
|
174
|
+
|
|
175
|
+
**What was broken.** On a `Frames.Root`, a menu row, a listbox option, a tab — anything this
|
|
176
|
+
library draws as a `<div role="…">` with its label in a `<span>` inside it — did nothing when you
|
|
177
|
+
clicked the words. The same row worked from the keyboard, and it worked if you happened to click
|
|
178
|
+
its padding a few pixels from the edge, which is what made it read as a broken menu rather than a
|
|
179
|
+
broken canvas. The most visible case was the frame name menu on a design board: pick a frame, click
|
|
180
|
+
its name, and the menu stayed open with nothing swapped.
|
|
181
|
+
|
|
182
|
+
**Why.** The canvas decides on every `pointerdown` whether you are pressing something or grabbing
|
|
183
|
+
the board. It looked for `button`, `a`, `input`, `select` and `textarea` _anywhere above the
|
|
184
|
+
pointer_, but for an ARIA `role` it looked **only at the element directly under it** — so the
|
|
185
|
+
`<span>` holding a menu row's text was neither, the canvas took the pointer capture, and the
|
|
186
|
+
`pointerup` and `click` were retargeted to the board. A control's own contents are part of the
|
|
187
|
+
control, and now they are treated that way: the roles a pointer operates — `menuitem`,
|
|
188
|
+
`menuitemcheckbox`, `menuitemradio`, `option`, `tab`, `treeitem`, `button`, `link`, `checkbox`,
|
|
189
|
+
`radio`, `switch`, `slider`, `spinbutton`, `scrollbar`, `separator`, `textbox`, `searchbox` — are
|
|
190
|
+
matched from the pointer upwards, exactly as `button` always was.
|
|
191
|
+
|
|
192
|
+
**Panning is unchanged.** A container role is still a thing to grab, not a thing to press: a drag
|
|
193
|
+
that starts inside a `role="group"` frame, or on the canvas's own `role="region"` ground, still
|
|
194
|
+
pans, and so does a drag across a `role="grid"` table, a `role="menu"`'s own padding or a
|
|
195
|
+
`role="tablist"`'s. Only the elements that _are_ a control, and their contents, are excluded — and
|
|
196
|
+
an element bearing any `role` at all is still excluded when the pointer is on it directly, as it
|
|
197
|
+
was before. `pan={false}` still binds no pointer listener.
|
|
198
|
+
|
|
199
|
+
- @cueplusplus/tokens@0.12.0
|
|
200
|
+
|
|
3
201
|
## 0.11.1
|
|
4
202
|
|
|
5
203
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -94,10 +94,12 @@ import { Breadcrumb, BreadcrumbItem, BreadcrumbProps } from "./layout/breadcrumb
|
|
|
94
94
|
import { Card, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardRootProps, CardTitleProps } from "./layout/card.js";
|
|
95
95
|
import { Collapsible, CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps, Disclosure, DisclosureProps } from "./layout/collapsible.js";
|
|
96
96
|
import { DescriptionList, DescriptionListDetailProps, DescriptionListLayout, DescriptionListRootProps, DescriptionListTermProps } from "./layout/description-list.js";
|
|
97
|
+
import { PreviewGround } from "./layout/_ground.js";
|
|
98
|
+
import { Frames, FramesHeight, FramesItemProps, FramesRootProps } from "./layout/frames.js";
|
|
97
99
|
import { Grid, GridColumns, GridProps } from "./layout/grid.js";
|
|
98
100
|
import { Item, ItemProps, itemVariants } from "./layout/item.js";
|
|
99
101
|
import { Pagination, PaginationEntry, PaginationProps, paginationRange } from "./layout/pagination.js";
|
|
100
|
-
import { Preview, PreviewAxis, PreviewProps, PreviewResizeOptions } from "./layout/preview.js";
|
|
102
|
+
import { Preview, PreviewAxis, PreviewPresentation, PreviewProps, PreviewResizeOptions } from "./layout/preview.js";
|
|
101
103
|
import { Stepper, StepperProps, StepperState, StepperStep } from "./layout/stepper.js";
|
|
102
104
|
import { StatusDot, StatusDotProps, StatusTone } from "./primitives/status-dot.js";
|
|
103
105
|
import { Timeline, TimelineContentProps, TimelineItemProps, TimelineMarkerProps, TimelineRootProps } from "./layout/timeline.js";
|
|
@@ -132,4 +134,4 @@ import { useDensities, useFonts, useThemes } from "./system/theme-registry.js";
|
|
|
132
134
|
import { ControlSize, useControlHeight, useDensity } from "./system/use-density.js";
|
|
133
135
|
import { useTheme } from "./system/use-theme.js";
|
|
134
136
|
import { DensityEntry, DensityLevel, FontEntry, FontName, Mode, ThemeManifest, ThemeName } from "./system/index.js";
|
|
135
|
-
export { AGENT_COLOR_PROPERTY, AGENT_HUES, AGENT_ROOT_COLOR, Accordion, type AccordionHeaderProps, type AccordionItemProps, type AccordionPanelProps, type AccordionRootProps, type AccordionTriggerProps, type AgentColorOptions, AgentPile, type AgentPileEntry, type AgentPileProps, type AgentPileSize, AlertDialog, type AlertDialogActionProps, type AlertDialogCancelProps, type AlertDialogContentProps, type AlertDialogDescriptionProps, type AlertDialogFooterProps, type AlertDialogRootProps, type AlertDialogTitleProps, type AlertDialogTriggerProps, AppBar, type AppBarActionsProps, type AppBarBrandProps, type AppBarLinkProps, type AppBarNavProps, type AppBarRegister, type AppBarRootProps, type AppBarSeparatorProps, AppShell, type AppShellAsideProps, type AppShellBarProps, type AppShellBodyProps, type AppShellContentProps, type AppShellNavTriggerProps, type AppShellRootProps, type AppShellScrollerProps, type AppShellSidebarProps, AppWindowFrame, type AppWindowFrameProps, type AskAnswer, AskBox, type AskBoxProps, type AskDanger, type AskKind, type AskOption, AudienceIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type BarOverflow, Bento, type BentoColumns, type BentoMinHeight, type BentoRootProps, type BentoRowSpan, type BentoRows, type BentoSpan, type BentoTileProps, type BrandAssetProps, type BrandSize, type BrandTone, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonProps, Card, type CardContentProps, type CardDescriptionProps, type CardFooterProps, type CardHeaderProps, type CardRootProps, type CardTitleProps, CatalogueIcon, ChannelBetaIcon, ChannelReleasedIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, CliToolIcon, CodeBlock, type CodeBlockProps, Collapsible, type CollapsiblePanelProps, type CollapsibleRootProps, type CollapsibleTriggerProps, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, type CommandPaletteItem, type CommandPaletteProps, Composer, type ComposerProps, type ComposerSubmitKey, Container, type ContainerProps, type ContainerWidth, ContextMenu, type ContextMenuContentProps, type ContextMenuRootProps, type ContextMenuTriggerProps, type ControlSize, type ControlVariantProps, CopyButton, type CopyButtonProps, CueLogotype, type CueLogotypeProps, CueMark, type CueMarkProps, CuePortalFrame, type CuePortalFrameProps, DEFAULT_STORAGE_KEY, DataRow, type DataRowDisclosure, type DataRowRootProps, type DataRowSlotProps, DataTree, type DataTreeItem, type DataTreeProps, type DataTreeRowState, DelegationCard, type DelegationCardProps, type DelegationDirection, type DelegationStatus, Density, type DensityEntry, type DensityLevel, type DensityProps, DescriptionList, type DescriptionListDetailProps, type DescriptionListLayout, type DescriptionListRootProps, type DescriptionListTermProps, Dialog, type DialogCloseProps, type DialogContentProps, type DialogDescriptionProps, type DialogFooterProps, type DialogRootProps, type DialogTitleProps, type DialogTriggerProps, Disclosure, type DisclosureProps, Drawer, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerRootProps, type DrawerSwipeDirection, type DrawerTitleProps, type DrawerTriggerProps, DropdownMenu, type DropdownMenuCheckboxItemProps, type DropdownMenuContentProps, type DropdownMenuGroupProps, type DropdownMenuItemProps, type DropdownMenuLabelProps, type DropdownMenuRootProps, type DropdownMenuSeparatorProps, type DropdownMenuTriggerProps, EmptyState, type EmptyStateProps, EnvVarInput, type EnvVarInputProps, Eyebrow, type EyebrowProps, Field, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, type FieldIssue, FieldLabel, type FieldLabelProps, type FieldProps, type FilePartition, type FilePartitionOptions, type FileRejectReason, type FileRejection, FileUpload, type FileUploadProps, FolderIcon, type FontEntry, type FontFamilies, type FontName, Footer, type FooterProps, type FormControlSize, Grid, type GridColumns, type GridProps, GroupBar, type GroupBarItem, type GroupBarProps, type GroupBarTone, HoverCard, type HoverCardContentProps, type HoverCardRootProps, type HoverCardTriggerProps, IconButton, type IconButtonProps, InfoTip, type InfoTipProps, Input, InputGroup, type InputGroupProps, type InputProps, Inspector, type InspectorFooterProps, type InspectorRootProps, type InspectorRowProps, type InspectorSectionProps, Item, type ItemProps, Kbd, type KbdProps, Ledger, type LedgerEmptyProps, type LedgerGroupProps, type LedgerRootProps, type LedgerTierProps, Link, type LinkProps, McpServerIcon, Menubar, type MenubarContentProps, type MenubarMenuProps, type MenubarRootProps, type MenubarTriggerProps, Message, MessageList, type MessageListProps, type MessageProps, type MessageRole, Meter, type MeterProps, type MeterProvenance, type MeterTone, type Mode, MultiSelect, type MultiSelectProps, NavigationMenu, type NavigationMenuContentProps, type NavigationMenuItemProps, type NavigationMenuLinkProps, type NavigationMenuListProps, type NavigationMenuRootProps, type NavigationMenuTriggerProps, type NavigationMenuViewportProps, NumberField, type NumberFieldProps, OTPField, type OTPFieldProps, OVERLAY_SIDE_OFFSET, PageShell, type PageShellProps, type PageWidth, Pagination, type PaginationEntry, type PaginationProps, Panel, PanelHeader, type PanelHeaderProps, type PanelProps, PasswordInput, type PasswordInputProps, type PersistedPreferences, Plussie, type PlussieExpression, type PlussieProps, Popover, type PopoverCloseProps, type PopoverContentProps, type PopoverDescriptionProps, type PopoverRootProps, type PopoverTitleProps, type PopoverTriggerProps, type PrepaintDefaults, type PrepaintOptions, Preview, type PreviewAxis, type PreviewProps, type PreviewResizeOptions, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RatingSize, type ResolvedMode, Row, type RowProps, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, type ScrollEdges, ScrollableTabsList, type ScrollableTabsListProps, ScrubInput, type ScrubInputProps, SeamCell, type SeamCellProps, SeamGrid, type SeamGridProps, type SeamGround, SeamList, type SeamListProps, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetCloseProps, type SheetContentProps, type SheetDescriptionProps, type SheetFooterProps, type SheetRootProps, type SheetTitleProps, type SheetTriggerProps, Sidebar, type SidebarItemProps, type SidebarRailProps, type SidebarRootProps, type SidebarSectionProps, Skeleton, type SkeletonProps, SkillIcon, Slider, type SliderProps, type SpaceStep, Sparkline, type SparklineProps, Spinner, type SpinnerProps, Stack, type StackAlign, StackIcon, type StackJustify, type StackProps, StacksMatrixIcon, Stat, type StatProps, type StatTone, StatusBar, type StatusBarGroupProps, type StatusBarItemProps, type StatusBarProminence, type StatusBarProps, type StatusBarTone, StatusDot, type StatusDotProps, type StatusTone, Stepper, type StepperProps, type StepperState, type StepperStep, Switch, type SwitchProps, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Table, type TableCaptionProps, type TableCellProps, type TableGroupRowProps, type TableHeadProps, type TableRootProps, type TableRowProps, TableScrollRegion, type TableScrollRegionProps, type TableSectionProps, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTabProps, TagsInput, type TagsInputProps, TerminalFrame, type TerminalFrameLine, type TerminalFrameProps, type TerminalLine, type TerminalLineTone, type TerminalScript, type TerminalStep, Textarea, type TextareaProps, type ThemeContextValue, type ThemeManifest, type ThemeName, ThemeProvider, type ThemeProviderProps, type ThemeRegistry, Timeline, type TimelineContentProps, type TimelineItemProps, type TimelineMarkerProps, type TimelineRootProps, TitleBar, type TitleBarProps, Toast, type ToastManager, type ToastOptions, type ToastProviderProps, type ToastTone, type ToastViewportProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, type TokenOverrides, Toolbar, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarRootProps, type ToolbarSeparatorProps, Tooltip, type TooltipContentProps, type TooltipProviderProps, type TooltipRootProps, type TooltipTriggerProps, Tree, type TreeGuide, type TreeItem, type TreeProps, type TreeRow, type TreeVisibility, TreeVisibilityToggle, type TreeVisibilityToggleProps, TwoStepButton, type TwoStepButtonProps, type TwoStepTone, type UploadFile, type UploadStatus, UsageChart, type UsageChartPoint, type UsageChartProps, type UsageChartTone, activateRowFromClick, activateRowFromKeyDown, agentColor, agentColorStyle, bareControlClasses, buttonVariants, chipVariants, computeScrollEdges, controlClasses, controlGroupFocusClasses, controlSurface, controlVariants, edgeFadeMask, envReference, flattenTree, isSafeTokenValue, itemVariants, linkVariants, menuItemClasses, menuLabelClasses, menuPopupClasses, menuSeparatorClasses, overlayDescriptionClasses, overlayFooterClasses, overlayModalTransitionClasses, overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses, overlayTextClasses, overlayTitleClasses, paginationRange, parseEnvReference, partitionFiles, prepaintScript, rowVariants, scrimClasses, useControlHeight, useCuePortalProps, useDensities, useDensity, useFonts, useSidebar, useTheme, useThemes, useToast };
|
|
137
|
+
export { AGENT_COLOR_PROPERTY, AGENT_HUES, AGENT_ROOT_COLOR, Accordion, type AccordionHeaderProps, type AccordionItemProps, type AccordionPanelProps, type AccordionRootProps, type AccordionTriggerProps, type AgentColorOptions, AgentPile, type AgentPileEntry, type AgentPileProps, type AgentPileSize, AlertDialog, type AlertDialogActionProps, type AlertDialogCancelProps, type AlertDialogContentProps, type AlertDialogDescriptionProps, type AlertDialogFooterProps, type AlertDialogRootProps, type AlertDialogTitleProps, type AlertDialogTriggerProps, AppBar, type AppBarActionsProps, type AppBarBrandProps, type AppBarLinkProps, type AppBarNavProps, type AppBarRegister, type AppBarRootProps, type AppBarSeparatorProps, AppShell, type AppShellAsideProps, type AppShellBarProps, type AppShellBodyProps, type AppShellContentProps, type AppShellNavTriggerProps, type AppShellRootProps, type AppShellScrollerProps, type AppShellSidebarProps, AppWindowFrame, type AppWindowFrameProps, type AskAnswer, AskBox, type AskBoxProps, type AskDanger, type AskKind, type AskOption, AudienceIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type BarOverflow, Bento, type BentoColumns, type BentoMinHeight, type BentoRootProps, type BentoRowSpan, type BentoRows, type BentoSpan, type BentoTileProps, type BrandAssetProps, type BrandSize, type BrandTone, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonProps, Card, type CardContentProps, type CardDescriptionProps, type CardFooterProps, type CardHeaderProps, type CardRootProps, type CardTitleProps, CatalogueIcon, ChannelBetaIcon, ChannelReleasedIcon, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, CliToolIcon, CodeBlock, type CodeBlockProps, Collapsible, type CollapsiblePanelProps, type CollapsibleRootProps, type CollapsibleTriggerProps, Combobox, type ComboboxOption, type ComboboxProps, CommandPalette, type CommandPaletteItem, type CommandPaletteProps, Composer, type ComposerProps, type ComposerSubmitKey, Container, type ContainerProps, type ContainerWidth, ContextMenu, type ContextMenuContentProps, type ContextMenuRootProps, type ContextMenuTriggerProps, type ControlSize, type ControlVariantProps, CopyButton, type CopyButtonProps, CueLogotype, type CueLogotypeProps, CueMark, type CueMarkProps, CuePortalFrame, type CuePortalFrameProps, DEFAULT_STORAGE_KEY, DataRow, type DataRowDisclosure, type DataRowRootProps, type DataRowSlotProps, DataTree, type DataTreeItem, type DataTreeProps, type DataTreeRowState, DelegationCard, type DelegationCardProps, type DelegationDirection, type DelegationStatus, Density, type DensityEntry, type DensityLevel, type DensityProps, DescriptionList, type DescriptionListDetailProps, type DescriptionListLayout, type DescriptionListRootProps, type DescriptionListTermProps, Dialog, type DialogCloseProps, type DialogContentProps, type DialogDescriptionProps, type DialogFooterProps, type DialogRootProps, type DialogTitleProps, type DialogTriggerProps, Disclosure, type DisclosureProps, Drawer, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerRootProps, type DrawerSwipeDirection, type DrawerTitleProps, type DrawerTriggerProps, DropdownMenu, type DropdownMenuCheckboxItemProps, type DropdownMenuContentProps, type DropdownMenuGroupProps, type DropdownMenuItemProps, type DropdownMenuLabelProps, type DropdownMenuRootProps, type DropdownMenuSeparatorProps, type DropdownMenuTriggerProps, EmptyState, type EmptyStateProps, EnvVarInput, type EnvVarInputProps, Eyebrow, type EyebrowProps, Field, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, type FieldIssue, FieldLabel, type FieldLabelProps, type FieldProps, type FilePartition, type FilePartitionOptions, type FileRejectReason, type FileRejection, FileUpload, type FileUploadProps, FolderIcon, type FontEntry, type FontFamilies, type FontName, Footer, type FooterProps, type FormControlSize, Frames, type FramesHeight, type FramesItemProps, type FramesRootProps, Grid, type GridColumns, type GridProps, GroupBar, type GroupBarItem, type GroupBarProps, type GroupBarTone, HoverCard, type HoverCardContentProps, type HoverCardRootProps, type HoverCardTriggerProps, IconButton, type IconButtonProps, InfoTip, type InfoTipProps, Input, InputGroup, type InputGroupProps, type InputProps, Inspector, type InspectorFooterProps, type InspectorRootProps, type InspectorRowProps, type InspectorSectionProps, Item, type ItemProps, Kbd, type KbdProps, Ledger, type LedgerEmptyProps, type LedgerGroupProps, type LedgerRootProps, type LedgerTierProps, Link, type LinkProps, McpServerIcon, Menubar, type MenubarContentProps, type MenubarMenuProps, type MenubarRootProps, type MenubarTriggerProps, Message, MessageList, type MessageListProps, type MessageProps, type MessageRole, Meter, type MeterProps, type MeterProvenance, type MeterTone, type Mode, MultiSelect, type MultiSelectProps, NavigationMenu, type NavigationMenuContentProps, type NavigationMenuItemProps, type NavigationMenuLinkProps, type NavigationMenuListProps, type NavigationMenuRootProps, type NavigationMenuTriggerProps, type NavigationMenuViewportProps, NumberField, type NumberFieldProps, OTPField, type OTPFieldProps, OVERLAY_SIDE_OFFSET, PageShell, type PageShellProps, type PageWidth, Pagination, type PaginationEntry, type PaginationProps, Panel, PanelHeader, type PanelHeaderProps, type PanelProps, PasswordInput, type PasswordInputProps, type PersistedPreferences, Plussie, type PlussieExpression, type PlussieProps, Popover, type PopoverCloseProps, type PopoverContentProps, type PopoverDescriptionProps, type PopoverRootProps, type PopoverTitleProps, type PopoverTriggerProps, type PrepaintDefaults, type PrepaintOptions, Preview, type PreviewAxis, type PreviewGround, type PreviewPresentation, type PreviewProps, type PreviewResizeOptions, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RatingSize, type ResolvedMode, Row, type RowProps, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, type ScrollEdges, ScrollableTabsList, type ScrollableTabsListProps, ScrubInput, type ScrubInputProps, SeamCell, type SeamCellProps, SeamGrid, type SeamGridProps, type SeamGround, SeamList, type SeamListProps, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetCloseProps, type SheetContentProps, type SheetDescriptionProps, type SheetFooterProps, type SheetRootProps, type SheetTitleProps, type SheetTriggerProps, Sidebar, type SidebarItemProps, type SidebarRailProps, type SidebarRootProps, type SidebarSectionProps, Skeleton, type SkeletonProps, SkillIcon, Slider, type SliderProps, type SpaceStep, Sparkline, type SparklineProps, Spinner, type SpinnerProps, Stack, type StackAlign, StackIcon, type StackJustify, type StackProps, StacksMatrixIcon, Stat, type StatProps, type StatTone, StatusBar, type StatusBarGroupProps, type StatusBarItemProps, type StatusBarProminence, type StatusBarProps, type StatusBarTone, StatusDot, type StatusDotProps, type StatusTone, Stepper, type StepperProps, type StepperState, type StepperStep, Switch, type SwitchProps, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Table, type TableCaptionProps, type TableCellProps, type TableGroupRowProps, type TableHeadProps, type TableRootProps, type TableRowProps, TableScrollRegion, type TableScrollRegionProps, type TableSectionProps, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTabProps, TagsInput, type TagsInputProps, TerminalFrame, type TerminalFrameLine, type TerminalFrameProps, type TerminalLine, type TerminalLineTone, type TerminalScript, type TerminalStep, Textarea, type TextareaProps, type ThemeContextValue, type ThemeManifest, type ThemeName, ThemeProvider, type ThemeProviderProps, type ThemeRegistry, Timeline, type TimelineContentProps, type TimelineItemProps, type TimelineMarkerProps, type TimelineRootProps, TitleBar, type TitleBarProps, Toast, type ToastManager, type ToastOptions, type ToastProviderProps, type ToastTone, type ToastViewportProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, type TokenOverrides, Toolbar, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarRootProps, type ToolbarSeparatorProps, Tooltip, type TooltipContentProps, type TooltipProviderProps, type TooltipRootProps, type TooltipTriggerProps, Tree, type TreeGuide, type TreeItem, type TreeProps, type TreeRow, type TreeVisibility, TreeVisibilityToggle, type TreeVisibilityToggleProps, TwoStepButton, type TwoStepButtonProps, type TwoStepTone, type UploadFile, type UploadStatus, UsageChart, type UsageChartPoint, type UsageChartProps, type UsageChartTone, activateRowFromClick, activateRowFromKeyDown, agentColor, agentColorStyle, bareControlClasses, buttonVariants, chipVariants, computeScrollEdges, controlClasses, controlGroupFocusClasses, controlSurface, controlVariants, edgeFadeMask, envReference, flattenTree, isSafeTokenValue, itemVariants, linkVariants, menuItemClasses, menuLabelClasses, menuPopupClasses, menuSeparatorClasses, overlayDescriptionClasses, overlayFooterClasses, overlayModalTransitionClasses, overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses, overlayTextClasses, overlayTitleClasses, paginationRange, parseEnvReference, partitionFiles, prepaintScript, rowVariants, scrimClasses, useControlHeight, useCuePortalProps, useDensities, useDensity, useFonts, useSidebar, useTheme, useThemes, useToast };
|
package/dist/index.js
CHANGED
|
@@ -94,6 +94,7 @@ import { Breadcrumb } from "./layout/breadcrumb.js";
|
|
|
94
94
|
import { Card } from "./layout/card.js";
|
|
95
95
|
import { Collapsible, Disclosure } from "./layout/collapsible.js";
|
|
96
96
|
import { DescriptionList } from "./layout/description-list.js";
|
|
97
|
+
import { Frames } from "./layout/frames.js";
|
|
97
98
|
import { Grid } from "./layout/grid.js";
|
|
98
99
|
import { Item, itemVariants } from "./layout/item.js";
|
|
99
100
|
import { Pagination, paginationRange } from "./layout/pagination.js";
|
|
@@ -118,4 +119,4 @@ import { Kbd } from "./primitives/kbd.js";
|
|
|
118
119
|
import { Skeleton } from "./primitives/skeleton.js";
|
|
119
120
|
import { useControlHeight, useDensity } from "./system/use-density.js";
|
|
120
121
|
import { useTheme } from "./system/use-theme.js";
|
|
121
|
-
export { AGENT_COLOR_PROPERTY, AGENT_HUES, AGENT_ROOT_COLOR, Accordion, AgentPile, AlertDialog, AppBar, AppShell, AppWindowFrame, AskBox, AudienceIcon, Autocomplete, Avatar, AvatarGroup, Bento, Breadcrumb, Button, ButtonGroup, Card, CatalogueIcon, ChannelBetaIcon, ChannelReleasedIcon, Checkbox, CheckboxGroup, Chip, CliToolIcon, CodeBlock, Collapsible, Combobox, CommandPalette, Composer, Container, ContextMenu, CopyButton, CueLogotype, CueMark, CuePortalFrame, DEFAULT_STORAGE_KEY, DataRow, DataTree, DelegationCard, Density, DescriptionList, Dialog, Disclosure, Drawer, DropdownMenu, EmptyState, EnvVarInput, Eyebrow, Field, FieldDescription, FieldError, FieldLabel, FileUpload, FolderIcon, Footer, Grid, GroupBar, HoverCard, IconButton, InfoTip, Input, InputGroup, Inspector, Item, Kbd, Ledger, Link, McpServerIcon, Menubar, Message, MessageList, Meter, MultiSelect, NavigationMenu, NumberField, OTPField, OVERLAY_SIDE_OFFSET, PageShell, Pagination, Panel, PanelHeader, PasswordInput, Plussie, Popover, Preview, Progress, Radio, RadioGroup, Rating, Row, ScrollArea, ScrollableTabsList, ScrubInput, SeamCell, SeamGrid, SeamList, SearchInput, SectionHeader, SegmentedControl, Select, Separator, Sheet, Sidebar, Skeleton, SkillIcon, Slider, Sparkline, Spinner, Stack, StackIcon, StacksMatrixIcon, Stat, StatusBar, StatusDot, Stepper, Switch, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Table, TableScrollRegion, Tabs, TagsInput, TerminalFrame, Textarea, ThemeProvider, Timeline, TitleBar, Toast, Toggle, ToggleGroup, Toolbar, Tooltip, Tree, TreeVisibilityToggle, TwoStepButton, UsageChart, activateRowFromClick, activateRowFromKeyDown, agentColor, agentColorStyle, bareControlClasses, buttonVariants, chipVariants, computeScrollEdges, controlClasses, controlGroupFocusClasses, controlSurface, controlVariants, edgeFadeMask, envReference, flattenTree, isSafeTokenValue, itemVariants, linkVariants, menuItemClasses, menuLabelClasses, menuPopupClasses, menuSeparatorClasses, overlayDescriptionClasses, overlayFooterClasses, overlayModalTransitionClasses, overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses, overlayTextClasses, overlayTitleClasses, paginationRange, parseEnvReference, partitionFiles, prepaintScript, rowVariants, scrimClasses, useControlHeight, useCuePortalProps, useDensities, useDensity, useFonts, useSidebar, useTheme, useThemes, useToast };
|
|
122
|
+
export { AGENT_COLOR_PROPERTY, AGENT_HUES, AGENT_ROOT_COLOR, Accordion, AgentPile, AlertDialog, AppBar, AppShell, AppWindowFrame, AskBox, AudienceIcon, Autocomplete, Avatar, AvatarGroup, Bento, Breadcrumb, Button, ButtonGroup, Card, CatalogueIcon, ChannelBetaIcon, ChannelReleasedIcon, Checkbox, CheckboxGroup, Chip, CliToolIcon, CodeBlock, Collapsible, Combobox, CommandPalette, Composer, Container, ContextMenu, CopyButton, CueLogotype, CueMark, CuePortalFrame, DEFAULT_STORAGE_KEY, DataRow, DataTree, DelegationCard, Density, DescriptionList, Dialog, Disclosure, Drawer, DropdownMenu, EmptyState, EnvVarInput, Eyebrow, Field, FieldDescription, FieldError, FieldLabel, FileUpload, FolderIcon, Footer, Frames, Grid, GroupBar, HoverCard, IconButton, InfoTip, Input, InputGroup, Inspector, Item, Kbd, Ledger, Link, McpServerIcon, Menubar, Message, MessageList, Meter, MultiSelect, NavigationMenu, NumberField, OTPField, OVERLAY_SIDE_OFFSET, PageShell, Pagination, Panel, PanelHeader, PasswordInput, Plussie, Popover, Preview, Progress, Radio, RadioGroup, Rating, Row, ScrollArea, ScrollableTabsList, ScrubInput, SeamCell, SeamGrid, SeamList, SearchInput, SectionHeader, SegmentedControl, Select, Separator, Sheet, Sidebar, Skeleton, SkillIcon, Slider, Sparkline, Spinner, Stack, StackIcon, StacksMatrixIcon, Stat, StatusBar, StatusDot, Stepper, Switch, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Table, TableScrollRegion, Tabs, TagsInput, TerminalFrame, Textarea, ThemeProvider, Timeline, TitleBar, Toast, Toggle, ToggleGroup, Toolbar, Tooltip, Tree, TreeVisibilityToggle, TwoStepButton, UsageChart, activateRowFromClick, activateRowFromKeyDown, agentColor, agentColorStyle, bareControlClasses, buttonVariants, chipVariants, computeScrollEdges, controlClasses, controlGroupFocusClasses, controlSurface, controlVariants, edgeFadeMask, envReference, flattenTree, isSafeTokenValue, itemVariants, linkVariants, menuItemClasses, menuLabelClasses, menuPopupClasses, menuSeparatorClasses, overlayDescriptionClasses, overlayFooterClasses, overlayModalTransitionClasses, overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses, overlayTextClasses, overlayTitleClasses, paginationRange, parseEnvReference, partitionFiles, prepaintScript, rowVariants, scrimClasses, useControlHeight, useCuePortalProps, useDensities, useDensity, useFonts, useSidebar, useTheme, useThemes, useToast };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/layout/_ground.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The three grounds a stage or a canvas may paint, and the classes for each.
|
|
4
|
+
*
|
|
5
|
+
* One table and not two, because `Preview`'s stage and `Frames.Root`'s canvas
|
|
6
|
+
* take the same three members and a second copy would be the one that drifted.
|
|
7
|
+
* Static literals, because Tailwind scans source text and never a computed
|
|
8
|
+
* string.
|
|
9
|
+
*
|
|
10
|
+
* `dots` is written as three classes in exactly the order `STAGE_CLASS` carried
|
|
11
|
+
* them before this table existed — `bg-surface-1`, then the radial gradient,
|
|
12
|
+
* then its size. `cn` is `twMerge(clsx(...))`, which keeps the order it is
|
|
13
|
+
* given, so composing head + ground + tail reproduces today's string token for
|
|
14
|
+
* token. `preview.test.tsx`'s byte gate is what holds that.
|
|
15
|
+
*
|
|
16
|
+
* @internal Not part of the public API. The type is re-exported from
|
|
17
|
+
* `./preview`, which is where §4.1 of the showroom spec declares it.
|
|
18
|
+
*/
|
|
19
|
+
/** The stage's ground, in the settings popover's own words. */
|
|
20
|
+
type PreviewGround = "plain" | "dots" | "none";
|
|
21
|
+
//#endregion
|
|
22
|
+
export { PreviewGround };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/layout/_ground.ts
|
|
2
|
+
/** What each ground paints. `"none"` paints nothing, so whatever is behind shows through. */
|
|
3
|
+
const GROUND_CLASSES = {
|
|
4
|
+
plain: "bg-surface-1",
|
|
5
|
+
dots: "bg-surface-1 bg-[radial-gradient(circle,var(--cue-hair-strong)_1px,transparent_1.3px)] bg-[length:14px_14px]",
|
|
6
|
+
none: ""
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { GROUND_CLASSES };
|
package/dist/layout/bento.js
CHANGED
|
@@ -169,7 +169,7 @@ const BentoTile = React.forwardRef(function BentoTile(props, ref) {
|
|
|
169
169
|
className: "flex min-w-0 flex-col gap-(--cue-space-1)",
|
|
170
170
|
children: [eyebrow === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
171
171
|
"data-slot": "bento-tile-eyebrow",
|
|
172
|
-
className: "min-w-0 truncate font-mono text-(length:--cue-text-
|
|
172
|
+
className: "min-w-0 truncate font-mono text-(length:--cue-text-micro) text-fg-muted",
|
|
173
173
|
children: eyebrow
|
|
174
174
|
}), title === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
175
175
|
"data-slot": "bento-tile-title",
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { PreviewGround } from "./_ground.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/layout/frames.d.ts
|
|
4
|
+
/** How tall the canvas stands. A design board is short and wide on purpose. */
|
|
5
|
+
type FramesHeight = "short" | "tall";
|
|
6
|
+
interface FramesRootProps extends Omit<React.ComponentPropsWithoutRef<"div">, "children"> {
|
|
7
|
+
/** The frames. Anything — this never inspects them. */
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* The canvas's accessible name — "Button frames". Required: the canvas is a
|
|
11
|
+
* focusable scroll region, and a scroll region with no name is one a screen
|
|
12
|
+
* reader announces as nothing.
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/** `"short"` is 18.5rem, `"tall"` 27rem. A CSS length in `style` overrides both. */
|
|
16
|
+
height?: FramesHeight;
|
|
17
|
+
/** The canvas ground. Defaults to `"dots"`. */
|
|
18
|
+
ground?: PreviewGround;
|
|
19
|
+
/** The line in the bottom-right corner — "drag to pan · 8 frames". Unset, none is drawn. */
|
|
20
|
+
hint?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Drag-to-pan with the pointer. Defaults to `true`. A drag that starts on a
|
|
23
|
+
* control is never a pan, so a frame's own controls stay usable — and "on a
|
|
24
|
+
* control" counts the control's own contents: the words inside a
|
|
25
|
+
* `role="menuitem"` row, the icon inside a `button`. A drag inside a
|
|
26
|
+
* role-bearing box that is not itself a control — a `role="group"` frame, a
|
|
27
|
+
* `role="region"` — still pans, because a frame is such a box and a board is
|
|
28
|
+
* mostly frames. Only the primary button drags; `false` binds no pointer
|
|
29
|
+
* listener at all; and the keyboard scrolls the canvas either way.
|
|
30
|
+
*/
|
|
31
|
+
pan?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface FramesItemProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
34
|
+
/** The specimen. */
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
/** The line under it. Hidden — not removed — when the frame sets `captions={false}`. */
|
|
37
|
+
caption?: React.ReactNode;
|
|
38
|
+
/** Draws the selection outline the frame gives the item a reader is inspecting. */
|
|
39
|
+
selected?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A design canvas: frames side by side, each holding one axis of one component.
|
|
43
|
+
*
|
|
44
|
+
* `Frames.Root` is the canvas — short, wide, scrollable sideways, focusable,
|
|
45
|
+
* and pannable with the pointer. `Frames.Item` is one captioned cell, and it is
|
|
46
|
+
* used **inside a `Preview`** rather than inside the Root. The two are apart
|
|
47
|
+
* because that is how they are used, and a props-only API cannot say it.
|
|
48
|
+
*
|
|
49
|
+
* **The canvas knows nothing about its children.** It does not count them, does
|
|
50
|
+
* not index them and does not select one; `hint` is where a caller puts what it
|
|
51
|
+
* knows. A canvas that knew its frames would be a manifest API, and this is a
|
|
52
|
+
* slot API.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* <Frames.Root label="Button frames" hint="drag to pan · 3 frames">
|
|
56
|
+
* <Preview presentation="frame" label="Tone" count={3} name={<ToneMenu />}>
|
|
57
|
+
* <div className="flex flex-wrap items-end gap-(--cue-space-6)">
|
|
58
|
+
* <Frames.Item caption="accent"><Button tone="accent">Take cue</Button></Frames.Item>
|
|
59
|
+
* <Frames.Item caption="ok"><Button tone="ok">Take cue</Button></Frames.Item>
|
|
60
|
+
* <Frames.Item caption="warn"><Button tone="warn">Take cue</Button></Frames.Item>
|
|
61
|
+
* </div>
|
|
62
|
+
* </Preview>
|
|
63
|
+
* </Frames.Root>
|
|
64
|
+
*/
|
|
65
|
+
declare const Frames: {
|
|
66
|
+
Root: React.ForwardRefExoticComponent<FramesRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
Item: React.ForwardRefExoticComponent<FramesItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
export { Frames, FramesHeight, FramesItemProps, FramesRootProps };
|