@godxjp/ui 33.10.1 → 33.11.2

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 (38) hide show
  1. package/DESIGN.md +1 -0
  2. package/README.md +2 -2
  3. package/agent/DESIGN.md +1 -0
  4. package/agent/START-HERE.md +4 -4
  5. package/agent/components/Cascader.json +1 -0
  6. package/agent/components/DatePicker.json +1 -0
  7. package/agent/components/Input.json +1 -0
  8. package/agent/components/NumberInput.json +1 -0
  9. package/agent/components/PasswordInput.json +1 -0
  10. package/agent/components/SearchInput.json +1 -0
  11. package/agent/components/Select.json +1 -0
  12. package/agent/components/TimePicker.json +1 -0
  13. package/agent/components/Topbar.json +8 -2
  14. package/agent/components/TopbarItem.json +7 -1
  15. package/agent/components/TreeSelect.json +1 -0
  16. package/agent/components.json +24 -3
  17. package/agent/index.json +4 -4
  18. package/agent/llms.txt +5 -5
  19. package/agent/tokens.json +19 -1
  20. package/dist/components/data-entry/input.js +16 -1
  21. package/dist/components/data-entry/search-input.js +1 -1
  22. package/dist/components/layout/topbar-item.d.ts +1 -0
  23. package/dist/components/layout/topbar-item.js +9 -4
  24. package/dist/components/layout/topbar.d.ts +1 -1
  25. package/dist/components/layout/topbar.js +25 -3
  26. package/dist/contracts/measurement.json +1 -1
  27. package/dist/props/components/layout.prop.d.ts +13 -0
  28. package/dist/props/registry.d.ts +9 -1
  29. package/dist/props/registry.js +10 -0
  30. package/dist/styles/control.css +131 -3
  31. package/dist/styles/layers.json +1 -1
  32. package/dist/styles/shell-layout.css +38 -0
  33. package/dist/styles.css +1 -1
  34. package/dist/tokens/components/control.css +4 -1
  35. package/dist/tokens/components/shell.css +3 -0
  36. package/docs/TOKENS.md +11 -0
  37. package/package.json +2 -2
  38. package/scripts/visual-audit.mjs +33 -3
@@ -234,6 +234,8 @@
234
234
 
235
235
  --control-affix-inset-inline-end: var(--space-2);
236
236
  --control-affix-action-size: 1.5rem;
237
+
238
+ --control-affix-touch-target-size: var(--band-height-xl);
237
239
  --control-affix-action-radius: initial;
238
240
  --control-affix-icon-size: var(--icon-size-md);
239
241
 
@@ -499,7 +501,8 @@
499
501
  --control-height-default: var(--band-height-xl);
500
502
 
501
503
  --search-input-end-padding: calc(
502
- var(--search-input-edge-inset) + var(--touch-target-min) / 2 + var(--band-height-xl) / 2
504
+ var(--search-input-edge-inset) + var(--touch-target-min) / 2 +
505
+ var(--control-affix-touch-target-size) / 2
503
506
  );
504
507
  }
505
508
  }
@@ -155,6 +155,9 @@
155
155
  --topbar-inset: 0px;
156
156
  --topbar-gap: var(--space-2);
157
157
 
158
+ --topbar-identity-max-inline-size: 40%;
159
+ --topbar-identity-min-text-inline-size: 3ch;
160
+
158
161
  --topbar-background-alpha: initial;
159
162
  --topbar-backdrop-blur-size: initial;
160
163
 
package/docs/TOKENS.md CHANGED
@@ -543,3 +543,14 @@ Load after library and preset styles. The original input colors restore the orig
543
543
  --space-section: var(--space-4);
544
544
  }
