@godxjp/ui 19.1.0 → 19.3.1
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 +25 -128
- package/dist/app/theme-axes.d.ts +4 -15
- package/dist/app/timezones.d.ts +1 -4
- package/dist/components/charts/area-chart.d.ts +2 -3
- package/dist/components/charts/bar-chart.d.ts +2 -3
- package/dist/components/charts/chart-frame.d.ts +7 -16
- package/dist/components/charts/chart-summary.d.ts +2 -2
- package/dist/components/charts/compact-bar-trend.d.ts +9 -24
- package/dist/components/charts/index.d.ts +1 -6
- package/dist/components/data-display/badge.d.ts +20 -14
- package/dist/components/data-display/badge.js +18 -4
- package/dist/components/data-display/card.d.ts +21 -41
- package/dist/components/data-display/carousel.d.ts +1 -2
- package/dist/components/data-display/code-block.d.ts +4 -0
- package/dist/components/data-display/code-block.js +24 -0
- package/dist/components/data-display/data-table.d.ts +15 -37
- package/dist/components/data-display/data-table.js +1 -3
- package/dist/components/data-display/descriptions.d.ts +2 -6
- package/dist/components/data-display/descriptions.js +0 -2
- package/dist/components/data-display/index.d.ts +4 -0
- package/dist/components/data-display/index.js +4 -0
- package/dist/components/data-display/list-row.d.ts +3 -22
- package/dist/components/data-display/permission-matrix.d.ts +7 -20
- package/dist/components/data-display/progress.d.ts +1 -1
- package/dist/components/data-display/prose.d.ts +4 -0
- package/dist/components/data-display/prose.js +20 -0
- package/dist/components/data-display/service-launcher-card.d.ts +3 -10
- package/dist/components/data-display/table.d.ts +20 -80
- package/dist/components/data-display/table.js +0 -3
- package/dist/components/data-display/timeline.d.ts +3 -5
- package/dist/components/data-entry/branch-scope-picker.d.ts +2 -19
- package/dist/components/data-entry/branch-scope-picker.js +0 -1
- package/dist/components/data-entry/calendar.d.ts +3 -2
- package/dist/components/data-entry/calendar.js +58 -3
- package/dist/components/data-entry/command-palette.d.ts +8 -22
- package/dist/components/data-entry/date-picker.d.ts +4 -5
- package/dist/components/data-entry/date-picker.js +6 -1
- package/dist/components/data-entry/date-range-picker.d.ts +1 -1
- package/dist/components/data-entry/date-range-picker.js +8 -3
- package/dist/components/data-entry/form-errors.d.ts +7 -18
- package/dist/components/data-entry/form-field.js +1 -5
- package/dist/components/data-entry/form.d.ts +1 -9
- package/dist/components/data-entry/input.d.ts +16 -14
- package/dist/components/data-entry/input.js +3 -0
- package/dist/components/data-entry/month-picker.js +2 -2
- package/dist/components/data-entry/month-range-picker.d.ts +4 -6
- package/dist/components/data-entry/month-range-picker.js +2 -2
- package/dist/components/data-entry/number-input.d.ts +1 -5
- package/dist/components/data-entry/number-input.js +1 -0
- package/dist/components/data-entry/radio.js +0 -1
- package/dist/components/data-entry/search-select.d.ts +2 -4
- package/dist/components/data-entry/select.d.ts +11 -6
- package/dist/components/data-entry/select.js +4 -2
- package/dist/components/data-entry/switch.js +0 -1
- package/dist/components/data-entry/textarea.d.ts +10 -16
- package/dist/components/data-entry/time-picker.d.ts +3 -5
- package/dist/components/data-entry/upload-types.d.ts +1 -5
- package/dist/components/data-entry/use-upload-draft.d.ts +0 -4
- package/dist/components/feedback/dialog.d.ts +6 -15
- package/dist/components/feedback/overlay-header-tone.d.ts +1 -1
- package/dist/components/feedback/sheet.d.ts +3 -10
- package/dist/components/feedback/sheet.js +1 -1
- package/dist/components/feedback/sonner.js +2 -3
- package/dist/components/general/activity.d.ts +4 -30
- package/dist/components/general/button.js +1 -10
- package/dist/components/general/logo.d.ts +6 -28
- package/dist/components/general/reveal.d.ts +3 -9
- package/dist/components/general/typography.d.ts +1 -3
- package/dist/components/layout/account-chip.d.ts +8 -0
- package/dist/components/layout/account-chip.js +45 -0
- package/dist/components/layout/auth-divider.d.ts +2 -9
- package/dist/components/layout/auth-shell.d.ts +1 -14
- package/dist/components/layout/breadcrumb.d.ts +1 -5
- package/dist/components/layout/centered-shell.d.ts +4 -18
- package/dist/components/layout/error-surface.d.ts +11 -28
- package/dist/components/layout/error-surface.js +4 -1
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +2 -0
- package/dist/components/layout/legal-document-shell.d.ts +5 -28
- package/dist/components/layout/master-detail.d.ts +2 -18
- package/dist/components/layout/page-container.js +0 -1
- package/dist/components/layout/responsive-grid.d.ts +6 -1
- package/dist/components/layout/responsive-grid.js +9 -2
- package/dist/components/layout/service-role-panel.d.ts +7 -19
- package/dist/components/layout/sidebar.d.ts +5 -27
- package/dist/components/layout/sidebar.js +0 -1
- package/dist/components/layout/split-pane.d.ts +0 -7
- package/dist/components/layout/topbar.d.ts +1 -14
- package/dist/components/navigation/app-setting-picker.js +1 -3
- package/dist/components/navigation/filter-bar.d.ts +1 -6
- package/dist/components/navigation/pagination-utils.d.ts +2 -12
- package/dist/components/navigation/tabs-scroll.d.ts +2 -36
- package/dist/components/navigation/tabs.js +4 -8
- package/dist/components/query/data-state.d.ts +2 -2
- package/dist/components/ui/credential-reveal.d.ts +1 -4
- package/dist/components/ui/hover-card.d.ts +1 -2
- package/dist/components/ui/separator.d.ts +2 -15
- package/dist/components/ui/toggle-group.d.ts +1 -5
- package/dist/components/ui/toggle.d.ts +6 -31
- package/dist/email/brand-mark.d.ts +6 -34
- package/dist/email/color.d.ts +7 -17
- package/dist/email/geometry.d.ts +4 -8
- package/dist/email/index.d.ts +4 -48
- package/dist/email/inline-style.d.ts +3 -9
- package/dist/email/urgency.d.ts +2 -7
- package/dist/form/form-context.d.ts +2 -5
- package/dist/form/form-root.d.ts +1 -2
- package/dist/i18n/messages/en.json +4 -0
- package/dist/i18n/messages/ja.json +4 -0
- package/dist/i18n/messages/vi.json +4 -0
- package/dist/inertia/index.d.ts +2 -10
- package/dist/lib/control-styles.d.ts +10 -21
- package/dist/lib/control-styles.js +4 -6
- package/dist/lib/datetime/format-date.d.ts +1 -4
- package/dist/lib/field-a11y.d.ts +11 -68
- package/dist/lib/field-a11y.js +0 -1
- package/dist/lib/format.d.ts +4 -8
- package/dist/lib/hooks.d.ts +6 -12
- package/dist/lib/permission-grid.d.ts +3 -18
- package/dist/lib/query-error.d.ts +3 -3
- package/dist/props/components/app.prop.d.ts +15 -38
- package/dist/props/components/charts.prop.d.ts +2 -3
- package/dist/props/components/data-display.prop.d.ts +55 -72
- package/dist/props/components/data-entry.prop.d.ts +35 -40
- package/dist/props/components/form.prop.d.ts +2 -6
- package/dist/props/components/general.prop.d.ts +11 -27
- package/dist/props/components/layout.prop.d.ts +89 -260
- package/dist/props/components/navigation.prop.d.ts +27 -42
- package/dist/props/registry.d.ts +36 -1
- package/dist/props/registry.js +45 -1
- package/dist/props/vocabulary/data.prop.d.ts +18 -49
- package/dist/props/vocabulary/index.d.ts +1 -1
- package/dist/props/vocabulary/interaction.prop.d.ts +10 -12
- package/dist/props/vocabulary/layout.prop.d.ts +8 -30
- package/dist/props/vocabulary/shared.prop.d.ts +3 -2
- package/dist/styles/alert-layout.css +1 -32
- package/dist/styles/badge-layout.css +19 -18
- package/dist/styles/base.css +14 -113
- package/dist/styles/card-layout.css +6 -128
- package/dist/styles/chart-layout.css +2 -17
- package/dist/styles/control.css +380 -458
- package/dist/styles/core.css +21 -0
- package/dist/styles/data-display-layout.css +175 -94
- package/dist/styles/data-entry-layout.css +0 -45
- package/dist/styles/density.css +1 -30
- package/dist/styles/dialog-layout.css +5 -69
- package/dist/styles/focus-ring.css +13 -87
- package/dist/styles/fonts.css +1 -31
- package/dist/styles/form-layout.css +7 -91
- package/dist/styles/index.css +2 -20
- package/dist/styles/layout.css +38 -456
- package/dist/styles/logo-layout.css +1 -35
- package/dist/styles/motion.css +3 -42
- package/dist/styles/navigation-layout.css +3 -50
- package/dist/styles/shell-layout.css +37 -403
- package/dist/styles/table-layout.css +16 -274
- package/dist/styles/text-layout.css +7 -21
- package/dist/styles/toggle.css +1 -23
- package/dist/theme/dxs.canonical.css +1 -55
- package/dist/theme/example.service.css +1 -26
- package/dist/theme/famgia.service.css +5 -15
- package/dist/tokens/axes.css +3 -40
- package/dist/tokens/base.css +1 -4
- package/dist/tokens/components/activity.css +6 -42
- package/dist/tokens/components/badge.css +12 -13
- package/dist/tokens/components/banner.css +4 -9
- package/dist/tokens/components/card.css +32 -88
- package/dist/tokens/components/chart.css +9 -26
- package/dist/tokens/components/control.css +37 -222
- package/dist/tokens/components/data-display.css +28 -79
- package/dist/tokens/components/data-entry.css +5 -19
- package/dist/tokens/components/descriptions.css +7 -27
- package/dist/tokens/components/email.css +38 -84
- package/dist/tokens/components/error-surface.css +2 -18
- package/dist/tokens/components/feedback.css +27 -124
- package/dist/tokens/components/form.css +13 -45
- package/dist/tokens/components/legal-document.css +16 -41
- package/dist/tokens/components/list-row.css +11 -36
- package/dist/tokens/components/logo.css +2 -57
- package/dist/tokens/components/navigation.css +16 -94
- package/dist/tokens/components/scroll-area.css +2 -18
- package/dist/tokens/components/separator.css +8 -30
- package/dist/tokens/components/sheet.css +3 -14
- package/dist/tokens/components/shell.css +53 -307
- package/dist/tokens/components/sidebar.css +5 -22
- package/dist/tokens/components/table.css +19 -140
- package/dist/tokens/components/toggle.css +3 -65
- package/dist/tokens/components/upload.css +7 -43
- package/dist/tokens/foundation.css +108 -383
- package/dist/tokens/semantic/layout.css +33 -207
- package/docs/CANONICAL-CONTRACTS.md +206 -0
- package/docs/COMPONENTS.md +157 -0
- package/docs/COMPOSITION-VS-COMPONENT.md +105 -0
- package/docs/CONSUMER-RULES.md +14 -0
- package/docs/CUSTOMER-THEMING.md +162 -0
- package/docs/DATETIME.md +69 -0
- package/docs/DEVELOPMENT.md +173 -0
- package/docs/FORMS.md +143 -0
- package/docs/FRAME-A11Y-CI.md +267 -0
- package/docs/FRAME-COVERAGE-LEDGER.md +123 -0
- package/docs/FRAME-COVERAGE-REPORT.md +140 -0
- package/docs/FRAME-COVERAGE-STANDARD.md +65 -0
- package/docs/FRAME-COVERAGE.md +29 -0
- package/docs/PROPS-REGISTRY.md +61 -0
- package/docs/PROPS-VOCABULARY.md +100 -0
- package/docs/README.md +60 -0
- package/docs/REGISTRY.md +70 -0
- package/docs/SPACING.md +56 -0
- package/docs/STANDARDS-vocabulary-tokens.md +48 -0
- package/docs/TESTING.md +98 -0
- package/docs/TOKENS.md +347 -0
- package/docs/asset-modules.d.ts +46 -0
- package/docs/assets/cover-terrain.svg +6 -0
- package/docs/assets/portrait-amber.svg +5 -0
- package/docs/assets/portrait-clay.svg +5 -0
- package/docs/assets/portrait-indigo.svg +5 -0
- package/docs/assets/portrait-iris.svg +5 -0
- package/docs/assets/portrait-moss.svg +5 -0
- package/docs/assets/portrait-plum.svg +5 -0
- package/docs/assets/portrait-slate.svg +5 -0
- package/docs/charts/compact-bar-trend.tsx +328 -0
- package/docs/charts/size-tiers.tsx +192 -0
- package/docs/data-display/accordion.tsx +99 -0
- package/docs/data-display/avatar.tsx +355 -0
- package/docs/data-display/badge.tsx +283 -0
- package/docs/data-display/card/examples/detail-panel.tsx +106 -0
- package/docs/data-display/card/index.md +3 -0
- package/docs/data-display/card/index.tsx +285 -0
- package/docs/data-display/carousel.tsx +160 -0
- package/docs/data-display/charts.tsx +198 -0
- package/docs/data-display/code-block.tsx +90 -0
- package/docs/data-display/collapsible.tsx +162 -0
- package/docs/data-display/credential-reveal.tsx +145 -0
- package/docs/data-display/data-table/examples/approval-queue.tsx +212 -0
- package/docs/data-display/data-table/examples/grid-features.tsx +158 -0
- package/docs/data-display/data-table/examples/list-page.tsx +175 -0
- package/docs/data-display/data-table/index.md +5 -0
- package/docs/data-display/data-table/index.tsx +295 -0
- package/docs/data-display/descriptions.tsx +143 -0
- package/docs/data-display/empty-state.tsx +164 -0
- package/docs/data-display/hover-card.tsx +181 -0
- package/docs/data-display/list-row.tsx +420 -0
- package/docs/data-display/permission-matrix.tsx +188 -0
- package/docs/data-display/popover-touch.tsx +27 -0
- package/docs/data-display/popover.tsx +246 -0
- package/docs/data-display/progress.tsx +84 -0
- package/docs/data-display/prose.tsx +105 -0
- package/docs/data-display/qr-code.tsx +68 -0
- package/docs/data-display/scroll-area.tsx +303 -0
- package/docs/data-display/service-launcher-card.tsx +145 -0
- package/docs/data-display/stat-card.tsx +99 -0
- package/docs/data-display/table.tsx +251 -0
- package/docs/data-display/timeline.tsx +112 -0
- package/docs/data-display/touch-actions.tsx +36 -0
- package/docs/data-display/tree-list.tsx +107 -0
- package/docs/data-entry/branch-scope-picker.tsx +123 -0
- package/docs/data-entry/calendar.tsx +180 -0
- package/docs/data-entry/cascader.tsx +378 -0
- package/docs/data-entry/checkbox.tsx +256 -0
- package/docs/data-entry/color-picker.tsx +117 -0
- package/docs/data-entry/command-palette.tsx +179 -0
- package/docs/data-entry/command.tsx +262 -0
- package/docs/data-entry/country-picker-recipe.tsx +175 -0
- package/docs/data-entry/date-picker.tsx +191 -0
- package/docs/data-entry/date-range-picker.tsx +149 -0
- package/docs/data-entry/form/examples/employee-settings.tsx +267 -0
- package/docs/data-entry/form/examples/invoice-form.tsx +387 -0
- package/docs/data-entry/form-field/examples/a11y-contract.tsx +240 -0
- package/docs/data-entry/form-field/examples/create-form.tsx +105 -0
- package/docs/data-entry/form-field/index.md +8 -0
- package/docs/data-entry/form-field/index.tsx +330 -0
- package/docs/data-entry/form-inertia.tsx +80 -0
- package/docs/data-entry/form-root.tsx +102 -0
- package/docs/data-entry/form.tsx +724 -0
- package/docs/data-entry/input-otp.tsx +231 -0
- package/docs/data-entry/input.tsx +114 -0
- package/docs/data-entry/label.tsx +100 -0
- package/docs/data-entry/month-picker.tsx +101 -0
- package/docs/data-entry/month-range-picker.tsx +115 -0
- package/docs/data-entry/number-input.tsx +240 -0
- package/docs/data-entry/password-input.tsx +102 -0
- package/docs/data-entry/password-strength.tsx +97 -0
- package/docs/data-entry/radio-group.tsx +95 -0
- package/docs/data-entry/rating.tsx +87 -0
- package/docs/data-entry/search-input.tsx +120 -0
- package/docs/data-entry/select-async-contracts.tsx +108 -0
- package/docs/data-entry/select-matrix.tsx +204 -0
- package/docs/data-entry/select.tsx +369 -0
- package/docs/data-entry/slider.tsx +130 -0
- package/docs/data-entry/switch.tsx +67 -0
- package/docs/data-entry/tag-input.tsx +108 -0
- package/docs/data-entry/textarea.tsx +209 -0
- package/docs/data-entry/time-picker.tsx +99 -0
- package/docs/data-entry/toggle-count.tsx +293 -0
- package/docs/data-entry/toggle-group.tsx +225 -0
- package/docs/data-entry/toggle.tsx +127 -0
- package/docs/data-entry/transfer.tsx +97 -0
- package/docs/data-entry/tree-select.tsx +204 -0
- package/docs/data-entry/upload.tsx +184 -0
- package/docs/feedback/alert-dialog.tsx +270 -0
- package/docs/feedback/alert.tsx +248 -0
- package/docs/feedback/banner.tsx +183 -0
- package/docs/feedback/danger-confirm.tsx +88 -0
- package/docs/feedback/dialog-touch.tsx +24 -0
- package/docs/feedback/dialog.tsx +193 -0
- package/docs/feedback/sheet.tsx +420 -0
- package/docs/feedback/skeleton.tsx +111 -0
- package/docs/feedback/toast.tsx +135 -0
- package/docs/feedback/tooltip.tsx +171 -0
- package/docs/feedback/two-factor-setup.tsx +68 -0
- package/docs/foundation/_email-specimen.ts +274 -0
- package/docs/foundation/colors.tsx +204 -0
- package/docs/foundation/density.tsx +232 -0
- package/docs/foundation/email-tokens.tsx +323 -0
- package/docs/foundation/radius-shadow.tsx +154 -0
- package/docs/foundation/spacing.tsx +211 -0
- package/docs/foundation/typography.tsx +147 -0
- package/docs/general/activity.tsx +224 -0
- package/docs/general/button/examples/destructive-confirm.tsx +90 -0
- package/docs/general/button/examples/form-actions.tsx +85 -0
- package/docs/general/button/examples/toolbar.tsx +160 -0
- package/docs/general/button/index.md +12 -0
- package/docs/general/button/index.tsx +211 -0
- package/docs/general/logo.tsx +131 -0
- package/docs/general/reveal.tsx +41 -0
- package/docs/general/typography.tsx +152 -0
- package/docs/layout/account-chip.tsx +72 -0
- package/docs/layout/admin-collection.tsx +122 -0
- package/docs/layout/app-shell.tsx +374 -0
- package/docs/layout/aspect-ratio.tsx +135 -0
- package/docs/layout/auth-account-summary.tsx +103 -0
- package/docs/layout/auth-divider.tsx +28 -0
- package/docs/layout/auth-footer.tsx +37 -0
- package/docs/layout/auth-identity.tsx +36 -0
- package/docs/layout/auth-recovery/examples/mfa-challenge.md +41 -0
- package/docs/layout/auth-recovery/examples/mfa-challenge.tsx +254 -0
- package/docs/layout/auth-recovery/examples/mobile-390.md +25 -0
- package/docs/layout/auth-recovery/examples/mobile-390.tsx +82 -0
- package/docs/layout/auth-recovery/examples/password-recovery.md +24 -0
- package/docs/layout/auth-recovery/examples/password-recovery.tsx +197 -0
- package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.md +27 -0
- package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.tsx +156 -0
- package/docs/layout/auth-recovery/index.md +140 -0
- package/docs/layout/auth-recovery/index.tsx +96 -0
- package/docs/layout/auth-shell-context.tsx +103 -0
- package/docs/layout/auth-shell-device.tsx +112 -0
- package/docs/layout/auth-shell-registration.tsx +335 -0
- package/docs/layout/auth-shell-variants.tsx +139 -0
- package/docs/layout/auth-shell.tsx +59 -0
- package/docs/layout/auth-stack.tsx +40 -0
- package/docs/layout/centered-shell.tsx +102 -0
- package/docs/layout/error-surface/examples/application-403.tsx +84 -0
- package/docs/layout/error-surface/examples/application-404.tsx +77 -0
- package/docs/layout/error-surface/examples/system-500.tsx +47 -0
- package/docs/layout/error-surface/examples/system-503.tsx +48 -0
- package/docs/layout/error-surface/index.md +153 -0
- package/docs/layout/error-surface/index.tsx +239 -0
- package/docs/layout/flex.tsx +266 -0
- package/docs/layout/legal-document-shell/_data.ts +110 -0
- package/docs/layout/legal-document-shell/examples/desktop-1440.md +12 -0
- package/docs/layout/legal-document-shell/examples/desktop-1440.tsx +83 -0
- package/docs/layout/legal-document-shell/examples/mobile-390.md +22 -0
- package/docs/layout/legal-document-shell/examples/mobile-390.tsx +70 -0
- package/docs/layout/legal-document-shell/examples/tablet-1024.md +3 -0
- package/docs/layout/legal-document-shell/examples/tablet-1024.tsx +84 -0
- package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.md +18 -0
- package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.tsx +61 -0
- package/docs/layout/legal-document-shell/index.md +51 -0
- package/docs/layout/legal-document-shell/index.tsx +101 -0
- package/docs/layout/master-detail.tsx +387 -0
- package/docs/layout/org-switcher.tsx +131 -0
- package/docs/layout/page-container.tsx +954 -0
- package/docs/layout/resizable-panel.tsx +419 -0
- package/docs/layout/responsive-grid.tsx +243 -0
- package/docs/layout/separator.tsx +327 -0
- package/docs/layout/service-role-panel.tsx +144 -0
- package/docs/layout/sidebar.tsx +609 -0
- package/docs/layout/split-pane.tsx +468 -0
- package/docs/layout/topbar.tsx +349 -0
- package/docs/navigation/app-setting-picker.tsx +142 -0
- package/docs/navigation/breadcrumb.tsx +135 -0
- package/docs/navigation/context-menu.tsx +123 -0
- package/docs/navigation/dropdown-menu.tsx +213 -0
- package/docs/navigation/filter-bar.tsx +227 -0
- package/docs/navigation/menubar.tsx +141 -0
- package/docs/navigation/navigation-menu.tsx +158 -0
- package/docs/navigation/pagination.tsx +241 -0
- package/docs/navigation/steps.tsx +265 -0
- package/docs/navigation/tabs-rtl.tsx +28 -0
- package/docs/navigation/tabs.tsx +314 -0
- package/docs/navigation/toolbar.tsx +339 -0
- package/docs/providers/app-provider.tsx +191 -0
- package/docs/providers/format-date.tsx +230 -0
- package/docs/query/button-refetch.tsx +160 -0
- package/docs/query/data-state.tsx +192 -0
- package/docs/query/infinite-query-state.tsx +93 -0
- package/docs/query/mutation-feedback.tsx +70 -0
- package/docs/query/prefetch-link.tsx +262 -0
- package/docs/query/touch-actions.tsx +68 -0
- package/docs/showcase/acme-portal.tsx +455 -0
- package/docs/showcase/acme-website.tsx +461 -0
- package/docs/showcase/case1-warehouse-dashboard.tsx +359 -0
- package/docs/showcase/case2-employee-me.tsx +444 -0
- package/docs/showcase/case3-approval-workflow.tsx +529 -0
- package/docs/showcase/case4-login.tsx +313 -0
- package/docs/showcase/case5-shift-calendar.tsx +795 -0
- package/docs/showcase/case6-agency-handy.tsx +1113 -0
- package/docs/showcase/futurelastic-web.tsx +392 -0
- package/docs/showcase/org-switcher.tsx +313 -0
- package/docs/showcase/permission-matrix.tsx +346 -0
- package/docs/showcase/public-landing.tsx +210 -0
- package/docs/showcase/settings-account-sections.tsx +559 -0
- package/docs/showcase/settings-security-mfa.tsx +145 -0
- package/docs/showcase/table-approval-queue.tsx +199 -0
- package/docs/showcase/table-bulk-actions.tsx +460 -0
- package/docs/showcase/table-compact-kintone.tsx +438 -0
- package/docs/showcase/table-conditional-format.tsx +367 -0
- package/docs/showcase/table-crud-list.tsx +544 -0
- package/docs/showcase/table-density.tsx +347 -0
- package/docs/showcase/table-expandable-rows.tsx +480 -0
- package/docs/showcase/table-filter-chips.tsx +456 -0
- package/docs/showcase/table-footer-totals.tsx +314 -0
- package/docs/showcase/table-grouped-subtotals.tsx +391 -0
- package/docs/showcase/table-master-detail.tsx +484 -0
- package/docs/showcase/table-pagination.tsx +327 -0
- package/docs/showcase/table-states.tsx +366 -0
- package/docs/showcase/table-sticky-columns.tsx +376 -0
- package/docs/showcase/table-tree-rows.tsx +444 -0
- package/docs/showcase/table-view-tabs.tsx +488 -0
- package/package.json +9 -12
- package/scripts/_agent-setup.mjs +16 -2
- package/scripts/audit-hook.mjs +3 -13
- package/scripts/init-agent-kit.mjs +1 -14
- package/scripts/postinstall.mjs +12 -12
- package/scripts/ui-audit.mjs +93 -31
- package/scripts/visual-audit-rules.mjs +51 -7
- package/scripts/visual-audit.mjs +118 -47
|
@@ -5,39 +5,21 @@ import type { BreadcrumbProp, TitleProp, SubtitleProp, StatusProp, ExtraProp, Fo
|
|
|
5
5
|
import type { EmptyStateToneProp } from "./data-display.prop.js";
|
|
6
6
|
/**
|
|
7
7
|
* Arrangement of the page header's title band and its `extra` slot below the 640px step.
|
|
8
|
-
* `
|
|
9
|
-
*
|
|
10
|
-
* `--page-header-extra-measure` measure, letting the title/subtitle wrap into what is left.
|
|
8
|
+
* `responsive-inline` keeps `extra` beside the title band at the `--page-header-extra-measure`
|
|
9
|
+
* measure, letting the title/subtitle wrap into what is left.
|
|
11
10
|
*/
|
|
12
11
|
export type PageContainerHeaderLayoutProp = "stack" | "responsive-inline";
|
|
13
12
|
/** Whole-page semantic composition owned by PageContainer. */
|
|
14
13
|
export type PageContainerPresetProp = "default" | "admin-collection";
|
|
15
14
|
/**
|
|
16
15
|
* Bounded page MEASURE — the shared inline cap applied to the page header AND body together, so
|
|
17
|
-
* the header `extra` action ends on the same edge as the body surface.
|
|
18
|
-
*
|
|
19
|
-
* `variant="ghost"` feed can finally have a bounded measure too (gh#245 / gh#247).
|
|
20
|
-
*
|
|
21
|
-
* `default` applies NO cap — the page is fluid exactly as before. `narrow` / `medium` read the
|
|
22
|
-
* `--page-measure-{narrow,medium}` tokens (42rem / 48rem OUTER, i.e. 624px / 720px VISIBLE surface
|
|
23
|
-
* once the package-owned page gutters are subtracted). Both are maxes, so a compact viewport stays
|
|
24
|
-
* fluid at the compact gutter.
|
|
16
|
+
* the header `extra` action ends on the same edge as the body surface. `default` applies NO cap —
|
|
17
|
+
* the page is fluid exactly as before.
|
|
25
18
|
*/
|
|
26
19
|
export type PageContainerMeasureProp = "default" | "narrow" | "medium";
|
|
27
20
|
/**
|
|
28
21
|
* What the page's top row IS — the question that decides its type step, not how big you want it.
|
|
29
|
-
*
|
|
30
22
|
* `document` (default) — the row is the page's TITLE: a record, a form, a collection, a report.
|
|
31
|
-
* The `<h1>` takes `--page-title-font-size` and the existing responsive step down at 720px.
|
|
32
|
-
*
|
|
33
|
-
* `chrome` — the row is the surface's own furniture: a chat channel name, a mail subject line, an
|
|
34
|
-
* IDE tab, a conversation header. It names the thing you are already inside rather than announcing
|
|
35
|
-
* a document, so it takes the body type step (`--page-title-font-size-chrome`) and the header band
|
|
36
|
-
* stops competing with the content underneath. Orthogonal to `PageContainerVariantProp`: `ghost`
|
|
37
|
-
* owns the page's chrome WEIGHT (no divider, no header bottom pad), this owns what the title MEANS
|
|
38
|
-
* — a chat page usually wants both, a quiet document feed wants only `ghost`.
|
|
39
|
-
*
|
|
40
|
-
* The `<h1>` stays an `<h1>` either way; only the type step moves, and only via a token.
|
|
41
23
|
*/
|
|
42
24
|
export type PageContainerHeaderScaleProp = "document" | "chrome";
|
|
43
25
|
/** @see PageContainer */
|
|
@@ -45,21 +27,15 @@ export type PageContainerProp = {
|
|
|
45
27
|
title: TitleProp;
|
|
46
28
|
subtitle?: SubtitleProp;
|
|
47
29
|
/**
|
|
48
|
-
* Status/meta band rendered beside the title inside the heading — StatusBadge, environment
|
|
49
|
-
*
|
|
50
|
-
* sits on the title line and WRAPS under it on compact viewports, so a consumer never
|
|
51
|
-
* hand-lays a badge next to an `<h1>`. Part of the canonical page-header contract
|
|
52
|
-
* (godxjp-ui#255): PageContainer's embedded header IS the DXS `PageHeader` — breadcrumbs
|
|
53
|
-
* (`breadcrumb`), title, subtitle, status/meta (this), actions (`extra`) and responsive
|
|
54
|
-
* overflow (`headerLayout` / `measure`) all live on this one renderer.
|
|
30
|
+
* Status/meta band rendered beside the title inside the heading — StatusBadge, environment tag,
|
|
31
|
+
* "updated …" meta text.
|
|
55
32
|
*/
|
|
56
33
|
status?: StatusProp;
|
|
57
34
|
/**
|
|
58
35
|
* Pending state for the title band while the page's own record resolves. Renders the
|
|
59
36
|
* title/subtitle as `ui-skeleton-block` placeholders and marks the header `aria-busy`, keeping
|
|
60
37
|
* the `<h1>` in the document with an sr-only accessible name (an empty heading is an axe
|
|
61
|
-
* violation) so the page's heading outline never disappears mid-load.
|
|
62
|
-
* are NOT skeletonised — they come from the route, not the record.
|
|
38
|
+
* violation) so the page's heading outline never disappears mid-load.
|
|
63
39
|
*/
|
|
64
40
|
headerLoading?: boolean;
|
|
65
41
|
extra?: ExtraProp;
|
|
@@ -67,21 +43,14 @@ export type PageContainerProp = {
|
|
|
67
43
|
* FIXED chrome band between the page header and the scrolling body — a filter strip, a status
|
|
68
44
|
* bar, a "channel workflow" rail. It is a first-class page-chrome slot precisely because the
|
|
69
45
|
* only alternative was hand-laying `position: sticky` at the call site (which the design system
|
|
70
|
-
* forbids) or putting the strip inside the body, where it scrolls away.
|
|
71
|
-
* IS the scroll viewport, so this band is a plain `flex: none` sibling OUTSIDE it — content can
|
|
72
|
-
* never travel underneath it the way it does under a sticky box. Shares the page gutters and
|
|
73
|
-
* the `measure` cap with the header and the body, so the three bands line up on both edges; its
|
|
74
|
-
* inset and bottom rule are token-owned (`--page-toolbar-pad-block` / `--page-toolbar-divider`).
|
|
75
|
-
* Omit it and NOTHING is rendered — no wrapper element, no gap.
|
|
46
|
+
* forbids) or putting the strip inside the body, where it scrolls away.
|
|
76
47
|
*/
|
|
77
48
|
toolbar?: ReactNode;
|
|
78
49
|
footer?: FooterProp;
|
|
79
50
|
breadcrumb?: BreadcrumbProp;
|
|
80
51
|
/**
|
|
81
52
|
* Override the breadcrumb `<nav>` landmark's accessible name. Defaults to a localized
|
|
82
|
-
* "Breadcrumb".
|
|
83
|
-
* renders on the same page/view — two `<nav>` landmarks sharing one name/role fail axe's
|
|
84
|
-
* `landmark-unique` (WCAG 2.4.1 / 1.3.1).
|
|
53
|
+
* "Breadcrumb".
|
|
85
54
|
*/
|
|
86
55
|
breadcrumbLabel?: string;
|
|
87
56
|
/** Kebab/DOM-style alias of `breadcrumbLabel` (same landmark-unique override). */
|
|
@@ -92,74 +61,37 @@ export type PageContainerProp = {
|
|
|
92
61
|
/**
|
|
93
62
|
* Whole-page composition contract. `admin-collection` sets the header-to-toolbar rhythm,
|
|
94
63
|
* collection search measure, control height and table density once for the entire subtree.
|
|
95
|
-
* Geometry remains token-owned and service-themeable; no child needs a sizing override.
|
|
96
64
|
*/
|
|
97
65
|
preset?: PageContainerPresetProp;
|
|
98
66
|
/**
|
|
99
|
-
* How the title band and `extra` share the header row below the 640px step.
|
|
100
|
-
* `
|
|
101
|
-
* the
|
|
102
|
-
* primary action) beside the title at 390px, at the token-owned
|
|
103
|
-
* `--page-header-extra-measure`. At >=640px both arrangements are identical.
|
|
67
|
+
* How the title band and `extra` share the header row below the 640px step. Use
|
|
68
|
+
* `responsive-inline` to keep ONE compact control (a search field, a single primary action)
|
|
69
|
+
* beside the title at 390px, at the token-owned `--page-header-extra-measure`.
|
|
104
70
|
*/
|
|
105
71
|
headerLayout?: PageContainerHeaderLayoutProp;
|
|
106
72
|
/**
|
|
107
|
-
* Whether the page's top row is a DOCUMENT TITLE or the surface's own CHROME.
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* document: a chat channel, a mail thread, an IDE tab. The `<h1>` then takes the body type step
|
|
111
|
-
* (`--page-title-font-size-chrome`) at EVERY width — including below 720px, where the
|
|
112
|
-
* document-scale responsive step would otherwise pull it back UP — so the header band stops
|
|
113
|
-
* eating the height the conversation needs (measured in a consumer chat page: a 61px band with a
|
|
114
|
-
* 24px name, against a design that wanted ~40px at the `sm` step).
|
|
115
|
-
*
|
|
116
|
-
* The same answer also puts the band ON the frame's edge: the container's block-start padding
|
|
117
|
-
* becomes `--page-pad-block-start-chrome` (0) instead of `--space-page-active-y`, because a
|
|
118
|
-
* document title needs air above it and a channel head IS the top edge (measured on a consumer
|
|
119
|
-
* chat screen as 24px that pushed the head off y=0 and came off the transcript viewport). The
|
|
120
|
-
* page's bottom edge is untouched, that being `stickyFooter`'s.
|
|
121
|
-
*
|
|
122
|
-
* It carries two more consequences of the same fact. The SUBTITLE drops to
|
|
123
|
-
* `--page-subtitle-font-size-chrome` (`--font-size-2xs`, ≈11px): a caption on chrome, not a
|
|
124
|
-
* document's standfirst, and at the document step it was rendering at the very same size as the
|
|
125
|
-
* chrome title, which is not a hierarchy. And the `extra` cluster CENTRES on the bar
|
|
126
|
-
* (`align-self: center`) wherever the header row is a row (>=640px), because top-packing actions
|
|
127
|
-
* is a document behaviour — they belong on the first line of a tall `<h1>` — and a bar has no
|
|
128
|
-
* tall heading to align to. Measured on a consumer chat screen, that was 8.65px: 28px icon
|
|
129
|
-
* buttons pinned at y=14 inside a 45.3px row whose title block centred at y=22.65.
|
|
130
|
-
*
|
|
131
|
-
* The heading stays an `<h1>` throughout, so the screen-reader outline is unchanged. Compose it
|
|
132
|
-
* with `variant="ghost"` for the full quiet chrome header (ghost drops the divider and the
|
|
133
|
-
* header's bottom pad); the two are separate props because chrome WEIGHT and what the title
|
|
134
|
-
* MEANS are separate questions.
|
|
73
|
+
* Whether the page's top row is a DOCUMENT TITLE or the surface's own CHROME. Pass `chrome` when
|
|
74
|
+
* the row names the thing the user is already inside rather than announcing a document: a chat
|
|
75
|
+
* channel, a mail thread, an IDE tab.
|
|
135
76
|
*/
|
|
136
77
|
headerScale?: PageContainerHeaderScaleProp;
|
|
137
78
|
/**
|
|
138
|
-
* Bounded page measure shared by the header and the body.
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* the body surface instead of at the page edge. Orthogonal to `variant`, so `variant="ghost"`
|
|
142
|
-
* quiet chrome composes with a bounded measure (gh#245 / gh#247). Unlike `variant="narrow"`,
|
|
143
|
-
* which caps only the body.
|
|
79
|
+
* Bounded page measure shared by the header and the body. `narrow` (624px surface) / `medium`
|
|
80
|
+
* (720px surface) cap BOTH bands to one token-owned measure (`--page-measure-{narrow,medium}`),
|
|
81
|
+
* so a header action ends flush with the body surface instead of at the page edge.
|
|
144
82
|
*/
|
|
145
83
|
measure?: PageContainerMeasureProp;
|
|
146
84
|
/** Pin footer to viewport bottom on scroll — pairs well with `variant="narrow"`. */
|
|
147
85
|
stickyFooter?: boolean;
|
|
148
86
|
/**
|
|
149
|
-
* When the footer is sticky, control WHEN it shows. `"always"` (default)
|
|
150
|
-
*
|
|
151
|
-
* (title + `extra` actions) scrolls out of view, then slides it up — the
|
|
152
|
-
* standard edit/create "save bar" so the primary actions stay reachable as
|
|
153
|
-
* the form scrolls, without cluttering the top. The footer stays mounted
|
|
154
|
-
* (no layout reflow → no jitter); observed against the nearest scroll
|
|
155
|
-
* container.
|
|
87
|
+
* When the footer is sticky, control WHEN it shows. `"always"` (default) keeps it pinned the
|
|
88
|
+
* whole time.
|
|
156
89
|
*/
|
|
157
90
|
footerReveal?: "always" | "onScroll";
|
|
158
91
|
/**
|
|
159
|
-
* Grow the body to fill the remaining shell height.
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
* to the bottom via `footer` + `stickyFooter`.
|
|
92
|
+
* Grow the body to fill the remaining shell height. Enable for a full-height DataTable,
|
|
93
|
+
* SplitPane, or a chat surface whose composer is pinned to the bottom via `footer` +
|
|
94
|
+
* `stickyFooter`.
|
|
163
95
|
*/
|
|
164
96
|
fill?: boolean;
|
|
165
97
|
children?: ChildrenProp;
|
|
@@ -177,11 +109,8 @@ export type FlexProp = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
177
109
|
wrap?: boolean;
|
|
178
110
|
/**
|
|
179
111
|
* Drop this region below a breakpoint step (`sm` 40rem · `md` 48rem · `lg` 64rem · `xl` 80rem).
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* of a consumer `@media` rule (gh#252). Omit (the default) and no attribute is emitted, so no
|
|
183
|
-
* rule can match and the Flex is unchanged. The region is removed from the accessibility tree
|
|
184
|
-
* too, so keep its destinations reachable elsewhere at that width (a footer nav).
|
|
112
|
+
* Omit (the default) and no attribute is emitted, so no rule can match and the Flex is
|
|
113
|
+
* unchanged.
|
|
185
114
|
*/
|
|
186
115
|
hideBelow?: BreakpointProp;
|
|
187
116
|
/**
|
|
@@ -196,25 +125,16 @@ export type ResponsiveGridColumnsProp = number | {
|
|
|
196
125
|
lg?: number;
|
|
197
126
|
};
|
|
198
127
|
/**
|
|
199
|
-
*
|
|
200
|
-
* consumer hand-rolling a `columns={{ sm, md, lg }}` breakpoint map for a recognised collection
|
|
201
|
-
* shape. Takes priority over `columns` when both are set (`columns` is then ignored, not merged).
|
|
202
|
-
*
|
|
128
|
+
* Takes priority over `columns` when both are set (`columns` is then ignored, not merged).
|
|
203
129
|
* `pricing-plans` — the canonical billing/pricing-plan collection: 1 column until the `lg` step
|
|
204
|
-
* (container ≥ 64rem), then 3 columns from `lg` upward.
|
|
205
|
-
* `lg`, this reads as exactly 3 columns at BOTH the 1024px and 1440px reference widths and 1
|
|
206
|
-
* column at 390px — the 3/3/1 contract requested for the billing plan catalog
|
|
207
|
-
* (dxs-platform/platform#333, tracked upstream at dxs-platform/pkg-ui#14). General-purpose beyond
|
|
208
|
-
* pricing: any 3-up desktop / 1-up mobile collection (no intermediate `md` step) can reuse it.
|
|
130
|
+
* (container ≥ 64rem), then 3 columns from `lg` upward.
|
|
209
131
|
*/
|
|
210
132
|
export type ResponsiveGridPresetProp = "pricing-plans";
|
|
211
133
|
export type MasterDetailRailWidthProp = "compact" | "standard";
|
|
212
134
|
export type MasterDetailRailProp = "master" | "detail";
|
|
213
135
|
/**
|
|
214
|
-
* Bounded viewport preset for the master collection. `auto` (default) never bounds it — the
|
|
215
|
-
*
|
|
216
|
-
* with the `--master-detail-master-viewport-*` tokens and scroll the collection inside the
|
|
217
|
-
* region, so a long list cannot push the detail below the fold once the layout stacks.
|
|
136
|
+
* Bounded viewport preset for the master collection. `auto` (default) never bounds it — the region
|
|
137
|
+
* grows with its content, exactly as before.
|
|
218
138
|
*/
|
|
219
139
|
export type MasterDetailMasterViewportProp = "auto" | "compact" | "standard";
|
|
220
140
|
/** @see MasterDetail */
|
|
@@ -223,20 +143,13 @@ export type MasterDetailProp = {
|
|
|
223
143
|
master: ReactNode;
|
|
224
144
|
/** Detail surface for the current selection. */
|
|
225
145
|
children: ChildrenProp;
|
|
226
|
-
/**
|
|
227
|
-
* Which region is the fixed-width rail; the other one is fluid. Defaults to `detail` — the
|
|
228
|
-
* canonical fluid-list + fixed-detail-rail composition. Use `master` for a leading
|
|
229
|
-
* category/navigator rail beside a fluid detail surface.
|
|
230
|
-
*/
|
|
146
|
+
/** Use `master` for a leading category/navigator rail beside a fluid detail surface. */
|
|
231
147
|
rail?: MasterDetailRailProp;
|
|
232
148
|
/** Rail track width: `compact` = 300px; `standard` = 320px. */
|
|
233
149
|
railWidth?: MasterDetailRailWidthProp;
|
|
234
150
|
/**
|
|
235
151
|
* Bound the master collection to a scrollable viewport instead of letting it grow with its
|
|
236
|
-
* content. `auto` (default) keeps the unbounded behaviour.
|
|
237
|
-
* (28rem) read the `--master-detail-master-viewport-*` tokens, scroll the collection INSIDE the
|
|
238
|
-
* region, and make it a keyboard-reachable scroll container. Pair with `masterLabel` so the
|
|
239
|
-
* scroll region is announced.
|
|
152
|
+
* content. `auto` (default) keeps the unbounded behaviour.
|
|
240
153
|
*/
|
|
241
154
|
masterViewport?: MasterDetailMasterViewportProp;
|
|
242
155
|
/**
|
|
@@ -271,37 +184,26 @@ export type AppShellProp = {
|
|
|
271
184
|
footer?: ReactNode;
|
|
272
185
|
sidebarCollapsed?: boolean;
|
|
273
186
|
/**
|
|
274
|
-
* Responsive navigation strategy below the canonical 900px shell breakpoint.
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
* shell at narrow widths. The sidebar width remains owned by `--app-shell-sidebar-width`.
|
|
279
|
-
*
|
|
280
|
-
* Use `"docked"` only when the product's approved responsive contract explicitly retains the
|
|
281
|
-
* rail; it intentionally suppresses the redundant mobile drawer trigger.
|
|
187
|
+
* Responsive navigation strategy below the canonical 900px shell breakpoint. - `"drawer"`
|
|
188
|
+
* (default) hides the docked sidebar and exposes the accessible mobile Sheet. - `"docked"` keeps
|
|
189
|
+
* the sidebar grid track, footer/account region and active navigation in the shell at narrow
|
|
190
|
+
* widths. The sidebar width remains owned by `--app-shell-sidebar-width`.
|
|
282
191
|
*/
|
|
283
192
|
responsiveNavigation?: "drawer" | "docked";
|
|
284
193
|
/**
|
|
285
|
-
* Which columns the topbar spans.
|
|
286
|
-
*
|
|
287
|
-
* - `"
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
* notifications) that outranks the current section rather than belonging to it.
|
|
292
|
-
*
|
|
293
|
-
* Not cosmetic: it changes what the bar reads as owning. `"full"` also renders the `<header>`
|
|
294
|
-
* before the `<aside>` so keyboard order follows the visual order — a grid area alone would put
|
|
295
|
-
* focus in the rail while the eye starts at the bar (WCAG 2.4.3).
|
|
194
|
+
* Which columns the topbar spans. - `"content"` (default) starts the topbar beside the sidebar,
|
|
195
|
+
* so the rail runs the full height of the window and the bar sits over the content only. The
|
|
196
|
+
* admin-console arrangement. - `"full"` runs the topbar edge to edge across the top with the
|
|
197
|
+
* sidebar starting beneath it — the arrangement products use when the bar carries space-level
|
|
198
|
+
* chrome (global search, account, notifications) that outranks the current section rather than
|
|
199
|
+
* belonging to it.
|
|
296
200
|
*/
|
|
297
201
|
topbarSpan?: "content" | "full";
|
|
298
202
|
/**
|
|
299
203
|
* Navigation shown in the mobile drawer at the DXS 900px breakpoint, where the docked sidebar is
|
|
300
|
-
* hidden.
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
* available on mobile with no extra wiring; pass a distinct node for a mobile-tailored menu, or
|
|
304
|
-
* `null` to opt out (only when navigation lives elsewhere, e.g. a bottom bar).
|
|
204
|
+
* hidden. Defaults to `sidebar`, so the same nav is available on mobile with no extra wiring;
|
|
205
|
+
* pass a distinct node for a mobile-tailored menu, or `null` to opt out (only when navigation
|
|
206
|
+
* lives elsewhere, e.g. a bottom bar).
|
|
305
207
|
*/
|
|
306
208
|
mobileNav?: ReactNode;
|
|
307
209
|
/** Accessible title for the mobile navigation drawer. Defaults to the localized "Menu". */
|
|
@@ -329,41 +231,15 @@ export type AuthShellProp = {
|
|
|
329
231
|
/**
|
|
330
232
|
* Visual contract for the auth surface. `"canonical"` applies the shared DXS compact geometry
|
|
331
233
|
* (36px controls, 22.5rem card measure, and responsive page insets) through component tokens.
|
|
332
|
-
* Default `"default"` preserves the existing comfortable shell.
|
|
333
234
|
*/
|
|
334
235
|
variant?: "default" | "canonical";
|
|
335
236
|
/**
|
|
336
237
|
* Named flow MEASURE — the page geometry contract for one canonical hosted-identity flow: the
|
|
337
238
|
* auth card's max-width plus the desktop and mobile page gutters, all owned by component tokens
|
|
338
239
|
* (`--auth-shell-{login,registration,device,context,recovery}-*`). Selecting a preset replaces
|
|
339
|
-
* every consumer-side geometry override.
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
* - `"login"` — SCR-001's 360px card at x=540/332/15 and y=363/363/353 for the canonical
|
|
343
|
-
* 1440x900, 1024x900 and 390x844 viewports. The identity occupies a package-owned anchor slot,
|
|
344
|
-
* so standalone, one-line requester and wrapped two-line requester states keep the same card
|
|
345
|
-
* position without truncating or inventing requester data. Pass AuthIdentity, Card and
|
|
346
|
-
* AuthFooter as direct children (an anchor may wrap AuthIdentity).
|
|
347
|
-
* - `"registration"` — the 360px sign-up measure with a 15px inline gutter at 390px (the same
|
|
348
|
-
* page rhythm as `"login"`, so sign-in → sign-up never jumps on a phone). START-aligned like
|
|
349
|
-
* login, because a registration card is the tallest surface in the hosted-identity set
|
|
350
|
-
* (name · email · password · confirm · strength · consent · submit · providers) and a
|
|
351
|
-
* vertically centred tall card overflows ABOVE the scroll origin on a short viewport, putting
|
|
352
|
-
* its first field out of reach — start-aligned, a long form simply scrolls. It is also the
|
|
353
|
-
* only preset with a footer-clearance knob of its own, so the legal/consent footer never sits
|
|
354
|
-
* flush against the submit button. Carries the full password form and the pending-email
|
|
355
|
-
* confirmation state with no consumer geometry CSS.
|
|
356
|
-
* - `"device-authorization"` — 380px card measure with a 5px inline page gutter at a 390px
|
|
357
|
-
* viewport (canonical device-grant artboard).
|
|
358
|
-
* - `"context-selection"` — 25rem card measure on desktop/tablet, edge-to-edge on mobile, and a
|
|
359
|
-
* tokenized rhythm between the intro, the card and the trailing "remember" row.
|
|
360
|
-
* - `"account-recovery"` — 27rem/432px panel measure with a 15px inline page gutter at 390px
|
|
361
|
-
* (panel x=15, width=360). One measure for BOTH canonical SCR-008 panels: password recovery
|
|
362
|
-
* (request · sent · new-password · expired) and the sign-in MFA challenge (OTP · recovery-code
|
|
363
|
-
* · passkey-failure), whose title and description sit INSIDE the bordered surface.
|
|
364
|
-
*
|
|
365
|
-
* Orthogonal to `variant`: presets are applied AFTER it, so `variant="canonical"` keeps owning
|
|
366
|
-
* control density and heading size while the preset re-measures/anchors the page.
|
|
240
|
+
* every consumer-side geometry override. - `"default"` (default) — the shell's own measure;
|
|
241
|
+
* nothing changes. - `"login"` — SCR-001's 360px card at x=540/332/15 and y=363/363/353 for the
|
|
242
|
+
* canonical 1440x900, 1024x900 and 390x844 viewports.
|
|
367
243
|
*/
|
|
368
244
|
preset?: AuthShellPresetProp;
|
|
369
245
|
/**
|
|
@@ -390,30 +266,20 @@ export type SeparatorProp = Omit<React.HTMLAttributes<HTMLDivElement>, "children
|
|
|
390
266
|
/**
|
|
391
267
|
* Localized text that INTERRUPTS the rule — a day divider, a "new messages" watermark, an auth
|
|
392
268
|
* conjunction. The rule splits into two halves around it and the grid keeps the label optically
|
|
393
|
-
* placed regardless of translation length.
|
|
394
|
-
* label is ignored and dev builds warn. Omit for a plain rule.
|
|
395
|
-
*
|
|
396
|
-
* A `string`, not the `LabelProp` ReactNode, because this text IS the separator's accessible
|
|
397
|
-
* name — a node cannot be announced. The library never invents the copy: the consumer passes a
|
|
398
|
-
* `t()` string, and a date is formatted with `Intl.DateTimeFormat` on the active locale.
|
|
269
|
+
* placed regardless of translation length.
|
|
399
270
|
*/
|
|
400
271
|
label?: string;
|
|
401
|
-
/**
|
|
402
|
-
* Where the label sits on the rule. Default `"center"` (the classic conjunction). `"start"` is
|
|
403
|
-
* the Slack/Mattermost stream convention — the label hugs the inline-start edge with the long
|
|
404
|
-
* half of the rule running to the inline-end. Logical, so it flips under `dir="rtl"`.
|
|
405
|
-
*/
|
|
272
|
+
/** Where the label sits on the rule. Default `"center"` (the classic conjunction). */
|
|
406
273
|
labelAlign?: TextAlignProp;
|
|
407
274
|
/**
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
* tone re-points both halves, so the distinction survives forced-colors. Default `"default"`.
|
|
275
|
+
* Never colour-only: the tone re-points both halves, so the distinction survives forced-colors.
|
|
276
|
+
* Default `"default"`.
|
|
411
277
|
*/
|
|
412
278
|
tone?: TextToneProp;
|
|
413
279
|
/**
|
|
414
|
-
* `true` (the default for an UNLABELLED rule) keeps Radix's decorative behaviour —
|
|
415
|
-
* nothing announced. A `label` flips the default to `false`, so the rule becomes
|
|
416
|
-
* `role="separator"` named by the label.
|
|
280
|
+
* `true` (the default for an UNLABELLED rule) keeps Radix's decorative behaviour —
|
|
281
|
+
* `role="none"`, nothing announced. A `label` flips the default to `false`, so the rule becomes
|
|
282
|
+
* a real `role="separator"` named by the label.
|
|
417
283
|
*/
|
|
418
284
|
decorative?: boolean;
|
|
419
285
|
className?: ClassNameProp;
|
|
@@ -464,6 +330,21 @@ export type AuthIdentityProp = {
|
|
|
464
330
|
* It owns avatar fallback, bidi-safe email truncation and the keyboard action geometry; the
|
|
465
331
|
* consumer owns the authoritative email, localized action label and navigation handler.
|
|
466
332
|
*/
|
|
333
|
+
/**
|
|
334
|
+
* @see AccountChip — signed-in user for a PageContainer `extra` slot, a Topbar or a footer row:
|
|
335
|
+
* avatar, name and one ghost action at the control tier height.
|
|
336
|
+
*/
|
|
337
|
+
export type AccountChipProp = {
|
|
338
|
+
name: string;
|
|
339
|
+
email?: string;
|
|
340
|
+
avatarSrc?: string;
|
|
341
|
+
avatarFallback?: ReactNode;
|
|
342
|
+
/** Accessible name of the action button (a sign-out label). */
|
|
343
|
+
actionLabel?: ReactNode;
|
|
344
|
+
onAction?: () => void;
|
|
345
|
+
disabled?: DisabledProp;
|
|
346
|
+
className?: ClassNameProp;
|
|
347
|
+
};
|
|
467
348
|
export type AuthAccountSummaryProp = {
|
|
468
349
|
email: string;
|
|
469
350
|
avatarSrc?: string;
|
|
@@ -489,7 +370,7 @@ export type CenteredShellProp = {
|
|
|
489
370
|
/**
|
|
490
371
|
* Top bar slot (banner) — a `<Topbar>` with brand + real actions (an `AppSettingPicker`, a user
|
|
491
372
|
* menu, sign-out). CenteredShell wraps it in the SAME padded chrome as AppShell's topbar
|
|
492
|
-
* (padding-inline · border · backdrop), so you never hand-roll a bar.
|
|
373
|
+
* (padding-inline · border · backdrop), so you never hand-roll a bar.
|
|
493
374
|
*/
|
|
494
375
|
topbar?: ReactNode;
|
|
495
376
|
/** Footer slot (contentinfo) pinned to the bottom (legal links, locale switch, support). Omit → none. */
|
|
@@ -501,20 +382,12 @@ export type CenteredShellProp = {
|
|
|
501
382
|
width?: CenteredShellWidthProp;
|
|
502
383
|
/**
|
|
503
384
|
* Block alignment of the centred column inside the `100dvh` shell. `"start"` (default) keeps the
|
|
504
|
-
* top-aligned flowing/scrolling page shape.
|
|
505
|
-
* SYSTEM-level standalone surface (a 500/503 error page, a maintenance notice) whose full-page
|
|
506
|
-
* geometry must stay package-owned instead of a consumer re-implementing `min-h-dvh` + flex
|
|
507
|
-
* centring. Overflowing content still scrolls from the top (auto block offsets collapse to 0), so
|
|
508
|
-
* a long localized message is never clipped.
|
|
385
|
+
* top-aligned flowing/scrolling page shape.
|
|
509
386
|
*/
|
|
510
387
|
align?: CenteredShellAlignProp;
|
|
511
388
|
/**
|
|
512
389
|
* Whole-page shell contract. `"default"` (the default) emits no attribute and keeps the shell's
|
|
513
|
-
* exact box.
|
|
514
|
-
* the header bar, the centred column and the footer, the section rhythm, the flat public-surface
|
|
515
|
-
* card chrome and the hero `h1` tier — from `--centered-shell-landing-*` tokens, so a landing
|
|
516
|
-
* composition (header · hero · sections · legal footer) needs no page-local CSS and no descendant
|
|
517
|
-
* selector against shell internals (gh#252).
|
|
390
|
+
* exact box.
|
|
518
391
|
*/
|
|
519
392
|
preset?: CenteredShellPresetProp;
|
|
520
393
|
className?: ClassNameProp;
|
|
@@ -591,8 +464,7 @@ export type ErrorSurfaceProp = {
|
|
|
591
464
|
tone?: EmptyStateToneProp;
|
|
592
465
|
/**
|
|
593
466
|
* Semantic heading level of `title`. Defaults to `2` in `application` mode (a `PageContainer`
|
|
594
|
-
* `h1` sits above it) and `1` in `system` mode (the surface IS the page).
|
|
595
|
-
* outline valid, never for size.
|
|
467
|
+
* `h1` sits above it) and `1` in `system` mode (the surface IS the page).
|
|
596
468
|
*/
|
|
597
469
|
titleLevel?: HeadingLevelProp;
|
|
598
470
|
/**
|
|
@@ -634,18 +506,7 @@ export type SidebarProductProp = {
|
|
|
634
506
|
};
|
|
635
507
|
/**
|
|
636
508
|
* What a nav row's count MEANS — a subset of the shared `ToneProp` vocabulary, not a palette.
|
|
637
|
-
*
|
|
638
|
-
* `neutral` (default) — a plain count: unread items, pending rows, queued jobs. The pill keeps the
|
|
639
|
-
* quiet `--sidebar-badge-background` / `-foreground` pair it always had.
|
|
640
|
-
*
|
|
641
|
-
* `destructive` — the count is ADDRESSED TO THE USER and the rail should pull the eye: an
|
|
642
|
-
* @mention, a direct message, a failing job awaiting them. Reads the
|
|
643
|
-
* `--sidebar-badge-destructive-*` pair.
|
|
644
|
-
*
|
|
645
|
-
* Deliberately TWO values, not the whole `ToneProp` union: a navigation rail answers one question
|
|
646
|
-
* about a count — "does this need me personally?" — and a five-colour rail is decoration, not
|
|
647
|
-
* information. Colour ONLY: the pill's geometry is shared, so a mention row and an unread row stay
|
|
648
|
-
* aligned in the same column.
|
|
509
|
+
* `neutral` (default) — a plain count: unread items, pending rows, queued jobs.
|
|
649
510
|
*/
|
|
650
511
|
export type SidebarBadgeToneProp = Extract<ToneProp, "neutral" | "destructive">;
|
|
651
512
|
/** @see Sidebar */
|
|
@@ -654,37 +515,24 @@ export type SidebarItemProp = {
|
|
|
654
515
|
label: string;
|
|
655
516
|
/**
|
|
656
517
|
* Leading 16px glyph — REQUIRED: the collapsed rail is icon-only and the expanded rail aligns
|
|
657
|
-
* every label to the icon column.
|
|
658
|
-
* shell (the row renders an empty `.sb-icon` slot, keeping the 32px row / 10px gap), but the rail
|
|
659
|
-
* reads as a hole. Its colour is themeable separately from the label via
|
|
518
|
+
* every label to the icon column. Its colour is themeable separately from the label via
|
|
660
519
|
* `--sidebar-nav-icon-foreground` (see {@link SidebarProp}).
|
|
661
520
|
*/
|
|
662
521
|
icon: ComponentType<SVGProps<SVGSVGElement>>;
|
|
663
522
|
/**
|
|
664
523
|
* Count/status affix rendered in the row's `.sb-badge` pill. Pass the CONTENT ONLY — a number, a
|
|
665
|
-
* string, `"9+"`.
|
|
666
|
-
* stacked pills (measured: a 37.11×19.14 `.sb-badge` wrapping a 25.11×19.14 `<Badge>` with its
|
|
667
|
-
* own border). To change what the count MEANS, use {@link SidebarItemProp.badgeTone}.
|
|
524
|
+
* string, `"9+"`.
|
|
668
525
|
*/
|
|
669
526
|
badge?: ReactNode;
|
|
670
527
|
/**
|
|
671
|
-
* Emphasis of `badge`.
|
|
672
|
-
*
|
|
673
|
-
* merely unread: an @mention, a direct message, a failure waiting on them. It moves two colour
|
|
674
|
-
* tokens and nothing else, so mention rows and unread rows still line up.
|
|
675
|
-
*
|
|
676
|
-
* Ignored when `badge` is absent, and on the collapsed rail (which hides `.sb-badge` entirely).
|
|
528
|
+
* Emphasis of `badge`. Pass `destructive` when the count is addressed to the user rather than
|
|
529
|
+
* merely unread: an @mention, a direct message, a failure waiting on them.
|
|
677
530
|
*/
|
|
678
531
|
badgeTone?: SidebarBadgeToneProp;
|
|
679
532
|
disabled?: boolean;
|
|
680
533
|
/**
|
|
681
534
|
* Destination of the row. It is the SOLE interactive element (no nested `<button>`), so
|
|
682
|
-
* right-click / open-in-new-tab / middle-click all work.
|
|
683
|
-
* selection via `onSelect(id)`.
|
|
684
|
-
*
|
|
685
|
-
* With `Sidebar.linkComponent` this same `href` is what the framework router `<Link>` receives —
|
|
686
|
-
* the LIBRARY still composes the row (icon · label · badge · active · collapsed), so a router
|
|
687
|
-
* link never has to reconstruct row markup (gh#213).
|
|
535
|
+
* right-click / open-in-new-tab / middle-click all work.
|
|
688
536
|
*/
|
|
689
537
|
href?: string;
|
|
690
538
|
/** Nested rows — renders a collapsible submenu group (the parent reads active when any child is). */
|
|
@@ -693,12 +541,8 @@ export type SidebarItemProp = {
|
|
|
693
541
|
/** @see Sidebar */
|
|
694
542
|
export type SidebarItemData = SidebarItemProp;
|
|
695
543
|
/**
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
* Every field is ANCHOR-SAFE — a router `<Link>` may spread the whole object onto its `<a>` without
|
|
699
|
-
* emitting an unknown-DOM-attribute warning. `children` is the LIBRARY-COMPOSED row content (the
|
|
700
|
-
* `.sb-icon` slot, the `.sb-label`, the `.sb-badge`); render it as-is and never rebuild it, which is
|
|
701
|
-
* what makes icons/badges survive a consumer link (the reported production regression).
|
|
544
|
+
* Every field is ANCHOR-SAFE — a router `<Link>` may spread the whole object onto its `<a>`
|
|
545
|
+
* without emitting an unknown-DOM-attribute warning.
|
|
702
546
|
*/
|
|
703
547
|
export type SidebarLinkProp = {
|
|
704
548
|
/** `SidebarItemProp.href`. Absent for a disabled row — render an inert `<a>` with no navigation. */
|
|
@@ -760,16 +604,14 @@ export type OrgSwitcherOrganization = {
|
|
|
760
604
|
/** Optional owned mark/avatar. When omitted, OrgSwitcher renders the first name character. */
|
|
761
605
|
avatar?: ReactNode;
|
|
762
606
|
/**
|
|
763
|
-
* Status/plan affordance rendered end-aligned in the expanded trigger and in the menu row
|
|
764
|
-
*
|
|
765
|
-
* for the mark. Pair a non-textual badge with {@link OrgSwitcherOrganization.badgeLabel}.
|
|
607
|
+
* Status/plan affordance rendered end-aligned in the expanded trigger and in the menu row (e.g.
|
|
608
|
+
* `<Badge tone="warning">Trial</Badge>`).
|
|
766
609
|
*/
|
|
767
610
|
badge?: ReactNode;
|
|
768
611
|
/**
|
|
769
612
|
* Localized screen-reader text for `badge`. Required whenever the badge carries meaning the
|
|
770
613
|
* accessible name would otherwise lose (WCAG 1.1.1 / 1.4.1): the trigger's `aria-label` owns its
|
|
771
|
-
* accessible name, so the badge is announced through `aria-describedby` instead.
|
|
772
|
-
* textual badge is still announced inside the menu row but NOT on the trigger.
|
|
614
|
+
* accessible name, so the badge is announced through `aria-describedby` instead.
|
|
773
615
|
*/
|
|
774
616
|
badgeLabel?: string;
|
|
775
617
|
disabled?: boolean;
|
|
@@ -854,12 +696,7 @@ export type SidebarProp = {
|
|
|
854
696
|
*/
|
|
855
697
|
renderItem?: (item: SidebarItemData, rowProps: SidebarRenderItemProp) => ReactNode;
|
|
856
698
|
footer?: ReactNode;
|
|
857
|
-
/**
|
|
858
|
-
* Override the nav landmark's accessible name. Defaults to a localized "Main navigation".
|
|
859
|
-
* Needed when more than one Sidebar renders on the same page/view (e.g. a docked sidebar +
|
|
860
|
-
* its mobile-drawer twin, both mounted at once) — two `<nav>` landmarks sharing one name/role
|
|
861
|
-
* fail axe's `landmark-unique` (WCAG 2.4.1 / 1.3.1).
|
|
862
|
-
*/
|
|
699
|
+
/** Override the nav landmark's accessible name. Defaults to a localized "Main navigation". */
|
|
863
700
|
"aria-label"?: string;
|
|
864
701
|
};
|
|
865
702
|
/**
|
|
@@ -909,25 +746,17 @@ export type LegalDocumentSectionProp = {
|
|
|
909
746
|
export type LegalDocumentShellProp = {
|
|
910
747
|
/** Document title — the `<h1>` that names the `<article>` (e.g. "Terms of Service"). */
|
|
911
748
|
title: TitleProp;
|
|
912
|
-
/**
|
|
913
|
-
* Document version identifier (e.g. `"2.4"`). Rendered as a localized "Version {version}" line —
|
|
914
|
-
* pass the bare identifier, never a pre-localized sentence.
|
|
915
|
-
*/
|
|
749
|
+
/** Document version identifier (e.g. `"2.4"`). */
|
|
916
750
|
version?: string;
|
|
917
751
|
/**
|
|
918
|
-
* Effective date as an **ISO 8601** calendar date (`yyyy-MM-dd`) or a full ISO instant.
|
|
919
|
-
* for display with `Intl.DateTimeFormat` in the active locale and emitted inside a
|
|
752
|
+
* Effective date as an **ISO 8601** calendar date (`yyyy-MM-dd`) or a full ISO instant.
|
|
753
|
+
* Formatted for display with `Intl.DateTimeFormat` in the active locale and emitted inside a
|
|
920
754
|
* `<time dateTime={effectiveDate}>`, so the machine-readable value is always the ISO input.
|
|
921
|
-
* NEVER pass a pre-formatted string.
|
|
922
755
|
*/
|
|
923
756
|
effectiveDate?: string;
|
|
924
757
|
/** Short plain-language summary rendered under the metadata, above the contents. */
|
|
925
758
|
summary?: ReactNode;
|
|
926
|
-
/**
|
|
927
|
-
* Accessible name + visible caption of the contents `<nav>` (e.g. "Contents"). Defaults to a
|
|
928
|
-
* localized "Contents"; override it when two documents render in the same view, so the two `nav`
|
|
929
|
-
* landmarks stay distinguishable (axe `landmark-unique`, WCAG 2.4.1).
|
|
930
|
-
*/
|
|
759
|
+
/** Accessible name + visible caption of the contents `<nav>` (e.g. "Contents"). */
|
|
931
760
|
contentsLabel?: string;
|
|
932
761
|
/** The document's sections, in reading order. Drives BOTH the contents list and the body. */
|
|
933
762
|
sections: LegalDocumentSectionProp[];
|