@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
|
@@ -0,0 +1,954 @@
|
|
|
1
|
+
import { forwardRef, useState } from "react";
|
|
2
|
+
import type { AnchorHTMLAttributes, CSSProperties } from "react";
|
|
3
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
4
|
+
import {
|
|
5
|
+
Card,
|
|
6
|
+
CardContent,
|
|
7
|
+
CardDescription,
|
|
8
|
+
CardHeader,
|
|
9
|
+
CardTitle,
|
|
10
|
+
StatCard,
|
|
11
|
+
Badge,
|
|
12
|
+
DataTable,
|
|
13
|
+
Descriptions,
|
|
14
|
+
ListRow,
|
|
15
|
+
} from "@godxjp/ui/data-display";
|
|
16
|
+
import type { ColumnDef } from "@godxjp/ui/data-display";
|
|
17
|
+
import { Button, Text } from "@godxjp/ui/general";
|
|
18
|
+
import { SearchInput } from "@godxjp/ui/data-entry";
|
|
19
|
+
import { ResponsiveGrid } from "@godxjp/ui/layout";
|
|
20
|
+
import { Toolbar, ToolbarGroup } from "@godxjp/ui/navigation";
|
|
21
|
+
import { Plus, Download, Filter, Search } from "lucide-react";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Router Link stub passed to `linkComponent` · proves breadcrumb segments can render
|
|
25
|
+
* through a router primitive (react-router / next/link) instead of a plain <a>.
|
|
26
|
+
* PageContainer forwards both `href` and `to`; a real Link reads `to`.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* `--page-toolbar-background` · the toolbar band's GROUND, quiet (`transparent`) by default so the
|
|
30
|
+
* band looks exactly as it did before the knob existed. A service normally declares these once in
|
|
31
|
+
* its theme.css (`:root`, or a scoped `[data-tenant]`); they are scoped to one demo frame here so
|
|
32
|
+
* the default band can sit beside the painted one. NEVER put `className="bg-card"` on the strip at
|
|
33
|
+
* the call site: that is hand-laid page chrome, and it cannot be re-themed per tenant.
|
|
34
|
+
*
|
|
35
|
+
* The inset comes with it, and it is the band's ONLY breathing room: the band sits FLUSH against
|
|
36
|
+
* the header above and the body below, because chrome is attached · a painted, ruled band adrift
|
|
37
|
+
* between two 16px voids divides nothing. `--page-toolbar-pad-block` still stays `0` by default on
|
|
38
|
+
* purpose · a transparent band is not a surface and has no inside to breathe, and under `fill`
|
|
39
|
+
* every pixel of it is taken from the transcript. A band that is PAINTED does have an inside, so
|
|
40
|
+
* the theme that paints it also sets its inset here rather than reaching for a `py-*` utility on
|
|
41
|
+
* the strip.
|
|
42
|
+
*/
|
|
43
|
+
const TOOLBAR_CHROME_TOKENS = {
|
|
44
|
+
"--page-toolbar-background": "hsl(var(--card))",
|
|
45
|
+
"--page-toolbar-pad-block": "var(--space-2)",
|
|
46
|
+
"--page-toolbar-divider": "1px solid hsl(var(--border))",
|
|
47
|
+
} as CSSProperties;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* `--page-header-min-block-size-chrome` · クロム帯の「高さ」(gh#331)。文書のヘッダーは中身なりの
|
|
51
|
+
* 高さで正しい · 見出しは見出しの高さだからです。クロムは逆で、家具には「ものが中央に収まる帯」が
|
|
52
|
+
* 要ります。既定は `auto`(=rule #44 の最も静かな状態)なので、このトークンを置くまで DOM も
|
|
53
|
+
* 見え方も従来どおり · 文書ページはそもそもこの規則に一致しません。
|
|
54
|
+
*
|
|
55
|
+
* 帯の高さ軸の持ち主は `--app-shell-bar-height` です(`--centered-shell-bar-height` も既にそれを
|
|
56
|
+
* 読んでいます)。だからサービス側の一行はこれ ·
|
|
57
|
+
* `--page-header-min-block-size-chrome: var(--app-shell-bar-height)` · で、ページのクロム帯と
|
|
58
|
+
* AppShell のトップバーが同じ帯に乗ります。min であって height ではないのは、`lg` のボタンや
|
|
59
|
+
* 折り返した日本語のチャンネル名がはみ出さずに収まる必要があるためです。
|
|
60
|
+
*/
|
|
61
|
+
const CHROME_BAND_TOKENS = {
|
|
62
|
+
"--page-header-min-block-size-chrome": "var(--app-shell-bar-height)",
|
|
63
|
+
} as CSSProperties;
|
|
64
|
+
|
|
65
|
+
const RouterLink = forwardRef<
|
|
66
|
+
HTMLAnchorElement,
|
|
67
|
+
AnchorHTMLAttributes<HTMLAnchorElement> & { to?: string }
|
|
68
|
+
>(function RouterLink({ to, href, children, ...props }, ref) {
|
|
69
|
+
return (
|
|
70
|
+
<a ref={ref} href={to ?? href} data-router-link="" {...props}>
|
|
71
|
+
{children}
|
|
72
|
+
</a>
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
type JournalEntry = {
|
|
77
|
+
id: string;
|
|
78
|
+
date: string;
|
|
79
|
+
desc: string;
|
|
80
|
+
amount: string;
|
|
81
|
+
status: "承認済" | "保留中";
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const journalEntries: JournalEntry[] = [
|
|
85
|
+
{ id: "JE-0041", date: "2026-05-31", desc: "売上計上", amount: "¥840,000", status: "承認済" },
|
|
86
|
+
{ id: "JE-0040", date: "2026-05-30", desc: "仕入計上", amount: "¥320,000", status: "承認済" },
|
|
87
|
+
{ id: "JE-0039", date: "2026-05-29", desc: "給与仕訳", amount: "¥1,200,000", status: "保留中" },
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
const journalColumns: ColumnDef<JournalEntry>[] = [
|
|
91
|
+
{ key: "id", header: "伝票番号", width: "w-28", render: (r) => <Text mono>{r.id}</Text> },
|
|
92
|
+
{ key: "date", header: "日付", width: "w-32" },
|
|
93
|
+
{ key: "desc", header: "摘要" },
|
|
94
|
+
{
|
|
95
|
+
key: "amount",
|
|
96
|
+
header: "金額",
|
|
97
|
+
align: "right",
|
|
98
|
+
render: (r) => <Text weight="medium">{r.amount}</Text>,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: "status",
|
|
102
|
+
header: "ステータス",
|
|
103
|
+
align: "right",
|
|
104
|
+
render: (r) => <Badge tone={r.status === "承認済" ? "success" : "warning"}>{r.status}</Badge>,
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* PageContainer · mandatory page shell.
|
|
110
|
+
* Covers: title/subtitle/status/extra/footer/breadcrumb/linkComponent + variant
|
|
111
|
+
* default/narrow/flush/ghost + density compact/default/comfortable + PageContainer.Inset.
|
|
112
|
+
* The embedded header is the CANONICAL DXS PageHeader (gh#255) — status/meta band included.
|
|
113
|
+
* Each example is standalone (no AppShell) so the variant behaviour is visible in
|
|
114
|
+
* isolation. Composed only from real @godxjp/ui components.
|
|
115
|
+
*/
|
|
116
|
+
export default function Demo() {
|
|
117
|
+
const [activeVariant, setActiveVariant] = useState<"default" | "narrow" | "flush" | "ghost">(
|
|
118
|
+
"default",
|
|
119
|
+
);
|
|
120
|
+
const [activeDensity, setActiveDensity] = useState<"compact" | "default" | "comfortable">(
|
|
121
|
+
"default",
|
|
122
|
+
);
|
|
123
|
+
const [memberQuery, setMemberQuery] = useState("");
|
|
124
|
+
|
|
125
|
+
const variants = [
|
|
126
|
+
{ key: "default", label: "default" },
|
|
127
|
+
{ key: "narrow", label: "narrow" },
|
|
128
|
+
{ key: "flush", label: "flush" },
|
|
129
|
+
{ key: "ghost", label: "ghost" },
|
|
130
|
+
] as const;
|
|
131
|
+
|
|
132
|
+
const densities = [
|
|
133
|
+
{ key: "compact", label: "compact" },
|
|
134
|
+
{ key: "default", label: "default" },
|
|
135
|
+
{ key: "comfortable", label: "comfortable" },
|
|
136
|
+
] as const;
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<Flex direction="col" gap="xl">
|
|
140
|
+
{/* ── 1. Default variant · dashboard-style + linkComponent (router Link) ── */}
|
|
141
|
+
<PageContainer
|
|
142
|
+
title="売上ダッシュボード"
|
|
143
|
+
subtitle="直近30日間の集計データ"
|
|
144
|
+
linkComponent={RouterLink}
|
|
145
|
+
breadcrumb={[{ label: "ホーム", to: "/" }, { label: "ダッシュボード" }]}
|
|
146
|
+
breadcrumbLabel="売上ダッシュボードのパンくず"
|
|
147
|
+
extra={
|
|
148
|
+
<Flex gap="sm">
|
|
149
|
+
<Button variant="outline" size="sm">
|
|
150
|
+
<Download />
|
|
151
|
+
エクスポート
|
|
152
|
+
</Button>
|
|
153
|
+
<Button size="sm">
|
|
154
|
+
<Plus />
|
|
155
|
+
新規登録
|
|
156
|
+
</Button>
|
|
157
|
+
</Flex>
|
|
158
|
+
}
|
|
159
|
+
>
|
|
160
|
+
<ResponsiveGrid columns={{ sm: 2, md: 4 }}>
|
|
161
|
+
<StatCard label="月次売上" value="¥8,200,000" delta="+12%" hint="先月比" />
|
|
162
|
+
<StatCard label="請求件数" value="312" delta="+4%" />
|
|
163
|
+
<StatCard label="売掛金残高" value="¥1,284,500" hint="未回収 18件" />
|
|
164
|
+
<StatCard label="回収率" value="96.8%" delta="+1.2%" />
|
|
165
|
+
</ResponsiveGrid>
|
|
166
|
+
</PageContainer>
|
|
167
|
+
|
|
168
|
+
{/* ── 1b. Canonical page-header contract (gh#255) · status/meta band ── */}
|
|
169
|
+
{/* PageContainer's embedded header IS the DXS PageHeader: breadcrumbs + title +
|
|
170
|
+
subtitle + status/meta + actions + responsive overflow on ONE renderer. The
|
|
171
|
+
`status` band shares the title line at --page-header-status-gap and wraps
|
|
172
|
+
UNDER the long JA title at 390px — nothing clips, no consumer CSS. */}
|
|
173
|
+
<PageContainer
|
|
174
|
+
title="株式会社ファムジア(本社・東京オフィス)の組織プロファイル"
|
|
175
|
+
subtitle="Organization profile · Hồ sơ tổ chức · trạng thái hợp đồng và môi trường"
|
|
176
|
+
status={
|
|
177
|
+
<>
|
|
178
|
+
<Badge tone="success">有効</Badge>
|
|
179
|
+
<Badge tone="info">本番環境</Badge>
|
|
180
|
+
</>
|
|
181
|
+
}
|
|
182
|
+
breadcrumb={[
|
|
183
|
+
{ label: "ホーム", to: "/" },
|
|
184
|
+
{ label: "組織", to: "/organizations" },
|
|
185
|
+
{ label: "株式会社ファムジア" },
|
|
186
|
+
]}
|
|
187
|
+
breadcrumbLabel="組織プロファイルのパンくず"
|
|
188
|
+
extra={
|
|
189
|
+
<Button size="sm" variant="outline">
|
|
190
|
+
編集
|
|
191
|
+
</Button>
|
|
192
|
+
}
|
|
193
|
+
>
|
|
194
|
+
<Card>
|
|
195
|
+
<CardHeader>
|
|
196
|
+
<CardTitle level={2}>ステータスバンドの契約</CardTitle>
|
|
197
|
+
<CardDescription>
|
|
198
|
+
status はタイトル行に載り、コンパクト幅ではタイトルの下に折り返します。バッジを h1
|
|
199
|
+
の隣に手置きしないでください。余白は --page-header-status-gap が所有します。
|
|
200
|
+
</CardDescription>
|
|
201
|
+
</CardHeader>
|
|
202
|
+
<CardContent>
|
|
203
|
+
<Text tone="muted">
|
|
204
|
+
読み込み中は title/subtitle にスケルトンを、拒否 (403) / 不明 (404) / 障害 (5xx)
|
|
205
|
+
はページごと ErrorSurface に置き換えます。
|
|
206
|
+
</Text>
|
|
207
|
+
</CardContent>
|
|
208
|
+
</Card>
|
|
209
|
+
</PageContainer>
|
|
210
|
+
|
|
211
|
+
{/* ── 2. Narrow variant · settings form ── */}
|
|
212
|
+
<PageContainer
|
|
213
|
+
variant="narrow"
|
|
214
|
+
title="エンティティ設定"
|
|
215
|
+
subtitle="法人基本情報を編集します"
|
|
216
|
+
breadcrumb={[
|
|
217
|
+
{ label: "ホーム", to: "/" },
|
|
218
|
+
{ label: "管理", to: "/admin" },
|
|
219
|
+
{ label: "エンティティ設定" },
|
|
220
|
+
]}
|
|
221
|
+
breadcrumbLabel="エンティティ設定のパンくず"
|
|
222
|
+
footer={
|
|
223
|
+
<Flex gap="sm">
|
|
224
|
+
<Button>保存</Button>
|
|
225
|
+
<Button variant="outline">キャンセル</Button>
|
|
226
|
+
</Flex>
|
|
227
|
+
}
|
|
228
|
+
stickyFooter
|
|
229
|
+
footerReveal="onScroll"
|
|
230
|
+
>
|
|
231
|
+
<Card>
|
|
232
|
+
<CardHeader>
|
|
233
|
+
<CardTitle level={2}>法人情報</CardTitle>
|
|
234
|
+
<CardDescription>登録されている法人の基本情報です。</CardDescription>
|
|
235
|
+
</CardHeader>
|
|
236
|
+
<CardContent>
|
|
237
|
+
<Descriptions columns={1}>
|
|
238
|
+
<Descriptions.Item label="法人名">株式会社サンプル</Descriptions.Item>
|
|
239
|
+
<Descriptions.Item label="法人番号" mono>
|
|
240
|
+
1234567890123
|
|
241
|
+
</Descriptions.Item>
|
|
242
|
+
<Descriptions.Item label="決算月">3月</Descriptions.Item>
|
|
243
|
+
</Descriptions>
|
|
244
|
+
</CardContent>
|
|
245
|
+
</Card>
|
|
246
|
+
</PageContainer>
|
|
247
|
+
|
|
248
|
+
{/* ── 3. Flush variant · full-bleed list ── */}
|
|
249
|
+
<PageContainer
|
|
250
|
+
variant="flush"
|
|
251
|
+
title="仕訳一覧"
|
|
252
|
+
subtitle="承認済み仕訳エントリ"
|
|
253
|
+
breadcrumb={[{ label: "会計", to: "/" }, { label: "仕訳一覧" }]}
|
|
254
|
+
breadcrumbLabel="仕訳一覧のパンくず"
|
|
255
|
+
extra={
|
|
256
|
+
<Flex gap="sm">
|
|
257
|
+
<Button variant="outline" size="sm">
|
|
258
|
+
<Filter />
|
|
259
|
+
フィルター
|
|
260
|
+
</Button>
|
|
261
|
+
<Button size="sm">
|
|
262
|
+
<Plus />
|
|
263
|
+
仕訳作成
|
|
264
|
+
</Button>
|
|
265
|
+
</Flex>
|
|
266
|
+
}
|
|
267
|
+
>
|
|
268
|
+
{/* flush strips body padding so the DataTable runs full-bleed, edge to edge. */}
|
|
269
|
+
<DataTable data={journalEntries} columns={journalColumns} getRowId={(r) => r.id} />
|
|
270
|
+
{/* PageContainer.Inset · escape hatch that re-applies the page inset inside a
|
|
271
|
+
full-bleed body, so a footnote keeps the header's left/right alignment. */}
|
|
272
|
+
<PageContainer.Inset>
|
|
273
|
+
<Text as="p" size="xs" tone="muted">
|
|
274
|
+
承認済みの仕訳のみ表示しています。保留中の仕訳は別途承認が必要です。
|
|
275
|
+
</Text>
|
|
276
|
+
</PageContainer.Inset>
|
|
277
|
+
</PageContainer>
|
|
278
|
+
|
|
279
|
+
{/* ── 4. Ghost variant + breadcrumb depth ──
|
|
280
|
+
ghost は「クロムをどこまで静かにするか」を答える variant です。下余白は落とします
|
|
281
|
+
(padding-bottom: 0 · これが本当の静かさ)が、罫線は打ち消しません · サービスが
|
|
282
|
+
--page-header-divider を明示的に立てたなら ghost でも引かれます。帯(toolbar)の
|
|
283
|
+
--page-toolbar-divider と同じ規則で、ページのクロム 3 本が一つの契約に揃います。 */}
|
|
284
|
+
<PageContainer
|
|
285
|
+
variant="ghost"
|
|
286
|
+
title="取引先詳細"
|
|
287
|
+
subtitle="株式会社グローバル商事"
|
|
288
|
+
breadcrumb={[
|
|
289
|
+
{ label: "ホーム", to: "/" },
|
|
290
|
+
{ label: "取引先", to: "/partners" },
|
|
291
|
+
{ label: "株式会社グローバル商事" },
|
|
292
|
+
]}
|
|
293
|
+
breadcrumbLabel="取引先詳細のパンくず"
|
|
294
|
+
extra={<Badge tone="success">取引中</Badge>}
|
|
295
|
+
>
|
|
296
|
+
<Flex direction="col" gap="md">
|
|
297
|
+
<Card>
|
|
298
|
+
<CardHeader>
|
|
299
|
+
<CardTitle level={2}>基本情報</CardTitle>
|
|
300
|
+
</CardHeader>
|
|
301
|
+
<CardContent>
|
|
302
|
+
<Descriptions columns={3}>
|
|
303
|
+
<Descriptions.Item label="代表者">山田 太郎</Descriptions.Item>
|
|
304
|
+
<Descriptions.Item label="所在地">東京都千代田区</Descriptions.Item>
|
|
305
|
+
<Descriptions.Item label="与信枠">¥5,000,000</Descriptions.Item>
|
|
306
|
+
</Descriptions>
|
|
307
|
+
</CardContent>
|
|
308
|
+
</Card>
|
|
309
|
+
</Flex>
|
|
310
|
+
</PageContainer>
|
|
311
|
+
|
|
312
|
+
{/* ── 4b. density axis · 3 段すべてを静止状態で並べる ──
|
|
313
|
+
density は variant と直交する間隔スケール(ui-density-*)で、既定値は "default"。
|
|
314
|
+
既定も明示値として扱えるため、3 つを同じ本文で並べると段差がそのまま読めます。 */}
|
|
315
|
+
<ResponsiveGrid columns={{ sm: 1, md: 3 }}>
|
|
316
|
+
<PageContainer
|
|
317
|
+
density="compact"
|
|
318
|
+
variant="ghost"
|
|
319
|
+
title="コンパクト密度"
|
|
320
|
+
subtitle='density="compact" · 行間・余白を詰めた一覧向け'
|
|
321
|
+
>
|
|
322
|
+
<Card>
|
|
323
|
+
<CardContent>
|
|
324
|
+
<Descriptions columns={1}>
|
|
325
|
+
<Descriptions.Item label="表示密度">コンパクト</Descriptions.Item>
|
|
326
|
+
<Descriptions.Item label="用途">大量データの一覧</Descriptions.Item>
|
|
327
|
+
</Descriptions>
|
|
328
|
+
</CardContent>
|
|
329
|
+
</Card>
|
|
330
|
+
</PageContainer>
|
|
331
|
+
<PageContainer
|
|
332
|
+
density="default"
|
|
333
|
+
variant="ghost"
|
|
334
|
+
title="デフォルト密度"
|
|
335
|
+
subtitle='density="default"(既定)· 業務画面の標準リズム'
|
|
336
|
+
>
|
|
337
|
+
<Card>
|
|
338
|
+
<CardContent>
|
|
339
|
+
<Descriptions columns={1}>
|
|
340
|
+
<Descriptions.Item label="表示密度">デフォルト</Descriptions.Item>
|
|
341
|
+
<Descriptions.Item label="用途">一般的な業務画面</Descriptions.Item>
|
|
342
|
+
</Descriptions>
|
|
343
|
+
</CardContent>
|
|
344
|
+
</Card>
|
|
345
|
+
</PageContainer>
|
|
346
|
+
<PageContainer
|
|
347
|
+
density="comfortable"
|
|
348
|
+
variant="ghost"
|
|
349
|
+
title="コンフォータブル密度"
|
|
350
|
+
subtitle='density="comfortable" · 余白を広げた閲覧向け'
|
|
351
|
+
>
|
|
352
|
+
<Card>
|
|
353
|
+
<CardContent>
|
|
354
|
+
<Descriptions columns={1}>
|
|
355
|
+
<Descriptions.Item label="表示密度">コンフォータブル</Descriptions.Item>
|
|
356
|
+
<Descriptions.Item label="用途">詳細・設定画面</Descriptions.Item>
|
|
357
|
+
</Descriptions>
|
|
358
|
+
</CardContent>
|
|
359
|
+
</Card>
|
|
360
|
+
</PageContainer>
|
|
361
|
+
</ResponsiveGrid>
|
|
362
|
+
|
|
363
|
+
{/* ── 5. Variant + density switcher · interactive (both axes are orthogonal) ── */}
|
|
364
|
+
<PageContainer
|
|
365
|
+
variant={activeVariant}
|
|
366
|
+
density={activeDensity}
|
|
367
|
+
title="バリアント比較"
|
|
368
|
+
subtitle={`現在: variant="${activeVariant}" / density="${activeDensity}"`}
|
|
369
|
+
extra={
|
|
370
|
+
<Flex direction="col" gap="sm">
|
|
371
|
+
<Flex gap="sm" wrap>
|
|
372
|
+
{variants.map((v) => (
|
|
373
|
+
<Button
|
|
374
|
+
key={v.key}
|
|
375
|
+
size="sm"
|
|
376
|
+
variant={activeVariant === v.key ? "default" : "outline"}
|
|
377
|
+
onClick={() => setActiveVariant(v.key)}
|
|
378
|
+
>
|
|
379
|
+
{v.label}
|
|
380
|
+
</Button>
|
|
381
|
+
))}
|
|
382
|
+
</Flex>
|
|
383
|
+
<Flex gap="sm" wrap>
|
|
384
|
+
{densities.map((d) => (
|
|
385
|
+
<Button
|
|
386
|
+
key={d.key}
|
|
387
|
+
size="sm"
|
|
388
|
+
variant={activeDensity === d.key ? "default" : "outline"}
|
|
389
|
+
onClick={() => setActiveDensity(d.key)}
|
|
390
|
+
>
|
|
391
|
+
{d.label}
|
|
392
|
+
</Button>
|
|
393
|
+
))}
|
|
394
|
+
</Flex>
|
|
395
|
+
</Flex>
|
|
396
|
+
}
|
|
397
|
+
>
|
|
398
|
+
<Card>
|
|
399
|
+
<CardContent>
|
|
400
|
+
<Text as="p" tone="muted">
|
|
401
|
+
ページ本文コンテンツ。variant はヘッダー余白・幅制御を、density
|
|
402
|
+
は行間・間隔スケール(ui-density-*)を切り替えます。
|
|
403
|
+
</Text>
|
|
404
|
+
</CardContent>
|
|
405
|
+
</Card>
|
|
406
|
+
</PageContainer>
|
|
407
|
+
|
|
408
|
+
{/* ── 6. fill · body height behaviour on a tall shell (gh#103) ──
|
|
409
|
+
Each PageContainer sits in a fixed-height framed box that stands in for the
|
|
410
|
+
viewport-tall app shell, so the two behaviours are visible side by side. */}
|
|
411
|
+
<ResponsiveGrid columns={{ sm: 1, md: 2 }}>
|
|
412
|
+
{/* Default: top-packed. Short content does NOT stretch · the space below is
|
|
413
|
+
just neutral page background, never a jarring void. */}
|
|
414
|
+
{/* ui-audit-disable-next-line no-hand-rolled-surface — a bounded viewport so the page-level scroll behaviour is visible in a docs page — a frame around the demo, not product chrome */}
|
|
415
|
+
<div className="h-80 overflow-auto rounded-md border">
|
|
416
|
+
<PageContainer title="既定(top-pack)" subtitle="fill なし · 余白は中立な背景">
|
|
417
|
+
<Card>
|
|
418
|
+
<CardContent>
|
|
419
|
+
<Text as="p" tone="muted">
|
|
420
|
+
短いコンテンツでも下に空白の「穴」は出ません。
|
|
421
|
+
</Text>
|
|
422
|
+
</CardContent>
|
|
423
|
+
</Card>
|
|
424
|
+
</PageContainer>
|
|
425
|
+
</div>
|
|
426
|
+
|
|
427
|
+
{/* fill: body grows to fill the shell; the composer footer pins to the bottom. */}
|
|
428
|
+
{/* ui-audit-disable-next-line no-hand-rolled-surface — a bounded viewport so the page-level scroll behaviour is visible in a docs page — a frame around the demo, not product chrome */}
|
|
429
|
+
<div className="h-80 overflow-auto rounded-md border">
|
|
430
|
+
<PageContainer
|
|
431
|
+
fill
|
|
432
|
+
title="fill · 全高ボディ"
|
|
433
|
+
subtitle="メッセージ一覧が伸び、コンポーザーは下部固定"
|
|
434
|
+
footer={
|
|
435
|
+
<Flex gap="sm" align="center">
|
|
436
|
+
<Button size="sm" variant="outline">
|
|
437
|
+
添付
|
|
438
|
+
</Button>
|
|
439
|
+
<Button size="sm">送信</Button>
|
|
440
|
+
</Flex>
|
|
441
|
+
}
|
|
442
|
+
stickyFooter
|
|
443
|
+
>
|
|
444
|
+
<Card>
|
|
445
|
+
<CardContent>
|
|
446
|
+
<Text as="p" tone="muted">
|
|
447
|
+
ボディがシェルの残り高さを占有し、フッター(コンポーザー)が下部に固定されます。
|
|
448
|
+
</Text>
|
|
449
|
+
</CardContent>
|
|
450
|
+
</Card>
|
|
451
|
+
</PageContainer>
|
|
452
|
+
</div>
|
|
453
|
+
</ResponsiveGrid>
|
|
454
|
+
|
|
455
|
+
{/* ── 7. headerLayout · 390px でヘッダー extra をタイトル行に残す (gh#231) ──
|
|
456
|
+
stack (既定) は 640px 未満で extra を subtitle の下の全幅行に落とす。
|
|
457
|
+
responsive-inline は --page-header-extra-measure (11rem) の測度で
|
|
458
|
+
title 帯の横に残す。640px 以上では両者は同一。
|
|
459
|
+
幅は完全にトークン所有 — このページに px 指定もメディアクエリもありません。 */}
|
|
460
|
+
<ResponsiveGrid columns={{ sm: 1, md: 2 }}>
|
|
461
|
+
<PageContainer
|
|
462
|
+
variant="ghost"
|
|
463
|
+
title="メンバー"
|
|
464
|
+
subtitle='headerLayout="stack"(既定)· 640px 未満では検索が subtitle の下に回り込む'
|
|
465
|
+
extra={
|
|
466
|
+
<SearchInput
|
|
467
|
+
id="page-header-layout-stack-search"
|
|
468
|
+
ariaLabel="メンバーを検索(stack)"
|
|
469
|
+
placeholder="メンバーを検索"
|
|
470
|
+
onValueChange={setMemberQuery}
|
|
471
|
+
/>
|
|
472
|
+
}
|
|
473
|
+
>
|
|
474
|
+
<Card>
|
|
475
|
+
<CardContent>
|
|
476
|
+
<Text as="p" tone="muted">
|
|
477
|
+
入力中の絞り込み語: {memberQuery === "" ? "(なし)" : memberQuery}
|
|
478
|
+
</Text>
|
|
479
|
+
</CardContent>
|
|
480
|
+
</Card>
|
|
481
|
+
</PageContainer>
|
|
482
|
+
|
|
483
|
+
<PageContainer
|
|
484
|
+
variant="ghost"
|
|
485
|
+
headerLayout="responsive-inline"
|
|
486
|
+
title="メンバー"
|
|
487
|
+
subtitle='headerLayout="responsive-inline" · 390px でも検索がタイトル行に残る'
|
|
488
|
+
extra={
|
|
489
|
+
<SearchInput
|
|
490
|
+
id="page-header-layout-inline-search"
|
|
491
|
+
ariaLabel="メンバーを検索(responsive-inline)"
|
|
492
|
+
placeholder="メンバーを検索"
|
|
493
|
+
onValueChange={setMemberQuery}
|
|
494
|
+
/>
|
|
495
|
+
}
|
|
496
|
+
>
|
|
497
|
+
<Card>
|
|
498
|
+
<CardContent>
|
|
499
|
+
<Text as="p" tone="muted">
|
|
500
|
+
extra の測度はトークン --page-header-extra-measure。タイトルと subtitle
|
|
501
|
+
は残りの幅で折り返します。
|
|
502
|
+
</Text>
|
|
503
|
+
</CardContent>
|
|
504
|
+
</Card>
|
|
505
|
+
</PageContainer>
|
|
506
|
+
</ResponsiveGrid>
|
|
507
|
+
|
|
508
|
+
{/* ── 8. measure · ヘッダーとボディを 1 つの測度で束ねる (gh#245 / gh#247) ──
|
|
509
|
+
measure は variant(クローム)と直交する第 3 の軸。variant="narrow" は
|
|
510
|
+
.ui-page-body しか絞らないため、ヘッダーのアクションはページ端に取り残される。
|
|
511
|
+
measure はヘッダーとボディの両方を同じトークン測度で絞るので、extra の終端が
|
|
512
|
+
ボディ面の終端と一致する。既定 measure="default" は一切のルールに一致しない。
|
|
513
|
+
幅はすべて --page-measure-* が所有 — このページに px 指定はありません。 */}
|
|
514
|
+
<PageContainer
|
|
515
|
+
title="通知"
|
|
516
|
+
subtitle='measure="default"(既定)· 面はページ幅いっぱいに広がります'
|
|
517
|
+
extra={
|
|
518
|
+
<Button variant="outline" size="sm">
|
|
519
|
+
すべて既読にする
|
|
520
|
+
</Button>
|
|
521
|
+
}
|
|
522
|
+
>
|
|
523
|
+
<Card>
|
|
524
|
+
<CardContent flush>
|
|
525
|
+
<ListRow
|
|
526
|
+
unread
|
|
527
|
+
title="請求書 INV-2041 が承認されました"
|
|
528
|
+
description="2026-08-05 10:24 · 経理部"
|
|
529
|
+
trailing={<Badge tone="success">承認</Badge>}
|
|
530
|
+
/>
|
|
531
|
+
<ListRow
|
|
532
|
+
title="月次締め処理のリマインド"
|
|
533
|
+
description="2026-08-04 18:00 · システム"
|
|
534
|
+
trailing={<Badge tone="warning">要対応</Badge>}
|
|
535
|
+
/>
|
|
536
|
+
</CardContent>
|
|
537
|
+
</Card>
|
|
538
|
+
</PageContainer>
|
|
539
|
+
|
|
540
|
+
{/* 通知フィードの正準構成: ghost(静かなヘッダー律動)× medium(720px の共有測度)×
|
|
541
|
+
responsive-inline(390px でもアクションをタイトル行に残す)。3 つは独立した prop。 */}
|
|
542
|
+
<PageContainer
|
|
543
|
+
variant="ghost"
|
|
544
|
+
measure="medium"
|
|
545
|
+
headerLayout="responsive-inline"
|
|
546
|
+
title="通知"
|
|
547
|
+
subtitle='variant="ghost" × measure="medium" × headerLayout="responsive-inline" · ヘッダーのアクションが 720px のフィード面と同じ端で終わります'
|
|
548
|
+
extra={
|
|
549
|
+
<Button variant="outline" size="sm">
|
|
550
|
+
すべて既読にする
|
|
551
|
+
</Button>
|
|
552
|
+
}
|
|
553
|
+
>
|
|
554
|
+
<Card>
|
|
555
|
+
<CardContent flush>
|
|
556
|
+
<ListRow
|
|
557
|
+
unread
|
|
558
|
+
title="請求書 INV-2041 が承認されました"
|
|
559
|
+
description="2026-08-05 10:24 · 経理部"
|
|
560
|
+
trailing={<Badge tone="success">承認</Badge>}
|
|
561
|
+
/>
|
|
562
|
+
<ListRow
|
|
563
|
+
unread
|
|
564
|
+
title="組織「株式会社ファムジア」への招待が届いています"
|
|
565
|
+
description="2026-08-05 09:12 · 管理者"
|
|
566
|
+
trailing={<Badge tone="info">招待</Badge>}
|
|
567
|
+
/>
|
|
568
|
+
<ListRow
|
|
569
|
+
title="月次締め処理のリマインド"
|
|
570
|
+
description="2026-08-04 18:00 · システム"
|
|
571
|
+
trailing={<Badge tone="warning">要対応</Badge>}
|
|
572
|
+
/>
|
|
573
|
+
</CardContent>
|
|
574
|
+
</Card>
|
|
575
|
+
</PageContainer>
|
|
576
|
+
|
|
577
|
+
{/* measure="narrow" — variant="narrow" と同じ 624px の面だが、ヘッダーも一緒に絞られる。 */}
|
|
578
|
+
<PageContainer
|
|
579
|
+
measure="narrow"
|
|
580
|
+
title="招待"
|
|
581
|
+
subtitle='measure="narrow" · 624px。variant="narrow" と違いヘッダーも同じ測度で絞られます'
|
|
582
|
+
extra={
|
|
583
|
+
<Button variant="outline" size="sm">
|
|
584
|
+
招待を送る
|
|
585
|
+
</Button>
|
|
586
|
+
}
|
|
587
|
+
>
|
|
588
|
+
<Card>
|
|
589
|
+
<CardContent>
|
|
590
|
+
<Text as="p" tone="muted">
|
|
591
|
+
測度はトークン --page-measure-narrow(42rem 外寸)。ページ余白は測度の内側にあるため、
|
|
592
|
+
可視面は 624px になります。390px ではどのトークンも効かず、面は流動的なままです。
|
|
593
|
+
</Text>
|
|
594
|
+
</CardContent>
|
|
595
|
+
</Card>
|
|
596
|
+
</PageContainer>
|
|
597
|
+
|
|
598
|
+
{/* ── 9. toolbar · ヘッダーと本文の間に固定されるクロム帯 ──
|
|
599
|
+
fill のとき本文(.ui-page-body)がスクロール領域になるので、帯はその SIBLING として
|
|
600
|
+
スクロール領域の外に置かれる(flex: none)。呼び出し側で position: sticky を手置き
|
|
601
|
+
しないための唯一の正規スロット。ページ余白と measure はヘッダー/本文と共有され、
|
|
602
|
+
帯の内側余白と下罫線はトークン所有(--page-toolbar-pad-block / --page-toolbar-divider)。
|
|
603
|
+
帯は上下の帯に密着します(.ui-page-container の段間はこの帯だけ打ち消される)· クロムは
|
|
604
|
+
くっつくものであり、空白に浮く「3 つ目のセクション」ではないからです。呼吸する場所は
|
|
605
|
+
帯の内側(--page-toolbar-pad-block)だけ。 */}
|
|
606
|
+
<ResponsiveGrid columns={{ sm: 1, md: 2 }}>
|
|
607
|
+
{/* fill · 帯は固定、トランスクリプトだけがその下でスクロールする(帯の下に潜り込まない)。 */}
|
|
608
|
+
{/* ui-audit-disable-next-line no-hand-rolled-surface — a bounded viewport so the page-level scroll behaviour is visible in a docs page — a frame around the demo, not product chrome */}
|
|
609
|
+
<div className="h-80 overflow-auto rounded-md border">
|
|
610
|
+
<PageContainer
|
|
611
|
+
fill
|
|
612
|
+
title="#経理チャンネル"
|
|
613
|
+
subtitle="toolbar 帯はスクロールせず · 上下の帯に密着します"
|
|
614
|
+
toolbar={
|
|
615
|
+
<Toolbar>
|
|
616
|
+
<ToolbarGroup label="表示">
|
|
617
|
+
<Button size="sm" variant="outline">
|
|
618
|
+
すべて
|
|
619
|
+
</Button>
|
|
620
|
+
<Button size="sm" variant="outline">
|
|
621
|
+
未読
|
|
622
|
+
</Button>
|
|
623
|
+
</ToolbarGroup>
|
|
624
|
+
<Badge tone="info">接続中</Badge>
|
|
625
|
+
</Toolbar>
|
|
626
|
+
}
|
|
627
|
+
footer={
|
|
628
|
+
<Flex gap="sm" align="center">
|
|
629
|
+
<Button size="sm" variant="outline">
|
|
630
|
+
添付
|
|
631
|
+
</Button>
|
|
632
|
+
<Button size="sm">送信</Button>
|
|
633
|
+
</Flex>
|
|
634
|
+
}
|
|
635
|
+
stickyFooter
|
|
636
|
+
>
|
|
637
|
+
<Flex direction="col" gap="md">
|
|
638
|
+
{[
|
|
639
|
+
"月次締めの締切は 8/31 です。",
|
|
640
|
+
"経費精算の申請が 3 件あります。",
|
|
641
|
+
"監査資料を共有しました。",
|
|
642
|
+
"請求書 INV-2041 を承認しました。",
|
|
643
|
+
"来週の定例は水曜 10:00 です。",
|
|
644
|
+
].map((message) => (
|
|
645
|
+
<Card key={message}>
|
|
646
|
+
<CardContent>
|
|
647
|
+
<Text as="p" tone="muted">
|
|
648
|
+
{message}
|
|
649
|
+
</Text>
|
|
650
|
+
</CardContent>
|
|
651
|
+
</Card>
|
|
652
|
+
))}
|
|
653
|
+
</Flex>
|
|
654
|
+
</PageContainer>
|
|
655
|
+
</div>
|
|
656
|
+
|
|
657
|
+
{/* variant="flush" · 帯も本文と同じく全幅になるため、中身は PageContainer.Inset で
|
|
658
|
+
ヘッダーと同じ左右余白に戻す。DataTable は全幅のまま。 */}
|
|
659
|
+
<PageContainer
|
|
660
|
+
variant="flush"
|
|
661
|
+
title="仕訳一覧"
|
|
662
|
+
subtitle='variant="flush" では帯も全幅 · 中身は PageContainer.Inset で整列'
|
|
663
|
+
toolbar={
|
|
664
|
+
<PageContainer.Inset>
|
|
665
|
+
<Toolbar>
|
|
666
|
+
<ToolbarGroup label="状態">
|
|
667
|
+
<Button size="sm" variant="outline">
|
|
668
|
+
承認済
|
|
669
|
+
</Button>
|
|
670
|
+
<Button size="sm" variant="outline">
|
|
671
|
+
保留中
|
|
672
|
+
</Button>
|
|
673
|
+
</ToolbarGroup>
|
|
674
|
+
</Toolbar>
|
|
675
|
+
</PageContainer.Inset>
|
|
676
|
+
}
|
|
677
|
+
>
|
|
678
|
+
<DataTable data={journalEntries} columns={journalColumns} getRowId={(r) => r.id} />
|
|
679
|
+
</PageContainer>
|
|
680
|
+
</ResponsiveGrid>
|
|
681
|
+
|
|
682
|
+
{/* ── 10. headerScale · 先頭行は「文書の見出し」か、それとも「クロム」か ──
|
|
683
|
+
headerScale="document"(既定)は従来どおり h1 = --page-title-font-size(20px)+ 720px
|
|
684
|
+
未満での縮小ステップ。headerScale="chrome" は先頭行が画面そのものの家具(チャットの
|
|
685
|
+
チャンネル名、メールの件名、IDE のタブ)である場合で、h1 は本文と同じ型段
|
|
686
|
+
(--page-title-font-size-chrome = --heading-h3 / 14px)になり、720px 未満でも戻りません。
|
|
687
|
+
要素は h1 のまま — 見出しレベルは下げないので、スクリーンリーダーの見出し階層は不変。
|
|
688
|
+
同じ属性でページ上端の余白も落ちます · 既定の --space-page-active-y(24px · 720px 未満は
|
|
689
|
+
16px)は「文書の見出しの上の余白」であって、チャンネル名やタブは枠そのものだからです。
|
|
690
|
+
上端だけ --page-pad-block-start-chrome(既定 0)に切り替わり、下端は従来どおり
|
|
691
|
+
stickyFooter の担当。設計がクロムに余白を求めるならテーマでこのトークンを一度だけ
|
|
692
|
+
調整します(呼び出し側の padding や負マージンは不可)。
|
|
693
|
+
同じ事実の帰結はあと 2 つ。subtitle は --page-subtitle-font-size-chrome
|
|
694
|
+
(--font-size-2xs / 約 11px)に落ちます · クロムの下の一行はチャンネルの目的や
|
|
695
|
+
メールの抜粋であって文書のリードではなく、既定の --font-size-base のままだと
|
|
696
|
+
chrome のタイトルと同じ型段になって階層が立たないからです。行送りは
|
|
697
|
+
--line-height-body のままなので、折り返す日本語の一行も従来の律動を保ちます。
|
|
698
|
+
そして extra は行が「行」である 640px 以上で帯の中央に揃います(align-self: center)·
|
|
699
|
+
先頭寄せは背の高い h1 の一行目にアクションを並べる文書の作法であって、
|
|
700
|
+
揃える見出しを持たない帯には合いません。実測で 8.65px のずれでした。
|
|
701
|
+
variant="ghost"(罫線と下余白を落とす)と組み合わせると静かなクロムヘッダーになります。 */}
|
|
702
|
+
<ResponsiveGrid columns={{ sm: 1, md: 2 }}>
|
|
703
|
+
<PageContainer
|
|
704
|
+
title="請求書 INV-2041"
|
|
705
|
+
subtitle='headerScale="document"(既定)· 先頭行はこのページの見出し'
|
|
706
|
+
extra={
|
|
707
|
+
<Button size="sm" variant="outline">
|
|
708
|
+
PDF
|
|
709
|
+
</Button>
|
|
710
|
+
}
|
|
711
|
+
>
|
|
712
|
+
<Card>
|
|
713
|
+
<CardContent>
|
|
714
|
+
<Descriptions columns={1}>
|
|
715
|
+
<Descriptions.Item label="タイトルの型段">
|
|
716
|
+
--page-title-font-size(h1 · 20px)
|
|
717
|
+
</Descriptions.Item>
|
|
718
|
+
<Descriptions.Item label="720px 未満">
|
|
719
|
+
--page-title-font-size-compact(h2 · 18px)
|
|
720
|
+
</Descriptions.Item>
|
|
721
|
+
<Descriptions.Item label="ページ上端の余白">
|
|
722
|
+
--space-page-active-y(24px)· chrome では --page-pad-block-start-chrome(0)
|
|
723
|
+
</Descriptions.Item>
|
|
724
|
+
<Descriptions.Item label="subtitle の型段">
|
|
725
|
+
--page-subtitle-font-size(14px)· chrome では
|
|
726
|
+
--page-subtitle-font-size-chrome(約 11px)
|
|
727
|
+
</Descriptions.Item>
|
|
728
|
+
<Descriptions.Item label="extra の縦位置">
|
|
729
|
+
行の先頭寄せ(flex-start)· chrome では帯の中央(align-self: center)
|
|
730
|
+
</Descriptions.Item>
|
|
731
|
+
<Descriptions.Item label="帯の高さ">
|
|
732
|
+
中身なり · chrome では --page-header-min-block-size-chrome(既定 auto · テーマで
|
|
733
|
+
--app-shell-bar-height を読ませると 48px 固定)
|
|
734
|
+
</Descriptions.Item>
|
|
735
|
+
</Descriptions>
|
|
736
|
+
</CardContent>
|
|
737
|
+
</Card>
|
|
738
|
+
</PageContainer>
|
|
739
|
+
|
|
740
|
+
{/* チャット面の正準構成: chrome(型段)× ghost(クロムの重さ)× fill × toolbar ×
|
|
741
|
+
stickyFooter。チャンネル名は「今いる場所の名前」であって記事の見出しではない。
|
|
742
|
+
footer の上罫線も --page-footer-divider で消せます · 入力欄が自前で枠を持つ Card の
|
|
743
|
+
場合、全幅の罫線がその真上に重なって 2 本目の線になるためです。既定は「引く」のまま
|
|
744
|
+
(フォームの保存/取消バーはこの線で本文と分かれる)。 */}
|
|
745
|
+
{/* ui-audit-disable-next-line no-hand-rolled-surface — a bounded viewport so the page-level scroll behaviour is visible in a docs page — a frame around the demo, not product chrome */}
|
|
746
|
+
<div className="h-80 overflow-auto rounded-md border">
|
|
747
|
+
<PageContainer
|
|
748
|
+
fill
|
|
749
|
+
headerScale="chrome"
|
|
750
|
+
variant="ghost"
|
|
751
|
+
title="# 経理チャンネル"
|
|
752
|
+
subtitle="請求書と入金の相談 · 締めは毎月 25 日"
|
|
753
|
+
status={<Badge tone="info">接続中</Badge>}
|
|
754
|
+
extra={
|
|
755
|
+
<Button size="sm" variant="ghost" aria-label="チャンネル内を検索">
|
|
756
|
+
<Search aria-hidden="true" />
|
|
757
|
+
</Button>
|
|
758
|
+
}
|
|
759
|
+
toolbar={
|
|
760
|
+
<Toolbar>
|
|
761
|
+
<ToolbarGroup label="表示">
|
|
762
|
+
<Button size="sm" variant="outline">
|
|
763
|
+
すべて
|
|
764
|
+
</Button>
|
|
765
|
+
<Button size="sm" variant="outline">
|
|
766
|
+
未読
|
|
767
|
+
</Button>
|
|
768
|
+
</ToolbarGroup>
|
|
769
|
+
</Toolbar>
|
|
770
|
+
}
|
|
771
|
+
footer={
|
|
772
|
+
<Flex gap="sm" align="center">
|
|
773
|
+
<Button size="sm" variant="outline">
|
|
774
|
+
添付
|
|
775
|
+
</Button>
|
|
776
|
+
<Button size="sm">送信</Button>
|
|
777
|
+
</Flex>
|
|
778
|
+
}
|
|
779
|
+
stickyFooter
|
|
780
|
+
>
|
|
781
|
+
<Flex direction="col" gap="md">
|
|
782
|
+
{[
|
|
783
|
+
"チャンネル名は本文と同じ 14px · 見出しではなく面のラベルとして読ませます。",
|
|
784
|
+
"その下の一行はさらに 2 段小さい約 11px · 名前と説明の階層が立ちます。",
|
|
785
|
+
"検索アイコンは帯の中央 · 文書の先頭寄せではありません。",
|
|
786
|
+
"h1 のままなので、見出し階層は document と同じ。",
|
|
787
|
+
"帯の高さが下がったぶんは、そのまま会話の高さになります。",
|
|
788
|
+
"縮めたいだけの理由で通常の文書ページに使わないこと。",
|
|
789
|
+
].map((message) => (
|
|
790
|
+
<Card key={message}>
|
|
791
|
+
<CardContent>
|
|
792
|
+
<Text as="p" tone="muted">
|
|
793
|
+
{message}
|
|
794
|
+
</Text>
|
|
795
|
+
</CardContent>
|
|
796
|
+
</Card>
|
|
797
|
+
))}
|
|
798
|
+
</Flex>
|
|
799
|
+
</PageContainer>
|
|
800
|
+
</div>
|
|
801
|
+
</ResponsiveGrid>
|
|
802
|
+
|
|
803
|
+
{/* ── 11. --page-toolbar-background · 帯の地の色もトークン ──
|
|
804
|
+
既定は transparent(=トークン導入前と完全に同じ見え方)。設計が「帯だけカード面に
|
|
805
|
+
乗せる」と言うときは、呼び出し側に className="bg-card" を書くのではなく、テーマで
|
|
806
|
+
--page-toolbar-background を一度だけ宣言します。手置きのページクロムは禁止であり、
|
|
807
|
+
テナントごとの再テーマも効かなくなるためです。帯を塗るなら内側の余白も一緒に
|
|
808
|
+
(--page-toolbar-pad-block)· 既定の 0 は「透明な帯には内側がない」ことに由来します。 */}
|
|
809
|
+
<ResponsiveGrid columns={{ sm: 1, md: 2 }}>
|
|
810
|
+
{/* ui-audit-disable-next-line no-hand-rolled-surface — a bounded viewport so the page-level scroll behaviour is visible in a docs page — a frame around the demo, not product chrome */}
|
|
811
|
+
<div className="h-80 overflow-auto rounded-md border">
|
|
812
|
+
<PageContainer
|
|
813
|
+
fill
|
|
814
|
+
headerScale="chrome"
|
|
815
|
+
variant="ghost"
|
|
816
|
+
title="# 経理チャンネル"
|
|
817
|
+
subtitle="既定 · --page-toolbar-background は transparent"
|
|
818
|
+
toolbar={
|
|
819
|
+
<Toolbar>
|
|
820
|
+
<ToolbarGroup label="表示">
|
|
821
|
+
<Button size="sm" variant="outline">
|
|
822
|
+
未読
|
|
823
|
+
</Button>
|
|
824
|
+
</ToolbarGroup>
|
|
825
|
+
</Toolbar>
|
|
826
|
+
}
|
|
827
|
+
>
|
|
828
|
+
<Flex direction="col" gap="md">
|
|
829
|
+
{[
|
|
830
|
+
"帯はページの地の色のまま · header と body の間に浮いて見えます。",
|
|
831
|
+
"トークンを足すまで DOM もスタイルも従来どおりです。",
|
|
832
|
+
].map((message) => (
|
|
833
|
+
<Card key={message}>
|
|
834
|
+
<CardContent>
|
|
835
|
+
<Text as="p" tone="muted">
|
|
836
|
+
{message}
|
|
837
|
+
</Text>
|
|
838
|
+
</CardContent>
|
|
839
|
+
</Card>
|
|
840
|
+
))}
|
|
841
|
+
</Flex>
|
|
842
|
+
</PageContainer>
|
|
843
|
+
</div>
|
|
844
|
+
|
|
845
|
+
{/* ui-audit-disable-next-line no-hand-rolled-surface — a bounded viewport so the page-level scroll behaviour is visible in a docs page — a frame around the demo, not product chrome */}
|
|
846
|
+
<div className="h-80 overflow-auto rounded-md border" style={TOOLBAR_CHROME_TOKENS}>
|
|
847
|
+
<PageContainer
|
|
848
|
+
fill
|
|
849
|
+
headerScale="chrome"
|
|
850
|
+
variant="ghost"
|
|
851
|
+
title="# 経理チャンネル"
|
|
852
|
+
subtitle="テーマで --page-toolbar-background: hsl(var(--card))"
|
|
853
|
+
toolbar={
|
|
854
|
+
<Toolbar>
|
|
855
|
+
<ToolbarGroup label="表示">
|
|
856
|
+
<Button size="sm" variant="outline">
|
|
857
|
+
未読
|
|
858
|
+
</Button>
|
|
859
|
+
</ToolbarGroup>
|
|
860
|
+
<Badge tone="info">接続中</Badge>
|
|
861
|
+
</Toolbar>
|
|
862
|
+
}
|
|
863
|
+
>
|
|
864
|
+
<Flex direction="col" gap="md">
|
|
865
|
+
{[
|
|
866
|
+
"帯がカード面に乗り、本文から分離して読めます。",
|
|
867
|
+
"塗った帯には内側の余白が要るので pad-block も同じテーマで指定します。",
|
|
868
|
+
"呼び出し側で背景色や上下の余白を足す必要はありません · どちらもトークンの仕事です。",
|
|
869
|
+
].map((message) => (
|
|
870
|
+
<Card key={message}>
|
|
871
|
+
<CardContent>
|
|
872
|
+
<Text as="p" tone="muted">
|
|
873
|
+
{message}
|
|
874
|
+
</Text>
|
|
875
|
+
</CardContent>
|
|
876
|
+
</Card>
|
|
877
|
+
))}
|
|
878
|
+
</Flex>
|
|
879
|
+
</PageContainer>
|
|
880
|
+
</div>
|
|
881
|
+
</ResponsiveGrid>
|
|
882
|
+
|
|
883
|
+
{/* ── 12. --page-header-min-block-size-chrome · クロム帯に「高さ」を与える ──
|
|
884
|
+
既定(左)は auto · 帯は中身なりの高さになるので、副題や extra の有無で帯の縦中心が
|
|
885
|
+
動きます(Chromium 実測 · extra ありで 42.02px、なしで 40.38px)。動く中心には何も
|
|
886
|
+
揃えられません。テーマで一行(右)· --page-header-min-block-size-chrome を
|
|
887
|
+
--app-shell-bar-height にすると帯は 48px に固定され、タイトル列も extra も帯の中心
|
|
888
|
+
(y=24)に載ります。min なので、より背の高い extra は今までどおり収まります。 */}
|
|
889
|
+
<ResponsiveGrid columns={{ sm: 1, md: 2 }}>
|
|
890
|
+
{/* ui-audit-disable-next-line no-hand-rolled-surface — a bounded viewport so the page-level scroll behaviour is visible in a docs page — a frame around the demo, not product chrome */}
|
|
891
|
+
<div className="h-80 overflow-auto rounded-md border">
|
|
892
|
+
<PageContainer
|
|
893
|
+
fill
|
|
894
|
+
headerScale="chrome"
|
|
895
|
+
variant="ghost"
|
|
896
|
+
title="# 経理チャンネル"
|
|
897
|
+
subtitle="既定 · --page-header-min-block-size-chrome は auto"
|
|
898
|
+
extra={
|
|
899
|
+
<Button size="sm" variant="ghost" aria-label="チャンネル内を検索">
|
|
900
|
+
<Search aria-hidden="true" />
|
|
901
|
+
</Button>
|
|
902
|
+
}
|
|
903
|
+
>
|
|
904
|
+
<Flex direction="col" gap="md">
|
|
905
|
+
{[
|
|
906
|
+
"帯の高さは中身なり · 副題を短くすると縦中心がそのぶん動きます。",
|
|
907
|
+
"48px のトップバーと中心を合わせる方法がありません。",
|
|
908
|
+
].map((message) => (
|
|
909
|
+
<Card key={message}>
|
|
910
|
+
<CardContent>
|
|
911
|
+
<Text as="p" tone="muted">
|
|
912
|
+
{message}
|
|
913
|
+
</Text>
|
|
914
|
+
</CardContent>
|
|
915
|
+
</Card>
|
|
916
|
+
))}
|
|
917
|
+
</Flex>
|
|
918
|
+
</PageContainer>
|
|
919
|
+
</div>
|
|
920
|
+
|
|
921
|
+
{/* ui-audit-disable-next-line no-hand-rolled-surface — a bounded viewport so the page-level scroll behaviour is visible in a docs page — a frame around the demo, not product chrome */}
|
|
922
|
+
<div className="h-80 overflow-auto rounded-md border" style={CHROME_BAND_TOKENS}>
|
|
923
|
+
<PageContainer
|
|
924
|
+
fill
|
|
925
|
+
headerScale="chrome"
|
|
926
|
+
variant="ghost"
|
|
927
|
+
title="# 経理チャンネル"
|
|
928
|
+
subtitle="テーマで --app-shell-bar-height を読ませた 48px の帯"
|
|
929
|
+
extra={
|
|
930
|
+
<Button size="sm" variant="ghost" aria-label="チャンネル内を検索">
|
|
931
|
+
<Search aria-hidden="true" />
|
|
932
|
+
</Button>
|
|
933
|
+
}
|
|
934
|
+
>
|
|
935
|
+
<Flex direction="col" gap="md">
|
|
936
|
+
{[
|
|
937
|
+
"帯は 48px 固定 · AppShell のトップバーと同じ帯に乗ります。",
|
|
938
|
+
"タイトル列も検索アイコンも帯の中央 · 中身が変わっても動きません。",
|
|
939
|
+
].map((message) => (
|
|
940
|
+
<Card key={message}>
|
|
941
|
+
<CardContent>
|
|
942
|
+
<Text as="p" tone="muted">
|
|
943
|
+
{message}
|
|
944
|
+
</Text>
|
|
945
|
+
</CardContent>
|
|
946
|
+
</Card>
|
|
947
|
+
))}
|
|
948
|
+
</Flex>
|
|
949
|
+
</PageContainer>
|
|
950
|
+
</div>
|
|
951
|
+
</ResponsiveGrid>
|
|
952
|
+
</Flex>
|
|
953
|
+
);
|
|
954
|
+
}
|