@vectoriox/iox-ui 5.31.2 → 5.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions-core/index.d.ts +52 -2
- package/design-core/index.d.ts +650 -6
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +69 -1
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +791 -20
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +564 -22
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +365 -24
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +126 -6
- package/index.d.ts +245 -2
- package/package.json +1 -1
- package/src/actions-core/dialog-opener.ts +89 -0
- package/src/actions-core/public-api.ts +1 -0
- package/src/design-core/contrast-audit.ts +11 -2
- package/src/design-core/element-styles.ts +6 -3
- package/src/design-core/flavor-spec.generated.ts +737 -11
- package/src/design-core/node-classes.ts +39 -4
- package/src/generation-core/compose-site.ts +9 -1
- package/src/generation-core/nav-shape.ts +553 -0
- package/src/generation-core/node-baselines.generated.ts +23 -8
- package/src/generation-core/patterns.ts +9 -3
- package/src/generation-core/public-api.ts +1 -0
- package/src/generation-core/serialized-node.ts +2 -1
- package/src/generation-core/site-spec.generated.ts +8 -2
- package/styles/iox-design.css +94 -0
package/actions-core/index.d.ts
CHANGED
|
@@ -116,5 +116,55 @@ declare function groupedElementActions(): ReadonlyArray<{
|
|
|
116
116
|
actions: ActionDescriptor[];
|
|
117
117
|
}>;
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
/**
|
|
120
|
+
* What an element that OPENS a dialog says about itself (CC1, N3 — APG disclosure/dialog pattern).
|
|
121
|
+
* The element whose click runs `openDialog` / `toggleDialog` (a menu button, a bottom bar's More) is
|
|
122
|
+
* announced as one: `aria-haspopup="dialog"`, `aria-controls` = the dialog's DOM id, and
|
|
123
|
+
* `aria-expanded` — `false` in the server render, kept in step on open and close by each runtime.
|
|
124
|
+
*
|
|
125
|
+
* ONE decision for every renderer (the builder canvas, the engine's component path and its string
|
|
126
|
+
* path), framework-free so iox-cms can read it too. The dialog's DOM id comes from `dialogDomId`, the
|
|
127
|
+
* one place that names it, so an opener and its dialog can never disagree.
|
|
128
|
+
*/
|
|
129
|
+
/** The interaction trigger that opens a dialog from an element. */
|
|
130
|
+
declare const DIALOG_OPENER_TRIGGER = "click";
|
|
131
|
+
/** The actions that make an element a dialog OPENER (close-only actions do not). */
|
|
132
|
+
declare const DIALOG_OPENER_ACTION_TYPES: ReadonlySet<string>;
|
|
133
|
+
/** Every action that opens, closes or toggles a dialog — what a runtime watches to sync `aria-expanded`. */
|
|
134
|
+
declare const DIALOG_ACTION_TYPE_SET: ReadonlySet<string>;
|
|
135
|
+
/** The selector of every dialog a renderer emits (the live `<dialog data-iox-dialog>`). */
|
|
136
|
+
declare const DIALOG_SELECTOR = "dialog[data-iox-dialog]";
|
|
137
|
+
/** The DOM id of a Dialog node's `<dialog>` — what an opener's `aria-controls` names. */
|
|
138
|
+
declare function dialogDomId(nodeId: string): string;
|
|
139
|
+
/** The node id a dialog DOM id names, or null. */
|
|
140
|
+
declare function nodeIdOfDialogDomId(domId: string | null | undefined): string | null;
|
|
141
|
+
declare enum OpenerAttribute {
|
|
142
|
+
HasPopup = "aria-haspopup",
|
|
143
|
+
Expanded = "aria-expanded",
|
|
144
|
+
Controls = "aria-controls"
|
|
145
|
+
}
|
|
146
|
+
interface OpenerActionLike {
|
|
147
|
+
type?: string;
|
|
148
|
+
target?: string;
|
|
149
|
+
disabled?: boolean;
|
|
150
|
+
}
|
|
151
|
+
interface OpenerInteractionLike {
|
|
152
|
+
trigger?: string;
|
|
153
|
+
actions?: ReadonlyArray<OpenerActionLike> | null;
|
|
154
|
+
}
|
|
155
|
+
interface OpenerNodeLike {
|
|
156
|
+
interactions?: ReadonlyArray<OpenerInteractionLike> | null;
|
|
157
|
+
}
|
|
158
|
+
/** The Dialog node id the element's click opens (its first enabled opener action), or null. */
|
|
159
|
+
declare function openedDialogId(node: OpenerNodeLike | null | undefined): string | null;
|
|
160
|
+
/**
|
|
161
|
+
* The opener attributes for a node: `{}` when its click opens no dialog, else
|
|
162
|
+
* `aria-haspopup="dialog"`, `aria-controls="iox-dialog-<id>"` and `aria-expanded` (`false` unless
|
|
163
|
+
* `open` says the dialog is open right now).
|
|
164
|
+
*/
|
|
165
|
+
declare function dialogOpenerAttributes(node: OpenerNodeLike | null | undefined, open?: boolean): Record<string, string>;
|
|
166
|
+
/** The selector of every opener of one dialog (by its DOM id) — what a runtime updates on open/close. */
|
|
167
|
+
declare function dialogOpenersSelector(dialogDomIdValue: string): string;
|
|
168
|
+
|
|
169
|
+
export { BEHAVIOUR_ACTION_TYPES, CONSENT_ACTION_TYPES, DIALOG_ACTION_TYPE_SET, DIALOG_OPENER_ACTION_TYPES, DIALOG_OPENER_TRIGGER, DIALOG_SELECTOR, ELEMENT_ACTION_DESCRIPTORS, ELEMENT_ACTION_GROUP_ORDER, FORM_SUBMIT_ACTION_DESCRIPTORS, OpenerAttribute, SERVER_ELEMENT_ACTION_TYPES, addableActions, dialogDomId, dialogOpenerAttributes, dialogOpenersSelector, groupedElementActions, nodeIdOfDialogDomId, openedDialogId, resolveActionAvailability };
|
|
170
|
+
export type { ActionAvailability, ActionAvailabilityContext, ActionAvailabilityState, ActionDescriptor, ActionGroup, ActionKind, ActionParamSpec, ActionTargetSpec, BuilderBehaviour, OpenerActionLike, OpenerInteractionLike, OpenerNodeLike };
|