@albi_scando/as-design-system-lib 1.3.0 → 1.5.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.
@@ -471,7 +471,7 @@ class nt extends s {
471
471
  const ot = "next-button", at = "base-dialog", q = `<dialog part="dialog">
472
472
  <slot></slot>
473
473
  </dialog>
474
- `, B = "dialog{background-color:var(--color-bg-primary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-secondary);border-radius:var(--border-radius-xl);padding:var(--spacing-4);max-width:90vw;max-height:90vh;font-family:var(--font-family-base);line-height:var(--line-height-normal);font-size:var(--font-size-sm);box-shadow:var(--shadow-2xl);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:slideIn var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog.closing{animation:slideOut var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog::backdrop{background:#00000080;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn var(--transition-base) ease-out forwards}dialog.closing::backdrop{animation:fadeOut var(--transition-base) ease-out forwards}@keyframes slideIn{0%{opacity:0;transform:scale(.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.95) translateY(-20px)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}", E = new CSSStyleSheet();
474
+ `, B = "dialog{background-color:var(--color-bg-primary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-secondary);border-radius:var(--border-radius-xl);padding:var(--spacing-4);max-width:90vw;max-height:90vh;font-family:var(--font-family-base);line-height:var(--line-height-normal);font-size:var(--font-size-sm);box-shadow:var(--shadow-2xl);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:slideIn var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog.closing{animation:slideOut var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog::backdrop{background:var(--window-backdrop);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn var(--transition-base) ease-out forwards}dialog.closing::backdrop{animation:fadeOut var(--transition-base) ease-out forwards}@keyframes slideIn{0%{opacity:0;transform:scale(.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.95) translateY(-20px)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}", E = new CSSStyleSheet();
475
475
  E.replaceSync(B);
476
476
  class d extends HTMLElement {
477
477
  /**
@@ -766,7 +766,7 @@ const dt = "header-body-footer-dialog", j = `<div class="bar-menu-container">
766
766
 
767
767
  <next-button class="nav-next" part="nav-next-button"></next-button>
768
768
  </div>
769
- `, X = '@charset "UTF-8";:host{display:block;width:100%}@media(max-width:600px){:host{--game-menu-width: 90%}}@media(min-width:601px)and (max-width:1200px){:host{--game-menu-width: calc(90% - (40%*(100vw - 601px)/599px)) }}@media(min-width:1201px){:host{--game-menu-width: 50%}}.bar-menu-container{display:flex;align-items:center;justify-content:space-between;width:var(--game-menu-width, 90%);max-width:900px;height:100%;gap:var(--gap-sm);padding:var(--spacing-1);background:var(--color-bg-primary);border-radius:var(--border-radius-full);border:var(--border-width-2) solid var(--color-bg-primary);box-shadow:var(--shadow-sm);margin:0 auto}.bar-menu-container previous-button,.bar-menu-container next-button{flex-shrink:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.bar-menu-container previous-button.visible,.bar-menu-container next-button.visible{opacity:1;visibility:visible;pointer-events:auto}.bar-menu-container previous-button::part(button),.bar-menu-container next-button::part(button){background-color:transparent;box-shadow:none}.bar-menu-container .buttons-wrapper{display:grid;grid-template-columns:repeat(var(--game-menu-visible-count, 3),1fr);grid-auto-rows:max-content;align-items:center;justify-items:center;gap:var(--gap-sm);overflow:hidden;position:relative;width:auto}::slotted(*){display:none;flex-shrink:0;will-change:opacity,transform;contain:layout style paint;opacity:0;transform:scale(.8)}::slotted(.animating){transition:opacity .4s cubic-bezier(.34,1.56,.64,1),transform .4s cubic-bezier(.34,1.56,.64,1)}::slotted(.visible-button){display:inline-flex!important;pointer-events:auto;opacity:1;transform:scale(1)}', R = new CSSStyleSheet();
769
+ `, X = '@charset "UTF-8";:host{display:block;width:100%}@media(max-width:600px){:host{--game-menu-width: 90%}}@media(min-width:601px)and (max-width:1200px){:host{--game-menu-width: calc(90% - (40%*(100vw - 601px)/599px)) }}@media(min-width:1201px){:host{--game-menu-width: 50%}}.bar-menu-container{display:flex;align-items:center;justify-content:space-between;width:var(--game-menu-width, 90%);max-width:900px;height:100%;gap:var(--gap-sm);padding:var(--spacing-1);background:var(--color-bg-primary);border-radius:var(--border-radius-full);border:var(--border-width-2) solid var(--color-border-secondary);box-shadow:var(--shadow-sm);margin:0 auto}.bar-menu-container previous-button,.bar-menu-container next-button{flex-shrink:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.bar-menu-container previous-button.visible,.bar-menu-container next-button.visible{opacity:1;visibility:visible;pointer-events:auto}.bar-menu-container previous-button::part(button),.bar-menu-container next-button::part(button){background-color:transparent;box-shadow:none}.bar-menu-container .buttons-wrapper{display:grid;grid-template-columns:repeat(var(--game-menu-visible-count, 3),1fr);grid-auto-rows:max-content;align-items:center;justify-items:center;gap:var(--gap-sm);overflow:hidden;position:relative;width:auto}::slotted(*){display:none;flex-shrink:0;will-change:opacity,transform;contain:layout style paint;opacity:0;transform:scale(.8)}::slotted(.animating){transition:opacity .4s cubic-bezier(.34,1.56,.64,1),transform .4s cubic-bezier(.34,1.56,.64,1)}::slotted(.visible-button){display:inline-flex!important;pointer-events:auto;opacity:1;transform:scale(1)}', R = new CSSStyleSheet();
770
770
  R.replaceSync(X);
771
771
  class v extends HTMLElement {
772
772
  static _visibleCountAttribute = "visible-count";
@@ -26,7 +26,7 @@
26
26
  `,X="button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}",k=new CSSStyleSheet;k.replaceSync(X);class G extends i{constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(k),this.command=c.CLOSE}static get observedAttributes(){return i.observedAttributes}connectedCallback(){this._render(),this._addEventListeners(),this._updateTitle()}attributeChangedCallback(t,e,r){super.attributeChangedCallback(t,e,r),t==="disabled"&&this._updateTitle()}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=F,this._syncAttributes())}_updateTitle(){const t=this.shadowRoot?.querySelector("button");this.disabled?t.removeAttribute("title"):t.setAttribute("title","Next")}}const J="next-button",Q="base-dialog",Z=`<dialog part="dialog">
27
27
  <slot></slot>
28
28
  </dialog>
29
- `,tt="dialog{background-color:var(--color-bg-primary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-secondary);border-radius:var(--border-radius-xl);padding:var(--spacing-4);max-width:90vw;max-height:90vh;font-family:var(--font-family-base);line-height:var(--line-height-normal);font-size:var(--font-size-sm);box-shadow:var(--shadow-2xl);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:slideIn var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog.closing{animation:slideOut var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog::backdrop{background:#00000080;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn var(--transition-base) ease-out forwards}dialog.closing::backdrop{animation:fadeOut var(--transition-base) ease-out forwards}@keyframes slideIn{0%{opacity:0;transform:scale(.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.95) translateY(-20px)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}",C=new CSSStyleSheet;C.replaceSync(tt);class d extends HTMLElement{static closedByAttribute="closedby";_closedBy=A.ANY;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(C)}static get observedAttributes(){return[d.closedByAttribute]}get dialogElement(){return this.shadowRoot?.querySelector("dialog")}get command(){return this.getAttribute(d.closedByAttribute)??A.ANY}get closedBy(){return this._closedBy}set closedBy(t){this._closedBy=t,this.setAttribute(d.closedByAttribute,t)}connectedCallback(){this._render(),this._addEventListeners()}disconnectedCallback(){this._removeEventListeners()}attributeChangedCallback(t,e,r){const u=this.dialogElement;u!=null&&r!==e&&this._syncAttribute(t)}_addEventListeners(){}_removeEventListeners(){}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=Z,this._syncAttributes())}_syncAttribute(t){const e=this.dialogElement;e!=null&&(this.hasAttribute(t)===!0?e.setAttribute(t,this.getAttribute(t)??n):e.removeAttribute(t))}_syncAttributes(){d.observedAttributes.forEach(t=>{this._syncAttribute(t)})}show(){this.dialogElement.show()}showModal(){this.dialogElement.showModal()}close(t){const e=this.dialogElement;e.classList.add("closing"),setTimeout(()=>{e.close(t),e.classList.remove("closing")},300)}}const et="confirmation-dialog",it=`<dialog part="dialog">
29
+ `,tt="dialog{background-color:var(--color-bg-primary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-secondary);border-radius:var(--border-radius-xl);padding:var(--spacing-4);max-width:90vw;max-height:90vh;font-family:var(--font-family-base);line-height:var(--line-height-normal);font-size:var(--font-size-sm);box-shadow:var(--shadow-2xl);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:slideIn var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog.closing{animation:slideOut var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog::backdrop{background:var(--window-backdrop);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn var(--transition-base) ease-out forwards}dialog.closing::backdrop{animation:fadeOut var(--transition-base) ease-out forwards}@keyframes slideIn{0%{opacity:0;transform:scale(.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.95) translateY(-20px)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}",C=new CSSStyleSheet;C.replaceSync(tt);class d extends HTMLElement{static closedByAttribute="closedby";_closedBy=A.ANY;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(C)}static get observedAttributes(){return[d.closedByAttribute]}get dialogElement(){return this.shadowRoot?.querySelector("dialog")}get command(){return this.getAttribute(d.closedByAttribute)??A.ANY}get closedBy(){return this._closedBy}set closedBy(t){this._closedBy=t,this.setAttribute(d.closedByAttribute,t)}connectedCallback(){this._render(),this._addEventListeners()}disconnectedCallback(){this._removeEventListeners()}attributeChangedCallback(t,e,r){const u=this.dialogElement;u!=null&&r!==e&&this._syncAttribute(t)}_addEventListeners(){}_removeEventListeners(){}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=Z,this._syncAttributes())}_syncAttribute(t){const e=this.dialogElement;e!=null&&(this.hasAttribute(t)===!0?e.setAttribute(t,this.getAttribute(t)??n):e.removeAttribute(t))}_syncAttributes(){d.observedAttributes.forEach(t=>{this._syncAttribute(t)})}show(){this.dialogElement.show()}showModal(){this.dialogElement.showModal()}close(t){const e=this.dialogElement;e.classList.add("closing"),setTimeout(()=>{e.close(t),e.classList.remove("closing")},300)}}const et="confirmation-dialog",it=`<dialog part="dialog">
30
30
  <header part="header">
31
31
  <h2></h2>
32
32
  </header>
@@ -58,4 +58,4 @@
58
58
 
59
59
  <next-button class="nav-next" part="nav-next-button"></next-button>
60
60
  </div>
61
- `,lt='@charset "UTF-8";:host{display:block;width:100%}@media(max-width:600px){:host{--game-menu-width: 90%}}@media(min-width:601px)and (max-width:1200px){:host{--game-menu-width: calc(90% - (40%*(100vw - 601px)/599px)) }}@media(min-width:1201px){:host{--game-menu-width: 50%}}.bar-menu-container{display:flex;align-items:center;justify-content:space-between;width:var(--game-menu-width, 90%);max-width:900px;height:100%;gap:var(--gap-sm);padding:var(--spacing-1);background:var(--color-bg-primary);border-radius:var(--border-radius-full);border:var(--border-width-2) solid var(--color-bg-primary);box-shadow:var(--shadow-sm);margin:0 auto}.bar-menu-container previous-button,.bar-menu-container next-button{flex-shrink:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.bar-menu-container previous-button.visible,.bar-menu-container next-button.visible{opacity:1;visibility:visible;pointer-events:auto}.bar-menu-container previous-button::part(button),.bar-menu-container next-button::part(button){background-color:transparent;box-shadow:none}.bar-menu-container .buttons-wrapper{display:grid;grid-template-columns:repeat(var(--game-menu-visible-count, 3),1fr);grid-auto-rows:max-content;align-items:center;justify-items:center;gap:var(--gap-sm);overflow:hidden;position:relative;width:auto}::slotted(*){display:none;flex-shrink:0;will-change:opacity,transform;contain:layout style paint;opacity:0;transform:scale(.8)}::slotted(.animating){transition:opacity .4s cubic-bezier(.34,1.56,.64,1),transform .4s cubic-bezier(.34,1.56,.64,1)}::slotted(.visible-button){display:inline-flex!important;pointer-events:auto;opacity:1;transform:scale(1)}',M=new CSSStyleSheet;M.replaceSync(lt);class b extends HTMLElement{static _visibleCountAttribute="visible-count";_currentIndex=0;_visibleCount=3;_MIN_VISIBLE=3;_MAX_VISIBLE=5;_slotElement=null;_navPrevButton=null;_navNextButton=null;_buttonsWrapper=null;_slotChangeListener=null;_keyDownListener=null;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(M)}static get observedAttributes(){return[b._visibleCountAttribute]}get visibleButtons(){const t=this.getAttribute(b._visibleCountAttribute);if(t!==null&&t!==n){const e=parseInt(t,10);return Math.max(this._MIN_VISIBLE,Math.min(this._MAX_VISIBLE,e))}return this._visibleCount}set visibleButtons(t){const e=Math.max(this._MIN_VISIBLE,Math.min(this._MAX_VISIBLE,t));this.setAttribute(b._visibleCountAttribute,String(e))}connectedCallback(){this._render(),this._cacheElements(),this._setupSlotListener(),this._setupKeyboardListener(),this._updateButtonVisibility()}disconnectedCallback(){this._removeSlotListener(),this._removeKeyboardListener()}attributeChangedCallback(t,e,r){t===b._visibleCountAttribute&&(this._visibleCount=this.visibleButtons,this._buttonsWrapper!==null&&this._buttonsWrapper.style.setProperty("--bar-menu-visible-count",String(this.visibleButtons)),this._updateButtonVisibility())}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=at)}_cacheElements(){this._slotElement=this.shadowRoot?.querySelector("slot")??null,this._navPrevButton=this.shadowRoot?.querySelector(".nav-prev")??null,this._navNextButton=this.shadowRoot?.querySelector(".nav-next")??null,this._buttonsWrapper=this.shadowRoot?.querySelector(".buttons-wrapper")??null,this._buttonsWrapper!==null&&this._buttonsWrapper.style.setProperty("--bar-menu-visible-count",String(this.visibleButtons)),this._navPrevButton!==null&&(this._navPrevButton.setAttribute("aria-label","Previous"),this._navPrevButton.addEventListener(g.CLICK,()=>{this._scrollPrevious()})),this._navNextButton!==null&&(this._navNextButton.setAttribute("aria-label","Next"),this._navNextButton.addEventListener(g.CLICK,()=>{this._scrollNext()}))}_setupSlotListener(){this._slotElement!==null&&(this._slotChangeListener=()=>{this._currentIndex=0,this._updateButtonVisibility()},this._slotElement.addEventListener("slotchange",this._slotChangeListener))}_removeSlotListener(){this._slotElement!==null&&this._slotChangeListener!==null&&this._slotElement.removeEventListener("slotchange",this._slotChangeListener)}_setupKeyboardListener(){this._keyDownListener=t=>{t.key==="ArrowLeft"?(t.preventDefault(),this._scrollPrevious()):t.key==="ArrowRight"&&(t.preventDefault(),this._scrollNext())},this.addEventListener(w.KEY_DOWN,this._keyDownListener)}_removeKeyboardListener(){this._keyDownListener!==null&&this.removeEventListener(w.KEY_DOWN,this._keyDownListener)}_getSlottedButtons(){return this._slotElement===null?[]:this._slotElement.assignedElements()}_updateButtonVisibility(t){const e=this._getSlottedButtons(),r=e.length,u=this.visibleButtons,v=this._currentIndex,f=Math.min(v+u,r);e.forEach((o,a)=>{const y=a>=v&&a<f,h=o;y||(o.classList.remove("visible-button"),o.classList.remove("animating"),h.style.display="none")}),t!==void 0?(e[0]?.offsetHeight,e.forEach((o,a)=>{if(a>=v&&a<f){const h=o;h.style.display="inline-flex",o.classList.add("animating");const ut=a%this.visibleButtons*50;h.style.transitionDelay=`${ut}ms`}}),e[0]?.offsetHeight,e.forEach((o,a)=>{a>=v&&a<f&&o.classList.add("visible-button")}),setTimeout(()=>{e.forEach(o=>{o.classList.remove("animating"),o.style.transitionDelay=n})},400)):e.forEach((o,a)=>{const y=a>=v&&a<f,h=o;y&&(h.style.display="inline-flex",o.classList.add("visible-button"))}),this._updateNavigationButtons(r,u)}_updateNavigationButtons(t,e){const r=t>e,u=this._currentIndex+e<t;this._navPrevButton!==null&&(r?(this._navPrevButton.classList.add("visible"),this._navPrevButton.disabled=this._currentIndex===0):this._navPrevButton.classList.remove("visible")),this._navNextButton!==null&&(r?(this._navNextButton.classList.add("visible"),this._navNextButton.disabled=!u):this._navNextButton.classList.remove("visible"))}_scrollPrevious(){this._currentIndex>0&&(this._currentIndex=Math.max(0,this._currentIndex-this.visibleButtons),this._updateButtonVisibility("previous"))}_scrollNext(){const t=this._getSlottedButtons().length,e=this.visibleButtons,r=this._currentIndex+e;r<t&&(this._currentIndex=r,this._updateButtonVisibility("next"))}scrollToButton(t){const e=this._getSlottedButtons().length,r=this.visibleButtons;t>=0&&t<e&&(this._currentIndex=Math.max(0,Math.min(t,e-r)),this._updateButtonVisibility())}getVisibleButtons(){return this._getSlottedButtons().filter(t=>t.classList.contains("visible-button"))}getAllButtons(){return this._getSlottedButtons()}getCurrentIndex(){return this._currentIndex}}const dt="bar-menu";s.APPLICATION_NAME=p,s.BarMenuComponent=b,s.BaseButtonComponent=i,s.BaseDialogComponent=d,s.ConfirmButtonComponent=D,s.ConfirmationDialogComponent=l,s.HeaderBodyFooterDialogComponent=_,s.NextButtonComponent=G,s.PreviousButtonComponent=U,s.UndoButtonComponent=V,s.WebComponentsRegistry=T,s.barMenuWebComponentSelector=dt,s.baseButtonWebComponentSelector=N,s.baseDialogWebComponentSelector=Q,s.confirmButtonWebComponentSelector=K,s.confirmationDialogWebComponentSelector=et,s.headerBodyFooterDialogWebComponentSelector=ot,s.nextButtonWebComponentSelector=J,s.previousButtonWebComponentSelector=j,s.undoButtonWebComponentSelector=O,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
61
+ `,lt='@charset "UTF-8";:host{display:block;width:100%}@media(max-width:600px){:host{--game-menu-width: 90%}}@media(min-width:601px)and (max-width:1200px){:host{--game-menu-width: calc(90% - (40%*(100vw - 601px)/599px)) }}@media(min-width:1201px){:host{--game-menu-width: 50%}}.bar-menu-container{display:flex;align-items:center;justify-content:space-between;width:var(--game-menu-width, 90%);max-width:900px;height:100%;gap:var(--gap-sm);padding:var(--spacing-1);background:var(--color-bg-primary);border-radius:var(--border-radius-full);border:var(--border-width-2) solid var(--color-border-secondary);box-shadow:var(--shadow-sm);margin:0 auto}.bar-menu-container previous-button,.bar-menu-container next-button{flex-shrink:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.bar-menu-container previous-button.visible,.bar-menu-container next-button.visible{opacity:1;visibility:visible;pointer-events:auto}.bar-menu-container previous-button::part(button),.bar-menu-container next-button::part(button){background-color:transparent;box-shadow:none}.bar-menu-container .buttons-wrapper{display:grid;grid-template-columns:repeat(var(--game-menu-visible-count, 3),1fr);grid-auto-rows:max-content;align-items:center;justify-items:center;gap:var(--gap-sm);overflow:hidden;position:relative;width:auto}::slotted(*){display:none;flex-shrink:0;will-change:opacity,transform;contain:layout style paint;opacity:0;transform:scale(.8)}::slotted(.animating){transition:opacity .4s cubic-bezier(.34,1.56,.64,1),transform .4s cubic-bezier(.34,1.56,.64,1)}::slotted(.visible-button){display:inline-flex!important;pointer-events:auto;opacity:1;transform:scale(1)}',M=new CSSStyleSheet;M.replaceSync(lt);class b extends HTMLElement{static _visibleCountAttribute="visible-count";_currentIndex=0;_visibleCount=3;_MIN_VISIBLE=3;_MAX_VISIBLE=5;_slotElement=null;_navPrevButton=null;_navNextButton=null;_buttonsWrapper=null;_slotChangeListener=null;_keyDownListener=null;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(M)}static get observedAttributes(){return[b._visibleCountAttribute]}get visibleButtons(){const t=this.getAttribute(b._visibleCountAttribute);if(t!==null&&t!==n){const e=parseInt(t,10);return Math.max(this._MIN_VISIBLE,Math.min(this._MAX_VISIBLE,e))}return this._visibleCount}set visibleButtons(t){const e=Math.max(this._MIN_VISIBLE,Math.min(this._MAX_VISIBLE,t));this.setAttribute(b._visibleCountAttribute,String(e))}connectedCallback(){this._render(),this._cacheElements(),this._setupSlotListener(),this._setupKeyboardListener(),this._updateButtonVisibility()}disconnectedCallback(){this._removeSlotListener(),this._removeKeyboardListener()}attributeChangedCallback(t,e,r){t===b._visibleCountAttribute&&(this._visibleCount=this.visibleButtons,this._buttonsWrapper!==null&&this._buttonsWrapper.style.setProperty("--bar-menu-visible-count",String(this.visibleButtons)),this._updateButtonVisibility())}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=at)}_cacheElements(){this._slotElement=this.shadowRoot?.querySelector("slot")??null,this._navPrevButton=this.shadowRoot?.querySelector(".nav-prev")??null,this._navNextButton=this.shadowRoot?.querySelector(".nav-next")??null,this._buttonsWrapper=this.shadowRoot?.querySelector(".buttons-wrapper")??null,this._buttonsWrapper!==null&&this._buttonsWrapper.style.setProperty("--bar-menu-visible-count",String(this.visibleButtons)),this._navPrevButton!==null&&(this._navPrevButton.setAttribute("aria-label","Previous"),this._navPrevButton.addEventListener(g.CLICK,()=>{this._scrollPrevious()})),this._navNextButton!==null&&(this._navNextButton.setAttribute("aria-label","Next"),this._navNextButton.addEventListener(g.CLICK,()=>{this._scrollNext()}))}_setupSlotListener(){this._slotElement!==null&&(this._slotChangeListener=()=>{this._currentIndex=0,this._updateButtonVisibility()},this._slotElement.addEventListener("slotchange",this._slotChangeListener))}_removeSlotListener(){this._slotElement!==null&&this._slotChangeListener!==null&&this._slotElement.removeEventListener("slotchange",this._slotChangeListener)}_setupKeyboardListener(){this._keyDownListener=t=>{t.key==="ArrowLeft"?(t.preventDefault(),this._scrollPrevious()):t.key==="ArrowRight"&&(t.preventDefault(),this._scrollNext())},this.addEventListener(w.KEY_DOWN,this._keyDownListener)}_removeKeyboardListener(){this._keyDownListener!==null&&this.removeEventListener(w.KEY_DOWN,this._keyDownListener)}_getSlottedButtons(){return this._slotElement===null?[]:this._slotElement.assignedElements()}_updateButtonVisibility(t){const e=this._getSlottedButtons(),r=e.length,u=this.visibleButtons,m=this._currentIndex,f=Math.min(m+u,r);e.forEach((o,a)=>{const y=a>=m&&a<f,h=o;y||(o.classList.remove("visible-button"),o.classList.remove("animating"),h.style.display="none")}),t!==void 0?(e[0]?.offsetHeight,e.forEach((o,a)=>{if(a>=m&&a<f){const h=o;h.style.display="inline-flex",o.classList.add("animating");const ut=a%this.visibleButtons*50;h.style.transitionDelay=`${ut}ms`}}),e[0]?.offsetHeight,e.forEach((o,a)=>{a>=m&&a<f&&o.classList.add("visible-button")}),setTimeout(()=>{e.forEach(o=>{o.classList.remove("animating"),o.style.transitionDelay=n})},400)):e.forEach((o,a)=>{const y=a>=m&&a<f,h=o;y&&(h.style.display="inline-flex",o.classList.add("visible-button"))}),this._updateNavigationButtons(r,u)}_updateNavigationButtons(t,e){const r=t>e,u=this._currentIndex+e<t;this._navPrevButton!==null&&(r?(this._navPrevButton.classList.add("visible"),this._navPrevButton.disabled=this._currentIndex===0):this._navPrevButton.classList.remove("visible")),this._navNextButton!==null&&(r?(this._navNextButton.classList.add("visible"),this._navNextButton.disabled=!u):this._navNextButton.classList.remove("visible"))}_scrollPrevious(){this._currentIndex>0&&(this._currentIndex=Math.max(0,this._currentIndex-this.visibleButtons),this._updateButtonVisibility("previous"))}_scrollNext(){const t=this._getSlottedButtons().length,e=this.visibleButtons,r=this._currentIndex+e;r<t&&(this._currentIndex=r,this._updateButtonVisibility("next"))}scrollToButton(t){const e=this._getSlottedButtons().length,r=this.visibleButtons;t>=0&&t<e&&(this._currentIndex=Math.max(0,Math.min(t,e-r)),this._updateButtonVisibility())}getVisibleButtons(){return this._getSlottedButtons().filter(t=>t.classList.contains("visible-button"))}getAllButtons(){return this._getSlottedButtons()}getCurrentIndex(){return this._currentIndex}}const dt="bar-menu";s.APPLICATION_NAME=p,s.BarMenuComponent=b,s.BaseButtonComponent=i,s.BaseDialogComponent=d,s.ConfirmButtonComponent=D,s.ConfirmationDialogComponent=l,s.HeaderBodyFooterDialogComponent=_,s.NextButtonComponent=G,s.PreviousButtonComponent=U,s.UndoButtonComponent=V,s.WebComponentsRegistry=T,s.barMenuWebComponentSelector=dt,s.baseButtonWebComponentSelector=N,s.baseDialogWebComponentSelector=Q,s.confirmButtonWebComponentSelector=K,s.confirmationDialogWebComponentSelector=et,s.headerBodyFooterDialogWebComponentSelector=ot,s.nextButtonWebComponentSelector=J,s.previousButtonWebComponentSelector=j,s.undoButtonWebComponentSelector=O,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
@@ -0,0 +1,8 @@
1
+ /* Import all component styles */
2
+ @use '../web-components/buttons/base-button/component.scss' as base-button;
3
+ @use '../web-components/buttons/undo-button/component.scss' as undo-button;
4
+ @use '../web-components/buttons/confirm-button/component.scss' as confirm-button;
5
+ @use '../web-components/dialogs/base-dialog/component.scss' as base-dialog;
6
+ @use '../web-components/dialogs/confirmation-dialog/component.scss' as
7
+ confirmation-dialog;
8
+ @use '../web-components/menus/bar-menu/component.scss' as game-menu;
@@ -0,0 +1,5 @@
1
+ /* Design System - Single Entry Point */
2
+ /* Includes all design tokens and component styles */
3
+
4
+ @use './themes.scss';
5
+ // @use './components-styles.scss';
@@ -0,0 +1,11 @@
1
+ /* Design System - Main Entry Point */
2
+
3
+ /* Include Design Tokens */
4
+ @use './tokens/typography.scss';
5
+ @use './tokens/colors.scss';
6
+ @use './tokens/spacing.scss';
7
+
8
+ /*
9
+ Note: Component styles are included in components-styles.scss separately.
10
+ They automatically inherit the CSS custom properties defined above.
11
+ */
@@ -0,0 +1,32 @@
1
+ .dark-purple {
2
+ --color-bg-primary: #222222;
3
+ --color-bg-secondary: linear-gradient(135deg, #852392 0%, #090920 100%);
4
+ --color-bg-tertiary: #121130;
5
+
6
+ --color-hover-bg-primary: #090920;
7
+ --color-hover-bg-secondary: linear-gradient(135deg, #a828b9 0%, #2f0035 100%);
8
+ --color-hover-bg-tertiary: #3b0077;
9
+
10
+ --color-text-primary: #f1e5fe;
11
+ --color-text-secondary: #ddd6fe;
12
+ --color-text-tertiary: #c4b5fd;
13
+
14
+ --color-border-primary: #000000;
15
+ --color-border-secondary: #8c0095;
16
+ --color-border-tertiary: #a5b4fc;
17
+
18
+ --color-hover-border-primary: #000000;
19
+ --color-hover-border-secondary: #8c0095;
20
+ --color-hover-border-tertiary: #3b0077;
21
+
22
+ --color-primary: #6366f1;
23
+ --color-primary-light: #818cf8;
24
+ --color-primary-dark: #4f46e5;
25
+
26
+ --color-success: linear-gradient(135deg, #337642 0%, #084c00 100%);
27
+ --color-warning: linear-gradient(135deg, #ffcc37 0%, #c76a00 100%);
28
+ --color-error: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
29
+ --color-info: linear-gradient(135deg, #a78bfa 0%, #06b6d4 100%);
30
+
31
+ --window-backdrop: #000000b3;
32
+ }
@@ -0,0 +1,32 @@
1
+ .dark {
2
+ --color-bg-primary: #313131;
3
+ --color-bg-secondary: #1f1f1f;
4
+ --color-bg-tertiary: #121130;
5
+
6
+ --color-hover-bg-primary: #090920;
7
+ --color-hover-bg-secondary: #141414;
8
+ --color-hover-bg-tertiary: #3b0077;
9
+
10
+ --color-text-primary: #eeeeee;
11
+ --color-text-secondary: #ddd6fe;
12
+ --color-text-tertiary: #c4b5fd;
13
+
14
+ --color-border-primary: #7a7a7a;
15
+ --color-border-secondary: #696969;
16
+ --color-border-tertiary: #a5b4fc;
17
+
18
+ --color-hover-border-primary: #000000;
19
+ --color-hover-border-secondary: #979797;
20
+ --color-hover-border-tertiary: #3b0077;
21
+
22
+ --color-primary: #6366f1;
23
+ --color-primary-light: #818cf8;
24
+ --color-primary-dark: #4f46e5;
25
+
26
+ --color-success: #00811a;
27
+ --color-warning: #e68200;
28
+ --color-error: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
29
+ --color-info: linear-gradient(135deg, #a78bfa 0%, #06b6d4 100%);
30
+
31
+ --window-backdrop: #000000b3;
32
+ }
@@ -0,0 +1,32 @@
1
+ .ferrari {
2
+ --color-bg-primary: #ff2800;
3
+ --color-bg-secondary: #0096d6;
4
+ --color-bg-tertiary: #121130;
5
+
6
+ --color-hover-bg-primary: #090920;
7
+ --color-hover-bg-secondary: #0282cd;
8
+ --color-hover-bg-tertiary: #3b0077;
9
+
10
+ --color-text-primary: #ffffff;
11
+ --color-text-secondary: #ddd6fe;
12
+ --color-text-tertiary: #c4b5fd;
13
+
14
+ --color-border-primary: #ffffff;
15
+ --color-border-secondary: #ddebf7;
16
+ --color-border-tertiary: #a5b4fc;
17
+
18
+ --color-hover-border-primary: #000000;
19
+ --color-hover-border-secondary: #bedcff;
20
+ --color-hover-border-tertiary: #3b0077;
21
+
22
+ --color-primary: #6366f1;
23
+ --color-primary-light: #818cf8;
24
+ --color-primary-dark: #4f46e5;
25
+
26
+ --color-success: #0e8d00;
27
+ --color-warning: #fd9712;
28
+ --color-error: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
29
+ --color-info: linear-gradient(135deg, #a78bfa 0%, #06b6d4 100%);
30
+
31
+ --window-backdrop: rgba(255, 188, 183, 0.5);
32
+ }
@@ -0,0 +1,32 @@
1
+ .light-blue {
2
+ --color-bg-primary: #f7f7f7;
3
+ --color-bg-secondary: linear-gradient(135deg, #d6ebff 0%, #76bdff 100%);
4
+ --color-bg-tertiary: #121130;
5
+
6
+ --color-hover-bg-primary: #090920;
7
+ --color-hover-bg-secondary: linear-gradient(135deg, #bee7ff 0%, #56a7ee 100%);
8
+ --color-hover-bg-tertiary: #3b0077;
9
+
10
+ --color-text-primary: #2b2b2b;
11
+ --color-text-secondary: #ddd6fe;
12
+ --color-text-tertiary: #c4b5fd;
13
+
14
+ --color-border-primary: #d8d8d8;
15
+ --color-border-secondary: #ddebf7;
16
+ --color-border-tertiary: #a5b4fc;
17
+
18
+ --color-hover-border-primary: #000000;
19
+ --color-hover-border-secondary: #bedcff;
20
+ --color-hover-border-tertiary: #3b0077;
21
+
22
+ --color-primary: #6366f1;
23
+ --color-primary-light: #818cf8;
24
+ --color-primary-dark: #4f46e5;
25
+
26
+ --color-success: linear-gradient(135deg, #c3ffd5 0%, #7fe083 100%);
27
+ --color-warning: linear-gradient(135deg, #ffe38e 0%, #ffd970 100%);
28
+ --color-error: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
29
+ --color-info: linear-gradient(135deg, #a78bfa 0%, #06b6d4 100%);
30
+
31
+ --window-backdrop: #c9e6ffb3;
32
+ }
@@ -0,0 +1,32 @@
1
+ .light {
2
+ --color-bg-primary: #fbfbfb;
3
+ --color-bg-secondary: #f7f7f7;
4
+ --color-bg-tertiary: #121130;
5
+
6
+ --color-hover-bg-primary: #090920;
7
+ --color-hover-bg-secondary: #ededed;
8
+ --color-hover-bg-tertiary: #3b0077;
9
+
10
+ --color-text-primary: #141414;
11
+ --color-text-secondary: #ddd6fe;
12
+ --color-text-tertiary: #c4b5fd;
13
+
14
+ --color-border-primary: #d8d8d8;
15
+ --color-border-secondary: #f3f3f3;
16
+ --color-border-tertiary: #a5b4fc;
17
+
18
+ --color-hover-border-primary: #000000;
19
+ --color-hover-border-secondary: #cecece;
20
+ --color-hover-border-tertiary: #3b0077;
21
+
22
+ --color-primary: #6366f1;
23
+ --color-primary-light: #818cf8;
24
+ --color-primary-dark: #4f46e5;
25
+
26
+ --color-success: #97e9a8;
27
+ --color-warning: #ffe586;
28
+ --color-error: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
29
+ --color-info: linear-gradient(135deg, #a78bfa 0%, #06b6d4 100%);
30
+
31
+ --window-backdrop: #f7f7f7b3;
32
+ }
@@ -0,0 +1,19 @@
1
+ @use 'colors/dark.scss';
2
+ @use 'colors/dark-purple.scss';
3
+ @use 'colors/ferrari.scss';
4
+ @use 'colors/light.scss';
5
+ @use 'colors/light-blue.scss';
6
+
7
+ :root {
8
+ /* Neutral Colors (used across all themes) */
9
+ --color-neutral-50: #f9fafb;
10
+ --color-neutral-100: #f3f4f6;
11
+ --color-neutral-200: #e5e7eb;
12
+ --color-neutral-300: #d1d5db;
13
+ --color-neutral-400: #9ca3af;
14
+ --color-neutral-500: #6b7280;
15
+ --color-neutral-600: #4b5563;
16
+ --color-neutral-700: #373737;
17
+ --color-neutral-800: #1f2937;
18
+ --color-neutral-900: #111827;
19
+ }
@@ -0,0 +1,72 @@
1
+ /* Spacing Design Tokens */
2
+
3
+ :root {
4
+ /* Base spacing unit: 4px */
5
+ --spacing-0: 0;
6
+ --spacing-1: 0.25rem; /* 4px */
7
+ --spacing-2: 0.5rem; /* 8px */
8
+ --spacing-3: 0.75rem; /* 12px */
9
+ --spacing-4: 1rem; /* 16px */
10
+ --spacing-5: 1.25rem; /* 20px */
11
+ --spacing-6: 1.5rem; /* 24px */
12
+ --spacing-8: 2rem; /* 32px */
13
+ --spacing-10: 2.5rem; /* 40px */
14
+ --spacing-12: 3rem; /* 48px */
15
+ --spacing-16: 4rem; /* 64px */
16
+ --spacing-20: 5rem; /* 80px */
17
+ --spacing-24: 6rem; /* 96px */
18
+
19
+ /* Button Spacing */
20
+ --button-padding-block-sm: var(--spacing-1);
21
+ --button-padding-block-md: var(--spacing-2);
22
+ --button-padding-block-lg: var(--spacing-3);
23
+
24
+ --button-padding-inline-sm: var(--spacing-3);
25
+ --button-padding-inline-md: var(--spacing-4);
26
+ --button-padding-inline-lg: var(--spacing-6);
27
+
28
+ /* Component Gap */
29
+ --gap-xs: 0.25rem;
30
+ --gap-sm: 0.5rem;
31
+ --gap-md: 1rem;
32
+ --gap-lg: 1.5rem;
33
+ --gap-xl: 2rem;
34
+
35
+ /* Border Radius - Modern & Accessible */
36
+ --border-radius-none: 0;
37
+ --border-radius-sm: 0.25rem; /* 4px */
38
+ --border-radius-md: 0.5rem; /* 8px */
39
+ --border-radius-lg: 0.75rem; /* 12px */
40
+ --border-radius-xl: 1rem; /* 16px */
41
+ --border-radius-2xl: 1.5rem; /* 24px */
42
+ --border-radius-full: 9999px;
43
+
44
+ /* Border Width */
45
+ --border-width-0: 0;
46
+ --border-width-1: 1px;
47
+ --border-width-2: 2px;
48
+ --border-width-4: 4px;
49
+
50
+ /* Shadow System - Depth & Elevation */
51
+ --shadow-none: none;
52
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
53
+ --shadow-md:
54
+ 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
55
+ --shadow-lg:
56
+ 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
57
+ --shadow-xl:
58
+ 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
59
+ --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
60
+
61
+ /* Transition & Animation */
62
+ --transition-fast: 150ms;
63
+ --transition-base: 300ms;
64
+ --transition-slow: 500ms;
65
+
66
+ /* Z-Index Scale */
67
+ --z-index-dropdown: 1000;
68
+ --z-index-modal-backdrop: 1040;
69
+ --z-index-modal: 1050;
70
+ --z-index-popover: 1060;
71
+ --z-index-tooltip: 1070;
72
+ }
@@ -0,0 +1,44 @@
1
+ /* Typography Design Tokens */
2
+
3
+ :root {
4
+ /* Font Family Stack - Professional & Modern */
5
+ --font-family-sans:
6
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto,
7
+ 'Helvetica Neue', Oxygen, Ubuntu, Cantarell, sans-serif;
8
+ --font-family-mono: 'Courier New', Courier, monospace;
9
+ --font-family-base: var(--font-family-sans);
10
+
11
+ /* Font Sizes - Refined Scale */
12
+ --font-size-xs: 0.75rem; /* 12px */
13
+ --font-size-sm: 0.875rem; /* 14px */
14
+ --font-size-md: 1rem; /* 16px */
15
+ --font-size-lg: 1.125rem; /* 18px */
16
+ --font-size-xl: 1.25rem; /* 20px */
17
+ --font-size-2xl: 1.5rem; /* 24px */
18
+ --font-size-3xl: 1.875rem; /* 30px */
19
+ --font-size-xxl: 2.25rem; /* 36px */
20
+
21
+ /* Font Weights - Semantic Usage */
22
+ --font-weight-light: 300;
23
+ --font-weight-normal: 400;
24
+ --font-weight-medium: 500;
25
+ --font-weight-semibold: 600;
26
+ --font-weight-bold: 700;
27
+ --font-weight-extrabold: 800;
28
+
29
+ /* Line Heights - Improved Readability */
30
+ --line-height-tight: 1.2;
31
+ --line-height-normal: 1.5;
32
+ --line-height-relaxed: 1.75;
33
+ --line-height-loose: 2;
34
+
35
+ /* Letter Spacing - Refined */
36
+ --letter-spacing-tight: -0.02em;
37
+ --letter-spacing-normal: 0em;
38
+ --letter-spacing-wide: 0.02em;
39
+
40
+ /* Text Transform */
41
+ --text-transform-none: none;
42
+ --text-transform-uppercase: uppercase;
43
+ --text-transform-capitalize: capitalize;
44
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@albi_scando/as-design-system-lib",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "A library of reusable, strongly typed Web Components built with TypeScript, designed for creating consistent and maintainable user interfaces.",
5
5
  "type": "module",
6
6
  "files": [
@@ -19,6 +19,15 @@
19
19
  "main": "./dist/as-design-system-lib.umd.js",
20
20
  "module": "./dist/as-design-system-lib.es.js",
21
21
  "typings": "./dist/types/main.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "import": "./dist/as-design-system-lib.es.js",
25
+ "require": "./dist/as-design-system-lib.umd.js",
26
+ "types": "./dist/types/main.d.ts"
27
+ },
28
+ "./styles": "./dist/styles/themes/index.scss",
29
+ "./styles/*": "./dist/styles/*"
30
+ },
22
31
  "scripts": {
23
32
  "build": "tsc && vite build",
24
33
  "commit": "cz",
@@ -80,7 +89,7 @@
80
89
  "vitest": "^4.0.18"
81
90
  },
82
91
  "peerDependencies": {
83
- "@albi_scando/as-const-lib": "^1.5.2",
92
+ "@albi_scando/as-const-lib": "^1.6.0",
84
93
  "@albi_scando/as-mixins-lib": "^1.1.0",
85
94
  "@fontsource/material-symbols-outlined": "^5.2.36"
86
95
  },