@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
|
@@ -17,10 +17,12 @@ export enum ElementStyleState {
|
|
|
17
17
|
Hover = 'hover',
|
|
18
18
|
Active = 'active',
|
|
19
19
|
Focus = 'focus',
|
|
20
|
+
/** The page you're on (CC1 N2): compiles to `[aria-current="page"]`, never a pseudo-class. */
|
|
21
|
+
Current = 'current',
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export const ELEMENT_STYLE_STATES: ReadonlyArray<ElementStyleState> =
|
|
23
|
-
[ElementStyleState.Hover, ElementStyleState.Active, ElementStyleState.Focus];
|
|
25
|
+
[ElementStyleState.Hover, ElementStyleState.Active, ElementStyleState.Focus, ElementStyleState.Current];
|
|
24
26
|
|
|
25
27
|
export interface ElementStyle {
|
|
26
28
|
readonly id: string;
|
|
@@ -31,6 +33,7 @@ export interface ElementStyle {
|
|
|
31
33
|
readonly hover?: Readonly<Record<string, string>>;
|
|
32
34
|
readonly active?: Readonly<Record<string, string>>;
|
|
33
35
|
readonly focus?: Readonly<Record<string, string>>;
|
|
36
|
+
readonly current?: Readonly<Record<string, string>>;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
export const ELEMENT_STYLES: ReadonlyArray<ElementStyle> = SPEC_ELEMENT_STYLES;
|
|
@@ -163,7 +166,7 @@ function ownedEntries(style: ElementStyle): Array<OwnedTrait & { value: string }
|
|
|
163
166
|
return out;
|
|
164
167
|
}
|
|
165
168
|
|
|
166
|
-
/** Every trait the style owns with the value it writes — base first, then hover/active/focus. */
|
|
169
|
+
/** Every trait the style owns with the value it writes — base first, then hover/active/focus/current. */
|
|
167
170
|
export function ownedTraitsOf(style: ElementStyle): Array<OwnedTrait & { value: string }> {
|
|
168
171
|
return ownedEntries(style);
|
|
169
172
|
}
|
|
@@ -193,7 +196,7 @@ function writeEntries(target: ElementStyleTarget, style: ElementStyle, skip: Own
|
|
|
193
196
|
return unknown;
|
|
194
197
|
}
|
|
195
198
|
|
|
196
|
-
/** Write the style's exact base map and its hover/active/focus maps into the target. */
|
|
199
|
+
/** Write the style's exact base map and its hover/active/focus/current maps into the target. */
|
|
197
200
|
export function applyElementStyle(target: ElementStyleTarget, id: string): ApplyElementStyleResult {
|
|
198
201
|
const style = elementStyleById(id);
|
|
199
202
|
if (!style) return { applied: false, unknownTraits: [] };
|