@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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"importPath": "@cueplusplus/ui",
|
|
6
6
|
"peerDependencies": [],
|
|
7
7
|
"clientOnly": true,
|
|
8
|
-
"description": "A
|
|
8
|
+
"description": "A card for one component: a stage that is its own theme island, a slot for\ntools at the top right, and a footer.\n\n**Two presentations, one stage.** `\"panel\"`, the default and what every\nexisting caller gets, is that card: a border, a fill, a dot grid under the\nspecimen, and the tools floating over the stage's top right. `\"frame\"` is a\ndesign-canvas frame — no card, no border, no fill; the name, the count and\nthe tools sit in a row *above* the stage rather than over it, four crosshairs\nmark the stage's outer corners, and the stage paints nothing by default, so\nwhatever canvas the frame sits on shows through. Everything below holds in\nboth.\n\n**The stage is the island; the chrome is not.** `theme`, `mode`, `density`\nand `font` land on the stage element only, and the stage republishes the\ntheme and density contexts so an overlay opened on it follows it. The tools,\nthe footer, the grips and anything they open stay in the scope around the\nPreview — a `terminal` preview's own controls do not turn cyan. With none of\nthe four set, the stage carries no attribute and costs what a `<div>` costs.\nA stage `theme` with no `mode` repeats the page's mode beside it.\n\n**`resizable` is handles of its own**, both axes by default: an edge grip per\naxis that is a keyboard-operable `separator` valued in pixels, and a corner\ngrip for the pointer. Double-click resets an axis. The width never outgrows\nthe frame: its bound in force is the frame's own width, observed live, when\nthat is under `maxWidth`. Not `Resizable`, which is split panes on an\noptional peer.\n\nProps, not a compound: one stage and its slots, each saying what it is.",
|
|
9
9
|
"props": [
|
|
10
10
|
{
|
|
11
11
|
"name": "children",
|
|
@@ -121,6 +121,66 @@
|
|
|
121
121
|
"kind": "node",
|
|
122
122
|
"fixture": "children.text"
|
|
123
123
|
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "presentation",
|
|
127
|
+
"type": "\"frame\" | \"panel\"",
|
|
128
|
+
"required": false,
|
|
129
|
+
"defaultValue": "panel",
|
|
130
|
+
"description": "`\"panel\"` (the default, and what every existing caller gets): a bordered\ncard, `tools` floating at the stage's top right, `footer` under it.\n`\"frame\"`: a design-canvas frame — the label row drawn *above* the stage\nrather than over it, four crosshair corners at the stage's outer corners,\nand a transparent stage so whatever the frame sits on shows through.",
|
|
131
|
+
"control": {
|
|
132
|
+
"kind": "enum",
|
|
133
|
+
"members": [
|
|
134
|
+
"frame",
|
|
135
|
+
"panel"
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "name",
|
|
141
|
+
"type": "ReactNode",
|
|
142
|
+
"required": false,
|
|
143
|
+
"defaultValue": null,
|
|
144
|
+
"description": "The label row's leading slot, drawn only in `\"frame\"`. A plain node, or a\ncontrol: apps/docs passes a `DropdownMenu` whose trigger is the frame's\nname. Unset, the row opens with `label` as text.\n\nA slot and not a built-in menu, because `Preview` imports no overlay today\nand `/` draws seventeen of it under a 766-byte headroom.",
|
|
145
|
+
"control": {
|
|
146
|
+
"kind": "node",
|
|
147
|
+
"fixture": "children.text"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "count",
|
|
152
|
+
"type": "number",
|
|
153
|
+
"required": false,
|
|
154
|
+
"defaultValue": null,
|
|
155
|
+
"description": "The count drawn after the name — how many items this frame holds. Frame only.",
|
|
156
|
+
"control": {
|
|
157
|
+
"kind": "number"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "ground",
|
|
162
|
+
"type": "\"none\" | \"plain\" | \"dots\"",
|
|
163
|
+
"required": false,
|
|
164
|
+
"defaultValue": null,
|
|
165
|
+
"description": "The stage's ground. Defaults to `\"dots\"` in `\"panel\"` and `\"none\"` in\n`\"frame\"`, where the canvas under it already carries a ground and two dot\ngrids at different pitches read as a moiré.",
|
|
166
|
+
"control": {
|
|
167
|
+
"kind": "enum",
|
|
168
|
+
"members": [
|
|
169
|
+
"none",
|
|
170
|
+
"plain",
|
|
171
|
+
"dots"
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "captions",
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"required": false,
|
|
179
|
+
"defaultValue": "true",
|
|
180
|
+
"description": "Whether `Frames.Item` captions are shown inside this stage. Defaults to\n`true`. Off is paint and nothing more: a hidden caption is still rendered,\nstill in the tree and still read aloud (§4.1 Decision 4).",
|
|
181
|
+
"control": {
|
|
182
|
+
"kind": "boolean"
|
|
183
|
+
}
|
|
124
184
|
}
|
|
125
185
|
],
|
|
126
186
|
"typeReferences": [
|
|
@@ -137,6 +197,7 @@
|
|
|
137
197
|
"--cue-control-sm",
|
|
138
198
|
"--cue-fg",
|
|
139
199
|
"--cue-fg-muted",
|
|
200
|
+
"--cue-fg-subtle",
|
|
140
201
|
"--cue-font-mono",
|
|
141
202
|
"--cue-hair-strong",
|
|
142
203
|
"--cue-radius-control",
|
|
@@ -149,9 +210,10 @@
|
|
|
149
210
|
"--cue-surface-1",
|
|
150
211
|
"--cue-surface-2",
|
|
151
212
|
"--cue-surface-3",
|
|
152
|
-
"--cue-text-label"
|
|
213
|
+
"--cue-text-label",
|
|
214
|
+
"--cue-text-micro"
|
|
153
215
|
],
|
|
154
|
-
"summary": "A
|
|
216
|
+
"summary": "A card for one component: a stage that is its own theme island, tools at the top right — or, in the `frame` presentation a design canvas draws, in a label row above the stage beside the name and the count — a footer, and grips that resize it on both axes.",
|
|
155
217
|
"examples": [
|
|
156
218
|
{
|
|
157
219
|
"title": "Inheriting the page, resizable",
|
|
@@ -163,9 +225,19 @@
|
|
|
163
225
|
"code": "<Preview label=\"Chip preview\" theme=\"terminal\" density=\"compact\">\n <Chip tone=\"accent\">Standby</Chip>\n</Preview>",
|
|
164
226
|
"language": "tsx"
|
|
165
227
|
},
|
|
228
|
+
{
|
|
229
|
+
"title": "A canvas frame",
|
|
230
|
+
"code": "<Preview\n presentation=\"frame\"\n label=\"Button tone\"\n name={<ToneMenu />}\n count={3}\n tools={<IconButton aria-label=\"Configure Button tone\" icon={Wrench} />}\n>\n <div className=\"flex flex-wrap items-end gap-(--cue-space-6)\">\n <Frames.Item caption=\"accent\">\n <Button variant=\"primary\">Take cue</Button>\n </Frames.Item>\n </div>\n</Preview>",
|
|
231
|
+
"language": "tsx"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"title": "A frame with its captions off",
|
|
235
|
+
"code": "<Preview presentation=\"frame\" label=\"Button density\" count={2} captions={false}>\n <div className=\"flex flex-wrap items-end gap-(--cue-space-6)\">\n <Frames.Item caption=\"compact\">\n <Button size=\"sm\">Go</Button>\n </Frames.Item>\n <Frames.Item caption=\"normal\">\n <Button>Go</Button>\n </Frames.Item>\n </div>\n</Preview>",
|
|
236
|
+
"language": "tsx"
|
|
237
|
+
},
|
|
166
238
|
{
|
|
167
239
|
"title": "Usage",
|
|
168
|
-
"code": "<Preview label=\"Button preview\" tools={<IconButton aria-label=\"Configure Button\" icon={Wrench} />}>\n <Button variant=\"primary\">Take cue</Button>\n</Preview>\n<Preview label=\"Chip preview\" theme=\"terminal\" density=\"compact\" resizable>\n <Chip tone=\"accent\">Standby</Chip>\n</Preview>",
|
|
240
|
+
"code": "<Preview label=\"Button preview\" tools={<IconButton aria-label=\"Configure Button\" icon={Wrench} />}>\n <Button variant=\"primary\">Take cue</Button>\n</Preview>\n<Preview label=\"Chip preview\" theme=\"terminal\" density=\"compact\" resizable>\n <Chip tone=\"accent\">Standby</Chip>\n</Preview>\n<Preview label=\"Button\" presentation=\"frame\" count={3}>\n <Button variant=\"primary\">Take cue</Button>\n</Preview>",
|
|
169
241
|
"language": "tsx"
|
|
170
242
|
}
|
|
171
243
|
],
|
|
@@ -176,16 +248,21 @@
|
|
|
176
248
|
"whenToUse": [
|
|
177
249
|
"Showing one component in a state a reader can see and change — a gallery tile, a docs listing, a design review page.",
|
|
178
250
|
"Putting a component in a different theme, mode, density or font from the page around it, without re-theming the controls that change it.",
|
|
179
|
-
"Letting a reader watch a component respond to its container: pass `resizable` and drag it narrow, or short."
|
|
251
|
+
"Letting a reader watch a component respond to its container: pass `resizable` and drag it narrow, or short.",
|
|
252
|
+
"Drawing one axis of a component on a design canvas: `presentation=\"frame\"` moves the label row above the stage, puts `tools` in it, makes the stage transparent and marks the four corners."
|
|
180
253
|
],
|
|
181
254
|
"whenNotToUse": [
|
|
182
255
|
"Laying several components out side by side. That is `Bento` or `Grid`; a Preview holds one specimen.",
|
|
183
|
-
"Split panes a user resizes as part of an app. That is `Resizable`; a Preview's grips resize a stage, not a layout."
|
|
256
|
+
"Split panes a user resizes as part of an app. That is `Resizable`; a Preview's grips resize a stage, not a layout.",
|
|
257
|
+
"Building the frame's name menu into the Preview. `name` is a slot: pass your own `DropdownMenu`. This component imports no overlay, and a page that draws seventeen Previews cannot afford one."
|
|
184
258
|
],
|
|
185
259
|
"commonMistakes": [
|
|
186
260
|
"Naming a `theme` whose stylesheet is not on the page. The stage is scoped to `[data-theme]`, and a Preview loads no CSS — import `@cueplusplus/theme-<name>/theme.css` yourself, or the stage paints the blank base.",
|
|
187
261
|
"Setting `mode` outside any `ThemeProvider` and expecting a change. A theme's light block needs the theme on the same element, and with no provider there is no theme to restate.",
|
|
188
|
-
"Putting the controls that configure the specimen in `children`. They would take the stage's theme; put them in `tools`, which follows the page."
|
|
262
|
+
"Putting the controls that configure the specimen in `children`. They would take the stage's theme; put them in `tools`, which follows the page.",
|
|
263
|
+
"Setting `presentation=\"frame\"` and leaving `ground` alone on a page that already draws a dot grid. A frame's ground defaults to `none` for exactly that reason; naming `dots` puts a second grid at a second pitch over the first, and the two read as a moiré.",
|
|
264
|
+
"Reading `count` as something the Preview works out. It counts nothing — `count` is what the caller knows, and `0` is a count it will draw.",
|
|
265
|
+
"Passing `resizable` to a `presentation=\"frame\"` Preview. The crosshair marks follow the frame box, not a resized stage, so dragging the grips puts the marks off the stage's corners — use `resizable` on a panel, or keep the frame a fixed size."
|
|
189
266
|
],
|
|
190
267
|
"specimens": [
|
|
191
268
|
{
|
|
@@ -195,7 +272,7 @@
|
|
|
195
272
|
"Preview"
|
|
196
273
|
],
|
|
197
274
|
"code": "<Specimens>\n <Specimen label=\"inherits the page, resizable\" wide>\n <Preview\n label=\"Button preview\"\n resizable\n footer={<span className=\"font-mono text-(length:--cue-text-label) text-fg-subtle\">Button · inherits</span>}\n >\n <Button variant=\"primary\">Take cue</Button>\n </Preview>\n </Specimen>\n <Specimen label=\"its own theme and density\" wide>\n <Preview\n label=\"Chip preview\"\n theme=\"terminal\"\n density=\"compact\"\n footer={<span className=\"font-mono text-(length:--cue-text-label) text-fg-subtle\">Chip · terminal · compact</span>}\n >\n <Chip tone=\"accent\">Standby</Chip>\n </Preview>\n </Specimen>\n</Specimens>",
|
|
198
|
-
"note": "A
|
|
275
|
+
"note": "A card for one component. The stage is its own theme island — theme, mode, density and font land on it and nowhere else — while the tools, the footer and anything they open follow the page.",
|
|
199
276
|
"interaction": "with `resizable`, the width and height grips are separators: Left and Right step the width, Up and Down the height, 8 px a press and 64 with Shift; Home and End reach the bounds, and a double-click resets an axis. The corner grip is a pointer convenience over the two."
|
|
200
277
|
}
|
|
201
278
|
]
|
package/manifest/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"library": "@cueplusplus/ui",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
6
6
|
"themes": [
|
|
7
7
|
"cue",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"tokens": {
|
|
31
31
|
"path": "./tokens.json",
|
|
32
|
-
"sha256": "
|
|
32
|
+
"sha256": "c2f61ee292302f6154b6eecf136b40292de23d78e2960d1cb5d1e78361fcfe40"
|
|
33
33
|
},
|
|
34
34
|
"systemApis": [
|
|
35
35
|
{
|
|
@@ -3780,7 +3780,7 @@
|
|
|
3780
3780
|
"mdUrl": "/docs/components/bento.md",
|
|
3781
3781
|
"jsonUrl": "/r/components/bento.json",
|
|
3782
3782
|
"path": "./components/bento.json",
|
|
3783
|
-
"sha256": "
|
|
3783
|
+
"sha256": "e08b72c850136994ce6b9e350b70784b024a71157eb9389e4b8c2b7bd8c9026a"
|
|
3784
3784
|
},
|
|
3785
3785
|
{
|
|
3786
3786
|
"name": "Breadcrumb",
|
|
@@ -3873,6 +3873,19 @@
|
|
|
3873
3873
|
"path": "./components/disclosure.json",
|
|
3874
3874
|
"sha256": "b4ab6140983f381772a9aaa8827ef777952d76ec08b43a85b062a388e6af2210"
|
|
3875
3875
|
},
|
|
3876
|
+
{
|
|
3877
|
+
"name": "Frames",
|
|
3878
|
+
"slug": "frames",
|
|
3879
|
+
"group": "layout",
|
|
3880
|
+
"importPath": "@cueplusplus/ui",
|
|
3881
|
+
"summary": "A design canvas: frames side by side, each holding one axis of one component. Short, wide, scrollable sideways, focusable, and pannable with the pointer.",
|
|
3882
|
+
"status": "stable",
|
|
3883
|
+
"url": "/docs/components/frames",
|
|
3884
|
+
"mdUrl": "/docs/components/frames.md",
|
|
3885
|
+
"jsonUrl": "/r/components/frames.json",
|
|
3886
|
+
"path": "./components/frames.json",
|
|
3887
|
+
"sha256": "abc9270ea2b49eaba8ce52a0dacf103acfb536ebb46b5a2db282f2a3490e7048"
|
|
3888
|
+
},
|
|
3876
3889
|
{
|
|
3877
3890
|
"name": "Grid",
|
|
3878
3891
|
"slug": "grid",
|
|
@@ -3930,13 +3943,13 @@
|
|
|
3930
3943
|
"slug": "preview",
|
|
3931
3944
|
"group": "layout",
|
|
3932
3945
|
"importPath": "@cueplusplus/ui",
|
|
3933
|
-
"summary": "A
|
|
3946
|
+
"summary": "A card for one component: a stage that is its own theme island, tools at the top right — or, in the `frame` presentation a design canvas draws, in a label row above the stage beside the name and the count — a footer, and grips that resize it on both axes.",
|
|
3934
3947
|
"status": "stable",
|
|
3935
3948
|
"url": "/docs/components/preview",
|
|
3936
3949
|
"mdUrl": "/docs/components/preview.md",
|
|
3937
3950
|
"jsonUrl": "/r/components/preview.json",
|
|
3938
3951
|
"path": "./components/preview.json",
|
|
3939
|
-
"sha256": "
|
|
3952
|
+
"sha256": "2f06e1d13bc234c6a7a393f953a481955723674ef734416f37fa27db3e461cde"
|
|
3940
3953
|
},
|
|
3941
3954
|
{
|
|
3942
3955
|
"name": "Resizable",
|
package/manifest/tokens.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cueplusplus/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "CUE++ design system components: Tailwind v4 styled wrappers over Base UI, driven by @cueplusplus/tokens.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"culori": "^4.0.2",
|
|
145
145
|
"tailwind-merge": "^3.6.0",
|
|
146
146
|
"@cueplusplus/theme-base": "^1.0.1",
|
|
147
|
-
"@cueplusplus/tokens": "0.
|
|
147
|
+
"@cueplusplus/tokens": "0.12.0"
|
|
148
148
|
},
|
|
149
149
|
"peerDependencies": {
|
|
150
150
|
"@assistant-ui/react": "^0.15.16",
|
|
@@ -258,10 +258,10 @@
|
|
|
258
258
|
"tsdown": "0.22.14",
|
|
259
259
|
"typescript": "^5.7.0",
|
|
260
260
|
"vitest": "^4.1.10",
|
|
261
|
-
"@repo/
|
|
262
|
-
"@cueplusplus/theme-tools": "1.0.1",
|
|
261
|
+
"@repo/typescript-config": "0.0.0",
|
|
263
262
|
"@repo/docgen": "0.0.0",
|
|
264
|
-
"@
|
|
263
|
+
"@cueplusplus/theme-tools": "1.0.2",
|
|
264
|
+
"@repo/eslint-config": "0.0.0"
|
|
265
265
|
},
|
|
266
266
|
"scripts": {
|
|
267
267
|
"build": "pnpm run check:manifest && tsdown",
|