@reqvire-org/ads 0.5.0 → 0.5.2
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 +9 -6
- package/dist/ads-errors.mjs +382 -34
- package/dist/ads-views.mjs +4 -4
- package/dist/analysis/composition-axes.mjs +48 -0
- package/dist/analysis/construction-memo.mjs +38 -0
- package/dist/analysis/context.mjs +19 -0
- package/dist/analysis/design-reads.mjs +177 -0
- package/dist/analysis/design-usage.mjs +20 -4
- package/dist/analysis/factored-classes.mjs +90 -0
- package/dist/analysis/helpers.mjs +5 -7
- package/dist/analysis/mock-check.mjs +5 -4
- package/dist/analysis/native-project.mjs +12 -0
- package/dist/analysis/owner-analysis-cache.mjs +86 -23
- package/dist/analysis/owner-analysis-key.mjs +42 -10
- package/dist/analysis/owner-choices.mjs +195 -43
- package/dist/analysis/owner-composition.mjs +152 -43
- package/dist/analysis/owner-controls.mjs +27 -0
- package/dist/analysis/owner-reuse.mjs +8 -6
- package/dist/analysis/owner-source.mjs +309 -83
- package/dist/analysis/prose-owners.mjs +57 -0
- package/dist/analysis/scenario-keys.mjs +10 -7
- package/dist/analysis/service.mjs +50 -3
- package/dist/analysis/standalone.mjs +7 -4
- package/dist/analysis/styling-ownership.mjs +22 -0
- package/dist/analysis/syntax.mjs +59 -1
- package/dist/analysis/worker-protocol.mjs +14 -2
- package/dist/analysis/worker.mjs +32 -10
- package/dist/architecture-report.mjs +26 -0
- package/dist/asset-view-facts.mjs +16 -2
- package/dist/boundaries.mjs +26 -10
- package/dist/bun-compiler.mjs +2 -2
- package/dist/check-service.mjs +29 -17
- package/dist/check.mjs +20 -7
- package/dist/cli-arguments.mjs +2 -2
- package/dist/cli.mjs +4 -4
- package/dist/composed-contrast.mjs +28 -8
- package/dist/composed-keyline.mjs +107 -0
- package/dist/config.mjs +2 -1
- package/dist/construction-output.mjs +149 -20
- package/dist/construction-spec.d.mts +320 -12
- package/dist/construction-spec.mjs +452 -69
- package/dist/corner-overpaint.mjs +65 -0
- package/dist/derived-states.mjs +182 -0
- package/dist/design-foundation.mjs +6 -1
- package/dist/design-inputs.mjs +18 -3
- package/dist/design-system-closure.mjs +12 -7
- package/dist/design-usage.mjs +8 -2
- package/dist/emit/contract.mjs +24 -5
- package/dist/emit/emission.mjs +14 -5
- package/dist/emit/font-emission.mjs +21 -1
- package/dist/emit/foundation-sheet.mjs +6 -5
- package/dist/emit/integrity.mjs +8 -2
- package/dist/emit/output-watch.mjs +120 -0
- package/dist/emit/owner-emission-cache.mjs +4 -4
- package/dist/emit/preview-emitter.mjs +4 -2
- package/dist/emit/preview-tree.mjs +1 -1
- package/dist/emit/service.mjs +8 -2
- package/dist/finding-rules.mjs +10 -0
- package/dist/font-checks.mjs +42 -0
- package/dist/font-declaration.d.mts +10 -0
- package/dist/font-declaration.mjs +25 -3
- package/dist/font-fallback.d.mts +37 -0
- package/dist/font-fallback.mjs +25 -0
- package/dist/font-macro.d.mts +10 -0
- package/dist/font-metrics.d.mts +34 -0
- package/dist/font-metrics.mjs +314 -0
- package/dist/font-model.mjs +28 -2
- package/dist/form-states.mjs +8 -0
- package/dist/foundation-macro.d.mts +1 -1
- package/dist/frame-regions.mjs +92 -9
- package/dist/grid-facts.mjs +72 -16
- package/dist/grid-lowering.mjs +11 -5
- package/dist/hover-geometry.mjs +15 -0
- package/dist/init.mjs +14 -23
- package/dist/input-digests.mjs +17 -10
- package/dist/linaria/delivery.mjs +2 -0
- package/dist/lowering-enter.mjs +31 -0
- package/dist/lowering-properties.mjs +27 -1
- package/dist/lowering-region-layout.mjs +49 -10
- package/dist/lowering-sequence.mjs +89 -0
- package/dist/lowering-session.mjs +7 -0
- package/dist/lowering-transitions.mjs +22 -8
- package/dist/mcp/build-status.mjs +9 -1
- package/dist/mcp/compiler-channel.mjs +11 -4
- package/dist/mcp/mutations.mjs +1 -0
- package/dist/mcp/preview-http.bundle.js +2 -2
- package/dist/mcp/preview-watch.mjs +2 -1
- package/dist/mcp/preview-widget.bundle.js +5 -5
- package/dist/motion-model.mjs +3 -1
- package/dist/owner-analysis-check.mjs +86 -12
- package/dist/owner-errors.mjs +20 -2
- package/dist/owner-lowering.mjs +104 -25
- package/dist/owner-scenarios.mjs +29 -4
- package/dist/ownership-model.mjs +37 -4
- package/dist/paint-contrast.mjs +5 -0
- package/dist/placeholder-contrast.mjs +18 -1
- package/dist/platform-features.mjs +35 -2
- package/dist/preview-bun.mjs +17 -16
- package/dist/preview-controls.mjs +35 -0
- package/dist/preview-incremental.mjs +1 -1
- package/dist/preview-source.mjs +2 -2
- package/dist/profile-macro.d.mts +15 -0
- package/dist/profile-model.mjs +3 -3
- package/dist/profile-view-facts.mjs +55 -4
- package/dist/prose-model.d.mts +81 -0
- package/dist/prose-model.mjs +101 -0
- package/dist/recipe-macro.d.mts +176 -15
- package/dist/recipe-model.mjs +35 -7
- package/dist/region-lowering.mjs +463 -65
- package/dist/render-audit/corner-overpaint.page.mjs +54 -0
- package/dist/render-audit/layout-shift.page.mjs +24 -0
- package/dist/render-audit/render-states.mjs +122 -1
- package/dist/render-audit/render-states.page.mjs +140 -0
- package/dist/render-audit/worker.mjs +23 -3
- package/dist/render-audit.mjs +139 -1
- package/dist/role-vocabulary.d.mts +43 -2
- package/dist/role-vocabulary.mjs +50 -4
- package/dist/scenario-kit.d.mts +6 -0
- package/dist/scenario-registry.mjs +1 -1
- package/dist/scenarios-compiler.mjs +20 -6
- package/dist/scheme-switch.d.mts +8 -0
- package/dist/scheme-switch.mjs +1 -0
- package/dist/showcase/ads-views.mjs +116 -53
- package/dist/showcase/assets-view.mjs +136 -89
- package/dist/showcase/client.bundle.js +65 -65
- package/dist/showcase/http-client.bundle.js +17 -17
- package/dist/showcase/preview-frame.css +2 -0
- package/dist/showcase/profiles-view.mjs +163 -122
- package/dist/showcase/scenario-page.d.mts +11 -1
- package/dist/showcase/scenario-page.mjs +18 -3
- package/dist/showcase/token-sample.mjs +47 -4
- package/dist/showcase/tokens-view.mjs +82 -34
- package/dist/showcase/ui/ui.css +1 -1
- package/dist/showcase/ui/ui.js +5 -5
- package/dist/skills/README.md +5 -5
- package/dist/skills/ads-designer/README.md +1 -1
- package/dist/skills/ads-designer/SKILL.md +13 -12
- package/dist/skills/ads-designer/references/accessibility.md +9 -2
- package/dist/skills/ads-designer/references/atomic-styles.md +8 -1
- package/dist/skills/ads-designer/references/branding.md +20 -5
- package/dist/skills/ads-designer/references/cli.md +4 -4
- package/dist/skills/ads-designer/references/contracts.md +14 -4
- package/dist/skills/ads-designer/references/design-craft.md +1 -1
- package/dist/skills/ads-designer/references/design-data.md +3 -3
- package/dist/skills/ads-designer/references/forms.md +6 -6
- package/dist/skills/ads-designer/references/layout.md +46 -3
- package/dist/skills/ads-designer/references/motion.md +45 -1
- package/dist/skills/ads-designer/references/performance.md +7 -1
- package/dist/skills/ads-designer/references/recipes.md +92 -7
- package/dist/skills/ads-designer/references/runtimes.md +1 -1
- package/dist/skills/ads-designer/references/scenarios.md +1 -0
- package/dist/skills/ads-import/references/atomic-styles.md +8 -1
- package/dist/skills/ads-import/references/cli.md +4 -4
- package/dist/skills/ads-import/references/contracts.md +14 -4
- package/dist/skills/ads-import/references/design-data.md +3 -3
- package/dist/skills/ads-import/references/forms.md +6 -6
- package/dist/skills/ads-import/references/layout.md +46 -3
- package/dist/skills/ads-import/references/recipes.md +92 -7
- package/dist/skills/ads-import/references/runtimes.md +1 -1
- package/dist/skills/ads-import/references/scenarios.md +1 -0
- package/dist/skills/ads-migrate/SKILL.md +3 -1
- package/dist/skills/ads-migrate/references/0.5.0-to-0.5.1.md +239 -0
- package/dist/skills/ads-migrate/references/0.5.1-to-0.5.2.md +185 -0
- package/dist/skills/ads-port/references/atomic-styles.md +8 -1
- package/dist/skills/ads-port/references/cli.md +4 -4
- package/dist/skills/ads-port/references/contracts.md +14 -4
- package/dist/skills/ads-port/references/design-data.md +3 -3
- package/dist/skills/ads-port/references/forms.md +6 -6
- package/dist/skills/ads-port/references/layout.md +46 -3
- package/dist/skills/ads-port/references/recipes.md +92 -7
- package/dist/skills/ads-port/references/runtimes.md +1 -1
- package/dist/skills/ads-port/references/scenarios.md +1 -0
- package/dist/spatial-model.mjs +20 -4
- package/dist/state-conditions.d.mts +29 -0
- package/dist/state-conditions.mjs +42 -2
- package/dist/surface-contrast.mjs +69 -10
- package/dist/surface-effects.mjs +100 -0
- package/dist/target-size.mjs +1 -1
- package/dist/task-cache.mjs +9 -19
- package/dist/token-dtcg.mjs +1 -0
- package/dist/token-view-facts.mjs +54 -5
- package/dist/unreached-sources.mjs +5 -0
- package/dist/validation-checks.mjs +1 -1
- package/dist/validation.mjs +1 -1
- package/docs/ADS.md +36 -13
- package/docs/ARCHITECTURE.md +223 -23
- package/docs/ASSETS.md +81 -10
- package/docs/CACHING.md +152 -24
- package/docs/CHANGELOG.md +525 -23
- package/docs/DESIGN-REFERENCES.md +5 -5
- package/docs/GUIDE.md +286 -73
- package/docs/LANGUAGE.md +428 -24
- package/docs/LOWERING.md +13 -1
- package/docs/MOTION.md +241 -7
- package/docs/PROFILE-KINDS.md +176 -14
- package/docs/PROFILES.md +2 -2
- package/docs/RULES.md +63 -24
- package/docs/TOKEN-ROLES.md +15 -7
- package/package.json +1 -1
- package/dist/starter-files.mjs +0 -155
- package/dist/starter-overlay.mjs +0 -189
- package/dist/starters/preact/design-system/assets/avatars/avatar.ads.ts +0 -10
- package/dist/starters/preact/design-system/assets/avatars/member.svg +0 -1
- package/dist/starters/preact/design-system/assets/brand/emblem.ads.ts +0 -18
- package/dist/starters/preact/design-system/assets/brand/emblem.svg +0 -4
- package/dist/starters/preact/design-system/assets/brand/iris-emblem.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/brand/iris-emblem.svg +0 -4
- package/dist/starters/preact/design-system/assets/brand/mark.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/brand/mark.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/arrow.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/glyphs/arrow.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/chevron-20.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/chevron-24.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/chevron.ads.ts +0 -20
- package/dist/starters/preact/design-system/assets/glyphs/close.ads.ts +0 -13
- package/dist/starters/preact/design-system/assets/glyphs/close.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/favorite.ads.ts +0 -23
- package/dist/starters/preact/design-system/assets/glyphs/favorite.normal.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/favorite.selected.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/search.ads.ts +0 -10
- package/dist/starters/preact/design-system/assets/glyphs/search.svg +0 -1
- package/dist/starters/preact/design-system/assets/illustrations/journey.ads.ts +0 -32
- package/dist/starters/preact/design-system/assets/illustrations/journey.contrast.svg +0 -6
- package/dist/starters/preact/design-system/assets/illustrations/journey.dark.svg +0 -13
- package/dist/starters/preact/design-system/assets/illustrations/journey.light.svg +0 -13
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.ads.ts +0 -17
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.dark.svg +0 -10
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.light.svg +0 -10
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.ads.ts +0 -15
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.dark.svg +0 -9
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.light.svg +0 -9
- package/dist/starters/preact/design-system/assets/status/error.svg +0 -1
- package/dist/starters/preact/design-system/assets/status/outcomes.ads.ts +0 -31
- package/dist/starters/preact/design-system/assets/status/status.ads.ts +0 -16
- package/dist/starters/preact/design-system/assets/status/success.svg +0 -1
- package/dist/starters/preact/design-system/assets/status/sync-status.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/status/sync-status.svg +0 -7
- package/dist/starters/preact/design-system/assets/status/warning.svg +0 -1
- package/dist/starters/preact/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -12
- package/dist/starters/preact/design-system/components/Actions/Button/Button.tsx +0 -198
- package/dist/starters/preact/design-system/components/Actions/IconButton/IconButton.tsx +0 -95
- package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +0 -22
- package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.tsx +0 -60
- package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.tsx +0 -50
- package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +0 -8
- package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.tsx +0 -110
- package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +0 -25
- package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.tsx +0 -72
- package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +0 -8
- package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.tsx +0 -43
- package/dist/starters/preact/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -21
- package/dist/starters/preact/design-system/components/Content/Icon/Icon.tsx +0 -41
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/arrow.tsx +0 -10
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/close.tsx +0 -10
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/search.tsx +0 -10
- package/dist/starters/preact/design-system/components/Content/Image/Image.ads.fixture.ts +0 -9
- package/dist/starters/preact/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -12
- package/dist/starters/preact/design-system/components/Content/Image/Image.tsx +0 -83
- package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +0 -27
- package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +0 -46
- package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +0 -17
- package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +0 -41
- package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +0 -20
- package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.tsx +0 -37
- package/dist/starters/preact/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/components/Forms/TextField/TextField.tsx +0 -173
- package/dist/starters/preact/design-system/components/Identity/Identity.ads.scenario.tsx +0 -13
- package/dist/starters/preact/design-system/components/Identity/Identity.tsx +0 -146
- package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +0 -27
- package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.tsx +0 -194
- package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +0 -19
- package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.tsx +0 -37
- package/dist/starters/preact/design-system/controllers/FormField/FormField.ads.behavior.ts +0 -70
- package/dist/starters/preact/design-system/controllers/FormField/FormField.behavior.spec.ts +0 -237
- package/dist/starters/preact/design-system/controllers/FormField/FormField.ts +0 -343
- package/dist/starters/preact/design-system/controllers/FormField/useFormField.ts +0 -70
- package/dist/starters/preact/design-system/controllers/Palette/Palette.ts +0 -165
- package/dist/starters/preact/design-system/foundation.ads.ts +0 -22
- package/dist/starters/preact/design-system/index.ts +0 -51
- package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +0 -5
- package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +0 -22
- package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.fixture.ts +0 -12
- package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +0 -21
- package/dist/starters/preact/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/mocks/Workspace/Media.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/mocks/Workspace/Stress.ads.scenario.tsx +0 -36
- package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.fixture.ts +0 -13
- package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +0 -27
- package/dist/starters/preact/design-system/mocks/Workspace/media/ads.svg +0 -1
- package/dist/starters/preact/design-system/palette.generated.ts +0 -188
- package/dist/starters/preact/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +0 -73
- package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +0 -23
- package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +0 -94
- package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +0 -21
- package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.tsx +0 -137
- package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +0 -22
- package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.tsx +0 -248
- package/dist/starters/preact/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -26
- package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +0 -268
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +0 -28
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.tsx +0 -105
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +0 -179
- package/dist/starters/preact/design-system/profiles/Containers/containers.ads.ts +0 -67
- package/dist/starters/preact/design-system/profiles/Containers/frames.ads.ts +0 -32
- package/dist/starters/preact/design-system/profiles/Containers/geometry.ads.ts +0 -30
- package/dist/starters/preact/design-system/profiles/Containers/spacing.ads.ts +0 -26
- package/dist/starters/preact/design-system/profiles/Controls/controls.ads.ts +0 -157
- package/dist/starters/preact/design-system/profiles/Controls/frames.ads.ts +0 -50
- package/dist/starters/preact/design-system/profiles/Controls/spacing.ads.ts +0 -29
- package/dist/starters/preact/design-system/profiles/Focus/keyboard.ads.ts +0 -13
- package/dist/starters/preact/design-system/profiles/Identity/identity.ads.ts +0 -25
- package/dist/starters/preact/design-system/profiles/Identity/spacing.ads.ts +0 -22
- package/dist/starters/preact/design-system/profiles/Layout/grid.ads.ts +0 -69
- package/dist/starters/preact/design-system/profiles/Layout/inspector.ads.ts +0 -146
- package/dist/starters/preact/design-system/profiles/Layout/overlays.ads.ts +0 -94
- package/dist/starters/preact/design-system/profiles/Layout/regions.ads.ts +0 -296
- package/dist/starters/preact/design-system/profiles/Motion/feedback.ads.ts +0 -92
- package/dist/starters/preact/design-system/profiles/Surfaces/controls.ads.ts +0 -142
- package/dist/starters/preact/design-system/profiles/Surfaces/document.ads.ts +0 -2
- package/dist/starters/preact/design-system/profiles/Surfaces/materials.ads.ts +0 -18
- package/dist/starters/preact/design-system/profiles/Surfaces/surfaces.ads.ts +0 -48
- package/dist/starters/preact/design-system/profiles/Typography/details.ads.ts +0 -19
- package/dist/starters/preact/design-system/profiles/Typography/document.ads.ts +0 -2
- package/dist/starters/preact/design-system/profiles/Typography/headings.ads.ts +0 -15
- package/dist/starters/preact/design-system/profiles/Typography/text.ads.ts +0 -73
- package/dist/starters/preact/design-system/profiles/Visuals/artwork.ads.ts +0 -46
- package/dist/starters/preact/design-system/profiles/Visuals/charts.ads.ts +0 -31
- package/dist/starters/preact/design-system/profiles/Visuals/content.ads.ts +0 -52
- package/dist/starters/preact/design-system/profiles/Visuals/glyphs.ads.ts +0 -35
- package/dist/starters/preact/design-system/profiles/Visuals/identity.ads.ts +0 -24
- package/dist/starters/preact/design-system/tokens/Artwork/paint.ads.css +0 -7
- package/dist/starters/preact/design-system/tokens/Artwork/visual-size.ads.css +0 -12
- package/dist/starters/preact/design-system/tokens/Brand/paint.ads.css +0 -7
- package/dist/starters/preact/design-system/tokens/Charts/paint.ads.css +0 -19
- package/dist/starters/preact/design-system/tokens/Containers/border-width.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Containers/content-gap.ads.css +0 -5
- package/dist/starters/preact/design-system/tokens/Containers/frame-inset.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Containers/frame-size.ads.css +0 -11
- package/dist/starters/preact/design-system/tokens/Containers/radius.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Controls/border-width.ads.css +0 -4
- package/dist/starters/preact/design-system/tokens/Controls/content-gap.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Controls/control-min-size.ads.css +0 -17
- package/dist/starters/preact/design-system/tokens/Controls/frame-inset.ads.css +0 -21
- package/dist/starters/preact/design-system/tokens/Controls/radius.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Controls/target-min-size.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Controls/visual-size.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Focus/border-width.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Focus/focus-offset.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Foundation/spacing.ads.css +0 -20
- package/dist/starters/preact/design-system/tokens/Grid/grid-gutter.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Grid/layer.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Grid/layout-size.ads.css +0 -15
- package/dist/starters/preact/design-system/tokens/Grid/spacing.ads.css +0 -12
- package/dist/starters/preact/design-system/tokens/Grid/track-count.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Identity/content-gap.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Identity/visual-size.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Motion/duration.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Motion/easing.ads.css +0 -5
- package/dist/starters/preact/design-system/tokens/Motion/motion-angle.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Motion/motion-distance.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Motion/motion-scale.ads.css +0 -9
- package/dist/starters/preact/design-system/tokens/Surfaces/blur.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Surfaces/gradient.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Surfaces/opacity.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Surfaces/paint.ads.css +0 -58
- package/dist/starters/preact/design-system/tokens/Surfaces/shadow.ads.css +0 -20
- package/dist/starters/preact/design-system/tokens/Typography/font-family.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-features.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-size.ads.css +0 -9
- package/dist/starters/preact/design-system/tokens/Typography/font-stretch.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-variations.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-weight.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/letter-spacing.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/line-height.ads.css +0 -11
- package/dist/starters/preact/design-system/tokens/Typography/word-spacing.ads.css +0 -1
- package/dist/starters/preact/starter.json +0 -11
- package/dist/starters/react/design-system/assets/avatars/avatar.ads.ts +0 -10
- package/dist/starters/react/design-system/assets/avatars/member.svg +0 -1
- package/dist/starters/react/design-system/assets/brand/emblem.ads.ts +0 -18
- package/dist/starters/react/design-system/assets/brand/emblem.svg +0 -4
- package/dist/starters/react/design-system/assets/brand/iris-emblem.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/brand/iris-emblem.svg +0 -4
- package/dist/starters/react/design-system/assets/brand/mark.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/brand/mark.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/arrow.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/glyphs/arrow.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-20.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-24.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron.ads.ts +0 -20
- package/dist/starters/react/design-system/assets/glyphs/close.ads.ts +0 -13
- package/dist/starters/react/design-system/assets/glyphs/close.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/favorite.ads.ts +0 -23
- package/dist/starters/react/design-system/assets/glyphs/favorite.normal.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/favorite.selected.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/search.ads.ts +0 -10
- package/dist/starters/react/design-system/assets/glyphs/search.svg +0 -1
- package/dist/starters/react/design-system/assets/illustrations/journey.ads.ts +0 -32
- package/dist/starters/react/design-system/assets/illustrations/journey.contrast.svg +0 -6
- package/dist/starters/react/design-system/assets/illustrations/journey.dark.svg +0 -13
- package/dist/starters/react/design-system/assets/illustrations/journey.light.svg +0 -13
- package/dist/starters/react/design-system/assets/logos/harbor-pay.ads.ts +0 -17
- package/dist/starters/react/design-system/assets/logos/harbor-pay.dark.svg +0 -10
- package/dist/starters/react/design-system/assets/logos/harbor-pay.light.svg +0 -10
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.ads.ts +0 -15
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.dark.svg +0 -9
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.light.svg +0 -9
- package/dist/starters/react/design-system/assets/status/error.svg +0 -1
- package/dist/starters/react/design-system/assets/status/outcomes.ads.ts +0 -31
- package/dist/starters/react/design-system/assets/status/status.ads.ts +0 -16
- package/dist/starters/react/design-system/assets/status/success.svg +0 -1
- package/dist/starters/react/design-system/assets/status/sync-status.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/status/sync-status.svg +0 -7
- package/dist/starters/react/design-system/assets/status/warning.svg +0 -1
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -12
- package/dist/starters/react/design-system/components/Actions/Button/Button.tsx +0 -198
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +0 -95
- package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.tsx +0 -60
- package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.tsx +0 -50
- package/dist/starters/react/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +0 -8
- package/dist/starters/react/design-system/components/Content/Artwork/Artwork.tsx +0 -110
- package/dist/starters/react/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +0 -25
- package/dist/starters/react/design-system/components/Content/BarChart/BarChart.tsx +0 -72
- package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +0 -8
- package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.tsx +0 -43
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +0 -41
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/arrow.tsx +0 -10
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/close.tsx +0 -10
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/search.tsx +0 -10
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.fixture.ts +0 -9
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -12
- package/dist/starters/react/design-system/components/Content/Image/Image.tsx +0 -83
- package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +0 -27
- package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +0 -46
- package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +0 -17
- package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +0 -41
- package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +0 -20
- package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.tsx +0 -37
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.tsx +0 -173
- package/dist/starters/react/design-system/components/Identity/Identity.ads.scenario.tsx +0 -13
- package/dist/starters/react/design-system/components/Identity/Identity.tsx +0 -146
- package/dist/starters/react/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +0 -27
- package/dist/starters/react/design-system/components/Overlays/Menu/Menu.tsx +0 -194
- package/dist/starters/react/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +0 -19
- package/dist/starters/react/design-system/components/Overlays/Popover/Popover.tsx +0 -37
- package/dist/starters/react/design-system/controllers/FormField/FormField.ads.behavior.ts +0 -70
- package/dist/starters/react/design-system/controllers/FormField/FormField.behavior.spec.ts +0 -237
- package/dist/starters/react/design-system/controllers/FormField/FormField.ts +0 -343
- package/dist/starters/react/design-system/controllers/FormField/useFormField.ts +0 -70
- package/dist/starters/react/design-system/controllers/Palette/Palette.ts +0 -165
- package/dist/starters/react/design-system/foundation.ads.ts +0 -22
- package/dist/starters/react/design-system/index.ts +0 -51
- package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +0 -5
- package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.fixture.ts +0 -12
- package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/mocks/Workspace/Media.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/mocks/Workspace/Stress.ads.scenario.tsx +0 -36
- package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.fixture.ts +0 -13
- package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +0 -27
- package/dist/starters/react/design-system/mocks/Workspace/media/ads.svg +0 -1
- package/dist/starters/react/design-system/palette.generated.ts +0 -188
- package/dist/starters/react/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +0 -73
- package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +0 -23
- package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +0 -94
- package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.tsx +0 -137
- package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.tsx +0 -248
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -26
- package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +0 -268
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +0 -28
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.tsx +0 -105
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +0 -179
- package/dist/starters/react/design-system/profiles/Containers/containers.ads.ts +0 -67
- package/dist/starters/react/design-system/profiles/Containers/frames.ads.ts +0 -32
- package/dist/starters/react/design-system/profiles/Containers/geometry.ads.ts +0 -30
- package/dist/starters/react/design-system/profiles/Containers/spacing.ads.ts +0 -26
- package/dist/starters/react/design-system/profiles/Controls/controls.ads.ts +0 -157
- package/dist/starters/react/design-system/profiles/Controls/frames.ads.ts +0 -50
- package/dist/starters/react/design-system/profiles/Controls/spacing.ads.ts +0 -29
- package/dist/starters/react/design-system/profiles/Focus/keyboard.ads.ts +0 -13
- package/dist/starters/react/design-system/profiles/Identity/identity.ads.ts +0 -25
- package/dist/starters/react/design-system/profiles/Identity/spacing.ads.ts +0 -22
- package/dist/starters/react/design-system/profiles/Layout/grid.ads.ts +0 -69
- package/dist/starters/react/design-system/profiles/Layout/inspector.ads.ts +0 -146
- package/dist/starters/react/design-system/profiles/Layout/overlays.ads.ts +0 -94
- package/dist/starters/react/design-system/profiles/Layout/regions.ads.ts +0 -296
- package/dist/starters/react/design-system/profiles/Motion/feedback.ads.ts +0 -92
- package/dist/starters/react/design-system/profiles/Surfaces/controls.ads.ts +0 -142
- package/dist/starters/react/design-system/profiles/Surfaces/document.ads.ts +0 -2
- package/dist/starters/react/design-system/profiles/Surfaces/materials.ads.ts +0 -18
- package/dist/starters/react/design-system/profiles/Surfaces/surfaces.ads.ts +0 -48
- package/dist/starters/react/design-system/profiles/Typography/details.ads.ts +0 -19
- package/dist/starters/react/design-system/profiles/Typography/document.ads.ts +0 -2
- package/dist/starters/react/design-system/profiles/Typography/headings.ads.ts +0 -15
- package/dist/starters/react/design-system/profiles/Typography/text.ads.ts +0 -73
- package/dist/starters/react/design-system/profiles/Visuals/artwork.ads.ts +0 -46
- package/dist/starters/react/design-system/profiles/Visuals/charts.ads.ts +0 -31
- package/dist/starters/react/design-system/profiles/Visuals/content.ads.ts +0 -52
- package/dist/starters/react/design-system/profiles/Visuals/glyphs.ads.ts +0 -35
- package/dist/starters/react/design-system/profiles/Visuals/identity.ads.ts +0 -24
- package/dist/starters/react/design-system/tokens/Artwork/paint.ads.css +0 -7
- package/dist/starters/react/design-system/tokens/Artwork/visual-size.ads.css +0 -12
- package/dist/starters/react/design-system/tokens/Brand/paint.ads.css +0 -7
- package/dist/starters/react/design-system/tokens/Charts/paint.ads.css +0 -19
- package/dist/starters/react/design-system/tokens/Containers/border-width.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Containers/content-gap.ads.css +0 -5
- package/dist/starters/react/design-system/tokens/Containers/frame-inset.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Containers/frame-size.ads.css +0 -11
- package/dist/starters/react/design-system/tokens/Containers/radius.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Controls/border-width.ads.css +0 -4
- package/dist/starters/react/design-system/tokens/Controls/content-gap.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Controls/control-min-size.ads.css +0 -17
- package/dist/starters/react/design-system/tokens/Controls/frame-inset.ads.css +0 -21
- package/dist/starters/react/design-system/tokens/Controls/radius.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Controls/target-min-size.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Controls/visual-size.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Focus/border-width.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Focus/focus-offset.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Foundation/spacing.ads.css +0 -20
- package/dist/starters/react/design-system/tokens/Grid/grid-gutter.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Grid/layer.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Grid/layout-size.ads.css +0 -15
- package/dist/starters/react/design-system/tokens/Grid/spacing.ads.css +0 -12
- package/dist/starters/react/design-system/tokens/Grid/track-count.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Identity/content-gap.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Identity/visual-size.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Motion/duration.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Motion/easing.ads.css +0 -5
- package/dist/starters/react/design-system/tokens/Motion/motion-angle.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Motion/motion-distance.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Motion/motion-scale.ads.css +0 -9
- package/dist/starters/react/design-system/tokens/Surfaces/blur.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Surfaces/gradient.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Surfaces/opacity.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Surfaces/paint.ads.css +0 -58
- package/dist/starters/react/design-system/tokens/Surfaces/shadow.ads.css +0 -20
- package/dist/starters/react/design-system/tokens/Typography/font-family.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-features.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-size.ads.css +0 -9
- package/dist/starters/react/design-system/tokens/Typography/font-stretch.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-variations.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-weight.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/letter-spacing.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/line-height.ads.css +0 -11
- package/dist/starters/react/design-system/tokens/Typography/word-spacing.ads.css +0 -1
- package/dist/starters/react/starter.json +0 -11
- package/docs/STARTER.md +0 -167
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { recipe } from "@reqvire-org/ads/recipe" with { type: "macro" };
|
|
2
|
-
|
|
3
|
-
export type ArtworkSize = "standard" | "large";
|
|
4
|
-
export type ArtworkTheme = "light" | "dark" | "high-contrast";
|
|
5
|
-
export type ArtworkProps = { label?: string } & (
|
|
6
|
-
| { asset: "chevron"; size?: ArtworkSize }
|
|
7
|
-
| { asset: "sync-status"; size?: ArtworkSize; busy?: boolean }
|
|
8
|
-
| { asset: "emblem"; size?: ArtworkSize }
|
|
9
|
-
| { asset: "journey"; theme: ArtworkTheme }
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
const anatomy = recipe({
|
|
13
|
-
layout: "inline",
|
|
14
|
-
align: "center",
|
|
15
|
-
parts: {
|
|
16
|
-
visual: {
|
|
17
|
-
selector: ".ds-artwork-visual",
|
|
18
|
-
required: true,
|
|
19
|
-
kind: "visual"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}).root;
|
|
23
|
-
// No motion default is selected by this standalone artwork recipe, so this
|
|
24
|
-
// direct treatment binding is meaningful. It never creates loading state.
|
|
25
|
-
const activity = recipe({
|
|
26
|
-
parts: {
|
|
27
|
-
visual: {
|
|
28
|
-
motion: "loading-motion",
|
|
29
|
-
transition: [
|
|
30
|
-
"rotate"
|
|
31
|
-
],
|
|
32
|
-
when: {
|
|
33
|
-
"&[aria-busy=\"true\"]": {
|
|
34
|
-
rotate: {
|
|
35
|
-
slot: "motion",
|
|
36
|
-
field: "angle"
|
|
37
|
-
},
|
|
38
|
-
repeat: "continuous"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}).root;
|
|
44
|
-
// Public size chooses a visual profile once. The macro derives the drawing;
|
|
45
|
-
// no source import, named asset size, or parallel SVG lookup is maintained here.
|
|
46
|
-
const artworkChoices = {
|
|
47
|
-
chevronStandard: {
|
|
48
|
-
artwork: recipe({ parts: { visual: { kind: "visual", asset: "chevron", visual: "artwork-icon-standard" } } }),
|
|
49
|
-
},
|
|
50
|
-
chevronLarge: {
|
|
51
|
-
artwork: recipe({ parts: { visual: { kind: "visual", asset: "chevron", visual: "artwork-icon-large" } } }),
|
|
52
|
-
},
|
|
53
|
-
syncStandard: {
|
|
54
|
-
artwork: recipe({ parts: { visual: { kind: "visual", asset: "sync-status", visual: "artwork-icon-standard" } } }),
|
|
55
|
-
},
|
|
56
|
-
syncLarge: {
|
|
57
|
-
artwork: recipe({ parts: { visual: { kind: "visual", asset: "sync-status", visual: "artwork-icon-large" } } }),
|
|
58
|
-
},
|
|
59
|
-
emblemStandard: {
|
|
60
|
-
artwork: recipe({ parts: { visual: { kind: "visual", asset: "emblem", visual: "artwork-icon-standard" } } }),
|
|
61
|
-
},
|
|
62
|
-
emblemLarge: {
|
|
63
|
-
artwork: recipe({ parts: { visual: { kind: "visual", asset: "emblem", visual: "artwork-icon-large" } } }),
|
|
64
|
-
},
|
|
65
|
-
journeyLight: {
|
|
66
|
-
artwork: recipe({ theme: "light", parts: { visual: { kind: "visual", asset: "journey", visual: "artwork-illustration" } } }),
|
|
67
|
-
theme: "light" as const,
|
|
68
|
-
},
|
|
69
|
-
journeyDark: {
|
|
70
|
-
artwork: recipe({ theme: "dark", parts: { visual: { kind: "visual", asset: "journey", visual: "artwork-illustration" } } }),
|
|
71
|
-
theme: "dark" as const,
|
|
72
|
-
},
|
|
73
|
-
journeyContrast: {
|
|
74
|
-
artwork: recipe({ theme: "high-contrast", parts: { visual: { kind: "visual", asset: "journey", visual: "artwork-illustration" } } }),
|
|
75
|
-
theme: "high-contrast" as const,
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
const iconChoices = {
|
|
79
|
-
chevron: { standard: artworkChoices.chevronStandard, large: artworkChoices.chevronLarge },
|
|
80
|
-
"sync-status": { standard: artworkChoices.syncStandard, large: artworkChoices.syncLarge },
|
|
81
|
-
emblem: { standard: artworkChoices.emblemStandard, large: artworkChoices.emblemLarge },
|
|
82
|
-
};
|
|
83
|
-
const journeyChoices = {
|
|
84
|
-
light: artworkChoices.journeyLight,
|
|
85
|
-
dark: artworkChoices.journeyDark,
|
|
86
|
-
"high-contrast": artworkChoices.journeyContrast,
|
|
87
|
-
};
|
|
88
|
-
const rootClasses = { chevron: anatomy, "sync-status": `${anatomy} ${activity}`, emblem: anatomy };
|
|
89
|
-
|
|
90
|
-
/** Omit label when surrounding text supplies the meaning. The caller passes
|
|
91
|
-
its theme explicitly for intrinsic artwork; no DOM reads or ADS runtime. */
|
|
92
|
-
export function Artwork(props: ArtworkProps) {
|
|
93
|
-
if (props.asset === "journey") {
|
|
94
|
-
const chosen = journeyChoices[props.theme];
|
|
95
|
-
return <span className={anatomy} data-theme={chosen.theme}>
|
|
96
|
-
{/* An image document isolates gradient IDs even with repeated instances.
|
|
97
|
-
The visual contract reserves this drawing's own ratio and optical extent. */}
|
|
98
|
-
<span className={`ds-artwork-visual ${chosen.artwork.parts.visual}`}><img src={chosen.artwork.assets.visual.source} alt={props.label ?? ""} /></span>
|
|
99
|
-
</span>;
|
|
100
|
-
}
|
|
101
|
-
const chosen = iconChoices[props.asset][props.size ?? "standard"];
|
|
102
|
-
const busy = props.asset === "sync-status" && props.busy;
|
|
103
|
-
return <span className={rootClasses[props.asset]}
|
|
104
|
-
aria-busy={busy || undefined}
|
|
105
|
-
role={props.label ? "img" : undefined} aria-label={props.label} aria-hidden={props.label ? undefined : true}>
|
|
106
|
-
{/* Trusted build imports. Scoped paint channels are emitted by the proposed
|
|
107
|
-
compiler; the component neither supplies raw colors nor edits SVG strings. */}
|
|
108
|
-
<span className={`ds-artwork-visual ${chosen.artwork.parts.visual}`} dangerouslySetInnerHTML={{ __html: chosen.artwork.assets.visual.source }} />
|
|
109
|
-
</span>;
|
|
110
|
-
}
|
package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { BarChart, type SeriesPaint } from "@ds";
|
|
2
|
-
import type { Scenario } from "@reqvire-org/ads/showcase";
|
|
3
|
-
|
|
4
|
-
/** Application data names its channels; a typed record maps them to the chart's series paints. */
|
|
5
|
-
type Channel = "search" | "social" | "direct";
|
|
6
|
-
const SERIES: Record<Channel, SeriesPaint> = { search: "--chart-1", social: "--chart-2", direct: "--chart-3" };
|
|
7
|
-
const VISITS: readonly { readonly channel: Channel; readonly visits: number }[] = [
|
|
8
|
-
{ channel: "search", visits: 82 },
|
|
9
|
-
{ channel: "social", visits: 47 },
|
|
10
|
-
{ channel: "direct", visits: 31 },
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
export const scenario = {
|
|
14
|
-
title: "Bar chart",
|
|
15
|
-
description: "Bars painted by their data's series.",
|
|
16
|
-
covers: ["BarChart"],
|
|
17
|
-
specimens: [
|
|
18
|
-
{
|
|
19
|
-
title: "Visits by channel",
|
|
20
|
-
width: "medium",
|
|
21
|
-
render: () => <BarChart label="Visits by channel: search 82, social 47, direct 31"
|
|
22
|
-
items={VISITS.map(({ channel, visits }) => ({ name: channel, value: visits, series: SERIES[channel] }))} />,
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
} satisfies Scenario;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { recipe } from "@reqvire-org/ads/recipe" with { type: "macro" };
|
|
2
|
-
|
|
3
|
-
/* A bar per item on the page surface; each bar's fill is the series paint its
|
|
4
|
-
data selects, or the first series until it names one. */
|
|
5
|
-
const chart = recipe({
|
|
6
|
-
profile: "bar-chart",
|
|
7
|
-
frame: {},
|
|
8
|
-
parts: {
|
|
9
|
-
bar: {
|
|
10
|
-
selector: ".ds-bar-chart-bar",
|
|
11
|
-
kind: "vector",
|
|
12
|
-
required: false,
|
|
13
|
-
surface: "primary-foreground",
|
|
14
|
-
stroke: {
|
|
15
|
-
slot: "visual",
|
|
16
|
-
field: "strokeWidth"
|
|
17
|
-
},
|
|
18
|
-
paints: {
|
|
19
|
-
series: {
|
|
20
|
-
property: "fill",
|
|
21
|
-
values: [
|
|
22
|
-
"--chart-1",
|
|
23
|
-
"--chart-2",
|
|
24
|
-
"--chart-3"
|
|
25
|
-
],
|
|
26
|
-
fallback: "--chart-1"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
/** The paints a series can take: the chart's declared series tokens. */
|
|
34
|
-
export type SeriesPaint = (typeof chart)["paints"]["series"];
|
|
35
|
-
|
|
36
|
-
export interface BarChartItem {
|
|
37
|
-
readonly name: string;
|
|
38
|
-
readonly value: number;
|
|
39
|
-
/** The item's series paint; the first series when omitted. */
|
|
40
|
-
readonly series?: SeriesPaint;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface BarChartProps {
|
|
44
|
-
/** Names the chart as one image. */
|
|
45
|
-
label: string;
|
|
46
|
-
items: readonly BarChartItem[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** Drawing units per bar and the plot's height; the frame scales the drawing. */
|
|
50
|
-
const SLOT = 40;
|
|
51
|
-
const BAR = 28;
|
|
52
|
-
const HEIGHT = 100;
|
|
53
|
-
|
|
54
|
-
function paint(bar: SVGRectElement, series: SeriesPaint | undefined): void {
|
|
55
|
-
if (series === undefined) chart.paints.clear(bar);
|
|
56
|
-
else chart.paints.set(bar, { series });
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/** A bar's height in drawing units: its share of the largest value. */
|
|
60
|
-
const extent = (value: number, largest: number): number => (Math.max(0, value) / largest) * HEIGHT;
|
|
61
|
-
|
|
62
|
-
/** Bars scaled to the largest value; each bar names its item and value. */
|
|
63
|
-
export function BarChart({ label, items }: BarChartProps) {
|
|
64
|
-
const largest = Math.max(1, ...items.map((item) => item.value));
|
|
65
|
-
return <svg className={chart.root} viewBox={`0 0 ${Math.max(1, items.length) * SLOT} ${HEIGHT}`} role="img" aria-label={label}>
|
|
66
|
-
{items.map((item, index) => <rect key={item.name} className="ds-bar-chart-bar" data-item={item.name}
|
|
67
|
-
x={index * SLOT + (SLOT - BAR) / 2} y={HEIGHT - extent(item.value, largest)} width={BAR} height={extent(item.value, largest)}
|
|
68
|
-
ref={(bar) => { if (bar !== null) paint(bar, item.series); }}>
|
|
69
|
-
<title>{`${item.name}: ${item.value}`}</title>
|
|
70
|
-
</rect>)}
|
|
71
|
-
</svg>;
|
|
72
|
-
}
|
package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GuideGrid } from "@ds";
|
|
2
|
-
import type { Scenario } from "@reqvire-org/ads/showcase";
|
|
3
|
-
|
|
4
|
-
export const scenario = {
|
|
5
|
-
title: "Guide grid",
|
|
6
|
-
covers: ["GuideGrid"],
|
|
7
|
-
specimens: [{ title: "Two, four and eight divisions", arrangement: "row", render: () => <>{[2, 4, 8].map(divisions => <GuideGrid key={divisions} divisions={divisions} />)}</> }],
|
|
8
|
-
} satisfies Scenario;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { recipe } from "@reqvire-org/ads/recipe" with { type: "macro" };
|
|
2
|
-
|
|
3
|
-
export interface GuideGridProps {
|
|
4
|
-
/** Equal divisions per axis; the lines between them are computed, so they are owned geometry, not an asset. */
|
|
5
|
-
divisions: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/* Owned SVG geometry: minor lines and the two centre axes, stroked from
|
|
9
|
-
colour-only surfaces and the visual profile's hairline width. A decorative
|
|
10
|
-
overlay: hidden from assistive technology and transparent to the pointer. */
|
|
11
|
-
const grid = recipe({
|
|
12
|
-
profile: "guide-grid",
|
|
13
|
-
frame: {},
|
|
14
|
-
parts: {
|
|
15
|
-
minor: {
|
|
16
|
-
selector: ".ds-guide-minor",
|
|
17
|
-
kind: "vector",
|
|
18
|
-
required: false,
|
|
19
|
-
surface: "secondary-foreground",
|
|
20
|
-
stroke: { slot: "visual", field: "strokeWidth" }
|
|
21
|
-
},
|
|
22
|
-
axis: {
|
|
23
|
-
selector: ".ds-guide-axis",
|
|
24
|
-
kind: "vector",
|
|
25
|
-
required: true,
|
|
26
|
-
surface: "primary-foreground",
|
|
27
|
-
stroke: { slot: "visual", field: "strokeWidth" }
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
normalize: {
|
|
31
|
-
pointerEvents: "none"
|
|
32
|
-
}
|
|
33
|
-
}).root;
|
|
34
|
-
|
|
35
|
-
export function GuideGrid({ divisions }: GuideGridProps) {
|
|
36
|
-
const steps = Array.from({ length: Math.max(0, divisions - 1) }, (_, index) => ((index + 1) * 100) / divisions).filter((at) => at !== 50);
|
|
37
|
-
return <svg className={`ds-artwork-grid ${grid}`} viewBox="0 0 100 100" preserveAspectRatio="none" aria-hidden="true" focusable="false">
|
|
38
|
-
{steps.map((at) => <line key={`column-${at}`} className="ds-guide-minor" x1={at} y1={0} x2={at} y2={100} />)}
|
|
39
|
-
{steps.map((at) => <line key={`row-${at}`} className="ds-guide-minor" x1={0} y1={at} x2={100} y2={at} />)}
|
|
40
|
-
<line className="ds-guide-axis" x1={50} y1={0} x2={50} y2={100} />
|
|
41
|
-
<line className="ds-guide-axis" x1={0} y1={50} x2={100} y2={50} />
|
|
42
|
-
</svg>;
|
|
43
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ArrowIcon, CloseIcon, Icon, IconButton, SearchIcon, closeGlyph, searchGlyph } from "@ds";
|
|
2
|
-
import type { Scenario } from "@reqvire-org/ads/showcase";
|
|
3
|
-
|
|
4
|
-
export const scenario = {
|
|
5
|
-
title: "Icon",
|
|
6
|
-
description: "Glyph references: ready icons, sizes and icon-only controls.",
|
|
7
|
-
covers: ["Icon", "IconButton"],
|
|
8
|
-
specimens: [
|
|
9
|
-
{ title: "Ready icons", note: "Beside text an icon is decorative; alone it carries a label.", arrangement: "row", render: () => <><SearchIcon />Search<ArrowIcon size="sm" />Next<CloseIcon size="lg" label="Close" /></> },
|
|
10
|
-
{ title: "Sizes", arrangement: "row", render: () => <>{(["sm", "md", "lg"] as const).map((size) => <Icon key={size} glyph={searchGlyph} size={size} />)}</> },
|
|
11
|
-
{
|
|
12
|
-
title: "Icon-only controls",
|
|
13
|
-
arrangement: "row",
|
|
14
|
-
render: () => <>
|
|
15
|
-
<IconButton icon={closeGlyph} label="Close" />
|
|
16
|
-
<IconButton icon={searchGlyph} label="Search" size="lg" />
|
|
17
|
-
<IconButton icon={closeGlyph} label="Close (unavailable)" disabled />
|
|
18
|
-
</>,
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
} satisfies Scenario;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { recipe } from "@reqvire-org/ads/recipe" with { type: "macro" };
|
|
2
|
-
import type { Glyph } from "@reqvire-org/ads/asset";
|
|
3
|
-
|
|
4
|
-
/** The glyphs an Icon (and IconButton) can draw: the references the design system exports, on one 20 × 20 grid. */
|
|
5
|
-
export type IconGlyph = "arrow" | "close" | "search";
|
|
6
|
-
export type IconSize = "sm" | "md" | "lg";
|
|
7
|
-
export interface IconProps {
|
|
8
|
-
/** A glyph reference from the public barrel (`closeGlyph`); never a name string. */
|
|
9
|
-
glyph: Glyph<IconGlyph>;
|
|
10
|
-
size?: IconSize;
|
|
11
|
-
/** Omit when surrounding text supplies the meaning. */
|
|
12
|
-
label?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const anatomy = recipe({
|
|
16
|
-
layout: "inline",
|
|
17
|
-
align: "center",
|
|
18
|
-
parts: {
|
|
19
|
-
visual: {
|
|
20
|
-
selector: ".ds-icon-visual",
|
|
21
|
-
required: true,
|
|
22
|
-
kind: "visual"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}).root;
|
|
26
|
-
// One construction per size, whichever glyph is drawn: the reference carries
|
|
27
|
-
// the drawing; the size chooses the visual profile.
|
|
28
|
-
const sizes = {
|
|
29
|
-
sm: recipe({ parts: { visual: { kind: "visual", glyph: "reference", visual: "glyph-sm" } } }),
|
|
30
|
-
md: recipe({ parts: { visual: { kind: "visual", glyph: "reference", visual: "glyph-md" } } }),
|
|
31
|
-
lg: recipe({ parts: { visual: { kind: "visual", glyph: "reference", visual: "glyph-lg" } } }),
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/** A standalone glyph: decorative beside text, or an image with its label. */
|
|
35
|
-
export function Icon({ glyph, size = "md", label }: IconProps) {
|
|
36
|
-
const drawn = sizes[size];
|
|
37
|
-
return <span className={anatomy} role={label ? "img" : undefined} aria-label={label} aria-hidden={label ? undefined : true}>
|
|
38
|
-
{/* The reference's drawing is trusted, compiled design-system artwork. */}
|
|
39
|
-
<span className={`ds-icon-visual ${drawn.parts.visual}`} dangerouslySetInnerHTML={{ __html: glyph.source }} />
|
|
40
|
-
</span>;
|
|
41
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { glyph } from "@reqvire-org/ads/asset" with { type: "macro" };
|
|
2
|
-
import { Icon, type IconProps } from "../Icon";
|
|
3
|
-
|
|
4
|
-
/** The arrow glyph as a reference, for owners that take an icon. */
|
|
5
|
-
export const arrowGlyph = glyph("arrow");
|
|
6
|
-
|
|
7
|
-
/** The arrow glyph, ready to render. */
|
|
8
|
-
export function ArrowIcon(props: Omit<IconProps, "glyph">) {
|
|
9
|
-
return <Icon glyph={arrowGlyph} {...props} />;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { glyph } from "@reqvire-org/ads/asset" with { type: "macro" };
|
|
2
|
-
import { Icon, type IconProps } from "../Icon";
|
|
3
|
-
|
|
4
|
-
/** The close glyph as a reference, for owners that take an icon (`<IconButton icon={closeGlyph} … />`). */
|
|
5
|
-
export const closeGlyph = glyph("close");
|
|
6
|
-
|
|
7
|
-
/** The close glyph, ready to render. */
|
|
8
|
-
export function CloseIcon(props: Omit<IconProps, "glyph">) {
|
|
9
|
-
return <Icon glyph={closeGlyph} {...props} />;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { glyph } from "@reqvire-org/ads/asset" with { type: "macro" };
|
|
2
|
-
import { Icon, type IconProps } from "../Icon";
|
|
3
|
-
|
|
4
|
-
/** The search glyph as a reference, for owners that take an icon. */
|
|
5
|
-
export const searchGlyph = glyph("search");
|
|
6
|
-
|
|
7
|
-
/** The search glyph, ready to render. */
|
|
8
|
-
export function SearchIcon(props: Omit<IconProps, "glyph">) {
|
|
9
|
-
return <Icon glyph={searchGlyph} {...props} />;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// A 100 × 200 portrait drawn as data: a dark band across its top quarter, so a crop's focal point is visible.
|
|
2
|
-
const portrait = "data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='200' viewBox='0 0 100 200'%3E%3Crect width='100' height='200' fill='%23c8d0cd'/%3E%3Crect width='100' height='50' fill='%23183c35'/%3E%3C/svg%3E";
|
|
3
|
-
export const fixture = {
|
|
4
|
-
title: "Image: contained, and cropped to a ratio around its focal point",
|
|
5
|
-
alt: "A portrait placeholder with a dark band across its top",
|
|
6
|
-
source: { src: portrait, width: 100, height: 200 },
|
|
7
|
-
// The top of the image: half its height above the centre.
|
|
8
|
-
top: [0, -0.5],
|
|
9
|
-
} as const;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Image } from "@ds";
|
|
2
|
-
import type { Scenario } from "@reqvire-org/ads/showcase";
|
|
3
|
-
import { fixture } from "./Image.ads.fixture";
|
|
4
|
-
export const scenario = {
|
|
5
|
-
title: fixture.title,
|
|
6
|
-
covers: ["Image"],
|
|
7
|
-
specimens: [
|
|
8
|
-
{ title: "The file's own ratio", width: "medium", render: () => <Image source={fixture.source} alt={fixture.alt} /> },
|
|
9
|
-
{ title: "Cropped to 16 by 9", note: "The crop keeps the image's centre.", width: "medium", render: () => <Image source={fixture.source} alt={fixture.alt} aspectRatio="16 / 9" /> },
|
|
10
|
-
{ title: "Cropped around a focal point", note: "The source names the point the crop keeps.", width: "medium", render: () => <Image source={{ ...fixture.source, focus: fixture.top }} alt={fixture.alt} aspectRatio="16 / 9" /> },
|
|
11
|
-
],
|
|
12
|
-
} satisfies Scenario;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { recipe } from "@reqvire-org/ads/recipe" with { type: "macro" };
|
|
2
|
-
|
|
3
|
-
/** File metadata, not authored display dimensions. CMS/user content can change
|
|
4
|
-
* the source and intrinsic ratio; profiles still own its displayed extent. */
|
|
5
|
-
export interface ContentImage {
|
|
6
|
-
src: string;
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
/** Where a crop keeps the image: fractions of its width and height from the centre (right and down positive, within ±0.5). The image's own, like an asset's optical centre. */
|
|
10
|
-
focus?: readonly [x: number, y: number];
|
|
11
|
-
}
|
|
12
|
-
export interface ImageProps {
|
|
13
|
-
source: ContentImage;
|
|
14
|
-
alt: string;
|
|
15
|
-
priority?: boolean;
|
|
16
|
-
/** Crops the image to this shape, filling its frame; without it the image keeps its own ratio. */
|
|
17
|
-
aspectRatio?: "1 / 1" | "3 / 2" | "16 / 9";
|
|
18
|
-
/** Resource-selection hints supplied with application media, not CSS styles. */
|
|
19
|
-
responsive?: { srcSet: string; sizes: string };
|
|
20
|
-
}
|
|
21
|
-
const image = recipe({
|
|
22
|
-
layout: "inline",
|
|
23
|
-
profile: "content-media",
|
|
24
|
-
frame: {},
|
|
25
|
-
parts: {
|
|
26
|
-
visual: {
|
|
27
|
-
selector: ".ds-content-image",
|
|
28
|
-
kind: "visual",
|
|
29
|
-
required: true,
|
|
30
|
-
// The file's own pixel size reserves the image's box before it loads.
|
|
31
|
-
measured: {
|
|
32
|
-
intrinsic: {
|
|
33
|
-
type: "intrinsic-size",
|
|
34
|
-
property: "inline-size"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// The cropped form: the frame's ratio is the shape and the image fills it around
|
|
42
|
-
// its focal point, a measured position the image data supplies at render time.
|
|
43
|
-
const cover = recipe({
|
|
44
|
-
layout: "stack",
|
|
45
|
-
profile: "cover-media",
|
|
46
|
-
parts: {
|
|
47
|
-
visual: {
|
|
48
|
-
selector: ".ds-content-image",
|
|
49
|
-
kind: "visual",
|
|
50
|
-
required: true,
|
|
51
|
-
measured: {
|
|
52
|
-
focus: {
|
|
53
|
-
type: "position",
|
|
54
|
-
property: "object-position"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
const ratios = {
|
|
61
|
-
"1 / 1": recipe({ frame: { ratio: "1 / 1" } }).root,
|
|
62
|
-
"3 / 2": recipe({ frame: { ratio: "3 / 2" } }).root,
|
|
63
|
-
"16 / 9": recipe({ frame: { ratio: "16 / 9" } }).root,
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/** Ordinary content media is not a registered icon or brand drawing. The visual
|
|
67
|
-
* profile contains it without stretching, or crops it to a declared ratio around
|
|
68
|
-
* the image's own focal point; no inline styling escape. */
|
|
69
|
-
export function Image({ source, alt, priority = false, aspectRatio, responsive }: ImageProps) {
|
|
70
|
-
if (aspectRatio !== undefined)
|
|
71
|
-
return <span className={`${cover.root} ${ratios[aspectRatio]}`}>
|
|
72
|
-
<img className="ds-content-image" {...cover.measured.props({ focus: source.focus })} loading={priority ? "eager" : "lazy"}
|
|
73
|
-
decoding="async" fetchPriority={priority ? "high" : undefined}
|
|
74
|
-
width={source.width} height={source.height} sizes={responsive?.sizes} srcSet={responsive?.srcSet}
|
|
75
|
-
src={source.src} alt={alt} />
|
|
76
|
-
</span>;
|
|
77
|
-
return <span className={image.root}>
|
|
78
|
-
<img className="ds-content-image" {...image.measured.props({ intrinsic: [source.width, source.height] })} loading={priority ? "eager" : "lazy"}
|
|
79
|
-
decoding="async" fetchPriority={priority ? "high" : undefined}
|
|
80
|
-
width={source.width} height={source.height} sizes={responsive?.sizes} srcSet={responsive?.srcSet}
|
|
81
|
-
src={source.src} alt={alt} />
|
|
82
|
-
</span>;
|
|
83
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "preact/hooks";
|
|
2
|
-
import { InspectedGlyph } from "@ds";
|
|
3
|
-
import type { Scenario } from "@reqvire-org/ads/showcase";
|
|
4
|
-
|
|
5
|
-
const SVG = "http://www.w3.org/2000/svg";
|
|
6
|
-
|
|
7
|
-
/** A small inert drawing, as the host's sanitizer would hand one over. */
|
|
8
|
-
function drawing(): SVGSVGElement {
|
|
9
|
-
const svg = document.createElementNS(SVG, "svg");
|
|
10
|
-
svg.setAttribute("viewBox", "0 0 24 24");
|
|
11
|
-
const path = document.createElementNS(SVG, "path");
|
|
12
|
-
path.setAttribute("d", "M12 3 21 12 12 21 3 12Z");
|
|
13
|
-
path.setAttribute("fill", "currentColor");
|
|
14
|
-
svg.append(path);
|
|
15
|
-
return svg;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Each glyph owns its drawing (an element has one parent).
|
|
19
|
-
export const scenario = {
|
|
20
|
-
title: "Inspected glyph",
|
|
21
|
-
description: "A drawing the host hands over, shown as it is.",
|
|
22
|
-
covers: ["InspectedGlyph"],
|
|
23
|
-
specimens: [
|
|
24
|
-
{ title: "A drawing alone", render: () => <InspectedGlyph drawing={useMemo(drawing, [])} label="Diamond" /> },
|
|
25
|
-
{ title: "With guides", render: () => <InspectedGlyph drawing={useMemo(drawing, [])} label="Diamond with guides" guides /> },
|
|
26
|
-
],
|
|
27
|
-
} satisfies Scenario;
|
package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { recipe } from "@reqvire-org/ads/recipe" with { type: "macro" };
|
|
2
|
-
import { useLayoutEffect, useRef } from "preact/hooks";
|
|
3
|
-
import { GuideGrid } from "@ds";
|
|
4
|
-
|
|
5
|
-
export interface InspectedGlyphProps {
|
|
6
|
-
/** The inspected project's glyph, made inert and sized by ADS's inspected-SVG sanitizer (`sanitizeInspectedSvg`) in the host. */
|
|
7
|
-
drawing: SVGSVGElement;
|
|
8
|
-
label: string;
|
|
9
|
-
/** Guide lines over the drawing (a layer above it). */
|
|
10
|
-
guides?: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/* Two layers in one area, painted in DOM order: the drawing (centred by its
|
|
14
|
-
visual part), then the guides, which stretch over the whole stage. */
|
|
15
|
-
const stage = recipe({
|
|
16
|
-
layout: "layered",
|
|
17
|
-
profile: "inspected-glyph",
|
|
18
|
-
frame: {},
|
|
19
|
-
parts: {
|
|
20
|
-
media: {
|
|
21
|
-
selector: ".ds-inspected-media",
|
|
22
|
-
kind: "visual",
|
|
23
|
-
media: "inspected-svg",
|
|
24
|
-
required: true
|
|
25
|
-
},
|
|
26
|
-
guides: {
|
|
27
|
-
selector: ".ds-inspected-guides",
|
|
28
|
-
required: false
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}).root;
|
|
32
|
-
|
|
33
|
-
/** Shows another project's glyph: the element arrives sanitized and is inserted, never parsed here. */
|
|
34
|
-
export function InspectedGlyph({ drawing, label, guides = false }: InspectedGlyphProps) {
|
|
35
|
-
const media = useRef<HTMLSpanElement>(null);
|
|
36
|
-
useLayoutEffect(() => {
|
|
37
|
-
const host = media.current;
|
|
38
|
-
if (host === null) return undefined;
|
|
39
|
-
host.replaceChildren(drawing);
|
|
40
|
-
return () => host.replaceChildren();
|
|
41
|
-
}, [drawing]);
|
|
42
|
-
return <span className={stage} role="img" aria-label={label}>
|
|
43
|
-
<span ref={media} className="ds-inspected-media" />
|
|
44
|
-
{guides && <span className="ds-inspected-guides"><GuideGrid divisions={4} /></span>}
|
|
45
|
-
</span>;
|
|
46
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PartnerLogo } from "@ds";
|
|
2
|
-
import type { Scenario } from "@reqvire-org/ads/showcase";
|
|
3
|
-
export const scenario = {
|
|
4
|
-
title: "Partner logos",
|
|
5
|
-
description: "Other products' marks keep their own colours, with a drawing per theme.",
|
|
6
|
-
covers: ["PartnerLogo"],
|
|
7
|
-
specimens: [
|
|
8
|
-
{
|
|
9
|
-
title: "In the light theme",
|
|
10
|
-
arrangement: "row",
|
|
11
|
-
render: () => <>
|
|
12
|
-
<PartnerLogo partner="harbor-pay" label="Harbor Pay" theme="light" />
|
|
13
|
-
<PartnerLogo partner="lumen-cloud" label="Lumen Cloud" theme="light" />
|
|
14
|
-
</>,
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
} satisfies Scenario;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { recipe } from "@reqvire-org/ads/recipe" with { type: "macro" };
|
|
2
|
-
|
|
3
|
-
export type Partner = "harbor-pay" | "lumen-cloud";
|
|
4
|
-
export type PartnerLogoTheme = "light" | "dark" | "high-contrast";
|
|
5
|
-
export interface PartnerLogoProps {
|
|
6
|
-
partner: Partner;
|
|
7
|
-
/** The partner's name, read by assistive technology. */
|
|
8
|
-
label: string;
|
|
9
|
-
/** The theme the logo sits in: it selects the logo's light or dark artwork. */
|
|
10
|
-
theme: PartnerLogoTheme;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const anatomy = recipe({
|
|
14
|
-
layout: "inline",
|
|
15
|
-
align: "center",
|
|
16
|
-
parts: { visual: { selector: ".ds-partner-logo-visual", required: true, kind: "visual" } },
|
|
17
|
-
}).root;
|
|
18
|
-
// One drawing per partner and theme: the asset declares its light and dark artwork, the recipe's
|
|
19
|
-
// theme selects between them. No source import and no lookup by file name.
|
|
20
|
-
const drawings = {
|
|
21
|
-
"harbor-pay": {
|
|
22
|
-
light: recipe({ theme: "light", parts: { visual: { kind: "visual", asset: "harbor-pay", visual: "partner-logo" } } }),
|
|
23
|
-
dark: recipe({ theme: "dark", parts: { visual: { kind: "visual", asset: "harbor-pay", visual: "partner-logo" } } }),
|
|
24
|
-
"high-contrast": recipe({ theme: "high-contrast", parts: { visual: { kind: "visual", asset: "harbor-pay", visual: "partner-logo" } } }),
|
|
25
|
-
},
|
|
26
|
-
"lumen-cloud": {
|
|
27
|
-
light: recipe({ theme: "light", parts: { visual: { kind: "visual", asset: "lumen-cloud", visual: "partner-logo" } } }),
|
|
28
|
-
dark: recipe({ theme: "dark", parts: { visual: { kind: "visual", asset: "lumen-cloud", visual: "partner-logo" } } }),
|
|
29
|
-
"high-contrast": recipe({ theme: "high-contrast", parts: { visual: { kind: "visual", asset: "lumen-cloud", visual: "partner-logo" } } }),
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
/** Another product's logo, unaltered: its own colours and proportions, in the artwork for the theme it sits in. */
|
|
34
|
-
export function PartnerLogo({ partner, label, theme }: PartnerLogoProps) {
|
|
35
|
-
const drawn = drawings[partner][theme];
|
|
36
|
-
return (
|
|
37
|
-
<span className={anatomy} data-theme={theme}>
|
|
38
|
-
<span className={`ds-partner-logo-visual ${drawn.parts.visual}`}><img src={drawn.assets.visual.source} alt={label} /></span>
|
|
39
|
-
</span>
|
|
40
|
-
);
|
|
41
|
-
}
|
package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { StatusIcon, type StatusName } from "@ds";
|
|
2
|
-
import type { Scenario } from "@reqvire-org/ads/showcase";
|
|
3
|
-
|
|
4
|
-
// Data, as an application would receive it: each status selects its drawing from the status glyph set.
|
|
5
|
-
const checks: readonly { readonly name: string; readonly status: StatusName }[] = [
|
|
6
|
-
{ name: "Build", status: "success" },
|
|
7
|
-
{ name: "Accessibility audit", status: "warning" },
|
|
8
|
-
{ name: "Visual comparison", status: "error" },
|
|
9
|
-
{ name: "Release notes", status: "ok" },
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
export const scenario = {
|
|
13
|
-
title: "Status icon",
|
|
14
|
-
description: "Status glyphs drawn by name from data.",
|
|
15
|
-
covers: ["StatusIcon"],
|
|
16
|
-
specimens: [
|
|
17
|
-
{ title: "One per check", note: "Build, accessibility audit, visual comparison and release notes.", arrangement: "row", render: () => <>{checks.map((check) => <StatusIcon key={check.name} status={check.status} label={check.name} />)}</> },
|
|
18
|
-
{ title: "Large", render: () => <StatusIcon status="warning" size="large" label="Needs attention" /> },
|
|
19
|
-
],
|
|
20
|
-
} satisfies Scenario;
|