@vectoriox/iox-ui 5.85.0 → 5.86.1
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/actions-core/index.d.ts +30 -2
- package/design-core/index.d.ts +1488 -224
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +136 -70
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +1751 -279
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs +27 -4
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +223 -12
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs +3 -4
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +1272 -69
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/forms-core/index.d.ts +23 -4
- package/generation-core/index.d.ts +5 -1
- package/index.d.ts +426 -22
- package/package.json +1 -1
- package/src/actions-core/action.model.ts +1 -1
- package/src/actions-core/dialog-opener.ts +9 -3
- package/src/actions-core/element-actions.ts +25 -1
- package/src/actions-core/popover-opener.ts +50 -0
- package/src/actions-core/public-api.ts +1 -0
- package/src/design-core/flavor-spec.generated.ts +1750 -277
- package/src/forms-core/submit-lifecycle.ts +30 -3
- package/src/generation-core/baseline-roles.ts +1 -0
- package/src/generation-core/node-baselines.generated.ts +214 -8
- package/src/generation-core/pictures.ts +8 -4
- package/src/scene-core/scroll-driver.ts +2 -1
- package/styles/iox-design.css +216 -14
- package/styles/iox-forms.css +24 -2
package/index.d.ts
CHANGED
|
@@ -776,6 +776,10 @@ declare class ClientSliderContainerComponent implements AfterViewInit, OnDestroy
|
|
|
776
776
|
};
|
|
777
777
|
private swiper;
|
|
778
778
|
private slidesSeen;
|
|
779
|
+
/** The slides the renderer placed (it asks `childHostFor` for each, before the first change detection), so a played
|
|
780
|
+
* slider's runway reserves its steps in the SERVER render — the page never shifts when the slider boots. */
|
|
781
|
+
private slideTotal;
|
|
782
|
+
get runwaySteps(): number;
|
|
779
783
|
private readonly instanceRegistry;
|
|
780
784
|
constructor(platformId: object);
|
|
781
785
|
/** Swiper draws its own arrows / dots only for a saved slider whose controls are not parts yet. */
|
|
@@ -1176,6 +1180,16 @@ declare enum FormRenderState {
|
|
|
1176
1180
|
Success = "success",
|
|
1177
1181
|
Error = "error"
|
|
1178
1182
|
}
|
|
1183
|
+
/**
|
|
1184
|
+
* What a form shows once it has sent (premium M5, N3) — the Form's "After sending" choice:
|
|
1185
|
+
* - `message`: the success in place (M3): the fields leave, the Success block shows, Send reads "Sent" and stays so;
|
|
1186
|
+
* - `toast`: the fields STAY, cleared for the next answer, and a toast says the form's Sent words — a newsletter in a
|
|
1187
|
+
* footer, a form someone may send again.
|
|
1188
|
+
*/
|
|
1189
|
+
declare enum FormAfterSend {
|
|
1190
|
+
Message = "message",
|
|
1191
|
+
Toast = "toast"
|
|
1192
|
+
}
|
|
1179
1193
|
/**
|
|
1180
1194
|
* The fields a CLIENT needs to validate a form: never its actions (where submissions go — an email
|
|
1181
1195
|
* address, a webhook) and never its anti-spam settings. A string-rendered form carries this on
|
|
@@ -1325,6 +1339,9 @@ declare class IoxFormComponent implements OnChanges, OnInit {
|
|
|
1325
1339
|
get renderState(): FormRenderState | string;
|
|
1326
1340
|
private _renderState;
|
|
1327
1341
|
feedback: FeedbackTiming | string;
|
|
1342
|
+
/** After sending (premium M5): the success in place (`message`), or keep the fields and say it in a toast. */
|
|
1343
|
+
afterSend: FormAfterSend | string;
|
|
1344
|
+
get keepsFields(): boolean;
|
|
1328
1345
|
/**
|
|
1329
1346
|
* Move focus to the first field that failed, instead of leaving the visitor to hunt for red
|
|
1330
1347
|
* text. On by default — the single most valuable thing a failed submit can do.
|
|
@@ -1388,7 +1405,7 @@ declare class IoxFormComponent implements OnChanges, OnInit {
|
|
|
1388
1405
|
/** Focus the first field that failed and shake it once (premium N2 — Emil 134; none under reduced motion). */
|
|
1389
1406
|
private focusFirstInvalid;
|
|
1390
1407
|
static ɵfac: i0.ɵɵFactoryDeclaration<IoxFormComponent, [null, null, { optional: true; }, { optional: true; }]>;
|
|
1391
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IoxFormComponent, "form[iox-form]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "name": { "alias": "name"; "required": false; }; "renderState": { "alias": "renderState"; "required": false; }; "feedback": { "alias": "feedback"; "required": false; }; "focusFirstProblem": { "alias": "focusFirstProblem"; "required": false; }; "announceFailure": { "alias": "announceFailure"; "required": false; }; }, { "formSubmit": "formSubmit"; "validationFailed": "validationFailed"; }, never, never, false, never>;
|
|
1408
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IoxFormComponent, "form[iox-form]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "name": { "alias": "name"; "required": false; }; "renderState": { "alias": "renderState"; "required": false; }; "feedback": { "alias": "feedback"; "required": false; }; "afterSend": { "alias": "afterSend"; "required": false; }; "focusFirstProblem": { "alias": "focusFirstProblem"; "required": false; }; "announceFailure": { "alias": "announceFailure"; "required": false; }; }, { "formSubmit": "formSubmit"; "validationFailed": "validationFailed"; }, never, never, false, never>;
|
|
1392
1409
|
}
|
|
1393
1410
|
|
|
1394
1411
|
/**
|
|
@@ -1621,9 +1638,28 @@ declare class IoxDialogComponent {
|
|
|
1621
1638
|
static ɵcmp: i0.ɵɵComponentDeclaration<IoxDialogComponent, "dialog[iox-dialog]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "closeOnBackdrop": { "alias": "closeOnBackdrop"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "consentRole": { "alias": "consentRole"; "required": false; }; }, {}, never, never, false, never>;
|
|
1622
1639
|
}
|
|
1623
1640
|
|
|
1641
|
+
/**
|
|
1642
|
+
* The Popover's LIVE twin on the engine's component path (premium components M5, N4). Directive-host: the panel IS the
|
|
1643
|
+
* host, carrying exactly the markup the string renderer writes — `data-iox-popover`, `popover="manual"` (closed in the
|
|
1644
|
+
* raw SSR with no script: the browser hides a popover until it is shown), `role="dialog"`, `tabindex="-1"` (focus moves
|
|
1645
|
+
* to the panel on open) and the side the author picked — so ONE runtime (`openPopover` / `closePopover`) treats both
|
|
1646
|
+
* paths alike. Its id and accessible name are the shared `nodeA11yAttributes`, applied by the engine.
|
|
1647
|
+
*/
|
|
1648
|
+
declare class IoxPopoverComponent {
|
|
1649
|
+
nodeId: string;
|
|
1650
|
+
placement: string;
|
|
1651
|
+
childrenHost: ViewContainerRef;
|
|
1652
|
+
get side(): string;
|
|
1653
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IoxPopoverComponent, never>;
|
|
1654
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IoxPopoverComponent, "div[iox-popover]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; }, {}, never, never, false, never>;
|
|
1655
|
+
}
|
|
1656
|
+
/** The attributes the string renderer writes on a Popover panel (beside its class, id and name) — the component's host
|
|
1657
|
+
* bindings, as data, so the two paths cannot drift. */
|
|
1658
|
+
declare function popoverPanelAttributes(placement: unknown): Record<string, string>;
|
|
1659
|
+
|
|
1624
1660
|
declare class IoxBuilderComponentsModule {
|
|
1625
1661
|
static ɵfac: i0.ɵɵFactoryDeclaration<IoxBuilderComponentsModule, never>;
|
|
1626
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IoxBuilderComponentsModule, [typeof BuilderImageComponent, typeof BuilderSpacerComponent, typeof CardComponent, typeof BuilderDividerComponent, typeof BuilderIconComponent, typeof BuilderLinkComponent, typeof BuilderButtonComponent, typeof BuilderHeadingComponent, typeof TextBlockComponent, typeof SectionComponent, typeof ContainerComponent, typeof LinkedContainerComponent, typeof ClientRepeaterComponent, typeof ButtonBlockComponent, typeof ClientSliderContainerComponent, typeof ClientSliderSlideComponent, typeof ClientListComponent, typeof ClientListItemComponent, typeof ClientGalleryComponent, typeof IoxVideoComponent, typeof IoxFormComponent, typeof IoxFieldComponent, typeof IoxSubmitButtonComponent, typeof IoxFormSuccessComponent, typeof IoxFormErrorComponent, typeof IoxDialogComponent], [typeof i2.CommonModule], [typeof BuilderImageComponent, typeof BuilderSpacerComponent, typeof CardComponent, typeof BuilderDividerComponent, typeof BuilderIconComponent, typeof BuilderLinkComponent, typeof BuilderButtonComponent, typeof BuilderHeadingComponent, typeof TextBlockComponent, typeof SectionComponent, typeof ContainerComponent, typeof LinkedContainerComponent, typeof ClientRepeaterComponent, typeof ButtonBlockComponent, typeof ClientSliderContainerComponent, typeof ClientSliderSlideComponent, typeof ClientListComponent, typeof ClientListItemComponent, typeof ClientGalleryComponent, typeof IoxVideoComponent, typeof IoxFormComponent, typeof IoxFieldComponent, typeof IoxSubmitButtonComponent, typeof IoxFormSuccessComponent, typeof IoxFormErrorComponent, typeof IoxDialogComponent]>;
|
|
1662
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IoxBuilderComponentsModule, [typeof BuilderImageComponent, typeof BuilderSpacerComponent, typeof CardComponent, typeof BuilderDividerComponent, typeof BuilderIconComponent, typeof BuilderLinkComponent, typeof BuilderButtonComponent, typeof BuilderHeadingComponent, typeof TextBlockComponent, typeof SectionComponent, typeof ContainerComponent, typeof LinkedContainerComponent, typeof ClientRepeaterComponent, typeof ButtonBlockComponent, typeof ClientSliderContainerComponent, typeof ClientSliderSlideComponent, typeof ClientListComponent, typeof ClientListItemComponent, typeof ClientGalleryComponent, typeof IoxVideoComponent, typeof IoxFormComponent, typeof IoxFieldComponent, typeof IoxSubmitButtonComponent, typeof IoxFormSuccessComponent, typeof IoxFormErrorComponent, typeof IoxDialogComponent, typeof IoxPopoverComponent], [typeof i2.CommonModule], [typeof BuilderImageComponent, typeof BuilderSpacerComponent, typeof CardComponent, typeof BuilderDividerComponent, typeof BuilderIconComponent, typeof BuilderLinkComponent, typeof BuilderButtonComponent, typeof BuilderHeadingComponent, typeof TextBlockComponent, typeof SectionComponent, typeof ContainerComponent, typeof LinkedContainerComponent, typeof ClientRepeaterComponent, typeof ButtonBlockComponent, typeof ClientSliderContainerComponent, typeof ClientSliderSlideComponent, typeof ClientListComponent, typeof ClientListItemComponent, typeof ClientGalleryComponent, typeof IoxVideoComponent, typeof IoxFormComponent, typeof IoxFieldComponent, typeof IoxSubmitButtonComponent, typeof IoxFormSuccessComponent, typeof IoxFormErrorComponent, typeof IoxDialogComponent, typeof IoxPopoverComponent]>;
|
|
1627
1663
|
static ɵinj: i0.ɵɵInjectorDeclaration<IoxBuilderComponentsModule>;
|
|
1628
1664
|
}
|
|
1629
1665
|
|
|
@@ -1858,12 +1894,6 @@ declare function sliderInputsFromProps(props: Record<string, unknown>, responsiv
|
|
|
1858
1894
|
* `1vh` / `1vw` fallbacks restore native browser behaviour.
|
|
1859
1895
|
*/
|
|
1860
1896
|
declare function rewriteViewportUnits(value: string): string;
|
|
1861
|
-
/**
|
|
1862
|
-
* Style props a type's render-default fully REPLACES. Emitting them would produce a dead
|
|
1863
|
-
* declaration that is immediately overridden in the same rule (e.g. an Icon's serialised
|
|
1864
|
-
* `lineHeight: 1.5` followed by the forced `line-height: 1`), so callers strip them first via
|
|
1865
|
-
* {@link stripSuppressedProps} and let renderDefaultDeclarations supply the real value.
|
|
1866
|
-
*/
|
|
1867
1897
|
declare const SUPPRESSED_STYLE_PROPS_BY_TYPE: Readonly<Record<string, readonly string[]>>;
|
|
1868
1898
|
/** Remove the style props whose value a type's render-default always overrides. Returns the map
|
|
1869
1899
|
* unchanged (same reference) when the type suppresses nothing. */
|
|
@@ -2445,10 +2475,21 @@ declare enum A11yTrait {
|
|
|
2445
2475
|
/** "Accessibility ▸ Accessible name" — the name of an icon-only control (and of a Dialog). */
|
|
2446
2476
|
AccessibleName = "ariaLabel",
|
|
2447
2477
|
/** A Dialog's "Close when wider than": a breakpoint id, or empty = never. */
|
|
2448
|
-
CloseAbove = "closeAbove"
|
|
2478
|
+
CloseAbove = "closeAbove",
|
|
2479
|
+
/** "Tooltip ▸ Words" (premium M5): words for a control that has none of its own. */
|
|
2480
|
+
Tooltip = "tooltip",
|
|
2481
|
+
/** "Tooltip ▸ Side": above (default) · below · start · end. */
|
|
2482
|
+
TooltipPlacement = "tooltipPlacement"
|
|
2449
2483
|
}
|
|
2450
2484
|
/** The types that carry an Accessible name trait. */
|
|
2451
2485
|
declare const ACCESSIBLE_NAME_TYPES: ReadonlyArray<string>;
|
|
2486
|
+
/** The types that carry a Tooltip (premium M5): the controls — a button, a linked box, a link (a gallery's arrows are
|
|
2487
|
+
* ButtonBlocks). Not a Text or an Image: a tooltip on something that takes no focus is invisible to a keyboard. */
|
|
2488
|
+
declare const TOOLTIP_TYPES: ReadonlyArray<string>;
|
|
2489
|
+
/** The attribute a tooltip's words travel on (the raw SSR carries it; the tooltip runtime reads it). */
|
|
2490
|
+
declare const TOOLTIP_ATTRIBUTE = "data-iox-tooltip";
|
|
2491
|
+
/** The side it asks for, when not the default (above). */
|
|
2492
|
+
declare const TOOLTIP_PLACEMENT_ATTRIBUTE = "data-iox-tooltip-placement";
|
|
2452
2493
|
/** The types that link to a page and can therefore be the current page's link. */
|
|
2453
2494
|
declare const CURRENT_LINK_TYPES: ReadonlyArray<string>;
|
|
2454
2495
|
|
|
@@ -2506,6 +2547,8 @@ interface NodeA11yContext {
|
|
|
2506
2547
|
}
|
|
2507
2548
|
/** The attributes a node renders. */
|
|
2508
2549
|
declare function nodeA11yAttributes(node: A11yNodeSource | null | undefined, ctx?: NodeA11yContext): Record<string, string>;
|
|
2550
|
+
/** The node's tooltip words (premium M5), trimmed, or '' — only on the types that carry one. */
|
|
2551
|
+
declare function tooltipWords(node: A11yNodeSource | null | undefined): string;
|
|
2509
2552
|
/** The attributes as an HTML string fragment (` name="value"`…) for a string renderer. */
|
|
2510
2553
|
declare function serializeA11yAttributes(attrs: Readonly<Record<string, string>>, escape: (v: string) => string): string;
|
|
2511
2554
|
/**
|
|
@@ -3819,7 +3862,7 @@ declare const CALENDAR_CLOSING_ATTRIBUTE = "data-iox-closing";
|
|
|
3819
3862
|
declare const CALENDAR_INSTANT_ATTRIBUTE = "data-iox-instant";
|
|
3820
3863
|
/** On the panel the builder canvas draws for its design-time Open state (in the flow, inert). */
|
|
3821
3864
|
declare const CALENDAR_DESIGN_ATTRIBUTE = "data-iox-cal-design";
|
|
3822
|
-
/** A phone gets the sheet (the drawer curve, the scrim) — the
|
|
3865
|
+
/** A phone gets the sheet (the drawer curve, the scrim) — the floating family's ONE decision (a popover too). */
|
|
3823
3866
|
declare const CALENDAR_SHEET_QUERY = "(max-width: 767px)";
|
|
3824
3867
|
/** The language the field speaks: the host's, the nearest `[lang]`, the document's. */
|
|
3825
3868
|
declare function fieldLanguage(field: Element, lang?: string | null): string;
|
|
@@ -3893,15 +3936,16 @@ declare const SHAKE_EASING = "cubic-bezier(0.23, 1, 0.32, 1)";
|
|
|
3893
3936
|
declare function shakeElement(el: Element | null | undefined, reducedMotion?: boolean): Animation | null;
|
|
3894
3937
|
|
|
3895
3938
|
/**
|
|
3896
|
-
* placeFloating — where a panel anchored to a control goes (premium components N8
|
|
3939
|
+
* placeFloating — where a panel anchored to a control goes (premium components N8; M5's tooltip and popover).
|
|
3897
3940
|
*
|
|
3898
|
-
* ONE pure decision for every floating panel:
|
|
3899
|
-
*
|
|
3900
|
-
*
|
|
3901
|
-
*
|
|
3941
|
+
* ONE pure decision for every floating panel: on the side the caller prefers (under its anchor by default; a tooltip
|
|
3942
|
+
* above), flipped to the opposite side when the preferred one has no room and the other has more; lined up with the
|
|
3943
|
+
* anchor's reading start (the left edge in LTR, the right in RTL) or centred on it; held inside the viewport with a
|
|
3944
|
+
* margin; and the transform-origin AT the anchor, so the panel grows from the control that opened it (Emil 47) — even
|
|
3945
|
+
* when the clamp moved it sideways.
|
|
3902
3946
|
*
|
|
3903
|
-
* Lives in the main entry: nothing server-side places a panel
|
|
3904
|
-
*
|
|
3947
|
+
* Lives in the main entry: nothing server-side places a panel; the date picker, the tooltip and the popover are DOM
|
|
3948
|
+
* runtimes of the main entry. Pure — no DOM read here: the caller measures, this decides, the caller writes.
|
|
3905
3949
|
*/
|
|
3906
3950
|
interface FloatingRect {
|
|
3907
3951
|
top: number;
|
|
@@ -3917,31 +3961,391 @@ interface FloatingViewport {
|
|
|
3917
3961
|
width: number;
|
|
3918
3962
|
height: number;
|
|
3919
3963
|
}
|
|
3964
|
+
/** The side of the anchor the panel sits on. Start / End follow the reading direction (Start is the left in LTR). */
|
|
3920
3965
|
declare enum FloatingSide {
|
|
3921
3966
|
Below = "below",
|
|
3922
|
-
Above = "above"
|
|
3967
|
+
Above = "above",
|
|
3968
|
+
Start = "start",
|
|
3969
|
+
End = "end"
|
|
3970
|
+
}
|
|
3971
|
+
/** How the panel lines up with its anchor across the side: at the anchor's reading start (top, for a Start / End
|
|
3972
|
+
* panel), or centred on it (a tooltip). */
|
|
3973
|
+
declare enum FloatingAlign {
|
|
3974
|
+
Start = "start",
|
|
3975
|
+
Center = "center"
|
|
3923
3976
|
}
|
|
3924
3977
|
interface FloatingOptions {
|
|
3925
3978
|
/** Space between the anchor and the panel. */
|
|
3926
3979
|
gap?: number;
|
|
3927
3980
|
/** Space the panel always keeps from the viewport's edges. */
|
|
3928
3981
|
margin?: number;
|
|
3929
|
-
/** Right-to-left: the panel lines up with the anchor's right edge. */
|
|
3982
|
+
/** Right-to-left: Start is the right side, and a start-aligned panel lines up with the anchor's right edge. */
|
|
3930
3983
|
rtl?: boolean;
|
|
3984
|
+
/** The side the panel prefers (Below when absent). */
|
|
3985
|
+
side?: FloatingSide;
|
|
3986
|
+
/** Start (default) or Center. */
|
|
3987
|
+
align?: FloatingAlign;
|
|
3931
3988
|
}
|
|
3932
3989
|
interface FloatingPlacement {
|
|
3933
3990
|
top: number;
|
|
3934
3991
|
left: number;
|
|
3992
|
+
/** The side it ended on (the preferred one, or its opposite after a flip). */
|
|
3935
3993
|
side: FloatingSide;
|
|
3936
|
-
/** A CSS transform-origin in the panel's own box, pointing at the anchor
|
|
3994
|
+
/** A CSS transform-origin in the panel's own box, pointing at the anchor. */
|
|
3937
3995
|
origin: string;
|
|
3938
3996
|
}
|
|
3939
3997
|
/** Emil's popover spacing: close enough to read as the control's, clear of its focus ring. */
|
|
3940
3998
|
declare const FLOATING_GAP = 8;
|
|
3941
3999
|
/** The viewport margin — a panel never touches the screen's edge. */
|
|
3942
4000
|
declare const FLOATING_MARGIN = 12;
|
|
4001
|
+
/**
|
|
4002
|
+
* Where a floating panel stops being a panel and becomes a bottom sheet (the date picker's calendar, a popover): a
|
|
4003
|
+
* phone. ONE decision, the width the shared CSS keys its sheets on.
|
|
4004
|
+
*/
|
|
4005
|
+
declare const FLOATING_SHEET_QUERY = "(max-width: 767px)";
|
|
3943
4006
|
/** Where `panel` goes beside `anchor` inside `viewport`. */
|
|
3944
4007
|
declare function placeFloating(anchor: FloatingRect, panel: FloatingSize, viewport: FloatingViewport, options?: FloatingOptions): FloatingPlacement;
|
|
4008
|
+
/**
|
|
4009
|
+
* A screen rect in the coordinates of a LAYER — a box that fills the viewport on the live site (scale 1, at 0,0) and
|
|
4010
|
+
* the page frame on the builder canvas (offset, zoomed). The floating runtimes place inside a layer, so one placement
|
|
4011
|
+
* serves both; `layerRect` is the layer's screen rect and `scale` its zoom (its screen width over its layout width).
|
|
4012
|
+
*/
|
|
4013
|
+
declare function toLayerRect(rect: FloatingRect, layerRect: Pick<FloatingRect, 'top' | 'left'>, scale?: number): FloatingRect;
|
|
4014
|
+
|
|
4015
|
+
/**
|
|
4016
|
+
* THE FLOATING LAYER (premium components M5) — the one box tooltips and toasts are placed in.
|
|
4017
|
+
*
|
|
4018
|
+
* On the live site it is a `popover="manual"` element in the TOP LAYER, filling the viewport: above a fixed header, a
|
|
4019
|
+
* slider's `overflow: hidden`, a nav's `backdrop-filter` (which would otherwise contain anything fixed inside it).
|
|
4020
|
+
* Each SCOPE has its own layer — the document's body, or an open modal `<dialog>` (a tooltip on a lightbox's arrow, a
|
|
4021
|
+
* toast raised from a drawer's form): a layer inside the dialog is shown after it, so it sits above it in the top
|
|
4022
|
+
* layer, it is not inert behind it, and it inherits the dialog's tokens and scheme through the DOM.
|
|
4023
|
+
* On the builder canvas it is a plain `position: fixed` box inside the transformed page frame, which CONTAINS it — so
|
|
4024
|
+
* it fills the frame and zooms with it; nothing is drawn over the builder's own panels.
|
|
4025
|
+
*
|
|
4026
|
+
* Every placement is made in the layer's own px (`layerFrame` + `toLayerRect`), so the site and the canvas share it.
|
|
4027
|
+
*/
|
|
4028
|
+
declare const FLOATING_LAYER_CLASS = "iox-float-layer";
|
|
4029
|
+
interface FloatingLayerOptions {
|
|
4030
|
+
/** Where the layer lives when the trigger is in no open dialog: the body on the site; on the canvas the token scope
|
|
4031
|
+
* the element sits in (the page frame, or the globals' overlay) — a function of the element it was raised from. */
|
|
4032
|
+
container?: Element | null | ((from: Element | null) => Element | null);
|
|
4033
|
+
/** True on the live site (a top-layer popover); false on the canvas (contained by the zoomed frame). */
|
|
4034
|
+
topLayer?: boolean;
|
|
4035
|
+
}
|
|
4036
|
+
/** The layer's frame: where it is on screen, its zoom, and its own size — the viewport a placement keeps inside. */
|
|
4037
|
+
interface LayerFrame {
|
|
4038
|
+
rect: {
|
|
4039
|
+
top: number;
|
|
4040
|
+
left: number;
|
|
4041
|
+
};
|
|
4042
|
+
scale: number;
|
|
4043
|
+
viewport: FloatingViewport;
|
|
4044
|
+
}
|
|
4045
|
+
/** True when the browser has the Popover API (jsdom and old engines do not — they open by `hidden`). */
|
|
4046
|
+
declare function canPopover(el: Element): boolean;
|
|
4047
|
+
/** True while a `popover` element is shown in the top layer. */
|
|
4048
|
+
declare function isOpenPopover(el: Element): boolean;
|
|
4049
|
+
/** Show a `popover` element in the top layer; an element without the API is un-hidden instead. */
|
|
4050
|
+
declare function showInTopLayer(el: HTMLElement): void;
|
|
4051
|
+
/** Take a `popover` element out of the top layer (or hide it). */
|
|
4052
|
+
declare function hideFromTopLayer(el: HTMLElement): void;
|
|
4053
|
+
/** The scope a floating element raised from `from` belongs to: its closest open modal dialog, else the container. */
|
|
4054
|
+
declare function floatingScope(from: Element | null | undefined, options?: FloatingLayerOptions): Element | null;
|
|
4055
|
+
/** The layer of a scope — created on first use, raised into the top layer when the site asks for it. */
|
|
4056
|
+
declare function floatingLayer(scope: Element, options?: FloatingLayerOptions): HTMLElement;
|
|
4057
|
+
/** Show a top-layer layer (again): a layer closed by a scope change, or one a later modal dialog now covers. */
|
|
4058
|
+
declare function raiseFloatingLayer(layer: HTMLElement): void;
|
|
4059
|
+
/** The layer's frame. On the site: (0, 0), scale 1, the viewport. On the canvas: the frame's corner, its zoom, its px. */
|
|
4060
|
+
declare function layerFrame(layer: HTMLElement): LayerFrame;
|
|
4061
|
+
/** An element's screen rect in the layer's px. */
|
|
4062
|
+
declare function rectInLayer(el: Element, frame: LayerFrame): FloatingRect;
|
|
4063
|
+
|
|
4064
|
+
/**
|
|
4065
|
+
* THE TOOLTIP (premium components M5, N4) — words for a control that has none of its own (an icon button, a gallery
|
|
4066
|
+
* arrow). ONE DOM runtime for the live site (both engine paths) and the builder canvas; the trigger carries what the
|
|
4067
|
+
* shared `nodeA11yAttributes` rendered (`data-iox-tooltip`, `data-iox-tooltip-placement`), so the raw SSR already says it.
|
|
4068
|
+
*
|
|
4069
|
+
* - Shows on HOVER for a mouse or a pen (never a finger — a tap is not a hover) and on KEYBOARD focus
|
|
4070
|
+
* (`:focus-visible`), never on a tap. A press, Esc, a scroll or leaving hides it.
|
|
4071
|
+
* - The first waits (`TOOLTIP_FIRST_DELAY_MS`); while one is open, or within `TOOLTIP_WARM_MS` of one closing, the next
|
|
4072
|
+
* opens AT ONCE with no motion (Emil 125). Keyboard focus opens at once, with no motion (Emil 2).
|
|
4073
|
+
* - Grows from its trigger (the origin `placeFloating` gives, Emil 47/124); leaves faster than it came (Emil 30).
|
|
4074
|
+
* - Hoverable and dismissible (WCAG 1.4.13): the pointer may move onto it; Esc hides it until the pointer or focus
|
|
4075
|
+
* leaves the trigger.
|
|
4076
|
+
* - `aria-describedby` points at it while it is shown — unless the tooltip IS the control's name (an icon-only control:
|
|
4077
|
+
* `nodeA11yAttributes` already made the words its `aria-label`; describing it twice would read it twice).
|
|
4078
|
+
*/
|
|
4079
|
+
/** On the drawn tooltip while it appears or moves with no motion (a neighbour, keyboard focus). */
|
|
4080
|
+
declare const TOOLTIP_INSTANT_ATTRIBUTE = "data-iox-instant";
|
|
4081
|
+
/** On a trigger whose tooltip the builder canvas holds open (the design-time "Showing on canvas" state). */
|
|
4082
|
+
declare const TOOLTIP_PINNED_ATTRIBUTE = "data-iox-tooltip-pinned";
|
|
4083
|
+
/** The side the drawn tooltip ended on (after a flip) — the shared CSS reads it for nothing but the e2e reads it. */
|
|
4084
|
+
declare const TOOLTIP_SIDE_ATTRIBUTE = "data-iox-side";
|
|
4085
|
+
declare enum TooltipClass {
|
|
4086
|
+
Tip = "iox-tooltip",
|
|
4087
|
+
/** The element style's marker — set when the trigger wears the design system (a legacy page keeps the literals). */
|
|
4088
|
+
Marker = "iox-es-tooltip"
|
|
4089
|
+
}
|
|
4090
|
+
/** The FIRST tooltip waits this long under a resting pointer (Emil 125: the first waits, the next does not). */
|
|
4091
|
+
declare const TOOLTIP_FIRST_DELAY_MS = 500;
|
|
4092
|
+
/** A tooltip opened within this window of another closing opens at once — moving along a row of icons. */
|
|
4093
|
+
declare const TOOLTIP_WARM_MS = 300;
|
|
4094
|
+
/** Leaving the trigger hides after this grace, so the pointer can cross onto the tooltip (WCAG 1.4.13 hoverable). */
|
|
4095
|
+
declare const TOOLTIP_HIDE_GRACE_MS = 100;
|
|
4096
|
+
interface TooltipTimingState {
|
|
4097
|
+
/** A tooltip is shown right now. */
|
|
4098
|
+
open: boolean;
|
|
4099
|
+
/** When the last one closed (ms, the runtime's clock), or null. */
|
|
4100
|
+
lastClosedAt: number | null;
|
|
4101
|
+
}
|
|
4102
|
+
/** How long before a tooltip shows, and whether it shows with no motion. Pure — the runtime asks it on every hover. */
|
|
4103
|
+
declare function tooltipTiming(state: TooltipTimingState, now: number, firstDelayMs?: number, warmMs?: number): {
|
|
4104
|
+
delayMs: number;
|
|
4105
|
+
instant: boolean;
|
|
4106
|
+
};
|
|
4107
|
+
/** The side a trigger asks for (Above when it names none, or names something else). */
|
|
4108
|
+
declare function tooltipSide(value: string | null | undefined): FloatingSide;
|
|
4109
|
+
interface TooltipRuntimeOptions {
|
|
4110
|
+
/** Where the floating layer lives outside an open dialog: the body on the site, the canvas's token scope. */
|
|
4111
|
+
container?: Element | null | ((from: Element | null) => Element | null);
|
|
4112
|
+
/** True on the live site (the top layer); false on the canvas (contained by the zoomed frame). */
|
|
4113
|
+
topLayer?: boolean;
|
|
4114
|
+
/** The clock (a spec's fake). */
|
|
4115
|
+
now?: () => number;
|
|
4116
|
+
}
|
|
4117
|
+
/** The runtime over one root (the document on the site, the page's frame on the canvas). Built by `attachTooltips`. */
|
|
4118
|
+
declare class TooltipRuntime {
|
|
4119
|
+
private readonly root;
|
|
4120
|
+
private readonly options;
|
|
4121
|
+
private tip;
|
|
4122
|
+
private trigger;
|
|
4123
|
+
private pinned;
|
|
4124
|
+
private pinWatch;
|
|
4125
|
+
private suppressed;
|
|
4126
|
+
private showTimer;
|
|
4127
|
+
private hideTimer;
|
|
4128
|
+
private lastClosedAt;
|
|
4129
|
+
private exiting;
|
|
4130
|
+
private readonly listeners;
|
|
4131
|
+
constructor(root: Document | Element, options?: TooltipRuntimeOptions);
|
|
4132
|
+
/** The trigger whose tooltip is shown, or null. */
|
|
4133
|
+
get shownFor(): HTMLElement | null;
|
|
4134
|
+
/** The drawn tooltip (created on first show). */
|
|
4135
|
+
get element(): HTMLElement | null;
|
|
4136
|
+
/** Show the trigger's tooltip now. `instant` skips the entrance (a neighbour, keyboard focus, the canvas pin). */
|
|
4137
|
+
show(trigger: HTMLElement, instant?: boolean): void;
|
|
4138
|
+
/** Hide it — with its exit, or `immediate`ly (a press, Esc, a scroll, keyboard focus leaving). */
|
|
4139
|
+
hide(immediate?: boolean): void;
|
|
4140
|
+
/** The builder canvas's design-time state: hold the trigger's tooltip open (true) or let it go (false). */
|
|
4141
|
+
pin(trigger: HTMLElement, on: boolean): void;
|
|
4142
|
+
/** Place the shown tooltip again (the trigger moved — the canvas re-laid out). */
|
|
4143
|
+
reposition(): void;
|
|
4144
|
+
destroy(): void;
|
|
4145
|
+
private get doc();
|
|
4146
|
+
private now;
|
|
4147
|
+
private triggerOf;
|
|
4148
|
+
private onPointerOver;
|
|
4149
|
+
private onPointerOut;
|
|
4150
|
+
private onFocusIn;
|
|
4151
|
+
private onFocusOut;
|
|
4152
|
+
private escape;
|
|
4153
|
+
/** A scroll hides a hover / focus tooltip (it would float away from its trigger); a pinned one follows it. */
|
|
4154
|
+
private onScroll;
|
|
4155
|
+
/** A press, a scroll: gone at once (and a pending one never shows). */
|
|
4156
|
+
private dismiss;
|
|
4157
|
+
private cancelHide;
|
|
4158
|
+
private clearTimers;
|
|
4159
|
+
/** The drawn tooltip, in the layer of the trigger's scope (a lightbox's arrow → the lightbox's own layer). */
|
|
4160
|
+
private ensureTip;
|
|
4161
|
+
/** Where it goes: the side the trigger asks for (flipped when there is no room), centred on it, inside the layer. */
|
|
4162
|
+
private place;
|
|
4163
|
+
/** Point the trigger's description at the tooltip — unless the tooltip is already its name. */
|
|
4164
|
+
private describe;
|
|
4165
|
+
private listen;
|
|
4166
|
+
}
|
|
4167
|
+
/** The runtime already running over `root`, if any. */
|
|
4168
|
+
declare function tooltipsOf(root: Document | Element | null | undefined): TooltipRuntime | null;
|
|
4169
|
+
/** Run tooltips over `root` — once: a root already running is returned as is. */
|
|
4170
|
+
declare function attachTooltips(root: Document | Element | null | undefined, options?: TooltipRuntimeOptions): TooltipRuntime | null;
|
|
4171
|
+
|
|
4172
|
+
/**
|
|
4173
|
+
* THE POPOVER on the live site (premium components M5, N4) — an anchored, NON-modal panel of ordinary nodes, opened by
|
|
4174
|
+
* its opener's `openPopover` / `togglePopover` action and closed by `closePopover`, Esc or a press outside it. ONE DOM
|
|
4175
|
+
* runtime for both engine paths (the component path and the string path render the same element: `[data-iox-popover]`,
|
|
4176
|
+
* `popover="manual"`, `role="dialog"`, `tabindex="-1"`, the node's own id); the builder canvas has its own twin that
|
|
4177
|
+
* places itself with the same `placeFloating`.
|
|
4178
|
+
*
|
|
4179
|
+
* - In the TOP LAYER (`showPopover`): above a fixed header and a slider's clipping; it still inherits the section's tokens
|
|
4180
|
+
* and scheme through the DOM, where the node sits.
|
|
4181
|
+
* - Placed beside its opener on the side the author picked (flipped at the viewport's edge, shifted inside it), lined up
|
|
4182
|
+
* with the opener's reading start, growing from it (Emil 47/123); placed again while the page scrolls or resizes.
|
|
4183
|
+
* - On a phone (`FLOATING_SHEET_QUERY`, the date picker's decision) it is a bottom sheet over the look's scrim, and the
|
|
4184
|
+
* page holds still under it.
|
|
4185
|
+
* - Focus moves INTO it on open (the panel itself: no ring after a tap), and back to the opener when Esc closes it, or
|
|
4186
|
+
* when a press outside closes it and focus had nowhere else to go. Focus leaving it (Tab) closes it.
|
|
4187
|
+
* - A keyboard open (Enter / Space on the opener) and Esc have no motion (Emil 2); the exit is faster than the entrance
|
|
4188
|
+
* (the shared CSS, on the popover tokens).
|
|
4189
|
+
*/
|
|
4190
|
+
declare enum PopoverAttribute {
|
|
4191
|
+
Root = "data-iox-popover",
|
|
4192
|
+
Placement = "data-iox-popover-placement",
|
|
4193
|
+
/** On the panel while it is a phone's bottom sheet. */
|
|
4194
|
+
Sheet = "data-iox-sheet",
|
|
4195
|
+
/** The side it ended on (after a flip). */
|
|
4196
|
+
Side = "data-iox-side",
|
|
4197
|
+
/** Opened from the keyboard: it appears and goes with no motion. */
|
|
4198
|
+
Instant = "data-iox-instant",
|
|
4199
|
+
/** On the panel while it is open (the canvas twin reads the same name). */
|
|
4200
|
+
Open = "data-iox-open"
|
|
4201
|
+
}
|
|
4202
|
+
declare const POPOVER_SELECTOR = "[data-iox-popover]";
|
|
4203
|
+
interface PopoverOpenOptions {
|
|
4204
|
+
/** The element whose action opened it — what it is anchored to and where focus goes back. */
|
|
4205
|
+
opener?: HTMLElement | null;
|
|
4206
|
+
/** Opened from the keyboard: no motion in, none out. */
|
|
4207
|
+
instant?: boolean;
|
|
4208
|
+
/** The page holds still under a phone's sheet (Lenis would scroll it). */
|
|
4209
|
+
lockScroll?: () => void;
|
|
4210
|
+
unlockScroll?: () => void;
|
|
4211
|
+
}
|
|
4212
|
+
interface PopoverCloseOptions {
|
|
4213
|
+
/** No motion (Esc, a keyboard action). */
|
|
4214
|
+
instant?: boolean;
|
|
4215
|
+
/** Focus back on the opener: always (Esc), or only when focus was inside the panel or nowhere (`'if-lost'`). */
|
|
4216
|
+
returnFocus?: boolean | 'if-lost';
|
|
4217
|
+
}
|
|
4218
|
+
/** True while the popover is open (an exit that is playing counts as closed). */
|
|
4219
|
+
declare function isPopoverOpen(el: Element | null | undefined): boolean;
|
|
4220
|
+
/** The side a panel asks for (Below unless it names another). */
|
|
4221
|
+
declare function popoverSide(value: string | null | undefined): FloatingSide;
|
|
4222
|
+
/** Beside its opener, inside the viewport, growing from it — the ONE `placeFloating`. A sheet is the shared CSS's. */
|
|
4223
|
+
declare function placePopover(el: HTMLElement, opener: HTMLElement | null): void;
|
|
4224
|
+
/** Open the popover beside `options.opener`. Opening one that is leaving keeps it open. */
|
|
4225
|
+
declare function openPopover(el: HTMLElement | null | undefined, options?: PopoverOpenOptions): void;
|
|
4226
|
+
/** Close the popover with its exit (the shared CSS), then hand focus back as asked. */
|
|
4227
|
+
declare function closePopover(el: HTMLElement | null | undefined, options?: PopoverCloseOptions): Promise<void>;
|
|
4228
|
+
/** Toggle: close an open one, open a closed (or leaving) one. */
|
|
4229
|
+
declare function togglePopover(el: HTMLElement | null | undefined, options?: PopoverOpenOptions): void;
|
|
4230
|
+
/** Close every open popover under `root` at once (a page leaving, a route change). */
|
|
4231
|
+
declare function closeAllPopovers(root: ParentNode | null | undefined): void;
|
|
4232
|
+
|
|
4233
|
+
/**
|
|
4234
|
+
* THE TOAST (premium components M5, N3) — a non-modal notice at an edge of the screen. ONE DOM runtime for the live site
|
|
4235
|
+
* (the `showToast` action on both engine paths, and a form that keeps its fields after sending) and the builder canvas
|
|
4236
|
+
* (the same action RUNS there; the design-time "Showing on canvas" state holds one up to style it).
|
|
4237
|
+
*
|
|
4238
|
+
* - Speaks through a polite live region that exists BEFORE the first notice lands (a region inserted with its words is
|
|
4239
|
+
* not announced); never takes focus.
|
|
4240
|
+
* - Enters from its edge and leaves to the SAME edge (Emil 129–130), on the look's toast tokens (400ms `ease` in, a
|
|
4241
|
+
* faster exit); reduced motion keeps the fade and drops the slide (the shared CSS).
|
|
4242
|
+
* - Its timer pauses while the tab is hidden, the pointer is on the stack or focus is inside it (Emil 132; WCAG 2.2.1),
|
|
4243
|
+
* and it has a close control.
|
|
4244
|
+
* - At most `TOAST_MAX_VISIBLE` at once — the oldest leaves for a new one; the rest slide to their new places (FLIP on
|
|
4245
|
+
* `translate`, which composes with the entrance's `transform`), so nothing jumps.
|
|
4246
|
+
* - Above the home indicator (`env(safe-area-inset-*)`) and above a bottom tab bar (the shared CSS).
|
|
4247
|
+
*/
|
|
4248
|
+
declare enum ToastEdge {
|
|
4249
|
+
Bottom = "bottom",
|
|
4250
|
+
Top = "top"
|
|
4251
|
+
}
|
|
4252
|
+
declare enum ToastClass {
|
|
4253
|
+
Stack = "iox-toasts",
|
|
4254
|
+
Toast = "iox-toast",
|
|
4255
|
+
Text = "iox-toast__text",
|
|
4256
|
+
Close = "iox-toast__close",
|
|
4257
|
+
/** The element style's marker — set when the element it was raised from wears the design system. */
|
|
4258
|
+
Marker = "iox-es-toast"
|
|
4259
|
+
}
|
|
4260
|
+
declare const TOAST_EDGE_ATTRIBUTE = "data-iox-edge";
|
|
4261
|
+
/** On the toast the builder canvas holds up for styling (no timer, never leaves on its own). */
|
|
4262
|
+
declare const TOAST_DESIGN_ATTRIBUTE = "data-iox-toast-design";
|
|
4263
|
+
/** A stack created for a toast waits this long before the words land: a live region must exist before it changes. */
|
|
4264
|
+
declare const TOAST_FIRST_LANDS_MS = 80;
|
|
4265
|
+
/** The most toasts on screen at once (Emil 131: a short stack, never a wall). */
|
|
4266
|
+
declare const TOAST_MAX_VISIBLE = 3;
|
|
4267
|
+
/** A toast stays at least this long … */
|
|
4268
|
+
declare const TOAST_MIN_MS = 4000;
|
|
4269
|
+
/** … at most this long … */
|
|
4270
|
+
declare const TOAST_MAX_MS = 10000;
|
|
4271
|
+
/** … and this much longer per character it says (a reader's pace). */
|
|
4272
|
+
declare const TOAST_MS_PER_CHAR = 60;
|
|
4273
|
+
/** The close control's words in the page's language. */
|
|
4274
|
+
declare const TOAST_CLOSE_WORDS: Readonly<Record<string, string>>;
|
|
4275
|
+
/** "Close" in `lang` (its base language), else English. */
|
|
4276
|
+
declare function toastCloseWord(lang: string | null | undefined): string;
|
|
4277
|
+
/** How long a toast stays: long enough to read, within bounds. Pure. */
|
|
4278
|
+
declare function toastDuration(text: string, override?: number | null): number;
|
|
4279
|
+
/** Which toasts leave so a new one fits: the oldest first, keeping `max - 1` beside the newcomer. Pure. */
|
|
4280
|
+
declare function toastsToEvict<T>(shown: ReadonlyArray<T>, max?: number): T[];
|
|
4281
|
+
/** The edge a value names (Bottom unless it says Top). */
|
|
4282
|
+
declare function toastEdge(value: unknown): ToastEdge;
|
|
4283
|
+
declare enum PauseReason {
|
|
4284
|
+
Hidden = "hidden",
|
|
4285
|
+
Hover = "hover",
|
|
4286
|
+
Focus = "focus"
|
|
4287
|
+
}
|
|
4288
|
+
/**
|
|
4289
|
+
* A countdown that stops while any reason holds it (the tab hidden, the pointer on the stack, focus inside) and runs
|
|
4290
|
+
* on from what was left. Its clock and scheduler are injectable for a spec.
|
|
4291
|
+
*/
|
|
4292
|
+
declare class PausableTimer {
|
|
4293
|
+
private readonly onDone;
|
|
4294
|
+
private readonly now;
|
|
4295
|
+
private remaining;
|
|
4296
|
+
private startedAt;
|
|
4297
|
+
private handle;
|
|
4298
|
+
private readonly reasons;
|
|
4299
|
+
private done;
|
|
4300
|
+
constructor(ms: number, onDone: () => void, now?: () => number);
|
|
4301
|
+
get paused(): boolean;
|
|
4302
|
+
/** What is left (ms), counting the time run since the last start. */
|
|
4303
|
+
left(): number;
|
|
4304
|
+
pause(reason: PauseReason): void;
|
|
4305
|
+
resume(reason: PauseReason): void;
|
|
4306
|
+
clear(): void;
|
|
4307
|
+
private run;
|
|
4308
|
+
}
|
|
4309
|
+
interface ToastOptions extends FloatingLayerOptions {
|
|
4310
|
+
/** The edge it enters from and leaves to (Bottom by default). */
|
|
4311
|
+
edge?: ToastEdge | string | null;
|
|
4312
|
+
/** How long it stays (else `toastDuration(text)`). */
|
|
4313
|
+
durationMs?: number | null;
|
|
4314
|
+
/** The element that raised it — its scope (an open dialog) and whether the look applies. */
|
|
4315
|
+
from?: Element | null;
|
|
4316
|
+
/** The page's language for the close control's name. */
|
|
4317
|
+
lang?: string | null;
|
|
4318
|
+
}
|
|
4319
|
+
interface ToastHandle {
|
|
4320
|
+
readonly element: HTMLElement;
|
|
4321
|
+
/** Leave now (the close control, a newer toast, the canvas switching it off). */
|
|
4322
|
+
close(): void;
|
|
4323
|
+
}
|
|
4324
|
+
/** Take down every toast stack under `root` (a page torn down, a spec). */
|
|
4325
|
+
declare function clearToasts(root: ParentNode | null | undefined): void;
|
|
4326
|
+
/**
|
|
4327
|
+
* Raise a toast. Null when there is nothing to say or nowhere to say it (no document).
|
|
4328
|
+
* A first toast creates its live region and lands a frame later, so assistive technology hears it.
|
|
4329
|
+
*/
|
|
4330
|
+
declare function showToast(doc: Document | null | undefined, text: string | null | undefined, options?: ToastOptions): ToastHandle | null;
|
|
4331
|
+
/**
|
|
4332
|
+
* The builder canvas's design-time state: hold a toast up (no timer) so the author styles it, or take it down. One per
|
|
4333
|
+
* layer; showing it again only changes its words.
|
|
4334
|
+
*/
|
|
4335
|
+
declare function showToastDesign(doc: Document | null | undefined, text: string, show: boolean, options?: ToastOptions): void;
|
|
4336
|
+
|
|
4337
|
+
/**
|
|
4338
|
+
* A form that KEEPS its fields after sending says so in a toast (premium M5, N3 — the Form's After sending ▸ "Keep the
|
|
4339
|
+
* fields and show a toast"). Its words are the form's own Sent words — the ones its submit button shows once it has sent
|
|
4340
|
+
* (the author's "Once sent", else "Sent" in the page's language) — so the toast and the button never disagree. ONE
|
|
4341
|
+
* helper for the component path and the string path.
|
|
4342
|
+
*/
|
|
4343
|
+
/** The Sent words a form says: its submit button's Sent label, else "Sent" in its language. */
|
|
4344
|
+
declare function formSentWords(form: Element): string;
|
|
4345
|
+
/** True when the rendered form keeps its fields and toasts (the attribute every renderer writes). */
|
|
4346
|
+
declare function formToastsOnSend(form: Element | null | undefined): boolean;
|
|
4347
|
+
/** Raise the form's Sent toast (from the form — its scope and its look). */
|
|
4348
|
+
declare function raiseFormToast(form: Element): ToastHandle | null;
|
|
3945
4349
|
|
|
3946
|
-
export { A11yAttribute, A11yTrait, ACCESSIBLE_NAME_TYPES, AOSService, ARIA_CURRENT_PAGE, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CALENDAR_CLOSING_ATTRIBUTE, CALENDAR_DESIGN_ATTRIBUTE, CALENDAR_INSTANT_ATTRIBUTE, CALENDAR_SHEET_QUERY, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CURRENT_LINK_TYPES, CalendarClass, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ComponentState, ContainerComponent, ContextStore, DECORATIVE_TYPES, DEFAULT_GALLERY_SCHEDULER, DEFAULT_INTERACTION_EASING, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE, DatePickerRuntime, DeclarationContext, EASING_KEYWORDS, EASING_TOKENS, ELEMENT_STYLE_TRANSITION_EXTRAS, ENTRANCE_ACTION_TYPES, ENTRANCE_FALLBACK_CSS, ENTRANCE_NOSCRIPT_CSS, ENTRANCE_PRESTATE_ATTRIBUTE, EXIT_ACTION_TYPES, EasingKeyword, EasingToken, FLOATING_GAP, FLOATING_MARGIN, FloatingSide, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HEADER_SCROLL_HYSTERESIS_PX, HOVER_DEFAULT_TRANSITION_TRAITS, HOVER_MEDIA_QUERY, HOVER_STATES, HeaderRuntime, INTERACTION_ANIMATION_ID, INTERACTION_HIDDEN_ATTRIBUTE, 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, IoxVideoComponent, LAST_EMITTED_STATES, LEGACY_DIRECTION_KEY, LEGACY_HOVER_TRANSITION_TRAITS, LEGACY_SWIPER_CONTROLS, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, NAMED_GROUP_ROLES, NO_PAGE_TRANSITION, ON_STATE_ROLES, OUTER_STYLE_PROPS, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PART_PAGINATION_MODIFIER, PHONE_TRANSITION_QUERY, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PageStyleField, PageStyleSource, PointerKind, REDUCED_MOTION_QUERY, RELATIONAL_STATE_PSEUDO, RevealActionType, SCROLLED_ATTRIBUTE, SCROLLED_STATE_ROLE, SCROLLED_THRESHOLD_PX, SCROLL_EASINGS, SELF_PLAYING_TRIGGERS, SHAKE_DURATION_MS, SHAKE_EASING, SHAKE_KEYFRAMES, SLIDER_FEEL, SLIDER_INPUTS_ATTRIBUTE, SLIDER_INPUT_NAMES, SLIDER_PHONE_BREAKPOINT, SLIDER_RUNWAY_CLASS, SLIDER_STEPS_PROPERTY, SLIDE_CAPTION_ATTRIBUTE, STATE_PSEUDO_CLASS, STRUCTURAL_STATES, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SWIPER_TRIGGER_EVENTS, ScrollEasing, SectionComponent, SettleMode, StringFormRuntime, SwiperModuleName, TARGETED_STATE_SUFFIX, TEXT_ALIGN_KEY, TEXT_DIRECTION_KEY, TRANSITION_FEELS, TRANSITION_PROPERTY_KEY, TextAlign, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, animateAction, applyBindingPipes, applyFeel, attachDatePicker, attachDatePickers, attachStringForm, bootSlider, breakpointDef, breakpointForWidth, breakpointQueryFor, buildInteractionKeyframes, buildPartSelector, buildSwiperBreakpoints, buildTargetedStateSelector, buildTargetedSuffixSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, closeAboveMediaQuery, collectContextSlotKeys, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, datePickerOf, declaredInputNames, decomposeBackdropFilter, defaultHoverTransitionTraits, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, domHasSliderParts, durationMs, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, entranceStartsHidden, feelFor, fieldLanguage, finalKeyframe, framesFromLiveValue, gateHoverRule, getSeoValue, hasHoverState, hasOwnPageTransition, hasOwnTransition, headerShouldHide, hidingHeadersIn, initialSlotValues, isActionEnabled, isContextAction, isCubicBezier, isCurrentLink, isEasingToken, isExternalOrFragment, isGradientPaint, isHoverPointer, isHoverState, isInputOverriddenAt, isInteractionEasing, isLastEmittedStateKey, isOverriddenAt, isPressFeedback, isScrolled, isStructuralState, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, legacyEnterToTransition, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, nearestCommonAncestorId, needsAccessibleName, needsGroupName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeGalleryImage, normalizeIconClass, orderStatesForEmit, pageTransitionOf, parentBreakpoint, parseUrlList, partClassName, placeFloating, planPartRule, planResponsiveRules, planScroll, planStateRule, planSwiperOptions, playDualLayerTransition, playInteraction, prefersReducedMotion, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolveInteractionEasing, resolvePageTransition, resolvePath, resolveSeo, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, rewriteViewportUnits, safeSetInput, serializeA11yAttributes, setDateFieldValue, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, settleInteraction, settleModeFor, shakeElement, showCalendarDesign, sliderControlElements, sliderInputsFromProps, sliderInputsOf, sliderRunwayHtml, splitOuterProps, splitPressFeedback, stateNamesIn, statePseudoClass, stateSelectorSuffix, stateTransitionProperties, stringFormRuntimeOf, stripSuppressedProps, swiperAutoplayAllowed, swiperLoopOptions, swiperModuleNames, syncNodeA11yAttributes, syncSubmitButtons, targetedStateSelector, transitionPropertyList, viewportTransitionContext, watchHeaders, watchScrolled, withContextSlots, withPhoneDefaults, withStateTransitions, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
3947
|
-
export type { A11yNodeSource, AnimateActionOptions, BoundValueSpec, BreakpointDef, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, CurrentLinkOptions, DatePickerOptions, FloatingOptions, FloatingPlacement, FloatingRect, FloatingSize, FloatingViewport, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, HeaderRuntimeOptions, IBuilderEventEmitter, InputMap, InteractionKeyframe, IoxContextSlot, IoxPipe, MatchMediaHost, NodeA11yContext, OverrideBreakpoint, PageScrollStart, PageStyleFieldState, PageStyleOptions, PageStyleSettings, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionContext, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, PlannedPageTransition, PressAction, RegisteredField, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteAnimationLike, ScrollPlanContext, ScrollSource, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SettleOptions, SliderBootOptions, SliderControlElements, SliderInputs, StateRulePlan, StateScope, StateStyleMap, StringFormOptions, StyleMap, StyleTreeNode, SwiperBreakpointMap, SwiperModuleFlags, SwiperPlan, SwiperPlanContext, ToggleableAction, TransitionFeel, TransitionPhase, TransitionPreviewLayers, TransitionTimelineInput, TransitionViewport, ValueSource, VirtualTraitGroup };
|
|
4350
|
+
export { A11yAttribute, A11yTrait, ACCESSIBLE_NAME_TYPES, AOSService, ARIA_CURRENT_PAGE, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CALENDAR_CLOSING_ATTRIBUTE, CALENDAR_DESIGN_ATTRIBUTE, CALENDAR_INSTANT_ATTRIBUTE, CALENDAR_SHEET_QUERY, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CURRENT_LINK_TYPES, CalendarClass, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ComponentState, ContainerComponent, ContextStore, DECORATIVE_TYPES, DEFAULT_GALLERY_SCHEDULER, DEFAULT_INTERACTION_EASING, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE, DatePickerRuntime, DeclarationContext, EASING_KEYWORDS, EASING_TOKENS, ELEMENT_STYLE_TRANSITION_EXTRAS, ENTRANCE_ACTION_TYPES, ENTRANCE_FALLBACK_CSS, ENTRANCE_NOSCRIPT_CSS, ENTRANCE_PRESTATE_ATTRIBUTE, EXIT_ACTION_TYPES, EasingKeyword, EasingToken, FLOATING_GAP, FLOATING_LAYER_CLASS, FLOATING_MARGIN, FLOATING_SHEET_QUERY, FloatingAlign, FloatingSide, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HEADER_SCROLL_HYSTERESIS_PX, HOVER_DEFAULT_TRANSITION_TRAITS, HOVER_MEDIA_QUERY, HOVER_STATES, HeaderRuntime, INTERACTION_ANIMATION_ID, INTERACTION_HIDDEN_ATTRIBUTE, 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, IoxPopoverComponent, IoxSubmitButtonComponent, IoxUiModule, IoxVideoComponent, LAST_EMITTED_STATES, LEGACY_DIRECTION_KEY, LEGACY_HOVER_TRANSITION_TRAITS, LEGACY_SWIPER_CONTROLS, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, NAMED_GROUP_ROLES, NO_PAGE_TRANSITION, ON_STATE_ROLES, OUTER_STYLE_PROPS, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PART_PAGINATION_MODIFIER, PHONE_TRANSITION_QUERY, PIPE_DESCRIPTORS, PIPE_REGISTRY, POPOVER_SELECTOR, PageScrollProvider, PageStyleField, PageStyleSource, PausableTimer, PauseReason, PointerKind, PopoverAttribute, REDUCED_MOTION_QUERY, RELATIONAL_STATE_PSEUDO, RevealActionType, SCROLLED_ATTRIBUTE, SCROLLED_STATE_ROLE, SCROLLED_THRESHOLD_PX, SCROLL_EASINGS, SELF_PLAYING_TRIGGERS, SHAKE_DURATION_MS, SHAKE_EASING, SHAKE_KEYFRAMES, SLIDER_FEEL, SLIDER_INPUTS_ATTRIBUTE, SLIDER_INPUT_NAMES, SLIDER_PHONE_BREAKPOINT, SLIDER_RUNWAY_CLASS, SLIDER_STEPS_PROPERTY, SLIDE_CAPTION_ATTRIBUTE, STATE_PSEUDO_CLASS, STRUCTURAL_STATES, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SWIPER_TRIGGER_EVENTS, ScrollEasing, SectionComponent, SettleMode, StringFormRuntime, SwiperModuleName, TARGETED_STATE_SUFFIX, TEXT_ALIGN_KEY, TEXT_DIRECTION_KEY, TOAST_CLOSE_WORDS, TOAST_DESIGN_ATTRIBUTE, TOAST_EDGE_ATTRIBUTE, TOAST_FIRST_LANDS_MS, TOAST_MAX_MS, TOAST_MAX_VISIBLE, TOAST_MIN_MS, TOAST_MS_PER_CHAR, TOOLTIP_ATTRIBUTE, TOOLTIP_FIRST_DELAY_MS, TOOLTIP_HIDE_GRACE_MS, TOOLTIP_INSTANT_ATTRIBUTE, TOOLTIP_PINNED_ATTRIBUTE, TOOLTIP_PLACEMENT_ATTRIBUTE, TOOLTIP_SIDE_ATTRIBUTE, TOOLTIP_TYPES, TOOLTIP_WARM_MS, TRANSITION_FEELS, TRANSITION_PROPERTY_KEY, TextAlign, TextBlockComponent, ToastClass, ToastEdge, TooltipClass, TooltipRuntime, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, animateAction, applyBindingPipes, applyFeel, attachDatePicker, attachDatePickers, attachStringForm, attachTooltips, bootSlider, breakpointDef, breakpointForWidth, breakpointQueryFor, buildInteractionKeyframes, buildPartSelector, buildSwiperBreakpoints, buildTargetedStateSelector, buildTargetedSuffixSelector, buildTransitionTimeline, canPopover, cascadeChain, clearInputOverride, clearOverride, clearToasts, closeAboveMediaQuery, closeAllPopovers, closePopover, collectContextSlotKeys, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, datePickerOf, declaredInputNames, decomposeBackdropFilter, defaultHoverTransitionTraits, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, domHasSliderParts, durationMs, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, entranceStartsHidden, feelFor, fieldLanguage, finalKeyframe, floatingLayer, floatingScope, formSentWords, formToastsOnSend, framesFromLiveValue, gateHoverRule, getSeoValue, hasHoverState, hasOwnPageTransition, hasOwnTransition, headerShouldHide, hideFromTopLayer, hidingHeadersIn, initialSlotValues, isActionEnabled, isContextAction, isCubicBezier, isCurrentLink, isEasingToken, isExternalOrFragment, isGradientPaint, isHoverPointer, isHoverState, isInputOverriddenAt, isInteractionEasing, isLastEmittedStateKey, isOpenPopover, isOverriddenAt, isPopoverOpen, isPressFeedback, isScrolled, isStructuralState, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, layerFrame, legacyEnterToTransition, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, nearestCommonAncestorId, needsAccessibleName, needsGroupName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeGalleryImage, normalizeIconClass, openPopover, orderStatesForEmit, pageTransitionOf, parentBreakpoint, parseUrlList, partClassName, placeFloating, placePopover, planPartRule, planResponsiveRules, planScroll, planStateRule, planSwiperOptions, playDualLayerTransition, playInteraction, popoverPanelAttributes, popoverSide, prefersReducedMotion, raiseFloatingLayer, raiseFormToast, rectInLayer, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolveInteractionEasing, resolvePageTransition, resolvePath, resolveSeo, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, rewriteViewportUnits, safeSetInput, serializeA11yAttributes, setDateFieldValue, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, settleInteraction, settleModeFor, shakeElement, showCalendarDesign, showInTopLayer, showToast, showToastDesign, sliderControlElements, sliderInputsFromProps, sliderInputsOf, sliderRunwayHtml, splitOuterProps, splitPressFeedback, stateNamesIn, statePseudoClass, stateSelectorSuffix, stateTransitionProperties, stringFormRuntimeOf, stripSuppressedProps, swiperAutoplayAllowed, swiperLoopOptions, swiperModuleNames, syncNodeA11yAttributes, syncSubmitButtons, targetedStateSelector, toLayerRect, toastCloseWord, toastDuration, toastEdge, toastsToEvict, togglePopover, tooltipSide, tooltipTiming, tooltipWords, tooltipsOf, transitionPropertyList, viewportTransitionContext, watchHeaders, watchScrolled, withContextSlots, withPhoneDefaults, withStateTransitions, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
4351
|
+
export type { A11yNodeSource, AnimateActionOptions, BoundValueSpec, BreakpointDef, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, CurrentLinkOptions, DatePickerOptions, FloatingLayerOptions, FloatingOptions, FloatingPlacement, FloatingRect, FloatingSize, FloatingViewport, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, HeaderRuntimeOptions, IBuilderEventEmitter, InputMap, InteractionKeyframe, IoxContextSlot, IoxPipe, LayerFrame, MatchMediaHost, NodeA11yContext, OverrideBreakpoint, PageScrollStart, PageStyleFieldState, PageStyleOptions, PageStyleSettings, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionContext, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, PlannedPageTransition, PopoverCloseOptions, PopoverOpenOptions, PressAction, RegisteredField, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteAnimationLike, ScrollPlanContext, ScrollSource, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SettleOptions, SliderBootOptions, SliderControlElements, SliderInputs, StateRulePlan, StateScope, StateStyleMap, StringFormOptions, StyleMap, StyleTreeNode, SwiperBreakpointMap, SwiperModuleFlags, SwiperPlan, SwiperPlanContext, ToastHandle, ToastOptions, ToggleableAction, TooltipRuntimeOptions, TooltipTimingState, TransitionFeel, TransitionPhase, TransitionPreviewLayers, TransitionTimelineInput, TransitionViewport, ValueSource, VirtualTraitGroup };
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ export type ActionKind = 'animated' | 'instant' | 'server';
|
|
|
11
11
|
|
|
12
12
|
/** Picker grouping. Flat lists die at ~10 entries; the group is data, never a second list. */
|
|
13
13
|
export type ActionGroup =
|
|
14
|
-
| 'motion' | 'visibility' | 'navigate' | 'dialog' | 'item' | 'form' | 'data' | 'consent' | 'service';
|
|
14
|
+
| 'motion' | 'visibility' | 'navigate' | 'dialog' | 'popover' | 'notice' | 'item' | 'form' | 'data' | 'consent' | 'service';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* What a step does inside the live builder canvas (the canvas RUNS interactions):
|
|
@@ -56,18 +56,24 @@ export interface OpenerNodeLike {
|
|
|
56
56
|
|
|
57
57
|
const SELF = 'self';
|
|
58
58
|
|
|
59
|
-
/** The
|
|
60
|
-
|
|
59
|
+
/** The node id the element's click opens through one of `openerTypes` (its first enabled such action), or null —
|
|
60
|
+
* the ONE reading every opener kind shares (a dialog's, a popover's). */
|
|
61
|
+
export function openedTargetId(node: OpenerNodeLike | null | undefined, openerTypes: ReadonlySet<string>): string | null {
|
|
61
62
|
for (const ix of node?.interactions ?? []) {
|
|
62
63
|
if (ix?.trigger !== DIALOG_OPENER_TRIGGER) continue;
|
|
63
64
|
for (const action of ix.actions ?? []) {
|
|
64
|
-
if (!action || action.disabled === true || !
|
|
65
|
+
if (!action || action.disabled === true || !openerTypes.has(String(action.type))) continue;
|
|
65
66
|
if (action.target && action.target !== SELF) return action.target;
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
return null;
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
/** The Dialog node id the element's click opens (its first enabled opener action), or null. */
|
|
73
|
+
export function openedDialogId(node: OpenerNodeLike | null | undefined): string | null {
|
|
74
|
+
return openedTargetId(node, DIALOG_OPENER_ACTION_TYPES);
|
|
75
|
+
}
|
|
76
|
+
|
|
71
77
|
/**
|
|
72
78
|
* The opener attributes for a node: `{}` when its click opens no dialog, else
|
|
73
79
|
* `aria-haspopup="dialog"`, `aria-controls="iox-dialog-<id>"` and `aria-expanded` (`false` unless
|