@tangible/ui 0.0.7 → 0.0.8

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 (91) hide show
  1. package/components/Accordion/Accordion.js +11 -3
  2. package/components/Avatar/Avatar.js +4 -3
  3. package/components/Avatar/AvatarGroup.js +7 -5
  4. package/components/Avatar/index.d.ts +2 -2
  5. package/components/Avatar/index.js +1 -1
  6. package/components/Avatar/types.d.ts +27 -0
  7. package/components/Avatar/types.js +8 -0
  8. package/components/Button/Button.js +4 -2
  9. package/components/Button/index.d.ts +2 -1
  10. package/components/Button/index.js +1 -0
  11. package/components/Button/types.d.ts +10 -0
  12. package/components/Button/types.js +3 -1
  13. package/components/Checkbox/Checkbox.js +46 -11
  14. package/components/Checkbox/types.d.ts +9 -0
  15. package/components/Combobox/Combobox.d.ts +1 -1
  16. package/components/Combobox/Combobox.js +28 -7
  17. package/components/Combobox/index.d.ts +2 -1
  18. package/components/Combobox/index.js +1 -0
  19. package/components/Combobox/types.d.ts +9 -0
  20. package/components/Combobox/types.js +3 -1
  21. package/components/Dropdown/Dropdown.js +16 -4
  22. package/components/Field/Field.d.ts +4 -1
  23. package/components/Field/Field.js +35 -14
  24. package/components/Field/FieldContext.d.ts +16 -0
  25. package/components/Field/FieldContext.js +3 -0
  26. package/components/Field/index.d.ts +2 -1
  27. package/components/Field/index.js +1 -0
  28. package/components/MoveHandle/MoveHandle.js +1 -1
  29. package/components/MoveHandle/types.d.ts +1 -1
  30. package/components/MultiSelect/MultiSelect.d.ts +1 -1
  31. package/components/MultiSelect/MultiSelect.js +37 -19
  32. package/components/MultiSelect/index.d.ts +2 -1
  33. package/components/MultiSelect/index.js +1 -0
  34. package/components/MultiSelect/types.d.ts +34 -0
  35. package/components/MultiSelect/types.js +10 -0
  36. package/components/Pager/Pager.d.ts +7 -1
  37. package/components/Pager/Pager.js +7 -5
  38. package/components/Pager/index.d.ts +2 -0
  39. package/components/Pager/index.js +1 -0
  40. package/components/Pager/types.d.ts +37 -0
  41. package/components/Pager/types.js +12 -0
  42. package/components/Rating/Rating.d.ts +2 -32
  43. package/components/Rating/Rating.js +5 -3
  44. package/components/Rating/index.d.ts +2 -1
  45. package/components/Rating/index.js +1 -0
  46. package/components/Rating/types.d.ts +41 -0
  47. package/components/Rating/types.js +4 -0
  48. package/components/SegmentedControl/SegmentedControl.js +6 -5
  49. package/components/SegmentedControl/types.d.ts +17 -5
  50. package/components/Select/Select.d.ts +1 -0
  51. package/components/Select/Select.js +109 -77
  52. package/components/Select/SelectContext.d.ts +4 -16
  53. package/components/Select/SelectContext.js +5 -35
  54. package/components/Select/types.d.ts +19 -19
  55. package/components/Sidebar/Sidebar.js +25 -20
  56. package/components/StepIndicator/StepIndicator.js +11 -8
  57. package/components/StepIndicator/index.d.ts +2 -1
  58. package/components/StepIndicator/index.js +1 -0
  59. package/components/StepIndicator/types.d.ts +18 -0
  60. package/components/StepIndicator/types.js +7 -1
  61. package/components/Table/BulkActionsBar.d.ts +4 -1
  62. package/components/Table/BulkActionsBar.js +5 -4
  63. package/components/Table/DataTable.d.ts +4 -1
  64. package/components/Table/DataTable.js +10 -8
  65. package/components/Table/index.d.ts +3 -0
  66. package/components/Table/index.js +2 -0
  67. package/components/Table/types.d.ts +20 -0
  68. package/components/Table/types.js +11 -0
  69. package/components/Tabs/Tabs.js +11 -4
  70. package/components/TextInput/TextInput.js +2 -1
  71. package/components/TextInput/types.d.ts +7 -1
  72. package/components/Textarea/Textarea.js +3 -2
  73. package/components/Textarea/types.d.ts +6 -1
  74. package/icons/icons.svg +29 -15
  75. package/icons/lms/index.d.ts +8 -0
  76. package/icons/lms/index.js +48 -4
  77. package/icons/manifest.json +112 -0
  78. package/icons/player/index.js +9 -9
  79. package/icons/registry.d.ts +28 -0
  80. package/icons/registry.js +14 -0
  81. package/icons/system/index.d.ts +20 -0
  82. package/icons/system/index.js +112 -2
  83. package/package.json +1 -1
  84. package/styles/all.css +1 -1
  85. package/styles/all.expanded.css +266 -59
  86. package/styles/all.expanded.unlayered.css +266 -59
  87. package/styles/all.unlayered.css +1 -1
  88. package/styles/components/input/index.scss +29 -7
  89. package/styles/system/_constants.scss +1 -1
  90. package/styles/system/_tokens.scss +1 -0
  91. package/tui-manifest.json +73 -44
