@godxjp/ui 19.0.0 → 19.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -128
- package/dist/app/app-provider.d.ts +1 -1
- package/dist/app/app-provider.js +3 -0
- package/dist/app/theme-axes.d.ts +4 -15
- package/dist/app/timezones.d.ts +1 -4
- package/dist/components/charts/area-chart.d.ts +2 -3
- package/dist/components/charts/bar-chart.d.ts +2 -3
- package/dist/components/charts/chart-frame.d.ts +7 -16
- package/dist/components/charts/chart-summary.d.ts +2 -2
- package/dist/components/charts/compact-bar-trend.d.ts +9 -24
- package/dist/components/charts/index.d.ts +1 -6
- package/dist/components/data-display/badge.d.ts +2 -12
- package/dist/components/data-display/card.d.ts +21 -41
- package/dist/components/data-display/carousel.d.ts +1 -2
- package/dist/components/data-display/code-block.d.ts +4 -0
- package/dist/components/data-display/code-block.js +24 -0
- package/dist/components/data-display/data-table.d.ts +15 -37
- package/dist/components/data-display/data-table.js +1 -3
- package/dist/components/data-display/descriptions.d.ts +2 -6
- package/dist/components/data-display/descriptions.js +0 -2
- package/dist/components/data-display/index.d.ts +4 -0
- package/dist/components/data-display/index.js +4 -0
- package/dist/components/data-display/list-row.d.ts +3 -22
- package/dist/components/data-display/permission-matrix.d.ts +7 -20
- package/dist/components/data-display/progress.d.ts +1 -1
- package/dist/components/data-display/prose.d.ts +4 -0
- package/dist/components/data-display/prose.js +20 -0
- package/dist/components/data-display/service-launcher-card.d.ts +3 -10
- package/dist/components/data-display/table.d.ts +20 -80
- package/dist/components/data-display/table.js +0 -3
- package/dist/components/data-display/timeline.d.ts +3 -5
- package/dist/components/data-entry/branch-scope-picker.d.ts +2 -19
- package/dist/components/data-entry/branch-scope-picker.js +0 -1
- package/dist/components/data-entry/calendar.d.ts +3 -2
- package/dist/components/data-entry/calendar.js +58 -3
- package/dist/components/data-entry/cascader.js +3 -1
- package/dist/components/data-entry/checkbox-group.js +12 -5
- package/dist/components/data-entry/checkbox.js +30 -21
- package/dist/components/data-entry/command-palette.d.ts +8 -22
- package/dist/components/data-entry/date-picker.d.ts +4 -5
- package/dist/components/data-entry/date-picker.js +12 -3
- package/dist/components/data-entry/date-range-picker.d.ts +1 -1
- package/dist/components/data-entry/date-range-picker.js +17 -6
- package/dist/components/data-entry/form-errors.d.ts +7 -18
- package/dist/components/data-entry/form-field.d.ts +1 -1
- package/dist/components/data-entry/form-field.js +15 -6
- package/dist/components/data-entry/form.d.ts +1 -9
- package/dist/components/data-entry/input.d.ts +16 -14
- package/dist/components/data-entry/input.js +13 -3
- package/dist/components/data-entry/month-picker.js +6 -4
- package/dist/components/data-entry/month-range-picker.d.ts +4 -6
- package/dist/components/data-entry/month-range-picker.js +11 -5
- package/dist/components/data-entry/number-input.d.ts +1 -5
- package/dist/components/data-entry/number-input.js +1 -0
- package/dist/components/data-entry/radio.js +19 -6
- package/dist/components/data-entry/search-select.d.ts +3 -5
- package/dist/components/data-entry/search-select.js +8 -2
- package/dist/components/data-entry/select.d.ts +15 -2
- package/dist/components/data-entry/select.js +57 -10
- package/dist/components/data-entry/switch.js +9 -2
- package/dist/components/data-entry/textarea.d.ts +10 -16
- package/dist/components/data-entry/textarea.js +8 -1
- package/dist/components/data-entry/time-picker.d.ts +3 -5
- package/dist/components/data-entry/tree-select.js +3 -1
- package/dist/components/data-entry/upload-types.d.ts +1 -5
- package/dist/components/data-entry/use-upload-draft.d.ts +0 -4
- package/dist/components/feedback/dialog.d.ts +6 -15
- package/dist/components/feedback/overlay-header-tone.d.ts +1 -1
- package/dist/components/feedback/sheet.d.ts +3 -10
- package/dist/components/feedback/sheet.js +1 -1
- package/dist/components/feedback/sonner.js +2 -3
- package/dist/components/general/activity.d.ts +4 -30
- package/dist/components/general/button.js +1 -10
- package/dist/components/general/logo.d.ts +6 -28
- package/dist/components/general/reveal.d.ts +3 -9
- package/dist/components/general/typography.d.ts +1 -3
- package/dist/components/layout/account-chip.d.ts +8 -0
- package/dist/components/layout/account-chip.js +45 -0
- package/dist/components/layout/auth-divider.d.ts +2 -9
- package/dist/components/layout/auth-shell.d.ts +1 -14
- package/dist/components/layout/breadcrumb.d.ts +1 -5
- package/dist/components/layout/centered-shell.d.ts +4 -18
- package/dist/components/layout/error-surface.d.ts +11 -28
- package/dist/components/layout/error-surface.js +4 -1
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +2 -0
- package/dist/components/layout/legal-document-shell.d.ts +5 -28
- package/dist/components/layout/master-detail.d.ts +2 -18
- package/dist/components/layout/page-container.js +0 -1
- package/dist/components/layout/responsive-grid.d.ts +6 -1
- package/dist/components/layout/responsive-grid.js +9 -2
- package/dist/components/layout/service-role-panel.d.ts +7 -19
- package/dist/components/layout/sidebar.d.ts +5 -27
- package/dist/components/layout/sidebar.js +0 -1
- package/dist/components/layout/split-pane.d.ts +0 -7
- package/dist/components/layout/topbar.d.ts +1 -14
- package/dist/components/navigation/app-setting-picker.js +1 -3
- package/dist/components/navigation/filter-bar.d.ts +1 -6
- package/dist/components/navigation/pagination-utils.d.ts +2 -12
- package/dist/components/navigation/tabs-scroll.d.ts +2 -36
- package/dist/components/navigation/tabs.js +4 -8
- package/dist/components/query/data-state.d.ts +2 -2
- package/dist/components/ui/credential-reveal.d.ts +1 -4
- package/dist/components/ui/hover-card.d.ts +1 -2
- package/dist/components/ui/separator.d.ts +2 -15
- package/dist/components/ui/toggle-group.d.ts +1 -5
- package/dist/components/ui/toggle.d.ts +6 -31
- package/dist/email/brand-mark.d.ts +6 -34
- package/dist/email/color.d.ts +7 -17
- package/dist/email/geometry.d.ts +4 -8
- package/dist/email/index.d.ts +4 -48
- package/dist/email/inline-style.d.ts +3 -9
- package/dist/email/urgency.d.ts +2 -7
- package/dist/form/form-context.d.ts +2 -5
- package/dist/form/form-root.d.ts +1 -2
- package/dist/i18n/messages/en.json +4 -0
- package/dist/i18n/messages/ja.json +4 -0
- package/dist/i18n/messages/vi.json +4 -0
- package/dist/inertia/index.d.ts +2 -10
- package/dist/lib/control-styles.d.ts +10 -21
- package/dist/lib/control-styles.js +4 -6
- package/dist/lib/datetime/format-date.d.ts +1 -4
- package/dist/lib/field-a11y.d.ts +31 -36
- package/dist/lib/field-a11y.js +16 -2
- package/dist/lib/format.d.ts +4 -8
- package/dist/lib/hooks.d.ts +6 -12
- package/dist/lib/permission-grid.d.ts +3 -18
- package/dist/lib/query-error.d.ts +3 -3
- package/dist/props/components/app.prop.d.ts +19 -27
- package/dist/props/components/charts.prop.d.ts +2 -3
- package/dist/props/components/data-display.prop.d.ts +48 -72
- package/dist/props/components/data-entry.prop.d.ts +41 -30
- package/dist/props/components/form.prop.d.ts +2 -6
- package/dist/props/components/general.prop.d.ts +11 -27
- package/dist/props/components/layout.prop.d.ts +89 -260
- package/dist/props/components/navigation.prop.d.ts +27 -42
- package/dist/props/registry.d.ts +31 -0
- package/dist/props/registry.js +33 -0
- package/dist/props/vocabulary/data.prop.d.ts +18 -49
- package/dist/props/vocabulary/index.d.ts +1 -1
- package/dist/props/vocabulary/interaction.prop.d.ts +10 -12
- package/dist/props/vocabulary/layout.prop.d.ts +8 -30
- package/dist/props/vocabulary/shared.prop.d.ts +3 -2
- package/dist/styles/alert-layout.css +1 -32
- package/dist/styles/badge-layout.css +4 -18
- package/dist/styles/base.css +14 -113
- package/dist/styles/card-layout.css +6 -128
- package/dist/styles/chart-layout.css +2 -17
- package/dist/styles/control.css +380 -458
- package/dist/styles/core.css +21 -0
- package/dist/styles/data-display-layout.css +175 -94
- package/dist/styles/data-entry-layout.css +0 -45
- package/dist/styles/density.css +1 -30
- package/dist/styles/dialog-layout.css +5 -69
- package/dist/styles/focus-ring.css +13 -87
- package/dist/styles/fonts.css +1 -31
- package/dist/styles/form-layout.css +7 -91
- package/dist/styles/index.css +2 -20
- package/dist/styles/layout.css +38 -456
- package/dist/styles/logo-layout.css +1 -35
- package/dist/styles/motion.css +3 -42
- package/dist/styles/navigation-layout.css +3 -50
- package/dist/styles/shell-layout.css +37 -403
- package/dist/styles/table-layout.css +16 -274
- package/dist/styles/text-layout.css +7 -21
- package/dist/styles/toggle.css +1 -23
- package/dist/theme/dxs.canonical.css +1 -55
- package/dist/theme/example.service.css +1 -26
- package/dist/theme/famgia.service.css +5 -15
- package/dist/tokens/axes.css +3 -40
- package/dist/tokens/base.css +1 -4
- package/dist/tokens/components/activity.css +6 -42
- package/dist/tokens/components/badge.css +4 -13
- package/dist/tokens/components/banner.css +4 -9
- package/dist/tokens/components/card.css +32 -88
- package/dist/tokens/components/chart.css +9 -26
- package/dist/tokens/components/control.css +37 -222
- package/dist/tokens/components/data-display.css +28 -79
- package/dist/tokens/components/data-entry.css +5 -19
- package/dist/tokens/components/descriptions.css +7 -27
- package/dist/tokens/components/email.css +38 -84
- package/dist/tokens/components/error-surface.css +2 -18
- package/dist/tokens/components/feedback.css +27 -124
- package/dist/tokens/components/form.css +13 -45
- package/dist/tokens/components/legal-document.css +16 -41
- package/dist/tokens/components/list-row.css +11 -36
- package/dist/tokens/components/logo.css +2 -57
- package/dist/tokens/components/navigation.css +16 -94
- package/dist/tokens/components/scroll-area.css +2 -18
- package/dist/tokens/components/separator.css +8 -30
- package/dist/tokens/components/sheet.css +3 -14
- package/dist/tokens/components/shell.css +53 -307
- package/dist/tokens/components/sidebar.css +5 -22
- package/dist/tokens/components/table.css +19 -140
- package/dist/tokens/components/toggle.css +3 -65
- package/dist/tokens/components/upload.css +7 -43
- package/dist/tokens/foundation.css +108 -383
- package/dist/tokens/semantic/layout.css +33 -207
- package/docs/CANONICAL-CONTRACTS.md +206 -0
- package/docs/COMPONENTS.md +157 -0
- package/docs/COMPOSITION-VS-COMPONENT.md +105 -0
- package/docs/CONSUMER-RULES.md +14 -0
- package/docs/CUSTOMER-THEMING.md +162 -0
- package/docs/DATETIME.md +69 -0
- package/docs/DEVELOPMENT.md +173 -0
- package/docs/FORMS.md +143 -0
- package/docs/FRAME-A11Y-CI.md +267 -0
- package/docs/FRAME-COVERAGE-LEDGER.md +123 -0
- package/docs/FRAME-COVERAGE-REPORT.md +140 -0
- package/docs/FRAME-COVERAGE-STANDARD.md +65 -0
- package/docs/FRAME-COVERAGE.md +29 -0
- package/docs/PROPS-REGISTRY.md +61 -0
- package/docs/PROPS-VOCABULARY.md +100 -0
- package/docs/README.md +60 -0
- package/docs/REGISTRY.md +70 -0
- package/docs/SPACING.md +56 -0
- package/docs/STANDARDS-vocabulary-tokens.md +48 -0
- package/docs/TESTING.md +98 -0
- package/docs/TOKENS.md +347 -0
- package/docs/asset-modules.d.ts +46 -0
- package/docs/assets/cover-terrain.svg +6 -0
- package/docs/assets/portrait-amber.svg +5 -0
- package/docs/assets/portrait-clay.svg +5 -0
- package/docs/assets/portrait-indigo.svg +5 -0
- package/docs/assets/portrait-iris.svg +5 -0
- package/docs/assets/portrait-moss.svg +5 -0
- package/docs/assets/portrait-plum.svg +5 -0
- package/docs/assets/portrait-slate.svg +5 -0
- package/docs/charts/compact-bar-trend.tsx +328 -0
- package/docs/charts/size-tiers.tsx +192 -0
- package/docs/data-display/accordion.tsx +99 -0
- package/docs/data-display/avatar.tsx +355 -0
- package/docs/data-display/badge.tsx +247 -0
- package/docs/data-display/card/examples/detail-panel.tsx +106 -0
- package/docs/data-display/card/index.md +3 -0
- package/docs/data-display/card/index.tsx +285 -0
- package/docs/data-display/carousel.tsx +156 -0
- package/docs/data-display/charts.tsx +198 -0
- package/docs/data-display/code-block.tsx +90 -0
- package/docs/data-display/collapsible.tsx +162 -0
- package/docs/data-display/credential-reveal.tsx +145 -0
- package/docs/data-display/data-table/examples/approval-queue.tsx +212 -0
- package/docs/data-display/data-table/examples/grid-features.tsx +158 -0
- package/docs/data-display/data-table/examples/list-page.tsx +175 -0
- package/docs/data-display/data-table/index.md +5 -0
- package/docs/data-display/data-table/index.tsx +295 -0
- package/docs/data-display/descriptions.tsx +143 -0
- package/docs/data-display/empty-state.tsx +164 -0
- package/docs/data-display/hover-card.tsx +181 -0
- package/docs/data-display/list-row.tsx +420 -0
- package/docs/data-display/permission-matrix.tsx +184 -0
- package/docs/data-display/popover-touch.tsx +27 -0
- package/docs/data-display/popover.tsx +245 -0
- package/docs/data-display/progress.tsx +84 -0
- package/docs/data-display/prose.tsx +105 -0
- package/docs/data-display/qr-code.tsx +68 -0
- package/docs/data-display/scroll-area.tsx +271 -0
- package/docs/data-display/service-launcher-card.tsx +145 -0
- package/docs/data-display/stat-card.tsx +99 -0
- package/docs/data-display/table.tsx +251 -0
- package/docs/data-display/timeline.tsx +112 -0
- package/docs/data-display/touch-actions.tsx +36 -0
- package/docs/data-display/tree-list.tsx +107 -0
- package/docs/data-entry/branch-scope-picker.tsx +123 -0
- package/docs/data-entry/calendar.tsx +180 -0
- package/docs/data-entry/cascader.tsx +378 -0
- package/docs/data-entry/checkbox.tsx +256 -0
- package/docs/data-entry/color-picker.tsx +117 -0
- package/docs/data-entry/command-palette.tsx +179 -0
- package/docs/data-entry/command.tsx +262 -0
- package/docs/data-entry/country-picker-recipe.tsx +170 -0
- package/docs/data-entry/date-picker.tsx +191 -0
- package/docs/data-entry/date-range-picker.tsx +149 -0
- package/docs/data-entry/form/examples/employee-settings.tsx +267 -0
- package/docs/data-entry/form/examples/invoice-form.tsx +387 -0
- package/docs/data-entry/form-field/examples/a11y-contract.tsx +240 -0
- package/docs/data-entry/form-field/examples/create-form.tsx +105 -0
- package/docs/data-entry/form-field/index.md +8 -0
- package/docs/data-entry/form-field/index.tsx +326 -0
- package/docs/data-entry/form-inertia.tsx +80 -0
- package/docs/data-entry/form-root.tsx +102 -0
- package/docs/data-entry/form.tsx +724 -0
- package/docs/data-entry/input-otp.tsx +231 -0
- package/docs/data-entry/input.tsx +114 -0
- package/docs/data-entry/label.tsx +100 -0
- package/docs/data-entry/month-picker.tsx +101 -0
- package/docs/data-entry/month-range-picker.tsx +115 -0
- package/docs/data-entry/number-input.tsx +240 -0
- package/docs/data-entry/password-input.tsx +106 -0
- package/docs/data-entry/password-strength.tsx +97 -0
- package/docs/data-entry/radio-group.tsx +95 -0
- package/docs/data-entry/rating.tsx +87 -0
- package/docs/data-entry/search-input.tsx +120 -0
- package/docs/data-entry/select-async-contracts.tsx +108 -0
- package/docs/data-entry/select-matrix.tsx +204 -0
- package/docs/data-entry/select.tsx +369 -0
- package/docs/data-entry/slider.tsx +130 -0
- package/docs/data-entry/switch.tsx +67 -0
- package/docs/data-entry/tag-input.tsx +108 -0
- package/docs/data-entry/textarea.tsx +209 -0
- package/docs/data-entry/time-picker.tsx +99 -0
- package/docs/data-entry/toggle-count.tsx +293 -0
- package/docs/data-entry/toggle-group.tsx +225 -0
- package/docs/data-entry/toggle.tsx +127 -0
- package/docs/data-entry/transfer.tsx +97 -0
- package/docs/data-entry/tree-select.tsx +204 -0
- package/docs/data-entry/upload.tsx +184 -0
- package/docs/feedback/alert-dialog.tsx +270 -0
- package/docs/feedback/alert.tsx +248 -0
- package/docs/feedback/banner.tsx +183 -0
- package/docs/feedback/danger-confirm.tsx +88 -0
- package/docs/feedback/dialog-touch.tsx +24 -0
- package/docs/feedback/dialog.tsx +193 -0
- package/docs/feedback/sheet.tsx +410 -0
- package/docs/feedback/skeleton.tsx +111 -0
- package/docs/feedback/toast.tsx +135 -0
- package/docs/feedback/tooltip.tsx +171 -0
- package/docs/feedback/two-factor-setup.tsx +68 -0
- package/docs/foundation/_email-specimen.ts +274 -0
- package/docs/foundation/colors.tsx +202 -0
- package/docs/foundation/density.tsx +232 -0
- package/docs/foundation/email-tokens.tsx +306 -0
- package/docs/foundation/radius-shadow.tsx +152 -0
- package/docs/foundation/spacing.tsx +211 -0
- package/docs/foundation/typography.tsx +147 -0
- package/docs/general/activity.tsx +224 -0
- package/docs/general/button/examples/destructive-confirm.tsx +90 -0
- package/docs/general/button/examples/form-actions.tsx +85 -0
- package/docs/general/button/examples/toolbar.tsx +160 -0
- package/docs/general/button/index.md +12 -0
- package/docs/general/button/index.tsx +211 -0
- package/docs/general/logo.tsx +131 -0
- package/docs/general/reveal.tsx +41 -0
- package/docs/general/typography.tsx +152 -0
- package/docs/layout/account-chip.tsx +72 -0
- package/docs/layout/admin-collection.tsx +122 -0
- package/docs/layout/app-shell.tsx +374 -0
- package/docs/layout/aspect-ratio.tsx +119 -0
- package/docs/layout/auth-account-summary.tsx +103 -0
- package/docs/layout/auth-divider.tsx +28 -0
- package/docs/layout/auth-footer.tsx +37 -0
- package/docs/layout/auth-identity.tsx +36 -0
- package/docs/layout/auth-recovery/examples/mfa-challenge.md +41 -0
- package/docs/layout/auth-recovery/examples/mfa-challenge.tsx +254 -0
- package/docs/layout/auth-recovery/examples/mobile-390.md +25 -0
- package/docs/layout/auth-recovery/examples/mobile-390.tsx +82 -0
- package/docs/layout/auth-recovery/examples/password-recovery.md +24 -0
- package/docs/layout/auth-recovery/examples/password-recovery.tsx +197 -0
- package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.md +27 -0
- package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.tsx +156 -0
- package/docs/layout/auth-recovery/index.md +140 -0
- package/docs/layout/auth-recovery/index.tsx +96 -0
- package/docs/layout/auth-shell-context.tsx +103 -0
- package/docs/layout/auth-shell-device.tsx +112 -0
- package/docs/layout/auth-shell-registration.tsx +335 -0
- package/docs/layout/auth-shell-variants.tsx +139 -0
- package/docs/layout/auth-shell.tsx +59 -0
- package/docs/layout/auth-stack.tsx +40 -0
- package/docs/layout/centered-shell.tsx +102 -0
- package/docs/layout/error-surface/examples/application-403.tsx +84 -0
- package/docs/layout/error-surface/examples/application-404.tsx +77 -0
- package/docs/layout/error-surface/examples/system-500.tsx +47 -0
- package/docs/layout/error-surface/examples/system-503.tsx +48 -0
- package/docs/layout/error-surface/index.md +153 -0
- package/docs/layout/error-surface/index.tsx +239 -0
- package/docs/layout/flex.tsx +262 -0
- package/docs/layout/legal-document-shell/_data.ts +110 -0
- package/docs/layout/legal-document-shell/examples/desktop-1440.md +12 -0
- package/docs/layout/legal-document-shell/examples/desktop-1440.tsx +83 -0
- package/docs/layout/legal-document-shell/examples/mobile-390.md +22 -0
- package/docs/layout/legal-document-shell/examples/mobile-390.tsx +70 -0
- package/docs/layout/legal-document-shell/examples/tablet-1024.md +3 -0
- package/docs/layout/legal-document-shell/examples/tablet-1024.tsx +84 -0
- package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.md +18 -0
- package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.tsx +61 -0
- package/docs/layout/legal-document-shell/index.md +51 -0
- package/docs/layout/legal-document-shell/index.tsx +101 -0
- package/docs/layout/master-detail.tsx +387 -0
- package/docs/layout/org-switcher.tsx +131 -0
- package/docs/layout/page-container.tsx +946 -0
- package/docs/layout/resizable-panel.tsx +419 -0
- package/docs/layout/responsive-grid.tsx +235 -0
- package/docs/layout/separator.tsx +327 -0
- package/docs/layout/service-role-panel.tsx +144 -0
- package/docs/layout/sidebar.tsx +586 -0
- package/docs/layout/split-pane.tsx +451 -0
- package/docs/layout/topbar.tsx +347 -0
- package/docs/navigation/app-setting-picker.tsx +141 -0
- package/docs/navigation/breadcrumb.tsx +128 -0
- package/docs/navigation/context-menu.tsx +117 -0
- package/docs/navigation/dropdown-menu.tsx +213 -0
- package/docs/navigation/filter-bar.tsx +227 -0
- package/docs/navigation/menubar.tsx +141 -0
- package/docs/navigation/navigation-menu.tsx +165 -0
- package/docs/navigation/pagination.tsx +241 -0
- package/docs/navigation/steps.tsx +263 -0
- package/docs/navigation/tabs-rtl.tsx +28 -0
- package/docs/navigation/tabs.tsx +308 -0
- package/docs/navigation/toolbar.tsx +339 -0
- package/docs/providers/app-provider.tsx +191 -0
- package/docs/providers/format-date.tsx +230 -0
- package/docs/query/button-refetch.tsx +160 -0
- package/docs/query/data-state.tsx +192 -0
- package/docs/query/infinite-query-state.tsx +93 -0
- package/docs/query/mutation-feedback.tsx +70 -0
- package/docs/query/prefetch-link.tsx +262 -0
- package/docs/query/touch-actions.tsx +68 -0
- package/docs/showcase/acme-portal.tsx +441 -0
- package/docs/showcase/acme-website.tsx +455 -0
- package/docs/showcase/case1-warehouse-dashboard.tsx +343 -0
- package/docs/showcase/case2-employee-me.tsx +441 -0
- package/docs/showcase/case3-approval-workflow.tsx +527 -0
- package/docs/showcase/case4-login.tsx +307 -0
- package/docs/showcase/case5-shift-calendar.tsx +795 -0
- package/docs/showcase/case6-agency-handy.tsx +1072 -0
- package/docs/showcase/futurelastic-web.tsx +390 -0
- package/docs/showcase/org-switcher.tsx +313 -0
- package/docs/showcase/permission-matrix.tsx +343 -0
- package/docs/showcase/public-landing.tsx +210 -0
- package/docs/showcase/settings-account-sections.tsx +559 -0
- package/docs/showcase/settings-security-mfa.tsx +145 -0
- package/docs/showcase/table-approval-queue.tsx +199 -0
- package/docs/showcase/table-bulk-actions.tsx +460 -0
- package/docs/showcase/table-compact-kintone.tsx +438 -0
- package/docs/showcase/table-conditional-format.tsx +367 -0
- package/docs/showcase/table-crud-list.tsx +544 -0
- package/docs/showcase/table-density.tsx +340 -0
- package/docs/showcase/table-expandable-rows.tsx +471 -0
- package/docs/showcase/table-filter-chips.tsx +461 -0
- package/docs/showcase/table-footer-totals.tsx +311 -0
- package/docs/showcase/table-grouped-subtotals.tsx +388 -0
- package/docs/showcase/table-master-detail.tsx +479 -0
- package/docs/showcase/table-pagination.tsx +320 -0
- package/docs/showcase/table-states.tsx +363 -0
- package/docs/showcase/table-sticky-columns.tsx +373 -0
- package/docs/showcase/table-tree-rows.tsx +444 -0
- package/docs/showcase/table-view-tabs.tsx +488 -0
- package/package.json +10 -11
- package/scripts/_agent-setup.mjs +16 -2
- package/scripts/audit-hook.mjs +3 -13
- package/scripts/init-agent-kit.mjs +1 -14
- package/scripts/postinstall.mjs +12 -12
- package/scripts/ui-audit.mjs +93 -31
- package/scripts/visual-audit-rules.mjs +51 -7
- package/scripts/visual-audit.mjs +118 -47
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { useMemo, useState } from "react";
|
|
2
|
+
|
|
3
|
+
import { AppProvider } from "@godxjp/ui/app";
|
|
4
|
+
import { Badge, DataTable, type ColumnDef } from "@godxjp/ui/data-display";
|
|
5
|
+
import { Button, Text } from "@godxjp/ui/general";
|
|
6
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
7
|
+
import {
|
|
8
|
+
DropdownMenu,
|
|
9
|
+
DropdownMenuContent,
|
|
10
|
+
DropdownMenuItem,
|
|
11
|
+
DropdownMenuSeparator,
|
|
12
|
+
DropdownMenuTrigger,
|
|
13
|
+
} from "@godxjp/ui/navigation";
|
|
14
|
+
import type { DensityProp, SortStateProp } from "@godxjp/ui/props";
|
|
15
|
+
import { MoreHorizontal, Pencil, Trash2 } from "lucide-react";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* DataTable — the admin list primitive: sticky header, sorting, bulk selection,
|
|
19
|
+
* density toggle, per-row click navigation, a loading row, and a built-in empty
|
|
20
|
+
* state (never hand-roll a data.length===0 guard). Composed only from real
|
|
21
|
+
* @godxjp/ui components.
|
|
22
|
+
*/
|
|
23
|
+
type Invoice = {
|
|
24
|
+
id: string;
|
|
25
|
+
partner: string;
|
|
26
|
+
amount: number;
|
|
27
|
+
status: "active" | "pending" | "draft" | "failed";
|
|
28
|
+
date: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const invoices: Invoice[] = [
|
|
32
|
+
{
|
|
33
|
+
id: "INV-0312",
|
|
34
|
+
partner: "株式会社ベトヤ",
|
|
35
|
+
amount: 482000,
|
|
36
|
+
status: "active",
|
|
37
|
+
date: "2024-04-12",
|
|
38
|
+
},
|
|
39
|
+
{ id: "INV-0311", partner: "ハノイ物流", amount: 128400, status: "pending", date: "2024-04-11" },
|
|
40
|
+
{ id: "INV-0310", partner: "GMO決済", amount: 64800, status: "draft", date: "2024-04-10" },
|
|
41
|
+
{ id: "INV-0309", partner: "東京ロジ", amount: 312000, status: "failed", date: "2024-04-09" },
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const yen = new Intl.NumberFormat("ja-JP", {
|
|
45
|
+
style: "currency",
|
|
46
|
+
currency: "JPY",
|
|
47
|
+
maximumFractionDigits: 0,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const columns: ColumnDef<Invoice>[] = [
|
|
51
|
+
{ key: "id", header: "請求書番号", width: "w-32" },
|
|
52
|
+
{ key: "partner", header: "取引先", sortable: true },
|
|
53
|
+
{
|
|
54
|
+
key: "amount",
|
|
55
|
+
header: "金額",
|
|
56
|
+
align: "right",
|
|
57
|
+
sortable: true,
|
|
58
|
+
render: (row) => <Text tabular>{yen.format(row.amount)}</Text>,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: "status",
|
|
62
|
+
header: "状態",
|
|
63
|
+
align: "center",
|
|
64
|
+
render: (row) => <Badge status={row.status} />,
|
|
65
|
+
},
|
|
66
|
+
{ key: "date", header: "発行日", align: "right", hiddenOnMobile: true },
|
|
67
|
+
{
|
|
68
|
+
key: "_actions",
|
|
69
|
+
header: "",
|
|
70
|
+
ariaLabel: "操作",
|
|
71
|
+
align: "right",
|
|
72
|
+
enableHiding: false,
|
|
73
|
+
render: (row) => (
|
|
74
|
+
<DropdownMenu>
|
|
75
|
+
<DropdownMenuTrigger asChild>
|
|
76
|
+
<Button variant="ghost" size="icon-sm" aria-label={`${row.id} の操作`}>
|
|
77
|
+
<MoreHorizontal />
|
|
78
|
+
</Button>
|
|
79
|
+
</DropdownMenuTrigger>
|
|
80
|
+
<DropdownMenuContent align="end">
|
|
81
|
+
<DropdownMenuItem>
|
|
82
|
+
<Pencil />
|
|
83
|
+
編集
|
|
84
|
+
</DropdownMenuItem>
|
|
85
|
+
<DropdownMenuSeparator />
|
|
86
|
+
<DropdownMenuItem variant="destructive">
|
|
87
|
+
<Trash2 />
|
|
88
|
+
削除
|
|
89
|
+
</DropdownMenuItem>
|
|
90
|
+
</DropdownMenuContent>
|
|
91
|
+
</DropdownMenu>
|
|
92
|
+
),
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
export default function Demo() {
|
|
97
|
+
const [selected, setSelected] = useState<Set<string>>(new Set(["INV-0311"]));
|
|
98
|
+
const [sort, setSort] = useState<SortStateProp | undefined>({
|
|
99
|
+
key: "amount",
|
|
100
|
+
direction: "desc",
|
|
101
|
+
});
|
|
102
|
+
const [density, setDensity] = useState<DensityProp>("comfortable");
|
|
103
|
+
|
|
104
|
+
const rows = useMemo(() => {
|
|
105
|
+
if (!sort) return invoices;
|
|
106
|
+
const dir = sort.direction === "asc" ? 1 : -1;
|
|
107
|
+
return [...invoices].sort((a, b) => {
|
|
108
|
+
const av = a[sort.key as keyof Invoice];
|
|
109
|
+
const bv = b[sort.key as keyof Invoice];
|
|
110
|
+
return (av < bv ? -1 : av > bv ? 1 : 0) * dir;
|
|
111
|
+
});
|
|
112
|
+
}, [sort]);
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<PageContainer
|
|
116
|
+
title="DataTable"
|
|
117
|
+
subtitle="sortable · selectable · bulk actions · row actions · loading · clickable rows · empty state"
|
|
118
|
+
>
|
|
119
|
+
<Flex direction="col" gap="lg">
|
|
120
|
+
{/* Primary: sorted (amount desc), one row preselected, clickable rows,
|
|
121
|
+
controlled density (comfortable), kebab row actions, pagination footer. */}
|
|
122
|
+
<DataTable
|
|
123
|
+
data={rows}
|
|
124
|
+
columns={columns}
|
|
125
|
+
getRowId={(row) => row.id}
|
|
126
|
+
selectable
|
|
127
|
+
selected={selected}
|
|
128
|
+
onSelectChange={setSelected}
|
|
129
|
+
onRowClick={() => {}}
|
|
130
|
+
density={density}
|
|
131
|
+
onDensityChange={setDensity}
|
|
132
|
+
sort={sort}
|
|
133
|
+
onSortChange={setSort}
|
|
134
|
+
>
|
|
135
|
+
<DataTable.Toolbar>
|
|
136
|
+
<DataTable.BulkActions>
|
|
137
|
+
<Button size="sm" variant="outline">
|
|
138
|
+
エクスポート
|
|
139
|
+
</Button>
|
|
140
|
+
<Button size="sm">入金消込</Button>
|
|
141
|
+
</DataTable.BulkActions>
|
|
142
|
+
<DataTable.DensityToggle />
|
|
143
|
+
</DataTable.Toolbar>
|
|
144
|
+
<DataTable.Content />
|
|
145
|
+
<DataTable.Pagination cursor="INV-0309" hasMore onChange={() => {}} />
|
|
146
|
+
</DataTable>
|
|
147
|
+
|
|
148
|
+
{/* The three density branches rendered statically. The DensityToggle above reaches the
|
|
149
|
+
same values, but a toggle only proves them after a click; these prove them at rest. */}
|
|
150
|
+
<Flex direction="col" gap="sm">
|
|
151
|
+
<Text as="div" weight="medium">
|
|
152
|
+
密度 compact(明細の一覧 · 行高さを最小に)
|
|
153
|
+
</Text>
|
|
154
|
+
<DataTable
|
|
155
|
+
data={invoices}
|
|
156
|
+
columns={columns}
|
|
157
|
+
getRowId={(row) => row.id}
|
|
158
|
+
density="compact"
|
|
159
|
+
/>
|
|
160
|
+
</Flex>
|
|
161
|
+
|
|
162
|
+
<Flex direction="col" gap="sm">
|
|
163
|
+
<Text as="div" weight="medium">
|
|
164
|
+
密度 default(既定 · 管理画面の標準)
|
|
165
|
+
</Text>
|
|
166
|
+
<DataTable
|
|
167
|
+
data={invoices}
|
|
168
|
+
columns={columns}
|
|
169
|
+
getRowId={(row) => row.id}
|
|
170
|
+
density="default"
|
|
171
|
+
/>
|
|
172
|
+
</Flex>
|
|
173
|
+
|
|
174
|
+
<Flex direction="col" gap="sm">
|
|
175
|
+
<Text as="div" weight="medium">
|
|
176
|
+
密度 comfortable(少数行 · 承認画面など読み取り重視)
|
|
177
|
+
</Text>
|
|
178
|
+
<DataTable
|
|
179
|
+
data={invoices}
|
|
180
|
+
columns={columns}
|
|
181
|
+
getRowId={(row) => row.id}
|
|
182
|
+
density="comfortable"
|
|
183
|
+
/>
|
|
184
|
+
</Flex>
|
|
185
|
+
|
|
186
|
+
<Flex direction="col" gap="sm">
|
|
187
|
+
<Text as="div" weight="medium">
|
|
188
|
+
読み込み中(loading=true で行を置き換え)
|
|
189
|
+
</Text>
|
|
190
|
+
<DataTable data={invoices} columns={columns} getRowId={(row) => row.id} loading />
|
|
191
|
+
</Flex>
|
|
192
|
+
|
|
193
|
+
<Flex direction="col" gap="sm" className="max-w-sm">
|
|
194
|
+
<Text as="div" weight="medium">
|
|
195
|
+
Narrow footer · VI expanded rows-per-page label
|
|
196
|
+
</Text>
|
|
197
|
+
<AppProvider defaultLocale="vi" persist={false}>
|
|
198
|
+
<DataTable data={invoices} columns={columns} getRowId={(row) => row.id}>
|
|
199
|
+
<DataTable.Pagination pageSizeOptions={[10, 20]} />
|
|
200
|
+
</DataTable>
|
|
201
|
+
</AppProvider>
|
|
202
|
+
</Flex>
|
|
203
|
+
|
|
204
|
+
<Flex direction="col" gap="sm" className="max-w-sm">
|
|
205
|
+
<Text as="div" weight="medium">
|
|
206
|
+
Narrow footer · JA rows-per-page label
|
|
207
|
+
</Text>
|
|
208
|
+
<AppProvider defaultLocale="ja" persist={false}>
|
|
209
|
+
<DataTable data={invoices} columns={columns} getRowId={(row) => row.id}>
|
|
210
|
+
<DataTable.Pagination pageSizeOptions={[10, 20]} />
|
|
211
|
+
</DataTable>
|
|
212
|
+
</AppProvider>
|
|
213
|
+
</Flex>
|
|
214
|
+
|
|
215
|
+
<Flex direction="col" gap="sm" className="max-w-sm">
|
|
216
|
+
<Text as="div" weight="medium">
|
|
217
|
+
Narrow footer · EN longest supported rows-per-page label
|
|
218
|
+
</Text>
|
|
219
|
+
<AppProvider defaultLocale="en" persist={false}>
|
|
220
|
+
<DataTable data={invoices} columns={columns} getRowId={(row) => row.id}>
|
|
221
|
+
<DataTable.Pagination pageSizeOptions={[10, 20]} />
|
|
222
|
+
</DataTable>
|
|
223
|
+
</AppProvider>
|
|
224
|
+
</Flex>
|
|
225
|
+
|
|
226
|
+
<Flex direction="col" gap="sm">
|
|
227
|
+
<Text as="div" weight="medium">
|
|
228
|
+
空の状態(data が空のとき自動表示)
|
|
229
|
+
</Text>
|
|
230
|
+
<DataTable data={[]} columns={columns} getRowId={(row) => row.id} />
|
|
231
|
+
</Flex>
|
|
232
|
+
|
|
233
|
+
{/* gh#216 — the two failure states, in the same table grid as empty/loading. */}
|
|
234
|
+
<Flex direction="col" gap="sm">
|
|
235
|
+
<Text as="div" weight="medium">
|
|
236
|
+
エラー(error · role="alert" · onRetry で再試行を表示)
|
|
237
|
+
</Text>
|
|
238
|
+
<DataTable
|
|
239
|
+
data={[]}
|
|
240
|
+
columns={columns}
|
|
241
|
+
getRowId={(row) => row.id}
|
|
242
|
+
error
|
|
243
|
+
onRetry={() => {}}
|
|
244
|
+
/>
|
|
245
|
+
</Flex>
|
|
246
|
+
|
|
247
|
+
<Flex direction="col" gap="sm">
|
|
248
|
+
<Text as="div" weight="medium">
|
|
249
|
+
エラー(onRetry なし · 再試行ボタンは出さない)
|
|
250
|
+
</Text>
|
|
251
|
+
<DataTable data={[]} columns={columns} getRowId={(row) => row.id} error />
|
|
252
|
+
</Flex>
|
|
253
|
+
|
|
254
|
+
<Flex direction="col" gap="sm">
|
|
255
|
+
<Text as="div" weight="medium">
|
|
256
|
+
エラー(error にノードを渡して文言を差し替え)
|
|
257
|
+
</Text>
|
|
258
|
+
<DataTable
|
|
259
|
+
data={[]}
|
|
260
|
+
columns={columns}
|
|
261
|
+
getRowId={(row) => row.id}
|
|
262
|
+
error={<Text tone="muted">コード INV_FETCH_504 · リクエストID req_7f3a91c0d2</Text>}
|
|
263
|
+
/>
|
|
264
|
+
</Flex>
|
|
265
|
+
|
|
266
|
+
<Flex direction="col" gap="sm">
|
|
267
|
+
<Text as="div" weight="medium">
|
|
268
|
+
権限なし(denied · 403 は再試行を出さない)
|
|
269
|
+
</Text>
|
|
270
|
+
<DataTable data={[]} columns={columns} getRowId={(row) => row.id} denied />
|
|
271
|
+
</Flex>
|
|
272
|
+
|
|
273
|
+
<Flex direction="col" gap="sm">
|
|
274
|
+
<Text as="div" weight="medium">
|
|
275
|
+
0 件 + numbered pagination(境界状態)
|
|
276
|
+
</Text>
|
|
277
|
+
<DataTable data={[]} columns={columns} getRowId={(row) => row.id}>
|
|
278
|
+
<DataTable.Content />
|
|
279
|
+
<DataTable.Pagination pageSizeOptions={[10, 20]} />
|
|
280
|
+
</DataTable>
|
|
281
|
+
</Flex>
|
|
282
|
+
|
|
283
|
+
<Flex direction="col" gap="sm">
|
|
284
|
+
<Text as="div" weight="medium">
|
|
285
|
+
1 件 / 1 ページ + numbered pagination(境界状態)
|
|
286
|
+
</Text>
|
|
287
|
+
<DataTable data={invoices.slice(0, 1)} columns={columns} getRowId={(row) => row.id}>
|
|
288
|
+
<DataTable.Content />
|
|
289
|
+
<DataTable.Pagination pageSizeOptions={[10, 20]} />
|
|
290
|
+
</DataTable>
|
|
291
|
+
</Flex>
|
|
292
|
+
</Flex>
|
|
293
|
+
</PageContainer>
|
|
294
|
+
);
|
|
295
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Badge,
|
|
3
|
+
Card,
|
|
4
|
+
CardContent,
|
|
5
|
+
CardDescription,
|
|
6
|
+
CardHeader,
|
|
7
|
+
CardTitle,
|
|
8
|
+
Descriptions,
|
|
9
|
+
} from "@godxjp/ui/data-display";
|
|
10
|
+
import { Text } from "@godxjp/ui/general";
|
|
11
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Descriptions — responsive label/value grid for detail-page metadata. COMPOUND:
|
|
15
|
+
* the value goes in Descriptions.Item children. Never hand-roll a dl/dt/dd grid.
|
|
16
|
+
* Composed only from real @godxjp/ui components.
|
|
17
|
+
*/
|
|
18
|
+
export default function Demo() {
|
|
19
|
+
return (
|
|
20
|
+
<PageContainer title="Descriptions" subtitle="Label / value metadata grid for detail pages">
|
|
21
|
+
<Flex direction="col" gap="lg">
|
|
22
|
+
{/* Default columns=2 — the canonical 2-column metadata grid.
|
|
23
|
+
mono for the ID; span=2 + a long URL value shows full-row + break-all overflow. */}
|
|
24
|
+
<Card>
|
|
25
|
+
<CardHeader>
|
|
26
|
+
<CardTitle level={2}>請求書の詳細</CardTitle>
|
|
27
|
+
<CardDescription>
|
|
28
|
+
既定は
|
|
29
|
+
columns=2。値は任意のノード(テキスト・Badge・金額)。狭い画面では1列に折り返します。
|
|
30
|
+
</CardDescription>
|
|
31
|
+
</CardHeader>
|
|
32
|
+
<CardContent>
|
|
33
|
+
<Descriptions>
|
|
34
|
+
<Descriptions.Item label="請求書番号" mono>
|
|
35
|
+
INV-2024-0312
|
|
36
|
+
</Descriptions.Item>
|
|
37
|
+
<Descriptions.Item label="取引先">株式会社ベトヤ</Descriptions.Item>
|
|
38
|
+
<Descriptions.Item label="状態">
|
|
39
|
+
<Badge status="active" />
|
|
40
|
+
</Descriptions.Item>
|
|
41
|
+
<Descriptions.Item label="発行日">2024-04-12</Descriptions.Item>
|
|
42
|
+
<Descriptions.Item label="小計">
|
|
43
|
+
<Text tabular>¥438,182</Text>
|
|
44
|
+
</Descriptions.Item>
|
|
45
|
+
<Descriptions.Item label="消費税 (10%)">
|
|
46
|
+
<Text tabular>¥43,818</Text>
|
|
47
|
+
</Descriptions.Item>
|
|
48
|
+
<Descriptions.Item label="合計">
|
|
49
|
+
<Text weight="medium" tabular>
|
|
50
|
+
¥482,000
|
|
51
|
+
</Text>
|
|
52
|
+
</Descriptions.Item>
|
|
53
|
+
<Descriptions.Item label="PDF リンク" mono span={2}>
|
|
54
|
+
https://invoices.vetoya.example.co.jp/2024/04/INV-2024-0312-rev2.pdf
|
|
55
|
+
</Descriptions.Item>
|
|
56
|
+
</Descriptions>
|
|
57
|
+
</CardContent>
|
|
58
|
+
</Card>
|
|
59
|
+
|
|
60
|
+
{/* layout="horizontal" — label BESIDE value (token-aligned label column), like <Form layout>.
|
|
61
|
+
Default layout is "vertical" (label over value, the cards above). */}
|
|
62
|
+
<Card>
|
|
63
|
+
<CardHeader>
|
|
64
|
+
<CardTitle level={2}>横並び (layout="horizontal")</CardTitle>
|
|
65
|
+
<CardDescription>
|
|
66
|
+
ラベルを値の左に揃える。`--descriptions-label-width` でラベル列幅を調整。既定は
|
|
67
|
+
layout="vertical"(ラベルを上に積む、上のカード)。
|
|
68
|
+
</CardDescription>
|
|
69
|
+
</CardHeader>
|
|
70
|
+
<CardContent>
|
|
71
|
+
<Descriptions columns={1} layout="horizontal">
|
|
72
|
+
<Descriptions.Item label="請求書番号" mono>
|
|
73
|
+
INV-2024-0312
|
|
74
|
+
</Descriptions.Item>
|
|
75
|
+
<Descriptions.Item label="取引先">株式会社ベトヤ</Descriptions.Item>
|
|
76
|
+
<Descriptions.Item label="状態">
|
|
77
|
+
<Badge status="active" />
|
|
78
|
+
</Descriptions.Item>
|
|
79
|
+
<Descriptions.Item label="合計">
|
|
80
|
+
<Text weight="medium" tabular>
|
|
81
|
+
¥482,000
|
|
82
|
+
</Text>
|
|
83
|
+
</Descriptions.Item>
|
|
84
|
+
</Descriptions>
|
|
85
|
+
</CardContent>
|
|
86
|
+
</Card>
|
|
87
|
+
|
|
88
|
+
{/* columns=1 — stacked detail panel: every item on its own row. */}
|
|
89
|
+
<Card>
|
|
90
|
+
<CardHeader>
|
|
91
|
+
<CardTitle level={2}>取引先の詳細</CardTitle>
|
|
92
|
+
<CardDescription>columns=1。各項目を縦積みにする詳細パネル向けの構成。</CardDescription>
|
|
93
|
+
</CardHeader>
|
|
94
|
+
<CardContent>
|
|
95
|
+
<Descriptions columns={1}>
|
|
96
|
+
<Descriptions.Item label="会社名">株式会社ベトヤ</Descriptions.Item>
|
|
97
|
+
<Descriptions.Item label="法人番号" mono>
|
|
98
|
+
1180001052731
|
|
99
|
+
</Descriptions.Item>
|
|
100
|
+
<Descriptions.Item label="住所">
|
|
101
|
+
東京都渋谷区神宮前5-52-2 青山オーバルビル7F
|
|
102
|
+
</Descriptions.Item>
|
|
103
|
+
<Descriptions.Item label="担当者">山田 太郎(経理部)</Descriptions.Item>
|
|
104
|
+
</Descriptions>
|
|
105
|
+
</CardContent>
|
|
106
|
+
</Card>
|
|
107
|
+
|
|
108
|
+
{/* columns=3 — dense metadata grid; span=3 makes the JSON value occupy the full width. */}
|
|
109
|
+
<Card>
|
|
110
|
+
<CardHeader>
|
|
111
|
+
<CardTitle level={2}>システムメタデータ</CardTitle>
|
|
112
|
+
<CardDescription>
|
|
113
|
+
columns=3。識別子の多い密なメタデータ向け。mono と span でIDやJSONを整列。
|
|
114
|
+
</CardDescription>
|
|
115
|
+
</CardHeader>
|
|
116
|
+
<CardContent>
|
|
117
|
+
<Descriptions columns={3}>
|
|
118
|
+
<Descriptions.Item label="リソースID" mono>
|
|
119
|
+
inv_8f3a21c0
|
|
120
|
+
</Descriptions.Item>
|
|
121
|
+
<Descriptions.Item label="リビジョン" mono>
|
|
122
|
+
v3
|
|
123
|
+
</Descriptions.Item>
|
|
124
|
+
<Descriptions.Item label="状態">
|
|
125
|
+
<Badge status="active" />
|
|
126
|
+
</Descriptions.Item>
|
|
127
|
+
<Descriptions.Item label="作成日時" mono>
|
|
128
|
+
2024-04-12T09:31:00+09:00
|
|
129
|
+
</Descriptions.Item>
|
|
130
|
+
<Descriptions.Item label="更新日時" mono>
|
|
131
|
+
2024-04-12T14:07:55+09:00
|
|
132
|
+
</Descriptions.Item>
|
|
133
|
+
<Descriptions.Item label="作成者">山田 太郎</Descriptions.Item>
|
|
134
|
+
<Descriptions.Item label="メタデータ" mono span={3}>
|
|
135
|
+
{'{ "channel": "web", "tax_rate": 0.1, "currency": "JPY" }'}
|
|
136
|
+
</Descriptions.Item>
|
|
137
|
+
</Descriptions>
|
|
138
|
+
</CardContent>
|
|
139
|
+
</Card>
|
|
140
|
+
</Flex>
|
|
141
|
+
</PageContainer>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { Card, CardContent, CardHeader, CardTitle, EmptyState } from "@godxjp/ui/data-display";
|
|
2
|
+
import { Button } from "@godxjp/ui/general";
|
|
3
|
+
import { Flex, PageContainer, ResponsiveGrid } from "@godxjp/ui/layout";
|
|
4
|
+
import {
|
|
5
|
+
AlertTriangle,
|
|
6
|
+
Archive,
|
|
7
|
+
CheckCircle2,
|
|
8
|
+
Inbox,
|
|
9
|
+
Info,
|
|
10
|
+
Plus,
|
|
11
|
+
SearchX,
|
|
12
|
+
XCircle,
|
|
13
|
+
} from "lucide-react";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* EmptyState — centred zero-state with icon, title, description, and an optional
|
|
17
|
+
* CTA. Use for non-DataTable lists / zero-state pages (DataTable embeds its own).
|
|
18
|
+
*
|
|
19
|
+
* Heading hierarchy: the title is a real heading (default `<h3>`). Pick
|
|
20
|
+
* `titleLevel` for a VALID page outline (page `<h1>` → section `<h2>` → nested
|
|
21
|
+
* `<h3>`), never for visual size — the size is fixed by tokens. Below, the page
|
|
22
|
+
* title is `<h1>` (PageContainer) and each case owns a `<CardTitle level={2}>`
|
|
23
|
+
* (`<h2>`), so the empty-state titles are `titleLevel={3}` — or `titleAs="p"`
|
|
24
|
+
* when the message is not itself a heading. Composed only from real @godxjp/ui.
|
|
25
|
+
*/
|
|
26
|
+
export default function Demo() {
|
|
27
|
+
return (
|
|
28
|
+
<PageContainer
|
|
29
|
+
title="EmptyState"
|
|
30
|
+
subtitle="Contextual zero-state · page / section / compact · tone · valid heading order"
|
|
31
|
+
>
|
|
32
|
+
<Flex direction="col" gap="lg">
|
|
33
|
+
{/* page — the empty condition IS the page's primary job (onboarding). */}
|
|
34
|
+
<Card>
|
|
35
|
+
<CardHeader>
|
|
36
|
+
<CardTitle level={2}>page:主要な空状態(オンボーディング)</CardTitle>
|
|
37
|
+
</CardHeader>
|
|
38
|
+
<CardContent>
|
|
39
|
+
<EmptyState
|
|
40
|
+
variant="page"
|
|
41
|
+
icon={Inbox}
|
|
42
|
+
title="請求書がありません"
|
|
43
|
+
description="最初の請求書を作成して開始しましょう。"
|
|
44
|
+
titleLevel={3}
|
|
45
|
+
action={
|
|
46
|
+
<Button>
|
|
47
|
+
<Plus />
|
|
48
|
+
新規請求書
|
|
49
|
+
</Button>
|
|
50
|
+
}
|
|
51
|
+
/>
|
|
52
|
+
</CardContent>
|
|
53
|
+
</Card>
|
|
54
|
+
|
|
55
|
+
{/* page — post-search zero result with a clear recovery. */}
|
|
56
|
+
<Card>
|
|
57
|
+
<CardHeader>
|
|
58
|
+
<CardTitle level={2}>page:検索結果ゼロ</CardTitle>
|
|
59
|
+
</CardHeader>
|
|
60
|
+
<CardContent>
|
|
61
|
+
<EmptyState
|
|
62
|
+
icon={SearchX}
|
|
63
|
+
title="該当する結果がありません"
|
|
64
|
+
description="フィルター条件を変更して、もう一度お試しください。"
|
|
65
|
+
titleLevel={3}
|
|
66
|
+
/>
|
|
67
|
+
</CardContent>
|
|
68
|
+
</Card>
|
|
69
|
+
|
|
70
|
+
{/* section — restrained spacing for a subsection inside a normal page. */}
|
|
71
|
+
<Card>
|
|
72
|
+
<CardHeader>
|
|
73
|
+
<CardTitle level={2}>section:セクション内の空状態</CardTitle>
|
|
74
|
+
</CardHeader>
|
|
75
|
+
<CardContent>
|
|
76
|
+
<EmptyState
|
|
77
|
+
variant="section"
|
|
78
|
+
icon={SearchX}
|
|
79
|
+
title="このセクションに結果はありません"
|
|
80
|
+
description="ページ全体ではない、主要セクション内の空状態です。"
|
|
81
|
+
titleLevel={3}
|
|
82
|
+
/>
|
|
83
|
+
</CardContent>
|
|
84
|
+
</Card>
|
|
85
|
+
|
|
86
|
+
{/* compact — secondary content; no medallion, minimal padding, and the
|
|
87
|
+
message is NOT a heading (titleAs="p") because the card already has one. */}
|
|
88
|
+
<Card>
|
|
89
|
+
<CardHeader>
|
|
90
|
+
<CardTitle level={2}>compact:補助的な空状態</CardTitle>
|
|
91
|
+
</CardHeader>
|
|
92
|
+
<CardContent>
|
|
93
|
+
<EmptyState
|
|
94
|
+
variant="compact"
|
|
95
|
+
title="保留中の招待はありません"
|
|
96
|
+
description="補助的な空状態はアイコンを省き、最小限の余白で表示します。"
|
|
97
|
+
titleAs="p"
|
|
98
|
+
/>
|
|
99
|
+
</CardContent>
|
|
100
|
+
</Card>
|
|
101
|
+
|
|
102
|
+
{/* tone — a semantic confirmation zero-state. */}
|
|
103
|
+
<Card>
|
|
104
|
+
<CardHeader>
|
|
105
|
+
<CardTitle level={2}>tone:承認済み(success)</CardTitle>
|
|
106
|
+
</CardHeader>
|
|
107
|
+
<CardContent>
|
|
108
|
+
<EmptyState
|
|
109
|
+
tone="success"
|
|
110
|
+
icon={CheckCircle2}
|
|
111
|
+
title="端末を承認しました"
|
|
112
|
+
description="この端末からサインインできるようになりました。"
|
|
113
|
+
titleLevel={3}
|
|
114
|
+
/>
|
|
115
|
+
</CardContent>
|
|
116
|
+
</Card>
|
|
117
|
+
|
|
118
|
+
{/* tone — the remaining four steps. tone tints the icon medallion only; the copy still
|
|
119
|
+
carries the meaning, so a zero-state never relies on colour alone. */}
|
|
120
|
+
<Card>
|
|
121
|
+
<CardHeader>
|
|
122
|
+
<CardTitle level={2}>tone:warning / destructive / info / muted(既定)</CardTitle>
|
|
123
|
+
</CardHeader>
|
|
124
|
+
<CardContent>
|
|
125
|
+
<ResponsiveGrid columns={{ sm: 1, md: 2 }}>
|
|
126
|
+
<EmptyState
|
|
127
|
+
variant="section"
|
|
128
|
+
tone="warning"
|
|
129
|
+
icon={AlertTriangle}
|
|
130
|
+
title="未処理の取込エラーがあります"
|
|
131
|
+
description="取込ログを確認してから再実行してください。"
|
|
132
|
+
titleLevel={3}
|
|
133
|
+
/>
|
|
134
|
+
<EmptyState
|
|
135
|
+
variant="section"
|
|
136
|
+
tone="destructive"
|
|
137
|
+
icon={XCircle}
|
|
138
|
+
title="同期が停止しています"
|
|
139
|
+
description="接続資格情報の期限が切れたため、データを取得できません。"
|
|
140
|
+
titleLevel={3}
|
|
141
|
+
/>
|
|
142
|
+
<EmptyState
|
|
143
|
+
variant="section"
|
|
144
|
+
tone="info"
|
|
145
|
+
icon={Info}
|
|
146
|
+
title="集計はまだ準備中です"
|
|
147
|
+
description="当月分の集計は翌営業日の午前に反映されます。"
|
|
148
|
+
titleLevel={3}
|
|
149
|
+
/>
|
|
150
|
+
<EmptyState
|
|
151
|
+
variant="section"
|
|
152
|
+
tone="muted"
|
|
153
|
+
icon={Archive}
|
|
154
|
+
title="アーカイブは空です"
|
|
155
|
+
description="tone を省略したときの既定です。中立な余白として振る舞います。"
|
|
156
|
+
titleLevel={3}
|
|
157
|
+
/>
|
|
158
|
+
</ResponsiveGrid>
|
|
159
|
+
</CardContent>
|
|
160
|
+
</Card>
|
|
161
|
+
</Flex>
|
|
162
|
+
</PageContainer>
|
|
163
|
+
);
|
|
164
|
+
}
|