@app-studio/components 0.11.0 → 0.11.1
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/dist/native/components/Avatar/Avatar/Avatar.view.js +10 -2
- package/dist/native/components/Avatar/Avatar/Avatar.view.js.map +1 -1
- package/dist/native/components/Badge/Badge/Badge.view.js +6 -6
- package/dist/native/components/Badge/Badge/Badge.view.js.map +1 -1
- package/dist/native/components/Input/FieldLabel/FieldLabel.js +6 -1
- package/dist/native/components/Input/FieldLabel/FieldLabel.js.map +1 -1
- package/dist/native/components/StatusIndicator/StatusIndicator/StatusIndicator.view.js +11 -3
- package/dist/native/components/StatusIndicator/StatusIndicator/StatusIndicator.view.js.map +1 -1
- package/dist/web.cjs.js +3 -3
- package/dist/web.cjs.js.map +1 -1
- package/dist/web.esm.js +12 -12
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.js +3 -3
- package/dist/web.umd.js.map +1 -1
- package/docs/conventions.md +13 -0
- package/docs/typography.md +17 -3
- package/package.json +1 -1
package/docs/conventions.md
CHANGED
|
@@ -508,6 +508,19 @@ export const VariantButtons = () => (
|
|
|
508
508
|
- Test component edge cases
|
|
509
509
|
- Test component accessibility
|
|
510
510
|
|
|
511
|
+
### Lazy-mounted components (Tabs)
|
|
512
|
+
|
|
513
|
+
`Tabs` mounts **only the active tab's content** by default — inactive panes
|
|
514
|
+
do not exist in the DOM. Two consequences for consumers:
|
|
515
|
+
|
|
516
|
+
- A spec asserting on a non-active tab's content must activate that tab
|
|
517
|
+
first (click its header), or render with `keepMounted` — which mounts
|
|
518
|
+
every pane and hides inactive ones with `display: none`, preserving their
|
|
519
|
+
internal state across switches.
|
|
520
|
+
- Any module mock of `@app-studio/components` must export `Tabs` (and keep
|
|
521
|
+
its lazy-mount behavior in mind), or content assertions will pass/fail
|
|
522
|
+
for the wrong reason.
|
|
523
|
+
|
|
511
524
|
Example:
|
|
512
525
|
|
|
513
526
|
```typescript
|
package/docs/typography.md
CHANGED
|
@@ -54,6 +54,20 @@ control scale instead.
|
|
|
54
54
|
- Titling a card, panel, or page → `heading="h4…h6"`.
|
|
55
55
|
- Above the fold on a landing page → `Title`.
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
## If your product tokens use `T*`/`C*` naming
|
|
58
|
+
|
|
59
|
+
There is no `T*`/`C*` token scale in this library — that vocabulary lives in
|
|
60
|
+
product design tokens. It maps onto the scales above as **T\* = titles →
|
|
61
|
+
heading scale** and **C\* = controls/content → control scale**:
|
|
62
|
+
|
|
63
|
+
| product tier | intended use | library equivalent |
|
|
64
|
+
| ------------ | ------------ | ------------------ |
|
|
65
|
+
| `T1` (~34px+) | page/hero title | `heading="h4"` and up, or `Title` on marketing surfaces |
|
|
66
|
+
| `T2` (~28px) | section title — **too large for dense controls** | round down to `heading="h5"` (24px) in app chrome |
|
|
67
|
+
| `T3` (~20px) | card/panel title | `heading="h6"` or control `xl` |
|
|
68
|
+
| `C1` (~14px) | default control & body text | control `md` |
|
|
69
|
+
| `C2` (~12px) | helper text, meta, chips | control `sm` |
|
|
70
|
+
|
|
71
|
+
The recurring trap is reaching for a `T*` tier inside a field, row, or menu:
|
|
72
|
+
dense UI never goes above the control scale (`size`), which is why "T2 in a
|
|
73
|
+
toolbar" always ends up rebuilt as `C1`/`C2`.
|