@seanyeh77/ui 0.45.0 → 0.47.0

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 (210) hide show
  1. package/dist/bundle.js +19 -19
  2. package/dist/components/Alert/Alert.d.ts +2 -1
  3. package/dist/components/Alert/Alert.js +15 -17
  4. package/dist/components/Alert/Alert.js.map +1 -1
  5. package/dist/components/AppShell/AppShell.d.ts +3 -3
  6. package/dist/components/AppShell/AppShell.js +9 -10
  7. package/dist/components/AppShell/AppShell.js.map +1 -1
  8. package/dist/components/Badge/Badge.d.ts +4 -4
  9. package/dist/components/Badge/Badge.js +7 -1
  10. package/dist/components/Badge/Badge.js.map +1 -1
  11. package/dist/components/Breadcrumb/Breadcrumb.js +1 -0
  12. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
  13. package/dist/components/Calendar/Calendar.js +6 -2
  14. package/dist/components/Calendar/Calendar.js.map +1 -1
  15. package/dist/components/ConsoleLayout/ConsoleLayout.js +15 -12
  16. package/dist/components/ConsoleLayout/ConsoleLayout.js.map +1 -1
  17. package/dist/components/DataTable/DataTable.d.ts +8 -0
  18. package/dist/components/DataTable/DataTable.js +188 -34
  19. package/dist/components/DataTable/DataTable.js.map +1 -1
  20. package/dist/components/DataTable/filters.js +10 -4
  21. package/dist/components/DataTable/filters.js.map +1 -1
  22. package/dist/components/DatePicker/DatePicker.js +1 -0
  23. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  24. package/dist/components/DateRangePicker/DateRangePicker.js +1 -0
  25. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
  26. package/dist/components/DetailList/DetailList.d.ts +8 -1
  27. package/dist/components/DetailList/DetailList.js +16 -2
  28. package/dist/components/DetailList/DetailList.js.map +1 -1
  29. package/dist/components/EmptyState/EmptyState.js +19 -1
  30. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  31. package/dist/components/EventTimeline/EventTimeline.js +6 -3
  32. package/dist/components/EventTimeline/EventTimeline.js.map +1 -1
  33. package/dist/components/FileUpload/FileUpload.js +2 -2
  34. package/dist/components/FileUpload/FileUpload.js.map +1 -1
  35. package/dist/components/Grid/Grid.d.ts +5 -2
  36. package/dist/components/Grid/Grid.js +4 -3
  37. package/dist/components/Grid/Grid.js.map +1 -1
  38. package/dist/components/InlineCode/InlineCode.js +7 -6
  39. package/dist/components/InlineCode/InlineCode.js.map +1 -1
  40. package/dist/components/KpiCard/KpiCard.d.ts +6 -4
  41. package/dist/components/KpiCard/KpiCard.js +6 -12
  42. package/dist/components/KpiCard/KpiCard.js.map +1 -1
  43. package/dist/components/LayerGraph/LayerGraph.js +47 -13
  44. package/dist/components/LayerGraph/LayerGraph.js.map +1 -1
  45. package/dist/components/MultiSelect/MultiSelect.js +73 -45
  46. package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
  47. package/dist/components/NotificationBell/NotificationBell.d.ts +6 -3
  48. package/dist/components/NotificationBell/NotificationBell.js +14 -3
  49. package/dist/components/NotificationBell/NotificationBell.js.map +1 -1
  50. package/dist/components/PageHeader/PageHeader.d.ts +3 -2
  51. package/dist/components/PageHeader/PageHeader.js +10 -1
  52. package/dist/components/PageHeader/PageHeader.js.map +1 -1
  53. package/dist/components/RelativeTime/RelativeTime.js +4 -3
  54. package/dist/components/RelativeTime/RelativeTime.js.map +1 -1
  55. package/dist/components/Select/Select.js +1 -1
  56. package/dist/components/Select/Select.js.map +1 -1
  57. package/dist/components/SettingsLayout/SettingsLayout.d.ts +6 -4
  58. package/dist/components/SettingsLayout/SettingsLayout.js +38 -11
  59. package/dist/components/SettingsLayout/SettingsLayout.js.map +1 -1
  60. package/dist/components/SideNav/SideNav.d.ts +10 -5
  61. package/dist/components/SideNav/SideNav.js +10 -6
  62. package/dist/components/SideNav/SideNav.js.map +1 -1
  63. package/dist/components/SplitPane/SplitPane.d.ts +2 -2
  64. package/dist/components/SplitPane/SplitPane.js +29 -9
  65. package/dist/components/SplitPane/SplitPane.js.map +1 -1
  66. package/dist/components/TextField/TextField.d.ts +8 -2
  67. package/dist/components/TextField/TextField.js +59 -13
  68. package/dist/components/TextField/TextField.js.map +1 -1
  69. package/dist/components/TopBar/TopBar.d.ts +2 -2
  70. package/dist/components/TopBar/TopBar.js.map +1 -1
  71. package/dist/components/Workbench/Workbench.d.ts +8 -5
  72. package/dist/components/Workbench/Workbench.js +184 -157
  73. package/dist/components/Workbench/Workbench.js.map +1 -1
  74. package/dist/components/ZoneMap/ZoneMap.js +4 -4
  75. package/dist/components/ZoneMap/ZoneMap.js.map +1 -1
  76. package/dist/components/useFormErrors/useFormErrors.d.ts +5 -2
  77. package/dist/components/useFormErrors/useFormErrors.js +10 -4
  78. package/dist/components/useFormErrors/useFormErrors.js.map +1 -1
  79. package/dist/css/AccentPicker.css +19 -0
  80. package/dist/css/Alert.css +30 -7
  81. package/dist/css/AppShell.css +12 -0
  82. package/dist/css/Calendar.css +7 -0
  83. package/dist/css/ConsoleLayout.css +3 -0
  84. package/dist/css/DataTable.css +70 -8
  85. package/dist/css/DetailList.css +11 -0
  86. package/dist/css/EmptyState.css +8 -0
  87. package/dist/css/EventTimeline.css +11 -4
  88. package/dist/css/Grid.css +15 -0
  89. package/dist/css/KpiCard.css +1 -0
  90. package/dist/css/LayerGraph.css +1 -1
  91. package/dist/css/LoadingBar.css +4 -1
  92. package/dist/css/LoginCard.css +1 -1
  93. package/dist/css/MobileTabBar.css +6 -4
  94. package/dist/css/MultiSelect.css +23 -3
  95. package/dist/css/Select.css +9 -0
  96. package/dist/css/SettingsLayout.css +29 -14
  97. package/dist/css/Tabs.css +36 -17
  98. package/dist/css/Toast.css +7 -0
  99. package/dist/css/TopBar.css +6 -3
  100. package/dist/css/Workbench.css +10 -5
  101. package/dist/css/base.css +90 -3
  102. package/dist/css/end.css +5 -2
  103. package/dist/fonts-latin.css +2 -0
  104. package/dist/fonts-tc.css +2 -0
  105. package/dist/format.d.ts +4 -3
  106. package/dist/format.js +13 -12
  107. package/dist/format.js.map +1 -1
  108. package/dist/i18n.js +17 -6
  109. package/dist/i18n.js.map +1 -1
  110. package/dist/icons/Icon.d.ts +2 -1
  111. package/dist/icons/Icon.js +4 -3
  112. package/dist/icons/Icon.js.map +1 -1
  113. package/dist/icons/all.js +23 -1
  114. package/dist/icons/all.js.map +1 -1
  115. package/dist/icons/names.d.ts +22 -0
  116. package/dist/icons/names.js +11 -0
  117. package/dist/icons/names.js.map +1 -1
  118. package/dist/icons/ph/credit-card.d.ts +10 -0
  119. package/dist/icons/ph/credit-card.js +11 -0
  120. package/dist/icons/ph/credit-card.js.map +1 -0
  121. package/dist/icons/ph/map-pin.d.ts +10 -0
  122. package/dist/icons/ph/map-pin.js +11 -0
  123. package/dist/icons/ph/map-pin.js.map +1 -0
  124. package/dist/icons/ph/package.d.ts +10 -0
  125. package/dist/icons/ph/package.js +11 -0
  126. package/dist/icons/ph/package.js.map +1 -0
  127. package/dist/icons/ph/pause.d.ts +10 -0
  128. package/dist/icons/ph/pause.js +11 -0
  129. package/dist/icons/ph/pause.js.map +1 -0
  130. package/dist/icons/ph/phone.d.ts +10 -0
  131. package/dist/icons/ph/phone.js +11 -0
  132. package/dist/icons/ph/phone.js.map +1 -0
  133. package/dist/icons/ph/play.d.ts +10 -0
  134. package/dist/icons/ph/play.js +11 -0
  135. package/dist/icons/ph/play.js.map +1 -0
  136. package/dist/icons/ph/prohibit.d.ts +10 -0
  137. package/dist/icons/ph/prohibit.js +11 -0
  138. package/dist/icons/ph/prohibit.js.map +1 -0
  139. package/dist/icons/ph/receipt.d.ts +10 -0
  140. package/dist/icons/ph/receipt.js +11 -0
  141. package/dist/icons/ph/receipt.js.map +1 -0
  142. package/dist/icons/ph/shopping-cart.d.ts +10 -0
  143. package/dist/icons/ph/shopping-cart.js +11 -0
  144. package/dist/icons/ph/shopping-cart.js.map +1 -0
  145. package/dist/icons/ph/storefront.d.ts +10 -0
  146. package/dist/icons/ph/storefront.js +11 -0
  147. package/dist/icons/ph/storefront.js.map +1 -0
  148. package/dist/icons/ph/truck.d.ts +10 -0
  149. package/dist/icons/ph/truck.js +11 -0
  150. package/dist/icons/ph/truck.js.map +1 -0
  151. package/dist/icons/store.d.ts +3 -1
  152. package/dist/icons/store.js +17 -12
  153. package/dist/icons/store.js.map +1 -1
  154. package/dist/index.d.ts +2 -2
  155. package/dist/index.js +2 -2
  156. package/dist/internal/FloatingPanel.js +5 -2
  157. package/dist/internal/FloatingPanel.js.map +1 -1
  158. package/dist/internal/clickSteps.js +11 -0
  159. package/dist/internal/clickSteps.js.map +1 -0
  160. package/dist/internal/util.js +7 -1
  161. package/dist/internal/util.js.map +1 -1
  162. package/dist/styles.css +499 -162
  163. package/dist/theme.d.ts +7 -0
  164. package/dist/theme.js +39 -15
  165. package/dist/theme.js.map +1 -1
  166. package/docs/Alert.md +1 -1
  167. package/docs/AppShell.md +4 -4
  168. package/docs/Badge.md +2 -1
  169. package/docs/BarChart.md +1 -1
  170. package/docs/Checkbox.md +2 -2
  171. package/docs/CodeView.md +12 -22
  172. package/docs/ConsoleLayout.md +1 -0
  173. package/docs/DataTable.md +16 -11
  174. package/docs/DatePicker.md +1 -1
  175. package/docs/DateRangePicker.md +1 -0
  176. package/docs/DetailList.md +12 -1
  177. package/docs/Drawer.md +1 -1
  178. package/docs/EmptyState.md +1 -0
  179. package/docs/EventTimeline.md +1 -1
  180. package/docs/Format.md +2 -1
  181. package/docs/Graph.md +1 -0
  182. package/docs/Grid.md +9 -0
  183. package/docs/KpiCard.md +5 -4
  184. package/docs/LoadingBar.md +1 -1
  185. package/docs/LoginCard.md +1 -1
  186. package/docs/Markdown.md +4 -37
  187. package/docs/MobileTabBar.md +1 -1
  188. package/docs/MultiSelect.md +3 -2
  189. package/docs/NotificationBell.md +2 -2
  190. package/docs/PageHeader.md +2 -1
  191. package/docs/RadioGroup.md +1 -1
  192. package/docs/RelativeTime.md +2 -2
  193. package/docs/SettingsLayout.md +5 -4
  194. package/docs/SideNav.md +2 -1
  195. package/docs/Skeleton.md +2 -2
  196. package/docs/SplitPane.md +3 -9
  197. package/docs/Tabs.md +14 -11
  198. package/docs/Tag.md +4 -3
  199. package/docs/TextField.md +2 -0
  200. package/docs/Toast.md +1 -1
  201. package/docs/TopBar.md +2 -2
  202. package/docs/Workbench.md +9 -6
  203. package/docs/agents.md +13 -13
  204. package/docs/data.md +2 -1
  205. package/docs/guidelines.md +4 -4
  206. package/docs/icons.md +2 -2
  207. package/docs/layout.md +3 -3
  208. package/docs/theme.md +6 -3
  209. package/docs/useFormErrors.md +2 -1
  210. package/package.json +4 -2
