@vectoriox/iox-ui 5.38.0 → 5.40.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/composite-core/index.d.ts +392 -16
- package/design-core/index.d.ts +322 -3
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +4 -2
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +1129 -146
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +383 -3
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +219 -8
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +16 -9
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +107 -3
- package/index.d.ts +11 -6
- package/package.json +1 -1
- package/src/actions-core/element-actions.ts +4 -2
- package/src/composite-core/accordion-runtime.ts +3 -15
- package/src/composite-core/accordion.ts +4 -2
- package/src/composite-core/composite-kinds.ts +121 -7
- package/src/composite-core/composite-runtime.ts +68 -0
- package/src/composite-core/exclusive-runtime.ts +358 -0
- package/src/composite-core/public-api.ts +5 -2
- package/src/composite-core/structure.ts +22 -2
- package/src/composite-core/tabs.ts +628 -0
- package/src/design-core/contrast-audit.ts +5 -0
- package/src/design-core/element-styles.ts +7 -3
- package/src/design-core/flavor-spec.generated.ts +371 -0
- package/src/generation-core/compose-site.ts +147 -1
- package/src/generation-core/nav-shape.ts +53 -3
- package/src/generation-core/node-baselines.generated.ts +8 -2
- package/src/generation-core/patterns.ts +3 -0
- package/src/generation-core/site-spec.generated.ts +46 -0
- package/styles/iox-design.css +16 -0
|
@@ -5864,8 +5864,10 @@ var ComponentState;
|
|
|
5864
5864
|
ComponentState["Current"] = "current";
|
|
5865
5865
|
/** A composite part that IS on — an open accordion item, its header, its panel (board 9 "Open"). */
|
|
5866
5866
|
ComponentState["On"] = "on";
|
|
5867
|
-
/** A part INSIDE an item, styled by its item being open (board 9 "Item open"
|
|
5868
|
-
* trigger is the item (`stateTriggers['trigger-on']`), compiled through
|
|
5867
|
+
/** A part INSIDE an item, styled by its item being open (board 9 "Item open"; "Tab active" inside a tab or a panel)
|
|
5868
|
+
* — a TARGETED state: its trigger is the item (`stateTriggers['trigger-on']`), compiled through
|
|
5869
|
+
* `targetedStateSelector`. On a node OUTSIDE every item (composite T20, CC4a) the author PICKS the item — "when tab
|
|
5870
|
+
* Night is on" — the same state and the same `:has()` scoped to the nearest common ancestor. */
|
|
5869
5871
|
ComponentState["ItemOpen"] = "trigger-on";
|
|
5870
5872
|
})(ComponentState || (ComponentState = {}));
|
|
5871
5873
|
/** The attribute selector each (non-targeted) component state compiles to. */
|
|
@@ -5874,21 +5876,26 @@ const COMPONENT_STATE_SELECTOR = {
|
|
|
5874
5876
|
[ComponentState.On]: '[data-iox-on]',
|
|
5875
5877
|
};
|
|
5876
5878
|
/** The composite roles that are themselves "on" when their item is open (they carry `data-iox-on`): an accordion's
|
|
5877
|
-
* item, header and panel; a disclosure (its own item), its toggle and its panel (CC2.1)
|
|
5878
|
-
* import composite-core, so the roles are spelled here — `style-compiler.spec` pins
|
|
5879
|
-
|
|
5879
|
+
* item, header and panel; a disclosure (its own item), its toggle and its panel (CC2.1); a tab and its panel (CC4a —
|
|
5880
|
+
* "Active"). The main entry does not import composite-core, so the roles are spelled here — `style-compiler.spec` pins
|
|
5881
|
+
* them to its enums. */
|
|
5882
|
+
const ON_STATE_ROLES = [
|
|
5883
|
+
'accordion.item', 'accordion.trigger', 'accordion.panel', 'disclosure', 'disclosure.trigger', 'disclosure.panel', 'tabs.trigger', 'tabs.panel',
|
|
5884
|
+
];
|
|
5880
5885
|
/**
|
|
5881
5886
|
* The component states a node offers in the Style panel's "Component state" group: Current page (a link),
|
|
5882
|
-
* Open (an accordion's item, header or panel), Item open (any other part inside an item —
|
|
5887
|
+
* Open / Active (an accordion's item, header or panel; a tab or its panel), Item open (any other part inside an item —
|
|
5888
|
+
* `insideItem`), and — on a node outside every item, on a page that has items to pick (`itemsToPick`, composite T20) —
|
|
5889
|
+
* the same Item open state with a picked trigger.
|
|
5883
5890
|
*/
|
|
5884
|
-
function componentStatesFor(type, role, insideItem = false) {
|
|
5885
|
-
// An accordion's header is a button that opens its item, never a link to a page: Open, not Current page.
|
|
5891
|
+
function componentStatesFor(type, role, insideItem = false, itemsToPick = false) {
|
|
5892
|
+
// An accordion's header (a tab) is a button that opens its item, never a link to a page: Open, not Current page.
|
|
5886
5893
|
if (role && ON_STATE_ROLES.includes(role))
|
|
5887
5894
|
return [ComponentState.On];
|
|
5888
5895
|
const out = [];
|
|
5889
5896
|
if (type && CURRENT_LINK_TYPES.includes(type))
|
|
5890
5897
|
out.push(ComponentState.Current);
|
|
5891
|
-
if (insideItem)
|
|
5898
|
+
if (insideItem || itemsToPick)
|
|
5892
5899
|
out.push(ComponentState.ItemOpen);
|
|
5893
5900
|
return out;
|
|
5894
5901
|
}
|