@lmvz-ds/components 0.13.1 → 0.13.3

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 (98) hide show
  1. package/dist/cjs/{icons-FIfJEo6G.js → Effect-CpZhfb0D.js} +5153 -1359
  2. package/dist/cjs/aria-loader-BBKbBZLq.js +76 -0
  3. package/dist/cjs/{assets-CJzJZPzV.js → assets-BnJmIx_h.js} +2 -2
  4. package/dist/cjs/icons-Brr4vqiE.js +653 -0
  5. package/dist/cjs/{index-D3BMpL5w.js → index-9ZJx0550.js} +3 -0
  6. package/dist/cjs/index-QRnWYctw.js +35629 -0
  7. package/dist/cjs/index.cjs.js +12 -4
  8. package/dist/cjs/lmvz-action.cjs.entry.js +1 -1
  9. package/dist/cjs/lmvz-button.cjs.entry.js +6 -3
  10. package/dist/cjs/lmvz-card.cjs.entry.js +2 -2
  11. package/dist/cjs/lmvz-chip.cjs.entry.js +1 -1
  12. package/dist/cjs/lmvz-components.cjs.js +1 -1
  13. package/dist/cjs/lmvz-header.cjs.entry.js +8 -5
  14. package/dist/cjs/lmvz-icon.cjs.entry.js +20 -9
  15. package/dist/cjs/lmvz-input.cjs.entry.js +8 -5
  16. package/dist/cjs/lmvz-menuitem.cjs.entry.js +7 -4
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/cjs/{reactive-controller-host-BMDEj1kX.js → reactive-controller-host-DWpVosFu.js} +71 -50
  19. package/dist/collection/components/lmvz-button/lmvz-button.js +3 -1
  20. package/dist/collection/components/lmvz-header/lmvz-header.js +5 -3
  21. package/dist/collection/components/lmvz-icon/lmvz-icon.js +14 -5
  22. package/dist/collection/components/lmvz-input/lmvz-input.js +5 -3
  23. package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js +4 -2
  24. package/dist/collection/index.js +1 -0
  25. package/dist/collection/integration/header-integration.js +1 -3
  26. package/dist/collection/utils/aria/aria-validation-controller.js +68 -27
  27. package/dist/components/index.js +1 -1
  28. package/dist/components/lmvz-action.js +1 -1
  29. package/dist/components/lmvz-button.js +1 -1
  30. package/dist/components/lmvz-card.js +1 -1
  31. package/dist/components/lmvz-chip.js +1 -1
  32. package/dist/components/lmvz-header.js +1 -1
  33. package/dist/components/lmvz-icon.js +1 -1
  34. package/dist/components/lmvz-input.js +1 -1
  35. package/dist/components/lmvz-menuitem.js +1 -1
  36. package/dist/components/p-BaPwpeMs.js +1 -0
  37. package/dist/components/p-Bz0S2cGj.js +1 -0
  38. package/dist/components/p-CSRpdnrt.js +1 -0
  39. package/dist/components/p-DK2hpvEW.js +12 -0
  40. package/dist/{lmvz-components/p-CVf2C8dL.js → components/p-DcMNH3fv.js} +1 -1
  41. package/dist/components/p-DugBvwmd.js +1 -0
  42. package/dist/esm/{icons-CM7lsnuO.js → Effect-DyamyJqO.js} +4951 -1357
  43. package/dist/esm/aria-loader-DB71Xewa.js +69 -0
  44. package/dist/esm/{assets-BelZNJ1W.js → assets-CvV1KMMV.js} +1 -1
  45. package/dist/esm/icons-C69Um2xB.js +649 -0
  46. package/dist/esm/index-CekEw3_K.js +35626 -0
  47. package/dist/esm/{index-T5ljELGS.js → index-smGPjoDX.js} +3 -1
  48. package/dist/esm/index.js +5 -4
  49. package/dist/esm/lmvz-action.entry.js +1 -1
  50. package/dist/esm/lmvz-button.entry.js +6 -3
  51. package/dist/esm/lmvz-card.entry.js +2 -2
  52. package/dist/esm/lmvz-chip.entry.js +1 -1
  53. package/dist/esm/lmvz-components.js +2 -2
  54. package/dist/esm/lmvz-header.entry.js +8 -5
  55. package/dist/esm/lmvz-icon.entry.js +20 -9
  56. package/dist/esm/lmvz-input.entry.js +8 -5
  57. package/dist/esm/lmvz-menuitem.entry.js +7 -4
  58. package/dist/esm/loader.js +2 -2
  59. package/dist/esm/{reactive-controller-host-CZ3dGAjR.js → reactive-controller-host-1nFoJEdT.js} +65 -44
  60. package/dist/lmvz-components/index.esm.js +1 -1
  61. package/dist/lmvz-components/lmvz-components.esm.js +1 -1
  62. package/dist/lmvz-components/{p-d9dc29a1.entry.js → p-0e5aa1a3.entry.js} +1 -1
  63. package/dist/lmvz-components/p-5775a56c.entry.js +1 -0
  64. package/dist/lmvz-components/p-814ee542.entry.js +1 -0
  65. package/dist/lmvz-components/{p-feda2ec5.entry.js → p-9faac8f3.entry.js} +1 -1
  66. package/dist/lmvz-components/p-B3j8zrhV.js +1 -0
  67. package/dist/lmvz-components/p-BEoSvNlI.js +1 -0
  68. package/dist/lmvz-components/p-BTpia82J.js +1 -0
  69. package/dist/{components/p-CdYWDK7m.js → lmvz-components/p-D7GrtdQF.js} +1 -1
  70. package/dist/lmvz-components/p-DyamyJqO.js +1 -0
  71. package/dist/lmvz-components/p-c61f7daa.entry.js +1 -0
  72. package/dist/lmvz-components/p-c6bae21b.entry.js +1 -0
  73. package/dist/lmvz-components/p-cM67HC0Z.js +12 -0
  74. package/dist/lmvz-components/{p-980688a0.entry.js → p-d4b68381.entry.js} +1 -1
  75. package/dist/lmvz-components/p-f1559aa1.entry.js +1 -0
  76. package/dist/lmvz-components/p-smGPjoDX.js +2 -0
  77. package/dist/manifest.json +1 -1
  78. package/dist/types/components/lmvz-button/lmvz-button.d.ts +1 -0
  79. package/dist/types/components/lmvz-header/lmvz-header.d.ts +1 -0
  80. package/dist/types/components/lmvz-icon/lmvz-icon.d.ts +3 -0
  81. package/dist/types/components/lmvz-input/lmvz-input.d.ts +2 -1
  82. package/dist/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +3 -1
  83. package/dist/types/index.d.ts +1 -0
  84. package/dist/types/utils/aria/aria-validation-controller.d.ts +8 -2
  85. package/hydrate/index.js +96 -39
  86. package/hydrate/index.mjs +96 -39
  87. package/package.json +6 -8
  88. package/dist/components/p-BsS3QvWn.js +0 -1
  89. package/dist/components/p-CMteT-Yo.js +0 -1
  90. package/dist/components/p-vi4YzJmv.js +0 -1
  91. package/dist/lmvz-components/p-16878d4c.entry.js +0 -1
  92. package/dist/lmvz-components/p-6e3314ab.entry.js +0 -1
  93. package/dist/lmvz-components/p-8ea1a349.entry.js +0 -1
  94. package/dist/lmvz-components/p-BoR31cjC.js +0 -1
  95. package/dist/lmvz-components/p-CZ3dGAjR.js +0 -1
  96. package/dist/lmvz-components/p-T5ljELGS.js +0 -2
  97. package/dist/lmvz-components/p-a34542fa.entry.js +0 -1
  98. package/dist/lmvz-components/p-d2bf6a3f.entry.js +0 -1