@@ -6,9 +6,11 @@
6
6
  .ui-alert {
7
7
  position: relative;
8
8
  overflow: hidden;
9
- display: flex;
10
- gap: var(--space-3);
11
- align-items: flex-start;
9
+ /* icon, text, action, ✕: the action at the right end of the text; under the text when the alert is narrow. */
10
+ display: grid;
11
+ grid-template-columns: auto minmax(0, 1fr) auto auto;
12
+ align-items: start;
13
+ container-type: inline-size;
12
14
  padding: var(--space-3) var(--space-4);
13
15
  border-radius: var(--radius-md);
14
16
  background: var(--surface);
@@ -29,7 +31,9 @@
29
31
  --alert-color: var(--danger);
30
32
  }
31
33
  .ui-alert-icon {
34
+ grid-column: 1;
32
35
  margin-top: 1px;
36
+ margin-right: var(--space-3);
33
37
  color: var(--alert-color);
34
38
  }
35
39
  /* The info icon sits by its text: accent-text, so a light accent still reads. */
@@ -37,7 +41,7 @@
37
41
  color: var(--accent-text);
38
42
  }
39
43
  .ui-alert-content {
40
- flex: 1 1 auto;
44
+ grid-column: 2;
41
45
  min-width: 0;
42
46
  }
