@nova-design-system/nova-webcomponents 3.31.2-beta.4 → 3.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.txt +89925 -90780
- package/dist/cjs/events.utils-CIlm7hGM.js +47 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{index.esm-CG1TVKfu.js → index.esm-D5HbQDBa.js} +48 -30
- package/dist/cjs/nv-calendar.cjs.entry.js +2 -2
- package/dist/cjs/nv-dialog.cjs.entry.js +35 -14
- package/dist/cjs/nv-drawer.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +21 -6
- package/dist/cjs/nv-fieldselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldslider.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +1 -1
- package/dist/cjs/nv-notification.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +182 -136
- package/dist/cjs/nv-toggle.cjs.entry.js +1 -1
- package/dist/cjs/v4-_2BfiRUa.js +52 -0
- package/dist/collection/components/nv-dialog/nv-dialog.css +8 -7
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +7 -0
- package/dist/collection/components/nv-dialog/nv-dialog.js +30 -9
- package/dist/collection/components/nv-drawer/nv-drawer.js +2 -2
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js +10 -0
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +20 -5
- package/dist/collection/components/nv-popover/nv-popover.js +13 -7
- package/dist/collection/utils/events.utils.js +28 -10
- package/dist/components/index.js +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +1 -1
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +1 -1
- package/dist/components/nv-dialog.js +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-drawer.js +1 -1
- package/dist/components/nv-drawerfooter.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +1 -1
- package/dist/components/nv-fielddaterange.js +1 -1
- package/dist/components/nv-fielddropdown.js +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +1 -1
- package/dist/components/nv-fieldradio.js +1 -1
- package/dist/components/nv-fieldselect.js +1 -1
- package/dist/components/nv-fieldslider.js +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +1 -1
- package/dist/components/nv-fieldtime.js +1 -1
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-menu.js +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-notification.js +1 -1
- package/dist/components/nv-pagination-nav.js +1 -1
- package/dist/components/nv-paginationtable.js +1 -1
- package/dist/components/nv-pill.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-sidebar.js +1 -1
- package/dist/components/nv-sidebarnavitem.js +1 -1
- package/dist/components/nv-statusindicator.js +1 -1
- package/dist/components/nv-tableheader.js +1 -1
- package/dist/components/nv-tag.js +1 -1
- package/dist/components/nv-toggle.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-m37Anefm.js → p-8N4lU0iY.js} +1 -1
- package/dist/components/p-B0u4Ixsb.js +1 -0
- package/dist/components/{p-BWRw4xPL.js → p-B4Bj7woW.js} +1 -1
- package/dist/components/{p-DiZ4PH5U.js → p-BO1b1Va8.js} +1 -1
- package/dist/components/{p-p6cOkAo9.js → p-BRGkbQcZ.js} +1 -1
- package/dist/components/{p-DCP9DeqM.js → p-Bb6b1l7X.js} +1 -1
- package/dist/components/p-BysSxG1C.js +1 -0
- package/dist/components/p-C4Gisby9.js +1 -0
- package/dist/components/{p-CHBitkH2.js → p-C5hX9g5W.js} +1 -1
- package/dist/components/p-CK3_k8jD.js +1 -0
- package/dist/components/p-DBTxpXCn.js +5 -0
- package/dist/components/{p-CM4DYhll.js → p-DNND0rYo.js} +1 -1
- package/dist/components/{p-C0sYXnfw.js → p-DnFgexAD.js} +1 -1
- package/dist/components/{p-151La_Re.js → p-DtrETIc3.js} +1 -1
- package/dist/components/{p-BLVk95gn.js → p-DyrYhAHY.js} +1 -1
- package/dist/components/p-S0RrRAAC.js +1 -0
- package/dist/components/{p-N_OyEprf.js → p-XZ5yyea3.js} +1 -1
- package/dist/components/{p-MJEiA0Bq.js → p-Z4Q7ZQYs.js} +1 -1
- package/dist/components/{p-6T2ybMzE.js → p-iZAJ4_uI.js} +1 -1
- package/dist/components/{p-DQwzzl-e.js → p-vcF-XOKu.js} +1 -1
- package/dist/esm/events.utils-BysSxG1C.js +43 -0
- package/dist/esm/{index.esm-D3eWMME9.js → index.esm-DBTxpXCn.js} +48 -30
- package/dist/esm/index.js +1 -1
- package/dist/esm/nv-calendar.entry.js +2 -2
- package/dist/esm/nv-dialog.entry.js +35 -14
- package/dist/esm/nv-drawer.entry.js +6 -6
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fielddate.entry.js +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +1 -1
- package/dist/esm/nv-fieldradio.entry.js +21 -6
- package/dist/esm/nv-fieldselect.entry.js +1 -1
- package/dist/esm/nv-fieldslider.entry.js +1 -1
- package/dist/esm/nv-fieldtext.entry.js +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +1 -1
- package/dist/esm/nv-fieldtime.entry.js +1 -1
- package/dist/esm/nv-icon.entry.js +1 -1
- package/dist/esm/nv-notification.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +182 -136
- package/dist/esm/nv-toggle.entry.js +1 -1
- package/dist/esm/v4-CK3_k8jD.js +50 -0
- package/dist/native/index.esm.js +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/p-003aae89.entry.js +1 -0
- package/dist/native/p-0a067f5d.entry.js +1 -0
- package/dist/native/{p-7a2189fd.entry.js → p-0cfa2a12.entry.js} +1 -1
- package/dist/native/{p-29283b5d.entry.js → p-0e1f410b.entry.js} +1 -1
- package/dist/native/{p-f49dac2e.entry.js → p-1a77f957.entry.js} +1 -1
- package/dist/native/{p-fde8def2.entry.js → p-25e0f795.entry.js} +1 -1
- package/dist/native/p-2808c51d.entry.js +1 -0
- package/dist/native/{p-a14356a2.entry.js → p-3ad4b348.entry.js} +1 -1
- package/dist/native/{p-84069455.entry.js → p-5084e62a.entry.js} +1 -1
- package/dist/native/{p-f551703a.entry.js → p-59bab8ca.entry.js} +1 -1
- package/dist/native/p-67c4583d.entry.js +1 -0
- package/dist/native/{p-9ae86283.entry.js → p-6c200454.entry.js} +1 -1
- package/dist/native/{p-282f27a8.entry.js → p-96debbf0.entry.js} +1 -1
- package/dist/native/p-9d4f3fa8.entry.js +1 -0
- package/dist/native/p-BysSxG1C.js +1 -0
- package/dist/native/p-CK3_k8jD.js +1 -0
- package/dist/native/p-DBTxpXCn.js +5 -0
- package/dist/native/p-ab22c992.entry.js +1 -0
- package/dist/native/{p-f35cfcf7.entry.js → p-ade6d065.entry.js} +1 -1
- package/dist/native/{p-006b0662.entry.js → p-c0cb8fbd.entry.js} +1 -1
- package/dist/native/{p-35cca4d2.entry.js → p-c59cbcf7.entry.js} +1 -1
- package/dist/native/{p-0be43863.entry.js → p-dd636420.entry.js} +1 -1
- package/dist/native/{p-9cb72554.entry.js → p-fe8e022f.entry.js} +1 -1
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +10 -0
- package/dist/types/components/nv-fieldradio/nv-fieldradio.d.ts +2 -0
- package/dist/types/utils/events.utils.d.ts +29 -8
- package/hydrate/index.js +358 -245
- package/hydrate/index.mjs +358 -245
- package/package.json +2 -2
- package/dist/cjs/events.utils-BE6R5q9C.js +0 -30
- package/dist/cjs/v4-C1vaJ4yP.js +0 -56
- package/dist/components/p-B4EbX_RC.js +0 -1
- package/dist/components/p-B6GgGra-.js +0 -1
- package/dist/components/p-BdYh22OP.js +0 -1
- package/dist/components/p-CtKp5aji.js +0 -1
- package/dist/components/p-D3eWMME9.js +0 -5
- package/dist/components/p-hklkrJsV.js +0 -1
- package/dist/esm/events.utils-B6GgGra-.js +0 -26
- package/dist/esm/v4-BdYh22OP.js +0 -54
- package/dist/native/p-11ae498c.entry.js +0 -1
- package/dist/native/p-193d5813.entry.js +0 -1
- package/dist/native/p-38b731e1.entry.js +0 -1
- package/dist/native/p-45191d81.entry.js +0 -1
- package/dist/native/p-520e5d0d.entry.js +0 -1
- package/dist/native/p-B6GgGra-.js +0 -1
- package/dist/native/p-BdYh22OP.js +0 -1
- package/dist/native/p-D3eWMME9.js +0 -5
- package/dist/native/p-ba32c793.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as t,t as e,p as n,H as o,c as r,h as i,d as s}from"./p-DMtFowUl.js";import{u as a}from"./p-9xYwU7ku.js";import{u as c}from"./p-D02w_Ru6.js";import"./p-Dz1GUhVy.js";import{a as l,r as u}from"./p-BysSxG1C.js";import{a as f}from"./p-CuXVGECR.js";const d=Math.min,h=Math.max,p=Math.round,m=t=>({x:t,y:t}),y={left:"right",right:"left",bottom:"top",top:"bottom"};function g(t,e,n){return h(t,d(e,n))}function v(t,e){return"function"==typeof t?t(e):t}function w(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function x(t){return"x"===t?"y":"x"}function k(t){return"y"===t?"height":"width"}function A(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function T(t){return x(A(t))}function C(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const O=["left","right"],S=["right","left"],j=["top","bottom"],D=["bottom","top"];function P(t){const e=w(t);return y[e]+t.slice(e.length)}function R(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function E(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function M(t,e,n){let{reference:o,floating:r}=t;const i=A(e),s=T(e),a=k(s),c=w(e),l="y"===i,u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[a]/2-r[a]/2;let h;switch(c){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}switch(b(e)){case"start":h[s]-=d*(n&&l?-1:1);break;case"end":h[s]+=d*(n&&l?-1:1)}return h}async function F(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=v(e,t),p=R(h),m=a[d?"floating"===f?"reference":"floating":f],y=E(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),g="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},x=E(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:c}):g);return{top:(y.top-x.top+p.top)/b.y,bottom:(x.bottom-y.bottom+p.bottom)/b.y,left:(y.left-x.left+p.left)/b.x,right:(x.right-y.right+p.right)/b.x}}const L=new Set(["left","top"]);function $(){return"undefined"!=typeof window}function B(t){return G(t)?(t.nodeName||"").toLowerCase():"#document"}function N(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function z(t){var e;return null==(e=(G(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function G(t){return!!$()&&(t instanceof Node||t instanceof N(t).Node)}function H(t){return!!$()&&(t instanceof Element||t instanceof N(t).Element)}function U(t){return!!$()&&(t instanceof HTMLElement||t instanceof N(t).HTMLElement)}function V(t){return!(!$()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof N(t).ShadowRoot)}function W(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=tt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function I(t){return/^(table|td|th)$/.test(B(t))}function X(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const Y=/transform|translate|scale|rotate|perspective|filter/,_=/paint|layout|strict|content/,K=t=>!!t&&"none"!==t;let q;function J(t){const e=H(t)?tt(t):t;return K(e.transform)||K(e.translate)||K(e.scale)||K(e.rotate)||K(e.perspective)||!Q()&&(K(e.backdropFilter)||K(e.filter))||Y.test(e.willChange||"")||_.test(e.contain||"")}function Q(){return null==q&&(q="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),q}function Z(t){return/^(html|body|#document)$/.test(B(t))}function tt(t){return N(t).getComputedStyle(t)}function et(t){return H(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function nt(t){if("html"===B(t))return t;const e=t.assignedSlot||t.parentNode||V(t)&&t.host||z(t);return V(e)?e.host:e}function ot(t){const e=nt(t);return Z(e)?t.ownerDocument?t.ownerDocument.body:t.body:U(e)&&W(e)?e:ot(e)}function rt(t,e){var n;void 0===e&&(e=[]);const o=ot(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),i=N(o);return r?e.concat(i,i.visualViewport||[],W(o)?o:[],[]):e.concat(o,rt(o,[]))}function it(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function st(t){const e=tt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=U(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=p(n)!==i||p(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function at(t){return H(t)?t:t.contextElement}function ct(t){const e=at(t);if(!U(e))return m(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=st(e);let s=(i?p(n.width):n.width)/o,a=(i?p(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const lt=m(0);function ut(t){const e=N(t);return Q()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:lt}function ft(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=at(t);let s=m(1);e&&(o?H(o)&&(s=ct(o)):s=ct(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==N(t))&&e}(i,n,o)?ut(i):m(0);let c=(r.left+a.x)/s.x,l=(r.top+a.y)/s.y,u=r.width/s.x,f=r.height/s.y;if(i){const t=N(i),e=o&&H(o)?N(o):o;let n=t,r=it(n);for(;r&&o&&e!==n;){const t=ct(r),e=r.getBoundingClientRect(),o=tt(r),i=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,l*=t.y,u*=t.x,f*=t.y,c+=i,l+=s,n=N(r),r=it(n)}}return E({width:u,height:f,x:c,y:l})}function dt(t,e){const n=et(t).scrollLeft;return e?e.left+n:ft(z(t)).left+n}function ht(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=N(t),o=z(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;const t=Q();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=z(t),n=et(t),o=t.ownerDocument.body,r=h(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=h(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+dt(t);const a=-n.scrollTop;return"rtl"===tt(o).direction&&(s+=h(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(z(t));else if(H(e))o=function(t,e){const n=ft(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=U(t)?ct(t):m(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=ut(t);o={...e,x:e.x-n.x,y:e.y-n.y}}return E(o)}function pt(t,e){const n=nt(t);return!(n===e||!H(n)||Z(n))&&("fixed"===tt(n).position||pt(n,e))}function mt(t,e,n){const o=U(e),r=z(e),i="fixed"===n,s=ft(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=m(0);if(o||!o&&!i)if(("body"!==B(e)||W(r))&&(a=et(e)),o){const t=ft(e,!0,i,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else r&&(c.x=dt(r));let l=0,u=0;if(r&&!o&&!i){const t=r.getBoundingClientRect();u=t.top+a.scrollTop,l=t.left+a.scrollLeft-dt(r,t)}return{x:s.left+a.scrollLeft-c.x-l,y:s.top+a.scrollTop-c.y-u,width:s.width,height:s.height}}function yt(t){return"static"===tt(t).position}function gt(t,e){if(!U(t)||"fixed"===tt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return z(t)===n&&(n=n.ownerDocument.body),n}function vt(t,e){const n=N(t);if(X(t))return n;if(!U(t)){let e=nt(t);for(;e&&!Z(e);){if(H(e)&&!yt(e))return e;e=nt(e)}return n}let o=gt(t,e);for(;o&&I(o)&&yt(o);)o=gt(o,e);return o&&Z(o)&&yt(o)&&!J(o)?n:o||function(t){let e=nt(t);for(;U(e)&&!Z(e);){if(J(e))return e;if(X(e))return null;e=nt(e)}return null}(t)||n}const wt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=z(o),a=!!e&&X(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=m(1);const u=m(0),f=U(o);if((f||!f&&!i)&&(("body"!==B(o)||W(s))&&(c=et(o)),U(o))){const t=ft(o);l=ct(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}},getDocumentElement:z,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?X(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[]).filter((t=>H(t)&&"body"!==B(t))),r=null;const i="fixed"===tt(t).position;let s=i?nt(t):t;for(;H(s)&&!Z(s);){const e=tt(s),n=J(s);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||W(s)&&!n&&pt(t,s))?o=o.filter((t=>t!==s)):r=e,s=nt(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=i.reduce(((t,n)=>{const o=ht(e,n,r);return t.top=h(o.top,t.top),t.right=d(o.right,t.right),t.bottom=d(o.bottom,t.bottom),t.left=h(o.left,t.left),t}),ht(e,i[0],r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:vt,getElementRects:async function(t){const e=this.getOffsetParent||vt,n=this.getDimensions,o=await n(t.floating);return{reference:mt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=st(t);return{width:e,height:n}},getScale:ct,isElement:H,isRTL:function(t){return"rtl"===tt(t).direction}},bt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=v(t,e),u={x:n,y:o},f=await i.detectOverflow(e,l),d=A(w(r)),h=x(d);let p=u[h],m=u[d];s&&(p=g(p+f["y"===h?"top":"left"],p,p-f["y"===h?"bottom":"right"])),a&&(m=g(m+f["y"===d?"top":"left"],m,m-f["y"===d?"bottom":"right"]));const y=c.fn({...e,[h]:p,[d]:m});return{...y,data:{x:y.x-n,y:y.y-o,enabled:{[h]:s,[d]:a}}}}}},xt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=v(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=w(r),x=A(a),R=w(a)===a,E=await(null==c.isRTL?void 0:c.isRTL(l.floating)),M=d||(R||!m?[P(a)]:function(t){const e=P(t);return[C(t),e,C(e)]}(a)),F="none"!==p;!d&&F&&M.push(...function(t,e,n,o){const r=b(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?S:O:e?O:S;case"left":case"right":return e?j:D;default:return[]}}(w(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(C)))),i}(a,m,p,E));const L=[a,...M],$=await c.detectOverflow(e,y),B=[];let N=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&B.push($[g]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=b(t),r=T(t),i=k(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=P(s)),[s,P(s)]}(r,s,E);B.push($[t[0]],$[t[1]])}if(N=[...N,{placement:r,overflows:B}],!B.every((t=>t<=0))){var z,G;const t=((null==(z=i.flip)?void 0:z.index)||0)+1,e=L[t];if(e&&("alignment"!==f||x===A(e)||N.every((t=>A(t.placement)!==x||t.overflows[0]>0))))return{data:{index:t,overflows:N},reset:{placement:e}};let n=null==(G=N.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:G.placement;if(!n)switch(h){case"bestFit":{var H;const t=null==(H=N.filter((t=>{if(F){const e=A(t.placement);return e===x||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:H[0];t&&(n=t);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},kt=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=v(t,e)||{};if(null==l)return{};const f=R(u),h={x:n,y:o},p=T(r),m=k(p),y=await s.getDimensions(l),w="y"===p,x=w?"top":"left",A=w?"bottom":"right",C=w?"clientHeight":"clientWidth",O=i.reference[m]+i.reference[p]-h[p]-i.floating[m],S=h[p]-i.reference[p],j=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let D=j?j[C]:0;D&&await(null==s.isElement?void 0:s.isElement(j))||(D=a.floating[C]||i.floating[m]);const P=O/2-S/2,E=D/2-y[m]/2-1,M=d(f[x],E),F=d(f[A],E),L=M,$=D-y[m]-F,B=D/2-y[m]/2+P,N=g(L,B,$),z=!c.arrow&&null!=b(r)&&B!==N&&i.reference[m]/2-(B<L?M:F)-y[m]/2<0,G=z?B<L?B-L:B-$:0;return{[p]:h[p]+G,data:{[p]:N,centerOffset:B-N-G,...z&&{alignmentOffset:G}},reset:z}}}),At=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys()){const n=t.get(e).filter((t=>{const e=t.deref();return e&&(!("isConnected"in(n=e))||n.isConnected);var n}));t.set(e,n)}})(...e)}),2e3)}})(),Tt=t.forceUpdate,Ct=t.getRenderingRef,Ot=(t,e)=>{const n=t.indexOf(e);n>=0&&(t[n]=t[t.length-1],t.length--)},{state:St}=(()=>{const t=((t,e=(t,e)=>t!==e)=>{const n=()=>{return("function"==typeof(e=t)?e():e)??{};var e},o=n();let r=new Map(Object.entries(o));const i="undefined"!=typeof Proxy,s=i?null:{},a={dispose:[],get:[],set:[],reset:[]},c=new Map,l=()=>{r=new Map(Object.entries(n())),i||m(),a.reset.forEach((t=>t()))},u=t=>(a.get.forEach((e=>e(t))),r.get(t)),f=(t,n)=>{const o=r.get(t);e(n,o,t)&&(r.set(t,n),i||p(t),a.set.forEach((e=>e(t,n,o))))},d=i?new Proxy(o,{get:(t,e)=>u(e),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>r.has(e),set:(t,e,n)=>(f(e,n),!0)}):(m(),s),h=(t,e)=>(a[t].push(e),()=>{Ot(a[t],e)});function p(t){!i&&s&&(Object.prototype.hasOwnProperty.call(s,t)||Object.defineProperty(s,t,{configurable:!0,enumerable:!0,get:()=>u(t),set(e){f(t,e)}}))}function m(){if(i||!s)return;const t=new Set(r.keys());for(const e of Object.keys(s))t.has(e)||delete s[e];for(const e of t)p(e)}return{state:d,get:u,set:f,on:h,onChange:(t,e)=>{const o=(n,o)=>{n===t&&e(o)},r=()=>{const o=n();e(o[t])},i=h("set",o),s=h("reset",r);return c.set(e,{setHandler:o,resetHandler:r,propName:t}),()=>{i(),s(),c.delete(e)}},use:(...t)=>{const e=t.reduce(((t,e)=>(e.set&&t.push(h("set",e.set)),e.get&&t.push(h("get",e.get)),e.reset&&t.push(h("reset",e.reset)),e.dispose&&t.push(h("dispose",e.dispose)),t)),[]);return()=>e.forEach((t=>t()))},dispose:()=>{a.dispose.forEach((t=>t())),l()},reset:l,forceUpdate:t=>{const e=r.get(t);a.set.forEach((n=>n(t,e,e)))},removeListener:(t,e)=>{const n=c.get(e);n&&n.propName===t&&(Ot(a.set,n.setHandler),Ot(a.reset,n.resetHandler),c.delete(e))}}})({groups:new Map},void 0);return t.use((()=>{if("function"!=typeof Ct||"function"!=typeof Tt)return{};const t=Tt,e=Ct,n=new Map;return{dispose:()=>n.clear(),get:t=>{const o=e();o&&((t,e,n)=>{let o=t.get(e);o||(o=[],t.set(e,o)),o.some((t=>t.deref()===n))||o.push(new WeakRef(n))})(n,t,o)},set:e=>{const o=n.get(e);if(o){const r=o.filter((e=>{const n=e.deref();return!!n&&t(n)}));n.set(e,r)}At(n)},reset:()=>{n.forEach((e=>{e.forEach((e=>{const n=e.deref();n&&t(n)}))})),At(n)}}})()),t})(),jt=n(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.openChanged=r(this,"openChanged",3),this.eventsAttached=!1,this.isAnimating=!1,this.clickEvents=[["click",()=>this.open=!this.open]],this.hoverEvents=[["focus",()=>{clearTimeout(this.hideTimeout),this.showTimeout=setTimeout((()=>this.open=!0),this.enterDelay)}],["blur",()=>{clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>this.open=!1),50)}],["mouseenter",()=>{clearTimeout(this.hideTimeout),this.showTimeout=setTimeout((()=>this.open=!0),this.enterDelay)}],["mouseleave",()=>{clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>this.open=!1),100)}]],this.closeEvents=[["keydown",t=>{"Escape"===t.key&&"controlled"!==this.triggerMode&&(this.open=!1)}]],this.open=!1,this.triggerMode="click",this.placement="bottom",this.strategy="absolute",this.offset=6,this.hasArrow=!1,this.disableFlip=!1,this.shiftPadding=0,this.enterDelay=0,this.nested=!1,this.handleClickOutside=t=>{this.el.contains(t.target)||this.triggerElement?.contains(t.target)||(this.open=!1)},this.outsideClickEvents=[["click",this.handleClickOutside],["touchstart",this.handleClickOutside]]}async show(){this.open=!0}async hide(){this.open=!1}async toggle(){this.open=!this.open}attachEventListeners(){this.triggerElement&&!this.eventsAttached&&(l(this.closeEvents,document,this),"click"===this.triggerMode&&(l(this.clickEvents,this.triggerElement,this),l(this.outsideClickEvents,document,this)),"hover"===this.triggerMode&&l(this.hoverEvents,this.triggerElement,this),this.eventsAttached=!0)}positionPopover(){var t;this.triggerElement&&((t,e,n)=>{const o=new Map,r={platform:wt,...n},i={...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:F},c=await(null==s.isRTL?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=M(l,o,c),d=o,h=0;const p={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:y,fn:g}=m,{x:v,y:w,data:b,reset:x}=await g({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:p,rects:l,platform:a,elements:{reference:t,floating:e}});u=null!=v?v:u,f=null!=w?w:f,p[y]={...p[y],...b},x&&h<50&&(h++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(l=!0===x.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):x.rects),({x:u,y:f}=M(l,d,c))),n=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:p}})(t,e,{...r,platform:i})})(f(this.triggerElement),this.popoverElement,{placement:this.placement,strategy:this.strategy,middleware:[(t=this.offset,void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=e,c=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=w(n),a=b(n),c="y"===A(n),l=L.has(s)?-1:1,u=i&&c?-1:1,f=v(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof p&&(h="end"===a?-1*p:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:s}}}}),!this.disableFlip&&xt({fallbackStrategy:"bestFit",crossAxis:!0,fallbackPlacements:["bottom"]}),bt({padding:this.shiftPadding}),this.hasArrow&&kt({element:this.arrowElement})]}).then((({x:t,y:e,placement:n,middlewareData:o,strategy:r})=>{if(Object.assign(this.popoverElement.style,{left:`${t}px`,top:`${e}px`,position:r}),this.hasArrow){const t={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]],e={top:"rotate(225deg)",right:"rotate(315deg)",bottom:"rotate(45deg)",left:"rotate(135deg)"}[n.split("-")[0]],{x:r,y:i}=o.arrow;Object.assign(this.arrowElement.style,{left:null!=r?`${r}px`:"",top:null!=i?`${i}px`:"",right:"",bottom:"",transform:e,[t]:"-4px"})}}))}async handleOpenChange(t){for(;this.isAnimating;)await new Promise((t=>setTimeout(t,50)));this.isAnimating=!0;const e=St.groups.get(this.groupName),n=e&&e.openedBy!==this.el,o=e&&e.openedBy===this.el;t&&this.popoverElement.style.removeProperty("display"),o&&!t&&St.groups.delete(this.groupName),this.groupName&&t&&St.groups.set(this.groupName,{openedBy:this.el});const{growIn:r}=c(this.popoverElement,{duration:n?0:100,amount:.85}),{fadeOut:i}=a(this.popoverElement,{duration:n?0:100});!0===t&&(this.popoverElement.removeAttribute("hidden"),this.positionPopover(),await r()),!1===t&&(await i(),this.popoverElement.setAttribute("hidden","")),this.isAnimating=!1,this.openChanged.emit(t)}handleStrategyChange(){this.open&&this.positionPopover()}componentWillRender(){this.triggerElement||(this.triggerElement=this.el.querySelector('[slot="trigger"]')),this.attachEventListeners()}componentDidLoad(){if(this.open){const{setFadeIn:t}=a(this.popoverElement);t(),this.popoverElement.removeAttribute("hidden")}else{const{setGrowOut:t}=c(this.popoverElement);t()}this.positionPopover()}disconnectedCallback(){switch(u(this.closeEvents,document),this.triggerMode){case"click":this.triggerElement&&u(this.clickEvents,this.triggerElement),u(this.outsideClickEvents,document);break;case"hover":this.triggerElement&&u(this.hoverEvents,this.triggerElement)}this.eventsAttached=!1,this.hideTimeout&&clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout)}render(){return i(s,{key:"1ed63615950c6e634f62130a0b44968b33a672fb"},i("slot",{key:"46f7ca5bd0f86e79f847d1120d4bb37f6392fd58",name:"trigger"}),i("div",{key:"b7324fde30b5dccb51a206ac334636bb8161760a","data-scope":"popover","data-strategy":this.strategy,hidden:!0,ref:t=>this.popoverElement=t},this.hasArrow&&i("div",{key:"ce765381a3d2708afa5cef63d8f8c156555eb903","data-scope":"arrow",ref:t=>this.arrowElement=t}),i("slot",{key:"7412a6e56a216bb7ea06b69d1c349f68d6bb1aa1",name:"content"})))}get el(){return this}static get watchers(){return{open:[{handleOpenChange:0}],strategy:[{handleStrategyChange:0}]}}static get style(){return"nv-popover{display:inline-block;position:relative}nv-popover:has([fluid]:not([fluid=false])){display:block}nv-popover[strategy=fixed]{position:static}nv-popover>[data-scope=popover]{width:max-content;background-color:var(--components-popover-background);border-color:var(--components-popover-border);font-weight:var(--font-weight-medium-emphasis);border-width:1px;border-style:solid;border-radius:var(--popover-radius);padding:var(--popover-padding-y) var(--popover-padding-x);position:absolute;top:0;left:0;z-index:1;box-shadow:var(--popover-shadow-1-x) var(--popover-shadow-1-y) var(--popover-shadow-1-blur) -2px var(--popover-shadow-1-opacity), var(--popover-shadow-2-x) var(--popover-shadow-2-y) var(--popover-shadow-2-blur) var(--shadow-spread-lg-2) var(--popover-shadow-2-opacity)}nv-popover>[data-scope=popover][hidden]:not([hidden=false]){display:none}nv-popover>[data-scope=popover][data-strategy=fixed]{position:fixed;z-index:9999}nv-popover>[data-scope=popover]>[data-scope=arrow]{background-color:var(--components-popover-background);position:absolute;border-color:var(--components-popover-border);border-width:1px;border-style:solid;border-bottom-color:transparent;border-right-color:transparent;width:8px;height:8px;transform:rotate(45deg);border-radius:1px}nv-popover>[data-scope=popover]>[slot=content]{position:relative;z-index:1}nv-popover>slot-fb{display:none}"}},[260,"nv-popover",{triggerElement:[1040],open:[1540],triggerMode:[513,"trigger-mode"],placement:[513],strategy:[513],groupName:[513,"group-name"],offset:[514],hasArrow:[516,"has-arrow"],disableFlip:[516,"disable-flip"],shiftPadding:[514,"shift-padding"],enterDelay:[514,"enter-delay"],nested:[516],show:[64],hide:[64],toggle:[64]},void 0,{open:[{handleOpenChange:0}],strategy:[{handleStrategyChange:0}]}]);function Dt(){"undefined"!=typeof customElements&&["nv-popover"].forEach((t=>{"nv-popover"===t&&(customElements.get(e(t))||customElements.define(e(t),jt))}))}Dt();export{jt as N,Dt as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as a,c as s,h as i,F as r,d as n}from"./p-DMtFowUl.js";import{b as d}from"./p-gOKBmbgZ.js";import{d as o}from"./p-DGGc-sMF.js";import{d as c}from"./p-
|
|
1
|
+
import{t as e,p as t,H as a,c as s,h as i,F as r,d as n}from"./p-DMtFowUl.js";import{b as d}from"./p-gOKBmbgZ.js";import{d as o}from"./p-DGGc-sMF.js";import{d as c}from"./p-C4Gisby9.js";import{d as l}from"./p-BnO_M5Vy.js";const f=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.drawerCanceled=s(this,"drawerCanceled",3),this.drawerPrimaryClicked=s(this,"drawerPrimaryClicked",3),this.internals=this.attachInternals(),this.disabled=!1,this.undismissable=!1,this.leadingIcon=null,this.trailingIcon=null,this.danger=!1,this.cancelLabel="Cancel",this.primaryLabel="Primary",this.form=null,this.handlePrimary=e=>{e.stopPropagation(),this.drawerPrimaryClicked.emit()},this.handleCancel=e=>{e.stopPropagation(),this.drawerCanceled.emit()}}componentDidRender(){this.primaryButtonType||(this.primaryButtonRef.type=this.form?d.Submit:d.Button)}render(){return i(n,{key:"2ade4dcb3320ee8c514733ec13ba426b3ac4aaf5"},i("slot",{key:"8fb3bcd6539645049053168f079f44e213b54877"},i(r,{key:"f6a2466e843703f36d347e5863e714a147f8bc9b"},!this.undismissable&&i("nv-button",{key:"7d4bbfc76ffd9164f02fde26a10d7261ff239d23",onClick:this.handleCancel,emphasis:"low",size:"sm"},this.cancelLabel),i("nv-button",{key:"a05c968d24da7c3fe320dfb74d0a88d4d6fa9f3b",ref:e=>this.primaryButtonRef=e,onClick:this.handlePrimary,disabled:this.disabled,danger:this.danger,size:"sm",emphasis:"high",form:this.form,type:this.primaryButtonType},this.leadingIcon&&i("nv-icon",{key:"a352b063ac4ca57fef730182462dea3c73d8203d",slot:"leading-icon",name:this.leadingIcon,size:"sm"}),this.primaryLabel,this.trailingIcon&&i("nv-icon",{key:"bf249ca468d0e382723a28a3bbc730ed9c6defea",slot:"trailing-icon",name:this.trailingIcon,size:"sm"})))))}static get formAssociated(){return!0}get el(){return this}static get style(){return"nv-drawerfooter{display:flex;padding:var(--drawer-padding-y, var(--dialog-footer-padding-top)) var(--drawer-padding-x, var(--dialog-footer-padding-x)) var(--drawer-padding-y, var(--dialog-footer-padding-bottom)) var(--drawer-padding-x, var(--dialog-footer-padding-x));justify-content:flex-end;align-items:flex-end;gap:var(--drawer-gap-y, var(--dialog-footer-gap-y));align-self:stretch}"}},[324,"nv-drawerfooter",{disabled:[516],undismissable:[516],leadingIcon:[513,"leading-icon"],trailingIcon:[513,"trailing-icon"],danger:[516],cancelLabel:[513,"cancel-label"],primaryLabel:[513,"primary-label"],primaryButtonType:[513,"primary-button-type"],form:[513]}]);function m(){"undefined"!=typeof customElements&&["nv-drawerfooter","nv-button","nv-icon","nv-loader"].forEach((t=>{switch(t){case"nv-drawerfooter":customElements.get(e(t))||customElements.define(e(t),f);break;case"nv-button":customElements.get(e(t))||o();break;case"nv-icon":customElements.get(e(t))||c();break;case"nv-loader":customElements.get(e(t))||l()}}))}m();export{f as N,m as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as i,c as s,h as a,F as o,d as n}from"./p-DMtFowUl.js";import{b as d}from"./p-gOKBmbgZ.js";import{d as r}from"./p-DGGc-sMF.js";import{d as l}from"./p-
|
|
1
|
+
import{t as e,p as t,H as i,c as s,h as a,F as o,d as n}from"./p-DMtFowUl.js";import{b as d}from"./p-gOKBmbgZ.js";import{d as r}from"./p-DGGc-sMF.js";import{d as l}from"./p-C4Gisby9.js";import{d as c}from"./p-BnO_M5Vy.js";const m=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.dialogCanceled=s(this,"dialogCanceled",3),this.dialogPrimaryClicked=s(this,"dialogPrimaryClicked",3),this.internals=this.attachInternals(),this.disabled=!1,this.undismissable=!1,this.leadingIcon=null,this.trailingIcon=null,this.danger=!1,this.cancelLabel="Cancel",this.primaryLabel="Primary",this.handlePrimary=e=>{e.stopPropagation(),this.dialogPrimaryClicked.emit()},this.handleCancel=e=>{e.stopPropagation(),this.dialogCanceled.emit()}}componentDidRender(){this.primaryButtonType||(this.primaryButtonRef.type=this.form?d.Submit:d.Button)}render(){return a(n,{key:"91320615714b06f288269640d99c0ad9b29378f0"},a("slot",{key:"25151b6b74591d31c234b5450d27ab31fb240017"},a(o,{key:"6b5bee68bf0d9fbdcc9f3396e8ce122ff27480eb"},!this.undismissable&&a("nv-button",{key:"20660e41e817edf9da27565231809e85b1b17179",onClick:this.handleCancel,emphasis:"low",size:"sm"},this.cancelLabel),a("nv-button",{key:"baeb2e7267838396ad930653823b86d8265fddc4",ref:e=>this.primaryButtonRef=e,onClick:this.handlePrimary,disabled:this.disabled,danger:this.danger,size:"sm",emphasis:"high",form:this.form,type:this.primaryButtonType},this.leadingIcon&&a("nv-icon",{key:"dde4eb5fa927e504b0734de1c8ef3d7e0a75ef96",slot:"leading-icon",name:this.leadingIcon,size:"sm"}),this.primaryLabel,this.trailingIcon&&a("nv-icon",{key:"195de12b4b25e3de011d7d4509672d686c21025e",slot:"trailing-icon",name:this.trailingIcon,size:"sm"})))))}static get formAssociated(){return!0}get el(){return this}static get style(){return"nv-dialogfooter{display:flex;padding:var(--dialog-footer-padding-top) var(--dialog-footer-padding-x) var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);justify-content:flex-end;align-items:flex-end;gap:var(--dialog-footer-gap-y);align-self:stretch}"}},[324,"nv-dialogfooter",{disabled:[516],undismissable:[516],leadingIcon:[513,"leading-icon"],trailingIcon:[513,"trailing-icon"],danger:[516],cancelLabel:[513,"cancel-label"],primaryLabel:[513,"primary-label"],primaryButtonType:[513,"primary-button-type"],form:[513]}]);function h(){"undefined"!=typeof customElements&&["nv-dialogfooter","nv-button","nv-icon","nv-loader"].forEach((t=>{switch(t){case"nv-dialogfooter":customElements.get(e(t))||customElements.define(e(t),m);break;case"nv-button":customElements.get(e(t))||r();break;case"nv-icon":customElements.get(e(t))||l();break;case"nv-loader":customElements.get(e(t))||c()}}))}h();export{m as N,h as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as t,H as e,c as s,h as a,d as n}from"./p-DMtFowUl.js";import{d as r}from"./p-
|
|
1
|
+
import{t as o,p as t,H as e,c as s,h as a,d as n}from"./p-DMtFowUl.js";import{d as r}from"./p-S0RrRAAC.js";const i=t(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.openChanged=s(this,"openChanged",3),this.defaultSlot=null,this.popoverElement=null,this.placement="bottom",this.enterDelay=0,this.strategy="absolute"}componentDidRender(){if(!this.popoverElement)return;const o=this.triggerElement??this.defaultSlot?.nextElementSibling??this.el.querySelector(":scope > :not(nv-popover):not(slot):not([slot])");o&&this.popoverElement.triggerElement!==o&&(this.popoverElement.triggerElement=o)}render(){return a(n,{key:"620c5961fe95f7623a65ceed07a7fb42306189ae"},a("nv-popover",{key:"a40db9e814ab527f57e625bf5c83c81fba9efe5e",ref:o=>this.popoverElement=o,triggerMode:"hover",hasArrow:!0,placement:this.placement,strategy:this.strategy,groupName:"tooltip",enterDelay:this.enterDelay,onOpenChanged:o=>this.openChanged.emit(o.detail)},a("p",{key:"8baf04ff0d82f385e9366e228a942062fca39e45",slot:"content"},this.message),a("slot",{key:"7534cdbf49b6e9eb92156bc9b8bffb447172a273",name:"content"})),a("slot",{key:"6a8d93fda3f5e9b2b83c2e7a43356de8d4d5680e",ref:o=>this.defaultSlot=o}))}get el(){return this}static get style(){return"nv-tooltip{display:inline-block;vertical-align:top;position:relative;user-select:none}nv-tooltip:has([fluid]:not([fluid=false])){display:block}nv-tooltip nv-popover{display:block;height:0;min-height:0;overflow:visible}nv-tooltip nv-popover>[data-scope=popover]{background:var(--components-tooltip-background);color:var(--components-tooltip-text);font-weight:var(--font-weight-medium-emphasis);padding:var(--tooltip-padding-y) var(--tooltip-padding-x);font-size:var(--tooltip-font-size);border-radius:var(--tooltip-radius);border:none;box-shadow:0px var(--shadow-y-axis-lg-1) var(--shadow-blur-lg-1) var(--shadow-spread-lg-1) var(--shadow-color-opacity-1), 0px var(--shadow-y-axis-lg-2) var(--shadow-blur-lg-2) var(--shadow-spread-lg-2) var(--shadow-color-opacity-2)}nv-tooltip nv-popover>[data-scope=popover] [data-scope=arrow]{background:var(--components-tooltip-background);box-shadow:none;border:none}"}},[260,"nv-tooltip",{triggerElement:[16],message:[513],placement:[513],enterDelay:[514,"enter-delay"],strategy:[513]}]);function p(){"undefined"!=typeof customElements&&["nv-tooltip","nv-popover"].forEach((t=>{switch(t){case"nv-tooltip":customElements.get(o(t))||customElements.define(o(t),i);break;case"nv-popover":customElements.get(o(t))||r()}}))}p();export{i as N,p as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as n,c as o,h as i,d as
|
|
1
|
+
import{t as e,p as t,H as n,c as o,h as i,d as s}from"./p-DMtFowUl.js";import{i as a}from"./p-C4Cy9iy8.js";import{d as m}from"./p-C4Gisby9.js";const c=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.menuitemSelected=o(this,"menuitemSelected",7),this.disabled=!1,this.hasSubmenu=!1}handleMenuItemSelect(e){this.disabled?e.stopPropagation():this.menuitemSelected.emit({id:this.el.id,name:this.name,hasSubmenu:this.hasSubmenu})}handleClick(e){this.handleMenuItemSelect(e)}handleKeyDown(e){if(a(e.key)){const t=document.activeElement;t&&"NV-MENUITEM"===t.tagName&&!t.hasAttribute("has-submenu")&&(e.preventDefault(),this.el.click())}}render(){return i(s,{key:"0292e33304b74d540b2533570b1f314ca8ea100b",role:"menuitem",tabindex:this.disabled?"-1":"0"},this.icon&&i("nv-icon",{key:"1a94fdbbc5349fb4dd1c8985026197be91b7adff",name:this.icon}),i("slot",{key:"8994033b5371d1db6a55980c5b0a1e7455c573b7"}),this.label&&i("span",{key:"9163ba9a67f050447ebed2a4743f6c8f3102e37b","data-scope":"text"},this.label),this.shortcut&&!this.hasSubmenu&&i("kbd",{key:"8adf1ba5789434c37bcbc53328b6b1dc9b82eeb5"},this.shortcut),this.hasSubmenu&&i("nv-icon",{key:"b05b3c1245752d2bbd161db03b361a5e5406602a",name:"chevron-right"}))}get el(){return this}static get style(){return"nv-menuitem{display:flex;align-items:center;max-width:300px;width:100vw;font-size:var(--menu-contextual-item-font-size);font-weight:var(--menu-contextual-item-font-weight);color:var(--components-menu-contextual-item-content);border-radius:var(--menu-contextual-item-radius);gap:var(--menu-contextual-item-gap-x);padding:var(--menu-contextual-item-padding-y) var(--menu-contextual-item-padding-x);transition:background-color 150ms ease-out;cursor:pointer}nv-menuitem:hover,nv-menuitem:focus,nv-menuitem:focus-within{background-color:var(--components-menu-contextual-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-menuitem *{pointer-events:none}nv-menuitem kbd{color:var(--components-menu-contextual-item-shortcut)}nv-menuitem [data-scope=text]{margin-right:auto}nv-menuitem[disabled]:not([disabled=false]){cursor:unset;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}"}},[260,"nv-menuitem",{label:[513],icon:[513],disabled:[516],shortcut:[513],hasSubmenu:[516,"has-submenu"],name:[513]},[[2,"click","handleClick"],[0,"keydown","handleKeyDown"]]]);function u(){"undefined"!=typeof customElements&&["nv-menuitem","nv-icon"].forEach((t=>{switch(t){case"nv-menuitem":customElements.get(e(t))||customElements.define(e(t),c);break;case"nv-icon":customElements.get(e(t))||m()}}))}u();export{c as N,u as d}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds a set of event listeners to the given target and binds each listener to
|
|
3
|
+
* the provided `context`.
|
|
4
|
+
*
|
|
5
|
+
* Side effect: each `events[i][1]` is overwritten with the bound listener so
|
|
6
|
+
* that a later call to {@link removeEventListeners} with the same array
|
|
7
|
+
* removes the exact reference that was registered. Without this, every
|
|
8
|
+
* `listener.bind(context)` would produce a new function and
|
|
9
|
+
* `removeEventListener` would silently no-op, leaking listeners on `document`,
|
|
10
|
+
* `window`, or trigger elements when the component is destroyed.
|
|
11
|
+
* @param {EventsAndListeners} events - The events and listeners to add. Mutated in place.
|
|
12
|
+
* @param {Element | Window | Document | ChildNode} target - The target to attach the listeners to.
|
|
13
|
+
* @param {T} context - The class context to bind the listeners to.
|
|
14
|
+
*/
|
|
15
|
+
function addEventListeners(events, target, context) {
|
|
16
|
+
events.forEach(entry => {
|
|
17
|
+
const [event, listener] = entry;
|
|
18
|
+
const bound = listener.bind(context);
|
|
19
|
+
entry[1] = bound;
|
|
20
|
+
target.addEventListener(event, bound);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Removes the listeners previously registered with {@link addEventListeners}.
|
|
25
|
+
*
|
|
26
|
+
* Relies on the bound references stored back into `events[i][1]` by
|
|
27
|
+
* {@link addEventListeners}; if the listener references don't match what was
|
|
28
|
+
* registered, `removeEventListener` will silently no-op.
|
|
29
|
+
* @param {EventsAndListeners} events - The events and listeners to remove.
|
|
30
|
+
* @param {Element | Window | Document | ChildNode} target - The target to detach the listeners from.
|
|
31
|
+
* @param {T} _context - Unused; kept for symmetry with {@link addEventListeners}.
|
|
32
|
+
*/
|
|
33
|
+
function removeEventListeners(events, target, _context) {
|
|
34
|
+
events.forEach(([event, listener]) => target.removeEventListener(event, listener));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var events_utils = /*#__PURE__*/Object.freeze({
|
|
38
|
+
__proto__: null,
|
|
39
|
+
addEventListeners: addEventListeners,
|
|
40
|
+
removeEventListeners: removeEventListeners
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export { addEventListeners as a, events_utils as e, removeEventListeners as r };
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* tabbable 6.
|
|
2
|
+
* tabbable 6.4.0
|
|
3
3
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
// NOTE: separate `:not()` selectors has broader browser support than the newer
|
|
6
6
|
// `:not([inert], [inert] *)` (Feb 2023)
|
|
7
|
-
|
|
8
|
-
// the entire query to fail, resulting in no nodes found, which will break a lot
|
|
9
|
-
// of things... so we have to rely on JS to identify nodes inside an inert container
|
|
10
|
-
var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
|
|
7
|
+
var candidateSelectors = ['input:not([inert]):not([inert] *)', 'select:not([inert]):not([inert] *)', 'textarea:not([inert]):not([inert] *)', 'a[href]:not([inert]):not([inert] *)', 'button:not([inert]):not([inert] *)', '[tabindex]:not(slot):not([inert]):not([inert] *)', 'audio[controls]:not([inert]):not([inert] *)', 'video[controls]:not([inert]):not([inert] *)', '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', 'details>summary:first-of-type:not([inert]):not([inert] *)', 'details:not([inert]):not([inert] *)'];
|
|
11
8
|
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
12
9
|
var NoElement = typeof Element === 'undefined';
|
|
13
10
|
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
@@ -20,13 +17,13 @@ var getRootNode = !NoElement && Element.prototype.getRootNode ? function (elemen
|
|
|
20
17
|
|
|
21
18
|
/**
|
|
22
19
|
* Determines if a node is inert or in an inert ancestor.
|
|
23
|
-
* @param {
|
|
20
|
+
* @param {Node} [node]
|
|
24
21
|
* @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
|
|
25
22
|
* see if any of them are inert. If false, only `node` itself is considered.
|
|
26
23
|
* @returns {boolean} True if inert itself or by way of being in an inert ancestor.
|
|
27
24
|
* False if `node` is falsy.
|
|
28
25
|
*/
|
|
29
|
-
var
|
|
26
|
+
var _isInert = function isInert(node, lookUp) {
|
|
30
27
|
var _node$getAttribute;
|
|
31
28
|
if (lookUp === void 0) {
|
|
32
29
|
lookUp = true;
|
|
@@ -40,10 +37,10 @@ var isInert = function isInert(node, lookUp) {
|
|
|
40
37
|
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
|
|
41
38
|
// if it weren't for `matches()` not being a function on shadow roots; the following
|
|
42
39
|
// code works for any kind of node
|
|
43
|
-
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
var result = inert || lookUp && node && (
|
|
41
|
+
// closest does not exist on shadow roots, so we fall back to a manual
|
|
42
|
+
// lookup upward, in case it is not defined.
|
|
43
|
+
typeof node.closest === 'function' ? node.closest('[inert]') : _isInert(node.parentNode));
|
|
47
44
|
return result;
|
|
48
45
|
};
|
|
49
46
|
|
|
@@ -69,8 +66,8 @@ var isContentEditable = function isContentEditable(node) {
|
|
|
69
66
|
*/
|
|
70
67
|
var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
71
68
|
// even if `includeContainer=false`, we still have to check it for inertness because
|
|
72
|
-
// if it's inert, all its children are inert
|
|
73
|
-
if (
|
|
69
|
+
// if it's inert (either by itself or via its parent), then all its children are inert
|
|
70
|
+
if (_isInert(el)) {
|
|
74
71
|
return [];
|
|
75
72
|
}
|
|
76
73
|
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
|
@@ -115,12 +112,12 @@ var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
|
115
112
|
* @param {IterativeOptions} options
|
|
116
113
|
* @returns {Array.<Element|CandidateScope>}
|
|
117
114
|
*/
|
|
118
|
-
var
|
|
115
|
+
var _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
|
|
119
116
|
var candidates = [];
|
|
120
117
|
var elementsToCheck = Array.from(elements);
|
|
121
118
|
while (elementsToCheck.length) {
|
|
122
119
|
var element = elementsToCheck.shift();
|
|
123
|
-
if (
|
|
120
|
+
if (_isInert(element, false)) {
|
|
124
121
|
// no need to look up since we're drilling down
|
|
125
122
|
// anything inside this container will also be inert
|
|
126
123
|
continue;
|
|
@@ -129,7 +126,7 @@ var getCandidatesIteratively = function getCandidatesIteratively(elements, inclu
|
|
|
129
126
|
// add shadow dom slot scope (slot itself cannot be focusable)
|
|
130
127
|
var assigned = element.assignedElements();
|
|
131
128
|
var content = assigned.length ? assigned : element.children;
|
|
132
|
-
var nestedCandidates =
|
|
129
|
+
var nestedCandidates = _getCandidatesIteratively(content, true, options);
|
|
133
130
|
if (options.flatten) {
|
|
134
131
|
candidates.push.apply(candidates, nestedCandidates);
|
|
135
132
|
} else {
|
|
@@ -153,7 +150,7 @@ var getCandidatesIteratively = function getCandidatesIteratively(elements, inclu
|
|
|
153
150
|
// no inert look up because we're already drilling down and checking for inertness
|
|
154
151
|
// on the way down, so all containers to this root node should have already been
|
|
155
152
|
// vetted as non-inert
|
|
156
|
-
var validShadowRoot = !
|
|
153
|
+
var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
|
|
157
154
|
if (shadowRoot && validShadowRoot) {
|
|
158
155
|
// add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
|
|
159
156
|
// shadow exists, so look at light dom children as fallback BUT create a scope for any
|
|
@@ -161,7 +158,7 @@ var getCandidatesIteratively = function getCandidatesIteratively(elements, inclu
|
|
|
161
158
|
// children of the web component element (which has the shadow), in the light dom, but
|
|
162
159
|
// slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
|
|
163
160
|
// _after_ we return from this recursive call
|
|
164
|
-
var _nestedCandidates =
|
|
161
|
+
var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
|
|
165
162
|
if (options.flatten) {
|
|
166
163
|
candidates.push.apply(candidates, _nestedCandidates);
|
|
167
164
|
} else {
|
|
@@ -338,6 +335,28 @@ var isZeroArea = function isZeroArea(node) {
|
|
|
338
335
|
var isHidden = function isHidden(node, _ref) {
|
|
339
336
|
var displayCheck = _ref.displayCheck,
|
|
340
337
|
getShadowRoot = _ref.getShadowRoot;
|
|
338
|
+
if (displayCheck === 'full-native') {
|
|
339
|
+
if ('checkVisibility' in node) {
|
|
340
|
+
// Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4
|
|
341
|
+
// @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility
|
|
342
|
+
var visible = node.checkVisibility({
|
|
343
|
+
// Checking opacity might be desirable for some use cases, but natively,
|
|
344
|
+
// opacity zero elements _are_ focusable and tabbable.
|
|
345
|
+
checkOpacity: false,
|
|
346
|
+
opacityProperty: false,
|
|
347
|
+
contentVisibilityAuto: true,
|
|
348
|
+
visibilityProperty: true,
|
|
349
|
+
// This is an alias for `visibilityProperty`. Contemporary browsers
|
|
350
|
+
// support both. However, this alias has wider browser support (Chrome
|
|
351
|
+
// >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
|
|
352
|
+
// we include it anyway.
|
|
353
|
+
checkVisibilityCSS: true
|
|
354
|
+
});
|
|
355
|
+
return !visible;
|
|
356
|
+
}
|
|
357
|
+
// Fall through to manual visibility checks
|
|
358
|
+
}
|
|
359
|
+
|
|
341
360
|
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
342
361
|
// (see notes about this further down), which means we will consider it visible
|
|
343
362
|
// (this is legacy behavior from a very long way back)
|
|
@@ -351,7 +370,10 @@ var isHidden = function isHidden(node, _ref) {
|
|
|
351
370
|
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
352
371
|
return true;
|
|
353
372
|
}
|
|
354
|
-
if (!displayCheck || displayCheck === 'full' ||
|
|
373
|
+
if (!displayCheck || displayCheck === 'full' ||
|
|
374
|
+
// full-native can run this branch when it falls through in case
|
|
375
|
+
// Element#checkVisibility is unsupported
|
|
376
|
+
displayCheck === 'full-native' || displayCheck === 'legacy-full') {
|
|
355
377
|
if (typeof getShadowRoot === 'function') {
|
|
356
378
|
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
357
379
|
// 'non-zero-area' fallback
|
|
@@ -460,11 +482,7 @@ var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
|
460
482
|
return false;
|
|
461
483
|
};
|
|
462
484
|
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
463
|
-
if (node.disabled ||
|
|
464
|
-
// we must do an inert look up to filter out any elements inside an inert ancestor
|
|
465
|
-
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
466
|
-
// note related to `candidateSelectors`)
|
|
467
|
-
isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
|
|
485
|
+
if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||
|
|
468
486
|
// For a details element with a summary, the summary element gets the focus
|
|
469
487
|
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
470
488
|
return false;
|
|
@@ -477,7 +495,7 @@ var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(opt
|
|
|
477
495
|
}
|
|
478
496
|
return true;
|
|
479
497
|
};
|
|
480
|
-
var
|
|
498
|
+
var isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {
|
|
481
499
|
var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
|
|
482
500
|
if (isNaN(tabIndex) || tabIndex >= 0) {
|
|
483
501
|
return true;
|
|
@@ -491,14 +509,14 @@ var isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNod
|
|
|
491
509
|
* @param {Array.<Element|CandidateScope>} candidates
|
|
492
510
|
* @returns Element[]
|
|
493
511
|
*/
|
|
494
|
-
var
|
|
512
|
+
var _sortByOrder = function sortByOrder(candidates) {
|
|
495
513
|
var regularTabbables = [];
|
|
496
514
|
var orderedTabbables = [];
|
|
497
515
|
candidates.forEach(function (item, i) {
|
|
498
516
|
var isScope = !!item.scopeParent;
|
|
499
517
|
var element = isScope ? item.scopeParent : item;
|
|
500
518
|
var candidateTabindex = getSortOrderTabIndex(element, isScope);
|
|
501
|
-
var elements = isScope ?
|
|
519
|
+
var elements = isScope ? _sortByOrder(item.candidates) : element;
|
|
502
520
|
if (candidateTabindex === 0) {
|
|
503
521
|
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
504
522
|
} else {
|
|
@@ -520,16 +538,16 @@ var tabbable = function tabbable(container, options) {
|
|
|
520
538
|
options = options || {};
|
|
521
539
|
var candidates;
|
|
522
540
|
if (options.getShadowRoot) {
|
|
523
|
-
candidates =
|
|
541
|
+
candidates = _getCandidatesIteratively([container], options.includeContainer, {
|
|
524
542
|
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
525
543
|
flatten: false,
|
|
526
544
|
getShadowRoot: options.getShadowRoot,
|
|
527
|
-
shadowRootFilter:
|
|
545
|
+
shadowRootFilter: isShadowRootTabbable
|
|
528
546
|
});
|
|
529
547
|
} else {
|
|
530
548
|
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
531
549
|
}
|
|
532
|
-
return
|
|
550
|
+
return _sortByOrder(candidates);
|
|
533
551
|
};
|
|
534
552
|
|
|
535
553
|
export { tabbable as t };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { a as ButtonEmphasis, B as ButtonSize, b as ButtonType, C as CUSTOM_DAY_NAMES, j as CUSTOM_MONTH_NAMES, D as DeprecatedSemanticColors, F as FeedbackColors, G as GlobalFilterPosition, I as IconButtonShape, f as LabelPlacement, L as LoaderColors, c as NotificationEmphasis, N as NotificationPosition, S as SemanticSizes, i as SortingPossibility, d as StatusIndicatorEmphasis, g as TextInputAutocomplete, h as TimeType, T as ToggleButtonEmphasis, e as ToggleButtonSize, W as WEEK_ABBREVIATIONS } from './constants-gOKBmbgZ.js';
|
|
2
|
-
export { e as eventUtils } from './events.utils-
|
|
2
|
+
export { e as eventUtils } from './events.utils-BysSxG1C.js';
|
|
3
3
|
export { u as uriUtils } from './uri.utils-CnI0auJM.js';
|
|
4
4
|
export { n as dateTimeUtils } from './nova-datetime-CyL2J6O4.js';
|
|
5
5
|
import { u as useCollapse } from './collapse.animation-DZDm0vSK.js';
|
|
@@ -12,7 +12,7 @@ function requireDayjs_min () {
|
|
|
12
12
|
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
13
13
|
hasRequiredDayjs_min = 1;
|
|
14
14
|
(function (module, exports) {
|
|
15
|
-
!function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|
|
|
15
|
+
!function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),Y=_.prototype;return O.prototype=Y,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){Y[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
16
16
|
} (dayjs_min$1));
|
|
17
17
|
return dayjs_min$1.exports;
|
|
18
18
|
}
|
|
@@ -48,7 +48,7 @@ function requireUtc () {
|
|
|
48
48
|
if (hasRequiredUtc) return utc$2.exports;
|
|
49
49
|
hasRequiredUtc = 1;
|
|
50
50
|
(function (module, exports) {
|
|
51
|
-
!function(t,i){module.exports=i();}(utc$1,(function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:true,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:true});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:false})};var
|
|
51
|
+
!function(t,i){module.exports=i();}(utc$1,(function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:true,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:true});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:false})};var r=u.parse;u.parse=function(t){t.utc&&(this.$u=true),this.$utils().u(t.$offset)||(this.$offset=t.$offset),r.call(this,t);};var o=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds();}else o.call(this);};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&(s=function(t){ void 0===t&&(t="");var s=t.match(i);if(!s)return null;var f=(""+s[0]).match(e)||["-",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:"+"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s;if(0===u)return this.utc(f);var r=this.clone();if(f)return r.$offset=u,r.$u=false,r;var o=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return (r=this.local().add(u+o,t)).$offset=u,r.$x.$localOffset=o,r};var h=u.format;u.format=function(t){var i=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return !!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return "s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)};}}));
|
|
52
52
|
} (utc$2));
|
|
53
53
|
return utc$2.exports;
|
|
54
54
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, a as createEvent, h, d as Host, e as getElement } from './index-Dtg-LGcy.js';
|
|
2
|
-
import { t as tabbable } from './index.esm-
|
|
3
|
-
import { a as addEventListeners, r as removeEventListeners } from './events.utils-
|
|
2
|
+
import { t as tabbable } from './index.esm-DBTxpXCn.js';
|
|
3
|
+
import { a as addEventListeners, r as removeEventListeners } from './events.utils-BysSxG1C.js';
|
|
4
4
|
import { u as useFade } from './fade.animation-DcRL9lcm.js';
|
|
5
5
|
import { u as useGrow } from './grow.animation-D7ep_aVl.js';
|
|
6
6
|
import './style-value-types.es-xlgmw4x8.js';
|
|
@@ -8,9 +8,9 @@ import { p as parallel } from './timeline.animation-CgHCo_Ho.js';
|
|
|
8
8
|
import { c as clsx } from './clsx-ChV9xqsO.js';
|
|
9
9
|
import { b as ButtonType } from './constants-gOKBmbgZ.js';
|
|
10
10
|
import { i as isToggleKey } from './accessibility.utils-C4Cy9iy8.js';
|
|
11
|
-
import { v as v4 } from './v4-
|
|
11
|
+
import { v as v4 } from './v4-CK3_k8jD.js';
|
|
12
12
|
|
|
13
|
-
const nvDialogCss = () => `nv-dialog dialog{width:100vw;height:100svh;margin:0;max-height:unset;max-width:unset;padding:0;background:color-mix(in srgb, var(--components-overlay-background) 70%, transparent);backdrop-filter:blur(4px)}nv-dialog dialog.full
|
|
13
|
+
const nvDialogCss = () => `nv-dialog dialog{width:100vw;height:100svh;margin:0;max-height:unset;max-width:unset;padding:0;border:none;background:color-mix(in srgb, var(--components-overlay-background) 70%, transparent);backdrop-filter:blur(4px)}nv-dialog dialog.full>.backdrop>.content{min-width:90vw;width:90vw;max-width:90vw}nv-dialog .backdrop{display:flex;min-height:100%;padding:var(--spacing-3);box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}nv-dialog .backdrop>.content{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:min(90vw, 400px);width:fit-content;max-width:clamp(90vw, min(90vw, 960px), 960px);margin:auto;display:flex;flex-direction:column;align-items:flex-start;height:fit-content;position:relative}nv-dialog .backdrop>.content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}nv-dialog .backdrop>.content .content-body::-webkit-scrollbar{width:6px;height:6px}nv-dialog .backdrop>.content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-dialog .backdrop>.content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-dialog .backdrop>.content .content-body{box-sizing:border-box;padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);scrollbar-gutter:stable both-edges;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-base);color:var(--color-content-medium-text);width:100%}`;
|
|
14
14
|
|
|
15
15
|
const NvDialog = class {
|
|
16
16
|
constructor(hostRef) {
|
|
@@ -84,6 +84,7 @@ const NvDialog = class {
|
|
|
84
84
|
*/
|
|
85
85
|
this.handleDialogPointerDown = (event) => {
|
|
86
86
|
this.pointerDownTarget = event.target;
|
|
87
|
+
this.stopEventPropagation(event);
|
|
87
88
|
};
|
|
88
89
|
/**
|
|
89
90
|
* Handles the click event to close the dialog when clickOutside is true.
|
|
@@ -92,18 +93,33 @@ const NvDialog = class {
|
|
|
92
93
|
* @param {MouseEvent} event - The click event.
|
|
93
94
|
*/
|
|
94
95
|
this.handleDialogClick = (event) => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
this.stopEventPropagation(event);
|
|
97
|
+
const shouldHandleOutsideClick = this.clickOutside &&
|
|
98
|
+
!this.undismissable &&
|
|
99
|
+
event.target === this.backdropElement &&
|
|
100
|
+
this.pointerDownTarget === this.backdropElement;
|
|
101
|
+
if (shouldHandleOutsideClick && this.checkForOpenPopovers()) {
|
|
102
|
+
// first backdrop click closes nested popovers,
|
|
103
|
+
// second backdrop click closes the dialog itself.
|
|
104
|
+
this.closeOpenPopovers();
|
|
105
|
+
}
|
|
106
|
+
else if (shouldHandleOutsideClick) {
|
|
101
107
|
this.close();
|
|
102
108
|
event.preventDefault();
|
|
103
|
-
event.stopPropagation();
|
|
104
109
|
}
|
|
105
110
|
this.pointerDownTarget = null;
|
|
106
111
|
};
|
|
112
|
+
/**
|
|
113
|
+
* Stops events from bubbling past the `<dialog>` element so they don't
|
|
114
|
+
* trigger handlers on ancestors of `nv-dialog` (e.g. a clickable row
|
|
115
|
+
* containing the dialog). The `<dialog>` is promoted to the top layer
|
|
116
|
+
* visually via `showModal()` but its DOM position is unchanged, so bubbling
|
|
117
|
+
* otherwise proceeds normally.
|
|
118
|
+
* @param {Event} event - The event whose propagation should be stopped.
|
|
119
|
+
*/
|
|
120
|
+
this.stopEventPropagation = (event) => {
|
|
121
|
+
event.stopPropagation();
|
|
122
|
+
};
|
|
107
123
|
this.checkForOpenPopovers = () => {
|
|
108
124
|
let hasOpenPopover = false;
|
|
109
125
|
this.el.querySelectorAll('nv-popover').forEach(popover => {
|
|
@@ -113,6 +129,11 @@ const NvDialog = class {
|
|
|
113
129
|
});
|
|
114
130
|
return hasOpenPopover;
|
|
115
131
|
};
|
|
132
|
+
this.closeOpenPopovers = () => {
|
|
133
|
+
this.el.querySelectorAll('nv-popover[open]').forEach(popover => {
|
|
134
|
+
popover.open = false;
|
|
135
|
+
});
|
|
136
|
+
};
|
|
116
137
|
}
|
|
117
138
|
//#endregion PROPERTIES
|
|
118
139
|
/****************************************************************************/
|
|
@@ -283,8 +304,8 @@ const NvDialog = class {
|
|
|
283
304
|
// this.setupContentBodyListeners();
|
|
284
305
|
}
|
|
285
306
|
disconnectedCallback() {
|
|
286
|
-
if (this.triggerElement &&
|
|
287
|
-
removeEventListeners(this.triggerClickEvents, this.triggerElement
|
|
307
|
+
if (this.triggerElement && this.eventsAttached && !this.controlled) {
|
|
308
|
+
removeEventListeners(this.triggerClickEvents, this.triggerElement);
|
|
288
309
|
this.eventsAttached = false;
|
|
289
310
|
}
|
|
290
311
|
this.allowScroll();
|
|
@@ -294,7 +315,7 @@ const NvDialog = class {
|
|
|
294
315
|
//#region RENDER
|
|
295
316
|
render() {
|
|
296
317
|
const hasForm = this.form || this.el.querySelector('form');
|
|
297
|
-
return (h(Host, { key: '
|
|
318
|
+
return (h(Host, { key: 'ddce4af5ea620a9c199f1c3613ff74150f2c0fd7' }, h("slot", { key: 'b5d44222a35e1234ecb6ae9ce7559d167ccdaf2b', name: "trigger" }), h("dialog", { key: '65247cd73bf26a0451692553675bc85d4f5b02a5', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, onPointerDown: this.handleDialogPointerDown, onPointerUp: this.stopEventPropagation, onMouseDown: this.stopEventPropagation, onMouseUp: this.stopEventPropagation, onClick: this.handleDialogClick, onDblClick: this.stopEventPropagation, onContextMenu: this.stopEventPropagation, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsx({ full: this.full }) }, h("div", { key: 'e0099c3f416e264f37137ae66957df9393632b13', class: "backdrop", ref: el => (this.backdropElement = el) }, h("div", { key: '5b30f2748e0808d1c529cdcd675cd0c702bc425e', class: "content", ref: el => (this.contentElement = el) }, !this.undismissable && (h("nv-button", { key: '504bb233c7ad0d050bcc11abec2d49b65b9b9299', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDialogClose, "aria-label": "Close dialog" }, h("nv-icon", { key: '6b54a135ffb6dd599323c127b5666b9eef9e513f', name: "x", size: "sm" }))), this.headerElement ? (h("slot", { name: "header" })) : (h("nv-dialogheader", { id: "dialog-header" })), h("div", { key: '67918f89af9d65b1d077786a0af6459dd6cd6cd6', class: "content-body", id: "dialog-content" }, h("slot", { key: '792be8c0785a21af0046aaaaa64844655b57e865' })), this.footerElement ? (h("slot", { name: "footer" })) : (h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? ButtonType.Submit : ButtonType.Button, onDialogCanceled: this.handleDialogClose, undismissable: this.undismissable })))))));
|
|
298
319
|
}
|
|
299
320
|
get el() { return getElement(this); }
|
|
300
321
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, a as createEvent, h, d as Host, e as getElement } from './index-Dtg-LGcy.js';
|
|
2
|
-
import { t as tabbable } from './index.esm-
|
|
3
|
-
import { a as addEventListeners, r as removeEventListeners } from './events.utils-
|
|
2
|
+
import { t as tabbable } from './index.esm-DBTxpXCn.js';
|
|
3
|
+
import { a as addEventListeners, r as removeEventListeners } from './events.utils-BysSxG1C.js';
|
|
4
4
|
import { u as useFade } from './fade.animation-DcRL9lcm.js';
|
|
5
5
|
import './style-value-types.es-xlgmw4x8.js';
|
|
6
6
|
import { u as useSlide } from './slide.animation-CmH5d1of.js';
|
|
@@ -8,7 +8,7 @@ import { p as parallel } from './timeline.animation-CgHCo_Ho.js';
|
|
|
8
8
|
import { c as clsx } from './clsx-ChV9xqsO.js';
|
|
9
9
|
import { b as ButtonType } from './constants-gOKBmbgZ.js';
|
|
10
10
|
import { i as isToggleKey } from './accessibility.utils-C4Cy9iy8.js';
|
|
11
|
-
import { v as v4 } from './v4-
|
|
11
|
+
import { v as v4 } from './v4-CK3_k8jD.js';
|
|
12
12
|
|
|
13
13
|
const nvDrawerCss = () => `nv-drawer dialog{width:100vw;height:100svh;margin:0;max-height:unset;max-width:unset;padding:0;background:color-mix(in srgb, var(--components-overlay-background) 70%, transparent);backdrop-filter:blur(4px);border:none}nv-drawer dialog[data-state=closed]{pointer-events:none}nv-drawer dialog[data-state=open]{pointer-events:auto}nv-drawer dialog.side-right .backdrop{justify-content:flex-end}nv-drawer dialog.side-right .content{box-shadow:-4px 0 24px rgba(0, 0, 0, 0.15)}nv-drawer dialog.side-left .backdrop{justify-content:flex-start}nv-drawer dialog.side-left .content{box-shadow:4px 0 24px rgba(0, 0, 0, 0.15)}nv-drawer .backdrop{display:flex;height:100%;width:100%;padding:0}nv-drawer .backdrop .content{background:var(--color-level-00-background);width:var(--drawer-width, min(90vw, 400px));height:100%;display:flex;flex-direction:column;align-items:flex-start;position:relative}nv-drawer .backdrop .content[data-side=left]{border-top-right-radius:var(--drawer-radius-top-right, 0);border-bottom-right-radius:var(--drawer-radius-bottom-right, 0)}nv-drawer .backdrop .content[data-side=right]{border-top-left-radius:var(--drawer-radius-top-left, 0);border-bottom-left-radius:var(--drawer-radius-bottom-left, 0)}nv-drawer .backdrop .content.size-sm{width:clamp(var(--drawer-size-sm-min-width), var(--drawer-size-sm-width), var(--drawer-size-sm-max-width))}nv-drawer .backdrop .content.size-md{width:clamp(var(--drawer-size-md-min-width), var(--drawer-size-md-width), var(--drawer-size-md-max-width))}nv-drawer .backdrop .content.size-lg{width:clamp(var(--drawer-size-lg-min-width), var(--drawer-size-lg-width), var(--drawer-size-lg-max-width))}nv-drawer .backdrop .content.size-full{width:var(--drawer-size-full-width)}nv-drawer .backdrop .content nv-button.close-button{position:absolute;top:var(--drawer-dismissible-position-top, var(--dialog-dismissible-position-top));right:var(--drawer-dismissible-position-right, var(--dialog-dismissible-position-right));z-index:1;display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:var(--drawer-gap-y, 10px)}nv-drawer .backdrop .content .content-body::-webkit-scrollbar{width:6px;height:6px}nv-drawer .backdrop .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-drawer .backdrop .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-drawer .backdrop .content .content-body{box-sizing:border-box;padding:var(--drawer-padding-y, var(--dialog-body-padding-y)) var(--drawer-padding-x, var(--dialog-body-padding-x));scrollbar-gutter:stable both-edges;flex:1;overflow-y:auto;width:100%;border-bottom:1px solid var(--color-content-low-border);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-base);color:var(--color-content-medium-text)}nv-drawer .backdrop .content slot[name=footer]::slotted(*),nv-drawer .backdrop .content nv-drawerfooter{padding-top:var(--spacing-4)}`;
|
|
14
14
|
|
|
@@ -415,8 +415,8 @@ const NvDrawer = class {
|
|
|
415
415
|
// this.setupContentBodyListeners();
|
|
416
416
|
}
|
|
417
417
|
disconnectedCallback() {
|
|
418
|
-
if (this.triggerElement &&
|
|
419
|
-
removeEventListeners(this.triggerClickEvents, this.triggerElement
|
|
418
|
+
if (this.triggerElement && this.eventsAttached && !this.controlled) {
|
|
419
|
+
removeEventListeners(this.triggerClickEvents, this.triggerElement);
|
|
420
420
|
this.eventsAttached = false;
|
|
421
421
|
}
|
|
422
422
|
this.allowScroll();
|
|
@@ -427,7 +427,7 @@ const NvDrawer = class {
|
|
|
427
427
|
render() {
|
|
428
428
|
const hasForm = this.form || this.el.querySelector('form');
|
|
429
429
|
const state = this.open ? 'open' : 'closed';
|
|
430
|
-
return (h(Host, { key: '
|
|
430
|
+
return (h(Host, { key: 'cb7aea38a630886f177e8bf2a7975bbe94715306' }, h("slot", { key: '893e531fbdd14d0a730e816fa3366e8fc8bd3182', name: "trigger" }), h("dialog", { key: 'f8b883b7a645ddfa3f2e1e5a076703254121dde4', ref: el => (this.dialogElement = el), onClose: this.handleDrawerClose, onClick: this.handleDrawerClick, role: "dialog", "aria-modal": "true", "aria-labelledby": "drawer-header", "aria-describedby": "drawer-content", class: clsx({ [`side-${this.side}`]: true }), "data-state": state }, h("div", { key: '25def4d3f8849db90d7ba0c041ea833a36f5bd9f', class: "backdrop", ref: el => (this.backdropElement = el) }, h("div", { key: 'c6214a6686167885a1e1ada2d3fbb121d92afd4d', class: clsx('content', `size-${this.size}`), ref: el => (this.contentElement = el), "data-state": state, "data-side": this.side, style: this.width ? { width: this.width } : {} }, !this.undismissable && (h("nv-button", { key: '3452665b313b546a85f7f7f3215a42097032e9bd', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDrawerClose, "aria-label": "Close drawer" }, h("nv-icon", { key: 'c1112811d3d6c5762a19e6cea4dfaaa522ef6155', name: "x", size: "sm" }))), this.headerElement ? (h("slot", { name: "header" })) : (h("nv-drawerheader", { id: "drawer-header" })), h("div", { key: '3aeb9923ce1045ab84a2fcd7e6be1b283bbdef12', class: "content-body", id: "drawer-content" }, h("slot", { key: 'f616fb61d824b5f5b875fcbe5c9c2bb4f9b4732b' })), this.footerElement ? (h("slot", { name: "footer" })) : (h("nv-drawerfooter", { form: this.form, primaryButtonType: hasForm ? ButtonType.Submit : ButtonType.Button, onDrawerCanceled: this.handleDrawerClose, undismissable: this.undismissable })))))));
|
|
431
431
|
}
|
|
432
432
|
get el() { return getElement(this); }
|
|
433
433
|
static get watchers() { return {
|