@tangible/ui 0.2.22 → 0.2.23
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/figma-tokens.json +5 -5
- package/package.json +1 -1
- package/skills/building-with-tui/SKILL.md +16 -6
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +175 -61
- package/styles/all.expanded.unlayered.css +175 -61
- package/styles/all.unlayered.css +1 -1
- package/styles/components/accordion.scss +5 -0
- package/styles/components/button.scss +13 -9
- package/styles/components/card.scss +14 -0
- package/styles/components/color-picker.scss +1 -0
- package/styles/components/combobox.scss +35 -10
- package/styles/components/date-picker.scss +1 -0
- package/styles/components/dropdown.scss +27 -8
- package/styles/components/gradient-picker.scss +1 -0
- package/styles/components/multi-combobox.scss +26 -11
- package/styles/components/multi-select.scss +31 -9
- package/styles/components/search-select.scss +46 -10
- package/styles/components/segmented-control.scss +6 -0
- package/styles/components/select.scss +35 -10
- package/styles/components/sidebar.scss +4 -0
- package/styles/components/table.scss +8 -1
- package/styles/components/tabs.scss +4 -1
- package/styles/core.css +1 -1
- package/styles/core.unlayered.css +1 -1
- package/styles/system/_tokens.scss +2 -2
- package/tui-manifest.json +38 -5
- package/utils/portal.js +34 -5
package/figma-tokens.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2.
|
|
2
|
+
"version": "0.2.23",
|
|
3
3
|
"source": "publish/styles/all.expanded.css",
|
|
4
4
|
"prefix": "tui-",
|
|
5
5
|
"note": "Layer 1 primitives only. Component API tokens (--tui-{component}-*) are never defined in CSS — they exist only as fallback reads — so they have no Figma representation. CONTRACT: consumers read TUI defaults from this file at build time (variables[].cssVar, the \"Light\"/\"Dark\" mode names, and alias chains into TUI/Primitives). Renaming a cssVar or a mode is a breaking change to those consumers even when the CSS value is unchanged — a rename silently becomes an undefined default downstream — so treat it as at least a minor bump and call it out in the CHANGELOG.",
|
|
@@ -1419,9 +1419,9 @@
|
|
|
1419
1419
|
"hex": "#e5e7eb"
|
|
1420
1420
|
},
|
|
1421
1421
|
"Dark": {
|
|
1422
|
-
"alias": "palette/gray/
|
|
1422
|
+
"alias": "palette/gray/750",
|
|
1423
1423
|
"collection": "TUI/Primitives",
|
|
1424
|
-
"hex": "#
|
|
1424
|
+
"hex": "#2b3443"
|
|
1425
1425
|
}
|
|
1426
1426
|
}
|
|
1427
1427
|
},
|
|
@@ -1453,9 +1453,9 @@
|
|
|
1453
1453
|
"hex": "#f3f4f6"
|
|
1454
1454
|
},
|
|
1455
1455
|
"Dark": {
|
|
1456
|
-
"alias": "palette/gray/
|
|
1456
|
+
"alias": "palette/gray/800",
|
|
1457
1457
|
"collection": "TUI/Primitives",
|
|
1458
|
-
"hex": "#
|
|
1458
|
+
"hex": "#202836"
|
|
1459
1459
|
}
|
|
1460
1460
|
}
|
|
1461
1461
|
},
|
package/package.json
CHANGED
|
@@ -130,8 +130,10 @@ node silently does nothing. For the rest of the family, the fix is to put the *t
|
|
|
130
130
|
`.tui-interface`. `getPortalRootFor` is importable from `@tangible/ui/utils/portal` if you need to
|
|
131
131
|
resolve the same root yourself.
|
|
132
132
|
|
|
133
|
+
If `<html>` itself is the `.tui-interface`, portal roots mount inside `<body>`, not on `<html>`.
|
|
134
|
+
|
|
133
135
|
**3. Dark mode is `data-theme`, not a class.** TUI's palette is gated on `[data-theme="dark"]`
|
|
134
|
-
(`"auto"` follows `prefers-color-scheme`; absent means light and inherits the host's colour). A host
|
|
136
|
+
(`"auto"` follows `prefers-color-scheme`; absent means light and inherits the host's colour). With `data-theme="dark"`/`"auto"` on an ancestor such as `<html>` and an un-themed `.tui-interface` on `<body>`, TUI surfaces (panels, cards, filled controls) render correctly because they own their text colour, but in-flow text directly inside the interface still inherits the HOST's colour by design — so set the host's own body colour (e.g. `color: var(--tui-color-fg)` on `body`) if you want TUI's. A host
|
|
135
137
|
that toggles a `.dark` class (Tailwind's strategy) drives nothing in TUI. Translate it: observe what
|
|
136
138
|
is actually applied to the document — a `MutationObserver` on `<html>`'s `class` catches boot,
|
|
137
139
|
explicit toggles and OS changes alike — and mirror it onto your wrapper. Resolve to explicit
|
|
@@ -239,6 +241,19 @@ Useful primitives:
|
|
|
239
241
|
`--tui-control-font-size-{sm,md,lg}` to decouple type size from the height tier. One override
|
|
240
242
|
normalises a whole host context at once.
|
|
241
243
|
|
|
244
|
+
Two families share a token layer, so you can restyle the whole family in one place:
|
|
245
|
+
|
|
246
|
+
- **Control chrome:** `--tui-input-{bg,fg,border,border-focus,radius}` reaches TextInput,
|
|
247
|
+
SearchInput, the pickers and every select-family trigger.
|
|
248
|
+
- **Listbox panels and options** (Select, MultiSelect, Combobox, MultiCombobox, SearchSelect;
|
|
249
|
+
0.2.23+):
|
|
250
|
+
- Panel: `--tui-listbox-{bg,fg,border,shadow,radius}`.
|
|
251
|
+
- Options: `--tui-listbox-option-{radius,gap,bg-hover,fg-hover,bg-selected,fg-selected,bg-selected-hover,check}`.
|
|
252
|
+
|
|
253
|
+
A component's own token (e.g. `--tui-combobox-option-bg-selected`) overrides the shared one for
|
|
254
|
+
that component only. If you re-point an option state's background, set its `-fg-*` partner too:
|
|
255
|
+
the text defaults to the panel's own fg, which is tuned for TUI's default fills.
|
|
256
|
+
|
|
242
257
|
`className` is for layout integration (margin, grid placement), not appearance. Beyond the token
|
|
243
258
|
API the sanctioned escape hatch is to **swizzle** — copy the component source and own the fork.
|
|
244
259
|
|
|
@@ -458,11 +473,6 @@ Re-verify before you work around anything.
|
|
|
458
473
|
([#86](https://github.com/TangibleInc/tangible-ui/issues/86))
|
|
459
474
|
- **`tui-manifest.json` is lossy** — see "Where the API lives" above for the shape of it.
|
|
460
475
|
([#87](https://github.com/TangibleInc/tangible-ui/issues/87))
|
|
461
|
-
- **Two `.tui-interface` wrappers can end up sharing one portal root** — `reconcileFallback()`
|
|
462
|
-
adopts a stranded root into the *first* interface in document order. Most likely to fire in
|
|
463
|
-
exactly the apps that hit the portal wiring above, since a portal created before any interface is
|
|
464
|
-
in the DOM is what strands a root in the first place.
|
|
465
|
-
([#88](https://github.com/TangibleInc/tangible-ui/issues/88))
|
|
466
476
|
|
|
467
477
|
## Verify
|
|
468
478
|
|