@lmvz-ds/components 0.39.0 → 0.40.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/hydrate/index.js CHANGED
@@ -15795,7 +15795,7 @@ class LmvzSpinner {
15795
15795
  }; }
15796
15796
  }
15797
15797
 
15798
- const lmvzTabCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; flex: none; } :host([disabled]) { cursor: not-allowed; pointer-events: none; } button { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-tab-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--lmvz-component-component-spacing-0-default, 4px); padding-top: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); padding-bottom: var(--lmvz-dimension-14-8, clamp(0.5rem, 0.41rem + 0.39vw, 0.88rem)); padding-inline: var(--lmvz-dimension-24-16, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)); border: none; border-radius: var(--lmvz-semantic-border-radius-round, 999px); background: var(--lmvz-tab-background); color: var(--lmvz-tab-color); font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); cursor: pointer; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); z-index: 1; } button:disabled { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } button:hover { --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button:active { --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } :host([has-media]) { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); } :host([has-media]) button { padding-top: var(--lmvz-dimension-18-16, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); padding-bottom: var(--lmvz-dimension-14-12, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); padding-inline: var(--lmvz-dimension-48-40, clamp(2.5rem, 2.38rem + 0.52vw, 3rem)); border-radius: var(--lmvz-semantic-border-radius-lg, 14px); } :host([has-media]) button:hover { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } :host([has-media]) button:active { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } :host([selected]) button { --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-tab-background: var(--lmvz-semantic-color-status-active, #f6fbfe); } :host([selected][has-media]) button:hover, :host([selected][has-media]) button:active { --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); } .indicator { --lmvz-tab-indicator-size: 4px; position: absolute; background: linear-gradient(to right, var(--lmvz-semantic-color-gradient-main-1, #0e7ab4), var(--lmvz-semantic-color-gradient-main-2, #0e7ab4)); opacity: 0; transition: opacity 0.15s ease; inset-block-end: 0; inset-inline: 0; block-size: var(--lmvz-tab-indicator-size); border-start-start-radius: 0; border-start-end-radius: 0; border-end-start-radius: var(--lmvz-tab-indicator-size); border-end-end-radius: var(--lmvz-tab-indicator-size); } :host([selected][has-media]) .indicator { opacity: 1; } :host([vertical]) button { border-radius: var(--lmvz-semantic-border-radius-round, 999px); } :host([vertical]) .indicator { inset-block: 0; inset-inline: 0 auto; inline-size: var(--lmvz-tab-indicator-size); block-size: auto; border-radius: 0 var(--lmvz-tab-indicator-size) var(--lmvz-tab-indicator-size) 0; background: linear-gradient(to bottom, var(--lmvz-semantic-color-gradient-main-1, #0e7ab4), var(--lmvz-semantic-color-gradient-main-2, #0e7ab4)); } ::slotted(*) { --lmvz-component-color: var(--lmvz-tab-color); } ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-dimension-18-16, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } :host([has-media]) ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-component-icon-size-lg, clamp(1.25rem, 1.19rem + 0.26vw, 1.5rem)); } .label { display: contents; } `;
15798
+ const lmvzTabCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; flex: none; } :host([disabled]) { cursor: not-allowed; pointer-events: none; } button { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-tab-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--lmvz-component-component-spacing-0-default, 4px); padding-top: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); padding-bottom: var(--lmvz-dimension-14-8, clamp(0.5rem, 0.41rem + 0.39vw, 0.88rem)); padding-inline: var(--lmvz-dimension-24-16, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)); border: none; border-radius: var(--lmvz-semantic-border-radius-round, 999px); background: var(--lmvz-tab-background); color: var(--lmvz-tab-color); font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); cursor: pointer; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); z-index: 1; } button:disabled { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } button:hover { --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button:active { --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } :host([has-media]) { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); } :host([has-media]) button { padding-top: var(--lmvz-dimension-18-16, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); padding-bottom: var(--lmvz-dimension-14-12, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); padding-inline: var(--lmvz-dimension-48-40, clamp(2.5rem, 2.38rem + 0.52vw, 3rem)); border-radius: var(--lmvz-semantic-border-radius-lg, 14px); } :host([has-media]) button:hover { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } :host([has-media]) button:active { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } :host([selected]) button { --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-tab-background: var(--lmvz-semantic-color-status-active, #f6fbfe); } :host([selected][has-media]) button:hover, :host([selected][has-media]) button:active { --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); } .indicator { --lmvz-tab-indicator-size: 4px; position: absolute; background: linear-gradient(to right, var(--lmvz-semantic-color-gradient-main-1, #0e7ab4), var(--lmvz-semantic-color-gradient-main-2, #0e7ab4)); opacity: 0; transition: opacity 0.15s ease; inset-block-end: 0; inset-inline: 0; block-size: var(--lmvz-tab-indicator-size); border-start-start-radius: 0; border-start-end-radius: 0; border-end-start-radius: var(--lmvz-tab-indicator-size); border-end-end-radius: var(--lmvz-tab-indicator-size); } :host([selected][has-media]) .indicator { opacity: 1; } ::slotted(*) { --lmvz-component-color: var(--lmvz-tab-color); } ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-dimension-18-16, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } :host([has-media]) ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-component-icon-size-lg, clamp(1.25rem, 1.19rem + 0.26vw, 1.5rem)); } .label { display: contents; } `;
15799
15799
 
15800
15800
  class LmvzTab {
15801
15801
  constructor(hostRef) {
@@ -15806,7 +15806,7 @@ class LmvzTab {
15806
15806
  value;
15807
15807
  disabled = false;
15808
15808
  selected = false;
15809
- vertical = false;
15809
+ panel;
15810
15810
  handleMediaSlotChange = () => {
15811
15811
  this.el.toggleAttribute('has-media', (this.mediaSlotEl?.assignedElements() ?? []).length > 0);
15812
15812
  };
@@ -15815,7 +15815,7 @@ class LmvzTab {
15815
15815
  this.el.dispatchEvent(new CustomEvent('lmvzTabReady', { bubbles: true, composed: false }));
15816
15816
  }
15817
15817
  render() {
15818
- return (hAsync(Host, { key: '4380fe35cacb11bc7114664c126504e8f4fb09a0' }, hAsync("button", { key: 'ac77443cbba5c94f864820088f60c0bac23d0775', part: "button", role: "tab", disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, tabIndex: 0 }, hAsync("slot", { key: '9988497505ca3effa6c41011ac408a5d25629ca1', name: "media", ref: (el) => (this.mediaSlotEl = el), onSlotchange: this.handleMediaSlotChange }), hAsync("span", { key: '70566c46fba36b8717aa82917e45abd39cd7a2ea', class: "label" }, hAsync("slot", { key: 'a595738c387ee2f4f77f6ccdfdfb0589751ce999' })), hAsync("span", { key: '933758dc965d1151ca6a96367ea40290189384ad', "aria-hidden": "true", part: "indicator", class: "indicator" }))));
15818
+ return (hAsync(Host, { key: '8fb0ddc827d31fa1669a7fdaef288be5002a7c53' }, hAsync("button", { key: '72b8f8be2f7ec7d0d2840148d48188382699d9b9', part: "button", role: "tab", disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, tabIndex: 0 }, hAsync("slot", { key: 'c951ae74e7b15feff7f32bc87b2e3fd46221b6b4', name: "media", ref: (el) => (this.mediaSlotEl = el), onSlotchange: this.handleMediaSlotChange }), hAsync("span", { key: '8a06f3a9598bbf90819ff3644874f53b1ed9f840', class: "label" }, hAsync("slot", { key: '98217fca2371ad7b0ded79628895337603a54c2f' })), hAsync("span", { key: '68a11cf2f3d51aa6f4b9a7d2efcce1a1bb0c7640', "aria-hidden": "true", part: "indicator", class: "indicator" }))));
15819
15819
  }
15820
15820
  static get delegatesFocus() { return true; }
15821
15821
  static get style() { return lmvzTabCss(); }
@@ -15826,15 +15826,15 @@ class LmvzTab {
15826
15826
  "value": [513],
15827
15827
  "disabled": [516],
15828
15828
  "selected": [516],
15829
- "vertical": [516]
15829
+ "panel": [513]
15830
15830
  },
15831
15831
  "$listeners$": undefined,
15832
15832
  "$lazyBundleId$": "-",
15833
- "$attrsToReflect$": [["value", "value"], ["disabled", "disabled"], ["selected", "selected"], ["vertical", "vertical"]]
15833
+ "$attrsToReflect$": [["value", "value"], ["disabled", "disabled"], ["selected", "selected"], ["panel", "panel"]]
15834
15834
  }; }
15835
15835
  }
15836
15836
 
15837
- const lmvzTabsCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; } .tablist { display: inline-flex; flex-direction: row; background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: auto hidden; scrollbar-width: none; } .tablist::-webkit-scrollbar { display: none; } :host([has-icon-tabs]) .tablist { gap: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); background: none; border-radius: 0; } :host([orientation='vertical']) .tablist { flex-direction: column; overflow: visible auto; } ::slotted([role='tabpanel']) { display: block; } ::slotted([role='tabpanel'][hidden]) { display: none; } `;
15837
+ const lmvzTabsCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; } .tablist { display: inline-flex; flex-direction: row; background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: auto hidden; scrollbar-width: none; } .tablist::-webkit-scrollbar { display: none; } :host([has-icon-tabs]) .tablist { gap: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); background: none; border-radius: 0; } ::slotted([role='tabpanel']) { display: block; } ::slotted([role='tabpanel'][hidden]) { display: none; } `;
15838
15838
 
