@godxjp/ui 19.4.2 → 19.6.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 (77) hide show
  1. package/dist/app/app-provider.js +10 -1
  2. package/dist/app/theme-axes.d.ts +18 -3
  3. package/dist/app/theme-axes.js +15 -3
  4. package/dist/components/data-display/badge.js +4 -1
  5. package/dist/components/data-display/data-table.js +9 -2
  6. package/dist/components/data-entry/checkbox.d.ts +12 -0
  7. package/dist/components/data-entry/checkbox.js +34 -3
  8. package/dist/components/data-entry/index.d.ts +2 -0
  9. package/dist/components/data-entry/index.js +2 -0
  10. package/dist/components/data-entry/segmented.d.ts +2 -0
  11. package/dist/components/data-entry/segmented.js +5 -0
  12. package/dist/components/data-entry/select.d.ts +2 -0
  13. package/dist/components/data-entry/select.js +8 -3
  14. package/dist/components/feedback/sheet.js +1 -1
  15. package/dist/components/feedback/sonner.d.ts +7 -1
  16. package/dist/components/feedback/sonner.js +27 -7
  17. package/dist/components/general/button.js +6 -1
  18. package/dist/components/general/inert-background.d.ts +8 -3
  19. package/dist/components/general/inert-background.js +26 -2
  20. package/dist/components/general/logo.d.ts +53 -0
  21. package/dist/components/general/logo.js +57 -3
  22. package/dist/components/general/typography.d.ts +7 -1
  23. package/dist/components/general/typography.js +20 -5
  24. package/dist/components/layout/index.d.ts +4 -0
  25. package/dist/components/layout/index.js +4 -0
  26. package/dist/components/layout/nav-list.d.ts +26 -0
  27. package/dist/components/layout/nav-list.js +21 -0
  28. package/dist/components/layout/topbar-item.d.ts +17 -0
  29. package/dist/components/layout/topbar-item.js +21 -0
  30. package/dist/components/navigation/app-setting-picker.js +22 -5
  31. package/dist/components/navigation/context-menu.js +2 -2
  32. package/dist/components/navigation/dropdown-menu.js +2 -2
  33. package/dist/components/navigation/tabs.js +42 -10
  34. package/dist/components/ui/segmented.d.ts +48 -0
  35. package/dist/components/ui/segmented.js +48 -0
  36. package/dist/email/tokens.generated.d.ts +3 -3
  37. package/dist/email/tokens.generated.js +3 -3
  38. package/dist/i18n/messages/en.json +2 -1
  39. package/dist/i18n/messages/ja.json +2 -1
  40. package/dist/i18n/messages/vi.json +2 -1
  41. package/dist/props/components/app.prop.d.ts +9 -2
  42. package/dist/props/components/general.prop.d.ts +31 -1
  43. package/dist/props/components/layout.prop.d.ts +48 -2
  44. package/dist/props/registry.d.ts +19 -0
  45. package/dist/props/registry.js +27 -0
  46. package/dist/props/vocabulary/shared.prop.d.ts +11 -2
  47. package/dist/styles/alert-layout.css +4 -0
  48. package/dist/styles/base.css +2 -0
  49. package/dist/styles/control.css +94 -26
  50. package/dist/styles/data-display-layout.css +2 -1
  51. package/dist/styles/dialog-layout.css +2 -1
  52. package/dist/styles/focus-ring.css +85 -24
  53. package/dist/styles/layout.css +2 -1
  54. package/dist/styles/logo-layout.css +56 -0
  55. package/dist/styles/navigation-layout.css +15 -0
  56. package/dist/styles/shell-layout.css +64 -10
  57. package/dist/styles/text-layout.css +11 -0
  58. package/dist/tokens/antd.generated.css +40 -0
  59. package/dist/tokens/axes.css +6 -0
  60. package/dist/tokens/base.css +4 -0
  61. package/dist/tokens/components/control.css +5 -1
  62. package/dist/tokens/components/feedback.css +2 -0
  63. package/dist/tokens/components/legal-document.css +0 -2
  64. package/dist/tokens/components/logo.css +13 -0
  65. package/dist/tokens/components/navigation.css +2 -0
  66. package/dist/tokens/components/segmented.css +27 -0
  67. package/dist/tokens/components/shell.css +15 -2
  68. package/dist/tokens/components/text.css +7 -0
  69. package/dist/tokens/foundation.css +19 -12
  70. package/docs/DESIGN-AUTHORITY.md +346 -0
  71. package/docs/FRAME-COVERAGE-REPORT.md +5 -2
  72. package/docs/README.md +14 -13
  73. package/docs/data-entry/segmented.tsx +124 -0
  74. package/docs/general/typography.tsx +84 -1
  75. package/docs/layout/nav-list.tsx +63 -0
  76. package/docs/layout/topbar-item.tsx +157 -0
  77. package/package.json +8 -2
