@duyluonganduin/acl-web-components 0.0.58 → 0.0.59
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 +24 -0
- package/dist/acl-web-components.iife.js +149 -113
- package/dist/acl-web-components.js +1 -1
- package/dist/{anduin-table-gTUL80nN.js → anduin-table-DRPTUmAM.js} +270 -202
- package/dist/{anduin-table-Brto8nKz.cjs → anduin-table-X2lYnMwn.cjs} +62 -26
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts +24 -0
- package/dist/react.js +2 -2
- package/package.json +1 -1
|
@@ -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},
|
|
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},w=Ye(_,l),Z=Ye(v,l);if(Z!==w)return Z-w;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,
|
|
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,w=_>=l.height,Z=v>=l.height,D=V?w||_>=v:!Z&&w;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,A=(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._activeIndex=-1,this._onOutsideClick=e=>{var t;!this.contains(e.target)&&!((t=this.shadowRoot)!=null&&t.contains(e.target))&&(this._open=!1,this._query="",this._activeIndex=-1)},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){var t,o;e.has("_activeIndex")&&this._activeIndex>=0&&((o=(t=this.shadowRoot)==null?void 0:t.querySelector(".option--active"))==null||o.scrollIntoView({block:"nearest"})),e.has("_open")&&this._open&&requestAnimationFrame(()=>{var i,n;if(this._updatePosition(),this.searchable){const l=(n=(i=this._searchEl)==null?void 0:i.shadowRoot)==null?void 0:n.querySelector("input");l==null||l.focus()}})}_onTriggerClick(){this.disabled||(this._open=!this._open,this._activeIndex=-1,this._open||(this._query=""))}_onKeyDown(e){var t;if(e.key==="Escape"){this._open=!1,this._query="",this._activeIndex=-1,(t=this._triggerEl)==null||t.focus();return}if(this._open){if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),this._moveActive(e.key==="ArrowDown"?1:-1);else if(e.key==="Enter"&&this._activeIndex>=0){e.preventDefault();const o=this._filteredOptions[this._activeIndex];o&&this._selectOption(o)}}}_moveActive(e){const t=this._filteredOptions;for(let o=this._activeIndex+e;o>=0&&o<t.length;o+=e)if(!t[o].disabled){this._activeIndex=o;return}}_onClear(e){e.stopPropagation(),this.clearable&&(this.value="",this.dispatchEvent(new CustomEvent(N5,{detail:"",bubbles:!0,composed:!0})))}_selectOption(e){e.disabled||(this.value=e.value,this._open=!1,this._query="",this._activeIndex=-1,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 w=Math.max(f,Math.min(_,p-d.height-f));t.style.transform=`translate(${Math.round(v-n.left)}px, ${Math.round(w-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"
|
|
@@ -2099,23 +2099,28 @@
|
|
|
2099
2099
|
<anduin-input
|
|
2100
2100
|
placeholder="Search ..."
|
|
2101
2101
|
.value=${this._query}
|
|
2102
|
-
@anduin-input:change=${l=>{this._query=l.detail}}
|
|
2102
|
+
@anduin-input:change=${l=>{this._query=l.detail,this._activeIndex=-1}}
|
|
2103
2103
|
></anduin-input>
|
|
2104
2104
|
</div>
|
|
2105
2105
|
`:h}
|
|
2106
2106
|
<div class="options">
|
|
2107
|
-
${i.length?i.map(l=>a`
|
|
2107
|
+
${i.length?i.map((l,d)=>a`
|
|
2108
2108
|
<div
|
|
2109
|
-
class="option"
|
|
2109
|
+
class="option${l.disabled?" option--disabled":""}${l.description?" option--described":""}${d===this._activeIndex?" option--active":""}"
|
|
2110
2110
|
role="option"
|
|
2111
2111
|
aria-selected=${l.value===this.value}
|
|
2112
|
+
aria-disabled=${l.disabled?"true":h}
|
|
2112
2113
|
@click=${()=>this._selectOption(l)}
|
|
2114
|
+
@mouseenter=${()=>{this._activeIndex>=0&&!l.disabled&&(this._activeIndex=d)}}
|
|
2113
2115
|
>
|
|
2114
2116
|
<span class="option__check">
|
|
2115
2117
|
${l.value===this.value?a`<anduin-icon name="checkSmall" size="16"></anduin-icon>`:h}
|
|
2116
2118
|
</span>
|
|
2117
2119
|
${l.icon?a`<anduin-icon name="${l.icon}" size="16"></anduin-icon>`:h}
|
|
2118
|
-
|
|
2120
|
+
${l.description?a`<span class="option__text">
|
|
2121
|
+
<span class="option__label">${l.label}</span>
|
|
2122
|
+
<span class="option__description" part="option-description">${l.description}</span>
|
|
2123
|
+
</span>`:a`<span class="option__label">${l.label}</span>`}
|
|
2119
2124
|
</div>
|
|
2120
2125
|
`):a`<div class="empty">No results</div>`}
|
|
2121
2126
|
</div>
|
|
@@ -2297,16 +2302,47 @@
|
|
|
2297
2302
|
}
|
|
2298
2303
|
.option:hover { background: var(--color-gray-2, #f2f4f7); }
|
|
2299
2304
|
.option:active { background: var(--color-gray-3, #e4e7ec); }
|
|
2305
|
+
/* Keyboard highlight. The same fill as :hover, so a row reached by arrow
|
|
2306
|
+
keys reads exactly like one under the pointer. Only ever set by a key
|
|
2307
|
+
press (see _activeIndex), so a dropdown driven by the mouse alone paints
|
|
2308
|
+
as it always did. */
|
|
2309
|
+
.option--active { background: var(--color-gray-2, #f2f4f7); }
|
|
2300
2310
|
.option__check { flex-shrink: 0; width: 16px; display: flex; align-items: center; color: var(--color-gray-7, #344054); }
|
|
2301
2311
|
.option__label { flex: 1; min-width: 0; }
|
|
2302
2312
|
|
|
2313
|
+
/* Disabled option: visible but unavailable. Opacity 0.5 is the design
|
|
2314
|
+
system's own value for anduin-select-item[disabled]. The cursor is
|
|
2315
|
+
default rather than its not-allowed, to match this library's disabled
|
|
2316
|
+
trigger (.trigger:disabled) — nothing here uses not-allowed. Hover and
|
|
2317
|
+
press draw no fill, so the row never pretends it can be picked. */
|
|
2318
|
+
.option--disabled { opacity: 0.5; cursor: default; }
|
|
2319
|
+
.option--disabled:hover,
|
|
2320
|
+
.option--disabled:active { background: transparent; }
|
|
2321
|
+
|
|
2322
|
+
/* Option with a description: two lines. The label keeps its own line and
|
|
2323
|
+
typography; the description sits under it at 12px in gray-6 (the
|
|
2324
|
+
placeholder's ink — lighter than the gray-9 label, still legible on a
|
|
2325
|
+
dimmed disabled row). The row aligns to the top so the check and icon line
|
|
2326
|
+
up with the label rather than the middle of the block; each is 16px tall
|
|
2327
|
+
against a 20px label line, hence the 2px nudge. Rows without a
|
|
2328
|
+
description never get --described, so their height is unchanged. */
|
|
2329
|
+
.option--described { align-items: flex-start; }
|
|
2330
|
+
.option--described > .option__check,
|
|
2331
|
+
.option--described > anduin-icon { margin-top: 2px; }
|
|
2332
|
+
.option__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
2333
|
+
.option__description {
|
|
2334
|
+
font-size: 12px;
|
|
2335
|
+
line-height: 16px;
|
|
2336
|
+
color: var(--color-gray-6, #667085);
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2303
2339
|
.empty {
|
|
2304
2340
|
padding: 12px 16px;
|
|
2305
2341
|
font-size: 13px;
|
|
2306
2342
|
color: var(--color-gray-5, #98a1b2);
|
|
2307
2343
|
text-align: center;
|
|
2308
2344
|
}
|
|
2309
|
-
`;let
|
|
2345
|
+
`;let x=q4;A([s()],x.prototype,"value");A([s()],x.prototype,"placeholder");A([s({attribute:!1})],x.prototype,"options");A([s()],x.prototype,"icon");A([s({type:Boolean})],x.prototype,"searchable");A([s({type:Boolean})],x.prototype,"disabled");A([s()],x.prototype,"placement");A([s()],x.prototype,"appearance");A([s()],x.prototype,"variant");A([s()],x.prototype,"size");A([s({type:Boolean,attribute:"full-width",reflect:!0})],x.prototype,"fullWidth");A([s({converter:r=>r!=="false"})],x.prototype,"clearable");A([H()],x.prototype,"_open");A([H()],x.prototype,"_query");A([H()],x.prototype,"_activeIndex");A([$(".trigger")],x.prototype,"_triggerEl");A([$(".panel")],x.prototype,"_panelEl");A([$("anduin-input")],x.prototype,"_searchEl");customElements.get("anduin-dropdown")||customElements.define("anduin-dropdown",x);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`
|
|
2310
2346
|
${this.allowInteractOutside?h:a`<div class="backdrop" @click=${this._onBackdropClick}></div>`}
|
|
2311
2347
|
<div
|
|
2312
2348
|
class=${`drawer${e?" is-leaving":""}`}
|
|
@@ -2503,7 +2539,7 @@
|
|
|
2503
2539
|
padding: 16px 20px;
|
|
2504
2540
|
border-top: 1px solid var(--color-gray-3, #e4e7ec);
|
|
2505
2541
|
}
|
|
2506
|
-
`;let N=X4;g1([s({type:Boolean,reflect:!0})],N.prototype,"open");g1([s()],N.prototype,"heading");g1([s({type:Boolean,attribute:"hide-header"})],N.prototype,"hideHeader");g1([s({type:Boolean,attribute:"hide-footer"})],N.prototype,"hideFooter");g1([s({attribute:"default-width"})],N.prototype,"defaultWidth");g1([s({reflect:!0})],N.prototype,"placement");g1([s({type:Boolean,attribute:"allow-interact-outside"})],N.prototype,"allowInteractOutside");g1([H()],N.prototype,"_leaving");g1([H()],N.prototype,"_width");customElements.get("anduin-drawer")||customElements.define("anduin-drawer",N);class N3 extends HTMLElement{constructor(){super(...arguments),this._onClick=()=>{this.dispatchEvent(new CustomEvent(W1,{bubbles:!0,composed:!0}))}}connectedCallback(){this.style.display="contents",this.addEventListener("click",this._onClick)}disconnectedCallback(){this.removeEventListener("click",this._onClick)}}customElements.get("anduin-drawer-close")||customElements.define("anduin-drawer-close",N3);var I0=Object.defineProperty,
|
|
2542
|
+
`;let N=X4;g1([s({type:Boolean,reflect:!0})],N.prototype,"open");g1([s()],N.prototype,"heading");g1([s({type:Boolean,attribute:"hide-header"})],N.prototype,"hideHeader");g1([s({type:Boolean,attribute:"hide-footer"})],N.prototype,"hideFooter");g1([s({attribute:"default-width"})],N.prototype,"defaultWidth");g1([s({reflect:!0})],N.prototype,"placement");g1([s({type:Boolean,attribute:"allow-interact-outside"})],N.prototype,"allowInteractOutside");g1([H()],N.prototype,"_leaving");g1([H()],N.prototype,"_width");customElements.get("anduin-drawer")||customElements.define("anduin-drawer",N);class N3 extends HTMLElement{constructor(){super(...arguments),this._onClick=()=>{this.dispatchEvent(new CustomEvent(W1,{bubbles:!0,composed:!0}))}}connectedCallback(){this.style.display="contents",this.addEventListener("click",this._onClick)}disconnectedCallback(){this.removeEventListener("click",this._onClick)}}customElements.get("anduin-drawer-close")||customElements.define("anduin-drawer-close",N3);var I0=Object.defineProperty,S=(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&&I0(e,t,i),i};const N2="anduin-suggestion:change",G3="anduin-suggestion:select",U3="anduin-suggestion:clear",J4=class J4 extends u{constructor(){super(...arguments),this.value="",this.size="default",this.disabled=!1,this.readonly=!1,this.placeholder="",this.inputid="",this.status="",this.startIcon="",this.endIcon="",this.clearable=!1,this.suggestions=[],this.filter=!1,this.hideWhenEmpty=!1,this.emptyText="No suggestions",this._open=!1,this._activeIndex=-1,this._onDocumentMouseDown=e=>{var t;!this.contains(e.target)&&!((t=this.shadowRoot)!=null&&t.contains(e.target))&&(this._open=!1)},this._onScrollOrResize=()=>{this._open&&this._updatePosition()}}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this._onDocumentMouseDown),window.addEventListener("scroll",this._onScrollOrResize,{passive:!0,capture:!0}),window.addEventListener("resize",this._onScrollOrResize);const e=this.closest("anduin-field");e&&e.addEventListener(a1,t=>{var i;const o=t;this.inputid&&this.inputid===o.detail&&((i=this._inputEl)==null||i.focus())})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this._onDocumentMouseDown),window.removeEventListener("scroll",this._onScrollOrResize,{capture:!0}),window.removeEventListener("resize",this._onScrollOrResize)}updated(e){this._inputEl&&this._inputEl.value!==this.value&&(this._inputEl.value=this.value),this._open&&(e.has("_open")||e.has("value"))&&requestAnimationFrame(()=>this._updatePosition())}_normalized(){return this.suggestions.map(e=>typeof e=="string"?{value:e,label:e}:{label:e.value,...e})}get _filteredSuggestions(){const e=this._normalized();if(!this.filter||!this.value)return e;const t=this.value.toLowerCase();return e.filter(o=>(o.label??o.value).toLowerCase().includes(t))}_openPanel(){this.disabled||this.readonly||(this._open=!0,this._activeIndex=-1)}_onFocus(){this._openPanel()}_onInput(){this.value=this._inputEl.value,this._open||this._openPanel(),this._activeIndex=-1,this.dispatchEvent(new CustomEvent(N2,{detail:this.value,bubbles:!0,composed:!0}))}_onKeyDown(e){const t=this._filteredSuggestions;if(e.key==="ArrowDown"){if(e.preventDefault(),!this._open){this._openPanel();return}if(t.length===0)return;this._activeIndex=(this._activeIndex+1)%t.length,this._scrollActiveIntoView()}else if(e.key==="ArrowUp"){if(e.preventDefault(),!this._open){this._openPanel();return}if(t.length===0)return;this._activeIndex=this._activeIndex<=0?t.length-1:this._activeIndex-1,this._scrollActiveIntoView()}else e.key==="Enter"?this._open&&this._activeIndex>=0&&this._activeIndex<t.length&&(e.preventDefault(),this._selectSuggestion(t[this._activeIndex])):e.key==="Escape"&&this._open&&(e.preventDefault(),this._open=!1)}_scrollActiveIntoView(){requestAnimationFrame(()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".option--active");e==null||e.scrollIntoView({block:"nearest"})})}_selectSuggestion(e){var t;this.value=e.value,this._inputEl&&(this._inputEl.value=e.value),this._open=!1,this.dispatchEvent(new CustomEvent(N2,{detail:this.value,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(G3,{detail:e,bubbles:!0,composed:!0})),(t=this._inputEl)==null||t.focus()}_onClear(){var e;this.value="",this._inputEl&&(this._inputEl.value=""),this._activeIndex=-1,this.dispatchEvent(new CustomEvent(N2,{detail:"",bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(U3,{bubbles:!0,composed:!0})),(e=this._inputEl)==null||e.focus()}_updatePosition(){var Z;const e=(Z=this.shadowRoot)==null?void 0:Z.querySelector(".input-wrapper"),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;v=Math.max(f,Math.min(v,C-d.width-f));const w=Math.max(f,Math.min(_,p-d.height-f));t.style.transform=`translate(${Math.round(v-n.left)}px, ${Math.round(w-n.top)}px)`}render(){const e=this.size==="small"?"input--small":this.size==="large"?"input--large":"input--default",t=this.status?`input--${this.status}`:"",o=!!this.startIcon,i=!!this.endIcon||this.clearable&&!!this.value,n=this.clearable&&!!this.value&&!this.disabled&&!this.readonly,l=this.size==="small"?"12":this.size==="large"?"20":"16",d=this.size==="small"?"10":this.size==="large"?"16":"14",c=this._filteredSuggestions,C=this._open&&(!this.hideWhenEmpty||c.length>0);return a`
|
|
2507
2543
|
<div class="input-wrapper">
|
|
2508
2544
|
${o?a`
|
|
2509
2545
|
<span class="input__start">
|
|
@@ -2676,7 +2712,7 @@
|
|
|
2676
2712
|
color: var(--color-gray-5, #98a1b2);
|
|
2677
2713
|
text-align: center;
|
|
2678
2714
|
}
|
|
2679
|
-
`;let
|
|
2715
|
+
`;let M=J4;S([s()],M.prototype,"value");S([s()],M.prototype,"size");S([s({type:Boolean})],M.prototype,"disabled");S([s({type:Boolean})],M.prototype,"readonly");S([s()],M.prototype,"placeholder");S([s()],M.prototype,"inputid");S([s()],M.prototype,"status");S([s({attribute:"start-icon"})],M.prototype,"startIcon");S([s({attribute:"end-icon"})],M.prototype,"endIcon");S([s({type:Boolean})],M.prototype,"clearable");S([s({attribute:!1})],M.prototype,"suggestions");S([s({type:Boolean})],M.prototype,"filter");S([s({type:Boolean,attribute:"hide-when-empty"})],M.prototype,"hideWhenEmpty");S([s({attribute:"empty-text"})],M.prototype,"emptyText");S([H()],M.prototype,"_open");S([H()],M.prototype,"_activeIndex");S([$("input")],M.prototype,"_inputEl");S([$(".panel")],M.prototype,"_panelEl");customElements.get("anduin-suggestion")||customElements.define("anduin-suggestion",M);var F0=Object.defineProperty,Q=(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&&F0(e,t,i),i};const j3="anduin-navigation:change",r5="anduin-navigation-item:item-click",Q4=class Q4 extends u{constructor(){super(...arguments),this.defaultValue="",this.value=null,this.theme="light",this.alignment="left",this.internalValue="",this.onItemClick=e=>{e.stopPropagation();const o=e.detail;o!==this.selection&&(this.dispatchEvent(new CustomEvent(j3,{detail:o,bubbles:!0,composed:!0})),this.isControlled||(this.internalValue=o))}}get isControlled(){return this.value!=null}get selection(){return this.isControlled?this.value:this.internalValue}connectedCallback(){super.connectedCallback(),this.hasUpdated||(this.internalValue=this.defaultValue),this.addEventListener(r5,this.onItemClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(r5,this.onItemClick)}updated(){this.syncItems()}get items(){return Array.from(this.querySelectorAll("anduin-navigation-item"))}syncItems(){const e=this.selection;for(const t of this.items)t.selected=t.value===e,t.theme=this.theme}render(){return a`
|
|
2680
2716
|
<div class="navigation navigation--${this.alignment}" role="navigation" part="navigation">
|
|
2681
2717
|
<slot @slotchange=${this.syncItems}></slot>
|
|
2682
2718
|
</div>
|
|
@@ -3381,7 +3417,7 @@
|
|
|
3381
3417
|
height: 1px;
|
|
3382
3418
|
background-color: var(--color-gray-3);
|
|
3383
3419
|
}
|
|
3384
|
-
`;let H5=_e;customElements.get("anduin-sidebar")||customElements.define("anduin-sidebar",u5);customElements.get("anduin-sidebar-content")||customElements.define("anduin-sidebar-content",h5);customElements.get("anduin-sidebar-header")||customElements.define("anduin-sidebar-header",S2);customElements.get("anduin-sidebar-footer")||customElements.define("anduin-sidebar-footer",z2);customElements.get("anduin-sidebar-group")||customElements.define("anduin-sidebar-group",g5);customElements.get("anduin-sidebar-group-label")||customElements.define("anduin-sidebar-group-label",f5);customElements.get("anduin-sidebar-menu")||customElements.define("anduin-sidebar-menu",v5);customElements.get("anduin-sidebar-menu-item")||customElements.define("anduin-sidebar-menu-item",u1);customElements.get("anduin-sidebar-action")||customElements.define("anduin-sidebar-action",m5);customElements.get("anduin-sidebar-badge")||customElements.define("anduin-sidebar-badge",b5);customElements.get("anduin-sidebar-separator")||customElements.define("anduin-sidebar-separator",H5);function
|
|
3420
|
+
`;let H5=_e;customElements.get("anduin-sidebar")||customElements.define("anduin-sidebar",u5);customElements.get("anduin-sidebar-content")||customElements.define("anduin-sidebar-content",h5);customElements.get("anduin-sidebar-header")||customElements.define("anduin-sidebar-header",S2);customElements.get("anduin-sidebar-footer")||customElements.define("anduin-sidebar-footer",z2);customElements.get("anduin-sidebar-group")||customElements.define("anduin-sidebar-group",g5);customElements.get("anduin-sidebar-group-label")||customElements.define("anduin-sidebar-group-label",f5);customElements.get("anduin-sidebar-menu")||customElements.define("anduin-sidebar-menu",v5);customElements.get("anduin-sidebar-menu-item")||customElements.define("anduin-sidebar-menu-item",u1);customElements.get("anduin-sidebar-action")||customElements.define("anduin-sidebar-action",m5);customElements.get("anduin-sidebar-badge")||customElements.define("anduin-sidebar-badge",b5);customElements.get("anduin-sidebar-separator")||customElements.define("anduin-sidebar-separator",H5);function z(r){if(!r)return null;const e=/^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(r.trim());if(!e)return null;const[t,o,i]=[Number(e[1]),Number(e[2]),Number(e[3])],n=new Date(t,o-1,i);return n.getFullYear()!==t||n.getMonth()!==o-1||n.getDate()!==i?null:n}function m1(r){const e=t=>String(t).padStart(2,"0");return`${r.getFullYear()}-${e(r.getMonth()+1)}-${e(r.getDate())}`}function x1(){const r=new Date;return new Date(r.getFullYear(),r.getMonth(),r.getDate())}function s1(r,e){const t=r.getFullYear(),o=r.getMonth()+e,i=new Date(t,o+1,0).getDate();return new Date(t,o,Math.min(r.getDate(),i))}function j0(r,e){return new Date(r,e+1,0).getDate()}var K0=Object.defineProperty,n1=(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&&K0(e,t,i),i};const d2="anduin-calendar:change",y5="anduin-calendar:day-hover",o3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],n3=["January","February","March","April","May","June","July","August","September","October","November","December"],W0=["Su","Mo","Tu","We","Th","Fr","Sa"],r3=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function U1(r,e){return new Date(r.getFullYear(),r.getMonth(),r.getDate()+e)}function Y0(r){const e=["th","st","nd","rd"],t=r%100;return`${r}${e[(t-20)%10]??e[t]??e[0]}`}const Le=class Le extends u{constructor(){super(...arguments),this.value="",this.minDate="",this.maxDate="",this.rangeStart="",this.rangeEnd="",this.rangeMode=!1,this._viewMonth=x1().getMonth(),this._viewYear=x1().getFullYear(),this._focus="",this._openSelect=null,this._viewSeeded=!1,this._pendingFocus=!1,this._onOutsideClick=e=>{this._openSelect&&!e.composedPath().includes(this)&&(this._openSelect=null)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onOutsideClick)}willUpdate(e){if(e.has("value")){const t=z(this.value);if(t)this._viewYear=t.getFullYear(),this._viewMonth=t.getMonth(),this._viewSeeded=!0;else if(!this._viewSeeded){const o=x1();this._viewYear=o.getFullYear(),this._viewMonth=o.getMonth()}}}updated(){var t;if(!this._pendingFocus)return;this._pendingFocus=!1;const e=(t=this.shadowRoot)==null?void 0:t.querySelector('.calendar__day-button[tabindex="0"]');e==null||e.focus()}get _min(){return z(this.minDate)}get _max(){return z(this.maxDate)}_isDisabled(e){const t=this._min,o=this._max;return!!(t&&e.getTime()<t.getTime()||o&&e.getTime()>o.getTime())}_clamp(e){const t=this._min,o=this._max;return t&&e.getTime()<t.getTime()?t:o&&e.getTime()>o.getTime()?o:e}_shiftMonth(e){const t=s1(new Date(this._viewYear,this._viewMonth,1),e);this._viewYear=t.getFullYear(),this._viewMonth=t.getMonth(),this._viewSeeded=!0}_moveFocus(e,t){const o=this._clamp(t);this._isDisabled(o)||(this._focus=m1(o),(o.getMonth()!==e.getMonth()||o.getFullYear()!==e.getFullYear())&&(this._viewYear=o.getFullYear(),this._viewMonth=o.getMonth(),this._viewSeeded=!0),this._pendingFocus=!0)}_onGridKeyDown(e){const t=z(this._focus)??this._defaultFocusDate();switch(e.key){case"ArrowLeft":this._moveFocus(t,e.shiftKey?s1(t,-1):U1(t,-1));break;case"ArrowRight":this._moveFocus(t,e.shiftKey?s1(t,1):U1(t,1));break;case"ArrowUp":this._moveFocus(t,e.shiftKey?s1(t,-12):U1(t,-7));break;case"ArrowDown":this._moveFocus(t,e.shiftKey?s1(t,12):U1(t,7));break;case"Home":this._moveFocus(t,U1(t,-t.getDay()));break;case"End":this._moveFocus(t,U1(t,6-t.getDay()));break;case"PageUp":this._moveFocus(t,s1(t,e.shiftKey?-12:-1));break;case"PageDown":this._moveFocus(t,s1(t,e.shiftKey?12:1));break;case"Enter":case" ":this._isDisabled(t)||this._pick(t);break;default:return}e.preventDefault()}_pick(e){const t=m1(e);this.value=t,this._focus=t,this.dispatchEvent(new CustomEvent(d2,{detail:t,bubbles:!0,composed:!0}))}_emitHover(e){this.dispatchEvent(new CustomEvent(y5,{detail:e,bubbles:!0,composed:!0}))}_defaultFocusDate(){const e=z(this._focus);if(e&&e.getMonth()===this._viewMonth&&e.getFullYear()===this._viewYear)return e;const t=z(this.value);if(t&&t.getMonth()===this._viewMonth&&t.getFullYear()===this._viewYear)return t;const o=x1();return o.getMonth()===this._viewMonth&&o.getFullYear()===this._viewYear?o:this._clamp(new Date(this._viewYear,this._viewMonth,1))}get _yearOptions(){const e=this._min,t=this._max,o=e?e.getFullYear():this._viewYear-10,i=t?t.getFullYear():this._viewYear+10,n=Math.min(o,this._viewYear),l=Math.max(i,this._viewYear);return Array.from({length:l-n+1},(d,c)=>n+c)}_selectMonth(e){this._viewMonth=e,this._viewSeeded=!0,this._openSelect=null}_selectYear(e){this._viewYear=e,this._viewSeeded=!0,this._openSelect=null}_renderSelect(e,t,o,i,n){const l=this._openSelect===e;return a`
|
|
3385
3421
|
<div class="calendar__select">
|
|
3386
3422
|
<anduin-button
|
|
3387
3423
|
appearance="text"
|
|
@@ -3406,7 +3442,7 @@
|
|
|
3406
3442
|
</div>
|
|
3407
3443
|
`:h}
|
|
3408
3444
|
</div>
|
|
3409
|
-
`}render(){const e=m1(x1()),t=
|
|
3445
|
+
`}render(){const e=m1(x1()),t=z(this.value),o=z(this.rangeStart),i=z(this.rangeEnd),n=this.rangeMode||!!(o||i),l=m1(this._defaultFocusDate()),d=new Date(this._viewYear,this._viewMonth,1),c=new Date(this._viewYear,this._viewMonth+1,0).getDate(),C=d.getDay(),p=[...Array.from({length:C},()=>null),...Array.from({length:c},(_,v)=>v+1)];for(;p.length%7!==0;)p.push(null);const f=Array.from({length:p.length/7},(_,v)=>p.slice(v*7,v*7+7)),b=`${n3[this._viewMonth]} ${this._viewYear}`,m=(()=>{const _=this._min;return _?new Date(this._viewYear,this._viewMonth,0).getTime()<_.getTime():!1})(),V=(()=>{const _=this._max;return _?new Date(this._viewYear,this._viewMonth+1,1).getTime()>_.getTime():!1})();return a`
|
|
3410
3446
|
<div class="calendar" part="calendar">
|
|
3411
3447
|
<div class="calendar__header" part="header">
|
|
3412
3448
|
<anduin-button
|
|
@@ -3450,7 +3486,7 @@
|
|
|
3450
3486
|
<tbody>
|
|
3451
3487
|
${f.map(_=>a`
|
|
3452
3488
|
<tr>
|
|
3453
|
-
${_.map(v=>{if(v===null)return a`<td class="calendar__day-cell"></td>`;const
|
|
3489
|
+
${_.map(v=>{if(v===null)return a`<td class="calendar__day-cell"></td>`;const w=new Date(this._viewYear,this._viewMonth,v),Z=m1(w),D=w.getTime(),j=this._isDisabled(w),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",Z===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`
|
|
3454
3490
|
<td
|
|
3455
3491
|
class="${p7}"
|
|
3456
3492
|
role="gridcell"
|
|
@@ -3461,10 +3497,10 @@
|
|
|
3461
3497
|
class="${u7}"
|
|
3462
3498
|
part="day"
|
|
3463
3499
|
aria-disabled="${j}"
|
|
3464
|
-
aria-label="${r3[
|
|
3465
|
-
tabindex="${
|
|
3466
|
-
@click=${()=>{j||this._pick(
|
|
3467
|
-
@mouseenter=${()=>{j||this._emitHover(
|
|
3500
|
+
aria-label="${r3[w.getDay()]}, ${n3[w.getMonth()]} ${Y0(v)}, ${w.getFullYear()}"
|
|
3501
|
+
tabindex="${Z===l?0:-1}"
|
|
3502
|
+
@click=${()=>{j||this._pick(w)}}
|
|
3503
|
+
@mouseenter=${()=>{j||this._emitHover(Z)}}
|
|
3468
3504
|
>${v}</button>
|
|
3469
3505
|
</td>
|
|
3470
3506
|
`})}
|
|
@@ -3567,7 +3603,7 @@
|
|
|
3567
3603
|
.calendar__day-button--range-end:hover { background-color: var(--color-primary-5); }
|
|
3568
3604
|
.calendar__day-button--in-range { color: var(--color-primary-7, var(--color-primary-5)); }
|
|
3569
3605
|
.calendar__day-button--in-range:hover { background-color: var(--color-primary-2); }
|
|
3570
|
-
`;let T=Le;n1([s({reflect:!0})],T.prototype,"value");n1([s({attribute:"min-date"})],T.prototype,"minDate");n1([s({attribute:"max-date"})],T.prototype,"maxDate");n1([s({attribute:"range-start"})],T.prototype,"rangeStart");n1([s({attribute:"range-end"})],T.prototype,"rangeEnd");n1([s({type:Boolean,attribute:"range-mode"})],T.prototype,"rangeMode");n1([H()],T.prototype,"_viewMonth");n1([H()],T.prototype,"_viewYear");n1([H()],T.prototype,"_focus");n1([H()],T.prototype,"_openSelect");customElements.get("anduin-calendar")||customElements.define("anduin-calendar",T);var q0=Object.defineProperty,p2=(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&&q0(e,t,i),i};const Q3="anduin-date-range:change",Ve=class Ve extends u{constructor(){super(...arguments),this.startDate="",this.endDate="",this.minDate="",this.maxDate="",this._anchor=null,this._hover=null,this._panels=new Map,this._pushedValue=new Map,this._onCalendarChange=e=>{e.stopPropagation();const t=e.detail;if(!
|
|
3606
|
+
`;let T=Le;n1([s({reflect:!0})],T.prototype,"value");n1([s({attribute:"min-date"})],T.prototype,"minDate");n1([s({attribute:"max-date"})],T.prototype,"maxDate");n1([s({attribute:"range-start"})],T.prototype,"rangeStart");n1([s({attribute:"range-end"})],T.prototype,"rangeEnd");n1([s({type:Boolean,attribute:"range-mode"})],T.prototype,"rangeMode");n1([H()],T.prototype,"_viewMonth");n1([H()],T.prototype,"_viewYear");n1([H()],T.prototype,"_focus");n1([H()],T.prototype,"_openSelect");customElements.get("anduin-calendar")||customElements.define("anduin-calendar",T);var q0=Object.defineProperty,p2=(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&&q0(e,t,i),i};const Q3="anduin-date-range:change",Ve=class Ve extends u{constructor(){super(...arguments),this.startDate="",this.endDate="",this.minDate="",this.maxDate="",this._anchor=null,this._hover=null,this._panels=new Map,this._pushedValue=new Map,this._onCalendarChange=e=>{e.stopPropagation();const t=e.detail;if(!z(t))return;if(this._anchor===null){this._anchor=t,this._hover=null;return}const[o,i]=this._sorted(this._anchor,t);this._anchor=null,this._hover=null,this.startDate=o,this.endDate=i,this.dispatchEvent(new CustomEvent(Q3,{detail:{startDate:o,endDate:i},bubbles:!0,composed:!0}))},this._onCalendarHover=e=>{e.stopPropagation(),this._anchor!==null&&(this._hover=e.detail)}}connectedCallback(){super.connectedCallback(),this.addEventListener(d2,this._onCalendarChange),this.addEventListener(y5,this._onCalendarHover)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(d2,this._onCalendarChange),this.removeEventListener(y5,this._onCalendarHover)}updated(){this._sync()}registerPanel(e,t){this._panels.set(e,t),this._pushedValue.delete(e),this._sync()}unregisterPanel(e){for(const[t,o]of this._panels)o===e&&(this._panels.delete(t),this._pushedValue.delete(t))}_sync(){const[e,t]=this._displayedRange();for(const[o,i]of this._panels){const n=i.calendar;if(!n)continue;n.minDate=this.minDate,n.maxDate=this.maxDate,n.rangeStart=e,n.rangeEnd=t;const l=this._panelValue(o);this._pushedValue.get(o)!==l&&(this._pushedValue.set(o,l),n.value=l)}}_panelValue(e){const t=z(this.startDate)??x1();return m1(e==="start"?t:s1(t,1))}_displayedRange(){if(this._anchor===null)return[this.startDate,this.endDate];if(this._hover===null)return[this._anchor,""];const[e,t]=this._sorted(this._anchor,this._hover);return[e,t]}_sorted(e,t){const o=z(e),i=z(t);return!o||!i?[e,t]:o.getTime()<=i.getTime()?[e,t]:[t,e]}render(){return a`<div class="date-range" part="date-range"><slot></slot></div>`}};Ve.styles=g`
|
|
3571
3607
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
3572
3608
|
`;let X=Ve;p2([s({attribute:"start-date",reflect:!0})],X.prototype,"startDate");p2([s({attribute:"end-date",reflect:!0})],X.prototype,"endDate");p2([s({attribute:"min-date"})],X.prototype,"minDate");p2([s({attribute:"max-date"})],X.prototype,"maxDate");p2([H()],X.prototype,"_anchor");p2([H()],X.prototype,"_hover");const xe=class xe extends u{constructor(){super(...arguments),this._host=null}get calendar(){var e;return((e=this.shadowRoot)==null?void 0:e.querySelector("anduin-calendar"))??null}firstUpdated(){var e;this._host=this._findRangeHost(),(e=this._host)==null||e.registerPanel(this.panelRole,this)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._host)==null||e.unregisterPanel(this),this._host=null}_findRangeHost(){let e=this;for(;e;){if(e instanceof X)return e;e=e instanceof ShadowRoot?e.host:e.parentNode}return null}render(){return a`<anduin-calendar part="calendar" range-mode></anduin-calendar>`}};xe.styles=g`
|
|
3573
3609
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
@@ -3580,7 +3616,7 @@
|
|
|
3580
3616
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
3581
3617
|
|
|
3582
3618
|
.date-range-default { display: flex; flex-direction: row; gap: 16px; }
|
|
3583
|
-
`;let _5=Me;customElements.get("anduin-date-range")||customElements.define("anduin-date-range",X);customElements.get("anduin-date-range-default")||customElements.define("anduin-date-range-default",_5);customElements.get("anduin-date-range-start")||customElements.define("anduin-date-range-start",e7);customElements.get("anduin-date-range-end")||customElements.define("anduin-date-range-end",t7);var X0=Object.defineProperty,I=(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&&X0(e,t,i),i};const L5="anduin-date-input:change",l3={M:"month",d:"day",y:"year"};function J0(r){const e=[];let t=0,o=0;for(;o<r.length;){const i=r[o],n=l3[i];if(!n){let d="";for(;o<r.length&&!l3[r[o]];)d+=r[o++];e.push({literal:d}),t+=d.length;continue}let l="";for(;o<r.length&&r[o]===i;)l+=r[o++];e.push({segment:{type:n,placeholder:l,length:l.length,start:t}}),t+=l.length}return e}function B5(r){return r.type==="year"?10**r.length-1:r.length===1?9:r.type==="month"?12:31}const f2=1,M5=class M5 extends u{constructor(){super(...arguments),this.format="MM/dd/yyyy",this.value="",this.size="default",this.disabled=!1,this.readonly=!1,this.status="",this.startIcon="",this.minDate="",this.maxDate="",this.inputid="",this._digits=[],this._active=0,this._buffer="",this._pendingSelection=null,this._tokens=[],this._segments=[],this._onFieldLabelClick=e=>{const t=e.detail;this.inputid&&this.inputid===t&&this._focusSegment(0)}}connectedCallback(){super.connectedCallback();const e=this.closest("anduin-field");e==null||e.addEventListener(a1,this._onFieldLabelClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.closest("anduin-field"))==null||e.removeEventListener(a1,this._onFieldLabelClick)}willUpdate(e){e.has("format")?(this._tokens=J0(this.format),this._segments=this._tokens.flatMap(t=>"segment"in t?[t.segment]:[]),this._digits=this._segments.map(()=>null),this._active=0,this._buffer="",this.value&&this._adoptValue(this.value)):e.has("value")&&this.value!==this._composeValue()&&this._adoptValue(this.value)}updated(){const e=this._display();if(this._inputEl&&this._inputEl.value!==e&&(this._inputEl.value=e),this._pendingSelection&&this._inputEl){const[t,o]=this._pendingSelection;this._pendingSelection=null,this._inputEl.setSelectionRange(t,o)}}_adoptValue(e){const t=this._segments.map(o=>{const i=e.slice(o.start,o.start+o.length);return/^\d+$/.test(i)?i:null});this._digits=t,this._buffer=""}_display(){return this._tokens.map(e=>{if("literal"in e)return e.literal;const t=e.segment,o=this._segments.indexOf(t);return o===this._active&&this._buffer?this._buffer.padStart(t.length,"0"):this._digits[o]??t.placeholder}).join("")}_composeValue(){return!this._segments.length||this._digits.some(e=>e===null)?"":this._tokens.map(e=>"literal"in e?e.literal:this._digits[this._segments.indexOf(e.segment)]).join("")}_setDigits(e){if(this._digits=e,!this._composeValue()){this.value="";return}const o=this._clampToBounds(e);this._digits=o,this.value=this._composeValue(),this.dispatchEvent(new CustomEvent(L5,{detail:this.value,bubbles:!0,composed:!0}))}_indexOfType(e){return this._segments.findIndex(t=>t.type===e)}_clampToBounds(e){const t=
|
|
3619
|
+
`;let _5=Me;customElements.get("anduin-date-range")||customElements.define("anduin-date-range",X);customElements.get("anduin-date-range-default")||customElements.define("anduin-date-range-default",_5);customElements.get("anduin-date-range-start")||customElements.define("anduin-date-range-start",e7);customElements.get("anduin-date-range-end")||customElements.define("anduin-date-range-end",t7);var X0=Object.defineProperty,I=(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&&X0(e,t,i),i};const L5="anduin-date-input:change",l3={M:"month",d:"day",y:"year"};function J0(r){const e=[];let t=0,o=0;for(;o<r.length;){const i=r[o],n=l3[i];if(!n){let d="";for(;o<r.length&&!l3[r[o]];)d+=r[o++];e.push({literal:d}),t+=d.length;continue}let l="";for(;o<r.length&&r[o]===i;)l+=r[o++];e.push({segment:{type:n,placeholder:l,length:l.length,start:t}}),t+=l.length}return e}function B5(r){return r.type==="year"?10**r.length-1:r.length===1?9:r.type==="month"?12:31}const f2=1,M5=class M5 extends u{constructor(){super(...arguments),this.format="MM/dd/yyyy",this.value="",this.size="default",this.disabled=!1,this.readonly=!1,this.status="",this.startIcon="",this.minDate="",this.maxDate="",this.inputid="",this._digits=[],this._active=0,this._buffer="",this._pendingSelection=null,this._tokens=[],this._segments=[],this._onFieldLabelClick=e=>{const t=e.detail;this.inputid&&this.inputid===t&&this._focusSegment(0)}}connectedCallback(){super.connectedCallback();const e=this.closest("anduin-field");e==null||e.addEventListener(a1,this._onFieldLabelClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.closest("anduin-field"))==null||e.removeEventListener(a1,this._onFieldLabelClick)}willUpdate(e){e.has("format")?(this._tokens=J0(this.format),this._segments=this._tokens.flatMap(t=>"segment"in t?[t.segment]:[]),this._digits=this._segments.map(()=>null),this._active=0,this._buffer="",this.value&&this._adoptValue(this.value)):e.has("value")&&this.value!==this._composeValue()&&this._adoptValue(this.value)}updated(){const e=this._display();if(this._inputEl&&this._inputEl.value!==e&&(this._inputEl.value=e),this._pendingSelection&&this._inputEl){const[t,o]=this._pendingSelection;this._pendingSelection=null,this._inputEl.setSelectionRange(t,o)}}_adoptValue(e){const t=this._segments.map(o=>{const i=e.slice(o.start,o.start+o.length);return/^\d+$/.test(i)?i:null});this._digits=t,this._buffer=""}_display(){return this._tokens.map(e=>{if("literal"in e)return e.literal;const t=e.segment,o=this._segments.indexOf(t);return o===this._active&&this._buffer?this._buffer.padStart(t.length,"0"):this._digits[o]??t.placeholder}).join("")}_composeValue(){return!this._segments.length||this._digits.some(e=>e===null)?"":this._tokens.map(e=>"literal"in e?e.literal:this._digits[this._segments.indexOf(e.segment)]).join("")}_setDigits(e){if(this._digits=e,!this._composeValue()){this.value="";return}const o=this._clampToBounds(e);this._digits=o,this.value=this._composeValue(),this.dispatchEvent(new CustomEvent(L5,{detail:this.value,bubbles:!0,composed:!0}))}_indexOfType(e){return this._segments.findIndex(t=>t.type===e)}_clampToBounds(e){const t=z(this.minDate),o=z(this.maxDate);if(!t&&!o)return e;const i=this._indexOfType("month"),n=this._indexOfType("day"),l=this._indexOfType("year");if(i<0||n<0||l<0)return e;const d=Number(e[l]),c=Number(e[i]),C=Number(e[n]),p=Math.min(C,j0(d,c-1)),f=new Date(d,c-1,p),b=t&&f.getTime()<t.getTime()?t:o&&f.getTime()>o.getTime()?o:null;if(!b){if(p===C)return e;const V=[...e];return V[n]=String(p).padStart(this._segments[n].length,"0"),V}const m=[...e];return m[l]=String(b.getFullYear()).padStart(this._segments[l].length,"0").slice(-this._segments[l].length),m[i]=String(b.getMonth()+1).padStart(this._segments[i].length,"0"),m[n]=String(b.getDate()).padStart(this._segments[n].length,"0"),m}_focusSegment(e){var o,i;const t=this._segments[e];t&&(this._flushBuffer(),this._active=e,this._buffer="",this._pendingSelection=[t.start,t.start+t.length],(o=this._inputEl)==null||o.focus(),(i=this._inputEl)==null||i.setSelectionRange(t.start,t.start+t.length))}_segmentAt(e){for(let t=0;t<this._segments.length;t++){const o=this._segments[t];if(e>=o.start&&e<=o.start+o.length)return t}return this._segments.length-1}_onSelectionIntent(){if(this.disabled||this.readonly||!this._inputEl)return;const e=this._inputEl.selectionStart??0;this._focusSegment(this._segmentAt(e))}_writeSegment(e,t){const o=this._segments[e];if(!o)return;const i=Math.min(Math.max(Number(t),f2),B5(o)),n=[...this._digits];n[e]=String(i).padStart(o.length,"0"),this._buffer="",this._setDigits(n)}_flushBuffer(){this._buffer&&this._writeSegment(this._active,this._buffer)}_commitBuffer(e,t,o){this._writeSegment(e,t),o&&e<this._segments.length-1?this._focusSegment(e+1):this._focusSegment(e)}_typeDigit(e){const t=this._active,o=this._segments[t];if(!o)return;const i=this._buffer+e;if(o.length-i.length<=0){this._commitBuffer(t,i,!0);return}const l=Number(i.padEnd(o.length,"0")),d=Number(i.padEnd(o.length,"9"));if(l>B5(o)||d<f2){this._commitBuffer(t,i,!0);return}this._buffer=i,this._pendingSelection=[o.start,o.start+o.length]}_step(e){const t=this._active,o=this._segments[t];if(!o)return;const i=B5(o),n=this._digits[t];let l;n===null?l=e>0?f2:i:(l=Number(n)+e,l>i&&(l=f2),l<f2&&(l=i));const d=[...this._digits];d[t]=String(l).padStart(o.length,"0"),this._buffer="",this._setDigits(d),this._pendingSelection=[o.start,o.start+o.length]}_clearSegment(){const e=this._active,t=this._segments[e];if(!t)return;const o=[...this._digits];o[e]=null,this._buffer="",this._setDigits(o),this._pendingSelection=[t.start,t.start+t.length]}_onKeyDown(e){if(this.disabled||this.readonly)return;const t=this._segments.length-1;if(/^\d$/.test(e.key)&&!e.metaKey&&!e.ctrlKey&&!e.altKey){e.preventDefault(),this._typeDigit(e.key);return}switch(e.key){case"ArrowRight":this._active<t&&(e.preventDefault(),this._focusSegment(this._active+1));return;case"ArrowLeft":this._active>0&&(e.preventDefault(),this._focusSegment(this._active-1));return;case"ArrowUp":e.preventDefault(),this._step(1);return;case"ArrowDown":e.preventDefault(),this._step(-1);return;case"Backspace":case"Delete":e.preventDefault(),this._clearSegment();return;case"Tab":e.shiftKey&&this._active>0?(e.preventDefault(),this._focusSegment(this._active-1)):!e.shiftKey&&this._active<t&&(e.preventDefault(),this._focusSegment(this._active+1));return}}render(){const e=!!this.startIcon,t=["date-input-container",e?"date-input-container--has-icon":""].filter(Boolean).join(" "),o=["date-input",`date-input--${this.size}`,this.disabled?"date-input--disabled":"",this.readonly?"date-input--readonly":"",this.status?`date-input--${this.status}`:""].filter(Boolean).join(" "),i=this.size==="small"?"12":"16";return a`
|
|
3584
3620
|
<div class="${t}" part="container">
|
|
3585
3621
|
${e?a`<span class="date-input__icon" part="icon">
|
|
3586
3622
|
<anduin-icon name="${this.startIcon}" size="${i}"></anduin-icon>
|
|
@@ -3656,7 +3692,7 @@
|
|
|
3656
3692
|
.date-input--invalid { border-color: var(--color-danger-4); }
|
|
3657
3693
|
.date-input--warning { border-color: var(--color-warning-4); }
|
|
3658
3694
|
.date-input--loading { border-color: var(--color-gray-4); }
|
|
3659
|
-
`;let R=M5;I([s()],R.prototype,"format");I([s()],R.prototype,"value");I([s()],R.prototype,"size");I([s({type:Boolean})],R.prototype,"disabled");I([s({type:Boolean})],R.prototype,"readonly");I([s()],R.prototype,"status");I([s({attribute:"start-icon"})],R.prototype,"startIcon");I([s({attribute:"min-date"})],R.prototype,"minDate");I([s({attribute:"max-date"})],R.prototype,"maxDate");I([s()],R.prototype,"inputid");I([H()],R.prototype,"_digits");I([H()],R.prototype,"_active");I([H()],R.prototype,"_buffer");I([$("input")],R.prototype,"_inputEl");customElements.get("anduin-date-input")||customElements.define("anduin-date-input",R);var Q0=Object.defineProperty,F=(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&&Q0(e,t,i),i};const i7="anduin-date-picker:change",o7={M:"month",d:"day",y:"year"};function et(r,e){if(!r)return null;const t={};let o=0,i=0;for(;i<e.length;){const d=e[i],c=o7[d];if(!c){i++,o++;continue}let C=0;for(;i<e.length&&e[i]===d;)i++,C++;const p=r.slice(o,o+C);if(!/^\d+$/.test(p))return null;t[c]=p,o+=C}if(!t.month||!t.day||!t.year)return null;const n=Number(t.year),l=new Date(n,Number(t.month)-1,Number(t.day));return l.getMonth()!==Number(t.month)-1||l.getDate()!==Number(t.day)?null:l}function tt(r,e){const t={month:r.getMonth()+1,day:r.getDate(),year:r.getFullYear()};let o="",i=0;for(;i<e.length;){const n=e[i],l=o7[n];if(!l){o+=n,i++;continue}let d=0;for(;i<e.length&&e[i]===n;)i++,d++;o+=String(t[l]).padStart(d,"0").slice(-d)}return o}const we=class we extends u{constructor(){super(...arguments),this.format="MM/dd/yyyy",this.value="",this.size="default",this.disabled=!1,this.readonly=!1,this.status="",this.startIcon="",this.minDate="",this.maxDate="",this.placement="bottom-start",this.inputid="",this._open=!1,this._onPopoverOpenChange=e=>{e.stopPropagation(),this._open=e.detail},this._onInputChange=e=>{e.stopPropagation(),this._emit(e.detail)},this._onCalendarChange=e=>{e.stopPropagation();const t=
|
|
3695
|
+
`;let R=M5;I([s()],R.prototype,"format");I([s()],R.prototype,"value");I([s()],R.prototype,"size");I([s({type:Boolean})],R.prototype,"disabled");I([s({type:Boolean})],R.prototype,"readonly");I([s()],R.prototype,"status");I([s({attribute:"start-icon"})],R.prototype,"startIcon");I([s({attribute:"min-date"})],R.prototype,"minDate");I([s({attribute:"max-date"})],R.prototype,"maxDate");I([s()],R.prototype,"inputid");I([H()],R.prototype,"_digits");I([H()],R.prototype,"_active");I([H()],R.prototype,"_buffer");I([$("input")],R.prototype,"_inputEl");customElements.get("anduin-date-input")||customElements.define("anduin-date-input",R);var Q0=Object.defineProperty,F=(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&&Q0(e,t,i),i};const i7="anduin-date-picker:change",o7={M:"month",d:"day",y:"year"};function et(r,e){if(!r)return null;const t={};let o=0,i=0;for(;i<e.length;){const d=e[i],c=o7[d];if(!c){i++,o++;continue}let C=0;for(;i<e.length&&e[i]===d;)i++,C++;const p=r.slice(o,o+C);if(!/^\d+$/.test(p))return null;t[c]=p,o+=C}if(!t.month||!t.day||!t.year)return null;const n=Number(t.year),l=new Date(n,Number(t.month)-1,Number(t.day));return l.getMonth()!==Number(t.month)-1||l.getDate()!==Number(t.day)?null:l}function tt(r,e){const t={month:r.getMonth()+1,day:r.getDate(),year:r.getFullYear()};let o="",i=0;for(;i<e.length;){const n=e[i],l=o7[n];if(!l){o+=n,i++;continue}let d=0;for(;i<e.length&&e[i]===n;)i++,d++;o+=String(t[l]).padStart(d,"0").slice(-d)}return o}const we=class we extends u{constructor(){super(...arguments),this.format="MM/dd/yyyy",this.value="",this.size="default",this.disabled=!1,this.readonly=!1,this.status="",this.startIcon="",this.minDate="",this.maxDate="",this.placement="bottom-start",this.inputid="",this._open=!1,this._onPopoverOpenChange=e=>{e.stopPropagation(),this._open=e.detail},this._onInputChange=e=>{e.stopPropagation(),this._emit(e.detail)},this._onCalendarChange=e=>{e.stopPropagation();const t=z(e.detail);t&&(this._emit(tt(t,this.format)),this._closePopover())},this._onKeyDown=e=>{var t;e.key==="Escape"&&this._open&&(e.stopPropagation(),this._closePopover(),(t=this._inputEl)==null||t.focus())},this._onTriggerClick=e=>{(this.disabled||this.readonly)&&e.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener(L5,this._onInputChange),this.addEventListener(d2,this._onCalendarChange),this.addEventListener(t5,this._onPopoverOpenChange),this.addEventListener("keydown",this._onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(L5,this._onInputChange),this.removeEventListener(d2,this._onCalendarChange),this.removeEventListener(t5,this._onPopoverOpenChange),this.removeEventListener("keydown",this._onKeyDown)}_closePopover(){this._popoverEl&&(this._popoverEl.open=!1),this._open=!1}get _date(){return et(this.value,this.format)}get _isoValue(){const e=this._date;return e?m1(e):""}_emit(e){this.value=e,this.dispatchEvent(new CustomEvent(i7,{detail:e,bubbles:!0,composed:!0}))}render(){return a`
|
|
3660
3696
|
<div class="datepicker" part="datepicker">
|
|
3661
3697
|
<anduin-popover full-width placement=${this.placement}>
|
|
3662
3698
|
<anduin-date-input
|
|
@@ -3709,7 +3745,7 @@
|
|
|
3709
3745
|
@dblclick=${v=>this.onResizeReset(v,e,t)}
|
|
3710
3746
|
@click=${v=>v.stopPropagation()}
|
|
3711
3747
|
></span>
|
|
3712
|
-
`:h;if(l1(e)){const v=this.renderSelectableRows,
|
|
3748
|
+
`:h;if(l1(e)){const v=this.renderSelectableRows,w=this.renderSelectedKeys,Z=v.filter(r1=>w.has(r1.key)).length,D=v.length>0&&Z===v.length,j=Z>0&&!D,u2=e.renderHeader?e.renderHeader({areAllRowsSelected:D,hasSelectedRow:Z>0,onChange:r1=>this.toggleAllRows(r1)}):a`
|
|
3713
3749
|
<anduin-checkbox
|
|
3714
3750
|
.checked=${D}
|
|
3715
3751
|
.indeterminate=${j}
|
|
@@ -3742,12 +3778,12 @@
|
|
|
3742
3778
|
@click=${()=>this.onHeaderClick(e)}
|
|
3743
3779
|
@keydown=${v=>{e.isSortable&&(v.key!=="Enter"&&v.key!==" "||(v.preventDefault(),this.onHeaderClick(e)))}}
|
|
3744
3780
|
><div class="${C}">${V}${_}</div>${f}</th>
|
|
3745
|
-
`}renderCell(e,t,o,i){const n=this.frozenSides,l=n[i],d=l==="left"?n[i+1]!=="left":l==="right"?n[i-1]!=="right":!1,c=["table__cell",this.alignClass(o),l?"table__cell--frozen":"",l&&d?`table__cell--frozen-${l}-edge`:"",l1(o)?"table__cell--selection":"",o.showOnRowHover?"table__cell--hover-only":"",this.sizingClass(o,i)].filter(Boolean).join(" "),C=this.cellStyle(o,i);if(l1(o)){const V=this.renderSelectedKeys.has(e.key),_=this.rowIsDisabled(e.data),v=
|
|
3781
|
+
`}renderCell(e,t,o,i){const n=this.frozenSides,l=n[i],d=l==="left"?n[i+1]!=="left":l==="right"?n[i-1]!=="right":!1,c=["table__cell",this.alignClass(o),l?"table__cell--frozen":"",l&&d?`table__cell--frozen-${l}-edge`:"",l1(o)?"table__cell--selection":"",o.showOnRowHover?"table__cell--hover-only":"",this.sizingClass(o,i)].filter(Boolean).join(" "),C=this.cellStyle(o,i);if(l1(o)){const V=this.renderSelectedKeys.has(e.key),_=this.rowIsDisabled(e.data),v=Z=>this.setRowSelected(e,Z),w=o.renderCell?o.renderCell({data:e.data,isChecked:V,isDisabled:_,onChange:v}):a`
|
|
3746
3782
|
<anduin-checkbox
|
|
3747
3783
|
.checked=${V}
|
|
3748
3784
|
.disabled=${_}
|
|
3749
3785
|
aria-label="${V?"Deselect row":"Select row"}"
|
|
3750
|
-
@anduin-checkbox:change=${
|
|
3786
|
+
@anduin-checkbox:change=${Z=>{Z.stopPropagation(),v(!V)}}
|
|
3751
3787
|
></anduin-checkbox>
|
|
3752
3788
|
`;return a`
|
|
3753
3789
|
<td
|
|
@@ -3755,8 +3791,8 @@
|
|
|
3755
3791
|
part="cell"
|
|
3756
3792
|
data-col="${i}"
|
|
3757
3793
|
style="${C}"
|
|
3758
|
-
@click=${
|
|
3759
|
-
>${
|
|
3794
|
+
@click=${Z=>Z.stopPropagation()}
|
|
3795
|
+
>${w}</td>
|
|
3760
3796
|
`}const p=f1(e.data,o.field),f=o.renderCell?o.renderCell({data:e.data,value:p,rowIndex:t,column:o}):p==null?h:String(p),m=this.dataTree&&i===this.firstDataColumnIndex?a`
|
|
3761
3797
|
<div class="table__tree-cell" style="padding-left:${e.depth*this.treeChildIndent}px">
|
|
3762
3798
|
${e.hasChildren?a`
|
|
@@ -4216,4 +4252,4 @@
|
|
|
4216
4252
|
background-color: oklch(from var(--color-gray-0) l c h / 0.6);
|
|
4217
4253
|
cursor: progress;
|
|
4218
4254
|
}
|
|
4219
|
-
`;let y=Ze;L([s({attribute:!1})],y.prototype,"columns");L([s({attribute:!1})],y.prototype,"data");L([s({reflect:!0})],y.prototype,"layout");L([s({attribute:"render-mode",reflect:!0})],y.prototype,"renderMode");L([s({type:Number,attribute:"row-height"})],y.prototype,"rowHeight");L([s()],y.prototype,"height");L([s({attribute:"max-height"})],y.prototype,"maxHeight");L([s({attribute:"min-height"})],y.prototype,"minHeight");L([s({attribute:"resizable-columns",converter:r=>r!=="false"})],y.prototype,"resizableColumns");L([s({type:Boolean,attribute:"hide-header",reflect:!0})],y.prototype,"hideHeader");L([s({type:Boolean,reflect:!0})],y.prototype,"loading");L([s({reflect:!0})],y.prototype,"selectable");L([s({attribute:"index-column"})],y.prototype,"indexColumn");L([s({attribute:"column-align"})],y.prototype,"columnAlign");L([s({attribute:"column-vertical-align"})],y.prototype,"columnVerticalAlign");L([s({attribute:"sort-field"})],y.prototype,"sortField");L([s({attribute:"sort-direction"})],y.prototype,"sortDirection");L([s({type:Boolean,attribute:"data-tree",reflect:!0})],y.prototype,"dataTree");L([s({attribute:"tree-children-field"})],y.prototype,"treeChildrenField");L([s({type:Number,attribute:"tree-child-indent"})],y.prototype,"treeChildIndent");L([s({attribute:"group-by"})],y.prototype,"groupBy");L([s({attribute:!1})],y.prototype,"selectedRows");L([s({attribute:!1})],y.prototype,"isRowDisabled");L([s({attribute:!1})],y.prototype,"onStartExpanded");L([s({attribute:!1})],y.prototype,"rowClass");L([s({attribute:!1})],y.prototype,"renderGroupHeader");L([H()],y.prototype,"expandedKeys");L([H()],y.prototype,"collapsedGroups");L([H()],y.prototype,"virtualScrollTop");L([H()],y.prototype,"viewportHeight");L([H()],y.prototype,"scrolledX");L([H()],y.prototype,"scrollableXEnd");L([H()],y.prototype,"resizedWidths");L([H()],y.prototype,"resizingKey");customElements.get("anduin-table")||customElements.define("anduin-table",y);exports.AnduinAiSpinner=E1;exports.AnduinAvatar=q;exports.AnduinBadge=M2;exports.AnduinBadgeCount=Q1;exports.AnduinButton=k;exports.AnduinCalendar=T;exports.AnduinCallout=w2;exports.AnduinCheckbox=d1;exports.AnduinDateInput=R;exports.AnduinDatePicker=E;exports.AnduinDateRange=X;exports.AnduinDateRangeDefault=_5;exports.AnduinDateRangeEnd=t7;exports.AnduinDateRangePanel=D2;exports.AnduinDateRangeStart=e7;exports.AnduinDivider=e2;exports.AnduinDot=Z2;exports.AnduinDrawer=N;exports.AnduinDrawerClose=N3;exports.AnduinDropdown=
|
|
4255
|
+
`;let y=Ze;L([s({attribute:!1})],y.prototype,"columns");L([s({attribute:!1})],y.prototype,"data");L([s({reflect:!0})],y.prototype,"layout");L([s({attribute:"render-mode",reflect:!0})],y.prototype,"renderMode");L([s({type:Number,attribute:"row-height"})],y.prototype,"rowHeight");L([s()],y.prototype,"height");L([s({attribute:"max-height"})],y.prototype,"maxHeight");L([s({attribute:"min-height"})],y.prototype,"minHeight");L([s({attribute:"resizable-columns",converter:r=>r!=="false"})],y.prototype,"resizableColumns");L([s({type:Boolean,attribute:"hide-header",reflect:!0})],y.prototype,"hideHeader");L([s({type:Boolean,reflect:!0})],y.prototype,"loading");L([s({reflect:!0})],y.prototype,"selectable");L([s({attribute:"index-column"})],y.prototype,"indexColumn");L([s({attribute:"column-align"})],y.prototype,"columnAlign");L([s({attribute:"column-vertical-align"})],y.prototype,"columnVerticalAlign");L([s({attribute:"sort-field"})],y.prototype,"sortField");L([s({attribute:"sort-direction"})],y.prototype,"sortDirection");L([s({type:Boolean,attribute:"data-tree",reflect:!0})],y.prototype,"dataTree");L([s({attribute:"tree-children-field"})],y.prototype,"treeChildrenField");L([s({type:Number,attribute:"tree-child-indent"})],y.prototype,"treeChildIndent");L([s({attribute:"group-by"})],y.prototype,"groupBy");L([s({attribute:!1})],y.prototype,"selectedRows");L([s({attribute:!1})],y.prototype,"isRowDisabled");L([s({attribute:!1})],y.prototype,"onStartExpanded");L([s({attribute:!1})],y.prototype,"rowClass");L([s({attribute:!1})],y.prototype,"renderGroupHeader");L([H()],y.prototype,"expandedKeys");L([H()],y.prototype,"collapsedGroups");L([H()],y.prototype,"virtualScrollTop");L([H()],y.prototype,"viewportHeight");L([H()],y.prototype,"scrolledX");L([H()],y.prototype,"scrollableXEnd");L([H()],y.prototype,"resizedWidths");L([H()],y.prototype,"resizingKey");customElements.get("anduin-table")||customElements.define("anduin-table",y);exports.AnduinAiSpinner=E1;exports.AnduinAvatar=q;exports.AnduinBadge=M2;exports.AnduinBadgeCount=Q1;exports.AnduinButton=k;exports.AnduinCalendar=T;exports.AnduinCallout=w2;exports.AnduinCheckbox=d1;exports.AnduinDateInput=R;exports.AnduinDatePicker=E;exports.AnduinDateRange=X;exports.AnduinDateRangeDefault=_5;exports.AnduinDateRangeEnd=t7;exports.AnduinDateRangePanel=D2;exports.AnduinDateRangeStart=e7;exports.AnduinDivider=e2;exports.AnduinDot=Z2;exports.AnduinDrawer=N;exports.AnduinDrawerClose=N3;exports.AnduinDropdown=x;exports.AnduinField=R2;exports.AnduinFieldDescription=j2;exports.AnduinFieldError=K2;exports.AnduinFieldGroup=W2;exports.AnduinFieldLabel=i2;exports.AnduinFileIcon=l2;exports.AnduinIcon=J1;exports.AnduinInput=P;exports.AnduinLoadingState=k2;exports.AnduinMenu=y1;exports.AnduinMenuItem=S1;exports.AnduinModal=z3;exports.AnduinModalClose=D3;exports.AnduinNavigation=C1;exports.AnduinNavigationItem=o1;exports.AnduinPagination=p1;exports.AnduinPaginationFirstPage=q3;exports.AnduinPaginationLastPage=X3;exports.AnduinPopover=Y;exports.AnduinPopoverClose=i5;exports.AnduinProgress=t2;exports.AnduinRadio=i1;exports.AnduinRadioGroup=z1;exports.AnduinResizableHandle=P1;exports.AnduinResizablePanel=D1;exports.AnduinResizablePanelGroup=$2;exports.AnduinSidebar=u5;exports.AnduinSidebarAction=m5;exports.AnduinSidebarBadge=b5;exports.AnduinSidebarContent=h5;exports.AnduinSidebarFooter=z2;exports.AnduinSidebarGroup=g5;exports.AnduinSidebarGroupLabel=f5;exports.AnduinSidebarHeader=S2;exports.AnduinSidebarMenu=v5;exports.AnduinSidebarMenuItem=u1;exports.AnduinSidebarSeparator=H5;exports.AnduinSkeleton=e1;exports.AnduinSparkleSpinner=X1;exports.AnduinSpinner=q1;exports.AnduinSuggestion=M;exports.AnduinSwitcher=a2;exports.AnduinTabContent=n2;exports.AnduinTabTrigger=t1;exports.AnduinTable=y;exports.AnduinTabs=$1;exports.AnduinTabsList=o2;exports.AnduinTag=A1;exports.AnduinTagClose=Y2;exports.AnduinTextarea=U;exports.AnduinTimeline=s5;exports.AnduinTimelineDate=d5;exports.AnduinTimelineGroup=C5;exports.AnduinTimelineItem=a5;exports.AnduinTimelineLabel=p5;exports.AnduinTimelineTitle=c5;exports.AnduinToast=c1;exports.AnduinToaster=s2;exports.AnduinToggleGroup=K;exports.AnduinToggleGroupItem=W;exports.AnduinTooltip=r2;exports.AnduinTooltipContent=J2;exports.AnduinTooltipTrigger=X2;exports.AnduinWell=E2;exports.AnduinWellClose=Q2;exports.BADGE_STYLES=q5;exports.CALENDAR_CHANGE=d2;exports.CALENDAR_DAY_HOVER=y5;exports.CHECKBOX_CHANGE=L3;exports.DATE_INPUT_CHANGE=L5;exports.DATE_PICKER_CHANGE=i7;exports.DATE_RANGE_CHANGE=Q3;exports.DRAWER_AFTER_CLOSE_EVENT=F2;exports.DRAWER_CLOSE_EVENT=W1;exports.DROPDOWN_CHANGE=N5;exports.FIELD_LABEL_CLICK=Q5;exports.FIELD_LABEL_CLICK_COORDINATED=a1;exports.FILE_ICONS=B3;exports.INPUT_CHANGE=T5;exports.INPUT_CLEAR=V3;exports.MENU_ITEM_CLICK=o5;exports.MODAL_AFTER_CLOSE_EVENT=I2;exports.MODAL_CLOSE_EVENT=K1;exports.NAVIGATION_CHANGE=j3;exports.NAVIGATION_ITEM_CLICK=r5;exports.PAGINATION_CHANGE=Y3;exports.PAGINATION_JUMP=l5;exports.POPOVER_CLOSE=e5;exports.POPOVER_OPEN_CHANGE=t5;exports.RADIO_CHANGE=n5;exports.RADIO_GROUP_CHANGE=P3;exports.RESIZE_EVENT=K3;exports.SIDEBAR_SELECT=J3;exports.SUGGESTION_CHANGE=N2;exports.SUGGESTION_CLEAR=U3;exports.SUGGESTION_SELECT=G3;exports.SWITCHER_CHANGE=F3;exports.TABLE_CELL_CONTEXT_MENU=a7;exports.TABLE_COLUMN_CLICK=r7;exports.TABLE_COLUMN_RESIZE=G5;exports.TABLE_GROUP_TOGGLE=C7;exports.TABLE_ROW_CLICK=l7;exports.TABLE_ROW_COLLAPSE=c7;exports.TABLE_ROW_EXPAND=d7;exports.TABLE_SELECTION_CHANGE=s7;exports.TABLE_SORT=n7;exports.TAB_CHANGE=M3;exports.TAB_TRIGGER_CLICK=e4;exports.TAB_VALUE_CHANGED=T2;exports.TAG_CLOSE_CLICK=w3;exports.TEXTAREA_CHANGE=x3;exports.TOGGLE_GROUP_CHANGE=Z3;exports.TOGGLE_GROUP_ITEM_CHANGE=k3;exports.TOGGLE_GROUP_ITEM_CLICK=q2;exports.TOGGLE_GROUP_ITEM_DESELECT=E3;exports.TOGGLE_GROUP_ITEM_SELECT=R3;exports.TOOLTIP_CONTENT_POPUP_MOUNTED=n4;exports.TOOLTIP_CONTENT_POPUP_UNMOUNTED=r4;exports.TOOLTIP_HIDE=Z5;exports.TOOLTIP_SHOW=i4;exports.TOOLTIP_TRIGGER_MOUNTED=o4;exports.TOOLTIP_VISIBILITY_CHANGED=l4;exports.WELL_CLOSE_CLICK=A3;exports.addMonths=s1;exports.formatISODate=m1;exports.getBadgeVariantClass=X5;exports.parseISODate=z;exports.resolveFileIcon=T3;exports.startOfToday=x1;exports.toast=S0;
|
package/dist/react.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),a=require("@lit/react"),e=require("./anduin-table-Brto8nKz.cjs"),t=a.createComponent({react:n,tagName:"anduin-spinner",elementClass:e.AnduinSpinner}),o=a.createComponent({react:n,tagName:"anduin-sparkle-spinner",elementClass:e.AnduinSparkleSpinner}),i=a.createComponent({react:n,tagName:"anduin-ai-spinner",elementClass:e.AnduinAiSpinner}),r=a.createComponent({react:n,tagName:"anduin-icon",elementClass:e.AnduinIcon}),C=a.createComponent({react:n,tagName:"anduin-badge",elementClass:e.AnduinBadge}),s=a.createComponent({react:n,tagName:"anduin-badge-count",elementClass:e.AnduinBadgeCount}),l=a.createComponent({react:n,tagName:"anduin-button",elementClass:e.AnduinButton}),c=a.createComponent({react:n,tagName:"anduin-callout",elementClass:e.AnduinCallout}),d=a.createComponent({react:n,tagName:"anduin-divider",elementClass:e.AnduinDivider}),m=a.createComponent({react:n,tagName:"anduin-dot",elementClass:e.AnduinDot}),E=a.createComponent({react:n,tagName:"anduin-progress",elementClass:e.AnduinProgress}),A=a.createComponent({react:n,tagName:"anduin-skeleton",elementClass:e.AnduinSkeleton}),u=a.createComponent({react:n,tagName:"anduin-loading-state",elementClass:e.AnduinLoadingState}),g=a.createComponent({react:n,tagName:"anduin-field",elementClass:e.AnduinField}),N=a.createComponent({react:n,tagName:"anduin-field-label",elementClass:e.AnduinFieldLabel}),T=a.createComponent({react:n,tagName:"anduin-field-description",elementClass:e.AnduinFieldDescription}),_=a.createComponent({react:n,tagName:"anduin-field-error",elementClass:e.AnduinFieldError}),p=a.createComponent({react:n,tagName:"anduin-field-group",elementClass:e.AnduinFieldGroup}),G=a.createComponent({react:n,tagName:"anduin-radio",elementClass:e.AnduinRadio,events:{onChange:e.RADIO_CHANGE}}),L=a.createComponent({react:n,tagName:"anduin-radio-group",elementClass:e.AnduinRadioGroup,events:{onChange:e.RADIO_GROUP_CHANGE}}),S=a.createComponent({react:n,tagName:"anduin-checkbox",elementClass:e.AnduinCheckbox,events:{onChange:e.CHECKBOX_CHANGE}}),O=a.createComponent({react:n,tagName:"anduin-input",elementClass:e.AnduinInput,events:{onChange:e.INPUT_CHANGE,onClear:e.INPUT_CLEAR}}),R=a.createComponent({react:n,tagName:"anduin-textarea",elementClass:e.AnduinTextarea,events:{onChange:e.TEXTAREA_CHANGE}}),I=a.createComponent({react:n,tagName:"anduin-popover",elementClass:e.AnduinPopover,events:{onOpenChange:e.POPOVER_OPEN_CHANGE}}),b=a.createComponent({react:n,tagName:"anduin-popover-close",elementClass:e.AnduinPopoverClose}),D=a.createComponent({react:n,tagName:"anduin-menu",elementClass:e.AnduinMenu}),P=a.createComponent({react:n,tagName:"anduin-menu-item",elementClass:e.AnduinMenuItem}),H=a.createComponent({react:n,tagName:"anduin-modal",elementClass:e.AnduinModal,events:{onClose:e.MODAL_CLOSE_EVENT,onAfterClose:e.MODAL_AFTER_CLOSE_EVENT}}),v=a.createComponent({react:n,tagName:"anduin-modal-close",elementClass:e.AnduinModalClose}),B=a.createComponent({react:n,tagName:"anduin-tabs",elementClass:e.AnduinTabs,events:{onChange:e.TAB_CHANGE}}),M=a.createComponent({react:n,tagName:"anduin-tabs-list",elementClass:e.AnduinTabsList}),U=a.createComponent({react:n,tagName:"anduin-tab-trigger",elementClass:e.AnduinTabTrigger}),F=a.createComponent({react:n,tagName:"anduin-tab-content",elementClass:e.AnduinTabContent}),W=a.createComponent({react:n,tagName:"anduin-tag",elementClass:e.AnduinTag}),h=a.createComponent({react:n,tagName:"anduin-tag-close",elementClass:e.AnduinTagClose,events:{onClick:e.TAG_CLOSE_CLICK}}),V=a.createComponent({react:n,tagName:"anduin-toggle-group",elementClass:e.AnduinToggleGroup,events:{onChange:e.TOGGLE_GROUP_CHANGE}}),w=a.createComponent({react:n,tagName:"anduin-toggle-group-item",elementClass:e.AnduinToggleGroupItem,events:{onChange:e.TOGGLE_GROUP_ITEM_CHANGE,onSelect:e.TOGGLE_GROUP_ITEM_SELECT,onDeselect:e.TOGGLE_GROUP_ITEM_DESELECT}}),k=a.createComponent({react:n,tagName:"anduin-tooltip",elementClass:e.AnduinTooltip}),K=a.createComponent({react:n,tagName:"anduin-tooltip-trigger",elementClass:e.AnduinTooltipTrigger}),f=a.createComponent({react:n,tagName:"anduin-tooltip-content",elementClass:e.AnduinTooltipContent}),z=a.createComponent({react:n,tagName:"anduin-well",elementClass:e.AnduinWell}),X=a.createComponent({react:n,tagName:"anduin-well-close",elementClass:e.AnduinWellClose,events:{onClick:e.WELL_CLOSE_CLICK}}),x=a.createComponent({react:n,tagName:"anduin-avatar",elementClass:e.AnduinAvatar}),Z=a.createComponent({react:n,tagName:"anduin-file-icon",elementClass:e.AnduinFileIcon}),q=a.createComponent({react:n,tagName:"anduin-toast",elementClass:e.AnduinToast}),y=a.createComponent({react:n,tagName:"anduin-toaster",elementClass:e.AnduinToaster}),j=a.createComponent({react:n,tagName:"anduin-dropdown",elementClass:e.AnduinDropdown,events:{onChange:e.DROPDOWN_CHANGE}}),J=a.createComponent({react:n,tagName:"anduin-drawer",elementClass:e.AnduinDrawer,events:{onClose:e.DRAWER_CLOSE_EVENT,onAfterClose:e.DRAWER_AFTER_CLOSE_EVENT}}),Q=a.createComponent({react:n,tagName:"anduin-drawer-close",elementClass:e.AnduinDrawerClose}),Y=a.createComponent({react:n,tagName:"anduin-switcher",elementClass:e.AnduinSwitcher,events:{onChange:e.SWITCHER_CHANGE}}),$=a.createComponent({react:n,tagName:"anduin-suggestion",elementClass:e.AnduinSuggestion,events:{onChange:e.SUGGESTION_CHANGE,onSelect:e.SUGGESTION_SELECT,onClear:e.SUGGESTION_CLEAR}}),ee=a.createComponent({react:n,tagName:"anduin-navigation",elementClass:e.AnduinNavigation,events:{onChange:e.NAVIGATION_CHANGE}}),ne=a.createComponent({react:n,tagName:"anduin-navigation-item",elementClass:e.AnduinNavigationItem}),ae=a.createComponent({react:n,tagName:"anduin-resizable-panel-group",elementClass:e.AnduinResizablePanelGroup}),te=a.createComponent({react:n,tagName:"anduin-resizable-panel",elementClass:e.AnduinResizablePanel}),oe=a.createComponent({react:n,tagName:"anduin-resizable-handle",elementClass:e.AnduinResizableHandle,events:{onResize:e.RESIZE_EVENT}}),ie=a.createComponent({react:n,tagName:"anduin-pagination",elementClass:e.AnduinPagination,events:{onValueChange:e.PAGINATION_CHANGE}}),re=a.createComponent({react:n,tagName:"anduin-pagination-first-page",elementClass:e.AnduinPaginationFirstPage}),Ce=a.createComponent({react:n,tagName:"anduin-pagination-last-page",elementClass:e.AnduinPaginationLastPage}),se=a.createComponent({react:n,tagName:"anduin-sidebar",elementClass:e.AnduinSidebar}),le=a.createComponent({react:n,tagName:"anduin-sidebar-content",elementClass:e.AnduinSidebarContent}),ce=a.createComponent({react:n,tagName:"anduin-sidebar-header",elementClass:e.AnduinSidebarHeader}),de=a.createComponent({react:n,tagName:"anduin-sidebar-footer",elementClass:e.AnduinSidebarFooter}),me=a.createComponent({react:n,tagName:"anduin-sidebar-group",elementClass:e.AnduinSidebarGroup}),Ee=a.createComponent({react:n,tagName:"anduin-sidebar-group-label",elementClass:e.AnduinSidebarGroupLabel}),Ae=a.createComponent({react:n,tagName:"anduin-sidebar-menu",elementClass:e.AnduinSidebarMenu}),ue=a.createComponent({react:n,tagName:"anduin-sidebar-menu-item",elementClass:e.AnduinSidebarMenuItem,events:{onSelect:e.SIDEBAR_SELECT}}),ge=a.createComponent({react:n,tagName:"anduin-sidebar-action",elementClass:e.AnduinSidebarAction}),Ne=a.createComponent({react:n,tagName:"anduin-sidebar-badge",elementClass:e.AnduinSidebarBadge}),Te=a.createComponent({react:n,tagName:"anduin-sidebar-separator",elementClass:e.AnduinSidebarSeparator}),_e=a.createComponent({react:n,tagName:"anduin-timeline",elementClass:e.AnduinTimeline}),pe=a.createComponent({react:n,tagName:"anduin-timeline-item",elementClass:e.AnduinTimelineItem}),Ge=a.createComponent({react:n,tagName:"anduin-timeline-date",elementClass:e.AnduinTimelineDate}),Le=a.createComponent({react:n,tagName:"anduin-timeline-title",elementClass:e.AnduinTimelineTitle}),Se=a.createComponent({react:n,tagName:"anduin-timeline-group",elementClass:e.AnduinTimelineGroup}),Oe=a.createComponent({react:n,tagName:"anduin-timeline-label",elementClass:e.AnduinTimelineLabel}),Re=a.createComponent({react:n,tagName:"anduin-calendar",elementClass:e.AnduinCalendar,events:{onValueChange:e.CALENDAR_CHANGE}}),Ie=a.createComponent({react:n,tagName:"anduin-date-range",elementClass:e.AnduinDateRange,events:{onChange:e.DATE_RANGE_CHANGE}}),be=a.createComponent({react:n,tagName:"anduin-date-range-default",elementClass:e.AnduinDateRangeDefault}),De=a.createComponent({react:n,tagName:"anduin-date-range-start",elementClass:e.AnduinDateRangeStart}),Pe=a.createComponent({react:n,tagName:"anduin-date-range-end",elementClass:e.AnduinDateRangeEnd}),He=a.createComponent({react:n,tagName:"anduin-date-input",elementClass:e.AnduinDateInput,events:{onValueChange:e.DATE_INPUT_CHANGE}}),ve=a.createComponent({react:n,tagName:"anduin-date-picker",elementClass:e.AnduinDatePicker,events:{onValueChange:e.DATE_PICKER_CHANGE}}),Be=a.createComponent({react:n,tagName:"anduin-table",elementClass:e.AnduinTable,events:{onSort:e.TABLE_SORT,onColumnClick:e.TABLE_COLUMN_CLICK,onRowClick:e.TABLE_ROW_CLICK,onSelectionChange:e.TABLE_SELECTION_CHANGE,onCellContextMenu:e.TABLE_CELL_CONTEXT_MENU,onRowExpand:e.TABLE_ROW_EXPAND,onRowCollapse:e.TABLE_ROW_COLLAPSE,onGroupToggle:e.TABLE_GROUP_TOGGLE,onColumnResize:e.TABLE_COLUMN_RESIZE}});exports.CALENDAR_CHANGE=e.CALENDAR_CHANGE;exports.CHECKBOX_CHANGE=e.CHECKBOX_CHANGE;exports.DATE_INPUT_CHANGE=e.DATE_INPUT_CHANGE;exports.DATE_PICKER_CHANGE=e.DATE_PICKER_CHANGE;exports.DATE_RANGE_CHANGE=e.DATE_RANGE_CHANGE;exports.DRAWER_AFTER_CLOSE_EVENT=e.DRAWER_AFTER_CLOSE_EVENT;exports.DRAWER_CLOSE_EVENT=e.DRAWER_CLOSE_EVENT;exports.DROPDOWN_CHANGE=e.DROPDOWN_CHANGE;exports.INPUT_CHANGE=e.INPUT_CHANGE;exports.INPUT_CLEAR=e.INPUT_CLEAR;exports.MENU_ITEM_CLICK=e.MENU_ITEM_CLICK;exports.MODAL_AFTER_CLOSE_EVENT=e.MODAL_AFTER_CLOSE_EVENT;exports.MODAL_CLOSE_EVENT=e.MODAL_CLOSE_EVENT;exports.NAVIGATION_CHANGE=e.NAVIGATION_CHANGE;exports.PAGINATION_CHANGE=e.PAGINATION_CHANGE;exports.POPOVER_OPEN_CHANGE=e.POPOVER_OPEN_CHANGE;exports.RADIO_CHANGE=e.RADIO_CHANGE;exports.RADIO_GROUP_CHANGE=e.RADIO_GROUP_CHANGE;exports.RESIZE_EVENT=e.RESIZE_EVENT;exports.SIDEBAR_SELECT=e.SIDEBAR_SELECT;exports.SUGGESTION_CHANGE=e.SUGGESTION_CHANGE;exports.SUGGESTION_CLEAR=e.SUGGESTION_CLEAR;exports.SUGGESTION_SELECT=e.SUGGESTION_SELECT;exports.SWITCHER_CHANGE=e.SWITCHER_CHANGE;exports.TABLE_CELL_CONTEXT_MENU=e.TABLE_CELL_CONTEXT_MENU;exports.TABLE_COLUMN_CLICK=e.TABLE_COLUMN_CLICK;exports.TABLE_COLUMN_RESIZE=e.TABLE_COLUMN_RESIZE;exports.TABLE_GROUP_TOGGLE=e.TABLE_GROUP_TOGGLE;exports.TABLE_ROW_CLICK=e.TABLE_ROW_CLICK;exports.TABLE_ROW_COLLAPSE=e.TABLE_ROW_COLLAPSE;exports.TABLE_ROW_EXPAND=e.TABLE_ROW_EXPAND;exports.TABLE_SELECTION_CHANGE=e.TABLE_SELECTION_CHANGE;exports.TABLE_SORT=e.TABLE_SORT;exports.TAB_CHANGE=e.TAB_CHANGE;exports.TAG_CLOSE_CLICK=e.TAG_CLOSE_CLICK;exports.TEXTAREA_CHANGE=e.TEXTAREA_CHANGE;exports.TOGGLE_GROUP_CHANGE=e.TOGGLE_GROUP_CHANGE;exports.TOGGLE_GROUP_ITEM_CHANGE=e.TOGGLE_GROUP_ITEM_CHANGE;exports.TOGGLE_GROUP_ITEM_DESELECT=e.TOGGLE_GROUP_ITEM_DESELECT;exports.TOGGLE_GROUP_ITEM_SELECT=e.TOGGLE_GROUP_ITEM_SELECT;exports.WELL_CLOSE_CLICK=e.WELL_CLOSE_CLICK;exports.AiSpinner=i;exports.Avatar=x;exports.Badge=C;exports.BadgeCount=s;exports.Button=l;exports.Calendar=Re;exports.Callout=c;exports.Checkbox=S;exports.DateInput=He;exports.DatePicker=ve;exports.DateRange=Ie;exports.DateRangeDefault=be;exports.DateRangeEnd=Pe;exports.DateRangeStart=De;exports.Divider=d;exports.Dot=m;exports.Drawer=J;exports.DrawerClose=Q;exports.Dropdown=j;exports.Field=g;exports.FieldDescription=T;exports.FieldError=_;exports.FieldGroup=p;exports.FieldLabel=N;exports.FileIcon=Z;exports.Icon=r;exports.Input=O;exports.LoadingState=u;exports.Menu=D;exports.MenuItem=P;exports.Modal=H;exports.ModalClose=v;exports.Navigation=ee;exports.NavigationItem=ne;exports.Pagination=ie;exports.PaginationFirstPage=re;exports.PaginationLastPage=Ce;exports.Popover=I;exports.PopoverClose=b;exports.Progress=E;exports.Radio=G;exports.RadioGroup=L;exports.ResizableHandle=oe;exports.ResizablePanel=te;exports.ResizablePanelGroup=ae;exports.Sidebar=se;exports.SidebarAction=ge;exports.SidebarBadge=Ne;exports.SidebarContent=le;exports.SidebarFooter=de;exports.SidebarGroup=me;exports.SidebarGroupLabel=Ee;exports.SidebarHeader=ce;exports.SidebarMenu=Ae;exports.SidebarMenuItem=ue;exports.SidebarSeparator=Te;exports.Skeleton=A;exports.SparkleSpinner=o;exports.Spinner=t;exports.Suggestion=$;exports.Switcher=Y;exports.TabContent=F;exports.TabTrigger=U;exports.Table=Be;exports.Tabs=B;exports.TabsList=M;exports.Tag=W;exports.TagClose=h;exports.Textarea=R;exports.Timeline=_e;exports.TimelineDate=Ge;exports.TimelineGroup=Se;exports.TimelineItem=pe;exports.TimelineLabel=Oe;exports.TimelineTitle=Le;exports.Toast=q;exports.Toaster=y;exports.ToggleGroup=V;exports.ToggleGroupItem=w;exports.Tooltip=k;exports.TooltipContent=f;exports.TooltipTrigger=K;exports.Well=z;exports.WellClose=X;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),a=require("@lit/react"),e=require("./anduin-table-X2lYnMwn.cjs"),t=a.createComponent({react:n,tagName:"anduin-spinner",elementClass:e.AnduinSpinner}),o=a.createComponent({react:n,tagName:"anduin-sparkle-spinner",elementClass:e.AnduinSparkleSpinner}),i=a.createComponent({react:n,tagName:"anduin-ai-spinner",elementClass:e.AnduinAiSpinner}),r=a.createComponent({react:n,tagName:"anduin-icon",elementClass:e.AnduinIcon}),C=a.createComponent({react:n,tagName:"anduin-badge",elementClass:e.AnduinBadge}),s=a.createComponent({react:n,tagName:"anduin-badge-count",elementClass:e.AnduinBadgeCount}),l=a.createComponent({react:n,tagName:"anduin-button",elementClass:e.AnduinButton}),c=a.createComponent({react:n,tagName:"anduin-callout",elementClass:e.AnduinCallout}),d=a.createComponent({react:n,tagName:"anduin-divider",elementClass:e.AnduinDivider}),m=a.createComponent({react:n,tagName:"anduin-dot",elementClass:e.AnduinDot}),E=a.createComponent({react:n,tagName:"anduin-progress",elementClass:e.AnduinProgress}),A=a.createComponent({react:n,tagName:"anduin-skeleton",elementClass:e.AnduinSkeleton}),u=a.createComponent({react:n,tagName:"anduin-loading-state",elementClass:e.AnduinLoadingState}),g=a.createComponent({react:n,tagName:"anduin-field",elementClass:e.AnduinField}),N=a.createComponent({react:n,tagName:"anduin-field-label",elementClass:e.AnduinFieldLabel}),T=a.createComponent({react:n,tagName:"anduin-field-description",elementClass:e.AnduinFieldDescription}),_=a.createComponent({react:n,tagName:"anduin-field-error",elementClass:e.AnduinFieldError}),p=a.createComponent({react:n,tagName:"anduin-field-group",elementClass:e.AnduinFieldGroup}),G=a.createComponent({react:n,tagName:"anduin-radio",elementClass:e.AnduinRadio,events:{onChange:e.RADIO_CHANGE}}),L=a.createComponent({react:n,tagName:"anduin-radio-group",elementClass:e.AnduinRadioGroup,events:{onChange:e.RADIO_GROUP_CHANGE}}),S=a.createComponent({react:n,tagName:"anduin-checkbox",elementClass:e.AnduinCheckbox,events:{onChange:e.CHECKBOX_CHANGE}}),O=a.createComponent({react:n,tagName:"anduin-input",elementClass:e.AnduinInput,events:{onChange:e.INPUT_CHANGE,onClear:e.INPUT_CLEAR}}),R=a.createComponent({react:n,tagName:"anduin-textarea",elementClass:e.AnduinTextarea,events:{onChange:e.TEXTAREA_CHANGE}}),I=a.createComponent({react:n,tagName:"anduin-popover",elementClass:e.AnduinPopover,events:{onOpenChange:e.POPOVER_OPEN_CHANGE}}),b=a.createComponent({react:n,tagName:"anduin-popover-close",elementClass:e.AnduinPopoverClose}),D=a.createComponent({react:n,tagName:"anduin-menu",elementClass:e.AnduinMenu}),P=a.createComponent({react:n,tagName:"anduin-menu-item",elementClass:e.AnduinMenuItem}),H=a.createComponent({react:n,tagName:"anduin-modal",elementClass:e.AnduinModal,events:{onClose:e.MODAL_CLOSE_EVENT,onAfterClose:e.MODAL_AFTER_CLOSE_EVENT}}),v=a.createComponent({react:n,tagName:"anduin-modal-close",elementClass:e.AnduinModalClose}),B=a.createComponent({react:n,tagName:"anduin-tabs",elementClass:e.AnduinTabs,events:{onChange:e.TAB_CHANGE}}),M=a.createComponent({react:n,tagName:"anduin-tabs-list",elementClass:e.AnduinTabsList}),U=a.createComponent({react:n,tagName:"anduin-tab-trigger",elementClass:e.AnduinTabTrigger}),F=a.createComponent({react:n,tagName:"anduin-tab-content",elementClass:e.AnduinTabContent}),W=a.createComponent({react:n,tagName:"anduin-tag",elementClass:e.AnduinTag}),h=a.createComponent({react:n,tagName:"anduin-tag-close",elementClass:e.AnduinTagClose,events:{onClick:e.TAG_CLOSE_CLICK}}),V=a.createComponent({react:n,tagName:"anduin-toggle-group",elementClass:e.AnduinToggleGroup,events:{onChange:e.TOGGLE_GROUP_CHANGE}}),w=a.createComponent({react:n,tagName:"anduin-toggle-group-item",elementClass:e.AnduinToggleGroupItem,events:{onChange:e.TOGGLE_GROUP_ITEM_CHANGE,onSelect:e.TOGGLE_GROUP_ITEM_SELECT,onDeselect:e.TOGGLE_GROUP_ITEM_DESELECT}}),k=a.createComponent({react:n,tagName:"anduin-tooltip",elementClass:e.AnduinTooltip}),K=a.createComponent({react:n,tagName:"anduin-tooltip-trigger",elementClass:e.AnduinTooltipTrigger}),f=a.createComponent({react:n,tagName:"anduin-tooltip-content",elementClass:e.AnduinTooltipContent}),z=a.createComponent({react:n,tagName:"anduin-well",elementClass:e.AnduinWell}),X=a.createComponent({react:n,tagName:"anduin-well-close",elementClass:e.AnduinWellClose,events:{onClick:e.WELL_CLOSE_CLICK}}),x=a.createComponent({react:n,tagName:"anduin-avatar",elementClass:e.AnduinAvatar}),Z=a.createComponent({react:n,tagName:"anduin-file-icon",elementClass:e.AnduinFileIcon}),q=a.createComponent({react:n,tagName:"anduin-toast",elementClass:e.AnduinToast}),y=a.createComponent({react:n,tagName:"anduin-toaster",elementClass:e.AnduinToaster}),j=a.createComponent({react:n,tagName:"anduin-dropdown",elementClass:e.AnduinDropdown,events:{onChange:e.DROPDOWN_CHANGE}}),J=a.createComponent({react:n,tagName:"anduin-drawer",elementClass:e.AnduinDrawer,events:{onClose:e.DRAWER_CLOSE_EVENT,onAfterClose:e.DRAWER_AFTER_CLOSE_EVENT}}),Q=a.createComponent({react:n,tagName:"anduin-drawer-close",elementClass:e.AnduinDrawerClose}),Y=a.createComponent({react:n,tagName:"anduin-switcher",elementClass:e.AnduinSwitcher,events:{onChange:e.SWITCHER_CHANGE}}),$=a.createComponent({react:n,tagName:"anduin-suggestion",elementClass:e.AnduinSuggestion,events:{onChange:e.SUGGESTION_CHANGE,onSelect:e.SUGGESTION_SELECT,onClear:e.SUGGESTION_CLEAR}}),ee=a.createComponent({react:n,tagName:"anduin-navigation",elementClass:e.AnduinNavigation,events:{onChange:e.NAVIGATION_CHANGE}}),ne=a.createComponent({react:n,tagName:"anduin-navigation-item",elementClass:e.AnduinNavigationItem}),ae=a.createComponent({react:n,tagName:"anduin-resizable-panel-group",elementClass:e.AnduinResizablePanelGroup}),te=a.createComponent({react:n,tagName:"anduin-resizable-panel",elementClass:e.AnduinResizablePanel}),oe=a.createComponent({react:n,tagName:"anduin-resizable-handle",elementClass:e.AnduinResizableHandle,events:{onResize:e.RESIZE_EVENT}}),ie=a.createComponent({react:n,tagName:"anduin-pagination",elementClass:e.AnduinPagination,events:{onValueChange:e.PAGINATION_CHANGE}}),re=a.createComponent({react:n,tagName:"anduin-pagination-first-page",elementClass:e.AnduinPaginationFirstPage}),Ce=a.createComponent({react:n,tagName:"anduin-pagination-last-page",elementClass:e.AnduinPaginationLastPage}),se=a.createComponent({react:n,tagName:"anduin-sidebar",elementClass:e.AnduinSidebar}),le=a.createComponent({react:n,tagName:"anduin-sidebar-content",elementClass:e.AnduinSidebarContent}),ce=a.createComponent({react:n,tagName:"anduin-sidebar-header",elementClass:e.AnduinSidebarHeader}),de=a.createComponent({react:n,tagName:"anduin-sidebar-footer",elementClass:e.AnduinSidebarFooter}),me=a.createComponent({react:n,tagName:"anduin-sidebar-group",elementClass:e.AnduinSidebarGroup}),Ee=a.createComponent({react:n,tagName:"anduin-sidebar-group-label",elementClass:e.AnduinSidebarGroupLabel}),Ae=a.createComponent({react:n,tagName:"anduin-sidebar-menu",elementClass:e.AnduinSidebarMenu}),ue=a.createComponent({react:n,tagName:"anduin-sidebar-menu-item",elementClass:e.AnduinSidebarMenuItem,events:{onSelect:e.SIDEBAR_SELECT}}),ge=a.createComponent({react:n,tagName:"anduin-sidebar-action",elementClass:e.AnduinSidebarAction}),Ne=a.createComponent({react:n,tagName:"anduin-sidebar-badge",elementClass:e.AnduinSidebarBadge}),Te=a.createComponent({react:n,tagName:"anduin-sidebar-separator",elementClass:e.AnduinSidebarSeparator}),_e=a.createComponent({react:n,tagName:"anduin-timeline",elementClass:e.AnduinTimeline}),pe=a.createComponent({react:n,tagName:"anduin-timeline-item",elementClass:e.AnduinTimelineItem}),Ge=a.createComponent({react:n,tagName:"anduin-timeline-date",elementClass:e.AnduinTimelineDate}),Le=a.createComponent({react:n,tagName:"anduin-timeline-title",elementClass:e.AnduinTimelineTitle}),Se=a.createComponent({react:n,tagName:"anduin-timeline-group",elementClass:e.AnduinTimelineGroup}),Oe=a.createComponent({react:n,tagName:"anduin-timeline-label",elementClass:e.AnduinTimelineLabel}),Re=a.createComponent({react:n,tagName:"anduin-calendar",elementClass:e.AnduinCalendar,events:{onValueChange:e.CALENDAR_CHANGE}}),Ie=a.createComponent({react:n,tagName:"anduin-date-range",elementClass:e.AnduinDateRange,events:{onChange:e.DATE_RANGE_CHANGE}}),be=a.createComponent({react:n,tagName:"anduin-date-range-default",elementClass:e.AnduinDateRangeDefault}),De=a.createComponent({react:n,tagName:"anduin-date-range-start",elementClass:e.AnduinDateRangeStart}),Pe=a.createComponent({react:n,tagName:"anduin-date-range-end",elementClass:e.AnduinDateRangeEnd}),He=a.createComponent({react:n,tagName:"anduin-date-input",elementClass:e.AnduinDateInput,events:{onValueChange:e.DATE_INPUT_CHANGE}}),ve=a.createComponent({react:n,tagName:"anduin-date-picker",elementClass:e.AnduinDatePicker,events:{onValueChange:e.DATE_PICKER_CHANGE}}),Be=a.createComponent({react:n,tagName:"anduin-table",elementClass:e.AnduinTable,events:{onSort:e.TABLE_SORT,onColumnClick:e.TABLE_COLUMN_CLICK,onRowClick:e.TABLE_ROW_CLICK,onSelectionChange:e.TABLE_SELECTION_CHANGE,onCellContextMenu:e.TABLE_CELL_CONTEXT_MENU,onRowExpand:e.TABLE_ROW_EXPAND,onRowCollapse:e.TABLE_ROW_COLLAPSE,onGroupToggle:e.TABLE_GROUP_TOGGLE,onColumnResize:e.TABLE_COLUMN_RESIZE}});exports.CALENDAR_CHANGE=e.CALENDAR_CHANGE;exports.CHECKBOX_CHANGE=e.CHECKBOX_CHANGE;exports.DATE_INPUT_CHANGE=e.DATE_INPUT_CHANGE;exports.DATE_PICKER_CHANGE=e.DATE_PICKER_CHANGE;exports.DATE_RANGE_CHANGE=e.DATE_RANGE_CHANGE;exports.DRAWER_AFTER_CLOSE_EVENT=e.DRAWER_AFTER_CLOSE_EVENT;exports.DRAWER_CLOSE_EVENT=e.DRAWER_CLOSE_EVENT;exports.DROPDOWN_CHANGE=e.DROPDOWN_CHANGE;exports.INPUT_CHANGE=e.INPUT_CHANGE;exports.INPUT_CLEAR=e.INPUT_CLEAR;exports.MENU_ITEM_CLICK=e.MENU_ITEM_CLICK;exports.MODAL_AFTER_CLOSE_EVENT=e.MODAL_AFTER_CLOSE_EVENT;exports.MODAL_CLOSE_EVENT=e.MODAL_CLOSE_EVENT;exports.NAVIGATION_CHANGE=e.NAVIGATION_CHANGE;exports.PAGINATION_CHANGE=e.PAGINATION_CHANGE;exports.POPOVER_OPEN_CHANGE=e.POPOVER_OPEN_CHANGE;exports.RADIO_CHANGE=e.RADIO_CHANGE;exports.RADIO_GROUP_CHANGE=e.RADIO_GROUP_CHANGE;exports.RESIZE_EVENT=e.RESIZE_EVENT;exports.SIDEBAR_SELECT=e.SIDEBAR_SELECT;exports.SUGGESTION_CHANGE=e.SUGGESTION_CHANGE;exports.SUGGESTION_CLEAR=e.SUGGESTION_CLEAR;exports.SUGGESTION_SELECT=e.SUGGESTION_SELECT;exports.SWITCHER_CHANGE=e.SWITCHER_CHANGE;exports.TABLE_CELL_CONTEXT_MENU=e.TABLE_CELL_CONTEXT_MENU;exports.TABLE_COLUMN_CLICK=e.TABLE_COLUMN_CLICK;exports.TABLE_COLUMN_RESIZE=e.TABLE_COLUMN_RESIZE;exports.TABLE_GROUP_TOGGLE=e.TABLE_GROUP_TOGGLE;exports.TABLE_ROW_CLICK=e.TABLE_ROW_CLICK;exports.TABLE_ROW_COLLAPSE=e.TABLE_ROW_COLLAPSE;exports.TABLE_ROW_EXPAND=e.TABLE_ROW_EXPAND;exports.TABLE_SELECTION_CHANGE=e.TABLE_SELECTION_CHANGE;exports.TABLE_SORT=e.TABLE_SORT;exports.TAB_CHANGE=e.TAB_CHANGE;exports.TAG_CLOSE_CLICK=e.TAG_CLOSE_CLICK;exports.TEXTAREA_CHANGE=e.TEXTAREA_CHANGE;exports.TOGGLE_GROUP_CHANGE=e.TOGGLE_GROUP_CHANGE;exports.TOGGLE_GROUP_ITEM_CHANGE=e.TOGGLE_GROUP_ITEM_CHANGE;exports.TOGGLE_GROUP_ITEM_DESELECT=e.TOGGLE_GROUP_ITEM_DESELECT;exports.TOGGLE_GROUP_ITEM_SELECT=e.TOGGLE_GROUP_ITEM_SELECT;exports.WELL_CLOSE_CLICK=e.WELL_CLOSE_CLICK;exports.AiSpinner=i;exports.Avatar=x;exports.Badge=C;exports.BadgeCount=s;exports.Button=l;exports.Calendar=Re;exports.Callout=c;exports.Checkbox=S;exports.DateInput=He;exports.DatePicker=ve;exports.DateRange=Ie;exports.DateRangeDefault=be;exports.DateRangeEnd=Pe;exports.DateRangeStart=De;exports.Divider=d;exports.Dot=m;exports.Drawer=J;exports.DrawerClose=Q;exports.Dropdown=j;exports.Field=g;exports.FieldDescription=T;exports.FieldError=_;exports.FieldGroup=p;exports.FieldLabel=N;exports.FileIcon=Z;exports.Icon=r;exports.Input=O;exports.LoadingState=u;exports.Menu=D;exports.MenuItem=P;exports.Modal=H;exports.ModalClose=v;exports.Navigation=ee;exports.NavigationItem=ne;exports.Pagination=ie;exports.PaginationFirstPage=re;exports.PaginationLastPage=Ce;exports.Popover=I;exports.PopoverClose=b;exports.Progress=E;exports.Radio=G;exports.RadioGroup=L;exports.ResizableHandle=oe;exports.ResizablePanel=te;exports.ResizablePanelGroup=ae;exports.Sidebar=se;exports.SidebarAction=ge;exports.SidebarBadge=Ne;exports.SidebarContent=le;exports.SidebarFooter=de;exports.SidebarGroup=me;exports.SidebarGroupLabel=Ee;exports.SidebarHeader=ce;exports.SidebarMenu=Ae;exports.SidebarMenuItem=ue;exports.SidebarSeparator=Te;exports.Skeleton=A;exports.SparkleSpinner=o;exports.Spinner=t;exports.Suggestion=$;exports.Switcher=Y;exports.TabContent=F;exports.TabTrigger=U;exports.Table=Be;exports.Tabs=B;exports.TabsList=M;exports.Tag=W;exports.TagClose=h;exports.Textarea=R;exports.Timeline=_e;exports.TimelineDate=Ge;exports.TimelineGroup=Se;exports.TimelineItem=pe;exports.TimelineLabel=Oe;exports.TimelineTitle=Le;exports.Toast=q;exports.Toaster=y;exports.ToggleGroup=V;exports.ToggleGroupItem=w;exports.Tooltip=k;exports.TooltipContent=f;exports.TooltipTrigger=K;exports.Well=z;exports.WellClose=X;
|
package/dist/react.d.ts
CHANGED
|
@@ -532,6 +532,13 @@ declare class AnduinDropdown extends LitElement {
|
|
|
532
532
|
clearable: boolean;
|
|
533
533
|
private _open;
|
|
534
534
|
private _query;
|
|
535
|
+
/**
|
|
536
|
+
* Index into the *filtered* options of the row the arrow keys have reached;
|
|
537
|
+
* -1 when none. Reset whenever the list it indexes changes (open, close,
|
|
538
|
+
* query), so it can never point at a row it was not set on. Disabled rows are
|
|
539
|
+
* never assigned: _moveActive steps over them.
|
|
540
|
+
*/
|
|
541
|
+
private _activeIndex;
|
|
535
542
|
private _triggerEl;
|
|
536
543
|
private _panelEl;
|
|
537
544
|
private _searchEl;
|
|
@@ -542,6 +549,8 @@ declare class AnduinDropdown extends LitElement {
|
|
|
542
549
|
private _onScrollOrResize;
|
|
543
550
|
private _onTriggerClick;
|
|
544
551
|
private _onKeyDown;
|
|
552
|
+
/** Step the highlight by `dir`, skipping disabled rows; stays put at either end. */
|
|
553
|
+
private _moveActive;
|
|
545
554
|
private _onClear;
|
|
546
555
|
private _selectOption;
|
|
547
556
|
private _updatePosition;
|
|
@@ -1776,6 +1785,21 @@ declare interface DropdownOption {
|
|
|
1776
1785
|
value: string;
|
|
1777
1786
|
label: string;
|
|
1778
1787
|
icon?: string;
|
|
1788
|
+
/**
|
|
1789
|
+
* Shown, dimmed, but never selectable: a click does nothing (no value change,
|
|
1790
|
+
* no `anduin-dropdown:change`, the panel stays open) and arrow keys step over
|
|
1791
|
+
* it. For an option that exists but is not available yet. Mirrors
|
|
1792
|
+
* `anduin-select-item[disabled]` in the Anduin design system. Default false.
|
|
1793
|
+
*/
|
|
1794
|
+
disabled?: boolean;
|
|
1795
|
+
/**
|
|
1796
|
+
* A secondary line under the label, smaller and lighter (part
|
|
1797
|
+
* `option-description`). Only the panel shows it; the trigger shows `label`
|
|
1798
|
+
* alone, and search matches `label` alone. Mirrors
|
|
1799
|
+
* `anduin-select-item[description]`. Default: none, and an option without one
|
|
1800
|
+
* renders exactly as it did before the field existed.
|
|
1801
|
+
*/
|
|
1802
|
+
description?: string;
|
|
1779
1803
|
}
|
|
1780
1804
|
|
|
1781
1805
|
declare type DropdownVariant = 'gray0' | 'gray9' | 'primary' | 'danger' | 'success' | 'warning';
|