@vectoriox/iox-ui 5.99.0 → 5.101.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 +7 -4
- package/commerce-core/index.d.ts +2 -0
- package/composite-core/index.d.ts +238 -2
- package/design-core/index.d.ts +334 -1
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +16 -7
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-commerce-core.mjs +3 -0
- package/fesm2022/vectoriox-iox-ui-commerce-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +1005 -256
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +416 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs +3 -24
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +23 -13
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-identity-core.mjs +300 -22
- package/fesm2022/vectoriox-iox-ui-identity-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +7 -61
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/forms-core/index.d.ts +2 -23
- package/generation-core/index.d.ts +3 -1
- package/identity-core/index.d.ts +190 -14
- package/index.d.ts +0 -12
- package/package.json +1 -1
- package/src/actions-core/action.model.ts +1 -1
- package/src/actions-core/element-actions.ts +16 -6
- package/src/commerce-core/site-checkout.ts +3 -0
- package/src/composite-core/account-runtime.ts +461 -0
- package/src/composite-core/account.ts +309 -0
- package/src/composite-core/public-api.ts +2 -0
- package/src/composite-core/recipe-parts.ts +48 -0
- package/src/composite-core/shop.ts +6 -26
- package/src/design-core/field-classes.ts +65 -0
- package/src/design-core/flavor-spec.generated.ts +346 -0
- package/src/design-core/public-api.ts +1 -0
- package/src/forms-core/field-markup.ts +2 -22
- package/src/generation-core/compose-site.ts +19 -9
- package/src/generation-core/nav-shape.ts +4 -4
- package/src/identity-core/provider-marks.ts +60 -0
- package/src/identity-core/public-api.ts +3 -0
- package/src/identity-core/sign-in.ts +43 -6
- package/src/identity-core/site-auth-transport.ts +142 -0
- package/src/identity-core/site-auth.ts +36 -0
- package/src/identity-core/site-methods.ts +78 -0
- package/src/identity-core/words.ts +60 -17
- package/styles/iox-design.css +38 -0
|
@@ -1575,6 +1575,36 @@ const SPEC_TIERS = {
|
|
|
1575
1575
|
"name": "cart-note-bg",
|
|
1576
1576
|
"type": "color",
|
|
1577
1577
|
"default": "var(--iox-surface-2)"
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
"name": "account-button-pad",
|
|
1581
|
+
"type": "spacing",
|
|
1582
|
+
"default": "3px 12px"
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
"name": "account-button-gap",
|
|
1586
|
+
"type": "spacing",
|
|
1587
|
+
"default": "8px"
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
"name": "account-avatar-size",
|
|
1591
|
+
"type": "size",
|
|
1592
|
+
"default": "26px"
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
"name": "account-avatar-bg",
|
|
1596
|
+
"type": "color",
|
|
1597
|
+
"default": "var(--iox-accent)"
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
"name": "account-avatar-ink",
|
|
1601
|
+
"type": "color",
|
|
1602
|
+
"default": "var(--iox-accent-ink)"
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
"name": "sign-in-error-ink",
|
|
1606
|
+
"type": "color",
|
|
1607
|
+
"default": "var(--iox-danger)"
|
|
1578
1608
|
}
|
|
1579
1609
|
]
|
|
1580
1610
|
};
|
|
@@ -4728,6 +4758,70 @@ const SPEC_ELEMENT_STYLES = [
|
|
|
4728
4758
|
"fontSize": "var(--iox-size-small)"
|
|
4729
4759
|
}
|
|
4730
4760
|
},
|
|
4761
|
+
{
|
|
4762
|
+
"id": "account-button",
|
|
4763
|
+
"label": "Account button",
|
|
4764
|
+
"group": "Buttons",
|
|
4765
|
+
"appliesTo": [
|
|
4766
|
+
"ButtonBlock"
|
|
4767
|
+
],
|
|
4768
|
+
"base": {
|
|
4769
|
+
"color": "var(--iox-text)",
|
|
4770
|
+
"backgroundColor": "transparent",
|
|
4771
|
+
"minHeight": "var(--iox-cart-button-size)",
|
|
4772
|
+
"padding": "var(--iox-account-button-pad)",
|
|
4773
|
+
"gap": "var(--iox-account-button-gap)",
|
|
4774
|
+
"borderStyle": "solid",
|
|
4775
|
+
"borderWidth": "var(--iox-border-width)",
|
|
4776
|
+
"borderColor": "var(--iox-line-strong)",
|
|
4777
|
+
"borderRadius": "var(--iox-radius-pill)",
|
|
4778
|
+
"fontFamily": "var(--iox-font-label)",
|
|
4779
|
+
"fontSize": "var(--iox-size-small)",
|
|
4780
|
+
"transitionDuration": "var(--iox-dur-hover)",
|
|
4781
|
+
"transitionTimingFunction": "var(--iox-ease-hover)"
|
|
4782
|
+
},
|
|
4783
|
+
"hover": {
|
|
4784
|
+
"backgroundColor": "var(--iox-surface-2)"
|
|
4785
|
+
},
|
|
4786
|
+
"active": {
|
|
4787
|
+
"scaleX": "var(--iox-press-scale)",
|
|
4788
|
+
"scaleY": "var(--iox-press-scale)"
|
|
4789
|
+
},
|
|
4790
|
+
"focus": {
|
|
4791
|
+
"boxShadow": "var(--iox-focus-ring)"
|
|
4792
|
+
}
|
|
4793
|
+
},
|
|
4794
|
+
{
|
|
4795
|
+
"id": "account-avatar",
|
|
4796
|
+
"label": "Account initial",
|
|
4797
|
+
"group": "Content blocks",
|
|
4798
|
+
"appliesTo": [
|
|
4799
|
+
"Container"
|
|
4800
|
+
],
|
|
4801
|
+
"base": {
|
|
4802
|
+
"backgroundColor": "var(--iox-account-avatar-bg)",
|
|
4803
|
+
"color": "var(--iox-account-avatar-ink)",
|
|
4804
|
+
"borderRadius": "var(--iox-radius-pill)",
|
|
4805
|
+
"minWidth": "var(--iox-account-avatar-size)",
|
|
4806
|
+
"minHeight": "var(--iox-account-avatar-size)",
|
|
4807
|
+
"fontFamily": "var(--iox-font-label)",
|
|
4808
|
+
"fontSize": "var(--iox-size-label)",
|
|
4809
|
+
"fontWeight": "var(--iox-weight-strong)"
|
|
4810
|
+
}
|
|
4811
|
+
},
|
|
4812
|
+
{
|
|
4813
|
+
"id": "sign-in-error",
|
|
4814
|
+
"label": "Sign-in error",
|
|
4815
|
+
"group": "Text",
|
|
4816
|
+
"appliesTo": [
|
|
4817
|
+
"Text"
|
|
4818
|
+
],
|
|
4819
|
+
"base": {
|
|
4820
|
+
"color": "var(--iox-sign-in-error-ink)",
|
|
4821
|
+
"fontFamily": "var(--iox-font-body)",
|
|
4822
|
+
"fontSize": "var(--iox-size-small)"
|
|
4823
|
+
}
|
|
4824
|
+
},
|
|
4731
4825
|
{
|
|
4732
4826
|
"id": "notice-success",
|
|
4733
4827
|
"label": "Success message",
|
|
@@ -7703,6 +7797,48 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
7703
7797
|
"type": "color",
|
|
7704
7798
|
"group": "components",
|
|
7705
7799
|
"value": "var(--iox-surface-2)"
|
|
7800
|
+
},
|
|
7801
|
+
{
|
|
7802
|
+
"name": "account-button-pad",
|
|
7803
|
+
"tier": "component",
|
|
7804
|
+
"type": "spacing",
|
|
7805
|
+
"group": "components",
|
|
7806
|
+
"value": "3px 12px"
|
|
7807
|
+
},
|
|
7808
|
+
{
|
|
7809
|
+
"name": "account-button-gap",
|
|
7810
|
+
"tier": "component",
|
|
7811
|
+
"type": "spacing",
|
|
7812
|
+
"group": "components",
|
|
7813
|
+
"value": "8px"
|
|
7814
|
+
},
|
|
7815
|
+
{
|
|
7816
|
+
"name": "account-avatar-size",
|
|
7817
|
+
"tier": "component",
|
|
7818
|
+
"type": "size",
|
|
7819
|
+
"group": "components",
|
|
7820
|
+
"value": "26px"
|
|
7821
|
+
},
|
|
7822
|
+
{
|
|
7823
|
+
"name": "account-avatar-bg",
|
|
7824
|
+
"tier": "component",
|
|
7825
|
+
"type": "color",
|
|
7826
|
+
"group": "components",
|
|
7827
|
+
"value": "var(--iox-accent)"
|
|
7828
|
+
},
|
|
7829
|
+
{
|
|
7830
|
+
"name": "account-avatar-ink",
|
|
7831
|
+
"tier": "component",
|
|
7832
|
+
"type": "color",
|
|
7833
|
+
"group": "components",
|
|
7834
|
+
"value": "var(--iox-accent-ink)"
|
|
7835
|
+
},
|
|
7836
|
+
{
|
|
7837
|
+
"name": "sign-in-error-ink",
|
|
7838
|
+
"tier": "component",
|
|
7839
|
+
"type": "color",
|
|
7840
|
+
"group": "components",
|
|
7841
|
+
"value": "var(--iox-danger)"
|
|
7706
7842
|
}
|
|
7707
7843
|
]
|
|
7708
7844
|
},
|
|
@@ -9993,6 +10129,48 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
9993
10129
|
"type": "color",
|
|
9994
10130
|
"group": "components",
|
|
9995
10131
|
"value": "var(--iox-surface-2)"
|
|
10132
|
+
},
|
|
10133
|
+
{
|
|
10134
|
+
"name": "account-button-pad",
|
|
10135
|
+
"tier": "component",
|
|
10136
|
+
"type": "spacing",
|
|
10137
|
+
"group": "components",
|
|
10138
|
+
"value": "3px 12px"
|
|
10139
|
+
},
|
|
10140
|
+
{
|
|
10141
|
+
"name": "account-button-gap",
|
|
10142
|
+
"tier": "component",
|
|
10143
|
+
"type": "spacing",
|
|
10144
|
+
"group": "components",
|
|
10145
|
+
"value": "8px"
|
|
10146
|
+
},
|
|
10147
|
+
{
|
|
10148
|
+
"name": "account-avatar-size",
|
|
10149
|
+
"tier": "component",
|
|
10150
|
+
"type": "size",
|
|
10151
|
+
"group": "components",
|
|
10152
|
+
"value": "26px"
|
|
10153
|
+
},
|
|
10154
|
+
{
|
|
10155
|
+
"name": "account-avatar-bg",
|
|
10156
|
+
"tier": "component",
|
|
10157
|
+
"type": "color",
|
|
10158
|
+
"group": "components",
|
|
10159
|
+
"value": "var(--iox-accent)"
|
|
10160
|
+
},
|
|
10161
|
+
{
|
|
10162
|
+
"name": "account-avatar-ink",
|
|
10163
|
+
"tier": "component",
|
|
10164
|
+
"type": "color",
|
|
10165
|
+
"group": "components",
|
|
10166
|
+
"value": "var(--iox-accent-ink)"
|
|
10167
|
+
},
|
|
10168
|
+
{
|
|
10169
|
+
"name": "sign-in-error-ink",
|
|
10170
|
+
"tier": "component",
|
|
10171
|
+
"type": "color",
|
|
10172
|
+
"group": "components",
|
|
10173
|
+
"value": "var(--iox-danger)"
|
|
9996
10174
|
}
|
|
9997
10175
|
]
|
|
9998
10176
|
},
|
|
@@ -12271,6 +12449,48 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
12271
12449
|
"type": "color",
|
|
12272
12450
|
"group": "components",
|
|
12273
12451
|
"value": "var(--iox-surface-2)"
|
|
12452
|
+
},
|
|
12453
|
+
{
|
|
12454
|
+
"name": "account-button-pad",
|
|
12455
|
+
"tier": "component",
|
|
12456
|
+
"type": "spacing",
|
|
12457
|
+
"group": "components",
|
|
12458
|
+
"value": "3px 12px"
|
|
12459
|
+
},
|
|
12460
|
+
{
|
|
12461
|
+
"name": "account-button-gap",
|
|
12462
|
+
"tier": "component",
|
|
12463
|
+
"type": "spacing",
|
|
12464
|
+
"group": "components",
|
|
12465
|
+
"value": "8px"
|
|
12466
|
+
},
|
|
12467
|
+
{
|
|
12468
|
+
"name": "account-avatar-size",
|
|
12469
|
+
"tier": "component",
|
|
12470
|
+
"type": "size",
|
|
12471
|
+
"group": "components",
|
|
12472
|
+
"value": "26px"
|
|
12473
|
+
},
|
|
12474
|
+
{
|
|
12475
|
+
"name": "account-avatar-bg",
|
|
12476
|
+
"tier": "component",
|
|
12477
|
+
"type": "color",
|
|
12478
|
+
"group": "components",
|
|
12479
|
+
"value": "var(--iox-accent)"
|
|
12480
|
+
},
|
|
12481
|
+
{
|
|
12482
|
+
"name": "account-avatar-ink",
|
|
12483
|
+
"tier": "component",
|
|
12484
|
+
"type": "color",
|
|
12485
|
+
"group": "components",
|
|
12486
|
+
"value": "var(--iox-accent-ink)"
|
|
12487
|
+
},
|
|
12488
|
+
{
|
|
12489
|
+
"name": "sign-in-error-ink",
|
|
12490
|
+
"tier": "component",
|
|
12491
|
+
"type": "color",
|
|
12492
|
+
"group": "components",
|
|
12493
|
+
"value": "var(--iox-danger)"
|
|
12274
12494
|
}
|
|
12275
12495
|
]
|
|
12276
12496
|
},
|
|
@@ -14593,6 +14813,48 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
14593
14813
|
"type": "color",
|
|
14594
14814
|
"group": "components",
|
|
14595
14815
|
"value": "var(--iox-surface-2)"
|
|
14816
|
+
},
|
|
14817
|
+
{
|
|
14818
|
+
"name": "account-button-pad",
|
|
14819
|
+
"tier": "component",
|
|
14820
|
+
"type": "spacing",
|
|
14821
|
+
"group": "components",
|
|
14822
|
+
"value": "3px 12px"
|
|
14823
|
+
},
|
|
14824
|
+
{
|
|
14825
|
+
"name": "account-button-gap",
|
|
14826
|
+
"tier": "component",
|
|
14827
|
+
"type": "spacing",
|
|
14828
|
+
"group": "components",
|
|
14829
|
+
"value": "8px"
|
|
14830
|
+
},
|
|
14831
|
+
{
|
|
14832
|
+
"name": "account-avatar-size",
|
|
14833
|
+
"tier": "component",
|
|
14834
|
+
"type": "size",
|
|
14835
|
+
"group": "components",
|
|
14836
|
+
"value": "26px"
|
|
14837
|
+
},
|
|
14838
|
+
{
|
|
14839
|
+
"name": "account-avatar-bg",
|
|
14840
|
+
"tier": "component",
|
|
14841
|
+
"type": "color",
|
|
14842
|
+
"group": "components",
|
|
14843
|
+
"value": "var(--iox-accent)"
|
|
14844
|
+
},
|
|
14845
|
+
{
|
|
14846
|
+
"name": "account-avatar-ink",
|
|
14847
|
+
"tier": "component",
|
|
14848
|
+
"type": "color",
|
|
14849
|
+
"group": "components",
|
|
14850
|
+
"value": "var(--iox-accent-ink)"
|
|
14851
|
+
},
|
|
14852
|
+
{
|
|
14853
|
+
"name": "sign-in-error-ink",
|
|
14854
|
+
"tier": "component",
|
|
14855
|
+
"type": "color",
|
|
14856
|
+
"group": "components",
|
|
14857
|
+
"value": "var(--iox-danger)"
|
|
14596
14858
|
}
|
|
14597
14859
|
]
|
|
14598
14860
|
},
|
|
@@ -16877,6 +17139,48 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
16877
17139
|
"type": "color",
|
|
16878
17140
|
"group": "components",
|
|
16879
17141
|
"value": "var(--iox-surface-2)"
|
|
17142
|
+
},
|
|
17143
|
+
{
|
|
17144
|
+
"name": "account-button-pad",
|
|
17145
|
+
"tier": "component",
|
|
17146
|
+
"type": "spacing",
|
|
17147
|
+
"group": "components",
|
|
17148
|
+
"value": "3px 12px"
|
|
17149
|
+
},
|
|
17150
|
+
{
|
|
17151
|
+
"name": "account-button-gap",
|
|
17152
|
+
"tier": "component",
|
|
17153
|
+
"type": "spacing",
|
|
17154
|
+
"group": "components",
|
|
17155
|
+
"value": "8px"
|
|
17156
|
+
},
|
|
17157
|
+
{
|
|
17158
|
+
"name": "account-avatar-size",
|
|
17159
|
+
"tier": "component",
|
|
17160
|
+
"type": "size",
|
|
17161
|
+
"group": "components",
|
|
17162
|
+
"value": "26px"
|
|
17163
|
+
},
|
|
17164
|
+
{
|
|
17165
|
+
"name": "account-avatar-bg",
|
|
17166
|
+
"tier": "component",
|
|
17167
|
+
"type": "color",
|
|
17168
|
+
"group": "components",
|
|
17169
|
+
"value": "var(--iox-accent)"
|
|
17170
|
+
},
|
|
17171
|
+
{
|
|
17172
|
+
"name": "account-avatar-ink",
|
|
17173
|
+
"tier": "component",
|
|
17174
|
+
"type": "color",
|
|
17175
|
+
"group": "components",
|
|
17176
|
+
"value": "var(--iox-accent-ink)"
|
|
17177
|
+
},
|
|
17178
|
+
{
|
|
17179
|
+
"name": "sign-in-error-ink",
|
|
17180
|
+
"tier": "component",
|
|
17181
|
+
"type": "color",
|
|
17182
|
+
"group": "components",
|
|
17183
|
+
"value": "var(--iox-danger)"
|
|
16880
17184
|
}
|
|
16881
17185
|
]
|
|
16882
17186
|
},
|
|
@@ -19170,6 +19474,48 @@ const SPEC_FLAVOR_PACKS = [
|
|
|
19170
19474
|
"type": "color",
|
|
19171
19475
|
"group": "components",
|
|
19172
19476
|
"value": "var(--iox-surface-2)"
|
|
19477
|
+
},
|
|
19478
|
+
{
|
|
19479
|
+
"name": "account-button-pad",
|
|
19480
|
+
"tier": "component",
|
|
19481
|
+
"type": "spacing",
|
|
19482
|
+
"group": "components",
|
|
19483
|
+
"value": "3px 12px"
|
|
19484
|
+
},
|
|
19485
|
+
{
|
|
19486
|
+
"name": "account-button-gap",
|
|
19487
|
+
"tier": "component",
|
|
19488
|
+
"type": "spacing",
|
|
19489
|
+
"group": "components",
|
|
19490
|
+
"value": "8px"
|
|
19491
|
+
},
|
|
19492
|
+
{
|
|
19493
|
+
"name": "account-avatar-size",
|
|
19494
|
+
"tier": "component",
|
|
19495
|
+
"type": "size",
|
|
19496
|
+
"group": "components",
|
|
19497
|
+
"value": "26px"
|
|
19498
|
+
},
|
|
19499
|
+
{
|
|
19500
|
+
"name": "account-avatar-bg",
|
|
19501
|
+
"tier": "component",
|
|
19502
|
+
"type": "color",
|
|
19503
|
+
"group": "components",
|
|
19504
|
+
"value": "var(--iox-accent)"
|
|
19505
|
+
},
|
|
19506
|
+
{
|
|
19507
|
+
"name": "account-avatar-ink",
|
|
19508
|
+
"tier": "component",
|
|
19509
|
+
"type": "color",
|
|
19510
|
+
"group": "components",
|
|
19511
|
+
"value": "var(--iox-accent-ink)"
|
|
19512
|
+
},
|
|
19513
|
+
{
|
|
19514
|
+
"name": "sign-in-error-ink",
|
|
19515
|
+
"tier": "component",
|
|
19516
|
+
"type": "color",
|
|
19517
|
+
"group": "components",
|
|
19518
|
+
"value": "var(--iox-danger)"
|
|
19173
19519
|
}
|
|
19174
19520
|
]
|
|
19175
19521
|
}
|
|
@@ -20643,6 +20989,75 @@ function previewElementStyleAdoption(tree, ctx) {
|
|
|
20643
20989
|
return adoptElementStyles(JSON.parse(JSON.stringify(tree ?? [])), ctx);
|
|
20644
20990
|
}
|
|
20645
20991
|
|
|
20992
|
+
/**
|
|
20993
|
+
* A rendered Field's classes and its error, in design-core because two entries write into a Field: forms-core (the
|
|
20994
|
+
* string renderer's markup, the form runtimes) and composite-core (the sign-in dialog). composite-core may not import
|
|
20995
|
+
* forms-core (forms-core → actions-core → composite-core would close a cycle), and design-core imports no other entry.
|
|
20996
|
+
* forms-core re-exports all three names. Framework-free; the DOM is the caller's element.
|
|
20997
|
+
*/
|
|
20998
|
+
/** The classes the markup carries — the runtimes and the shared CSS key on these, never on a literal. */
|
|
20999
|
+
var FieldClass;
|
|
21000
|
+
(function (FieldClass) {
|
|
21001
|
+
FieldClass["Root"] = "iox-field";
|
|
21002
|
+
FieldClass["Label"] = "iox-field__label";
|
|
21003
|
+
FieldClass["LabelHidden"] = "iox-field__label--hidden";
|
|
21004
|
+
FieldClass["Required"] = "iox-field__required";
|
|
21005
|
+
FieldClass["Control"] = "iox-field__control";
|
|
21006
|
+
FieldClass["Help"] = "iox-field__help";
|
|
21007
|
+
FieldClass["Error"] = "iox-field__error";
|
|
21008
|
+
FieldClass["Group"] = "iox-field__group";
|
|
21009
|
+
FieldClass["Option"] = "iox-field__option";
|
|
21010
|
+
FieldClass["Choices"] = "iox-field__choices";
|
|
21011
|
+
FieldClass["ChoicesChips"] = "iox-field__choices--chips";
|
|
21012
|
+
FieldClass["ChoicesList"] = "iox-field__choices--list";
|
|
21013
|
+
FieldClass["Chips"] = "iox-field__chips";
|
|
21014
|
+
FieldClass["Chip"] = "iox-field__chip";
|
|
21015
|
+
FieldClass["ChipInput"] = "iox-field__control--chip";
|
|
21016
|
+
FieldClass["DateButton"] = "iox-field__control--date";
|
|
21017
|
+
FieldClass["DateValue"] = "iox-field__date-value";
|
|
21018
|
+
FieldClass["DateIcon"] = "iox-field__date-icon";
|
|
21019
|
+
FieldClass["DateInput"] = "iox-field__date-input";
|
|
21020
|
+
})(FieldClass || (FieldClass = {}));
|
|
21021
|
+
/** A field's error class on its element (shared CSS keys on it). */
|
|
21022
|
+
const FIELD_INVALID_CLASS = 'iox-invalid';
|
|
21023
|
+
/**
|
|
21024
|
+
* Say `text` as a Field's error — or clear it with '' — exactly as `IoxFieldComponent` renders one: the error paragraph
|
|
21025
|
+
* (`role=alert`, id `<control id>-error`) at the field's end, `aria-invalid` and `aria-describedby` (help first) on every
|
|
21026
|
+
* control, the invalid class on the field. ONE copy for every runtime that writes into a rendered Field (the string-form
|
|
21027
|
+
* runtime, the sign-in dialog).
|
|
21028
|
+
*/
|
|
21029
|
+
function writeFieldError(field, text) {
|
|
21030
|
+
const controls = Array.from(field.querySelectorAll(`.${FieldClass.Control}`));
|
|
21031
|
+
const id = (controls[0]?.id || `iox-field-${field.getAttribute('data-iox-field') ?? ''}`) + '-error';
|
|
21032
|
+
let p = field.querySelector(`.${FieldClass.Error}`);
|
|
21033
|
+
if (text) {
|
|
21034
|
+
if (!p) {
|
|
21035
|
+
p = field.ownerDocument.createElement('p');
|
|
21036
|
+
p.className = FieldClass.Error;
|
|
21037
|
+
p.id = id;
|
|
21038
|
+
p.setAttribute('role', 'alert');
|
|
21039
|
+
field.appendChild(p);
|
|
21040
|
+
}
|
|
21041
|
+
p.textContent = text;
|
|
21042
|
+
}
|
|
21043
|
+
else {
|
|
21044
|
+
p?.remove();
|
|
21045
|
+
}
|
|
21046
|
+
field.classList.toggle(FIELD_INVALID_CLASS, !!text);
|
|
21047
|
+
const helpId = field.querySelector(`.${FieldClass.Help}`)?.id;
|
|
21048
|
+
const describedBy = [helpId, text ? id : ''].filter(Boolean).join(' ');
|
|
21049
|
+
for (const control of controls) {
|
|
21050
|
+
if (text)
|
|
21051
|
+
control.setAttribute('aria-invalid', 'true');
|
|
21052
|
+
else
|
|
21053
|
+
control.removeAttribute('aria-invalid');
|
|
21054
|
+
if (describedBy)
|
|
21055
|
+
control.setAttribute('aria-describedby', describedBy);
|
|
21056
|
+
else
|
|
21057
|
+
control.removeAttribute('aria-describedby');
|
|
21058
|
+
}
|
|
21059
|
+
}
|
|
21060
|
+
|
|
20646
21061
|
/**
|
|
20647
21062
|
* Empty images (design-system DS3). A MARKED Image (`.iox-es-media`) with no source renders a box in
|
|
20648
21063
|
* the `surface-2` token with its aspect ratio kept — on the canvas with an "Add image" label, on the
|
|
@@ -23159,5 +23574,5 @@ function stylePresetOfChoices(choices) {
|
|
|
23159
23574
|
* Generated bundle index. Do not edit.
|
|
23160
23575
|
*/
|
|
23161
23576
|
|
|
23162
|
-
export { ACCENT_TOKEN_NAMES, ANIMATE_IDS, AdoptOutcome, AdoptSkipReason, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BETWEEN_IDS, BOTTOM_BAR_STYLE, BUTTON_VARIANT_TO_STYLE, CANVAS_LINK_ATTRIBUTE, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, COMPOSED_HEADER, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, EntranceParam, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, HEADER_THEME_COLOR_TOKEN, HELD_CONTRAST, HeaderAttribute, HeaderBehaviour, HeaderEdge, HeaderTrait, INHERITED_TEXT, LinkType, MARK_STYLES, MAX_FONT_FILE_BYTES, MOOD_IDS, MOOD_LABELS, NEW_NODE_STYLE_DEFAULTS, OPENING_ATTRIBUTE, OPENING_FOLLOWER_ROLE, OPENING_SETTING, OwnedTraitLink, PALETTE_PRESETS, PRE_DS2_FLAVOR_DEFAULTS, PRE_MOTION, PRE_TINT_DEFAULT, REDUCED_DESIGN_MOTION, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, ROW_INDEX_ATTRIBUTE, SCHEME_INK, SCROLL_IDS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FLOATING_BASELINE, SPEC_FONTS, SPEC_FONT_METRICS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_MOODS, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SCRIPTS, SPEC_SPRINGS, SPEC_STYLE_PRESETS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, STAGGER_MAX_ITEMS, STAGGER_SHRINK, STYLE_PRESETS, SUPERSEDED_STYLE_VALUES, SWISS_FLAVOR, THEME_COLOR_TOKEN, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designApplySnapshot, designBaseline, designConfigEntries, designModeOf, designMotionOf, designRevertConfig, designTokenRepairs, designTokenRows, drawsScript, elementStyleById, elementStyleClass, elementStyleFace, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, entranceDelay, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, groupFontFamilies, hasElementStyleMarker, headerAttributes, headerBehaviourOf, headerEdgeOf, headerStaysAtTop, headingHref, inSrgbGamut, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFontWeightRange, isRetiredFlavorId, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, matchFontWeight, missingDesignRows, missingFontRoles, nodeDesignClasses, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, openingFollowerSelector, ownedTraitStatus, ownedTraitsOf, packDesignChoices, pageOpeningScheme, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planSwissMigration, preTintAccentGrounds, presetChoices, presetModes, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, releaseElementStyle, repeatedRowIndex, resolveDesignChoices, resolveDesignMotion, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, scriptsForLocale, setColorScheme, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, staggerDelay, styleKeyToKebab, stylePresetById, stylePresetOfChoices, switchElementStyle, syncNodeDesignClasses, textWidthEm, themeColors, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, withoutScriptPartners, writeOwnedTrait };
|
|
23577
|
+
export { ACCENT_TOKEN_NAMES, ANIMATE_IDS, AdoptOutcome, AdoptSkipReason, BAR_RESERVE_BREAKPOINTS, BAR_RESERVE_CLASS, BETWEEN_IDS, BOTTOM_BAR_STYLE, BUTTON_VARIANT_TO_STYLE, CANVAS_LINK_ATTRIBUTE, CARD_LINK_CLASS, COLOR_SCHEMES, COLOR_SCHEME_TRAIT, COLOR_SCHEME_TYPES, COMPOSED_HEADER, ColorScheme, ColourCheckId, DEFAULT_FLAVOR_ID, DESIGN_TOKEN_GROUPS, DESIGN_TOKEN_TIERS, DESIGN_TOKEN_TYPES, DesignConfigKey, ELEMENT_STYLES, ELEMENT_STYLE_MARKER_CLASS, ELEMENT_STYLE_STATES, EMPTY_IMAGE_ATTRIBUTE, EMPTY_IMAGE_SRC, ElementStyleState, EntranceParam, FIELD_INVALID_CLASS, FLAVOR_SPEC_VERSION, FONT_CATALOG, FONT_FAMILY_TOKENS, FONT_FILE_ACCEPT, FONT_FILE_EXTENSIONS, FONT_FILE_FORMATS, FONT_STYLES, FONT_WEIGHTS, FieldClass, FontUploadError, GOOGLE_FONTS_CSS_ORIGIN, GOOGLE_FONTS_FILE_ORIGIN, HEADER_THEME_COLOR_TOKEN, HELD_CONTRAST, HeaderAttribute, HeaderBehaviour, HeaderEdge, HeaderTrait, INHERITED_TEXT, LinkType, MARK_STYLES, MAX_FONT_FILE_BYTES, MOOD_IDS, MOOD_LABELS, NEW_NODE_STYLE_DEFAULTS, OPENING_ATTRIBUTE, OPENING_FOLLOWER_ROLE, OPENING_SETTING, OwnedTraitLink, PALETTE_PRESETS, PRE_DS2_FLAVOR_DEFAULTS, PRE_MOTION, PRE_TINT_DEFAULT, REDUCED_DESIGN_MOTION, REDUCED_MOTION_OVERRIDES, REDUCED_TRANSPARENCY_OVERRIDES, REVERT_WINDOW_MS, ROW_INDEX_ATTRIBUTE, SCHEME_INK, SCROLL_IDS, SPEC_A11Y, SPEC_AXES, SPEC_BUTTON_VARIANT_TO_STYLE, SPEC_CONTRAST, SPEC_CONTRAST_AUDIT, SPEC_DEFAULT_ELEMENT_STYLE, SPEC_ELEMENT_STYLES, SPEC_FIELD_CLASS_BASELINE, SPEC_FLAVORS, SPEC_FLAVOR_PACKS, SPEC_FLOATING_BASELINE, SPEC_FONTS, SPEC_FONT_METRICS, SPEC_FONT_ROLES, SPEC_INK_SCOPES, SPEC_LEGACY_ALIASES, SPEC_MOODS, SPEC_PALETTE_PRESETS, SPEC_SCHEMES, SPEC_SCHEME_INK, SPEC_SCRIPTS, SPEC_SPRINGS, SPEC_STYLE_PRESETS, SPEC_TIERS, SPEC_TIER_IDS, SPEC_TOKEN_TYPES, STAGGER_MAX_ITEMS, STAGGER_SHRINK, STYLE_PRESETS, SUPERSEDED_STYLE_VALUES, SWISS_FLAVOR, THEME_COLOR_TOKEN, TINT_FULL_CHROMA, TINT_IDS, TINT_LEVELS, TINT_OWN_HUE_CHROMA, TINT_TURN_CHROMA, USER_TOKEN_SOURCE, WCAG_AA_TEXT, WCAG_AA_UI, adoptElementStyles, adoptionStyleFor, apcaLc, applyElementStyle, applyHeadingLevelRule, atLightness, atLightnessMaxChroma, auditDesignContrast, barReserveClass, buildFlavorTokens, buildFontFaceCss, buttonBlockHref, catalogFontId, checkFontWeight, choicesForPack, colorSchemeClass, colorSchemeOf, colourTabChecks, compareFontWeights, compileSchemeCss, compileTokenCss, compileTokenCssBlocks, compositeOver, cssString, defaultDesignChoices, defaultElementStyleFor, deriveAccentTokens, deriveBrandTokens, designApplySnapshot, designBaseline, designConfigEntries, designModeOf, designMotionOf, designRevertConfig, designTokenRepairs, designTokenRows, drawsScript, elementStyleById, elementStyleClass, elementStyleFace, elementStylesFor, emptyImageLabelSrc, emptyImagePlaceholder, emptyImageSrc, ensureAlpha, ensureContrast, entranceDelay, flavorColours, flavorPackById, flavorSeedWrites, flavorSourceStamp, fontFamilyKey, fontFileName, fontFileStem, fontFormatOf, fontPreloads, fontRoleReferences, fontStackWithout, fontWeightCovers, fontWeightRange, fontWeightValue, fontsForTokens, formatFontFamilies, formatFontFamily, formatFontWeight, googleFontHref, groupFontFamilies, hasElementStyleMarker, headerAttributes, headerBehaviourOf, headerEdgeOf, headerStaysAtTop, headingHref, inSrgbGamut, isDesignTokenGroup, isDesignTokenTier, isDesignTokenType, isFontWeightRange, isRetiredFlavorId, legacyDesignTokenRows, legacyFlavorTokens, legacyRuleTokenReferences, matchFontWeight, missingDesignRows, missingFontRoles, nodeDesignClasses, normalizeFontStyle, normalizeFontWeight, normalizeFontWeightValue, oklabToRgb, openingFollowerSelector, ownedTraitStatus, ownedTraitsOf, packDesignChoices, pageOpeningScheme, paintColours, parseCssColour, parseFontFamilies, parseFontWeight, parseHexColor, planDesignApply, planDesignRevert, planFlavorRevert, planFlavorSeed, planFontFamilyRemoval, planSwissMigration, preTintAccentGrounds, presetChoices, presetModes, previewElementStyleAdoption, previewFontWeight, quantizeRgb, readDesignConfig, readOwnedTrait, relativeLuminance, releaseElementStyle, repeatedRowIndex, resolveDesignChoices, resolveDesignMotion, resolveSchemeTokenValues, resolveTokenReferences, resolveTokenValues, revertAvailable, rgbToOklab, ringColour, roleClass, sameDesignChoices, scriptsForLocale, setColorScheme, specTokenNames, splitTopLevel, springToLinear, stackNamesFamily, staggerDelay, styleKeyToKebab, stylePresetById, stylePresetOfChoices, switchElementStyle, syncNodeDesignClasses, textWidthEm, themeColors, toHexColor, tokenReferences, tokensToDarkVarMap, tokensToVarMap, unknownTokenReferences, untouchedSeedRow, userFontStack, validateFlavorPack, wcagContrastRatio, withSchemeInk, withoutScriptPartners, writeFieldError, writeOwnedTrait };
|
|
23163
23578
|
//# sourceMappingURL=vectoriox-iox-ui-design-core.mjs.map
|