@duyluonganduin/acl-web-components 0.0.56 → 0.0.58
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/dist/acl-web-components.cjs +1 -1
- package/dist/acl-web-components.d.ts +9 -0
- package/dist/acl-web-components.iife.js +124 -118
- package/dist/acl-web-components.js +1 -1
- package/dist/{anduin-table-BCgVIfkl.cjs → anduin-table-Brto8nKz.cjs} +25 -19
- package/dist/{anduin-table-BQzxNe9V.js → anduin-table-gTUL80nN.js} +432 -423
- package/dist/jsx.d.ts +2 -0
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts +9 -0
- package/dist/react.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as i, a as e, b as r, c, d as l, e as d, f as t, g as A, h as p, i as u, j as E, k as g, l as T, m as _, n as h, o as x, p as C, q as k, r as O, s as L, t as m, u as I, v as b, w as G, x as N, y as S, z as R, B as P, C as D, D as y, E as H, F as U, G as w, H as B, I as M, J as f, K as F, L as z, M as V, N as K, O as v, P as W, Q as X, R as Y, S as Z, T as j, U as q, V as J, W as Q, X as $, Y as aa, Z as na, _ as oa, $ as sa, a0 as ia, a1 as ea, a2 as ra, a3 as ca, a4 as la, a5 as da, a6 as ta, a7 as Aa, a8 as pa, a9 as ua, aa as Ea, ab as ga, ac as Ta, ad as _a, ae as ha, af as xa, ag as Ca, ah as ka, ai as Oa, aj as La, ak as ma, al as Ia, am as ba, an as Ga, ao as Na, ap as Sa, aq as Ra, ar as Pa, as as Da, at as ya, au as Ha, av as Ua, aw as wa, ax as Ba, ay as Ma, az as fa, aA as Fa, aB as za, aC as Va, aD as Ka, aE as va, aF as Wa, aG as Xa, aH as Ya, aI as Za, aJ as ja, aK as qa, aL as Ja, aM as Qa, aN as $a, aO as an, aP as nn, aQ as on, aR as sn, aS as en, aT as rn, aU as cn, aV as ln, aW as dn, aX as tn, aY as An, aZ as pn, a_ as un, a$ as En, b0 as gn, b1 as Tn, b2 as _n, b3 as hn, b4 as xn, b5 as Cn, b6 as kn, b7 as On, b8 as Ln, b9 as mn, ba as In, bb as bn, bc as Gn, bd as Nn, be as Sn, bf as Rn, bg as Pn, bh as Dn, bi as yn, bj as Hn, bk as Un, bl as wn, bm as Bn, bn as Mn, bo as fn, bp as Fn, bq as zn, br as Vn, bs as Kn, bt as vn, bu as Wn, bv as Xn } from "./anduin-table-
|
|
1
|
+
import { A as i, a as e, b as r, c, d as l, e as d, f as t, g as A, h as p, i as u, j as E, k as g, l as T, m as _, n as h, o as x, p as C, q as k, r as O, s as L, t as m, u as I, v as b, w as G, x as N, y as S, z as R, B as P, C as D, D as y, E as H, F as U, G as w, H as B, I as M, J as f, K as F, L as z, M as V, N as K, O as v, P as W, Q as X, R as Y, S as Z, T as j, U as q, V as J, W as Q, X as $, Y as aa, Z as na, _ as oa, $ as sa, a0 as ia, a1 as ea, a2 as ra, a3 as ca, a4 as la, a5 as da, a6 as ta, a7 as Aa, a8 as pa, a9 as ua, aa as Ea, ab as ga, ac as Ta, ad as _a, ae as ha, af as xa, ag as Ca, ah as ka, ai as Oa, aj as La, ak as ma, al as Ia, am as ba, an as Ga, ao as Na, ap as Sa, aq as Ra, ar as Pa, as as Da, at as ya, au as Ha, av as Ua, aw as wa, ax as Ba, ay as Ma, az as fa, aA as Fa, aB as za, aC as Va, aD as Ka, aE as va, aF as Wa, aG as Xa, aH as Ya, aI as Za, aJ as ja, aK as qa, aL as Ja, aM as Qa, aN as $a, aO as an, aP as nn, aQ as on, aR as sn, aS as en, aT as rn, aU as cn, aV as ln, aW as dn, aX as tn, aY as An, aZ as pn, a_ as un, a$ as En, b0 as gn, b1 as Tn, b2 as _n, b3 as hn, b4 as xn, b5 as Cn, b6 as kn, b7 as On, b8 as Ln, b9 as mn, ba as In, bb as bn, bc as Gn, bd as Nn, be as Sn, bf as Rn, bg as Pn, bh as Dn, bi as yn, bj as Hn, bk as Un, bl as wn, bm as Bn, bn as Mn, bo as fn, bp as Fn, bq as zn, br as Vn, bs as Kn, bt as vn, bu as Wn, bv as Xn } from "./anduin-table-gTUL80nN.js";
|
|
2
2
|
const n = ':root{--color-gray-0: oklch(1 0 0);--color-gray-1: oklch(.9846 .0017 247.84);--color-gray-2: oklch(.9515 .0046 258.32);--color-gray-3: oklch(.9336 .0058 264.53);--color-gray-4: oklch(.8618 .0141 258.35);--color-gray-5: oklch(.7073 .0268 263.28);--color-gray-6: oklch(.6528 .0316 266.24);--color-gray-7: oklch(.5371 .0337 264.24);--color-gray-8: oklch(.3544 .0326 260.94);--color-gray-9: oklch(.2776 .0341 255.81);--color-danger-1: oklch(.9437 .0174 17.47);--color-danger-2: oklch(.8643 .0573 18.32);--color-danger-3: oklch(.712 .1517 21.64);--color-danger-4: oklch(.5948 .2165 26.91);--color-danger-5: oklch(.531 .2147 28.91);--color-primary-1: oklch(.9474 .0256 221.57);--color-primary-2: oklch(.8652 .066 236.86);--color-primary-3: oklch(.7219 .1335 240.15);--color-primary-4: oklch(.5679 .1784 254.76);--color-primary-5: oklch(.4682 .1548 255.23);--color-success-1: oklch(.9276 .0541 150.91);--color-success-2: oklch(.8592 .1078 149.75);--color-success-3: oklch(.6953 .1711 149.14);--color-success-4: oklch(.6149 .1634 148.21);--color-success-5: oklch(.5075 .136 146.46);--color-warning-1: oklch(.9549 .0496 88.08);--color-warning-2: oklch(.912 .0811 83.56);--color-warning-3: oklch(.8282 .1628 78.73);--color-warning-4: oklch(.7325 .1512 75.97);--color-warning-5: oklch(.5329 .1098 82);--color-semantic-gray-0: oklch(1 0 0);--color-semantic-gray-1: oklch(.9846 .0017 247.84);--color-semantic-gray-2: oklch(.9515 .0046 258.32);--color-semantic-gray-3: oklch(.9336 .0058 264.53);--color-semantic-gray-4: oklch(.8618 .0141 258.35);--color-semantic-gray-5: oklch(.7073 .0268 263.28);--color-semantic-gray-6: oklch(.6528 .0316 266.24);--color-semantic-gray-7: oklch(.5371 .0337 264.24);--color-semantic-gray-8: oklch(.3544 .0326 260.94);--color-semantic-gray-9: oklch(.2776 .0341 255.81);--color-semantic-danger-1: oklch(.9437 .0174 17.47);--color-semantic-danger-2: oklch(.8643 .0573 18.32);--color-semantic-danger-3: oklch(.712 .1517 21.64);--color-semantic-danger-4: oklch(.5948 .2165 26.91);--color-semantic-danger-5: oklch(.531 .2147 28.91);--color-semantic-primary-1: oklch(.9474 .0256 221.57);--color-semantic-primary-2: oklch(.8652 .066 236.86);--color-semantic-primary-3: oklch(.7219 .1335 240.15);--color-semantic-primary-4: oklch(.5679 .1784 254.76);--color-semantic-primary-5: oklch(.4682 .1548 255.23);--color-semantic-success-1: oklch(.9276 .0541 150.91);--color-semantic-success-2: oklch(.8592 .1078 149.75);--color-semantic-success-3: oklch(.6953 .1711 149.14);--color-semantic-success-4: oklch(.6149 .1634 148.21);--color-semantic-success-5: oklch(.5075 .136 146.46);--color-semantic-warning-1: oklch(.9549 .0496 88.08);--color-semantic-warning-2: oklch(.912 .0811 83.56);--color-semantic-warning-3: oklch(.8282 .1628 78.73);--color-semantic-warning-4: oklch(.7325 .1512 75.97);--color-semantic-warning-5: oklch(.5329 .1098 82);--color-purple-50: oklch(.9676 .016 286.1);--color-purple-100: oklch(.9434 .0255 288.32);--color-purple-200: oklch(.8927 .0519 287.71);--color-purple-300: oklch(.81 .0925 287.61);--color-purple-400: oklch(.7048 .1478 287.77);--color-purple-500: oklch(.5961 .2043 286.53);--color-purple-600: oklch(.5316 .2303 286.64);--color-purple-700: oklch(.471 .2307 285.3);--color-purple-800: oklch(.4148 .2014 285.43);--color-purple-900: oklch(.3654 .17 286.37);--color-purple-950: oklch(.2734 .1288 284.42);--color-white: var(--color-gray-0);--font-sans: system-ui, -apple-system, Roboto, Oxygen, Cantarell, Ubuntu, "Segoe UI", sans-serif;--font-mono: monospace;--text-9: 9px;--text-10: 10px;--text-11: 11px;--text-12: 12px;--text-13: 13px;--text-15: 15px;--text-17: 17px;--text-20: 20px;--text-23: 23px;--text-26: 26px;--text-30: 30px;--text-35: 35px;--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--leading-16: 16px;--leading-20: 20px;--leading-24: 24px;--leading-28: 28px;--leading-32: 32px;--leading-40: 40px;--leading-44: 44px;--leading-r1p5: 1.5;--radius-0: 0;--radius-2: 2px;--radius-3: 3px;--radius-4: 4px;--radius-6: 6px;--radius-8: 8px;--radius-12: 12px;--radius-16: 16px;--radius-20: 20px;--radius-24: 24px;--radius-full: 9999px;--shadow-1: 0px 1px 2px rgba(29, 41, 57, .07);--shadow-2: 0px 1px 2px rgba(29, 41, 57, .04), 0px 2px 8px rgba(29, 41, 57, .08);--shadow-3: 0px 2px 8px rgba(29, 41, 57, .08), 0px 8px 24px rgba(29, 41, 57, .12);--shadow-4: 0px 4px 8px rgba(29, 41, 57, .08), 0px 16px 48px rgba(29, 41, 57, .16);--spacing-px: 1px;--spacing-0: 0;--spacing-2: 2px;--spacing-4: 4px;--spacing-6: 6px;--spacing-8: 8px;--spacing-12: 12px;--spacing-16: 16px;--spacing-20: 20px;--spacing-24: 24px;--spacing-28: 28px;--spacing-32: 32px;--spacing-40: 40px;--spacing-48: 48px;--spacing-56: 56px;--spacing-64: 64px;--spacing-128: 128px;--spacing-256: 256px;--z-0: 0;--z-1: 1;--z-2: 2;--z-3: 3;--z-4: 4;--z-5: 5;--z-999: 999;--z-9999: 9999}body{font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--text-13)}';
|
|
3
3
|
if (typeof document < "u" && !document.getElementById("acl-tokens")) {
|
|
4
4
|
const a = document.createElement("style");
|
|
@@ -930,7 +930,7 @@
|
|
|
930
930
|
.toggle-item:hover .toggle-item__icon { color: var(--color-gray-7); }
|
|
931
931
|
.toggle-item--selected .toggle-item__icon { color: var(--color-gray-7); }
|
|
932
932
|
.toggle-item--variant-primary.toggle-item--selected .toggle-item__icon { color: var(--color-primary-4); }
|
|
933
|
-
`;let W=A4;O([s({reflect:!0})],W.prototype,"value");O([s({attribute:"start-icon"})],W.prototype,"startIcon");O([s({type:Boolean})],W.prototype,"disabled");O([s({attribute:!1})],W.prototype,"selected");O([s({attribute:!1})],W.prototype,"groupSize");O([s({attribute:!1})],W.prototype,"groupVariant");O([s({attribute:!1})],W.prototype,"groupMode");function S5(r){return r.split(" ").map(e=>e.trim()).filter(Boolean)}customElements.get("anduin-toggle-group")||customElements.define("anduin-toggle-group",K);customElements.get("anduin-toggle-group-item")||customElements.define("anduin-toggle-group-item",W);var p0=Object.defineProperty,$3=(r,e,t,o)=>{for(var i=void 0,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=l(e,t,i)||i);return i&&p0(e,t,i),i};const i4="anduin-tooltip:show",Z5="anduin-tooltip:hide",o4="anduin-tooltip:trigger-mounted",n4="anduin-tooltip:content-popup-mounted",r4="anduin-tooltip:content-popup-unmounted",l4="anduin-tooltip:visibility-changed",u0=["top-start","top-center","top-end","right-start","right-center","right-end","bottom-start","bottom-center","bottom-end","left-start","left-center","left-end"];function Ke(r,e,t,o,i){switch(o){case"top-start":return{left:r.left,top:r.top-t-i};case"top-center":return{left:r.left+r.width/2-e/2,top:r.top-t-i};case"top-end":return{left:r.left+r.width-e,top:r.top-t-i};case"right-start":return{left:r.right+i,top:r.top};case"right-center":return{left:r.right+i,top:r.top+r.height/2-t/2};case"right-end":return{left:r.right+i,top:r.top+r.height-t};case"bottom-start":return{left:r.left,top:r.bottom+i};case"bottom-center":return{left:r.left+r.width/2-e/2,top:r.bottom+i};case"bottom-end":return{left:r.left+r.width-e,top:r.bottom+i};case"left-start":return{left:r.left-e-i,top:r.top};case"left-center":return{left:r.left-e-i,top:r.top+r.height/2-t/2};case"left-end":return{left:r.left-e-i,top:r.top+r.height-t};default:return{left:0,top:0}}}function We(r,e){return e.right>=r.left&&e.left<=r.right&&e.top<=r.bottom&&e.bottom>=r.top}function Ye(r,e){const t=Math.max(r.left,e.left),o=Math.max(r.top,e.top),i=Math.min(r.right,e.right),n=Math.min(r.bottom,e.bottom);return i<t||n<o?0:(i-t)*(n-o)}function h0(r,e,t,o=8){const i=window.innerWidth,n=window.innerHeight,l={left:0,top:0,right:i,bottom:n},d=e.width,c=e.height;if(!We({left:r.left,top:r.top,right:r.right,bottom:r.bottom},l))return null;const C=Ke(r,d,c,t,o),p=u0.map(m=>({p:m,off:Ke(r,d,c,m,o)})).filter(({off:m})=>We({left:m.left,top:m.top,right:m.left+d,bottom:m.top+c},l));if(p.length===0)return{placement:t,left:Math.round(Math.min(Math.max(C.left,0),i-d)),top:Math.round(Math.min(Math.max(C.top,0),n-c))};p.sort((m,V)=>{const _={left:m.off.left,top:m.off.top,right:m.off.left+d,bottom:m.off.top+c},v={left:V.off.left,top:V.off.top,right:V.off.left+d,bottom:V.off.top+c},M=Ye(_,l),w=Ye(v,l);if(w!==M)return w-M;const
|
|
933
|
+
`;let W=A4;O([s({reflect:!0})],W.prototype,"value");O([s({attribute:"start-icon"})],W.prototype,"startIcon");O([s({type:Boolean})],W.prototype,"disabled");O([s({attribute:!1})],W.prototype,"selected");O([s({attribute:!1})],W.prototype,"groupSize");O([s({attribute:!1})],W.prototype,"groupVariant");O([s({attribute:!1})],W.prototype,"groupMode");function S5(r){return r.split(" ").map(e=>e.trim()).filter(Boolean)}customElements.get("anduin-toggle-group")||customElements.define("anduin-toggle-group",K);customElements.get("anduin-toggle-group-item")||customElements.define("anduin-toggle-group-item",W);var p0=Object.defineProperty,$3=(r,e,t,o)=>{for(var i=void 0,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=l(e,t,i)||i);return i&&p0(e,t,i),i};const i4="anduin-tooltip:show",Z5="anduin-tooltip:hide",o4="anduin-tooltip:trigger-mounted",n4="anduin-tooltip:content-popup-mounted",r4="anduin-tooltip:content-popup-unmounted",l4="anduin-tooltip:visibility-changed",u0=["top-start","top-center","top-end","right-start","right-center","right-end","bottom-start","bottom-center","bottom-end","left-start","left-center","left-end"];function Ke(r,e,t,o,i){switch(o){case"top-start":return{left:r.left,top:r.top-t-i};case"top-center":return{left:r.left+r.width/2-e/2,top:r.top-t-i};case"top-end":return{left:r.left+r.width-e,top:r.top-t-i};case"right-start":return{left:r.right+i,top:r.top};case"right-center":return{left:r.right+i,top:r.top+r.height/2-t/2};case"right-end":return{left:r.right+i,top:r.top+r.height-t};case"bottom-start":return{left:r.left,top:r.bottom+i};case"bottom-center":return{left:r.left+r.width/2-e/2,top:r.bottom+i};case"bottom-end":return{left:r.left+r.width-e,top:r.bottom+i};case"left-start":return{left:r.left-e-i,top:r.top};case"left-center":return{left:r.left-e-i,top:r.top+r.height/2-t/2};case"left-end":return{left:r.left-e-i,top:r.top+r.height-t};default:return{left:0,top:0}}}function We(r,e){return e.right>=r.left&&e.left<=r.right&&e.top<=r.bottom&&e.bottom>=r.top}function Ye(r,e){const t=Math.max(r.left,e.left),o=Math.max(r.top,e.top),i=Math.min(r.right,e.right),n=Math.min(r.bottom,e.bottom);return i<t||n<o?0:(i-t)*(n-o)}function h0(r,e,t,o=8){const i=window.innerWidth,n=window.innerHeight,l={left:0,top:0,right:i,bottom:n},d=e.width,c=e.height;if(!We({left:r.left,top:r.top,right:r.right,bottom:r.bottom},l))return null;const C=Ke(r,d,c,t,o),p=u0.map(m=>({p:m,off:Ke(r,d,c,m,o)})).filter(({off:m})=>We({left:m.left,top:m.top,right:m.left+d,bottom:m.top+c},l));if(p.length===0)return{placement:t,left:Math.round(Math.min(Math.max(C.left,0),i-d)),top:Math.round(Math.min(Math.max(C.top,0),n-c))};p.sort((m,V)=>{const _={left:m.off.left,top:m.off.top,right:m.off.left+d,bottom:m.off.top+c},v={left:V.off.left,top:V.off.top,right:V.off.left+d,bottom:V.off.top+c},M=Ye(_,l),w=Ye(v,l);if(w!==M)return w-M;const D=Math.abs(m.off.left-C.left)+Math.abs(m.off.top-C.top),j=Math.abs(V.off.left-C.left)+Math.abs(V.off.top-C.top);return D-j});const{p:f,off:b}=p[0];return{placement:f,left:Math.round(Math.min(Math.max(b.left,0),i-d)),top:Math.round(Math.min(Math.max(b.top,0),n-c))}}function O5(r){return r.split("-")[0]||"top"}function g0(r,e,t){let o=!1,i=t.length-1;for(let n=0;n<t.length;n++){const l=t[n][0],d=t[n][1],c=t[i][0],C=t[i][1];d>e!=C>e&&r<(c-l)*(e-d)/(C-d)+l&&(o=!o),i=n}return o}const S4=class S4 extends u{constructor(){super(...arguments),this.disabled=!1,this.placement="top-center",this.triggerElement=null,this.contentPopupElement=null,this.containingBlockLeft=0,this.containingBlockTop=0,this.rafId=0,this.prevTriggerTop=NaN,this.prevTriggerLeft=NaN,this.isVisible=!1}connectedCallback(){super.connectedCallback(),this.addEventListener(o4,e=>{e.stopPropagation(),this.triggerElement=e.detail,this.maybeStartPositionLoop()}),this.addEventListener(n4,e=>{e.stopPropagation(),this.contentPopupElement=e.detail,this.computeContainingBlockOffset(this.contentPopupElement),this.maybeStartPositionLoop()}),this.addEventListener(r4,e=>{e.stopPropagation(),this.stopPositionLoop(),this.contentPopupElement=null}),this.addEventListener(i4,e=>{e.stopPropagation(),!this.disabled&&(this.isVisible=!0,this.broadcastVisibilityChanged(`show:${this.placement}`))}),this.addEventListener(Z5,e=>{e.stopPropagation(),this.isVisible=!1,this.stopPositionLoop(),this.broadcastVisibilityChanged("hide")})}updated(e){e.has("disabled")&&this.disabled&&this.isVisible&&(this.isVisible=!1,this.stopPositionLoop(),this.broadcastVisibilityChanged("hide"))}disconnectedCallback(){super.disconnectedCallback(),this.stopPositionLoop(),this.triggerElement=null,this.contentPopupElement=null}maybeStartPositionLoop(){this.isVisible&&this.triggerElement&&this.contentPopupElement&&this.startPositionLoop()}startPositionLoop(){this.stopPositionLoop(),this.prevTriggerTop=NaN,this.prevTriggerLeft=NaN;const e=this.triggerElement,t=this.contentPopupElement,o=this.placement,i=()=>{const n=e.getBoundingClientRect();(n.top!==this.prevTriggerTop||n.left!==this.prevTriggerLeft)&&(this.prevTriggerTop=n.top,this.prevTriggerLeft=n.left,this.positionPopup(t,e,o)),this.rafId=requestAnimationFrame(i)};this.rafId=requestAnimationFrame(i)}stopPositionLoop(){this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=0),this.prevTriggerTop=NaN,this.prevTriggerLeft=NaN}computeContainingBlockOffset(e){const t=e,o=t.style.transform;t.style.transform="none";const i=e.getBoundingClientRect();this.containingBlockLeft=i.left,this.containingBlockTop=i.top,t.style.transform=o}positionPopup(e,t,o){const i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),l=h0(i,n,o,8);if(l){const d=e;d.style.transform=`translate(${l.left-this.containingBlockLeft}px, ${l.top-this.containingBlockTop}px)`;const c=O5(l.placement),C=O5(o);if(c!==C){const p=e.querySelector(".tooltip-arrow");p&&(p.classList.remove(`tooltip-arrow--${C}`),p.classList.add(`tooltip-arrow--${c}`))}}}broadcastVisibilityChanged(e){this.dispatchEvent(new CustomEvent(l4,{detail:e,bubbles:!1,composed:!1}))}render(){return a`<div class="tooltip-root" part="tooltip"><slot></slot></div>`}};S4.styles=g`
|
|
934
934
|
/* inline-flex, not inline-block: the wrapper is purely structural (it exists
|
|
935
935
|
to position the popup), so it must not add height of its own. As an
|
|
936
936
|
inline-block it establishes a line box, and an inline-level trigger sits
|
|
@@ -1084,7 +1084,7 @@
|
|
|
1084
1084
|
.well-close__button:active {
|
|
1085
1085
|
background-color: var(--color-gray-3);
|
|
1086
1086
|
}
|
|
1087
|
-
`;let Q2=B4;customElements.get("anduin-well")||customElements.define("anduin-well",E2);customElements.get("anduin-well-close")||customElements.define("anduin-well-close",Q2);var m0=Object.defineProperty,B1=(r,e,t,o)=>{for(var i=void 0,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=l(e,t,i)||i);return i&&m0(e,t,i),i};const e5="anduin-popover:close",t5="anduin-popover:open-change",T4=class T4 extends u{constructor(){super(...arguments),this.open=!1,this.placement="bottom-start",this.fullWidth=!1,this._visible=!1,this._closing=!1,this._closeTransitionEndHandler=null,this._onOutsideClick=e=>{e.composedPath().includes(this)||(this.open=!1)},this._onScrollOrResize=()=>{this.open&&this._updatePosition()},this._onPopoverClose=()=>{this.open=!1}}_onTriggerClick(){this.open=!this.open}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onOutsideClick),window.addEventListener("scroll",this._onScrollOrResize,{passive:!0,capture:!0}),window.addEventListener("resize",this._onScrollOrResize),this.addEventListener(e5,this._onPopoverClose)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onOutsideClick),window.removeEventListener("scroll",this._onScrollOrResize,{capture:!0}),window.removeEventListener("resize",this._onScrollOrResize),this.removeEventListener(e5,this._onPopoverClose)}updated(e){e.has("open")&&(this.dispatchEvent(new CustomEvent(t5,{detail:this.open,bubbles:!0,composed:!0})),this.open?(this._cancelCloseAnimation(),this._closing=!1,this._visible=!0,requestAnimationFrame(()=>this._updatePosition())):this._startCloseAnimation())}_cancelCloseAnimation(){this._closeTransitionEndHandler&&this._panelEl&&(this._panelEl.removeEventListener("transitionend",this._closeTransitionEndHandler),this._closeTransitionEndHandler=null),this._closing=!1}_startCloseAnimation(){if(!this._visible)return;this._closing=!0;const e=t=>{var o;t.propertyName==="opacity"&&((o=this._panelEl)==null||o.removeEventListener("transitionend",e),this._closeTransitionEndHandler=null,this._closing=!1,this._visible=!1)};this._closeTransitionEndHandler=e,requestAnimationFrame(()=>{var t;return(t=this._panelEl)==null?void 0:t.addEventListener("transitionend",e)})}_updatePosition(){const e=this._triggerEl,t=this._panelEl;if(!e||!t)return;const o=e.getBoundingClientRect(),i=t.style.transform;t.style.transform="none";const n=t.getBoundingClientRect();t.style.transform=i;const l=t.getBoundingClientRect(),d=4,c=window.innerWidth,C=window.innerHeight,p=8;let f=0,b=0,m="bottom";const V=!this.placement.startsWith("top"),_=C-o.bottom-d,v=o.top-d,M=_>=l.height,w=v>=l.height,
|
|
1087
|
+
`;let Q2=B4;customElements.get("anduin-well")||customElements.define("anduin-well",E2);customElements.get("anduin-well-close")||customElements.define("anduin-well-close",Q2);var m0=Object.defineProperty,B1=(r,e,t,o)=>{for(var i=void 0,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=l(e,t,i)||i);return i&&m0(e,t,i),i};const e5="anduin-popover:close",t5="anduin-popover:open-change",T4=class T4 extends u{constructor(){super(...arguments),this.open=!1,this.placement="bottom-start",this.fullWidth=!1,this._visible=!1,this._closing=!1,this._closeTransitionEndHandler=null,this._onOutsideClick=e=>{e.composedPath().includes(this)||(this.open=!1)},this._onScrollOrResize=()=>{this.open&&this._updatePosition()},this._onPopoverClose=()=>{this.open=!1}}_onTriggerClick(){this.open=!this.open}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onOutsideClick),window.addEventListener("scroll",this._onScrollOrResize,{passive:!0,capture:!0}),window.addEventListener("resize",this._onScrollOrResize),this.addEventListener(e5,this._onPopoverClose)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onOutsideClick),window.removeEventListener("scroll",this._onScrollOrResize,{capture:!0}),window.removeEventListener("resize",this._onScrollOrResize),this.removeEventListener(e5,this._onPopoverClose)}updated(e){e.has("open")&&(this.dispatchEvent(new CustomEvent(t5,{detail:this.open,bubbles:!0,composed:!0})),this.open?(this._cancelCloseAnimation(),this._closing=!1,this._visible=!0,requestAnimationFrame(()=>this._updatePosition())):this._startCloseAnimation())}_cancelCloseAnimation(){this._closeTransitionEndHandler&&this._panelEl&&(this._panelEl.removeEventListener("transitionend",this._closeTransitionEndHandler),this._closeTransitionEndHandler=null),this._closing=!1}_startCloseAnimation(){if(!this._visible)return;this._closing=!0;const e=t=>{var o;t.propertyName==="opacity"&&((o=this._panelEl)==null||o.removeEventListener("transitionend",e),this._closeTransitionEndHandler=null,this._closing=!1,this._visible=!1)};this._closeTransitionEndHandler=e,requestAnimationFrame(()=>{var t;return(t=this._panelEl)==null?void 0:t.addEventListener("transitionend",e)})}_updatePosition(){const e=this._triggerEl,t=this._panelEl;if(!e||!t)return;const o=e.getBoundingClientRect(),i=t.style.transform;t.style.transform="none";const n=t.getBoundingClientRect();t.style.transform=i;const l=t.getBoundingClientRect(),d=4,c=window.innerWidth,C=window.innerHeight,p=8;let f=0,b=0,m="bottom";const V=!this.placement.startsWith("top"),_=C-o.bottom-d,v=o.top-d,M=_>=l.height,w=v>=l.height,D=V?M||_>=v:!w&&M;m=D?"bottom":"top",b=D?o.bottom+d:o.top-l.height-d;const j=this.placement.endsWith("end")?"end":this.placement.endsWith("start")?"start":"center";j==="start"?f=o.left:j==="end"?f=o.right-l.width:f=o.left+o.width/2-l.width/2,f=Math.max(p,Math.min(f,c-l.width-p)),b=Math.max(p,Math.min(b,C-l.height-p)),t.style.transform=`translate(${Math.round(f-n.left)}px, ${Math.round(b-n.top)}px)`,t.dataset.side=m}render(){return a`
|
|
1088
1088
|
<div class="popover__trigger" @click=${this._onTriggerClick} part="trigger">
|
|
1089
1089
|
<slot name="trigger"></slot>
|
|
1090
1090
|
</div>
|
|
@@ -2068,7 +2068,7 @@
|
|
|
2068
2068
|
color: var(--color-gray-8, #101828);
|
|
2069
2069
|
line-height: 20px;
|
|
2070
2070
|
}
|
|
2071
|
-
`;let a2=Y4;I3([s({type:Boolean})],a2.prototype,"checked");I3([s({type:Boolean})],a2.prototype,"disabled");customElements.get("anduin-switcher")||customElements.define("anduin-switcher",a2);var P0=Object.defineProperty,
|
|
2071
|
+
`;let a2=Y4;I3([s({type:Boolean})],a2.prototype,"checked");I3([s({type:Boolean})],a2.prototype,"disabled");customElements.get("anduin-switcher")||customElements.define("anduin-switcher",a2);var P0=Object.defineProperty,z=(r,e,t,o)=>{for(var i=void 0,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=l(e,t,i)||i);return i&&P0(e,t,i),i};const N5="anduin-dropdown:change",q4=class q4 extends u{constructor(){super(...arguments),this.value="",this.placeholder="Select...",this.options=[],this.icon="",this.searchable=!0,this.disabled=!1,this.placement="bottom-start",this.appearance="filled",this.variant="gray0",this.size="default",this.fullWidth=!1,this.clearable=!0,this._open=!1,this._query="",this._onOutsideClick=e=>{var t;!this.contains(e.target)&&!((t=this.shadowRoot)!=null&&t.contains(e.target))&&(this._open=!1,this._query="")},this._onScrollOrResize=()=>{this._open&&this._updatePosition()}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onOutsideClick),window.addEventListener("scroll",this._onScrollOrResize,{passive:!0,capture:!0}),window.addEventListener("resize",this._onScrollOrResize)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onOutsideClick),window.removeEventListener("scroll",this._onScrollOrResize,{capture:!0}),window.removeEventListener("resize",this._onScrollOrResize)}updated(e){e.has("_open")&&this._open&&requestAnimationFrame(()=>{var t,o;if(this._updatePosition(),this.searchable){const i=(o=(t=this._searchEl)==null?void 0:t.shadowRoot)==null?void 0:o.querySelector("input");i==null||i.focus()}})}_onTriggerClick(){this.disabled||(this._open=!this._open,this._open||(this._query=""))}_onKeyDown(e){var t;e.key==="Escape"&&(this._open=!1,this._query="",(t=this._triggerEl)==null||t.focus())}_onClear(e){e.stopPropagation(),this.clearable&&(this.value="",this.dispatchEvent(new CustomEvent(N5,{detail:"",bubbles:!0,composed:!0})))}_selectOption(e){this.value=e.value,this._open=!1,this._query="",this.dispatchEvent(new CustomEvent(N5,{detail:e.value,bubbles:!0,composed:!0}))}_updatePosition(){const e=this._triggerEl,t=this._panelEl;if(!e||!t)return;const o=e.getBoundingClientRect(),i=t.style.transform;t.style.transform="none";const n=t.getBoundingClientRect();t.style.transform=i;const l=t.querySelector(".panel__inner");l&&(l.style.minWidth=`${o.width}px`);const d=t.getBoundingClientRect(),c=4,C=window.innerWidth,p=window.innerHeight,f=8,b=p-o.bottom-c,m=o.top-c,_=d.height<=b||b>=m?o.bottom+c:o.top-d.height-c;let v=o.left;this.placement==="bottom-end"?v=o.right-d.width:this.placement==="bottom"&&(v=o.left+o.width/2-d.width/2),v=Math.max(f,Math.min(v,C-d.width-f));const M=Math.max(f,Math.min(_,p-d.height-f));t.style.transform=`translate(${Math.round(v-n.left)}px, ${Math.round(M-n.top)}px)`}get _filteredOptions(){if(!this._query)return this.options;const e=this._query.toLowerCase();return this.options.filter(t=>t.label.toLowerCase().includes(e))}render(){const e=this.options.find(l=>l.value===this.value),t=(e==null?void 0:e.label)??"",o=e?e.icon??"":this.icon,i=this._filteredOptions,n=this.clearable&&!!this.value&&!this.disabled;return a`
|
|
2072
2072
|
<button
|
|
2073
2073
|
class="trigger trigger--${this.appearance} trigger--${this.variant}${this.size==="small"?" trigger--small":""}${this.value?" has-value":""}"
|
|
2074
2074
|
part="trigger"
|
|
@@ -2080,11 +2080,11 @@
|
|
|
2080
2080
|
>
|
|
2081
2081
|
${o&&t?a`<anduin-icon name="${o}" size="16"></anduin-icon>`:h}
|
|
2082
2082
|
<span class="trigger__label${t?"":" trigger__label--placeholder"}">${t||this.placeholder}</span>
|
|
2083
|
-
<span class="trigger__caret">
|
|
2083
|
+
<span class="trigger__caret${n?" trigger__caret--clearable":""}">
|
|
2084
2084
|
<span class="trigger__chevron">
|
|
2085
2085
|
<anduin-icon name="caretDown" size="16"></anduin-icon>
|
|
2086
2086
|
</span>
|
|
2087
|
-
${
|
|
2087
|
+
${n?a`
|
|
2088
2088
|
<span class="trigger__clear" @click=${this._onClear}>
|
|
2089
2089
|
<anduin-icon name="crossSmall" size="16"></anduin-icon>
|
|
2090
2090
|
</span>
|
|
@@ -2099,23 +2099,23 @@
|
|
|
2099
2099
|
<anduin-input
|
|
2100
2100
|
placeholder="Search ..."
|
|
2101
2101
|
.value=${this._query}
|
|
2102
|
-
@anduin-input:change=${
|
|
2102
|
+
@anduin-input:change=${l=>{this._query=l.detail}}
|
|
2103
2103
|
></anduin-input>
|
|
2104
2104
|
</div>
|
|
2105
2105
|
`:h}
|
|
2106
2106
|
<div class="options">
|
|
2107
|
-
${i.length?i.map(
|
|
2107
|
+
${i.length?i.map(l=>a`
|
|
2108
2108
|
<div
|
|
2109
2109
|
class="option"
|
|
2110
2110
|
role="option"
|
|
2111
|
-
aria-selected=${
|
|
2112
|
-
@click=${()=>this._selectOption(
|
|
2111
|
+
aria-selected=${l.value===this.value}
|
|
2112
|
+
@click=${()=>this._selectOption(l)}
|
|
2113
2113
|
>
|
|
2114
2114
|
<span class="option__check">
|
|
2115
|
-
${
|
|
2115
|
+
${l.value===this.value?a`<anduin-icon name="checkSmall" size="16"></anduin-icon>`:h}
|
|
2116
2116
|
</span>
|
|
2117
|
-
${
|
|
2118
|
-
<span class="option__label">${
|
|
2117
|
+
${l.icon?a`<anduin-icon name="${l.icon}" size="16"></anduin-icon>`:h}
|
|
2118
|
+
<span class="option__label">${l.label}</span>
|
|
2119
2119
|
</div>
|
|
2120
2120
|
`):a`<div class="empty">No results</div>`}
|
|
2121
2121
|
</div>
|
|
@@ -2234,7 +2234,13 @@
|
|
|
2234
2234
|
}
|
|
2235
2235
|
.trigger__clear:hover { color: var(--color-gray-9, #101828); background-color: var(--color-gray-3); }
|
|
2236
2236
|
.trigger__clear:active { background-color: var(--color-gray-4); }
|
|
2237
|
-
|
|
2237
|
+
/* Scoped to --clearable so the chevron only fades when there is a × to
|
|
2238
|
+
reveal: unscoped, it fades out to show a × that is not there and the caret
|
|
2239
|
+
is simply gone while hovered. --clearable is set under exactly the
|
|
2240
|
+
condition the × renders (clearable, a value, not disabled) — not on
|
|
2241
|
+
the clearable flag alone, which left a filter resting on '' or a disabled
|
|
2242
|
+
dropdown with no caret on hover. */
|
|
2243
|
+
.trigger__caret--clearable:hover .trigger__chevron { opacity: 0; }
|
|
2238
2244
|
.trigger__caret:hover .trigger__clear { opacity: 1; }
|
|
2239
2245
|
|
|
2240
2246
|
/* ── Panel ─────────────────────────────────────────────────── */
|
|
@@ -2300,7 +2306,7 @@
|
|
|
2300
2306
|
color: var(--color-gray-5, #98a1b2);
|
|
2301
2307
|
text-align: center;
|
|
2302
2308
|
}
|
|
2303
|
-
`;let Z=q4;
|
|
2309
|
+
`;let Z=q4;z([s()],Z.prototype,"value");z([s()],Z.prototype,"placeholder");z([s({attribute:!1})],Z.prototype,"options");z([s()],Z.prototype,"icon");z([s({type:Boolean})],Z.prototype,"searchable");z([s({type:Boolean})],Z.prototype,"disabled");z([s()],Z.prototype,"placement");z([s()],Z.prototype,"appearance");z([s()],Z.prototype,"variant");z([s()],Z.prototype,"size");z([s({type:Boolean,attribute:"full-width",reflect:!0})],Z.prototype,"fullWidth");z([s({converter:r=>r!=="false"})],Z.prototype,"clearable");z([H()],Z.prototype,"_open");z([H()],Z.prototype,"_query");z([$(".trigger")],Z.prototype,"_triggerEl");z([$(".panel")],Z.prototype,"_panelEl");z([$("anduin-input")],Z.prototype,"_searchEl");customElements.get("anduin-dropdown")||customElements.define("anduin-dropdown",Z);var B0=Object.defineProperty,g1=(r,e,t,o)=>{for(var i=void 0,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=l(e,t,i)||i);return i&&B0(e,t,i),i};const W1="anduin-close",F2="anduin-after-close",T0=300,e3=250,O0=new Map([["320",320],["360",360],["400",400],["640",640]]),X4=class X4 extends u{constructor(){super(...arguments),this.open=!1,this.heading="",this.hideHeader=!1,this.hideFooter=!1,this.defaultWidth="320",this.placement="right",this.allowInteractOutside=!1,this._leaving=!1,this._width=320,this._resizing=!1,this._startX=0,this._startWidth=0,this._stopAtSelf=e=>{e.stopPropagation()},this._onResizeStart=e=>{this._resizing=!0,this._startX=e.clientX,this._startWidth=this._width,e.currentTarget.setPointerCapture(e.pointerId),e.preventDefault()},this._onResizeMove=e=>{var n;if(!this._resizing)return;const t=this.placement==="left"?e.clientX-this._startX:this._startX-e.clientX,o=Math.max(200,Math.min(window.innerWidth*.9,this._startWidth+t));this._width=Math.round(o);const i=(n=this.shadowRoot)==null?void 0:n.querySelector(".drawer");i&&(i.style.width=`${this._width}px`)},this._onResizeEnd=()=>{this._resizing=!1}}willUpdate(e){e.has("defaultWidth")&&(this._width=O0.get(this.defaultWidth)??(parseInt(this.defaultWidth)||320))}updated(e){e.has("open")&&(this.open?(this._leaving=!1,this.classList.add("is-shown")):this.classList.contains("is-shown")&&(this._leaving=!0,setTimeout(()=>{this._leaving=!1,this.classList.remove("is-shown"),this.dispatchEvent(new CustomEvent(F2,{bubbles:!0,composed:!0}))},e3)))}_dispatch(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.addEventListener(W1,this._stopAtSelf),this.addEventListener(F2,this._stopAtSelf)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(W1,this._stopAtSelf),this.removeEventListener(F2,this._stopAtSelf)}_onClose(){this._dispatch(W1)}_onBackdropClick(){this._dispatch(W1)}render(){const e=this._leaving;return a`
|
|
2304
2310
|
${this.allowInteractOutside?h:a`<div class="backdrop" @click=${this._onBackdropClick}></div>`}
|
|
2305
2311
|
<div
|
|
2306
2312
|
class=${`drawer${e?" is-leaving":""}`}
|
|
@@ -3444,7 +3450,7 @@
|
|
|
3444
3450
|
<tbody>
|
|
3445
3451
|
${f.map(_=>a`
|
|
3446
3452
|
<tr>
|
|
3447
|
-
${_.map(v=>{if(v===null)return a`<td class="calendar__day-cell"></td>`;const M=new Date(this._viewYear,this._viewMonth,v),w=m1(M),
|
|
3453
|
+
${_.map(v=>{if(v===null)return a`<td class="calendar__day-cell"></td>`;const M=new Date(this._viewYear,this._viewMonth,v),w=m1(M),D=M.getTime(),j=this._isDisabled(M),u2=!!o&&D===o.getTime(),r1=!!i&&D===i.getTime(),ke=!!o&&!!i&&D>o.getTime()&&D<i.getTime(),Re=!n&&!!t&&D===t.getTime(),p7=["calendar__day-cell",ke?"calendar__day-cell--in-range":"",u2&&i?"calendar__day-cell--range-start":"",r1&&o?"calendar__day-cell--range-end":""].filter(Boolean).join(" "),u7=["calendar__day-button",w===e?"calendar__day-button--today":"",Re?"calendar__day-button--selected":"",u2?"calendar__day-button--range-start":"",r1?"calendar__day-button--range-end":"",ke?"calendar__day-button--in-range":"",j?"calendar__day-button--disabled":""].filter(Boolean).join(" ");return a`
|
|
3448
3454
|
<td
|
|
3449
3455
|
class="${p7}"
|
|
3450
3456
|
role="gridcell"
|
|
@@ -3703,12 +3709,12 @@
|
|
|
3703
3709
|
@dblclick=${v=>this.onResizeReset(v,e,t)}
|
|
3704
3710
|
@click=${v=>v.stopPropagation()}
|
|
3705
3711
|
></span>
|
|
3706
|
-
`:h;if(l1(e)){const v=this.renderSelectableRows,M=this.renderSelectedKeys,w=v.filter(r1=>M.has(r1.key)).length,
|
|
3712
|
+
`:h;if(l1(e)){const v=this.renderSelectableRows,M=this.renderSelectedKeys,w=v.filter(r1=>M.has(r1.key)).length,D=v.length>0&&w===v.length,j=w>0&&!D,u2=e.renderHeader?e.renderHeader({areAllRowsSelected:D,hasSelectedRow:w>0,onChange:r1=>this.toggleAllRows(r1)}):a`
|
|
3707
3713
|
<anduin-checkbox
|
|
3708
|
-
.checked=${
|
|
3714
|
+
.checked=${D}
|
|
3709
3715
|
.indeterminate=${j}
|
|
3710
|
-
aria-label="${
|
|
3711
|
-
@anduin-checkbox:change=${r1=>{r1.stopPropagation(),this.toggleAllRows(!
|
|
3716
|
+
aria-label="${D?"Deselect all rows":"Select all rows"}"
|
|
3717
|
+
@anduin-checkbox:change=${r1=>{r1.stopPropagation(),this.toggleAllRows(!D)}}
|
|
3712
3718
|
></anduin-checkbox>
|
|
3713
3719
|
`;return a`
|
|
3714
3720
|
<th
|