@aquera/nile-elements 2.0.3 → 2.0.5
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/README.md +21 -0
- package/demo/nxtgen-classes.css +596 -2
- package/demo/nxtgen-dark.css +240 -21
- package/demo/nxtgen-properties.css +2 -2
- package/demo/nxtgen-utilities.css +598 -4
- package/demo/nxtgen.css +57 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +458 -317
- package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.cjs.js.map +1 -1
- package/dist/nile-combobox/nile-combobox.css.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.css.cjs.js.map +1 -1
- package/dist/nile-combobox/nile-combobox.css.esm.js +28 -15
- package/dist/nile-combobox/nile-combobox.esm.js +11 -8
- package/dist/nile-combobox/portal-manager.cjs.js +1 -1
- package/dist/nile-combobox/portal-manager.cjs.js.map +1 -1
- package/dist/nile-combobox/portal-manager.esm.js +1 -1
- package/dist/nile-combobox/renderer.cjs.js +1 -1
- package/dist/nile-combobox/renderer.cjs.js.map +1 -1
- package/dist/nile-combobox/renderer.esm.js +31 -43
- package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
- package/dist/nile-empty-state/nile-empty-state.css.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.css.cjs.js.map +1 -1
- package/dist/nile-empty-state/nile-empty-state.css.esm.js +129 -6
- package/dist/nile-empty-state/nile-empty-state.esm.js +45 -31
- package/dist/nile-pagination/nile-pagination.cjs.js +1 -1
- package/dist/nile-pagination/nile-pagination.cjs.js.map +1 -1
- package/dist/nile-pagination/nile-pagination.esm.js +25 -25
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/create-state.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.esm.js +1 -1
- package/dist/src/nile-combobox/nile-combobox.css.js +28 -15
- package/dist/src/nile-combobox/nile-combobox.css.js.map +1 -1
- package/dist/src/nile-combobox/nile-combobox.js +49 -10
- package/dist/src/nile-combobox/nile-combobox.js.map +1 -1
- package/dist/src/nile-combobox/portal-manager.js +2 -22
- package/dist/src/nile-combobox/portal-manager.js.map +1 -1
- package/dist/src/nile-combobox/renderer.d.ts +2 -3
- package/dist/src/nile-combobox/renderer.js +14 -45
- package/dist/src/nile-combobox/renderer.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.css.js +127 -4
- package/dist/src/nile-empty-state/nile-empty-state.css.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.d.ts +35 -5
- package/dist/src/nile-empty-state/nile-empty-state.js +159 -42
- package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.test.d.ts +1 -0
- package/dist/src/nile-empty-state/nile-empty-state.test.js +186 -15
- package/dist/src/nile-empty-state/nile-empty-state.test.js.map +1 -1
- package/dist/src/nile-pagination/nile-pagination.js +5 -5
- package/dist/src/nile-pagination/nile-pagination.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +11 -3
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/version.cjs.js +1 -1
- package/dist/version.cjs.js.map +1 -1
- package/dist/version.esm.js +1 -1
- package/dist/xml-09119317.cjs.js +2 -0
- package/dist/xml-09119317.cjs.js.map +1 -0
- package/dist/{xml-25c4108a.esm.js → xml-9bf771b3.esm.js} +1 -1
- package/package.json +2 -1
- package/scripts/replace-version.cjs +12 -10
- package/src/nile-combobox/nile-combobox.css.ts +28 -15
- package/src/nile-combobox/nile-combobox.ts +61 -12
- package/src/nile-combobox/portal-manager.ts +4 -22
- package/src/nile-combobox/renderer.ts +26 -69
- package/src/nile-empty-state/nile-empty-state.css.ts +127 -4
- package/src/nile-empty-state/nile-empty-state.test.ts +192 -15
- package/src/nile-empty-state/nile-empty-state.ts +195 -34
- package/src/nile-pagination/nile-pagination.ts +5 -5
- package/src/version.ts +11 -2
- package/vscode-html-custom-data.json +79 -16
- package/dist/xml-90fd974e.cjs.js +0 -2
- package/dist/xml-90fd974e.cjs.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t,o as i,s,f as o,a as e,p as a,b as n}from"../floating-ui.dom-cc9126da.esm.js";import{P as l}from"../nile-select/portal-utils.esm.js";class h{constructor(t){this.portalContainer=null,this.originalListboxParent=null,this.measuredPopupHeight=null,this.cleanupAutoUpdate=null,this.currentPlacement="bottom",this.component=t}get portalContainerElement(){return this.portalContainer}createPortalContainer(){const t=document.createElement("div");return t.style.position="absolute",t.style.zIndex="9999",t.style.pointerEvents="none",t.className="nile-combobox-portal",t}async computePosition(){if(!this.portalContainer)return;const n=this.component.combobox||this.component,h=this.portalContainer;try{const r=l.findBoundaryElements(n),c=l.getOptimalPlacement(n),{x:
|
|
1
|
+
import{c as t,o as i,s,f as o,a as e,p as a,b as n}from"../floating-ui.dom-cc9126da.esm.js";import{P as l}from"../nile-select/portal-utils.esm.js";class h{constructor(t){this.portalContainer=null,this.originalListboxParent=null,this.measuredPopupHeight=null,this.cleanupAutoUpdate=null,this.currentPlacement="bottom",this.component=t}get portalContainerElement(){return this.portalContainer}createPortalContainer(){const t=document.createElement("div");return t.style.position="absolute",t.style.zIndex="9999",t.style.pointerEvents="none",t.className="nile-combobox-portal",t}async computePosition(){if(!this.portalContainer)return;const n=this.component.combobox||this.component,h=this.portalContainer;try{const r=l.findBoundaryElements(n),c=l.getOptimalPlacement(n),{x:p,y:u,placement:b}=await t(n,h,{placement:c,strategy:"fixed",middleware:[i(4),s({apply:({availableWidth:t,availableHeight:i,elements:s,rects:o})=>{const e=l.calculateOptimalHeight(o.reference,window.innerHeight,this.currentPlacement);s.floating.style.maxWidth=`${t}px`,s.floating.style.maxHeight=`${e}px`,s.floating.style.setProperty("--auto-size-available-width",`${t}px`),s.floating.style.setProperty("--auto-size-available-height",`${e}px`)},padding:10,boundary:r}),o({fallbackPlacements:["bottom","top","bottom-start","top-start"],fallbackStrategy:"bestFit",padding:10,boundary:r}),e({padding:10,crossAxis:!0,boundary:r})],platform:a}),m=n.getBoundingClientRect();Object.assign(h.style,{left:`${p}px`,top:`${u}px`,position:"fixed",pointerEvents:"auto",width:`${m.width}px`}),this.currentPlacement=b;const x=b.split("-")[0];h.className=`nile-combobox-portal combobox__listbox--${x}`}catch{this.fallbackPositioning()}}fallbackPositioning(){if(!this.portalContainer)return;const t=(this.component.combobox||this.component).getBoundingClientRect(),i=window.innerHeight-t.bottom,s=t.top;let o,e,a;s>i?(e=Math.max(s-20,100),o=Math.max(t.top-e-4,10),a="top"):(e=Math.max(i-20,100),o=t.bottom+4,a="bottom"),Object.assign(this.portalContainer.style,{left:`${t.left}px`,top:`${o}px`,width:`${t.width}px`,maxHeight:`${e}px`,pointerEvents:"auto"}),this.portalContainer.className=`nile-combobox-portal combobox__listbox--${a}`,this.portalContainer.style.setProperty("--auto-size-available-height",`${e}px`),this.portalContainer.style.setProperty("--auto-size-available-width",`${t.width}px`)}extractStylesAsCSS(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>this.extractStylesAsCSS(t))).join("\n"):t&&"object"==typeof t&&t.cssText?t.cssText:""}injectStyles(){if(!this.portalContainer)return;const t=`nile-combobox-styles-${Math.random().toString(36).substring(2,11)}`;if(document.getElementById(t))return;const i=this.component.constructor.styles;if(!i)return;const s=document.createElement("style");s.id=t,s.textContent=this.extractStylesAsCSS(i),document.head.appendChild(s),this.portalContainer.t=t}setupPortal(){this.component.portal&&this.component.updateComplete.then((()=>{const t=this.component.shadowRoot?.querySelector("#listbox");t&&(this.originalListboxParent=t.parentElement,this.portalContainer=this.createPortalContainer(),this.portalContainer.appendChild(t),document.body.appendChild(this.portalContainer),this.injectStyles(),t.style.display="",this.computePosition(),this.cleanupAutoUpdate=n(this.component,this.portalContainer,(()=>this.computePosition()),{ancestorScroll:!0,ancestorResize:!0,elementResize:!0,layoutShift:!0,animationFrame:!0}))}))}cleanupPortal(){if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this.portalContainer&&this.portalContainer.parentNode){const t=this.portalContainer.querySelector("#listbox");t&&this.originalListboxParent&&(this.originalListboxParent.appendChild(t),t.style.display=this.component.portal?"none":"");const i=this.portalContainer.t;i&&document.getElementById(i)?.remove(),this.portalContainer.parentNode.removeChild(this.portalContainer)}this.portalContainer=null,this.originalListboxParent=null,this.measuredPopupHeight=null,this.currentPlacement="bottom"}updatePosition(){this.component.portal&&this.portalContainer&&this.computePosition()}resetMeasuredHeight(){this.measuredPopupHeight=null}async resetScrollPosition(){await this.component.updateComplete,requestAnimationFrame((()=>{let t=null;if(t=this.component.portal&&this.portalContainer?this.portalContainer.querySelector("#listbox"):this.component.shadowRoot?.querySelector("#listbox"),!t||!t.isConnected)return;(t.querySelector(".combobox__options-scroll")??t).scrollTop=0}))}}export{h as C};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["lit","lit/directives/unsafe-html.js","lit/directives/class-map.js","lit/directives/repeat.js"],function(_export,_context){"use strict";var t,o,i,e,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,_templateObject21,s;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_lit){t=_lit.html;},function(_litDirectivesUnsafeHtmlJs){o=_litDirectivesUnsafeHtmlJs.unsafeHTML;},function(_litDirectivesClassMapJs){i=_litDirectivesClassMapJs.classMap;},function(_litDirectivesRepeatJs){e=_litDirectivesRepeatJs.repeat;}],execute:function execute(){_export("C",s=/*#__PURE__*/function(){function s(){_classCallCheck(this,s);}return _createClass(s,null,[{key:"renderGroupHeader",value:function renderGroupHeader(o){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"group-header\"\n class=\"combobox__group-header\"\n role=\"presentation\"\n data-group-id=","\n style=","\n >\n ","\n <span class=\"combobox__group-label\">","</span>\n </div>\n "])),o.id,"--group-depth:".concat(o.depth),o.prefix?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-icon\n class=\"combobox__group-prefix\"\n name=","\n size=\"14\"\n method=\"fill\"\n ></nile-icon>"])),o.prefix):"",o.label);}},{key:"renderRowsPlain",value:function renderRowsPlain(o,i,e,r,n,l,a,d,p,c,$,v,b,u,m){return l&&!d&&0===o.length?s.renderNoResults(a,m):t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div class=\"combobox__options-plain\" @scroll=",">\n ","\n </div>\n </div>\n "])),d?"loading":"",p,o.map(function(t){return"header"===t.kind?s.renderGroupHeader(t):s.renderItem(t.item,i,e,r,n,c,$,v,b,u);}));}},{key:"renderRowsVirtualized",value:function renderRowsVirtualized(o,i,r,n,l,a,d,p,c,$,v,b,u){return t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div style=\"position:relative;height:","px;width:100%;\">\n ","\n </div>\n </div>\n "])),p?"loading":"",i,e(o,function(t){return t.key;},function(o){var i=r[o.index];if(!i)return t(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""])));var e="position:absolute;top:0;left:0;right:0;transform:translateY(".concat(o.start,"px);height:").concat(o.size,"px;");return"header"===i.kind?t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div style="," class=\"combobox__group-header-slot\">\n ","\n </div>\n "])),e,s.renderGroupHeader(i)):t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <div style=",">\n ","\n </div>\n "])),e,s.renderItem(i.item,n,l,a,d,c,$,v,b,u));}));}},{key:"renderVirtualizedOptions",value:function renderVirtualizedOptions(o,i,r,n,l,a,d,p,c,$,v,b,u,m){var x=o.length>0?o[0].start:0;return t(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div style=\"position:relative;height:","px;width:100%;\">\n <div style=\"position:absolute;top:0;left:0;width:100%;transform:translateY(","px);\">\n ","\n </div>\n </div>\n </div>\n "])),p?"loading":"",i,x,e(o,function(t){return t.key;},function(t){var o=r[t.index];return s.renderMeasuredItem(o,t.index,n,l,a,d,c,v,b,u,m);}));}},{key:"renderPlainOptions",value:function renderPlainOptions(o,i,e,r,n,l,a,d,p,c,$,v,b,u,m){return l&&!d&&0===o.length?s.renderNoResults(a,m):t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div class=\"combobox__options-plain\" @scroll=",">\n ","\n </div>\n </div>\n "])),d?"loading":"",p,o.map(function(t){return s.renderItem(t,i,e,r,n,c,$,v,b,u);}));}},{key:"renderNoResults",value:function renderNoResults(o,i){return t(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-results\" class=\"combobox__no-results\">\n <div part=\"no-results-title\" class=\"combobox__no-results-title\">\n ","\n </div>\n ","\n </div>\n </div>\n "])),o||"No result found",i?t(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<div part=\"no-results-subtitle\" class=\"combobox__no-results-subtitle\">","</div>"])),i):"");}},{key:"renderNoData",value:function renderNoData(o){return t(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-data\" class=\"combobox__no-results\">\n <div part=\"no-data-title\" class=\"combobox__no-results-title\">\n ","\n </div>\n </div>\n </div>\n "])),o||"No data available");}},{key:"renderMeasuredItem",value:function renderMeasuredItem(e,_s,r,n,l,a,d,p,c,$,v){var _e$description,_e$prefix,_e$suffix;if(!e)return t(_templateObject13||(_templateObject13=_taggedTemplateLiteral([""])));var b=a(e),u=l(e),m=(e===null||e===void 0?void 0:e.disabled)||!1,x=e===null||e===void 0?void 0:e.className,_=p?p(e):(_e$description=e===null||e===void 0?void 0:e.description)!==null&&_e$description!==void 0?_e$description:"",h=c?c(e):(_e$prefix=e===null||e===void 0?void 0:e.prefix)!==null&&_e$prefix!==void 0?_e$prefix:"",g=$?$(e):(_e$suffix=e===null||e===void 0?void 0:e.suffix)!==null&&_e$suffix!==void 0?_e$suffix:"";var f=!1;return f=n?Array.isArray(r)&&r.some(function(t){return String(t)===String(b);}):String(Array.isArray(r)?r[0]:r)===String(b),t(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <nile-option\n data-index=","\n value=","\n .selected=","\n .disabled=","\n .showCheckbox=","\n class=","\n .description=","\n .isDescriptionEnabled=","\n >\n ","\n ","\n ","\n </nile-option>\n "])),_s,b,f,m,n,i(_defineProperty({option:v!==null&&v!==void 0?v:!1},x!==null&&x!==void 0?x:"",!!x)),_,v,o(h),d?o(u):u,o(g));}},{key:"renderItem",value:function renderItem(e,_s2,r,n,l,a,d,p,c,$){var _e$description2,_e$prefix2,_e$suffix2;if(!e)return t(_templateObject15||(_templateObject15=_taggedTemplateLiteral([""])));var v=l(e),b=n(e),u=(e===null||e===void 0?void 0:e.disabled)||!1,m=e===null||e===void 0?void 0:e.className,x=d?d(e):(_e$description2=e===null||e===void 0?void 0:e.description)!==null&&_e$description2!==void 0?_e$description2:"",_=p?p(e):(_e$prefix2=e===null||e===void 0?void 0:e.prefix)!==null&&_e$prefix2!==void 0?_e$prefix2:"",h=c?c(e):(_e$suffix2=e===null||e===void 0?void 0:e.suffix)!==null&&_e$suffix2!==void 0?_e$suffix2:"";var g=!1;return g=r?Array.isArray(_s2)&&_s2.some(function(t){return String(t)===String(v);}):String(Array.isArray(_s2)?_s2[0]:_s2)===String(v),t(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n <nile-option\n value=","\n .selected=","\n .disabled=","\n .showCheckbox=","\n class=","\n .description=","\n .isDescriptionEnabled=","\n >\n ","\n ","\n ","\n </nile-option>\n "])),v,g,u,r,i(_defineProperty({option:$!==null&&$!==void 0?$:!1},m!==null&&m!==void 0?m:"",!!m)),x,$,o(_),a?o(b):b,o(h));}},{key:"renderVirtualizedGrid",value:function renderVirtualizedGrid(o,i,r,n,l,a,d,p,c,$,v,b,u,m){var x=o.length>0?o[0].start:0,_=m?"repeat(".concat(a,", ").concat(m,"px)"):"repeat(".concat(a,", 1fr)");return t(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div style=\"position:relative;height:","px;width:",";min-width:100%;\">\n <div style=\"position:absolute;top:0;left:0;width:",";min-width:100%;transform:translateY(","px);\">\n ","\n </div>\n </div>\n </div>\n "])),c?"loading":"",i,m?"max-content":"100%",m?"max-content":"100%",x,e(o,function(t){return t.key;},function(o){var i=o.index*a,e=r.slice(i,i+a);return t(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n <div class=\"combobox__grid-row\" style=\"display:grid;grid-template-columns:",";gap:4px;\">\n ","\n </div>\n "])),_,e.map(function(t){return s.renderItem(t,n,l,d,p,$,v,b,u);}));}));}},{key:"renderHorizontalGrid",value:function renderHorizontalGrid(o,i,r,n,l,a,d,p,c,$,v,b,u,m){var x=o.length>0?o[0].start:0;return t(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options combobox__options--horizontal ","\"\n >\n <div style=\"position:relative;width:","px;height:","px;\">\n <div style=\"position:absolute;top:0;left:0;height:100%;display:flex;transform:translateX(","px);\">\n ","\n </div>\n </div>\n </div>\n "])),$?"loading":"",i,38*a,x,e(o,function(t){return t.key;},function(o){var i=o.index*a,e=r.slice(i,i+a);return t(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n <div class=\"combobox__grid-col\" style=\"width:","px;flex-shrink:0;display:flex;flex-direction:column;\">\n ","\n </div>\n "])),d,e.map(function(t){return s.renderItem(t,n,l,p,c,v,b,u,m);}));}));}},{key:"renderAddCustomOption",value:function renderAddCustomOption(o,i){return t(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n <nile-option\n value=","\n class=\"combobox__add-option\"\n .showCheckbox=","\n >\n + Add \"","\"\n </nile-option>\n "])),o,i,o);}},{key:"shouldUseVirtualizer",value:function shouldUseVirtualizer(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return o>1||t.length>=5;}}]);}());}};});
|
|
1
|
+
System.register(["lit","lit/directives/unsafe-html.js","lit/directives/class-map.js","lit/directives/repeat.js"],function(_export,_context){"use strict";var t,o,i,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,e;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_lit){t=_lit.html;},function(_litDirectivesUnsafeHtmlJs){o=_litDirectivesUnsafeHtmlJs.unsafeHTML;},function(_litDirectivesClassMapJs){i=_litDirectivesClassMapJs.classMap;},function(_litDirectivesRepeatJs){s=_litDirectivesRepeatJs.repeat;}],execute:function execute(){_export("C",e=/*#__PURE__*/function(){function e(){_classCallCheck(this,e);}return _createClass(e,null,[{key:"renderGroupHeader",value:function renderGroupHeader(o){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"group-header\"\n class=\"combobox__group-header\"\n role=\"presentation\"\n data-group-id=","\n style=","\n >\n ","\n <span class=\"combobox__group-label\">","</span>\n </div>\n "])),o.id,"--group-depth:".concat(o.depth),o.prefix?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-icon\n class=\"combobox__group-prefix\"\n name=","\n size=\"14\"\n method=\"fill\"\n ></nile-icon>"])),o.prefix):"",o.label);}},{key:"renderRowsPlain",value:function renderRowsPlain(o,i,s,r,n,l,a,d,p,c,v,$,b,u,m){return l&&!d&&0===o.length?e.renderNoResults(a,m):t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div class=\"combobox__options-plain\" @scroll=",">\n ","\n </div>\n </div>\n "])),d?"loading":"",p,o.map(function(t){return"header"===t.kind?e.renderGroupHeader(t):e.renderItem(t.item,i,s,r,n,c,v,$,b,u);}));}},{key:"renderRowsVirtualized",value:function renderRowsVirtualized(o,i,r,n,l,a,d,p,c,v,$,b,u,m){var x=arguments.length>14&&arguments[14]!==undefined?arguments[14]:-1;return t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div style=\"position:relative;height:","px;width:100%;\">\n ","\n ","\n </div>\n </div>\n "])),p?"loading":"",i,m!==null&&m!==void 0?m:"",s(o,function(t){return t.key;},function(o){var i=r[o.index];if(!i)return t(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""])));var s="position:absolute;top:0;left:0;right:0;transform:translateY(".concat(o.start,"px);height:").concat(o.size,"px;");if("header"===i.kind){var _r=o.index===x?"".concat(s,"visibility:hidden;"):s;return t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div style="," class=\"combobox__group-header-slot\">\n ","\n </div>\n "])),_r,e.renderGroupHeader(i));}return t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <div style=",">\n ","\n </div>\n "])),s,e.renderItem(i.item,n,l,a,d,c,v,$,b,u));}));}},{key:"renderVirtualizedOptions",value:function renderVirtualizedOptions(o,i,r,n,l,a,d,p,c,v,$,b,u){return t(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div style=\"position:relative;height:","px;width:100%;\">\n ","\n </div>\n </div>\n "])),p?"loading":"",i,s(o,function(t){return t.key;},function(o){var i=r[o.index],s="position:absolute;top:0;left:0;right:0;transform:translateY(".concat(o.start,"px);height:").concat(o.size,"px;");return t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div style=",">\n ","\n </div>\n "])),s,e.renderItem(i,n,l,a,d,c,v,$,b,u));}));}},{key:"renderPlainOptions",value:function renderPlainOptions(o,i,s,r,n,l,a,d,p,c,v,$,b,u,m){return l&&!d&&0===o.length?e.renderNoResults(a,m):t(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div class=\"combobox__options-plain\" @scroll=",">\n ","\n </div>\n </div>\n "])),d?"loading":"",p,o.map(function(t){return e.renderItem(t,i,s,r,n,c,v,$,b,u);}));}},{key:"renderNoResults",value:function renderNoResults(o,i){return t(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-results\" class=\"combobox__no-results\">\n <div part=\"no-results-title\" class=\"combobox__no-results-title\">\n ","\n </div>\n ","\n </div>\n </div>\n "])),o||"No result found",i?t(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["<div part=\"no-results-subtitle\" class=\"combobox__no-results-subtitle\">","</div>"])),i):"");}},{key:"renderNoData",value:function renderNoData(o){return t(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-data\" class=\"combobox__no-results\">\n <div part=\"no-data-title\" class=\"combobox__no-results-title\">\n ","\n </div>\n </div>\n </div>\n "])),o||"No data available");}},{key:"renderItem",value:function renderItem(s,_e,r,n,l,a,d,p,c,v){var _s$description,_s$prefix,_s$suffix;if(!s)return t(_templateObject14||(_templateObject14=_taggedTemplateLiteral([""])));var $=l(s),b=n(s),u=(s===null||s===void 0?void 0:s.disabled)||!1,m=s===null||s===void 0?void 0:s.className,x=d?d(s):(_s$description=s===null||s===void 0?void 0:s.description)!==null&&_s$description!==void 0?_s$description:"",_=p?p(s):(_s$prefix=s===null||s===void 0?void 0:s.prefix)!==null&&_s$prefix!==void 0?_s$prefix:"",h=c?c(s):(_s$suffix=s===null||s===void 0?void 0:s.suffix)!==null&&_s$suffix!==void 0?_s$suffix:"";var g=!1;return g=r?Array.isArray(_e)&&_e.some(function(t){return String(t)===String($);}):String(Array.isArray(_e)?_e[0]:_e)===String($),t(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["\n <nile-option\n value=","\n .selected=","\n .disabled=","\n .showCheckbox=","\n class=","\n .description=","\n .isDescriptionEnabled=","\n >\n ","\n ","\n ","\n </nile-option>\n "])),$,g,u,r,i(_defineProperty({option:v!==null&&v!==void 0?v:!1},m!==null&&m!==void 0?m:"",!!m)),x,v,o(_),a?o(b):b,o(h));}},{key:"renderVirtualizedGrid",value:function renderVirtualizedGrid(o,i,r,n,l,a,d,p,c,v,$,b,u,m){var x=o.length>0?o[0].start:0,_=m?"repeat(".concat(a,", ").concat(m,"px)"):"repeat(".concat(a,", 1fr)");return t(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options ","\"\n >\n <div style=\"position:relative;height:","px;width:",";min-width:100%;\">\n <div style=\"position:absolute;top:0;left:0;width:",";min-width:100%;transform:translateY(","px);\">\n ","\n </div>\n </div>\n </div>\n "])),c?"loading":"",i,m?"max-content":"100%",m?"max-content":"100%",x,s(o,function(t){return t.key;},function(o){var i=o.index*a,s=r.slice(i,i+a);return t(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n <div class=\"combobox__grid-row\" style=\"display:grid;grid-template-columns:",";gap:4px;\">\n ","\n </div>\n "])),_,s.map(function(t){return e.renderItem(t,n,l,d,p,v,$,b,u);}));}));}},{key:"renderHorizontalGrid",value:function renderHorizontalGrid(o,i,r,n,l,a,d,p,c,v,$,b,u,m){var x=o.length>0?o[0].start:0;return t(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n <div\n part=\"select-options\"\n class=\"combobox__options combobox__options--horizontal ","\"\n >\n <div style=\"position:relative;width:","px;height:","px;\">\n <div style=\"position:absolute;top:0;left:0;height:100%;display:flex;transform:translateX(","px);\">\n ","\n </div>\n </div>\n </div>\n "])),v?"loading":"",i,38*a,x,s(o,function(t){return t.key;},function(o){var i=o.index*a,s=r.slice(i,i+a);return t(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n <div class=\"combobox__grid-col\" style=\"width:","px;flex-shrink:0;display:flex;flex-direction:column;\">\n ","\n </div>\n "])),d,s.map(function(t){return e.renderItem(t,n,l,p,c,$,b,u,m);}));}));}},{key:"renderAddCustomOption",value:function renderAddCustomOption(o,i){return t(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n <nile-option\n value=","\n class=\"combobox__add-option\"\n .showCheckbox=","\n >\n + Add \"","\"\n </nile-option>\n "])),o,i,o);}},{key:"shouldUseVirtualizer",value:function shouldUseVirtualizer(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return o>1||t.length>=5;}}]);}());}};});
|
|
2
2
|
//# sourceMappingURL=renderer.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.cjs.js","sources":["../../../src/nile-combobox/renderer.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, type TemplateResult } from 'lit';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport type { VirtualItem } from '@tanstack/virtual-core';\nimport type { ComboboxRow, ComboboxHeaderRow } from './types';\n\nexport class ComboboxRenderer {\n\n static renderGroupHeader(row: ComboboxHeaderRow): TemplateResult {\n return html`\n <div\n part=\"group-header\"\n class=\"combobox__group-header\"\n role=\"presentation\"\n data-group-id=${row.id}\n style=${`--group-depth:${row.depth}`}\n >\n ${row.prefix\n ? html`<nile-icon\n class=\"combobox__group-prefix\"\n name=${row.prefix}\n size=\"14\"\n method=\"fill\"\n ></nile-icon>`\n : ''}\n <span class=\"combobox__group-label\">${row.label}</span>\n </div>\n `;\n }\n\n static renderRowsPlain(\n rows: ComboboxRow[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n showNoResults: boolean,\n noResultsMessage: string,\n isLoading: boolean,\n onScroll: (e: Event) => void,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n noResultsSubtitle?: string,\n ): TemplateResult {\n if (showNoResults && !isLoading && rows.length === 0) {\n return ComboboxRenderer.renderNoResults(noResultsMessage, noResultsSubtitle);\n }\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div class=\"combobox__options-plain\" @scroll=${onScroll}>\n ${rows.map((row) =>\n row.kind === 'header'\n ? ComboboxRenderer.renderGroupHeader(row)\n : ComboboxRenderer.renderItem(\n row.item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n ),\n )}\n </div>\n </div>\n `;\n }\n\n static renderRowsVirtualized(\n virtualItems: VirtualItem[],\n totalSize: number,\n rows: ComboboxRow[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n ): TemplateResult {\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;height:${totalSize}px;width:100%;\">\n ${repeat(\n virtualItems,\n (vItem) => vItem.key,\n (vItem) => {\n const row = rows[vItem.index];\n if (!row) return html``;\n const posStyle =\n `position:absolute;top:0;left:0;right:0;` +\n `transform:translateY(${vItem.start}px);` +\n `height:${vItem.size}px;`;\n if (row.kind === 'header') {\n return html`\n <div style=${posStyle} class=\"combobox__group-header-slot\">\n ${ComboboxRenderer.renderGroupHeader(row)}\n </div>\n `;\n }\n return html`\n <div style=${posStyle}>\n ${ComboboxRenderer.renderItem(\n row.item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n )}\n </div>\n `;\n },\n )}\n </div>\n </div>\n `;\n }\n\n static renderVirtualizedOptions(\n virtualItems: VirtualItem[],\n totalSize: number,\n data: any[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n measureElement: (el: Element | null) => void,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n ): TemplateResult {\n const offsetTop = virtualItems.length > 0 ? virtualItems[0].start : 0;\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;height:${totalSize}px;width:100%;\">\n <div style=\"position:absolute;top:0;left:0;width:100%;transform:translateY(${offsetTop}px);\">\n ${repeat(\n virtualItems,\n (vItem) => vItem.key,\n (vItem) => {\n const item = data[vItem.index];\n return ComboboxRenderer.renderMeasuredItem(\n item, vItem.index, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n );\n },\n )}\n </div>\n </div>\n </div>\n `;\n }\n\n static renderPlainOptions(\n data: any[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n showNoResults: boolean,\n noResultsMessage: string,\n isLoading: boolean,\n onScroll: (e: Event) => void,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n noResultsSubtitle?: string,\n ): TemplateResult {\n if (showNoResults && !isLoading && data.length === 0) {\n return ComboboxRenderer.renderNoResults(noResultsMessage, noResultsSubtitle);\n }\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div class=\"combobox__options-plain\" @scroll=${onScroll}>\n ${data.map((item: any) =>\n ComboboxRenderer.renderItem(\n item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n ),\n )}\n </div>\n </div>\n `;\n }\n\n static renderNoResults(noResultsMessage: string, noResultsSubtitle?: string): TemplateResult {\n return html`\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-results\" class=\"combobox__no-results\">\n <div part=\"no-results-title\" class=\"combobox__no-results-title\">\n ${noResultsMessage || 'No result found'}\n </div>\n ${noResultsSubtitle\n ? html`<div part=\"no-results-subtitle\" class=\"combobox__no-results-subtitle\">${noResultsSubtitle}</div>`\n : ''}\n </div>\n </div>\n `;\n }\n\n static renderNoData(noDataMessage: string): TemplateResult {\n return html`\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-data\" class=\"combobox__no-results\">\n <div part=\"no-data-title\" class=\"combobox__no-results-title\">\n ${noDataMessage || 'No data available'}\n </div>\n </div>\n </div>\n `;\n }\n\n private static renderMeasuredItem(\n item: any,\n index: number,\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n ): TemplateResult {\n if (!item) return html``;\n\n const optionValue = getItemValue(item);\n const displayText = getDisplayText(item);\n const isDisabled = item?.disabled || false;\n const className = item?.className;\n const description = getItemDescription ? getItemDescription(item) : (item?.description ?? '');\n const prefix = getItemPrefix ? getItemPrefix(item) : (item?.prefix ?? '');\n const suffix = getItemSuffix ? getItemSuffix(item) : (item?.suffix ?? '');\n\n let isSelected = false;\n if (multiple) {\n isSelected = Array.isArray(value) && value.some(v => String(v) === String(optionValue));\n } else {\n isSelected = String(Array.isArray(value) ? value[0] : value) === String(optionValue);\n }\n\n return html`\n <nile-option\n data-index=${index}\n value=${optionValue}\n .selected=${isSelected}\n .disabled=${isDisabled}\n .showCheckbox=${multiple}\n class=${classMap({\n option: enableDescription ?? false,\n [className ?? '']: !!className,\n })}\n .description=${description}\n .isDescriptionEnabled=${enableDescription}\n >\n ${unsafeHTML(prefix)}\n ${allowHtmlLabel ? unsafeHTML(displayText) : displayText}\n ${unsafeHTML(suffix)}\n </nile-option>\n `;\n }\n\n static renderItem(\n item: any,\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n ): TemplateResult {\n if (!item) return html``;\n\n const optionValue = getItemValue(item);\n const displayText = getDisplayText(item);\n const isDisabled = item?.disabled || false;\n const className = item?.className;\n const description = getItemDescription ? getItemDescription(item) : (item?.description ?? '');\n const prefix = getItemPrefix ? getItemPrefix(item) : (item?.prefix ?? '');\n const suffix = getItemSuffix ? getItemSuffix(item) : (item?.suffix ?? '');\n\n let isSelected = false;\n if (multiple) {\n isSelected = Array.isArray(value) && value.some(v => String(v) === String(optionValue));\n } else {\n isSelected = String(Array.isArray(value) ? value[0] : value) === String(optionValue);\n }\n\n return html`\n <nile-option\n value=${optionValue}\n .selected=${isSelected}\n .disabled=${isDisabled}\n .showCheckbox=${multiple}\n class=${classMap({\n option: enableDescription ?? false,\n [className ?? '']: !!className,\n })}\n .description=${description}\n .isDescriptionEnabled=${enableDescription}\n >\n ${unsafeHTML(prefix)}\n ${allowHtmlLabel ? unsafeHTML(displayText) : displayText}\n ${unsafeHTML(suffix)}\n </nile-option>\n `;\n }\n\n static renderVirtualizedGrid(\n virtualItems: VirtualItem[],\n totalSize: number,\n data: any[],\n value: string | string[],\n multiple: boolean,\n gridColumns: number,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n gridColumnWidth?: number,\n ): TemplateResult {\n const offsetTop = virtualItems.length > 0 ? virtualItems[0].start : 0;\n const colTemplate = gridColumnWidth\n ? `repeat(${gridColumns}, ${gridColumnWidth}px)`\n : `repeat(${gridColumns}, 1fr)`;\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;height:${totalSize}px;width:${gridColumnWidth ? 'max-content' : '100%'};min-width:100%;\">\n <div style=\"position:absolute;top:0;left:0;width:${gridColumnWidth ? 'max-content' : '100%'};min-width:100%;transform:translateY(${offsetTop}px);\">\n ${repeat(\n virtualItems,\n (vItem) => vItem.key,\n (vItem) => {\n const rowStart = vItem.index * gridColumns;\n const rowItems = data.slice(rowStart, rowStart + gridColumns);\n return html`\n <div class=\"combobox__grid-row\" style=\"display:grid;grid-template-columns:${colTemplate};gap:4px;\">\n ${rowItems.map((item: any) =>\n ComboboxRenderer.renderItem(\n item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix,\n ),\n )}\n </div>\n `;\n },\n )}\n </div>\n </div>\n </div>\n `;\n }\n\n static renderHorizontalGrid(\n virtualItems: VirtualItem[],\n totalSize: number,\n data: any[],\n value: string | string[],\n multiple: boolean,\n gridRows: number,\n gridColumnWidth: number,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n ): TemplateResult {\n const offsetLeft = virtualItems.length > 0 ? virtualItems[0].start : 0;\n const rowHeight = 38;\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options combobox__options--horizontal ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;width:${totalSize}px;height:${rowHeight * gridRows}px;\">\n <div style=\"position:absolute;top:0;left:0;height:100%;display:flex;transform:translateX(${offsetLeft}px);\">\n ${repeat(\n virtualItems,\n (vCol) => vCol.key,\n (vCol) => {\n const colStart = vCol.index * gridRows;\n const colItems = data.slice(colStart, colStart + gridRows);\n return html`\n <div class=\"combobox__grid-col\" style=\"width:${gridColumnWidth}px;flex-shrink:0;display:flex;flex-direction:column;\">\n ${colItems.map((item: any) =>\n ComboboxRenderer.renderItem(\n item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix,\n ),\n )}\n </div>\n `;\n },\n )}\n </div>\n </div>\n </div>\n `;\n }\n\n static renderAddCustomOption(\n searchValue: string,\n multiple: boolean,\n ): TemplateResult {\n return html`\n <nile-option\n value=${searchValue}\n class=\"combobox__add-option\"\n .showCheckbox=${multiple}\n >\n + Add \"${searchValue}\"\n </nile-option>\n `;\n }\n\n static shouldUseVirtualizer(data: any[], gridColumns = 1): boolean {\n if (gridColumns > 1) return true;\n return data.length >= 5;\n }\n}\n"],"names":["ComboboxRenderer","s","_classCallCheck","_createClass","key","value","renderGroupHeader","row","html","_templateObject","_taggedTemplateLiteral","id","depth","prefix","_templateObject2","label","renderRowsPlain","rows","multiple","getDisplayText","getItemValue","showNoResults","noResultsMessage","isLoading","onScroll","allowHtmlLabel","getItemDescription","getItemPrefix","getItemSuffix","enableDescription","noResultsSubtitle","length","renderNoResults","_templateObject3","map","kind","renderItem","item","renderRowsVirtualized","virtualItems","totalSize","_templateObject4","repeat","vItem","index","_templateObject5","posStyle","concat","start","size","_templateObject6","_templateObject7","renderVirtualizedOptions","data","measureElement","offsetTop","_templateObject8","renderMeasuredItem","renderPlainOptions","_templateObject9","_templateObject10","_templateObject11","renderNoData","noDataMessage","_templateObject12","_templateObject13","optionValue","displayText","isDisabled","disabled","className","description","_e$description","_e$prefix","suffix","isSelected","Array","isArray","some","v","String","_templateObject14","classMap","option","unsafeHTML","_e$description2","_e$prefix2","_e$suffix2","_templateObject15","_templateObject16","renderVirtualizedGrid","gridColumns","gridColumnWidth","colTemplate","_templateObject17","rowStart","rowItems","slice","_templateObject18","renderHorizontalGrid","gridRows","offsetLeft","_templateObject19","vCol","colStart","colItems","_templateObject20","renderAddCustomOption","searchValue","_templateObject21","shouldUseVirtualizer","arguments","undefined"],"mappings":"2rEAcaA,CAEX,kCAAAC,EAAA,EAAAC,eAAA,MAAAD,CAAA,UAAAE,YAAA,CAAAF,CAAA,QAAAG,GAAA,qBAAAC,KAAA,CAAA,QAAA,CAAAC,iBAAOA,CAAkBC,CAAAA,CAAAA,CACvB,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,8QAKSH,CAAII,CAAAA,EAAAA,kBAAAA,MAAAA,CACKJ,CAAIK,CAAAA,KAAAA,EAE3BL,CAAAA,CAAIM,OACFL,CAAI,CAAAM,gBAAA,GAAAA,gBAAA,CAAAJ,sBAAA,+KAEKH,CAAIM,CAAAA,MAAAA,EAIb,EAAA,CACkCN,CAAIQ,CAAAA,KAAAA,EAG/C,CAED,GAAAX,GAAA,mBAAAC,KAAA,SAAA,CAAAW,eAAOA,CACLC,CAAAA,CACAZ,CACAa,CAAAA,CAAAA,CACAC,CACAC,CAAAA,CAAAA,CACAC,CACAC,CAAAA,CAAAA,CACAC,CACAC,CAAAA,CAAAA,CACAC,CACAC,CAAAA,CAAAA,CACAC,CACAC,CAAAA,CAAAA,CACAC,CACAC,CAAAA,CAAAA,CAAAA,CAEA,MAAIT,CAAAA,CAAAA,EAAAA,CAAkBE,CAA6B,EAAA,CAAA,GAAhBN,CAAKc,CAAAA,MAAAA,CAC/B/B,CAAiBgC,CAAAA,eAAAA,CAAgBV,CAAkBQ,CAAAA,CAAAA,CAAAA,CAGrDtB,CAAI,CAAAyB,gBAAA,GAAAA,gBAAA,CAAAvB,sBAAA,uNAGoBa,CAAAA,CAAY,SAAY,CAAA,EAAA,CAEJC,CAAAA,CAC3CP,CAAAA,CAAKiB,IAAK3B,SAAAA,CACG,QAAA,QAAA,GAAbA,EAAI4B,IACAnC,CAAAA,CAAAA,CAAiBM,kBAAkBC,CACnCP,C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A,CAAAA,CAAiBoC,UACfC,CAAAA,CAAAA,CAAMhC,CAAOa,CAAAA,CAAAA,CAAUC,CAAgBC,CAAAA,CAAAA,CACvCK,CAAgBC,CAAAA,CAAAA,CAAoBC,CACpCC,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,EAIP,CAAA,CAAA,EAOd,CAED,GAAAxB,GAAA,yBAAAC,KAAA,SAAOsG,CAAAA,qBAAAA,CACLC,CACA1F,CAAAA,CAAAA,CAAAA,CAEA,MAAOV,CAAAA,CAAI,CAAAqG,iBAAA,GAAAA,iBAAA,CAAAnG,sBAAA,8KAECkG,CAAAA,CAEQ1F,CAAAA,CAEP0F,CAAAA,EAGd,CAED,GAAAxG,GAAA,wBAAAC,KAAA,SAAA,CAAAyG,oBAAOA,CAAqBzD,CAAAA,CAA2B,IAAdsC,CAAAA,CAAc,CAAAoB,SAAA,CAAAhF,MAAA,IAAAgF,SAAA,MAAAC,SAAA,CAAAD,SAAA,IAAA,CAAA,CACrD,MAAIpB,CAAAA,CAAAA,CAAc,CACXtC,EAAAA,CAAAA,CAAKtB,MAAU,EAAA,CACvB"}
|
|
1
|
+
{"version":3,"file":"renderer.cjs.js","sources":["../../../src/nile-combobox/renderer.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, type TemplateResult } from 'lit';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport type { VirtualItem } from '@tanstack/virtual-core';\nimport type { ComboboxRow, ComboboxHeaderRow } from './types';\n\nexport class ComboboxRenderer {\n\n static renderGroupHeader(row: ComboboxHeaderRow): TemplateResult {\n return html`\n <div\n part=\"group-header\"\n class=\"combobox__group-header\"\n role=\"presentation\"\n data-group-id=${row.id}\n style=${`--group-depth:${row.depth}`}\n >\n ${row.prefix\n ? html`<nile-icon\n class=\"combobox__group-prefix\"\n name=${row.prefix}\n size=\"14\"\n method=\"fill\"\n ></nile-icon>`\n : ''}\n <span class=\"combobox__group-label\">${row.label}</span>\n </div>\n `;\n }\n\n static renderRowsPlain(\n rows: ComboboxRow[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n showNoResults: boolean,\n noResultsMessage: string,\n isLoading: boolean,\n onScroll: (e: Event) => void,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n noResultsSubtitle?: string,\n ): TemplateResult {\n if (showNoResults && !isLoading && rows.length === 0) {\n return ComboboxRenderer.renderNoResults(noResultsMessage, noResultsSubtitle);\n }\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div class=\"combobox__options-plain\" @scroll=${onScroll}>\n ${rows.map((row) =>\n row.kind === 'header'\n ? ComboboxRenderer.renderGroupHeader(row)\n : ComboboxRenderer.renderItem(\n row.item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n ),\n )}\n </div>\n </div>\n `;\n }\n\n static renderRowsVirtualized(\n virtualItems: VirtualItem[],\n totalSize: number,\n rows: ComboboxRow[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n stickyOverlay?: TemplateResult,\n stickyIndex = -1,\n ): TemplateResult {\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;height:${totalSize}px;width:100%;\">\n ${stickyOverlay ?? ''}\n ${repeat(\n virtualItems,\n (vItem) => vItem.key,\n (vItem) => {\n const row = rows[vItem.index];\n if (!row) return html``;\n const posStyle =\n `position:absolute;top:0;left:0;right:0;` +\n `transform:translateY(${vItem.start}px);` +\n `height:${vItem.size}px;`;\n if (row.kind === 'header') {\n const headerStyle =\n vItem.index === stickyIndex ? `${posStyle}visibility:hidden;` : posStyle;\n return html`\n <div style=${headerStyle} class=\"combobox__group-header-slot\">\n ${ComboboxRenderer.renderGroupHeader(row)}\n </div>\n `;\n }\n return html`\n <div style=${posStyle}>\n ${ComboboxRenderer.renderItem(\n row.item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n )}\n </div>\n `;\n },\n )}\n </div>\n </div>\n `;\n }\n\n static renderVirtualizedOptions(\n virtualItems: VirtualItem[],\n totalSize: number,\n data: any[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n ): TemplateResult {\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;height:${totalSize}px;width:100%;\">\n ${repeat(\n virtualItems,\n (vItem) => vItem.key,\n (vItem) => {\n const item = data[vItem.index];\n const posStyle =\n `position:absolute;top:0;left:0;right:0;` +\n `transform:translateY(${vItem.start}px);` +\n `height:${vItem.size}px;`;\n return html`\n <div style=${posStyle}>\n ${ComboboxRenderer.renderItem(\n item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n )}\n </div>\n `;\n },\n )}\n </div>\n </div>\n `;\n }\n\n static renderPlainOptions(\n data: any[],\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n showNoResults: boolean,\n noResultsMessage: string,\n isLoading: boolean,\n onScroll: (e: Event) => void,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n noResultsSubtitle?: string,\n ): TemplateResult {\n if (showNoResults && !isLoading && data.length === 0) {\n return ComboboxRenderer.renderNoResults(noResultsMessage, noResultsSubtitle);\n }\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div class=\"combobox__options-plain\" @scroll=${onScroll}>\n ${data.map((item: any) =>\n ComboboxRenderer.renderItem(\n item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix, enableDescription,\n ),\n )}\n </div>\n </div>\n `;\n }\n\n static renderNoResults(noResultsMessage: string, noResultsSubtitle?: string): TemplateResult {\n return html`\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-results\" class=\"combobox__no-results\">\n <div part=\"no-results-title\" class=\"combobox__no-results-title\">\n ${noResultsMessage || 'No result found'}\n </div>\n ${noResultsSubtitle\n ? html`<div part=\"no-results-subtitle\" class=\"combobox__no-results-subtitle\">${noResultsSubtitle}</div>`\n : ''}\n </div>\n </div>\n `;\n }\n\n static renderNoData(noDataMessage: string): TemplateResult {\n return html`\n <div part=\"select-options\" class=\"combobox__options\">\n <div part=\"no-data\" class=\"combobox__no-results\">\n <div part=\"no-data-title\" class=\"combobox__no-results-title\">\n ${noDataMessage || 'No data available'}\n </div>\n </div>\n </div>\n `;\n }\n\n static renderItem(\n item: any,\n value: string | string[],\n multiple: boolean,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n enableDescription?: boolean,\n ): TemplateResult {\n if (!item) return html``;\n\n const optionValue = getItemValue(item);\n const displayText = getDisplayText(item);\n const isDisabled = item?.disabled || false;\n const className = item?.className;\n const description = getItemDescription ? getItemDescription(item) : (item?.description ?? '');\n const prefix = getItemPrefix ? getItemPrefix(item) : (item?.prefix ?? '');\n const suffix = getItemSuffix ? getItemSuffix(item) : (item?.suffix ?? '');\n\n let isSelected = false;\n if (multiple) {\n isSelected = Array.isArray(value) && value.some(v => String(v) === String(optionValue));\n } else {\n isSelected = String(Array.isArray(value) ? value[0] : value) === String(optionValue);\n }\n\n return html`\n <nile-option\n value=${optionValue}\n .selected=${isSelected}\n .disabled=${isDisabled}\n .showCheckbox=${multiple}\n class=${classMap({\n option: enableDescription ?? false,\n [className ?? '']: !!className,\n })}\n .description=${description}\n .isDescriptionEnabled=${enableDescription}\n >\n ${unsafeHTML(prefix)}\n ${allowHtmlLabel ? unsafeHTML(displayText) : displayText}\n ${unsafeHTML(suffix)}\n </nile-option>\n `;\n }\n\n static renderVirtualizedGrid(\n virtualItems: VirtualItem[],\n totalSize: number,\n data: any[],\n value: string | string[],\n multiple: boolean,\n gridColumns: number,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n gridColumnWidth?: number,\n ): TemplateResult {\n const offsetTop = virtualItems.length > 0 ? virtualItems[0].start : 0;\n const colTemplate = gridColumnWidth\n ? `repeat(${gridColumns}, ${gridColumnWidth}px)`\n : `repeat(${gridColumns}, 1fr)`;\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;height:${totalSize}px;width:${gridColumnWidth ? 'max-content' : '100%'};min-width:100%;\">\n <div style=\"position:absolute;top:0;left:0;width:${gridColumnWidth ? 'max-content' : '100%'};min-width:100%;transform:translateY(${offsetTop}px);\">\n ${repeat(\n virtualItems,\n (vItem) => vItem.key,\n (vItem) => {\n const rowStart = vItem.index * gridColumns;\n const rowItems = data.slice(rowStart, rowStart + gridColumns);\n return html`\n <div class=\"combobox__grid-row\" style=\"display:grid;grid-template-columns:${colTemplate};gap:4px;\">\n ${rowItems.map((item: any) =>\n ComboboxRenderer.renderItem(\n item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix,\n ),\n )}\n </div>\n `;\n },\n )}\n </div>\n </div>\n </div>\n `;\n }\n\n static renderHorizontalGrid(\n virtualItems: VirtualItem[],\n totalSize: number,\n data: any[],\n value: string | string[],\n multiple: boolean,\n gridRows: number,\n gridColumnWidth: number,\n getDisplayText: (item: any) => string,\n getItemValue: (item: any) => string,\n isLoading: boolean,\n allowHtmlLabel: boolean,\n getItemDescription?: (item: any) => string,\n getItemPrefix?: (item: any) => string,\n getItemSuffix?: (item: any) => string,\n ): TemplateResult {\n const offsetLeft = virtualItems.length > 0 ? virtualItems[0].start : 0;\n const rowHeight = 38;\n\n return html`\n <div\n part=\"select-options\"\n class=\"combobox__options combobox__options--horizontal ${isLoading ? 'loading' : ''}\"\n >\n <div style=\"position:relative;width:${totalSize}px;height:${rowHeight * gridRows}px;\">\n <div style=\"position:absolute;top:0;left:0;height:100%;display:flex;transform:translateX(${offsetLeft}px);\">\n ${repeat(\n virtualItems,\n (vCol) => vCol.key,\n (vCol) => {\n const colStart = vCol.index * gridRows;\n const colItems = data.slice(colStart, colStart + gridRows);\n return html`\n <div class=\"combobox__grid-col\" style=\"width:${gridColumnWidth}px;flex-shrink:0;display:flex;flex-direction:column;\">\n ${colItems.map((item: any) =>\n ComboboxRenderer.renderItem(\n item, value, multiple, getDisplayText, getItemValue,\n allowHtmlLabel, getItemDescription, getItemPrefix,\n getItemSuffix,\n ),\n )}\n </div>\n `;\n },\n )}\n </div>\n </div>\n </div>\n `;\n }\n\n static renderAddCustomOption(\n searchValue: string,\n multiple: boolean,\n ): TemplateResult {\n return html`\n <nile-option\n value=${searchValue}\n class=\"combobox__add-option\"\n .showCheckbox=${multiple}\n >\n + Add \"${searchValue}\"\n </nile-option>\n `;\n }\n\n static shouldUseVirtualizer(data: any[], gridColumns = 1): boolean {\n if (gridColumns > 1) return true;\n return data.length >= 5;\n }\n}\n"],"names":["ComboboxRenderer","e","_classCallCheck","_createClass","key","value","renderGroupHeader","row","html","_templateObject","_taggedTemplateLiteral","id","depth","prefix","_templateObject2","label","renderRowsPlain","rows","multiple","getDisplayText","getItemValue","showNoResults","noResultsMessage","isLoading","onScroll","allowHtmlLabel","getItemDescription","getItemPrefix","getItemSuffix","enableDescription","noResultsSubtitle","length","renderNoResults","_templateObject3","map","kind","renderItem","item","renderRowsVirtualized","virtualItems","totalSize","stickyOverlay","stickyIndex","arguments","undefined","_templateObject4","repeat","vItem","index","_templateObject5","posStyle","concat","start","size","headerStyle","_templateObject6","_templateObject7","renderVirtualizedOptions","data","_templateObject8","_templateObject9","renderPlainOptions","_templateObject10","_templateObject11","_templateObject12","renderNoData","noDataMessage","_templateObject13","_s$description","_s$prefix","_s$suffix","_templateObject14","optionValue","displayText","isDisabled","disabled","className","description","suffix","isSelected","Array","isArray","some","v","String","_templateObject15","classMap","option","unsafeHTML","renderVirtualizedGrid","gridColumns","gridColumnWidth","offsetTop","colTemplate","_templateObject16","rowStart","rowItems","slice","_templateObject17","renderHorizontalGrid","gridRows","offsetLeft","_templateObject18","vCol","colStart","colItems","_templateObject19","renderAddCustomOption","searchValue","_templateObject20","shouldUseVirtualizer"],"mappings":"yqEAcaA,CAEX,kCAAAC,EAAA,EAAAC,eAAA,MAAAD,CAAA,UAAAE,YAAA,CAAAF,CAAA,QAAAG,GAAA,qBAAAC,KAAA,CAAA,QAAA,CAAAC,iBAAOA,CAAkBC,CAAAA,CAAAA,CACvB,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,8QAKSH,CAAII,CAAAA,EAAAA,kBAAAA,MAAAA,CACKJ,CAAIK,CAAAA,KAAAA,EAE3BL,CAAAA,CAAIM,OACFL,CAAI,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A,CAAAA,CAAKvD,KAAQoD,CAAAA,CAAAA,CACxBK,EAAW/C,CAAKuC,CAAAA,KAAAA,CAAMO,EAAUA,CAAWJ,CAAAA,CAAAA,CAAAA,CACjD,MAAO5F,CAAAA,CAAI,CAAAkG,iBAAA,GAAAA,iBAAA,CAAAhG,sBAAA,2MACsCiF,CAAAA,CAC3Cc,CAASvE,CAAAA,GAAAA,CAAKG,SAAAA,CACdrC,QAAAA,CAAAA,CAAAA,CAAiBoC,UACfC,CAAAA,CAAAA,CAAMhC,CAAOa,CAAAA,CAAAA,CAAUC,CAAgBC,CAAAA,CAAAA,CACvCK,CAAgBC,CAAAA,CAAAA,CAAoBC,CACpCC,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,EAIP,CAAA,CAAA,EAOd,CAED,GAAAxB,GAAA,yBAAAC,KAAA,SAAOsG,CAAAA,qBAAAA,CACLC,CACA1F,CAAAA,CAAAA,CAAAA,CAEA,MAAOV,CAAAA,CAAI,CAAAqG,iBAAA,GAAAA,iBAAA,CAAAnG,sBAAA,8KAECkG,CAAAA,CAEQ1F,CAAAA,CAEP0F,CAAAA,EAGd,CAED,GAAAxG,GAAA,wBAAAC,KAAA,SAAA,CAAAyG,oBAAOA,CAAqBpD,CAAAA,CAA2B,IAAdgC,CAAAA,CAAc,CAAA/C,SAAA,CAAAZ,MAAA,IAAAY,SAAA,MAAAC,SAAA,CAAAD,SAAA,IAAA,CAAA,CACrD,MAAI+C,CAAAA,CAAAA,CAAc,CACXhC,EAAAA,CAAAA,CAAK3B,MAAU,EAAA,CACvB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{html as t}from"lit";import{unsafeHTML as o}from"lit/directives/unsafe-html.js";import{classMap as i}from"lit/directives/class-map.js";import{repeat as
|
|
1
|
+
import{html as t}from"lit";import{unsafeHTML as o}from"lit/directives/unsafe-html.js";import{classMap as i}from"lit/directives/class-map.js";import{repeat as s}from"lit/directives/repeat.js";class e{static renderGroupHeader(o){return t`
|
|
2
2
|
<div
|
|
3
3
|
part="group-header"
|
|
4
4
|
class="combobox__group-header"
|
|
@@ -14,50 +14,53 @@ import{html as t}from"lit";import{unsafeHTML as o}from"lit/directives/unsafe-htm
|
|
|
14
14
|
></nile-icon>`:""}
|
|
15
15
|
<span class="combobox__group-label">${o.label}</span>
|
|
16
16
|
</div>
|
|
17
|
-
`}static renderRowsPlain(o,i,
|
|
17
|
+
`}static renderRowsPlain(o,i,s,r,n,l,a,d,p,c,v,$,b,u,m){return l&&!d&&0===o.length?e.renderNoResults(a,m):t`
|
|
18
18
|
<div
|
|
19
19
|
part="select-options"
|
|
20
20
|
class="combobox__options ${d?"loading":""}"
|
|
21
21
|
>
|
|
22
22
|
<div class="combobox__options-plain" @scroll=${p}>
|
|
23
|
-
${o.map((t=>"header"===t.kind?
|
|
23
|
+
${o.map((t=>"header"===t.kind?e.renderGroupHeader(t):e.renderItem(t.item,i,s,r,n,c,v,$,b,u)))}
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
|
-
`}static renderRowsVirtualized(o,i,r,n,l,a,d,p,c,$,
|
|
26
|
+
`}static renderRowsVirtualized(o,i,r,n,l,a,d,p,c,v,$,b,u,m,x=-1){return t`
|
|
27
27
|
<div
|
|
28
28
|
part="select-options"
|
|
29
29
|
class="combobox__options ${p?"loading":""}"
|
|
30
30
|
>
|
|
31
31
|
<div style="position:relative;height:${i}px;width:100%;">
|
|
32
|
-
${
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
${m??""}
|
|
33
|
+
${s(o,(t=>t.key),(o=>{const i=r[o.index];if(!i)return t``;const s=`position:absolute;top:0;left:0;right:0;transform:translateY(${o.start}px);height:${o.size}px;`;if("header"===i.kind){const r=o.index===x?`${s}visibility:hidden;`:s;return t`
|
|
34
|
+
<div style=${r} class="combobox__group-header-slot">
|
|
35
|
+
${e.renderGroupHeader(i)}
|
|
35
36
|
</div>
|
|
36
|
-
|
|
37
|
-
<div style=${
|
|
38
|
-
${
|
|
37
|
+
`}return t`
|
|
38
|
+
<div style=${s}>
|
|
39
|
+
${e.renderItem(i.item,n,l,a,d,c,v,$,b,u)}
|
|
39
40
|
</div>
|
|
40
41
|
`}))}
|
|
41
42
|
</div>
|
|
42
43
|
</div>
|
|
43
|
-
`}static renderVirtualizedOptions(o,i,r,n,l,a,d,p,c,$,
|
|
44
|
+
`}static renderVirtualizedOptions(o,i,r,n,l,a,d,p,c,v,$,b,u){return t`
|
|
44
45
|
<div
|
|
45
46
|
part="select-options"
|
|
46
47
|
class="combobox__options ${p?"loading":""}"
|
|
47
48
|
>
|
|
48
49
|
<div style="position:relative;height:${i}px;width:100%;">
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
${s(o,(t=>t.key),(o=>{const i=r[o.index],s=`position:absolute;top:0;left:0;right:0;transform:translateY(${o.start}px);height:${o.size}px;`;return t`
|
|
51
|
+
<div style=${s}>
|
|
52
|
+
${e.renderItem(i,n,l,a,d,c,v,$,b,u)}
|
|
53
|
+
</div>
|
|
54
|
+
`}))}
|
|
52
55
|
</div>
|
|
53
56
|
</div>
|
|
54
|
-
`}static renderPlainOptions(o,i,
|
|
57
|
+
`}static renderPlainOptions(o,i,s,r,n,l,a,d,p,c,v,$,b,u,m){return l&&!d&&0===o.length?e.renderNoResults(a,m):t`
|
|
55
58
|
<div
|
|
56
59
|
part="select-options"
|
|
57
60
|
class="combobox__options ${d?"loading":""}"
|
|
58
61
|
>
|
|
59
62
|
<div class="combobox__options-plain" @scroll=${p}>
|
|
60
|
-
${o.map((t=>
|
|
63
|
+
${o.map((t=>e.renderItem(t,i,s,r,n,c,v,$,b,u)))}
|
|
61
64
|
</div>
|
|
62
65
|
</div>
|
|
63
66
|
`}static renderNoResults(o,i){return t`
|
|
@@ -77,60 +80,45 @@ import{html as t}from"lit";import{unsafeHTML as o}from"lit/directives/unsafe-htm
|
|
|
77
80
|
</div>
|
|
78
81
|
</div>
|
|
79
82
|
</div>
|
|
80
|
-
`}static
|
|
83
|
+
`}static renderItem(s,e,r,n,l,a,d,p,c,v){if(!s)return t``;const $=l(s),b=n(s),u=s?.disabled||!1,m=s?.className,x=d?d(s):s?.description??"",_=p?p(s):s?.prefix??"",h=c?c(s):s?.suffix??"";let g=!1;return g=r?Array.isArray(e)&&e.some((t=>String(t)===String($))):String(Array.isArray(e)?e[0]:e)===String($),t`
|
|
81
84
|
<nile-option
|
|
82
|
-
|
|
83
|
-
value=${b}
|
|
84
|
-
.selected=${f}
|
|
85
|
-
.disabled=${m}
|
|
86
|
-
.showCheckbox=${n}
|
|
87
|
-
class=${i({option:v??!1,[x??""]:!!x})}
|
|
88
|
-
.description=${_}
|
|
89
|
-
.isDescriptionEnabled=${v}
|
|
90
|
-
>
|
|
91
|
-
${o(h)}
|
|
92
|
-
${d?o(u):u}
|
|
93
|
-
${o(g)}
|
|
94
|
-
</nile-option>
|
|
95
|
-
`}static renderItem(e,s,r,n,l,a,d,p,c,$){if(!e)return t``;const v=l(e),b=n(e),u=e?.disabled||!1,m=e?.className,x=d?d(e):e?.description??"",_=p?p(e):e?.prefix??"",h=c?c(e):e?.suffix??"";let g=!1;return g=r?Array.isArray(s)&&s.some((t=>String(t)===String(v))):String(Array.isArray(s)?s[0]:s)===String(v),t`
|
|
96
|
-
<nile-option
|
|
97
|
-
value=${v}
|
|
85
|
+
value=${$}
|
|
98
86
|
.selected=${g}
|
|
99
87
|
.disabled=${u}
|
|
100
88
|
.showCheckbox=${r}
|
|
101
|
-
class=${i({option
|
|
89
|
+
class=${i({option:v??!1,[m??""]:!!m})}
|
|
102
90
|
.description=${x}
|
|
103
|
-
.isDescriptionEnabled=${
|
|
91
|
+
.isDescriptionEnabled=${v}
|
|
104
92
|
>
|
|
105
93
|
${o(_)}
|
|
106
94
|
${a?o(b):b}
|
|
107
95
|
${o(h)}
|
|
108
96
|
</nile-option>
|
|
109
|
-
`}static renderVirtualizedGrid(o,i,r,n,l,a,d,p,c,$,
|
|
97
|
+
`}static renderVirtualizedGrid(o,i,r,n,l,a,d,p,c,v,$,b,u,m){const x=o.length>0?o[0].start:0,_=m?`repeat(${a}, ${m}px)`:`repeat(${a}, 1fr)`;return t`
|
|
110
98
|
<div
|
|
111
99
|
part="select-options"
|
|
112
100
|
class="combobox__options ${c?"loading":""}"
|
|
113
101
|
>
|
|
114
102
|
<div style="position:relative;height:${i}px;width:${m?"max-content":"100%"};min-width:100%;">
|
|
115
103
|
<div style="position:absolute;top:0;left:0;width:${m?"max-content":"100%"};min-width:100%;transform:translateY(${x}px);">
|
|
116
|
-
${
|
|
104
|
+
${s(o,(t=>t.key),(o=>{const i=o.index*a,s=r.slice(i,i+a);return t`
|
|
117
105
|
<div class="combobox__grid-row" style="display:grid;grid-template-columns:${_};gap:4px;">
|
|
118
|
-
${
|
|
106
|
+
${s.map((t=>e.renderItem(t,n,l,d,p,v,$,b,u)))}
|
|
119
107
|
</div>
|
|
120
108
|
`}))}
|
|
121
109
|
</div>
|
|
122
110
|
</div>
|
|
123
111
|
</div>
|
|
124
|
-
`}static renderHorizontalGrid(o,i,r,n,l,a,d,p,c,$,
|
|
112
|
+
`}static renderHorizontalGrid(o,i,r,n,l,a,d,p,c,v,$,b,u,m){const x=o.length>0?o[0].start:0;return t`
|
|
125
113
|
<div
|
|
126
114
|
part="select-options"
|
|
127
|
-
class="combobox__options combobox__options--horizontal ${
|
|
115
|
+
class="combobox__options combobox__options--horizontal ${v?"loading":""}"
|
|
128
116
|
>
|
|
129
117
|
<div style="position:relative;width:${i}px;height:${38*a}px;">
|
|
130
118
|
<div style="position:absolute;top:0;left:0;height:100%;display:flex;transform:translateX(${x}px);">
|
|
131
|
-
${
|
|
119
|
+
${s(o,(t=>t.key),(o=>{const i=o.index*a,s=r.slice(i,i+a);return t`
|
|
132
120
|
<div class="combobox__grid-col" style="width:${d}px;flex-shrink:0;display:flex;flex-direction:column;">
|
|
133
|
-
${
|
|
121
|
+
${s.map((t=>e.renderItem(t,n,l,p,c,$,b,u,m)))}
|
|
134
122
|
</div>
|
|
135
123
|
`}))}
|
|
136
124
|
</div>
|
|
@@ -144,4 +132,4 @@ import{html as t}from"lit";import{unsafeHTML as o}from"lit/directives/unsafe-htm
|
|
|
144
132
|
>
|
|
145
133
|
+ Add "${o}"
|
|
146
134
|
</nile-option>
|
|
147
|
-
`}static shouldUseVirtualizer(t,o=1){return o>1||t.length>=5}}export{
|
|
135
|
+
`}static shouldUseVirtualizer(t,o=1){return o>1||t.length>=5}}export{e as C};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","lit/directives/class-map.js","./nile-empty-state.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/if-defined.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,o,a,n,l,r,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,c;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;s=_lit.nothing;},function(_litDecoratorsJs){e=_litDecoratorsJs.property;o=_litDecoratorsJs.customElement;},function(_litDirectivesClassMapJs){a=_litDirectivesClassMapJs.classMap;},function(_nileEmptyStateCssCjsJs){n=_nileEmptyStateCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_litDirectivesIfDefinedJs){r=_litDirectivesIfDefinedJs.ifDefined;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",c=/*#__PURE__*/function(_l){function c(){var _this;_classCallCheck(this,c);_this=_callSuper(this,c,arguments),_this.size="md",_this.variant="tonal",_this.icon="var(--nile-icon-error, var(--ng-icon-x-circle))",_this.grayscale=!1,_this.text="Empty State",_this.subText="No Data",_this.svgIconSize=40;return _this;}_inherits(c,_l);return _createClass(c,[{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div part=\"container\" class=\"","\">\n <div part=\"body\" class=\"","\">\n\n ","\n\n ","\n\n ","\n\n <div part=\"text-section\" class=\"empty__state__text-section\">\n <div part=\"text\" class=\"empty-state__text\">","</div>\n <div part=\"subtitle\" class=\"empty-state__subtext\">","</div>\n </div>\n </div>\n\n <div part=\"actions\" class=\"empty-state-actions\">\n <slot></slot>\n </div>\n </div>\n "])),a({"empty-state":!0,"empty-state--sm":"sm"==this.size,"empty-state--md":"md"==this.size,"empty-state--lg":"lg"==this.size}),a({"empty-state__body":!0}),"content"==this.variant?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <div part=\"content-image\" class=\"empty-state__body--content\">\n ","\n </div>"])),this.icon||this.svgIconUrl?i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div part=\"icon-wrapper\" class=\"empty-state__img__icon\">\n ","\n </div>"])),this.svgIconUrl?i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-icon customSvgPath=\"","\" size=\"","\" color=\"","\" noFill></nile-icon>\n <!-- <nile-icon customSvgPath=\"","\" size=\"","\" color=\"","\"></nile-icon> -->\n "])),this.svgIconUrl,this.svgIconSize,r(this.svgIconColor),this.svgIconUrl,this.svgIconSize,this.svgIconColor?this.svgIconColor:"#ddd"):i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-icon name=\"","\" color=\"white\" size=\"","\"></nile-icon>\n "])),this.icon,"sm"==this.size||"md"==this.size?24:28)):s):s,"tonal"==this.variant?i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div part=\"tonal-body\" class=\"empty-state__body--tonal\">\n ","\n </div>"])),this.svgIconUrl?i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-icon customSvgPath=\"","\" size=\"","\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" color=\"","\" noFill></nile-icon>\n "])),this.svgIconUrl,this.svgIconSize,r(this.svgIconColor)):i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-icon name=\"","\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" size=\"40\"></nile-icon>\n "])),this.icon)):s,"flat"==this.variant?i(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div part=\"flat-body\" class=\"empty-state__body--flat\">\n\t\t\t\t\t<span class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t","\n\t\t\t\t\t</span>\n </div>"])),this.svgIconUrl?i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <nile-icon customSvgPath=\"","\" size=\"","\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" variant=\"secondary\" color=\"","\" noFill></nile-icon>\n "])),this.svgIconUrl,this.svgIconSize,r(this.svgIconColor)):i(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <nile-icon name=\"","\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" size=\"","\" variant=\"secondary\"></nile-icon>\n "])),this.icon,"sm"==this.size||"md"==this.size?24:28)):s,this.text,this.subText);}}],[{key:"styles",get:function get(){return[n];}}]);}(l));t([e()],c.prototype,"size",void 0),t([e()],c.prototype,"variant",void 0),t([e()],c.prototype,"icon",void 0),t([e({type:Boolean})],c.prototype,"grayscale",void 0),t([e()],c.prototype,"text",void 0),t([e({attribute:"sub-text"})],c.prototype,"subText",void 0),t([e()],c.prototype,"svgIconUrl",void 0),t([e({type:Number})],c.prototype,"svgIconSize",void 0),t([e({type:String})],c.prototype,"svgIconColor",void 0),_export("N",c=t([o("nile-empty-state")],c));}};});
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","lit/directives/class-map.js","./nile-empty-state.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/if-defined.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,e,i,s,r,o,n,a,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,c,p,h;function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;i=_lit.nothing;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;r=_litDecoratorsJs.customElement;},function(_litDirectivesClassMapJs){o=_litDirectivesClassMapJs.classMap;},function(_nileEmptyStateCssCjsJs){n=_nileEmptyStateCssCjsJs.s;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_litDirectivesIfDefinedJs){l=_litDirectivesIfDefinedJs.ifDefined;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){c={empty:{icon:"ng-database",tone:"neutral",role:"status",live:"polite",text:"No data yet",subText:"Rows appear here once there's something to show."},"no-results":{icon:"ng-search-lg",tone:"neutral",role:"status",live:"polite",text:"No matches",subText:"Try removing a filter or broadening your search."},"not-found":{icon:"ng-file-06",tone:"warning",role:"status",live:"polite",text:"We couldn't find that",subText:"It may have been moved or deleted."},"no-access":{icon:"ng-lock",tone:"warning",role:"status",live:"polite",text:"You don't have access",subText:"Ask an admin to grant you access to this resource."},error:{icon:"ng-alert-circle",tone:"error",role:"alert",live:"assertive",text:"Something went wrong",subText:"We couldn't load this. Try again."},offline:{icon:"ng-cloud-off",tone:"error",role:"alert",live:"assertive",text:"Connection lost",subText:"Check your connection and try again."}},p={neutral:void 0,info:"var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600))",warning:"var(--nile-colors-yellow-700, var(--ng-colors-fg-warning-primary))",error:"var(--nile-colors-red-700, var(--ng-colors-fg-error-primary))"};_export("N",h=/*#__PURE__*/function(_a){function h(){var _this;_classCallCheck(this,h);_this=_callSuper(this,h,arguments),_this.size="md",_this.variant="tonal",_this.layout="stack",_this.bordered=!1;return _this;}_inherits(h,_a);return _createClass(h,[{key:"icon",get:function get(){var _ref,_this$_icon,_this$preset;return(_ref=(_this$_icon=this._icon)!==null&&_this$_icon!==void 0?_this$_icon:(_this$preset=this.preset)===null||_this$preset===void 0?void 0:_this$preset.icon)!==null&&_ref!==void 0?_ref:"ng-x-circle";},set:function set(t){var e=this.icon;this._icon=t!==null&&t!==void 0?t:void 0,this.requestUpdate("icon",e);}},{key:"text",get:function get(){var _ref2,_this$_text,_this$preset2;return(_ref2=(_this$_text=this._text)!==null&&_this$_text!==void 0?_this$_text:(_this$preset2=this.preset)===null||_this$preset2===void 0?void 0:_this$preset2.text)!==null&&_ref2!==void 0?_ref2:"Empty State";},set:function set(t){var e=this.text;this._text=t!==null&&t!==void 0?t:void 0,this.requestUpdate("text",e);}},{key:"subText",get:function get(){var _ref3,_this$_subText,_this$preset3;return(_ref3=(_this$_subText=this._subText)!==null&&_this$_subText!==void 0?_this$_subText:(_this$preset3=this.preset)===null||_this$preset3===void 0?void 0:_this$preset3.subText)!==null&&_ref3!==void 0?_ref3:"No Data";},set:function set(t){var e=this.subText;this._subText=t!==null&&t!==void 0?t:void 0,this.requestUpdate("subText",e);}},{key:"tone",get:function get(){var _ref4,_this$_tone,_this$preset4;return(_ref4=(_this$_tone=this._tone)!==null&&_this$_tone!==void 0?_this$_tone:(_this$preset4=this.preset)===null||_this$preset4===void 0?void 0:_this$preset4.tone)!==null&&_ref4!==void 0?_ref4:"neutral";},set:function set(t){var e=this.tone;this._tone=t!==null&&t!==void 0?t:void 0,this.requestUpdate("tone",e);}},{key:"preset",get:function get(){return this.status?c[this.status]:void 0;}},{key:"glyphColor",get:function get(){var _this$svgIconColor;return(_this$svgIconColor=this.svgIconColor)!==null&&_this$svgIconColor!==void 0?_this$svgIconColor:p[this.tone];}},{key:"liveRegion",get:function get(){var t=this.preset;if(t)return{role:t.role,live:t.live};}},{key:"renderGlyph",value:function renderGlyph(t){var _this$svgIconSize;var i=this.glyphColor;return this.svgIconUrl?e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-glyph\n customSvgPath=\"","\"\n size=\"","\"\n method=\"stroke\"\n color=\"","\"\n noFill\n ></nile-glyph>\n "])),this.svgIconUrl,(_this$svgIconSize=this.svgIconSize)!==null&&_this$svgIconSize!==void 0?_this$svgIconSize:t,l(i)):e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-glyph\n name=\"","\"\n method=\"stroke\"\n size=\"","\"\n color=\"","\"\n ></nile-glyph>\n "])),this.icon,t,l(i));}},{key:"render",value:function render(){var t=this.liveRegion,s="inline"===this.layout;return e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div part=\"container\" class=\"","\"\n role=\"","\"\n aria-live=\"","\"\n >\n <div part=\"body\" class=\"","\">\n\n ","\n\n ","\n\n ","\n\n ","\n\n <div part=\"text-section\" class=\"empty__state__text-section\">\n ","\n <div part=\"text\" class=\"empty-state__text\">","</div>\n <div part=\"subtitle\" class=\"empty-state__subtext\">","</div>\n </div>\n </div>\n\n <div part=\"actions\" class=\"empty-state-actions\">\n <slot></slot>\n </div>\n\n </div>\n "])),o(_defineProperty({"empty-state":!0,"empty-state--sm":"sm"==this.size,"empty-state--md":"md"==this.size,"empty-state--lg":"lg"==this.size,"empty-state--stack":"stack"===this.layout,"empty-state--inline":s,"empty-state--page":"page"===this.layout,"empty-state--bordered":this.bordered},"empty-state--tone-".concat(this.tone),!0)),l(t===null||t===void 0?void 0:t.role),l(t===null||t===void 0?void 0:t.live),o({"empty-state__body":!0}),s?e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <span part=\"inline-icon icon-chrome\" class=\"empty-state__body--inline\">\n ","\n </span>"])),this.renderGlyph(20)):i,s||"content"!=this.variant?i:e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <div part=\"content-image\" class=\"empty-state__body--content\">\n ","\n </div>"])),this.icon||this.svgIconUrl?e(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div part=\"icon-wrapper icon-chrome\" class=\"empty-state__img__icon\">\n ","\n </div>"])),this.renderGlyph("lg"==this.size?28:24)):i),s||"tonal"!=this.variant?i:e(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <div part=\"tonal-body icon-chrome\" class=\"empty-state__body--tonal\">\n ","\n </div>"])),this.renderGlyph(40)),s||"flat"!=this.variant?i:e(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <div part=\"flat-body\" class=\"empty-state__body--flat\">\n\t\t\t\t\t<span part=\"icon-chrome\" class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t","\n\t\t\t\t\t</span>\n </div>"])),this.renderGlyph("lg"==this.size?28:24)),this.code?e(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div part=\"code\" class=\"empty-state__code\">","</div>\n "])),this.code):i,this.text,this.subText);}}],[{key:"styles",get:function get(){return[n];}}]);}(a));t([s({type:String,attribute:!0})],h.prototype,"size",void 0),t([s({type:String,attribute:!0})],h.prototype,"variant",void 0),t([s({type:String,attribute:!0,reflect:!0})],h.prototype,"status",void 0),t([s({type:String,attribute:!0,reflect:!0})],h.prototype,"layout",void 0),t([s({type:String,attribute:!0})],h.prototype,"code",void 0),t([s({type:Boolean,attribute:!0,reflect:!0})],h.prototype,"bordered",void 0),t([s({type:String,attribute:!0})],h.prototype,"svgIconUrl",void 0),t([s({type:Number,attribute:!0})],h.prototype,"svgIconSize",void 0),t([s({type:String,attribute:!0})],h.prototype,"svgIconColor",void 0),t([s({type:String,attribute:!0})],h.prototype,"icon",null),t([s({type:String,attribute:!0})],h.prototype,"text",null),t([s({type:String,attribute:"sub-text"})],h.prototype,"subText",null),t([s({type:String,attribute:!0,reflect:!0})],h.prototype,"tone",null),_export("N",h=t([r("nile-empty-state")],h));}};});
|
|
2
2
|
//# sourceMappingURL=nile-empty-state.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-empty-state.cjs.js","sources":["../../../src/nile-empty-state/nile-empty-state.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, nothing, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-empty-state.css';\nimport NileElement from '../internal/nile-element';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n/**\n * Nile empty-state component.\n *\n * @tag nile-empty-state\n *\n */\n@customElement('nile-empty-state')\nexport class NileEmptyState extends NileElement {\n\n /**\n * The styles for nile-empty-state\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property() size: 'sm' | 'md' | 'lg' = 'md';\n\n @property() variant:\n | 'flat'\n | 'content'\n | 'tonal' = 'tonal';\n\n @property() icon: string = 'var(--nile-icon-error, var(--ng-icon-x-circle))';\n @property({type:Boolean}) grayscale: boolean = false;\n\n @property() text: String = 'Empty State';\n @property({attribute:'sub-text'}) subText: String = 'No Data';\n @property() svgIconUrl: string;\n @property({type: Number}) svgIconSize: number = 40;\n @property({type: String}) svgIconColor: string;\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n <div part=\"container\" class=\"${classMap({\n 'empty-state': true,\n 'empty-state--sm': this.size == 'sm',\n 'empty-state--md': this.size == 'md',\n 'empty-state--lg': this.size == 'lg'\n })}\">\n <div part=\"body\" class=\"${classMap({ 'empty-state__body': true })}\">\n\n ${this.variant == 'content' ? html`\n <div part=\"content-image\" class=\"empty-state__body--content\">\n ${!this.icon && !this.svgIconUrl ? nothing : html`\n <div part=\"icon-wrapper\" class=\"empty-state__img__icon\">\n ${this.svgIconUrl ? html`\n <nile-icon customSvgPath=\"${this.svgIconUrl}\" size=\"${this.svgIconSize}\" color=\"${ifDefined(this.svgIconColor)}\" noFill></nile-icon>\n <!-- <nile-icon customSvgPath=\"${this.svgIconUrl}\" size=\"${this.svgIconSize}\" color=\"${this.svgIconColor ? this.svgIconColor : '#ddd'}\"></nile-icon> -->\n ` : html`\n <nile-icon name=\"${this.icon}\" color=\"white\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\"></nile-icon>\n `}\n </div>`\n }\n </div>`: nothing\n }\n\n ${this.variant == 'tonal' ? html`\n <div part=\"tonal-body\" class=\"empty-state__body--tonal\">\n ${this.svgIconUrl ? html`\n <nile-icon customSvgPath=\"${this.svgIconUrl}\" size=\"${this.svgIconSize}\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" color=\"${ifDefined(this.svgIconColor)}\" noFill></nile-icon>\n ` : html`\n <nile-icon name=\"${this.icon}\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" size=\"40\"></nile-icon>\n `}\n </div>`: nothing\n }\n\n ${this.variant == 'flat' ? html`\n <div part=\"flat-body\" class=\"empty-state__body--flat\">\n\t\t\t\t\t<span class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t${this.svgIconUrl ? html`\n <nile-icon customSvgPath=\"${this.svgIconUrl}\" size=\"${this.svgIconSize}\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" variant=\"secondary\" color=\"${ifDefined(this.svgIconColor)}\" noFill></nile-icon>\n ` : html`\n <nile-icon name=\"${this.icon}\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\" variant=\"secondary\"></nile-icon>\n `}\n\t\t\t\t\t</span>\n </div>`: nothing\n }\n\n <div part=\"text-section\" class=\"empty__state__text-section\">\n <div part=\"text\" class=\"empty-state__text\">${this.text}</div>\n <div part=\"subtitle\" class=\"empty-state__subtext\">${this.subText}</div>\n </div>\n </div>\n\n <div part=\"actions\" class=\"empty-state-actions\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileEmptyState;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-empty-state': NileEmptyState;\n }\n}\n"],"names":["NileEmptyState","c","constructor","this","size","variant","icon","grayscale","text","subText","svgIconSize","_this","_inherits","_l","_createClass","key","value","render","html","_templateObject","_taggedTemplateLiteral","classMap","_templateObject2","svgIconUrl","_templateObject3","_templateObject4","ifDefined","svgIconColor","_templateObject5","nothing","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","get","styles","NileElement","__decorate","property","prototype","type","Boolean","attribute","Number","String","customElement"],"mappings":"80HAoBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAUOC,KAAAA,CAAIC,IAAAA,CAAwB,KAE5BD,KAAAA,CAAOE,OAAA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ACF/C"}
|
|
1
|
+
{"version":3,"file":"nile-empty-state.cjs.js","sources":["../../../src/nile-empty-state/nile-empty-state.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, nothing, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-empty-state.css';\nimport NileElement from '../internal/nile-element';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\n/** What happened. Selects an icon, tone, default copy and ARIA role. */\nexport type NileEmptyStateStatus =\n | 'empty'\n | 'no-results'\n | 'not-found'\n | 'no-access'\n | 'error'\n | 'offline';\n\n/** How loud the state looks. Defaults from `status`, always overridable. */\nexport type NileEmptyStateTone = 'neutral' | 'info' | 'warning' | 'error';\n\n/** What shape the state occupies. */\nexport type NileEmptyStateLayout = 'stack' | 'inline' | 'page';\n\ninterface StatusPreset {\n icon: string;\n tone: NileEmptyStateTone;\n text: string;\n subText: string;\n role: 'status' | 'alert';\n live: 'polite' | 'assertive';\n}\n\nconst STATUS_PRESETS: Record<NileEmptyStateStatus, StatusPreset> = {\n 'empty': {\n icon: 'ng-database', tone: 'neutral', role: 'status', live: 'polite',\n text: 'No data yet', subText: `Rows appear here once there's something to show.`,\n },\n 'no-results': {\n icon: 'ng-search-lg', tone: 'neutral', role: 'status', live: 'polite',\n text: 'No matches', subText: 'Try removing a filter or broadening your search.',\n },\n 'not-found': {\n icon: 'ng-file-06', tone: 'warning', role: 'status', live: 'polite',\n text: `We couldn't find that`, subText: 'It may have been moved or deleted.',\n },\n 'no-access': {\n icon: 'ng-lock', tone: 'warning', role: 'status', live: 'polite',\n text: `You don't have access`, subText: 'Ask an admin to grant you access to this resource.',\n },\n 'error': {\n icon: 'ng-alert-circle', tone: 'error', role: 'alert', live: 'assertive',\n text: 'Something went wrong', subText: `We couldn't load this. Try again.`,\n },\n 'offline': {\n icon: 'ng-cloud-off', tone: 'error', role: 'alert', live: 'assertive',\n text: 'Connection lost', subText: 'Check your connection and try again.',\n },\n};\n\nconst TONE_GLYPH_COLOR: Record<NileEmptyStateTone, string | undefined> = {\n neutral: undefined,\n info: 'var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600))',\n warning: 'var(--nile-colors-yellow-700, var(--ng-colors-fg-warning-primary))',\n error: 'var(--nile-colors-red-700, var(--ng-colors-fg-error-primary))',\n};\n\nconst DEFAULT_ICON = 'ng-x-circle';\nconst DEFAULT_TEXT = 'Empty State';\nconst DEFAULT_SUB_TEXT = 'No Data';\n\n/**\n * Nile empty-state component.\n *\n * @tag nile-empty-state\n *\n */\n@customElement('nile-empty-state')\nexport class NileEmptyState extends NileElement {\n\n /**\n * The styles for nile-empty-state\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: String, attribute: true }) size: 'sm' | 'md' | 'lg' = 'md';\n\n @property({ type: String, attribute: true }) variant:\n | 'flat'\n | 'content'\n | 'tonal' = 'tonal';\n\n @property({ type: String, attribute: true, reflect: true }) status?: NileEmptyStateStatus;\n @property({ type: String, attribute: true, reflect: true }) layout: NileEmptyStateLayout = 'stack';\n @property({ type: String, attribute: true }) code?: string;\n @property({ type: Boolean, attribute: true, reflect: true }) bordered: boolean = false;\n @property({ type: String, attribute: true }) svgIconUrl: string;\n /**\n * Overrides the layout-driven glyph size for a custom `svgIconUrl`. Left unset,\n * the SVG matches whatever size the current variant/layout draws at.\n */\n @property({ type: Number, attribute: true }) svgIconSize?: number;\n @property({ type: String, attribute: true }) svgIconColor: string;\n\n private _icon?: string;\n private _text?: string;\n private _subText?: string;\n private _tone?: NileEmptyStateTone;\n @property({ type: String, attribute: true })\n get icon(): string {\n return this._icon ?? this.preset?.icon ?? DEFAULT_ICON;\n }\n\n set icon(value: string | null) {\n const old = this.icon;\n this._icon = value ?? undefined;\n this.requestUpdate('icon', old);\n }\n\n /** Headline. Resolves through the `status` preset to `DEFAULT_TEXT`. */\n @property({ type: String, attribute: true })\n get text(): string {\n return this._text ?? this.preset?.text ?? DEFAULT_TEXT;\n }\n\n set text(value: string | null) {\n const old = this.text;\n this._text = value ?? undefined;\n this.requestUpdate('text', old);\n }\n\n /** Supporting line. Resolves through the `status` preset to `DEFAULT_SUB_TEXT`. */\n @property({ type: String, attribute: 'sub-text' })\n get subText(): string {\n return this._subText ?? this.preset?.subText ?? DEFAULT_SUB_TEXT;\n }\n\n set subText(value: string | null) {\n const old = this.subText;\n this._subText = value ?? undefined;\n this.requestUpdate('subText', old);\n }\n\n @property({ type: String, attribute: true, reflect: true })\n get tone(): NileEmptyStateTone {\n return this._tone ?? this.preset?.tone ?? 'neutral';\n }\n\n set tone(value: NileEmptyStateTone | null) {\n const old = this.tone;\n this._tone = value ?? undefined;\n this.requestUpdate('tone', old);\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /** The preset backing the current `status`, or undefined when none is set. */\n private get preset(): StatusPreset | undefined {\n return this.status ? STATUS_PRESETS[this.status] : undefined;\n }\n\n private get glyphColor(): string | undefined {\n return this.svgIconColor ?? TONE_GLYPH_COLOR[this.tone];\n }\n\n /** ARIA wiring */\n private get liveRegion(): { role: string; live: string } | undefined {\n const preset = this.preset;\n if (!preset) return undefined;\n return { role: preset.role, live: preset.live };\n }\n\n private renderGlyph(size: number | string): TemplateResult {\n const color = this.glyphColor;\n return this.svgIconUrl ? html`\n <nile-glyph\n customSvgPath=\"${this.svgIconUrl}\"\n size=\"${this.svgIconSize ?? size}\"\n method=\"stroke\"\n color=\"${ifDefined(color)}\"\n noFill\n ></nile-glyph>\n ` : html`\n <nile-glyph\n name=\"${this.icon}\"\n method=\"stroke\"\n size=\"${size}\"\n color=\"${ifDefined(color)}\"\n ></nile-glyph>\n `;\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n const live = this.liveRegion;\n const inline = this.layout === 'inline';\n\n return html`\n <div part=\"container\" class=\"${classMap({\n 'empty-state': true,\n 'empty-state--sm': this.size == 'sm',\n 'empty-state--md': this.size == 'md',\n 'empty-state--lg': this.size == 'lg',\n 'empty-state--stack': this.layout === 'stack',\n 'empty-state--inline': inline,\n 'empty-state--page': this.layout === 'page',\n 'empty-state--bordered': this.bordered,\n [`empty-state--tone-${this.tone}`]: true,\n })}\"\n role=\"${ifDefined(live?.role)}\"\n aria-live=\"${ifDefined(live?.live)}\"\n >\n <div part=\"body\" class=\"${classMap({ 'empty-state__body': true })}\">\n\n ${inline ? html`\n <span part=\"inline-icon icon-chrome\" class=\"empty-state__body--inline\">\n ${this.renderGlyph(20)}\n </span>` : nothing\n }\n\n ${!inline && this.variant == 'content' ? html`\n <div part=\"content-image\" class=\"empty-state__body--content\">\n ${!this.icon && !this.svgIconUrl ? nothing : html`\n <div part=\"icon-wrapper icon-chrome\" class=\"empty-state__img__icon\">\n ${\n this.renderGlyph(this.size == 'lg' ? 28 : 24)}\n </div>`\n }\n </div>`: nothing\n }\n\n ${!inline && this.variant == 'tonal' ? html`\n <div part=\"tonal-body icon-chrome\" class=\"empty-state__body--tonal\">\n ${this.renderGlyph(40)}\n </div>`: nothing\n }\n\n ${!inline && this.variant == 'flat' ? html`\n <div part=\"flat-body\" class=\"empty-state__body--flat\">\n\t\t\t\t\t<span part=\"icon-chrome\" class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t${this.renderGlyph(this.size == 'lg' ? 28 : 24)}\n\t\t\t\t\t</span>\n </div>`: nothing\n }\n\n <div part=\"text-section\" class=\"empty__state__text-section\">\n ${this.code ? html`\n <div part=\"code\" class=\"empty-state__code\">${this.code}</div>\n ` : nothing}\n <div part=\"text\" class=\"empty-state__text\">${this.text}</div>\n <div part=\"subtitle\" class=\"empty-state__subtext\">${this.subText}</div>\n </div>\n </div>\n\n <div part=\"actions\" class=\"empty-state-actions\">\n <slot></slot>\n </div>\n\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileEmptyState;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-empty-state': NileEmptyState;\n }\n}\n"],"names":["STATUS_PRESETS","empty","icon","tone","role","live","text","subText","error","offline","TONE_GLYPH_COLOR","neutral","undefined","info","warning","_export","NileEmptyState","_a","h","this","size","variant","layout","bordered","_this","_inherits","_createClass","key","get","_ref","_this$_icon","_icon","preset","set","value","old","requestUpdate","_ref2","_this$_text","_text","_ref3","_this$_subText","_subText","_ref4","_this$_tone","_tone","status","_this$svgIconColor","svgIconColor","renderGlyph","_this$svgIconSize","color","glyphColor","svgIconUrl","html","_templateObject","_taggedTemplateLiteral","svgIconSize","ifDefined","_templateObject2","render","liveRegion","inline","_templateObject3","classMap","_templateObject4","nothing","_templateObject5","_templateObject6","_templateObject7","_templateObject8","code","_templateObject9","styles","NileElement","__decorate","property","type","String","attribute","prototype","reflect","Boolean","Number","customElement"],"mappings":"27HAsCMA,CAAAA,CAA6D,CACjEC,KAAAA,CAAS,CACPC,IAAM,CAAA,aAAA,CAAeC,IAAM,CAAA,SAAA,CAAWC,KAAM,QAAUC,CAAAA,IAAAA,CAAM,QAC5DC,CAAAA,IAAAA,CAAM,cAAeC,OAAS,CAAA,kDAAA,CAAA,CAEhC,YAAc,CAAA,CACZL,IAAM,CAAA,cAAA,CAAgBC,IAAM,CAAA,SAAA,CAAWC,KAAM,QAAUC,CAAAA,IAAAA,CAAM,QAC7DC,CAAAA,IAAAA,CAAM,YAAcC,CAAAA,OAAAA,CAAS,kDAE/B,CAAA,CAAA,WAAA,CAAa,CACXL,IAAM,CAAA,YAAA,CAAcC,IAAM,CAAA,SAAA,CAAWC,IAAM,CAAA,QAAA,CAAUC,IAAM,CAAA,QAAA,CAC3DC,KAAM,uBAAyBC,CAAAA,OAAAA,CAAS,oCAE1C,CAAA,CAAA,WAAA,CAAa,CACXL,IAAM,CAAA,SAAA,CAAWC,IAAM,CAAA,SAAA,CAAWC,KAAM,QAAUC,CA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D,EAAA,CAD1BS,CAAAA,CAAc,qBACFpE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,i;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",i=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display:inline-flex;\n width:100%;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .empty-state--sm {\n --nile-es-text-size: var(--nile-type-scale-4, var(--ng-font-size-text-md));\n --nile-es-text-line-height: var(--nile-line-height-medium, var(--ng-line-height-text-md));\n --nile-es-subtext-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n --nile-es-subtext-line-height:20px;\n \n --nile-es-icon-size:var(--nile-height-48px, var(--ng-height-48px));\n --nile-es-flat-option-border-radius: var(--nile-border-size-5, var(--ng-radius-lg));\n --nile-es-img-height:118px;\n --nile-es-img-width:152px;\n\n --nile-es-gap:var(--nile-spacing-spacing-3xl, var(--ng-spacing-3xl));\n --nile-es-body-gap:var(--nile-spacing-spacing-xl, var(--ng-spacing-xl));\n --nile-es-text-gap:var(--nile-spacing-none, var(--ng-spacing-xs));\n }\n\n .empty-state--md {\n --nile-es-text-size: var(--nile-type-scale-5, var(--ng-font-size-text-lg));\n --nile-es-text-line-height: var(--nile-line-height-large, var(--ng-line-height-text-lg));\n --nile-es-subtext-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n --nile-es-subtext-line-height: var(--nile-line-height-small, var(--ng-line-height-text-sm));\n\n --nile-es-icon-size: var(--nile-spacing-5-x, var(--ng-height-48px));\n --nile-es-flat-option-border-radius: var(--nile-border-size-5, var(--ng-radius-lg));\n --nile-es-img-height:128px;\n --nile-es-img-width:172px;\n\n --nile-es-gap:var(--nile-spacing-spacing-4xl, var(--ng-spacing-4xl));\n --nile-es-body-gap:var(--nile-spacing-spacing-2xl, var(--ng-spacing-2xl));\n --nile-es-text-gap:var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n }\n\n .empty-state--lg {\n --nile-es-text-size: var(--nile-spacing-2xl, var(--ng-font-size-text-xl));\n --nile-es-text-line-height: var(--nile-line-height-large, var(--ng-line-height-text-xl));\n --nile-es-subtext-size: var(--nile-type-scale-4, var(--ng-font-size-text-md));\n --nile-es-subtext-line-height: var(--nile-line-height-medium, var(--ng-line-height-text-md));\n\n --nile-es-icon-size:var(--nile-height-60px, var(--ng-height-60px));\n --nile-es-flat-option-border-radius: var(--nile-border-size-10, var(--ng-radius-lg));\n --nile-es-img-height:160px;\n --nile-es-img-width:220px;\n\n --nile-es-gap:var(--nile-spacing-spacing-4xl, var(--ng-spacing-4xl));\n --nile-es-body-gap:var(--nile-spacing-spacing-3xl, var(--ng-spacing-2xl));\n --nile-es-text-gap:var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n }\n\n .empty-state {\n min-width:300px;\n max-width:512px;\n width:100%;\n height:max-content;\n display:flex;\n flex-direction:column;\n row-gap:var(--nile-es-gap);\n }\n\n .empty-state__body {\n display:flex;\n flex-direction:column;\n justify-content:space-between;\n align-items:center;\n row-gap:var(--nile-es-body-gap)\n }\n\n .empty-state__body--content {\n position:relative;\n }\n\n .empty-state__img__icon {\n display: var(--ng-display-flex);\n justify-content: center;\n align-items: center;\n }\n\n .empty-state__body--tonal {\n background: var(--nile-gradient-1, var(--ng-white-gradient-6));\n width: 104px;\n height: 104px;\n border-radius: var(--nile-radius-full, var(--ng-radius-full));\n display:flex;\n justify-content:center;\n align-items:center;\n }\n\n .nile-flat-type-icon {\n height:var(--nile-es-icon-size);\n aspect-ratio:1 / 1;\n border-radius: var(--nile-es-flat-option-border-radius);\n\n background-color: white;\n display: grid;\n place-items: center;\n border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));\n }\n\n .empty__state__text-section {\n display:flex;\n flex-direction:column;\n gap:var(--nile-es-text-gap);\n max-width:80%;\n }\n\n .empty-state__text {\n font-size: var(--nile-es-text-size);\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-weight: var(--nile-font-weight-semi-bold, var(--ng-font-weight-semibold));\n line-height: var(--nile-es-text-line-height);\n text-align: center;\n font-style: normal;\n }\n\n .empty-state__subtext {\n font-size: var(--nile-es-subtext-size);\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n line-height: var(--nile-es-subtext-line-height);\n text-align: center;\n color:var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n font-style: normal;\n }\n\n .empty-state-actions {\n display:flex;\n justify-content:center;\n }\n"]))));}};});
|
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,n;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",n=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display:inline-flex;\n width:100%;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .empty-state--sm {\n --nile-es-text-size: var(--nile-type-scale-4, var(--ng-font-size-text-md));\n --nile-es-text-line-height: var(--nile-line-height-medium, var(--ng-line-height-text-md));\n --nile-es-subtext-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n --nile-es-subtext-line-height:20px;\n \n --nile-es-icon-size:var(--nile-height-48px, var(--ng-height-48px));\n --nile-es-flat-option-border-radius: var(--nile-border-size-5, var(--ng-radius-lg));\n --nile-es-img-height:118px;\n --nile-es-img-width:152px;\n\n --nile-es-gap:var(--nile-spacing-spacing-3xl, var(--ng-spacing-3xl));\n --nile-es-body-gap:var(--nile-spacing-spacing-xl, var(--ng-spacing-xl));\n --nile-es-text-gap:var(--nile-spacing-none, var(--ng-spacing-xs));\n }\n\n .empty-state--md {\n --nile-es-text-size: var(--nile-type-scale-5, var(--ng-font-size-text-lg));\n --nile-es-text-line-height: var(--nile-line-height-large, var(--ng-line-height-text-lg));\n --nile-es-subtext-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n --nile-es-subtext-line-height: var(--nile-line-height-small, var(--ng-line-height-text-sm));\n\n --nile-es-icon-size: var(--nile-spacing-5-x, var(--ng-height-48px));\n --nile-es-flat-option-border-radius: var(--nile-border-size-5, var(--ng-radius-lg));\n --nile-es-img-height:128px;\n --nile-es-img-width:172px;\n\n --nile-es-gap:var(--nile-spacing-spacing-4xl, var(--ng-spacing-4xl));\n --nile-es-body-gap:var(--nile-spacing-spacing-2xl, var(--ng-spacing-2xl));\n --nile-es-text-gap:var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n }\n\n .empty-state--lg {\n --nile-es-text-size: var(--nile-spacing-2xl, var(--ng-font-size-text-xl));\n --nile-es-text-line-height: var(--nile-line-height-large, var(--ng-line-height-text-xl));\n --nile-es-subtext-size: var(--nile-type-scale-4, var(--ng-font-size-text-md));\n --nile-es-subtext-line-height: var(--nile-line-height-medium, var(--ng-line-height-text-md));\n\n --nile-es-icon-size:var(--nile-height-60px, var(--ng-height-60px));\n --nile-es-flat-option-border-radius: var(--nile-border-size-10, var(--ng-radius-lg));\n --nile-es-img-height:160px;\n --nile-es-img-width:220px;\n\n --nile-es-gap:var(--nile-spacing-spacing-4xl, var(--ng-spacing-4xl));\n --nile-es-body-gap:var(--nile-spacing-spacing-3xl, var(--ng-spacing-2xl));\n --nile-es-text-gap:var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n }\n\n .empty-state {\n min-width:300px;\n max-width:512px;\n width:100%;\n margin-inline: auto;\n height:max-content;\n display:flex;\n flex-direction:column;\n row-gap:var(--nile-es-gap);\n }\n .empty-state--tone-info .empty-state__body--tonal {\n background: linear-gradient(\n 180deg,\n var(--nile-colors-primary-100, var(--ng-colors-bg-brand-primary)) 0%,\n var(--nile-colors-primary-400, var(--ng-colors-bg-brand-secondary)) 100%\n );\n }\n\n .empty-state--tone-warning .empty-state__body--tonal {\n background: linear-gradient(\n 180deg,\n var(--nile-colors-yellow-100, var(--ng-colors-bg-warning-primary)) 0%,\n var(--nile-colors-yellow-400, var(--ng-colors-bg-warning-secondary)) 100%\n );\n }\n\n .empty-state--tone-error .empty-state__body--tonal {\n background: linear-gradient(\n 180deg,\n var(--nile-colors-red-100, var(--ng-colors-bg-error-primary)) 0%,\n var(--nile-colors-red-400, var(--ng-colors-bg-error-secondary)) 100%\n );\n }\n\n .empty-state--tone-info .nile-flat-type-icon {\n background-color: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-primary));\n border-color: var(--nile-colors-primary-600, var(--ng-colors-border-brand));\n }\n\n .empty-state--tone-warning .nile-flat-type-icon {\n background-color: var(--nile-colors-yellow-100, var(--ng-colors-bg-warning-primary));\n border-color: var(--nile-colors-yellow-500, var(--ng-colors-border-warning));\n }\n\n .empty-state--tone-error .nile-flat-type-icon {\n background-color: var(--nile-colors-red-100, var(--ng-colors-bg-error-primary));\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error));\n }\n\n .empty-state--inline {\n flex-direction: row;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n min-width: 0;\n max-width: none;\n column-gap: var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n row-gap: var(--nile-spacing-spacing-xs, var(--ng-spacing-xs));\n padding: var(--nile-spacing-spacing-xl, var(--ng-spacing-xl))\n var(--nile-spacing-spacing-lg, var(--ng-spacing-lg));\n }\n\n .empty-state--inline .empty-state__body {\n flex-direction: row;\n align-items: center;\n column-gap: var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n }\n\n .empty-state--inline .empty__state__text-section {\n flex-direction: row;\n align-items: baseline;\n gap: var(--nile-spacing-spacing-sm, var(--ng-spacing-sm));\n max-width: none;\n }\n\n .empty-state--inline .empty-state__text,\n .empty-state--inline .empty-state__subtext {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n line-height: var(--nile-line-height-small, var(--ng-line-height-text-sm));\n text-align: left;\n }\n .empty-state__body--inline {\n display: grid;\n place-items: center;\n }\n\n\n .empty-state--page .empty-state__text {\n font-size: var(--nile-type-scale-9, var(--ng-font-size-display-sm));\n line-height: var(--nile-line-height-display, var(--ng-line-height-display-sm));\n letter-spacing: -0.02em;\n }\n\n .empty-state--page .empty-state__subtext {\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-md));\n line-height: var(--nile-line-height-medium, var(--ng-line-height-text-md));\n }\n\n .empty-state--page .empty-state__code {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n letter-spacing: 0.2em;\n }\n /* stack and page carry no padding of their own, so the dashed edge would sit\n flush against the content \u2014 hence the roomy padding here. */\n .empty-state--bordered {\n border: 1px dashed var(--nile-colors-neutral-400, var(--ng-colors-border-primary));\n border-radius: var(--nile-border-size-10, var(--ng-radius-xl));\n background: var(--nile-colors-neutral-50, var(--ng-colors-bg-secondary));\n padding: var(--nile-spacing-spacing-4xl, var(--ng-spacing-4xl))\n var(--nile-spacing-spacing-3xl, var(--ng-spacing-3xl));\n }\n\n /* A strip stays tight when it is bordered too. Spelled out as its own\n two-class rule so specificity decides, not declaration order. */\n .empty-state--inline.empty-state--bordered {\n padding: var(--nile-spacing-spacing-xl, var(--ng-spacing-xl))\n var(--nile-spacing-spacing-lg, var(--ng-spacing-lg));\n }\n\n .empty-state__body {\n display:flex;\n flex-direction:column;\n justify-content:space-between;\n align-items:center;\n row-gap:var(--nile-es-body-gap)\n }\n\n .empty-state__body--content {\n position:relative;\n }\n\n .empty-state__img__icon {\n display: var(--nile-display-flex, var(--ng-display-flex));\n justify-content: center;\n align-items: center;\n }\n\n .empty-state__body--tonal {\n background: var(--nile-gradient-1, var(--ng-white-gradient-6));\n width: 104px;\n height: 104px;\n border-radius: var(--nile-radius-full, var(--ng-radius-full));\n display:flex;\n justify-content:center;\n align-items:center;\n }\n\n .nile-flat-type-icon {\n height:var(--nile-es-icon-size);\n aspect-ratio:1 / 1;\n border-radius: var(--nile-es-flat-option-border-radius);\n background-color: var(--nile-colors-neutral-0, var(--ng-colors-bg-primary));\n display: grid;\n place-items: center;\n border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));\n }\n\n .empty__state__text-section {\n display:flex;\n flex-direction:column;\n gap:var(--nile-es-text-gap);\n max-width:80%;\n min-width: 0;\n overflow-wrap: anywhere;\n }\n\n .empty-state__text {\n font-size: var(--nile-es-text-size);\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-weight: var(--nile-font-weight-semi-bold, var(--ng-font-weight-semibold));\n line-height: var(--nile-es-text-line-height);\n text-align: center;\n font-style: normal;\n }\n\n .empty-state__subtext {\n font-size: var(--nile-es-subtext-size);\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n line-height: var(--nile-es-subtext-line-height);\n text-align: center;\n color:var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n font-style: normal;\n }\n\n .empty-state-actions {\n display:flex;\n justify-content:center;\n gap: var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n flex-wrap: wrap;\n }\n\n .empty-state__code {\n font-family: var(--nile-font-family-body, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n letter-spacing: 0.14em;\n text-transform: uppercase;\n text-align: center;\n color: var(--nile-colors-dark-400, var(--ng-colors-text-quaternary-500));\n }\n\n"]))));}};});
|
|
2
2
|
//# sourceMappingURL=nile-empty-state.css.cjs.js.map
|