@godxjp/ui 19.1.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/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/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 +48 -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 +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 +9 -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,156 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Card,
|
|
3
|
+
CardContent,
|
|
4
|
+
CardDescription,
|
|
5
|
+
CardHeader,
|
|
6
|
+
CardTitle,
|
|
7
|
+
Carousel,
|
|
8
|
+
CarouselContent,
|
|
9
|
+
CarouselDots,
|
|
10
|
+
CarouselItem,
|
|
11
|
+
CarouselNext,
|
|
12
|
+
CarouselPrevious,
|
|
13
|
+
StatCard,
|
|
14
|
+
} from "@godxjp/ui/data-display";
|
|
15
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Carousel — Embla-backed stepping list with prev/next controls.
|
|
19
|
+
* Compose Carousel > CarouselContent > CarouselItem + CarouselPrevious/Next.
|
|
20
|
+
* Structurally configured via `opts` (loop, align, axis) and `plugins`; `setApi`
|
|
21
|
+
* exposes the Embla api for external controls (e.g. dot indicators via scrollTo).
|
|
22
|
+
* Composed only from real @godxjp/ui components.
|
|
23
|
+
*/
|
|
24
|
+
const months = [
|
|
25
|
+
{ label: "1月 売上", value: "¥7.4M", delta: "+4%" },
|
|
26
|
+
{ label: "2月 売上", value: "¥7.9M", delta: "+7%" },
|
|
27
|
+
{ label: "3月 売上", value: "¥8.0M", delta: "+1%" },
|
|
28
|
+
{ label: "4月 売上", value: "¥8.2M", delta: "+12%" },
|
|
29
|
+
{ label: "5月 売上", value: "¥8.6M", delta: "+5%" },
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
const slides = [
|
|
33
|
+
{ label: "第1四半期", value: "¥23.3M" },
|
|
34
|
+
{ label: "第2四半期", value: "¥25.4M" },
|
|
35
|
+
{ label: "第3四半期", value: "¥26.1M" },
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
/** Dot navigation — `CarouselDots` reads the Embla api from context; no manual `setApi` wiring. */
|
|
39
|
+
function DotNavExample() {
|
|
40
|
+
return (
|
|
41
|
+
<Carousel
|
|
42
|
+
className="px-10"
|
|
43
|
+
opts={{ loop: true }}
|
|
44
|
+
aria-label="ドットナビゲーション付きカルーセル"
|
|
45
|
+
>
|
|
46
|
+
<CarouselContent>
|
|
47
|
+
{slides.map((s) => (
|
|
48
|
+
<CarouselItem key={s.label}>
|
|
49
|
+
<StatCard label={s.label} value={s.value} />
|
|
50
|
+
</CarouselItem>
|
|
51
|
+
))}
|
|
52
|
+
</CarouselContent>
|
|
53
|
+
<CarouselPrevious />
|
|
54
|
+
<CarouselNext />
|
|
55
|
+
<CarouselDots />
|
|
56
|
+
</Carousel>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default function Demo() {
|
|
61
|
+
return (
|
|
62
|
+
<PageContainer title="Carousel" subtitle="Embla-backed stepping list with prev/next controls">
|
|
63
|
+
<Flex direction="col" gap="lg">
|
|
64
|
+
{/* Default horizontal, multi-up responsive track. px-10 clears the absolute arrow buttons. */}
|
|
65
|
+
<Card>
|
|
66
|
+
<CardHeader>
|
|
67
|
+
<CardTitle level={2}>月次 KPI</CardTitle>
|
|
68
|
+
<CardDescription>
|
|
69
|
+
Default horizontal track. Step with prev/next; arrows auto-disable at the first and
|
|
70
|
+
last slide.
|
|
71
|
+
</CardDescription>
|
|
72
|
+
</CardHeader>
|
|
73
|
+
<CardContent>
|
|
74
|
+
<Carousel className="px-10" aria-label="月次 KPI カルーセル">
|
|
75
|
+
<CarouselContent>
|
|
76
|
+
{months.map((m) => (
|
|
77
|
+
<CarouselItem key={m.label} className="basis-full sm:basis-1/2 lg:basis-1/3">
|
|
78
|
+
<StatCard label={m.label} value={m.value} delta={m.delta} />
|
|
79
|
+
</CarouselItem>
|
|
80
|
+
))}
|
|
81
|
+
</CarouselContent>
|
|
82
|
+
<CarouselPrevious />
|
|
83
|
+
<CarouselNext />
|
|
84
|
+
</Carousel>
|
|
85
|
+
</CardContent>
|
|
86
|
+
</Card>
|
|
87
|
+
|
|
88
|
+
{/* opts: looping single-up gallery — wraps past the ends, so both arrows stay enabled. */}
|
|
89
|
+
<Card>
|
|
90
|
+
<CardHeader>
|
|
91
|
+
<CardTitle level={2}>ループ ギャラリー</CardTitle>
|
|
92
|
+
<CardDescription>
|
|
93
|
+
opts={{ loop: true, align: "start" }} — wraps past the
|
|
94
|
+
ends, so prev/next never disable.
|
|
95
|
+
</CardDescription>
|
|
96
|
+
</CardHeader>
|
|
97
|
+
<CardContent>
|
|
98
|
+
<Carousel
|
|
99
|
+
className="px-10"
|
|
100
|
+
opts={{ loop: true, align: "start" }}
|
|
101
|
+
aria-label="ループギャラリーカルーセル"
|
|
102
|
+
>
|
|
103
|
+
<CarouselContent>
|
|
104
|
+
{months.map((m) => (
|
|
105
|
+
<CarouselItem key={m.label}>
|
|
106
|
+
<StatCard label={m.label} value={m.value} delta={m.delta} />
|
|
107
|
+
</CarouselItem>
|
|
108
|
+
))}
|
|
109
|
+
</CarouselContent>
|
|
110
|
+
<CarouselPrevious />
|
|
111
|
+
<CarouselNext />
|
|
112
|
+
</Carousel>
|
|
113
|
+
</CardContent>
|
|
114
|
+
</Card>
|
|
115
|
+
|
|
116
|
+
{/* setApi + scrollTo: external dot navigation, active dot seeded visible at rest. */}
|
|
117
|
+
<Card>
|
|
118
|
+
<CardHeader>
|
|
119
|
+
<CardTitle level={2}>ドット ナビゲーション</CardTitle>
|
|
120
|
+
<CardDescription>
|
|
121
|
+
Drop in CarouselDots and it reads the Embla api from context, rendering one dot per
|
|
122
|
+
slide. The active dot widens and carries aria-current.
|
|
123
|
+
</CardDescription>
|
|
124
|
+
</CardHeader>
|
|
125
|
+
<CardContent>
|
|
126
|
+
<DotNavExample />
|
|
127
|
+
</CardContent>
|
|
128
|
+
</Card>
|
|
129
|
+
|
|
130
|
+
{/* opts.axis: vertical orientation — emits data-orientation="vertical". */}
|
|
131
|
+
<Card>
|
|
132
|
+
<CardHeader>
|
|
133
|
+
<CardTitle level={2}>縦方向 (vertical)</CardTitle>
|
|
134
|
+
<CardDescription>
|
|
135
|
+
opts={{ axis: "y" }} — stacks slides and moves the
|
|
136
|
+
prev/next controls to top and bottom.
|
|
137
|
+
</CardDescription>
|
|
138
|
+
</CardHeader>
|
|
139
|
+
<CardContent>
|
|
140
|
+
<Carousel className="py-10" opts={{ axis: "y" }} aria-label="縦方向カルーセル">
|
|
141
|
+
<CarouselContent className="h-48">
|
|
142
|
+
{slides.map((s) => (
|
|
143
|
+
<CarouselItem key={s.label}>
|
|
144
|
+
<StatCard label={s.label} value={s.value} />
|
|
145
|
+
</CarouselItem>
|
|
146
|
+
))}
|
|
147
|
+
</CarouselContent>
|
|
148
|
+
<CarouselPrevious />
|
|
149
|
+
<CarouselNext />
|
|
150
|
+
</Carousel>
|
|
151
|
+
</CardContent>
|
|
152
|
+
</Card>
|
|
153
|
+
</Flex>
|
|
154
|
+
</PageContainer>
|
|
155
|
+
);
|
|
156
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
2
|
+
import { Flex, PageContainer, ResponsiveGrid } from "@godxjp/ui/layout";
|
|
3
|
+
import { AreaChart, BarChart, LineChart, PieChart } from "@godxjp/ui/charts";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Charts — tree-shaken `@godxjp/ui/charts` entry (needs the `recharts` optional
|
|
7
|
+
* peer). Every chart owns the `--chart-1..6` palette, locale-aware Intl number
|
|
8
|
+
* formatting on its ticks/tooltips, a visible caption + a screen-reader text
|
|
9
|
+
* alternative, and a built-in empty state. Composed only from real primitives.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const revenue = [
|
|
13
|
+
{ month: "1月", plan: 1200000, actual: 980000 },
|
|
14
|
+
{ month: "2月", plan: 1500000, actual: 1610000 },
|
|
15
|
+
{ month: "3月", plan: 1800000, actual: 1750000 },
|
|
16
|
+
{ month: "4月", plan: 1600000, actual: 1720000 },
|
|
17
|
+
{ month: "5月", plan: 2000000, actual: 1980000 },
|
|
18
|
+
{ month: "6月", plan: 2200000, actual: 2410000 },
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
const traffic = [
|
|
22
|
+
{ day: "月", organic: 320, paid: 140, referral: 80 },
|
|
23
|
+
{ day: "火", organic: 410, paid: 180, referral: 90 },
|
|
24
|
+
{ day: "水", organic: 380, paid: 160, referral: 110 },
|
|
25
|
+
{ day: "木", organic: 520, paid: 220, referral: 130 },
|
|
26
|
+
{ day: "金", organic: 610, paid: 260, referral: 150 },
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
const expenses = [
|
|
30
|
+
{ category: "給与", amount: 4200000 },
|
|
31
|
+
{ category: "家賃", amount: 1800000 },
|
|
32
|
+
{ category: "光熱費", amount: 600000 },
|
|
33
|
+
{ category: "システム", amount: 950000 },
|
|
34
|
+
{ category: "その他", amount: 430000 },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const sparseRevenue = [
|
|
38
|
+
{ month: "1月", actual: 980000 },
|
|
39
|
+
{ month: "2月", actual: null },
|
|
40
|
+
{ month: "非常に長いカテゴリ名", actual: -120000 },
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
const jpy = { style: "currency", currency: "JPY" } as const;
|
|
44
|
+
|
|
45
|
+
export default function Demo() {
|
|
46
|
+
return (
|
|
47
|
+
<PageContainer
|
|
48
|
+
title="Charts"
|
|
49
|
+
subtitle="recharts をラップしたツリーシェイク可能なグラフ群 · トークン配色・ロケール数値・代替テキストを内蔵"
|
|
50
|
+
>
|
|
51
|
+
<Flex direction="col" gap="lg">
|
|
52
|
+
<Card>
|
|
53
|
+
<CardHeader>
|
|
54
|
+
<CardTitle level={2}>LineChart · 月次トレンド</CardTitle>
|
|
55
|
+
<CardDescription>
|
|
56
|
+
複数系列の推移。numberFormat で通貨をロケールに合わせて表示します。
|
|
57
|
+
</CardDescription>
|
|
58
|
+
</CardHeader>
|
|
59
|
+
<CardContent>
|
|
60
|
+
<LineChart
|
|
61
|
+
label="月次売上(計画 vs 実績)"
|
|
62
|
+
data={revenue}
|
|
63
|
+
categoryKey="month"
|
|
64
|
+
series={[
|
|
65
|
+
{ dataKey: "plan", label: "計画" },
|
|
66
|
+
{ dataKey: "actual", label: "実績" },
|
|
67
|
+
]}
|
|
68
|
+
numberFormat={jpy}
|
|
69
|
+
curved
|
|
70
|
+
/>
|
|
71
|
+
</CardContent>
|
|
72
|
+
</Card>
|
|
73
|
+
|
|
74
|
+
<ResponsiveGrid columns={2}>
|
|
75
|
+
<Card>
|
|
76
|
+
<CardHeader>
|
|
77
|
+
<CardTitle level={2}>BarChart · 地域/期間比較</CardTitle>
|
|
78
|
+
<CardDescription>compact 表記。stacked で構成比に切替可能。</CardDescription>
|
|
79
|
+
</CardHeader>
|
|
80
|
+
<CardContent>
|
|
81
|
+
<BarChart
|
|
82
|
+
label="曜日別トラフィック"
|
|
83
|
+
data={traffic}
|
|
84
|
+
categoryKey="day"
|
|
85
|
+
series={[
|
|
86
|
+
{ dataKey: "organic", label: "オーガニック" },
|
|
87
|
+
{ dataKey: "paid", label: "広告" },
|
|
88
|
+
{ dataKey: "referral", label: "参照" },
|
|
89
|
+
]}
|
|
90
|
+
numberFormat={{ notation: "compact" }}
|
|
91
|
+
stacked
|
|
92
|
+
/>
|
|
93
|
+
</CardContent>
|
|
94
|
+
</Card>
|
|
95
|
+
|
|
96
|
+
<Card>
|
|
97
|
+
<CardHeader>
|
|
98
|
+
<CardTitle level={2}>AreaChart · 累積構成</CardTitle>
|
|
99
|
+
<CardDescription>stacked で合計の積み上がりを表現。</CardDescription>
|
|
100
|
+
</CardHeader>
|
|
101
|
+
<CardContent>
|
|
102
|
+
<AreaChart
|
|
103
|
+
label="チャネル別トラフィック(積み上げ)"
|
|
104
|
+
data={traffic}
|
|
105
|
+
categoryKey="day"
|
|
106
|
+
series={[
|
|
107
|
+
{ dataKey: "organic", label: "オーガニック" },
|
|
108
|
+
{ dataKey: "paid", label: "広告" },
|
|
109
|
+
{ dataKey: "referral", label: "参照" },
|
|
110
|
+
]}
|
|
111
|
+
stacked
|
|
112
|
+
/>
|
|
113
|
+
</CardContent>
|
|
114
|
+
</Card>
|
|
115
|
+
</ResponsiveGrid>
|
|
116
|
+
|
|
117
|
+
<ResponsiveGrid columns={2}>
|
|
118
|
+
<Card>
|
|
119
|
+
<CardHeader>
|
|
120
|
+
<CardTitle level={2}>PieChart · 構成比</CardTitle>
|
|
121
|
+
<CardDescription>少数スライス向け。donut にも切替可能。</CardDescription>
|
|
122
|
+
</CardHeader>
|
|
123
|
+
<CardContent>
|
|
124
|
+
<PieChart
|
|
125
|
+
label="経費内訳"
|
|
126
|
+
data={expenses}
|
|
127
|
+
dataKey="amount"
|
|
128
|
+
nameKey="category"
|
|
129
|
+
numberFormat={jpy}
|
|
130
|
+
donut
|
|
131
|
+
/>
|
|
132
|
+
</CardContent>
|
|
133
|
+
</Card>
|
|
134
|
+
|
|
135
|
+
<Card>
|
|
136
|
+
<CardHeader>
|
|
137
|
+
<CardTitle level={2}>空状態</CardTitle>
|
|
138
|
+
<CardDescription>data が空のとき EmptyState を表示します。</CardDescription>
|
|
139
|
+
</CardHeader>
|
|
140
|
+
<CardContent>
|
|
141
|
+
<BarChart
|
|
142
|
+
label="売上(データなし)"
|
|
143
|
+
data={[]}
|
|
144
|
+
categoryKey="month"
|
|
145
|
+
series={[{ dataKey: "actual", label: "実績" }]}
|
|
146
|
+
size="sm"
|
|
147
|
+
/>
|
|
148
|
+
</CardContent>
|
|
149
|
+
</Card>
|
|
150
|
+
</ResponsiveGrid>
|
|
151
|
+
|
|
152
|
+
<ResponsiveGrid columns={2}>
|
|
153
|
+
<Card>
|
|
154
|
+
<CardHeader>
|
|
155
|
+
<CardTitle level={2}>BarChart · 横方向・非積み上げ</CardTitle>
|
|
156
|
+
<CardDescription>長いカテゴリと負数を含む edge-data frame。</CardDescription>
|
|
157
|
+
</CardHeader>
|
|
158
|
+
<CardContent>
|
|
159
|
+
<BarChart
|
|
160
|
+
label="例外値を含む売上"
|
|
161
|
+
description="null、負数、長いカテゴリ名の描画と代替テキストを確認します。"
|
|
162
|
+
data={sparseRevenue}
|
|
163
|
+
categoryKey="month"
|
|
164
|
+
series={[{ dataKey: "actual", label: "実績", color: "var(--chart-3)" }]}
|
|
165
|
+
numberFormat={jpy}
|
|
166
|
+
horizontal
|
|
167
|
+
showGrid={false}
|
|
168
|
+
showLegend={false}
|
|
169
|
+
size="xs"
|
|
170
|
+
/>
|
|
171
|
+
</CardContent>
|
|
172
|
+
</Card>
|
|
173
|
+
|
|
174
|
+
<Card>
|
|
175
|
+
<CardHeader>
|
|
176
|
+
<CardTitle level={2}>PieChart · full pie・custom colours</CardTitle>
|
|
177
|
+
<CardDescription>donut=false と colors の明示指定。</CardDescription>
|
|
178
|
+
</CardHeader>
|
|
179
|
+
<CardContent>
|
|
180
|
+
<PieChart
|
|
181
|
+
id="expenses-full-pie"
|
|
182
|
+
label="経費内訳(円グラフ)"
|
|
183
|
+
description="カスタム配色を使用した full pie。"
|
|
184
|
+
data={expenses.slice(0, 3)}
|
|
185
|
+
dataKey="amount"
|
|
186
|
+
nameKey="category"
|
|
187
|
+
colors={["var(--chart-2)", "var(--chart-4)", "var(--chart-6)"]}
|
|
188
|
+
numberFormat={jpy}
|
|
189
|
+
height={240}
|
|
190
|
+
showLegend={false}
|
|
191
|
+
/>
|
|
192
|
+
</CardContent>
|
|
193
|
+
</Card>
|
|
194
|
+
</ResponsiveGrid>
|
|
195
|
+
</Flex>
|
|
196
|
+
</PageContainer>
|
|
197
|
+
);
|
|
198
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Card,
|
|
3
|
+
CardContent,
|
|
4
|
+
CardDescription,
|
|
5
|
+
CardHeader,
|
|
6
|
+
CardTitle,
|
|
7
|
+
CodeBlock,
|
|
8
|
+
} from "@godxjp/ui/data-display";
|
|
9
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
10
|
+
|
|
11
|
+
const responseBody = `{
|
|
12
|
+
"data": {
|
|
13
|
+
"id": 2,
|
|
14
|
+
"key": "EXSELI-2",
|
|
15
|
+
"title": "見積画面で合計が更新されない",
|
|
16
|
+
"attachments": [
|
|
17
|
+
{ "id": 7, "name": "trace.har", "size": 65536 },
|
|
18
|
+
{ "id": 8, "name": "screenshot.png", "size": 240113 }
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}`;
|
|
22
|
+
|
|
23
|
+
const consoleLog = `[12:04:11.203] warn Deprecated: estimate.total is read before hydrate()
|
|
24
|
+
[12:04:11.209] error TypeError: Cannot read properties of undefined (reading 'total')
|
|
25
|
+
at EstimateSummary (estimate-summary.tsx:41:17)
|
|
26
|
+
[12:04:11.210] info retry 1/3`;
|
|
27
|
+
|
|
28
|
+
const longHeader =
|
|
29
|
+
'report-to: {"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=' +
|
|
30
|
+
"x".repeat(200) +
|
|
31
|
+
'"}],"group":"cf-nel","max_age":604800}';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* CodeBlock — a block of preformatted text: request and response bodies, console output,
|
|
35
|
+
* snippets. Wraps long lines by default and scrolls inside the block past `maxHeight`.
|
|
36
|
+
* Composed only from real @godxjp/ui components.
|
|
37
|
+
*/
|
|
38
|
+
export default function Demo() {
|
|
39
|
+
return (
|
|
40
|
+
<PageContainer title="CodeBlock" subtitle="整形済みテキストのブロック · 折り返しと高さ上限">
|
|
41
|
+
<Flex direction="col" gap="lg">
|
|
42
|
+
<Card>
|
|
43
|
+
<CardHeader>
|
|
44
|
+
<CardTitle level={2}>Response body (maxHeight="sm")</CardTitle>
|
|
45
|
+
<CardDescription>
|
|
46
|
+
64 KB のレスポンスでもページを押し下げない。上限を超えるとブロック内でスクロールする。
|
|
47
|
+
</CardDescription>
|
|
48
|
+
</CardHeader>
|
|
49
|
+
<CardContent>
|
|
50
|
+
<CodeBlock maxHeight="sm" language="json" aria-label="Response body">
|
|
51
|
+
{responseBody}
|
|
52
|
+
</CodeBlock>
|
|
53
|
+
</CardContent>
|
|
54
|
+
</Card>
|
|
55
|
+
|
|
56
|
+
<Card>
|
|
57
|
+
<CardHeader>
|
|
58
|
+
<CardTitle level={2}>Console (size="xs", maxHeight="md")</CardTitle>
|
|
59
|
+
<CardDescription>ログは xs で密に。行の折り返しは既定で有効。</CardDescription>
|
|
60
|
+
</CardHeader>
|
|
61
|
+
<CardContent>
|
|
62
|
+
<CodeBlock size="xs" maxHeight="md" aria-label="Console output">
|
|
63
|
+
{consoleLog}
|
|
64
|
+
</CodeBlock>
|
|
65
|
+
</CardContent>
|
|
66
|
+
</Card>
|
|
67
|
+
|
|
68
|
+
<Card>
|
|
69
|
+
<CardHeader>
|
|
70
|
+
<CardTitle level={2}>Long line: wrap (default) vs wrap={"{false}"}</CardTitle>
|
|
71
|
+
<CardDescription>
|
|
72
|
+
241 文字のヘッダー値。既定はカード内で折り返す。wrap=false は横スクロールになる
|
|
73
|
+
(maxHeight="lg" / "none")。
|
|
74
|
+
</CardDescription>
|
|
75
|
+
</CardHeader>
|
|
76
|
+
<CardContent>
|
|
77
|
+
<Flex direction="col" gap="md">
|
|
78
|
+
<CodeBlock size="sm" maxHeight="none" aria-label="Wrapped header">
|
|
79
|
+
{longHeader}
|
|
80
|
+
</CodeBlock>
|
|
81
|
+
<CodeBlock wrap={false} maxHeight="lg" aria-label="Unwrapped header">
|
|
82
|
+
{longHeader}
|
|
83
|
+
</CodeBlock>
|
|
84
|
+
</Flex>
|
|
85
|
+
</CardContent>
|
|
86
|
+
</Card>
|
|
87
|
+
</Flex>
|
|
88
|
+
</PageContainer>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Card,
|
|
3
|
+
CardContent,
|
|
4
|
+
CardDescription,
|
|
5
|
+
CardHeader,
|
|
6
|
+
CardTitle,
|
|
7
|
+
Collapsible,
|
|
8
|
+
CollapsibleContent,
|
|
9
|
+
CollapsibleTrigger,
|
|
10
|
+
} from "@godxjp/ui/data-display";
|
|
11
|
+
import { Button, Text } from "@godxjp/ui/general";
|
|
12
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
13
|
+
import { ChevronsUpDown } from "lucide-react";
|
|
14
|
+
import { useState } from "react";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Collapsible — a single open/close region (no item set; use Accordion for a set
|
|
18
|
+
* of sections). Compose Collapsible + CollapsibleTrigger + CollapsibleContent.
|
|
19
|
+
* Composed only from real @godxjp/ui components.
|
|
20
|
+
*/
|
|
21
|
+
export default function Demo() {
|
|
22
|
+
// Controlled example: open state is owned by the page, not the component.
|
|
23
|
+
const [open, setOpen] = useState(false);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<PageContainer title="Collapsible" subtitle="A single toggleable region">
|
|
27
|
+
<Flex direction="col" gap="lg">
|
|
28
|
+
{/* Uncontrolled pair — defaultOpen vs default-closed, side by side */}
|
|
29
|
+
<Flex direction="col" gap="md" className="md:flex-row">
|
|
30
|
+
<Card className="flex-1">
|
|
31
|
+
<CardHeader>
|
|
32
|
+
<CardTitle level={2}>補助科目(既定で開く)</CardTitle>
|
|
33
|
+
<CardDescription>defaultOpen: 初期表示で展開された状態。</CardDescription>
|
|
34
|
+
</CardHeader>
|
|
35
|
+
<CardContent>
|
|
36
|
+
<Collapsible defaultOpen>
|
|
37
|
+
<Flex direction="row" align="center" justify="between" gap="md">
|
|
38
|
+
<Text weight="medium">普通預金 · 補助科目 (3)</Text>
|
|
39
|
+
<CollapsibleTrigger asChild>
|
|
40
|
+
<Button
|
|
41
|
+
variant="ghost"
|
|
42
|
+
size="icon-sm"
|
|
43
|
+
aria-label="開閉"
|
|
44
|
+
className="transition-transform data-[state=open]:rotate-180"
|
|
45
|
+
>
|
|
46
|
+
<ChevronsUpDown />
|
|
47
|
+
</Button>
|
|
48
|
+
</CollapsibleTrigger>
|
|
49
|
+
</Flex>
|
|
50
|
+
<CollapsibleContent>
|
|
51
|
+
<Flex direction="col" gap="xs">
|
|
52
|
+
<div className="text-sm">GMOあおぞらネット銀行</div>
|
|
53
|
+
<div className="text-sm">三菱UFJ銀行 渋谷支店</div>
|
|
54
|
+
<div className="text-sm">みずほ銀行 当座</div>
|
|
55
|
+
</Flex>
|
|
56
|
+
</CollapsibleContent>
|
|
57
|
+
</Collapsible>
|
|
58
|
+
</CardContent>
|
|
59
|
+
</Card>
|
|
60
|
+
|
|
61
|
+
<Card className="flex-1">
|
|
62
|
+
<CardHeader>
|
|
63
|
+
<CardTitle level={2}>補助科目(既定で閉じる)</CardTitle>
|
|
64
|
+
<CardDescription>初期表示は折りたたみ。トリガーで展開します。</CardDescription>
|
|
65
|
+
</CardHeader>
|
|
66
|
+
<CardContent>
|
|
67
|
+
<Collapsible>
|
|
68
|
+
<Flex direction="row" align="center" justify="between" gap="md">
|
|
69
|
+
<Text weight="medium">当座預金 · 補助科目 (2)</Text>
|
|
70
|
+
<CollapsibleTrigger asChild>
|
|
71
|
+
<Button
|
|
72
|
+
variant="ghost"
|
|
73
|
+
size="icon-sm"
|
|
74
|
+
aria-label="開閉"
|
|
75
|
+
className="transition-transform data-[state=open]:rotate-180"
|
|
76
|
+
>
|
|
77
|
+
<ChevronsUpDown />
|
|
78
|
+
</Button>
|
|
79
|
+
</CollapsibleTrigger>
|
|
80
|
+
</Flex>
|
|
81
|
+
<CollapsibleContent>
|
|
82
|
+
<Flex direction="col" gap="xs">
|
|
83
|
+
<div className="text-sm">三井住友銀行 丸の内支店</div>
|
|
84
|
+
<div className="text-sm">りそな銀行 本店</div>
|
|
85
|
+
</Flex>
|
|
86
|
+
</CollapsibleContent>
|
|
87
|
+
</Collapsible>
|
|
88
|
+
</CardContent>
|
|
89
|
+
</Card>
|
|
90
|
+
</Flex>
|
|
91
|
+
|
|
92
|
+
{/* Controlled — open state owned by the page (open + onOpenChange) */}
|
|
93
|
+
<Card>
|
|
94
|
+
<CardHeader>
|
|
95
|
+
<CardTitle level={2}>制御コンポーネント</CardTitle>
|
|
96
|
+
<CardDescription>open と onOpenChange でページ側が開閉を管理します。</CardDescription>
|
|
97
|
+
</CardHeader>
|
|
98
|
+
<CardContent>
|
|
99
|
+
<Collapsible open={open} onOpenChange={setOpen}>
|
|
100
|
+
<Flex direction="row" align="center" justify="between" gap="md">
|
|
101
|
+
<Text weight="medium">
|
|
102
|
+
外貨預金 · 補助科目 (2) · {open ? "展開中" : "折りたたみ中"}
|
|
103
|
+
</Text>
|
|
104
|
+
<Flex direction="row" align="center" gap="xs">
|
|
105
|
+
<Button variant="outline" size="sm" onClick={() => setOpen((value) => !value)}>
|
|
106
|
+
{open ? "閉じる" : "開く"}
|
|
107
|
+
</Button>
|
|
108
|
+
<CollapsibleTrigger asChild>
|
|
109
|
+
<Button
|
|
110
|
+
variant="ghost"
|
|
111
|
+
size="icon-sm"
|
|
112
|
+
aria-label="開閉"
|
|
113
|
+
className="transition-transform data-[state=open]:rotate-180"
|
|
114
|
+
>
|
|
115
|
+
<ChevronsUpDown />
|
|
116
|
+
</Button>
|
|
117
|
+
</CollapsibleTrigger>
|
|
118
|
+
</Flex>
|
|
119
|
+
</Flex>
|
|
120
|
+
<CollapsibleContent>
|
|
121
|
+
<Flex direction="col" gap="xs">
|
|
122
|
+
<div className="text-sm">USD 普通預金 · シティバンク</div>
|
|
123
|
+
<div className="text-sm">EUR 普通預金 · 三菱UFJ銀行</div>
|
|
124
|
+
</Flex>
|
|
125
|
+
</CollapsibleContent>
|
|
126
|
+
</Collapsible>
|
|
127
|
+
</CardContent>
|
|
128
|
+
</Card>
|
|
129
|
+
|
|
130
|
+
{/* Disabled — locked, non-interactive */}
|
|
131
|
+
<Card>
|
|
132
|
+
<CardHeader>
|
|
133
|
+
<CardTitle level={2}>無効状態</CardTitle>
|
|
134
|
+
<CardDescription>disabled: トリガーが操作不可(ロック)になります。</CardDescription>
|
|
135
|
+
</CardHeader>
|
|
136
|
+
<CardContent>
|
|
137
|
+
<Collapsible disabled defaultOpen>
|
|
138
|
+
<Flex direction="row" align="center" justify="between" gap="md">
|
|
139
|
+
<Text weight="medium">定期預金 · 補助科目 (1) · 締め処理中</Text>
|
|
140
|
+
<CollapsibleTrigger asChild>
|
|
141
|
+
<Button
|
|
142
|
+
variant="ghost"
|
|
143
|
+
size="icon-sm"
|
|
144
|
+
aria-label="開閉"
|
|
145
|
+
className="transition-transform data-[state=open]:rotate-180"
|
|
146
|
+
>
|
|
147
|
+
<ChevronsUpDown />
|
|
148
|
+
</Button>
|
|
149
|
+
</CollapsibleTrigger>
|
|
150
|
+
</Flex>
|
|
151
|
+
<CollapsibleContent>
|
|
152
|
+
<Flex direction="col" gap="xs">
|
|
153
|
+
<div className="text-sm">三菱UFJ銀行 定期 (1年)</div>
|
|
154
|
+
</Flex>
|
|
155
|
+
</CollapsibleContent>
|
|
156
|
+
</Collapsible>
|
|
157
|
+
</CardContent>
|
|
158
|
+
</Card>
|
|
159
|
+
</Flex>
|
|
160
|
+
</PageContainer>
|
|
161
|
+
);
|
|
162
|
+
}
|