@@ -85,7 +85,7 @@
85
85
 
86
86
  .app-main:focus-visible {
87
87
  outline: none;
88
- box-shadow: inset 0 0 0 var(--region-focus-ring-width)
88
+ box-shadow: inset 0 0 0 calc(var(--region-focus-ring-width) * var(--focus-outline))
89
89
  var(--region-focus-ring-color, hsl(var(--focus-ring-color, var(--ring))));
90
90
  }
91
91
 
@@ -497,7 +497,7 @@
497
497
  display: none;
498
498
  }
499
499
 
500
- .app-mobile-nav-trigger {
500
+ .app-root .app-mobile-nav-trigger {
501
501
  display: none;
502
502
  flex: 0 0 auto;
503
503
  margin-inline-end: var(--space-1);
@@ -557,7 +557,7 @@
557
557
  display: flex;
558
558
  }
559
559
 
560
- .app-mobile-nav-trigger {
560
+ .app-root .app-mobile-nav-trigger {
561
561
  display: inline-flex;
562
562
  }
563
563
 
@@ -827,6 +827,13 @@
827
827
  gap: var(--sidebar-nav-gap);
828
828
  }
829
829
 
830
+ .ui-nav-list {
831
+ display: flex;
832
+ min-width: 0;
833
+ flex-direction: column;
834
+ gap: var(--sidebar-nav-gap);
835
+ }
836
+
830
837
  .sb-nav-item {
831
838
  display: flex;
832
839
  width: 100%;
@@ -848,11 +855,6 @@
848
855
  text-align: start;
849
856
  }
850
857
 
851
- .sb-nav-item:focus-visible {
852
- outline: none;
853
- box-shadow: 0 0 0 var(--focus-ring-width) hsl(var(--focus-ring-color, var(--ring)));
854
- }
855
-
856
858
  .sb-nav-item:hover {
857
859
  background: hsl(var(--accent));
858
860
  color: var(--sidebar-nav-item-hover-foreground, hsl(var(--foreground)));
@@ -1144,6 +1146,8 @@
1144
1146
  max-width: 100%;
1145
1147
  min-width: 0;
1146
1148
  flex: 1 1 0%;
1149
+
1150
+ align-self: stretch;
1147
1151
  align-items: center;
1148
1152
  gap: var(--topbar-gap);
1149
1153
  padding-inline: var(--topbar-inset);
@@ -1156,6 +1160,8 @@
1156
1160
  .ui-topbar-end {
1157
1161
  display: flex;
1158
1162
  min-width: 0;
1163
+
1164
+ align-self: stretch;
1159
1165
  align-items: center;
1160
1166
  gap: var(--topbar-gap);
1161
1167
  overflow: clip;
@@ -1175,11 +1181,13 @@
1175
1181
  .ui-topbar-start {
1176
1182
  flex: 0 1 auto;
1177
1183
  }
1184
+
1178
1185
  .ui-topbar-start > :last-child {
1179
1186
  max-width: 100%;
1180
1187
  min-width: 0;
1181
1188
  flex: 0 1 auto;
1182
- overflow: hidden;
1189
+ overflow: clip;
1190
+ overflow-clip-margin: var(--focus-ring-clip-margin);
1183
1191
  line-height: var(--topbar-start-truncate-line-height);
1184
1192
  text-overflow: ellipsis;
1185
1193
  white-space: nowrap;
@@ -1194,6 +1202,52 @@
1194
1202
  margin-inline-start: auto;
1195
1203
  }
1196
1204
 
1205
+ .ui-topbar-item {
1206
+ display: inline-flex;
1207
+ min-width: var(--topbar-item-min-width);
1208
+ flex: 0 0 auto;
1209
+ align-self: stretch;
1210
+ align-items: center;
1211
+ justify-content: center;
1212
+ gap: var(--topbar-item-gap);
1213
+ padding-inline: var(--topbar-item-padding-inline);
1214
+ border: 0;
1215
+ border-radius: var(--topbar-item-radius);
1216
+ background: transparent;
1217
+ color: hsl(var(--topbar-item-color));
1218
+ cursor: pointer;
1219
+
1220
+ font: inherit;
1221
+ white-space: nowrap;
1222
+ --focus-ring-offset: var(--topbar-item-focus-ring-offset);
1223
+ transition:
1224
+ background-color var(--duration-fast),
1225
+ color var(--duration-fast);
1226
+ }
1227
+
1228
+ .ui-topbar-item:hover {
1229
+ background: hsl(var(--topbar-item-hover-background));
1230
+ color: hsl(var(--topbar-item-hover-color));
1231
+ }
1232
+
1233
+ .ui-topbar-item:active,
1234
+ .ui-topbar-item[data-state="open"] {
1235
+ background: hsl(var(--topbar-item-active-background));
1236
+ color: hsl(var(--topbar-item-hover-color));
1237
+ }
1238
+
1239
+ .ui-topbar-item:disabled,
1240
+ .ui-topbar-item[data-disabled] {
1241
+ opacity: var(--disabled-opacity);
1242
+ cursor: not-allowed;
1243
+ }
1244
+
1245
+ .ui-topbar-item > svg {
1246
+ width: var(--topbar-icon-size);
1247
+ height: var(--topbar-icon-size);
1248
+ flex: 0 0 auto;
1249
+ }
1250
+
1197
1251
  @media (width <= 68.75rem) {
1198
1252
  .ui-topbar-center {
1199
1253
  display: var(--topbar-center-compact-display);
@@ -1518,7 +1572,7 @@
1518
1572
 
1519
1573
  .ui-mobile-shell-main:focus-visible {
1520
1574
  outline: none;
1521
- box-shadow: inset 0 0 0 var(--region-focus-ring-width)
1575
+ box-shadow: inset 0 0 0 calc(var(--region-focus-ring-width) * var(--focus-outline))
1522
1576
  var(--region-focus-ring-color, hsl(var(--focus-ring-color, var(--ring))));
1523
1577
  }
1524
1578
 
@@ -107,6 +107,17 @@
107
107
  overflow: hidden;
108
108
  min-width: 0;
109
109
  }
110
+
111
+ [data-slot="text"][data-link] {
112
+ text-decoration-line: none;
113
+ text-underline-offset: var(--text-link-underline-offset);
114
+ text-decoration-thickness: var(--text-link-underline-width);
115
+ }
116
+ [data-slot="text"][data-link]:hover,
117
+ [data-slot="text"][data-link]:focus-visible {
118
+ text-decoration-line: underline;
119
+ }
120
+
110
121
  [data-slot="text"][data-tabular] {
111
122
  font-variant-numeric: tabular-nums;
112
123
  }
@@ -0,0 +1,40 @@
1
+
2
+
3
+ :root {
4
+
5
+ --primary-hover: 206 100% 29.4%;
6
+
7
+ --primary-active: 208 100% 22%;
8
+
9
+ --primary-border: 198 68% 66%;
10
+ --destructive-hover: 359 50.6% 53.1%;
11
+ --destructive-active: 355 70.6% 33.3%;
12
+
13
+ --control-outline: 192.1 100% 44.7%;
14
+ --control-outline-alpha: 0.11;
15
+
16
+ --control-outline-error: 4.3 87.6% 34.7%;
17
+ --control-outline-error-alpha: 0.09;
18
+
19
+ --ring: var(--primary);
20
+ }
21
+
22
+ .dark,
23
+ :root[data-theme="dark"] {
24
+
25
+ --primary-hover: 202.2 74.6% 64.5%;
26
+
27
+ --primary-active: 200.2 81.3% 74.9%;
28
+
29
+ --primary-border: 204.6 46.7% 23.5%;
30
+ --destructive-hover: 358.8 42.3% 53.1%;
31
+ --destructive-active: 357.3 50.6% 34.1%;
32
+
33
+ --control-outline: 204.6 99% 61.8%;
34
+ --control-outline-alpha: 0.29;
35
+
36
+ --control-outline-error: 351.5 98.3% 53.5%;
37
+ --control-outline-error-alpha: 0.06;
38
+
39
+ --ring: var(--primary);
40
+ }
@@ -60,3 +60,9 @@
60
60
  --auth-shell-main-padding: var(--auth-shell-canonical-main-padding-mobile);
61
61
  }
62
62
  }
63
+
64
+ :root[data-focus-outline="on"] {
65
+ --focus-outline: 1;
66
+ --focus-field-shadow: 0 0 0 var(--focus-ring-glow-width)
67
+ hsl(var(--focus-ring-glow-color) / var(--focus-ring-glow-alpha));
68
+ }
@@ -1,10 +1,13 @@
1
1
 
2
2
 
3
3
  @import "./foundation.css";
4
+
5
+ @import "./antd.generated.css";
4
6
  @import "./semantic/layout.css";
5
7
  @import "./axes.css";
6
8
  @import "./components/control.css";
7
9
  @import "./components/toggle.css";
10
+ @import "./components/segmented.css";
8
11
  @import "./components/form.css";
9
12
  @import "./components/card.css";
10
13
  @import "./components/chart.css";
@@ -28,3 +31,4 @@
28
31
  @import "./components/legal-document.css";
29
32
  @import "./components/error-surface.css";
30
33
  @import "./components/activity.css";
34
+ @import "./components/text.css";
@@ -8,6 +8,8 @@
8
8
  --control-padding-x-default: var(--space-3);
9
9
  --control-padding-x-comfortable: var(--space-4);
10
10
 
11
+ --control-bounded-width: min(15rem, 48vw);
12
+
11
13
  --control-height: calc(var(--control-height-default) * var(--scaling));
12
14
 
13
15
  --control-height-sm: calc(var(--control-height) - calc(0.25rem * var(--scaling)));
@@ -27,7 +29,9 @@
27
29
  --control-icon-size-sm: calc(var(--icon-size-sm) * var(--scaling));
28
30
 
29
31
  --toggle-focus-ring-width: var(--stroke-lg);
30
- --toggle-focus-ring-alpha: 0.35;
32
+ --toggle-focus-ring-alpha: 1;
33
+
34
+ --control-focus-ring-width: var(--stroke-hairline);
31
35
 
32
36
  --rating-focus-ring-offset: 2px;
33
37
 
@@ -120,6 +120,8 @@
120
120
  --popover-surface-foreground: initial;
121
121
  --popover-surface-border-color: initial;
122
122
 
123
+ --popover-surface-inline-size: initial;
124
+
123
125
  --toast-icon-size: var(--icon-size-md);
124
126
 
125
127
  --toast-mobile-offset: 16px;
@@ -2,8 +2,6 @@
2
2
 
3
3
  :root {
4
4
 
5
- --legal-document-section-focus-ring-offset: var(--space-1);
6
-
7
5
  --legal-document-measure-max-width: 46rem;
8
6
 
9
7
  --legal-document-column-gap: var(--space-10);
@@ -16,6 +16,19 @@
16
16
 
17
17
  --logo-identity-foreground: 48 9% 9%;
18
18
 
19
+ --logo-glyph-cap-baseline-optical-offset: -0.01em;
20
+ --logo-glyph-cap-descender-optical-offset: -0.09em;
21
+ --logo-glyph-x-baseline-optical-offset: -0.11em;
22
+ --logo-glyph-x-descender-optical-offset: -0.21em;
23
+
24
+ --logo-glyph-optical-offset: initial;
25
+
26
+ --logo-glyph-fullwidth-width: 1;
27
+ --logo-glyph-wide-width: 1.06;
28
+ --logo-glyph-narrow-width: 0.81;
29
+ --logo-glyph-space-width: 0.34;
30
+ --logo-glyph-fit-max-width: 0.95;
31
+
19
32
  --logo-godx-size-xs: 1.5rem;
20
33
  --logo-godx-size-sm: 1.75rem;
21
34
  --logo-godx-size-md: 2rem;
@@ -41,6 +41,8 @@
41
41
 
42
42
  --tabs-list-line-space-inset: 0px;
43
43
 
44
+ --tabs-list-focus-ring-space-inset: initial;
45
+
44
46
  --tabs-trigger-line-radius: 0px;
45
47
  --tabs-trigger-line-padding-x: 1rem;
46
48
  --tabs-trigger-line-padding-y: 0.5rem;
@@ -0,0 +1,27 @@
1
+
2
+
3
+ :root {
4
+
5
+ --segmented-track-padding: calc(var(--space-1) / 2);
6
+
7
+ --segmented-track-background: var(--muted);
8
+
9
+ --segmented-track-radius: var(--radius);
10
+ --segmented-item-radius: var(--radius-md);
11
+
12
+ --segmented-item-height: calc(var(--control-height) - var(--segmented-track-padding) * 2);
13
+
14
+ --segmented-item-padding-inline: calc(var(--control-padding-x) - 1px);
15
+
16
+ --segmented-item-gap: calc(var(--space-3) / 2);
17
+
18
+ --segmented-item-color: var(--muted-foreground);
19
+ --segmented-item-hover-color: var(--foreground);
20
+ --segmented-item-selected-color: var(--foreground);
21
+
22
+ --segmented-item-hover-background: var(--accent);
23
+ --segmented-item-active-background: var(--secondary);
24
+
25
+ --segmented-item-selected-background: var(--background);
26
+ --segmented-item-selected-shadow: var(--shadow-sm);
27
+ }
@@ -11,7 +11,7 @@
11
11
  --sidebar-badge-destructive-background: initial;
12
12
  --sidebar-badge-destructive-foreground: initial;
13
13
 
14
- --sidebar-user-focus-ring-alpha: 0.45;
14
+ --sidebar-user-focus-ring-alpha: 1;
15
15
 
16
16
  --topbar-chip-icon-size: 1.125rem;
17
17
 
@@ -20,7 +20,7 @@
20
20
 
21
21
  --topbar-caret-icon-size: var(--icon-size-xs);
22
22
 
23
- --topbar-icon-focus-ring-alpha: 0.45;
23
+ --topbar-icon-focus-ring-alpha: 1;
24
24
 
25
25
  --sidebar-user-role-font-size: var(--font-size-2xs);
26
26
  --org-switcher-meta-foreground: var(--muted-foreground);
@@ -87,6 +87,19 @@
87
87
  --topbar-gap: var(--space-2);
88
88
 
89
89
  --topbar-center-compact-display: none;
90
+
91
+ --topbar-item-padding-inline: var(--space-3);
92
+ --topbar-item-gap: var(--space-2);
93
+ --topbar-item-min-width: var(--control-height);
94
+
95
+ --topbar-item-radius: var(--radius-sharp);
96
+ --topbar-item-color: var(--muted-foreground);
97
+
98
+ --topbar-item-hover-background: var(--accent);
99
+ --topbar-item-hover-color: var(--accent-foreground);
100
+ --topbar-item-active-background: var(--secondary);
101
+
102
+ --topbar-item-focus-ring-offset: calc(-1 * var(--focus-ring-width));
90
103
  --org-switcher-trigger-height: var(--band-height-xl);
91
104
  --org-switcher-trigger-padding-x: var(--space-2);
92
105
  --org-switcher-avatar-size: 1.75rem;
@@ -0,0 +1,7 @@
1
+
2
+ :root {
3
+
4
+ --text-link-underline-offset: 0.2em;
5
+
6
+ --text-link-underline-width: auto;
7
+ }
@@ -23,7 +23,7 @@
23
23
  --border: 30 7% 83%;
24
24
 
25
25
  --input: 30 7% 53%;
26
- --ring: 204 100% 39%;
26
+
27
27
  --success: 146 40% 58%;
28
28
  --success-foreground: 60 33% 99%;
29
29
  --warning: 44 100% 49%;
@@ -47,12 +47,8 @@
47
47
  --text-info: 221 70% 38%;
48
48
  --text-error: 357 75% 38%;
49
49
 
50
- --primary-hover: 204 100% 33%;
51
- --primary-active: 204 100% 28%;
52
50
  --secondary-hover: 45 15% 91%;
53
51
  --secondary-active: 45 15% 88%;
54
- --destructive-hover: 357 64% 38%;
55
- --destructive-active: 357 64% 32%;
56
52
 
57
53
  --wa-ai: #165e83;
58
54
  --wa-gunjo: #4c6cb3;
@@ -105,12 +101,26 @@
105
101
  transparent 70%
106
102
  );
107
103
 
104
+ --focus-outline: 0;
105
+ --focus-outline-weight: var(--stroke-hairline);
106
+ --focus-outline-color: var(--focus-ring-color, var(--ring));
107
+ --control-outline-width: calc(var(--stroke-md) * var(--focus-outline));
108
+ --focus-outline-offset: 0px;
109
+
108
110
  --focus-ring-color: initial;
109
- --focus-ring-width: var(--stroke-md);
111
+
112
+ --focus-ring-weight: var(--focus-outline-weight);
113
+ --focus-ring-width: calc(var(--focus-ring-weight) * var(--focus-outline));
110
114
 
111
115
  --focus-ring-opacity: 1;
112
116
 
113
- --focus-ring-offset: 0px;
117
+ --focus-ring-glow-width: var(--control-outline-width);
118
+ --focus-ring-glow-color: var(--control-outline);
119
+ --focus-ring-glow-alpha: var(--control-outline-alpha);
120
+
121
+ --focus-field-shadow: none;
122
+
123
+ --focus-ring-offset: var(--focus-outline-offset);
114
124
 
115
125
  --focus-ring-clip-margin: 8px;
116
126
 
@@ -309,7 +319,7 @@
309
319
  --border: 45 6% 22%;
310
320
 
311
321
  --input: 45 6% 47%;
312
- --ring: 204 90% 60%;
322
+
313
323
  --success: 146 45% 55%;
314
324
  --success-foreground: 48 9% 9%;
315
325
  --warning: 44 95% 55%;
@@ -332,10 +342,7 @@
332
342
  --text-warning: 44 95% 62%;
333
343
  --text-info: 221 70% 72%;
334
344
  --text-error: 357 75% 68%;
335
- --primary-hover: 204 90% 66%;
336
- --primary-active: 204 90% 72%;
345
+
337
346
  --secondary-hover: 45 6% 22%;
338
347
  --secondary-active: 45 6% 26%;
339
- --destructive-hover: 357 55% 43%;
340
- --destructive-active: 357 55% 38%;
341
348
  }