@@ -13,6 +13,8 @@
13
13
  // --tui-input-border-focus Focus state border color
14
14
  // --tui-input-border-invalid Invalid state border color
15
15
  // --tui-input-radius Border radius
16
+ // --tui-input-fg-placeholder Placeholder text color
17
+ // --tui-input-bg-readonly Read-only background color
16
18
  // --tui-input-accent Accent color (checkboxes, toggles)
17
19
  //
18
20
  // To override from consuming code:
@@ -58,7 +60,7 @@
58
60
  ) {
59
61
  // Internal tokens — read component API with fallback to primitives
60
62
  --_bg: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface));
61
- --_fg: var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg-muted));
63
+ --_fg: var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg));
62
64
  --_border: var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border));
63
65
  --_border-focus: var(--#{sys.$prefix}input-border-focus, var(--#{sys.$prefix}theme-primary-base));
64
66
  --_border-invalid: var(--#{sys.$prefix}input-border-invalid, var(--#{sys.$prefix}theme-danger-base));
@@ -79,12 +81,22 @@
79
81
  transition-timing-function: var(--#{sys.$prefix}motion-timing);
80
82
  transition-property: border-color, color, background-color;
81
83
 
84
+ &::placeholder {
85
+ color: var(--#{sys.$prefix}input-fg-placeholder, var(--#{sys.$prefix}color-fg-muted));
86
+ opacity: 1; // Normalize Firefox which applies its own opacity reduction
87
+ }
88
+
82
89
  &:focus-visible {
83
90
  --_border: var(--_border-focus);
84
91
  outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
85
92
  outline-offset: var(--#{sys.$prefix}focus-ring-offset);
86
93
  }
87
94
 
95
+ &[readonly] {
96
+ background-color: var(--#{sys.$prefix}input-bg-readonly, var(--#{sys.$prefix}color-bg));
97
+ cursor: default;
98
+ }
99
+
88
100
  &[disabled] {
89
101
  opacity: var(--#{sys.$prefix}opacity-disabled);
90
102
  cursor: not-allowed;
@@ -110,26 +122,33 @@
110
122
  // Inline choice (radio/checkbox with label)
111
123
  // ---------------------------------------------------------------------------
112
124
  :where(.#{sys.$prefix}interface) .#{sys.$prefix}inline-choice {
113
- // Internal tokens
114
- --_accent: var(--#{sys.$prefix}input-accent, var(--#{sys.$prefix}theme-primary-base));
115
-
116
125
  display: flex;
117
126
  align-items: center;
118
127
  gap: var(--#{sys.$prefix}spacing-xs);
128
+ cursor: pointer;
129
+
130
+ // Radio: native appearance with accent-color
131
+ input[type="radio"] {
132
+ --_accent: var(--#{sys.$prefix}input-accent, var(--#{sys.$prefix}theme-primary-base));
119
133
 
120
- input[type="radio"],
121
- input[type="checkbox"] {
122
134
  font-size: 1.15em;
123
135
  width: 1em;
124
136
  height: 1em;
125
137
  flex: 0 0 1em;
126
138
  margin: 0;
127
139
 
140
+ &:focus-visible {
141
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
142
+ outline-offset: var(--#{sys.$prefix}focus-ring-offset);
143
+ }
144
+
128
145
  &:checked {
129
146
  accent-color: var(--_accent);
130
147
  }
131
148
  }
132
149
 
150
+ // Checkbox: fully handled by Checkbox/styles.scss (appearance, sizing, states).
151
+
133
152
  label {
134
153
  font-weight: unset;
135
154
  line-height: 1.25em;
@@ -140,6 +159,9 @@
140
159
  // ---------------------------------------------------------------------------
141
160
  // Toggle switch
142
161
  // ---------------------------------------------------------------------------
162
+ // The base checkbox rule (Checkbox/styles.scss) applies appearance: none and
163
+ // visual properties to ALL checkboxes. The toggle's checkbox is visually hidden
164
+ // via clip/position — those properties are inert on a clipped element.
143
165
  :where(.#{sys.$prefix}interface) .#{sys.$prefix}toggle {
144
166
  // Internal tokens
145
167
  --_accent: var(--#{sys.$prefix}input-accent, var(--#{sys.$prefix}theme-primary-base));
@@ -216,7 +238,7 @@
216
238
  :where(.#{sys.$prefix}interface) input[type="file"] {
217
239
  // Internal tokens
218
240
  --_bg: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface));
219
- --_fg: var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg-muted));
241
+ --_fg: var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg));
220
242
  --_border: var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border));
221
243
  --_radius: var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md));
222
244
 
@@ -7,6 +7,6 @@
7
7
 
8
8
  $prefix: tui- !default;
9
9
  $container-name: tuiContainer !default;
10
- $radius: (xs: 2px, sm: 4px, md: 8px, lg: 12px) !default;
10
+ $radius: (xs: 2px, sm: 4px, md: 8px, lg: 12px, full: 9999px) !default;
11
11
  $space : (1: .25rem, 2: .5rem, 3: .75rem, 4: 1rem) !default;
12
12
  $font : (base-size: 16px, line: 1.5) !default;
@@ -48,6 +48,7 @@ $brand: 'blue';
48
48
 
49
49
  /* Font Weight */
50
50
  --#{$prefix}font-weight-medium: 500;
51
+ --#{$prefix}font-weight-semibold: 600;
51
52
 
52
53
  /* Border */
53
54
  --#{$prefix}border-width: 1px;
package/tui-manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.0.7",
3
- "generated": "2026-03-14T17:17:34.578Z",
2
+ "version": "0.0.8",
3
+ "generated": "2026-03-17T20:49:24.034Z",
4
4
  "components": {
5
5
  "Accordion": {
6
6
  "props": {
@@ -140,6 +140,11 @@
140
140
  "required": false,
141
141
  "description": "When true, wraps the avatar with a Tooltip showing the `name`.\nHelps sighted users discover the user's name on hover/focus.\nHas no effect when `name` is not provided."
142
142
  },
143
+ "labels": {
144
+ "type": "AvatarLabels",
145
+ "required": false,
146
+ "description": "Overridable strings for i18n."
147
+ },
143
148
  "className": {
144
149
  "type": "string",
145
150
  "required": false,
@@ -230,6 +235,11 @@
230
235
  "defaultValue": "`${label}, loading` (English)",
231
236
  "description": "Accessible label override during loading state. For i18n support.\nWhen loading, this replaces the auto-composed label."
232
237
  },
238
+ "labels": {
239
+ "type": "ButtonLabels",
240
+ "required": false,
241
+ "description": "Override default English strings for i18n.\nCovers strings not already handled by existing props (e.g. `loadingLabel`)."
242
+ },
233
243
  "target": {
234
244
  "type": "HTMLAttributeAnchorTarget",
235
245
  "required": false,
@@ -521,17 +531,26 @@
521
531
  },
522
532
  "label": {
523
533
  "type": "ReactNode",
524
- "required": false
534
+ "required": false,
535
+ "description": "When provided, renders the checkbox inside a `<label>` with this content.\nWhen omitted, renders a bare `<input>` — you must provide an accessible name\nvia `aria-label`, `aria-labelledby`, or a wrapping `Field.Control` + `Field.Label`.\n@remarks When used inside `Field.Control`, `Field.Label` injects `aria-labelledby`\nonto the input. If both `label` and `Field.Label` are present, AT may concatenate\nboth names. Prefer one labelling mechanism — either `label` prop or `Field.Label`."
525
536
  }
526
537
  },
527
538
  "cssTokens": [
528
- "--tui-input-accent"
539
+ "--tui-checkbox-accent",
540
+ "--tui-checkbox-border",
541
+ "--tui-checkbox-border-invalid",
542
+ "--tui-checkbox-radius",
543
+ "--tui-checkbox-bg",
544
+ "--tui-checkbox-size",
545
+ "--tui-checkbox-gap",
546
+ "--tui-checkbox-label-color"
529
547
  ],
530
548
  "story": {
531
549
  "title": "Forms/Checkbox",
532
550
  "tags": [
533
551
  "autodocs",
534
- "lms"
552
+ "lms",
553
+ "a11y"
535
554
  ]
536
555
  },
537
556
  "subcomponents": null,
@@ -840,6 +859,11 @@
840
859
  "type": "string",
841
860
  "required": false,
842
861
  "description": "Class name applied directly to the `<input>` element.\nUse for utilities like `tui-input-reset` that must target the input itself."
862
+ },
863
+ "labels": {
864
+ "type": "ComboboxLabels",
865
+ "required": false,
866
+ "description": "Override default English strings for i18n."
843
867
  }
844
868
  },
845
869
  "cssTokens": [
@@ -859,6 +883,7 @@
859
883
  "story": {
860
884
  "title": "Forms/Combobox",
861
885
  "tags": [
886
+ "stable",
862
887
  "lms"
863
888
  ]
864
889
  },
@@ -968,33 +993,7 @@
968
993
  "notFor": null
969
994
  },
970
995
  "Field": {
971
- "props": {
972
- "error": {
973
- "type": "boolean",
974
- "required": false,
975
- "description": "Whether the field has an error state"
976
- },
977
- "required": {
978
- "type": "boolean",
979
- "required": false,
980
- "description": "Whether the field is required"
981
- },
982
- "disabled": {
983
- "type": "boolean",
984
- "required": false,
985
- "description": "Whether the field is disabled"
986
- },
987
- "inline": {
988
- "type": "boolean",
989
- "required": false,
990
- "description": "Inline layout: label and control on same row"
991
- },
992
- "className": {
993
- "type": "string",
994
- "required": false,
995
- "description": "Additional class name for the field wrapper"
996
- }
997
- },
996
+ "props": {},
998
997
  "cssTokens": [
999
998
  "--tui-field-gap",
1000
999
  "--tui-field-label-fg",
@@ -1285,7 +1284,7 @@
1285
1284
  "type": "\"sm\" | \"md\"",
1286
1285
  "required": false,
1287
1286
  "defaultValue": "md",
1288
- "description": "Component scale. sm = 32px, md = 40px. Ignored when mode is 'handle'."
1287
+ "description": "Component scale. Full mode: sm = 32px, md = 40px. Handle mode: sm = 24px, md = 32px."
1289
1288
  },
1290
1289
  "index": {
1291
1290
  "type": "number",
@@ -1396,6 +1395,11 @@
1396
1395
  "required": false,
1397
1396
  "description": "Maximum number of selections allowed.\nWhen reached, unselected options become disabled."
1398
1397
  },
1398
+ "labels": {
1399
+ "type": "MultiSelectLabels",
1400
+ "required": false,
1401
+ "description": "Override internal display and screen reader strings for i18n.\nAll keys are optional — omitted keys use English defaults."
1402
+ },
1399
1403
  "id": {
1400
1404
  "type": "string",
1401
1405
  "required": false,
@@ -1422,6 +1426,7 @@
1422
1426
  "title": "Forms/MultiSelect",
1423
1427
  "tags": [
1424
1428
  "autodocs",
1429
+ "stable",
1425
1430
  "lms"
1426
1431
  ]
1427
1432
  },
@@ -1698,6 +1703,11 @@
1698
1703
  "type": "string",
1699
1704
  "required": false,
1700
1705
  "description": "Additional class name"
1706
+ },
1707
+ "labels": {
1708
+ "type": "PagerLabels",
1709
+ "required": false,
1710
+ "description": "Overridable label strings for i18n.\nAll keys are optional — defaults are English."
1701
1711
  }
1702
1712
  },
1703
1713
  "cssTokens": [
@@ -1930,6 +1940,11 @@
1930
1940
  "type": "string",
1931
1941
  "required": false,
1932
1942
  "description": "Gap override (e.g. '0.25rem') – otherwise uses density utilities"
1943
+ },
1944
+ "labels": {
1945
+ "type": "RatingLabels",
1946
+ "required": false,
1947
+ "description": "Override default English strings for i18n."
1933
1948
  }
1934
1949
  },
1935
1950
  "cssTokens": [
@@ -1970,7 +1985,7 @@
1970
1985
  "description": "Visual style"
1971
1986
  },
1972
1987
  "size": {
1973
- "type": "\"sm\" | \"md\"",
1988
+ "type": "\"sm\" | \"md\" | \"lg\"",
1974
1989
  "required": false,
1975
1990
  "description": "Size scale"
1976
1991
  },
@@ -1984,6 +1999,11 @@
1984
1999
  "required": false,
1985
2000
  "description": "Whether arrow keys wrap around"
1986
2001
  },
2002
+ "wrap": {
2003
+ "type": "boolean",
2004
+ "required": false,
2005
+ "description": "Allow items to wrap to multiple lines (default: false)"
2006
+ },
1987
2007
  "disabled": {
1988
2008
  "type": "boolean",
1989
2009
  "required": false,
@@ -2005,13 +2025,16 @@
2005
2025
  "--tui-segmented-item-radius",
2006
2026
  "--tui-segmented-item-fg",
2007
2027
  "--tui-segmented-item-bg-active",
2008
- "--tui-segmented-item-fg-active"
2028
+ "--tui-segmented-item-fg-active",
2029
+ "--tui-segmented-indicator",
2030
+ "--tui-segmented-indicator-size"
2009
2031
  ],
2010
2032
  "story": {
2011
2033
  "title": "Components/SegmentedControl",
2012
2034
  "tags": [
2013
2035
  "autodocs",
2014
- "stable"
2036
+ "stable",
2037
+ "a11y"
2015
2038
  ]
2016
2039
  },
2017
2040
  "subcomponents": [
@@ -2134,7 +2157,8 @@
2134
2157
  "title": "Forms/Select",
2135
2158
  "tags": [
2136
2159
  "autodocs",
2137
- "lms"
2160
+ "lms",
2161
+ "stable"
2138
2162
  ]
2139
2163
  },
2140
2164
  "subcomponents": null,
@@ -2242,6 +2266,11 @@
2242
2266
  "type": "string",
2243
2267
  "required": false,
2244
2268
  "description": "Additional CSS class names."
2269
+ },
2270
+ "labels": {
2271
+ "type": "StepIndicatorLabels",
2272
+ "required": false,
2273
+ "description": "Override default English strings for i18n.\nCovers status display names and the aria-label template."
2245
2274
  }
2246
2275
  },
2247
2276
  "cssTokens": [],
@@ -2523,13 +2552,13 @@
2523
2552
  "type": "\"none\" | \"vertical\" | \"horizontal\" | \"both\"",
2524
2553
  "required": false,
2525
2554
  "defaultValue": "vertical",
2526
- "description": "Resize behaviour.\nIgnored when `autoResize` is true (resize is disabled to avoid conflict)."
2555
+ "description": "Resize behaviour.\nIgnored when `autoResize` is true (resize is disabled to avoid conflict).\nTakes precedence over `style.resize` when both are provided."
2527
2556
  },
2528
2557
  "autoResize": {
2529
2558
  "type": "boolean",
2530
2559
  "required": false,
2531
2560
  "defaultValue": "false",
2532
- "description": "Automatically grow height to fit content.\nDisables manual resize and scrollbar."
2561
+ "description": "Automatically grow height to fit content.\nDisables manual resize and sets `overflow: hidden`.\n\n**Warning:** If you apply an external `max-height` via CSS or `style`,\ncontent beyond that height will be clipped with no scrollbar.\nIn that case, add `overflow-y: auto` to restore scrolling."
2533
2562
  }
2534
2563
  },
