@tangible/ui 0.0.5 → 0.0.7

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.
@@ -57,7 +57,7 @@
57
57
  select
58
58
  ) {
59
59
  // Internal tokens — read component API with fallback to primitives
60
- --_bg: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg));
60
+ --_bg: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface));
61
61
  --_fg: var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg-muted));
62
62
  --_border: var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border));
63
63
  --_border-focus: var(--#{sys.$prefix}input-border-focus, var(--#{sys.$prefix}theme-primary-base));
@@ -215,7 +215,7 @@
215
215
  // ---------------------------------------------------------------------------
216
216
  :where(.#{sys.$prefix}interface) input[type="file"] {
217
217
  // Internal tokens
218
- --_bg: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg));
218
+ --_bg: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface));
219
219
  --_fg: var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg-muted));
220
220
  --_border: var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border));
221
221
  --_radius: var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md));
package/styles/index.scss CHANGED
@@ -35,6 +35,9 @@
35
35
 
36
36
  @include sys.emit-scale-vars(sys.$prefix, sys.$radius, sys.$font);
37
37
 
38
+ --#{sys.$prefix}typography-weight-normal: 400;
39
+ --#{sys.$prefix}typography-weight-bold: 700;
40
+
38
41
  --#{sys.$prefix}typography-size: var(--#{sys.$prefix}font-size-base);
39
42
  --#{sys.$prefix}typography-line-height: 1.4;
40
43
  --#{sys.$prefix}typography-font-family: inherit;
@@ -82,6 +85,17 @@
82
85
  text-transform: none;
83
86
  letter-spacing: normal;
84
87
  }
88
+
89
+ // Form input reset — WP and other hosts apply box-shadow on :focus
90
+ // that competes with our outline-based focus ring.
91
+ input,
92
+ textarea,
93
+ select {
94
+ &:focus,
95
+ &:focus-visible {
96
+ box-shadow: none;
97
+ }
98
+ }
85
99
  }
86
100
  }
87
101
 
@@ -21,6 +21,9 @@
21
21
  // --tui-control-height-sm: 32px;
22
22
  // --tui-control-height-md: 36px;
23
23
  // --tui-control-height-lg: 44px;
24
+ // --tui-control-font-size-sm: 13px; /* optional: decouple font from size tier */
25
+ // --tui-control-font-size-md: 13px;
26
+ // --tui-control-font-size-lg: 13px;
24
27
  // }
25
28
  //
26
29
  // Usage:
@@ -29,7 +32,7 @@
29
32
  // =============================================================================
30
33
 
