@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/forms-core/index.d.ts
CHANGED
|
@@ -480,6 +480,22 @@ declare enum FormRenderState {
|
|
|
480
480
|
}
|
|
481
481
|
/** The attribute every renderer writes a form's state on (the canvas switcher, both live paths). */
|
|
482
482
|
declare const FORM_STATE_ATTRIBUTE = "data-iox-state";
|
|
483
|
+
/**
|
|
484
|
+
* What a form shows once it has sent (premium M5, N3) — the Form's "After sending" choice:
|
|
485
|
+
* - `message`: the success in place (M3): the fields leave, the Success block shows, Send reads "Sent" and stays so;
|
|
486
|
+
* - `toast`: the fields STAY, cleared for the next answer, and a toast says the form's Sent words — a newsletter in a
|
|
487
|
+
* footer, a form someone may send again.
|
|
488
|
+
*/
|
|
489
|
+
declare enum FormAfterSend {
|
|
490
|
+
Message = "message",
|
|
491
|
+
Toast = "toast"
|
|
492
|
+
}
|
|
493
|
+
/** The Form trait holding the choice. */
|
|
494
|
+
declare const FORM_AFTER_SEND_TRAIT = "afterSend";
|
|
495
|
+
/** The attribute every renderer writes it on (only when it is `toast` — `message` is what a form always did). */
|
|
496
|
+
declare const FORM_AFTER_SEND_ATTRIBUTE = "data-iox-after-send";
|
|
497
|
+
/** The choice a stored value names (`message` unless it says `toast`). */
|
|
498
|
+
declare function formAfterSend(value: unknown): FormAfterSend;
|
|
483
499
|
/** What the form does once the server has answered. */
|
|
484
500
|
interface SubmitOutcome {
|
|
485
501
|
state: FormRenderState;
|
|
@@ -488,12 +504,15 @@ interface SubmitOutcome {
|
|
|
488
504
|
/** A success clears the answers, so they cannot be sent twice. */
|
|
489
505
|
reset: boolean;
|
|
490
506
|
redirect?: string;
|
|
507
|
+
/** Say it in a toast (the form keeps its fields and goes back to Idle). */
|
|
508
|
+
toast?: boolean;
|
|
491
509
|
}
|
|
492
510
|
/**
|
|
493
|
-
* The server's answer → what the visitor sees. Only a confirmed success is Success
|
|
494
|
-
* land on the fields; anything else (a dropped network included)
|
|
511
|
+
* The server's answer → what the visitor sees. Only a confirmed success is Success (or, for a form that keeps its
|
|
512
|
+
* fields, Idle again with a toast); per-field verdicts land on the fields; anything else (a dropped network included)
|
|
513
|
+
* is the designed Error block.
|
|
495
514
|
*/
|
|
496
|
-
declare function submitOutcome(response: SubmitResponse | null | undefined): SubmitOutcome;
|
|
515
|
+
declare function submitOutcome(response: SubmitResponse | null | undefined, afterSend?: FormAfterSend | string | null): SubmitOutcome;
|
|
497
516
|
/** What the live region says after a refused submit: how many fields need attention, or that it did not send. */
|
|
498
517
|
declare function failureAnnouncement(errors: Readonly<Record<string, unknown>> | null | undefined): string;
|
|
499
518
|
/**
|
|
@@ -891,5 +910,5 @@ interface FieldMarkupOptions {
|
|
|
891
910
|
/** A Field's whole element, as the string renderer writes it. */
|
|
892
911
|
declare function fieldHtml(props: Record<string, any> | null | undefined, options: FieldMarkupOptions): string;
|
|
893
912
|
|
|
894
|
-
export { CALENDAR_ROWS, CHANNEL_KINDS, CHOICE_MESSAGE_KEYS, CalendarKey, ChannelKind, ChoiceAppearance, ControlType, DATE_EMPTY_ATTRIBUTE, DATE_ICON_SVG, DATE_MAX_ATTRIBUTE, DATE_MESSAGE_KEYS, DATE_MIN_ATTRIBUTE, DATE_PICKER_WORDS, DEFAULT_EN_MESSAGES, FIELD_GROUP_NODE_TYPE, FIELD_NODE_TYPE, FORM_ACTIONS_ROLE, FORM_ANNOUNCER_ATTRIBUTE, FORM_CHANNEL_ROLE, FORM_CONTENT_TYPES, FORM_ERROR_KEYS, FORM_FIELDS_ATTRIBUTE, FORM_HONEYPOT_CLASS, FORM_NODE_TYPE, FORM_PRESETS, FORM_STATE_ATTRIBUTE, FeedbackTiming, FieldClass, FormPresetId, FormRenderState, HONEYPOT_FIELD, IMPLIED_PATTERN, INITIAL_FORM_STATE, INTERACTIVE_HOST_TAGS, InteractiveTag, MESSAGE_NAMESPACE, OPTION_CONTROLS, PATTERN_MESSAGE_KEYS, PATTERN_PRESETS, PATTERN_PRESET_OPTIONS, PatternPreset, RENDERED_AT_FIELD, RULE_DESCRIPTORS, RULE_MESSAGE_KEYS, RuleName, RuleParamKind, STORE_ACTION, SUBMIT_BUTTON_NODE_TYPE, SUBMIT_CHECK_SVG, SUBMIT_KEEP_ENABLED_ATTRIBUTE, SUBMIT_MESSAGE_KEYS, SubmitLabelClass, addDaysIso, addMonthsIso, addableRules, applyServerErrors, baseFieldName, calendarKeyTarget, calendarMonth, channelHref, channelOpensNewTab, choiceAppearanceOf, clampIso, clientFormSpec, collectFieldNodes, collectFormSpec, dateBoundRules, dateOfIso, datePickerWords, deriveFieldName, failureAnnouncement, fieldDateRange, fieldHtml, fieldOptionsOf, fieldSpecOf, findFormContentInHosts, firstInvalidField, formChromeHtml, formContentInHost, formFieldNameMap, formFieldNames, formPresetById, formatDateInWords, inputTypeOf, interpretSubmitResponse, isChannelFilled, isDateBoundParams, isDateField, isFormContent, isInteractiveHost, isIsoDate, isMultiValueField, isoOfDate, normaliseAnswers, onFieldBlur, onFieldChange, onSubmitAttempt, parseChannelHref, parseClientFormSpec, parseDateBound, parseFieldOptions, planFormPresetIds, resetFormState, resolveDateBound, rulesFor, sentWord, shouldShowError, submitButtonLabelsHtml, submitButtonView, submitEndpointPath, submitOutcome, todayIso, uniqueFieldName, uniqueFieldNames, validateField, validateForm, weekStartFor, withAntiSpamFields };
|
|
913
|
+
export { CALENDAR_ROWS, CHANNEL_KINDS, CHOICE_MESSAGE_KEYS, CalendarKey, ChannelKind, ChoiceAppearance, ControlType, DATE_EMPTY_ATTRIBUTE, DATE_ICON_SVG, DATE_MAX_ATTRIBUTE, DATE_MESSAGE_KEYS, DATE_MIN_ATTRIBUTE, DATE_PICKER_WORDS, DEFAULT_EN_MESSAGES, FIELD_GROUP_NODE_TYPE, FIELD_NODE_TYPE, FORM_ACTIONS_ROLE, FORM_AFTER_SEND_ATTRIBUTE, FORM_AFTER_SEND_TRAIT, FORM_ANNOUNCER_ATTRIBUTE, FORM_CHANNEL_ROLE, FORM_CONTENT_TYPES, FORM_ERROR_KEYS, FORM_FIELDS_ATTRIBUTE, FORM_HONEYPOT_CLASS, FORM_NODE_TYPE, FORM_PRESETS, FORM_STATE_ATTRIBUTE, FeedbackTiming, FieldClass, FormAfterSend, FormPresetId, FormRenderState, HONEYPOT_FIELD, IMPLIED_PATTERN, INITIAL_FORM_STATE, INTERACTIVE_HOST_TAGS, InteractiveTag, MESSAGE_NAMESPACE, OPTION_CONTROLS, PATTERN_MESSAGE_KEYS, PATTERN_PRESETS, PATTERN_PRESET_OPTIONS, PatternPreset, RENDERED_AT_FIELD, RULE_DESCRIPTORS, RULE_MESSAGE_KEYS, RuleName, RuleParamKind, STORE_ACTION, SUBMIT_BUTTON_NODE_TYPE, SUBMIT_CHECK_SVG, SUBMIT_KEEP_ENABLED_ATTRIBUTE, SUBMIT_MESSAGE_KEYS, SubmitLabelClass, addDaysIso, addMonthsIso, addableRules, applyServerErrors, baseFieldName, calendarKeyTarget, calendarMonth, channelHref, channelOpensNewTab, choiceAppearanceOf, clampIso, clientFormSpec, collectFieldNodes, collectFormSpec, dateBoundRules, dateOfIso, datePickerWords, deriveFieldName, failureAnnouncement, fieldDateRange, fieldHtml, fieldOptionsOf, fieldSpecOf, findFormContentInHosts, firstInvalidField, formAfterSend, formChromeHtml, formContentInHost, formFieldNameMap, formFieldNames, formPresetById, formatDateInWords, inputTypeOf, interpretSubmitResponse, isChannelFilled, isDateBoundParams, isDateField, isFormContent, isInteractiveHost, isIsoDate, isMultiValueField, isoOfDate, normaliseAnswers, onFieldBlur, onFieldChange, onSubmitAttempt, parseChannelHref, parseClientFormSpec, parseDateBound, parseFieldOptions, planFormPresetIds, resetFormState, resolveDateBound, rulesFor, sentWord, shouldShowError, submitButtonLabelsHtml, submitButtonView, submitEndpointPath, submitOutcome, todayIso, uniqueFieldName, uniqueFieldNames, validateField, validateForm, weekStartFor, withAntiSpamFields };
|
|
895
914
|
export type { CalendarDay, CalendarMonth, CalendarOptions, ClientFormSpec, DateBoundParams, DatePickerWords, FieldError, FieldMarkupOptions, FieldOption, FieldOptionSource, FieldResult, FieldSpec, FormNodeLike, FormPresetChannel, FormPresetDef, FormPresetField, FormResult, FormRuntimeState, FormSpec, FormTransport, MisplacedFormContent, NestingNode, RuleDescriptor, SubmitAction, SubmitButtonView, SubmitLabels, SubmitOutcome, SubmitRequest, SubmitResponse, ValidateOptions, ValidationRule };
|
|
@@ -7729,7 +7729,11 @@ declare enum ScrimLevel {
|
|
|
7729
7729
|
declare const SCRIM_LEVELS: ReadonlyArray<ScrimLevel>;
|
|
7730
7730
|
/** What each level writes on the scrim node (`backgroundColor`, token references only) — `null`: the style's own. */
|
|
7731
7731
|
declare const SCRIM_BACKGROUND: Readonly<Record<ScrimLevel, string | null>>;
|
|
7732
|
-
/**
|
|
7732
|
+
/**
|
|
7733
|
+
* The least share of the scrim's own strength under the FIRST line of words, at each level — read from where the words
|
|
7734
|
+
* start in the box (its top padding) against the gradient's ramp, on a phone (the tallest box): the element style's own
|
|
7735
|
+
* ramp (`transparent 0%` → full at 45%) has only about a quarter of its strength there; Firm starts at three quarters.
|
|
7736
|
+
*/
|
|
7733
7737
|
declare const SCRIM_COVER: Readonly<Record<ScrimLevel, number>>;
|
|
7734
7738
|
/** WCAG AA for body text — the words over a picture include a lead and a button label, never only a headline. */
|
|
7735
7739
|
declare const PICTURE_TEXT_CONTRAST = 4.5;
|