@vectoriox/iox-ui 4.7.0 → 4.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -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,10 +2081,18 @@ function renderDefaultDeclarations(type, styleProps, hasHoverState) {
|
|
|
2060
2081
|
if (type === 'LinkedContainer' && sp['display'] === undefined) {
|
|
2061
2082
|
out.push('display: block');
|
|
2062
2083
|
}
|
|
2063
|
-
//
|
|
2064
|
-
//
|
|
2065
|
-
//
|
|
2066
|
-
//
|
|
2084
|
+
// An Icon is a single FONT GLYPH, not a paragraph: its line box must hug the glyph (the universal
|
|
2085
|
+
// icon-font convention — Phosphor/FontAwesome/Material all set line-height:1). But every node
|
|
2086
|
+
// serialises the Typography group's `lineHeight` default of 1.5, so icons saved before that
|
|
2087
|
+
// default was corrected carry `line-height: 1.5` — a 24px glyph then gets a 36px line box and
|
|
2088
|
+
// pushes the surrounding layout around.
|
|
2089
|
+
//
|
|
2090
|
+
// This is emitted UNCONDITIONALLY (not guarded on `undefined`) and callers append render-defaults
|
|
2091
|
+
// AFTER the node's own compiled declarations in the SAME rule, so it overrides a stale serialised
|
|
2092
|
+
// 1.5 for EXISTING icons too — no re-save needed. line-height is inherited, so simply omitting it
|
|
2093
|
+
// is not enough: the icon would inherit 1.5 from its container instead.
|
|
2094
|
+
if (type === 'Icon')
|
|
2095
|
+
out.push('line-height: 1');
|
|
2067
2096
|
return out;
|
|
2068
2097
|
}
|
|
2069
2098
|
|
|
@@ -2760,5 +2789,5 @@ function effectiveTransitionId(anim) {
|
|
|
2760
2789
|
* Generated bundle index. Do not edit.
|
|
2761
2790
|
*/
|
|
2762
2791
|
|
|
2763
|
-
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 };
|
|
2792
|
+
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 };
|
|
2764
2793
|
//# sourceMappingURL=vectoriox-iox-ui.mjs.map
|