@tangible/ui 0.2.40 → 0.2.42

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.
Files changed (66) hide show
  1. package/README.md +19 -6
  2. package/components/Avatar/AvatarGroup.js +3 -2
  3. package/components/CommandPalette/CommandPalette.d.ts +30 -0
  4. package/components/CommandPalette/CommandPalette.js +409 -0
  5. package/components/CommandPalette/CommandPaletteContext.d.ts +31 -0
  6. package/components/CommandPalette/CommandPaletteContext.js +8 -0
  7. package/components/CommandPalette/index.d.ts +3 -0
  8. package/components/CommandPalette/index.js +2 -0
  9. package/components/CommandPalette/shortcut.d.ts +15 -0
  10. package/components/CommandPalette/shortcut.js +83 -0
  11. package/components/CommandPalette/types.d.ts +152 -0
  12. package/components/CommandPalette/types.js +16 -0
  13. package/components/Dropdown/Dropdown.js +6 -3
  14. package/components/IconTile/IconTile.d.ts +16 -0
  15. package/components/IconTile/IconTile.js +17 -0
  16. package/components/IconTile/index.d.ts +2 -0
  17. package/components/IconTile/index.js +1 -0
  18. package/components/IconTile/types.d.ts +29 -0
  19. package/components/IconTile/types.js +1 -0
  20. package/components/NavMenu/NavMenu.js +5 -4
  21. package/components/OverlapStack/OverlapStack.js +3 -2
  22. package/components/SegmentedControl/SegmentedControl.js +2 -2
  23. package/components/SegmentedControl/types.d.ts +10 -0
  24. package/components/StepList/StepList.js +6 -4
  25. package/components/Table/DataTable.js +1 -1
  26. package/components/Table/types.d.ts +6 -0
  27. package/components/Table/types.js +3 -0
  28. package/components/index.d.ts +4 -0
  29. package/components/index.js +2 -0
  30. package/figma-tokens.json +101 -3
  31. package/icons/icons.svg +1 -1
  32. package/icons/sprite-version.js +1 -1
  33. package/icons/sprite.php +1 -1
  34. package/package.json +22 -4
  35. package/skills/building-with-tui/SKILL.md +17 -3
  36. package/styles/all.css +1 -1
  37. package/styles/all.expanded.css +514 -63
  38. package/styles/all.expanded.unlayered.css +514 -63
  39. package/styles/all.unlayered.css +1 -1
  40. package/styles/components/_bundle.scss +8 -0
  41. package/styles/components/avatar.scss +6 -23
  42. package/styles/components/button.scss +15 -15
  43. package/styles/components/chip.scss +35 -11
  44. package/styles/components/command-palette.scss +314 -0
  45. package/styles/components/content-indicator.scss +6 -1
  46. package/styles/components/date-picker.scss +1 -1
  47. package/styles/components/icon-button.scss +6 -7
  48. package/styles/components/icon-tile.scss +89 -0
  49. package/styles/components/input/index.scss +4 -0
  50. package/styles/components/multi-select.scss +1 -1
  51. package/styles/components/progress.scss +23 -0
  52. package/styles/components/segmented-control.scss +11 -1
  53. package/styles/components/step-indicator.scss +1 -1
  54. package/styles/components/tabs.scss +1 -1
  55. package/styles/core.css +1 -1
  56. package/styles/core.unlayered.css +1 -1
  57. package/styles/system/_constants.scss +5 -0
  58. package/styles/system/_palettes.scss +1 -0
  59. package/styles/system/_tokens.scss +40 -1
  60. package/tui-manifest.json +166 -2
  61. package/utils/color/theme.d.ts +66 -0
  62. package/utils/color/theme.js +232 -0
  63. package/utils/flatten-children.d.ts +17 -0
  64. package/utils/flatten-children.js +32 -0
  65. package/vanilla/styles.css +1 -1
  66. package/vanilla/styles.unlayered.css +1 -1
package/figma-tokens.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.40",
2
+ "version": "0.2.42",
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.",
@@ -326,6 +326,18 @@
326
326
  }
327
327
  }
328
328
  },
