@vectoriox/iox-builder 4.21.0 → 4.23.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.
@@ -3791,7 +3791,7 @@ class StyleRegistryService {
3791
3791
  * (e.g., `{ 'iox-primary-color': '#cb9090' }`).
3792
3792
  * Pass an empty object to clear all tokens.
3793
3793
  */
3794
- upsertTokens(tokens) {
3794
+ upsertTokens(tokens, darkTokens) {
3795
3795
  const entries = Object.entries(tokens)
3796
3796
  .filter(([, v]) => v !== undefined && v !== null && v !== '')
3797
3797
  .map(([k, v]) => ` --${k}: ${v};`);
@@ -3801,6 +3801,17 @@ class StyleRegistryService {
3801
3801
  else {
3802
3802
  this.rules.delete('__tokens__');
3803
3803
  }
3804
+ // Dark-scheme overrides (flavors F0): variables only, appended as the token layer's
3805
+ // LAST rule — one ordering convention for every @media block (responsive A3 lesson).
3806
+ const darkEntries = Object.entries(darkTokens ?? {})
3807
+ .filter(([, v]) => v !== undefined && v !== null && v !== '')
3808
+ .map(([k, v]) => ` --${k}: ${v};`);
3809
+ if (darkEntries.length) {
3810
+ this.rules.set('__tokens_dark__', `@media (prefers-color-scheme: dark) {\n :root {\n${darkEntries.join('\n')}\n }\n}`);
3811
+ }
3812
+ else {
3813
+ this.rules.delete('__tokens_dark__');
3814
+ }
3804
3815
  this.flush();
3805
3816
  }
3806
3817
  remove(nodeId) {
@@ -9851,6 +9862,11 @@ class FormComponentConfig extends ComponentConfig {
9851
9862
  { label: 'As you type', value: 'live' },
9852
9863
  ], 'smart'),
9853
9864
  new TraitConfig('resetAfterSubmit', 'Clear the form after submit', TraitInputType.Checkbox, undefined, false),
9865
+ // Board 11 — "when it fails". Both default ON: they are what a well-behaved form does,
9866
+ // and an author turns one off deliberately. Edited in the Form Studio's States tab,
9867
+ // which is why they carry no SectionLabel of their own here.
9868
+ new TraitConfig('focusFirstProblem', 'Jump to the first problem', TraitInputType.Checkbox, undefined, true),
9869
+ new TraitConfig('announceFailure', 'Announce it out loud', TraitInputType.Checkbox, undefined, true),
9854
9870
  new TraitConfig('__spamLabel', 'Spam protection', TraitInputType.SectionLabel),
9855
9871
  // On by default and invisible to the visitor (decision D12).
9856
9872
  new TraitConfig('honeypot', 'Honeypot field', TraitInputType.Checkbox, undefined, true),