2535
2564
  "cssTokens": [],
@@ -2603,12 +2632,12 @@
2603
2632
  "suffix": {
2604
2633
  "type": "ReactNode",
2605
2634
  "required": false,
2606
- "description": "Content to render after the input (icon, button)."
2635
+ "description": "Content to render after the input (icon, button).\n@remarks String addons (e.g. \"USD\", \".com\") are not part of the input's\naccessible name. Use `aria-label` on the input to provide full context."
2607
2636
  },
2608
2637
  "inputClassName": {
2609
2638
  "type": "string",
2610
2639
  "required": false,
2611
- "description": "Class name applied directly to the `<input>` element.\nUse for utilities like `tui-input-reset` that must target the input itself."
2640
+ "description": "Class name applied directly to the `<input>` element.\nUse for utilities like `tui-input-reset` (removes browser-native search\ndecoration, clear buttons, and spinners) that must target the input itself."
2612
2641
  }
2613
2642
  },
2614
2643
  "cssTokens": [
@@ -2902,12 +2931,12 @@
2902
2931
  "icons": {
2903
2932
  "sets": {
2904
2933
  "cred": 12,
2905
- "lms": 7,
2934
+ "lms": 11,
2906
2935
  "player": 24,
2907
2936
  "reaction": 36,
2908
- "system": 76
2937
+ "system": 86
2909
2938
  },
2910
- "total": 155,
2939
+ "total": 169,
2911
2940
  "manifest": "./icons/manifest.json"
2912
2941
  }
2913
2942
  }