15839
15839
  let tabsIdCounter = 0;
15840
15840
  class LmvzTabs extends ReactiveControllerHost {
@@ -15850,7 +15850,6 @@ class LmvzTabs extends ReactiveControllerHost {
15850
15850
  listenerTarget: this.tablistEl,
15851
15851
  });
15852
15852
  value;
15853
- orientation = 'horizontal';
15854
15853
  lmvzChange;
15855
15854
  resolvedValue;
15856
15855
  constructor(hostRef) {
@@ -15861,12 +15860,11 @@ class LmvzTabs extends ReactiveControllerHost {
15861
15860
  }
15862
15861
  componentWillLoad() {
15863
15862
  super.componentWillLoad();
15864
- this.syncOrientation();
15865
15863
  }
15866
15864
  componentDidLoad() {
15867
- this.tabSlotEl?.addEventListener('slotchange', this.handleTabSlotChange);
15868
- this.panelSlotEl?.addEventListener('slotchange', this.handlePanelSlotChange);
15869
- this.el.addEventListener('lmvzTabReady', this.handleTabReady);
15865
+ this.tabSlotEl?.addEventListener('slotchange', this.handleTabSlotChange.bind(this));
15866
+ this.panelSlotEl?.addEventListener('slotchange', this.handlePanelSlotChange.bind(this));
15867
+ this.el.addEventListener('lmvzTabReady', this.handleTabReady.bind(this));
15870
15868
  this.handleTabSlotChange();
15871
15869
  if (this.tablistEl) {
15872
15870
  this.focusController.updateListenerTarget(this.tablistEl);
@@ -15874,17 +15872,16 @@ class LmvzTabs extends ReactiveControllerHost {
15874
15872
  super.componentDidLoad();
15875
15873
  }
15876
15874
  disconnectedCallback() {
15877
- this.el.removeEventListener('lmvzTabReady', this.handleTabReady);
15875
+ this.el.removeEventListener('lmvzTabReady', this.handleTabReady.bind(this));
15878
15876
  super.disconnectedCallback();
15879
15877
  }
15878
+ handleSlotChangeEvent() {
15879
+ this.wireAriaIds();
15880
+ this.applySelection(this.resolvedValue ?? this.value);
15881
+ }
15880
15882
  handleValueChange(newValue) {
15881
15883
  this.applySelection(newValue);
15882
15884
  }
15883
- handleOrientationChange() {
15884
- this.syncOrientation();
15885
- this.syncFocusTargets();
15886
- this.syncTabOrientation();
15887
- }
15888
15885
  async initFocus() {
15889
15886
  this.focusController.initFocus();
15890
15887
  }
@@ -15924,23 +15921,22 @@ class LmvzTabs extends ReactiveControllerHost {
15924
15921
  get slottedPanels() {
15925
15922
  return (this.panelSlotEl?.assignedElements({ flatten: false }) ?? []);
15926
15923
  }
15927
- handleTabSlotChange = () => {
15924
+ handleTabSlotChange() {
15928
15925
  this.syncFocusTargets();
15929
- this.syncTabOrientation();
15930
15926
  this.wireAriaIds();
15931
15927
  this.applySelection(this.value);
15932
15928
  this.updateIconTabsAttr();
15933
- };
15934
- handlePanelSlotChange = () => {
15929
+ }
15930
+ handlePanelSlotChange() {
15935
15931
  this.wireAriaIds();
15936
15932
  this.applySelection(this.resolvedValue ?? this.value);
15937
- };
15938
- handleTabReady = () => {
15933
+ }
15934
+ handleTabReady() {
15939
15935
  this.syncFocusTargets();
15940
15936
  this.wireAriaIds();
15941
15937
  this.applySelection(this.resolvedValue ?? this.value);
15942
15938
  this.updateIconTabsAttr();
15943
- };
15939
+ }
15944
15940
  updateIconTabsAttr() {
15945
15941
  this.el.toggleAttribute('has-icon-tabs', this.slottedTabs.some((t) => t.hasAttribute('has-media')));
15946
15942
  }
@@ -15948,34 +15944,31 @@ class LmvzTabs extends ReactiveControllerHost {
15948
15944
  const buttons = this.slottedTabs.map((tab) => tab.shadowRoot?.querySelector('button')).filter((b) => !!b);
15949
15945
  this.focusController.updateElements(buttons);
15950
15946
  }
15951
- syncOrientation() {
15952
- this.removeController(this.focusController);
15953
- this.focusController.hostDisconnected?.();
15954
- this.focusController = new DirectionalFocusController(this, {
15955
- orientation: this.orientation,
15956
- manageTabIndex: true,
15957
- enableHomeAndEnd: true,
15958
- listenerTarget: this.tablistEl,
15959
- });
15960
- this.addController(this.focusController);
15961
- if (this.el.isConnected) {
15962
- this.focusController.hostConnected?.();
15947
+ resolvePanelForTab(tab, index, panels) {
15948
+ const panelId = tab.getAttribute('panel');
15949
+ if (panelId) {
15950
+ const matched = panels.find((panel) => panel.id === panelId);
15951
+ if (matched)
15952
+ return matched;
15963
15953
  }
15954
+ return panels[index];
15964
15955
  }
15965
- syncTabOrientation() {
15966
- const isVertical = this.orientation === 'vertical';
15967
- this.slottedTabs.forEach((tab) => {
15968
- tab.toggleAttribute('vertical', isVertical);
15969
- });
15956
+ warnIfMixedPanelLinking(tabs) {
15957
+ const hasPanelAttr = tabs.some((tab) => tab.hasAttribute('panel'));
15958
+ const missingPanelAttr = tabs.some((tab) => !tab.hasAttribute('panel'));
15959
+ if (hasPanelAttr && missingPanelAttr) {
15960
+ console.warn("[lmvz-tabs] Mixed panel linking: some lmvz-tab elements have a 'panel' attribute and some do not. Use either id-based or positional linking consistently.");
15961
+ }
15970
15962
  }
15971
15963
  wireAriaIds() {
15972
15964
  const tabs = this.slottedTabs;
15973
15965
  const panels = this.slottedPanels;
15974
15966
  const prefix = `lmvz-tabs-${this.instanceId}`;
15967
+ this.warnIfMixedPanelLinking(tabs);
15975
15968
  tabs.forEach((tab, index) => {
15976
15969
  const tabId = tab.id || `${prefix}-tab-${index}`;
15977
15970
  tab.id = tabId;
15978
- const panel = panels[index];
15971
+ const panel = this.resolvePanelForTab(tab, index, panels);
15979
15972
  if (!panel)
15980
15973
  return;
15981
15974
  const panelId = panel.id || `${prefix}-panel-${index}`;
@@ -16011,9 +16004,12 @@ class LmvzTabs extends ReactiveControllerHost {
16011
16004
  if (btn)
16012
16005
  btn.setAttribute('aria-selected', String(isSelected));
16013
16006
  });
16014
- this.slottedPanels.forEach((panel, index) => {
16015
- const tab = tabs[index];
16016
- const isActive = tab?.getAttribute('value') === effectiveValue;
16007
+ const panels = this.slottedPanels;
16008
+ tabs.forEach((tab, index) => {
16009
+ const panel = this.resolvePanelForTab(tab, index, panels);
16010
+ if (!panel)
16011
+ return;
16012
+ const isActive = tab.getAttribute('value') === effectiveValue;
16017
16013
  panel.toggleAttribute('hidden', !isActive);
16018
16014
  });
16019
16015
  const selectedBtn = target.shadowRoot?.querySelector('button');
@@ -16078,14 +16074,11 @@ class LmvzTabs extends ReactiveControllerHost {
16078
16074
  this.selectTab(value);
16079
16075
  };
16080
16076
  render() {
16081
- return (hAsync(Host, { key: 'be4fe04b1374a2793d3b1e9a658a449474efdd03', onClick: this.handleTabClick, onKeydown: this.handleKeydown }, hAsync("div", { key: 'd91015eddf16dfad5d49e942eb86e9f568978f34', role: "tablist", "aria-orientation": this.orientation, class: "tablist", ref: (el) => (this.tablistEl = el) }, hAsync("slot", { key: 'be0990a7c668bc96a67c01561e3142ec028dabd0', ref: (el) => (this.tabSlotEl = el) })), hAsync("div", { key: '338323738dfdbb436d86cdb4f6041a67c1af433d', part: "panels-container", class: "panels-container" }, hAsync("slot", { key: 'd225be099c8cb902776ce0a7dbf7dcb2aef2d03b', name: "panels", ref: (el) => (this.panelSlotEl = el) }))));
16077
+ return (hAsync(Host, { key: 'ba02ac9a48c62590b8c986670336b04f82030ad2', onClick: this.handleTabClick, onKeydown: this.handleKeydown }, hAsync("div", { key: 'c5c123997d154d676947c8a4f49149ff9e209750', role: "tablist", "aria-orientation": "horizontal", class: "tablist", ref: (el) => (this.tablistEl = el) }, hAsync("slot", { key: '7e58d17a4ec8e8300b5dfb745cb36154adc9dbcb', ref: (el) => (this.tabSlotEl = el) })), hAsync("div", { key: '5e3e44442e0ffb1a51fd325d545fd799d7a9d119', part: "panels-container", class: "panels-container" }, hAsync("slot", { key: 'a6208761b4422a297a58b863fff22843221644bd', name: "panels", ref: (el) => (this.panelSlotEl = el) }))));
16082
16078
  }
16083
16079
  static get watchers() { return {
16084
16080
  "value": [{
16085
16081
  "handleValueChange": 0
16086
- }],
16087
- "orientation": [{
16088
- "handleOrientationChange": 0
16089
16082
  }]
16090
16083
  }; }
16091
16084
  static get style() { return lmvzTabsCss(); }
@@ -16094,16 +16087,15 @@ class LmvzTabs extends ReactiveControllerHost {
16094
16087
  "$tagName$": "lmvz-tabs",
16095
16088
  "$members$": {
16096
16089
  "value": [1537],
16097
- "orientation": [1537],
16098
16090
  "resolvedValue": [32],
16099
16091
  "initFocus": [64],
16100
16092
  "activateTab": [64],
16101
16093
  "getTabElements": [64],
16102
16094
  "setTabPanelIds": [64]
16103
16095
  },
16104
- "$listeners$": undefined,
16096
+ "$listeners$": [[0, "slotchange", "handleSlotChangeEvent"]],
16105
16097
  "$lazyBundleId$": "-",
16106
- "$attrsToReflect$": [["value", "value"], ["orientation", "orientation"]]
16098
+ "$attrsToReflect$": [["value", "value"]]
16107
16099
  }; }
16108
16100
  }
16109
16101
 
package/hydrate/index.mjs CHANGED
@@ -15793,7 +15793,7 @@ class LmvzSpinner {
15793
15793
  }; }
15794
15794
  }
15795
15795
 
15796
- const lmvzTabCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; flex: none; } :host([disabled]) { cursor: not-allowed; pointer-events: none; } button { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-tab-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--lmvz-component-component-spacing-0-default, 4px); padding-top: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); padding-bottom: var(--lmvz-dimension-14-8, clamp(0.5rem, 0.41rem + 0.39vw, 0.88rem)); padding-inline: var(--lmvz-dimension-24-16, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)); border: none; border-radius: var(--lmvz-semantic-border-radius-round, 999px); background: var(--lmvz-tab-background); color: var(--lmvz-tab-color); font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); cursor: pointer; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); z-index: 1; } button:disabled { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } button:hover { --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button:active { --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } :host([has-media]) { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); } :host([has-media]) button { padding-top: var(--lmvz-dimension-18-16, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); padding-bottom: var(--lmvz-dimension-14-12, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); padding-inline: var(--lmvz-dimension-48-40, clamp(2.5rem, 2.38rem + 0.52vw, 3rem)); border-radius: var(--lmvz-semantic-border-radius-lg, 14px); } :host([has-media]) button:hover { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } :host([has-media]) button:active { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } :host([selected]) button { --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-tab-background: var(--lmvz-semantic-color-status-active, #f6fbfe); } :host([selected][has-media]) button:hover, :host([selected][has-media]) button:active { --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); } .indicator { --lmvz-tab-indicator-size: 4px; position: absolute; background: linear-gradient(to right, var(--lmvz-semantic-color-gradient-main-1, #0e7ab4), var(--lmvz-semantic-color-gradient-main-2, #0e7ab4)); opacity: 0; transition: opacity 0.15s ease; inset-block-end: 0; inset-inline: 0; block-size: var(--lmvz-tab-indicator-size); border-start-start-radius: 0; border-start-end-radius: 0; border-end-start-radius: var(--lmvz-tab-indicator-size); border-end-end-radius: var(--lmvz-tab-indicator-size); } :host([selected][has-media]) .indicator { opacity: 1; } :host([vertical]) button { border-radius: var(--lmvz-semantic-border-radius-round, 999px); } :host([vertical]) .indicator { inset-block: 0; inset-inline: 0 auto; inline-size: var(--lmvz-tab-indicator-size); block-size: auto; border-radius: 0 var(--lmvz-tab-indicator-size) var(--lmvz-tab-indicator-size) 0; background: linear-gradient(to bottom, var(--lmvz-semantic-color-gradient-main-1, #0e7ab4), var(--lmvz-semantic-color-gradient-main-2, #0e7ab4)); } ::slotted(*) { --lmvz-component-color: var(--lmvz-tab-color); } ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-dimension-18-16, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } :host([has-media]) ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-component-icon-size-lg, clamp(1.25rem, 1.19rem + 0.26vw, 1.5rem)); } .label { display: contents; } `;
15796
+ const lmvzTabCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; flex: none; } :host([disabled]) { cursor: not-allowed; pointer-events: none; } button { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-tab-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--lmvz-component-component-spacing-0-default, 4px); padding-top: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); padding-bottom: var(--lmvz-dimension-14-8, clamp(0.5rem, 0.41rem + 0.39vw, 0.88rem)); padding-inline: var(--lmvz-dimension-24-16, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)); border: none; border-radius: var(--lmvz-semantic-border-radius-round, 999px); background: var(--lmvz-tab-background); color: var(--lmvz-tab-color); font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); cursor: pointer; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); z-index: 1; } button:disabled { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } button:hover { --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button:active { --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } :host([has-media]) { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); } :host([has-media]) button { padding-top: var(--lmvz-dimension-18-16, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); padding-bottom: var(--lmvz-dimension-14-12, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); padding-inline: var(--lmvz-dimension-48-40, clamp(2.5rem, 2.38rem + 0.52vw, 3rem)); border-radius: var(--lmvz-semantic-border-radius-lg, 14px); } :host([has-media]) button:hover { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } :host([has-media]) button:active { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } :host([selected]) button { --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-tab-background: var(--lmvz-semantic-color-status-active, #f6fbfe); } :host([selected][has-media]) button:hover, :host([selected][has-media]) button:active { --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); } .indicator { --lmvz-tab-indicator-size: 4px; position: absolute; background: linear-gradient(to right, var(--lmvz-semantic-color-gradient-main-1, #0e7ab4), var(--lmvz-semantic-color-gradient-main-2, #0e7ab4)); opacity: 0; transition: opacity 0.15s ease; inset-block-end: 0; inset-inline: 0; block-size: var(--lmvz-tab-indicator-size); border-start-start-radius: 0; border-start-end-radius: 0; border-end-start-radius: var(--lmvz-tab-indicator-size); border-end-end-radius: var(--lmvz-tab-indicator-size); } :host([selected][has-media]) .indicator { opacity: 1; } ::slotted(*) { --lmvz-component-color: var(--lmvz-tab-color); } ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-dimension-18-16, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } :host([has-media]) ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-component-icon-size-lg, clamp(1.25rem, 1.19rem + 0.26vw, 1.5rem)); } .label { display: contents; } `;
15797
15797
 
15798
15798
  class LmvzTab {
15799
15799
  constructor(hostRef) {
@@ -15804,7 +15804,7 @@ class LmvzTab {
15804
15804
  value;
15805
15805
  disabled = false;
15806
15806
  selected = false;
15807
- vertical = false;
15807
+ panel;
15808
15808
  handleMediaSlotChange = () => {
15809
15809
  this.el.toggleAttribute('has-media', (this.mediaSlotEl?.assignedElements() ?? []).length > 0);
15810
15810
  };
@@ -15813,7 +15813,7 @@ class LmvzTab {
15813
15813
  this.el.dispatchEvent(new CustomEvent('lmvzTabReady', { bubbles: true, composed: false }));
15814
15814
  }
15815
15815
  render() {
15816
- return (hAsync(Host, { key: '4380fe35cacb11bc7114664c126504e8f4fb09a0' }, hAsync("button", { key: 'ac77443cbba5c94f864820088f60c0bac23d0775', part: "button", role: "tab", disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, tabIndex: 0 }, hAsync("slot", { key: '9988497505ca3effa6c41011ac408a5d25629ca1', name: "media", ref: (el) => (this.mediaSlotEl = el), onSlotchange: this.handleMediaSlotChange }), hAsync("span", { key: '70566c46fba36b8717aa82917e45abd39cd7a2ea', class: "label" }, hAsync("slot", { key: 'a595738c387ee2f4f77f6ccdfdfb0589751ce999' })), hAsync("span", { key: '933758dc965d1151ca6a96367ea40290189384ad', "aria-hidden": "true", part: "indicator", class: "indicator" }))));
15816
+ return (hAsync(Host, { key: '8fb0ddc827d31fa1669a7fdaef288be5002a7c53' }, hAsync("button", { key: '72b8f8be2f7ec7d0d2840148d48188382699d9b9', part: "button", role: "tab", disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, tabIndex: 0 }, hAsync("slot", { key: 'c951ae74e7b15feff7f32bc87b2e3fd46221b6b4', name: "media", ref: (el) => (this.mediaSlotEl = el), onSlotchange: this.handleMediaSlotChange }), hAsync("span", { key: '8a06f3a9598bbf90819ff3644874f53b1ed9f840', class: "label" }, hAsync("slot", { key: '98217fca2371ad7b0ded79628895337603a54c2f' })), hAsync("span", { key: '68a11cf2f3d51aa6f4b9a7d2efcce1a1bb0c7640', "aria-hidden": "true", part: "indicator", class: "indicator" }))));
15817
15817
  }
15818
15818
  static get delegatesFocus() { return true; }
15819
15819
  static get style() { return lmvzTabCss(); }
@@ -15824,15 +15824,15 @@ class LmvzTab {
15824
15824
  "value": [513],
15825
15825
  "disabled": [516],
15826
15826
  "selected": [516],
15827
- "vertical": [516]
15827
+ "panel": [513]
15828
15828
  },
15829
15829
  "$listeners$": undefined,
15830
15830
  "$lazyBundleId$": "-",
15831
- "$attrsToReflect$": [["value", "value"], ["disabled", "disabled"], ["selected", "selected"], ["vertical", "vertical"]]
15831
+ "$attrsToReflect$": [["value", "value"], ["disabled", "disabled"], ["selected", "selected"], ["panel", "panel"]]
15832
15832
  }; }
15833
15833
  }
15834
15834
 
15835
- const lmvzTabsCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; } .tablist { display: inline-flex; flex-direction: row; background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: auto hidden; scrollbar-width: none; } .tablist::-webkit-scrollbar { display: none; } :host([has-icon-tabs]) .tablist { gap: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); background: none; border-radius: 0; } :host([orientation='vertical']) .tablist { flex-direction: column; overflow: visible auto; } ::slotted([role='tabpanel']) { display: block; } ::slotted([role='tabpanel'][hidden]) { display: none; } `;
15835
+ const lmvzTabsCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; } .tablist { display: inline-flex; flex-direction: row; background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: auto hidden; scrollbar-width: none; } .tablist::-webkit-scrollbar { display: none; } :host([has-icon-tabs]) .tablist { gap: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); background: none; border-radius: 0; } ::slotted([role='tabpanel']) { display: block; } ::slotted([role='tabpanel'][hidden]) { display: none; } `;
15836
15836
 