43
47
  .ui-alert-title {
@@ -47,13 +51,25 @@
47
51
  color: var(--ink-muted);
48
52
  }
49
53
  .ui-alert-action {
50
- margin-top: var(--space-2);
54
+ grid-column: 3;
55
+ align-self: center;
56
+ margin-left: var(--space-4);
57
+ }
58
+ @container (max-width: 479px) {
59
+ .ui-alert-action {
60
+ grid-column: 2;
61
+ grid-row: 2;
62
+ justify-self: start;
63
+ margin: var(--space-2) 0 0;
64
+ }
51
65
  }
52
66
  .ui-alert-close {
53
- flex: 0 0 40px;
67
+ grid-column: 4;
68
+ grid-row: 1;
54
69
  width: 40px;
55
70
  height: 40px;
56
- margin: -8px -8px -8px 0;
71
+ /* Its box ends at the padding edge, where an action button ends in an alert without ✕. */
72
+ margin: -8px 0 -8px var(--space-3);
57
73
  border: 0;
58
74
  border-radius: var(--radius-sm);
59
75
  background: transparent;
@@ -63,6 +79,13 @@
63
79
  align-items: center;
64
80
  justify-content: center;
65
81
  }
82
+ /* Beside an action: centred on the same line as the button, not at the top. */
83
+ @container (min-width: 480px) {
84
+ .ui-alert:has(> .ui-alert-action) > .ui-alert-close {
85
+ align-self: center;
86
+ margin-block: 0;
87
+ }
88
+ }
66
89
  .ui-alert-close:hover {
67
90
  background: var(--surface-sub);
68
91
  }
