@tangible/ui 0.2.23 → 0.2.25
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/components/Checkbox/Checkbox.js +1 -1
- package/components/DatePicker/DateRangePicker.js +1 -1
- package/components/Dropdown/Dropdown.js +1 -1
- package/components/GradientPicker/GradientPicker.js +3 -3
- package/components/NavMenu/NavMenu.d.ts +32 -0
- package/components/NavMenu/NavMenu.js +230 -0
- package/components/NavMenu/index.d.ts +3 -0
- package/components/NavMenu/index.js +2 -0
- package/components/NavMenu/types.d.ts +103 -0
- package/components/NavMenu/types.js +6 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +1 -0
- package/figma-tokens.json +90 -1
- package/package.json +5 -1
- package/skills/building-with-tui/SKILL.md +10 -6
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +546 -64
- package/styles/all.expanded.unlayered.css +546 -64
- package/styles/all.unlayered.css +1 -1
- package/styles/components/_bundle.scss +2 -0
- package/styles/components/checkbox.scss +13 -2
- package/styles/components/color-picker.scss +12 -4
- package/styles/components/combobox.scss +7 -6
- package/styles/components/date-picker.scss +8 -6
- package/styles/components/dropdown.scss +3 -5
- package/styles/components/gradient-picker.scss +3 -5
- package/styles/components/input/index.scss +16 -6
- package/styles/components/multi-combobox.scss +6 -6
- package/styles/components/multi-select.scss +10 -7
- package/styles/components/nav-menu.scss +385 -0
- package/styles/components/radio.scss +11 -3
- package/styles/components/search-select.scss +7 -7
- package/styles/components/select.scss +7 -6
- package/styles/components/slider.scss +1 -1
- package/styles/components/switch.scss +1 -1
- package/styles/components/text-input.scss +15 -1
- package/styles/core.css +1 -1
- package/styles/core.unlayered.css +1 -1
- package/styles/index.scss +18 -0
- package/styles/system/_constants.scss +0 -6
- package/styles/system/_palettes.scss +6 -0
- package/styles/system/_text-styles.scss +200 -0
- package/styles/system/_tokens.scss +7 -0
- package/styles/system/index.scss +3 -1
- package/tui-manifest.json +115 -3
- package/utils/listbox/group.js +3 -1
|
@@ -231,7 +231,7 @@ Useful primitives:
|
|
|
231
231
|
|
|
232
232
|
- Surfaces / text: `--tui-color-bg`, `-bg-surface`, `-bg-elevated`, `-bg-muted`, `-bg-inverted`,
|
|
233
233
|
`--tui-color-fg`, `-fg-secondary`, `-fg-muted`, `-fg-on-accent`, `--tui-color-border`,
|
|
234
|
-
`--tui-color-divider`, `--tui-color-fill{,-subtle,-strong}`, `--tui-color-focus-ring`.
|
|
234
|
+
`--tui-color-border-control` (form-control boundaries, 3:1; `--tui-color-border` is decorative), `--tui-color-divider`, `--tui-color-fill{,-subtle,-strong}`, `--tui-color-focus-ring`.
|
|
235
235
|
- Themes: `--tui-theme-{primary,secondary,success,warning,danger,info}-{subtlest,subtle,soft,base,strong,stronger,strongest}`.
|
|
236
236
|
The ladder is **contrast-based** — "stronger" always means more contrast against the current
|
|
237
237
|
background, so a single choice reads correctly in both light and dark mode.
|
|
@@ -243,17 +243,21 @@ Useful primitives:
|
|
|
243
243
|
|
|
244
244
|
Two families share a token layer, so you can restyle the whole family in one place:
|
|
245
245
|
|
|
246
|
-
- **Control chrome:** `--tui-input-{bg,fg,border,border-focus,radius}` reaches TextInput,
|
|
246
|
+
- **Control chrome:** `--tui-input-{bg,fg,border,border-focus,border-hover,radius}` reaches TextInput,
|
|
247
247
|
SearchInput, the pickers and every select-family trigger.
|
|
248
248
|
- **Listbox panels and options** (Select, MultiSelect, Combobox, MultiCombobox, SearchSelect;
|
|
249
249
|
0.2.23+):
|
|
250
250
|
- Panel: `--tui-listbox-{bg,fg,border,shadow,radius}`.
|
|
251
251
|
- Options: `--tui-listbox-option-{radius,gap,bg-hover,fg-hover,bg-selected,fg-selected,bg-selected-hover,check}`.
|
|
252
252
|
|
|
253
|
-
A component's own token (e.g. `--tui-combobox-option-bg-selected`) overrides the shared one for
|
|
253
|
+
Form controls show no border change on hover unless you set `--tui-input-border-hover` (opt-in; focus, open and invalid still win). A component's own token (e.g. `--tui-combobox-option-bg-selected`) overrides the shared one for
|
|
254
254
|
that component only. If you re-point an option state's background, set its `-fg-*` partner too:
|
|
255
255
|
the text defaults to the panel's own fg, which is tuned for TUI's default fills.
|
|
256
256
|
|
|
257
|
+
**Text styles** (0.2.24+) are classes: `.tui-text-style-{display-01…04, headline-01…06, body, body-sm, label, caption, overline}`. Restyle a treatment everywhere through its one class (`.tui-text-style-overline { text-transform: none }` reaches every listbox group label and the Dropdown header), or through its knobs, `--tui-text-{style}-{family,size,weight,line-height,tracking,transform,color}`. Knobs are never declared, so `:root` works. `--tui-text-headline-weight` retunes every headline level at once.
|
|
258
|
+
|
|
259
|
+
**Fonts:** TUI inherits the host's font. If your page has none (you see the browser's serif), add `tui-font-sans` next to `tui-interface`, or set `--tui-font-family-base` anywhere. `--tui-font-family-sans` / `-mono` replace the stacks those utilities use.
|
|
260
|
+
|
|
257
261
|
`className` is for layout integration (margin, grid placement), not appearance. Beyond the token
|
|
258
262
|
API the sanctioned escape hatch is to **swizzle** — copy the component source and own the fork.
|
|
259
263
|
|
|
@@ -392,13 +396,13 @@ synthesise a second toggle. For a second control that toggles the same item (an
|
|
|
392
396
|
|
|
393
397
|
## Component names, and what isn't there
|
|
394
398
|
|
|
395
|
-
|
|
396
|
-
**Table → `DataTable`**, **Pagination → `Pager`**, **Drawer → `Sidebar`** (drawer mode),
|
|
399
|
+
46 components. If you are hunting for a name: **Alert → `Notice`**, **Menu → `Dropdown`**,
|
|
400
|
+
**Table → `DataTable`**, **Pagination → `Pager`**, **Drawer → `Sidebar`** (drawer mode), **Nav menu / sidebar links / top nav bar → `NavMenu`** (inside `Sidebar.Nav` or your `<nav>`; `asChild` for router links, `current` for `aria-current`; `orientation="horizontal"` for a bar whose items open flyouts — don't hand-roll menus with `role="menu"` or hover-open),
|
|
397
401
|
**Badge → `Chip`** or `ContentIndicator`, **Spinner → `Progress`** or `Button loading`,
|
|
398
402
|
**ConfirmDialog / AlertDialog → `Modal role="alertdialog"`** (needs both `aria-labelledby` and
|
|
399
403
|
`aria-describedby`; the backdrop stops dismissing by default, Escape still cancels; put the actions in
|
|
400
404
|
`Modal.Foot`, which is already an end-aligned flex row — `justify="between"` separates a destructive one).
|
|
401
|
-
|
|
405
|
+
**Snackbar → `Toast`** (`ToastProvider` + `useToast()`). No Breadcrumb, no Skeleton, and no *standalone* time picker — but
|
|
402
406
|
`DatePicker` / `DateRangePicker` take `withTime` for an hour/minute field (12- or 24-hour via
|
|
403
407
|
`hour12`) plus a display-only `zoneLabel`; the value is a plain `Date` with wall-clock semantics,
|
|
404
408
|
so timezone interpretation stays yours.
|