329
+ {
330
+ "name": "palette/gray/550",
331
+ "type": "COLOR",
332
+ "values": {
333
+ "Default": {
334
+ "r": 0.3764705882352941,
335
+ "g": 0.40784313725490196,
336
+ "b": 0.4627450980392157,
337
+ "a": 1
338
+ }
339
+ }
340
+ },
329
341
  {
330
342
  "name": "palette/gray/600",
331
343
  "type": "COLOR",
@@ -1462,9 +1474,9 @@
1462
1474
  "type": "COLOR",
1463
1475
  "values": {
1464
1476
  "Light": {
1465
- "alias": "palette/gray/500",
1477
+ "alias": "palette/gray/550",
1466
1478
  "collection": "TUI/Primitives",
1467
- "hex": "#6b7280"
1479
+ "hex": "#606876"
1468
1480
  },
1469
1481
  "Dark": {
1470
1482
  "alias": "palette/gray/400",
@@ -2894,6 +2906,21 @@
2894
2906
  }
2895
2907
  }
2896
2908
  },
2909
+ {
2910
+ "name": "theme/danger/on-base",
2911
+ "cssVar": "--tui-theme-danger-on-base",
2912
+ "type": "COLOR",
2913
+ "values": {
2914
+ "Light": {
2915
+ "alias": "color/fg/on-accent"
2916
+ },
2917
+ "Dark": {
2918
+ "alias": "palette/gray/950",
2919
+ "collection": "TUI/Primitives",
2920
+ "hex": "#0c121f"
2921
+ }
2922
+ }
2923
+ },
2897
2924
  {
2898
2925
  "name": "theme/danger/soft",
2899
2926
  "cssVar": "--tui-theme-danger-soft",
@@ -3013,6 +3040,19 @@
3013
3040
  }
3014
3041
  }
3015
3042
  },
3043
+ {
3044
+ "name": "theme/info/on-base",
3045
+ "cssVar": "--tui-theme-info-on-base",
3046
+ "type": "COLOR",
3047
+ "values": {
3048
+ "Light": {
3049
+ "alias": "color/fg/on-accent"
3050
+ },
3051
+ "Dark": {
3052
+ "alias": "color/fg/on-accent"
3053
+ }
3054
+ }
3055
+ },
3016
3056
  {
3017
3057
  "name": "theme/info/soft",
3018
3058
  "cssVar": "--tui-theme-info-soft",
@@ -3132,6 +3172,19 @@
3132
3172
  }
3133
3173
  }
3134
3174
  },
3175
+ {
3176
+ "name": "theme/primary/on-base",
3177
+ "cssVar": "--tui-theme-primary-on-base",
3178
+ "type": "COLOR",
3179
+ "values": {
3180
+ "Light": {
3181
+ "alias": "color/fg/on-accent"
3182
+ },
3183
+ "Dark": {
3184
+ "alias": "color/fg/on-accent"
3185
+ }
3186
+ }
3187
+ },
3135
3188
  {
3136
3189
  "name": "theme/primary/soft",
3137
3190
  "cssVar": "--tui-theme-primary-soft",
@@ -3251,6 +3304,21 @@
3251
3304
  }
3252
3305
  }
3253
3306
  },
3307
+ {
3308
+ "name": "theme/secondary/on-base",
3309
+ "cssVar": "--tui-theme-secondary-on-base",
3310
+ "type": "COLOR",
3311
+ "values": {
3312
+ "Light": {
3313
+ "alias": "color/fg/on-accent"
3314
+ },
3315
+ "Dark": {
3316
+ "alias": "palette/gray/950",
3317
+ "collection": "TUI/Primitives",
3318
+ "hex": "#0c121f"
3319
+ }
3320
+ }
3321
+ },
3254
3322
  {
3255
3323
  "name": "theme/secondary/soft",
3256
3324
  "cssVar": "--tui-theme-secondary-soft",
@@ -3370,6 +3438,21 @@
3370
3438
  }
3371
3439
  }
3372
3440
  },
3441
+ {
3442
+ "name": "theme/success/on-base",
3443
+ "cssVar": "--tui-theme-success-on-base",
3444
+ "type": "COLOR",
3445
+ "values": {
3446
+ "Light": {
3447
+ "alias": "color/fg/on-accent"
3448
+ },
3449
+ "Dark": {
3450
+ "alias": "palette/gray/950",
3451
+ "collection": "TUI/Primitives",
3452
+ "hex": "#0c121f"
3453
+ }
3454
+ }
3455
+ },
3373
3456
  {
3374
3457
  "name": "theme/success/soft",
3375
3458
  "cssVar": "--tui-theme-success-soft",
@@ -3489,6 +3572,21 @@
3489
3572
  }
3490
3573
  }
3491
3574
  },
