@reqvire-org/ads 0.5.0 → 0.5.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 +9 -6
- package/dist/ads-errors.mjs +275 -12
- package/dist/ads-views.mjs +4 -4
- package/dist/analysis/design-usage.mjs +20 -4
- package/dist/analysis/mock-check.mjs +5 -4
- package/dist/analysis/owner-analysis-key.mjs +1 -1
- package/dist/analysis/owner-choices.mjs +172 -39
- package/dist/analysis/owner-composition.mjs +37 -13
- package/dist/analysis/owner-controls.mjs +27 -0
- package/dist/analysis/owner-source.mjs +67 -18
- package/dist/analysis/prose-owners.mjs +57 -0
- package/dist/analysis/styling-ownership.mjs +22 -0
- package/dist/check.mjs +7 -1
- package/dist/cli-arguments.mjs +2 -2
- package/dist/cli.mjs +3 -3
- package/dist/composed-contrast.mjs +28 -8
- package/dist/composed-keyline.mjs +107 -0
- package/dist/construction-output.mjs +146 -18
- package/dist/construction-spec.d.mts +212 -9
- package/dist/construction-spec.mjs +297 -56
- package/dist/corner-overpaint.mjs +53 -0
- package/dist/design-foundation.mjs +6 -1
- package/dist/design-usage.mjs +8 -2
- package/dist/emit/emission.mjs +11 -4
- package/dist/emit/font-emission.mjs +21 -1
- package/dist/emit/foundation-sheet.mjs +6 -5
- package/dist/emit/preview-tree.mjs +1 -1
- package/dist/finding-rules.mjs +7 -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/foundation-macro.d.mts +1 -1
- package/dist/frame-regions.mjs +66 -3
- package/dist/grid-facts.mjs +72 -16
- package/dist/grid-lowering.mjs +11 -5
- package/dist/init.mjs +14 -23
- package/dist/lowering-enter.mjs +31 -0
- package/dist/lowering-properties.mjs +22 -1
- package/dist/lowering-region-layout.mjs +42 -8
- package/dist/lowering-sequence.mjs +89 -0
- package/dist/lowering-session.mjs +7 -0
- package/dist/lowering-transitions.mjs +22 -8
- package/dist/mcp/preview-http.bundle.js +2 -2
- package/dist/mcp/preview-widget.bundle.js +5 -5
- package/dist/motion-model.mjs +2 -0
- package/dist/owner-analysis-check.mjs +67 -7
- package/dist/owner-errors.mjs +16 -0
- package/dist/owner-lowering.mjs +36 -16
- package/dist/owner-scenarios.mjs +25 -3
- package/dist/ownership-model.mjs +23 -4
- package/dist/paint-contrast.mjs +5 -0
- package/dist/placeholder-contrast.mjs +1 -0
- package/dist/platform-features.mjs +26 -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 +105 -3
- package/dist/recipe-model.mjs +31 -7
- package/dist/region-lowering.mjs +241 -41
- package/dist/render-audit/corner-overpaint.page.mjs +54 -0
- package/dist/render-audit/worker.mjs +6 -1
- package/dist/render-audit.mjs +25 -0
- package/dist/role-vocabulary.d.mts +38 -2
- package/dist/role-vocabulary.mjs +39 -4
- package/dist/scenario-kit.d.mts +6 -0
- package/dist/scenario-registry.mjs +1 -1
- 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 +117 -86
- 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 +2 -2
- package/dist/skills/ads-designer/references/atomic-styles.md +8 -1
- package/dist/skills/ads-designer/references/branding.md +7 -2
- package/dist/skills/ads-designer/references/cli.md +4 -4
- package/dist/skills/ads-designer/references/contracts.md +9 -2
- 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 +42 -3
- package/dist/skills/ads-designer/references/motion.md +37 -1
- package/dist/skills/ads-designer/references/performance.md +7 -1
- package/dist/skills/ads-designer/references/recipes.md +67 -6
- 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 +9 -2
- 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 +42 -3
- package/dist/skills/ads-import/references/recipes.md +67 -6
- 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 +2 -1
- package/dist/skills/ads-migrate/references/0.5.0-to-0.5.1.md +239 -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 +9 -2
- 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 +42 -3
- package/dist/skills/ads-port/references/recipes.md +67 -6
- 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 +68 -10
- package/dist/surface-effects.mjs +98 -0
- package/dist/target-size.mjs +1 -1
- package/dist/task-cache.mjs +1 -1
- 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.mjs +1 -1
- package/docs/ADS.md +36 -13
- package/docs/ARCHITECTURE.md +160 -16
- package/docs/ASSETS.md +81 -10
- package/docs/CACHING.md +1 -1
- package/docs/CHANGELOG.md +346 -21
- package/docs/DESIGN-REFERENCES.md +5 -5
- package/docs/GUIDE.md +241 -72
- package/docs/LANGUAGE.md +287 -21
- package/docs/LOWERING.md +13 -1
- package/docs/MOTION.md +233 -7
- package/docs/PROFILE-KINDS.md +167 -13
- package/docs/PROFILES.md +2 -2
- package/docs/RULES.md +49 -18
- package/docs/TOKEN-ROLES.md +9 -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
package/docs/MOTION.md
CHANGED
|
@@ -15,7 +15,7 @@ CSS transitions and keyframes. [LANGUAGE.md](LANGUAGE.md) describes recipes;
|
|
|
15
15
|
- Component, controller and application code owns the actual interaction or
|
|
16
16
|
loading state and its application consequences.
|
|
17
17
|
|
|
18
|
-
The
|
|
18
|
+
The example design system's `motion` profiles (`profiles/Motion/feedback.ads.ts`), as
|
|
19
19
|
`name` (`with`): `fields`:
|
|
20
20
|
|
|
21
21
|
- `feedback-timing`: `duration: "--feedback-duration"`,
|
|
@@ -78,7 +78,7 @@ motion profile alone starts nothing. `kind` identifies the treatment a part
|
|
|
78
78
|
consumes: ADS infers none from the names `label` or `visual`, an HTML tag or a
|
|
79
79
|
class name.
|
|
80
80
|
|
|
81
|
-
In the
|
|
81
|
+
In the example design system's Button (`components/Actions/Button/Button.tsx`), press
|
|
82
82
|
feedback applies to the artwork, not the outer box. The arrow choice's fragment
|
|
83
83
|
adds forward movement on hover:
|
|
84
84
|
|
|
@@ -104,7 +104,7 @@ result.
|
|
|
104
104
|
|
|
105
105
|
## Direct binding when no default exists
|
|
106
106
|
|
|
107
|
-
The
|
|
107
|
+
The example design system's Artwork (`components/Content/Artwork/Artwork.tsx`) has no
|
|
108
108
|
composite motion default. Its sync indicator binds a profile on the part:
|
|
109
109
|
|
|
110
110
|
```ts
|
|
@@ -220,8 +220,14 @@ recipe({
|
|
|
220
220
|
```
|
|
221
221
|
|
|
222
222
|
`channels` are `background-color` (the surface's `background`), `border-color`,
|
|
223
|
-
`color
|
|
224
|
-
|
|
223
|
+
`color`, `box-shadow`, `opacity` (the surface's `opacity`: a toast that fades
|
|
224
|
+
out, a stack that fades in), `filter` (the surface's `blur`, `shapeShadow` and
|
|
225
|
+
`groupShadow`) and `backdrop-filter` (its `backdropBlur` and
|
|
226
|
+
`backdropSaturate`). An opacity or a surface effect that changes between the
|
|
227
|
+
surfaces must have its channel listed, or it would snap while the paints interpolate
|
|
228
|
+
(`construction/paint-transition-effect-unsupported`); a gradient image never
|
|
229
|
+
interpolates. `motion` is `{ slot: "motion" }` (the nearest
|
|
230
|
+
recipe's motion slot) or a motion profile name. Each Button skin of the example design system
|
|
225
231
|
transitions what its hover surface changes: the primary its background, the
|
|
226
232
|
secondary its outline.
|
|
227
233
|
|
|
@@ -230,8 +236,9 @@ The compiler rejects:
|
|
|
230
236
|
- an empty, unknown or repeated channel;
|
|
231
237
|
- a channel that no state surface changes
|
|
232
238
|
(`construction/paint-transition-redundant`);
|
|
233
|
-
- a gradient image
|
|
234
|
-
the paints
|
|
239
|
+
- a gradient image on a surface of the element, or a surface effect that
|
|
240
|
+
changes without its channel listed: either would snap while the paints
|
|
241
|
+
interpolate (`construction/paint-transition-effect-unsupported`);
|
|
235
242
|
- a motion profile without duration or easing, or a reduced-motion policy other
|
|
236
243
|
than `static`.
|
|
237
244
|
|
|
@@ -248,6 +255,225 @@ for every construction. A paint transition never shares an element with transfor
|
|
|
248
255
|
channels: it belongs to roots and region parts, transform channels to a
|
|
249
256
|
control's visual part.
|
|
250
257
|
|
|
258
|
+
## Motion on a region's parts
|
|
259
|
+
|
|
260
|
+
A card whose arrow slides, or whose picture lifts and grows, while the whole
|
|
261
|
+
card is hovered: the state is the root's, the motion a part's. A region part
|
|
262
|
+
declares it like a control's visual part does:
|
|
263
|
+
|
|
264
|
+
```ts
|
|
265
|
+
profile({ name: "card-slide", kind: "motion", fields: { duration: "--feedback-duration", easing: "--feedback-easing", distance: "--card-arrow-travel", reduced: "static" } });
|
|
266
|
+
profile({ name: "card-lift", kind: "motion", fields: { duration: "--card-lift-duration", easing: "--feedback-easing", distance: "--card-lift", scale: "--card-grow", reduced: "static" } });
|
|
267
|
+
|
|
268
|
+
recipe({
|
|
269
|
+
layout: "stack",
|
|
270
|
+
profile: "card", // its composite selects motionProfile: "card-slide"
|
|
271
|
+
parts: {
|
|
272
|
+
arrow: {
|
|
273
|
+
selector: ".ux-card-arrow",
|
|
274
|
+
transition: ["translate"],
|
|
275
|
+
when: { "&:hover": { translateInline: { slot: "motion", field: "distance" } } },
|
|
276
|
+
},
|
|
277
|
+
picture: {
|
|
278
|
+
selector: ".ux-card-picture",
|
|
279
|
+
kind: "visual",
|
|
280
|
+
motion: "card-lift", // this part's own timing and endpoints
|
|
281
|
+
transition: ["translate", "scale"],
|
|
282
|
+
when: { "&:hover": { translateBlock: { slot: "motion", field: "distance" }, scale: { slot: "motion", field: "scale" } } },
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
});
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
- A `when` entry of a part may carry a state `surface`, motion effects, or
|
|
289
|
+
both. The effects are `translateInline`, `translateBlock` (both read the
|
|
290
|
+
motion profile's `distance`), `scale`, and `scaleInline` or `scaleBlock` for
|
|
291
|
+
one axis only with the other at rest (a blink closes on the block axis); the
|
|
292
|
+
three scales read the profile's `scale` and are one channel, so a state takes
|
|
293
|
+
one of them. A control's visual part takes the same scales.
|
|
294
|
+
- `transition` lists the channels that animate: `translate`, `scale`. An effect
|
|
295
|
+
whose channel is not listed applies at once. A listed channel without an
|
|
296
|
+
effect is refused.
|
|
297
|
+
- `motion` on the part names its motion profile; without it the part takes the
|
|
298
|
+
recipe's motion slot. A part needs its own profile when its distance, scale
|
|
299
|
+
or timing differ from another part's.
|
|
300
|
+
- The part rests at `translate: 0px` and `scale: 1`. Inline travel is mirrored
|
|
301
|
+
under right-to-left. Under reduced motion the part stays at rest and its
|
|
302
|
+
transition is instant, as the profile's `reduced: "static"` says.
|
|
303
|
+
- The channels join the part's one transition set beside its paint transition.
|
|
304
|
+
An [entrance](#entrances) cannot use a channel the part's own motion moves.
|
|
305
|
+
- The condition is an owner state of the root (`&:hover`, `&:focus-within`,
|
|
306
|
+
`&[data-open="true"]`). What makes the card interactive (a link, a button
|
|
307
|
+
inside it) is still a control with its own target size; hovering a region
|
|
308
|
+
only decorates it.
|
|
309
|
+
|
|
310
|
+
## Entrances
|
|
311
|
+
|
|
312
|
+
An entrance is "the element starts looking like this and settles into its own
|
|
313
|
+
look". A recipe root (a region or a control) or a region part declares it with
|
|
314
|
+
`enter`:
|
|
315
|
+
|
|
316
|
+
```ts
|
|
317
|
+
// Tokens: roles blur, opacity, duration, easing, motion-distance.
|
|
318
|
+
profile({ name: "entering", kind: "surface", fields: { opacity: "--enter-opacity", blur: "--enter-blur" } });
|
|
319
|
+
profile({ name: "enter-motion", kind: "motion", fields: {
|
|
320
|
+
duration: "--enter-duration", easing: "--enter-easing", distance: "--enter-rise", reduced: "static",
|
|
321
|
+
} });
|
|
322
|
+
profile({ name: "enter-motion-later", kind: "motion", with: ["enter-motion"], fields: { delay: "--enter-stagger" } });
|
|
323
|
+
|
|
324
|
+
recipe({
|
|
325
|
+
layout: "stack",
|
|
326
|
+
enter: { from: { surface: "entering" }, motion: "enter-motion" },
|
|
327
|
+
parts: {
|
|
328
|
+
media: {
|
|
329
|
+
selector: ".ux-hero-media",
|
|
330
|
+
enter: { from: { surface: "entering", translate: { slot: "motion", field: "distance" } }, motion: "enter-motion-later" },
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
});
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
- `from.surface` is a surface profile that states only `opacity`, `blur` or
|
|
337
|
+
both. Each has an obvious resting value (opaque, sharp). A starting
|
|
338
|
+
background or colour would be a second design of the element; that is a
|
|
339
|
+
state (`when`), not an entrance (`construction/enter-surface-unsupported`).
|
|
340
|
+
- `from` may also name one movement, read from the entrance's motion profile:
|
|
341
|
+
`translate` (its `distance`, on the block axis: a positive distance starts
|
|
342
|
+
below and rises), `scale` (its `scale`) or `rotate` (its `angle`). `from`
|
|
343
|
+
needs a surface, a movement or both.
|
|
344
|
+
- `motion` is a motion profile name or `{ slot: "motion" }` (the nearest
|
|
345
|
+
recipe's motion slot). It needs a duration, an easing and `reduced: "static"`.
|
|
346
|
+
- A staggered entrance is each part with its own motion profile carrying a
|
|
347
|
+
different `delay`.
|
|
348
|
+
|
|
349
|
+
The driver is the element's first render. ADS lowers it to the browser's first
|
|
350
|
+
style, with no script:
|
|
351
|
+
|
|
352
|
+
```css
|
|
353
|
+
.hero { transition-property: opacity, filter; transition-duration: …; transition-timing-function: …; }
|
|
354
|
+
@starting-style { .hero { opacity: var(--enter-opacity); filter: blur(var(--enter-blur)); } }
|
|
355
|
+
@media (prefers-reduced-motion: reduce) { .hero { transition-duration: 0s; transition-delay: 0s; } }
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Under reduced motion the element is settled at once. A browser without
|
|
359
|
+
`@starting-style` (the `starting-style` platform feature) shows the element
|
|
360
|
+
settled, with no entrance. The browser replays the entrance whenever the
|
|
361
|
+
element is rendered again: inserted, or shown after `display: none`.
|
|
362
|
+
|
|
363
|
+
The entrance's properties are a group of their own in the element's one
|
|
364
|
+
transition set, beside its paint transition and press. So:
|
|
365
|
+
|
|
366
|
+
- A property has one timing: an entrance cannot animate a property the element
|
|
367
|
+
already transitions (`filter` listed in `paintTransition.channels`, the
|
|
368
|
+
`scale` of a root press): `construction/enter-property-conflict`. Enter
|
|
369
|
+
through another property, or put the entrance on a wrapping part.
|
|
370
|
+
- The properties stay transitioned by the entrance's motion afterwards: a state
|
|
371
|
+
surface that later changes `opacity` moves over the same timing.
|
|
372
|
+
- An element first rendered in a state (hovered, selected) still starts from
|
|
373
|
+
the entrance: the first style is repeated under each state surface that
|
|
374
|
+
writes the same property.
|
|
375
|
+
- Filter lists interpolate only between lists of the same functions. An
|
|
376
|
+
element with a `shapeShadow` or `groupShadow` that enters blurred rests at
|
|
377
|
+
`filter: blur(0px) drop-shadow(…)` and starts from `blur(…) drop-shadow(…)`,
|
|
378
|
+
so the blur sharpens and the shadow stays.
|
|
379
|
+
|
|
380
|
+
A top-layer root (`layer`) takes no `enter`: its layer motion is its entrance.
|
|
381
|
+
Contrast is checked for the settled look, not during the entrance. Entrances
|
|
382
|
+
started by an owner state (once, when scrolled into view) or by the scroll
|
|
383
|
+
position are not built yet.
|
|
384
|
+
|
|
385
|
+
## Sequences
|
|
386
|
+
|
|
387
|
+
An element plays a [`sequence` profile](PROFILE-KINDS.md#sequence) with `play`.
|
|
388
|
+
Five places take it:
|
|
389
|
+
|
|
390
|
+
| Place | Where `play` is written | Example |
|
|
391
|
+
| --- | --- | --- |
|
|
392
|
+
| A region's part | on the part | three dots that light up in turn |
|
|
393
|
+
| A region's root | on the recipe | a "Live" badge that fades as a whole |
|
|
394
|
+
| A control's root | on the recipe | a "Record" button that grows and shrinks |
|
|
395
|
+
| A control's artwork | on the control's `visual` part | a bell that rings while its button stays still |
|
|
396
|
+
| Standalone artwork | on the artwork recipe's `visual` part | an hourglass that tips over and back |
|
|
397
|
+
|
|
398
|
+
A top-layer root (`layer`) takes no `play`: it opens and closes with its
|
|
399
|
+
layer's motion. On a region's parts:
|
|
400
|
+
|
|
401
|
+
```ts
|
|
402
|
+
recipe({
|
|
403
|
+
layout: "inline",
|
|
404
|
+
parts: {
|
|
405
|
+
first: { selector: ".ux-dot-1", play: { sequence: "dot-pulse" } },
|
|
406
|
+
second: { selector: ".ux-dot-2", play: { sequence: "dot-pulse", order: 1 } }, // one stagger later
|
|
407
|
+
third: { selector: ".ux-dot-3", play: { sequence: "dot-pulse", order: 2 } },
|
|
408
|
+
},
|
|
409
|
+
});
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
- **Always, or under a state.** `play` on the element plays whenever it is
|
|
413
|
+
rendered. `play` in a `when` entry plays only in that owner state
|
|
414
|
+
(`when: { '&[data-blink="true"]': { play: { sequence: "blink" } } }`), so the
|
|
415
|
+
owner starts and stops it by the attribute. A root's `when` entry may hold a
|
|
416
|
+
`play` beside or instead of its `surface`.
|
|
417
|
+
- **In turn.** `order` starts the part that many of the profile's `stagger`s
|
|
418
|
+
late. Parts with the same steps share one `@keyframes` rule.
|
|
419
|
+
- **No script.** ADS emits `@keyframes` and `animation-*`. Inline travel has
|
|
420
|
+
mirrored keyframes under right-to-left. Under reduced motion
|
|
421
|
+
`animation-name` is `none`.
|
|
422
|
+
- **One source of motion per property.** A property the sequence animates is
|
|
423
|
+
not also moved by the element's own `transition`, its `opacity` paint
|
|
424
|
+
channel, its `enter`, a root's press `scale`, a control artwork's press or
|
|
425
|
+
travel effect, or a standalone artwork's continuous rotation
|
|
426
|
+
(`construction/sequence-property-conflict`). Use another property, or put
|
|
427
|
+
the sequence on a wrapping part.
|
|
428
|
+
- **Control stays in script.** An owner waits for a one-shot sequence with
|
|
429
|
+
`animationend`, or pauses, cancels and seeks it through
|
|
430
|
+
`element.getAnimations()`.
|
|
431
|
+
- **A loop that never stops is noted.** A repeating sequence played whenever
|
|
432
|
+
its element is rendered gets the note `a11y-motion-endless` (info): motion that
|
|
433
|
+
starts by itself and runs longer than five seconds beside other content must
|
|
434
|
+
be pausable (WCAG 2.2 2.2.2), and reduced motion covers only users who set
|
|
435
|
+
it. An indicator rendered only while work is in progress needs nothing more.
|
|
436
|
+
- The older continuous rotation (`repeat: "continuous"` with `rotate` on a
|
|
437
|
+
standalone artwork part) is unchanged.
|
|
438
|
+
|
|
439
|
+
## Animating a measured value
|
|
440
|
+
|
|
441
|
+
A size or position known only at run time (an accordion's content height) is a
|
|
442
|
+
[measured value](LANGUAGE.md#measured-runtime-geometry). Naming a motion profile
|
|
443
|
+
on it makes the browser animate each change over that profile's timing:
|
|
444
|
+
|
|
445
|
+
```ts
|
|
446
|
+
measured: { height: { type: "length", property: "block-size", motion: "open-motion" } }
|
|
447
|
+
// in the owner
|
|
448
|
+
panel.measured.set(element, { height: content.scrollHeight }); // animates to the new height
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
- For `length` and `transform` values of a region root or a top-level part. A
|
|
452
|
+
grid's `size-track` takes no `motion`.
|
|
453
|
+
- The property joins the element's one transition set, beside its paint
|
|
454
|
+
transition and its own motion. Under reduced motion the change is instant.
|
|
455
|
+
- Without `motion` the value applies at once, as before.
|
|
456
|
+
|
|
457
|
+
## Defined in the recipe, controlled in script
|
|
458
|
+
|
|
459
|
+
An animation's keyframes, duration and easing are design. They are declared in
|
|
460
|
+
a recipe (a state `transition` or `paintTransition`, an `enter`, a sequence, a
|
|
461
|
+
measured value's `motion`), take their values from tokens, and are at rest under
|
|
462
|
+
reduced motion. When and how far it runs is behaviour, and that is script's:
|
|
463
|
+
|
|
464
|
+
| Script may | Script may not |
|
|
465
|
+
| --- | --- |
|
|
466
|
+
| Set the owner state that starts or stops it (`data-working="true"`) | `element.animate(keyframes, timing)` |
|
|
467
|
+
| Wait for it: `animationend`, `transitionend`, `element.getAnimations()` and each one's `finished` | `new Animation(…)`, `new KeyframeEffect(…)` |
|
|
468
|
+
| `cancel()`, `pause()`, `play()` what the recipe declared | `effect.setKeyframes(…)` |
|
|
469
|
+
| Seek it by a gesture's progress: `animation.currentTime = …` | |
|
|
470
|
+
| Follow the pointer with a [measured value](LANGUAGE.md#measured-runtime-geometry) | |
|
|
471
|
+
|
|
472
|
+
The right column is `source/script-animation` (error) in an owner and in a
|
|
473
|
+
plain module: raw design values in script, outside tokens and outside the
|
|
474
|
+
reduced-motion policy. It is the same line ADS draws for sizes: a module may
|
|
475
|
+
not write `style.width`, but it may set a measured value the recipe declared.
|
|
476
|
+
|
|
251
477
|
## Guarantees and boundaries
|
|
252
478
|
|
|
253
479
|
Besides the errors above, the compiler rejects missing or incorrect profile
|
package/docs/PROFILE-KINDS.md
CHANGED
|
@@ -14,7 +14,7 @@ slots of a `composite`. A component can consume a text, visual or spatial
|
|
|
14
14
|
profile directly when the operation calls for that kind; only an operation that
|
|
15
15
|
coordinates slots requires a composite.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Eleven kinds
|
|
18
18
|
|
|
19
19
|
| Kind | Owns | Does not own |
|
|
20
20
|
| --- | --- | --- |
|
|
@@ -24,6 +24,7 @@ coordinates slots requires a composite.
|
|
|
24
24
|
| `visual` | Artwork sizing, fitting, aspect preservation and anchor policy | The asset's actual anchor, surrounding arrangement |
|
|
25
25
|
| `spacing` | Named gaps between parts/items/sections | Padding, border width, arbitrary positional offsets |
|
|
26
26
|
| `motion` | Timing, curves and declared motion/reduction choices | Triggering actions, state machines, animation lifecycle |
|
|
27
|
+
| `sequence` | A fixed series of steps an element plays: its timing, how it repeats, and what the element looks like at each step | Which element plays it (a part, a root or an artwork), and when: that is the recipe's and the owner's state |
|
|
27
28
|
| `focus` | Focus indicator appearance and geometry | Focus movement, keyboard commands, accessibility semantics |
|
|
28
29
|
| `spatial` | Grid units, spacing scale, breakpoint tiers, track defaults, gutters, bounds, permitted ratios and the overlay layer | Element arrangement, actual child placement, component interior spacing |
|
|
29
30
|
| `layer` | A top-layer root's placement against the viewport: edge gap, viewport margin and a fixed block-start clearance | The top-layer element itself, opening and dismissal, the panel's frame and paint |
|
|
@@ -49,8 +50,13 @@ Fields:
|
|
|
49
50
|
`font-variations`.
|
|
50
51
|
- `textDecorationColor` reads `paint`, `textDecorationThickness` `border-width`
|
|
51
52
|
and `textUnderlineOffset` `spacing`.
|
|
53
|
+
- `textTransform` is a fixed choice, not a token: `"uppercase"`, `"lowercase"`
|
|
54
|
+
or `"capitalize"`. It changes how the text is drawn, not the content, so a
|
|
55
|
+
label that comes from data (a status, a month) is cased without rewriting
|
|
56
|
+
it, and assistive technology still reads the content as written. Give
|
|
57
|
+
uppercase labels their own `letterSpacing`.
|
|
52
58
|
|
|
53
|
-
The
|
|
59
|
+
The example design system's detailed text specimen is `profiles/Typography/details.ads.ts`.
|
|
54
60
|
|
|
55
61
|
- Trimming, wrapping and truncation are explicit part policies that must not
|
|
56
62
|
silently discard essential labels or change semantics.
|
|
@@ -66,6 +72,7 @@ The starter's detailed text specimen is `profiles/Typography/details.ads.ts`.
|
|
|
66
72
|
| --- | --- |
|
|
67
73
|
| `borderWidth`, `radius` | `border-width`, `radius` |
|
|
68
74
|
| `padding`, `paddingInline`, `paddingBlock`, `minimumBlockInset` | `frame-inset` |
|
|
75
|
+
| `paddingInlineStart`, `paddingInlineEnd`, `paddingBlockStart`, `paddingBlockEnd` (container and control frames: one side's inset where the two sides of an axis differ; a side has one source, and on a control frame `minimumBlockInset` is the block axis's) | `frame-inset` |
|
|
69
76
|
| `inlineSize`, `blockSize`, `maxInlineSize`, `maxBlockSize` | `frame-size` |
|
|
70
77
|
| `minInlineSize`, `minBlockSize` | `frame-size` or `control-min-size` |
|
|
71
78
|
| `minTargetInlineSize`, `minTargetBlockSize` | `target-min-size` |
|
|
@@ -89,15 +96,116 @@ The starter's detailed text specimen is `profiles/Typography/details.ads.ts`.
|
|
|
89
96
|
## Surface
|
|
90
97
|
|
|
91
98
|
Fields: `background`, `color` and `borderColor` (`paint`), `boxShadow`
|
|
92
|
-
(`shadow`), `backgroundImage` (`gradient`), `opacity` (`opacity`),
|
|
93
|
-
`backdropBlur` (`blur`),
|
|
99
|
+
(`shadow`), `backgroundImage` (`gradient`), `opacity` (`opacity`), the effects
|
|
100
|
+
`blur` and `backdropBlur` (`blur`), `backdropSaturate` (`saturation`),
|
|
101
|
+
`shapeShadow` and `groupShadow` (`shadow`), `mask` (`gradient`), a paint per
|
|
102
|
+
border side, and the policy field `state`.
|
|
94
103
|
|
|
95
104
|
A shadow is a composite effect, not component-local raw offsets and colors.
|
|
96
105
|
Light, dark and brand variants may resolve to different paints and shadows. In
|
|
97
|
-
the
|
|
106
|
+
the example design system (`tokens/Surfaces/shadow.ads.css`,
|
|
98
107
|
`profiles/Surfaces/surfaces.ads.ts`), `quiet-surface` binds the no-shadow token
|
|
99
108
|
and `emphasized-surface` a shared shadow.
|
|
100
109
|
|
|
110
|
+
### The border's line
|
|
111
|
+
|
|
112
|
+
`borderStyle` is a fixed choice, not a token: `"solid"` (the default),
|
|
113
|
+
`"dashed"` or `"dotted"`. A region's frame, its one-sided rules and a part's
|
|
114
|
+
box draw their border with it. A control draws it too; its recipe then states
|
|
115
|
+
no `normalize.borderStyle` (that field only replaces the browser's own button
|
|
116
|
+
border with a solid one, and two sources are a conflict). A dashed or dotted
|
|
117
|
+
border that bounds a control still needs 3:1 like any border.
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
profile({ name: "shared-avatar-frame", kind: "frame", fields: { borderWidth: "--hairline", borderStyle: "dashed", radius: "--radius-round" } });
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### A border whose sides differ
|
|
124
|
+
|
|
125
|
+
`borderColor` paints every side. A side that is painted differently states its
|
|
126
|
+
own: `borderInlineStartColor`, `borderInlineEndColor`, `borderBlockStartColor`,
|
|
127
|
+
`borderBlockEndColor` (role `paint`). The frame profile states the matching
|
|
128
|
+
width (`borderInlineStartWidth` and the other three, role `border-width`)
|
|
129
|
+
beside its `borderWidth`. A side without its own value takes the shared one; a
|
|
130
|
+
frame or surface with only a side's value borders only that side.
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
// A quote card: a 4 px accent edge at the start, 1 px hairlines on the other sides.
|
|
134
|
+
profile({ name: "quote-frame", kind: "frame", fields: { borderWidth: "--hairline", borderInlineStartWidth: "--accent-edge", padding: "--card-padding" } });
|
|
135
|
+
profile({ name: "quote-surface", kind: "surface", fields: { background: "--surface-panel", color: "--text-primary", borderColor: "--outline-quiet", borderInlineStartColor: "--accent" } });
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The sides are logical, so the edge follows the writing direction. A state
|
|
139
|
+
surface that states only `borderColor` repaints every side; restate the side's
|
|
140
|
+
own paint there to keep it. One-sided `rules` take each named side's own width
|
|
141
|
+
and paint. Per-side widths are for container frames; a control frame has one
|
|
142
|
+
border width.
|
|
143
|
+
|
|
144
|
+
### Surface effects
|
|
145
|
+
|
|
146
|
+
Five fields are effects, not paints of the element's box. An element has one
|
|
147
|
+
`filter` list and one `backdrop-filter` list, so ADS composes a surface's
|
|
148
|
+
effect fields into them in a fixed order, whatever order the profile states:
|
|
149
|
+
|
|
150
|
+
| Field | Role | Effect | Emitted |
|
|
151
|
+
| --- | --- | --- | --- |
|
|
152
|
+
| `blur` | `blur` | Blurs the element and everything in it | `filter: blur()` |
|
|
153
|
+
| `shapeShadow` | `shadow` | A shadow that follows a drawing's shape | `filter: drop-shadow()` |
|
|
154
|
+
| `groupShadow` | `shadow` | One shadow cast by a container and everything in it | `filter: drop-shadow()` |
|
|
155
|
+
| `backdropBlur` | `blur` | Blurs what is behind the element | `backdrop-filter: blur()` |
|
|
156
|
+
| `backdropSaturate` | `saturation` | Makes what is behind the element more or less vivid | `backdrop-filter: saturate()` |
|
|
157
|
+
|
|
158
|
+
The element is blurred before its shadow is cast (`filter: blur() drop-shadow()`),
|
|
159
|
+
and the backdrop is blurred before it is saturated
|
|
160
|
+
(`backdrop-filter: blur() saturate()`). `backdrop-filter` is written with its
|
|
161
|
+
`-webkit-` companion. A backdrop effect shows only through a translucent
|
|
162
|
+
background, so the surface's text must stay readable without it: contrast is
|
|
163
|
+
proven against the declared paints, never against a blur.
|
|
164
|
+
|
|
165
|
+
```ts
|
|
166
|
+
profile({ name: "menu-bar-surface", kind: "surface", fields: {
|
|
167
|
+
background: "--surface-bar", color: "--text-primary",
|
|
168
|
+
backdropBlur: "--surface-backdrop-blur", backdropSaturate: "--surface-backdrop-saturation",
|
|
169
|
+
} });
|
|
170
|
+
profile({ name: "lifted-drawing", kind: "surface", fields: { shapeShadow: "--shadow-shape" } });
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Three shadows, three meanings:
|
|
174
|
+
|
|
175
|
+
- `boxShadow` is the shadow of the element's box (with its radius). It is the
|
|
176
|
+
shadow of a card, a panel or a control, and takes any shadow token.
|
|
177
|
+
- `shapeShadow` follows what is drawn: an image with transparency, artwork, a
|
|
178
|
+
glyph. It belongs to a **visual part** (`kind: "visual"`), which has nothing
|
|
179
|
+
inside it.
|
|
180
|
+
- `groupShadow` is the same operation chosen on purpose for a **container** (a
|
|
181
|
+
region root, a control, a grid, a non-visual part): everything inside it casts
|
|
182
|
+
one shadow, text included. Use it for a shape built from several elements.
|
|
183
|
+
|
|
184
|
+
A surface declares at most one of `shapeShadow` and `groupShadow`, and each in
|
|
185
|
+
its place (`construction/surface-effect-misplaced`). Their token is one shadow
|
|
186
|
+
layer in every theme and brand: two offsets, an optional blur and a colour, with
|
|
187
|
+
no second layer, spread, `inset` or `none`
|
|
188
|
+
(`construction/surface-shadow-layer`); give them their own token rather than a
|
|
189
|
+
layered `boxShadow` one. Effects that change between an element's surfaces
|
|
190
|
+
transition through the `filter` and `backdrop-filter`
|
|
191
|
+
[paint channels](MOTION.md#effect-and-state-semantics).
|
|
192
|
+
|
|
193
|
+
`mask` (role `gradient`) fades the element by the gradient's alpha: opaque
|
|
194
|
+
where the gradient is opaque, gone where it is transparent. It is written as
|
|
195
|
+
`mask-image` with its `-webkit-` companion. It belongs to a **visual part** (a
|
|
196
|
+
graph that fades toward the text beside it) or to an element whose `overflow`
|
|
197
|
+
**scrolls** (a table whose edge fades to say there is more). On any other
|
|
198
|
+
container its text would fade where it stands, which cannot be proven
|
|
199
|
+
readable: `construction/surface-effect-misplaced`.
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
// tokens/Surfaces/gradient.ads.css: --fade-inline-end: linear-gradient(to right, black 80%, transparent);
|
|
203
|
+
profile({ name: "graph-fade", kind: "surface", fields: { mask: "--fade-inline-end" } });
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Blur and backdrop effects cost rendering time in proportion to the area they
|
|
207
|
+
cover; how much to spend is the designer's decision, and ADS does not limit it.
|
|
208
|
+
|
|
101
209
|
- **Partial surfaces.** Completeness belongs to the consuming operation.
|
|
102
210
|
`primary-foreground` and `secondary-foreground` supply only a text color, and
|
|
103
211
|
artwork sample surfaces only a background. A container requires its fill,
|
|
@@ -122,7 +230,7 @@ and `emphasized-surface` a shared shadow.
|
|
|
122
230
|
### Interactive emphasized containers
|
|
123
231
|
|
|
124
232
|
Emphasis is a visual variant. Hover and dragging are interaction states, not
|
|
125
|
-
kinds. The
|
|
233
|
+
kinds. The example design system declares three surfaces and their complete card composites:
|
|
126
234
|
|
|
127
235
|
| Resolved state | Surface profile | Card composite | Shadow token |
|
|
128
236
|
| --- | --- | --- | --- |
|
|
@@ -151,7 +259,7 @@ measurements ADS imposes.
|
|
|
151
259
|
- Static guards validate profile roles, exclusive reachable selections and
|
|
152
260
|
conflicting style overrides. Behavior checks exercise state bindings,
|
|
153
261
|
cancellation and disabled behavior. Render checks cover visible focus, shadow
|
|
154
|
-
clipping and theme results. The
|
|
262
|
+
clipping and theme results. The example design system shows three labelled appearance
|
|
155
263
|
specimens and does not simulate dragging.
|
|
156
264
|
|
|
157
265
|
## Visual
|
|
@@ -184,7 +292,9 @@ its optical center.
|
|
|
184
292
|
|
|
185
293
|
## Spacing
|
|
186
294
|
|
|
187
|
-
Fields: `contentGap`, `labelGap`, `detailsGap
|
|
295
|
+
Fields: `contentGap`, `labelGap`, `detailsGap`, `metaGap`, and for
|
|
296
|
+
[prose](LANGUAGE.md#prose-long-form-content) `sectionGap` (the space before a
|
|
297
|
+
section's heading) and `indent` (a list's start inset), each `content-gap`
|
|
188
298
|
or `spacing`.
|
|
189
299
|
|
|
190
300
|
- Gaps have a purpose: content to visual, label to control, name to detail,
|
|
@@ -208,7 +318,7 @@ Fields: `duration` and `delay` (`duration`), `easing` (`easing`), `distance`
|
|
|
208
318
|
policy `reduced`.
|
|
209
319
|
|
|
210
320
|
[MOTION.md](MOTION.md) owns the motion DSL, the supported effects and their
|
|
211
|
-
limits. The
|
|
321
|
+
limits. The example design system's `press-glyph`, `advance-feedback` and `loading-motion`
|
|
212
322
|
(`profiles/Motion/feedback.ads.ts`) are project profiles that share one timing
|
|
213
323
|
provider. Its `reduced: "static"` suppresses the spatial effects and keeps
|
|
214
324
|
static content and state feedback.
|
|
@@ -222,11 +332,51 @@ static content and state feedback.
|
|
|
222
332
|
feedback, interruption and cleanup. Preference changes apply during the
|
|
223
333
|
session.
|
|
224
334
|
|
|
335
|
+
## Sequence
|
|
336
|
+
|
|
337
|
+
A fixed series of steps an element plays: a mascot's glance and blink, three
|
|
338
|
+
dots pulsing in turn, a badge that fades as a whole, a bell that rings in its
|
|
339
|
+
button. [Where a sequence plays](MOTION.md#sequences) lists the five places.
|
|
340
|
+
|
|
341
|
+
Fields: `duration` (`duration`), `easing` (`easing`), `stagger` (`duration`,
|
|
342
|
+
optional), and the policies `reduced` and `repeat`. Its `steps` are a list, each
|
|
343
|
+
at a whole percentage of the run:
|
|
344
|
+
|
|
345
|
+
```ts
|
|
346
|
+
profile({
|
|
347
|
+
name: "dot-pulse",
|
|
348
|
+
kind: "sequence",
|
|
349
|
+
fields: { duration: "--pulse-duration", easing: "--pulse-easing", stagger: "--pulse-stagger", reduced: "static" },
|
|
350
|
+
steps: [
|
|
351
|
+
{ at: 0, opacity: "--dot-dim" },
|
|
352
|
+
{ at: 50, opacity: "--dot-lit" },
|
|
353
|
+
{ at: 100, opacity: "--dot-dim" },
|
|
354
|
+
],
|
|
355
|
+
});
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
- A step states what the part looks like there: `opacity` (`opacity`),
|
|
359
|
+
`translateInline` and `translateBlock` (`motion-distance`), one scale
|
|
360
|
+
(`scale`, or `scaleInline` / `scaleBlock` for one axis; `motion-scale`) and
|
|
361
|
+
`rotate` (`motion-angle`). A property a step leaves out is interpolated
|
|
362
|
+
between the steps that state it.
|
|
363
|
+
- The steps run from `0` to `100`, at distinct whole percentages
|
|
364
|
+
(`construction/sequence-steps-invalid`).
|
|
365
|
+
- `repeat` is `"loop"` (the default), `"alternate"` or `"once"`. A loop ends
|
|
366
|
+
where it starts: its step at 100 states the values of its step at 0, so it
|
|
367
|
+
has no jump (`construction/sequence-not-seamless`). `"alternate"` plays
|
|
368
|
+
forward then backward, forever. `"once"` plays one time and holds its last
|
|
369
|
+
step.
|
|
370
|
+
- `reduced: "static"` is required: under reduced motion nothing plays and the
|
|
371
|
+
part keeps its own look.
|
|
372
|
+
- `stagger` is the time between parts that share the sequence
|
|
373
|
+
([Sequences](MOTION.md#sequences)).
|
|
374
|
+
|
|
225
375
|
## Focus
|
|
226
376
|
|
|
227
377
|
Fields: `color` (`paint`), `width` (`border-width`) and `offset`
|
|
228
378
|
(`focus-offset`). Focus is separate from a surface border because it must stay
|
|
229
|
-
recognizable independently of hover, selection and emphasis. The
|
|
379
|
+
recognizable independently of hover, selection and emphasis. The example design system's
|
|
230
380
|
profile (`profiles/Focus/keyboard.ads.ts`):
|
|
231
381
|
|
|
232
382
|
```ts
|
|
@@ -241,7 +391,7 @@ export const keyboardFocus = profile({
|
|
|
241
391
|
});
|
|
242
392
|
```
|
|
243
393
|
|
|
244
|
-
- The
|
|
394
|
+
- The example design system's `control` composite binds `focusProfile: "keyboard-focus"`
|
|
245
395
|
once. `frame: "control"` consumes it on the Button root or TextField's native
|
|
246
396
|
input and supplies the focus-visible appearance. It does not focus elements,
|
|
247
397
|
suppress native semantics or prove clipping or contrast.
|
|
@@ -271,7 +421,7 @@ Owns the shared structural grid definition, declared beside the other profiles.
|
|
|
271
421
|
Clause names are local to the profile. Breakpoints and condition bounds are
|
|
272
422
|
authored in `rem` ([Units](TOKEN-ROLES.md#units)).
|
|
273
423
|
|
|
274
|
-
- The
|
|
424
|
+
- The example design system's `page-grid` (`profiles/Layout/grid.ads.ts`) has an 8px mini
|
|
275
425
|
unit, a 2px fine unit, 4/8/16 track tiers and wide, narrow and condensed
|
|
276
426
|
gutters. The special `none` gutter is structural zero.
|
|
277
427
|
- `profiles/Layout/regions.ads.ts` adds fixed-side and tile dimensions,
|
|
@@ -304,6 +454,10 @@ a toolbar band. The clearance must resolve to a fixed length. A composite's
|
|
|
304
454
|
`layer-profile` slot selects the profile. A modal sheet is full height and
|
|
305
455
|
attached to its edge, so it needs no layer profile.
|
|
306
456
|
|
|
457
|
+
`stickyLayer` (`layer`) is the layer a [sticky element](LANGUAGE.md#sticky-elements)
|
|
458
|
+
stacks in; a sticky element with `clear: "block-start"` reads `clearBlockStart`
|
|
459
|
+
as its offset.
|
|
460
|
+
|
|
307
461
|
## Composite
|
|
308
462
|
|
|
309
463
|
Combines profiles through named typed slots, written in camelCase in `profile()`
|
|
@@ -327,7 +481,7 @@ Combines profiles through named typed slots, written in camelCase in `profile()`
|
|
|
327
481
|
- A component cannot reassign a shared field after selection: select a declared
|
|
328
482
|
option or another shared profile.
|
|
329
483
|
- The slot list is closed. Unknown keys are not additional text or visual slots.
|
|
330
|
-
- In the
|
|
484
|
+
- In the example design system, `{ profile: "control", select: { size: "sm", typography: "lg" } }`
|
|
331
485
|
selects a small frame and spacing with larger text and visual, without a named
|
|
332
486
|
profile for every pair. `card` combines the card frame and spacing with a
|
|
333
487
|
quiet surface.
|
package/docs/PROFILES.md
CHANGED
|
@@ -32,7 +32,7 @@ export const label = profile({
|
|
|
32
32
|
});
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
These are the
|
|
35
|
+
These are the example design system's (`profiles/Typography/text.ads.ts`). `with` composes
|
|
36
36
|
profiles of the same kind. An input may be partial; a consumer requires a
|
|
37
37
|
complete contract for its operation. There is no inheritance chain, stylesheet
|
|
38
38
|
ordering, arbitrary mixin or callback execution.
|
|
@@ -120,7 +120,7 @@ function. Every kind can declare choices.
|
|
|
120
120
|
- A refinement cannot silently add options to an inherited domain.
|
|
121
121
|
- A missing or conflicting default, or an unknown selection, is an error.
|
|
122
122
|
|
|
123
|
-
The
|
|
123
|
+
The example design system's control combines the frame and spacing choice `size` with the
|
|
124
124
|
coordinated text and visual choice `typography`:
|
|
125
125
|
|
|
126
126
|
```ts
|