31
34
  @mixin control-sizing($prefix) {
32
- --_fs: var(--#{$prefix}typography-size-md);
35
+ --_fs: var(--#{$prefix}control-font-size-md, var(--#{$prefix}typography-size-md));
33
36
  --_py: var(--#{$prefix}spacing-xxs);
34
37
  --_height: calc(2em + 2 * var(--_py));
35
38
 
@@ -38,12 +41,12 @@
38
41
  min-height: var(--#{$prefix}control-height-md, var(--_height));
39
42
 
40
43
  &.is-size-sm {
41
- --_fs: var(--#{$prefix}typography-size-sm);
44
+ --_fs: var(--#{$prefix}control-font-size-sm, var(--#{$prefix}typography-size-sm));
42
45
  min-height: var(--#{$prefix}control-height-sm, var(--_height));
43
46
  }
44
47
 
45
48
  &.is-size-lg {
46
- --_fs: var(--#{$prefix}typography-size-lg);
49
+ --_fs: var(--#{$prefix}control-font-size-lg, var(--#{$prefix}typography-size-lg));
47
50
  min-height: var(--#{$prefix}control-height-lg, var(--_height));
48
51
  }
49
52
  }
@@ -209,19 +209,29 @@
209
209
  .is-place-center { place-items: center; }
210
210
  .is-place-end { place-items: end; }
211
211
 
212
- // Lists as layout containers
213
- ul.#{sys.$prefix}grid,
212
+ // Lists as layout containers — strip list chrome but leave margin alone
213
+ // so spacing utilities (tui-margin-block-end-lg etc.) can still win.
214
+ ul.#{sys.$prefix}grid,
214
215
  ul.#{sys.$prefix}stack,
215
216
  ul.#{sys.$prefix}inline-flex,
216
- ul.#{sys.$prefix}flex { list-style: none !important; padding: 0 !important; margin: 0 !important; }
217
+ ul.#{sys.$prefix}flex { list-style: none !important; padding-inline-start: 0 !important; }
217
218
 
218
- ul.#{sys.$prefix}grid > li,
219
+ ul.#{sys.$prefix}grid > li,
219
220
  ul.#{sys.$prefix}stack > li,
220
221
  ul.#{sys.$prefix}inline-flex > li,
221
222
  ul.#{sys.$prefix}flex > li {
222
223
  list-style: none !important;
223
224
  }
224
225
 
226
+ // Opt-in full list reset — use when you want zero margin/padding on a list
227
+ .#{sys.$prefix}list-reset {
228
+ list-style: none !important;
229
+ padding: 0 !important;
230
+ margin: 0 !important;
231
+
232
+ > li { list-style: none !important; }
233
+ }
234
+
225
235
  // ---------------------------
226
236
  // Density utilities (aliases)
227
237
  // Applies to BOTH grid and flex via shared custom props.
package/tui-manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.0.5",
3
- "generated": "2026-03-10T01:28:11.655Z",
2
+ "version": "0.0.7",
3
+ "generated": "2026-03-14T17:17:34.578Z",
4
4
  "components": {
5
5
  "Accordion": {
6
6
  "props": {
@@ -428,6 +428,7 @@
428
428
  "cssTokens": [
429
429
  "--tui-card-bg",
430
430
  "--tui-card-border",
431
+ "--tui-card-border-width",
431
432
  "--tui-card-border-interact",
432
433
  "--tui-card-radius",
433
434
  "--tui-card-shadow",
@@ -829,6 +830,12 @@
829
830
  "defaultValue": "true",
830
831
  "description": "Whether to open the listbox when the input receives focus."
831
832
  },
833
+ "clearable": {
834
+ "type": "boolean",
835
+ "required": false,
836
+ "defaultValue": "true",
837
+ "description": "Whether to show the clear button when a value is present."
838
+ },
832
839
  "inputClassName": {
833
840
  "type": "string",
834
841
  "required": false,
@@ -845,6 +852,7 @@
845
852
  "--tui-combobox-content-border",
846
853
  "--tui-combobox-content-shadow",
847
854
  "--tui-combobox-content-radius",
855
+ "--tui-combobox-option-radius",
848
856
  "--tui-combobox-option-bg-hover",
849
857
  "--tui-combobox-option-bg-selected"
850
858
  ],
@@ -1206,6 +1214,11 @@
1206
1214
  "cssTokens": [
1207
1215
  "--tui-modal-z",
1208
1216
  "--tui-modal-max",
1217
+ "--tui-modal-spacing",
1218
+ "--tui-modal-offset-top",
1219
+ "--tui-modal-offset-bottom",
1220
+ "--tui-modal-offset-start",
1221
+ "--tui-modal-offset-end",
1209
1222
  "--tui-modal-backdrop",
1210
1223
  "--tui-modal-bg",
1211
1224
  "--tui-modal-border",
@@ -1399,6 +1412,7 @@
1399
1412
  "--tui-multiselect-content-border",
1400
1413
  "--tui-multiselect-content-shadow",
1401
1414
  "--tui-multiselect-content-radius",
1415
+ "--tui-multiselect-option-radius",
1402
1416
  "--tui-multiselect-option-bg-hover",
1403
1417
  "--tui-multiselect-option-bg-selected",
1404
1418
  "--tui-multiselect-chip-bg",
@@ -1817,6 +1831,11 @@
1817
1831
  "type": "ReactNode",
1818
1832
  "required": false
1819
1833
  },
1834
+ "description": {
1835
+ "type": "string",
1836
+ "required": false,
1837
+ "description": "Description text displayed below the label."
1838
+ },
1820
1839
  "disabled": {
1821
1840
  "type": "boolean",
1822
1841
  "required": false,
@@ -1828,7 +1847,15 @@
1828
1847
  }
1829
1848
  },
1830
1849
  "cssTokens": [
1831
- "--tui-radio-accent"
1850
+ "--tui-radio-accent",
1851
+ "--tui-radio-size",
1852
+ "--tui-radio-border",
1853
+ "--tui-radio-bg",
1854
+ "--tui-radio-gap",
1855
+ "--tui-radio-font-size",
1856
+ "--tui-radio-label-color",
1857
+ "--tui-radio-description-color",
1858
+ "--tui-radio-group-gap"
1832
1859
  ],
1833
1860
  "story": {
1834
1861
  "title": "Forms/RadioGroup",
@@ -2099,6 +2126,7 @@
2099
2126
  "--tui-select-content-border",
2100
2127
  "--tui-select-content-shadow",
2101
2128
  "--tui-select-content-radius",
2129
+ "--tui-select-option-radius",
2102
2130
  "--tui-select-option-bg-hover",
2103
2131
  "--tui-select-option-bg-selected"
2104
2132
  ],
@@ -2323,7 +2351,14 @@
2323
2351
  },
2324
2352
  "cssTokens": [
2325
2353
  "--tui-switch-accent",
2326
- "--tui-switch-track-off"
2354
+ "--tui-switch-bg",
2355
+ "--tui-switch-border",
2356
+ "--tui-switch-thumb-bg",
2357
+ "--tui-switch-track-height",
2358
+ "--tui-switch-size",
2359
+ "--tui-switch-label-color",
2360
+ "--tui-switch-font-size",
2361
+ "--tui-switch-gap"
2327
2362
  ],
2328
2363
  "story": {
2329
2364
  "title": "Forms/Switch",
@@ -52,11 +52,15 @@ export function useRovingGroup({ selectedValue, onSelect, disabled = false, loop
52
52
  const items = getOrderedItems().filter((item) => !item.disabled && !disabled);
53
53
  if (items.length === 0)
54
54
  return;
55
- let currentIndex = selectedValue !== undefined
56
- ? items.findIndex((item) => toKey(item.value) === toKey(selectedValue))
57
- : -1;
58
- if (currentIndex === -1)
59
- currentIndex = 0;
55
+ // Only handle keys when a registered item has focus — don't hijack
56
+ // arrow keys from nested interactive controls (e.g. number inputs).
57
+ const target = event.target;
58
+ if (!items.some((item) => item.element === target))
59
+ return;
60
+ // Navigate from the focused item, not the selected value — these can
61
+ // differ when there's no selection or when focus moved without selecting.
62
+ const focusedIndex = items.findIndex((item) => item.element === target);
63
+ const currentIndex = focusedIndex !== -1 ? focusedIndex : 0;
60
64
  // Determine which keys map to next/prev
61
65
  let nextKeys;
62
66
  let prevKeys;
@@ -107,7 +111,6 @@ export function useRovingGroup({ selectedValue, onSelect, disabled = false, loop
107
111
  }, [
108
112
  getOrderedItems,
109
113
  disabled,
110
- selectedValue,
111
114
  orientationKeyboard,
112
115
  orientation,
113
116
  loop,