@godxjp/ui 22.0.0 → 23.0.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.
- package/README.md +4 -4
- package/dist/components/data-display/scroll-area.d.ts +24 -4
- package/dist/components/data-display/scroll-area.js +34 -72
- package/dist/components/data-entry/cascader.js +8 -6
- package/dist/components/data-entry/checkbox.js +2 -0
- package/dist/components/data-entry/choice-hit-target.d.ts +24 -0
- package/dist/components/data-entry/choice-hit-target.js +12 -0
- package/dist/components/data-entry/control-surface.d.ts +8 -0
- package/dist/components/data-entry/control-surface.js +10 -1
- package/dist/components/data-entry/form-field.js +3 -2
- package/dist/components/data-entry/radio.js +3 -2
- package/dist/components/data-entry/search-select.js +225 -95
- package/dist/components/data-entry/select.d.ts +76 -14
- package/dist/components/data-entry/select.js +495 -163
- package/dist/components/data-entry/slider.d.ts +3 -11
- package/dist/components/data-entry/slider.js +582 -93
- package/dist/components/data-entry/switch.js +2 -0
- package/dist/components/navigation/dropdown-menu.d.ts +11 -3
- package/dist/components/navigation/dropdown-menu.js +190 -15
- package/dist/components/navigation/index.d.ts +0 -3
- package/dist/components/navigation/index.js +0 -78
- package/dist/components/ui/index.d.ts +0 -3
- package/dist/components/ui/index.js +0 -3
- package/dist/components/ui/input-otp.d.ts +1 -1
- package/dist/components/ui/segmented.js +3 -1
- package/dist/components/ui/tag-input.js +3 -5
- package/dist/lib/select-options.d.ts +21 -0
- package/dist/lib/select-options.js +46 -0
- package/dist/props/components/data-display.prop.d.ts +9 -6
- package/dist/props/components/data-entry.prop.d.ts +323 -30
- package/dist/props/components/index.d.ts +1 -1
- package/dist/props/components/navigation.prop.d.ts +17 -0
- package/dist/props/registry.d.ts +63 -0
- package/dist/props/registry.js +69 -0
- package/dist/styles/control.css +205 -23
- package/dist/styles/data-display-layout.css +18 -10
- package/dist/styles/focus-ring.css +2 -2
- package/dist/styles/fonts.css +88 -4
- package/dist/styles/navigation-layout.css +11 -236
- package/dist/styles/shell-layout.css +144 -139
- package/dist/styles/table-layout.css +7 -3
- package/dist/tokens/components/control.css +4 -0
- package/dist/tokens/components/data-display.css +0 -5
- package/dist/tokens/components/navigation.css +3 -5
- package/dist/tokens/components/scroll-area.css +7 -0
- package/docs/CUSTOMER-THEMING.md +7 -1
- package/docs/FRAME-COVERAGE-REPORT.md +4 -7
- package/docs/data-display/data-table/index.tsx +27 -1
- package/docs/data-display/popover.tsx +4 -6
- package/docs/data-display/scroll-area.tsx +51 -45
- package/docs/data-entry/date-picker.tsx +2 -3
- package/docs/data-entry/input-otp.tsx +5 -2
- package/docs/data-entry/segmented.tsx +40 -1
- package/docs/data-entry/select-matrix.tsx +1 -2
- package/docs/data-entry/select.tsx +108 -3
- package/docs/data-entry/slider.tsx +125 -47
- package/docs/feedback/dialog.tsx +1 -2
- package/docs/feedback/sheet.tsx +1 -2
- package/docs/layout/app-shell-states.tsx +143 -0
- package/docs/navigation/dropdown-menu.tsx +75 -4
- package/docs/roadmap/parity-audit-data-entry.md +44 -33
- package/docs/roadmap/parity-audit-layout-navigation-general.md +304 -310
- package/docs/roadmap/parity-backlog.md +2 -3
- package/package.json +20 -44
- package/scripts/ui-audit.mjs +1 -1
- package/scripts/visual-audit-rules.mjs +0 -7
- package/scripts/visual-audit.mjs +6 -27
- package/dist/components/navigation/context-menu.d.ts +0 -21
- package/dist/components/navigation/context-menu.js +0 -149
- package/dist/components/navigation/menubar.d.ts +0 -28
- package/dist/components/navigation/menubar.js +0 -136
- package/dist/components/navigation/navigation-menu.d.ts +0 -10
- package/dist/components/navigation/navigation-menu.js +0 -91
- package/dist/components/ui/context-menu.d.ts +0 -1
- package/dist/components/ui/context-menu.js +0 -2
- package/dist/components/ui/menubar.d.ts +0 -1
- package/dist/components/ui/menubar.js +0 -2
- package/dist/components/ui/navigation-menu.d.ts +0 -1
- package/dist/components/ui/navigation-menu.js +0 -2
- package/docs/FRAME-A11Y-CI.md +0 -349
- package/docs/navigation/context-menu.tsx +0 -128
- package/docs/navigation/menubar.tsx +0 -141
- package/docs/navigation/navigation-menu.tsx +0 -158
|
@@ -31,7 +31,7 @@ compared against, or successive waves will silently measure against different ta
|
|
|
31
31
|
|
|
32
32
|
## P1 — grouped by owning file, so one agent owns one group
|
|
33
33
|
|
|
34
|
-
**`data-entry`** — `
|
|
34
|
+
**`data-entry`** — `SearchInput` Enter does
|
|
35
35
|
not commit (no `onKeyDown` in the file; `:59-63`) · `ColorPicker` has no `size`/`status`/`variant`
|
|
36
36
|
and no `presets` (`data-entry.prop.ts:893-908`) · `PasswordStrength` uses `role="img"` instead of
|
|
37
37
|
`role="meter"` (`:74-76`) · `Upload showUploadList` boolean-only (`:1196`) ·
|
|
@@ -56,8 +56,7 @@ derives delta tone from a regex on a stringified node (`card.tsx:233-246`) · `Q
|
|
|
56
56
|
`isDismissable`) · `Pagination` is controlled-only, breaking the full-triad rule · `AppShell` has no
|
|
57
57
|
`onSidebarCollapsedChange` and no built-in trigger (`app-shell.tsx:30`) · shell collapse breakpoint
|
|
58
58
|
hardcoded (`shell-layout.css:1119`) while the overlay family's equivalent is a token · `Sidebar`
|
|
59
|
-
submenu open state is unreachable local state (`sidebar.tsx:271`) · `
|
|
60
|
-
affordance (WCAG 2.4.3 / 1.4.10) · no `copyable` anywhere despite `ErrorSurface` rendering a
|
|
59
|
+
submenu open state is unreachable local state (`sidebar.tsx:271`) · no `copyable` anywhere despite `ErrorSurface` rendering a
|
|
61
60
|
`requestId` "so it can be read out or copied accurately" (`layout.prop.ts:787`) · clamped text
|
|
62
61
|
cannot expand.
|
|
63
62
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@godxjp/ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"godxUiMcp": "
|
|
3
|
+
"version": "23.0.0",
|
|
4
|
+
"godxUiMcp": "23.0.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -245,18 +245,6 @@
|
|
|
245
245
|
"types": "./dist/components/data-entry/command.d.ts",
|
|
246
246
|
"import": "./dist/components/data-entry/command.js"
|
|
247
247
|
},
|
|
248
|
-
"./ui/context-menu": {
|
|
249
|
-
"types": "./dist/components/navigation/context-menu.d.ts",
|
|
250
|
-
"import": "./dist/components/navigation/context-menu.js"
|
|
251
|
-
},
|
|
252
|
-
"./ui/menubar": {
|
|
253
|
-
"types": "./dist/components/navigation/menubar.d.ts",
|
|
254
|
-
"import": "./dist/components/navigation/menubar.js"
|
|
255
|
-
},
|
|
256
|
-
"./ui/navigation-menu": {
|
|
257
|
-
"types": "./dist/components/navigation/navigation-menu.d.ts",
|
|
258
|
-
"import": "./dist/components/navigation/navigation-menu.js"
|
|
259
|
-
},
|
|
260
248
|
"./ui/resizable": {
|
|
261
249
|
"types": "./dist/components/layout/resizable.d.ts",
|
|
262
250
|
"import": "./dist/components/layout/resizable.js"
|
|
@@ -343,22 +331,26 @@
|
|
|
343
331
|
"check:data-entry-touch-aria": "node scripts/check-data-entry-touch-aria.mjs",
|
|
344
332
|
"check:layout-nav-frames": "node scripts/check-layout-nav-frames.mjs",
|
|
345
333
|
"check:provider-feedback-query-runtime": "for frames in navigation-app-setting-picker,feedback-dialog,feedback-sheet,feedback-alert-dialog feedback-tooltip,feedback-toast,feedback-skeleton,query-data-state query-infinite-query-state,query-mutation-feedback,query-prefetch-link; do FRAMES=$frames node scripts/check-provider-feedback-query-runtime.mjs || exit 1; done",
|
|
346
|
-
"check:layout-nav-closure": "for frames in layout-flex,layout-app-shell,layout-aspect-ratio,layout-auth-shell layout-page-container,layout-resizable-panel,layout-separator,layout-sidebar layout-split-pane,layout-topbar,navigation-breadcrumb,navigation-app-setting-picker navigation-
|
|
334
|
+
"check:layout-nav-closure": "for frames in layout-flex,layout-app-shell,layout-aspect-ratio,layout-auth-shell layout-page-container,layout-resizable-panel,layout-separator,layout-sidebar layout-split-pane,layout-topbar,navigation-breadcrumb,navigation-app-setting-picker navigation-dropdown-menu navigation-steps,navigation-toolbar,navigation-tabs,navigation-pagination; do FRAMES=$frames node scripts/check-layout-nav-closure.mjs || exit 1; done",
|
|
347
335
|
"check:display-runtime-evidence": "node scripts/check-display-runtime-evidence.mjs",
|
|
348
336
|
"check:data-table-pagination-wrap": "node scripts/check-data-table-pagination-wrap.mjs",
|
|
337
|
+
"check:choice-hit-target": "node scripts/check-choice-hit-target.mjs",
|
|
338
|
+
"check:data-table-overflow": "node scripts/check-data-table-overflow.mjs",
|
|
339
|
+
"check:app-shell-narrow-grid": "node scripts/check-app-shell-narrow-grid.mjs",
|
|
340
|
+
"check:segmented-wrap": "node scripts/check-segmented-wrap.mjs",
|
|
349
341
|
"check:tabs-overflow-menu": "node scripts/check-tabs-overflow-menu.mjs",
|
|
350
342
|
"check:button-icon-xs": "node scripts/check-button-icon-xs.mjs",
|
|
351
343
|
"check:timeline-title-fill": "node scripts/check-timeline-title-fill.mjs",
|
|
352
344
|
"check:descriptions-label-value-step": "node scripts/check-descriptions-label-value-step.mjs",
|
|
353
345
|
"check:frame-contracts": "pnpm check:component-api-manifest && pnpm audit:component-cases && pnpm check:frame-coverage && pnpm check:frame-coverage-ledger && pnpm check:screen-reader-evidence && pnpm check:data-entry-owner-source && pnpm check:display-runtime-evidence",
|
|
354
346
|
"check:final-touch-rtl": "node scripts/check-final-touch-rtl.mjs",
|
|
355
|
-
"check:frame-runtime": "pnpm check:data-entry-frame-runtime && pnpm check:data-entry-touch-aria && pnpm check:layout-nav-frames && pnpm check:provider-feedback-query-runtime && pnpm check:layout-nav-closure && pnpm check:final-touch-rtl && pnpm check:data-table-pagination-wrap && pnpm check:tabs-overflow-menu && pnpm check:button-icon-xs && pnpm check:timeline-title-fill && pnpm check:descriptions-label-value-step",
|
|
347
|
+
"check:frame-runtime": "pnpm check:data-entry-frame-runtime && pnpm check:data-entry-touch-aria && pnpm check:layout-nav-frames && pnpm check:provider-feedback-query-runtime && pnpm check:layout-nav-closure && pnpm check:final-touch-rtl && pnpm check:data-table-pagination-wrap && pnpm check:data-table-overflow && pnpm check:app-shell-narrow-grid && pnpm check:choice-hit-target && pnpm check:segmented-wrap && pnpm check:tabs-overflow-menu && pnpm check:button-icon-xs && pnpm check:timeline-title-fill && pnpm check:descriptions-label-value-step",
|
|
356
348
|
"verify": "pnpm typecheck && pnpm lint && pnpm format && pnpm build && pnpm preview:build && pnpm check:example-imports && pnpm check:core-isolation && pnpm check:no-consumer-coupling && pnpm check:prop-vocabulary && pnpm check:token-tiers && pnpm check:no-external-assets && pnpm check:token-scale-bypass && pnpm check:radix-surface && pnpm check:dist-tokens-resolve && pnpm check:no-hardcoded-geometry && pnpm check:no-hardcoded-css-values && pnpm check:disclosure-duplication && pnpm check:no-inline-magic-numbers && pnpm check:no-tailwind-class-assertions && pnpm check:control-sizing && pnpm check:rtl && pnpm check:typography && pnpm check:mcp-lockstep && pnpm check:mcp-sync && pnpm check:doc-prop-existence && pnpm check:mcp-catalog-coverage && pnpm check:mcp-orphans && pnpm check:mcp-pattern-imports && pnpm check:audit-sync && pnpm check:frame-coverage && pnpm test",
|
|
357
349
|
"verify:static": "pnpm build && pnpm check:packed-public-contract && pnpm typecheck && pnpm typecheck:docs && pnpm lint && pnpm preview:build && pnpm check:example-imports && pnpm check:core-isolation && pnpm check:no-consumer-coupling && pnpm check:use-client && pnpm check:prop-vocabulary && pnpm check:token-tiers && pnpm check:token-scale-bypass && pnpm check:radix-surface && pnpm check:dist-tokens-resolve && pnpm check:no-hardcoded-geometry && pnpm check:no-hardcoded-css-values && pnpm check:disclosure-duplication && pnpm check:no-inline-magic-numbers && pnpm check:no-tailwind-class-assertions && pnpm check:control-sizing && pnpm check:rtl && pnpm check:typography && pnpm check:mcp-lockstep && pnpm check:mcp-sync && pnpm check:doc-prop-existence && pnpm check:mcp-catalog-coverage && pnpm check:mcp-orphans && pnpm check:mcp-pattern-imports && pnpm check:audit-sync && pnpm check:mcp-prop-sync && pnpm check:contrast && pnpm check:visual-audit && pnpm test",
|
|
358
350
|
"verify:ci": "pnpm verify:ci:static && pnpm check:frame-contracts && pnpm test",
|
|
359
351
|
"verify:ci:static": "pnpm build && pnpm check:packed-public-contract && pnpm typecheck && pnpm typecheck:docs && pnpm lint && pnpm preview:build && pnpm check:registry && pnpm check:example-imports && pnpm check:core-isolation && pnpm check:no-consumer-coupling && pnpm check:use-client && pnpm check:prop-vocabulary && pnpm check:token-tiers && pnpm check:no-external-assets && pnpm check:token-scale-bypass && pnpm check:no-antd-runtime && pnpm check:radix-surface && pnpm check:dist-tokens-resolve && pnpm check:no-hardcoded-geometry && pnpm check:no-hardcoded-css-values && pnpm check:disclosure-duplication && pnpm check:no-inline-magic-numbers && pnpm check:no-tailwind-class-assertions && pnpm check:control-sizing && pnpm check:rtl && pnpm check:typography && pnpm check:mcp-lockstep && pnpm check:mcp-sync && pnpm check:doc-prop-existence && pnpm check:mcp-catalog-coverage && pnpm check:mcp-orphans && pnpm check:mcp-pattern-imports && pnpm check:audit-sync && pnpm check:gate-coverage && pnpm check:mcp-prop-sync && pnpm check:catalog-contradictions && pnpm check:catalog-snippets",
|
|
360
|
-
"verify:browser": "pnpm check:contrast && pnpm check:text-ink-clip && pnpm check:visual-audit",
|
|
361
|
-
"verify:release": "pnpm verify:static && pnpm check:frame-contracts && pnpm check:frame-coverage
|
|
352
|
+
"verify:browser": "pnpm check:contrast && pnpm check:text-ink-clip && pnpm check:font-fallback-metrics && pnpm check:visual-audit",
|
|
353
|
+
"verify:release": "pnpm verify:static && pnpm check:frame-contracts && pnpm check:frame-coverage",
|
|
362
354
|
"verify:publish-tree": "pnpm build && pnpm check:packed-public-contract && pnpm check:use-client && pnpm check:dist-tokens-resolve",
|
|
363
355
|
"check:release-plan": "node scripts/check-release-command-plan.mjs",
|
|
364
356
|
"check:packed-public-contract": "node scripts/check-packed-public-contract.mjs",
|
|
@@ -407,9 +399,9 @@
|
|
|
407
399
|
"check:gate-coverage": "node scripts/check-gate-coverage.mjs",
|
|
408
400
|
"check:contrast": "node scripts/check-contrast.mjs",
|
|
409
401
|
"check:text-ink-clip": "node scripts/check-text-ink-clip.mjs",
|
|
402
|
+
"check:font-fallback-metrics": "node scripts/check-font-fallback-metrics.mjs",
|
|
410
403
|
"visual-audit": "node scripts/visual-audit.mjs",
|
|
411
404
|
"check:visual-audit": "node scripts/visual-audit-smoke.mjs",
|
|
412
|
-
"check:frame-axe": "node scripts/check-frame-axe.mjs",
|
|
413
405
|
"check:frame-geometry": "node scripts/frame-geometry.mjs",
|
|
414
406
|
"postinstall": "node scripts/postinstall.mjs",
|
|
415
407
|
"init-agent": "node scripts/init-agent-kit.mjs",
|
|
@@ -417,10 +409,8 @@
|
|
|
417
409
|
"check:catalog-snippets": "node scripts/audit-catalog-snippets.mjs"
|
|
418
410
|
},
|
|
419
411
|
"peerDependencies": {
|
|
420
|
-
"@axe-core/playwright": "*",
|
|
421
412
|
"@hookform/resolvers": "^5.2.0",
|
|
422
413
|
"@tanstack/react-query": ">=5.0.0",
|
|
423
|
-
"axe-core": "*",
|
|
424
414
|
"playwright": "*",
|
|
425
415
|
"react": ">=19.0.0",
|
|
426
416
|
"react-dom": ">=19.0.0",
|
|
@@ -436,32 +426,12 @@
|
|
|
436
426
|
},
|
|
437
427
|
"playwright": {
|
|
438
428
|
"optional": true
|
|
439
|
-
},
|
|
440
|
-
"@axe-core/playwright": {
|
|
441
|
-
"optional": true
|
|
442
|
-
},
|
|
443
|
-
"axe-core": {
|
|
444
|
-
"optional": true
|
|
445
429
|
}
|
|
446
430
|
},
|
|
447
431
|
"dependencies": {
|
|
448
432
|
"@date-fns/tz": "^1.5.0",
|
|
449
433
|
"@fontsource/m-plus-2": "^5.3.0",
|
|
450
434
|
"@fontsource/noto-sans-jp": "^5.3.0",
|
|
451
|
-
"@radix-ui/react-accordion": "^1.2.20",
|
|
452
|
-
"@radix-ui/react-avatar": "^1.2.6",
|
|
453
|
-
"@radix-ui/react-collapsible": "^1.1.20",
|
|
454
|
-
"@radix-ui/react-context-menu": "^2.3.7",
|
|
455
|
-
"@radix-ui/react-label": "^2.1.15",
|
|
456
|
-
"@radix-ui/react-menubar": "^1.1.24",
|
|
457
|
-
"@radix-ui/react-navigation-menu": "^1.2.22",
|
|
458
|
-
"@radix-ui/react-scroll-area": "^1.2.18",
|
|
459
|
-
"@radix-ui/react-select": "^2.3.7",
|
|
460
|
-
"@radix-ui/react-separator": "^1.1.15",
|
|
461
|
-
"@radix-ui/react-slider": "^1.4.7",
|
|
462
|
-
"@radix-ui/react-slot": "^1.3.3",
|
|
463
|
-
"@radix-ui/react-toggle": "^1.1.18",
|
|
464
|
-
"@radix-ui/react-toggle-group": "^1.1.19",
|
|
465
435
|
"@react-aria/utils": "^3.34.1",
|
|
466
436
|
"@tanstack/react-table": "^9.2.4",
|
|
467
437
|
"class-variance-authority": "^0.7.1",
|
|
@@ -483,9 +453,17 @@
|
|
|
483
453
|
"vaul": "^1.1.2"
|
|
484
454
|
},
|
|
485
455
|
"devDependencies": {
|
|
486
|
-
"@axe-core/playwright": "^4.13.0",
|
|
487
456
|
"@eslint/js": "^10.0.1",
|
|
488
457
|
"@hookform/resolvers": "^5.9.1",
|
|
458
|
+
"@radix-ui/react-accordion": "^1.2.20",
|
|
459
|
+
"@radix-ui/react-avatar": "^1.2.6",
|
|
460
|
+
"@radix-ui/react-collapsible": "^1.1.20",
|
|
461
|
+
"@radix-ui/react-label": "^2.1.15",
|
|
462
|
+
"@radix-ui/react-select": "^2.3.7",
|
|
463
|
+
"@radix-ui/react-separator": "^1.1.15",
|
|
464
|
+
"@radix-ui/react-slot": "^1.3.3",
|
|
465
|
+
"@radix-ui/react-toggle": "^1.1.18",
|
|
466
|
+
"@radix-ui/react-toggle-group": "^1.1.19",
|
|
489
467
|
"@tailwindcss/vite": "^4.3.3",
|
|
490
468
|
"@tanstack/react-query": "^5.102.8",
|
|
491
469
|
"@testing-library/jest-dom": "^7.0.1",
|
|
@@ -497,7 +475,6 @@
|
|
|
497
475
|
"@types/react-dom": "^19.2.5",
|
|
498
476
|
"@vitejs/plugin-react": "^6.1.1",
|
|
499
477
|
"@vitest/coverage-v8": "^4.1.11",
|
|
500
|
-
"axe-core": "^4.13.0",
|
|
501
478
|
"eslint": "^10.9.1",
|
|
502
479
|
"eslint-plugin-react": "^7.37.5",
|
|
503
480
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
@@ -520,7 +497,6 @@
|
|
|
520
497
|
"typescript-eslint": "^8.68.0",
|
|
521
498
|
"vite": "^8.2.2",
|
|
522
499
|
"vitest": "^4.1.11",
|
|
523
|
-
"vitest-axe": "1.0.0-pre.5",
|
|
524
500
|
"zod": "^4.5.4"
|
|
525
501
|
},
|
|
526
502
|
"bin": {
|
package/scripts/ui-audit.mjs
CHANGED
|
@@ -160,7 +160,7 @@ const RULES = [
|
|
|
160
160
|
spansElement: true,
|
|
161
161
|
// Only the tone-driven status components (Badge/Tag/StatCard) are wrong here — they expose a
|
|
162
162
|
// `tone` prop and reserve `variant` for STRUCTURE (default|secondary|outline). Button, Alert,
|
|
163
|
-
// DropdownMenuItem,
|
|
163
|
+
// DropdownMenuItem, AlertDialog etc. legitimately use `variant` for emphasis,
|
|
164
164
|
// so they must NOT be flagged.
|
|
165
165
|
test: new RegExp(
|
|
166
166
|
`<(?:Badge|Tag|StatCard)\\b${ATTRS}\\bvariant=["'](?:success|warning|destructive|info|neutral)["']`,
|
|
@@ -7,13 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
/** Catalog (agent-facing mirror lives in mcp/src/data/visual-rules.ts; kept in sync by a guard). */
|
|
9
9
|
export const VISUAL_RULES = [
|
|
10
|
-
{
|
|
11
|
-
id: "axe-violations",
|
|
12
|
-
severity: "warn",
|
|
13
|
-
category: "a11y",
|
|
14
|
-
standard: "WCAG 2.2 A/AA · WAI-ARIA 1.2 (axe-core engine)",
|
|
15
|
-
fix: "Fix each axe violation at its node — contrast (1.4.3), name/role/value (4.1.2), ARIA, landmarks. axe runs on the REAL DOM, catching what static analysis cannot.",
|
|
16
|
-
},
|
|
17
10
|
{
|
|
18
11
|
id: "target-size-min",
|
|
19
12
|
severity: "warn",
|
package/scripts/visual-audit.mjs
CHANGED
|
@@ -23,8 +23,6 @@ import {
|
|
|
23
23
|
*/
|
|
24
24
|
export const TESTED_VERSIONS = {
|
|
25
25
|
playwright: { range: ">=1.55 <2", tested: "1.61.1" },
|
|
26
|
-
"@axe-core/playwright": { range: ">=4.10 <5", tested: "4.12.1" },
|
|
27
|
-
"axe-core": { range: ">=4.10 <5", tested: "4.12.1" },
|
|
28
26
|
};
|
|
29
27
|
|
|
30
28
|
/** Shape one product finding from a rule id (pure — unit-tested without a browser). */
|
|
@@ -138,9 +136,7 @@ function collectInPage() {
|
|
|
138
136
|
// SPACING exception: undersized is allowed when a 24px-DIAMETER circle centred on the target
|
|
139
137
|
// does not intersect the circle of any other target. Two circles of radius 12 intersect when
|
|
140
138
|
// their centres are closer than 24px, so that is the whole test.
|
|
141
|
-
const crowded = rawTargets.some(
|
|
142
|
-
(o) => o !== t && Math.hypot(o.cx - t.cx, o.cy - t.cy) < 24,
|
|
143
|
-
);
|
|
139
|
+
const crowded = rawTargets.some((o) => o !== t && Math.hypot(o.cx - t.cx, o.cy - t.cy) < 24);
|
|
144
140
|
return { ...t, exempt: crowded ? null : "spacing" };
|
|
145
141
|
});
|
|
146
142
|
|
|
@@ -278,18 +274,13 @@ function collectInPage() {
|
|
|
278
274
|
/** Optional-peer loader — throws a tagged bootstrap error instead of a raw stack. */
|
|
279
275
|
async function loadDeps() {
|
|
280
276
|
try {
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
import("@axe-core/playwright"),
|
|
284
|
-
]);
|
|
285
|
-
return { chromium, AxeBuilder: axe.default ?? axe.AxeBuilder };
|
|
277
|
+
const { chromium } = await import("playwright");
|
|
278
|
+
return { chromium };
|
|
286
279
|
} catch (cause) {
|
|
287
|
-
const err = new Error(
|
|
288
|
-
"visual-audit needs the optional peers `playwright` and `@axe-core/playwright`",
|
|
289
|
-
);
|
|
280
|
+
const err = new Error("visual-audit needs the optional peer `playwright`");
|
|
290
281
|
err.bootstrap = true;
|
|
291
282
|
err.hint =
|
|
292
|
-
"pnpm add -D playwright
|
|
283
|
+
"pnpm add -D playwright && pnpm exec playwright install chromium " +
|
|
293
284
|
"(or set PLAYWRIGHT_CHROMIUM_EXECUTABLE to a system Chromium).";
|
|
294
285
|
err.cause = cause;
|
|
295
286
|
throw err;
|
|
@@ -301,7 +292,7 @@ async function loadDeps() {
|
|
|
301
292
|
* (page/context/browser) is guaranteed via finally on BOTH success and failure.
|
|
302
293
|
*/
|
|
303
294
|
/* c8 ignore start — the browser-driving glue; exercised by scripts/visual-audit-smoke.mjs in CI. */
|
|
304
|
-
async function audit(targets, { chromium
|
|
295
|
+
async function audit(targets, { chromium }) {
|
|
305
296
|
const findings = [];
|
|
306
297
|
const errors = [];
|
|
307
298
|
let browser;
|
|
@@ -331,18 +322,6 @@ async function audit(targets, { chromium, AxeBuilder }) {
|
|
|
331
322
|
}
|
|
332
323
|
|
|
333
324
|
try {
|
|
334
|
-
// 1) axe-core — real WCAG/ARIA engine.
|
|
335
|
-
const { violations } = await new AxeBuilder({ page }).analyze();
|
|
336
|
-
for (const v of violations) {
|
|
337
|
-
findings.push(
|
|
338
|
-
buildFinding(
|
|
339
|
-
"axe-violations",
|
|
340
|
-
url,
|
|
341
|
-
`${v.id} (${v.impact}) — ${v.help} [${v.nodes.length} node(s)] ${v.helpUrl}`,
|
|
342
|
-
),
|
|
343
|
-
);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
325
|
// 2) computed-style / layout heuristics via the PURE rules.
|
|
347
326
|
const m = await page.evaluate(collectInPage);
|
|
348
327
|
for (const a of m.accents) {
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
-
export declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
|
|
4
|
-
export declare function ContextMenuTrigger(props: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
-
export declare const ContextMenuPortal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
|
|
6
|
-
export declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
8
|
-
inset?: boolean;
|
|
9
|
-
variant?: "default" | "destructive";
|
|
10
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
export declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
-
export declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
-
inset?: boolean;
|
|
16
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
export declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
export declare const ContextMenuShortcut: ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => React.JSX.Element;
|
|
19
|
-
export declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
|
|
20
|
-
export declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
5
|
-
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
6
|
-
import { cn } from "../../lib/utils.js";
|
|
7
|
-
import { useInertHiddenBackground } from "../general/inert-background.js";
|
|
8
|
-
const ContextMenu = ContextMenuPrimitive.Root;
|
|
9
|
-
function ContextMenuTrigger(props) {
|
|
10
|
-
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
11
|
-
}
|
|
12
|
-
const ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
13
|
-
const ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => {
|
|
14
|
-
const contentRef = useInertHiddenBackground(ref);
|
|
15
|
-
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
16
|
-
ContextMenuPrimitive.Content,
|
|
17
|
-
{
|
|
18
|
-
ref: contentRef,
|
|
19
|
-
"data-slot": "context-menu-content",
|
|
20
|
-
className: cn("ui-context-menu-content", className),
|
|
21
|
-
...props
|
|
22
|
-
}
|
|
23
|
-
) });
|
|
24
|
-
});
|
|
25
|
-
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
26
|
-
const ContextMenuItem = React.forwardRef(({ className, inset, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
27
|
-
ContextMenuPrimitive.Item,
|
|
28
|
-
{
|
|
29
|
-
ref,
|
|
30
|
-
"data-slot": "context-menu-item",
|
|
31
|
-
"data-inset": inset,
|
|
32
|
-
"data-variant": variant,
|
|
33
|
-
className: cn("ui-context-menu-item", className),
|
|
34
|
-
...props
|
|
35
|
-
}
|
|
36
|
-
));
|
|
37
|
-
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
38
|
-
const ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
39
|
-
ContextMenuPrimitive.CheckboxItem,
|
|
40
|
-
{
|
|
41
|
-
ref,
|
|
42
|
-
"data-slot": "context-menu-checkbox-item",
|
|
43
|
-
className: cn("ui-context-menu-checkbox-item", className),
|
|
44
|
-
checked,
|
|
45
|
-
...props,
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ jsx("span", { className: "ui-context-menu-item-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "ui-context-menu-check" }) }) }),
|
|
48
|
-
children
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
));
|
|
52
|
-
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
53
|
-
const ContextMenuRadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
54
|
-
ContextMenuPrimitive.RadioGroup,
|
|
55
|
-
{
|
|
56
|
-
ref,
|
|
57
|
-
"data-slot": "context-menu-radio-group",
|
|
58
|
-
className: cn("ui-context-menu-radio-group", className),
|
|
59
|
-
...props
|
|
60
|
-
}
|
|
61
|
-
));
|
|
62
|
-
ContextMenuRadioGroup.displayName = ContextMenuPrimitive.RadioGroup.displayName;
|
|
63
|
-
const ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
64
|
-
ContextMenuPrimitive.RadioItem,
|
|
65
|
-
{
|
|
66
|
-
ref,
|
|
67
|
-
"data-slot": "context-menu-radio-item",
|
|
68
|
-
className: cn("ui-context-menu-radio-item", className),
|
|
69
|
-
...props,
|
|
70
|
-
children: [
|
|
71
|
-
/* @__PURE__ */ jsx("span", { className: "ui-context-menu-item-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "ui-context-menu-dot" }) }) }),
|
|
72
|
-
children
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
));
|
|
76
|
-
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
77
|
-
const ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
78
|
-
ContextMenuPrimitive.Label,
|
|
79
|
-
{
|
|
80
|
-
ref,
|
|
81
|
-
"data-slot": "context-menu-label",
|
|
82
|
-
"data-inset": inset,
|
|
83
|
-
className: cn("ui-context-menu-label", className),
|
|
84
|
-
...props
|
|
85
|
-
}
|
|
86
|
-
));
|
|
87
|
-
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
88
|
-
const ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
89
|
-
ContextMenuPrimitive.Separator,
|
|
90
|
-
{
|
|
91
|
-
ref,
|
|
92
|
-
"data-slot": "context-menu-separator",
|
|
93
|
-
className: cn("ui-context-menu-separator", className),
|
|
94
|
-
...props
|
|
95
|
-
}
|
|
96
|
-
));
|
|
97
|
-
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
98
|
-
const ContextMenuShortcut = ({
|
|
99
|
-
className,
|
|
100
|
-
...props
|
|
101
|
-
}) => /* @__PURE__ */ jsx(
|
|
102
|
-
"span",
|
|
103
|
-
{
|
|
104
|
-
"data-slot": "context-menu-shortcut",
|
|
105
|
-
className: cn("ui-context-menu-shortcut", className),
|
|
106
|
-
...props
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
const ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
110
|
-
const ContextMenuSubTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
111
|
-
ContextMenuPrimitive.SubTrigger,
|
|
112
|
-
{
|
|
113
|
-
ref,
|
|
114
|
-
"data-slot": "context-menu-sub-trigger",
|
|
115
|
-
className: cn("ui-context-menu-sub-trigger", className),
|
|
116
|
-
...props,
|
|
117
|
-
children: [
|
|
118
|
-
children,
|
|
119
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "ui-context-menu-sub-trigger-icon", "aria-hidden": "true" })
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
));
|
|
123
|
-
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
124
|
-
const ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
125
|
-
ContextMenuPrimitive.SubContent,
|
|
126
|
-
{
|
|
127
|
-
ref,
|
|
128
|
-
"data-slot": "context-menu-sub-content",
|
|
129
|
-
className: cn("ui-context-menu-sub-content", className),
|
|
130
|
-
...props
|
|
131
|
-
}
|
|
132
|
-
));
|
|
133
|
-
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
134
|
-
export {
|
|
135
|
-
ContextMenu,
|
|
136
|
-
ContextMenuCheckboxItem,
|
|
137
|
-
ContextMenuContent,
|
|
138
|
-
ContextMenuItem,
|
|
139
|
-
ContextMenuLabel,
|
|
140
|
-
ContextMenuPortal,
|
|
141
|
-
ContextMenuRadioGroup,
|
|
142
|
-
ContextMenuRadioItem,
|
|
143
|
-
ContextMenuSeparator,
|
|
144
|
-
ContextMenuShortcut,
|
|
145
|
-
ContextMenuSub,
|
|
146
|
-
ContextMenuSubContent,
|
|
147
|
-
ContextMenuSubTrigger,
|
|
148
|
-
ContextMenuTrigger
|
|
149
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
-
export declare const Menubar: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
/**
|
|
5
|
-
* Annotated rather than inferred, and that is load-bearing.
|
|
6
|
-
*
|
|
7
|
-
* Radix types this one through `createContextScope`, so its INFERRED type reaches into
|
|
8
|
-
* `@radix-ui/react-context` for a `Scope` — and TypeScript then refuses to emit a declaration it
|
|
9
|
-
* cannot name portably (TS2883) unless that package is a DIRECT dependency. It was one, purely to
|
|
10
|
-
* satisfy this line: nothing in the tree ever imported it. Naming the props here severs that,
|
|
11
|
-
* which is what let the dependency go.
|
|
12
|
-
*/
|
|
13
|
-
export declare const MenubarMenu: (props: React.ComponentProps<typeof MenubarPrimitive.Menu>) => React.ReactNode;
|
|
14
|
-
export declare function MenubarTrigger(props: React.ComponentProps<typeof MenubarPrimitive.Trigger>): React.JSX.Element;
|
|
15
|
-
export declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
17
|
-
inset?: boolean;
|
|
18
|
-
variant?: "default" | "destructive";
|
|
19
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
export declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export declare const MenubarRadioGroup: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
export declare const MenubarRadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
export declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
export declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
-
export declare const MenubarShortcut: ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => React.JSX.Element;
|
|
26
|
-
export declare const MenubarSub: React.FC<MenubarPrimitive.MenubarSubProps>;
|
|
27
|
-
export declare const MenubarSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
-
export declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
5
|
-
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
6
|
-
import { cn } from "../../lib/utils.js";
|
|
7
|
-
const Menubar = MenubarPrimitive.Root;
|
|
8
|
-
const MenubarMenu = MenubarPrimitive.Menu;
|
|
9
|
-
function MenubarTrigger(props) {
|
|
10
|
-
return /* @__PURE__ */ jsx(MenubarPrimitive.Trigger, { "data-slot": "menubar-trigger", ...props });
|
|
11
|
-
}
|
|
12
|
-
const MenubarContent = React.forwardRef(({ className, align = "start", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
13
|
-
MenubarPrimitive.Content,
|
|
14
|
-
{
|
|
15
|
-
ref,
|
|
16
|
-
"data-slot": "menubar-content",
|
|
17
|
-
align,
|
|
18
|
-
sideOffset,
|
|
19
|
-
className: cn("ui-menubar-content", className),
|
|
20
|
-
...props
|
|
21
|
-
}
|
|
22
|
-
) }));
|
|
23
|
-
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
24
|
-
const MenubarItem = React.forwardRef(({ className, inset, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
25
|
-
MenubarPrimitive.Item,
|
|
26
|
-
{
|
|
27
|
-
ref,
|
|
28
|
-
"data-slot": "menubar-item",
|
|
29
|
-
"data-inset": inset,
|
|
30
|
-
"data-variant": variant,
|
|
31
|
-
className: cn("ui-menubar-item", className),
|
|
32
|
-
...props
|
|
33
|
-
}
|
|
34
|
-
));
|
|
35
|
-
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
36
|
-
const MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
37
|
-
MenubarPrimitive.CheckboxItem,
|
|
38
|
-
{
|
|
39
|
-
ref,
|
|
40
|
-
"data-slot": "menubar-checkbox-item",
|
|
41
|
-
className: cn("ui-menubar-checkbox-item", className),
|
|
42
|
-
checked,
|
|
43
|
-
...props,
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ jsx("span", { className: "ui-menubar-item-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "ui-menubar-check" }) }) }),
|
|
46
|
-
children
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
));
|
|
50
|
-
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
51
|
-
const MenubarRadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
52
|
-
MenubarPrimitive.RadioGroup,
|
|
53
|
-
{
|
|
54
|
-
ref,
|
|
55
|
-
"data-slot": "menubar-radio-group",
|
|
56
|
-
className: cn("ui-menubar-radio-group", className),
|
|
57
|
-
...props
|
|
58
|
-
}
|
|
59
|
-
));
|
|
60
|
-
MenubarRadioGroup.displayName = MenubarPrimitive.RadioGroup.displayName;
|
|
61
|
-
const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
62
|
-
MenubarPrimitive.RadioItem,
|
|
63
|
-
{
|
|
64
|
-
ref,
|
|
65
|
-
"data-slot": "menubar-radio-item",
|
|
66
|
-
className: cn("ui-menubar-radio-item", className),
|
|
67
|
-
...props,
|
|
68
|
-
children: [
|
|
69
|
-
/* @__PURE__ */ jsx("span", { className: "ui-menubar-item-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "ui-menubar-dot" }) }) }),
|
|
70
|
-
children
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
));
|
|
74
|
-
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
75
|
-
const MenubarLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
76
|
-
MenubarPrimitive.Label,
|
|
77
|
-
{
|
|
78
|
-
ref,
|
|
79
|
-
"data-slot": "menubar-label",
|
|
80
|
-
className: cn("ui-menubar-label", className),
|
|
81
|
-
...props
|
|
82
|
-
}
|
|
83
|
-
));
|
|
84
|
-
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
85
|
-
const MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
86
|
-
MenubarPrimitive.Separator,
|
|
87
|
-
{
|
|
88
|
-
ref,
|
|
89
|
-
"data-slot": "menubar-separator",
|
|
90
|
-
className: cn("ui-menubar-separator", className),
|
|
91
|
-
...props
|
|
92
|
-
}
|
|
93
|
-
));
|
|
94
|
-
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
95
|
-
const MenubarShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("span", { "data-slot": "menubar-shortcut", className: cn("ui-menubar-shortcut", className), ...props });
|
|
96
|
-
const MenubarSub = MenubarPrimitive.Sub;
|
|
97
|
-
const MenubarSubTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
98
|
-
MenubarPrimitive.SubTrigger,
|
|
99
|
-
{
|
|
100
|
-
ref,
|
|
101
|
-
"data-slot": "menubar-sub-trigger",
|
|
102
|
-
className: cn("ui-menubar-sub-trigger", className),
|
|
103
|
-
...props,
|
|
104
|
-
children: [
|
|
105
|
-
children,
|
|
106
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "ui-menubar-sub-trigger-icon", "aria-hidden": "true" })
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
));
|
|
110
|
-
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
111
|
-
const MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
112
|
-
MenubarPrimitive.SubContent,
|
|
113
|
-
{
|
|
114
|
-
ref,
|
|
115
|
-
"data-slot": "menubar-sub-content",
|
|
116
|
-
className: cn("ui-menubar-sub-content", className),
|
|
117
|
-
...props
|
|
118
|
-
}
|
|
119
|
-
));
|
|
120
|
-
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
121
|
-
export {
|
|
122
|
-
Menubar,
|
|
123
|
-
MenubarCheckboxItem,
|
|
124
|
-
MenubarContent,
|
|
125
|
-
MenubarItem,
|
|
126
|
-
MenubarLabel,
|
|
127
|
-
MenubarMenu,
|
|
128
|
-
MenubarRadioGroup,
|
|
129
|
-
MenubarRadioItem,
|
|
130
|
-
MenubarSeparator,
|
|
131
|
-
MenubarShortcut,
|
|
132
|
-
MenubarSub,
|
|
133
|
-
MenubarSubContent,
|
|
134
|
-
MenubarSubTrigger,
|
|
135
|
-
MenubarTrigger
|
|
136
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
3
|
-
export declare const NavigationMenu: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>>;
|
|
4
|
-
export declare const NavigationMenuList: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
5
|
-
export declare const NavigationMenuItem: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
6
|
-
export declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
export declare const NavigationMenuContent: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export declare const NavigationMenuLink: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
9
|
-
export declare const NavigationMenuIndicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export declare const NavigationMenuViewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|