@tangible/ui 0.2.16 → 0.2.17
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 +1 -1
- package/package.json +1 -1
- package/skills/building-with-tui/SKILL.md +18 -0
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +15 -1
- package/styles/all.expanded.unlayered.css +15 -1
- package/styles/all.unlayered.css +1 -1
- package/styles/components/segmented-control.scss +43 -1
- package/tui-manifest.json +3 -2
package/figma-tokens.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2.
|
|
2
|
+
"version": "0.2.17",
|
|
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.",
|
package/package.json
CHANGED
|
@@ -248,6 +248,24 @@ DataTable already use.
|
|
|
248
248
|
}
|
|
249
249
|
```
|
|
250
250
|
|
|
251
|
+
On `SegmentedControl`'s **outline** variant the selected *border* is the whole selection
|
|
252
|
+
indicator, and it has its own token — `--tui-segmented-item-border-active` (added 0.2.17). Before
|
|
253
|
+
that it read the theme token directly, so the fill and text were overridable per value and the
|
|
254
|
+
border was not. If you recolour a segment in the outline variant, move the border with the fill or
|
|
255
|
+
the option will read as the wrong colour outlined in the theme's:
|
|
256
|
+
|
|
257
|
+
```css
|
|
258
|
+
.tui-segmented__item[data-value='fail'] {
|
|
259
|
+
--tui-segmented-item-bg-active: var(--tui-theme-danger-subtlest);
|
|
260
|
+
--tui-segmented-item-fg-active: var(--tui-theme-danger-stronger);
|
|
261
|
+
--tui-segmented-item-border-active: var(--tui-theme-danger-base);
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Check the border you pick against the **page**, not against the fill — it is a non-text indicator,
|
|
266
|
+
so WCAG SC 1.4.11 asks for 3:1 there, and a tone that looks right on the fill can fall under that
|
|
267
|
+
against a dark page. TUI's own defaults are 3.60:1 (dark) and 7.52:1 (light).
|
|
268
|
+
|
|
251
269
|
Reach for the component's own tokens inside the rule, as above, rather than setting `background`
|
|
252
270
|
directly — that keeps the hover and focus treatments the component already derives. Note that
|
|
253
271
|
`--tui-segmented-item-bg-active` only applies when the item *is* active, so the selector above does
|