@@ -9,6 +9,8 @@
9
9
  .ui-shell {
10
10
  display: flex;
11
11
  height: 100dvh;
12
+ /* Nothing in the frame reaches past the viewport, so the document itself never scrolls. */
13
+ overflow: clip;
12
14
  background: var(--bg);
13
15
  color: var(--ink);
14
16
  }
@@ -65,6 +67,9 @@
65
67
  outline: none;
66
68
  }
67
69
  .ui-shell-main {
70
+ /* The scroll container is the containing block of absolutely positioned descendants (visually hidden text, a
71
+ chart's data table): positioned against the body instead, they grew the document past the viewport on phones. */
72
+ position: relative;
68
73
  flex: 1 1 auto;
69
74
  min-height: 0;
70
75
  overflow-y: auto;
@@ -74,6 +79,13 @@
74
79
  .ui-shell.is-phone .ui-shell-main {
75
80
  padding: calc(var(--header-height) + var(--space-4)) var(--space-4) var(--space-6);
76
81
  }
82
+ /* No top bar (a detail page whose PageHeader has the title, and nothing else for the bar): content starts at the top. */
83
+ .ui-shell.is-bare .ui-shell-main {
84
+ padding-top: var(--space-6);
85
+ }
86
+ .ui-shell.is-bare.is-phone .ui-shell-main {
87
+ padding-top: var(--space-4);
88
+ }
77
89
  @media (prefers-reduced-motion: reduce) {
78
90
  .ui-shell-top {
79
91
  transition: none;
@@ -93,4 +93,11 @@
93
93
  .ui-cal-day.is-today.is-sel::after {
94
94
  background: var(--on-accent);
95
95
  }
96
+ /* Windows high contrast: the accent fill of the chosen day is dropped, so it gets an outline as well as bold. */
97
+ @media (forced-colors: active) {
98
+ .ui-cal-day.is-sel {
99
+ outline: 2px solid Highlight;
100
+ outline-offset: -2px;
101
+ }
102
+ }
96
103
  }
@@ -62,6 +62,9 @@
62
62
  display: flex;
63
63
  align-items: stretch;
64
64
  }
65
+ .ui-console-content {
66
+ display: contents;
67
+ }
65
68
  .ui-console-main {
66
69
  grid-column: 1;
67
70
  grid-row: 2;
@@ -3,6 +3,7 @@
3
3
  @import './InlineCode.css';
4
4
  @import './Button.css';
5
5
  @import './Dialog.css';
6
+ @import './Skeleton.css';
6
7
  @import './Tabs.css';
7
8
  @import './Checkbox.css';
8
9
  @import './RadioGroup.css';
@@ -275,10 +276,31 @@
275
276
  .ui-dt-tools.is-onerow > .ui-dt-actions {
276
277
  flex: none;
277
278
  }
279
+ /* The summary keeps the segmented look (a gray track, the current part a raised white pill), the user's choice for
280
+ summaries; plain Tabs are underlined. */
281
+ .ui-tabs.ui-dt-summary {
282
+ display: inline-flex;
283
+ width: auto;
284
+ height: auto;
285
+ padding: 4px;
286
+ border-radius: var(--radius-md);
287
+ background: var(--surface-sub);
288
+ box-shadow: none;
289
+ }
290
+ .ui-dt-summary .ui-tabs-ind {
291
+ top: 4px;
292
+ bottom: 4px;
293
+ height: auto;
294
+ border: 1px solid var(--line-strong);
295
+ border-radius: var(--radius-sm);
296
+ background: var(--surface);
297
+ box-shadow: var(--shadow-sm);
298
+ }
278
299
  .ui-dt-summary .ui-tab {
279
300
  min-width: 0;
280
301
  height: 32px;
281
302
  padding: 0 var(--space-3);
303
+ border-radius: var(--radius-sm);
282
304
  }
283
305
  /* Phones, also for tools that moved into a Card title row (outside the table, so not reached by the container). The
284
306
  buttons are as tall as the 48 px search field beside them. */
@@ -425,14 +447,40 @@
425
447
  font-variant-numeric: tabular-nums;
426
448
  white-space: nowrap;
427
449
  }
428
- /* Hugging columns are measured on one line (DataTable adds is-measuring for the read only). */
450
+ .ui-dt-nowrap {
451
+ white-space: nowrap;
452
+ }
453
+ /* Chromium breaks at <wbr> even inside white-space: nowrap: in the table a date and its time stay on one line. The
454
+ phone cards turn the break back on. */
455
+ .ui-dt-time wbr {
456
+ display: none;
457
+ }
458
+ /* Code and paths in a row are the row's size, in Geist Mono: one text size per row. */
459
+ .ui-dt-body .ui-dt-cell .ui-code,
460
+ .ui-dt-body .ui-dt-cell .ui-code.is-link.is-location {
461
+ font-size: inherit;
462
+ }
463
+ /* Hugging columns are measured on one line (DataTable adds is-measuring for the read only), headings at their full
464
+ width too, so a column is never narrower than its heading, also while it holds only loading bars. */
429
465
  .ui-dt.is-measuring .ui-dt-cell.is-hug {
430
466
  white-space: nowrap;
431
467
  }
468
+ .ui-dt.is-measuring .ui-dt-cell.is-hug > .ui-dt-sort {
469
+ flex: none;
470
+ max-width: none;
471
+ }
472
+ /* Loading bars keep their width in the cell (a flex box would shrink them). */
473
+ .ui-dt-skelrow .ui-skel {
474
+ flex: none;
475
+ }
432
476
 
433
477
  .ui-dt-body .ui-dt-row:last-child {
434
478
  border-bottom: 0;
435
479
  }
480
+ /* Copies of rows that left the page slide out inside the body only: clipped there while they animate. */
481
+ .ui-dt-body.is-leaving {
482
+ overflow: clip;
483
+ }
436
484
  .ui-dt-ghost {
437
485
  position: absolute;
438
486
  left: 0;
@@ -903,16 +951,29 @@
903
951
  and break mid-word (「ucp_worker_progre / ss」). */
904
952
  overflow-wrap: break-word;
905
953
  }
906
- /* Each field on one line: its name (small, muted) in the left 40 %, the value in the rest, wrapping there. A name
907
- too long for its 40 % is cut with …; the value never moves under it. */
954
+ /* Each field on one line: its name (small, muted) in a fixed 6 rem column (6 characters), the value in the rest,
955
+ wrapping there. A longer name is cut with …; the value never moves under it. A date and its time each stay whole. */
908
956
  .ui-dt-body .ui-dt-cell[data-label]:not(.is-m-title, .is-m-status) {
909
957
  position: relative;
910
958
  min-height: 20px;
911
959
  margin-top: var(--space-1);
912
- padding-left: calc(40% + var(--space-3));
960
+ padding-left: calc(6rem + var(--space-3));
961
+ }
962
+ /* A date with its time wraps only between the two (each part is whole, see .ui-dt-nowrap). */
963
+ .ui-dt-body .ui-dt-cell .ui-dt-time {
964
+ white-space: normal;
965
+ }
966
+ .ui-dt-body .ui-dt-cell .ui-dt-time wbr {
967
+ display: inline;
968
+ }
969
+ /* Each part stays whole while it fits on a line; only a card narrower than the part (320 px, wide text spacing)
970
+ breaks inside it, rather than overflowing the card. */
971
+ .ui-dt-body .ui-dt-cell .ui-dt-nowrap {
972
+ display: inline-block;
973
+ max-width: 100%;
974
+ white-space: normal;
975
+ overflow-wrap: anywhere;
913
976
  }
914
- /* The value has 60 % of the card: a long date (「2026/11/13(五) 05:00」) wraps there instead of running out. */
915
- .ui-dt-body .ui-dt-cell .ui-dt-time,
916
977
  .ui-dt-body .ui-dt-cell.is-num {
917
978
  white-space: normal;
918
979
  }
@@ -921,13 +982,14 @@
921
982
  position: absolute;
922
983
  top: 0;
923
984
  left: 0;
924
- width: 40%;
985
+ width: 6rem;
925
986
  overflow: hidden;
926
987
  text-overflow: ellipsis;
927
988
  color: var(--ink-muted);
928
989
  font-family: var(--font-sans);
929
990
  font-size: var(--text-small);
930
- line-height: inherit;
991
+ /* The value's line height (1lh here is the cell's), so the smaller name sits on the value's baseline. */
992
+ line-height: 1lh;
931
993
  font-weight: 400;
932
994
  white-space: nowrap;
933
995
  }
