@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,139 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
4
|
+
import { FormField, Input, PasswordInput, RadioGroup } from "@godxjp/ui/data-entry";
|
|
5
|
+
import { Button, Logo, Text } from "@godxjp/ui/general";
|
|
6
|
+
import {
|
|
7
|
+
AuthDivider,
|
|
8
|
+
AuthFooter,
|
|
9
|
+
AuthIdentity,
|
|
10
|
+
AuthShell,
|
|
11
|
+
AuthStack,
|
|
12
|
+
Flex,
|
|
13
|
+
} from "@godxjp/ui/layout";
|
|
14
|
+
import type { AuthShellProps } from "@godxjp/ui/layout";
|
|
15
|
+
import { AppSettingPicker } from "@godxjp/ui/navigation";
|
|
16
|
+
|
|
17
|
+
type AuthShellVariant = NonNullable<AuthShellProps["variant"]>;
|
|
18
|
+
type AuthShellDensity = NonNullable<AuthShellProps["density"]>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* AuthShell の 2 つの直交軸: `variant`(シェルの寸法)と `density`(操作要素の段)。
|
|
22
|
+
*
|
|
23
|
+
* `variant="default"` は素の中央寄せシェル、`variant="canonical"` は GoDX ID の正準寸法。
|
|
24
|
+
* `density` は独立した別軸で、既定は variant から導出されます(canonical なら compact、
|
|
25
|
+
* default なら comfortable = 44px の WCAG タッチ下限)。明示的に渡せばその導出を上書きでき、
|
|
26
|
+
* 4 通りの組み合わせがすべて成立します。
|
|
27
|
+
*
|
|
28
|
+
* このページは AuthShell を 1 つだけ描画します。AuthShell は banner / main / contentinfo の
|
|
29
|
+
* ランドマークをページ全体に張るため、比較のために 2 つ並べるとランドマークが重複し、
|
|
30
|
+
* それ自体がアクセシビリティ違反になります。そこで軸はページ内のラジオで切り替えます。
|
|
31
|
+
* 初期表示は `variant="default"` × `density="comfortable"`(=素の AuthShell そのもの)。
|
|
32
|
+
*
|
|
33
|
+
* SCR-001 の正準ログイン(preset="login")は Auth Shell ページ、preset の各フローは
|
|
34
|
+
* Auth Shell Device / Auth Shell Context / Auth Recovery ページが受け持ちます。
|
|
35
|
+
* ここに幅・余白・色の指定は 1 つもありません。すべてトークンが所有しています。
|
|
36
|
+
*/
|
|
37
|
+
export default function Demo() {
|
|
38
|
+
const [variant, setVariant] = useState<AuthShellVariant>("default");
|
|
39
|
+
const [density, setDensity] = useState<AuthShellDensity>("comfortable");
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<AuthShell
|
|
43
|
+
variant={variant}
|
|
44
|
+
density={density}
|
|
45
|
+
brand={
|
|
46
|
+
<Flex align="center" gap="sm">
|
|
47
|
+
<Logo mark="godx" tone="success" />
|
|
48
|
+
<Text weight="medium">GoDX ID</Text>
|
|
49
|
+
</Flex>
|
|
50
|
+
}
|
|
51
|
+
footer={
|
|
52
|
+
<AuthFooter
|
|
53
|
+
product="GoDX ID"
|
|
54
|
+
terms="利用規約"
|
|
55
|
+
privacy="プライバシー"
|
|
56
|
+
locale={<AppSettingPicker kind="locale" appearance="labeled" compact />}
|
|
57
|
+
/>
|
|
58
|
+
}
|
|
59
|
+
>
|
|
60
|
+
<AuthIdentity title="GoDX ID" requester="経費精算がサインインを要求しています" />
|
|
61
|
+
|
|
62
|
+
{/* preset を持たないシェルの列は子要素の間隔を持たないため、2 枚のカードの間隔は
|
|
63
|
+
ページ側の Flex gap が所有します。幅は依然としてシェルのトークンが所有します。 */}
|
|
64
|
+
<Flex direction="col" gap="md">
|
|
65
|
+
<Card>
|
|
66
|
+
<CardHeader>
|
|
67
|
+
<CardTitle level={1}>サインイン</CardTitle>
|
|
68
|
+
<CardDescription>組織アカウントの資格情報を入力してください。</CardDescription>
|
|
69
|
+
</CardHeader>
|
|
70
|
+
<CardContent>
|
|
71
|
+
<AuthStack>
|
|
72
|
+
<FormField id="auth-axis-email" label="メールアドレス" layout="vertical" required>
|
|
73
|
+
<Input id="auth-axis-email" type="email" placeholder="you@example.co.jp" />
|
|
74
|
+
</FormField>
|
|
75
|
+
<FormField id="auth-axis-password" label="パスワード" layout="vertical" required>
|
|
76
|
+
<PasswordInput id="auth-axis-password" />
|
|
77
|
+
</FormField>
|
|
78
|
+
<Button fullWidth>サインイン</Button>
|
|
79
|
+
<AuthDivider label="または" />
|
|
80
|
+
<Button variant="outline" fullWidth>
|
|
81
|
+
パスキーでサインイン
|
|
82
|
+
</Button>
|
|
83
|
+
</AuthStack>
|
|
84
|
+
</CardContent>
|
|
85
|
+
</Card>
|
|
86
|
+
|
|
87
|
+
{/* 軸の切り替え。上のカードの操作要素の高さとカード内の余白がその場で変わるので、
|
|
88
|
+
density がシェル全体に閉じた段であることが読み取れます。 */}
|
|
89
|
+
<Card>
|
|
90
|
+
<CardHeader>
|
|
91
|
+
<CardTitle level={2}>このページの表示軸</CardTitle>
|
|
92
|
+
<CardDescription>
|
|
93
|
+
2 つの prop は独立しています。片方を変えてももう片方は変わりません。
|
|
94
|
+
</CardDescription>
|
|
95
|
+
</CardHeader>
|
|
96
|
+
<CardContent>
|
|
97
|
+
<Flex direction="col" gap="md">
|
|
98
|
+
<FormField
|
|
99
|
+
id="auth-axis-variant"
|
|
100
|
+
label="variant · シェルの寸法"
|
|
101
|
+
layout="vertical"
|
|
102
|
+
helper="canonical は GoDX ID の正準寸法、default は素の中央寄せシェル。"
|
|
103
|
+
>
|
|
104
|
+
<RadioGroup
|
|
105
|
+
orientation="horizontal"
|
|
106
|
+
value={variant}
|
|
107
|
+
onValueChange={(next) => setVariant(next as AuthShellVariant)}
|
|
108
|
+
options={[
|
|
109
|
+
{ value: "default", label: "default(既定)" },
|
|
110
|
+
{ value: "canonical", label: "canonical(正準)" },
|
|
111
|
+
]}
|
|
112
|
+
/>
|
|
113
|
+
</FormField>
|
|
114
|
+
<FormField
|
|
115
|
+
id="auth-axis-density"
|
|
116
|
+
label="density · 操作要素の段"
|
|
117
|
+
layout="vertical"
|
|
118
|
+
helper="comfortable は 44px のタッチ下限、compact は情報密度を優先した段。"
|
|
119
|
+
>
|
|
120
|
+
<RadioGroup
|
|
121
|
+
orientation="horizontal"
|
|
122
|
+
value={density}
|
|
123
|
+
onValueChange={(next) => setDensity(next as AuthShellDensity)}
|
|
124
|
+
options={[
|
|
125
|
+
{ value: "comfortable", label: "comfortable(44px)" },
|
|
126
|
+
{ value: "compact", label: "compact" },
|
|
127
|
+
]}
|
|
128
|
+
/>
|
|
129
|
+
</FormField>
|
|
130
|
+
<Text size="sm" tone="muted">
|
|
131
|
+
現在の組み合わせ: variant="{variant}" · density="{density}"
|
|
132
|
+
</Text>
|
|
133
|
+
</Flex>
|
|
134
|
+
</CardContent>
|
|
135
|
+
</Card>
|
|
136
|
+
</Flex>
|
|
137
|
+
</AuthShell>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Card, CardContent } from "@godxjp/ui/data-display";
|
|
2
|
+
import { FormField, Input } from "@godxjp/ui/data-entry";
|
|
3
|
+
import { Button, Text } from "@godxjp/ui/general";
|
|
4
|
+
import {
|
|
5
|
+
AuthDivider,
|
|
6
|
+
AuthFooter,
|
|
7
|
+
AuthIdentity,
|
|
8
|
+
AuthShell,
|
|
9
|
+
AuthStack,
|
|
10
|
+
Flex,
|
|
11
|
+
} from "@godxjp/ui/layout";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* SCR-001 Login visual contract. `?state=standalone|one-line|wrapped` drives the package visual
|
|
15
|
+
* test; all three keep the same card anchor without consumer CSS or fake requester data.
|
|
16
|
+
*
|
|
17
|
+
* The composition mirrors the documented consumer page exactly (gh#263): NO top brand bar (the
|
|
18
|
+
* canonical SCR-001 artboard has none — the in-flow AuthIdentity mark IS the brand), a header-less
|
|
19
|
+
* `<CardContent solo>` body, `AuthFooter` as the third direct child (the login preset's third grid
|
|
20
|
+
* row), and a plain 12px text-link row like the artboard's.
|
|
21
|
+
*/
|
|
22
|
+
export default function Demo() {
|
|
23
|
+
const state = new URLSearchParams(window.location.search).get("state") ?? "one-line";
|
|
24
|
+
const requester =
|
|
25
|
+
state === "standalone"
|
|
26
|
+
? undefined
|
|
27
|
+
: state === "wrapped"
|
|
28
|
+
? "Platform console browser BFF is requesting sign in to this organization"
|
|
29
|
+
: "Attendance is requesting sign in";
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<AuthShell variant="canonical" preset="login">
|
|
33
|
+
<AuthIdentity title="GoDX ID" requester={requester} />
|
|
34
|
+
<Card>
|
|
35
|
+
<CardContent solo>
|
|
36
|
+
<AuthStack>
|
|
37
|
+
<Button fullWidth>パスキーでサインイン</Button>
|
|
38
|
+
<AuthDivider label="または" />
|
|
39
|
+
<FormField id="auth-email" label="メールアドレス" layout="vertical">
|
|
40
|
+
<Input id="auth-email" type="email" placeholder="you@example.co.jp" />
|
|
41
|
+
</FormField>
|
|
42
|
+
<Button variant="outline" fullWidth>
|
|
43
|
+
次へ
|
|
44
|
+
</Button>
|
|
45
|
+
<Flex justify="between" wrap>
|
|
46
|
+
<Text size="xs">
|
|
47
|
+
<a href="#register">アカウント登録</a>
|
|
48
|
+
</Text>
|
|
49
|
+
<Text size="xs">
|
|
50
|
+
<a href="#forgot">パスワードを忘れた</a>
|
|
51
|
+
</Text>
|
|
52
|
+
</Flex>
|
|
53
|
+
</AuthStack>
|
|
54
|
+
</CardContent>
|
|
55
|
+
</Card>
|
|
56
|
+
<AuthFooter product="GoDX ID" terms="利用規約" privacy="プライバシー" />
|
|
57
|
+
</AuthShell>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
2
|
+
import { Field, Input } from "@godxjp/ui/data-entry";
|
|
3
|
+
import { Button } from "@godxjp/ui/general";
|
|
4
|
+
import { AuthDivider, AuthStack, PageContainer } from "@godxjp/ui/layout";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* AuthStack — canonical vertical rhythm for direct auth-card sections. The stack remains a neutral
|
|
8
|
+
* container, so labels, controls and actions retain their own semantic ownership.
|
|
9
|
+
*/
|
|
10
|
+
export default function Demo() {
|
|
11
|
+
return (
|
|
12
|
+
<PageContainer title="AuthStack" subtitle="認証カード内の12px垂直リズム">
|
|
13
|
+
<Card>
|
|
14
|
+
<CardHeader>
|
|
15
|
+
<CardTitle level={2}>メールまたはpasskey</CardTitle>
|
|
16
|
+
<CardDescription>
|
|
17
|
+
各sectionはpublic componentのままstackへ直接配置します。
|
|
18
|
+
</CardDescription>
|
|
19
|
+
</CardHeader>
|
|
20
|
+
<CardContent>
|
|
21
|
+
<AuthStack>
|
|
22
|
+
<Button fullWidth>Passkeyで続ける</Button>
|
|
23
|
+
<AuthDivider label="または" />
|
|
24
|
+
<Field id="auth-stack-email" label="メールアドレス">
|
|
25
|
+
<Input
|
|
26
|
+
id="auth-stack-email"
|
|
27
|
+
type="email"
|
|
28
|
+
autoComplete="username"
|
|
29
|
+
placeholder="you@example.com"
|
|
30
|
+
/>
|
|
31
|
+
</Field>
|
|
32
|
+
<Button variant="outline" fullWidth>
|
|
33
|
+
メールで続ける
|
|
34
|
+
</Button>
|
|
35
|
+
</AuthStack>
|
|
36
|
+
</CardContent>
|
|
37
|
+
</Card>
|
|
38
|
+
</PageContainer>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Avatar,
|
|
3
|
+
AvatarFallback,
|
|
4
|
+
Card,
|
|
5
|
+
CardContent,
|
|
6
|
+
CardDescription,
|
|
7
|
+
CardHeader,
|
|
8
|
+
CardTitle,
|
|
9
|
+
} from "@godxjp/ui/data-display";
|
|
10
|
+
import { Button, Logo, Text } from "@godxjp/ui/general";
|
|
11
|
+
import { CenteredShell, Flex, ResponsiveGrid, Topbar } from "@godxjp/ui/layout";
|
|
12
|
+
import { AppSettingPicker } from "@godxjp/ui/navigation";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* CenteredShell — authenticated, no-sidebar, centred-column page shell (hosted-ID "My Page",
|
|
16
|
+
* account / self-service, standalone settings). A padded topbar with real actions reusing AppShell's
|
|
17
|
+
* chrome WITHOUT a sidebar, a width-tiered centred column that is top-aligned + scrolls, and an
|
|
18
|
+
* optional footer. Composed only from real @godxjp/ui components — zero custom CSS, no hand-rolled
|
|
19
|
+
* bar. Fills the gap between AppShell (needs a sidebar) and AuthShell (unauthenticated narrow card).
|
|
20
|
+
*/
|
|
21
|
+
export default function Demo() {
|
|
22
|
+
const services = [
|
|
23
|
+
{ id: "attendance", name: "勤怠", desc: "打刻・勤務表" },
|
|
24
|
+
{ id: "messaging", name: "チャット", desc: "社内メッセージ" },
|
|
25
|
+
{ id: "ledger", name: "会計", desc: "請求・支払" },
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<CenteredShell
|
|
30
|
+
width="md"
|
|
31
|
+
topbar={
|
|
32
|
+
<Topbar
|
|
33
|
+
start={
|
|
34
|
+
<Flex align="center" gap="sm">
|
|
35
|
+
<Logo glyph="G" />
|
|
36
|
+
<Text weight="medium">GodX ID</Text>
|
|
37
|
+
</Flex>
|
|
38
|
+
}
|
|
39
|
+
end={
|
|
40
|
+
<Flex align="center" gap="sm">
|
|
41
|
+
<AppSettingPicker kind="locale" />
|
|
42
|
+
<Button variant="ghost" size="sm">
|
|
43
|
+
<Avatar className="size-6">
|
|
44
|
+
<AvatarFallback>田</AvatarFallback>
|
|
45
|
+
</Avatar>
|
|
46
|
+
田中 太郎
|
|
47
|
+
</Button>
|
|
48
|
+
</Flex>
|
|
49
|
+
}
|
|
50
|
+
/>
|
|
51
|
+
}
|
|
52
|
+
footer={
|
|
53
|
+
<Text size="xs" tone="muted">
|
|
54
|
+
2026 GodX · プライバシー · 利用規約
|
|
55
|
+
</Text>
|
|
56
|
+
}
|
|
57
|
+
>
|
|
58
|
+
<Flex direction="col" gap="lg">
|
|
59
|
+
<Card>
|
|
60
|
+
<CardHeader>
|
|
61
|
+
<CardTitle level={1}>マイページ</CardTitle>
|
|
62
|
+
<CardDescription>アカウントとサービスの概要。</CardDescription>
|
|
63
|
+
</CardHeader>
|
|
64
|
+
<CardContent>
|
|
65
|
+
<Flex direction="col" gap="xs">
|
|
66
|
+
<Text weight="medium">田中 太郎</Text>
|
|
67
|
+
<Text size="sm" tone="muted">
|
|
68
|
+
tanaka@example.com · 組織: GodX 株式会社
|
|
69
|
+
</Text>
|
|
70
|
+
</Flex>
|
|
71
|
+
</CardContent>
|
|
72
|
+
</Card>
|
|
73
|
+
|
|
74
|
+
<Card>
|
|
75
|
+
<CardHeader>
|
|
76
|
+
<CardTitle level={2}>サービス</CardTitle>
|
|
77
|
+
<CardDescription>利用中のアプリを開きます。</CardDescription>
|
|
78
|
+
</CardHeader>
|
|
79
|
+
<CardContent>
|
|
80
|
+
<ResponsiveGrid columns={{ sm: 1, md: 3 }}>
|
|
81
|
+
{services.map((s) => (
|
|
82
|
+
<Card key={s.id}>
|
|
83
|
+
<CardContent>
|
|
84
|
+
<Flex direction="col" gap="xs">
|
|
85
|
+
<Text weight="medium">{s.name}</Text>
|
|
86
|
+
<Text size="sm" tone="muted">
|
|
87
|
+
{s.desc}
|
|
88
|
+
</Text>
|
|
89
|
+
<Button variant="outline" size="sm">
|
|
90
|
+
開く
|
|
91
|
+
</Button>
|
|
92
|
+
</Flex>
|
|
93
|
+
</CardContent>
|
|
94
|
+
</Card>
|
|
95
|
+
))}
|
|
96
|
+
</ResponsiveGrid>
|
|
97
|
+
</CardContent>
|
|
98
|
+
</Card>
|
|
99
|
+
</Flex>
|
|
100
|
+
</CenteredShell>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Button, Logo } from "@godxjp/ui/general";
|
|
2
|
+
import {
|
|
3
|
+
AppShell,
|
|
4
|
+
ErrorSurface,
|
|
5
|
+
Flex,
|
|
6
|
+
PageContainer,
|
|
7
|
+
Sidebar,
|
|
8
|
+
type SidebarSectionProp,
|
|
9
|
+
Topbar,
|
|
10
|
+
} from "@godxjp/ui/layout";
|
|
11
|
+
import { AppSettingPicker } from "@godxjp/ui/navigation";
|
|
12
|
+
import { BarChart3, FileText, LayoutDashboard, Users } from "lucide-react";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 403 — `mode="application"`. The failure happened INSIDE the authenticated app, so the app shell is
|
|
16
|
+
* PRESERVED: the sidebar nav, the topbar and the breadcrumb all survive, and only the page body is
|
|
17
|
+
* replaced. The user is never stranded on a chrome-less page with a single "go home" button.
|
|
18
|
+
*
|
|
19
|
+
* READ THE MODE CONTRACT: `mode="application"` does NOT make the component build a shell. It cannot
|
|
20
|
+
* — the nav sections, the product identity and the user menu are consumer-owned data. The mode says
|
|
21
|
+
* "this is what you put in AppShell's children": the surface returns just its own block, and the
|
|
22
|
+
* `AppShell` the route already renders stays mounted around it.
|
|
23
|
+
*
|
|
24
|
+
* 403 is the one status where WHY matters as much as WHAT, so both permission slots are used here:
|
|
25
|
+
* `permission` names the missing role and `organization` names the workspace the request was scoped
|
|
26
|
+
* to — that pair is what distinguishes "you need a role" from "you are in the wrong tenant". Both
|
|
27
|
+
* are semantic `<dt>/<dd>` rows whose LABELS are library-owned and localized; you pass bare values.
|
|
28
|
+
*
|
|
29
|
+
* Copy is shown inline here; in an app every string comes from the app's own `t()`.
|
|
30
|
+
*/
|
|
31
|
+
const sections: SidebarSectionProp[] = [
|
|
32
|
+
{
|
|
33
|
+
label: "業務",
|
|
34
|
+
items: [
|
|
35
|
+
{ id: "dashboard", label: "ダッシュボード", icon: LayoutDashboard },
|
|
36
|
+
{ id: "reports", label: "レポート", icon: BarChart3 },
|
|
37
|
+
{ id: "documents", label: "ドキュメント", icon: FileText },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{ label: "管理", items: [{ id: "users", label: "ユーザー", icon: Users }] },
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
export default function Demo() {
|
|
44
|
+
return (
|
|
45
|
+
<AppShell
|
|
46
|
+
sidebar={
|
|
47
|
+
<Sidebar
|
|
48
|
+
activeId="reports"
|
|
49
|
+
sections={sections}
|
|
50
|
+
onSelect={() => {}}
|
|
51
|
+
product={{ name: "GodX Console", role: "管理コンソール" }}
|
|
52
|
+
/>
|
|
53
|
+
}
|
|
54
|
+
topbar={
|
|
55
|
+
<Topbar
|
|
56
|
+
start={<Logo glyph="G" />}
|
|
57
|
+
end={
|
|
58
|
+
<Flex align="center" gap="sm">
|
|
59
|
+
<AppSettingPicker kind="locale" />
|
|
60
|
+
<Button variant="ghost" size="sm">
|
|
61
|
+
田中 太郎
|
|
62
|
+
</Button>
|
|
63
|
+
</Flex>
|
|
64
|
+
}
|
|
65
|
+
/>
|
|
66
|
+
}
|
|
67
|
+
>
|
|
68
|
+
<PageContainer
|
|
69
|
+
title="レポート"
|
|
70
|
+
breadcrumb={[{ label: "ホーム", to: "#" }, { label: "レポート" }]}
|
|
71
|
+
>
|
|
72
|
+
<ErrorSurface
|
|
73
|
+
mode="application"
|
|
74
|
+
status={403}
|
|
75
|
+
title="このページへのアクセス権限がありません"
|
|
76
|
+
description="レポートの閲覧には管理者によるロール付与が必要です。付与後に再度お試しください。"
|
|
77
|
+
permission="reports.view"
|
|
78
|
+
organization="株式会社ゴッドエックス"
|
|
79
|
+
action={<Button>ダッシュボードへ戻る</Button>}
|
|
80
|
+
/>
|
|
81
|
+
</PageContainer>
|
|
82
|
+
</AppShell>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Button, Logo } from "@godxjp/ui/general";
|
|
2
|
+
import {
|
|
3
|
+
AppShell,
|
|
4
|
+
ErrorSurface,
|
|
5
|
+
Flex,
|
|
6
|
+
PageContainer,
|
|
7
|
+
Sidebar,
|
|
8
|
+
type SidebarSectionProp,
|
|
9
|
+
Topbar,
|
|
10
|
+
} from "@godxjp/ui/layout";
|
|
11
|
+
import { AppSettingPicker } from "@godxjp/ui/navigation";
|
|
12
|
+
import { BarChart3, FileText, LayoutDashboard, Users } from "lucide-react";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 404 — `mode="application"` with the optional request ID. Same preserved shell, same surface; only
|
|
16
|
+
* `status` changes, and with it the default icon (SearchX) and tone (muted — a miss is neutral, not
|
|
17
|
+
* a warning). You do not re-pick the icon or the colour per status: the status IS the input.
|
|
18
|
+
*
|
|
19
|
+
* `requestId` is a semantic metadata slot, not a paragraph you write. The surface renders it as a
|
|
20
|
+
* `<dt>/<dd>` pair with a localized "Request ID" label and a mono/tabular value, so the correlation
|
|
21
|
+
* id can be read out or copied accurately for support, and so a screen reader announces the
|
|
22
|
+
* label↔value relationship instead of a run-on sentence. Omit the prop when there is no id —
|
|
23
|
+
* metadata rows are optional and the list disappears entirely when every slot is empty.
|
|
24
|
+
*/
|
|
25
|
+
const sections: SidebarSectionProp[] = [
|
|
26
|
+
{
|
|
27
|
+
label: "業務",
|
|
28
|
+
items: [
|
|
29
|
+
{ id: "dashboard", label: "ダッシュボード", icon: LayoutDashboard },
|
|
30
|
+
{ id: "reports", label: "レポート", icon: BarChart3 },
|
|
31
|
+
{ id: "documents", label: "ドキュメント", icon: FileText },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{ label: "管理", items: [{ id: "users", label: "ユーザー", icon: Users }] },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
export default function Demo() {
|
|
38
|
+
return (
|
|
39
|
+
<AppShell
|
|
40
|
+
sidebar={
|
|
41
|
+
<Sidebar
|
|
42
|
+
activeId="documents"
|
|
43
|
+
sections={sections}
|
|
44
|
+
onSelect={() => {}}
|
|
45
|
+
product={{ name: "GodX Console", role: "管理コンソール" }}
|
|
46
|
+
/>
|
|
47
|
+
}
|
|
48
|
+
topbar={
|
|
49
|
+
<Topbar
|
|
50
|
+
start={<Logo glyph="G" />}
|
|
51
|
+
end={
|
|
52
|
+
<Flex align="center" gap="sm">
|
|
53
|
+
<AppSettingPicker kind="locale" />
|
|
54
|
+
<Button variant="ghost" size="sm">
|
|
55
|
+
田中 太郎
|
|
56
|
+
</Button>
|
|
57
|
+
</Flex>
|
|
58
|
+
}
|
|
59
|
+
/>
|
|
60
|
+
}
|
|
61
|
+
>
|
|
62
|
+
<PageContainer
|
|
63
|
+
title="ドキュメント"
|
|
64
|
+
breadcrumb={[{ label: "ホーム", to: "#" }, { label: "ドキュメント" }]}
|
|
65
|
+
>
|
|
66
|
+
<ErrorSurface
|
|
67
|
+
mode="application"
|
|
68
|
+
status={404}
|
|
69
|
+
title="ページが見つかりません"
|
|
70
|
+
description="お探しのドキュメントは移動または削除された可能性があります。一覧から選び直してください。"
|
|
71
|
+
requestId="01J9Z0M7Q2K5S7WQ3T5N8V2H4B"
|
|
72
|
+
action={<Button>ドキュメント一覧へ</Button>}
|
|
73
|
+
/>
|
|
74
|
+
</PageContainer>
|
|
75
|
+
</AppShell>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Button, Logo, Text } from "@godxjp/ui/general";
|
|
2
|
+
import { ErrorSurface } from "@godxjp/ui/layout";
|
|
3
|
+
import { RotateCcw } from "lucide-react";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 500 — `mode="system"`. The app itself is the thing that failed, so there is no authenticated shell
|
|
7
|
+
* to preserve (the session, the nav data and the user menu may all be unavailable). Here the surface
|
|
8
|
+
* DOES own the whole page: it renders `CenteredShell align="center"` itself, which flips
|
|
9
|
+
* `--centered-shell-column-offset-block` to `auto` so the column centres in the `100dvh` shell at
|
|
10
|
+
* 1440 / 1024 / 390 with NO consumer `min-h-dvh`, flex CSS, media query or `className`. Auto block
|
|
11
|
+
* offsets collapse when the content is taller than the viewport, so a long localized message
|
|
12
|
+
* scrolls from the top instead of being clipped.
|
|
13
|
+
*
|
|
14
|
+
* That is the whole difference between the two modes, and it is why `mode` is not cosmetic: in
|
|
15
|
+
* `application` mode the surface returns a body and inherits geometry, in `system` mode it IS the
|
|
16
|
+
* page and owns geometry.
|
|
17
|
+
*
|
|
18
|
+
* `width` defaults to the `sm` (~32rem) system-surface tier; the description's own measure is owned
|
|
19
|
+
* by `--empty-state-description-max-width`. `titleLevel` defaults to `1` in system mode, because a
|
|
20
|
+
* system page has no page `h1` above it — the error title IS the document's heading.
|
|
21
|
+
*
|
|
22
|
+
* `brand` and `footer` are system-mode-only slots (a `Logo` above the status code, the page
|
|
23
|
+
* contentinfo below). Drop both for a bare surface.
|
|
24
|
+
*/
|
|
25
|
+
export default function Demo() {
|
|
26
|
+
return (
|
|
27
|
+
<ErrorSurface
|
|
28
|
+
mode="system"
|
|
29
|
+
status={500}
|
|
30
|
+
brand={<Logo glyph="G" />}
|
|
31
|
+
title="問題が発生しました"
|
|
32
|
+
description="予期しないエラーが発生しました。担当チームに通知済みです。時間をおいて再度お試しください。"
|
|
33
|
+
requestId="01J9Z0M7Q2K5S7WQ3T5N8V2H4B"
|
|
34
|
+
footer={
|
|
35
|
+
<Text size="xs" tone="muted">
|
|
36
|
+
2026 GodX
|
|
37
|
+
</Text>
|
|
38
|
+
}
|
|
39
|
+
action={
|
|
40
|
+
<Button>
|
|
41
|
+
<RotateCcw />
|
|
42
|
+
再読み込み
|
|
43
|
+
</Button>
|
|
44
|
+
}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Button, Logo, Text } from "@godxjp/ui/general";
|
|
2
|
+
import { ErrorSurface } from "@godxjp/ui/layout";
|
|
3
|
+
import { RotateCcw } from "lucide-react";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 503 — `mode="system"` with the optional MAINTENANCE slot. Same viewport-centred geometry as 500;
|
|
7
|
+
* the tone defaults to `warning` rather than `destructive` because the outage is planned and finite.
|
|
8
|
+
*
|
|
9
|
+
* `maintenance` is TIMING DATA, not a string you format. Pass ISO-8601 instants plus an IANA zone
|
|
10
|
+
* and the surface runs `Intl.DateTimeFormat(locale, …).formatRange()` (CLDR) for the active locale,
|
|
11
|
+
* so ja / en / vi each read natively and the visible text is paired with a machine-readable
|
|
12
|
+
* `<time dateTime>`. A hand-built `"18:00 - 20:00 JST"` cannot localize and is the anti-pattern this
|
|
13
|
+
* slot exists to remove. Omit `end` for an open-ended outage — a single instant is shown.
|
|
14
|
+
*
|
|
15
|
+
* `progress` (0–100) adds a labelled `Progress` meter, announced as "メンテナンス進捗 40%" via
|
|
16
|
+
* `Intl.NumberFormat` percent style — never colour-only. It is deliberately SERVER-SENT: computing
|
|
17
|
+
* "how far through the window are we" from the client clock makes SSR and hydration disagree, and
|
|
18
|
+
* an exception page must be readable before hydration. Omit it for an outage with no published
|
|
19
|
+
* progress; omit `maintenance` entirely for an unplanned 503.
|
|
20
|
+
*/
|
|
21
|
+
export default function Demo() {
|
|
22
|
+
return (
|
|
23
|
+
<ErrorSurface
|
|
24
|
+
mode="system"
|
|
25
|
+
status={503}
|
|
26
|
+
brand={<Logo glyph="G" />}
|
|
27
|
+
title="サービスを一時的にご利用いただけません"
|
|
28
|
+
description="計画メンテナンスを実施しています。終了予定時刻を過ぎてから再度お試しください。"
|
|
29
|
+
maintenance={{
|
|
30
|
+
start: "2026-08-02T18:00:00Z",
|
|
31
|
+
end: "2026-08-02T20:00:00Z",
|
|
32
|
+
timeZone: "Asia/Tokyo",
|
|
33
|
+
progress: 40,
|
|
34
|
+
}}
|
|
35
|
+
footer={
|
|
36
|
+
<Text size="xs" tone="muted">
|
|
37
|
+
2026 GodX
|
|
38
|
+
</Text>
|
|
39
|
+
}
|
|
40
|
+
action={
|
|
41
|
+
<Button>
|
|
42
|
+
<RotateCcw />
|
|
43
|
+
再読み込み
|
|
44
|
+
</Button>
|
|
45
|
+
}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|