3575
+ {
3576
+ "name": "theme/warning/on-base",
3577
+ "cssVar": "--tui-theme-warning-on-base",
3578
+ "type": "COLOR",
3579
+ "values": {
3580
+ "Light": {
3581
+ "alias": "color/fg/on-accent"
3582
+ },
3583
+ "Dark": {
3584
+ "alias": "palette/gray/950",
3585
+ "collection": "TUI/Primitives",
3586
+ "hex": "#0c121f"
3587
+ }
3588
+ }
3589
+ },
3492
3590
  {
3493
3591
  "name": "theme/warning/soft",
3494
3592
  "cssVar": "--tui-theme-warning-soft",
package/icons/icons.svg CHANGED
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" data-tui-icon-sprite="all" data-tui-icon-sprite-version="0.2.40" aria-hidden="true" focusable="false" style="position:absolute;width:0;height:0;overflow:hidden">
1
+ <svg xmlns="http://www.w3.org/2000/svg" data-tui-icon-sprite="all" data-tui-icon-sprite-version="0.2.42" aria-hidden="true" focusable="false" style="position:absolute;width:0;height:0;overflow:hidden">
2
2
  <symbol id="tui-cred-badge-check" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M10.893 4.558a1.377 1.377 0 0 1 2.214 0c.381.515 1.068.7 1.656.444a1.377 1.377 0 0 1 1.917 1.106c.072.637.575 1.14 1.212 1.213a1.377 1.377 0 0 1 1.106 1.916 1.38 1.38 0 0 0 .444 1.656c.744.55.744 1.663 0 2.214a1.38 1.38 0 0 0-.444 1.656 1.377 1.377 0 0 1-1.106 1.917 1.38 1.38 0 0 0-1.212 1.212 1.377 1.377 0 0 1-1.917 1.106 1.38 1.38 0 0 0-1.656.444 1.377 1.377 0 0 1-2.214 0 1.38 1.38 0 0 0-1.656-.444 1.377 1.377 0 0 1-1.916-1.106 1.38 1.38 0 0 0-1.213-1.212 1.377 1.377 0 0 1-1.106-1.917 1.38 1.38 0 0 0-.444-1.656 1.377 1.377 0 0 1 0-2.214c.515-.381.7-1.068.444-1.656a1.377 1.377 0 0 1 1.106-1.916 1.38 1.38 0 0 0 1.213-1.213 1.377 1.377 0 0 1 1.916-1.106 1.38 1.38 0 0 0 1.656-.444m5.193 5.91a.75.75 0 0 0-1.172-.936l-3.531 4.414-1.914-1.532a.75.75 0 1 0-.937 1.172l3.085 2.468z" clip-rule="evenodd"/></symbol>
3
3
  <symbol id="tui-cred-badge-ribbon" viewBox="0 0 24 24"><path d="M11.032 3.488a1.205 1.205 0 0 1 1.936 0c.334.451.935.612 1.45.388a1.205 1.205 0 0 1 1.677.969c.063.557.503.997 1.06 1.06.805.092 1.291.935.969 1.678a1.204 1.204 0 0 0 .388 1.449c.65.481.65 1.455 0 1.936a1.205 1.205 0 0 0-.388 1.45 1.205 1.205 0 0 1-.969 1.677 1.204 1.204 0 0 0-1.06 1.06 1.205 1.205 0 0 1-1.678.969 1.205 1.205 0 0 0-1.449.388c-.481.65-1.455.65-1.936 0a1.204 1.204 0 0 0-1.45-.388 1.205 1.205 0 0 1-1.677-.969 1.205 1.205 0 0 0-1.06-1.06 1.205 1.205 0 0 1-.969-1.678 1.205 1.205 0 0 0-.388-1.449 1.205 1.205 0 0 1 0-1.936c.451-.334.612-.935.388-1.45a1.205 1.205 0 0 1 .969-1.677 1.205 1.205 0 0 0 1.06-1.06 1.205 1.205 0 0 1 1.678-.969 1.205 1.205 0 0 0 1.449-.388M8 17.482c.442.175.953.185 1.437-.025a.88.88 0 0 1 1.054.282 1.877 1.877 0 0 0 3.018 0 .88.88 0 0 1 1.054-.282c.484.21.995.2 1.437.025V21l-4-2.286L8 21z"/></symbol>
4
4
  <symbol id="tui-cred-badge" viewBox="0 0 24 24"><path d="M13.107 4.558a1.377 1.377 0 0 0-2.214 0c-.381.515-1.068.7-1.656.444a1.377 1.377 0 0 0-1.916 1.106 1.38 1.38 0 0 1-1.213 1.213 1.377 1.377 0 0 0-1.106 1.916 1.38 1.38 0 0 1-.444 1.656 1.377 1.377 0 0 0 0 2.214c.515.381.7 1.068.444 1.656a1.377 1.377 0 0 0 1.106 1.917c.637.072 1.14.575 1.213 1.212a1.377 1.377 0 0 0 1.916 1.106 1.38 1.38 0 0 1 1.656.444c.55.744 1.663.744 2.214 0a1.38 1.38 0 0 1 1.656-.444 1.377 1.377 0 0 0 1.917-1.106 1.38 1.38 0 0 1 1.212-1.212 1.377 1.377 0 0 0 1.106-1.917 1.38 1.38 0 0 1 .444-1.656 1.377 1.377 0 0 0 0-2.214 1.38 1.38 0 0 1-.444-1.656 1.377 1.377 0 0 0-1.106-1.916 1.38 1.38 0 0 1-1.212-1.213 1.377 1.377 0 0 0-1.917-1.106 1.38 1.38 0 0 1-1.656-.444"/></symbol>
@@ -1 +1 @@
1
- export const SPRITE_VERSION = '0.2.40';
1
+ export const SPRITE_VERSION = '0.2.42';
package/icons/sprite.php CHANGED
@@ -21,7 +21,7 @@
21
21
  */
22
22
 
23
23
  // Replaced with the package version at build time.
24
- $GLOBALS['tangible_ui_icon_sprite_copies'][__DIR__] = '0.2.40';
24
+ $GLOBALS['tangible_ui_icon_sprite_copies'][__DIR__] = '0.2.42';
25
25
 
26
26
  if (!function_exists('tangible_ui_print_icon_sprite')) {
27
27
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tangible/ui",
3
- "version": "0.2.40",
4
- "description": "Tangible Design System",
3
+ "version": "0.2.42",
4
+ "description": "React design system for Tangible's products: standalone React apps and WordPress plugins. Components, CSS custom property tokens, cascade layers.",
5
5
  "type": "module",
6
6
  "main": "./components/index.js",
7
7
  "module": "./components/index.js",
@@ -50,6 +50,10 @@
50
50
  "import": "./utils/color/gradient.js",
51
51
  "types": "./utils/color/gradient.d.ts"
52
52
  },
53
+ "./utils/color/theme": {
54
+ "import": "./utils/color/theme.js",
55
+ "types": "./utils/color/theme.d.ts"
56
+ },
53
57
  "./utils/color-scheme": {
54
58
  "import": "./utils/color-scheme.js",
55
59
  "types": "./utils/color-scheme.d.ts"
@@ -116,6 +120,10 @@
116
120
  "import": "./components/Combobox/index.js",
117
121
  "types": "./components/Combobox/index.d.ts"
118
122
  },
123
+ "./components/CommandPalette": {
124
+ "import": "./components/CommandPalette/index.js",
125
+ "types": "./components/CommandPalette/index.d.ts"
126
+ },
119
127
  "./components/ContentIndicator": {
120
128
  "import": "./components/ContentIndicator/index.js",
121
129
  "types": "./components/ContentIndicator/index.d.ts"
@@ -144,6 +152,10 @@
144
152
  "import": "./components/IconButton/index.js",
145
153
  "types": "./components/IconButton/index.d.ts"
146
154
  },
155
+ "./components/IconTile": {
156
+ "import": "./components/IconTile/index.js",
157
+ "types": "./components/IconTile/index.d.ts"
158
+ },
147
159
  "./components/Modal": {
148
160
  "import": "./components/Modal/index.js",
149
161
  "types": "./components/Modal/index.d.ts"
@@ -273,14 +285,20 @@
273
285
  "react": ">=18.0.0",
274
286
  "react-dom": ">=18.0.0"
275
287
  },
276
- "homepage": "https://github.com/tangibleinc/tangible-ui",
288
+ "homepage": "https://design.tangible.one",
277
289
  "repository": {
278
290
  "url": "git+ssh://git@github.com/tangibleinc/tangible-ui.git"
279
291
  },
280
292
  "author": "Team Tangible",
281
293
  "license": "MIT",
282
294
  "keywords": [
283
- "design system"
295
+ "react",
296
+ "design system",
297
+ "design-system",
298
+ "components",
299
+ "css-custom-properties",
300
+ "accessibility",
301
+ "wordpress"
284
302
  ],
285
303
  "files": [
286
304
  "components",
@@ -32,7 +32,7 @@ there is no CSS at all.
32
32
 
33
33
  ## Where the API lives
34
34
 
35
- The docs are also fetchable as plain markdown, no JS needed: <https://storybook-tangible-ui.pages.dev/llms.txt> indexes
35
+ The docs are also fetchable as plain markdown, no JS needed: <https://design.tangible.one/llms.txt> indexes
36
36
  every guide and one page per component (props, defaults, API tokens); `llms-full.txt` is all of it in one file. Prefer it over
37
37
  the Storybook UI when you can only fetch URLs.
38
38
 
@@ -73,7 +73,7 @@ the filter drops load-bearing API:
73
73
 
74
74
  **Manifest silence is not absence.** What it *is* good for: `cssTokens` (43 of 46 components list
75
75
  their full `--tui-<component>-*` API — the only shipped listing, since consumers have no SCSS) and
76
- `story` (all 46, pointing into <https://storybook-tangible-ui.pages.dev>).
76
+ `story` (all 46, pointing into <https://design.tangible.one>).
77
77
 
78
78
  ### Types from the barrel
79
79
 
@@ -398,7 +398,7 @@ Oct 24 2026.
398
398
  | ColorField | `trigger`, `dynamic`, `modes`, `solidTab`, `gradientTab` (its popover takes ColorPicker's) |
399
399
  | ColorPicker | `group`, `area`, `hue`, `alpha`, `format`, `value`, `copy`, `copied`, `variable`, `formats`, `channels`, channel names, value texts |
400
400
  | Combobox | `clear` |
401
- | DataTable / BulkActionsBar | `selectAll`, `selectRow`, `pageStatus`, `sortBy`, `sorted` / `selected`, `actions` |
401
+ | DataTable / BulkActionsBar | `selectAll`, `selectRow`, `pageStatus`, `sortBy`, `sorted`, `bulkSelected`, `bulkActions`, `bulkClear` (the built-in bulk bar, 0.2.42+) / `selected`, `actions` |
402
402
  | DatePicker | `title`, `titleWithTime`, `now`, `close`, `placeholder`, `timeSection`, `dateSection`, `month`, `dayOfMonth`, `year`, `hour`, `minute`, `am`, `pm`, `meridiem`, `trigger`, `triggerEmpty` |
403
403
  | DateRangePicker | `from`, `to`, `apply`, `cancel`, `placeholder`, `presets`, `trigger`, `triggerEmpty`, `openEnd` |
404
404
  | Field | `required` (the visually hidden "required" after the label) |
@@ -469,12 +469,26 @@ Colour maths ships as public utils: `@tangible/ui/utils/color` (`parseColor`, `f
469
469
  `>= 4.5` check fails closed). Use them for user-selected colours and theme tooling (deriving or
470
470
  validating a ladder), not to pick a component's own theming at runtime.
471
471
 
472
+ To theme from a brand colour, `@tangible/ui/utils/color/theme` derives every colour token, in
473
+ both modes, from a primary or from `{ primary, secondary, neutral }` (secondary chrome gets its own
474
+ ladder; neutral sets the temperature of the greys, and `vibrance` from 0 to 1 lets it colour the page outright): `deriveThemeCss(source)` returns a stylesheet (light on `.tui-interface`, dark
475
+ and `auto` one specificity step above TUI's own dark block, nested interfaces included), and
476
+ `deriveThemeTokens(source, 'light' | 'dark')` returns the `--tui-*` map as hex. Each step is solved
477
+ for its WCAG contrast, so text, primary fills and control borders clear AA on every surface
478
+ (`bg`, `-surface`, `-muted`, `-elevated`) for any hue. Only each colour's hue and chroma are used.
479
+ In dark mode the accent fills are light, so they pair with dark text through
480
+ `--tui-theme-{primary,secondary}-on-base`.
481
+
472
482
  Useful primitives:
473
483
 
474
484
  - Surfaces / text: `--tui-color-bg`, `-bg-surface`, `-bg-elevated`, `-bg-muted`, `-bg-inverted`,
475
485
  `--tui-color-fg`, `-fg-secondary`, `-fg-muted`, `-fg-on-accent`, `--tui-color-border`,
476
486
  `--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`.
477
487
  - Themes: `--tui-theme-{primary,secondary,success,warning,danger,info}-{subtlest,subtle,soft,base,strong,stronger,strongest}`.
488
+ Text on a theme's `base` fill: `--tui-theme-{name}-on-base` (white in light; dark text on
489
+ secondary/success/warning/danger in dark, where white fails AA). Prefer it to `-fg-on-accent`.
490
+ If you re-point a theme's `-base` fill, re-point its `-on-base` with it: the dark values are
491
+ fixed, so overriding `--tui-color-fg-on-accent` only moves primary and info.
478
492
  The ladder is **contrast-based** — "stronger" always means more contrast against the current
479
493
  background, so a single choice reads correctly in both light and dark mode.
480
494
  - Control heights, shared by every form control *and* Button / IconButton / SegmentedControl /