@godxjp/ui 19.0.0 → 19.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -128
- package/dist/app/app-provider.d.ts +1 -1
- package/dist/app/app-provider.js +3 -0
- 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 +2 -12
- 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/cascader.js +3 -1
- package/dist/components/data-entry/checkbox-group.js +12 -5
- package/dist/components/data-entry/checkbox.js +30 -21
- 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 +12 -3
- package/dist/components/data-entry/date-range-picker.d.ts +1 -1
- package/dist/components/data-entry/date-range-picker.js +17 -6
- package/dist/components/data-entry/form-errors.d.ts +7 -18
- package/dist/components/data-entry/form-field.d.ts +1 -1
- package/dist/components/data-entry/form-field.js +15 -6
- 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 +13 -3
- package/dist/components/data-entry/month-picker.js +6 -4
- package/dist/components/data-entry/month-range-picker.d.ts +4 -6
- package/dist/components/data-entry/month-range-picker.js +11 -5
- 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 +19 -6
- package/dist/components/data-entry/search-select.d.ts +3 -5
- package/dist/components/data-entry/search-select.js +8 -2
- package/dist/components/data-entry/select.d.ts +15 -2
- package/dist/components/data-entry/select.js +57 -10
- package/dist/components/data-entry/switch.js +9 -2
- package/dist/components/data-entry/textarea.d.ts +10 -16
- package/dist/components/data-entry/textarea.js +8 -1
- package/dist/components/data-entry/time-picker.d.ts +3 -5
- package/dist/components/data-entry/tree-select.js +3 -1
- 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 +31 -36
- package/dist/lib/field-a11y.js +16 -2
- 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 +19 -27
- package/dist/props/components/charts.prop.d.ts +2 -3
- package/dist/props/components/data-display.prop.d.ts +48 -72
- package/dist/props/components/data-entry.prop.d.ts +41 -30
- 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 +31 -0
- package/dist/props/registry.js +33 -0
- 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 +4 -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 +4 -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 +247 -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 +156 -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 +184 -0
- package/docs/data-display/popover-touch.tsx +27 -0
- package/docs/data-display/popover.tsx +245 -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 +271 -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 +170 -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 +326 -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 +106 -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 +410 -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 +202 -0
- package/docs/foundation/density.tsx +232 -0
- package/docs/foundation/email-tokens.tsx +306 -0
- package/docs/foundation/radius-shadow.tsx +152 -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 +119 -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 +262 -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 +946 -0
- package/docs/layout/resizable-panel.tsx +419 -0
- package/docs/layout/responsive-grid.tsx +235 -0
- package/docs/layout/separator.tsx +327 -0
- package/docs/layout/service-role-panel.tsx +144 -0
- package/docs/layout/sidebar.tsx +586 -0
- package/docs/layout/split-pane.tsx +451 -0
- package/docs/layout/topbar.tsx +347 -0
- package/docs/navigation/app-setting-picker.tsx +141 -0
- package/docs/navigation/breadcrumb.tsx +128 -0
- package/docs/navigation/context-menu.tsx +117 -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 +165 -0
- package/docs/navigation/pagination.tsx +241 -0
- package/docs/navigation/steps.tsx +263 -0
- package/docs/navigation/tabs-rtl.tsx +28 -0
- package/docs/navigation/tabs.tsx +308 -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 +441 -0
- package/docs/showcase/acme-website.tsx +455 -0
- package/docs/showcase/case1-warehouse-dashboard.tsx +343 -0
- package/docs/showcase/case2-employee-me.tsx +441 -0
- package/docs/showcase/case3-approval-workflow.tsx +527 -0
- package/docs/showcase/case4-login.tsx +307 -0
- package/docs/showcase/case5-shift-calendar.tsx +795 -0
- package/docs/showcase/case6-agency-handy.tsx +1072 -0
- package/docs/showcase/futurelastic-web.tsx +390 -0
- package/docs/showcase/org-switcher.tsx +313 -0
- package/docs/showcase/permission-matrix.tsx +343 -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 +340 -0
- package/docs/showcase/table-expandable-rows.tsx +471 -0
- package/docs/showcase/table-filter-chips.tsx +461 -0
- package/docs/showcase/table-footer-totals.tsx +311 -0
- package/docs/showcase/table-grouped-subtotals.tsx +388 -0
- package/docs/showcase/table-master-detail.tsx +479 -0
- package/docs/showcase/table-pagination.tsx +320 -0
- package/docs/showcase/table-states.tsx +363 -0
- package/docs/showcase/table-sticky-columns.tsx +373 -0
- package/docs/showcase/table-tree-rows.tsx +444 -0
- package/docs/showcase/table-view-tabs.tsx +488 -0
- package/package.json +10 -11
- 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,153 @@
|
|
|
1
|
+
--- title: Overview ---
|
|
2
|
+
|
|
3
|
+
# Error surface — 403 / 404 / 500 / 503
|
|
4
|
+
|
|
5
|
+
`ErrorSurface` is a **package-owned, importable component** (`@godxjp/ui/layout`). It owns the four HTTP exception pages every application ships, including their responsive geometry, so no app re-implements them from a generic `Card` in the wrong shell.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { ErrorSurface } from "@godxjp/ui/layout";
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## History — why this is a component (gh#221 → gh#251)
|
|
12
|
+
|
|
13
|
+
#221 first shipped this surface as a **documentation-only composition pattern**: the
|
|
14
|
+
Framework-Component Test was run, it was judged a composition, and the package shipped two shells,
|
|
15
|
+
some tokens and a docs page instead of an export. That was wrong in outcome, and #251 is the proof:
|
|
16
|
+
**a consumer cannot `import` a docs page.** A clean install of 18.5.0 exposed no `ErrorSurface`, so
|
|
17
|
+
DXS Platform was still forced to compose `AuthShell` + a generic `Card` behind a consumer-local
|
|
18
|
+
`.canonical-auth-card` — exactly what the API-first rule forbids. The consumer requirement settles
|
|
19
|
+
the question: the surface ships as a real export.
|
|
20
|
+
|
|
21
|
+
Two things that analysis got right are preserved verbatim in the component's design:
|
|
22
|
+
|
|
23
|
+
- **A component cannot manufacture the application shell.** Nav sections, product identity and the user menu are consumer-owned data. So `mode="application"` does not build chrome — it defines _where the surface goes_ (see below), and the surface renders only its own block. - **Exactly one recovery action** stays structural — one slot, extras dropped.
|
|
24
|
+
|
|
25
|
+
## `mode` is the shell contract, not a skin
|
|
26
|
+
|
|
27
|
+
| `mode` | Status | What the component renders | What you provide |
|
|
28
|
+
| --------------- | --------- | ------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
29
|
+
| `"application"` | 403 · 404 | **Only the surface block.** No shell, no landmark, no page geometry | The `AppShell` (usually + `PageContainer`) the route already renders |
|
|
30
|
+
| `"system"` | 500 · 503 | **The whole page** — `CenteredShell align="center"` + the surface | Nothing. No `min-h-dvh`, no flex-centring class, no media query |
|
|
31
|
+
|
|
32
|
+
> **`mode="application"` means "this is what you put in AppShell's children".** The session is
|
|
33
|
+
> valid, so the sidebar, topbar and breadcrumb stay mounted and the user can navigate away. The
|
|
34
|
+
> surface never reconstructs them.
|
|
35
|
+
>
|
|
36
|
+
> **`mode="system"` means "the app itself failed".** Session and nav data may be gone, so the
|
|
37
|
+
> surface owns the page. `AuthShell` is never an option: it is the UNAUTHENTICATED root and imposes
|
|
38
|
+
> auth-card geometry.
|
|
39
|
+
|
|
40
|
+
## API
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
<ErrorSurface
|
|
44
|
+
mode="application" | "system" // required — the shell contract above
|
|
45
|
+
status={403 | 404 | 500 | 503} // required — drives the default icon + tone
|
|
46
|
+
title={t("errors.403.title")} // required — consumer-owned copy
|
|
47
|
+
description={t("errors.403.body")}
|
|
48
|
+
action={<Button>{t("errors.backHome")}</Button>} // required — EXACTLY ONE
|
|
49
|
+
|
|
50
|
+
// optional semantic metadata slots (each renders as a <dt>/<dd> pair)
|
|
51
|
+
requestId="01J9Z0M7Q2K5S7WQ3T5N8V2H4B"
|
|
52
|
+
permission="reports.view"
|
|
53
|
+
organization="Acme KK"
|
|
54
|
+
maintenance={{ start, end, timeZone, progress }} // ISO-8601 + IANA + 0–100
|
|
55
|
+
|
|
56
|
+
// optional overrides / system-mode slots
|
|
57
|
+
icon={LifeBuoy} tone="warning" titleLevel={2}
|
|
58
|
+
brand={<Logo glyph="G" />} footer={<Text size="xs">2026 GodX</Text>} width="sm"
|
|
59
|
+
id className ref
|
|
60
|
+
/>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- **`status` is the input, not a lookup you write.** It selects the icon (`ShieldAlert` 403 ·
|
|
64
|
+
`SearchX` 404 · `ServerCrash` 500 · `Wrench` 503) and the tone (`warning` 403/503 · `muted` 404 ·
|
|
65
|
+
`destructive` 500). Override either only for a truer product glyph, never to recolour a severity.
|
|
66
|
+
- **`action` is exactly one.** A single slot is the enforcement; pass a fragment with two buttons
|
|
67
|
+
and only the first renders, with a development-time error. Support contact belongs in
|
|
68
|
+
`description`, not in a second CTA.
|
|
69
|
+
- **`titleLevel` defaults per mode** — `2` in `application` (a `PageContainer` `h1` sits above),
|
|
70
|
+
`1` in `system` (the surface IS the page). Override only to fit a deeper outline.
|
|
71
|
+
- **Product copy stays consumer-owned.** `title` / `description` / `action` come from the app's own
|
|
72
|
+
`t()`. The surface localizes only its OWN metadata labels ("Request ID", "Required permission",
|
|
73
|
+
"Organization", "Scheduled maintenance", "Maintenance progress").
|
|
74
|
+
|
|
75
|
+
## Metadata slots — semantic, not sentences
|
|
76
|
+
|
|
77
|
+
Each slot renders a real `<dt>`/`<dd>` pair inside a `<dl>`, so the label↔value relationship
|
|
78
|
+
survives for a screen reader instead of collapsing into a colon in a paragraph. Omit them all and
|
|
79
|
+
the list is not rendered at all.
|
|
80
|
+
|
|
81
|
+
| Slot | Why it exists |
|
|
82
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
83
|
+
| `requestId` | Support correlation id. Mono + tabular so it can be read out or copied accurately. |
|
|
84
|
+
| `permission` | The missing role (403). Distinguishes "you need a role" from a generic refusal. |
|
|
85
|
+
| `organization` | The tenant the request was scoped to. Distinguishes a wrong-workspace 403 from a missing-role one. |
|
|
86
|
+
| `maintenance.start/end` | ISO-8601 instants + an IANA `timeZone`, formatted by `Intl.DateTimeFormat(...).formatRange()`. The visible text is CLDR; `<time dateTime>` keeps the machine-readable ISO value. |
|
|
87
|
+
| `maintenance.progress` | 0–100, rendered as a labelled `Progress` meter with an `Intl.NumberFormat` percent name — never colour-only. |
|
|
88
|
+
|
|
89
|
+
**Never hand-build a window** (`"18:00 - 20:00 JST"`): it cannot localize. **Never derive
|
|
90
|
+
`progress` from the client clock**: SSR and hydration would disagree, and an exception page must be
|
|
91
|
+
readable before hydration.
|
|
92
|
+
|
|
93
|
+
## Accessibility
|
|
94
|
+
|
|
95
|
+
- **Status code is announced as a phrase.** The visible digits are `aria-hidden`; an `sr-only`
|
|
96
|
+
sibling carries "HTTP status 403", because a bare "403" is read as the cardinal number
|
|
97
|
+
"four hundred three".
|
|
98
|
+
- **Heading order stays valid** by default in both modes (see `titleLevel` above).
|
|
99
|
+
- The single action is a real `Button`: standard visible focus ring, reachable by `Tab`, no
|
|
100
|
+
positive tabindex.
|
|
101
|
+
- Verified at **0 axe violations** for all four statuses, in both shells, with metadata, and under
|
|
102
|
+
`dir="rtl"` (`src/components/layout/__tests__/error-surface.a11y.test.tsx`).
|
|
103
|
+
|
|
104
|
+
## Package-owned geometry (1440 / 1024 / 390)
|
|
105
|
+
|
|
106
|
+
No consumer `className`, media query or `min-h-dvh` is needed at any viewport.
|
|
107
|
+
|
|
108
|
+
| Token | Default | Owns |
|
|
109
|
+
| --------------------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
110
|
+
| `--error-surface-max-width` | `32rem` | Measure of the whole surface block, in BOTH modes — so a long ja/vi headline wraps readably even inside a wide `PageContainer`. |
|
|
111
|
+
| `--error-surface-gap` | `--space-3` | Rhythm between status code, body, metadata list and progress meter. |
|
|
112
|
+
| `--error-surface-padding-block` | `--space-10` | Block padding at the desktop steps (1440 / 1024). |
|
|
113
|
+
| `--error-surface-padding-block-compact` | `--space-6` | Block padding below the narrow step (the 390 case). |
|
|
114
|
+
| `--error-surface-meta-gap` / `-row-gap` | `--space-1` / `--space-2` | Metadata row rhythm and the label↔value gap inside one row. |
|
|
115
|
+
| `--error-surface-meta-border` | `none` | Divider above the metadata block. **Quiet by default (rule #44)** — a service opts in with `1px solid hsl(var(--border))`. |
|
|
116
|
+
| `--error-surface-progress-max-width` | `18rem` | Progress meter measure, so it reads as metadata rather than as the page's primary content. |
|
|
117
|
+
| `--centered-shell-column-offset-block` | `0` (`auto` when centred) | `system` mode only. `align="center"` centres the column in the `100dvh` shell; auto offsets collapse when content overflows, so tall copy scrolls instead of clipping. |
|
|
118
|
+
| `--empty-state-description-max-width` | `28rem` | Description measure — retune per service/locale instead of forking `.ui-empty-state-description`. |
|
|
119
|
+
|
|
120
|
+
The narrow step is a **container query on the surface's own width**, not a viewport query (the
|
|
121
|
+
SplitPane precedent, gh#165): the surface compacts correctly whether the squeeze came from a 390px
|
|
122
|
+
phone or from an application shell with an expanded sidebar. Below the step, metadata rows stack
|
|
123
|
+
label-over-value instead of wrapping into a ragged two-column shape.
|
|
124
|
+
|
|
125
|
+
## SSR / Inertia exception pages
|
|
126
|
+
|
|
127
|
+
The surface has **no state, no effects and no portals**, so it renders fully server-side. Inertia
|
|
128
|
+
delivers every exception through one `Error` page component that receives the HTTP `status`
|
|
129
|
+
(Laravel `Handler::render()` → `Inertia::render('Error', ['status' => …])`), which maps onto
|
|
130
|
+
`ErrorSurface` with a single expression:
|
|
131
|
+
|
|
132
|
+
````tsx
|
|
133
|
+
// resources/js/Pages/Error.tsx
|
|
134
|
+
import { Button, Logo } from "@godxjp/ui/general";
|
|
135
|
+
import { ErrorSurface } from "@godxjp/ui/layout";
|
|
136
|
+
import { Link, router } from "@inertiajs/react";
|
|
137
|
+
|
|
138
|
+
export default function Error({ status, requestId, }: { status: 403 | 404 | 500 | 503; requestId?: string; }) { const { t } = useTranslation(); // the APP's i18n — @godxjp/ui never owns product copy const isSystem = status >= 500;
|
|
139
|
+
|
|
140
|
+
return ( <ErrorSurface mode={isSystem ? "system" : "application"} status={status} title={t(`errors.${status}.title`)} description={t(`errors.${status}.description`)} requestId={requestId} {...(isSystem ? { brand: <Logo glyph="G" /> } : {})} action={ isSystem ? ( <Button onClick={() => router.reload()}>{t("errors.reload")}</Button> ) : ( <Button asChild> <Link href="/">{t("errors.backHome")}</Link> </Button> ) } /> ); }
|
|
141
|
+
|
|
142
|
+
// Persistent layout ⇒ 403/404 keep the authenticated shell (the sidebar is not re-mounted, scroll // and drawer state survive); 500/503 render standalone, because the surface owns the page. Error.layout = (page: React.ReactNode) => page.props.status < 500 ? <AuthenticatedLayout>{page}</AuthenticatedLayout> : page; ```
|
|
143
|
+
|
|
144
|
+
SSR notes:
|
|
145
|
+
|
|
146
|
+
- Send the maintenance window as **ISO-8601 from the server** with an explicit `timeZone`. Relying on the server's local zone makes SSR and client output diverge and React logs a hydration mismatch. - A 500 page must not import the app's data providers/query client — the failure may be inside them. `ErrorSurface` needs no provider beyond the `AppProvider` that supplies the locale.
|
|
147
|
+
|
|
148
|
+
## Anti-patterns
|
|
149
|
+
|
|
150
|
+
## The composition underneath
|
|
151
|
+
|
|
152
|
+
`ErrorSurface` composes real primitives (`EmptyState` · `Text` · `Progress` · `CenteredShell`) and adds no bespoke markup you could not inspect. For a status outside the supported four, compose the same body by hand — that composition is pinned by `src/components/layout/__tests__/error-surface-pattern.test.tsx`, so it cannot break from underneath.
|
|
153
|
+
````
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { Card, CardContent, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
2
|
+
import { Button, Logo } from "@godxjp/ui/general";
|
|
3
|
+
import { ErrorSurface, Flex, PageContainer, ResponsiveGrid } from "@godxjp/ui/layout";
|
|
4
|
+
import { LifeBuoy, RotateCcw } from "lucide-react";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* ERROR SURFACE (403 · 404 · 500 · 503) — a real, importable component: `ErrorSurface`.
|
|
8
|
+
*
|
|
9
|
+
* `mode` is the SHELL CONTRACT, not a skin:
|
|
10
|
+
* application (403/404) → the BODY you place inside the AppShell the route already renders
|
|
11
|
+
* system (500/503) → owns the page: CenteredShell align="center", package-owned geometry
|
|
12
|
+
*
|
|
13
|
+
* Every card below renders the surface in `application` mode, because a `system` surface is a full
|
|
14
|
+
* `100dvh` page and would swallow this catalogue page — see the Examples for the two real screens.
|
|
15
|
+
*
|
|
16
|
+
* Structure of the surface: status code (compact, mono/tabular, announced as "HTTP status 403")
|
|
17
|
+
* → icon · tone · title · description · EXACTLY ONE action → optional semantic metadata rows
|
|
18
|
+
* (request id · required permission · organization · maintenance window + progress).
|
|
19
|
+
*/
|
|
20
|
+
export default function Demo() {
|
|
21
|
+
return (
|
|
22
|
+
<PageContainer
|
|
23
|
+
title="Error surface"
|
|
24
|
+
subtitle="ErrorSurface · 403 / 404 / 500 / 503 · mode=application (AppShell body) vs mode=system (owns the page)"
|
|
25
|
+
>
|
|
26
|
+
<Flex direction="col" gap="lg">
|
|
27
|
+
<Card>
|
|
28
|
+
<CardHeader>
|
|
29
|
+
<CardTitle level={2}>status=403 · 権限なし(permission + organization)</CardTitle>
|
|
30
|
+
</CardHeader>
|
|
31
|
+
<CardContent>
|
|
32
|
+
<ErrorSurface
|
|
33
|
+
mode="application"
|
|
34
|
+
status={403}
|
|
35
|
+
titleLevel={3}
|
|
36
|
+
title="このページへのアクセス権限がありません"
|
|
37
|
+
description="管理者にレポート閲覧ロールの付与を依頼してください。"
|
|
38
|
+
permission="reports.view"
|
|
39
|
+
organization="株式会社ゴッドエックス"
|
|
40
|
+
action={<Button>ダッシュボードへ戻る</Button>}
|
|
41
|
+
/>
|
|
42
|
+
</CardContent>
|
|
43
|
+
</Card>
|
|
44
|
+
|
|
45
|
+
<Card>
|
|
46
|
+
<CardHeader>
|
|
47
|
+
<CardTitle level={2}>status=404 · 未検出(メタデータなし)</CardTitle>
|
|
48
|
+
</CardHeader>
|
|
49
|
+
<CardContent>
|
|
50
|
+
{/* Every metadata slot omitted ⇒ the whole description list disappears. Metadata is
|
|
51
|
+
optional; the surface never renders an empty row or a dangling label. */}
|
|
52
|
+
<ErrorSurface
|
|
53
|
+
mode="application"
|
|
54
|
+
status={404}
|
|
55
|
+
titleLevel={3}
|
|
56
|
+
title="ページが見つかりません"
|
|
57
|
+
description="お探しのページは移動または削除された可能性があります。"
|
|
58
|
+
action={<Button>ダッシュボードへ戻る</Button>}
|
|
59
|
+
/>
|
|
60
|
+
</CardContent>
|
|
61
|
+
</Card>
|
|
62
|
+
|
|
63
|
+
<Card>
|
|
64
|
+
<CardHeader>
|
|
65
|
+
<CardTitle level={2}>status=500 · リクエスト ID 付き</CardTitle>
|
|
66
|
+
</CardHeader>
|
|
67
|
+
<CardContent>
|
|
68
|
+
{/* Shown here in application mode so the card can contain it. In a real 500 page this
|
|
69
|
+
is mode="system" and the surface owns the whole viewport. */}
|
|
70
|
+
<ErrorSurface
|
|
71
|
+
mode="application"
|
|
72
|
+
status={500}
|
|
73
|
+
titleLevel={3}
|
|
74
|
+
title="問題が発生しました"
|
|
75
|
+
description="予期しないエラーが発生しました。担当チームに通知済みです。"
|
|
76
|
+
requestId="01J9Z0M7Q2K5S7WQ3T5N8V2H4B"
|
|
77
|
+
action={
|
|
78
|
+
<Button>
|
|
79
|
+
<RotateCcw />
|
|
80
|
+
再読み込み
|
|
81
|
+
</Button>
|
|
82
|
+
}
|
|
83
|
+
/>
|
|
84
|
+
</CardContent>
|
|
85
|
+
</Card>
|
|
86
|
+
|
|
87
|
+
<Card>
|
|
88
|
+
<CardHeader>
|
|
89
|
+
<CardTitle level={2}>status=503 · メンテナンス時間帯 + 進捗</CardTitle>
|
|
90
|
+
</CardHeader>
|
|
91
|
+
<CardContent>
|
|
92
|
+
{/* ISO-8601 instants + an IANA zone in, Intl.DateTimeFormat.formatRange out. The
|
|
93
|
+
progress meter is server-sent (a client clock would break SSR hydration). */}
|
|
94
|
+
<ErrorSurface
|
|
95
|
+
mode="application"
|
|
96
|
+
status={503}
|
|
97
|
+
titleLevel={3}
|
|
98
|
+
title="サービスを一時的にご利用いただけません"
|
|
99
|
+
description="計画メンテナンスを実施しています。しばらくしてから再度お試しください。"
|
|
100
|
+
maintenance={{
|
|
101
|
+
start: "2026-08-02T18:00:00Z",
|
|
102
|
+
end: "2026-08-02T20:00:00Z",
|
|
103
|
+
timeZone: "Asia/Tokyo",
|
|
104
|
+
progress: 40,
|
|
105
|
+
}}
|
|
106
|
+
action={
|
|
107
|
+
<Button>
|
|
108
|
+
<RotateCcw />
|
|
109
|
+
再読み込み
|
|
110
|
+
</Button>
|
|
111
|
+
}
|
|
112
|
+
/>
|
|
113
|
+
</CardContent>
|
|
114
|
+
</Card>
|
|
115
|
+
|
|
116
|
+
<Card>
|
|
117
|
+
<CardHeader>
|
|
118
|
+
<CardTitle level={2}>icon / tone / brand の上書き</CardTitle>
|
|
119
|
+
</CardHeader>
|
|
120
|
+
<CardContent>
|
|
121
|
+
{/* icon and tone DEFAULT from the status (500 ⇒ ServerCrash + destructive). Override
|
|
122
|
+
them only when the product has a truer glyph for the failure — never to recolour a
|
|
123
|
+
status into a different severity. `brand` is system-mode only and is ignored here. */}
|
|
124
|
+
<ErrorSurface
|
|
125
|
+
mode="application"
|
|
126
|
+
status={500}
|
|
127
|
+
titleLevel={3}
|
|
128
|
+
icon={LifeBuoy}
|
|
129
|
+
tone="warning"
|
|
130
|
+
brand={<Logo glyph="G" />}
|
|
131
|
+
title="復旧作業中です"
|
|
132
|
+
description="サポートチームが対応しています。復旧までしばらくお待ちください。"
|
|
133
|
+
action={<Button variant="outline">ステータスページを見る</Button>}
|
|
134
|
+
/>
|
|
135
|
+
</CardContent>
|
|
136
|
+
</Card>
|
|
137
|
+
|
|
138
|
+
<Card>
|
|
139
|
+
<CardHeader>
|
|
140
|
+
<CardTitle level={2}>tone · セマンティックな重大度の 5 段階</CardTitle>
|
|
141
|
+
</CardHeader>
|
|
142
|
+
<CardContent>
|
|
143
|
+
{/* `tone` DEFAULTS from `status` (403/503 warning · 404 muted · 500 destructive). An
|
|
144
|
+
explicit tone is for the case where the product knows a TRUER severity than the
|
|
145
|
+
status code carries -- a planned window is informational, a resolved incident is a
|
|
146
|
+
success -- never to recolour one severity into another for decoration. All five
|
|
147
|
+
branches are rendered here so the whole axis is readable at rest. */}
|
|
148
|
+
<ResponsiveGrid columns={{ sm: 1, md: 3 }}>
|
|
149
|
+
<ErrorSurface
|
|
150
|
+
mode="application"
|
|
151
|
+
status={404}
|
|
152
|
+
tone="muted"
|
|
153
|
+
titleLevel={3}
|
|
154
|
+
title="ページが見つかりません"
|
|
155
|
+
description="リンクが古い可能性があります。中立な不在であり、障害ではありません。"
|
|
156
|
+
action={<Button variant="outline">ホームへ戻る</Button>}
|
|
157
|
+
/>
|
|
158
|
+
<ErrorSurface
|
|
159
|
+
mode="application"
|
|
160
|
+
status={503}
|
|
161
|
+
tone="info"
|
|
162
|
+
titleLevel={3}
|
|
163
|
+
title="計画メンテナンスを実施しています"
|
|
164
|
+
description="事前告知済みの停止です。障害ではないため、警告ではなく情報として提示します。"
|
|
165
|
+
action={<Button variant="outline">ステータスページを見る</Button>}
|
|
166
|
+
/>
|
|
167
|
+
<ErrorSurface
|
|
168
|
+
mode="application"
|
|
169
|
+
status={403}
|
|
170
|
+
tone="warning"
|
|
171
|
+
titleLevel={3}
|
|
172
|
+
title="この操作には承認が必要です"
|
|
173
|
+
description="権限を追加すれば同じ画面に戻れます。回復可能な状態です。"
|
|
174
|
+
action={<Button variant="outline">権限を申請する</Button>}
|
|
175
|
+
/>
|
|
176
|
+
<ErrorSurface
|
|
177
|
+
mode="application"
|
|
178
|
+
status={500}
|
|
179
|
+
tone="destructive"
|
|
180
|
+
titleLevel={3}
|
|
181
|
+
title="問題が発生しました"
|
|
182
|
+
description="想定外の失敗です。利用者側の操作では回復できません。"
|
|
183
|
+
action={<Button variant="outline">再読み込み</Button>}
|
|
184
|
+
/>
|
|
185
|
+
<ErrorSurface
|
|
186
|
+
mode="application"
|
|
187
|
+
status={503}
|
|
188
|
+
tone="success"
|
|
189
|
+
titleLevel={3}
|
|
190
|
+
title="復旧が完了しました"
|
|
191
|
+
description="最終確認を行っています。まもなく通常どおりご利用いただけます。"
|
|
192
|
+
action={<Button variant="outline">再読み込み</Button>}
|
|
193
|
+
/>
|
|
194
|
+
</ResponsiveGrid>
|
|
195
|
+
</CardContent>
|
|
196
|
+
</Card>
|
|
197
|
+
|
|
198
|
+
{/* The same surface in ja / en / vi. The library-owned metadata LABELS ("Request ID") follow
|
|
199
|
+
the active app locale; the product copy is whatever the app's own t() returns. The
|
|
200
|
+
description measure is owned by --empty-state-description-max-width (28rem), and the
|
|
201
|
+
surface measure by --error-surface-max-width (32rem), so the longest locale wraps
|
|
202
|
+
instead of breaking the layout. */}
|
|
203
|
+
<Card>
|
|
204
|
+
<CardHeader>
|
|
205
|
+
<CardTitle level={2}>多言語オーバーフロー:ja / en / vi</CardTitle>
|
|
206
|
+
</CardHeader>
|
|
207
|
+
<CardContent>
|
|
208
|
+
<ResponsiveGrid columns={{ sm: 1, md: 3 }}>
|
|
209
|
+
<ErrorSurface
|
|
210
|
+
mode="application"
|
|
211
|
+
status={503}
|
|
212
|
+
titleLevel={3}
|
|
213
|
+
title="サービスを一時的にご利用いただけません"
|
|
214
|
+
description="計画メンテナンスを実施しています。しばらくしてから再度お試しください。"
|
|
215
|
+
action={<Button variant="outline">再読み込み</Button>}
|
|
216
|
+
/>
|
|
217
|
+
<ErrorSurface
|
|
218
|
+
mode="application"
|
|
219
|
+
status={503}
|
|
220
|
+
titleLevel={3}
|
|
221
|
+
title="Service temporarily unavailable"
|
|
222
|
+
description="We are performing scheduled maintenance right now. Please try again in a few minutes."
|
|
223
|
+
action={<Button variant="outline">Reload</Button>}
|
|
224
|
+
/>
|
|
225
|
+
<ErrorSurface
|
|
226
|
+
mode="application"
|
|
227
|
+
status={503}
|
|
228
|
+
titleLevel={3}
|
|
229
|
+
title="Dịch vụ tạm thời không khả dụng"
|
|
230
|
+
description="Chúng tôi đang bảo trì theo lịch. Vui lòng thử lại sau ít phút nữa."
|
|
231
|
+
action={<Button variant="outline">Tải lại</Button>}
|
|
232
|
+
/>
|
|
233
|
+
</ResponsiveGrid>
|
|
234
|
+
</CardContent>
|
|
235
|
+
</Card>
|
|
236
|
+
</Flex>
|
|
237
|
+
</PageContainer>
|
|
238
|
+
);
|
|
239
|
+
}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Badge,
|
|
3
|
+
Card,
|
|
4
|
+
CardContent,
|
|
5
|
+
CardDescription,
|
|
6
|
+
CardHeader,
|
|
7
|
+
CardTitle,
|
|
8
|
+
} from "@godxjp/ui/data-display";
|
|
9
|
+
import { Button, Text } from "@godxjp/ui/general";
|
|
10
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Flex · canonical flex primitive (replaced Stack/Inline as named shortcuts).
|
|
14
|
+
* The default direction is "row" — matching the CSS `display:flex` initial value.
|
|
15
|
+
* Use direction="col" for vertical stacks (formerly Stack); direction="row" is the
|
|
16
|
+
* default for horizontal groups (formerly Inline). Keep spacing in gap prop · same
|
|
17
|
+
* token scale as Stack/Inline. align + justify expose cross-axis and main-axis control.
|
|
18
|
+
* wrap allows chip clusters and action rows to reflow. Composed only from real
|
|
19
|
+
* @godxjp/ui components.
|
|
20
|
+
*/
|
|
21
|
+
export default function Demo() {
|
|
22
|
+
return (
|
|
23
|
+
<PageContainer
|
|
24
|
+
title="Flex"
|
|
25
|
+
subtitle="方向・整列・間隔・折り返し · Stack/Inline を置き換えた汎用フレックスプリミティブ"
|
|
26
|
+
>
|
|
27
|
+
<Flex direction="col" gap="lg">
|
|
28
|
+
<Card>
|
|
29
|
+
<CardHeader>
|
|
30
|
+
<CardTitle level={2}>既定 direction="row" · CSS 標準</CardTitle>
|
|
31
|
+
<CardDescription>
|
|
32
|
+
direction を省略すると row(CSS の display:flex の初期値)。横並びが既定で、
|
|
33
|
+
縦積みには direction="col" を明示する。
|
|
34
|
+
</CardDescription>
|
|
35
|
+
</CardHeader>
|
|
36
|
+
<CardContent>
|
|
37
|
+
<Flex gap="sm" align="center">
|
|
38
|
+
<Badge variant="outline">借方</Badge>
|
|
39
|
+
<Badge variant="outline">貸方</Badge>
|
|
40
|
+
<Badge variant="outline">残高</Badge>
|
|
41
|
+
</Flex>
|
|
42
|
+
</CardContent>
|
|
43
|
+
</Card>
|
|
44
|
+
|
|
45
|
+
<Card>
|
|
46
|
+
<CardHeader>
|
|
47
|
+
<CardTitle level={2}>direction="col" · 縦スタック</CardTitle>
|
|
48
|
+
<CardDescription>
|
|
49
|
+
縦積みは direction="col" を明示する。gap
|
|
50
|
+
トークンで間隔を均一に制御。className で raw gap-* を使わない。
|
|
51
|
+
</CardDescription>
|
|
52
|
+
</CardHeader>
|
|
53
|
+
<CardContent>
|
|
54
|
+
<Flex direction="col" gap="sm">
|
|
55
|
+
<Card>
|
|
56
|
+
<CardContent>
|
|
57
|
+
<Text tone="muted">行 1 · 仕訳入力</Text>
|
|
58
|
+
</CardContent>
|
|
59
|
+
</Card>
|
|
60
|
+
<Card>
|
|
61
|
+
<CardContent>
|
|
62
|
+
<Text tone="muted">行 2 · 補助元帳</Text>
|
|
63
|
+
</CardContent>
|
|
64
|
+
</Card>
|
|
65
|
+
<Card>
|
|
66
|
+
<CardContent>
|
|
67
|
+
<Text tone="muted">行 3 · 試算表</Text>
|
|
68
|
+
</CardContent>
|
|
69
|
+
</Card>
|
|
70
|
+
</Flex>
|
|
71
|
+
</CardContent>
|
|
72
|
+
</Card>
|
|
73
|
+
|
|
74
|
+
<Card>
|
|
75
|
+
<CardHeader>
|
|
76
|
+
<CardTitle level={2}>
|
|
77
|
+
direction="row" + justify="between" · ツールバー
|
|
78
|
+
</CardTitle>
|
|
79
|
+
<CardDescription>
|
|
80
|
+
カードヘッダー内でタイトルとアクションを左右に配置する典型パターン。
|
|
81
|
+
</CardDescription>
|
|
82
|
+
</CardHeader>
|
|
83
|
+
<CardContent>
|
|
84
|
+
<Flex direction="row" gap="sm" align="center" justify="between">
|
|
85
|
+
<Text weight="medium">請求書一覧</Text>
|
|
86
|
+
<Flex direction="row" gap="xs" align="center">
|
|
87
|
+
<Button variant="outline" size="sm">
|
|
88
|
+
エクスポート
|
|
89
|
+
</Button>
|
|
90
|
+
<Button size="sm">新規作成</Button>
|
|
91
|
+
</Flex>
|
|
92
|
+
</Flex>
|
|
93
|
+
</CardContent>
|
|
94
|
+
</Card>
|
|
95
|
+
|
|
96
|
+
<Card>
|
|
97
|
+
<CardHeader>
|
|
98
|
+
<CardTitle level={2}>
|
|
99
|
+
align="center" + justify="center" · センタリング
|
|
100
|
+
</CardTitle>
|
|
101
|
+
<CardDescription>
|
|
102
|
+
空状態やローディングブロックを両軸で中央揃えにする用途。
|
|
103
|
+
</CardDescription>
|
|
104
|
+
</CardHeader>
|
|
105
|
+
<CardContent>
|
|
106
|
+
<Flex direction="col" align="center" justify="center" gap="sm" className="min-h-32">
|
|
107
|
+
<Text tone="muted">データがありません</Text>
|
|
108
|
+
<Button variant="outline" size="sm">
|
|
109
|
+
インポート
|
|
110
|
+
</Button>
|
|
111
|
+
</Flex>
|
|
112
|
+
</CardContent>
|
|
113
|
+
</Card>
|
|
114
|
+
|
|
115
|
+
<Card>
|
|
116
|
+
<CardHeader>
|
|
117
|
+
<CardTitle level={2}>align · 交差軸の整列(全 5 値)</CardTitle>
|
|
118
|
+
<CardDescription>
|
|
119
|
+
direction="row" の交差軸(縦方向)の揃え方。高さの異なる子要素で
|
|
120
|
+
start・center・end・baseline・stretch の違いを比較。baseline はテキストの
|
|
121
|
+
ベースライン、stretch は子要素を行の高さまで引き伸ばす。
|
|
122
|
+
</CardDescription>
|
|
123
|
+
</CardHeader>
|
|
124
|
+
<CardContent>
|
|
125
|
+
<Flex direction="col" gap="md">
|
|
126
|
+
{(["start", "center", "end", "stretch", "baseline"] as const).map((a) => (
|
|
127
|
+
<Flex
|
|
128
|
+
key={a}
|
|
129
|
+
direction="row"
|
|
130
|
+
gap="sm"
|
|
131
|
+
align={a}
|
|
132
|
+
className="bg-muted min-h-20 rounded-md p-2"
|
|
133
|
+
>
|
|
134
|
+
<Text size="xs" tone="muted" className="w-16">
|
|
135
|
+
{a}
|
|
136
|
+
</Text>
|
|
137
|
+
<Badge variant="outline">短</Badge>
|
|
138
|
+
<Text>標準テキスト</Text>
|
|
139
|
+
<Text size="2xl" weight="bold">
|
|
140
|
+
大
|
|
141
|
+
</Text>
|
|
142
|
+
</Flex>
|
|
143
|
+
))}
|
|
144
|
+
</Flex>
|
|
145
|
+
</CardContent>
|
|
146
|
+
</Card>
|
|
147
|
+
|
|
148
|
+
<Card>
|
|
149
|
+
<CardHeader>
|
|
150
|
+
<CardTitle level={2}>justify · 主軸の配置(全 6 値)</CardTitle>
|
|
151
|
+
<CardDescription>
|
|
152
|
+
direction="row" の主軸(横方向)の配置。固定幅トラックで余白の
|
|
153
|
+
分配を比較。between は端寄せ、around は各要素の周囲、evenly は要素間と端を
|
|
154
|
+
すべて均等にする。
|
|
155
|
+
</CardDescription>
|
|
156
|
+
</CardHeader>
|
|
157
|
+
<CardContent>
|
|
158
|
+
<Flex direction="col" gap="md">
|
|
159
|
+
{(["start", "center", "end", "between", "around", "evenly"] as const).map((j) => (
|
|
160
|
+
<Flex key={j} direction="row" gap="sm" align="center">
|
|
161
|
+
<Text size="xs" tone="muted" className="w-16">
|
|
162
|
+
{j}
|
|
163
|
+
</Text>
|
|
164
|
+
<Flex
|
|
165
|
+
direction="row"
|
|
166
|
+
gap="xs"
|
|
167
|
+
align="center"
|
|
168
|
+
justify={j}
|
|
169
|
+
className="bg-muted flex-1 rounded-md p-2"
|
|
170
|
+
>
|
|
171
|
+
<Badge variant="outline">借方</Badge>
|
|
172
|
+
<Badge variant="outline">貸方</Badge>
|
|
173
|
+
<Badge variant="outline">残高</Badge>
|
|
174
|
+
</Flex>
|
|
175
|
+
</Flex>
|
|
176
|
+
))}
|
|
177
|
+
</Flex>
|
|
178
|
+
</CardContent>
|
|
179
|
+
</Card>
|
|
180
|
+
|
|
181
|
+
<Card>
|
|
182
|
+
<CardHeader>
|
|
183
|
+
<CardTitle level={2}>wrap · 折り返しの有無を比較</CardTitle>
|
|
184
|
+
<CardDescription>
|
|
185
|
+
wrap={true}(既定の false に対して)。狭いトラックで折り返しの有無を
|
|
186
|
+
並べて比較。false では子要素が一行に圧縮され、true では次行へ流れる。
|
|
187
|
+
</CardDescription>
|
|
188
|
+
</CardHeader>
|
|
189
|
+
<CardContent>
|
|
190
|
+
<Flex direction="row" gap="md" align="start" wrap>
|
|
191
|
+
<Flex direction="col" gap="xs" className="w-44">
|
|
192
|
+
<Text size="xs" tone="muted">
|
|
193
|
+
wrap={false}(既定)
|
|
194
|
+
</Text>
|
|
195
|
+
<Flex direction="row" gap="xs" wrap={false} className="bg-muted rounded-md p-2">
|
|
196
|
+
<Badge variant="outline">勘定科目</Badge>
|
|
197
|
+
<Badge variant="outline">補助科目</Badge>
|
|
198
|
+
<Badge variant="outline">部門</Badge>
|
|
199
|
+
</Flex>
|
|
200
|
+
</Flex>
|
|
201
|
+
<Flex direction="col" gap="xs" className="w-44">
|
|
202
|
+
<Text size="xs" tone="muted">
|
|
203
|
+
wrap={true}
|
|
204
|
+
</Text>
|
|
205
|
+
<Flex direction="row" gap="xs" wrap className="bg-muted rounded-md p-2">
|
|
206
|
+
<Badge variant="outline">勘定科目</Badge>
|
|
207
|
+
<Badge variant="outline">補助科目</Badge>
|
|
208
|
+
<Badge variant="outline">部門</Badge>
|
|
209
|
+
</Flex>
|
|
210
|
+
</Flex>
|
|
211
|
+
</Flex>
|
|
212
|
+
</CardContent>
|
|
213
|
+
</Card>
|
|
214
|
+
|
|
215
|
+
<Card>
|
|
216
|
+
<CardHeader>
|
|
217
|
+
<CardTitle level={2}>wrap · バッジ・チップクラスター</CardTitle>
|
|
218
|
+
<CardDescription>
|
|
219
|
+
direction="row" + wrap={true} でタグ・ステータスバッジが折り返す。
|
|
220
|
+
gap トークンで均一スペーシング。
|
|
221
|
+
</CardDescription>
|
|
222
|
+
</CardHeader>
|
|
223
|
+
<CardContent>
|
|
224
|
+
<Flex direction="row" wrap gap="xs" align="center">
|
|
225
|
+
<Badge tone="success">承認済</Badge>
|
|
226
|
+
<Badge tone="warning">保留中</Badge>
|
|
227
|
+
<Badge tone="info">確認待ち</Badge>
|
|
228
|
+
<Badge tone="destructive">却下</Badge>
|
|
229
|
+
<Badge variant="secondary">下書き</Badge>
|
|
230
|
+
<Badge variant="outline">アーカイブ</Badge>
|
|
231
|
+
<Badge>既定</Badge>
|
|
232
|
+
<Badge tone="neutral">中立</Badge>
|
|
233
|
+
</Flex>
|
|
234
|
+
</CardContent>
|
|
235
|
+
</Card>
|
|
236
|
+
|
|
237
|
+
<Card>
|
|
238
|
+
<CardHeader>
|
|
239
|
+
<CardTitle level={2}>gap トークンスケール</CardTitle>
|
|
240
|
+
<CardDescription>
|
|
241
|
+
xs · sm · md(既定)· lg · xl。raw gap-* / space-* ユーティリティは使わない。
|
|
242
|
+
</CardDescription>
|
|
243
|
+
</CardHeader>
|
|
244
|
+
<CardContent>
|
|
245
|
+
<Flex direction="col" gap="md">
|
|
246
|
+
{(["xs", "sm", "md", "lg", "xl"] as const).map((g) => (
|
|
247
|
+
<Flex key={g} direction="row" gap={g} align="center">
|
|
248
|
+
<Text size="xs" tone="muted" className="w-6">
|
|
249
|
+
{g}
|
|
250
|
+
</Text>
|
|
251
|
+
<Badge variant="outline">勘定科目</Badge>
|
|
252
|
+
<Badge variant="outline">補助科目</Badge>
|
|
253
|
+
<Badge variant="outline">部門</Badge>
|
|
254
|
+
</Flex>
|
|
255
|
+
))}
|
|
256
|
+
</Flex>
|
|
257
|
+
</CardContent>
|
|
258
|
+
</Card>
|
|
259
|
+
</Flex>
|
|
260
|
+
</PageContainer>
|
|
261
|
+
);
|
|
262
|
+
}
|