@@ -1,8 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var icons = require('./icons-FIfJEo6G.js');
4
- require('./assets-CJzJZPzV.js');
5
- require('./index-D3BMpL5w.js');
3
+ var ariaLoader = require('./aria-loader-BBKbBZLq.js');
4
+ var icons = require('./icons-Brr4vqiE.js');
5
+ var Effect = require('./Effect-CpZhfb0D.js');
6
+ require('./assets-BnJmIx_h.js');
7
+ require('./index-9ZJx0550.js');
6
8
 
7
9
  const variants = ['primary', 'secondary', 'tertiary'];
8
10
  const scaleValues = ['small', 'default', 'large'];
@@ -79,11 +81,17 @@ const iconNames = [
79
81
  ];
80
82
 
81
83
  function run(effect) {
82
- return icons.runPromise(effect).catch(error => {
84
+ return Effect.runPromise(effect).catch(error => {
83
85
  console.error('Unhandled error in Effect:', error);
84
86
  });
85
87
  }
86
88
 
89
+ exports.ARIA_VALIDATION_RUNTIME_CHANGED_EVENT = ariaLoader.ARIA_VALIDATION_RUNTIME_CHANGED_EVENT;
90
+ exports.disableAriaValidation = ariaLoader.disableAriaValidation;
91
+ exports.enableAriaValidation = ariaLoader.enableAriaValidation;
92
+ exports.isAriaValidationEnabled = ariaLoader.isAriaValidationEnabled;
93
+ exports.queueValidation = ariaLoader.queueValidation;
94
+ exports.useVerboseLogging = ariaLoader.useVerboseLogging;
87
95
  exports.clearIconCache = icons.clearIconCache;
88
96
  exports.iconNames = iconNames;
89
97
  exports.iconSizes = iconSizes;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D3BMpL5w.js');
3
+ var index = require('./index-9ZJx0550.js');
4
4
 
5
5
  const lmvzActionCss = () => `:host{display:block}`;
6
6
 
@@ -1,15 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D3BMpL5w.js');
3
+ var index = require('./index-9ZJx0550.js');
4
4
  var index$1 = require('./index-Bp6Dd2i1.js');
5
- var reactiveControllerHost = require('./reactive-controller-host-BMDEj1kX.js');
5
+ var reactiveControllerHost = require('./reactive-controller-host-DWpVosFu.js');
6
6
  var elementActivationController = require('./element-activation-controller-DC_6T0Rt.js');
7
7
  var component = require('./component-CRc6eHcV.js');
8
+ require('./aria-loader-BBKbBZLq.js');
8
9
 
9
10
  const lmvzButtonCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } @layer lmvz-ds.reset { h1, h2, h3, h4, h5, h6 { margin: 0; } } :host { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-status-selected, #f1f9fe); outline-offset: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-button-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-border-color: var(--lmvz-semantic-color-border-active, #d4d4d4); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-padding-block: var(--lmvz-component-input-sm-padding-y, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-gap: var(--lmvz-component-input-sm-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-lg-padding-x, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-lg-padding-y, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-lg-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: contents; } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } `;
10
11
 
11
12
  const LmvzButton = class extends reactiveControllerHost.ReactiveControllerHost {
12
13
  get el() { return index.getElement(this); }
14
+ validationEl;
13
15
  inheritedAttributes = {};
14
16
  formEl = null;
15
17
  formButtonEl = null;
@@ -34,6 +36,7 @@ const LmvzButton = class extends reactiveControllerHost.ReactiveControllerHost {
34
36
  }
35
37
  connectedCallback() {
36
38
  this.inheritedAttributes = component.inheritAriaAttributes(this.el);
39
+ super.connectedCallback();
37
40
  }
38
41
  renderHiddenButton() {
39
42
  const formEl = (this.formEl = component.findFormByRef(this.form, this.el));
@@ -61,7 +64,7 @@ const LmvzButton = class extends reactiveControllerHost.ReactiveControllerHost {
61
64
  };
62
65
  render() {
63
66
  this.renderHiddenButton();
64
- return (index.h(index.Host, { key: 'cd4a63b866c801ad7f96f59d15e561a54bfe9ec2', "aria-disabled": this.disabled ? 'true' : null }, index.h("button", { key: 'a1e3ecb88fb84d724df4939519bb22d4b6725c1d', disabled: this.disabled, class: index$1.classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, index.h("slot", { key: 'f1fd32c993b1ef9f6d62d6f3affa169c9368df78' }))));
67
+ return (index.h(index.Host, { key: '3f3eda78349322ce5160d7aac1290a73f0adcd4a', "aria-disabled": this.disabled ? 'true' : null }, index.h("button", { key: 'b132404d8d5f5bf0fa7e845b562c953c5ceec36c', ref: (e) => (this.validationEl = e), disabled: this.disabled, class: index$1.classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, index.h("slot", { key: 'ce63f7f1061ec9c3f10cbcfc67998ddbf3e04c3d' }))));
65
68
  }
66
69
  static get delegatesFocus() { return true; }
67
70
  };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D3BMpL5w.js');
4
- var assets = require('./assets-CJzJZPzV.js');
3
+ var index = require('./index-9ZJx0550.js');
4
+ var assets = require('./assets-BnJmIx_h.js');
5
5
 
6
6
  const lmvzCardCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } @layer lmvz-ds.reset { h1, h2, h3, h4, h5, h6 { margin: 0; } } .sc-lmvz-card-h { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-status-selected, #f1f9fe); outline-offset: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-button-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-border-color: var(--lmvz-semantic-color-border-active, #d4d4d4); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-padding-block: var(--lmvz-component-input-sm-padding-y, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-gap: var(--lmvz-component-input-sm-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-lg-padding-x, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-lg-padding-y, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-lg-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: flex; min-width: var(--lmvz-other-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-other-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2rem, 1.94rem + 0.26vw, 2.25rem) / 1.2 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }`;
7
7
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D3BMpL5w.js');
3
+ var index = require('./index-9ZJx0550.js');
4
4
 
5
5
  const lmvzChipCss = () => `:host{display:block}`;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D3BMpL5w.js');
3
+ var index = require('./index-9ZJx0550.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
@@ -1,8 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D3BMpL5w.js');
4
- var reactiveControllerHost = require('./reactive-controller-host-BMDEj1kX.js');
3
+ var index = require('./index-9ZJx0550.js');
4
+ var reactiveControllerHost = require('./reactive-controller-host-DWpVosFu.js');
5
5
  var component = require('./component-CRc6eHcV.js');
6
+ require('./aria-loader-BBKbBZLq.js');
6
7
 
7
8
  class ListKeyboardNavigationController {
8
9
  host;
@@ -52,6 +53,7 @@ const lmvzHeaderCss = () => `:host{display:flex;width:100vw;flex-direction:row;a
52
53
 
53
54
  const LmvzHeader = class extends reactiveControllerHost.ReactiveControllerHost {
54
55
  get el() { return index.getElement(this); }
56
+ validationEl = this.el;
55
57
  primarySlot;
56
58
  secondarySlot;
57
59
  secondaryNav;
@@ -82,6 +84,7 @@ const LmvzHeader = class extends reactiveControllerHost.ReactiveControllerHost {
82
84
  this.primarySlot.addEventListener('slotchange', this.handlePrimaryNavItemsChange.bind(this));
83
85
  this.handlePrimaryNavItemsChange();
84
86
  this.secondarySlot.addEventListener('slotchange', this.handleSecondaryNavItemsChange.bind(this));
87
+ super.componentDidLoad();
85
88
  }
86
89
  handlePrimaryNavItemsChange() {
87
90
  const items = this.primaryMenuitems;
@@ -89,7 +92,7 @@ const LmvzHeader = class extends reactiveControllerHost.ReactiveControllerHost {
89
92
  console.warn('Primary slot has no assigned elements. Please add navigation items to the primary slot.');
90
93
  return;
91
94
  }
92
- items.forEach(el => {
95
+ items.forEach((el) => {
93
96
  el.setAttribute('aria-haspopup', 'true');
94
97
  el.setAttribute('aria-controls', `nav-secondary`);
95
98
  });
@@ -108,7 +111,7 @@ const LmvzHeader = class extends reactiveControllerHost.ReactiveControllerHost {
108
111
  updateElementsActive() {
109
112
  const items = this.primaryMenuitems;
110
113
  let label;
111
- items.forEach(el => {
114
+ items.forEach((el) => {
112
115
  const isActive = el.id === this.lmvzActiveNav;
113
116
  if (isActive)
114
117
  label = el.textContent || el.id;
@@ -123,7 +126,7 @@ const LmvzHeader = class extends reactiveControllerHost.ReactiveControllerHost {
123
126
  }
124
127
  }
125
128
  render() {
126
- return (index.h(index.Host, { key: '783c855e49e1a2447107d6205a1b2c50285ccfff', onFocus: this.delegateFocus.bind(this) }, index.h("div", { key: '84a78b0ed3e170c49a711fa4091f80dbc7003b2f', class: "brand" }, index.h("slot", { key: '76cc54f17a7bc5f825433fc56351666a93891fd2', name: "brand" }, index.h("lmvz-icon", { key: 'e196e43720cb4b4c3f79b3071d534b50480f6206', id: "fallback-logo-lmvz", icon: "Logo", size: "inherit", "aria-label": "Lehrmittelverlag Z\u00FCrich" }))), index.h("nav", { key: 'd25a719752bd4085da5ad18af94afc66e9cabd5e', "aria-label": "Hauptnavigation" }, index.h("div", { key: '8a12c2c53bd061b3559ce9693780e592b3d7aa32', role: "menubar", class: "primary-menubar" }, index.h("slot", { key: '4461632675dc657f675883e8ef618e371ace0ad7', name: "nav-primary", ref: el => (this.primarySlot = el) }), index.h("div", { key: 'c1dabc588ac376db667df32d3edbdd6dce60aaad', role: "menu", id: "nav-secondary", class: "secondary-menubar", hidden: !this.lmvzActiveNav, ref: el => (this.secondaryNav = el) }, index.h("slot", { key: '74ca44ee2f755ffe9ea3ebc19cc2b227ae22df8b', name: this.secondarySlotName, ref: el => (this.secondarySlot = el) })))), index.h("div", { key: 'a4d250a5fcd10390aed1f5369c28ddec9aa9ee8d', class: "actions" }, index.h("slot", { key: '77a499ce12d269e79221ca971cc1b203d179f459', name: "actions" }))));
129
+ return (index.h(index.Host, { key: '7c257913615a89b9be8f959b4dc43664ee474113', onFocus: this.delegateFocus.bind(this) }, index.h("div", { key: '70f33263e629170d1b19cbfb1a00ca1adbbe91e0', class: 'brand' }, index.h("slot", { key: 'd9c99c51da3210e5459684e59e66baf1622a8946', name: 'brand' }, index.h("lmvz-icon", { key: '18bd0e88032c023d319bc3fac43c2b09d5098893', id: 'fallback-logo-lmvz', icon: 'Logo', size: 'inherit', "aria-label": 'Lehrmittelverlag Z\u00FCrich' }))), index.h("nav", { key: 'c56a1e63344e42b1be26fe817705f0265bdb2bcf', "aria-label": 'Hauptnavigation' }, index.h("div", { key: 'fbaebcb4857b0fba7b81cc35ef6092bb98ae89f8', role: 'menubar', class: 'primary-menubar' }, index.h("slot", { key: '4a408eacbb41fa57d838581c18389241dce0e634', name: 'nav-primary', ref: (el) => (this.primarySlot = el) }), index.h("div", { key: '6229842569958c724478c6aa15adc75b07d8417e', role: 'menu', id: 'nav-secondary', class: 'secondary-menubar', hidden: !this.lmvzActiveNav, ref: (el) => (this.secondaryNav = el) }, index.h("slot", { key: '4dd4278eaa77cfc984e338da6bb1aa7321c6a545', name: this.secondarySlotName, ref: (el) => (this.secondarySlot = el) })))), index.h("div", { key: '98b7802b0dc2dfe3a7a38bf89ae2b68994734396', class: 'actions' }, index.h("slot", { key: '5f7682fe0ad34496b887baab7b19641a86c01acb', name: 'actions' }))));
127
130
  }
128
131
  static get watchers() { return {
129
132
  "lmvzActiveNav": [{
@@ -1,15 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D3BMpL5w.js');
4
- var icons = require('./icons-FIfJEo6G.js');
5
- var reactiveControllerHost = require('./reactive-controller-host-BMDEj1kX.js');
6
- require('./assets-CJzJZPzV.js');
3
+ var index = require('./index-9ZJx0550.js');
4
+ var Effect = require('./Effect-CpZhfb0D.js');
5
+ var reactiveControllerHost = require('./reactive-controller-host-DWpVosFu.js');
6
+ var icons = require('./icons-Brr4vqiE.js');
7
+ require('./aria-loader-BBKbBZLq.js');
8
+ require('./assets-BnJmIx_h.js');
7
9
 
8
10
  const lmvzIconCss = () => `.sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));display:inline-block;line-height:0;svg{display:block}svg>path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));height:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))}}[size='sm'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.81rem + 0.26vw, 1.13rem));height:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.81rem + 0.26vw, 1.13rem))}}[size='md'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-md, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));height:var(--lmvz-component-icon-size-md, clamp(1rem, 0.88rem + 0.52vw, 1.5rem))}}[size='lg'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.38rem + 0.52vw, 2rem));height:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.38rem + 0.52vw, 2rem))}}[size='inherit'].sc-lmvz-icon-h{svg{width:inherit;height:inherit}}[weight='light'].sc-lmvz-icon-h{svg>path{stroke-width:1}}[weight='medium'].sc-lmvz-icon-h{svg>path{stroke-width:1.5}}[weight='bold'].sc-lmvz-icon-h{svg>path{stroke-width:2}}[weight='filled'].sc-lmvz-icon-h{svg>path{stroke-width:2;fill:var(--lmvz-icon-color)}}`;
9
11
 
10
12
  const LmvzIcon = class extends reactiveControllerHost.ReactiveControllerHost {
11
13
  intersectionObserver;
14
+ ariaValidationController = new reactiveControllerHost.AriaValidationController(this);
12
15
  get el() { return index.getElement(this); }
16
+ validationEl;
13
17
  icon;
14
18
  weight = 'medium';
15
19
  size = 'md';
@@ -22,37 +26,44 @@ const LmvzIcon = class extends reactiveControllerHost.ReactiveControllerHost {
22
26
  constructor(hostRef) {
23
27
  super();
24
28
  index.registerInstance(this, hostRef);
25
- this.addController(new reactiveControllerHost.AriaValidationController(this));
29
+ this.addController(this.ariaValidationController);
26
30
  }
27
31
  connectedCallback() {
28
32
  this.waitUntilVisible(() => {
29
33
  this.visible = true;
30
34
  this.loadIconPathData();
31
35
  });
36
+ super.connectedCallback();
32
37
  }
33
38
  disconnectedCallback() {
34
39
  if (this.intersectionObserver) {
35
40
  this.intersectionObserver.disconnect();
36
41
  this.intersectionObserver = null;
37
42
  }
43
+ super.disconnectedCallback();
38
44
  }
39
45
  async loadIconPathData() {
40
46
  const { icon, visible } = this;
41
47
  if (!icon || !visible) {
42
48
  return;
43
49
  }
44
- this.iconData = await icons.runPromise(icons.fetchIconSvg(this.icon).pipe(icons.tapError(error => icons.logError(`Error loading icon "${icon}":`, error.message, error.cause, error.stack)), icons.catchAll(() => icons.succeed(icons.emptyDefaultSvg()))));
50
+ this.iconData = await Effect.runPromise(icons.fetchIconSvg(this.icon).pipe(Effect.tapError((error) => Effect.logError(`Error loading icon "${icon}":`, error.message, error.cause, error.stack)), Effect.catchAll(() => Effect.succeed(icons.emptyDefaultSvg()))));
51
+ }
52
+ componentDidRender() {
53
+ this.validationEl = this.el.querySelector('svg');
54
+ this.ariaValidationController.revalidateAria();
55
+ super.componentDidRender();
45
56
  }
46
57
  render() {
47
- return index.h(index.Host, { key: 'd4c1cbfbaf39ebf6aa26415d46100763b9f89b5b', role: "img", "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
58
+ return index.h(index.Host, { key: '8b1ce550253e994650fe91de38496aff7c7eccc2', role: 'img', "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
48
59
  }
49
60
  waitUntilVisible(callback, rootMargin = 50) {
50
61
  if (typeof window === 'undefined' || !window.IntersectionObserver) {
51
62
  callback();
52
63
  return;
53
64
  }
54
- this.intersectionObserver = new IntersectionObserver(entries => {
55
- entries.some(entry => {
65
+ this.intersectionObserver = new IntersectionObserver((entries) => {
66
+ entries.some((entry) => {
56
67
  if (entry.isIntersecting) {
57
68
  this.intersectionObserver.disconnect();
58
69
  this.intersectionObserver = null;
@@ -1,15 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D3BMpL5w.js');
3
+ var index = require('./index-9ZJx0550.js');
4
4
  var index$1 = require('./index-Bp6Dd2i1.js');
5
- var reactiveControllerHost = require('./reactive-controller-host-BMDEj1kX.js');
5
+ var reactiveControllerHost = require('./reactive-controller-host-DWpVosFu.js');
6
6
  var component = require('./component-CRc6eHcV.js');
7
+ require('./aria-loader-BBKbBZLq.js');
7
8
 
8
9
  const lmvzInputCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-input-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --input-radius: var(--lmvz-component-input-radius-default, 999px); --input-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --input-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --input-border-color-hover: var(--lmvz-semantic-color-border-hover, #c7c7c7); --input-border-color-focus: var(--lmvz-semantic-color-status-on-selected, #0e7ab4); --input-border-width: var(--lmvz-semantic-border-width-default, 1px); --input-height: 48px; --input-padding-x: 16px; --label-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --error-text-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); --label-floating-scale: 0.85; --label-minimized-top: -6px; --label-minimized-bg: var(--input-bg); --label-minimized-padding-x: 4px; --input-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); } .input-container.sc-lmvz-input { display: flex; flex-direction: column; position: relative; width: 100%; } .input-wrapper.sc-lmvz-input { background-color: var(--input-bg); border: var(--input-border-width) solid var(--input-border-color); border-radius: var(--input-radius); display: flex; align-items: center; height: var(--input-height); padding: 0 var(--input-padding-x); position: relative; transition: border-color 0.2s ease; gap: 8px; } [disabled].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { opacity: var(--input-disabled-opacity); cursor: not-allowed; pointer-events: none; } .input-container.sc-lmvz-input:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--input-border-color-focus); outline: 2px solid var(--input-border-color-focus); outline-offset: 2px; } .input-container.sc-lmvz-input:has(input:focus-visible) .input-wrapper.sc-lmvz-input { box-shadow: 0 0 0 3px rgb(0 86 214 / 20%); } [error].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); } [error].sc-lmvz-input-h:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); outline-color: var(--error-text-color); } .sc-lmvz-input-h:not([disabled]) .input-wrapper.sc-lmvz-input:hover { border-color: var(--input-border-color-hover); } .label-input-group.sc-lmvz-input { position: relative; flex-grow: 1; display: flex; align-items: center; height: 100%; } label.sc-lmvz-input { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--label-color); font-size: 14px; font-family: Router, sans-serif; font-weight: 400; pointer-events: none; transition: all 0.2s ease-out; background-color: transparent; padding: 0; margin: 0; line-height: normal; white-space: nowrap; } label.floating.sc-lmvz-input { top: 0; transform: translateY(-50%) scale(0.85); transform-origin: left top; background-color: var(--label-minimized-bg); padding: 0 var(--label-minimized-padding-x); left: -2px; color: var(--input-text-color); font-weight: 500; } .required-indicator.sc-lmvz-input { color: var(--error-text-color); margin-left: 2px; } input.sc-lmvz-input { border: none; background: transparent; width: 100%; height: 100%; color: var(--input-text-color); font-family: inherit; font-size: 14px; outline: none; padding: 0; margin: 0; font-weight: 400; } input.sc-lmvz-input::placeholder { color: var(--label-color); } div.sc-lmvz-input:empty { display: none; } [role='status'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--helper-text-color); font-family: Router, sans-serif; font-weight: 500; } [role='alert'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--error-text-color); font-family: Router, sans-serif; font-weight: 500; } .sc-lmvz-input-s > lmvz-button { --lmvz-button-padding: 4px; }`;
