@tangible/ui 0.2.29 → 0.2.30
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/Accordion/Accordion.js +2 -1
- package/components/Avatar/Avatar.js +6 -2
- package/components/Button/types.d.ts +5 -5
- package/components/Chip/Chip.js +2 -1
- package/components/ChipGroup/ChipGroup.js +1 -1
- package/components/ChipGroup/types.d.ts +2 -1
- package/components/Chips/Chips.d.ts +2 -0
- package/components/Chips/Chips.js +2 -16
- package/components/ColorPicker/ColorField.d.ts +3 -3
- package/components/ColorPicker/ColorField.js +2 -1
- package/components/ColorPicker/ColorPicker.js +2 -1
- package/components/ColorPicker/usePointerDrag.d.ts +7 -0
- package/components/ColorPicker/usePointerDrag.js +15 -1
- package/components/Combobox/Combobox.js +3 -2
- package/components/ContentIndicator/types.d.ts +3 -3
- package/components/DatePicker/Calendar.js +4 -3
- package/components/DatePicker/DatePicker.js +3 -2
- package/components/DatePicker/PickerTrigger.js +2 -1
- package/components/DatePicker/types.d.ts +1 -1
- package/components/GradientPicker/GradientBar.js +3 -1
- package/components/GradientPicker/GradientPicker.js +4 -3
- package/components/Icon/Icon.d.ts +9 -2
- package/components/Icon/Icon.js +4 -3
- package/components/Icon/index.d.ts +1 -1
- package/components/IconButton/IconButton.js +13 -45
- package/components/IconButton/IconButtonCore.d.ts +9 -0
- package/components/IconButton/IconButtonCore.js +76 -0
- package/components/IconButton/types.d.ts +4 -3
- package/components/Modal/Modal.js +3 -2
- package/components/MoveHandle/MoveHandle.js +3 -2
- package/components/MultiCombobox/MultiCombobox.js +3 -2
- package/components/MultiSelect/MultiSelect.js +3 -2
- package/components/NavMenu/NavMenu.js +2 -1
- package/components/NavMenu/types.d.ts +3 -3
- package/components/Notice/Notice.d.ts +7 -0
- package/components/Notice/Notice.js +6 -5
- package/components/Pager/Pager.js +5 -4
- package/components/Rating/Rating.js +2 -1
- package/components/SearchInput/SearchInput.js +3 -2
- package/components/SearchSelect/SearchSelect.js +3 -2
- package/components/SecretInput/SecretInput.js +3 -2
- package/components/Select/Select.js +3 -2
- package/components/Sidebar/Sidebar.js +2 -1
- package/components/StepIndicator/StepIndicator.js +4 -2
- package/components/StepIndicator/types.d.ts +2 -2
- package/components/StepList/types.d.ts +2 -2
- package/components/Tabs/types.d.ts +3 -3
- package/components/Toast/Toast.d.ts +5 -1
- package/components/Toast/Toast.js +3 -3
- package/components/Tooltip/Tooltip.d.ts +1 -1
- package/components/Tooltip/Tooltip.js +28 -6
- package/components/Tooltip/index.d.ts +1 -1
- package/components/Tooltip/types.d.ts +18 -0
- package/components/index.d.ts +2 -2
- package/figma-tokens.json +6 -4
- package/icons/cred/index.js +1 -0
- package/icons/icons.svg +7 -3
- package/icons/lms/index.d.ts +0 -3
- package/icons/lms/index.js +6 -33
- package/icons/manifest.json +71 -9
- package/icons/membersync/index.js +1 -0
- package/icons/player/index.js +1 -0
- package/icons/reaction/index.js +1 -0
- package/icons/registry.d.ts +14 -0
- package/icons/registry.js +7 -0
- package/icons/system/index.d.ts +11 -0
- package/icons/system/index.js +48 -0
- package/package.json +2 -1
- package/skills/building-with-tui/SKILL.md +201 -4
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +90 -13
- package/styles/all.expanded.unlayered.css +90 -13
- package/styles/all.unlayered.css +1 -1
- package/styles/app.css +41 -0
- package/styles/components/_bundle.scss +2 -0
- package/styles/components/button.scss +6 -1
- package/styles/components/card.scss +17 -1
- package/styles/components/chip-group.scss +45 -28
- package/styles/components/chips.scss +21 -0
- package/styles/components/color-picker.scss +15 -1
- package/styles/components/gradient-picker.scss +2 -2
- package/styles/components/tooltip.scss +8 -1
- package/styles/core.css +1 -1
- package/styles/core.unlayered.css +1 -1
- package/styles/system/_text-styles.scss +4 -0
- package/styles/system/_tokens.scss +7 -2
- package/styles/utilities/_index.scss +3 -0
- package/tui-manifest.json +40 -18
- package/vanilla/styles.css +1 -1
- package/vanilla/styles.unlayered.css +1 -1
package/icons/registry.d.ts
CHANGED
|
@@ -198,6 +198,8 @@ export type IconName =
|
|
|
198
198
|
| 'system/globe'
|
|
199
199
|
| 'system/handle-alt'
|
|
200
200
|
| 'system/handle'
|
|
201
|
+
| 'system/help-circle-fill'
|
|
202
|
+
| 'system/help-circle-outline'
|
|
201
203
|
| 'system/help'
|
|
202
204
|
| 'system/hide'
|
|
203
205
|
| 'system/highlight'
|
|
@@ -205,6 +207,7 @@ export type IconName =
|
|
|
205
207
|
| 'system/home-outline'
|
|
206
208
|
| 'system/image'
|
|
207
209
|
| 'system/inbox'
|
|
210
|
+
| 'system/info'
|
|
208
211
|
| 'system/key'
|
|
209
212
|
| 'system/link'
|
|
210
213
|
| 'system/lock-fill'
|
|
@@ -224,12 +227,15 @@ export type IconName =
|
|
|
224
227
|
| 'system/plus-circle-outline'
|
|
225
228
|
| 'system/plus-small'
|
|
226
229
|
| 'system/plus'
|
|
230
|
+
| 'system/question-mark'
|
|
227
231
|
| 'system/recurring'
|
|
228
232
|
| 'system/redo'
|
|
233
|
+
| 'system/refresh'
|
|
229
234
|
| 'system/sun-fill'
|
|
230
235
|
| 'system/sun-outline'
|
|
231
236
|
| 'system/undo'
|
|
232
237
|
| 'system/reverse'
|
|
238
|
+
| 'system/rotate'
|
|
233
239
|
| 'system/search'
|
|
234
240
|
| 'system/send'
|
|
235
241
|
| 'system/settings'
|
|
@@ -239,6 +245,7 @@ export type IconName =
|
|
|
239
245
|
| 'system/star-fill'
|
|
240
246
|
| 'system/star-half'
|
|
241
247
|
| 'system/star-outline'
|
|
248
|
+
| 'system/store'
|
|
242
249
|
| 'system/bolt-fill'
|
|
243
250
|
| 'system/bolt-outline'
|
|
244
251
|
| 'system/bolt-plus-fill'
|
|
@@ -455,6 +462,8 @@ export declare const iconRegistry: {
|
|
|
455
462
|
'system/globe': IconComponent;
|
|
456
463
|
'system/handle-alt': IconComponent;
|
|
457
464
|
'system/handle': IconComponent;
|
|
465
|
+
'system/help-circle-fill': IconComponent;
|
|
466
|
+
'system/help-circle-outline': IconComponent;
|
|
458
467
|
'system/help': IconComponent;
|
|
459
468
|
'system/hide': IconComponent;
|
|
460
469
|
'system/highlight': IconComponent;
|
|
@@ -462,6 +471,7 @@ export declare const iconRegistry: {
|
|
|
462
471
|
'system/home-outline': IconComponent;
|
|
463
472
|
'system/image': IconComponent;
|
|
464
473
|
'system/inbox': IconComponent;
|
|
474
|
+
'system/info': IconComponent;
|
|
465
475
|
'system/key': IconComponent;
|
|
466
476
|
'system/link': IconComponent;
|
|
467
477
|
'system/lock-fill': IconComponent;
|
|
@@ -481,12 +491,15 @@ export declare const iconRegistry: {
|
|
|
481
491
|
'system/plus-circle-outline': IconComponent;
|
|
482
492
|
'system/plus-small': IconComponent;
|
|
483
493
|
'system/plus': IconComponent;
|
|
494
|
+
'system/question-mark': IconComponent;
|
|
484
495
|
'system/recurring': IconComponent;
|
|
485
496
|
'system/redo': IconComponent;
|
|
497
|
+
'system/refresh': IconComponent;
|
|
486
498
|
'system/sun-fill': IconComponent;
|
|
487
499
|
'system/sun-outline': IconComponent;
|
|
488
500
|
'system/undo': IconComponent;
|
|
489
501
|
'system/reverse': IconComponent;
|
|
502
|
+
'system/rotate': IconComponent;
|
|
490
503
|
'system/search': IconComponent;
|
|
491
504
|
'system/send': IconComponent;
|
|
492
505
|
'system/settings': IconComponent;
|
|
@@ -496,6 +509,7 @@ export declare const iconRegistry: {
|
|
|
496
509
|
'system/star-fill': IconComponent;
|
|
497
510
|
'system/star-half': IconComponent;
|
|
498
511
|
'system/star-outline': IconComponent;
|
|
512
|
+
'system/store': IconComponent;
|
|
499
513
|
'system/bolt-fill': IconComponent;
|
|
500
514
|
'system/bolt-outline': IconComponent;
|
|
501
515
|
'system/bolt-plus-fill': IconComponent;
|
package/icons/registry.js
CHANGED
|
@@ -201,6 +201,8 @@ export const iconRegistry = {
|
|
|
201
201
|
'system/globe': systemIcons['globe'],
|
|
202
202
|
'system/handle-alt': systemIcons['handle-alt'],
|
|
203
203
|
'system/handle': systemIcons['handle'],
|
|
204
|
+
'system/help-circle-fill': systemIcons['help-circle-fill'],
|
|
205
|
+
'system/help-circle-outline': systemIcons['help-circle-outline'],
|
|
204
206
|
'system/help': systemIcons['help'],
|
|
205
207
|
'system/hide': systemIcons['hide'],
|
|
206
208
|
'system/highlight': systemIcons['highlight'],
|
|
@@ -208,6 +210,7 @@ export const iconRegistry = {
|
|
|
208
210
|
'system/home-outline': systemIcons['home-outline'],
|
|
209
211
|
'system/image': systemIcons['image'],
|
|
210
212
|
'system/inbox': systemIcons['inbox'],
|
|
213
|
+
'system/info': systemIcons['info'],
|
|
211
214
|
'system/key': systemIcons['key'],
|
|
212
215
|
'system/link': systemIcons['link'],
|
|
213
216
|
'system/lock-fill': systemIcons['lock-fill'],
|
|
@@ -227,12 +230,15 @@ export const iconRegistry = {
|
|
|
227
230
|
'system/plus-circle-outline': systemIcons['plus-circle-outline'],
|
|
228
231
|
'system/plus-small': systemIcons['plus-small'],
|
|
229
232
|
'system/plus': systemIcons['plus'],
|
|
233
|
+
'system/question-mark': systemIcons['question-mark'],
|
|
230
234
|
'system/recurring': systemIcons['recurring'],
|
|
231
235
|
'system/redo': systemIcons['redo'],
|
|
236
|
+
'system/refresh': systemIcons['refresh'],
|
|
232
237
|
'system/sun-fill': systemIcons['sun-fill'],
|
|
233
238
|
'system/sun-outline': systemIcons['sun-outline'],
|
|
234
239
|
'system/undo': systemIcons['undo'],
|
|
235
240
|
'system/reverse': systemIcons['reverse'],
|
|
241
|
+
'system/rotate': systemIcons['rotate'],
|
|
236
242
|
'system/search': systemIcons['search'],
|
|
237
243
|
'system/send': systemIcons['send'],
|
|
238
244
|
'system/settings': systemIcons['settings'],
|
|
@@ -242,6 +248,7 @@ export const iconRegistry = {
|
|
|
242
248
|
'system/star-fill': systemIcons['star-fill'],
|
|
243
249
|
'system/star-half': systemIcons['star-half'],
|
|
244
250
|
'system/star-outline': systemIcons['star-outline'],
|
|
251
|
+
'system/store': systemIcons['store'],
|
|
245
252
|
'system/bolt-fill': systemIcons['bolt-fill'],
|
|
246
253
|
'system/bolt-outline': systemIcons['bolt-outline'],
|
|
247
254
|
'system/bolt-plus-fill': systemIcons['bolt-plus-fill'],
|
package/icons/system/index.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export declare const Funnel: IconComponent;
|
|
|
63
63
|
export declare const Globe: IconComponent;
|
|
64
64
|
export declare const HandleAlt: IconComponent;
|
|
65
65
|
export declare const Handle: IconComponent;
|
|
66
|
+
export declare const HelpCircleFill: IconComponent;
|
|
66
67
|
export declare const Help: IconComponent;
|
|
67
68
|
export declare const Hide: IconComponent;
|
|
68
69
|
export declare const Highlight: IconComponent;
|
|
@@ -70,6 +71,7 @@ export declare const HomeFill: IconComponent;
|
|
|
70
71
|
export declare const HomeOutline: IconComponent;
|
|
71
72
|
export declare const Image: IconComponent;
|
|
72
73
|
export declare const Inbox: IconComponent;
|
|
74
|
+
export declare const Info: IconComponent;
|
|
73
75
|
export declare const Key: IconComponent;
|
|
74
76
|
export declare const Link: IconComponent;
|
|
75
77
|
export declare const LockFill: IconComponent;
|
|
@@ -90,6 +92,7 @@ export declare const PlusCircleFill: IconComponent;
|
|
|
90
92
|
export declare const PlusCircleOutline: IconComponent;
|
|
91
93
|
export declare const PlusSmall: IconComponent;
|
|
92
94
|
export declare const Plus: IconComponent;
|
|
95
|
+
export declare const QuestionMark: IconComponent;
|
|
93
96
|
export declare const Recurring: IconComponent;
|
|
94
97
|
export declare const Redo: IconComponent;
|
|
95
98
|
export declare const Reverse: IconComponent;
|
|
@@ -102,6 +105,7 @@ export declare const SidebarExpand: IconComponent;
|
|
|
102
105
|
export declare const StarFill: IconComponent;
|
|
103
106
|
export declare const StarHalf: IconComponent;
|
|
104
107
|
export declare const StarOutline: IconComponent;
|
|
108
|
+
export declare const Store: IconComponent;
|
|
105
109
|
export declare const SunFill: IconComponent;
|
|
106
110
|
export declare const SunOutline: IconComponent;
|
|
107
111
|
export declare const Tool: IconComponent;
|
|
@@ -174,6 +178,8 @@ export declare const systemIcons: {
|
|
|
174
178
|
'globe': IconComponent;
|
|
175
179
|
'handle-alt': IconComponent;
|
|
176
180
|
'handle': IconComponent;
|
|
181
|
+
'help-circle-fill': IconComponent;
|
|
182
|
+
'help-circle-outline': IconComponent;
|
|
177
183
|
'help': IconComponent;
|
|
178
184
|
'hide': IconComponent;
|
|
179
185
|
'highlight': IconComponent;
|
|
@@ -181,6 +187,7 @@ export declare const systemIcons: {
|
|
|
181
187
|
'home-outline': IconComponent;
|
|
182
188
|
'image': IconComponent;
|
|
183
189
|
'inbox': IconComponent;
|
|
190
|
+
'info': IconComponent;
|
|
184
191
|
'key': IconComponent;
|
|
185
192
|
'link': IconComponent;
|
|
186
193
|
'lock-fill': IconComponent;
|
|
@@ -200,12 +207,15 @@ export declare const systemIcons: {
|
|
|
200
207
|
'plus-circle-outline': IconComponent;
|
|
201
208
|
'plus-small': IconComponent;
|
|
202
209
|
'plus': IconComponent;
|
|
210
|
+
'question-mark': IconComponent;
|
|
203
211
|
'recurring': IconComponent;
|
|
204
212
|
'redo': IconComponent;
|
|
213
|
+
'refresh': IconComponent;
|
|
205
214
|
'sun-fill': IconComponent;
|
|
206
215
|
'sun-outline': IconComponent;
|
|
207
216
|
'undo': IconComponent;
|
|
208
217
|
'reverse': IconComponent;
|
|
218
|
+
'rotate': IconComponent;
|
|
209
219
|
'search': IconComponent;
|
|
210
220
|
'send': IconComponent;
|
|
211
221
|
'settings': IconComponent;
|
|
@@ -215,6 +225,7 @@ export declare const systemIcons: {
|
|
|
215
225
|
'star-fill': IconComponent;
|
|
216
226
|
'star-half': IconComponent;
|
|
217
227
|
'star-outline': IconComponent;
|
|
228
|
+
'store': IconComponent;
|
|
218
229
|
'bolt-fill': IconComponent;
|
|
219
230
|
'bolt-outline': IconComponent;
|
|
220
231
|
'bolt-plus-fill': IconComponent;
|
package/icons/system/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createElement as _c } from "react";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
export function AlertCircleFill(props) {
|
|
4
5
|
return _c("svg", Object.assign({
|
|
5
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -610,6 +611,16 @@ export function Handle(props) {
|
|
|
610
611
|
}, props), _c("path", {d:"M7 16.5h10V15H7zm0-9V9h10V7.5z"}));
|
|
611
612
|
}
|
|
612
613
|
|
|
614
|
+
export function HelpCircleFill(props) {
|
|
615
|
+
return _c("svg", Object.assign({
|
|
616
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
617
|
+
viewBox: "0 0 24 24",
|
|
618
|
+
width: "1em",
|
|
619
|
+
height: "1em",
|
|
620
|
+
fill: "currentColor"
|
|
621
|
+
}, props), _c("path", {fillRule:"evenodd",d:"M12 4a8 8 0 1 1 0 16 8 8 0 0 1 0-16m-.75 11v1.5h1.5V15zM12 7.25a3 3 0 0 0-3 3h1.5a1.5 1.5 0 1 1 1.667 1.491c-.465.052-.917.438-.917 1.009V14h1.5v-.849A2.997 2.997 0 0 0 12 7.25",clipRule:"evenodd"}));
|
|
622
|
+
}
|
|
623
|
+
|
|
613
624
|
export function Help(props) {
|
|
614
625
|
return _c("svg", Object.assign({
|
|
615
626
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -680,6 +691,16 @@ export function Inbox(props) {
|
|
|
680
691
|
}, props), _c("path", {fillRule:"evenodd",d:"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-.5h12a.5.5 0 0 1 .5.5v7H14a2 2 0 1 1-4 0H5.5V6a.5.5 0 0 1 .5-.5m-.5 9V18a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5v-3.5h-3.337a3.5 3.5 0 0 1-6.326 0z",clipRule:"evenodd"}));
|
|
681
692
|
}
|
|
682
693
|
|
|
694
|
+
export function Info(props) {
|
|
695
|
+
return _c("svg", Object.assign({
|
|
696
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
697
|
+
viewBox: "0 0 24 24",
|
|
698
|
+
width: "1em",
|
|
699
|
+
height: "1em",
|
|
700
|
+
fill: "currentColor"
|
|
701
|
+
}, props), _c("path", {d:"M13 11v6h-2v-6zm0-2V7h-2v2z"}), _c("path", {fillRule:"evenodd",d:"M3.25 12a8.75 8.75 0 1 1 17.5 0 8.75 8.75 0 0 1-17.5 0M12 4.75a7.25 7.25 0 1 0 0 14.5 7.25 7.25 0 0 0 0-14.5",clipRule:"evenodd"}));
|
|
702
|
+
}
|
|
703
|
+
|
|
683
704
|
export function Key(props) {
|
|
684
705
|
return _c("svg", Object.assign({
|
|
685
706
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -880,6 +901,16 @@ export function Plus(props) {
|
|
|
880
901
|
}, props), _c("path", {d:"M11.25 12.75V18h1.5v-5.25H18v-1.5h-5.25V6h-1.5v5.25H6v1.5z"}));
|
|
881
902
|
}
|
|
882
903
|
|
|
904
|
+
export function QuestionMark(props) {
|
|
905
|
+
return _c("svg", Object.assign({
|
|
906
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
907
|
+
viewBox: "0 0 24 24",
|
|
908
|
+
width: "1em",
|
|
909
|
+
height: "1em",
|
|
910
|
+
fill: "currentColor"
|
|
911
|
+
}, props), _c("path", {d:"M12 17a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-13.306a5 5 0 0 1 1 9.9V15h-2v-2.056c0-.706.564-1.217 1.188-1.256A3 3 0 1 0 9 8.695H7a5 5 0 0 1 5-5"}));
|
|
912
|
+
}
|
|
913
|
+
|
|
883
914
|
export function Recurring(props) {
|
|
884
915
|
return _c("svg", Object.assign({
|
|
885
916
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1000,6 +1031,16 @@ export function StarOutline(props) {
|
|
|
1000
1031
|
}, props), _c("path", {fillRule:"evenodd",d:"M11.186 14.734a1.75 1.75 0 0 1 1.629 0l1.895.996-.362-2.11a1.75 1.75 0 0 1 .503-1.55l1.534-1.495-2.12-.308.216-1.484 4.626.672a.25.25 0 0 1 .139.427l-3.347 3.262a.25.25 0 0 0-.072.222l.79 4.607a.25.25 0 0 1-.363.264l-4.138-2.176a.25.25 0 0 0-.232 0l-4.138 2.175a.25.25 0 0 1-.362-.263l.79-4.607a.25.25 0 0 0-.072-.222L4.754 9.882a.25.25 0 0 1 .139-.427l4.626-.672.216 1.484-2.12.308L9.15 12.07c.412.402.6.982.503 1.55l-.362 2.11zM9.707 8.645a.25.25 0 0 1-.188.137l.216 1.484a1.75 1.75 0 0 0 1.317-.957L12 7.39l.948 1.92a1.75 1.75 0 0 0 1.318.957l.215-1.484a.25.25 0 0 1-.188-.137l-2.069-4.192a.25.25 0 0 0-.448 0z",clipRule:"evenodd"}));
|
|
1001
1032
|
}
|
|
1002
1033
|
|
|
1034
|
+
export function Store(props) {
|
|
1035
|
+
return _c("svg", Object.assign({
|
|
1036
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1037
|
+
viewBox: "0 0 24 24",
|
|
1038
|
+
width: "1em",
|
|
1039
|
+
height: "1em",
|
|
1040
|
+
fill: "currentColor"
|
|
1041
|
+
}, props), _c("path", {fillRule:"evenodd",d:"M20 9h-1v11H5V9H4V4h16zM6.5 18.5H9V14h6v4.5h2.5V9h-11zm4 0h3v-3h-3zm-5-11h3.25v-2H5.5zm4.75 0h3.5v-2h-3.5zm5 0h3.25v-2h-3.25z",clipRule:"evenodd"}));
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1003
1044
|
export function SunFill(props) {
|
|
1004
1045
|
return _c("svg", Object.assign({
|
|
1005
1046
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1197,6 +1238,8 @@ export const systemIcons = {
|
|
|
1197
1238
|
'globe': Globe,
|
|
1198
1239
|
'handle-alt': HandleAlt,
|
|
1199
1240
|
'handle': Handle,
|
|
1241
|
+
'help-circle-fill': HelpCircleFill,
|
|
1242
|
+
'help-circle-outline': Help,
|
|
1200
1243
|
'help': Help,
|
|
1201
1244
|
'hide': Hide,
|
|
1202
1245
|
'highlight': Highlight,
|
|
@@ -1204,6 +1247,7 @@ export const systemIcons = {
|
|
|
1204
1247
|
'home-outline': HomeOutline,
|
|
1205
1248
|
'image': Image,
|
|
1206
1249
|
'inbox': Inbox,
|
|
1250
|
+
'info': Info,
|
|
1207
1251
|
'key': Key,
|
|
1208
1252
|
'link': Link,
|
|
1209
1253
|
'lock-fill': LockFill,
|
|
@@ -1223,12 +1267,15 @@ export const systemIcons = {
|
|
|
1223
1267
|
'plus-circle-outline': PlusCircleOutline,
|
|
1224
1268
|
'plus-small': PlusSmall,
|
|
1225
1269
|
'plus': Plus,
|
|
1270
|
+
'question-mark': QuestionMark,
|
|
1226
1271
|
'recurring': Recurring,
|
|
1227
1272
|
'redo': Redo,
|
|
1273
|
+
'refresh': ArrowCounterclockwise,
|
|
1228
1274
|
'sun-fill': SunFill,
|
|
1229
1275
|
'sun-outline': SunOutline,
|
|
1230
1276
|
'undo': Undo,
|
|
1231
1277
|
'reverse': Reverse,
|
|
1278
|
+
'rotate': ArrowCounterclockwise,
|
|
1232
1279
|
'search': Search,
|
|
1233
1280
|
'send': Send,
|
|
1234
1281
|
'settings': Settings,
|
|
@@ -1238,6 +1285,7 @@ export const systemIcons = {
|
|
|
1238
1285
|
'star-fill': StarFill,
|
|
1239
1286
|
'star-half': StarHalf,
|
|
1240
1287
|
'star-outline': StarOutline,
|
|
1288
|
+
'store': Store,
|
|
1241
1289
|
'bolt-fill': BoltFill,
|
|
1242
1290
|
'bolt-outline': BoltOutline,
|
|
1243
1291
|
'bolt-plus-fill': BoltPlusFill,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangible/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.30",
|
|
4
4
|
"description": "Tangible Design System",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./components/index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"./styles/expanded.unlayered": "./styles/all.expanded.unlayered.css",
|
|
20
20
|
"./styles/core": "./styles/core.css",
|
|
21
21
|
"./styles/core.unlayered": "./styles/core.unlayered.css",
|
|
22
|
+
"./styles/app": "./styles/app.css",
|
|
22
23
|
"./styles/scss": "./styles/index.scss",
|
|
23
24
|
"./styles/*": "./styles/*",
|
|
24
25
|
"./utils/focus-trap": {
|
|
@@ -32,6 +32,10 @@ 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
|
|
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
|
+
the Storybook UI when you can only fetch URLs.
|
|
38
|
+
|
|
35
39
|
`node_modules/@tangible/ui/` — read in this order, stop when answered:
|
|
36
40
|
|
|
37
41
|
| Question | File |
|
|
@@ -135,7 +139,7 @@ resolve the same root yourself.
|
|
|
135
139
|
If `<html>` itself is the `.tui-interface`, portal roots mount inside `<body>`, not on `<html>`.
|
|
136
140
|
|
|
137
141
|
**3. Dark mode is `data-theme`, not a class.** TUI's palette is gated on `[data-theme="dark"]`
|
|
138
|
-
(`"auto"` follows `prefers-color-scheme`; absent means light and inherits the host's colour). With `data-theme="dark"`/`"auto"` on an ancestor such as `<html>` and an un-themed `.tui-interface` on `<body>`, TUI surfaces (panels, cards, filled controls) render correctly because they own their text colour, but in-flow text directly inside the interface still inherits the HOST's colour by design — so set the host's own body colour (e.g. `color: var(--tui-color-fg)` on `body`) if you want TUI's. A host
|
|
142
|
+
(`"auto"` follows `prefers-color-scheme`; absent means light and inherits the host's colour). With `data-theme="dark"`/`"auto"` on an ancestor such as `<html>` and an un-themed `.tui-interface` on `<body>`, TUI surfaces (panels, cards, filled controls) render correctly because they own their text colour, but in-flow text directly inside the interface still inherits the HOST's colour by design — so set the host's own body colour (e.g. `color: var(--tui-color-fg)` on `body`) if you want TUI's. A standalone app gets that, and more, from the app base sheet (§6). A host
|
|
139
143
|
that toggles a `.dark` class (Tailwind's strategy) drives nothing in TUI. Translate it: observe what
|
|
140
144
|
is actually applied to the document — a `MutationObserver` on `<html>`'s `class` catches boot,
|
|
141
145
|
explicit toggles and OS changes alike — and mirror it onto your wrapper. Resolve to explicit
|
|
@@ -167,6 +171,82 @@ components), or, if your build compiles Sass, the documented subset entry:
|
|
|
167
171
|
);
|
|
168
172
|
```
|
|
169
173
|
|
|
174
|
+
**Icons have the same problem in JavaScript.** Any component that renders an icon pulls in the
|
|
175
|
+
icon registry, every set, ~145 kB minified / ~30 kB gzipped, because names like `"system/check"`
|
|
176
|
+
are looked up at runtime. To ship only the icons you name, point the registry at a lean one of
|
|
177
|
+
your own:
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
// src/tui-icons.ts: every icon name YOUR code passes to TUI, and nothing else
|
|
181
|
+
import { Check, Plus, Trash } from '@tangible/ui/icons/system/index.js';
|
|
182
|
+
export const iconRegistry = { 'system/check': Check, 'system/plus': Plus, 'system/trash': Trash };
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
// vite.config.ts: TUI imports the registry by a relative path, so match the specifier's tail
|
|
187
|
+
resolve: { alias: [{ find: /icons\/registry\.js$/, replacement: '/src/tui-icons.ts' }] }
|
|
188
|
+
// webpack.config.js
|
|
189
|
+
plugins: [new webpack.NormalModuleReplacementPlugin(/icons\/registry\.js$/, path.resolve('src/tui-icons.ts'))]
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
TUI's own icons (chevrons, close, check, …) are imported directly from 0.2.30, so
|
|
193
|
+
they never need listing. A name you use but forget to list renders an empty `<span data-tui-icon-missing="…">` and a
|
|
194
|
+
dev-mode warning. Or skip names altogether: every icon prop also takes the component itself,
|
|
195
|
+
`<IconButton icon={Trash} label="Delete" />`, which never touches the registry.
|
|
196
|
+
Import each icon from the set that owns its file: the `lms/info`, `lms/help-circle-fill` and
|
|
197
|
+
`lms/question-mark` aliases live in `system`. The alias is verified on Vite production builds; the
|
|
198
|
+
webpack line is the equivalent, untested.
|
|
199
|
+
|
|
200
|
+
**6. A standalone app that owns the whole page can add the app base sheet.** For Vite/React apps,
|
|
201
|
+
not plugin frontends:
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
import '@tangible/ui/styles';
|
|
205
|
+
import '@tangible/ui/styles/app';
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
It expects `.tui-interface` on `<html>` or `<body>`, with `data-theme` on either, and sets what
|
|
209
|
+
every Tangible app had been hand-rolling:
|
|
210
|
+
- no body margin;
|
|
211
|
+
- the body painted `--tui-color-bg-surface`, with `--tui-color-fg` text;
|
|
212
|
+
- `--tui-input-bg` set to `--tui-color-bg`, so fields don't vanish into the surface (declared per
|
|
213
|
+
interface, so Toast's dark scope resolves its own);
|
|
214
|
+
- `color-scheme` on `<html>`, for dark scrollbars;
|
|
215
|
+
- unclassed links in `--tui-theme-primary-strong` with a pointer cursor;
|
|
216
|
+
- `code` in the mono stack at 0.9em;
|
|
217
|
+
- app typography from the Figma templates (below).
|
|
218
|
+
|
|
219
|
+
**App typography.** Copy reads at 14px (`--tui-typography-size-sm`) on every interface, portals and
|
|
220
|
+
nested scopes included (on `<body>` when `<html>` is the interface, so `rem` stays 16px). Controls that
|
|
221
|
+
set their own font size keep their ladder; em-sized pieces inside copy, such as an inline Icon or a
|
|
222
|
+
bare Checkbox, follow the copy. The roles below use weights 400 and 600 only.
|
|
223
|
+
The sheet retunes `headline-04` to 600 / 1.25 and `body`/`body-sm` to line height 1.4, and sets Field
|
|
224
|
+
help to `fg-muted` for every Field in the app, so it matches app helper text. Pick the element from the document outline,
|
|
225
|
+
never from the size (page title `h1`, card title `h2` is a sensible default):
|
|
226
|
+
|
|
227
|
+
| Role | Class | Colour |
|
|
228
|
+
|---|---|---|
|
|
229
|
+
| Page title | `tui-text-style-headline-04` (24 / 600) | default |
|
|
230
|
+
| Card or section title | `tui-text-style-headline-07` (16 / 600) | default |
|
|
231
|
+
| Page, card and empty-state description; key labels | `tui-text-style-body-sm` | `--tui-color-fg-muted` |
|
|
232
|
+
| Body and value text | `tui-text-style-body-sm` | default |
|
|
233
|
+
| Setting-row title, inline emphasis, identity name | `body-sm` at weight 600 | default |
|
|
234
|
+
| Helper, meta, caption; secondary line of a two-line row | `tui-text-style-caption` (12) | muted (built in) |
|
|
235
|
+
| Nav group header | `tui-text-style-overline`; write the copy in sentence case, the style uppercases it | muted (built in) |
|
|
236
|
+
| Stat value | 20 / 600 / 1.4 in the body face | default |
|
|
237
|
+
| Stat trend | 12 / 400, coloured by **sentiment**, not arrow: `--tui-theme-{success,danger,secondary}-stronger` | |
|
|
238
|
+
| Empty-state title | 16 / 600 / 1.4 in the body face | default |
|
|
239
|
+
|
|
240
|
+
A brand heading face goes on `--tui-text-headline-family`. It reaches every headline level, so page and
|
|
241
|
+
card titles, and nothing in the body face (stat values and empty-state titles stay body). Field help on a light `bg-muted` panel measures 4.39:1 in `fg-muted`, under AA, so set
|
|
242
|
+
`--tui-field-helper-fg: var(--tui-color-fg-secondary)` on that panel.
|
|
243
|
+
|
|
244
|
+
It sits in the `defaults` layer at zero specificity, so TUI's components win over it and any
|
|
245
|
+
unlayered rule of yours wins over everything in it. It is layered only (there is no unlayered
|
|
246
|
+
build), which is why it isn't for WordPress. Fonts and page layout stay yours. Don't re-roll
|
|
247
|
+
screen-reader-only text or skip links: `.tui-visually-hidden` and `.tui-visually-hidden--focusable`
|
|
248
|
+
already work when `<body>` is the interface.
|
|
249
|
+
|
|
170
250
|
## Labels and errors: `Field` composition
|
|
171
251
|
|
|
172
252
|
`Field` wires `id` / `aria-labelledby` / `aria-describedby` / `aria-invalid` / `aria-required`
|
|
@@ -201,6 +281,51 @@ declare it there; the requirement still reaches AT through `Field.Label`'s visua
|
|
|
201
281
|
text. If axe reports `aria-allowed-attr` on a TUI trigger, it is TUI's to fix, not yours
|
|
202
282
|
(ColorField currently passes it through — verified Aug 22 2026, not yet filed).
|
|
203
283
|
|
|
284
|
+
## Translating TUI's built-in strings
|
|
285
|
+
|
|
286
|
+
TUI ships English defaults for every string it renders or announces on its own. Strings you pass
|
|
287
|
+
in (`label`, `aria-label`, titles) are already yours. Wire the rest to your translation layer
|
|
288
|
+
(`@wordpress/i18n`, tangible-strings) or the UI is partly English. Verified against main,
|
|
289
|
+
Oct 24 2026.
|
|
290
|
+
|
|
291
|
+
**`labels` objects** (pass a partial; unset keys keep the default). The defaults are exported as
|
|
292
|
+
`default<Name>Labels`; nine come from the barrel, the rest from `@tangible/ui/components/<Dir>`.
|
|
293
|
+
|
|
294
|
+
| Component | Keys |
|
|
295
|
+
|---|---|
|
|
296
|
+
| Avatar / AvatarGroup | `description` / `group`, `groupAll`, `overflow` |
|
|
297
|
+
| Button | `newTab` (" (opens in new tab)", the hidden hint on `target="_blank"` links) |
|
|
298
|
+
| Calendar | `prevMonth`, `nextMonth`, `prevYear`, `nextYear`, `openMonthPicker`, `day`, `today`, `selected` |
|
|
299
|
+
| ColorField | `trigger`, `dynamic`, `modes`, `solidTab`, `gradientTab` (its popover takes ColorPicker's) |
|
|
300
|
+
| ColorPicker | `group`, `area`, `hue`, `alpha`, `format`, `value`, `copy`, `copied`, `variable`, `formats`, `channels`, channel names, value texts |
|
|
301
|
+
| Combobox | `clear` |
|
|
302
|
+
| DataTable / BulkActionsBar | `selectAll`, `selectRow`, `pageStatus`, `sortBy`, `sorted` / `selected`, `actions` |
|
|
303
|
+
| DatePicker | `title`, `titleWithTime`, `now`, `close`, `placeholder`, `timeSection`, `dateSection`, `month`, `dayOfMonth`, `year`, `hour`, `minute`, `am`, `pm`, `meridiem`, `trigger`, `triggerEmpty` |
|
|
304
|
+
| DateRangePicker | `from`, `to`, `apply`, `cancel`, `placeholder`, `presets`, `trigger`, `triggerEmpty` |
|
|
305
|
+
| Field | `required` (the visually hidden "required" after the label) |
|
|
306
|
+
| GradientPicker | `group`, `bar`, `stop`, `value`, `copy`, `copied`, `reverse`, stop editing, type and geometry labels |
|
|
307
|
+
| MoveHandle | `moveUp`, `moveDown`, `drag`, `locked` (no exported default object) |
|
|
308
|
+
| MultiCombobox | `clear`, `remove`, `status` |
|
|
309
|
+
| MultiSelect | `selected`, `more`, `status` |
|
|
310
|
+
| NavMenu | `submenu` |
|
|
311
|
+
| Pager | `previous`, `next`, `first`, `last` (+ `*Text`), `page`, `navigation`, `pageStatus`, `itemsPerPage`, `perPage`, `jumpLabel`, `jumpText` |
|
|
312
|
+
| Rating | `rating`, `group`, `value` |
|
|
313
|
+
| SearchSelect | `search`, `clearSearch`, `noResults` |
|
|
314
|
+
| SecretInput | `reveal`, `hide`, `shown`, `hidden`, `valueSet`, `valueSetDescription`, `locked` |
|
|
315
|
+
| Sidebar.Toggle | `collapse`, `expand` |
|
|
316
|
+
| StepIndicator | `notStarted`, `inProgress`, `complete`, `locked`, `status`, `statusWithValue` |
|
|
317
|
+
|
|
318
|
+
Some keys are functions (counts, page status, value texts); the type says which.
|
|
319
|
+
|
|
320
|
+
**Flat string props:** Chip `removeLabel` ("Remove"); ChipGroup `multipleLabel`; DataTable
|
|
321
|
+
`loadingMessage`, `emptyMessage`; BulkActionsBar `clearLabel`; Modal `closeLabel`; Notice and
|
|
322
|
+
Toast `dismissLabel` ("Dismiss") and `dismissedMessage` ("Notification dismissed", announced after
|
|
323
|
+
the × closes it); SearchInput `searchLabel`, `clearLabel`; Select `clearLabel`; ToastProvider
|
|
324
|
+
`regionLabel` ("Notifications").
|
|
325
|
+
|
|
326
|
+
**Composed strings:** Button `loading` names itself "<label>, loading" in English. Pass
|
|
327
|
+
`loadingLabel` with the translated whole.
|
|
328
|
+
|
|
204
329
|
## Customising
|
|
205
330
|
|
|
206
331
|
Tokens, not class overrides. Four layers, and you only touch two:
|
|
@@ -256,15 +381,50 @@ Form controls show no border change on hover unless you set `--tui-input-border-
|
|
|
256
381
|
that component only. If you re-point an option state's background, set its `-fg-*` partner too:
|
|
257
382
|
the text defaults to the panel's own fg, which is tuned for TUI's default fills.
|
|
258
383
|
|
|
259
|
-
**Text styles** (0.2.24+) are classes: `.tui-text-style-{display-01…04, headline-01…
|
|
384
|
+
**Text styles** (0.2.24+) are classes: `.tui-text-style-{display-01…04, headline-01…07, 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.
|
|
260
385
|
|
|
261
386
|
**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.
|
|
262
387
|
|
|
263
388
|
**Tooltips warm up in groups:** wrap a set of tooltips in `TooltipProvider` (a `Toolbar` does it for you), and after the first shows, the rest appear at once while you move between them (`skipDelayDuration`, default 300ms). Don't hand-roll delay logic per tooltip.
|
|
264
389
|
|
|
390
|
+
**A tooltip that repeats the trigger's name is `type="label"`.** The default tooltip is a
|
|
391
|
+
description: it puts `aria-describedby` on the trigger, so a screen reader hears "Settings, button,
|
|
392
|
+
Settings" when the text matches the `aria-label`. `<Tooltip type="label">` adds no ARIA and hides
|
|
393
|
+
its text from the accessibility tree; the trigger must carry its own name (a dev warning fires if
|
|
394
|
+
it doesn't). Use it only when the tooltip says the same words as the name: extra information is a
|
|
395
|
+
description, and `label` would hide it from screen readers. `IconButton showTooltip` and Avatar's tooltip already do this. Don't wrap the trigger
|
|
396
|
+
in a `<span>` to dodge the describedby. Set `--tui-tooltip-max-width` (default 250px, never wider
|
|
397
|
+
than the viewport) for a one-line tooltip, rather than a className.
|
|
398
|
+
|
|
265
399
|
`className` is for layout integration (margin, grid placement), not appearance. Beyond the token
|
|
266
400
|
API the sanctioned escape hatch is to **swizzle** — copy the component source and own the fork.
|
|
267
401
|
|
|
402
|
+
### Card spacing, container and links
|
|
403
|
+
|
|
404
|
+
- **Padding vs gap.** `--tui-card-padding` is the card's *outer* edge: inline on every slot, and
|
|
405
|
+
block on the first slot's top and the last slot's bottom. `--tui-card-gap` is the space
|
|
406
|
+
*between* slots (a slot's bottom padding when another follows it). A lone `Card.Body` is both
|
|
407
|
+
first and last, so padding alone sizes it. To make a compact card with Head + Body + Foot, set
|
|
408
|
+
both.
|
|
409
|
+
- **`tuiCard` is a public container name.** Card is `container-type: inline-size;
|
|
410
|
+
container-name: tuiCard`, so content inside can respond to the card's own width:
|
|
411
|
+
`@container tuiCard (max-width: 36rem) { .my-link { margin-inline-start: 0; } }`. Name it
|
|
412
|
+
explicitly; an unnamed `@container` query can match a nearer container instead.
|
|
413
|
+
- **Clickable card: `<Card interactive>` + `<Card.Link>`.** `Card.Link` is the stretched link
|
|
414
|
+
(its `::after` covers the card), and `interactive` adds the hover/focus border
|
|
415
|
+
(`--tui-card-border-interact`) and the whole-card focus ring. Hand-adding the
|
|
416
|
+
`tui-stretched-link` classes to a Card gets the click target without the hover affordance.
|
|
417
|
+
`Card.Link` takes the card's text colour, so it can wrap the title text itself
|
|
418
|
+
(`--tui-card-link-fg` changes it, and a plain `a { color }` rule won't; an override owns its own
|
|
419
|
+
contrast). A bare `tui-stretched-link` outside a Card sets no colour.
|
|
420
|
+
- **A custom block that should behave like one** (a promo banner that isn't a Card): put
|
|
421
|
+
`tui-stretched-link-container` on the block and `tui-stretched-link` on its one link, then
|
|
422
|
+
mirror the interactive Card yourself: a transparent border at rest, `border-color` on `:hover`
|
|
423
|
+
and `:has(:focus-visible)`. The utility classes only stretch the click target. The
|
|
424
|
+
whole-block focus ring is Card-only (`.tui-card .tui-stretched-link:focus-visible::after`);
|
|
425
|
+
outside a Card the ring stays on the link text unless you draw it on the block. Give the link its
|
|
426
|
+
colour too: outside a Card, `tui-stretched-link` sets none.
|
|
427
|
+
|
|
268
428
|
### Styling one member of a group
|
|
269
429
|
|
|
270
430
|
Selection components expose their state as attributes, so you can style a *particular* option
|
|
@@ -425,9 +585,12 @@ Two clusters are easy to pick wrong:
|
|
|
425
585
|
chips in the trigger), `MultiCombobox` (multi, free-typing token field). All five share one
|
|
426
586
|
listbox engine, so navigation and ARIA behave identically; the trigger is the choice.
|
|
427
587
|
|
|
428
|
-
Icons are a registry, six sets,
|
|
588
|
+
Icons are a registry, six sets, 262 entries (Oct 24 2026): `system` (123), `lms` (45), `reaction`
|
|
429
589
|
(36), `player` (24), `membersync` (22), `cred` (12). `@tangible/ui/icons/manifest` is the
|
|
430
|
-
machine-readable list.
|
|
590
|
+
machine-readable list. Search it across all sets, by name and by `aliasOf`: an alias names the same
|
|
591
|
+
glyph a second way (`system/refresh` and `system/rotate` are `system/arrow-counterclockwise`).
|
|
592
|
+
General-purpose glyphs live in `system` (`system/info`, `system/help-circle-fill`,
|
|
593
|
+
`system/question-mark`); their old `lms/` keys still work as aliases.
|
|
431
594
|
|
|
432
595
|
```tsx
|
|
433
596
|
<Icon name="system/check" /> {/* decorative — hidden from AT automatically */}
|
|
@@ -515,6 +678,40 @@ Re-verify before you work around anything.
|
|
|
515
678
|
- **`tui-manifest.json` is lossy** — see "Where the API lives" above for the shape of it.
|
|
516
679
|
([#87](https://github.com/TangibleInc/tangible-ui/issues/87))
|
|
517
680
|
|
|
681
|
+
## House patterns, by app type
|
|
682
|
+
|
|
683
|
+
Decisions Julia has made for a kind of app, recorded so the next app of that kind starts from them.
|
|
684
|
+
They are house style for that app type, not TUI rules: check the app type before applying one.
|
|
685
|
+
|
|
686
|
+
### Public single-purpose web app
|
|
687
|
+
|
|
688
|
+
A public React app with one job and a handful of screens: HushNote (`tangible-hush`,
|
|
689
|
+
hush.tangible.one) is the reference. `<body class="tui-interface">` with `data-theme` on `<html>`,
|
|
690
|
+
and tangible-strings' `brand.css`.
|
|
691
|
+
|
|
692
|
+
- **Action rows.** Primary action `variant="solid"`, secondary `variant="outline"`, and an
|
|
693
|
+
escape or start-again action as `variant="link" theme="secondary"` pushed to the far end of the
|
|
694
|
+
row with `margin-inline-start: auto`. Every button has a leading icon (Copy link
|
|
695
|
+
`system/copy`, Email link `system/envelope`, Write another note `system/arrow-counterclockwise`
|
|
696
|
+
aka `system/refresh`).
|
|
697
|
+
- **Every Notice has an icon,** mapped from its theme: warning → `system/alert-triangle`,
|
|
698
|
+
danger → `system/alert-circle-fill`, info → `lms/info`. Use `<Notice inline>` with
|
|
699
|
+
`<Notice.Head icon={…} />` and no title for a one-line message. Use `theme="info"`, not
|
|
700
|
+
neutral, for "this is gone once you leave" warnings.
|
|
701
|
+
- **Toasts are non-dismissible and always time out:** `dismissible: false`, 3s for success, 8s
|
|
702
|
+
for a failure that asks the user to act. A repeated action reuses one toast `id`, so it
|
|
703
|
+
refreshes instead of stacking. (Never pair `dismissible: false` with `duration: null`; TUI
|
|
704
|
+
warns in dev.)
|
|
705
|
+
- **Clickable cards are `<Card interactive>` + `<Card.Link>`;** a non-Card promo block mirrors
|
|
706
|
+
it (see "Card spacing, container and links"). Dark-mode hover border in the block's own text
|
|
707
|
+
colour; light mode `--tui-theme-primary-base`, as Card does.
|
|
708
|
+
- **Sibling surfaces share one radius,** fed from one list-level property
|
|
709
|
+
(`--offer-radius: var(--tui-radius-lg)`) into both `--tui-card-radius` and a custom block's
|
|
710
|
+
`border-radius`, so they can't drift.
|
|
711
|
+
- **Single-action screens are centred both ways** between header and footer
|
|
712
|
+
(`main:has(> .centred-screen)` as a flex column with even padding), with
|
|
713
|
+
`text-wrap: balance` on the heading and lede.
|
|
714
|
+
|
|
518
715
|
## Verify
|
|
519
716
|
|
|
520
717
|
`tsc --noEmit` catches guessed props immediately — TUI ships types, and most unions are literal.
|