@@ -1,5 +1,6 @@
1
1
  @layer theme, base, ui, components, utilities;
2
2
  @layer ui.tokens, ui.components;
3
+ @import './Link.css';
3
4
  @layer ui.components {
4
5
  /* DetailList */
5
6
  .ui-dl {
@@ -23,6 +24,16 @@
23
24
  min-width: 0;
24
25
  overflow-wrap: anywhere;
25
26
  }
27
+ /* A row with href: the whole row opens the link, at least 48 px tall (a touch target), centered on the value. */
28
+ .ui-dl-item.has-link {
29
+ min-height: var(--touch-target);
30
+ box-sizing: border-box;
31
+ align-items: center;
32
+ cursor: pointer;
33
+ }
34
+ .ui-dl-item.has-link:hover .ui-textlink {
35
+ text-decoration-thickness: 2px;
36
+ }
26
37
  @container (max-width: 599px) {
27
38
  .ui-dl-item {
28
39
  grid-template-columns: minmax(0, 1fr);
@@ -21,6 +21,14 @@
21
21
  font-size: var(--text-compact);
22
22
  color: var(--ink-muted);
23
23
  }
24
+ /* Phones: a description of more than 2 lines (EmptyState adds is-long) left-aligns the whole block, title, steps and
25
+ button with it, so nothing is centred above left-aligned text; up to 2 lines everything stays centred. */
26
+ @media (max-width: 599px) {
27
+ .ui-empty.is-long {
28
+ align-items: flex-start;
29
+ text-align: start;
30
+ }
31
+ }
24
32
  .ui-steps {
25
33
  list-style: none;
26
34
  margin: var(--space-2) 0;
@@ -27,14 +27,17 @@
27
27
  border-bottom: 0;
28
28
  }
29
29
  .ui-events-time {
30
+ /* The row's size: the time, the icon and the sentence are one row, so one text size. */
30
31
  font-family: var(--font-mono);
31
- font-size: var(--text-small);
32
32
  color: var(--ink-muted);
33
33
  font-variant-numeric: tabular-nums;
34
34
  }
35
35
  .ui-events-kind {
36
36
  display: inline-flex;
37
- align-self: center;
37
+ align-items: center;
38
+ /* As tall as the first line of the text, the icon centred on it: aligned with the time, also when the text wraps. */
39
+ align-self: start;
40
+ height: 1lh;
38
41
  color: var(--ink-muted);
39
42
  }
40
43
  .ui-events li.is-tone-info .ui-events-kind {
@@ -59,10 +62,14 @@
59
62
  .ui-events-date:first-child {
60
63
  padding-top: 0;
61
64
  }
62
- /* Who did it: after the sentence, muted, the same size. */
65
+ /* Who did it: after the sentence, muted, the same size, 8 px after it. */
66
+ .ui-events-gap {
67
+ word-spacing: calc(var(--space-2) - 0.25em);
68
+ }
63
69
  .ui-events-actor {
64
- margin-left: var(--space-2);
65
70
  color: var(--ink-muted);
71
+ /* A name stays whole: it moves to the next line rather than splitting (「系/統」). */
72
+ white-space: nowrap;
66
73
  }
67
74
  .ui-events-empty {
68
75
  margin: 0;
package/dist/css/Grid.css CHANGED
@@ -31,6 +31,18 @@
31
31
  grid-template-columns: var(--grid-ratio);
32
32
  align-items: start;
33
33
  }
34
+ .ui-grid.is-ratio.is-stretch,
35
+ .ui-grid.is-stretch {
36
+ align-items: stretch;
37
+ }
38
+ .ui-grid.is-start {
39
+ align-items: start;
40
+ }
41
+ /* A Page as one cell: several cards stacked in one column, 24 px apart like the columns (16 px on phones). */
42
+ .ui-grid > .ui-page {
43
+ gap: var(--space-6);
44
+ min-width: 0;
45
+ }
34
46
  @media (max-width: 1279px) {
35
47
  .ui-grid.is-4 {
36
48
  --cols: 2;
@@ -52,5 +64,8 @@
52
64
  --cols: 1 !important;
53
65
  gap: var(--space-4);
54
66
  }
67
+ .ui-grid > .ui-page {
68
+ gap: var(--space-4);
69
+ }
55
70
  }
56
71
  }
@@ -55,6 +55,7 @@
55
55
  .ui-kpi-change.is-bad {
56
56
  color: var(--danger-text);
57
57
  }
58
+ .ui-kpi-change.is-flat,
58
59
  .ui-kpi-note {
59
60
  color: var(--ink-muted);
60
61
  }
@@ -1,9 +1,9 @@
1
1
  @layer theme, base, ui, components, utilities;
2
2
  @layer ui.tokens, ui.components;
3
- @import './Tabs.css';
4
3
  @import './Switch.css';
5
4
  @import './IconButton.css';
6
5
  @import './Graph.css';
6
+ @import './SegmentedControl.css';
7
7
  @layer ui.components {
8
8
  /* LayerGraph */
9
9
  .ui-lg-scroller {
@@ -34,12 +34,15 @@
34
34
  ui-drop-l var(--dur-loop) cubic-bezier(0.65, 0, 0.35, 1) infinite,
35
35
  ui-drop-r var(--dur-loop) var(--ease-standard) infinite;
36
36
  }
37
+ /* Reduced motion: a still bar across the whole track, accent stripes on the track (full accent, 3:1 against it), so it
38
+ reads as 「busy」 and not as a fixed amount done. */
37
39
  @media (prefers-reduced-motion: reduce) {
38
40
  .ui-loading-drop {
39
41
  animation: none;
40
42
  left: 0;
41
43
  right: 0;
42
- opacity: 0.5;
44
+ border-radius: 0;
45
+ background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, transparent 6px 12px);
43
46
  }
44
47
  }
45
48
  }
@@ -20,7 +20,7 @@
20
20
  box-sizing: border-box;
21
21
  padding: 28px;
22
22
  border-radius: var(--radius-lg);
23
- border: 1px solid var(--line);
23
+ /* Shadow only, like every other card; in the dark theme the surface already stands off the page. */
24
24
  background: var(--surface);
25
25
  box-shadow: var(--shadow-card);
26
26
  display: flex;
@@ -32,17 +32,19 @@
32
32
  .ui-tabbar-item.is-selected {
33
33
  color: var(--accent-text);
34
34
  }
35
- /* MA: an 11 px label under each icon; the pill sits behind the icon only. */
35
+ /* MA: an 11 px label under each icon; the pill sits behind the icon only: centred on it (22 px icon, 28 px pill) and
36
+ clear of the label (6 px gap). The icon, gap and label (42 px) are centred in the bar, so the pill's centre is the
37
+ bar's middle less 21 px plus 11 px. */
36
38
  .ui-tabbar.has-labels {
37
39
  height: 64px;
38
40
  }
39
41
  .ui-tabbar.has-labels .ui-tabbar-item {
40
42
  flex-direction: column;
41
- gap: 2px;
42
- padding-top: 2px;
43
+ gap: 6px;
43
44
  }
44
45
  .ui-tabbar.has-labels .ui-tabbar-pill {
45
- top: 8px;
46
+ top: calc(50% - 24px);
47
+ height: 28px;
46
48
  }
47
49
  .ui-tabbar-label {
48
50
  font-size: var(--text-mini);
@@ -9,8 +9,9 @@
9
9
  flex-wrap: nowrap;
10
10
  align-items: center;
11
11
  gap: 6px;
12
- min-height: var(--control-height);
13
- padding: 4px 8px;
12
+ /* One row (chips that do not fit become 「+n」): exactly the 40 px of every other field. */
13
+ height: var(--control-height);
14
+ padding: 0 4px 0 8px;
14
15
  box-sizing: border-box;
15
16
  border: 1px solid var(--line-strong);
16
17
  border-radius: var(--radius-md);
@@ -56,8 +57,9 @@
56
57
  white-space: nowrap;
57
58
  }
58
59
  .ui-ms-input {
60
+ /* Shrinks before the 清除 button is pushed out of a narrow field. */
59
61
  flex: 1 1 80px;
60
- min-width: 80px;
62
+ min-width: 32px;
61
63
  height: 30px;
62
64
  border: 0;
63
65
  outline: none;
@@ -76,4 +78,22 @@
76
78
  .ui-ms-chips {
77
79
  display: contents;
78
80
  }
81
+ /* 清除: every value at once, at the field's right end (shown from 2 values; one value has its chip's ×). */
82
+ .ui-ms-clear {
83
+ flex: none;
84
+ width: 32px;
85
+ height: 32px;
86
+ border: 0;
87
+ border-radius: var(--radius-sm);
88
+ background: transparent;
89
+ color: var(--ink-muted);
90
+ display: inline-flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ cursor: pointer;
94
+ }
95
+ .ui-ms-clear:hover {
96
+ background: var(--surface-sub);
97
+ color: var(--ink);
98
+ }
79
99
  }
@@ -37,6 +37,15 @@
37
37
  .ui-select-trigger[data-popup-open] .ui-select-chev {
38
38
  transform: rotate(180deg);
39
39
  }
40
+ /* The value or placeholder fills the row, so the error icon and the caret sit together at the right end. */
41
+ .ui-select-text {
42
+ flex: 1 1 auto;
43
+ min-width: 0;
44
+ overflow: hidden;
45
+ text-overflow: ellipsis;
46
+ white-space: nowrap;
47
+ text-align: left;
48
+ }
40
49
  .is-placeholder {
41
50
  color: var(--ink-muted);
42
51
  }
@@ -1,7 +1,9 @@
1
1
  @layer theme, base, ui, components, utilities;
2
2
  @layer ui.tokens, ui.components;
3
3
  @import './InlineCode.css';
4
+ @import './Button.css';
4
5
  @import './Toast.css';
6
+ @import './Tabs.css';
5
7
  @layer ui.components {
6
8
  .ui-settings {
7
9
  position: relative;
@@ -74,7 +76,30 @@
74
76
  flex-direction: column;
75
77
  gap: 12px;
76
78
  }
79
+ /* The title row, like a Card's: actions (「還原預設」) at the right end; when they do not fit beside 8 characters of the
80
+ title they move under it, right-aligned. The row is 40 px only when it has actions. */
81
+ .ui-settings-head {
82
+ display: flex;
83
+ flex-wrap: wrap;
84
+ align-items: center;
85
+ gap: var(--space-2) var(--space-3);
86
+ }
87
+ .ui-settings-head:has(> .ui-settings-actions) {
88
+ min-height: var(--control-height);
89
+ }
90
+ .ui-settings-actions {
91
+ display: flex;
92
+ flex: 0 0 auto;
93
+ align-items: center;
94
+ gap: var(--space-2);
95
+ margin-left: auto;
96
+ }
77
97
  .ui-settings-h {
98
+ flex: 1 1 8em;
99
+ min-width: min(8em, 100%);
100
+ overflow: hidden;
101
+ text-overflow: ellipsis;
102
+ white-space: nowrap;
78
103
  margin: 0;
79
104
  font-size: var(--text-title);
80
105
  font-weight: 700;
@@ -111,21 +136,11 @@
111
136
  .ui-settings-body {
112
137
  flex-direction: column;
113
138
  align-items: stretch;
139
+ gap: var(--space-4);
114
140
  }
115
- .ui-settings-nav {
116
- position: static;
117
- flex-direction: row;
118
- overflow-x: auto;
119
- flex-basis: auto;
120
- }
121
- .ui-settings-cat.is-on::before {
122
- left: 8px;
123
- right: 8px;
124
- top: auto;
125
- bottom: 0;
126
- width: auto;
127
- height: 3px;
128
- border-radius: 3px 3px 0 0;
141
+ /* The categories as Tabs, like every other row of tabs: the row scrolls sideways when the names do not fit. */
142
+ .ui-settings-tabs {
143
+ align-self: stretch;
129
144
  }
130
145
  }
131
146
  }
package/dist/css/Tabs.css CHANGED
@@ -1,17 +1,20 @@
1
1
  @layer theme, base, ui, components, utilities;
2
2
  @layer ui.tokens, ui.components;
3
3
  @layer ui.components {
4
+ /* Tabs switch between different content: text on a 1 px baseline rule, the current tab underlined in the accent (an
5
+ underline, not a raised pill, so it never reads like SegmentedControl, which switches how the same content shows).
6
+ 40 px tall, the height of the controls beside it in a toolbar. The baseline runs the full width of the container. */
4
7
  .ui-tabs {
5
8
  position: relative;
6
- display: inline-flex;
9
+ display: flex;
10
+ width: 100%;
7
11
  max-width: 100%;
8
12
  box-sizing: border-box;
9
- /* 40 px in all, the height of the controls beside it in a toolbar. */
10
- padding: 4px;
11
- border-radius: var(--radius-md);
12
- background: var(--surface-sub);
13
+ height: var(--control-height);
14
+ box-shadow: inset 0 -1px 0 var(--line);
13
15
  /* Tabs never wrap or overlap: wider than their box, the row scrolls sideways (the indicator moves with it). */
14
16
  overflow-x: auto;
17
+ overflow-y: hidden;
15
18
  scrollbar-width: none;
16
19
  }
17
20
  .ui-tabs::-webkit-scrollbar {
@@ -27,28 +30,23 @@
27
30
  .ui-tabs.has-more-left.has-more-right {
28
31
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
29
32
  }
30
- /* The selected tab's pill: a line-strong border, so it shows the selection at 3:1 on the gray row (surface on
31
- surface-sub alone is about 1.1:1). */
33
+ /* The current tab's underline: 2 px of accent-text (at least 3:1 on every ground, whatever accent is chosen). */
32
34
  .ui-tabs-ind {
33
35
  position: absolute;
34
- top: 4px;
35
- bottom: 4px;
36
+ bottom: 0;
37
+ height: 2px;
36
38
  box-sizing: border-box;
37
- border: 1px solid var(--line-strong);
38
- border-radius: var(--radius-sm);
39
- background: var(--surface);
40
- box-shadow: var(--shadow-sm);
39
+ background: var(--accent-text);
41
40
  pointer-events: none;
42
41
  }
43
42
  .ui-tab {
44
43
  position: relative;
45
44
  flex: none;
46
- min-width: 96px;
47
45
  white-space: nowrap;
48
- height: 32px;
49
- padding: 0 var(--space-4);
46
+ height: 100%;
47
+ padding: 0 var(--space-3);
50
48
  border: 0;
51
- border-radius: var(--radius-sm);
49
+ border-radius: var(--radius-sm) var(--radius-sm) 0 0;
52
50
  background: transparent;
53
51
  color: var(--ink-muted);
54
52
  font: inherit;
@@ -57,16 +55,37 @@
57
55
  cursor: pointer;
58
56
  transition: color var(--dur-hover) ease;
59
57
  }
58
+ .ui-tab:hover {
59
+ color: var(--ink);
60
+ }
60
61
  .ui-tab.is-selected {
61
62
  color: var(--ink);
62
63
  font-weight: 700;
63
64
  }
64
65
 
66
+ /* Forced colors drop backgrounds and box shadows: the underline is drawn in Highlight and the baseline is a border. */
67
+ @media (forced-colors: active) {
68
+ .ui-tabs {
69
+ box-shadow: none;
70
+ border-bottom: 1px solid CanvasText;
71
+ }
72
+ .ui-tabs-ind {
73
+ forced-color-adjust: none;
74
+ background: Highlight;
75
+ }
76
+ }
77
+
65
78
  @media (prefers-reduced-motion: reduce) {
66
79
  .ui-tabs-ind {
67
80
  transition: opacity var(--dur-hover) ease !important;
68
81
  }
69
82
  }
83
+ /* Phones: 48 px tall, the touch target. */
84
+ @media (max-width: 599px) {
85
+ .ui-tabs {
86
+ height: var(--touch-target);
87
+ }
88
+ }
70
89
  .ui-dt-summary .ui-tab {
71
90
  white-space: nowrap;
72
91
  scroll-snap-align: start;
@@ -79,6 +79,13 @@ div.ui-toast[role='status'] {
79
79
  font-weight: 400;
80
80
  color: var(--ink-muted);
81
81
  }
82
+ /* A touch screen without a pointer that hovers (a phone, a tablet without a mouse): most have no keyboard, so the
83
+ shortcut is not shown. aria-keyshortcuts stays for a keyboard that is attached. */
84
+ @media (pointer: coarse) and (hover: none) {
85
+ .ui-toast-kbd {
86
+ display: none;
87
+ }
88
+ }
82
89
  .ui-toast-close {
83
90
  flex: none;
84
91
  display: inline-flex;