@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,122 @@
|
|
|
1
|
+
import { useMemo, useState } from "react";
|
|
2
|
+
import { Plus } from "lucide-react";
|
|
3
|
+
|
|
4
|
+
import { DataTable, type ColumnDef } from "@godxjp/ui/data-display";
|
|
5
|
+
import { SearchInput } from "@godxjp/ui/data-entry";
|
|
6
|
+
import { Button, Text } from "@godxjp/ui/general";
|
|
7
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
8
|
+
import { Toolbar, ToolbarGroup } from "@godxjp/ui/navigation";
|
|
9
|
+
|
|
10
|
+
type Locale = "ja" | "en" | "vi";
|
|
11
|
+
type Organization = { id: string; name: string; slug: string; members: number; status: string };
|
|
12
|
+
|
|
13
|
+
const copy = {
|
|
14
|
+
ja: {
|
|
15
|
+
title: "組織",
|
|
16
|
+
subtitle: "すべての組織を管理します",
|
|
17
|
+
search: "組織を検索",
|
|
18
|
+
create: "組織を作成",
|
|
19
|
+
},
|
|
20
|
+
en: {
|
|
21
|
+
title: "Organizations",
|
|
22
|
+
subtitle: "Manage every organization in this environment",
|
|
23
|
+
search: "Search organizations",
|
|
24
|
+
create: "Create organization",
|
|
25
|
+
},
|
|
26
|
+
vi: {
|
|
27
|
+
title: "Tổ chức",
|
|
28
|
+
subtitle: "Quản lý toàn bộ tổ chức trong môi trường này",
|
|
29
|
+
search: "Tìm kiếm tổ chức",
|
|
30
|
+
create: "Tạo tổ chức",
|
|
31
|
+
},
|
|
32
|
+
} as const;
|
|
33
|
+
|
|
34
|
+
const rows: Organization[] = [
|
|
35
|
+
{ id: "org_01", name: "GoDX Japan", slug: "godx-japan", members: 142, status: "Active" },
|
|
36
|
+
{
|
|
37
|
+
id: "org_02",
|
|
38
|
+
name: "Famsys Operations",
|
|
39
|
+
slug: "famsys-operations",
|
|
40
|
+
members: 86,
|
|
41
|
+
status: "Active",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "org_03",
|
|
45
|
+
name: "International Customer Experience Division",
|
|
46
|
+
slug: "customer-experience-international",
|
|
47
|
+
members: 39,
|
|
48
|
+
status: "Review",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "org_04",
|
|
52
|
+
name: "Nền tảng vận hành Việt Nam",
|
|
53
|
+
slug: "van-hanh-viet-nam",
|
|
54
|
+
members: 71,
|
|
55
|
+
status: "Active",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: "org_05",
|
|
59
|
+
name: "関西プロダクト開発統括部",
|
|
60
|
+
slug: "kansai-product-development",
|
|
61
|
+
members: 54,
|
|
62
|
+
status: "Active",
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
const columns: ColumnDef<Organization>[] = [
|
|
67
|
+
{ key: "name", header: "Organization", render: (row) => <Text weight="medium">{row.name}</Text> },
|
|
68
|
+
{ key: "slug", header: "Slug", render: (row) => <Text mono>{row.slug}</Text> },
|
|
69
|
+
{ key: "members", header: "Members", align: "right" },
|
|
70
|
+
{ key: "status", header: "Status" },
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
export default function AdminCollectionPreview() {
|
|
74
|
+
const [locale, setLocale] = useState<Locale>("ja");
|
|
75
|
+
const [query, setQuery] = useState("");
|
|
76
|
+
const labels = copy[locale];
|
|
77
|
+
const filtered = useMemo(
|
|
78
|
+
() =>
|
|
79
|
+
rows.filter((row) => `${row.name} ${row.slug}`.toLowerCase().includes(query.toLowerCase())),
|
|
80
|
+
[query],
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<PageContainer
|
|
85
|
+
preset="admin-collection"
|
|
86
|
+
title={labels.title}
|
|
87
|
+
subtitle={labels.subtitle}
|
|
88
|
+
extra={
|
|
89
|
+
<Button size="sm">
|
|
90
|
+
<Plus aria-hidden="true" />
|
|
91
|
+
{labels.create}
|
|
92
|
+
</Button>
|
|
93
|
+
}
|
|
94
|
+
>
|
|
95
|
+
<Toolbar aria-label="Admin collection controls">
|
|
96
|
+
<ToolbarGroup label={<span className="sr-only">{labels.search}</span>}>
|
|
97
|
+
<SearchInput
|
|
98
|
+
ariaLabel={labels.search}
|
|
99
|
+
placeholder={labels.search}
|
|
100
|
+
value={query}
|
|
101
|
+
onValueChange={setQuery}
|
|
102
|
+
/>
|
|
103
|
+
</ToolbarGroup>
|
|
104
|
+
<ToolbarGroup label={<span className="sr-only">Locale</span>}>
|
|
105
|
+
<Flex gap="xs" wrap>
|
|
106
|
+
{(["ja", "en", "vi"] as const).map((language) => (
|
|
107
|
+
<Button
|
|
108
|
+
key={language}
|
|
109
|
+
size="sm"
|
|
110
|
+
variant={locale === language ? "default" : "outline"}
|
|
111
|
+
onClick={() => setLocale(language)}
|
|
112
|
+
>
|
|
113
|
+
{language.toUpperCase()}
|
|
114
|
+
</Button>
|
|
115
|
+
))}
|
|
116
|
+
</Flex>
|
|
117
|
+
</ToolbarGroup>
|
|
118
|
+
</Toolbar>
|
|
119
|
+
<DataTable data={filtered} columns={columns} getRowId={(row) => row.id} />
|
|
120
|
+
</PageContainer>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import {
|
|
3
|
+
AppShell,
|
|
4
|
+
Breadcrumb,
|
|
5
|
+
Flex,
|
|
6
|
+
PageContainer,
|
|
7
|
+
ResponsiveGrid,
|
|
8
|
+
Sidebar,
|
|
9
|
+
SplitPane,
|
|
10
|
+
Topbar,
|
|
11
|
+
} from "@godxjp/ui/layout";
|
|
12
|
+
import type { SidebarSectionProp } from "@godxjp/ui/layout";
|
|
13
|
+
import {
|
|
14
|
+
Card,
|
|
15
|
+
CardContent,
|
|
16
|
+
CardDescription,
|
|
17
|
+
CardHeader,
|
|
18
|
+
CardTitle,
|
|
19
|
+
StatCard,
|
|
20
|
+
Badge,
|
|
21
|
+
Avatar,
|
|
22
|
+
AvatarFallback,
|
|
23
|
+
} from "@godxjp/ui/data-display";
|
|
24
|
+
import { Button, Text } from "@godxjp/ui/general";
|
|
25
|
+
import {
|
|
26
|
+
DropdownMenu,
|
|
27
|
+
DropdownMenuContent,
|
|
28
|
+
DropdownMenuItem,
|
|
29
|
+
DropdownMenuLabel,
|
|
30
|
+
DropdownMenuSeparator,
|
|
31
|
+
DropdownMenuTrigger,
|
|
32
|
+
} from "@godxjp/ui/navigation";
|
|
33
|
+
import {
|
|
34
|
+
LayoutDashboard,
|
|
35
|
+
FileText,
|
|
36
|
+
Receipt,
|
|
37
|
+
Users,
|
|
38
|
+
BookOpen,
|
|
39
|
+
Building2,
|
|
40
|
+
ShieldCheck,
|
|
41
|
+
Bell,
|
|
42
|
+
Plus,
|
|
43
|
+
ChevronDown,
|
|
44
|
+
PanelLeftClose,
|
|
45
|
+
PanelLeftOpen,
|
|
46
|
+
Search,
|
|
47
|
+
} from "lucide-react";
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* AppShell · canonical admin frame.
|
|
51
|
+
* Real composition: AppShell + Sidebar + Topbar + PageContainer body.
|
|
52
|
+
* Japanese accounting shell (CoreBooks) with entity switcher, collapse toggle,
|
|
53
|
+
* notifications badge, and a dashboard page body.
|
|
54
|
+
* Composed only from real @godxjp/ui components.
|
|
55
|
+
* Includes an executable switch between the composed topbar and legacy topbarLeft/topbarRight/logo.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
const SECTIONS: SidebarSectionProp[] = [
|
|
59
|
+
{
|
|
60
|
+
label: "会計",
|
|
61
|
+
items: [
|
|
62
|
+
{ id: "dashboard", label: "ダッシュボード", icon: LayoutDashboard },
|
|
63
|
+
{
|
|
64
|
+
id: "ledger",
|
|
65
|
+
label: "元帳",
|
|
66
|
+
icon: BookOpen,
|
|
67
|
+
children: [
|
|
68
|
+
{ id: "journal", label: "仕訳", icon: FileText },
|
|
69
|
+
{ id: "recurring", label: "定期仕訳", icon: Receipt },
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{ id: "invoices", label: "請求書", icon: Receipt },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: "管理",
|
|
77
|
+
items: [
|
|
78
|
+
{ id: "partners", label: "取引先", icon: Building2 },
|
|
79
|
+
{ id: "users", label: "ユーザー", icon: Users },
|
|
80
|
+
{ id: "roles", label: "権限", icon: ShieldCheck, disabled: true },
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
const ENTITIES = [
|
|
86
|
+
{ id: "acme", name: "株式会社アクメ" },
|
|
87
|
+
{ id: "globex", name: "グローバル商事株式会社" },
|
|
88
|
+
{ id: "initech", name: "イニテック有限会社" },
|
|
89
|
+
] as const;
|
|
90
|
+
|
|
91
|
+
export default function Demo() {
|
|
92
|
+
const [activeId, setActiveId] = useState("dashboard");
|
|
93
|
+
// Seeded collapsed at rest so the icon rail + collapsed reflow (data-collapsed)
|
|
94
|
+
// is visible in a static screenshot; the topbar toggle expands the full sidebar.
|
|
95
|
+
const [collapsed, setCollapsed] = useState(true);
|
|
96
|
+
const [activeEntity, setActiveEntity] = useState<(typeof ENTITIES)[number]["name"]>(
|
|
97
|
+
ENTITIES[0].name,
|
|
98
|
+
);
|
|
99
|
+
const [unread, setUnread] = useState(true);
|
|
100
|
+
const [legacyTopbar, setLegacyTopbar] = useState(false);
|
|
101
|
+
// Bar-less shell: topbar / topbarLeft / topbarRight / logo をすべて渡さない状態。
|
|
102
|
+
// チャット・メール・IDE のようにページ側が最上段を所有する画面のための構成。
|
|
103
|
+
const [barless, setBarless] = useState(false);
|
|
104
|
+
|
|
105
|
+
const sidebar = (
|
|
106
|
+
<Sidebar
|
|
107
|
+
activeId={activeId}
|
|
108
|
+
collapsed={collapsed}
|
|
109
|
+
onSelect={setActiveId}
|
|
110
|
+
sections={SECTIONS}
|
|
111
|
+
product={{ name: "CoreBooks", role: activeEntity }}
|
|
112
|
+
footer={
|
|
113
|
+
<Flex direction="col" gap="xs">
|
|
114
|
+
<Text as="div" weight="medium">
|
|
115
|
+
山田 太郎
|
|
116
|
+
</Text>
|
|
117
|
+
<Text as="div" size="xs" tone="muted">
|
|
118
|
+
システム管理者
|
|
119
|
+
</Text>
|
|
120
|
+
</Flex>
|
|
121
|
+
}
|
|
122
|
+
/>
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
const topbar = (
|
|
126
|
+
<Topbar
|
|
127
|
+
start={
|
|
128
|
+
<>
|
|
129
|
+
<Button
|
|
130
|
+
variant="ghost"
|
|
131
|
+
size="icon-sm"
|
|
132
|
+
aria-label={collapsed ? "サイドバーを展開" : "サイドバーを折りたたむ"}
|
|
133
|
+
aria-pressed={collapsed}
|
|
134
|
+
onClick={() => setCollapsed((c) => !c)}
|
|
135
|
+
>
|
|
136
|
+
{collapsed ? <PanelLeftOpen /> : <PanelLeftClose />}
|
|
137
|
+
</Button>
|
|
138
|
+
{/* Decorative brand mark — hidden below `sm` where the hamburger already anchors the
|
|
139
|
+
start of a narrow mobile topbar, so functional controls (entity switcher, search)
|
|
140
|
+
keep priority and the bar never overflows. */}
|
|
141
|
+
<Avatar className="rounded-md">
|
|
142
|
+
<AvatarFallback className="bg-primary text-primary-foreground font-bold">
|
|
143
|
+
C
|
|
144
|
+
</AvatarFallback>
|
|
145
|
+
</Avatar>
|
|
146
|
+
<DropdownMenu>
|
|
147
|
+
<DropdownMenuTrigger asChild>
|
|
148
|
+
{/* Entity switcher collapses to an icon-only control below `sm` so the topbar never
|
|
149
|
+
overflows a narrow (mobile) viewport; the long tenant name truncates from `sm` up.
|
|
150
|
+
`aria-label` keeps the accessible name at every width even when the label is hidden. */}
|
|
151
|
+
<Button variant="ghost" size="sm" aria-label={activeEntity} className="min-w-0">
|
|
152
|
+
<Building2 className="size-4 shrink-0 sm:hidden" aria-hidden="true" />
|
|
153
|
+
<span className="hidden min-w-0 truncate sm:inline">{activeEntity}</span>
|
|
154
|
+
<ChevronDown className="shrink-0" />
|
|
155
|
+
</Button>
|
|
156
|
+
</DropdownMenuTrigger>
|
|
157
|
+
<DropdownMenuContent align="start" className="w-56">
|
|
158
|
+
<DropdownMenuLabel>エンティティ切替</DropdownMenuLabel>
|
|
159
|
+
<DropdownMenuSeparator />
|
|
160
|
+
{ENTITIES.map((e) => (
|
|
161
|
+
<DropdownMenuItem key={e.id} onSelect={() => setActiveEntity(e.name)}>
|
|
162
|
+
<Building2 className="size-4" />
|
|
163
|
+
{e.name}
|
|
164
|
+
</DropdownMenuItem>
|
|
165
|
+
))}
|
|
166
|
+
</DropdownMenuContent>
|
|
167
|
+
</DropdownMenu>
|
|
168
|
+
</>
|
|
169
|
+
}
|
|
170
|
+
center={
|
|
171
|
+
// Search collapses to an icon-only trigger below `sm` (fits a narrow topbar) and expands to
|
|
172
|
+
// the full-width search affordance from `sm` up. `aria-label` preserves the accessible name
|
|
173
|
+
// when the visible label is hidden.
|
|
174
|
+
<Button
|
|
175
|
+
variant="outline"
|
|
176
|
+
size="sm"
|
|
177
|
+
aria-label="検索"
|
|
178
|
+
className="text-muted-foreground w-auto justify-start sm:w-full sm:max-w-sm"
|
|
179
|
+
>
|
|
180
|
+
<Search />
|
|
181
|
+
<span className="hidden sm:inline">検索…</span>
|
|
182
|
+
</Button>
|
|
183
|
+
}
|
|
184
|
+
end={
|
|
185
|
+
<Button
|
|
186
|
+
variant="ghost"
|
|
187
|
+
size="icon-sm"
|
|
188
|
+
aria-label="通知"
|
|
189
|
+
className="relative"
|
|
190
|
+
onClick={() => setUnread(false)}
|
|
191
|
+
>
|
|
192
|
+
<Bell />
|
|
193
|
+
{unread ? (
|
|
194
|
+
<span className="bg-destructive absolute end-1.5 top-1.5 size-1.5 rounded-full" />
|
|
195
|
+
) : null}
|
|
196
|
+
</Button>
|
|
197
|
+
}
|
|
198
|
+
/>
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
return (
|
|
202
|
+
<AppShell
|
|
203
|
+
sidebar={sidebar}
|
|
204
|
+
// barless では 4 スロットすべてが undefined = <header class="app-topbar"> は描画されず、
|
|
205
|
+
// .app-root に data-topbar="none" が付いてバーの行が 0 になる(900px 以下だけ、
|
|
206
|
+
// ハンバーガーのためにヘッダーが戻る)。
|
|
207
|
+
topbar={barless || legacyTopbar ? undefined : topbar}
|
|
208
|
+
logo={
|
|
209
|
+
!barless && legacyTopbar ? (
|
|
210
|
+
<Avatar>
|
|
211
|
+
<AvatarFallback>L</AvatarFallback>
|
|
212
|
+
</Avatar>
|
|
213
|
+
) : undefined
|
|
214
|
+
}
|
|
215
|
+
topbarLeft={
|
|
216
|
+
!barless && legacyTopbar ? (
|
|
217
|
+
<Button size="sm" variant="ghost" onClick={() => setLegacyTopbar(false)}>
|
|
218
|
+
Composed topbar を表示
|
|
219
|
+
</Button>
|
|
220
|
+
) : undefined
|
|
221
|
+
}
|
|
222
|
+
topbarRight={!barless && legacyTopbar ? <Text>Legacy slots active</Text> : undefined}
|
|
223
|
+
sidebarCollapsed={collapsed}
|
|
224
|
+
// Shell-level breadcrumb slot (app-breadcrumb landmark) · distinct from
|
|
225
|
+
// PageContainer's own breadcrumb; here the shell owns the trail.
|
|
226
|
+
breadcrumb={
|
|
227
|
+
<Breadcrumb items={[{ label: "ホーム", to: "/" }, { label: "ダッシュボード" }]} />
|
|
228
|
+
}
|
|
229
|
+
// Shell-level footer slot (app-footer landmark) · distinct from the
|
|
230
|
+
// Sidebar footer (the user identity block) shown on the left rail.
|
|
231
|
+
footer={
|
|
232
|
+
<Flex justify="between" align="center">
|
|
233
|
+
<Text size="xs" tone="muted">
|
|
234
|
+
2026 CoreBooks 会計システム
|
|
235
|
+
</Text>
|
|
236
|
+
<Text size="xs" tone="muted">
|
|
237
|
+
バージョン 7.2.0
|
|
238
|
+
</Text>
|
|
239
|
+
</Flex>
|
|
240
|
+
}
|
|
241
|
+
>
|
|
242
|
+
<PageContainer
|
|
243
|
+
title="売上ダッシュボード"
|
|
244
|
+
subtitle={`${activeEntity} · 2026年5月`}
|
|
245
|
+
extra={
|
|
246
|
+
<Flex gap="sm">
|
|
247
|
+
<Button size="sm" variant="outline" onClick={() => setUnread(true)}>
|
|
248
|
+
<Bell />
|
|
249
|
+
通知をリセット
|
|
250
|
+
</Button>
|
|
251
|
+
<Button
|
|
252
|
+
size="sm"
|
|
253
|
+
variant="outline"
|
|
254
|
+
onClick={() => {
|
|
255
|
+
setBarless(false);
|
|
256
|
+
setLegacyTopbar(true);
|
|
257
|
+
}}
|
|
258
|
+
>
|
|
259
|
+
レガシースロットを表示
|
|
260
|
+
</Button>
|
|
261
|
+
<Button
|
|
262
|
+
size="sm"
|
|
263
|
+
variant={barless ? "default" : "outline"}
|
|
264
|
+
aria-pressed={barless}
|
|
265
|
+
onClick={() => setBarless((b) => !b)}
|
|
266
|
+
>
|
|
267
|
+
{barless ? "トップバーを戻す" : "トップバーなし(チャット型)"}
|
|
268
|
+
</Button>
|
|
269
|
+
<Button size="sm">
|
|
270
|
+
<Plus />
|
|
271
|
+
仕訳作成
|
|
272
|
+
</Button>
|
|
273
|
+
</Flex>
|
|
274
|
+
}
|
|
275
|
+
>
|
|
276
|
+
<Flex direction="col" gap="lg">
|
|
277
|
+
<Card>
|
|
278
|
+
<CardHeader>
|
|
279
|
+
<CardTitle level={2}>Responsive frame coverage</CardTitle>
|
|
280
|
+
<CardDescription>
|
|
281
|
+
Frame の Dimensions で 320 / 375 / 390 / 768 / 1024 / 1280 / 1440 / 1920px
|
|
282
|
+
を切り替え、sidebar・topbar・page actions・grid・split pane
|
|
283
|
+
の変換を同じ実用構成で確認する。900px 以下ではドックされたサイドバーが隠れ、
|
|
284
|
+
AppShell 所有のモバイルドロワー(トップバー左のハンバーガー → フォーカストラップ付き
|
|
285
|
+
Sheet · Esc で閉じてトリガーへフォーカス復帰)が navigation を提供する(gh#165)。
|
|
286
|
+
このデモは mobileNav を渡していないため、同じ Sidebar がドロワーに再利用される。
|
|
287
|
+
</CardDescription>
|
|
288
|
+
<CardDescription>
|
|
289
|
+
「トップバーなし(チャット型)」を押すと topbar / topbarLeft / topbarRight / logo の
|
|
290
|
+
4 スロットをすべて外した状態になる。バーに置くものが無い画面 (チャット・メール・IDE
|
|
291
|
+
= ページ自身が最上段を所有する画面)で空のバーを残すと、 48px
|
|
292
|
+
の固定行+境界線の上にページヘッダーがもう一段重なるため、AppShell は
|
|
293
|
+
<code> <header> </code>を描画せず <code>data-topbar="none"</code>
|
|
294
|
+
でその行を 0 にする。 900px
|
|
295
|
+
以下でだけヘッダーはハンバーガー専用として戻る(ドックされたレールが 隠れる幅で
|
|
296
|
+
navigation を失わせないため)。空の <code>{"topbar={<></>}"}</code>
|
|
297
|
+
で代用しないこと ― それは 4 スロットが埋まった状態と同じで、バーの行は残る。
|
|
298
|
+
</CardDescription>
|
|
299
|
+
<CardDescription>
|
|
300
|
+
横方向のページ余白軸の持ち主は <code>--space-page-x</code> ひとつ(gh#330)。
|
|
301
|
+
トップバーは <code>.app-main</code> と同じグリッド列に載っている ―
|
|
302
|
+
つまりバー先頭のコントロールとページタイトルは同じ縦線に並ぶべきもので、
|
|
303
|
+
<code>--app-shell-bar-inset</code> はその持ち主を読む (
|
|
304
|
+
<code>--app-shell-bar-inset-compact</code> も同様に
|
|
305
|
+
<code>--space-page-compact-x</code>)。以前は両者が別々の値 (16px と
|
|
306
|
+
24px)を名乗り、しかも段が変わる幅まで違った(shell 900px · page
|
|
307
|
+
720px)ため、ズレは画面幅で変わった ― 1512px で 8px、720〜900px で 12px、 720px
|
|
308
|
+
未満で 4px。幅で変わる誤差はテーマ側で補正しようがない。 いまは狭幅の段も{" "}
|
|
309
|
+
<code>(max-width: 720px)</code> でページと同時に動く。 Frame の Dimensions
|
|
310
|
+
を切り替えて、バーとページ本文の左端が どの幅でも一致することを確認できる。
|
|
311
|
+
</CardDescription>
|
|
312
|
+
</CardHeader>
|
|
313
|
+
</Card>
|
|
314
|
+
<ResponsiveGrid columns={{ sm: 2, md: 4 }}>
|
|
315
|
+
<StatCard label="月次売上" value="¥8,200,000" delta="+12%" hint="先月比" />
|
|
316
|
+
<StatCard label="請求件数" value="312" delta="+4%" />
|
|
317
|
+
<StatCard label="売掛金残高" value="¥1,284,500" hint="未回収 18件" />
|
|
318
|
+
<StatCard label="回収率" value="96.8%" delta="+1.2%" />
|
|
319
|
+
</ResponsiveGrid>
|
|
320
|
+
|
|
321
|
+
<SplitPane
|
|
322
|
+
asideWidth="sm"
|
|
323
|
+
aside={
|
|
324
|
+
<Flex direction="col" gap="md">
|
|
325
|
+
<Card>
|
|
326
|
+
<CardHeader>
|
|
327
|
+
<CardTitle level={2}>最近の仕訳</CardTitle>
|
|
328
|
+
<CardDescription>承認待ちの仕訳</CardDescription>
|
|
329
|
+
</CardHeader>
|
|
330
|
+
<CardContent>
|
|
331
|
+
<Flex direction="col" gap="sm">
|
|
332
|
+
{["JE-0041", "JE-0040", "JE-0039"].map((id) => (
|
|
333
|
+
<Flex key={id} justify="between" align="center">
|
|
334
|
+
<Text size="xs" tone="muted" mono>
|
|
335
|
+
{id}
|
|
336
|
+
</Text>
|
|
337
|
+
<Badge tone="warning">保留中</Badge>
|
|
338
|
+
</Flex>
|
|
339
|
+
))}
|
|
340
|
+
</Flex>
|
|
341
|
+
</CardContent>
|
|
342
|
+
</Card>
|
|
343
|
+
</Flex>
|
|
344
|
+
}
|
|
345
|
+
>
|
|
346
|
+
<Card>
|
|
347
|
+
<CardHeader>
|
|
348
|
+
<CardTitle level={2}>売上推移</CardTitle>
|
|
349
|
+
<CardDescription>過去6ヶ月の月次売上</CardDescription>
|
|
350
|
+
</CardHeader>
|
|
351
|
+
<CardContent>
|
|
352
|
+
<Flex direction="col" gap="sm">
|
|
353
|
+
{[
|
|
354
|
+
{ month: "12月", amount: "¥7,100,000" },
|
|
355
|
+
{ month: "1月", amount: "¥6,800,000" },
|
|
356
|
+
{ month: "2月", amount: "¥7,400,000" },
|
|
357
|
+
{ month: "3月", amount: "¥8,000,000" },
|
|
358
|
+
{ month: "4月", amount: "¥7,900,000" },
|
|
359
|
+
{ month: "5月", amount: "¥8,200,000" },
|
|
360
|
+
].map((row) => (
|
|
361
|
+
<Flex key={row.month} justify="between">
|
|
362
|
+
<Text tone="muted">{row.month}</Text>
|
|
363
|
+
<Text weight="medium">{row.amount}</Text>
|
|
364
|
+
</Flex>
|
|
365
|
+
))}
|
|
366
|
+
</Flex>
|
|
367
|
+
</CardContent>
|
|
368
|
+
</Card>
|
|
369
|
+
</SplitPane>
|
|
370
|
+
</Flex>
|
|
371
|
+
</PageContainer>
|
|
372
|
+
</AppShell>
|
|
373
|
+
);
|
|
374
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
2
|
+
import { Text } from "@godxjp/ui/general";
|
|
3
|
+
import { Skeleton } from "@godxjp/ui/feedback";
|
|
4
|
+
import { AspectRatio, Flex, PageContainer } from "@godxjp/ui/layout";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* AspectRatio · Radix AspectRatio wrapper. Stabilises media/preview frames so
|
|
8
|
+
* they do not reflow during load. ratio = width / height (number). Children fill
|
|
9
|
+
* the constrained box · use object-fit: cover on images, width/height 100% on
|
|
10
|
+
* iframes and SVG charts. Do not use for unconstrained text content. Composed
|
|
11
|
+
* only from real @godxjp/ui components.
|
|
12
|
+
*/
|
|
13
|
+
export default function Demo() {
|
|
14
|
+
return (
|
|
15
|
+
<PageContainer
|
|
16
|
+
title="AspectRatio"
|
|
17
|
+
subtitle="安定メディアフレーム · ロード中のレイアウトシフトを防ぐ"
|
|
18
|
+
>
|
|
19
|
+
<Flex direction="col" gap="lg">
|
|
20
|
+
<Card>
|
|
21
|
+
<CardHeader>
|
|
22
|
+
<CardTitle level={2}>ratio={16 / 9} · 動画埋め込み(既定)</CardTitle>
|
|
23
|
+
<CardDescription>
|
|
24
|
+
動画・地図・ダッシュボードグラフの埋め込みに最適。既定値は 16/9。 子要素は
|
|
25
|
+
width/height 100% で親を満たす。
|
|
26
|
+
</CardDescription>
|
|
27
|
+
</CardHeader>
|
|
28
|
+
<CardContent>
|
|
29
|
+
<AspectRatio ratio={16 / 9}>
|
|
30
|
+
<Card variant="muted" className="h-full w-full">
|
|
31
|
+
<CardContent flush>
|
|
32
|
+
<Flex align="center" justify="center" gap="xs">
|
|
33
|
+
<Text tone="muted">16:9 動画プレビュー(サンプル)</Text>
|
|
34
|
+
</Flex>
|
|
35
|
+
</CardContent>
|
|
36
|
+
</Card>
|
|
37
|
+
</AspectRatio>
|
|
38
|
+
</CardContent>
|
|
39
|
+
</Card>
|
|
40
|
+
|
|
41
|
+
<Card>
|
|
42
|
+
<CardHeader>
|
|
43
|
+
<CardTitle level={2}>ratio={4 / 3} · 画像プレビュースロット</CardTitle>
|
|
44
|
+
<CardDescription>
|
|
45
|
+
商品画像・領収書スキャン・添付ファイルサムネイルのプレビュー枠。 img には object-fit:
|
|
46
|
+
cover を付与してアスペクト比を維持。
|
|
47
|
+
</CardDescription>
|
|
48
|
+
</CardHeader>
|
|
49
|
+
<CardContent>
|
|
50
|
+
<div className="max-w-xs">
|
|
51
|
+
<AspectRatio ratio={4 / 3}>
|
|
52
|
+
<Card variant="muted" className="h-full w-full">
|
|
53
|
+
<CardContent flush>
|
|
54
|
+
<Flex align="center" justify="center" gap="xs">
|
|
55
|
+
<Text tone="muted">領収書スキャン 4:3</Text>
|
|
56
|
+
</Flex>
|
|
57
|
+
</CardContent>
|
|
58
|
+
</Card>
|
|
59
|
+
</AspectRatio>
|
|
60
|
+
</div>
|
|
61
|
+
</CardContent>
|
|
62
|
+
</Card>
|
|
63
|
+
|
|
64
|
+
<Card>
|
|
65
|
+
<CardHeader>
|
|
66
|
+
<CardTitle level={2}>ratio={1 / 1} · 正方形サムネイル</CardTitle>
|
|
67
|
+
<CardDescription>
|
|
68
|
+
プロフィール画像・会社ロゴ・アイコン枠など正方形が必要な場合。 ratio={1}
|
|
69
|
+
または ratio={1 / 1} どちらでも可。
|
|
70
|
+
</CardDescription>
|
|
71
|
+
</CardHeader>
|
|
72
|
+
<CardContent>
|
|
73
|
+
<Flex direction="row" gap="md" align="start" wrap>
|
|
74
|
+
{["株式会社 A", "合同会社 B", "有限会社 C"].map((name) => (
|
|
75
|
+
<div key={name} className="w-28">
|
|
76
|
+
<AspectRatio ratio={1}>
|
|
77
|
+
<Card variant="muted" className="h-full w-full">
|
|
78
|
+
<CardContent flush>
|
|
79
|
+
<Flex align="center" justify="center" gap="xs">
|
|
80
|
+
<Text size="xs" tone="muted" className="text-center">
|
|
81
|
+
{name}
|
|
82
|
+
</Text>
|
|
83
|
+
</Flex>
|
|
84
|
+
</CardContent>
|
|
85
|
+
</Card>
|
|
86
|
+
</AspectRatio>
|
|
87
|
+
</div>
|
|
88
|
+
))}
|
|
89
|
+
</Flex>
|
|
90
|
+
</CardContent>
|
|
91
|
+
</Card>
|
|
92
|
+
|
|
93
|
+
<Card>
|
|
94
|
+
<CardHeader>
|
|
95
|
+
<CardTitle level={2}>
|
|
96
|
+
ratio={21 / 9} · ワイドバナー / チャートプレースホルダー
|
|
97
|
+
</CardTitle>
|
|
98
|
+
<CardDescription>
|
|
99
|
+
ダッシュボードの月次推移グラフや広告バナー用の超ワイド枠。 Skeleton
|
|
100
|
+
と組み合わせてローディング中のプレースホルダーにも使う。
|
|
101
|
+
</CardDescription>
|
|
102
|
+
</CardHeader>
|
|
103
|
+
<CardContent>
|
|
104
|
+
<AspectRatio ratio={21 / 9}>
|
|
105
|
+
<Card variant="muted" className="h-full w-full">
|
|
106
|
+
<CardContent flush>
|
|
107
|
+
<Flex align="center" justify="center" gap="xs">
|
|
108
|
+
<Text tone="muted">月次売上推移グラフ(21:9)</Text>
|
|
109
|
+
</Flex>
|
|
110
|
+
</CardContent>
|
|
111
|
+
</Card>
|
|
112
|
+
</AspectRatio>
|
|
113
|
+
</CardContent>
|
|
114
|
+
</Card>
|
|
115
|
+
|
|
116
|
+
<Card>
|
|
117
|
+
<CardHeader>
|
|
118
|
+
<CardTitle level={2}>Skeleton 併用 · ロード中のプレースホルダー</CardTitle>
|
|
119
|
+
<CardDescription>
|
|
120
|
+
フレームの幅・高さを ratio で固定し、ロード完了後に画像へ差し替えても
|
|
121
|
+
レイアウトシフトが起きない。読み込み中は Skeleton を子要素に置く。
|
|
122
|
+
</CardDescription>
|
|
123
|
+
</CardHeader>
|
|
124
|
+
<CardContent>
|
|
125
|
+
<div className="max-w-xs">
|
|
126
|
+
<AspectRatio ratio={16 / 9}>
|
|
127
|
+
<Skeleton className="h-full w-full rounded-md" />
|
|
128
|
+
</AspectRatio>
|
|
129
|
+
</div>
|
|
130
|
+
</CardContent>
|
|
131
|
+
</Card>
|
|
132
|
+
</Flex>
|
|
133
|
+
</PageContainer>
|
|
134
|
+
);
|
|
135
|
+
}
|