@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,248 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Alert,
|
|
3
|
+
AlertActions,
|
|
4
|
+
AlertContent,
|
|
5
|
+
AlertDescription,
|
|
6
|
+
AlertQueryError,
|
|
7
|
+
AlertTitle,
|
|
8
|
+
Banner,
|
|
9
|
+
} from "@godxjp/ui/feedback";
|
|
10
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
11
|
+
import { Button } from "@godxjp/ui/general";
|
|
12
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Alert · inline persistent banner for page-scoped feedback (errors, warnings,
|
|
16
|
+
* success, info). NOT for transient toasts. Compose AlertTitle +
|
|
17
|
+
* AlertDescription inside; add AlertActions for CTA buttons. Pass onDismiss to
|
|
18
|
+
* show the built-in × button.
|
|
19
|
+
*/
|
|
20
|
+
export default function Demo() {
|
|
21
|
+
return (
|
|
22
|
+
<PageContainer
|
|
23
|
+
title="Alert"
|
|
24
|
+
subtitle="tone × variant × dismiss × actions · persistent inline banner (never use for transient feedback)"
|
|
25
|
+
>
|
|
26
|
+
<Flex direction="col" gap="lg">
|
|
27
|
+
<Card>
|
|
28
|
+
<CardHeader>
|
|
29
|
+
<CardTitle level={2}>Every tone branch · variant</CardTitle>
|
|
30
|
+
<CardDescription>
|
|
31
|
+
All seven tone branches, in order: default, success, warning, destructive, info,
|
|
32
|
+
muted, neutral. Tone sets the icon, the surface and the live-region politeness
|
|
33
|
+
(destructive and warning announce assertively; the rest are polite). default, muted
|
|
34
|
+
and neutral deliberately share the quiet neutral surface, so the caller names intent
|
|
35
|
+
without adding colour. variant is the structural axis: the MEASURE of the box, never
|
|
36
|
+
the colour: default (spelled out on the first banner) is this inset, rounded, inline
|
|
37
|
+
alert; banner is the page-level strip shown at the bottom of this page.
|
|
38
|
+
</CardDescription>
|
|
39
|
+
</CardHeader>
|
|
40
|
+
<CardContent>
|
|
41
|
+
<Flex direction="col" gap="md">
|
|
42
|
+
<Alert variant="default" tone="default">
|
|
43
|
+
<AlertTitle>勘定科目マスタを更新しました</AlertTitle>
|
|
44
|
+
<AlertDescription>変更内容は次回の仕訳入力から反映されます。</AlertDescription>
|
|
45
|
+
</Alert>
|
|
46
|
+
<Alert tone="success">
|
|
47
|
+
<AlertTitle>インポートが完了しました</AlertTitle>
|
|
48
|
+
<AlertDescription>1,240 件の仕訳を取り込みました。</AlertDescription>
|
|
49
|
+
</Alert>
|
|
50
|
+
<Alert tone="warning">
|
|
51
|
+
<AlertTitle>3 件の打刻漏れがあります</AlertTitle>
|
|
52
|
+
<AlertDescription>本日中に確認してください。</AlertDescription>
|
|
53
|
+
</Alert>
|
|
54
|
+
<Alert tone="destructive">
|
|
55
|
+
<AlertTitle>請求書の保存に失敗しました</AlertTitle>
|
|
56
|
+
<AlertDescription>
|
|
57
|
+
サーバーエラーが発生しました。内容を確認のうえ再度お試しください。
|
|
58
|
+
</AlertDescription>
|
|
59
|
+
</Alert>
|
|
60
|
+
<Alert tone="info">
|
|
61
|
+
<AlertTitle>電子帳簿保存法の保存要件が変更されます</AlertTitle>
|
|
62
|
+
<AlertDescription>
|
|
63
|
+
2026年1月以降に受領した証憑が対象です。保存設定をご確認ください。
|
|
64
|
+
</AlertDescription>
|
|
65
|
+
</Alert>
|
|
66
|
+
<Alert tone="muted">
|
|
67
|
+
<AlertTitle>この請求書は下書きです</AlertTitle>
|
|
68
|
+
<AlertDescription>送信するまで取引先には表示されません。</AlertDescription>
|
|
69
|
+
</Alert>
|
|
70
|
+
<Alert tone="neutral">
|
|
71
|
+
<AlertTitle>8月10日 02:00 から 04:00 まで定期メンテナンスを行います</AlertTitle>
|
|
72
|
+
<AlertDescription>作業中は仕訳の保存ができません。</AlertDescription>
|
|
73
|
+
</Alert>
|
|
74
|
+
</Flex>
|
|
75
|
+
</CardContent>
|
|
76
|
+
</Card>
|
|
77
|
+
|
|
78
|
+
<Card>
|
|
79
|
+
<CardHeader>
|
|
80
|
+
<CardTitle>AlertContent + cause-aware query recovery</CardTitle>
|
|
81
|
+
<CardDescription>
|
|
82
|
+
Content groups copy; transient errors expose an explicit retry.
|
|
83
|
+
</CardDescription>
|
|
84
|
+
</CardHeader>
|
|
85
|
+
<CardContent>
|
|
86
|
+
<Flex direction="col" gap="md">
|
|
87
|
+
<Alert tone="default">
|
|
88
|
+
<AlertContent>
|
|
89
|
+
<AlertTitle>同期状態</AlertTitle>
|
|
90
|
+
<AlertDescription>最終同期は 2 分前です。</AlertDescription>
|
|
91
|
+
</AlertContent>
|
|
92
|
+
</Alert>
|
|
93
|
+
<AlertQueryError error={new Error("Service unavailable: 503")} onRetry={() => {}} />
|
|
94
|
+
</Flex>
|
|
95
|
+
</CardContent>
|
|
96
|
+
</Card>
|
|
97
|
+
|
|
98
|
+
<Card>
|
|
99
|
+
<CardHeader>
|
|
100
|
+
<CardTitle level={2}>AlertTitle + AlertDescription + AlertActions</CardTitle>
|
|
101
|
+
<CardDescription>
|
|
102
|
+
Wrap text in AlertTitle / AlertDescription; put CTA Buttons in AlertActions (renders
|
|
103
|
+
in the action slot). Never place raw buttons as top-level Alert children.
|
|
104
|
+
</CardDescription>
|
|
105
|
+
</CardHeader>
|
|
106
|
+
<CardContent>
|
|
107
|
+
<Alert tone="warning">
|
|
108
|
+
<AlertTitle>MF 連携トークンの有効期限が近づいています</AlertTitle>
|
|
109
|
+
<AlertDescription>
|
|
110
|
+
7 日以内にトークンが失効します。今すぐ再連携してください。
|
|
111
|
+
</AlertDescription>
|
|
112
|
+
<AlertActions>
|
|
113
|
+
<Button size="sm">再連携する</Button>
|
|
114
|
+
</AlertActions>
|
|
115
|
+
</Alert>
|
|
116
|
+
</CardContent>
|
|
117
|
+
</Card>
|
|
118
|
+
|
|
119
|
+
<Card>
|
|
120
|
+
<CardHeader>
|
|
121
|
+
<CardTitle level={2}>Dismissible banner</CardTitle>
|
|
122
|
+
<CardDescription>
|
|
123
|
+
Pass onDismiss: the component renders an accessible × button automatically. Never
|
|
124
|
+
hand-roll your own dismiss button.
|
|
125
|
+
</CardDescription>
|
|
126
|
+
</CardHeader>
|
|
127
|
+
<CardContent>
|
|
128
|
+
<Alert
|
|
129
|
+
tone="destructive"
|
|
130
|
+
onDismiss={() => {
|
|
131
|
+
/* set session flag */
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
134
|
+
<AlertTitle>請求が未払いです</AlertTitle>
|
|
135
|
+
<AlertDescription>
|
|
136
|
+
期日を過ぎた請求書が 2 件あります。早急にご確認ください。
|
|
137
|
+
</AlertDescription>
|
|
138
|
+
</Alert>
|
|
139
|
+
</CardContent>
|
|
140
|
+
</Card>
|
|
141
|
+
|
|
142
|
+
{/* Banner — the SAME component at the page measure (gh#255). variant="banner" swaps only
|
|
143
|
+
the box: square, edge-to-edge, ruled on the block-end edge, measured by the --banner-*
|
|
144
|
+
tokens. Every tone, the icon, the actions grid and the dismiss ✕ are inherited from the
|
|
145
|
+
inline alert above, so there is nothing new to learn and nothing duplicated.
|
|
146
|
+
`CardContent flush` removes the card inset so the strip really does reach both edges —
|
|
147
|
+
which is the whole point of the variant and cannot be shown inside a padded body. */}
|
|
148
|
+
<Card>
|
|
149
|
+
<CardHeader>
|
|
150
|
+
<CardTitle level={2}>Banner · page-level strip</CardTitle>
|
|
151
|
+
<CardDescription>
|
|
152
|
+
Mount it above PageHeader/PageContainer, or in AppShell to span every route. Use it
|
|
153
|
+
only for page- or app-scoped messages (maintenance, trial expiry, read-only mode); a
|
|
154
|
+
message about ONE section stays an inline Alert inside that section. Never stack two.
|
|
155
|
+
</CardDescription>
|
|
156
|
+
</CardHeader>
|
|
157
|
+
<CardContent flush>
|
|
158
|
+
<Flex direction="col">
|
|
159
|
+
<Banner tone="info">
|
|
160
|
+
<Banner.Title>8月10日 02:00〜04:00 に定期メンテナンスを実施します</Banner.Title>
|
|
161
|
+
<Banner.Description>作業中は仕訳の保存ができません。</Banner.Description>
|
|
162
|
+
</Banner>
|
|
163
|
+
<Banner
|
|
164
|
+
tone="warning"
|
|
165
|
+
onDismiss={() => {
|
|
166
|
+
/* set session flag */
|
|
167
|
+
}}
|
|
168
|
+
>
|
|
169
|
+
<Banner.Content>
|
|
170
|
+
<Banner.Title>お試し期間は残り 3 日です</Banner.Title>
|
|
171
|
+
<Banner.Description>期限までにプランを選択してください。</Banner.Description>
|
|
172
|
+
</Banner.Content>
|
|
173
|
+
<Banner.Actions>
|
|
174
|
+
<Button size="sm">プランを見る</Button>
|
|
175
|
+
</Banner.Actions>
|
|
176
|
+
</Banner>
|
|
177
|
+
<Banner tone="neutral">
|
|
178
|
+
<Banner.Title>閲覧専用モードで表示しています</Banner.Title>
|
|
179
|
+
<Banner.Description>
|
|
180
|
+
サポート担当として代理ログイン中のため、編集操作は無効です。
|
|
181
|
+
</Banner.Description>
|
|
182
|
+
</Banner>
|
|
183
|
+
<Banner tone="destructive">
|
|
184
|
+
<Banner.Title>請求が未払いのため一部機能を停止しています</Banner.Title>
|
|
185
|
+
<Banner.Description>
|
|
186
|
+
期日を過ぎた請求書が 2 件あります。お支払い後、数分で再開されます。
|
|
187
|
+
</Banner.Description>
|
|
188
|
+
</Banner>
|
|
189
|
+
{/* Long EN / VI copy at the same measure — the strip wraps rather than truncating,
|
|
190
|
+
and the actions column keeps its minimum before dropping to its own row. This is
|
|
191
|
+
the 390px stress case: nothing here sets a width. */}
|
|
192
|
+
<Banner tone="warning">
|
|
193
|
+
<Banner.Content>
|
|
194
|
+
<Banner.Title>
|
|
195
|
+
Scheduled maintenance will pause synchronisation for all connected accounting
|
|
196
|
+
workspaces
|
|
197
|
+
</Banner.Title>
|
|
198
|
+
<Banner.Description>
|
|
199
|
+
Journal entries created during the window are queued and submitted automatically
|
|
200
|
+
once the service resumes. No action is required.
|
|
201
|
+
</Banner.Description>
|
|
202
|
+
</Banner.Content>
|
|
203
|
+
<Banner.Actions>
|
|
204
|
+
<Button size="sm" variant="outline">
|
|
205
|
+
View status page
|
|
206
|
+
</Button>
|
|
207
|
+
</Banner.Actions>
|
|
208
|
+
</Banner>
|
|
209
|
+
<Banner tone="info">
|
|
210
|
+
<Banner.Content>
|
|
211
|
+
<Banner.Title>
|
|
212
|
+
Việc đồng bộ dữ liệu hoá đơn sẽ tạm dừng trong thời gian bảo trì định kỳ
|
|
213
|
+
</Banner.Title>
|
|
214
|
+
<Banner.Description>
|
|
215
|
+
Các bút toán được tạo trong khoảng thời gian này sẽ được xếp hàng và gửi lại tự
|
|
216
|
+
động sau khi dịch vụ hoạt động trở lại.
|
|
217
|
+
</Banner.Description>
|
|
218
|
+
</Banner.Content>
|
|
219
|
+
<Banner.Actions>
|
|
220
|
+
<Button size="sm" variant="outline">
|
|
221
|
+
Xem trạng thái
|
|
222
|
+
</Button>
|
|
223
|
+
</Banner.Actions>
|
|
224
|
+
</Banner>
|
|
225
|
+
{/* The remaining three tones. default / muted / neutral deliberately share the quiet
|
|
226
|
+
neutral surface — the caller names intent without adding colour — so all three
|
|
227
|
+
belong here: a reader has to SEE that they resolve alike, not be told. */}
|
|
228
|
+
<Banner tone="default">
|
|
229
|
+
<Banner.Title>新しい利用規約が2026年9月1日に発効します</Banner.Title>
|
|
230
|
+
<Banner.Description>内容は設定画面からいつでも確認できます。</Banner.Description>
|
|
231
|
+
</Banner>
|
|
232
|
+
<Banner tone="success">
|
|
233
|
+
<Banner.Title>すべてのサービスが正常に稼働しています</Banner.Title>
|
|
234
|
+
<Banner.Description>直近のインシデントは解決済みです。</Banner.Description>
|
|
235
|
+
</Banner>
|
|
236
|
+
<Banner tone="muted">
|
|
237
|
+
<Banner.Title>この組織はアーカイブされています</Banner.Title>
|
|
238
|
+
<Banner.Description>
|
|
239
|
+
閲覧のみ可能で、新しい操作は記録されません。
|
|
240
|
+
</Banner.Description>
|
|
241
|
+
</Banner>
|
|
242
|
+
</Flex>
|
|
243
|
+
</CardContent>
|
|
244
|
+
</Card>
|
|
245
|
+
</Flex>
|
|
246
|
+
</PageContainer>
|
|
247
|
+
);
|
|
248
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Banner } from "@godxjp/ui/feedback";
|
|
3
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
4
|
+
import { Button } from "@godxjp/ui/general";
|
|
5
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Banner · full-bleed page/shell attention strip (godxjp-ui#255) — the Alert
|
|
9
|
+
* primitive with the structural axis fixed to variant="banner". Persistent,
|
|
10
|
+
* page/shell-scoped, at most one per surface. tone owns colour + icon +
|
|
11
|
+
* live-region politeness; onDismiss renders the built-in dismiss (last in focus
|
|
12
|
+
* order); actions wrap onto their own full-width line below the 640px step so a
|
|
13
|
+
* 390px viewport wraps instead of clipping.
|
|
14
|
+
*/
|
|
15
|
+
export default function Demo() {
|
|
16
|
+
const [dismissed, setDismissed] = useState(false);
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<PageContainer
|
|
20
|
+
title="Banner"
|
|
21
|
+
subtitle="tone × actions × dismiss · full-bleed attention strip (the inline-card presentation is Alert)"
|
|
22
|
+
>
|
|
23
|
+
<Flex direction="col" gap="lg">
|
|
24
|
+
<Card>
|
|
25
|
+
<CardHeader>
|
|
26
|
+
<CardTitle level={2}>Canonical shell notices · every tone</CardTitle>
|
|
27
|
+
<CardDescription>
|
|
28
|
+
The strip runs edge-to-edge with square corners and a single tone-coloured hairline on
|
|
29
|
+
the block-end edge. Geometry is owned by the --banner-* tokens, never consumer CSS.
|
|
30
|
+
destructive and warning announce assertively (role=alert); the rest politely
|
|
31
|
+
(role=status).
|
|
32
|
+
</CardDescription>
|
|
33
|
+
</CardHeader>
|
|
34
|
+
<CardContent flush>
|
|
35
|
+
<Flex direction="col" gap="md">
|
|
36
|
+
<Banner tone="warning">
|
|
37
|
+
<Banner.Content>
|
|
38
|
+
<Banner.Title>お支払いが確認できていません</Banner.Title>
|
|
39
|
+
<Banner.Description>
|
|
40
|
+
サービスの停止を避けるため、お支払い方法を更新してください。
|
|
41
|
+
</Banner.Description>
|
|
42
|
+
</Banner.Content>
|
|
43
|
+
<Banner.Actions>
|
|
44
|
+
<Button size="sm" variant="outline">
|
|
45
|
+
お支払い方法を更新
|
|
46
|
+
</Button>
|
|
47
|
+
</Banner.Actions>
|
|
48
|
+
</Banner>
|
|
49
|
+
<Banner tone="info">
|
|
50
|
+
<Banner.Content>
|
|
51
|
+
<Banner.Title>サポートセッションが進行中です</Banner.Title>
|
|
52
|
+
<Banner.Description>
|
|
53
|
+
担当者(田中)がお客様の組織を閲覧しています。
|
|
54
|
+
</Banner.Description>
|
|
55
|
+
</Banner.Content>
|
|
56
|
+
<Banner.Actions>
|
|
57
|
+
<Button size="sm" variant="outline">
|
|
58
|
+
セッションを終了
|
|
59
|
+
</Button>
|
|
60
|
+
</Banner.Actions>
|
|
61
|
+
</Banner>
|
|
62
|
+
<Banner tone="destructive">
|
|
63
|
+
<Banner.Title>一部のサービスで障害が発生しています</Banner.Title>
|
|
64
|
+
<Banner.Description>
|
|
65
|
+
復旧状況はステータスページをご確認ください。
|
|
66
|
+
</Banner.Description>
|
|
67
|
+
</Banner>
|
|
68
|
+
<Banner tone="success">
|
|
69
|
+
<Banner.Title>お支払いを確認しました</Banner.Title>
|
|
70
|
+
<Banner.Description>すべての機能が再び利用可能になりました。</Banner.Description>
|
|
71
|
+
</Banner>
|
|
72
|
+
<Banner tone="neutral">
|
|
73
|
+
<Banner.Title>8月24日 02:00〜04:00 に定期メンテナンスを行います</Banner.Title>
|
|
74
|
+
<Banner.Description>作業中は一部の操作が制限されます。</Banner.Description>
|
|
75
|
+
</Banner>
|
|
76
|
+
<Banner tone="muted">
|
|
77
|
+
<Banner.Title>この組織はアーカイブ済みです</Banner.Title>
|
|
78
|
+
<Banner.Description>閲覧のみ可能で、変更はできません。</Banner.Description>
|
|
79
|
+
</Banner>
|
|
80
|
+
</Flex>
|
|
81
|
+
</CardContent>
|
|
82
|
+
</Card>
|
|
83
|
+
|
|
84
|
+
<Card>
|
|
85
|
+
<CardHeader>
|
|
86
|
+
<CardTitle level={2}>Dismissible · built-in control, focus order</CardTitle>
|
|
87
|
+
<CardDescription>
|
|
88
|
+
onDismiss renders the localized dismiss button pinned top/inline-end and LAST in DOM
|
|
89
|
+
order: keyboard focus reaches content, then actions, then dismiss. Never hand-roll an
|
|
90
|
+
× inside Banner.Actions.
|
|
91
|
+
</CardDescription>
|
|
92
|
+
</CardHeader>
|
|
93
|
+
<CardContent flush>
|
|
94
|
+
{dismissed ? (
|
|
95
|
+
<Banner tone="default" icon={false}>
|
|
96
|
+
<Banner.Content>
|
|
97
|
+
<Banner.Title>通知を閉じました</Banner.Title>
|
|
98
|
+
<Banner.Description>このデモでは再表示できます。</Banner.Description>
|
|
99
|
+
</Banner.Content>
|
|
100
|
+
<Banner.Actions>
|
|
101
|
+
<Button size="sm" variant="outline" onClick={() => setDismissed(false)}>
|
|
102
|
+
通知を再表示
|
|
103
|
+
</Button>
|
|
104
|
+
</Banner.Actions>
|
|
105
|
+
</Banner>
|
|
106
|
+
) : (
|
|
107
|
+
<Banner tone="neutral" onDismiss={() => setDismissed(true)}>
|
|
108
|
+
<Banner.Title>新しい管理コンソールをお試しいただけます</Banner.Title>
|
|
109
|
+
<Banner.Description>設定画面からいつでも元の表示に戻せます。</Banner.Description>
|
|
110
|
+
</Banner>
|
|
111
|
+
)}
|
|
112
|
+
</CardContent>
|
|
113
|
+
</Card>
|
|
114
|
+
|
|
115
|
+
<Card>
|
|
116
|
+
<CardHeader>
|
|
117
|
+
<CardTitle level={2}>Long JA / EN / VI copy · 390px wrapping</CardTitle>
|
|
118
|
+
<CardDescription>
|
|
119
|
+
The text column wraps inside min-width 0 and actions drop onto their own full-width
|
|
120
|
+
wrapping line below the 640px step. Narrow this frame to 390px: nothing clips, nothing
|
|
121
|
+
overflows horizontally.
|
|
122
|
+
</CardDescription>
|
|
123
|
+
</CardHeader>
|
|
124
|
+
<CardContent flush>
|
|
125
|
+
<Flex direction="col" gap="md">
|
|
126
|
+
<Banner tone="warning">
|
|
127
|
+
<Banner.Content>
|
|
128
|
+
<Banner.Title>
|
|
129
|
+
ご契約中のプランのお支払い期限が過ぎています。未払いの状態が続く場合、組織内のすべてのサービスが自動的に停止されます
|
|
130
|
+
</Banner.Title>
|
|
131
|
+
<Banner.Description>
|
|
132
|
+
請求書番号 INV-2026-08-0042
|
|
133
|
+
のお支払いが確認できていません。お支払い方法の更新、または経理担当者への再送をお願いします。
|
|
134
|
+
</Banner.Description>
|
|
135
|
+
</Banner.Content>
|
|
136
|
+
<Banner.Actions>
|
|
137
|
+
<Button size="sm" variant="outline">
|
|
138
|
+
請求書を再送
|
|
139
|
+
</Button>
|
|
140
|
+
<Button size="sm">お支払い方法を更新</Button>
|
|
141
|
+
</Banner.Actions>
|
|
142
|
+
</Banner>
|
|
143
|
+
<Banner tone="info">
|
|
144
|
+
<Banner.Content>
|
|
145
|
+
<Banner.Title>
|
|
146
|
+
A scheduled maintenance window will interrupt single sign-on for all connected
|
|
147
|
+
services this weekend
|
|
148
|
+
</Banner.Title>
|
|
149
|
+
<Banner.Description>
|
|
150
|
+
Between Saturday 22:00 and Sunday 02:00 (JST), sign-in and token refresh will be
|
|
151
|
+
unavailable. Active sessions continue to work.
|
|
152
|
+
</Banner.Description>
|
|
153
|
+
</Banner.Content>
|
|
154
|
+
<Banner.Actions>
|
|
155
|
+
<Button size="sm" variant="outline">
|
|
156
|
+
View status page
|
|
157
|
+
</Button>
|
|
158
|
+
</Banner.Actions>
|
|
159
|
+
</Banner>
|
|
160
|
+
<Banner tone="destructive">
|
|
161
|
+
<Banner.Content>
|
|
162
|
+
<Banner.Title>
|
|
163
|
+
Phiên hỗ trợ từ xa đang hoạt động. Nhân viên hỗ trợ hiện có thể xem toàn bộ dữ
|
|
164
|
+
liệu tổ chức của bạn cho đến khi phiên kết thúc
|
|
165
|
+
</Banner.Title>
|
|
166
|
+
<Banner.Description>
|
|
167
|
+
Nếu bạn không yêu cầu phiên hỗ trợ này, hãy kết thúc ngay và đổi mật khẩu quản
|
|
168
|
+
trị của tổ chức.
|
|
169
|
+
</Banner.Description>
|
|
170
|
+
</Banner.Content>
|
|
171
|
+
<Banner.Actions>
|
|
172
|
+
<Button size="sm" variant="outline">
|
|
173
|
+
Kết thúc phiên
|
|
174
|
+
</Button>
|
|
175
|
+
</Banner.Actions>
|
|
176
|
+
</Banner>
|
|
177
|
+
</Flex>
|
|
178
|
+
</CardContent>
|
|
179
|
+
</Card>
|
|
180
|
+
</Flex>
|
|
181
|
+
</PageContainer>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { AlertDialog } from "@godxjp/ui/feedback";
|
|
3
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
4
|
+
import { Button } from "@godxjp/ui/general";
|
|
5
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* DangerConfirm recipe (godxui#193) — high-stakes deletion built on the AlertDialog preset.
|
|
9
|
+
* No new component: `challenge` gates the confirm button behind an exact typed slug, and `stepUp`
|
|
10
|
+
* runs an async passkey / 2FA re-auth before onConfirm fires. Both force the destructive tone.
|
|
11
|
+
* Mirrors DXS SCR-203 (org delete by slug) and SCR-209 (refund with step-up).
|
|
12
|
+
*/
|
|
13
|
+
export default function Demo() {
|
|
14
|
+
const [orgOpen, setOrgOpen] = useState(false);
|
|
15
|
+
const [refundOpen, setRefundOpen] = useState(false);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<PageContainer
|
|
19
|
+
title="DangerConfirm"
|
|
20
|
+
subtitle="typed-challenge + step-up destructive confirmation · AlertDialog recipe"
|
|
21
|
+
>
|
|
22
|
+
<Flex direction="col" gap="lg">
|
|
23
|
+
<Card>
|
|
24
|
+
<CardHeader>
|
|
25
|
+
<CardTitle level={2}>Organization delete · typed slug challenge</CardTitle>
|
|
26
|
+
<CardDescription>
|
|
27
|
+
The confirm button stays disabled until the operator types the exact organization slug
|
|
28
|
+
(<code>acme-inc</code>). A typed challenge always forces the destructive tone and a
|
|
29
|
+
soft danger header band.
|
|
30
|
+
</CardDescription>
|
|
31
|
+
</CardHeader>
|
|
32
|
+
<CardContent>
|
|
33
|
+
<Button variant="destructive" size="sm" onClick={() => setOrgOpen(true)}>
|
|
34
|
+
Delete organization
|
|
35
|
+
</Button>
|
|
36
|
+
<AlertDialog
|
|
37
|
+
open={orgOpen}
|
|
38
|
+
onOpenChange={setOrgOpen}
|
|
39
|
+
title="Delete “Acme Inc.” permanently?"
|
|
40
|
+
description="This removes every workspace, member and billing record. This cannot be undone."
|
|
41
|
+
challenge="acme-inc"
|
|
42
|
+
confirmLabel="Delete organization"
|
|
43
|
+
cancelLabel="Keep organization"
|
|
44
|
+
onConfirm={async () => {
|
|
45
|
+
await new Promise<void>((r) => setTimeout(r, 800));
|
|
46
|
+
setOrgOpen(false);
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
49
|
+
</CardContent>
|
|
50
|
+
</Card>
|
|
51
|
+
|
|
52
|
+
<Card>
|
|
53
|
+
<CardHeader>
|
|
54
|
+
<CardTitle level={2}>Refund · step-up re-authentication</CardTitle>
|
|
55
|
+
<CardDescription>
|
|
56
|
+
A privileged action guarded by <code>stepUp</code>: the async passkey / 2FA check runs
|
|
57
|
+
first, the button shows a verifying state, and a failed check keeps the dialog open
|
|
58
|
+
with an announced error. onConfirm only fires after step-up resolves truthy.
|
|
59
|
+
</CardDescription>
|
|
60
|
+
</CardHeader>
|
|
61
|
+
<CardContent>
|
|
62
|
+
<Button variant="destructive" size="sm" onClick={() => setRefundOpen(true)}>
|
|
63
|
+
Issue full refund
|
|
64
|
+
</Button>
|
|
65
|
+
<AlertDialog
|
|
66
|
+
open={refundOpen}
|
|
67
|
+
onOpenChange={setRefundOpen}
|
|
68
|
+
title="Issue a full refund of ¥48,000?"
|
|
69
|
+
description="The charge is reversed immediately and the customer is notified."
|
|
70
|
+
confirmLabel="Refund now"
|
|
71
|
+
cancelLabel="Cancel"
|
|
72
|
+
variant="destructive"
|
|
73
|
+
stepUp={async () => {
|
|
74
|
+
// A real consumer triggers a passkey / WebAuthn or TOTP challenge here.
|
|
75
|
+
await new Promise<void>((r) => setTimeout(r, 600));
|
|
76
|
+
return true;
|
|
77
|
+
}}
|
|
78
|
+
onConfirm={async () => {
|
|
79
|
+
await new Promise<void>((r) => setTimeout(r, 500));
|
|
80
|
+
setRefundOpen(false);
|
|
81
|
+
}}
|
|
82
|
+
/>
|
|
83
|
+
</CardContent>
|
|
84
|
+
</Card>
|
|
85
|
+
</Flex>
|
|
86
|
+
</PageContainer>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Dialog,
|
|
3
|
+
DialogContent,
|
|
4
|
+
DialogDescription,
|
|
5
|
+
DialogTitle,
|
|
6
|
+
DialogTrigger,
|
|
7
|
+
} from "@godxjp/ui/feedback";
|
|
8
|
+
import { Button } from "@godxjp/ui/general";
|
|
9
|
+
import { PageContainer } from "@godxjp/ui/layout";
|
|
10
|
+
export default function Demo() {
|
|
11
|
+
return (
|
|
12
|
+
<PageContainer title="Dialog touch" subtitle="Touch target and close behavior verification">
|
|
13
|
+
<Dialog>
|
|
14
|
+
<DialogTrigger asChild>
|
|
15
|
+
<Button>Open touch dialog</Button>
|
|
16
|
+
</DialogTrigger>
|
|
17
|
+
<DialogContent>
|
|
18
|
+
<DialogTitle>Touch dialog</DialogTitle>
|
|
19
|
+
<DialogDescription>Touch target and close behavior verification.</DialogDescription>
|
|
20
|
+
</DialogContent>
|
|
21
|
+
</Dialog>
|
|
22
|
+
</PageContainer>
|
|
23
|
+
);
|
|
24
|
+
}
|