@godxjp/ui 19.4.1 → 19.5.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 (93) 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-display/list-row.d.ts +2 -0
  7. package/dist/components/data-display/list-row.js +16 -12
  8. package/dist/components/data-display/timeline-grid.js +5 -3
  9. package/dist/components/data-entry/checkbox.d.ts +12 -0
  10. package/dist/components/data-entry/checkbox.js +35 -4
  11. package/dist/components/data-entry/form-field.js +5 -5
  12. package/dist/components/data-entry/index.d.ts +2 -0
  13. package/dist/components/data-entry/index.js +2 -0
  14. package/dist/components/data-entry/input.js +1 -1
  15. package/dist/components/data-entry/radio.js +1 -1
  16. package/dist/components/data-entry/search-input.d.ts +2 -18
  17. package/dist/components/data-entry/search-input.js +3 -0
  18. package/dist/components/data-entry/segmented.d.ts +2 -0
  19. package/dist/components/data-entry/segmented.js +5 -0
  20. package/dist/components/data-entry/select.d.ts +2 -0
  21. package/dist/components/data-entry/select.js +9 -4
  22. package/dist/components/feedback/sheet.js +1 -1
  23. package/dist/components/feedback/sonner.d.ts +7 -1
  24. package/dist/components/feedback/sonner.js +27 -7
  25. package/dist/components/general/button.d.ts +2 -0
  26. package/dist/components/general/button.js +11 -2
  27. package/dist/components/general/inert-background.d.ts +8 -3
  28. package/dist/components/general/inert-background.js +28 -3
  29. package/dist/components/general/logo.d.ts +53 -0
  30. package/dist/components/general/logo.js +57 -3
  31. package/dist/components/layout/app-shell.js +1 -1
  32. package/dist/components/layout/index.d.ts +4 -0
  33. package/dist/components/layout/index.js +4 -0
  34. package/dist/components/layout/master-detail.d.ts +1 -1
  35. package/dist/components/layout/master-detail.js +47 -3
  36. package/dist/components/layout/nav-list.d.ts +26 -0
  37. package/dist/components/layout/nav-list.js +21 -0
  38. package/dist/components/layout/responsive-grid.js +7 -4
  39. package/dist/components/layout/topbar-item.d.ts +17 -0
  40. package/dist/components/layout/topbar-item.js +21 -0
  41. package/dist/components/navigation/app-setting-picker.js +31 -5
  42. package/dist/components/navigation/context-menu.js +2 -2
  43. package/dist/components/navigation/dropdown-menu.js +2 -2
  44. package/dist/components/navigation/tabs.js +42 -10
  45. package/dist/components/ui/segmented.d.ts +48 -0
  46. package/dist/components/ui/segmented.js +48 -0
  47. package/dist/email/tokens.generated.d.ts +4 -4
  48. package/dist/email/tokens.generated.js +4 -4
  49. package/dist/i18n/messages/en.json +2 -1
  50. package/dist/i18n/messages/ja.json +2 -1
  51. package/dist/i18n/messages/vi.json +2 -1
  52. package/dist/props/components/app.prop.d.ts +9 -2
  53. package/dist/props/components/data-entry.prop.d.ts +10 -5
  54. package/dist/props/components/general.prop.d.ts +4 -0
  55. package/dist/props/components/layout.prop.d.ts +54 -2
  56. package/dist/props/registry.d.ts +21 -2
  57. package/dist/props/registry.js +29 -1
  58. package/dist/props/vocabulary/shared.prop.d.ts +11 -2
  59. package/dist/styles/alert-layout.css +4 -0
  60. package/dist/styles/base.css +2 -0
  61. package/dist/styles/control.css +123 -26
  62. package/dist/styles/data-display-layout.css +24 -2
  63. package/dist/styles/dialog-layout.css +2 -1
  64. package/dist/styles/focus-ring.css +84 -22
  65. package/dist/styles/form-layout.css +6 -0
  66. package/dist/styles/layout.css +38 -2
  67. package/dist/styles/logo-layout.css +56 -0
  68. package/dist/styles/navigation-layout.css +17 -1
  69. package/dist/styles/shell-layout.css +64 -10
  70. package/dist/tokens/antd.generated.css +40 -0
  71. package/dist/tokens/axes.css +6 -0
  72. package/dist/tokens/base.css +3 -0
  73. package/dist/tokens/components/control.css +5 -1
  74. package/dist/tokens/components/data-display.css +2 -1
  75. package/dist/tokens/components/feedback.css +2 -0
  76. package/dist/tokens/components/legal-document.css +0 -2
  77. package/dist/tokens/components/logo.css +13 -0
  78. package/dist/tokens/components/navigation.css +2 -0
  79. package/dist/tokens/components/segmented.css +27 -0
  80. package/dist/tokens/components/shell.css +15 -2
  81. package/dist/tokens/foundation.css +21 -13
  82. package/docs/DESIGN-AUTHORITY.md +346 -0
  83. package/docs/FRAME-COVERAGE-REPORT.md +5 -2
  84. package/docs/README.md +14 -13
  85. package/docs/data-display/list-row.tsx +21 -0
  86. package/docs/data-entry/search-input.tsx +1 -0
  87. package/docs/data-entry/segmented.tsx +124 -0
  88. package/docs/general/button/index.md +4 -0
  89. package/docs/layout/master-detail.tsx +3 -0
  90. package/docs/layout/nav-list.tsx +63 -0
  91. package/docs/layout/responsive-grid.tsx +19 -2
  92. package/docs/layout/topbar-item.tsx +157 -0
  93. 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
 
