@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
package/hydrate/index.mjs CHANGED
@@ -5094,6 +5094,8 @@ var registerHost = (elm, cmpMeta) => {
5094
5094
  elm.__stencil__getHostRef = () => hostRef;
5095
5095
  return hostRef;
5096
5096
  };
5097
+ var Build = {
5098
+ isDev: false};
5097
5099
  var styles = /* @__PURE__ */ new Map();
5098
5100
  var setScopedSSR = (opts) => {
5099
5101
  scopedSSR = opts.serializeShadowRoot !== false && opts.serializeShadowRoot !== "declarative-shadow-dom";
@@ -5219,7 +5221,7 @@ var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
5219
5221
 
5220
5222
  const GLOBAL_STATE_KEY = Symbol('__lmvzAriaValidationRuntimeState');
5221
5223
  const ARIA_VALIDATION_RUNTIME_CHANGED_EVENT = 'lmvz:aria-validation-runtime-changed';
5222
- const getRuntimeState = () => {
5224
+ function getRuntimeState() {
5223
5225
  const globalState = globalThis;
5224
5226
  if (!globalState[GLOBAL_STATE_KEY]) {
5225
5227
  globalState[GLOBAL_STATE_KEY] = {
@@ -5227,8 +5229,9 @@ const getRuntimeState = () => {
5227
5229
  };
5228
5230
  }
5229
5231
  return globalState[GLOBAL_STATE_KEY];
5230
- };
5232
+ }
5231
5233
  const isAriaValidationEnabled = () => getRuntimeState().enabled;
5234
+ const useVerboseLogging = () => getRuntimeState().verboseLogging ?? false;
5232
5235
  function queueValidation(...args) {
5233
5236
  const state = getRuntimeState();
5234
5237
  if (!state.enabled || !state.runtime)
@@ -5242,10 +5245,14 @@ class AriaValidationController {
5242
5245
  visibilityObserver;
5243
5246
  elementQueued = false;
5244
5247
  elementValidated = false;
5245
- knownValidationErrors = [];
5248
+ elementLoaded = false;
5249
+ static knownValidationErrors = [];
5246
5250
  get disabled() {
5247
5251
  return !isAriaValidationEnabled();
5248
5252
  }
5253
+ get useVerboseLogging() {
5254
+ return this.config?.verboseLogging || Build.isDev || useVerboseLogging();
5255
+ }
5249
5256
  constructor(host, config) {
5250
5257
  this.host = host;
5251
5258
  this.config = config;
@@ -5256,12 +5263,17 @@ class AriaValidationController {
5256
5263
  this.checkLazyValidation();
5257
5264
  };
5258
5265
  hostDidLoad() {
5266
+ this.elementLoaded = true;
5259
5267
  if (typeof window !== 'undefined') {
5260
5268
  window.addEventListener(ARIA_VALIDATION_RUNTIME_CHANGED_EVENT, this.onRuntimeConfigChange);
5261
5269
  }
5262
5270
  if (this.elementQueued || this.elementValidated)
5263
5271
  return;
5264
- if (!this.host.el.checkVisibility()) {
5272
+ if (this.config?.validationTiming === 'slot') {
5273
+ this.observeSlot();
5274
+ return;
5275
+ }
5276
+ if (!this.host.validationEl?.checkVisibility() || this.config?.validationTiming !== 'load') {
5265
5277
  this.observeVisibilityOnce();
5266
5278
  return;
5267
5279
  }
@@ -5276,26 +5288,40 @@ class AriaValidationController {
5276
5288
  window.removeEventListener(ARIA_VALIDATION_RUNTIME_CHANGED_EVENT, this.onRuntimeConfigChange);
5277
5289
  }
5278
5290
  }
5291
+ revalidateAria() {
5292
+ this.enqueueValidation();
5293
+ }
5294
+ observeSlot() {
5295
+ this.host.validationSlot?.addEventListener('slotchange', this.enqueueValidation.bind(this));
5296
+ }
5279
5297
  observeVisibilityOnce() {
5280
- this.visibilityObserver = new IntersectionObserver(entries => {
5281
- for (const entry of entries) {
5282
- if (entry.target !== this.host.el)
5283
- continue;
5284
- if (!entry.isIntersecting)
5285
- continue;
5286
- this.checkLazyValidation();
5287
- this.discardVisibilityObserver();
5288
- }
5289
- }, {
5290
- root: this.host.el.parentElement,
5291
- rootMargin: '0px',
5292
- threshold: 0.01,
5298
+ window.setTimeout(() => {
5299
+ if (!this.host.validationEl)
5300
+ return;
5301
+ this.visibilityObserver = new IntersectionObserver((entries) => {
5302
+ for (const entry of entries) {
5303
+ if (entry.target !== this.host.validationEl)
5304
+ continue;
5305
+ if (!entry.isIntersecting)
5306
+ continue;
5307
+ this.checkLazyValidation();
5308
+ this.discardVisibilityObserver();
5309
+ }
5310
+ }, {
5311
+ root: this.host.validationEl?.parentElement,
5312
+ rootMargin: '0px',
5313
+ threshold: 0.01,
5314
+ });
5315
+ this.visibilityObserver.observe(this.host.validationEl);
5293
5316
  });
5294
- this.visibilityObserver.observe(this.host.el);
5295
5317
  }
5296
5318
  checkLazyValidation() {
5319
+ if (!this.elementLoaded)
5320
+ return;
5297
5321
  if (!this.config?.reValidateOnPropChanges && (this.elementQueued || this.elementValidated))
5298
5322
  return;
5323
+ if (!this.host.validationEl?.checkVisibility())
5324
+ return;
5299
5325
  this.enqueueValidation();
5300
5326
  }
5301
5327
  enqueueValidation() {
@@ -5303,33 +5329,47 @@ class AriaValidationController {
5303
5329
  return;
5304
5330
  this.elementQueued = true;
5305
5331
  queueValidation({
5306
- context: { include: this.host.el, exclude: this.knownValidationErrors },
5332
+ context: { include: this.host.validationEl, exclude: AriaValidationController.knownValidationErrors },
5307
5333
  onComplete: (error, results) => {
5308
5334
  this.elementValidated = true;
5335
+ const elementName = this.host.tagName || this.host.validationEl?.tagName || 'Element';
5309
5336
  if (error) {
5310
- console.error('Error running ARIA validation:', error);
5337
+ console.error('Error running ARIA validation:', error, elementName);
5338
+ if (!this.host.validationEl?.tagName) {
5339
+ console.dir(this.host);
5340
+ }
5311
5341
  return;
5312
5342
  }
5343
+ const message = [elementName];
5313
5344
  if (!results?.violations.length) {
5314
- if (this.config?.verboseLogging) {
5315
- console.log(`No ARIA validation violations found for ${this.host.el?.tagName || 'element'}.`);
5345
+ if (this.useVerboseLogging) {
5346
+ console.log(...message, 'has no ARIA violations');
5347
+ if (!this.host.validationEl?.tagName) {
5348
+ console.dir(this.host);
5349
+ }
5316
5350
  }
5317
5351
  return;
5318
5352
  }
5319
- const label = `ARIA validation violations found for ${this.host.el?.tagName || 'element'}`;
5320
- if (this.config?.verboseLogging) {
5353
+ const count = results.violations.length;
5354
+ const label = [...message, results.violations.at(0).id, count > 1 ? `(+${count - 1} more)` : ''].filter(Boolean).join(' ');
5355
+ if (this.useVerboseLogging) {
5321
5356
  console.group(label);
5322
5357
  }
5323
5358
  else {
5324
5359
  console.groupCollapsed(label);
5325
5360
  }
5326
- const targets = results.violations.flatMap(violation => {
5361
+ const targets = results.violations.flatMap((violation) => {
5327
5362
  console.dir(violation, { showHidden: true, compact: false });
5328
- return violation.nodes.map(node => node.target);
5363
+ return violation.nodes.map((node) => node.target);
5329
5364
  });
5330
- console.log('element:', this.host.el);
5365
+ if (this.host.validationEl) {
5366
+ console.log('element:', this.host.validationEl);
5367
+ }
5368
+ else {
5369
+ console.dir(this.host);
5370
+ }
5331
5371
  console.groupEnd();
5332
- this.knownValidationErrors.push(...targets);
5372
+ AriaValidationController.knownValidationErrors.push(...targets);
5333
5373
  },
5334
5374
  });
5335
5375
  }
@@ -5544,6 +5584,7 @@ const lmvzButtonCss = () => ` @layer lmvz-ds.reset, lmvz-ds.
5544
5584
 
5545
5585
  class LmvzButton extends ReactiveControllerHost {
5546
5586
  get el() { return getElement(this); }
5587
+ validationEl;
5547
5588
  inheritedAttributes = {};
5548
5589
  formEl = null;
5549
5590
  formButtonEl = null;
@@ -5568,6 +5609,7 @@ class LmvzButton extends ReactiveControllerHost {
5568
5609
  }
5569
5610
  connectedCallback() {
5570
5611
  this.inheritedAttributes = inheritAriaAttributes(this.el);
5612
+ super.connectedCallback();
5571
5613
  }
5572
5614
  renderHiddenButton() {
5573
5615
  const formEl = (this.formEl = findFormByRef(this.form, this.el));
@@ -5595,7 +5637,7 @@ class LmvzButton extends ReactiveControllerHost {
5595
5637
  };
5596
5638
  render() {
5597
5639
  this.renderHiddenButton();
5598
- return (hAsync(Host, { key: 'cd4a63b866c801ad7f96f59d15e561a54bfe9ec2', "aria-disabled": this.disabled ? 'true' : null }, hAsync("button", { key: 'a1e3ecb88fb84d724df4939519bb22d4b6725c1d', disabled: this.disabled, class: classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, hAsync("slot", { key: 'f1fd32c993b1ef9f6d62d6f3affa169c9368df78' }))));
5640
+ return (hAsync(Host, { key: '3f3eda78349322ce5160d7aac1290a73f0adcd4a', "aria-disabled": this.disabled ? 'true' : null }, hAsync("button", { key: 'b132404d8d5f5bf0fa7e845b562c953c5ceec36c', ref: (e) => (this.validationEl = e), disabled: this.disabled, class: classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, hAsync("slot", { key: 'ce63f7f1061ec9c3f10cbcfc67998ddbf3e04c3d' }))));
5599
5641
  }
5600
5642
  static get delegatesFocus() { return true; }
5601
5643
  static get style() { return lmvzButtonCss(); }
@@ -5751,6 +5793,7 @@ const lmvzHeaderCss = () => `:host{display:flex;width:100vw;flex-direction:row;a
5751
5793
 
5752
5794
  class LmvzHeader extends ReactiveControllerHost {
5753
5795
  get el() { return getElement(this); }
5796
+ validationEl = this.el;
5754
5797
  primarySlot;
5755
5798
  secondarySlot;
5756
5799
  secondaryNav;
@@ -5781,6 +5824,7 @@ class LmvzHeader extends ReactiveControllerHost {
5781
5824
  this.primarySlot.addEventListener('slotchange', this.handlePrimaryNavItemsChange.bind(this));
5782
5825
  this.handlePrimaryNavItemsChange();
5783
5826
  this.secondarySlot.addEventListener('slotchange', this.handleSecondaryNavItemsChange.bind(this));
5827
+ super.componentDidLoad();
5784
5828
  }
5785
5829
  handlePrimaryNavItemsChange() {
5786
5830
  const items = this.primaryMenuitems;
@@ -5788,7 +5832,7 @@ class LmvzHeader extends ReactiveControllerHost {
5788
5832
  console.warn('Primary slot has no assigned elements. Please add navigation items to the primary slot.');
5789
5833
  return;
5790
5834
  }
5791
- items.forEach(el => {
5835
+ items.forEach((el) => {
5792
5836
  el.setAttribute('aria-haspopup', 'true');
5793
5837
  el.setAttribute('aria-controls', `nav-secondary`);
5794
5838
  });
@@ -5807,7 +5851,7 @@ class LmvzHeader extends ReactiveControllerHost {
5807
5851
  updateElementsActive() {
5808
5852
  const items = this.primaryMenuitems;
5809
5853
  let label;
5810
- items.forEach(el => {
5854
+ items.forEach((el) => {
5811
5855
  const isActive = el.id === this.lmvzActiveNav;
5812
5856
  if (isActive)
5813
5857
  label = el.textContent || el.id;
@@ -5822,7 +5866,7 @@ class LmvzHeader extends ReactiveControllerHost {
5822
5866
  }
5823
5867
  }
5824
5868
  render() {
5825
- return (hAsync(Host, { key: '783c855e49e1a2447107d6205a1b2c50285ccfff', onFocus: this.delegateFocus.bind(this) }, hAsync("div", { key: '84a78b0ed3e170c49a711fa4091f80dbc7003b2f', class: "brand" }, hAsync("slot", { key: '76cc54f17a7bc5f825433fc56351666a93891fd2', name: "brand" }, hAsync("lmvz-icon", { key: 'e196e43720cb4b4c3f79b3071d534b50480f6206', id: "fallback-logo-lmvz", icon: "Logo", size: "inherit", "aria-label": "Lehrmittelverlag Z\u00FCrich" }))), hAsync("nav", { key: 'd25a719752bd4085da5ad18af94afc66e9cabd5e', "aria-label": "Hauptnavigation" }, hAsync("div", { key: '8a12c2c53bd061b3559ce9693780e592b3d7aa32', role: "menubar", class: "primary-menubar" }, hAsync("slot", { key: '4461632675dc657f675883e8ef618e371ace0ad7', name: "nav-primary", ref: el => (this.primarySlot = el) }), hAsync("div", { key: 'c1dabc588ac376db667df32d3edbdd6dce60aaad', role: "menu", id: "nav-secondary", class: "secondary-menubar", hidden: !this.lmvzActiveNav, ref: el => (this.secondaryNav = el) }, hAsync("slot", { key: '74ca44ee2f755ffe9ea3ebc19cc2b227ae22df8b', name: this.secondarySlotName, ref: el => (this.secondarySlot = el) })))), hAsync("div", { key: 'a4d250a5fcd10390aed1f5369c28ddec9aa9ee8d', class: "actions" }, hAsync("slot", { key: '77a499ce12d269e79221ca971cc1b203d179f459', name: "actions" }))));
5869
+ return (hAsync(Host, { key: '7c257913615a89b9be8f959b4dc43664ee474113', onFocus: this.delegateFocus.bind(this) }, hAsync("div", { key: '70f33263e629170d1b19cbfb1a00ca1adbbe91e0', class: 'brand' }, hAsync("slot", { key: 'd9c99c51da3210e5459684e59e66baf1622a8946', name: 'brand' }, hAsync("lmvz-icon", { key: '18bd0e88032c023d319bc3fac43c2b09d5098893', id: 'fallback-logo-lmvz', icon: 'Logo', size: 'inherit', "aria-label": 'Lehrmittelverlag Z\u00FCrich' }))), hAsync("nav", { key: 'c56a1e63344e42b1be26fe817705f0265bdb2bcf', "aria-label": 'Hauptnavigation' }, hAsync("div", { key: 'fbaebcb4857b0fba7b81cc35ef6092bb98ae89f8', role: 'menubar', class: 'primary-menubar' }, hAsync("slot", { key: '4a408eacbb41fa57d838581c18389241dce0e634', name: 'nav-primary', ref: (el) => (this.primarySlot = el) }), hAsync("div", { key: '6229842569958c724478c6aa15adc75b07d8417e', role: 'menu', id: 'nav-secondary', class: 'secondary-menubar', hidden: !this.lmvzActiveNav, ref: (el) => (this.secondaryNav = el) }, hAsync("slot", { key: '4dd4278eaa77cfc984e338da6bb1aa7321c6a545', name: this.secondarySlotName, ref: (el) => (this.secondarySlot = el) })))), hAsync("div", { key: '98b7802b0dc2dfe3a7a38bf89ae2b68994734396', class: 'actions' }, hAsync("slot", { key: '5f7682fe0ad34496b887baab7b19641a86c01acb', name: 'actions' }))));
5826
5870
  }
5827
5871
  static get watchers() { return {
5828
5872
  "lmvzActiveNav": [{
@@ -9593,7 +9637,9 @@ const lmvzIconCss = () => `.sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-componen
9593
9637
 
9594
9638
  class LmvzIcon extends ReactiveControllerHost {
9595
9639
  intersectionObserver;
9640
+ ariaValidationController = new AriaValidationController(this);
9596
9641
  get el() { return getElement(this); }
9642
+ validationEl;
9597
9643
  icon;
9598
9644
  weight = 'medium';
9599
9645
  size = 'md';
@@ -9606,27 +9652,34 @@ class LmvzIcon extends ReactiveControllerHost {
9606
9652
  constructor(hostRef) {
9607
9653
  super();
9608
9654
  registerInstance(this, hostRef);
9609
- this.addController(new AriaValidationController(this));
9655
+ this.addController(this.ariaValidationController);
9610
9656
  }
9611
9657
  connectedCallback() {
9612
9658
  this.waitUntilVisible(() => {
9613
9659
  this.visible = true;
9614
9660
  this.loadIconPathData();
9615
9661
  });
9662
+ super.connectedCallback();
9616
9663
  }
9617
9664
  disconnectedCallback() {
9618
9665
  if (this.intersectionObserver) {
9619
9666
  this.intersectionObserver.disconnect();
9620
9667
  this.intersectionObserver = null;
9621
9668
  }
9669
+ super.disconnectedCallback();
9622
9670
  }
9623
9671
  async loadIconPathData() {
9624
9672
  {
9625
9673
  return;
9626
9674
  }
9627
9675
  }
9676
+ componentDidRender() {
9677
+ this.validationEl = this.el.querySelector('svg');
9678
+ this.ariaValidationController.revalidateAria();
9679
+ super.componentDidRender();
9680
+ }
9628
9681
  render() {
9629
- return hAsync(Host, { key: 'd4c1cbfbaf39ebf6aa26415d46100763b9f89b5b', role: "img", "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
9682
+ return hAsync(Host, { key: '8b1ce550253e994650fe91de38496aff7c7eccc2', role: 'img', "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
9630
9683
  }
9631
9684
  waitUntilVisible(callback, rootMargin = 50) {
9632
9685
  {
@@ -9663,6 +9716,7 @@ const lmvzInputCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.compone
9663
9716
  let inputIdCounter = 0;
9664
9717
  class LmvzInput extends ReactiveControllerHost {
9665
9718
  get el() { return getElement(this); }
9719
+ validationEl = this.el;
9666
9720
  lmvzInput;
9667
9721
  internals;
9668
9722
  nativeInputElement;
@@ -9739,7 +9793,7 @@ class LmvzInput extends ReactiveControllerHost {
9739
9793
  }
9740
9794
  async getInputElement() {
9741
9795
  if (!this.nativeInputElement) {
9742
- await new Promise(resolve => componentOnReady(this.el, resolve));
9796
+ await new Promise((resolve) => componentOnReady(this.el, resolve));
9743
9797
  }
9744
9798
  return Promise.resolve(this.nativeInputElement);
9745
9799
  }
@@ -9760,6 +9814,7 @@ class LmvzInput extends ReactiveControllerHost {
9760
9814
  }
9761
9815
  componentWillLoad() {
9762
9816
  this.initialValue = this.value;
9817
+ super.componentWillLoad();
9763
9818
  }
9764
9819
  formAssociatedCallback(form) {
9765
9820
  if (!form)
@@ -9808,9 +9863,9 @@ class LmvzInput extends ReactiveControllerHost {
9808
9863
  render() {
9809
9864
  const hasValue = Boolean(this.value);
9810
9865
  const shouldFloatLabel = hasValue || Boolean(this.placeholder);
9811
- return (hAsync("div", { key: '4dffa432df9b8ca5d89c02b59cfe25b9321ca162', class: classNames('input-container', {
9866
+ return (hAsync("div", { key: '79ab97e1e1d0217d5302ca1dea7087292ef19fc7', class: classNames('input-container', {
9812
9867
  'interaction-filled': hasValue,
9813
- }) }, hAsync("div", { key: 'ade1cd1137acce218d458c1b66b2eb29cf887b70', class: "input-wrapper" }, hAsync("slot", { key: '013dff3540481724658ff754bf3db0585ec3b6f4', name: "before-input" }), hAsync("div", { key: '6587bb63c79f97c31abff5be0a91eb16374971d5', class: "label-input-group" }, hAsync("label", { key: '2ef0a35fbd38b255423d2793415568a661476db3', htmlFor: this.inputId, class: classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (hAsync("span", { key: '0785826710ee4ecea96037cc689c34a43113552e', class: "required-indicator", "aria-hidden": "true" }, ' ', "*"))), hAsync("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 })), hAsync("slot", { key: 'a23676cc830cac7fbf87fef81a8d05b50b831725', name: "after-input" })), hAsync("div", { key: 'e0a05138954d70508f840b6d5c4f53e74c2f2979', id: this.helperId, role: "status" }, this.helperText || null), hAsync("div", { key: 'fcba57be2d596b3b8aa0ac97b2fd31dc3e77e14b', id: this.errorId, role: "alert" }, (this.showErrorMessage && this.errorMessage) || null)));
9868
+ }) }, hAsync("div", { key: '9e59a33c261f610f93e1d6db3a07107f9300bbda', class: 'input-wrapper' }, hAsync("slot", { key: 'fadb3f5e49afa817014cdbd44774462b467827f4', name: 'before-input' }), hAsync("div", { key: '27d592787bb841fbd430c2e8ce0adc10f59b68ec', class: 'label-input-group' }, hAsync("label", { key: 'f83f154f356660ecafde254b5437ce6c42898b54', htmlFor: this.inputId, class: classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (hAsync("span", { key: 'b51463179a2099ecd687ccd2480136379b0d0502', class: 'required-indicator', "aria-hidden": 'true' }, ' ', "*"))), hAsync("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 })), hAsync("slot", { key: 'a8448a0827ce24194b21b8281d2b54eb76f24652', name: 'after-input' })), hAsync("div", { key: '79413854b97380812c84f3128d1db053d4154008', id: this.helperId, role: 'status' }, this.helperText || null), hAsync("div", { key: 'd34c6b421688934b69917f6da1f9bb22c220a6f9', id: this.errorId, role: 'alert' }, (this.showErrorMessage && this.errorMessage) || null)));
9814
9869
  }
9815
9870
  static get formAssociated() { return true; }
9816
9871
  static get watchers() { return {
@@ -9869,6 +9924,8 @@ const lmvzMenuitemCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.comp
9869
9924
 
9870
9925
  class LmvzMenuItem extends ReactiveControllerHost {
9871
9926
  get el() { return getElement(this); }
9927
+ validationEl = this.el;
9928
+ validationSlot;
9872
9929
  get role() {
9873
9930
  return 'menuitem';
9874
9931
  }
@@ -9880,11 +9937,11 @@ class LmvzMenuItem extends ReactiveControllerHost {
9880
9937
  super();
9881
9938
  registerInstance(this, hostRef);
9882
9939
  this.lmvzActivation = createEvent(this, "lmvzActivation");
9883
- this.addController(new AriaValidationController(this));
9940
+ this.addController(new AriaValidationController(this, { validationTiming: 'slot' }));
9884
9941
  this.addController(new ElementActivationController(this));
9885
9942
  }
9886
9943
  render() {
9887
- return (hAsync(Host, { key: 'c4a21e628aaf4e983d51ce7b1f38ff66c47ec3ac' }, hAsync("slot", { key: '0040d27a11c4bdd5a49dd54f352ba7d17b53ff7b' })));
9944
+ return (hAsync(Host, { key: 'a022a198618ac628cb39c97b29cf0c332b522e79' }, hAsync("slot", { key: 'c8dab82b31b49db3d966cacb1cf9ef5cb1763797', ref: e => (this.validationSlot = e) })));
9888
9945
  }
9889
9946
  static get style() { return lmvzMenuitemCss(); }
9890
9947
  static get cmpMeta() { return {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@lmvz-ds/components",
3
3
  "private": false,
4
4
  "type": "module",
5
- "version": "0.13.1",
5
+ "version": "0.13.3",
6
6
  "description": "The components of the design system",
7
7
  "author": "Patrick Nemenz <patrick.nemenz@adesso.at>",
8
8
  "volta": {
@@ -119,10 +119,7 @@
119
119
  "test:watch": "stencil-test --watch",
120
120
  "lint": "concurrently 'eslint \"src/**\"' 'stylelint \"src/**/*.css\" --config ./stylelint.config.mjs'",
121
121
  "generate": "stencil generate",
122
- "update": "npx npm-check-updates -u",
123
- "version:mvn": "tsx scripts/update-pom-version.ts && git add pom.xml",
124
- "version": "npm run version:mvn",
125
- "postpack": "npm run version:mvn && mvn clean package"
122
+ "update": "npx npm-check-updates -u"
126
123
  },
127
124
  "nx": {
128
125
  "targets": {
@@ -147,6 +144,7 @@
147
144
  },
148
145
  "build:integration": {
149
146
  "dependsOn": [
147
+ "^build",
150
148
  "build:css"
151
149
  ]
152
150
  },
@@ -186,12 +184,12 @@
186
184
  }
187
185
  },
188
186
  "dependencies": {
189
- "@lmvz-ds/aria-validation": "^0.13.1",
187
+ "@lmvz-ds/aria-validation": "^0.13.3",
190
188
  "classnames": "^2.5.1",
191
189
  "effect": "3.19.14"
192
190
  },
193
191
  "devDependencies": {
194
- "@lmvz-ds/design-tokens": "^0.13.1",
192
+ "@lmvz-ds/design-tokens": "^0.13.3",
195
193
  "@stencil-community/postcss": "^2.2.0",
196
194
  "@stencil/angular-output-target": "1.3.0",
197
195
  "@stencil/core": "4.43.2",
@@ -212,5 +210,5 @@
212
210
  "vite": "^7.3.1",
213
211
  "vitest": "^4.1.0"
214
212
  },
215
- "gitHead": "36452c3cc8d6e493adb9806bc4a60bdf0f0f48da"
213
+ "gitHead": "083980b92bafdea0e20a54c2d8327de47e6e0274"
216
214
  }