@handamade/psi-react 0.3.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/README.md +43 -0
- package/dist/AspectRatio/AspectRatio.d.ts +9 -0
- package/dist/AspectRatio/AspectRatio.d.ts.map +1 -0
- package/dist/Button/Button.d.ts +21 -0
- package/dist/Button/Button.d.ts.map +1 -0
- package/dist/Card/Card.d.ts +13 -0
- package/dist/Card/Card.d.ts.map +1 -0
- package/dist/Checkbox/Checkbox.d.ts +9 -0
- package/dist/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/IconButton/IconButton.d.ts +21 -0
- package/dist/IconButton/IconButton.d.ts.map +1 -0
- package/dist/Input/Input.d.ts +13 -0
- package/dist/Input/Input.d.ts.map +1 -0
- package/dist/NavBar/NavBar.d.ts +13 -0
- package/dist/NavBar/NavBar.d.ts.map +1 -0
- package/dist/Select/Select.d.ts +18 -0
- package/dist/Select/Select.d.ts.map +1 -0
- package/dist/Switch/Switch.d.ts +9 -0
- package/dist/Switch/Switch.d.ts.map +1 -0
- package/dist/Tag/Tag.d.ts +15 -0
- package/dist/Tag/Tag.d.ts.map +1 -0
- package/dist/Tooltip/Tooltip.d.ts +13 -0
- package/dist/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/a11y-meta.d.ts +15 -0
- package/dist/a11y-meta.d.ts.map +1 -0
- package/dist/icons/IconArrowDown.d.ts +7 -0
- package/dist/icons/IconArrowDown.d.ts.map +1 -0
- package/dist/icons/IconArrowUpRight.d.ts +7 -0
- package/dist/icons/IconArrowUpRight.d.ts.map +1 -0
- package/dist/icons/IconCheck.d.ts +7 -0
- package/dist/icons/IconCheck.d.ts.map +1 -0
- package/dist/icons/IconChevronDown.d.ts +7 -0
- package/dist/icons/IconChevronDown.d.ts.map +1 -0
- package/dist/icons/IconChevronRight.d.ts +7 -0
- package/dist/icons/IconChevronRight.d.ts.map +1 -0
- package/dist/icons/IconClose.d.ts +7 -0
- package/dist/icons/IconClose.d.ts.map +1 -0
- package/dist/icons/IconCopy.d.ts +7 -0
- package/dist/icons/IconCopy.d.ts.map +1 -0
- package/dist/icons/IconEdit.d.ts +7 -0
- package/dist/icons/IconEdit.d.ts.map +1 -0
- package/dist/icons/IconExternalLink.d.ts +7 -0
- package/dist/icons/IconExternalLink.d.ts.map +1 -0
- package/dist/icons/IconEye.d.ts +7 -0
- package/dist/icons/IconEye.d.ts.map +1 -0
- package/dist/icons/IconEyeOff.d.ts +7 -0
- package/dist/icons/IconEyeOff.d.ts.map +1 -0
- package/dist/icons/IconGitHub.d.ts +7 -0
- package/dist/icons/IconGitHub.d.ts.map +1 -0
- package/dist/icons/IconInstagram.d.ts +7 -0
- package/dist/icons/IconInstagram.d.ts.map +1 -0
- package/dist/icons/IconLinkedIn.d.ts +7 -0
- package/dist/icons/IconLinkedIn.d.ts.map +1 -0
- package/dist/icons/IconLoader.d.ts +7 -0
- package/dist/icons/IconLoader.d.ts.map +1 -0
- package/dist/icons/IconMinus.d.ts +7 -0
- package/dist/icons/IconMinus.d.ts.map +1 -0
- package/dist/icons/IconPlus.d.ts +7 -0
- package/dist/icons/IconPlus.d.ts.map +1 -0
- package/dist/icons/IconSearch.d.ts +7 -0
- package/dist/icons/IconSearch.d.ts.map +1 -0
- package/dist/icons/IconSettings.d.ts +7 -0
- package/dist/icons/IconSettings.d.ts.map +1 -0
- package/dist/icons/IconTrash.d.ts +7 -0
- package/dist/icons/IconTrash.d.ts.map +1 -0
- package/dist/icons/IconUser.d.ts +7 -0
- package/dist/icons/IconUser.d.ts.map +1 -0
- package/dist/icons/IconX.d.ts +7 -0
- package/dist/icons/IconX.d.ts.map +1 -0
- package/dist/icons/index.d.ts +23 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +594 -0
- package/dist/manifest.json +413 -0
- package/dist/styles.css +1 -0
- package/docs/AspectRatio.md +27 -0
- package/docs/Button.md +50 -0
- package/docs/Card.md +39 -0
- package/docs/Checkbox.md +34 -0
- package/docs/IconButton.md +49 -0
- package/docs/Input.md +36 -0
- package/docs/NavBar.md +29 -0
- package/docs/Select.md +37 -0
- package/docs/Switch.md +34 -0
- package/docs/Tag.md +47 -0
- package/docs/Tooltip.md +36 -0
- package/llms.txt +43 -0
- package/package.json +46 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": [
|
|
3
|
+
{
|
|
4
|
+
"name": "Button",
|
|
5
|
+
"description": "",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "variant",
|
|
9
|
+
"type": "\"accent\" | \"accent-subtle\" | \"neutral\" | \"neutral-subtle\" | \"ghost\" | \"danger\" | \"danger-subtle\" | \"outline\"",
|
|
10
|
+
"required": false,
|
|
11
|
+
"default": "neutral",
|
|
12
|
+
"description": "Visual variant."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "size",
|
|
16
|
+
"type": "24 | 32 | 40 | 48",
|
|
17
|
+
"required": false,
|
|
18
|
+
"default": 32,
|
|
19
|
+
"description": "Height in px (24 | 32 | 40 | 48)."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "href",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"required": false,
|
|
25
|
+
"default": null,
|
|
26
|
+
"description": "Render as an anchor with this href (D33). disabled → aria-disabled,\nno href attribute, pointer-events: none."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "target",
|
|
30
|
+
"type": "string",
|
|
31
|
+
"required": false,
|
|
32
|
+
"default": null,
|
|
33
|
+
"description": "Anchor target; only used with href."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "rel",
|
|
37
|
+
"type": "string",
|
|
38
|
+
"required": false,
|
|
39
|
+
"default": null,
|
|
40
|
+
"description": "Anchor rel; only used with href."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "ref",
|
|
44
|
+
"type": "Ref<HTMLButtonElement | HTMLAnchorElement>",
|
|
45
|
+
"required": false,
|
|
46
|
+
"default": null,
|
|
47
|
+
"description": "Forwarded ref to the underlying element."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "className",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"required": false,
|
|
53
|
+
"default": null,
|
|
54
|
+
"description": "Additional CSS class name(s) merged onto the component's root element."
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "IconButton",
|
|
60
|
+
"description": "",
|
|
61
|
+
"props": [
|
|
62
|
+
{
|
|
63
|
+
"name": "variant",
|
|
64
|
+
"type": "\"accent\" | \"neutral\" | \"ghost\" | \"danger\"",
|
|
65
|
+
"required": false,
|
|
66
|
+
"default": "neutral",
|
|
67
|
+
"description": "Visual variant."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "size",
|
|
71
|
+
"type": "24 | 32 | 40 | 48",
|
|
72
|
+
"required": false,
|
|
73
|
+
"default": 32,
|
|
74
|
+
"description": "Square size in px (24 | 32 | 40 | 48)."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "href",
|
|
78
|
+
"type": "string",
|
|
79
|
+
"required": false,
|
|
80
|
+
"default": null,
|
|
81
|
+
"description": "Render as an anchor with this href (D33). disabled → aria-disabled,\nno href attribute, pointer-events: none."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "target",
|
|
85
|
+
"type": "string",
|
|
86
|
+
"required": false,
|
|
87
|
+
"default": null,
|
|
88
|
+
"description": "Anchor target; only used with href."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "rel",
|
|
92
|
+
"type": "string",
|
|
93
|
+
"required": false,
|
|
94
|
+
"default": null,
|
|
95
|
+
"description": "Anchor rel; only used with href."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "ref",
|
|
99
|
+
"type": "Ref<HTMLButtonElement | HTMLAnchorElement>",
|
|
100
|
+
"required": false,
|
|
101
|
+
"default": null,
|
|
102
|
+
"description": "Forwarded ref to the underlying element."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "className",
|
|
106
|
+
"type": "string",
|
|
107
|
+
"required": false,
|
|
108
|
+
"default": null,
|
|
109
|
+
"description": "Additional CSS class name(s) merged onto the component's root element."
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "Card",
|
|
115
|
+
"description": "",
|
|
116
|
+
"props": [
|
|
117
|
+
{
|
|
118
|
+
"name": "variant",
|
|
119
|
+
"type": "\"stacked\" | \"featured\"",
|
|
120
|
+
"required": false,
|
|
121
|
+
"default": "stacked",
|
|
122
|
+
"description": "stacked = media above body; featured = media beside body (~1.6fr/1fr), stacks under md."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "media",
|
|
126
|
+
"type": "ReactNode",
|
|
127
|
+
"required": false,
|
|
128
|
+
"default": null,
|
|
129
|
+
"description": "Media slot rendered edge-to-edge (img, AspectRatio, …)."
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "hoverLift",
|
|
133
|
+
"type": "boolean",
|
|
134
|
+
"required": false,
|
|
135
|
+
"default": false,
|
|
136
|
+
"description": "Lift on hover: translateY(-6px) over --psi-duration-350."
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "ref",
|
|
140
|
+
"type": "Ref<HTMLDivElement>",
|
|
141
|
+
"required": false,
|
|
142
|
+
"default": null,
|
|
143
|
+
"description": "Forwarded ref to the root element."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "className",
|
|
147
|
+
"type": "string",
|
|
148
|
+
"required": false,
|
|
149
|
+
"default": null,
|
|
150
|
+
"description": "Additional CSS class name(s) merged onto the component's root element."
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "Input",
|
|
156
|
+
"description": "",
|
|
157
|
+
"props": [
|
|
158
|
+
{
|
|
159
|
+
"name": "size",
|
|
160
|
+
"type": "24 | 32 | 40 | 48",
|
|
161
|
+
"required": false,
|
|
162
|
+
"default": 32,
|
|
163
|
+
"description": "Height in px (24 | 32 | 40 | 48)."
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "error",
|
|
167
|
+
"type": "boolean",
|
|
168
|
+
"required": false,
|
|
169
|
+
"default": false,
|
|
170
|
+
"description": "Show error styling."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "ref",
|
|
174
|
+
"type": "Ref<HTMLInputElement>",
|
|
175
|
+
"required": false,
|
|
176
|
+
"default": null,
|
|
177
|
+
"description": "Forwarded ref to the underlying `<input>` element."
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "className",
|
|
181
|
+
"type": "string",
|
|
182
|
+
"required": false,
|
|
183
|
+
"default": null,
|
|
184
|
+
"description": "Additional CSS class name(s) merged onto the component's root element."
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "Select",
|
|
190
|
+
"description": "",
|
|
191
|
+
"props": [
|
|
192
|
+
{
|
|
193
|
+
"name": "size",
|
|
194
|
+
"type": "24 | 32 | 40 | 48",
|
|
195
|
+
"required": false,
|
|
196
|
+
"default": 32,
|
|
197
|
+
"description": "Height in px (24 | 32 | 40 | 48). Replaces the native `size` attribute\n(which sets the visible option-row count on a listbox-style `<select>`)\nwith the design system's control height in pixels."
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "error",
|
|
201
|
+
"type": "boolean",
|
|
202
|
+
"required": false,
|
|
203
|
+
"default": false,
|
|
204
|
+
"description": "Show error styling."
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "ref",
|
|
208
|
+
"type": "Ref<HTMLSelectElement>",
|
|
209
|
+
"required": false,
|
|
210
|
+
"default": null,
|
|
211
|
+
"description": "Forwarded ref to the underlying `<select>` element."
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "className",
|
|
215
|
+
"type": "string",
|
|
216
|
+
"required": false,
|
|
217
|
+
"default": null,
|
|
218
|
+
"description": "Additional CSS class name(s) merged onto the component's root element."
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "Checkbox",
|
|
224
|
+
"description": "",
|
|
225
|
+
"props": [
|
|
226
|
+
{
|
|
227
|
+
"name": "children",
|
|
228
|
+
"type": "ReactNode",
|
|
229
|
+
"required": false,
|
|
230
|
+
"default": null,
|
|
231
|
+
"description": "Label text."
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "ref",
|
|
235
|
+
"type": "Ref<HTMLInputElement>",
|
|
236
|
+
"required": false,
|
|
237
|
+
"default": null,
|
|
238
|
+
"description": "Forwarded ref to the underlying `<input type=\"checkbox\">` element."
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "className",
|
|
242
|
+
"type": "string",
|
|
243
|
+
"required": false,
|
|
244
|
+
"default": null,
|
|
245
|
+
"description": "Additional CSS class name(s) merged onto the component's root element."
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "Switch",
|
|
251
|
+
"description": "",
|
|
252
|
+
"props": [
|
|
253
|
+
{
|
|
254
|
+
"name": "children",
|
|
255
|
+
"type": "ReactNode",
|
|
256
|
+
"required": false,
|
|
257
|
+
"default": null,
|
|
258
|
+
"description": "Label text."
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "ref",
|
|
262
|
+
"type": "Ref<HTMLInputElement>",
|
|
263
|
+
"required": false,
|
|
264
|
+
"default": null,
|
|
265
|
+
"description": "Forwarded ref to the underlying `<input type=\"checkbox\" role=\"switch\">` element."
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "className",
|
|
269
|
+
"type": "string",
|
|
270
|
+
"required": false,
|
|
271
|
+
"default": null,
|
|
272
|
+
"description": "Additional CSS class name(s) merged onto the component's root element."
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"name": "Tag",
|
|
278
|
+
"description": "",
|
|
279
|
+
"props": [
|
|
280
|
+
{
|
|
281
|
+
"name": "variant",
|
|
282
|
+
"type": "\"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\"",
|
|
283
|
+
"required": false,
|
|
284
|
+
"default": "neutral",
|
|
285
|
+
"description": "Semantic color variant."
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"name": "subtle",
|
|
289
|
+
"type": "boolean",
|
|
290
|
+
"required": false,
|
|
291
|
+
"default": false,
|
|
292
|
+
"description": "Use tinted background with semantic foreground."
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "onDismiss",
|
|
296
|
+
"type": "(() => void)",
|
|
297
|
+
"required": false,
|
|
298
|
+
"default": null,
|
|
299
|
+
"description": "When provided, renders a dismiss button that calls this handler."
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"name": "ref",
|
|
303
|
+
"type": "Ref<HTMLSpanElement>",
|
|
304
|
+
"required": false,
|
|
305
|
+
"default": null,
|
|
306
|
+
"description": "Forwarded ref to the underlying `<span>` element."
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "className",
|
|
310
|
+
"type": "string",
|
|
311
|
+
"required": false,
|
|
312
|
+
"default": null,
|
|
313
|
+
"description": "Additional CSS class name(s) merged onto the component's root element."
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"name": "Tooltip",
|
|
319
|
+
"description": "",
|
|
320
|
+
"props": [
|
|
321
|
+
{
|
|
322
|
+
"name": "content",
|
|
323
|
+
"type": "ReactNode",
|
|
324
|
+
"required": true,
|
|
325
|
+
"default": null,
|
|
326
|
+
"description": "Tooltip content."
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"name": "children",
|
|
330
|
+
"type": "ReactElement<Record<string, unknown>, string | JSXElementConstructor<any>>",
|
|
331
|
+
"required": true,
|
|
332
|
+
"default": null,
|
|
333
|
+
"description": "The trigger element (must accept ref, onMouseEnter/Leave, onFocus/Blur)."
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"name": "placement",
|
|
337
|
+
"type": "\"top\" | \"bottom\" | \"left\" | \"right\"",
|
|
338
|
+
"required": false,
|
|
339
|
+
"default": "top",
|
|
340
|
+
"description": "Preferred placement."
|
|
341
|
+
}
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"name": "NavBar",
|
|
346
|
+
"description": "",
|
|
347
|
+
"props": [
|
|
348
|
+
{
|
|
349
|
+
"name": "brand",
|
|
350
|
+
"type": "ReactNode",
|
|
351
|
+
"required": false,
|
|
352
|
+
"default": null,
|
|
353
|
+
"description": "Brand slot (wordmark / logo link), leading edge."
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "actions",
|
|
357
|
+
"type": "ReactNode",
|
|
358
|
+
"required": false,
|
|
359
|
+
"default": null,
|
|
360
|
+
"description": "Trailing actions slot (theme switch, CTA)."
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "children",
|
|
364
|
+
"type": "ReactNode",
|
|
365
|
+
"required": false,
|
|
366
|
+
"default": null,
|
|
367
|
+
"description": "Nav links."
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"name": "ref",
|
|
371
|
+
"type": "Ref<HTMLElement>",
|
|
372
|
+
"required": false,
|
|
373
|
+
"default": null,
|
|
374
|
+
"description": "Forwarded ref to the header element."
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"name": "className",
|
|
378
|
+
"type": "string",
|
|
379
|
+
"required": false,
|
|
380
|
+
"default": null,
|
|
381
|
+
"description": "Additional CSS class name(s) merged onto the component's root element."
|
|
382
|
+
}
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "AspectRatio",
|
|
387
|
+
"description": "",
|
|
388
|
+
"props": [
|
|
389
|
+
{
|
|
390
|
+
"name": "ratio",
|
|
391
|
+
"type": "number",
|
|
392
|
+
"required": true,
|
|
393
|
+
"default": null,
|
|
394
|
+
"description": "Width/height ratio, e.g. 16/10 or 4/5."
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"name": "ref",
|
|
398
|
+
"type": "Ref<HTMLDivElement>",
|
|
399
|
+
"required": false,
|
|
400
|
+
"default": null,
|
|
401
|
+
"description": "Forwarded ref to the frame element."
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"name": "className",
|
|
405
|
+
"type": "string",
|
|
406
|
+
"required": false,
|
|
407
|
+
"default": null,
|
|
408
|
+
"description": "Additional CSS class name(s) merged onto the component's root element."
|
|
409
|
+
}
|
|
410
|
+
]
|
|
411
|
+
}
|
|
412
|
+
]
|
|
413
|
+
}
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._button_m8fis_3{display:inline-flex;align-items:center;justify-content:center;gap:var(--psi-space-6);border:none;border-radius:var(--psi-radius-8);cursor:pointer;font-family:var(--psi-font-sans);white-space:nowrap;text-decoration:none;-webkit-user-select:none;user-select:none;transition:background-color var(--psi-duration-150) var(--psi-ease-standard),color var(--psi-duration-150) var(--psi-ease-standard)}._button_m8fis_3:focus-visible{outline:2px solid var(--psi-button-focus-ring);outline-offset:2px}._button_m8fis_3:disabled{opacity:.4;cursor:not-allowed}._button_m8fis_3._disabled_m8fis_31{opacity:.4;cursor:not-allowed;pointer-events:none}._size24_m8fis_39{height:var(--psi-size-24);padding-inline:var(--psi-space-8);font:var(--psi-button-font, var(--psi-text-12-16-medium))}._size32_m8fis_45{height:var(--psi-size-32);padding-inline:var(--psi-space-12);font:var(--psi-button-font, var(--psi-text-14-20-medium))}._size40_m8fis_51{height:var(--psi-size-40);padding-inline:var(--psi-space-16);font:var(--psi-button-font, var(--psi-text-16-24-medium))}._size48_m8fis_57{height:var(--psi-size-48);padding-inline:var(--psi-space-20);font:var(--psi-button-font, var(--psi-text-18-28-medium))}._accent_m8fis_66{background:var(--psi-button-accent-bg);color:var(--psi-button-accent-fg)}._accent_m8fis_66:hover:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-accent-bg-hover)}._accent_m8fis_66:active:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-accent-bg-active)}._accentSubtle_m8fis_78{background:var(--psi-button-accent-subtle-bg);color:var(--psi-button-accent-subtle-fg)}._accentSubtle_m8fis_78:hover:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-accent-subtle-bg-hover)}._accentSubtle_m8fis_78:active:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-accent-subtle-bg-active)}._neutral_m8fis_90{background:var(--psi-button-neutral-bg);color:var(--psi-button-neutral-fg)}._neutral_m8fis_90:hover:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-neutral-bg-hover)}._neutral_m8fis_90:active:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-neutral-bg-active)}._neutralSubtle_m8fis_102{background:var(--psi-button-neutral-subtle-bg);color:var(--psi-button-neutral-subtle-fg)}._neutralSubtle_m8fis_102:hover:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-neutral-subtle-bg-hover)}._neutralSubtle_m8fis_102:active:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-neutral-subtle-bg-active)}._ghost_m8fis_114{background:var(--psi-button-ghost-bg);color:var(--psi-button-ghost-fg)}._ghost_m8fis_114:hover:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-ghost-bg-hover)}._ghost_m8fis_114:active:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-ghost-bg-active)}._danger_m8fis_126{background:var(--psi-button-danger-bg);color:var(--psi-button-danger-fg)}._danger_m8fis_126:hover:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-danger-bg-hover)}._danger_m8fis_126:active:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-danger-bg-active)}._dangerSubtle_m8fis_138{background:var(--psi-button-danger-subtle-bg);color:var(--psi-button-danger-subtle-fg)}._dangerSubtle_m8fis_138:hover:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-danger-subtle-bg-hover)}._dangerSubtle_m8fis_138:active:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-danger-subtle-bg-active)}._outline_m8fis_150{background:var(--psi-button-outline-bg);color:var(--psi-button-outline-fg);border:1px solid var(--psi-button-outline-border)}._outline_m8fis_150:hover:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-outline-bg-hover);color:var(--psi-button-outline-fg-hover);border-color:transparent}._outline_m8fis_150:active:not(:disabled):not(._disabled_m8fis_31){background:var(--psi-button-outline-bg-active)}._iconButton_1dldx_3{display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:var(--psi-radius-8);cursor:pointer;padding:0;text-decoration:none;-webkit-user-select:none;user-select:none;transition:background-color var(--psi-duration-150) var(--psi-ease-standard),color var(--psi-duration-150) var(--psi-ease-standard)}._iconButton_1dldx_3:focus-visible{outline:2px solid var(--psi-button-focus-ring);outline-offset:2px}._iconButton_1dldx_3:disabled{opacity:.4;cursor:not-allowed}._iconButton_1dldx_3._disabled_1dldx_29{opacity:.4;cursor:not-allowed;pointer-events:none}._size24_1dldx_37{width:var(--psi-size-24);height:var(--psi-size-24)}._size32_1dldx_42{width:var(--psi-size-32);height:var(--psi-size-32)}._size40_1dldx_47{width:var(--psi-size-40);height:var(--psi-size-40)}._size48_1dldx_52{width:var(--psi-size-48);height:var(--psi-size-48)}._accent_1dldx_60{background:var(--psi-button-accent-bg);color:var(--psi-button-accent-fg)}._accent_1dldx_60:hover:not(:disabled):not(._disabled_1dldx_29){background:var(--psi-button-accent-bg-hover)}._accent_1dldx_60:active:not(:disabled):not(._disabled_1dldx_29){background:var(--psi-button-accent-bg-active)}._neutral_1dldx_72{background:var(--psi-button-neutral-bg);color:var(--psi-button-neutral-fg)}._neutral_1dldx_72:hover:not(:disabled):not(._disabled_1dldx_29){background:var(--psi-button-neutral-bg-hover)}._neutral_1dldx_72:active:not(:disabled):not(._disabled_1dldx_29){background:var(--psi-button-neutral-bg-active)}._ghost_1dldx_84{background:var(--psi-button-ghost-bg);color:var(--psi-button-ghost-fg)}._ghost_1dldx_84:hover:not(:disabled):not(._disabled_1dldx_29){background:var(--psi-button-ghost-bg-hover)}._ghost_1dldx_84:active:not(:disabled):not(._disabled_1dldx_29){background:var(--psi-button-ghost-bg-active)}._danger_1dldx_96{background:var(--psi-button-danger-bg);color:var(--psi-button-danger-fg)}._danger_1dldx_96:hover:not(:disabled):not(._disabled_1dldx_29){background:var(--psi-button-danger-bg-hover)}._danger_1dldx_96:active:not(:disabled):not(._disabled_1dldx_29){background:var(--psi-button-danger-bg-active)}._card_1btb3_1{background:var(--psi-card-bg);border:1px solid var(--psi-card-border);border-radius:var(--psi-card-radius);overflow:hidden}._stacked_1btb3_8{display:flex;flex-direction:column;gap:var(--psi-card-gap)}._featured_1btb3_10{display:grid;grid-template-columns:1.6fr 1fr;gap:var(--psi-card-gap);align-items:start}@media(max-width:960px){._featured_1btb3_10{grid-template-columns:1fr}}._media_1btb3_22{min-width:0}._body_1btb3_23{min-width:0;display:flex;flex-direction:column;gap:var(--psi-card-gap);padding:var(--psi-card-gap)}._hoverLift_1btb3_31{transition:transform var(--psi-duration-350) var(--psi-ease-standard)}._hoverLift_1btb3_31:hover{transform:translateY(-6px)}._navbar_1auk1_1{position:sticky;top:0;z-index:var(--psi-z-nav);background:var(--psi-navbar-bg);backdrop-filter:blur(var(--psi-navbar-blur));-webkit-backdrop-filter:blur(var(--psi-navbar-blur));border-bottom:1px solid var(--psi-navbar-border)}._inner_1auk1_11{display:flex;align-items:center;gap:var(--psi-space-24);height:var(--psi-navbar-height)}._brand_1auk1_18{display:flex;align-items:center}._links_1auk1_19{display:flex;align-items:center;gap:var(--psi-space-20);margin-inline-start:auto}._actions_1auk1_25{display:flex;align-items:center;gap:var(--psi-space-8)}._frame_et4fc_1{overflow:hidden}._frame_et4fc_1>img,._frame_et4fc_1>video{width:100%;height:100%;object-fit:cover;display:block}._input_8tzcf_3{display:block;width:100%;border:1px solid var(--psi-input-border);border-radius:var(--psi-radius-8);background:var(--psi-input-bg);color:var(--psi-input-fg);font-family:var(--psi-font-sans);padding-inline:var(--psi-space-8);transition:border-color var(--psi-duration-150) var(--psi-ease-standard),outline var(--psi-duration-150) var(--psi-ease-standard)}._input_8tzcf_3::placeholder{color:var(--psi-input-placeholder)}._input_8tzcf_3:hover:not(:disabled):not(:focus){border-color:var(--psi-input-border-hover)}._input_8tzcf_3:focus{outline:2px solid var(--psi-input-focus-ring);outline-offset:-1px;border-color:transparent}._input_8tzcf_3:disabled{opacity:.4;cursor:not-allowed}._size24_8tzcf_38{height:var(--psi-size-24);font:var(--psi-text-12-16-regular)}._size32_8tzcf_43{height:var(--psi-size-32);font:var(--psi-text-14-20-regular)}._size40_8tzcf_48{height:var(--psi-size-40);font:var(--psi-text-16-24-regular)}._size48_8tzcf_53{height:var(--psi-size-48);font:var(--psi-text-18-28-medium)}._error_8tzcf_60{border-color:var(--psi-input-border-error)}._error_8tzcf_60:hover:not(:disabled):not(:focus){border-color:var(--psi-input-border-error)}._select_140kg_3{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--psi-select-border);border-radius:var(--psi-radius-8);background-color:var(--psi-select-bg);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right var(--psi-space-8) center;color:var(--psi-select-fg);font-family:var(--psi-font-sans);padding-inline-start:var(--psi-space-8);padding-inline-end:var(--psi-space-24);cursor:pointer;transition:border-color var(--psi-duration-150) var(--psi-ease-standard),outline var(--psi-duration-150) var(--psi-ease-standard)}._select_140kg_3:hover:not(:disabled):not(:focus){border-color:var(--psi-select-border-hover)}._select_140kg_3:focus{outline:2px solid var(--psi-select-focus-ring);outline-offset:-1px;border-color:transparent}._select_140kg_3:disabled{opacity:.4;cursor:not-allowed}._size24_140kg_40{height:var(--psi-size-24);font:var(--psi-text-12-16-regular)}._size32_140kg_45{height:var(--psi-size-32);font:var(--psi-text-14-20-regular)}._size40_140kg_50{height:var(--psi-size-40);font:var(--psi-text-16-24-regular)}._size48_140kg_55{height:var(--psi-size-48);font:var(--psi-text-18-28-medium)}._error_140kg_62{border-color:var(--psi-select-border-error)}._error_140kg_62:hover:not(:disabled):not(:focus){border-color:var(--psi-select-border-error)}._label_n457n_3{display:inline-flex;align-items:center;gap:var(--psi-space-8);cursor:pointer;-webkit-user-select:none;user-select:none;font:var(--psi-text-14-20-regular);color:var(--psi-checkbox-fg)}._disabled_n457n_13{opacity:.4;cursor:not-allowed}._input_n457n_20{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._indicator_n457n_34{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;border:1px solid var(--psi-checkbox-box-border);border-radius:var(--psi-radius-4);background:var(--psi-checkbox-box-bg);transition:background-color var(--psi-duration-150) var(--psi-ease-standard),border-color var(--psi-duration-150) var(--psi-ease-standard)}._input_n457n_20:checked+._indicator_n457n_34{background:var(--psi-checkbox-box-bg-checked);border-color:var(--psi-checkbox-box-border-checked)}._input_n457n_20:checked+._indicator_n457n_34:after{content:"";display:block;width:4px;height:8px;border:solid var(--psi-checkbox-check-fg);border-width:0 2px 2px 0;transform:rotate(45deg) translate(-.5px,-.5px)}._input_n457n_20:focus-visible+._indicator_n457n_34{outline:2px solid var(--psi-checkbox-focus-ring);outline-offset:2px}._text_n457n_74{color:var(--psi-checkbox-fg)}._label_jru2c_3{display:inline-flex;align-items:center;gap:var(--psi-space-8);cursor:pointer;-webkit-user-select:none;user-select:none;font:var(--psi-text-14-20-regular);color:var(--psi-switch-fg)}._disabled_jru2c_13{opacity:.4;cursor:not-allowed}._input_jru2c_20{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._track_jru2c_34{position:relative;display:inline-flex;align-items:center;width:36px;height:20px;flex-shrink:0;border-radius:var(--psi-radius-full);background:var(--psi-switch-track-bg);transition:background-color var(--psi-duration-150) var(--psi-ease-standard)}._input_jru2c_20:checked+._track_jru2c_34{background:var(--psi-switch-track-bg-checked)}._input_jru2c_20:focus-visible+._track_jru2c_34{outline:2px solid var(--psi-switch-focus-ring);outline-offset:2px}._thumb_jru2c_58{position:absolute;width:16px;height:16px;border-radius:var(--psi-radius-full);background:var(--psi-switch-thumb-bg);left:2px;transition:left var(--psi-duration-150) var(--psi-ease-standard);box-shadow:0 1px 2px #00000029}._input_jru2c_20:checked+._track_jru2c_34 ._thumb_jru2c_58{left:18px}._text_jru2c_75{color:var(--psi-switch-fg)}._tag_3oysa_3{display:inline-flex;align-items:center;gap:var(--psi-space-4);height:24px;padding-inline:var(--psi-space-8);border-radius:var(--psi-radius-full);font:var(--psi-text-12-16-medium);white-space:nowrap;-webkit-user-select:none;user-select:none}._dismiss_3oysa_17{display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;background:none;color:inherit;cursor:pointer;opacity:.7;margin-inline-start:var(--psi-space-2);margin-inline-end:calc(-1 * var(--psi-space-4));border-radius:var(--psi-radius-full)}._dismiss_3oysa_17:hover{opacity:1}._dismiss_3oysa_17:focus-visible{outline:2px solid var(--psi-tag-focus-ring);outline-offset:2px}._neutral_3oysa_43{background:var(--psi-tag-neutral-bg);color:var(--psi-tag-neutral-fg)}._accent_3oysa_48{background:var(--psi-tag-accent-bg);color:var(--psi-tag-accent-fg)}._success_3oysa_53{background:var(--psi-tag-success-bg);color:var(--psi-tag-success-fg)}._warning_3oysa_58{background:var(--psi-tag-warning-bg);color:var(--psi-tag-warning-fg)}._danger_3oysa_63{background:var(--psi-tag-danger-bg);color:var(--psi-tag-danger-fg)}._neutralSubtle_3oysa_70{background:var(--psi-tag-neutral-subtle-bg);color:var(--psi-tag-neutral-subtle-fg)}._accentSubtle_3oysa_75{background:var(--psi-tag-accent-subtle-bg);color:var(--psi-tag-accent-subtle-fg)}._successSubtle_3oysa_80{background:var(--psi-tag-success-subtle-bg);color:var(--psi-tag-success-subtle-fg)}._warningSubtle_3oysa_85{background:var(--psi-tag-warning-subtle-bg);color:var(--psi-tag-warning-subtle-fg)}._dangerSubtle_3oysa_90{background:var(--psi-tag-danger-subtle-bg);color:var(--psi-tag-danger-subtle-fg)}._wrapper_17qua_3{position:relative;display:inline-flex}._tooltip_17qua_10{position:absolute;z-index:var(--psi-z-tooltip);padding:var(--psi-space-4) var(--psi-space-8);border-radius:var(--psi-radius-6);background:var(--psi-tooltip-bg);color:var(--psi-tooltip-fg);font:var(--psi-text-12-16-regular);white-space:nowrap;pointer-events:none}._top_17qua_24{bottom:100%;left:50%;transform:translate(-50%);margin-bottom:var(--psi-space-4)}._bottom_17qua_31{top:100%;left:50%;transform:translate(-50%);margin-top:var(--psi-space-4)}._left_17qua_38{right:100%;top:50%;transform:translateY(-50%);margin-right:var(--psi-space-4)}._right_17qua_45{left:100%;top:50%;transform:translateY(-50%);margin-left:var(--psi-space-4)}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Generated by emit-docs.ts — do not edit. -->
|
|
2
|
+
# AspectRatio
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Prop | Type | Default | Required | Description |
|
|
9
|
+
|---|---|---|---|---|
|
|
10
|
+
| `ratio` | `number` | — | yes | Width/height ratio, e.g. 16/10 or 4/5. |
|
|
11
|
+
| `ref` | `Ref<HTMLDivElement>` | — | no | Forwarded ref to the frame element. |
|
|
12
|
+
| `className` | `string` | — | no | Additional CSS class name(s) merged onto the component's root element. |
|
|
13
|
+
|
|
14
|
+
## Theming
|
|
15
|
+
|
|
16
|
+
Override `--psi-aspect-ratio-*` custom properties at any scope; interactive states derive automatically (L - 0.04 hover, L - 0.08 active).
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Rules
|
|
21
|
+
|
|
22
|
+
- One accent per visual group; everything else neutral or ghost.
|
|
23
|
+
- danger only for actions with real consequences.
|
|
24
|
+
- Sizes are px numbers (24|32|40|48), never S/M/L.
|
|
25
|
+
- Typography tokens are --psi-text-{size}-{lineHeight}-{weight}.
|
|
26
|
+
- Override component tokens (--psi-{component}-*), not semantic tokens, for one-off theming.
|
|
27
|
+
- --psi-button-font overrides button typography across all sizes (documented D34 override; ember → mono).
|
package/docs/Button.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- Generated by emit-docs.ts — do not edit. -->
|
|
2
|
+
# Button
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Prop | Type | Default | Required | Description |
|
|
9
|
+
|---|---|---|---|---|
|
|
10
|
+
| `variant` | `"accent" \| "accent-subtle" \| "neutral" \| "neutral-subtle" \| "ghost" \| "danger" \| "danger-subtle" \| "outline"` | neutral | no | Visual variant. |
|
|
11
|
+
| `size` | `24 \| 32 \| 40 \| 48` | 32 | no | Height in px (24 \| 32 \| 40 \| 48). |
|
|
12
|
+
| `href` | `string` | — | no | Render as an anchor with this href (D33). disabled → aria-disabled, no href attribute, pointer-events: none. |
|
|
13
|
+
| `target` | `string` | — | no | Anchor target; only used with href. |
|
|
14
|
+
| `rel` | `string` | — | no | Anchor rel; only used with href. |
|
|
15
|
+
| `ref` | `Ref<HTMLButtonElement \| HTMLAnchorElement>` | — | no | Forwarded ref to the underlying element. |
|
|
16
|
+
| `className` | `string` | — | no | Additional CSS class name(s) merged onto the component's root element. |
|
|
17
|
+
|
|
18
|
+
## Keyboard & assistive tech
|
|
19
|
+
|
|
20
|
+
| Keys | Behavior |
|
|
21
|
+
|---|---|
|
|
22
|
+
| Enter / Space | Activates the button. |
|
|
23
|
+
| Tab | Focusable; visible focus ring via :focus-visible. |
|
|
24
|
+
|
|
25
|
+
With href it renders an <a>; disabled anchors get aria-disabled, lose the href attribute, and suppress activation (D33).
|
|
26
|
+
|
|
27
|
+
## Theming
|
|
28
|
+
|
|
29
|
+
Override `--psi-button-*` custom properties at any scope; interactive states derive automatically (L - 0.04 hover, L - 0.08 active).
|
|
30
|
+
|
|
31
|
+
## Variant guidance
|
|
32
|
+
|
|
33
|
+
- **accent** — Primary action, draws attention. Submit, CTA, main action in a group.
|
|
34
|
+
- **accent-subtle** — Accent tone, lower visual weight. Selected state, active filter, soft CTA.
|
|
35
|
+
- **neutral** — Default, structurally present. Secondary actions, toolbar buttons.
|
|
36
|
+
- **neutral-subtle** — Minimal chrome. Inline actions, table row actions.
|
|
37
|
+
- **ghost** — No visible container until hover. Icon-only triggers, compact toolbars.
|
|
38
|
+
- **outline** — Bordered ghost — visible structure, no fill until hover. Marketing CTA, download button; hover fills accent.
|
|
39
|
+
- **danger** — Destructive action. Delete, remove, disconnect.
|
|
40
|
+
- **danger-subtle** — Destructive context, low urgency. Warning badges, soft destructive hints.
|
|
41
|
+
- **success | warning** — Status communication (Tag only). Status badges, labels.
|
|
42
|
+
|
|
43
|
+
## Rules
|
|
44
|
+
|
|
45
|
+
- One accent per visual group; everything else neutral or ghost.
|
|
46
|
+
- danger only for actions with real consequences.
|
|
47
|
+
- Sizes are px numbers (24|32|40|48), never S/M/L.
|
|
48
|
+
- Typography tokens are --psi-text-{size}-{lineHeight}-{weight}.
|
|
49
|
+
- Override component tokens (--psi-{component}-*), not semantic tokens, for one-off theming.
|
|
50
|
+
- --psi-button-font overrides button typography across all sizes (documented D34 override; ember → mono).
|
package/docs/Card.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!-- Generated by emit-docs.ts — do not edit. -->
|
|
2
|
+
# Card
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Prop | Type | Default | Required | Description |
|
|
9
|
+
|---|---|---|---|---|
|
|
10
|
+
| `variant` | `"stacked" \| "featured"` | stacked | no | stacked = media above body; featured = media beside body (~1.6fr/1fr), stacks under md. |
|
|
11
|
+
| `media` | `ReactNode` | — | no | Media slot rendered edge-to-edge (img, AspectRatio, …). |
|
|
12
|
+
| `hoverLift` | `boolean` | false | no | Lift on hover: translateY(-6px) over --psi-duration-350. |
|
|
13
|
+
| `ref` | `Ref<HTMLDivElement>` | — | no | Forwarded ref to the root element. |
|
|
14
|
+
| `className` | `string` | — | no | Additional CSS class name(s) merged onto the component's root element. |
|
|
15
|
+
|
|
16
|
+
## Theming
|
|
17
|
+
|
|
18
|
+
Override `--psi-card-*` custom properties at any scope; interactive states derive automatically (L - 0.04 hover, L - 0.08 active).
|
|
19
|
+
|
|
20
|
+
## Variant guidance
|
|
21
|
+
|
|
22
|
+
- **accent** — Primary action, draws attention. Submit, CTA, main action in a group.
|
|
23
|
+
- **accent-subtle** — Accent tone, lower visual weight. Selected state, active filter, soft CTA.
|
|
24
|
+
- **neutral** — Default, structurally present. Secondary actions, toolbar buttons.
|
|
25
|
+
- **neutral-subtle** — Minimal chrome. Inline actions, table row actions.
|
|
26
|
+
- **ghost** — No visible container until hover. Icon-only triggers, compact toolbars.
|
|
27
|
+
- **outline** — Bordered ghost — visible structure, no fill until hover. Marketing CTA, download button; hover fills accent.
|
|
28
|
+
- **danger** — Destructive action. Delete, remove, disconnect.
|
|
29
|
+
- **danger-subtle** — Destructive context, low urgency. Warning badges, soft destructive hints.
|
|
30
|
+
- **success | warning** — Status communication (Tag only). Status badges, labels.
|
|
31
|
+
|
|
32
|
+
## Rules
|
|
33
|
+
|
|
34
|
+
- One accent per visual group; everything else neutral or ghost.
|
|
35
|
+
- danger only for actions with real consequences.
|
|
36
|
+
- Sizes are px numbers (24|32|40|48), never S/M/L.
|
|
37
|
+
- Typography tokens are --psi-text-{size}-{lineHeight}-{weight}.
|
|
38
|
+
- Override component tokens (--psi-{component}-*), not semantic tokens, for one-off theming.
|
|
39
|
+
- --psi-button-font overrides button typography across all sizes (documented D34 override; ember → mono).
|
package/docs/Checkbox.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!-- Generated by emit-docs.ts — do not edit. -->
|
|
2
|
+
# Checkbox
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Prop | Type | Default | Required | Description |
|
|
9
|
+
|---|---|---|---|---|
|
|
10
|
+
| `children` | `ReactNode` | — | no | Label text. |
|
|
11
|
+
| `ref` | `Ref<HTMLInputElement>` | — | no | Forwarded ref to the underlying `<input type="checkbox">` element. |
|
|
12
|
+
| `className` | `string` | — | no | Additional CSS class name(s) merged onto the component's root element. |
|
|
13
|
+
|
|
14
|
+
## Keyboard & assistive tech
|
|
15
|
+
|
|
16
|
+
| Keys | Behavior |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Space | Toggles. Native <input type=checkbox> underneath (visually hidden). |
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Theming
|
|
22
|
+
|
|
23
|
+
Override `--psi-checkbox-*` custom properties at any scope; interactive states derive automatically (L - 0.04 hover, L - 0.08 active).
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- One accent per visual group; everything else neutral or ghost.
|
|
30
|
+
- danger only for actions with real consequences.
|
|
31
|
+
- Sizes are px numbers (24|32|40|48), never S/M/L.
|
|
32
|
+
- Typography tokens are --psi-text-{size}-{lineHeight}-{weight}.
|
|
33
|
+
- Override component tokens (--psi-{component}-*), not semantic tokens, for one-off theming.
|
|
34
|
+
- --psi-button-font overrides button typography across all sizes (documented D34 override; ember → mono).
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!-- Generated by emit-docs.ts — do not edit. -->
|
|
2
|
+
# IconButton
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
| Prop | Type | Default | Required | Description |
|
|
9
|
+
|---|---|---|---|---|
|
|
10
|
+
| `variant` | `"accent" \| "neutral" \| "ghost" \| "danger"` | neutral | no | Visual variant. |
|
|
11
|
+
| `size` | `24 \| 32 \| 40 \| 48` | 32 | no | Square size in px (24 \| 32 \| 40 \| 48). |
|
|
12
|
+
| `href` | `string` | — | no | Render as an anchor with this href (D33). disabled → aria-disabled, no href attribute, pointer-events: none. |
|
|
13
|
+
| `target` | `string` | — | no | Anchor target; only used with href. |
|
|
14
|
+
| `rel` | `string` | — | no | Anchor rel; only used with href. |
|
|
15
|
+
| `ref` | `Ref<HTMLButtonElement \| HTMLAnchorElement>` | — | no | Forwarded ref to the underlying element. |
|
|
16
|
+
| `className` | `string` | — | no | Additional CSS class name(s) merged onto the component's root element. |
|
|
17
|
+
|
|
18
|
+
## Keyboard & assistive tech
|
|
19
|
+
|
|
20
|
+
| Keys | Behavior |
|
|
21
|
+
|---|---|
|
|
22
|
+
| Enter / Space | Activates. |
|
|
23
|
+
|
|
24
|
+
Requires an accessible name — pass aria-label. IconButton does not hide its icon for you; mark the icon aria-hidden yourself.
|
|
25
|
+
|
|
26
|
+
## Theming
|
|
27
|
+
|
|
28
|
+
Override `--psi-button-*` custom properties at any scope; interactive states derive automatically (L - 0.04 hover, L - 0.08 active).
|
|
29
|
+
|
|
30
|
+
## Variant guidance
|
|
31
|
+
|
|
32
|
+
- **accent** — Primary action, draws attention. Submit, CTA, main action in a group.
|
|
33
|
+
- **accent-subtle** — Accent tone, lower visual weight. Selected state, active filter, soft CTA.
|
|
34
|
+
- **neutral** — Default, structurally present. Secondary actions, toolbar buttons.
|
|
35
|
+
- **neutral-subtle** — Minimal chrome. Inline actions, table row actions.
|
|
36
|
+
- **ghost** — No visible container until hover. Icon-only triggers, compact toolbars.
|
|
37
|
+
- **outline** — Bordered ghost — visible structure, no fill until hover. Marketing CTA, download button; hover fills accent.
|
|
38
|
+
- **danger** — Destructive action. Delete, remove, disconnect.
|
|
39
|
+
- **danger-subtle** — Destructive context, low urgency. Warning badges, soft destructive hints.
|
|
40
|
+
- **success | warning** — Status communication (Tag only). Status badges, labels.
|
|
41
|
+
|
|
42
|
+
## Rules
|
|
43
|
+
|
|
44
|
+
- One accent per visual group; everything else neutral or ghost.
|
|
45
|
+
- danger only for actions with real consequences.
|
|
46
|
+
- Sizes are px numbers (24|32|40|48), never S/M/L.
|
|
47
|
+
- Typography tokens are --psi-text-{size}-{lineHeight}-{weight}.
|
|
48
|
+
- Override component tokens (--psi-{component}-*), not semantic tokens, for one-off theming.
|
|
49
|
+
- --psi-button-font overrides button typography across all sizes (documented D34 override; ember → mono).
|