@vectoriox/iox-ui 5.13.0 → 5.14.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 +92 -22
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +120 -35
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +39 -6
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/index.d.ts +25 -4
- package/package.json +1 -1
- package/src/design-core/element-styles.ts +4 -20
- package/src/design-core/empty-image.ts +52 -0
- package/src/design-core/node-classes.ts +82 -0
- package/src/design-core/public-api.ts +2 -0
- package/src/design-core/token-names.ts +2 -13
- package/styles/iox-design.css +30 -0
- package/styles/iox-forms.css +6 -5
|
@@ -558,6 +558,12 @@ class BuilderImageComponent {
|
|
|
558
558
|
this.src = 'https://placehold.co/600x400?text=Image';
|
|
559
559
|
this.alt = 'Image';
|
|
560
560
|
this.nodeId = '';
|
|
561
|
+
/**
|
|
562
|
+
* What a MARKED image shows while it has no source (design-system DS3) — set by each renderer from
|
|
563
|
+
* the shared `emptyImageSrc` (`@vectoriox/iox-ui/design-core`): the "Add image" label on the canvas,
|
|
564
|
+
* the blank on the live site, `null` for an unmarked image, which therefore renders as before.
|
|
565
|
+
*/
|
|
566
|
+
this.emptySrc = null;
|
|
561
567
|
}
|
|
562
568
|
/**
|
|
563
569
|
* The `src` attribute value, or `null` to OMIT the attribute entirely when there is no image.
|
|
@@ -570,16 +576,21 @@ class BuilderImageComponent {
|
|
|
570
576
|
* filled when the visitor interacts (see element-context-state-plan.md).
|
|
571
577
|
*/
|
|
572
578
|
get srcAttr() {
|
|
573
|
-
return this.src || null;
|
|
579
|
+
return this.src || this.emptySrc || null;
|
|
580
|
+
}
|
|
581
|
+
/** `data-iox-empty` while the placeholder stands in — the hook the shared fill rule keys on. */
|
|
582
|
+
get emptyAttr() {
|
|
583
|
+
return !this.src && this.emptySrc ? '' : null;
|
|
574
584
|
}
|
|
575
585
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: BuilderImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
576
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.31", type: BuilderImageComponent, isStandalone: false, selector: "img[iox-img]", inputs: { src: "src", alt: "alt", nodeId: "nodeId" }, host: { properties: { "attr.src": "srcAttr", "attr.alt": "alt", "class": "'iox-node-' + nodeId" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;max-width:100%}\n"] }); }
|
|
586
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.31", type: BuilderImageComponent, isStandalone: false, selector: "img[iox-img]", inputs: { src: "src", alt: "alt", nodeId: "nodeId", emptySrc: "emptySrc" }, host: { properties: { "attr.src": "srcAttr", "attr.alt": "alt", "attr.data-iox-empty": "emptyAttr", "class": "'iox-node-' + nodeId" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;max-width:100%}\n"] }); }
|
|
577
587
|
}
|
|
578
588
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: BuilderImageComponent, decorators: [{
|
|
579
589
|
type: Component,
|
|
580
590
|
args: [{ selector: 'img[iox-img]', template: '', host: {
|
|
581
591
|
'[attr.src]': 'srcAttr',
|
|
582
592
|
'[attr.alt]': 'alt',
|
|
593
|
+
'[attr.data-iox-empty]': 'emptyAttr',
|
|
583
594
|
'[class]': "'iox-node-' + nodeId",
|
|
584
595
|
}, standalone: false, styles: [":host{display:block;max-width:100%}\n"] }]
|
|
585
596
|
}], propDecorators: { src: [{
|
|
@@ -588,6 +599,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
588
599
|
type: Input
|
|
589
600
|
}], nodeId: [{
|
|
590
601
|
type: Input
|
|
602
|
+
}], emptySrc: [{
|
|
603
|
+
type: Input
|
|
591
604
|
}] } });
|
|
592
605
|
|
|
593
606
|
/** Directive-host spacer: the `<div>` IS the host — no wrapper. All styles on `.iox-node`. */
|
|
@@ -2875,7 +2888,7 @@ class ClientGalleryComponent {
|
|
|
2875
2888
|
this.loop.start(this.urls.length);
|
|
2876
2889
|
}
|
|
2877
2890
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: ClientGalleryComponent, deps: [{ token: PLATFORM_ID }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2878
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.31", type: ClientGalleryComponent, isStandalone: false, selector: "iox-gallery", inputs: { nodeId: "nodeId", effect: "effect", autoStart: "autoStart", layout: "layout", images: "images", showDuration: "showDuration", fadeDuration: "fadeDuration" }, ngImport: i0, template: `
|
|
2891
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.31", type: ClientGalleryComponent, isStandalone: false, selector: "iox-gallery", inputs: { nodeId: "nodeId", effect: "effect", autoStart: "autoStart", layout: "layout", images: "images", showDuration: "showDuration", fadeDuration: "fadeDuration" }, host: { properties: { "attr.data-iox-empty": "urls.length ? null : ''" } }, ngImport: i0, template: `
|
|
2879
2892
|
<div class="iox-gallery" [class]="'iox-node-' + nodeId">
|
|
2880
2893
|
<div *ngFor="let url of urls; index as i"
|
|
2881
2894
|
class="iox-gallery__img"
|
|
@@ -2887,7 +2900,7 @@ class ClientGalleryComponent {
|
|
|
2887
2900
|
}
|
|
2888
2901
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: ClientGalleryComponent, decorators: [{
|
|
2889
2902
|
type: Component,
|
|
2890
|
-
args: [{ selector: 'iox-gallery', template: `
|
|
2903
|
+
args: [{ selector: 'iox-gallery', host: { '[attr.data-iox-empty]': "urls.length ? null : ''" }, template: `
|
|
2891
2904
|
<div class="iox-gallery" [class]="'iox-node-' + nodeId">
|
|
2892
2905
|
<div *ngFor="let url of urls; index as i"
|
|
2893
2906
|
class="iox-gallery__img"
|
|
@@ -5221,6 +5234,13 @@ function partClassName(type, partKey) {
|
|
|
5221
5234
|
*/
|
|
5222
5235
|
/** Background fallback when a gradient/image type is selected but its value is empty. */
|
|
5223
5236
|
const EMPTY_BACKGROUND = '#fff';
|
|
5237
|
+
/** The token fallbacks of a design-system page (spec tokens only). */
|
|
5238
|
+
const PAGE_TOKEN_FALLBACKS = {
|
|
5239
|
+
'background': 'var(--iox-page-bg)',
|
|
5240
|
+
'color': 'var(--iox-text)',
|
|
5241
|
+
'font-family': 'var(--iox-font-body)',
|
|
5242
|
+
};
|
|
5243
|
+
const BACKGROUND_KEYS = ['background', 'background-color'];
|
|
5224
5244
|
/**
|
|
5225
5245
|
* Compile page style settings into CSS declarations.
|
|
5226
5246
|
*
|
|
@@ -5230,7 +5250,20 @@ const EMPTY_BACKGROUND = '#fff';
|
|
|
5230
5250
|
* `backgroundType` selects which background field wins — it is derived from the author's
|
|
5231
5251
|
* colour/image choice rather than picked directly (see the builder's page-background.util).
|
|
5232
5252
|
*/
|
|
5233
|
-
function compilePageStyle(style) {
|
|
5253
|
+
function compilePageStyle(style, options = {}) {
|
|
5254
|
+
const css = compileOwnStyle(style);
|
|
5255
|
+
if (!options.designSystem)
|
|
5256
|
+
return css;
|
|
5257
|
+
if (!BACKGROUND_KEYS.some(k => k in css))
|
|
5258
|
+
css['background'] = PAGE_TOKEN_FALLBACKS['background'];
|
|
5259
|
+
if (!('color' in css))
|
|
5260
|
+
css['color'] = PAGE_TOKEN_FALLBACKS['color'];
|
|
5261
|
+
if (!('font-family' in css))
|
|
5262
|
+
css['font-family'] = PAGE_TOKEN_FALLBACKS['font-family'];
|
|
5263
|
+
return css;
|
|
5264
|
+
}
|
|
5265
|
+
/** What the page itself sets — the only thing a page without the design-system flag compiles to. */
|
|
5266
|
+
function compileOwnStyle(style) {
|
|
5234
5267
|
if (!style)
|
|
5235
5268
|
return {};
|
|
5236
5269
|
const css = {};
|
|
@@ -7041,5 +7074,5 @@ function effectiveTransitionId(anim) {
|
|
|
7041
7074
|
* Generated bundle index. Do not edit.
|
|
7042
7075
|
*/
|
|
7043
7076
|
|
|
7044
|
-
export { AOSService, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ContainerComponent, ContextStore, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DeclarationContext, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HOVER_DEFAULT_TRANSITION, HOVER_STATES, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxDialogComponent, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LEGACY_HOVER_TRANSITION, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, RESERVED_ALIAS_PREFIX, STATE_PSEUDO_CLASS, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, composeVirtualTraits, computeRelative, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, decomposeBackdropFilter, defaultHoverTransition, defaultMessageResolver, deriveSeoFromContent, describeSeoFields, effectiveTransitionId, excludeSelf, feelFor, getByPath, getSeoValue, hasHoverState, hasOwnTransition, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, isWholeBackdropSet, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, partClassName, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, safeSetInput, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, stateNamesIn, statePseudoClass, stripSuppressedProps, variableAliases, variableItemsFrom, withContextSlots, withDefaultHoverTransition, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
7077
|
+
export { AOSService, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ContainerComponent, ContextStore, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DeclarationContext, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HOVER_DEFAULT_TRANSITION, HOVER_STATES, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxDialogComponent, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LEGACY_HOVER_TRANSITION, LinkedContainerComponent, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, RESERVED_ALIAS_PREFIX, STATE_PSEUDO_CLASS, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, composeVirtualTraits, computeRelative, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, decomposeBackdropFilter, defaultHoverTransition, defaultMessageResolver, deriveSeoFromContent, describeSeoFields, effectiveTransitionId, excludeSelf, feelFor, getByPath, getSeoValue, hasHoverState, hasOwnTransition, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, isWholeBackdropSet, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, partClassName, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, safeSetInput, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, stateNamesIn, statePseudoClass, stripSuppressedProps, variableAliases, variableItemsFrom, withContextSlots, withDefaultHoverTransition, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
7045
7078
|
//# sourceMappingURL=vectoriox-iox-ui.mjs.map
|