@vectoriox/iox-ui 4.7.1 → 4.7.3
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.
|
@@ -1954,6 +1954,27 @@ const NOOP_INITIAL_VALUES = {
|
|
|
1954
1954
|
'mix-blend-mode': ['normal'],
|
|
1955
1955
|
'transform': ['none'], 'box-shadow': ['none'],
|
|
1956
1956
|
};
|
|
1957
|
+
/**
|
|
1958
|
+
* Style props a type's render-default fully REPLACES. Emitting them would produce a dead
|
|
1959
|
+
* declaration that is immediately overridden in the same rule (e.g. an Icon's serialised
|
|
1960
|
+
* `lineHeight: 1.5` followed by the forced `line-height: 1`), so callers strip them first via
|
|
1961
|
+
* {@link stripSuppressedProps} and let renderDefaultDeclarations supply the real value.
|
|
1962
|
+
*/
|
|
1963
|
+
const SUPPRESSED_STYLE_PROPS_BY_TYPE = {
|
|
1964
|
+
// An icon's line box is structurally forced to 1 — see the Icon branch of renderDefaultDeclarations.
|
|
1965
|
+
Icon: ['lineHeight'],
|
|
1966
|
+
};
|
|
1967
|
+
/** Remove the style props whose value a type's render-default always overrides. Returns the map
|
|
1968
|
+
* unchanged (same reference) when the type suppresses nothing. */
|
|
1969
|
+
function stripSuppressedProps(type, styleProps) {
|
|
1970
|
+
const suppressed = SUPPRESSED_STYLE_PROPS_BY_TYPE[type];
|
|
1971
|
+
if (!suppressed?.length)
|
|
1972
|
+
return styleProps;
|
|
1973
|
+
const out = { ...styleProps };
|
|
1974
|
+
for (const key of suppressed)
|
|
1975
|
+
delete out[key];
|
|
1976
|
+
return out;
|
|
1977
|
+
}
|
|
1957
1978
|
/**
|
|
1958
1979
|
* Compile a flat, camelCase style map into an array of `"prop: value"` CSS
|
|
1959
1980
|
* declarations (kebab-cased, viewport-units rewritten, empties + no-op initials dropped,
|
|
@@ -2060,18 +2081,17 @@ function renderDefaultDeclarations(type, styleProps, hasHoverState) {
|
|
|
2060
2081
|
if (type === 'LinkedContainer' && sp['display'] === undefined) {
|
|
2061
2082
|
out.push('display: block');
|
|
2062
2083
|
}
|
|
2063
|
-
// An Icon is a single FONT GLYPH, not a paragraph:
|
|
2064
|
-
//
|
|
2065
|
-
//
|
|
2066
|
-
//
|
|
2067
|
-
// pushes the surrounding layout around.
|
|
2084
|
+
// An Icon is a single FONT GLYPH, not a paragraph: it must contribute no line-box height of its
|
|
2085
|
+
// own (spacing belongs to padding/margin). But every node serialises the Typography group's
|
|
2086
|
+
// `lineHeight` default of 1.5, so icons carry `line-height: 1.5` — a 24px glyph then gets a 36px
|
|
2087
|
+
// line box and pushes the surrounding layout around.
|
|
2068
2088
|
//
|
|
2069
2089
|
// This is emitted UNCONDITIONALLY (not guarded on `undefined`) and callers append render-defaults
|
|
2070
2090
|
// AFTER the node's own compiled declarations in the SAME rule, so it overrides a stale serialised
|
|
2071
|
-
//
|
|
2072
|
-
// is not enough: the icon would inherit 1.5 from its container instead.
|
|
2091
|
+
// value for EXISTING icons too — no re-save needed. line-height is inherited, so simply omitting
|
|
2092
|
+
// it is not enough: the icon would inherit 1.5 from its container instead.
|
|
2073
2093
|
if (type === 'Icon')
|
|
2074
|
-
out.push('line-height:
|
|
2094
|
+
out.push('line-height: 0');
|
|
2075
2095
|
return out;
|
|
2076
2096
|
}
|
|
2077
2097
|
|
|
@@ -2768,5 +2788,5 @@ function effectiveTransitionId(anim) {
|
|
|
2768
2788
|
* Generated bundle index. Do not edit.
|
|
2769
2789
|
*/
|
|
2770
2790
|
|
|
2771
|
-
export { AOSService, AnalyticsService, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CardComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, ENVIRONMENT, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, applyFeel, buildDataSourceFilter, buildTransitionTimeline, compileDeclarations, composeVirtualTraits, dataSourcePlanToRequest, effectiveTransitionId, feelFor, legacyEnterToTransition, matchRouteParams, normalizeCollectionResult, planDataSource, renderDefaultDeclarations, resolvePageTransition, resolveSingleItemId, rewriteViewportUnits, styleKeyToKebab };
|
|
2791
|
+
export { AOSService, AnalyticsService, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CardComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, ENVIRONMENT, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, SUPPRESSED_STYLE_PROPS_BY_TYPE, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, applyFeel, buildDataSourceFilter, buildTransitionTimeline, compileDeclarations, composeVirtualTraits, dataSourcePlanToRequest, effectiveTransitionId, feelFor, legacyEnterToTransition, matchRouteParams, normalizeCollectionResult, planDataSource, renderDefaultDeclarations, resolvePageTransition, resolveSingleItemId, rewriteViewportUnits, stripSuppressedProps, styleKeyToKebab };
|
|
2772
2792
|
//# sourceMappingURL=vectoriox-iox-ui.mjs.map
|