@vectoriox/iox-ui 5.38.0 → 5.39.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.
Files changed (32) hide show
  1. package/composite-core/index.d.ts +392 -16
  2. package/design-core/index.d.ts +322 -3
  3. package/fesm2022/vectoriox-iox-ui-actions-core.mjs +4 -2
  4. package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
  5. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +1129 -146
  6. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  7. package/fesm2022/vectoriox-iox-ui-design-core.mjs +383 -3
  8. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  9. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +125 -3
  10. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  11. package/fesm2022/vectoriox-iox-ui.mjs +16 -9
  12. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  13. package/generation-core/index.d.ts +43 -0
  14. package/index.d.ts +11 -6
  15. package/package.json +1 -1
  16. package/src/actions-core/element-actions.ts +4 -2
  17. package/src/composite-core/accordion-runtime.ts +3 -15
  18. package/src/composite-core/accordion.ts +4 -2
  19. package/src/composite-core/composite-kinds.ts +121 -7
  20. package/src/composite-core/composite-runtime.ts +68 -0
  21. package/src/composite-core/exclusive-runtime.ts +358 -0
  22. package/src/composite-core/public-api.ts +5 -2
  23. package/src/composite-core/structure.ts +22 -2
  24. package/src/composite-core/tabs.ts +628 -0
  25. package/src/design-core/contrast-audit.ts +5 -0
  26. package/src/design-core/element-styles.ts +7 -3
  27. package/src/design-core/flavor-spec.generated.ts +371 -0
  28. package/src/generation-core/compose-site.ts +68 -1
  29. package/src/generation-core/node-baselines.generated.ts +8 -2
  30. package/src/generation-core/patterns.ts +3 -0
  31. package/src/generation-core/site-spec.generated.ts +46 -0
  32. package/styles/iox-design.css +16 -0
@@ -1017,6 +1017,41 @@ const SPEC_TIERS = {
1017
1017
  "type": "spacing",
1018
1018
  "default": "0px 0px 20px 0px"
1019
1019
  },
1020
+ {
1021
+ "name": "tab-list-border",
1022
+ "type": "color",
1023
+ "default": "var(--iox-line)"
1024
+ },
1025
+ {
1026
+ "name": "tab-ink",
1027
+ "type": "color",
1028
+ "default": "var(--iox-text-muted)"
1029
+ },
1030
+ {
1031
+ "name": "tab-on-ink",
1032
+ "type": "color",
1033
+ "default": "var(--iox-text)"
1034
+ },
1035
+ {
1036
+ "name": "tab-on-mark",
1037
+ "type": "color",
1038
+ "default": "var(--iox-accent-text)"
1039
+ },
1040
+ {
1041
+ "name": "tab-pad",
1042
+ "type": "spacing",
1043
+ "default": "10px 16px"
1044
+ },
1045
+ {
1046
+ "name": "tab-list-border-width",
1047
+ "type": "size",
1048
+ "default": "0px 0px var(--iox-border-width) 0px"
1049
+ },
1050
+ {
1051
+ "name": "tab-mark-width",
1052
+ "type": "size",
1053
+ "default": "0px 0px 2px 0px"
1054
+ },
1020
1055
  {
1021
1056
  "name": "heading-color",
1022
1057
  "type": "color",
@@ -1939,6 +1974,48 @@ const SPEC_ELEMENT_STYLES = [
1939
1974
  "color": "var(--iox-text-muted)"
1940
1975
  }
1941
1976
  },
