@vectoriox/iox-ui 5.6.0 → 5.8.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.
@@ -11,6 +11,10 @@ declare enum ControlType {
11
11
  Textarea = "textarea",
12
12
  Select = "select",
13
13
  Checkbox = "checkbox",
14
+ /** A checkbox in switch clothing (role="switch") — consent toggles, settings-style forms. */
15
+ Switch = "switch",
16
+ /** A slider over a numeric range — min/max/step ride the field. */
17
+ Range = "range",
14
18
  Radio = "radio",
15
19
  Date = "date",
16
20
  Time = "time",
package/index.d.ts CHANGED
@@ -809,6 +809,10 @@ declare enum ControlType {
809
809
  Textarea = "textarea",
810
810
  Select = "select",
811
811
  Checkbox = "checkbox",
812
+ /** A checkbox in switch clothing (role="switch") — consent toggles, settings-style forms. */
813
+ Switch = "switch",
814
+ /** A slider over a numeric range — min/max/step ride the field. */
815
+ Range = "range",
812
816
  Radio = "radio",
813
817
  Date = "date",
814
818
  Time = "time",
@@ -1148,6 +1152,9 @@ declare class IoxFieldComponent implements OnInit, OnDestroy {
1148
1152
  labelHidden: boolean;
1149
1153
  requiredMark: string;
1150
1154
  rows: number;
1155
+ rangeMin: number | string;
1156
+ rangeMax: number | string;
1157
+ rangeStep: number | string;
1151
1158
  accept: string;
1152
1159
  options: FieldOption[];
1153
1160
  value: any;
@@ -1192,7 +1199,7 @@ declare class IoxFieldComponent implements OnInit, OnDestroy {
1192
1199
  emit(value: any): void;
1193
1200
  touch(): void;
1194
1201
  static ɵfac: i0.ɵɵFactoryDeclaration<IoxFieldComponent, [{ optional: true; }, null]>;
1195
- static ɵcmp: i0.ɵɵComponentDeclaration<IoxFieldComponent, "div[iox-field]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "help": { "alias": "help"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "requiredMark": { "alias": "requiredMark"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "options": { "alias": "options"; "required": false; }; "value": { "alias": "value"; "required": false; }; "rules": { "alias": "rules"; "required": false; }; "forceInvalid": { "alias": "forceInvalid"; "required": false; }; "designErrorText": { "alias": "designErrorText"; "required": false; }; "showValid": { "alias": "showValid"; "required": false; }; }, { "valueChange": "valueChange"; "touched": "touched"; }, never, never, false, never>;
1202
+ static ɵcmp: i0.ɵɵComponentDeclaration<IoxFieldComponent, "div[iox-field]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "help": { "alias": "help"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "requiredMark": { "alias": "requiredMark"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "rangeMin": { "alias": "rangeMin"; "required": false; }; "rangeMax": { "alias": "rangeMax"; "required": false; }; "rangeStep": { "alias": "rangeStep"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "options": { "alias": "options"; "required": false; }; "value": { "alias": "value"; "required": false; }; "rules": { "alias": "rules"; "required": false; }; "forceInvalid": { "alias": "forceInvalid"; "required": false; }; "designErrorText": { "alias": "designErrorText"; "required": false; }; "showValid": { "alias": "showValid"; "required": false; }; }, { "valueChange": "valueChange"; "touched": "touched"; }, never, never, false, never>;
1196
1203
  }
1197
1204
 
1198
1205
  /**
@@ -1490,6 +1497,115 @@ declare const PART_CLASS_NAMES: Record<string, Record<string, string>>;
1490
1497
  * Undefined when the type declares no such part (or no parts at all). */
1491
1498
  declare function partClassName(type: string, partKey: string): string | undefined;
1492
1499
 
1500
+ /**
1501
+ * Flavors (flavors-and-theming-plan.md, F1): the design language a studio launches with,
1502
+ * expressed as data. THE invariant — a flavor never writes a literal into a node; it writes
1503
+ * tokens, and element defaults that REFERENCE tokens. To that end a pack's `defaults` map
1504
+ * holds TOKEN NAMES, not CSS values: the resolver builds `var(--iox-<name>, <packValue>)`,
1505
+ * so smuggling a literal in is impossible by construction, and the validator only has to
1506
+ * check that every referenced token exists.
1507
+ *
1508
+ * The fallback is the bootstrap: until F2 seeds the org's `designtokens` rows, no `--iox-*`
1509
+ * var is defined anywhere, and `var(--iox-radius-control, 4px)` must still paint identically
1510
+ * in the builder canvas and the SSR page. Once tokens ARE seeded (or re-themed), the var wins
1511
+ * over the fallback everywhere — which is exactly the §3 propagation story.
1512
+ */
1513
+ interface FlavorTokenDef {
1514
+ name: string;
1515
+ value: string;
1516
+ /** Dark-scheme override, seeded into DesignToken.values.dark at F2. */
1517
+ values?: {
1518
+ dark?: string;
1519
+ };
1520
+ type?: 'color' | 'spacing' | 'size' | 'font' | 'other';
1521
+ /** Tokens-panel grouping (flavors plan §10 C5). */
1522
+ group?: 'colour' | 'type' | 'space' | 'radius' | 'shadow' | 'motion';
1523
+ }
1524
+ interface FlavorPack {
1525
+ id: string;
1526
+ /** Bumped when the pack's values change; seeding stamps `flavor:<id>@<version>` as DesignToken.source. */
1527
+ version: number;
1528
+ label: string;
1529
+ blurb: string;
1530
+ tokens: FlavorTokenDef[];
1531
+ /** type → styleTrait → TOKEN NAME (never a CSS value — see the module header). */
1532
+ defaults: Record<string, Record<string, string>>;
1533
+ /** F2: the accent's hue rotation (degrees in OKLab) from the brand seed — a pack opinion. */
1534
+ accentHueDeg?: number;
1535
+ }
1536
+ /** trait → `var(--iox-<token>, <packValue>)` for one node type. Unknown type → {}. */
1537
+ declare function resolveFlavorDefaults(type: string, pack: FlavorPack | null | undefined): Record<string, string>;
1538
+ /**
1539
+ * The ENGINE's half of the cascade: kebab `prop: var(…)` declarations for every pack default
1540
+ * the node's persisted styleProps does NOT set. Appended beside renderDefaultDeclarations —
1541
+ * same guard-on-undefined discipline, so a node saved post-F1 (var already serialised via the
1542
+ * builder's trait defaults) is untouched, and a legacy node picks the pack default up at
1543
+ * render time. Node styleProps always wins.
1544
+ */
1545
+ declare function flavorDefaultDeclarations(type: string, styleProps: Record<string, any> | null | undefined, pack: FlavorPack | null | undefined): string[];
1546
+ /**
1547
+ * The CI gate (flavors plan §10 C4): a pack may only name types and traits that exist in the
1548
+ * live component registry, and tokens it defines itself. Returns human-readable errors; a
1549
+ * consumer spec feeds it the REAL registry and asserts [].
1550
+ */
1551
+ declare function validateFlavorPack(pack: FlavorPack, knownTraitsByType: Record<string, ReadonlySet<string> | string[]>): string[];
1552
+ /**
1553
+ * Swiss — the default pack (flavors plan §8: "the flavor that can never embarrass anyone").
1554
+ * Deliberately SMALL at F1: radius + control padding on the clickables, surface radius on Card.
1555
+ * Colour, type and motion arrive with the brand step (F2) — a colour default here would repaint
1556
+ * legacy pages before anyone chose anything.
1557
+ */
1558
+ declare const SWISS_FLAVOR: FlavorPack;
1559
+ /** What both renderers use until F2 lets an org choose. */
1560
+ declare const DEFAULT_FLAVOR: FlavorPack;
1561
+
1562
+ /**
1563
+ * BRAND DERIVATION (flavors plan §6, F2): one colour in, an asserted accessible ramp out.
1564
+ *
1565
+ * Competitors ask for a palette of five and hope; we ask for ONE seed and compute the rest so
1566
+ * that contrast is a TEST, not a promise. WCAG 2 ratios are the gate (every guarantee below is
1567
+ * unit-asserted across seeds); APCA is exposed as the picker's quality read-out only.
1568
+ *
1569
+ * Colour math is OKLab (perceptually even lightness — the ramp steps LOOK even), hand-rolled
1570
+ * from the published matrices because this module must stay dependency-free: it runs in the
1571
+ * builder, the engine and (later) the generator's Node service.
1572
+ */
1573
+ interface Rgb {
1574
+ r: number;
1575
+ g: number;
1576
+ b: number;
1577
+ }
1578
+ interface OkLab {
1579
+ L: number;
1580
+ a: number;
1581
+ b: number;
1582
+ }
1583
+ declare function parseHexColor(hex: string): Rgb | null;
1584
+ declare function toHexColor(c: Rgb): string;
1585
+ declare function rgbToOklab(c: Rgb): OkLab;
1586
+ declare function oklabToRgb(c: OkLab): Rgb;
1587
+ declare function relativeLuminance(c: Rgb): number;
1588
+ /** WCAG 2 contrast ratio between two colours (order-independent), 1..21. */
1589
+ declare function wcagContrastRatio(a: string | Rgb, b: string | Rgb): number;
1590
+ /**
1591
+ * APCA-W3 lightness contrast Lc (0.0.98G-4g constants), text-on-background and signed:
1592
+ * positive for dark-on-light, negative for light-on-dark; |Lc| ≈ 106–108 at the extremes.
1593
+ * Shown in the picker as the perceptual read-out; never used as the pass/fail gate here.
1594
+ */
1595
+ declare function apcaLc(text: string | Rgb, bg: string | Rgb): number;
1596
+ /**
1597
+ * The derived brand tokens (plan §6's table, every row asserted in brand.spec.ts):
1598
+ * `brand-50…900` (monotonic OKLab lightness, gamut-safe) · `brandInk` (black or white, ≥4.5 on
1599
+ * brand-500 — brand-500's lightness is nudged when neither side clears it) · `surface`/`ink`/
1600
+ * `inkMuted` (seed-tinted neutrals, ≥7:1 / ≥4.5:1 on surface) · `line` (the LIGHTEST neutral that
1601
+ * still clears 3:1 on surface) · `accent` (pack-rotated hue, ≥4.5:1 on surface) — with dark-scheme
1602
+ * values for the neutral family riding `values.dark`.
1603
+ *
1604
+ * Throws on an unparseable seed: callers (the picker) validate; a silent fallback here would
1605
+ * launch a studio into a palette nobody chose.
1606
+ */
1607
+ declare function deriveBrandTokens(seed: string, pack: FlavorPack): FlavorTokenDef[];
1608
+
1493
1609
  /** Trait names whose value Swiper reads per breakpoint. Anything else is config-wide. */
1494
1610
  declare const SWIPER_RESPONSIVE_TRAITS: readonly string[];
1495
1611
  /** `{ [minWidth]: { slidesPerView, … } }` — Swiper's own `breakpoints` shape. */
@@ -1553,66 +1669,6 @@ declare function compileTokenCss(tokens: ReadonlyArray<DesignTokenLike> | null |
1553
1669
  dark: string;
1554
1670
  };
1555
1671
 
1556
- /**
1557
- * Flavors (flavors-and-theming-plan.md, F1): the design language a studio launches with,
1558
- * expressed as data. THE invariant — a flavor never writes a literal into a node; it writes
1559
- * tokens, and element defaults that REFERENCE tokens. To that end a pack's `defaults` map
1560
- * holds TOKEN NAMES, not CSS values: the resolver builds `var(--iox-<name>, <packValue>)`,
1561
- * so smuggling a literal in is impossible by construction, and the validator only has to
1562
- * check that every referenced token exists.
1563
- *
1564
- * The fallback is the bootstrap: until F2 seeds the org's `designtokens` rows, no `--iox-*`
1565
- * var is defined anywhere, and `var(--iox-radius-control, 4px)` must still paint identically
1566
- * in the builder canvas and the SSR page. Once tokens ARE seeded (or re-themed), the var wins
1567
- * over the fallback everywhere — which is exactly the §3 propagation story.
1568
- */
1569
- interface FlavorTokenDef {
1570
- name: string;
1571
- value: string;
1572
- /** Dark-scheme override, seeded into DesignToken.values.dark at F2. */
1573
- values?: {
1574
- dark?: string;
1575
- };
1576
- type?: 'color' | 'spacing' | 'size' | 'font' | 'other';
1577
- /** Tokens-panel grouping (flavors plan §10 C5). */
1578
- group?: 'colour' | 'type' | 'space' | 'radius' | 'shadow' | 'motion';
1579
- }
1580
- interface FlavorPack {
1581
- id: string;
1582
- /** Bumped when the pack's values change; seeding stamps `flavor:<id>@<version>` as DesignToken.source. */
1583
- version: number;
1584
- label: string;
1585
- blurb: string;
1586
- tokens: FlavorTokenDef[];
1587
- /** type → styleTrait → TOKEN NAME (never a CSS value — see the module header). */
1588
- defaults: Record<string, Record<string, string>>;
1589
- }
1590
- /** trait → `var(--iox-<token>, <packValue>)` for one node type. Unknown type → {}. */
1591
- declare function resolveFlavorDefaults(type: string, pack: FlavorPack | null | undefined): Record<string, string>;
1592
- /**
1593
- * The ENGINE's half of the cascade: kebab `prop: var(…)` declarations for every pack default
1594
- * the node's persisted styleProps does NOT set. Appended beside renderDefaultDeclarations —
1595
- * same guard-on-undefined discipline, so a node saved post-F1 (var already serialised via the
1596
- * builder's trait defaults) is untouched, and a legacy node picks the pack default up at
1597
- * render time. Node styleProps always wins.
1598
- */
1599
- declare function flavorDefaultDeclarations(type: string, styleProps: Record<string, any> | null | undefined, pack: FlavorPack | null | undefined): string[];
1600
- /**
1601
- * The CI gate (flavors plan §10 C4): a pack may only name types and traits that exist in the
1602
- * live component registry, and tokens it defines itself. Returns human-readable errors; a
1603
- * consumer spec feeds it the REAL registry and asserts [].
1604
- */
1605
- declare function validateFlavorPack(pack: FlavorPack, knownTraitsByType: Record<string, ReadonlySet<string> | string[]>): string[];
1606
- /**
1607
- * Swiss — the default pack (flavors plan §8: "the flavor that can never embarrass anyone").
1608
- * Deliberately SMALL at F1: radius + control padding on the clickables, surface radius on Card.
1609
- * Colour, type and motion arrive with the brand step (F2) — a colour default here would repaint
1610
- * legacy pages before anyone chose anything.
1611
- */
1612
- declare const SWISS_FLAVOR: FlavorPack;
1613
- /** What both renderers use until F2 lets an org choose. */
1614
- declare const DEFAULT_FLAVOR: FlavorPack;
1615
-
1616
1672
  /**
1617
1673
  * page-style — the ONE compiler that turns a page's style settings into CSS.
1618
1674
  *
@@ -2782,5 +2838,5 @@ declare class GalleryLoop {
2782
2838
  private emit;
2783
2839
  }
2784
2840
 
2785
- export { AOSService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ContainerComponent, ContextStore, DEFAULT_FLAVOR, 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, 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, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SWISS_FLAVOR, 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, compileTokenCss, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, defaultMessageResolver, deriveSeoFromContent, describeSeoFields, effectiveTransitionId, excludeSelf, feelFor, flavorDefaultDeclarations, 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, resolveFlavorDefaults, 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, tokensToDarkVarMap, tokensToVarMap, validateFlavorPack, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
2786
- export type { BoundValueSpec, BreakpointDef, BuildRelatedFilterOptions, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSpec, DesignTokenLike, FlavorPack, FlavorTokenDef, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, IBuilderEventEmitter, InputMap, IoxContextSlot, IoxPipe, OverrideBreakpoint, PageStyleSettings, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, RelativeInputs, RelativeSourceKind, RelativeSourceSpec, ResolveSiblingsOptions, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteContext, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SiblingsResult, StateStyleMap, StyleMap, StyleTreeNode, SwiperBreakpointMap, ToggleableAction, TransitionFeel, TransitionPhase, TransitionTimelineInput, ValueSource, VirtualTraitGroup };
2841
+ export { AOSService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ContainerComponent, ContextStore, DEFAULT_FLAVOR, 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, 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, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SWISS_FLAVOR, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, activeActions, apcaLc, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, compileTokenCss, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, defaultMessageResolver, deriveBrandTokens, deriveSeoFromContent, describeSeoFields, effectiveTransitionId, excludeSelf, feelFor, flavorDefaultDeclarations, getByPath, getSeoValue, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, oklabToRgb, parentBreakpoint, parseHexColor, parseUrlList, partClassName, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, relativeLuminance, renderDefaultDeclarations, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveFlavorDefaults, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, rgbToOklab, safeSetInput, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, stateNamesIn, stripSuppressedProps, styleKeyToKebab, toHexColor, tokensToDarkVarMap, tokensToVarMap, validateFlavorPack, variableAliases, variableItemsFrom, wcagContrastRatio, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
2842
+ export type { BoundValueSpec, BreakpointDef, BuildRelatedFilterOptions, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSpec, DesignTokenLike, FlavorPack, FlavorTokenDef, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, IBuilderEventEmitter, InputMap, IoxContextSlot, IoxPipe, OkLab, OverrideBreakpoint, PageStyleSettings, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, RelativeInputs, RelativeSourceKind, RelativeSourceSpec, ResolveSiblingsOptions, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, Rgb, RouteContext, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SiblingsResult, StateStyleMap, StyleMap, StyleTreeNode, SwiperBreakpointMap, ToggleableAction, TransitionFeel, TransitionPhase, TransitionTimelineInput, ValueSource, VirtualTraitGroup };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.6.0",
3
+ "version": "5.8.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -16,6 +16,10 @@ export enum ControlType {
16
16
  Textarea = 'textarea',
17
17
  Select = 'select',
18
18
  Checkbox = 'checkbox',
19
+ /** A checkbox in switch clothing (role="switch") — consent toggles, settings-style forms. */
20
+ Switch = 'switch',
21
+ /** A slider over a numeric range — min/max/step ride the field. */
22
+ Range = 'range',
19
23
  Radio = 'radio',
20
24
  Date = 'date',
21
25
  Time = 'time',
@@ -40,7 +40,7 @@ const TEXTUAL: readonly ControlType[] = [
40
40
  ];
41
41
 
42
42
  /** Controls with a comparable magnitude. */
43
- const NUMERIC: readonly ControlType[] = [ControlType.Number, ControlType.Date, ControlType.Time];
43
+ const NUMERIC: readonly ControlType[] = [ControlType.Number, ControlType.Date, ControlType.Time, ControlType.Range];
44
44
 
45
45
  export const RULE_DESCRIPTORS: readonly RuleDescriptor[] = Object.freeze([
46
46
  {
@@ -73,7 +73,7 @@ export const RULE_DESCRIPTORS: readonly RuleDescriptor[] = Object.freeze([
73
73
  // A checkbox's `required` already becomes `accepted`, so offering it again would be a
74
74
  // duplicate — it is here for a checkbox the author wants ticked WITHOUT marking it required.
75
75
  name: RuleName.Accepted, labelKey: 'forms.rules.accepted',
76
- param: RuleParamKind.None, controls: [ControlType.Checkbox],
76
+ param: RuleParamKind.None, controls: [ControlType.Checkbox, ControlType.Switch],
77
77
  },
78
78
  ]);
79
79
 
@@ -54,3 +54,43 @@
54
54
  position: absolute; width: 1px; height: 1px; margin: -1px;
55
55
  padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
56
56
  }
57
+
58
+ /* ── switch (control='switch') — a checkbox in switch clothing; brand-aware via tokens ── */
59
+ .iox-field__control--switch {
60
+ appearance: none;
61
+ -webkit-appearance: none;
62
+ width: 38px;
63
+ height: 22px;
64
+ border-radius: 999px;
65
+ background: var(--iox-line, #d8d4d1);
66
+ position: relative;
67
+ cursor: pointer;
68
+ transition: background 150ms ease-out;
69
+ flex-shrink: 0;
70
+ }
71
+ .iox-field__control--switch::before {
72
+ content: '';
73
+ position: absolute;
74
+ top: 3px;
75
+ inset-inline-start: 3px;
76
+ width: 16px;
77
+ height: 16px;
78
+ border-radius: 999px;
79
+ background: #ffffff;
80
+ transition: transform 150ms ease-out;
81
+ }
82
+ .iox-field__control--switch:checked {
83
+ background: var(--iox-brand-500, #1f1d1b);
84
+ }
85
+ .iox-field__control--switch:checked::before {
86
+ transform: translateX(16px);
87
+ }
88
+ [dir='rtl'] .iox-field__control--switch:checked::before {
89
+ transform: translateX(-16px);
90
+ }
91
+
92
+ /* ── range (control='range') ── */
93
+ .iox-field__control--range {
94
+ width: 100%;
95
+ accent-color: var(--iox-brand-500, #1f1d1b);
96
+ }