@@ -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";
@@ -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
 
@@ -86,7 +86,8 @@
86
86
  --timeline-grid-hour-height: 2.5rem;
87
87
  --timeline-grid-axis-width: 3.25rem;
88
88
  --timeline-grid-column-min-width: 6rem;
89
- --timeline-grid-event-min-height: 1.5rem;
89
+
90
+ --timeline-grid-event-min-height-minutes: 36;
90
91
  --timeline-grid-axis-font-size: var(--font-size-2xs);
91
92
  --timeline-grid-head-font-size: var(--font-size-xs);
92
93
  --timeline-grid-event-font-size: var(--font-size-2xs);
@@ -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;
@@ -14,7 +14,8 @@
14
14
  --secondary: 45 15% 95%;
15
15
  --secondary-foreground: 48 8% 13%;
16
16
  --muted: 45 15% 95%;
17
- --muted-foreground: 44 5% 42%;
17
+
18
+ --muted-foreground: 44 5% 39%;
18
19
  --accent: 40 13% 91%;
19
20
  --accent-foreground: 48 8% 13%;
20
21
  --destructive: 357 64% 44%;
@@ -22,7 +23,7 @@
22
23
  --border: 30 7% 83%;
23
24
 
24
25
  --input: 30 7% 53%;
25
- --ring: 204 100% 39%;
26
+
26
27
  --success: 146 40% 58%;
27
28
  --success-foreground: 60 33% 99%;
28
29
  --warning: 44 100% 49%;
@@ -46,12 +47,8 @@
46
47
  --text-info: 221 70% 38%;
47
48
  --text-error: 357 75% 38%;
48
49
 
49
- --primary-hover: 204 100% 33%;
50
- --primary-active: 204 100% 28%;
51
50
  --secondary-hover: 45 15% 91%;
52
51
  --secondary-active: 45 15% 88%;
53
- --destructive-hover: 357 64% 38%;
54
- --destructive-active: 357 64% 32%;
55
52
 
56
53
  --wa-ai: #165e83;
57
54
  --wa-gunjo: #4c6cb3;
@@ -104,12 +101,26 @@
104
101
  transparent 70%
105
102
  );
106
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
+
107
110
  --focus-ring-color: initial;
108
- --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));
109
114
 
110
115
  --focus-ring-opacity: 1;
111
116
 
112
- --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);
113
124
 
114
125
  --focus-ring-clip-margin: 8px;
115
126
 
@@ -308,7 +319,7 @@
308
319
  --border: 45 6% 22%;
309
320
 
310
321
  --input: 45 6% 47%;
311
- --ring: 204 90% 60%;
322
+
312
323
  --success: 146 45% 55%;
313
324
  --success-foreground: 48 9% 9%;
314
325
  --warning: 44 95% 55%;
@@ -331,10 +342,7 @@
331
342
  --text-warning: 44 95% 62%;
332
343
  --text-info: 221 70% 72%;
333
344
  --text-error: 357 75% 68%;
334
- --primary-hover: 204 90% 66%;
335
- --primary-active: 204 90% 72%;
345
+
336
346
  --secondary-hover: 45 6% 22%;
337
347
  --secondary-active: 45 6% 26%;
338
- --destructive-hover: 357 55% 43%;
339
- --destructive-active: 357 55% 38%;
340
348
  }