1977
+ {
1978
+ "id": "tab-list",
1979
+ "label": "Tab list",
1980
+ "group": "Layout",
1981
+ "appliesTo": [
1982
+ "Container",
1983
+ "Repeater"
1984
+ ],
1985
+ "base": {
1986
+ "color": "inherit",
1987
+ "borderStyle": "solid",
1988
+ "borderWidth": "var(--iox-tab-list-border-width)",
1989
+ "borderColor": "var(--iox-tab-list-border)"
1990
+ }
1991
+ },
1992
+ {
1993
+ "id": "tab",
1994
+ "label": "Tab",
1995
+ "group": "Buttons",
1996
+ "appliesTo": [
1997
+ "ButtonBlock"
1998
+ ],
1999
+ "base": {
2000
+ "color": "var(--iox-tab-ink)",
2001
+ "padding": "var(--iox-tab-pad)",
2002
+ "fontFamily": "var(--iox-button-font)",
2003
+ "fontWeight": "var(--iox-button-weight)",
2004
+ "backgroundColor": "transparent",
2005
+ "borderStyle": "solid",
2006
+ "borderWidth": "var(--iox-tab-mark-width)",
2007
+ "borderColor": "transparent",
2008
+ "transitionDuration": "var(--iox-dur-fast)",
2009
+ "transitionTimingFunction": "var(--iox-ease-standard)"
2010
+ },
2011
+ "on": {
2012
+ "color": "var(--iox-tab-on-ink)",
2013
+ "borderColor": "var(--iox-tab-on-mark)"
2014
+ },
2015
+ "focus": {
2016
+ "boxShadow": "var(--iox-focus-ring)"
2017
+ }
2018
+ },
1942
2019
  {
1943
2020
  "id": "media",
1944
2021
  "label": "Image",
@@ -4163,6 +4240,55 @@ const SPEC_FLAVOR_PACKS = [
4163
4240
  "group": "components",
4164
4241
  "value": "0px 0px 20px 0px"
4165
4242
  },
4243
+ {
4244
+ "name": "tab-list-border",
4245
+ "tier": "component",
4246
+ "type": "color",
4247
+ "group": "components",
4248
+ "value": "var(--iox-line)"
4249
+ },
4250
+ {
4251
+ "name": "tab-ink",
4252
+ "tier": "component",
4253
+ "type": "color",
4254
+ "group": "components",
4255
+ "value": "var(--iox-text-muted)"
4256
+ },
4257
+ {
4258
+ "name": "tab-on-ink",
4259
+ "tier": "component",
4260
+ "type": "color",
4261
+ "group": "components",
4262
+ "value": "var(--iox-text)"
4263
+ },
4264
+ {
4265
+ "name": "tab-on-mark",
4266
+ "tier": "component",
4267
+ "type": "color",
4268
+ "group": "components",
4269
+ "value": "var(--iox-accent-text)"
4270
+ },
4271
+ {
4272
+ "name": "tab-pad",
4273
+ "tier": "component",
4274
+ "type": "spacing",
4275
+ "group": "components",
4276
+ "value": "10px 16px"
4277
+ },
4278
+ {
4279
+ "name": "tab-list-border-width",
4280
+ "tier": "component",
4281
+ "type": "size",
4282
+ "group": "components",
4283
+ "value": "0px 0px var(--iox-border-width) 0px"
4284
+ },
4285
+ {
4286
+ "name": "tab-mark-width",
4287
+ "tier": "component",
4288
+ "type": "size",
4289
+ "group": "components",
4290
+ "value": "0px 0px 2px 0px"
4291
+ },
4166
4292
  {
4167
4293
  "name": "heading-color",
4168
4294
  "tier": "component",
@@ -5805,6 +5931,55 @@ const SPEC_FLAVOR_PACKS = [
5805
5931
  "group": "components",
5806
5932
  "value": "0px 0px 20px 0px"
5807
5933
  },
5934
+ {
5935
+ "name": "tab-list-border",
5936
+ "tier": "component",
5937
+ "type": "color",
5938
+ "group": "components",
5939
+ "value": "var(--iox-line)"
5940
+ },
5941
+ {
5942
+ "name": "tab-ink",
5943
+ "tier": "component",
5944
+ "type": "color",
5945
+ "group": "components",
5946
+ "value": "var(--iox-text-muted)"
5947
+ },
5948
+ {
5949
+ "name": "tab-on-ink",
5950
+ "tier": "component",
5951
+ "type": "color",
5952
+ "group": "components",
5953
+ "value": "var(--iox-text)"
5954
+ },
5955
+ {
5956
+ "name": "tab-on-mark",
5957
+ "tier": "component",
5958
+ "type": "color",
5959
+ "group": "components",
5960
+ "value": "var(--iox-accent-text)"
5961
+ },
5962
+ {
5963
+ "name": "tab-pad",
5964
+ "tier": "component",
5965
+ "type": "spacing",
5966
+ "group": "components",
5967
+ "value": "10px 16px"
5968
+ },
5969
+ {
5970
+ "name": "tab-list-border-width",
5971
+ "tier": "component",
5972
+ "type": "size",
5973
+ "group": "components",
5974
+ "value": "0px 0px var(--iox-border-width) 0px"
5975
+ },
5976
+ {
5977
+ "name": "tab-mark-width",
5978
+ "tier": "component",
5979
+ "type": "size",
5980
+ "group": "components",
5981
+ "value": "0px 0px 2px 0px"
5982
+ },
5808
5983
  {
5809
5984
  "name": "heading-color",
5810
5985
  "tier": "component",
@@ -7441,6 +7616,55 @@ const SPEC_FLAVOR_PACKS = [
7441
7616
  "group": "components",
7442
7617
  "value": "0px 0px 20px 0px"
7443
7618
  },
7619
+ {
7620
+ "name": "tab-list-border",
7621
+ "tier": "component",
7622
+ "type": "color",
7623
+ "group": "components",
7624
+ "value": "var(--iox-line)"
7625
+ },
7626
+ {
7627
+ "name": "tab-ink",
7628
+ "tier": "component",
7629
+ "type": "color",
7630
+ "group": "components",
7631
+ "value": "var(--iox-text-muted)"
7632
+ },
7633
+ {
7634
+ "name": "tab-on-ink",
7635
+ "tier": "component",
7636
+ "type": "color",
7637
+ "group": "components",
7638
+ "value": "var(--iox-text)"
7639
+ },
7640
+ {
7641
+ "name": "tab-on-mark",
7642
+ "tier": "component",
7643
+ "type": "color",
7644
+ "group": "components",
7645
+ "value": "var(--iox-accent-text)"
7646
+ },
7647
+ {
7648
+ "name": "tab-pad",
7649
+ "tier": "component",
7650
+ "type": "spacing",
7651
+ "group": "components",
7652
+ "value": "10px 16px"
7653
+ },
7654
+ {
7655
+ "name": "tab-list-border-width",
7656
+ "tier": "component",
7657
+ "type": "size",
7658
+ "group": "components",
7659
+ "value": "0px 0px var(--iox-border-width) 0px"
7660
+ },
7661
+ {
7662
+ "name": "tab-mark-width",
7663
+ "tier": "component",
7664
+ "type": "size",
7665
+ "group": "components",
7666
+ "value": "0px 0px 2px 0px"
7667
+ },
7444
7668
  {
7445
7669
  "name": "heading-color",
7446
7670
  "tier": "component",
@@ -9118,6 +9342,55 @@ const SPEC_FLAVOR_PACKS = [
9118
9342
  "group": "components",
9119
9343
  "value": "0px 0px 20px 0px"
9120
9344
  },
9345
+ {
9346
+ "name": "tab-list-border",
9347
+ "tier": "component",
9348
+ "type": "color",
9349
+ "group": "components",
9350
+ "value": "var(--iox-line)"
9351
+ },
9352
+ {
9353
+ "name": "tab-ink",
9354
+ "tier": "component",
9355
+ "type": "color",
9356
+ "group": "components",
9357
+ "value": "var(--iox-text-muted)"
9358
+ },
9359
+ {
9360
+ "name": "tab-on-ink",
9361
+ "tier": "component",
9362
+ "type": "color",
9363
+ "group": "components",
9364
+ "value": "var(--iox-text)"
9365
+ },
9366
+ {
9367
+ "name": "tab-on-mark",
9368
+ "tier": "component",
9369
+ "type": "color",
9370
+ "group": "components",
9371
+ "value": "var(--iox-accent-text)"
9372
+ },
9373
+ {
9374
+ "name": "tab-pad",
9375
+ "tier": "component",
9376
+ "type": "spacing",
9377
+ "group": "components",
9378
+ "value": "10px 16px"
9379
+ },
9380
+ {
9381
+ "name": "tab-list-border-width",
9382
+ "tier": "component",
9383
+ "type": "size",
9384
+ "group": "components",
9385
+ "value": "0px 0px var(--iox-border-width) 0px"
9386
+ },
9387
+ {
9388
+ "name": "tab-mark-width",
9389
+ "tier": "component",
9390
+ "type": "size",
9391
+ "group": "components",
9392
+ "value": "0px 0px 2px 0px"
9393
+ },
9121
9394
  {
9122
9395
  "name": "heading-color",
9123
9396
  "tier": "component",
@@ -10757,6 +11030,55 @@ const SPEC_FLAVOR_PACKS = [
10757
11030
  "group": "components",
10758
11031
  "value": "0px 0px 20px 0px"
10759
11032
  },
11033
+ {
11034
+ "name": "tab-list-border",
11035
+ "tier": "component",
11036
+ "type": "color",
11037
+ "group": "components",
11038
+ "value": "var(--iox-line)"
11039
+ },
11040
+ {
11041
+ "name": "tab-ink",
11042
+ "tier": "component",
11043
+ "type": "color",
11044
+ "group": "components",
11045
+ "value": "var(--iox-text-muted)"
11046
+ },
11047
+ {
11048
+ "name": "tab-on-ink",
11049
+ "tier": "component",
11050
+ "type": "color",
11051
+ "group": "components",
11052
+ "value": "var(--iox-text)"
11053
+ },
11054
+ {
11055
+ "name": "tab-on-mark",
11056
+ "tier": "component",
11057
+ "type": "color",
11058
+ "group": "components",
11059
+ "value": "var(--iox-accent-text)"
11060
+ },
11061
+ {
11062
+ "name": "tab-pad",
11063
+ "tier": "component",
11064
+ "type": "spacing",
11065
+ "group": "components",
11066
+ "value": "10px 16px"
11067
+ },
11068
+ {
11069
+ "name": "tab-list-border-width",
11070
+ "tier": "component",
11071
+ "type": "size",
11072
+ "group": "components",
11073
+ "value": "0px 0px var(--iox-border-width) 0px"
11074
+ },
11075
+ {
11076
+ "name": "tab-mark-width",
11077
+ "tier": "component",
11078
+ "type": "size",
11079
+ "group": "components",
11080
+ "value": "0px 0px 2px 0px"
11081
+ },
10760
11082
  {
10761
11083
  "name": "heading-color",
10762
11084
  "tier": "component",
@@ -12402,6 +12724,55 @@ const SPEC_FLAVOR_PACKS = [
12402
12724
  "group": "components",
12403
12725
  "value": "0px 0px 20px 0px"
12404
12726
  },
12727
+ {
12728
+ "name": "tab-list-border",
12729
+ "tier": "component",
12730
+ "type": "color",
12731
+ "group": "components",
12732
+ "value": "var(--iox-line)"
12733
+ },
12734
+ {
12735
+ "name": "tab-ink",
12736
+ "tier": "component",
12737
+ "type": "color",
12738
+ "group": "components",
12739
+ "value": "var(--iox-text-muted)"
12740
+ },
12741
+ {
12742
+ "name": "tab-on-ink",
12743
+ "tier": "component",
12744
+ "type": "color",
12745
+ "group": "components",
12746
+ "value": "var(--iox-text)"
12747
+ },
12748
+ {
12749
+ "name": "tab-on-mark",
12750
+ "tier": "component",
12751
+ "type": "color",
12752
+ "group": "components",
12753
+ "value": "var(--iox-accent-text)"
12754
+ },
12755
+ {
12756
+ "name": "tab-pad",
12757
+ "tier": "component",
12758
+ "type": "spacing",
12759
+ "group": "components",
12760
+ "value": "10px 16px"
12761
+ },
12762
+ {
12763
+ "name": "tab-list-border-width",
12764
+ "tier": "component",
12765
+ "type": "size",
12766
+ "group": "components",
12767
+ "value": "0px 0px var(--iox-border-width) 0px"
12768
+ },
12769
+ {
12770
+ "name": "tab-mark-width",
12771
+ "tier": "component",
12772
+ "type": "size",
12773
+ "group": "components",
12774
+ "value": "0px 0px 2px 0px"
12775
+ },
12405
12776
  {
12406
12777
  "name": "heading-color",
12407
12778
  "tier": "component",
@@ -12894,8 +13265,11 @@ var ElementStyleState;
12894
13265
  ElementStyleState["Focus"] = "focus";
12895
13266
  /** The page you're on (CC1 N2): compiles to `[aria-current="page"]`, never a pseudo-class. */
12896
13267
  ElementStyleState["Current"] = "current";
13268
+ /** A composite part that is ON — the active tab (CC4a "Active"): compiles to `[data-iox-on]`, the attribute every
13269
+ * composite runtime writes. */
13270
+ ElementStyleState["On"] = "on";
12897
13271
  })(ElementStyleState || (ElementStyleState = {}));
12898
- const ELEMENT_STYLE_STATES = [ElementStyleState.Hover, ElementStyleState.Active, ElementStyleState.Focus, ElementStyleState.Current];
13272
+ const ELEMENT_STYLE_STATES = [ElementStyleState.Hover, ElementStyleState.Active, ElementStyleState.Focus, ElementStyleState.Current, ElementStyleState.On];
12899
13273
  const ELEMENT_STYLES = SPEC_ELEMENT_STYLES;
12900
13274
  /** Legacy `Button.variant` → the element style it maps to (adopt, DS7). */
12901
13275
  const BUTTON_VARIANT_TO_STYLE = SPEC_BUTTON_VARIANT_TO_STYLE;
@@ -12972,7 +13346,7 @@ function ownedEntries(style) {
12972
13346
  }
12973
13347
  return out;
12974
13348
  }
12975
- /** Every trait the style owns with the value it writes — base first, then hover/active/focus/current. */
13349
+ /** Every trait the style owns with the value it writes — base first, then hover/active/focus/current/on. */
12976
13350
  function ownedTraitsOf(style) {
12977
13351
  return ownedEntries(style);
12978
13352
  }
@@ -13001,7 +13375,7 @@ function writeEntries(target, style, skip = []) {
13001
13375
  target.elementStyle = style.id;
13002
13376
  return unknown;
13003
13377
  }
13004
- /** Write the style's exact base map and its hover/active/focus/current maps into the target. */
13378
+ /** Write the style's exact base map and its hover/active/focus/current/on maps into the target. */
13005
13379
  function applyElementStyle(target, id) {
13006
13380
  const style = elementStyleById(id);
13007
13381
  if (!style)
@@ -14657,6 +15031,8 @@ function auditDesignContrast(rows, mode) {
14657
15031
  ['base', ownStyle(e)],
14658
15032
  ...(e.hover ? [['hover', { ...ownStyle(e), ...e.hover }]] : []),
14659
15033
  ...(e.current ? [['current', { ...ownStyle(e), ...e.current }]] : []),
15034
+ // `on` (CC4a): the active tab, on every ground it can sit on.
15035
+ ...(e.on ? [['on', { ...ownStyle(e), ...e.on }]] : []),
14660
15036
  ];
14661
15037
  const glyph = e.group === GLYPH_GROUP;
14662
15038
  for (const [state, s] of states) {
@@ -14664,6 +15040,10 @@ function auditDesignContrast(rows, mode) {
14664
15040
  const under = fill.length && opaque(fill) ? overAll(fill, bgs) : bgs;
14665
15041
  const ink = s['color'] ? parseCssColour(resolveIn(values, s['color']), boxInk) : boxInk;
14666
15042
  check(e.id, state === 'base' ? (glyph ? 'glyph' : 'text') : `${state} text`, ink, under, glyph ? WCAG_AA_UI : WCAG_AA_TEXT);
15043
+ // The active tab's mark is the selected state's indicator (WCAG 1.4.11) — the contract's audit, 1:1.
15044
+ const mark = state === 'on' ? e.on?.['borderColor'] : undefined;
15045
+ if (mark)
15046
+ check(e.id, 'on mark', parseCssColour(resolveIn(values, mark), ink), bgs, WCAG_AA_UI);
14667
15047
  // What a filled element HOLDS (inkScopes): a button's or a badge's icon reads its ink.
14668
15048
  if (state === 'base' && INK_SCOPES.some(sc => sc.styles.includes(e.id))) {
14669
15049
  check(e.id, 'icon', parseCssColour(resolveIn(inkScoped(values, e.id), iconColour), ink), under, WCAG_AA_UI);