15837
15837
  let tabsIdCounter = 0;
15838
15838
  class LmvzTabs extends ReactiveControllerHost {
@@ -15848,7 +15848,6 @@ class LmvzTabs extends ReactiveControllerHost {
15848
15848
  listenerTarget: this.tablistEl,
15849
15849
  });
15850
15850
  value;
15851
- orientation = 'horizontal';
15852
15851
  lmvzChange;
15853
15852
  resolvedValue;
15854
15853
  constructor(hostRef) {
@@ -15859,12 +15858,11 @@ class LmvzTabs extends ReactiveControllerHost {
15859
15858
  }
15860
15859
  componentWillLoad() {
15861
15860
  super.componentWillLoad();
15862
- this.syncOrientation();
15863
15861
  }
15864
15862
  componentDidLoad() {
15865
- this.tabSlotEl?.addEventListener('slotchange', this.handleTabSlotChange);
15866
- this.panelSlotEl?.addEventListener('slotchange', this.handlePanelSlotChange);
15867
- this.el.addEventListener('lmvzTabReady', this.handleTabReady);
15863
+ this.tabSlotEl?.addEventListener('slotchange', this.handleTabSlotChange.bind(this));
15864
+ this.panelSlotEl?.addEventListener('slotchange', this.handlePanelSlotChange.bind(this));
15865
+ this.el.addEventListener('lmvzTabReady', this.handleTabReady.bind(this));
15868
15866
  this.handleTabSlotChange();
15869
15867
  if (this.tablistEl) {
15870
15868
  this.focusController.updateListenerTarget(this.tablistEl);
@@ -15872,17 +15870,16 @@ class LmvzTabs extends ReactiveControllerHost {
15872
15870
  super.componentDidLoad();
15873
15871
  }
15874
15872
  disconnectedCallback() {
15875
- this.el.removeEventListener('lmvzTabReady', this.handleTabReady);
15873
+ this.el.removeEventListener('lmvzTabReady', this.handleTabReady.bind(this));
15876
15874
  super.disconnectedCallback();
15877
15875
  }
15876
+ handleSlotChangeEvent() {
15877
+ this.wireAriaIds();
15878
+ this.applySelection(this.resolvedValue ?? this.value);
15879
+ }
15878
15880
  handleValueChange(newValue) {
15879
15881
  this.applySelection(newValue);
15880
15882
  }
15881
- handleOrientationChange() {
15882
- this.syncOrientation();
15883
- this.syncFocusTargets();
15884
- this.syncTabOrientation();
15885
- }
15886
15883
  async initFocus() {
15887
15884
  this.focusController.initFocus();
15888
15885
  }
@@ -15922,23 +15919,22 @@ class LmvzTabs extends ReactiveControllerHost {
15922
15919
  get slottedPanels() {
15923
15920
  return (this.panelSlotEl?.assignedElements({ flatten: false }) ?? []);
15924
15921
  }
15925
- handleTabSlotChange = () => {
15922
+ handleTabSlotChange() {
15926
15923
  this.syncFocusTargets();
15927
- this.syncTabOrientation();
15928
15924
  this.wireAriaIds();
15929
15925
  this.applySelection(this.value);
15930
15926
  this.updateIconTabsAttr();
15931
- };
15932
- handlePanelSlotChange = () => {
15927
+ }
15928
+ handlePanelSlotChange() {
15933
15929
  this.wireAriaIds();
15934
15930
  this.applySelection(this.resolvedValue ?? this.value);
15935
- };
15936
- handleTabReady = () => {
15931
+ }
15932
+ handleTabReady() {
15937
15933
  this.syncFocusTargets();
15938
15934
  this.wireAriaIds();
15939
15935
  this.applySelection(this.resolvedValue ?? this.value);
15940
15936
  this.updateIconTabsAttr();
15941
- };
15937
+ }
15942
15938
  updateIconTabsAttr() {
15943
15939
  this.el.toggleAttribute('has-icon-tabs', this.slottedTabs.some((t) => t.hasAttribute('has-media')));
15944
15940
  }
@@ -15946,34 +15942,31 @@ class LmvzTabs extends ReactiveControllerHost {
15946
15942
  const buttons = this.slottedTabs.map((tab) => tab.shadowRoot?.querySelector('button')).filter((b) => !!b);
15947
15943
  this.focusController.updateElements(buttons);
15948
15944
  }
15949
- syncOrientation() {
15950
- this.removeController(this.focusController);
15951
- this.focusController.hostDisconnected?.();
15952
- this.focusController = new DirectionalFocusController(this, {
15953
- orientation: this.orientation,
15954
- manageTabIndex: true,
15955
- enableHomeAndEnd: true,
15956
- listenerTarget: this.tablistEl,
15957
- });
15958
- this.addController(this.focusController);
15959
- if (this.el.isConnected) {
15960
- this.focusController.hostConnected?.();
15945
+ resolvePanelForTab(tab, index, panels) {
15946
+ const panelId = tab.getAttribute('panel');
15947
+ if (panelId) {
15948
+ const matched = panels.find((panel) => panel.id === panelId);
15949
+ if (matched)
15950
+ return matched;
15961
15951
  }
15952
+ return panels[index];
15962
15953
  }
15963
- syncTabOrientation() {
15964
- const isVertical = this.orientation === 'vertical';
15965
- this.slottedTabs.forEach((tab) => {
15966
- tab.toggleAttribute('vertical', isVertical);
15967
- });
15954
+ warnIfMixedPanelLinking(tabs) {
15955
+ const hasPanelAttr = tabs.some((tab) => tab.hasAttribute('panel'));
15956
+ const missingPanelAttr = tabs.some((tab) => !tab.hasAttribute('panel'));
15957
+ if (hasPanelAttr && missingPanelAttr) {
15958
+ console.warn("[lmvz-tabs] Mixed panel linking: some lmvz-tab elements have a 'panel' attribute and some do not. Use either id-based or positional linking consistently.");
15959
+ }
15968
15960
  }
15969
15961
  wireAriaIds() {
15970
15962
  const tabs = this.slottedTabs;
15971
15963
  const panels = this.slottedPanels;
15972
15964
  const prefix = `lmvz-tabs-${this.instanceId}`;
15965
+ this.warnIfMixedPanelLinking(tabs);
15973
15966
  tabs.forEach((tab, index) => {
15974
15967
  const tabId = tab.id || `${prefix}-tab-${index}`;
15975
15968
  tab.id = tabId;
15976
- const panel = panels[index];
15969
+ const panel = this.resolvePanelForTab(tab, index, panels);
15977
15970
  if (!panel)
15978
15971
  return;
15979
15972
  const panelId = panel.id || `${prefix}-panel-${index}`;
@@ -16009,9 +16002,12 @@ class LmvzTabs extends ReactiveControllerHost {
16009
16002
  if (btn)
16010
16003
  btn.setAttribute('aria-selected', String(isSelected));
16011
16004
  });
16012
- this.slottedPanels.forEach((panel, index) => {
16013
- const tab = tabs[index];
16014
- const isActive = tab?.getAttribute('value') === effectiveValue;
16005
+ const panels = this.slottedPanels;
16006
+ tabs.forEach((tab, index) => {
16007
+ const panel = this.resolvePanelForTab(tab, index, panels);
16008
+ if (!panel)
16009
+ return;
16010
+ const isActive = tab.getAttribute('value') === effectiveValue;
16015
16011
  panel.toggleAttribute('hidden', !isActive);
16016
16012
  });
16017
16013
  const selectedBtn = target.shadowRoot?.querySelector('button');
@@ -16076,14 +16072,11 @@ class LmvzTabs extends ReactiveControllerHost {
16076
16072
  this.selectTab(value);
16077
16073
  };
16078
16074
  render() {
16079
- return (hAsync(Host, { key: 'be4fe04b1374a2793d3b1e9a658a449474efdd03', onClick: this.handleTabClick, onKeydown: this.handleKeydown }, hAsync("div", { key: 'd91015eddf16dfad5d49e942eb86e9f568978f34', role: "tablist", "aria-orientation": this.orientation, class: "tablist", ref: (el) => (this.tablistEl = el) }, hAsync("slot", { key: 'be0990a7c668bc96a67c01561e3142ec028dabd0', ref: (el) => (this.tabSlotEl = el) })), hAsync("div", { key: '338323738dfdbb436d86cdb4f6041a67c1af433d', part: "panels-container", class: "panels-container" }, hAsync("slot", { key: 'd225be099c8cb902776ce0a7dbf7dcb2aef2d03b', name: "panels", ref: (el) => (this.panelSlotEl = el) }))));
16075
+ return (hAsync(Host, { key: 'ba02ac9a48c62590b8c986670336b04f82030ad2', onClick: this.handleTabClick, onKeydown: this.handleKeydown }, hAsync("div", { key: 'c5c123997d154d676947c8a4f49149ff9e209750', role: "tablist", "aria-orientation": "horizontal", class: "tablist", ref: (el) => (this.tablistEl = el) }, hAsync("slot", { key: '7e58d17a4ec8e8300b5dfb745cb36154adc9dbcb', ref: (el) => (this.tabSlotEl = el) })), hAsync("div", { key: '5e3e44442e0ffb1a51fd325d545fd799d7a9d119', part: "panels-container", class: "panels-container" }, hAsync("slot", { key: 'a6208761b4422a297a58b863fff22843221644bd', name: "panels", ref: (el) => (this.panelSlotEl = el) }))));
16080
16076
  }
16081
16077
  static get watchers() { return {
16082
16078
  "value": [{
16083
16079
  "handleValueChange": 0
16084
- }],
16085
- "orientation": [{
16086
- "handleOrientationChange": 0
16087
16080
  }]
16088
16081
  }; }
16089
16082
  static get style() { return lmvzTabsCss(); }
@@ -16092,16 +16085,15 @@ class LmvzTabs extends ReactiveControllerHost {
16092
16085
  "$tagName$": "lmvz-tabs",
16093
16086
  "$members$": {
16094
16087
  "value": [1537],
16095
- "orientation": [1537],
16096
16088
  "resolvedValue": [32],
16097
16089
  "initFocus": [64],
16098
16090
  "activateTab": [64],
16099
16091
  "getTabElements": [64],
16100
16092
  "setTabPanelIds": [64]
16101
16093
  },
16102
- "$listeners$": undefined,
16094
+ "$listeners$": [[0, "slotchange", "handleSlotChangeEvent"]],
16103
16095
  "$lazyBundleId$": "-",
16104
- "$attrsToReflect$": [["value", "value"], ["orientation", "orientation"]]
16096
+ "$attrsToReflect$": [["value", "value"]]
16105
16097
  }; }
16106
16098
  }
16107
16099
 
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-DVab4vzV.js";export{s as setNonce}from"./p-DVab4vzV.js";import{g as l}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a([["p-efd9d50e",[[593,"lmvz-datepicker",{value:[6145],visibleMonth:[6145,"visible-month"],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],disabled:[516],readonly:[516],required:[516],name:[513],label:[1],placeholder:[1],helperText:[1,"helper-text"],errorMessage:[1,"error-message"],open:[1540],displayFormat:[1,"display-format"],focusedDate:[32],valueDate:[32],visibleMonthDate:[32],inputText:[32],hasUnparseableInput:[32],isInvalid:[32],nativeError:[32],checkValidity:[64],reportValidity:[64]},[[0,"keydown","handleKeydown"],[0,"focusin","handleInputFocus"],[0,"click","handleInputFocus"],[0,"invalid","handleInvalid"]],{required:[{handleValidityRelevantPropChange:0}],min:[{handleValidityRelevantPropChange:0}],max:[{handleValidityRelevantPropChange:0}],locale:[{handleDisplayFormatChange:0}],displayFormat:[{handleDisplayFormatChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-d73bb7fd",[[769,"lmvz-modal",{open:[1540],closeLabel:[1,"close-label"],hasHeader:[32]},[[0,"submit","handleFormDialogSubmit"]],{open:[{handleOpenChange:0}]}]]],["p-edec4d09",[[769,"lmvz-message",{type:[513],live:[1],leadingIcon:[4,"leading-icon"],dismissible:[4],closeLabel:[1,"close-label"],actionLabel:[1,"action-label"]}]]],["p-f911691c",[[838,"lmvz-select",{value:[1025],multiple:[516],values:[1040],label:[1],helperText:[1,"helper-text"],error:[6660],errorMessage:[1,"error-message"],disabled:[516],required:[516],name:[513],size:[513],nativeError:[32],selectedLabel:[32],selectedId:[32],activeId:[32],isOpen:[32],optionGroups:[32],focusTrigger:[64],blurTrigger:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"]],{value:[{handleValueChange:0}],values:[{handleValuesChange:0}],required:[{handleRequiredChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-7cbfbc88",[[513,"lmvz-snackbar",{status:[1537],message:[1025],duration:[1026],priority:[1025],actionLabel:[1025,"action-label"],animationClass:[32],show:[64],hide:[64]},null,{status:[{onStatusChange:0}]}]]],["p-335b3867",[[785,"lmvz-link",{href:[513],target:[513],rel:[1],type:[1537],externalLabel:[1,"external-label"]},null,{type:[{normalizeType:0}]}]]],["p-93b781ca",[[769,"lmvz-header",{role:[2561],lmvzActiveNav:[1,"lmvz-active-nav"],initFocus:[64]},null,{lmvzActiveNav:[{handleActiveNavChange:0}]}],[774,"lmvz-menuitem",{role:[2561],ti:[2562,"tabindex"]}]]],["p-743616c0",[[257,"lmvz-action"]]],["p-316dd61a",[[774,"lmvz-action-list",{label:[1],initFocus:[64]}]]],["p-c884c76e",[[774,"lmvz-card",{cardTitle:[1,"card-title"],imageUrl:[1,"image-url"],description:[1],primaryActionLabel:[1,"primary-action-label"]}]]],["p-f24f5207",[[578,"lmvz-checkbox",{label:[1],checked:[1540],value:[1],name:[513],disabled:[516],required:[516],error:[6660],errorMessage:[1,"error-message"],helperText:[1,"helper-text"],form:[1],autofocus:[4],nativeError:[32],checkedState:[32],focusInput:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"]],{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}]}]]],["p-8ba6ec19",[[774,"lmvz-menuitem",{role:[2561],ti:[2562,"tabindex"]}]]],["p-e35f49a1",[[578,"lmvz-radio",{label:[1],checked:[1540],value:[1],name:[513],disabled:[516],required:[516],error:[6660],helperText:[1,"helper-text"],form:[513],autofocus:[4],nativeError:[32],focusInput:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"],[0,"keydown","handleKeydown"]],{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}],value:[{handleValueChange:0}],label:[{handleLabelChange:0}]}]]],["p-27e8b4fa",[[513,"lmvz-spinner",{size:[513],ariaLabel:[513,"aria-label"]}]]],["p-3b7203a3",[[785,"lmvz-tab",{value:[513],disabled:[516],selected:[516],vertical:[516]}]]],["p-1ba1af8d",[[769,"lmvz-tabs",{value:[1537],orientation:[1537],resolvedValue:[32],initFocus:[64],activateTab:[64],getTabElements:[64],setTabPanelIds:[64]},null,{value:[{handleValueChange:0}],orientation:[{handleOrientationChange:0}]}]]],["p-773e9d95",[[578,"lmvz-toggle",{label:[1],checked:[1540],disabled:[516],required:[516],name:[1],value:[1],form:[1],focusToggle:[64],blurToggle:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64],getInputElement:[64]},null,{checked:[{handleCheckedChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-304c7554",[[769,"lmvz-button-group",{stacked:[516],primaryEnabledAction:[2064],hasActions:[2052,"has-actions"]}]]],["p-87f21ac9",[[769,"lmvz-chip",{type:[1537],size:[1537]},null,{type:[{normalizeType:0}],size:[{normalizeSize:0}]}]]],["p-6aae1df9",[[838,"lmvz-input",{value:[1025],label:[1],helperText:[1,"helper-text"],placeholder:[1],disabled:[516],readonly:[516],required:[516],name:[1],type:[1],errorMessage:[1,"error-message"],autocomplete:[1],inputmode:[1],autocorrect:[1],autocapitalize:[1],spellcheck:[4],autofocus:[4],minlength:[2],maxlength:[2],pattern:[1],min:[8],max:[8],step:[8],form:[1],size:[513],error:[6660],nativeError:[32],setValue:[64],focusInput:[64],blurInput:[64],select:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64],getInputElement:[64]},null,{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-41286514",[[769,"lmvz-popover",{open:[1540],anchor:[1],placement:[1],size:[1],autoFocus:[4,"auto-focus"],containerRole:[1,"container-role"],label:[1],anchorEl:[32],show:[64],hide:[64],toggle:[64]},null,{open:[{handleOpenChange:0}],anchor:[{handleAnchorChange:1}]}]]],["p-ebad823c",[[785,"lmvz-button",{ti:[514,"tabindex"],scale:[513],variant:[513],disabled:[516],type:[1],form:[1],formMethod:[1,"form-method"],name:[1],value:[1],buttonRole:[1,"button-role"]}],[514,"lmvz-icon",{icon:[513],weight:[513],size:[513],iconset:[513],ariaLabel:[513,"aria-label"],iconData:[32],visible:[32]},null,{icon:[{loadIconPathData:0}],iconset:[{loadIconPathData:0}]}]]]],e))));
1
+ import{p as e,b as a}from"./p-DVab4vzV.js";export{s as setNonce}from"./p-DVab4vzV.js";import{g as l}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a([["p-efd9d50e",[[593,"lmvz-datepicker",{value:[6145],visibleMonth:[6145,"visible-month"],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],disabled:[516],readonly:[516],required:[516],name:[513],label:[1],placeholder:[1],helperText:[1,"helper-text"],errorMessage:[1,"error-message"],open:[1540],displayFormat:[1,"display-format"],focusedDate:[32],valueDate:[32],visibleMonthDate:[32],inputText:[32],hasUnparseableInput:[32],isInvalid:[32],nativeError:[32],checkValidity:[64],reportValidity:[64]},[[0,"keydown","handleKeydown"],[0,"focusin","handleInputFocus"],[0,"click","handleInputFocus"],[0,"invalid","handleInvalid"]],{required:[{handleValidityRelevantPropChange:0}],min:[{handleValidityRelevantPropChange:0}],max:[{handleValidityRelevantPropChange:0}],locale:[{handleDisplayFormatChange:0}],displayFormat:[{handleDisplayFormatChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-d73bb7fd",[[769,"lmvz-modal",{open:[1540],closeLabel:[1,"close-label"],hasHeader:[32]},[[0,"submit","handleFormDialogSubmit"]],{open:[{handleOpenChange:0}]}]]],["p-edec4d09",[[769,"lmvz-message",{type:[513],live:[1],leadingIcon:[4,"leading-icon"],dismissible:[4],closeLabel:[1,"close-label"],actionLabel:[1,"action-label"]}]]],["p-f911691c",[[838,"lmvz-select",{value:[1025],multiple:[516],values:[1040],label:[1],helperText:[1,"helper-text"],error:[6660],errorMessage:[1,"error-message"],disabled:[516],required:[516],name:[513],size:[513],nativeError:[32],selectedLabel:[32],selectedId:[32],activeId:[32],isOpen:[32],optionGroups:[32],focusTrigger:[64],blurTrigger:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"]],{value:[{handleValueChange:0}],values:[{handleValuesChange:0}],required:[{handleRequiredChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-7cbfbc88",[[513,"lmvz-snackbar",{status:[1537],message:[1025],duration:[1026],priority:[1025],actionLabel:[1025,"action-label"],animationClass:[32],show:[64],hide:[64]},null,{status:[{onStatusChange:0}]}]]],["p-335b3867",[[785,"lmvz-link",{href:[513],target:[513],rel:[1],type:[1537],externalLabel:[1,"external-label"]},null,{type:[{normalizeType:0}]}]]],["p-93b781ca",[[769,"lmvz-header",{role:[2561],lmvzActiveNav:[1,"lmvz-active-nav"],initFocus:[64]},null,{lmvzActiveNav:[{handleActiveNavChange:0}]}],[774,"lmvz-menuitem",{role:[2561],ti:[2562,"tabindex"]}]]],["p-743616c0",[[257,"lmvz-action"]]],["p-316dd61a",[[774,"lmvz-action-list",{label:[1],initFocus:[64]}]]],["p-c884c76e",[[774,"lmvz-card",{cardTitle:[1,"card-title"],imageUrl:[1,"image-url"],description:[1],primaryActionLabel:[1,"primary-action-label"]}]]],["p-f24f5207",[[578,"lmvz-checkbox",{label:[1],checked:[1540],value:[1],name:[513],disabled:[516],required:[516],error:[6660],errorMessage:[1,"error-message"],helperText:[1,"helper-text"],form:[1],autofocus:[4],nativeError:[32],checkedState:[32],focusInput:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"]],{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}]}]]],["p-8ba6ec19",[[774,"lmvz-menuitem",{role:[2561],ti:[2562,"tabindex"]}]]],["p-e35f49a1",[[578,"lmvz-radio",{label:[1],checked:[1540],value:[1],name:[513],disabled:[516],required:[516],error:[6660],helperText:[1,"helper-text"],form:[513],autofocus:[4],nativeError:[32],focusInput:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"],[0,"keydown","handleKeydown"]],{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}],value:[{handleValueChange:0}],label:[{handleLabelChange:0}]}]]],["p-27e8b4fa",[[513,"lmvz-spinner",{size:[513],ariaLabel:[513,"aria-label"]}]]],["p-143e9621",[[785,"lmvz-tab",{value:[513],disabled:[516],selected:[516],panel:[513]}]]],["p-220e455e",[[769,"lmvz-tabs",{value:[1537],resolvedValue:[32],initFocus:[64],activateTab:[64],getTabElements:[64],setTabPanelIds:[64]},[[0,"slotchange","handleSlotChangeEvent"]],{value:[{handleValueChange:0}]}]]],["p-773e9d95",[[578,"lmvz-toggle",{label:[1],checked:[1540],disabled:[516],required:[516],name:[1],value:[1],form:[1],focusToggle:[64],blurToggle:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64],getInputElement:[64]},null,{checked:[{handleCheckedChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-304c7554",[[769,"lmvz-button-group",{stacked:[516],primaryEnabledAction:[2064],hasActions:[2052,"has-actions"]}]]],["p-87f21ac9",[[769,"lmvz-chip",{type:[1537],size:[1537]},null,{type:[{normalizeType:0}],size:[{normalizeSize:0}]}]]],["p-6aae1df9",[[838,"lmvz-input",{value:[1025],label:[1],helperText:[1,"helper-text"],placeholder:[1],disabled:[516],readonly:[516],required:[516],name:[1],type:[1],errorMessage:[1,"error-message"],autocomplete:[1],inputmode:[1],autocorrect:[1],autocapitalize:[1],spellcheck:[4],autofocus:[4],minlength:[2],maxlength:[2],pattern:[1],min:[8],max:[8],step:[8],form:[1],size:[513],error:[6660],nativeError:[32],setValue:[64],focusInput:[64],blurInput:[64],select:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64],getInputElement:[64]},null,{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-41286514",[[769,"lmvz-popover",{open:[1540],anchor:[1],placement:[1],size:[1],autoFocus:[4,"auto-focus"],containerRole:[1,"container-role"],label:[1],anchorEl:[32],show:[64],hide:[64],toggle:[64]},null,{open:[{handleOpenChange:0}],anchor:[{handleAnchorChange:1}]}]]],["p-ebad823c",[[785,"lmvz-button",{ti:[514,"tabindex"],scale:[513],variant:[513],disabled:[516],type:[1],form:[1],formMethod:[1,"form-method"],name:[1],value:[1],buttonRole:[1,"button-role"]}],[514,"lmvz-icon",{icon:[513],weight:[513],size:[513],iconset:[513],ariaLabel:[513,"aria-label"],iconData:[32],visible:[32]},null,{icon:[{loadIconPathData:0}],iconset:[{loadIconPathData:0}]}]]]],e))));
@@ -0,0 +1 @@
1
+ import{r as e,g as a,h as t,H as o}from"./p-DVab4vzV.js";const r=class{constructor(a){e(this,a)}get el(){return a(this)}mediaSlotEl;value;disabled=!1;selected=!1;panel;handleMediaSlotChange=()=>{this.el.toggleAttribute("has-media",(this.mediaSlotEl?.assignedElements()??[]).length>0)};componentDidLoad(){this.handleMediaSlotChange(),this.el.dispatchEvent(new CustomEvent("lmvzTabReady",{bubbles:!0,composed:!1}))}render(){return t(o,{key:"8fb0ddc827d31fa1669a7fdaef288be5002a7c53"},t("button",{key:"72b8f8be2f7ec7d0d2840148d48188382699d9b9",part:"button",role:"tab",disabled:this.disabled,"aria-selected":String(this.selected),"aria-disabled":this.disabled?"true":void 0,tabIndex:0},t("slot",{key:"c951ae74e7b15feff7f32bc87b2e3fd46221b6b4",name:"media",ref:e=>this.mediaSlotEl=e,onSlotchange:this.handleMediaSlotChange}),t("span",{key:"8a06f3a9598bbf90819ff3644874f53b1ed9f840",class:"label"},t("slot",{key:"98217fca2371ad7b0ded79628895337603a54c2f"})),t("span",{key:"68a11cf2f3d51aa6f4b9a7d2efcce1a1bb0c7640","aria-hidden":"true",part:"indicator",class:"indicator"})))}static get delegatesFocus(){return!0}};r.style=" @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; flex: none; } :host([disabled]) { cursor: not-allowed; pointer-events: none; } button { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-tab-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--lmvz-component-component-spacing-0-default, 4px); padding-top: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); padding-bottom: var(--lmvz-dimension-14-8, clamp(0.5rem, 0.41rem + 0.39vw, 0.88rem)); padding-inline: var(--lmvz-dimension-24-16, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)); border: none; border-radius: var(--lmvz-semantic-border-radius-round, 999px); background: var(--lmvz-tab-background); color: var(--lmvz-tab-color); font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); cursor: pointer; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); z-index: 1; } button:disabled { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } button:hover { --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-hover, #000000); } button:active { --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-tab-color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } :host([has-media]) { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); --lmvz-tab-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); } :host([has-media]) button { padding-top: var(--lmvz-dimension-18-16, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); padding-bottom: var(--lmvz-dimension-14-12, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); padding-inline: var(--lmvz-dimension-48-40, clamp(2.5rem, 2.38rem + 0.52vw, 3rem)); border-radius: var(--lmvz-semantic-border-radius-lg, 14px); } :host([has-media]) button:hover { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } :host([has-media]) button:active { --lmvz-tab-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } :host([selected]) button { --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-tab-background: var(--lmvz-semantic-color-status-active, #f6fbfe); } :host([selected][has-media]) button:hover, :host([selected][has-media]) button:active { --lmvz-tab-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); } .indicator { --lmvz-tab-indicator-size: 4px; position: absolute; background: linear-gradient(to right, var(--lmvz-semantic-color-gradient-main-1, #0e7ab4), var(--lmvz-semantic-color-gradient-main-2, #0e7ab4)); opacity: 0; transition: opacity 0.15s ease; inset-block-end: 0; inset-inline: 0; block-size: var(--lmvz-tab-indicator-size); border-start-start-radius: 0; border-start-end-radius: 0; border-end-start-radius: var(--lmvz-tab-indicator-size); border-end-end-radius: var(--lmvz-tab-indicator-size); } :host([selected][has-media]) .indicator { opacity: 1; } ::slotted(*) { --lmvz-component-color: var(--lmvz-tab-color); } ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-dimension-18-16, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } :host([has-media]) ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-component-icon-size-lg, clamp(1.25rem, 1.19rem + 0.26vw, 1.5rem)); } .label { display: contents; } ";export{r as lmvz_tab}
@@ -0,0 +1 @@
1
+ import{g as t,r as e,c as s,h as i,H as a}from"./p-DVab4vzV.js";import{D as n}from"./p-BlkpdeQI.js";import{R as l}from"./p-CICeIanv.js";import"./p-BA3wizqg.js";import"./p-DIyiticz.js";let o=0;const r=class extends l{get el(){return t(this)}instanceId=++o;tabSlotEl;panelSlotEl;tablistEl;focusController=new n(this,{orientation:"horizontal",manageTabIndex:!0,enableHomeAndEnd:!0,listenerTarget:this.tablistEl});value;lmvzChange;resolvedValue;constructor(t){super(),e(this,t),this.lmvzChange=s(this,"lmvzChange",7),this.addController(this.focusController)}componentWillLoad(){super.componentWillLoad()}componentDidLoad(){this.tabSlotEl?.addEventListener("slotchange",this.handleTabSlotChange.bind(this)),this.panelSlotEl?.addEventListener("slotchange",this.handlePanelSlotChange.bind(this)),this.el.addEventListener("lmvzTabReady",this.handleTabReady.bind(this)),this.handleTabSlotChange(),this.tablistEl&&this.focusController.updateListenerTarget(this.tablistEl),super.componentDidLoad()}disconnectedCallback(){this.el.removeEventListener("lmvzTabReady",this.handleTabReady.bind(this)),super.disconnectedCallback()}handleSlotChangeEvent(){this.wireAriaIds(),this.applySelection(this.resolvedValue??this.value)}handleValueChange(t){this.applySelection(t)}async initFocus(){this.focusController.initFocus()}async activateTab(t){const e=this.findTabByValue(t);e&&!this.isTabDisabled(e)&&this.selectTab(t)}async getTabElements(){return this.slottedTabs}async setTabPanelIds(t){const e=this.slottedTabs,s=this.slottedPanels;t.forEach((([t,i],a)=>{const n=e[a],l=s[a],o=`${t}-btn`;if(n){n.id=t;const e=n.shadowRoot?.querySelector("button");e&&(e.id=o,e.setAttribute("aria-controls",i))}l&&(l.id=i,l.setAttribute("aria-labelledby",o))}))}get slottedTabs(){return(this.tabSlotEl?.assignedElements({flatten:!1})??[]).filter((t=>"lmvz-tab"===t.tagName.toLowerCase()))}get slottedPanels(){return this.panelSlotEl?.assignedElements({flatten:!1})??[]}handleTabSlotChange(){this.syncFocusTargets(),this.wireAriaIds(),this.applySelection(this.value),this.updateIconTabsAttr()}handlePanelSlotChange(){this.wireAriaIds(),this.applySelection(this.resolvedValue??this.value)}handleTabReady(){this.syncFocusTargets(),this.wireAriaIds(),this.applySelection(this.resolvedValue??this.value),this.updateIconTabsAttr()}updateIconTabsAttr(){this.el.toggleAttribute("has-icon-tabs",this.slottedTabs.some((t=>t.hasAttribute("has-media"))))}syncFocusTargets(){const t=this.slottedTabs.map((t=>t.shadowRoot?.querySelector("button"))).filter((t=>!!t));this.focusController.updateElements(t)}resolvePanelForTab(t,e,s){const i=t.getAttribute("panel");if(i){const t=s.find((t=>t.id===i));if(t)return t}return s[e]}warnIfMixedPanelLinking(t){const e=t.some((t=>t.hasAttribute("panel"))),s=t.some((t=>!t.hasAttribute("panel")));e&&s&&console.warn("[lmvz-tabs] Mixed panel linking: some lmvz-tab elements have a 'panel' attribute and some do not. Use either id-based or positional linking consistently.")}wireAriaIds(){const t=this.slottedTabs,e=this.slottedPanels,s=`lmvz-tabs-${this.instanceId}`;this.warnIfMixedPanelLinking(t),t.forEach(((t,i)=>{const a=t.id||`${s}-tab-${i}`;t.id=a;const n=this.resolvePanelForTab(t,i,e);if(!n)return;const l=n.id||`${s}-panel-${i}`;n.id=l;const o=t.shadowRoot?.querySelector("button");o&&(o.setAttribute("aria-controls",l),o.setAttribute("id",`${a}-btn`)),n.setAttribute("role",n.getAttribute("role")??"tabpanel"),n.setAttribute("aria-labelledby",`${a}-btn`)}))}applySelection(t){const e=this.slottedTabs;if(!e.length)return;let s=this.findTabByValue(t);if(s&&!this.isTabDisabled(s)||(s=this.findNearestEnabled(t)??void 0),!s)return;const i=s.getAttribute("value")??"";this.resolvedValue=i,this.value!==i&&(this.value=i),e.forEach((t=>{const e=t.getAttribute("value")===i;t.toggleAttribute("selected",e);const s=t.shadowRoot?.querySelector("button");s&&s.setAttribute("aria-selected",String(e))}));const a=this.slottedPanels;e.forEach(((t,e)=>{const s=this.resolvePanelForTab(t,e,a);if(!s)return;const n=t.getAttribute("value")===i;s.toggleAttribute("hidden",!n)}));const n=s.shadowRoot?.querySelector("button");n&&this.focusController.setCurrentElement(n)}isTabDisabled(t){return t.hasAttribute("disabled")||!!t.disabled}findTabByValue(t){return this.slottedTabs.find((e=>e.getAttribute("value")===t))}findNearestEnabled(t){const e=this.slottedTabs,s=e.findIndex((e=>e.getAttribute("value")===t));for(let t=1;t<e.length;t++){const i=e[(s+t)%e.length];if(i&&!this.isTabDisabled(i))return i;const a=e[(s-t+e.length)%e.length];if(a&&!this.isTabDisabled(a))return a}}selectTab(t){t!==this.resolvedValue&&(this.applySelection(t),this.lmvzChange.emit({value:t}))}handleTabClick=t=>{const e=t.target.closest("lmvz-tab");if(!e)return;const s=e.getAttribute("value");s&&!this.isTabDisabled(e)&&this.selectTab(s)};handleKeydown=t=>{if("Enter"!==t.key&&" "!==t.key)return;const e=this.el.ownerDocument.activeElement;if(!e)return;let s=null;for(const t of this.slottedTabs)if(t===e){s=t;break}if(!s)return;const i=s.getAttribute("value");i&&!this.isTabDisabled(s)&&(t.preventDefault(),this.selectTab(i))};render(){return i(a,{key:"ba02ac9a48c62590b8c986670336b04f82030ad2",onClick:this.handleTabClick,onKeydown:this.handleKeydown},i("div",{key:"c5c123997d154d676947c8a4f49149ff9e209750",role:"tablist","aria-orientation":"horizontal",class:"tablist",ref:t=>this.tablistEl=t},i("slot",{key:"7e58d17a4ec8e8300b5dfb745cb36154adc9dbcb",ref:t=>this.tabSlotEl=t})),i("div",{key:"5e3e44442e0ffb1a51fd325d545fd799d7a9d119",part:"panels-container",class:"panels-container"},i("slot",{key:"a6208761b4422a297a58b863fff22843221644bd",name:"panels",ref:t=>this.panelSlotEl=t})))}static get watchers(){return{value:[{handleValueChange:0}]}}};r.style=" @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; } .tablist { display: inline-flex; flex-direction: row; background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: auto hidden; scrollbar-width: none; } .tablist::-webkit-scrollbar { display: none; } :host([has-icon-tabs]) .tablist { gap: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); background: none; border-radius: 0; } ::slotted([role='tabpanel']) { display: block; } ::slotted([role='tabpanel'][hidden]) { display: none; } ";export{r as lmvz_tabs}