@albi_scando/as-design-system-lib 1.10.1 → 1.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -966,7 +966,7 @@ const Ft = "base-dialog", Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Obj
|
|
|
966
966
|
<slot name="footer"></slot>
|
|
967
967
|
</footer>
|
|
968
968
|
</dialog>
|
|
969
|
-
`, Ut = "*{box-sizing:border-box}dialog[open]{max-width:100%;max-height:100%;display:flex;flex-direction:column;gap:var(--spacing-4)}dialog>[part]{position:relative}dialog>[part][hidden]{display:none}dialog>[part][
|
|
969
|
+
`, Ut = "*{box-sizing:border-box}dialog[open]{max-width:100%;max-height:100%;display:flex;flex-direction:column;gap:var(--spacing-4)}dialog>[part]{position:relative}dialog>[part][hidden]{display:none}dialog>[part]:not([hidden]):not(:last-child){border-bottom:var(--border-width-1) solid var(--color-neutral-600);padding-bottom:var(--spacing-4)}dialog div[part=body]{flex:1;min-height:0;overflow-y:auto}", B = new CSSStyleSheet();
|
|
970
970
|
B.replaceSync(Ut);
|
|
971
971
|
class D extends M {
|
|
972
972
|
_sectionNames = ["header", "body", "footer"];
|
|
@@ -2124,7 +2124,7 @@ const ii = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2124
2124
|
<div part="tooltip" class="tooltip" role="tooltip">
|
|
2125
2125
|
<slot name="content"></slot>
|
|
2126
2126
|
</div>
|
|
2127
|
-
`, Le = "*{box-sizing:border-box}:host{position:relative;display:inline-flex;align-items:center}.tooltip{position:absolute;z-index:var(--z-index-tooltip, 1070);bottom:calc(100% + .5rem);left:50%;transform:translate(-50%);padding:var(--spacing-1) var(--spacing-2);background-color:var(--color-bg-tertiary, #1e1e2e);color:var(--color-text-primary);font-family:var(--font-family-base);font-size:var(--font-size-xs);line-height:var(--line-height-normal);border-radius:var(--border-radius-md);box-shadow:var(--shadow-lg);white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--transition-fast),visibility var(--transition-fast);max-width:16rem;white-space:normal;text-align:center}:host([placement=bottom]) .tooltip{bottom:auto;top:calc(100% + .5rem)}:host([placement=left]) .tooltip{bottom:auto;left:auto;right:calc(100% + .5rem);top:50%;transform:translateY(-50%)}:host([placement=right]) .tooltip{bottom:auto;left:calc(100% + .5rem);top:50%;transform:translateY(-50%)}:host([open]) .tooltip,:host(:hover) .tooltip,:host(:focus-within) .tooltip{opacity:1;visibility:visible}:host([follow-cursor]) .tooltip{position:fixed;bottom:auto;left:0;top:0;transform:none}:host([follow-cursor]) .tooltip{opacity:1;visibility:visible}", ut = new CSSStyleSheet();
|
|
2127
|
+
`, Le = "*{box-sizing:border-box}:host{position:relative;display:inline-flex;align-items:center}.tooltip{position:absolute;z-index:var(--z-index-tooltip, 1070);bottom:calc(100% + .5rem);left:50%;transform:translate(-50%);padding:var(--spacing-1) var(--spacing-2);background-color:var(--color-bg-tertiary, #1e1e2e);color:var(--color-text-primary);font-family:var(--font-family-base);font-size:var(--font-size-xs);line-height:var(--line-height-normal);border-radius:var(--border-radius-md);box-shadow:var(--shadow-lg);white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--transition-fast),visibility var(--transition-fast);max-width:16rem;white-space:normal;text-align:center;overflow:hidden;word-wrap:break-word;overflow-wrap:break-word}:host([placement=bottom]) .tooltip{bottom:auto;top:calc(100% + .5rem)}:host([placement=left]) .tooltip{bottom:auto;left:auto;right:calc(100% + .5rem);top:50%;transform:translateY(-50%)}:host([placement=right]) .tooltip{bottom:auto;left:calc(100% + .5rem);top:50%;transform:translateY(-50%)}:host([open]) .tooltip,:host(:hover) .tooltip,:host(:focus-within) .tooltip{opacity:1;visibility:visible}:host([follow-cursor]) .tooltip{position:fixed;bottom:auto;left:0;top:0;transform:none}:host([follow-cursor]) .tooltip{opacity:1;visibility:visible}", ut = new CSSStyleSheet();
|
|
2128
2128
|
ut.replaceSync(Le);
|
|
2129
2129
|
class b extends HTMLElement {
|
|
2130
2130
|
static _placementAttribute = "placement";
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
<slot name="footer"></slot>
|
|
54
54
|
</footer>
|
|
55
55
|
</dialog>
|
|
56
|
-
`,Yt="*{box-sizing:border-box}dialog[open]{max-width:100%;max-height:100%;display:flex;flex-direction:column;gap:var(--spacing-4)}dialog>[part]{position:relative}dialog>[part][hidden]{display:none}dialog>[part][
|
|
56
|
+
`,Yt="*{box-sizing:border-box}dialog[open]{max-width:100%;max-height:100%;display:flex;flex-direction:column;gap:var(--spacing-4)}dialog>[part]{position:relative}dialog>[part][hidden]{display:none}dialog>[part]:not([hidden]):not(:last-child){border-bottom:var(--border-width-1) solid var(--color-neutral-600);padding-bottom:var(--spacing-4)}dialog div[part=body]{flex:1;min-height:0;overflow-y:auto}",Z=new CSSStyleSheet;Z.replaceSync(Yt);class U extends O{_sectionNames=["header","body","footer"];_handleSlotChange=()=>{this._updateSectionState()};constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(Z)}static get observedAttributes(){return O.observedAttributes}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=Vt,this._syncAttributes())}_addEventListeners(){super._addEventListeners(),this.shadowRoot!==null&&(this.shadowRoot.querySelectorAll("slot").forEach(t=>{t.addEventListener("slotchange",this._handleSlotChange)}),this._updateSectionState())}_removeEventListeners(){super._removeEventListeners(),this.shadowRoot!==null&&this.shadowRoot.querySelectorAll("slot").forEach(t=>{t.removeEventListener("slotchange",this._handleSlotChange)})}_updateSectionState(){if(this.shadowRoot===null)return;const t=[];this._sectionNames.forEach(e=>{const i=this.shadowRoot?.querySelector(`[part='${e}']`),r=this.shadowRoot?.querySelector(`slot[name='${e}']`);if(i===null||r===null)return;const n=r.assignedNodes({flatten:!0}).some(g=>g.nodeType===Node.TEXT_NODE?g.textContent?.trim().length!==0:g.nodeType===Node.ELEMENT_NODE);i.toggleAttribute("hidden",n===!1),i.dataset.filled=String(n),i.removeAttribute("data-divider"),n===!0&&t.push(i)}),t.slice(0,-1).forEach(e=>{e.dataset.divider="true"})}}const tt=new CSSStyleSheet;tt.replaceSync(Wt);class p extends U{_headline=d;_text=d;_value=void 0;static textAttribute="text";static headlineAttribute="headline";static valueAttribute="value";constructor(){super(),this.shadowRoot?.adoptedStyleSheets.push(tt)}static get observedAttributes(){return[...U.observedAttributes,p.textAttribute,p.headlineAttribute,p.valueAttribute]}get headline(){return this._headline}set headline(t){this._headline=t,this.setAttribute(p.headlineAttribute,t)}get text(){return this._text}set text(t){this._text=t,this.setAttribute(p.textAttribute,t)}get value(){return this._value}set value(t){this._value=t}connectedCallback(){this._render(),this._addEventListeners(),this.closedBy=P.NONE}_render(){this.shadowRoot!==null&&(this.shadowRoot.innerHTML=Gt,this._syncAttributes())}_syncAttribute(t){if(p.observedAttributes.includes(t))switch(t){case p.headlineAttribute:{this._headline=this.getAttribute(t)??d;const e=this.shadowRoot?.querySelector("h2");e!=null&&(e.textContent=this._headline);break}case p.textAttribute:{this._text=this.getAttribute(t)??d;const e=this.shadowRoot?.querySelector("p");e!=null&&(e.textContent=this._text);break}case p.valueAttribute:{this._value=this.getAttribute(t);break}default:super._syncAttribute(t)}else super._syncAttribute(t)}_syncAttributes(){super._syncAttributes(),p.observedAttributes.forEach(t=>{this._syncAttribute(t)})}_addEventListeners(){super._addEventListeners(),this.shadowRoot?.querySelector(C)?.addEventListener(M.CLICK,this._handleConfirm),this.shadowRoot?.querySelector(D)?.addEventListener(M.CLICK,this._handleUndo)}_removeEventListeners(){super._removeEventListeners(),this.shadowRoot?.querySelector(C)?.removeEventListener(M.CLICK,this._handleConfirm),this.shadowRoot?.querySelector(D)?.removeEventListener(M.CLICK,this._handleUndo)}_handleConfirm=()=>{const t=new CustomEvent(H.CONFIRMATION_DIALOG_CONFIRM,{bubbles:!0,composed:!0,detail:{value:this._value}});this.dispatchEvent(t)};_handleUndo=()=>{const t=new CustomEvent(H.CONFIRMATION_DIALOG_UNDO,{bubbles:!0,composed:!0,detail:{value:this._value}});this.dispatchEvent(t),this._value=void 0}}const Xt="confirmation-dialog",Bt={CONFIRMATION_DIALOG_CONFIRM:H.CONFIRMATION_DIALOG_CONFIRM,CONFIRMATION_DIALOG_UNDO:H.CONFIRMATION_DIALOG_UNDO},Jt=Object.freeze(Object.defineProperty({__proto__:null,COMPONENT_CUSTOM_MESSAGES:Bt,ConfirmationDialogComponent:p,selector:Xt},Symbol.toStringTag,{value:"Module"})),Qt=Object.freeze(Object.defineProperty({__proto__:null,HeaderBodyFooterDialogComponent:U,selector:"header-body-footer-dialog"},Symbol.toStringTag,{value:"Module"})),Zt=`<div class="bar-menu-container">
|
|
57
57
|
<previous-button class="nav-prev" part="nav-prev-button"></previous-button>
|
|
58
58
|
|
|
59
59
|
<div class="buttons-wrapper" part="buttons-wrapper">
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
<div part="tooltip" class="tooltip" role="tooltip">
|
|
171
171
|
<slot name="content"></slot>
|
|
172
172
|
</div>
|
|
173
|
-
`,Ce="*{box-sizing:border-box}:host{position:relative;display:inline-flex;align-items:center}.tooltip{position:absolute;z-index:var(--z-index-tooltip, 1070);bottom:calc(100% + .5rem);left:50%;transform:translate(-50%);padding:var(--spacing-1) var(--spacing-2);background-color:var(--color-bg-tertiary, #1e1e2e);color:var(--color-text-primary);font-family:var(--font-family-base);font-size:var(--font-size-xs);line-height:var(--line-height-normal);border-radius:var(--border-radius-md);box-shadow:var(--shadow-lg);white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--transition-fast),visibility var(--transition-fast);max-width:16rem;white-space:normal;text-align:center}:host([placement=bottom]) .tooltip{bottom:auto;top:calc(100% + .5rem)}:host([placement=left]) .tooltip{bottom:auto;left:auto;right:calc(100% + .5rem);top:50%;transform:translateY(-50%)}:host([placement=right]) .tooltip{bottom:auto;left:calc(100% + .5rem);top:50%;transform:translateY(-50%)}:host([open]) .tooltip,:host(:hover) .tooltip,:host(:focus-within) .tooltip{opacity:1;visibility:visible}:host([follow-cursor]) .tooltip{position:fixed;bottom:auto;left:0;top:0;transform:none}:host([follow-cursor]) .tooltip{opacity:1;visibility:visible}",vt=new CSSStyleSheet;vt.replaceSync(Ce);class v extends HTMLElement{static _placementAttribute="placement";static _contentAttribute="content";static _openAttribute="open";static _followCursorAttribute="follow-cursor";_lastMouseX=0;_lastMouseY=0;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(vt)}static get observedAttributes(){return[v._placementAttribute,v._contentAttribute,v._openAttribute,v._followCursorAttribute]}get placement(){return this.getAttribute(v._placementAttribute)??"top"}set placement(t){this.setAttribute(v._placementAttribute,t)}get content(){return this.getAttribute(v._contentAttribute)??""}set content(t){this.setAttribute(v._contentAttribute,t),this._updateContent(t)}get open(){return this.hasAttribute(v._openAttribute)}set open(t){t?this.setAttribute(v._openAttribute,""):this.removeAttribute(v._openAttribute)}get followCursor(){return this.hasAttribute(v._followCursorAttribute)}set followCursor(t){t?this.setAttribute(v._followCursorAttribute,""):this.removeAttribute(v._followCursorAttribute)}connectedCallback(){this._render(),this._attachEventListeners()}disconnectedCallback(){this._removeEventListeners()}attributeChangedCallback(t,e,i){i!==e&&(t===v._contentAttribute&&this._updateContent(i),t===v._followCursorAttribute&&(i!==null?this._attachEventListeners():this._removeEventListeners()))}_render(){if(this.shadowRoot===null)return;this.shadowRoot.innerHTML=De,this._updateContent(this.content);const t=this.shadowRoot.querySelector(".tooltip");if(t!=null){const e=`tooltip-${Math.random().toString(36).slice(2,7)}`;t.id=e}}_attachEventListeners(){this.removeEventListener("mousemove",this._handleMouseMove),this.removeEventListener("mouseleave",this._handleMouseLeave),this.removeEventListener("mouseenter",this._handleMouseEnter),this.followCursor&&(this.addEventListener("mouseenter",this._handleMouseEnter),this.addEventListener("mousemove",this._handleMouseMove),this.addEventListener("mouseleave",this._handleMouseLeave))}_removeEventListeners(){this.removeEventListener("mousemove",this._handleMouseMove),this.removeEventListener("mouseleave",this._handleMouseLeave),this.removeEventListener("mouseenter",this._handleMouseEnter)}_handleMouseEnter=()=>{const t=this.shadowRoot?.querySelector(".tooltip");t!=null&&(t.style.opacity="1",t.style.visibility="visible")};_handleMouseMove=t=>{this.followCursor&&(this._lastMouseX=t.clientX,this._lastMouseY=t.clientY,this._updateTooltipPosition())};_handleMouseLeave=()=>{const t=this.shadowRoot?.querySelector(".tooltip");t!=null&&(t.style.opacity="0",t.style.visibility="hidden",t.style.left="",t.style.top="")};_updateTooltipPosition(){const t=this.shadowRoot?.querySelector(".tooltip");if(t==null)return;const e=10;t.style.position="fixed",t.style.left=`${this._lastMouseX+e}px`,t.style.top=`${this._lastMouseY+e}px`,t.style.transform="none"}_updateContent(t){const e=this.shadowRoot?.querySelector(".tooltip");if(e!=null&&t!==null&&t!==""){const i=e.querySelector("slot");(i===null||i.assignedNodes().length===0)&&(e.textContent=t)}}}const Ue=Object.freeze(Object.defineProperty({__proto__:null,TooltipComponent:v,selector:Pe},Symbol.toStringTag,{value:"Module"})),Ke="ds-text-input",Ge=`<div part="wrapper" class="input-wrapper">
|
|
173
|
+
`,Ce="*{box-sizing:border-box}:host{position:relative;display:inline-flex;align-items:center}.tooltip{position:absolute;z-index:var(--z-index-tooltip, 1070);bottom:calc(100% + .5rem);left:50%;transform:translate(-50%);padding:var(--spacing-1) var(--spacing-2);background-color:var(--color-bg-tertiary, #1e1e2e);color:var(--color-text-primary);font-family:var(--font-family-base);font-size:var(--font-size-xs);line-height:var(--line-height-normal);border-radius:var(--border-radius-md);box-shadow:var(--shadow-lg);white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--transition-fast),visibility var(--transition-fast);max-width:16rem;white-space:normal;text-align:center;overflow:hidden;word-wrap:break-word;overflow-wrap:break-word}:host([placement=bottom]) .tooltip{bottom:auto;top:calc(100% + .5rem)}:host([placement=left]) .tooltip{bottom:auto;left:auto;right:calc(100% + .5rem);top:50%;transform:translateY(-50%)}:host([placement=right]) .tooltip{bottom:auto;left:calc(100% + .5rem);top:50%;transform:translateY(-50%)}:host([open]) .tooltip,:host(:hover) .tooltip,:host(:focus-within) .tooltip{opacity:1;visibility:visible}:host([follow-cursor]) .tooltip{position:fixed;bottom:auto;left:0;top:0;transform:none}:host([follow-cursor]) .tooltip{opacity:1;visibility:visible}",vt=new CSSStyleSheet;vt.replaceSync(Ce);class v extends HTMLElement{static _placementAttribute="placement";static _contentAttribute="content";static _openAttribute="open";static _followCursorAttribute="follow-cursor";_lastMouseX=0;_lastMouseY=0;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot?.adoptedStyleSheets.push(vt)}static get observedAttributes(){return[v._placementAttribute,v._contentAttribute,v._openAttribute,v._followCursorAttribute]}get placement(){return this.getAttribute(v._placementAttribute)??"top"}set placement(t){this.setAttribute(v._placementAttribute,t)}get content(){return this.getAttribute(v._contentAttribute)??""}set content(t){this.setAttribute(v._contentAttribute,t),this._updateContent(t)}get open(){return this.hasAttribute(v._openAttribute)}set open(t){t?this.setAttribute(v._openAttribute,""):this.removeAttribute(v._openAttribute)}get followCursor(){return this.hasAttribute(v._followCursorAttribute)}set followCursor(t){t?this.setAttribute(v._followCursorAttribute,""):this.removeAttribute(v._followCursorAttribute)}connectedCallback(){this._render(),this._attachEventListeners()}disconnectedCallback(){this._removeEventListeners()}attributeChangedCallback(t,e,i){i!==e&&(t===v._contentAttribute&&this._updateContent(i),t===v._followCursorAttribute&&(i!==null?this._attachEventListeners():this._removeEventListeners()))}_render(){if(this.shadowRoot===null)return;this.shadowRoot.innerHTML=De,this._updateContent(this.content);const t=this.shadowRoot.querySelector(".tooltip");if(t!=null){const e=`tooltip-${Math.random().toString(36).slice(2,7)}`;t.id=e}}_attachEventListeners(){this.removeEventListener("mousemove",this._handleMouseMove),this.removeEventListener("mouseleave",this._handleMouseLeave),this.removeEventListener("mouseenter",this._handleMouseEnter),this.followCursor&&(this.addEventListener("mouseenter",this._handleMouseEnter),this.addEventListener("mousemove",this._handleMouseMove),this.addEventListener("mouseleave",this._handleMouseLeave))}_removeEventListeners(){this.removeEventListener("mousemove",this._handleMouseMove),this.removeEventListener("mouseleave",this._handleMouseLeave),this.removeEventListener("mouseenter",this._handleMouseEnter)}_handleMouseEnter=()=>{const t=this.shadowRoot?.querySelector(".tooltip");t!=null&&(t.style.opacity="1",t.style.visibility="visible")};_handleMouseMove=t=>{this.followCursor&&(this._lastMouseX=t.clientX,this._lastMouseY=t.clientY,this._updateTooltipPosition())};_handleMouseLeave=()=>{const t=this.shadowRoot?.querySelector(".tooltip");t!=null&&(t.style.opacity="0",t.style.visibility="hidden",t.style.left="",t.style.top="")};_updateTooltipPosition(){const t=this.shadowRoot?.querySelector(".tooltip");if(t==null)return;const e=10;t.style.position="fixed",t.style.left=`${this._lastMouseX+e}px`,t.style.top=`${this._lastMouseY+e}px`,t.style.transform="none"}_updateContent(t){const e=this.shadowRoot?.querySelector(".tooltip");if(e!=null&&t!==null&&t!==""){const i=e.querySelector("slot");(i===null||i.assignedNodes().length===0)&&(e.textContent=t)}}}const Ue=Object.freeze(Object.defineProperty({__proto__:null,TooltipComponent:v,selector:Pe},Symbol.toStringTag,{value:"Module"})),Ke="ds-text-input",Ge=`<div part="wrapper" class="input-wrapper">
|
|
174
174
|
<label class="input-label" part="label"></label>
|
|
175
175
|
<div class="input-container">
|
|
176
176
|
<slot name="prefix" class="input-prefix"></slot>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@albi_scando/as-design-system-lib",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.3",
|
|
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
|
"repository": {
|