@vectoriox/iox-ui 5.90.1 → 5.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/design-core/index.d.ts +50 -3
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +69 -4
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +575 -77
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +40 -23
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +161 -20
- package/index.d.ts +18 -1
- package/package.json +1 -1
- package/src/design-core/flavor-spec.generated.ts +28 -0
- package/src/design-core/node-classes.ts +28 -1
- package/src/design-core/token-css.ts +18 -3
- package/src/generation-core/check-layout.ts +84 -25
- package/src/generation-core/compose-layout.ts +92 -7
- package/src/generation-core/compose-site.ts +18 -7
- package/src/generation-core/layout-language.ts +19 -1
- package/src/generation-core/layout-section-fallback.ts +18 -4
- package/src/generation-core/layout-space.ts +260 -0
- package/src/generation-core/patterns.ts +2 -0
- package/src/generation-core/pictures.ts +3 -3
- package/src/generation-core/public-api.ts +1 -0
- package/src/generation-core/site-spec.generated.ts +30 -14
- package/src/generation-core/stock-photos.ts +77 -13
package/design-core/index.d.ts
CHANGED
|
@@ -2792,6 +2792,33 @@ declare const SPEC_SCHEMES: {
|
|
|
2792
2792
|
readonly "warning-bg": "{{accent-hover}}";
|
|
2793
2793
|
};
|
|
2794
2794
|
};
|
|
2795
|
+
readonly muted: {
|
|
2796
|
+
readonly label: "Muted";
|
|
2797
|
+
readonly set: {
|
|
2798
|
+
readonly "section-bg": "{{text-muted}}";
|
|
2799
|
+
readonly bg: "{{text-muted}}";
|
|
2800
|
+
readonly "nav-bg": "{{text-muted}}";
|
|
2801
|
+
readonly surface: "{{text-muted}}";
|
|
2802
|
+
readonly "surface-2": "{{text-muted}}";
|
|
2803
|
+
readonly "surface-glass": "{{text-muted}}";
|
|
2804
|
+
readonly "surface-glass-strong": "{{text-muted}}";
|
|
2805
|
+
readonly text: "{{bg}}";
|
|
2806
|
+
readonly "text-muted": "{{bg}}";
|
|
2807
|
+
readonly line: "color-mix(in srgb, {{bg}} 28%, transparent)";
|
|
2808
|
+
readonly "line-strong": "{{bg}}";
|
|
2809
|
+
readonly "glass-border": "color-mix(in srgb, {{bg}} 28%, transparent)";
|
|
2810
|
+
readonly accent: "{{bg}}";
|
|
2811
|
+
readonly "accent-ink": "{{text-muted}}";
|
|
2812
|
+
readonly "accent-text": "{{bg}}";
|
|
2813
|
+
readonly "accent-hover": "{{bg}}";
|
|
2814
|
+
readonly danger: "{{bg}}";
|
|
2815
|
+
readonly "danger-bg": "{{text-muted}}";
|
|
2816
|
+
readonly success: "{{bg}}";
|
|
2817
|
+
readonly "success-bg": "{{text-muted}}";
|
|
2818
|
+
readonly warning: "{{bg}}";
|
|
2819
|
+
readonly "warning-bg": "{{text-muted}}";
|
|
2820
|
+
};
|
|
2821
|
+
};
|
|
2795
2822
|
};
|
|
2796
2823
|
declare const SPEC_SCHEME_INK: "var(--iox-text)";
|
|
2797
2824
|
declare const SPEC_A11Y: {
|
|
@@ -3056,6 +3083,7 @@ declare const SPEC_ELEMENT_STYLES: readonly [{
|
|
|
3056
3083
|
readonly group: "Text";
|
|
3057
3084
|
readonly appliesTo: readonly ["Link"];
|
|
3058
3085
|
readonly base: {
|
|
3086
|
+
readonly fontFamily: "var(--iox-font-body)";
|
|
3059
3087
|
readonly color: "var(--iox-link-color)";
|
|
3060
3088
|
readonly textDecoration: "var(--iox-link-decoration)";
|
|
3061
3089
|
readonly transitionDuration: "var(--iox-dur-fast)";
|
|
@@ -16279,19 +16307,38 @@ declare enum ColorScheme {
|
|
|
16279
16307
|
Default = "default",
|
|
16280
16308
|
Subtle = "subtle",
|
|
16281
16309
|
Inverse = "inverse",
|
|
16282
|
-
Accent = "accent"
|
|
16310
|
+
Accent = "accent",
|
|
16311
|
+
/** A band painted the page's muted ink (iox-ui#70). */
|
|
16312
|
+
Muted = "muted"
|
|
16283
16313
|
}
|
|
16284
16314
|
/** The content trait (stored in `props`, not a style prop) that picks a node's scheme. */
|
|
16285
16315
|
declare const COLOR_SCHEME_TRAIT = "colorScheme";
|
|
16286
16316
|
/** The node types that offer a scheme (spec §3c: Section/Container; LinkedContainer is a Container that links). */
|
|
16287
16317
|
declare const COLOR_SCHEME_TYPES: ReadonlyArray<string>;
|
|
16288
|
-
/** Every scheme in contract order, with the contract's label (Default · Subtle · Inverse · Brand). */
|
|
16318
|
+
/** Every scheme in contract order, with the contract's label (Default · Subtle · Inverse · Brand · Muted). */
|
|
16289
16319
|
declare const COLOR_SCHEMES: ReadonlyArray<{
|
|
16290
16320
|
readonly id: ColorScheme;
|
|
16291
16321
|
readonly label: string;
|
|
16292
16322
|
}>;
|
|
16293
16323
|
/** `iox-scheme-<id>` for a known NON-default scheme, else null — an unknown id never reaches a class attribute. */
|
|
16294
16324
|
declare function colorSchemeClass(id: unknown): string | null;
|
|
16325
|
+
/**
|
|
16326
|
+
* The scheme a page OPENS on, and the site header following it (M8 demo, vectoriox/iox-ui#71): the header is a global —
|
|
16327
|
+
* one node for every page — so a dark page under a light header read as a cream strip over the night. A page stores the
|
|
16328
|
+
* scheme of its first ground (`pageSettings.opening`); the renderer puts it on the element around the header (the
|
|
16329
|
+
* engine's body, the canvas's globals layer) as `data-iox-opening`, and `compileSchemeCss` re-declares that scheme's
|
|
16330
|
+
* tokens on a header that names no scheme of its own (`openingFollowerSelector`) — its links, button, logo, menu button
|
|
16331
|
+
* and drawer with it. A page with no opening, or the default, leaves the header as it is.
|
|
16332
|
+
*/
|
|
16333
|
+
declare const OPENING_ATTRIBUTE = "data-iox-opening";
|
|
16334
|
+
/** The `pageSettings` key the opening's scheme is stored under. */
|
|
16335
|
+
declare const OPENING_SETTING = "opening";
|
|
16336
|
+
/** The role whose node follows the page's opening: the site header's root (generation-core `NavRole.Root`). */
|
|
16337
|
+
declare const OPENING_FOLLOWER_ROLE = "nav";
|
|
16338
|
+
/** The non-default scheme a page opens on, or null. */
|
|
16339
|
+
declare function pageOpeningScheme(pageSettings: Readonly<Record<string, unknown>> | null | undefined): ColorScheme | null;
|
|
16340
|
+
/** The header that follows an opening of scheme `id` and names none of its own, inside `scope` (the builder's token scope). */
|
|
16341
|
+
declare function openingFollowerSelector(id: string, scope?: string): string;
|
|
16295
16342
|
/** `iox-role-<role>` for a well-formed composite role, else null. */
|
|
16296
16343
|
declare function roleClass(role: unknown): string | null;
|
|
16297
16344
|
/** The node shapes this module reads: a serialized node (`props`, `styleProps`) or a builder node (`traits[]`, `styleTraits`). */
|
|
@@ -17394,5 +17441,5 @@ declare function presetChoices(id: string, mode?: DesignMode): DesignChoices | n
|
|
|
17394
17441
|
*/
|
|
17395
17442
|
declare function stylePresetOfChoices(choices: DesignChoices | null | undefined): StylePreset | undefined;
|
|
17396
17443
|
|
|
17397
|
-
export { ACCENT_TOKEN_NAMES, ANIMATE_IDS, AdoptOutcome, AdoptSkipReason, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BETWEEN_IDS, BOTTOM_BAR_STYLE, BUTTON_VARIANT_TO_STYLE, CANVAS_LINK_ATTRIBUTE, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, COMPOSED_HEADER, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, EntranceParam, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, HEADER_THEME_COLOR_TOKEN, HELD_CONTRAST, HeaderAttribute, HeaderBehaviour, HeaderEdge, HeaderTrait, INHERITED_TEXT, LinkType, MARK_STYLES, MAX_FONT_FILE_BYTES, MOOD_IDS, MOOD_LABELS, NEW_NODE_STYLE_DEFAULTS, OwnedTraitLink, PALETTE_PRESETS, PRE_DS2_FLAVOR_DEFAULTS, PRE_MOTION, PRE_TINT_DEFAULT, REDUCED_DESIGN_MOTION, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, ROW_INDEX_ATTRIBUTE, SCHEME_INK, SCROLL_IDS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FLOATING_BASELINE, SPEC_FONTS, SPEC_FONT_METRICS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_MOODS, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SCRIPTS, SPEC_SPRINGS, SPEC_STYLE_PRESETS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, STAGGER_MAX_ITEMS, STAGGER_SHRINK, STYLE_PRESETS, SUPERSEDED_STYLE_VALUES, SWISS_FLAVOR, THEME_COLOR_TOKEN, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designApplySnapshot, designBaseline, designConfigEntries, designModeOf, designMotionOf, designRevertConfig, designTokenRepairs, designTokenRows, drawsScript, elementStyleById, elementStyleClass, elementStyleFace, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, entranceDelay, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, groupFontFamilies, hasElementStyleMarker, headerAttributes, headerBehaviourOf, headerEdgeOf, headerStaysAtTop, headingHref, inSrgbGamut, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFontWeightRange, isRetiredFlavorId, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, matchFontWeight, missingDesignRows, missingFontRoles, nodeDesignClasses, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, ownedTraitStatus, ownedTraitsOf, packDesignChoices, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planSwissMigration, preTintAccentGrounds, presetChoices, presetModes, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, releaseElementStyle, repeatedRowIndex, resolveDesignChoices, resolveDesignMotion, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, scriptsForLocale, setColorScheme, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, staggerDelay, styleKeyToKebab, stylePresetById, stylePresetOfChoices, switchElementStyle, syncNodeDesignClasses, textWidthEm, themeColors, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, withoutScriptPartners, writeOwnedTrait };
|
|
17444
|
+
export { ACCENT_TOKEN_NAMES, ANIMATE_IDS, AdoptOutcome, AdoptSkipReason, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BETWEEN_IDS, BOTTOM_BAR_STYLE, BUTTON_VARIANT_TO_STYLE, CANVAS_LINK_ATTRIBUTE, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, COMPOSED_HEADER, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, EntranceParam, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, HEADER_THEME_COLOR_TOKEN, HELD_CONTRAST, HeaderAttribute, HeaderBehaviour, HeaderEdge, HeaderTrait, INHERITED_TEXT, LinkType, MARK_STYLES, MAX_FONT_FILE_BYTES, MOOD_IDS, MOOD_LABELS, NEW_NODE_STYLE_DEFAULTS, OPENING_ATTRIBUTE, OPENING_FOLLOWER_ROLE, OPENING_SETTING, OwnedTraitLink, PALETTE_PRESETS, PRE_DS2_FLAVOR_DEFAULTS, PRE_MOTION, PRE_TINT_DEFAULT, REDUCED_DESIGN_MOTION, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, ROW_INDEX_ATTRIBUTE, SCHEME_INK, SCROLL_IDS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FLOATING_BASELINE, SPEC_FONTS, SPEC_FONT_METRICS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_MOODS, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SCRIPTS, SPEC_SPRINGS, SPEC_STYLE_PRESETS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, STAGGER_MAX_ITEMS, STAGGER_SHRINK, STYLE_PRESETS, SUPERSEDED_STYLE_VALUES, SWISS_FLAVOR, THEME_COLOR_TOKEN, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designApplySnapshot, designBaseline, designConfigEntries, designModeOf, designMotionOf, designRevertConfig, designTokenRepairs, designTokenRows, drawsScript, elementStyleById, elementStyleClass, elementStyleFace, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, entranceDelay, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, groupFontFamilies, hasElementStyleMarker, headerAttributes, headerBehaviourOf, headerEdgeOf, headerStaysAtTop, headingHref, inSrgbGamut, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFontWeightRange, isRetiredFlavorId, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, matchFontWeight, missingDesignRows, missingFontRoles, nodeDesignClasses, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, openingFollowerSelector, ownedTraitStatus, ownedTraitsOf, packDesignChoices, pageOpeningScheme, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planSwissMigration, preTintAccentGrounds, presetChoices, presetModes, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, releaseElementStyle, repeatedRowIndex, resolveDesignChoices, resolveDesignMotion, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, scriptsForLocale, setColorScheme, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, staggerDelay, styleKeyToKebab, stylePresetById, stylePresetOfChoices, switchElementStyle, syncNodeDesignClasses, textWidthEm, themeColors, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, withoutScriptPartners, writeOwnedTrait };
|
|
17398
17445
|
export type { AccentBackgrounds, AccentGround, AccentTokenName, AdoptContext, AdoptReport, AdoptableNode, AdoptedNode, AnimateId, ApplyElementStyleResult, BetweenId, ButtonBlockLinkProps, ColourCheck, ColourFlavor, ContrastFinding, DensityId, DesignApplyOptions, DesignChoices, DesignClassSource, DesignConfigEntry, DesignMode, DesignMotion, DesignRevertSnapshot, DesignTokenGroup, DesignTokenLike, DesignTokenRow, DesignTokenTier, DesignTokenType, ElementStyle, ElementStyleTarget, ElementStyleTraitLike, FlavorColours, FlavorPack, FlavorPackV2, FlavorPalette, FlavorRevertPlan, FlavorRevertSnapshot, FlavorRevertWrite, FlavorSeedOptions, FlavorSeedPlan, FlavorSpecToken, FlavorTintConfig, FlavorTokenDef, FontDescriptor, FontFamilyGroup, FontFamilyRemoval, FontFamilyToken, FontFormat, FontPair, FontRoleToken, FontStyle, FontWeight, FontWeightRange, FontsForTokensOptions, KeptEdit, LinearSpring, MissingFontRole, MoodId, MotionId, NodeLinkProps, OkLab, OwnedTrait, OwnedTraitStatus, PalettePreset, PresetMode, ResolvedMode, Rgb, Rgba, SchemeId, ScriptId, ScrollId, SeedBaseline, SeedExpectation, ShapeId, SkippedNode, StaggerSpec, StoredDesign, StoredDesignTokenRow, StylePreset, SupersededStyleValue, SwissMigration, SwitchElementStyleResult, ThemeColorOptions, ThemeColors, TimedAction, TintId, TintLevel, TokenCssBlocks, TokenCssOptions, TypeFace };
|
|
@@ -3386,6 +3386,33 @@ const SPEC_SCHEMES = {
|
|
|
3386
3386
|
"warning": "{{accent-ink}}",
|
|
3387
3387
|
"warning-bg": "{{accent-hover}}"
|
|
3388
3388
|
}
|
|
3389
|
+
},
|
|
3390
|
+
"muted": {
|
|
3391
|
+
"label": "Muted",
|
|
3392
|
+
"set": {
|
|
3393
|
+
"section-bg": "{{text-muted}}",
|
|
3394
|
+
"bg": "{{text-muted}}",
|
|
3395
|
+
"nav-bg": "{{text-muted}}",
|
|
3396
|
+
"surface": "{{text-muted}}",
|
|
3397
|
+
"surface-2": "{{text-muted}}",
|
|
3398
|
+
"surface-glass": "{{text-muted}}",
|
|
3399
|
+
"surface-glass-strong": "{{text-muted}}",
|
|
3400
|
+
"text": "{{bg}}",
|
|
3401
|
+
"text-muted": "{{bg}}",
|
|
3402
|
+
"line": "color-mix(in srgb, {{bg}} 28%, transparent)",
|
|
3403
|
+
"line-strong": "{{bg}}",
|
|
3404
|
+
"glass-border": "color-mix(in srgb, {{bg}} 28%, transparent)",
|
|
3405
|
+
"accent": "{{bg}}",
|
|
3406
|
+
"accent-ink": "{{text-muted}}",
|
|
3407
|
+
"accent-text": "{{bg}}",
|
|
3408
|
+
"accent-hover": "{{bg}}",
|
|
3409
|
+
"danger": "{{bg}}",
|
|
3410
|
+
"danger-bg": "{{text-muted}}",
|
|
3411
|
+
"success": "{{bg}}",
|
|
3412
|
+
"success-bg": "{{text-muted}}",
|
|
3413
|
+
"warning": "{{bg}}",
|
|
3414
|
+
"warning-bg": "{{text-muted}}"
|
|
3415
|
+
}
|
|
3389
3416
|
}
|
|
3390
3417
|
};
|
|
3391
3418
|
const SPEC_SCHEME_INK = "var(--iox-text)";
|
|
@@ -3694,6 +3721,7 @@ const SPEC_ELEMENT_STYLES = [
|
|
|
3694
3721
|
"Link"
|
|
3695
3722
|
],
|
|
3696
3723
|
"base": {
|
|
3724
|
+
"fontFamily": "var(--iox-font-body)",
|
|
3697
3725
|
"color": "var(--iox-link-color)",
|
|
3698
3726
|
"textDecoration": "var(--iox-link-decoration)",
|
|
3699
3727
|
"transitionDuration": "var(--iox-dur-fast)",
|
|
@@ -18671,12 +18699,14 @@ var ColorScheme;
|
|
|
18671
18699
|
ColorScheme["Subtle"] = "subtle";
|
|
18672
18700
|
ColorScheme["Inverse"] = "inverse";
|
|
18673
18701
|
ColorScheme["Accent"] = "accent";
|
|
18702
|
+
/** A band painted the page's muted ink (iox-ui#70). */
|
|
18703
|
+
ColorScheme["Muted"] = "muted";
|
|
18674
18704
|
})(ColorScheme || (ColorScheme = {}));
|
|
18675
18705
|
/** The content trait (stored in `props`, not a style prop) that picks a node's scheme. */
|
|
18676
18706
|
const COLOR_SCHEME_TRAIT = 'colorScheme';
|
|
18677
18707
|
/** The node types that offer a scheme (spec §3c: Section/Container; LinkedContainer is a Container that links). */
|
|
18678
18708
|
const COLOR_SCHEME_TYPES = ['Section', 'Container', 'LinkedContainer'];
|
|
18679
|
-
/** Every scheme in contract order, with the contract's label (Default · Subtle · Inverse · Brand). */
|
|
18709
|
+
/** Every scheme in contract order, with the contract's label (Default · Subtle · Inverse · Brand · Muted). */
|
|
18680
18710
|
const COLOR_SCHEMES = Object.keys(SPEC_SCHEMES).map(id => ({ id, label: SPEC_SCHEMES[id].label }));
|
|
18681
18711
|
const SCHEME_IDS$1 = new Set(Object.keys(SPEC_SCHEMES));
|
|
18682
18712
|
const SCHEME_PREFIX = 'iox-scheme-';
|
|
@@ -18688,6 +18718,28 @@ const MARKER_PREFIX = `${ELEMENT_STYLE_MARKER_CLASS}-`;
|
|
|
18688
18718
|
function colorSchemeClass(id) {
|
|
18689
18719
|
return typeof id === 'string' && id !== ColorScheme.Default && SCHEME_IDS$1.has(id) ? `${SCHEME_PREFIX}${id}` : null;
|
|
18690
18720
|
}
|
|
18721
|
+
/**
|
|
18722
|
+
* The scheme a page OPENS on, and the site header following it (M8 demo, vectoriox/iox-ui#71): the header is a global —
|
|
18723
|
+
* one node for every page — so a dark page under a light header read as a cream strip over the night. A page stores the
|
|
18724
|
+
* scheme of its first ground (`pageSettings.opening`); the renderer puts it on the element around the header (the
|
|
18725
|
+
* engine's body, the canvas's globals layer) as `data-iox-opening`, and `compileSchemeCss` re-declares that scheme's
|
|
18726
|
+
* tokens on a header that names no scheme of its own (`openingFollowerSelector`) — its links, button, logo, menu button
|
|
18727
|
+
* and drawer with it. A page with no opening, or the default, leaves the header as it is.
|
|
18728
|
+
*/
|
|
18729
|
+
const OPENING_ATTRIBUTE = 'data-iox-opening';
|
|
18730
|
+
/** The `pageSettings` key the opening's scheme is stored under. */
|
|
18731
|
+
const OPENING_SETTING = 'opening';
|
|
18732
|
+
/** The role whose node follows the page's opening: the site header's root (generation-core `NavRole.Root`). */
|
|
18733
|
+
const OPENING_FOLLOWER_ROLE = 'nav';
|
|
18734
|
+
/** The non-default scheme a page opens on, or null. */
|
|
18735
|
+
function pageOpeningScheme(pageSettings) {
|
|
18736
|
+
const id = pageSettings?.[OPENING_SETTING];
|
|
18737
|
+
return colorSchemeClass(id) ? id : null;
|
|
18738
|
+
}
|
|
18739
|
+
/** The header that follows an opening of scheme `id` and names none of its own, inside `scope` (the builder's token scope). */
|
|
18740
|
+
function openingFollowerSelector(id, scope) {
|
|
18741
|
+
return `${scope ? `${scope} ` : ''}[${OPENING_ATTRIBUTE}="${id}"] .${roleClass(OPENING_FOLLOWER_ROLE)}:not([class*="${SCHEME_PREFIX}"])`;
|
|
18742
|
+
}
|
|
18691
18743
|
/** `iox-role-<role>` for a well-formed composite role, else null. */
|
|
18692
18744
|
function roleClass(role) {
|
|
18693
18745
|
return typeof role === 'string' && ROLE_SHAPE.test(role) ? `${ROLE_PREFIX}${role.replace(/\./g, '-')}` : null;
|
|
@@ -18922,7 +18974,7 @@ const media = (query, rules) => {
|
|
|
18922
18974
|
const body = rules.filter(Boolean);
|
|
18923
18975
|
return body.length ? `@media ${query} {\n${body.join('\n')}\n}` : '';
|
|
18924
18976
|
};
|
|
18925
|
-
const schemeSelector = (id, scope) => scope ? `${scope} .iox-scheme-${id}` : `.iox-scheme-${id}`;
|
|
18977
|
+
const schemeSelector = (id, scope) => `${openingFollowerSelector(id, scope)}, ${scope ? `${scope} .iox-scheme-${id}` : `.iox-scheme-${id}`}`;
|
|
18926
18978
|
const nonDefaultSchemes = () => Object.entries(SPEC_SCHEMES)
|
|
18927
18979
|
.filter(([id]) => id !== DEFAULT_SCHEME$1)
|
|
18928
18980
|
.map(([id, scheme]) => [id, scheme.set]);
|
|
@@ -19062,8 +19114,20 @@ function compileSchemeCss(tokens, scope, opposite) {
|
|
|
19062
19114
|
.map((t) => [t.name, t.value]),
|
|
19063
19115
|
])),
|
|
19064
19116
|
schemeInkRule(scope),
|
|
19117
|
+
rows.some(t => t.name === NAV_BG) ? openingGroundRule(scope) : '',
|
|
19065
19118
|
].filter(Boolean).join('\n');
|
|
19066
19119
|
}
|
|
19120
|
+
const NAV_BG = 'nav-bg';
|
|
19121
|
+
/**
|
|
19122
|
+
* The header that follows the opening (vectoriox/iox-ui#71) stands on the scheme's ground, opaque: a glass look's
|
|
19123
|
+
* translucent bar (`color-mix(bg 72%, transparent)`) sits over the PAGE's ground, not the band's, and wearing the band's
|
|
19124
|
+
* ink on that mix it read at ~1:1. `!important` so the dark and reduced-transparency twins, emitted later, cannot put
|
|
19125
|
+
* the mix back.
|
|
19126
|
+
*/
|
|
19127
|
+
function openingGroundRule(scope) {
|
|
19128
|
+
const selectors = nonDefaultSchemes().map(([id]) => openingFollowerSelector(id, scope));
|
|
19129
|
+
return selectors.length ? `${selectors.join(', ')} {\n --iox-${NAV_BG}: var(--iox-bg) !important;\n}` : '';
|
|
19130
|
+
}
|
|
19067
19131
|
/**
|
|
19068
19132
|
* Every element wearing a scheme takes the scheme's ink (vectoriox/iox-ui#15): the tokens re-resolve inside
|
|
19069
19133
|
* it, but `color` is inherited as a COMPUTED value, so without this a scheme'd Container's running text kept
|
|
@@ -19073,7 +19137,8 @@ function compileSchemeCss(tokens, scope, opposite) {
|
|
|
19073
19137
|
*/
|
|
19074
19138
|
function schemeInkRule(scope) {
|
|
19075
19139
|
const where = scope ? `:where(${scope}) ` : '';
|
|
19076
|
-
const
|
|
19140
|
+
const ids = nonDefaultSchemes().map(([id]) => id);
|
|
19141
|
+
const selectors = [...ids.map(id => `:where(${openingFollowerSelector(id, scope)})`), ...ids.map(id => `${where}.iox-scheme-${id}`)];
|
|
19077
19142
|
return selectors.length ? `${selectors.join(', ')} {\n color: ${SCHEME_INK};\n}` : '';
|
|
19078
19143
|
}
|
|
19079
19144
|
/** The dark twin of both scheme rules: a re-declared token with a dark value would otherwise pin
|
|
@@ -21990,5 +22055,5 @@ function stylePresetOfChoices(choices) {
|
|
|
21990
22055
|
* Generated bundle index. Do not edit.
|
|
21991
22056
|
*/
|
|
21992
22057
|
|
|
21993
|
-
export { ACCENT_TOKEN_NAMES, ANIMATE_IDS, AdoptOutcome, AdoptSkipReason, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BETWEEN_IDS, BOTTOM_BAR_STYLE, BUTTON_VARIANT_TO_STYLE, CANVAS_LINK_ATTRIBUTE, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, COMPOSED_HEADER, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, EntranceParam, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, HEADER_THEME_COLOR_TOKEN, HELD_CONTRAST, HeaderAttribute, HeaderBehaviour, HeaderEdge, HeaderTrait, INHERITED_TEXT, LinkType, MARK_STYLES, MAX_FONT_FILE_BYTES, MOOD_IDS, MOOD_LABELS, NEW_NODE_STYLE_DEFAULTS, OwnedTraitLink, PALETTE_PRESETS, PRE_DS2_FLAVOR_DEFAULTS, PRE_MOTION, PRE_TINT_DEFAULT, REDUCED_DESIGN_MOTION, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, ROW_INDEX_ATTRIBUTE, SCHEME_INK, SCROLL_IDS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FLOATING_BASELINE, SPEC_FONTS, SPEC_FONT_METRICS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_MOODS, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SCRIPTS, SPEC_SPRINGS, SPEC_STYLE_PRESETS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, STAGGER_MAX_ITEMS, STAGGER_SHRINK, STYLE_PRESETS, SUPERSEDED_STYLE_VALUES, SWISS_FLAVOR, THEME_COLOR_TOKEN, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designApplySnapshot, designBaseline, designConfigEntries, designModeOf, designMotionOf, designRevertConfig, designTokenRepairs, designTokenRows, drawsScript, elementStyleById, elementStyleClass, elementStyleFace, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, entranceDelay, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, groupFontFamilies, hasElementStyleMarker, headerAttributes, headerBehaviourOf, headerEdgeOf, headerStaysAtTop, headingHref, inSrgbGamut, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFontWeightRange, isRetiredFlavorId, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, matchFontWeight, missingDesignRows, missingFontRoles, nodeDesignClasses, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, ownedTraitStatus, ownedTraitsOf, packDesignChoices, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planSwissMigration, preTintAccentGrounds, presetChoices, presetModes, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, releaseElementStyle, repeatedRowIndex, resolveDesignChoices, resolveDesignMotion, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, scriptsForLocale, setColorScheme, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, staggerDelay, styleKeyToKebab, stylePresetById, stylePresetOfChoices, switchElementStyle, syncNodeDesignClasses, textWidthEm, themeColors, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, withoutScriptPartners, writeOwnedTrait };
|
|
22058
|
+
export { ACCENT_TOKEN_NAMES, ANIMATE_IDS, AdoptOutcome, AdoptSkipReason, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BETWEEN_IDS, BOTTOM_BAR_STYLE, BUTTON_VARIANT_TO_STYLE, CANVAS_LINK_ATTRIBUTE, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, COMPOSED_HEADER, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, EntranceParam, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, HEADER_THEME_COLOR_TOKEN, HELD_CONTRAST, HeaderAttribute, HeaderBehaviour, HeaderEdge, HeaderTrait, INHERITED_TEXT, LinkType, MARK_STYLES, MAX_FONT_FILE_BYTES, MOOD_IDS, MOOD_LABELS, NEW_NODE_STYLE_DEFAULTS, OPENING_ATTRIBUTE, OPENING_FOLLOWER_ROLE, OPENING_SETTING, OwnedTraitLink, PALETTE_PRESETS, PRE_DS2_FLAVOR_DEFAULTS, PRE_MOTION, PRE_TINT_DEFAULT, REDUCED_DESIGN_MOTION, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, ROW_INDEX_ATTRIBUTE, SCHEME_INK, SCROLL_IDS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FLOATING_BASELINE, SPEC_FONTS, SPEC_FONT_METRICS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_MOODS, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SCRIPTS, SPEC_SPRINGS, SPEC_STYLE_PRESETS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, STAGGER_MAX_ITEMS, STAGGER_SHRINK, STYLE_PRESETS, SUPERSEDED_STYLE_VALUES, SWISS_FLAVOR, THEME_COLOR_TOKEN, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designApplySnapshot, designBaseline, designConfigEntries, designModeOf, designMotionOf, designRevertConfig, designTokenRepairs, designTokenRows, drawsScript, elementStyleById, elementStyleClass, elementStyleFace, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, entranceDelay, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, groupFontFamilies, hasElementStyleMarker, headerAttributes, headerBehaviourOf, headerEdgeOf, headerStaysAtTop, headingHref, inSrgbGamut, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFontWeightRange, isRetiredFlavorId, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, matchFontWeight, missingDesignRows, missingFontRoles, nodeDesignClasses, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, openingFollowerSelector, ownedTraitStatus, ownedTraitsOf, packDesignChoices, pageOpeningScheme, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planSwissMigration, preTintAccentGrounds, presetChoices, presetModes, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, releaseElementStyle, repeatedRowIndex, resolveDesignChoices, resolveDesignMotion, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, scriptsForLocale, setColorScheme, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, staggerDelay, styleKeyToKebab, stylePresetById, stylePresetOfChoices, switchElementStyle, syncNodeDesignClasses, textWidthEm, themeColors, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, withoutScriptPartners, writeOwnedTrait };
|
|
21994
22059
|
//# sourceMappingURL=vectoriox-iox-ui-design-core.mjs.map
|