@vectoriox/iox-ui 4.40.0 → 4.42.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/fesm2022/vectoriox-iox-ui.mjs +65 -1
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/index.d.ts +49 -1
- package/package.json +1 -1
|
@@ -5162,6 +5162,70 @@ function buildTargetedStateSelector(scopeCssId, triggerCssId, styledCssId, base)
|
|
|
5162
5162
|
return `iox-node-${scopeCssId}:has(.iox-node-${triggerCssId}:${base}) .iox-node-${styledCssId}`;
|
|
5163
5163
|
}
|
|
5164
5164
|
|
|
5165
|
+
/**
|
|
5166
|
+
* parts — the failure design (forms-and-inputs-plan.md Part 2, board 7). A compound component
|
|
5167
|
+
* like Field is not one styleable surface: its label, control, help text, error message and
|
|
5168
|
+
* required mark are each their own descendant, addressed by a stable class the component itself
|
|
5169
|
+
* renders (`IoxFieldComponent`'s `iox-field__label`/`__control`/`__help`/`__error`/`__required`).
|
|
5170
|
+
*
|
|
5171
|
+
* Lives in @vectoriox/iox-ui because BOTH renderers depend on iox-ui (the engine does not depend
|
|
5172
|
+
* on iox-builder) — same reason `buildTargetedStateSelector` lives here. No new compiler: this
|
|
5173
|
+
* builds a selector STRING, then the existing `compile()`/`compileDeclarations()` path renders it
|
|
5174
|
+
* exactly like any other rule.
|
|
5175
|
+
*/
|
|
5176
|
+
/**
|
|
5177
|
+
* The selector BODY (no leading `.`, matching the builder's `compile()` convention) for a node,
|
|
5178
|
+
* optionally scoped to one of its parts, optionally further scoped to a validation state.
|
|
5179
|
+
*
|
|
5180
|
+
* buildPartSelector('abc') -> 'iox-node-abc'
|
|
5181
|
+
* buildPartSelector('abc', 'iox-field__error') -> 'iox-node-abc .iox-field__error'
|
|
5182
|
+
* buildPartSelector('abc', undefined, 'iox-invalid') -> 'iox-node-abc.iox-invalid'
|
|
5183
|
+
* buildPartSelector('abc', 'iox-field__error', 'iox-invalid')
|
|
5184
|
+
* -> 'iox-node-abc.iox-invalid .iox-field__error'
|
|
5185
|
+
*
|
|
5186
|
+
* The validation class always attaches to the NODE itself (that's where `IoxFieldComponent` sets
|
|
5187
|
+
* `.iox-invalid`/`.iox-valid`), never to the part — a part has no host class of its own to hang a
|
|
5188
|
+
* compound selector off.
|
|
5189
|
+
*/
|
|
5190
|
+
function buildPartSelector(nodeId, partClass, validationClass) {
|
|
5191
|
+
const base = validationClass ? `iox-node-${nodeId}.${validationClass}` : `iox-node-${nodeId}`;
|
|
5192
|
+
return partClass ? `${base} .${partClass}` : base;
|
|
5193
|
+
}
|
|
5194
|
+
/**
|
|
5195
|
+
* Design-time validation "states" (wrong/accepted) — not real CSS pseudo-classes. `IoxFieldComponent`
|
|
5196
|
+
* already carries `.iox-invalid`/`.iox-valid` host classes it sets from `forceInvalid`/`showValid`
|
|
5197
|
+
* (decision D5), so authoring "Wrong"/"Accepted" styles compiles to a CLASS-compound selector via
|
|
5198
|
+
* `buildPartSelector`, never a `:pseudo-class` (`:wrong` isn't real CSS). Lives here (not
|
|
5199
|
+
* `@vectoriox/iox-builder`'s `ElementState`/`VALIDATION_STATE_CLASS`, which re-export these same
|
|
5200
|
+
* values) because the SSR engine needs the mapping too and does not depend on iox-builder.
|
|
5201
|
+
*/
|
|
5202
|
+
const VALIDATION_STATES = ['wrong', 'accepted'];
|
|
5203
|
+
const VALIDATION_STATE_CLASS = {
|
|
5204
|
+
wrong: 'iox-invalid',
|
|
5205
|
+
accepted: 'iox-valid',
|
|
5206
|
+
};
|
|
5207
|
+
/**
|
|
5208
|
+
* type -> part key -> the stable class that part's own template already renders. The single
|
|
5209
|
+
* source of truth for which classes a part maps to, so the builder (render.directive.ts) and the
|
|
5210
|
+
* SSR engine (layout-renderer.service.ts) resolve a part's selector identically without either
|
|
5211
|
+
* duplicating the string literals. `iox-builder`'s `FieldComponentConfig.parts` (the picker's
|
|
5212
|
+
* display labels) is built FROM this map, not the other way round.
|
|
5213
|
+
*/
|
|
5214
|
+
const PART_CLASS_NAMES = {
|
|
5215
|
+
Field: {
|
|
5216
|
+
label: 'iox-field__label',
|
|
5217
|
+
control: 'iox-field__control',
|
|
5218
|
+
help: 'iox-field__help',
|
|
5219
|
+
error: 'iox-field__error',
|
|
5220
|
+
required: 'iox-field__required',
|
|
5221
|
+
},
|
|
5222
|
+
};
|
|
5223
|
+
/** The class a declared part compiles against, e.g. ('Field', 'error') -> 'iox-field__error'.
|
|
5224
|
+
* Undefined when the type declares no such part (or no parts at all). */
|
|
5225
|
+
function partClassName(type, partKey) {
|
|
5226
|
+
return PART_CLASS_NAMES[type]?.[partKey];
|
|
5227
|
+
}
|
|
5228
|
+
|
|
5165
5229
|
/**
|
|
5166
5230
|
* page-style — the ONE compiler that turns a page's style settings into CSS.
|
|
5167
5231
|
*
|
|
@@ -6999,5 +7063,5 @@ function effectiveTransitionId(anim) {
|
|
|
6999
7063
|
* Generated bundle index. Do not edit.
|
|
7000
7064
|
*/
|
|
7001
7065
|
|
|
7002
|
-
export { AOSService, AnalyticsService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, 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, ENVIRONMENT, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, defaultMessageResolver, deriveSeoFromContent, describeSeoFields, effectiveTransitionId, excludeSelf, feelFor, getByPath, getSeoValue, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, 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, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
7066
|
+
export { AOSService, AnalyticsService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, 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, ENVIRONMENT, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, RESERVED_ALIAS_PREFIX, 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, WebSettingsService, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, defaultMessageResolver, deriveSeoFromContent, describeSeoFields, effectiveTransitionId, excludeSelf, feelFor, getByPath, getSeoValue, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, 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, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
7003
7067
|
//# sourceMappingURL=vectoriox-iox-ui.mjs.map
|