545
545
  ```
546
+
547
+ ### Input affix touch targets
548
+
549
+ `--control-affix-touch-target-size` defaults to `var(--band-height-xl)` (44px) and applies
550
+ only under `pointer: coarse`. It sizes the action box, not the glyph. Input reserves the measured
551
+ width of its complete trailing slot plus the existing inset and gap, including two adjacent
552
+ 44px actions in a 200px field. `--input-trailing-measured-size` is runtime measurement, not a
553
+ service override. `allowClear` still replaces the suffix; DatePicker and TimePicker still swap
554
+ clear and open actions. NumberInput lays out its two steppers horizontally on coarse pointers.
555
+ SearchInput retains its glyph centre while sharing this target token. Fine-pointer geometry is
556
+ unchanged. Override the token on the field or in the service theme; no new prop is required.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@godxjp/ui",
3
- "version": "33.10.1",
4
- "godxUiMcp": "33.10.1",
3
+ "version": "33.11.2",
4
+ "godxUiMcp": "33.11.2",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -453,9 +453,9 @@ export const PROBE_RULES = [
453
453
  id: "c04-compact-account-name",
454
454
  severity: "warn",
455
455
  category: "a11y",
456
- standard: `compact (<600px) bar shows no account name (${RC}); trigger name per WCAG 2.2 SC 4.1.2`,
456
+ standard: `compact (<600px) bar shows avatar-only or measured bounded shared-device identity (${RC}); trigger name per WCAG 2.2 SC 4.1.2`,
457
457
  kind: "probe",
458
- fix: "Below 600px the bar shows the avatar only: hide the account name (it belongs in the opened account menu) and make the avatar the trigger — accessible name + aria-haspopup, opening identity and account controls.",
458
+ fix: "Shared-device exception: Topbar identity with TopbarItem truncate keeps a bounded, ellipsised name and full title/accessible name. Otherwise below 600px the bar shows the avatar only: hide the account name (it belongs in the opened account menu) and make the avatar the trigger — accessible name + aria-haspopup, opening identity and account controls.",
459
459
  },
460
460
  {
461
461
  id: "c05-compact-editor-inset",
@@ -733,7 +733,7 @@ export function evaluateProbes(raw, { url, viewport }) {
733
733
  // C04 — compact account access without the name in the bar.
734
734
  const accounts = applies("c04-compact-account-name") ? raw.c04?.mapped || [] : [];
735
735
  for (const a of accounts) {
736
- if (a.nameVisible)
736
+ if (a.nameVisible && !a.compactIdentity)
737
737
  add(
738
738
  "c04-compact-account-name",
739
739
  a.element,
@@ -1158,7 +1158,37 @@ export function collectProbes(opts) {
1158
1158
  const pushAccount = (region, nameEl, avatar, t, nameText) => {
1159
1159
  if (avatar) accountAvatars.add(avatar);
1160
1160
  const text = nameText ?? (nameEl && shown(nameEl) ? snippet(nameEl.textContent) : "");
1161
+ const label = region.querySelector('[data-slot="topbar-item-label"]');
1162
+ const identity = region.closest('[data-slot="topbar-identity"]');
1163
+ const bar = identity?.closest('[data-slot="topbar"]');
1164
+ const r = region.getBoundingClientRect();
1165
+ const b = bar?.getBoundingClientRect();
1166
+ const l = label?.getBoundingClientRect();
1167
+ // An opt-in is not an exemption by itself: measure the visible label, bounded share,
1168
+ // containment, and full-name recovery. Old full-width labels still fail C04.
1169
+ const compactIdentity = !!(
1170
+ identity &&
1171
+ b &&
1172
+ label &&
1173
+ l &&
1174
+ text &&
1175
+ region.getAttribute("data-truncate") === "true" &&
1176
+ cs(label).textOverflow === "ellipsis" &&
1177
+ cs(label).whiteSpace === "nowrap" &&
1178
+ l.width > 1 &&
1179
+ l.height > 1 &&
1180
+ l.left >= r.left - 1 &&
1181
+ l.right <= r.right + 1 &&
1182
+ r.width <= b.width * 0.4 + 1 &&
1183
+ r.left >= b.left - 1 &&
1184
+ r.right <= b.right + 1 &&
1185
+ r.left >= -1 &&
1186
+ r.right <= width + 1 &&
1187
+ region.getAttribute("title")?.includes(label.textContent) &&
1188
+ accName(region).includes(label.textContent)
1189
+ );
1161
1190
  accounts.push({
1191
+ compactIdentity,
1162
1192
  element: desc(region),
1163
1193
  nameVisible: !!text,
1164
1194
  nameText: text,