@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
4
|
--table-row-height-compact: var(--band-height-sm);
|
|
@@ -7,140 +7,48 @@
|
|
|
7
7
|
--table-row-height: calc(var(--table-row-height-default) * var(--scaling));
|
|
8
8
|
--table-cell-padding-y: var(--space-2);
|
|
9
9
|
--table-cell-space-x: var(--control-padding-x);
|
|
10
|
-
|
|
11
|
-
* placed in a flush container (`<Card><CardContent flush><DataTable/>`), where no ancestor
|
|
12
|
-
* supplies padding — so it owns its own on BOTH axes instead of declaring block-start only.
|
|
13
|
-
* Block default = the previous single `padding-top` value, now on both block edges (breathing
|
|
14
|
-
* room above the footer and before the container's closing border). Inline default = the cell
|
|
15
|
-
* inline padding, so the "rows per page" label sits on the same optical axis as the first
|
|
16
|
-
* column's text. A service retunes either axis to its own grid (#45).
|
|
17
|
-
* Both are declared `initial` so the defaults re-resolve at the CALL SITE: --space-stack-sm and
|
|
18
|
-
* --table-cell-space-x are density-scaled and re-declared inside a `.ui-density-*` subtree, and a
|
|
19
|
-
* :root binding would freeze the footer at the :root density (docs/TOKENS.md — the :root freeze
|
|
20
|
-
* rule). Defaults = var(--space-stack-sm) block · var(--table-cell-space-x) inline. */
|
|
21
|
-
/* Cell-grid rule colour for `<Table bordered>` (gh#274) — the outer frame and the vertical
|
|
22
|
-
* rules between columns. Declared `initial` so the default re-resolves to the LIVE --border
|
|
23
|
-
* role at the call site (a :root binding to hsl(var(--border)) freezes at the :root value and
|
|
24
|
-
* a scoped [data-tenant] override of --border would never reach it — docs/TOKENS.md).
|
|
25
|
-
* Default = hsl(var(--border)). */
|
|
10
|
+
|
|
26
11
|
--table-border-color: initial;
|
|
27
12
|
--table-pagination-padding-y: initial;
|
|
28
13
|
--table-pagination-padding-x: initial;
|
|
29
|
-
|
|
30
|
-
* multi-column admin grid whose columns are `white-space: nowrap` would otherwise be crushed, so
|
|
31
|
-
* the bordered surface keeps a minimum inline size and `.ui-data-table-scroll` scrolls instead.
|
|
32
|
-
* This shipped as a hard-coded `min-w-[640px]` utility on the surface element, which left a
|
|
33
|
-
* service that wants a narrower (or no) floor with no route but forking the component (#45).
|
|
34
|
-
* Default = the previous literal, in px so the floor releases at EXACTLY the same width as the
|
|
35
|
-
* px-based `sm` media query that clears it (a rem value would drift under a non-16px root and
|
|
36
|
-
* re-introduce the scroll between the two thresholds). Set `0` to opt out entirely — which is
|
|
37
|
-
* what `preset="action-collection"` does, because there the priority measures own the width. */
|
|
14
|
+
|
|
38
15
|
--table-surface-min-inline-size: 640px;
|
|
39
16
|
--table-head-font-size: var(--font-size-xs);
|
|
40
|
-
|
|
41
|
-
* default re-resolves to the LIVE --muted / --muted-foreground roles at the call site: a :root
|
|
42
|
-
* binding to a role var freezes at the :root value and a scoped [data-tenant] role override never
|
|
43
|
-
* reaches it. A brand sets both header tokens together to keep band/text contrast.
|
|
44
|
-
* Defaults = hsl(var(--muted)) band · hsl(var(--muted-foreground)) text. */
|
|
17
|
+
|
|
45
18
|
--table-header-background: initial;
|
|
46
19
|
--table-header-foreground: initial;
|
|
47
|
-
|
|
20
|
+
|
|
48
21
|
--table-pin-shadow: -6px 0 6px -5px hsl(var(--foreground) / 0.12);
|
|
49
|
-
|
|
50
|
-
* default re-resolves under a scoped theme; a service retints by reading another role (e.g.
|
|
51
|
-
* --primary). Defaults = hsl(var(--muted) / 0.4 striped · 0.5 hover · 0.3 selected). */
|
|
22
|
+
|
|
52
23
|
--table-row-striped-background: initial;
|
|
53
24
|
--table-row-hover-background: initial;
|
|
54
25
|
--table-row-selected-background: initial;
|
|
55
26
|
}
|
|
56
27
|
|
|
57
|
-
/* Table · action-collection preset (gh#253) — the canonical dense approval / action queue.
|
|
58
|
-
* Column PRIORITY measures replace the desktop intrinsic widths (a nowrap free-text column is
|
|
59
|
-
* what makes a five-column queue wider than its card and forces a horizontal scroll). Nothing
|
|
60
|
-
* here is read unless `preset="action-collection"` is set, so every existing table is untouched.
|
|
61
|
-
* Percentages so the ratio holds at any card width; the action affordance is an absolute measure
|
|
62
|
-
* because it must never be squeezed below its touch target. */
|
|
63
28
|
:root {
|
|
64
|
-
--table-action-collection-primary-width: 18%;
|
|
65
|
-
--table-action-collection-secondary-width: 22%;
|
|
66
|
-
--table-action-collection-meta-width: 12%;
|
|
67
|
-
--table-action-collection-actions-width: 3.5rem;
|
|
68
|
-
|
|
69
|
-
* like the desktop tier: while the priority ratios FIT (the canonical queues up to the
|
|
70
|
-
* six-column budget below), they keep the table filling its container edge-to-edge with no
|
|
71
|
-
* horizontal scroll — the gh#253 acceptance. */
|
|
29
|
+
--table-action-collection-primary-width: 18%;
|
|
30
|
+
--table-action-collection-secondary-width: 22%;
|
|
31
|
+
--table-action-collection-meta-width: 12%;
|
|
32
|
+
--table-action-collection-actions-width: 3.5rem;
|
|
33
|
+
|
|
72
34
|
--table-action-collection-primary-width-compact: 24%;
|
|
73
35
|
--table-action-collection-secondary-width-compact: 22%;
|
|
74
36
|
--table-action-collection-meta-width-compact: 20%;
|
|
75
37
|
--table-action-collection-actions-width-compact: 2.75rem;
|
|
76
|
-
|
|
77
|
-
*
|
|
78
|
-
* Percentage measures stop working once a queue carries enough columns for the shares to sum
|
|
79
|
-
* past 100%: `table-layout: fixed` NORMALIZES them back into the table's specified width, so at
|
|
80
|
-
* ~10 columns on a 390px frame a "24%" column really renders at a tenth of the frame, every
|
|
81
|
-
* column drops below one CJK glyph, and JA headers shred into a vertical one-character-per-line
|
|
82
|
-
* column (the failure mode WCAG 2.2 SC 1.4.10 Reflow exists to prevent). Cell `min-inline-size`
|
|
83
|
-
* and `max(%, length)` widths are equally inert in the fixed algorithm, and the intrinsic
|
|
84
|
-
* (max-content) size of a fixed-layout table is degenerate — all verified in Chromium — so a
|
|
85
|
-
* LENGTH is the only floor an engine respects: length columns are never squeezed, and when
|
|
86
|
-
* their sum outgrows the container the table's used width grows past its specified 100%
|
|
87
|
-
* (CSS 2.1 §17.5.2.1) into the keyboard-reachable overflow-x wrapper, which scrolls.
|
|
88
|
-
* ONE-dimensional scrolling of a data table is explicitly permitted by SC 1.4.10;
|
|
89
|
-
* one-character-per-line is not readable at all.
|
|
90
|
-
*
|
|
91
|
-
* The stylesheet switches tiers on a COLUMN BUDGET, not on width: up to six columns the
|
|
92
|
-
* percentage ratios above still resolve to readable measures at every acceptance artboard
|
|
93
|
-
* (320 · 375 · 390), so the canonical five-column approval queue keeps its documented
|
|
94
|
-
* scroll-free 390 frame byte-for-byte; from seven columns the shares are guaranteed to
|
|
95
|
-
* over-sum and the floors + intentional scroll take over. That budget is the preset's
|
|
96
|
-
* documented column-count ceiling (gh#262 expectation 3): past six columns the preset stops
|
|
97
|
-
* compressing and starts scrolling.
|
|
98
|
-
*
|
|
99
|
-
* Units are rem, not ch: `ch` tracks the "0" glyph (~half a CJK em), so a ch-denominated floor
|
|
100
|
-
* would silently halve for the JA copy these floors exist to protect. At the compact type tier
|
|
101
|
-
* (font-size-xs = 0.75rem, space-2 inline padding each side) the 5rem meta floor keeps a ~4rem
|
|
102
|
-
* text measure = 5 full-width glyphs per line — a JA header wraps to two readable lines, never
|
|
103
|
-
* a character column. */
|
|
38
|
+
|
|
104
39
|
--table-action-collection-primary-width-floor: 6rem;
|
|
105
40
|
--table-action-collection-secondary-width-floor: 5.5rem;
|
|
106
41
|
--table-action-collection-meta-width-floor: 5rem;
|
|
107
|
-
|
|
108
|
-
* cannot stay `auto` past the budget: once the marked columns over-constrain the table, the
|
|
109
|
-
* fixed algorithm hands an auto column exactly 0px (verified in Chromium) — the same
|
|
110
|
-
* shredding, moved to the free-text column. The actions floor is simply
|
|
111
|
-
* `--table-action-collection-actions-width-compact`, already an absolute measure. */
|
|
42
|
+
|
|
112
43
|
--table-action-collection-flex-width-floor: 5rem;
|
|
113
44
|
--table-action-collection-font-size-compact: var(--font-size-xs);
|
|
114
45
|
--table-action-collection-cell-space-x-compact: var(--space-2);
|
|
115
46
|
--table-action-collection-cell-padding-y-compact: var(--space-2);
|
|
116
47
|
--table-action-collection-row-height-compact: var(--table-row-height-compact);
|
|
117
|
-
|
|
118
|
-
* to its container and lets the scroll region it already owns take over.
|
|
119
|
-
*
|
|
120
|
-
* The percentage budget above is sized for ONE column per priority tier plus one free-text
|
|
121
|
-
* column. A queue that repeats a tier — two `secondary` columns, three `meta` columns, or an
|
|
122
|
-
* unmarked column beside them — asks for more than 100%, and under `table-layout: fixed` the
|
|
123
|
-
* surplus is taken out of the columns rather than out of the table: measured on a seven-column
|
|
124
|
-
* Japanese admin queue at 390, every column landed at 44–59px and CJK labels wrapped at ONE to
|
|
125
|
-
* TWO characters per line (dxs-platform/platform#680). That is a WCAG 2.2 SC 1.4.10 Reflow (AA)
|
|
126
|
-
* failure, and it is the failure mode this floor removes.
|
|
127
|
-
*
|
|
128
|
-
* Scrolling is the correct escape, not a concession: SC 1.4.10 exempts "parts of the content
|
|
129
|
-
* which require two-dimensional layout for usage or meaning", and its own note names data
|
|
130
|
-
* tables as the example. A table that scrolls horizontally inside its card conforms; a table
|
|
131
|
-
* whose cells are one character wide does not.
|
|
132
|
-
*
|
|
133
|
-
* Default `0` so nothing changes for any existing consumer: a queue that fits its priority
|
|
134
|
-
* budget keeps fitting. A consumer whose queue carries more columns than the budget sets this
|
|
135
|
-
* to the measure at which its narrowest column is still readable (roughly 5rem per column for
|
|
136
|
-
* Japanese at the compact type tier) and the table scrolls instead of crushing. */
|
|
48
|
+
|
|
137
49
|
--table-action-collection-min-inline-size-compact: 0;
|
|
138
50
|
}
|
|
139
51
|
|
|
140
|
-
/* Table · stacked-record-collection preset (gh#293 restore — SCR-215) — the canonical WIDE,
|
|
141
|
-
* heterogeneous record collection. Below the collapse step every `<tr>` becomes a bordered
|
|
142
|
-
* key-value card; these tokens own the card's own geometry (unlike action-collection, there is no
|
|
143
|
-
* column-priority measure to retune — the whole row becomes one block). */
|
|
144
52
|
:root {
|
|
145
53
|
--table-stacked-collection-card-padding-y: var(--space-stack-sm);
|
|
146
54
|
--table-stacked-collection-card-padding-x: var(--space-inline-md);
|
|
@@ -148,52 +56,23 @@
|
|
|
148
56
|
--table-stacked-collection-cell-padding-y: var(--space-stack-xs);
|
|
149
57
|
--table-stacked-collection-label-font-size: var(--font-size-xs);
|
|
150
58
|
|
|
151
|
-
/* DATA TABLE odds and ends that were still literal on the component (#319). The table's cell
|
|
152
|
-
* rhythm, widths and action-collection tiers were already tokenized; these are the pieces
|
|
153
|
-
* around them — the select column, sort glyphs, sticky header layer and skeleton shapes. */
|
|
154
59
|
--table-select-column-width: 2.5rem;
|
|
155
60
|
--table-sort-icon-size: var(--icon-size-xs);
|
|
156
61
|
--table-toolbar-icon-size: var(--icon-size-md);
|
|
157
62
|
--table-pagination-icon-size: var(--icon-size-md);
|
|
158
63
|
--table-pagination-font-size: var(--font-size-sm);
|
|
159
|
-
|
|
160
|
-
* text line at the row's cap height. Retune with --table-cell-padding-y to keep the loading
|
|
161
|
-
* state the same height as the loaded one. */
|
|
64
|
+
|
|
162
65
|
--table-skeleton-check-size: 1rem;
|
|
163
|
-
|
|
164
|
-
* line-height axis, whose scale is unitless ratios (gh#324) — a mis-named height, and the
|
|
165
|
-
* only raw value on that axis, which is what kept the axis ungated. Renamed rather than
|
|
166
|
-
* left, with the old name kept as a DEPRECATED ALIAS: it is a published token a consumer
|
|
167
|
-
* theme may already override, and styles/table-layout.css still reads the old name, so an
|
|
168
|
-
* override of either spelling keeps working. Prefer the new name; the alias may be removed
|
|
169
|
-
* in a future major. */
|
|
66
|
+
|
|
170
67
|
--table-skeleton-line-block-size: 1rem;
|
|
171
68
|
--table-skeleton-line-height: var(--table-skeleton-line-block-size);
|
|
172
69
|
--table-skeleton-radius: var(--radius-sm);
|
|
173
70
|
|
|
174
|
-
/* The table's own base type step (gh#319). Was a `text-sm` utility on the <table>; the theme
|
|
175
|
-
* remaps `--text-sm` to `--font-size-sm`, so this default is byte-identical. */
|
|
176
71
|
--table-font-size: var(--font-size-sm);
|
|
177
|
-
|
|
178
|
-
* line-height from Tailwind's `--text-sm--line-height`, and styles/base.css remaps `--text-sm`
|
|
179
|
-
* but NOT that companion. Without this the table would silently inherit ambient page leading
|
|
180
|
-
* the moment the font-size moved into CSS. Same unitless ratio Tailwind ships. */
|
|
72
|
+
|
|
181
73
|
--table-line-height: calc(1.25 / 0.875);
|
|
182
|
-
|
|
183
|
-
* Owned here rather than as TableRow's `border-b` utility so the "last row draws no rule"
|
|
184
|
-
* rule in `@layer components` can actually zero it; a utility would outrank it by layer.
|
|
185
|
-
* Colour is deliberately NOT set: it inherits the global `* { border-color: hsl(var(--border)) }`
|
|
186
|
-
* so a scoped [data-tenant]/.dark override of --border still reaches every row. */
|
|
74
|
+
|
|
187
75
|
--table-row-border-width: var(--stroke-hairline);
|
|
188
|
-
|
|
189
|
-
* `<CardContent flush>`: the line between a plain CardHeader and the first row. The other three
|
|
190
|
-
* edges coincide with the card's own frame and are erased (gh#305); this one has nothing behind
|
|
191
|
-
* it, so without it the header band floats (gh#306). Scoped by construction to the case that
|
|
192
|
-
* needs it — a BANDED header, a CardBar or a headerless card already draw their own line there
|
|
193
|
-
* and never reach this token — so a service tunes only the plain-header divider: `0` for a
|
|
194
|
-
* borderless full-bleed table, heavier for a stronger band. Colour and style are NOT set here:
|
|
195
|
-
* only the width is restored, so the surface's own border declaration still owns them and a
|
|
196
|
-
* scoped [data-tenant]/.dark override of --border reaches it.
|
|
197
|
-
* Default = the same hairline the table's other rules draw. */
|
|
76
|
+
|
|
198
77
|
--table-flush-divider-width: var(--table-row-border-width);
|
|
199
78
|
}
|
|
@@ -1,82 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* Toggle owns the pressed state; Button owns the counter-pill vocabulary (`count` /
|
|
4
|
-
* `overflowCount` / `showZero`). A counted pressed chip (a faceted filter chip "Unread 12", a
|
|
5
|
-
* reaction chip) needs both, so Toggle grew the same vocabulary — and these knobs exist so it
|
|
6
|
-
* grows it WITHOUT growing a second, drifting set of constants (cardinal rule #45).
|
|
7
|
-
*
|
|
8
|
-
* SHARE vs SPLIT — the rule this file follows, and why each half falls where it does:
|
|
9
|
-
*
|
|
10
|
-
* • GEOMETRY is genuinely the same pill — min-width, inline padding, type step, corner. Toggle
|
|
11
|
-
* keeps its OWN knob for each (rule #45) but sets it to Button's exact value off the same
|
|
12
|
-
* primitive scale token, and a test asserts the two stay equal — so a Toggle count set beside
|
|
13
|
-
* a Button count is indistinguishable and cannot drift unnoticed, while a service can still
|
|
14
|
-
* move one without the other.
|
|
15
|
-
*
|
|
16
|
-
* • COLOUR is genuinely different, and MEASURED so. Button's pill sits on a static variant
|
|
17
|
-
* surface and tints itself with a translucent foreground (`bg-primary-foreground/15`,
|
|
18
|
-
* `bg-foreground/8`). Toggle's pill sits on a surface that INVERTS when pressed, and a
|
|
19
|
-
* translucent tint over it cannot clear WCAG 1.4.3 AA at the xs step: with the shipped roles,
|
|
20
|
-
* `--primary-foreground` over `--primary-foreground/0.16` over `--primary` measures 3.82:1 in
|
|
21
|
-
* light (4.39:1 even at 0.08 — the ceiling is the chip label's own 5.04:1, and any tint can
|
|
22
|
-
* only lower it), and `--muted-foreground` over `--foreground/0.08` measures 4.32:1, dropping
|
|
23
|
-
* to 3.64:1 once the chip hovers to `--accent`. Forcing a shared colour token here would ship
|
|
24
|
-
* a known #299-class failure.
|
|
25
|
-
*
|
|
26
|
-
* So Toggle's pill uses OPAQUE role fills, which makes its contrast independent of the chip's
|
|
27
|
-
* variant and hover surface, and inverts them with the state:
|
|
28
|
-
* unpressed --foreground on --muted → 14.25:1 light · 12.40:1 dark
|
|
29
|
-
* pressed --primary on --primary-foreground → 5.04:1 light · 7.07:1 dark
|
|
30
|
-
* The pressed pair is the chip label's own pair, swapped — the pill is exactly as legible as
|
|
31
|
-
* the label it sits next to, never worse, under any theme that keeps that pair legible.
|
|
32
|
-
*
|
|
33
|
-
* Every colour knob is a ROLE-MIRROR knob: `initial` at :root with the role default at the call
|
|
34
|
-
* site (docs/TOKENS.md · "Role-mirror knobs MUST be `initial`"). A `:root` binding to
|
|
35
|
-
* `var(--primary)` would freeze at the :root value and a scoped `[data-tenant]`/`.dark` override
|
|
36
|
-
* of the role would never reach it.
|
|
37
|
-
*/
|
|
1
|
+
|
|
38
2
|
:root {
|
|
39
|
-
|
|
40
|
-
* --button-count-*, --tag-input-chip-font-size, --toggle-sm-font-size are all independent knobs
|
|
41
|
-
* off the same primitive scale). The VALUES are byte-identical to Button's counter pill and read
|
|
42
|
-
* the same primitive tokens, so the two pills render the same size and a Toggle count set beside
|
|
43
|
-
* a Button count is indistinguishable — asserted by
|
|
44
|
-
* src/styles/__tests__/toggle-count-token-parity.test.ts so it cannot drift silently.
|
|
45
|
-
*
|
|
46
|
-
* (They are concrete here rather than `initial` + a call-site `var(--toggle-…, var(--button-…))`
|
|
47
|
-
* fallback because check:typography requires a bare `var(--token)` for every font-size, and a
|
|
48
|
-
* split shape across the five geometry knobs would be worse than a consistent one.) */
|
|
3
|
+
|
|
49
4
|
--toggle-count-min-width: var(--space-4);
|
|
50
5
|
--toggle-count-space-inline: var(--space-1);
|
|
51
6
|
--toggle-count-font-size: var(--font-size-xs);
|
|
52
7
|
--toggle-count-radius: var(--radius-pill);
|
|
53
|
-
|
|
54
|
-
* ADDS to it for a service whose design grid wants the counter pushed further out. */
|
|
8
|
+
|
|
55
9
|
--toggle-count-gap: 0;
|
|
56
10
|
|
|
57
|
-
/* ── Counter pill · unpressed colours. Defaults = hsl(var(--muted)) fill (quiet: 1.09:1 against
|
|
58
|
-
* the chip's own surface, so at rest the count reads as text, #44) and hsl(var(--foreground))
|
|
59
|
-
* text (14.25:1 on that fill). Opaque on purpose — a translucent fill would take its contrast
|
|
60
|
-
* from whatever surface the chip currently has, and lose ~0.7 on hover. */
|
|
61
11
|
--toggle-count-background: initial;
|
|
62
12
|
--toggle-count-color: initial;
|
|
63
13
|
|
|
64
|
-
/* ── Counter pill · PRESSED colours. Defaults = hsl(var(--primary-foreground)) fill,
|
|
65
|
-
* hsl(var(--primary)) text — the pressed chip's OWN pair, swapped. Not `--primary` on
|
|
66
|
-
* `--primary`: the pressed chip is already filled with --primary, so a --primary pill would be
|
|
67
|
-
* invisible on it. The swap also flips the pill from near-invisible to solid, which is one of
|
|
68
|
-
* the encodings that keeps the pressed state off colour alone (WCAG 1.4.1). */
|
|
69
14
|
--toggle-pressed-count-background: initial;
|
|
70
15
|
--toggle-pressed-count-color: initial;
|
|
71
16
|
|
|
72
|
-
/* ── Pressed chrome. Default = hsl(var(--primary)), i.e. the pressed fill itself, so out of the
|
|
73
|
-
* box this border is quiet (#44) and the pressed state is carried by the fill inversion + the
|
|
74
|
-
* pill inversion + the forced-colors rule below. A service whose pressed fill is a PALE tint
|
|
75
|
-
* (where those inversions get weak) opts into a visible outline by overriding this. */
|
|
76
17
|
--toggle-pressed-border-color: initial;
|
|
77
18
|
|
|
78
|
-
/* Under forced-colors every fill is flattened to a system colour, so neither inversion encodes
|
|
79
|
-
* anything any more. This outline is the state's structural fallback there — drawn on the
|
|
80
|
-
* PRESSED pill only, and as `outline` (not `border`) so it costs no layout. */
|
|
81
19
|
--toggle-count-forced-outline-width: var(--stroke-hairline);
|
|
82
20
|
}
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* Upload carried 66 hard-coded geometry/chrome literals, the single worst file in the library
|
|
4
|
-
* (#319). It renders five variants (dropzone · button · picture · picture-card · avatar), and
|
|
5
|
-
* EVERY one of them baked its box straight onto the component: a service could not resize the
|
|
6
|
-
* avatar, retune the dropzone's generous 40px inset, or align the file row to its own grid
|
|
7
|
-
* without forking. That is precisely the gap cardinal rule #45 exists to close.
|
|
8
|
-
*
|
|
9
|
-
* Radius defaults mirror the utilities they replace, verified against the built CSS:
|
|
10
|
-
* rounded-lg = var(--radius) → --radius-lg
|
|
11
|
-
* rounded-md = calc(var(--radius) / var(--radius-ratio)) → --radius-md
|
|
12
|
-
* rounded-full → --radius-pill
|
|
13
|
-
*/
|
|
1
|
+
|
|
14
2
|
|
|
15
3
|
:root {
|
|
16
|
-
|
|
17
|
-
* dials it back with one override instead of forking the variant. */
|
|
4
|
+
|
|
18
5
|
--upload-dropzone-space-inset: var(--space-10);
|
|
19
6
|
--upload-dropzone-radius: var(--radius-lg);
|
|
20
7
|
--upload-dropzone-border-width: var(--stroke-md);
|
|
@@ -24,9 +11,6 @@
|
|
|
24
11
|
--upload-dropzone-meta-space-block-start: var(--space-1);
|
|
25
12
|
--upload-dropzone-meta-font-size: var(--font-size-xs);
|
|
26
13
|
|
|
27
|
-
/* TILE — the 96px square shared by picture-card thumbnails and the "add image" button.
|
|
28
|
-
* One knob resizes the whole gallery; picture-card grids are the most common thing a service
|
|
29
|
-
* re-grids to match its own column rhythm. */
|
|
30
14
|
--upload-tile-size: 6rem;
|
|
31
15
|
--upload-tile-radius: var(--radius-md);
|
|
32
16
|
--upload-tile-space-gap: var(--space-3);
|
|
@@ -34,17 +18,14 @@
|
|
|
34
18
|
--upload-tile-label-space-block-start: var(--space-1);
|
|
35
19
|
--upload-tile-label-font-size: var(--font-size-xs);
|
|
36
20
|
--upload-tile-overlay-font-size: var(--font-size-xs);
|
|
37
|
-
|
|
38
|
-
* CALL SITE under a scoped [data-tenant]/.dark theme. Default = hsl(var(--background) / 0.7). */
|
|
21
|
+
|
|
39
22
|
--upload-overlay-background: initial;
|
|
40
23
|
--upload-overlay-alpha: 70%;
|
|
41
24
|
|
|
42
|
-
/* REMOVE affordance — the ✕ / trash chip pinned to a tile or avatar. */
|
|
43
25
|
--upload-remove-space-inset: var(--space-1);
|
|
44
26
|
--upload-remove-offset: var(--space-1);
|
|
45
27
|
--upload-remove-icon-size: var(--icon-size-sm);
|
|
46
28
|
|
|
47
|
-
/* PICTURE — the single wide preview variant. */
|
|
48
29
|
--upload-picture-max-width: 20rem;
|
|
49
30
|
--upload-picture-radius: var(--radius-md);
|
|
50
31
|
--upload-picture-preview-max-height: 12rem;
|
|
@@ -52,27 +33,22 @@
|
|
|
52
33
|
--upload-picture-empty-label-space-block-start: var(--space-2);
|
|
53
34
|
--upload-picture-empty-label-font-size: var(--font-size-sm);
|
|
54
35
|
--upload-picture-overlay-font-size: var(--font-size-sm);
|
|
55
|
-
|
|
56
|
-
* flat .25rem and so ignored the radius scale entirely — the exact shape of a rule #44 miss.
|
|
57
|
-
* It now follows the tile radius like every other chip in the component. */
|
|
36
|
+
|
|
58
37
|
--upload-picture-badge-radius: var(--radius-md);
|
|
59
38
|
--upload-picture-badge-offset: var(--space-2);
|
|
60
39
|
--upload-picture-badge-space-inline: var(--space-2);
|
|
61
40
|
--upload-picture-badge-space-block: 0.125rem;
|
|
62
41
|
--upload-picture-badge-font-size: var(--font-size-xs);
|
|
63
42
|
|
|
64
|
-
/* AVATAR — the round single-image variant. */
|
|
65
43
|
--upload-avatar-size: 6rem;
|
|
66
44
|
--upload-avatar-border-width: var(--stroke-md);
|
|
67
45
|
--upload-avatar-change-space-block: var(--space-1);
|
|
68
|
-
|
|
69
|
-
* than a surface role — it must stay legible over an arbitrary user image in either theme. */
|
|
46
|
+
|
|
70
47
|
--upload-avatar-change-background: rgb(0 0 0 / 0.7);
|
|
71
48
|
--upload-avatar-change-foreground: #fff;
|
|
72
|
-
|
|
49
|
+
|
|
73
50
|
--upload-avatar-pending-delete-alpha: 0.4;
|
|
74
51
|
|
|
75
|
-
/* DRAFT BAR — the undo strip shown after a pending remove/replace. */
|
|
76
52
|
--upload-draft-space-inline: var(--space-3);
|
|
77
53
|
--upload-draft-space-block: var(--space-2);
|
|
78
54
|
--upload-draft-space-gap: var(--space-2);
|
|
@@ -80,7 +56,6 @@
|
|
|
80
56
|
--upload-draft-font-size: var(--font-size-sm);
|
|
81
57
|
--upload-draft-icon-size: var(--icon-size-sm);
|
|
82
58
|
|
|
83
|
-
/* FILE ROW — the list rendered under the dropzone/button variants. */
|
|
84
59
|
--upload-row-space-inline: var(--space-3);
|
|
85
60
|
--upload-row-space-block: var(--space-2);
|
|
86
61
|
--upload-row-space-gap: var(--space-3);
|
|
@@ -88,20 +63,9 @@
|
|
|
88
63
|
--upload-row-font-size: var(--font-size-sm);
|
|
89
64
|
--upload-row-icon-size: var(--icon-size-md);
|
|
90
65
|
|
|
91
|
-
/* CROP DIALOG — the 1:1 avatar cropper (`UploadCropDialog`). The 66-literal upload pass above
|
|
92
|
-
* never reached this file, so the whole cropper was still baked on the component: the dialog was
|
|
93
|
-
* pinned to `max-w-sm`, the round preview to `size-48`, the zoom row to `px-2`. An avatar is one
|
|
94
|
-
* of the most service-specific sizes there is (a 96px tile service wants a smaller crop stage
|
|
95
|
-
* than a 200px one), and the crop stage must stay in proportion with --upload-avatar-size —
|
|
96
|
-
* which is exactly the pair rule #45 exists to keep tunable together.
|
|
97
|
-
*
|
|
98
|
-
* The dialog width intentionally stays a knob of its own rather than reading
|
|
99
|
-
* --dialog-width-default: the cropper is deliberately NARROWER than a normal dialog so the round
|
|
100
|
-
* stage reads as the subject, not as a small element in a wide box. */
|
|
101
66
|
--upload-crop-dialog-max-width: 24rem;
|
|
102
67
|
--upload-crop-preview-size: 12rem;
|
|
103
68
|
--upload-crop-preview-radius: var(--radius-pill);
|
|
104
|
-
|
|
105
|
-
* flush against the dialog padding. */
|
|
69
|
+
|
|
106
70
|
--upload-crop-zoom-space-inline: var(--space-2);
|
|
107
71
|
}
|