@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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.22",
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/800",
1422
+ "alias": "palette/gray/750",
1423
1423
  "collection": "TUI/Primitives",
1424
- "hex": "#202836"
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/900",
1456
+ "alias": "palette/gray/800",
1457
1457
  "collection": "TUI/Primitives",
1458
- "hex": "#111928"
1458
+ "hex": "#202836"
1459
1459
  }
1460
1460
  }
1461
1461
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangible/ui",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "description": "Tangible Design System",
5
5
  "type": "module",
6
6
  "main": "./components/index.js",
@@ -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