9
10
 
10
11
  let inputIdCounter = 0;
11
12
  const LmvzInput = class extends reactiveControllerHost.ReactiveControllerHost {
12
13
  get el() { return index.getElement(this); }
14
+ validationEl = this.el;
13
15
  lmvzInput;
14
16
  internals;
15
17
  nativeInputElement;
@@ -86,7 +88,7 @@ const LmvzInput = class extends reactiveControllerHost.ReactiveControllerHost {
86
88
  }
87
89
  async getInputElement() {
88
90
  if (!this.nativeInputElement) {
89
- await new Promise(resolve => component.componentOnReady(this.el, resolve));
91
+ await new Promise((resolve) => component.componentOnReady(this.el, resolve));
90
92
  }
91
93
  return Promise.resolve(this.nativeInputElement);
92
94
  }
@@ -107,6 +109,7 @@ const LmvzInput = class extends reactiveControllerHost.ReactiveControllerHost {
107
109
  }
108
110
  componentWillLoad() {
109
111
  this.initialValue = this.value;
112
+ super.componentWillLoad();
110
113
  }
111
114
  formAssociatedCallback(form) {
112
115
  if (!form)
@@ -155,9 +158,9 @@ const LmvzInput = class extends reactiveControllerHost.ReactiveControllerHost {
155
158
  render() {
156
159
  const hasValue = Boolean(this.value);
157
160
  const shouldFloatLabel = hasValue || Boolean(this.placeholder);
158
- return (index.h("div", { key: '4dffa432df9b8ca5d89c02b59cfe25b9321ca162', class: index$1.classNames('input-container', {
161
+ return (index.h("div", { key: '79ab97e1e1d0217d5302ca1dea7087292ef19fc7', class: index$1.classNames('input-container', {
159
162
  'interaction-filled': hasValue,
160
- }) }, index.h("div", { key: 'ade1cd1137acce218d458c1b66b2eb29cf887b70', class: "input-wrapper" }, index.h("slot", { key: '013dff3540481724658ff754bf3db0585ec3b6f4', name: "before-input" }), index.h("div", { key: '6587bb63c79f97c31abff5be0a91eb16374971d5', class: "label-input-group" }, index.h("label", { key: '2ef0a35fbd38b255423d2793415568a661476db3', htmlFor: this.inputId, class: index$1.classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (index.h("span", { key: '0785826710ee4ecea96037cc689c34a43113552e', class: "required-indicator", "aria-hidden": "true" }, ' ', "*"))), index.h("input", { key: '5ad0d4b2d1c11dd89824db87e331232ba703a05e', id: this.inputId, ref: el => (this.nativeInputElement = el), type: this.type, min: this.min, max: this.max, step: this.step, value: this.value, name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, form: this.form, autocomplete: this.autocomplete, inputmode: this.inputmode, autocorrect: this.autocorrect, autocapitalize: this.autocapitalize, spellcheck: this.spellcheck, autofocus: this.autofocus, minlength: this.minlength, maxlength: this.maxlength, pattern: this.pattern, "aria-invalid": this.error ? 'true' : 'false', "aria-required": this.required ? 'true' : 'false', "aria-describedby": this.describedBy, "aria-errormessage": this.errorId, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur })), index.h("slot", { key: 'a23676cc830cac7fbf87fef81a8d05b50b831725', name: "after-input" })), index.h("div", { key: 'e0a05138954d70508f840b6d5c4f53e74c2f2979', id: this.helperId, role: "status" }, this.helperText || null), index.h("div", { key: 'fcba57be2d596b3b8aa0ac97b2fd31dc3e77e14b', id: this.errorId, role: "alert" }, (this.showErrorMessage && this.errorMessage) || null)));
163
+ }) }, index.h("div", { key: '9e59a33c261f610f93e1d6db3a07107f9300bbda', class: 'input-wrapper' }, index.h("slot", { key: 'fadb3f5e49afa817014cdbd44774462b467827f4', name: 'before-input' }), index.h("div", { key: '27d592787bb841fbd430c2e8ce0adc10f59b68ec', class: 'label-input-group' }, index.h("label", { key: 'f83f154f356660ecafde254b5437ce6c42898b54', htmlFor: this.inputId, class: index$1.classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (index.h("span", { key: 'b51463179a2099ecd687ccd2480136379b0d0502', class: 'required-indicator', "aria-hidden": 'true' }, ' ', "*"))), index.h("input", { key: '30d8308f286e82fba5d2ebdad972509c06294543', id: this.inputId, ref: (el) => (this.nativeInputElement = el), type: this.type, min: this.min, max: this.max, step: this.step, value: this.value, name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, form: this.form, autocomplete: this.autocomplete, inputmode: this.inputmode, autocorrect: this.autocorrect, autocapitalize: this.autocapitalize, spellcheck: this.spellcheck, autofocus: this.autofocus, minlength: this.minlength, maxlength: this.maxlength, pattern: this.pattern, "aria-invalid": this.error ? 'true' : 'false', "aria-required": this.required ? 'true' : 'false', "aria-describedby": this.describedBy, "aria-errormessage": this.errorId, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur })), index.h("slot", { key: 'a8448a0827ce24194b21b8281d2b54eb76f24652', name: 'after-input' })), index.h("div", { key: '79413854b97380812c84f3128d1db053d4154008', id: this.helperId, role: 'status' }, this.helperText || null), index.h("div", { key: 'd34c6b421688934b69917f6da1f9bb22c220a6f9', id: this.errorId, role: 'alert' }, (this.showErrorMessage && this.errorMessage) || null)));
161
164
  }
162
165
  static get formAssociated() { return true; }
163
166
  static get watchers() { return {
@@ -1,13 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D3BMpL5w.js');
4
- var reactiveControllerHost = require('./reactive-controller-host-BMDEj1kX.js');
3
+ var index = require('./index-9ZJx0550.js');
4
+ var reactiveControllerHost = require('./reactive-controller-host-DWpVosFu.js');
5
5
  var elementActivationController = require('./element-activation-controller-DC_6T0Rt.js');
6
+ require('./aria-loader-BBKbBZLq.js');
6
7
 
7
8
  const lmvzMenuitemCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-menuitem-h { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-lg, 14px); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); padding: var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)) var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); cursor: pointer; --lmvz-menuitem-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); background: var(--lmvz-menuitem-background); color: var(--lmvz-menuitem-color); } .sc-lmvz-menuitem-h:hover { --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } .sc-lmvz-menuitem-h:active { --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } .sc-lmvz-menuitem-h:focus-visible { z-index: 1; } [aria-expanded='true'].sc-lmvz-menuitem-h { --lmvz-menuitem-background: var(--lmvz-semantic-color-status-selected, #f1f9fe); --lmvz-menuitem-color: var(--lmvz-semantic-color-status-on-selected, #0e7ab4); }`;
8
9
 
9
10
  const LmvzMenuItem = class extends reactiveControllerHost.ReactiveControllerHost {
10
11
  get el() { return index.getElement(this); }
12
+ validationEl = this.el;
13
+ validationSlot;
11
14
  get role() {
12
15
  return 'menuitem';
13
16
  }
@@ -19,11 +22,11 @@ const LmvzMenuItem = class extends reactiveControllerHost.ReactiveControllerHost
19
22
  super();
20
23
  index.registerInstance(this, hostRef);
21
24
  this.lmvzActivation = index.createEvent(this, "lmvzActivation");
22
- this.addController(new reactiveControllerHost.AriaValidationController(this));
25
+ this.addController(new reactiveControllerHost.AriaValidationController(this, { validationTiming: 'slot' }));
23
26
  this.addController(new elementActivationController.ElementActivationController(this));
24
27
  }
25
28
  render() {
26
- return (index.h(index.Host, { key: 'c4a21e628aaf4e983d51ce7b1f38ff66c47ec3ac' }, index.h("slot", { key: '0040d27a11c4bdd5a49dd54f352ba7d17b53ff7b' })));
29
+ return (index.h(index.Host, { key: 'a022a198618ac628cb39c97b29cf0c332b522e79' }, index.h("slot", { key: 'c8dab82b31b49db3d966cacb1cf9ef5cb1763797', ref: e => (this.validationSlot = e) })));
27
30
  }
28
31
  };
29
32
  LmvzMenuItem.style = lmvzMenuitemCss();
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D3BMpL5w.js');
3
+ var index = require('./index-9ZJx0550.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  const defineCustomElements = async (win, options) => {
@@ -1,23 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const GLOBAL_STATE_KEY = Symbol('__lmvzAriaValidationRuntimeState');
4
- const ARIA_VALIDATION_RUNTIME_CHANGED_EVENT = 'lmvz:aria-validation-runtime-changed';
5
- const getRuntimeState = () => {
6
- const globalState = globalThis;
7
- if (!globalState[GLOBAL_STATE_KEY]) {
8
- globalState[GLOBAL_STATE_KEY] = {
9
- enabled: false,
10
- };
11
- }
12
- return globalState[GLOBAL_STATE_KEY];
13
- };
14
- const isAriaValidationEnabled = () => getRuntimeState().enabled;
15
- function queueValidation(...args) {
16
- const state = getRuntimeState();
17
- if (!state.enabled || !state.runtime)
18
- return;
19
- state.runtime.enqueueValidation(...args);
20
- }
3
+ var ariaLoader = require('./aria-loader-BBKbBZLq.js');
4
+ var index = require('./index-9ZJx0550.js');
21
5
 
22
6
  class AriaValidationController {
23
7
  host;
@@ -25,26 +9,35 @@ class AriaValidationController {
25
9
  visibilityObserver;
26
10
  elementQueued = false;
27
11
  elementValidated = false;
28
- knownValidationErrors = [];
12
+ elementLoaded = false;
13
+ static knownValidationErrors = [];
29
14
  get disabled() {
30
- return !isAriaValidationEnabled();
15
+ return !ariaLoader.isAriaValidationEnabled();
16
+ }
17
+ get useVerboseLogging() {
18
+ return this.config?.verboseLogging || index.Build.isDev || ariaLoader.useVerboseLogging();
31
19
  }
32
20
  constructor(host, config) {
33
21
  this.host = host;
34
22
  this.config = config;
35
23
  }
36
24
  onRuntimeConfigChange = () => {
37
- if (!isAriaValidationEnabled())
25
+ if (!ariaLoader.isAriaValidationEnabled())
38
26
  return;
39
27
  this.checkLazyValidation();
40
28
  };
41
29
  hostDidLoad() {
30
+ this.elementLoaded = true;
42
31
  if (typeof window !== 'undefined') {
43
- window.addEventListener(ARIA_VALIDATION_RUNTIME_CHANGED_EVENT, this.onRuntimeConfigChange);
32
+ window.addEventListener(ariaLoader.ARIA_VALIDATION_RUNTIME_CHANGED_EVENT, this.onRuntimeConfigChange);
44
33
  }
45
34
  if (this.elementQueued || this.elementValidated)
46
35
  return;
47
- if (!this.host.el.checkVisibility()) {
36
+ if (this.config?.validationTiming === 'slot') {
37
+ this.observeSlot();
38
+ return;
39
+ }
40
+ if (!this.host.validationEl?.checkVisibility() || this.config?.validationTiming !== 'load') {
48
41
  this.observeVisibilityOnce();
49
42
  return;
50
43
  }
@@ -56,63 +49,91 @@ class AriaValidationController {
56
49
  hostDisconnected() {
57
50
  this.discardVisibilityObserver();
58
51
  if (typeof window !== 'undefined') {
59
- window.removeEventListener(ARIA_VALIDATION_RUNTIME_CHANGED_EVENT, this.onRuntimeConfigChange);
52
+ window.removeEventListener(ariaLoader.ARIA_VALIDATION_RUNTIME_CHANGED_EVENT, this.onRuntimeConfigChange);
60
53
  }
61
54
  }
55
+ revalidateAria() {
56
+ this.enqueueValidation();
57
+ }
58
+ observeSlot() {
59
+ this.host.validationSlot?.addEventListener('slotchange', this.enqueueValidation.bind(this));
60
+ }
62
61
  observeVisibilityOnce() {
63
- this.visibilityObserver = new IntersectionObserver(entries => {
64
- for (const entry of entries) {
65
- if (entry.target !== this.host.el)
66
- continue;
67
- if (!entry.isIntersecting)
68
- continue;
69
- this.checkLazyValidation();
70
- this.discardVisibilityObserver();
71
- }
72
- }, {
73
- root: this.host.el.parentElement,
74
- rootMargin: '0px',
75
- threshold: 0.01,
62
+ window.setTimeout(() => {
63
+ if (!this.host.validationEl)
64
+ return;
65
+ this.visibilityObserver = new IntersectionObserver((entries) => {
66
+ for (const entry of entries) {
67
+ if (entry.target !== this.host.validationEl)
68
+ continue;
69
+ if (!entry.isIntersecting)
70
+ continue;
71
+ this.checkLazyValidation();
72
+ this.discardVisibilityObserver();
73
+ }
74
+ }, {
75
+ root: this.host.validationEl?.parentElement,
76
+ rootMargin: '0px',
77
+ threshold: 0.01,
78
+ });
79
+ this.visibilityObserver.observe(this.host.validationEl);
76
80
  });
77
- this.visibilityObserver.observe(this.host.el);
78
81
  }
79
82
  checkLazyValidation() {
83
+ if (!this.elementLoaded)
84
+ return;
80
85
  if (!this.config?.reValidateOnPropChanges && (this.elementQueued || this.elementValidated))
81
86
  return;
87
+ if (!this.host.validationEl?.checkVisibility())
88
+ return;
82
89
  this.enqueueValidation();
83
90
  }
84
91
  enqueueValidation() {
85
- if (!isAriaValidationEnabled())
92
+ if (!ariaLoader.isAriaValidationEnabled())
86
93
  return;
87
94
  this.elementQueued = true;
88
- queueValidation({
89
- context: { include: this.host.el, exclude: this.knownValidationErrors },
95
+ ariaLoader.queueValidation({
96
+ context: { include: this.host.validationEl, exclude: AriaValidationController.knownValidationErrors },
90
97
  onComplete: (error, results) => {
91
98
  this.elementValidated = true;
99
+ const elementName = this.host.tagName || this.host.validationEl?.tagName || 'Element';
92
100
  if (error) {
93
- console.error('Error running ARIA validation:', error);
101
+ console.error('Error running ARIA validation:', error, elementName);
102
+ if (!this.host.validationEl?.tagName) {
103
+ console.dir(this.host);
104
+ }
94
105
  return;
95
106
  }
107
+ const message = [elementName];
96
108
  if (!results?.violations.length) {
97
- if (this.config?.verboseLogging) {
98
- console.log(`No ARIA validation violations found for ${this.host.el?.tagName || 'element'}.`);
109
+ if (this.useVerboseLogging) {
110
+ console.log(...message, 'has no ARIA violations');
111
+ if (!this.host.validationEl?.tagName) {
112
+ console.dir(this.host);
113
+ }
99
114
  }
100
115
  return;
101
116
  }
102
- const label = `ARIA validation violations found for ${this.host.el?.tagName || 'element'}`;
103
- if (this.config?.verboseLogging) {
117
+ const count = results.violations.length;
118
+ const label = [...message, results.violations.at(0).id, count > 1 ? `(+${count - 1} more)` : ''].filter(Boolean).join(' ');
119
+ if (this.useVerboseLogging) {
104
120
  console.group(label);
105
121
  }
106
122
  else {
107
123
  console.groupCollapsed(label);
108
124
  }
109
- const targets = results.violations.flatMap(violation => {
125
+ const targets = results.violations.flatMap((violation) => {
110
126
  console.dir(violation, { showHidden: true, compact: false });
111
- return violation.nodes.map(node => node.target);
127
+ return violation.nodes.map((node) => node.target);
112
128
  });
113
- console.log('element:', this.host.el);
129
+ if (this.host.validationEl) {
130
+ console.log('element:', this.host.validationEl);
131
+ }
132
+ else {
133
+ console.dir(this.host);
134
+ }
114
135
  console.groupEnd();
115
- this.knownValidationErrors.push(...targets);
136
+ AriaValidationController.knownValidationErrors.push(...targets);
116
137
  },
117
138
  });
118
139
  }
@@ -6,6 +6,7 @@ import { findFormByRef, inheritAriaAttributes } from "../../utils/component";
6
6
  import { ReactiveControllerHost } from "../../utils/reactive-controller-host";
7
7
  export class LmvzButton extends ReactiveControllerHost {
8
8
  el;
9
+ validationEl;
9
10
  inheritedAttributes = {};
10
11
  formEl = null;
11
12
  formButtonEl = null;
@@ -28,6 +29,7 @@ export class LmvzButton extends ReactiveControllerHost {
28
29
  }
29
30
  connectedCallback() {
30
31
  this.inheritedAttributes = inheritAriaAttributes(this.el);
32
+ super.connectedCallback();
31
33
  }
32
34
  renderHiddenButton() {
33
35
  const formEl = (this.formEl = findFormByRef(this.form, this.el));
@@ -55,7 +57,7 @@ export class LmvzButton extends ReactiveControllerHost {
55
57
  };
56
58
  render() {
57
59
  this.renderHiddenButton();
58
- return (h(Host, { key: 'cd4a63b866c801ad7f96f59d15e561a54bfe9ec2', "aria-disabled": this.disabled ? 'true' : null }, h("button", { key: 'a1e3ecb88fb84d724df4939519bb22d4b6725c1d', disabled: this.disabled, class: classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, h("slot", { key: 'f1fd32c993b1ef9f6d62d6f3affa169c9368df78' }))));
60
+ return (h(Host, { key: '3f3eda78349322ce5160d7aac1290a73f0adcd4a', "aria-disabled": this.disabled ? 'true' : null }, h("button", { key: 'b132404d8d5f5bf0fa7e845b562c953c5ceec36c', ref: (e) => (this.validationEl = e), disabled: this.disabled, class: classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, h("slot", { key: 'ce63f7f1061ec9c3f10cbcfc67998ddbf3e04c3d' }))));
59
61
  }
60
62
  static get is() { return "lmvz-button"; }
61
63
  static get encapsulation() { return "shadow"; }