@nuralyui/breadcrumb 0.0.3 → 0.0.4
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/breadcrumb.component.d.ts +1 -1
- package/bundle.js +3 -261
- package/package.json +1 -1
|
@@ -110,7 +110,7 @@ export declare class NrBreadcrumbElement extends NrBreadcrumbElement_base {
|
|
|
110
110
|
* Render a single breadcrumb item
|
|
111
111
|
*/
|
|
112
112
|
private renderItem;
|
|
113
|
-
render(): TemplateResult<1
|
|
113
|
+
render(): typeof nothing | TemplateResult<1>;
|
|
114
114
|
}
|
|
115
115
|
declare global {
|
|
116
116
|
interface HTMLElementTagNameMap {
|
package/bundle.js
CHANGED
|
@@ -1,269 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
const t=window,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),e=new WeakMap;class r{constructor(t,i,e){if(this._$cssResult$=!0,e!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const s=this.t;if(i&&void 0===t){const i=void 0!==s&&1===s.length;i&&(t=e.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&e.set(s,t))}return t}toString(){return this.cssText}}const n=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const s of t.cssRules)i+=s.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,s))(i)})(t):t
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2017 Google LLC
|
|
10
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/;var o;const l=window,a=l.trustedTypes,h=a?a.emptyScript:"",d=l.reactiveElementPolyfillSupport,c={toAttribute(t,i){switch(i){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},u=(t,i)=>i!==t&&(i==i||t==t),v={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:u},p="finalized";class m extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e))})),t}static createProperty(t,i=v){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty(p))return!1;this[p]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)i.unshift(n(t))}else void 0!==t&&i.push(n(t));return i}static _$Ep(t,i){const s=i.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var s;const e=null!==(s=this.shadowRoot)&&void 0!==s?s:this.attachShadow(this.constructor.shadowRootOptions);return((s,e)=>{i?s.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((i=>{const e=document.createElement("style"),r=t.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,s.appendChild(e)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$EO(t,i,s=v){var e;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const n=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:c).toAttribute(i,s.type);this._$El=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,i){var s;const e=this.constructor,r=e._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=e.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:c;this._$El=r,this[r]=n.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||u)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
12
|
-
/**
|
|
13
|
-
* @license
|
|
14
|
-
* Copyright 2017 Google LLC
|
|
15
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
-
*/
|
|
17
|
-
var b;m[p]=!0,m.elementProperties=new Map,m.elementStyles=[],m.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:m}),(null!==(o=l.reactiveElementVersions)&&void 0!==o?o:l.reactiveElementVersions=[]).push("1.6.3");const f=window,g=f.trustedTypes,y=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,x="?"+w,A=`<${x}>`,S=document,k=()=>S.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,C="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,T=/>/g,M=RegExp(`>|${C}(?:([^\\s"'>=/]+)(${C}*=${C}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),U=/'/g,R=/"/g,z=/^(?:script|style|textarea|title)$/i,N=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),D=new WeakMap,P=S.createTreeWalker(S,129,null,!1);function L(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==y?y.createHTML(i):i}class K{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let r=0,n=0;const o=t.length-1,l=this.parts,[a,h]=((t,i)=>{const s=t.length-1,e=[];let r,n=2===i?"<svg>":"",o=j;for(let i=0;i<s;i++){const s=t[i];let l,a,h=-1,d=0;for(;d<s.length&&(o.lastIndex=d,a=o.exec(s),null!==a);)d=o.lastIndex,o===j?"!--"===a[1]?o=O:void 0!==a[1]?o=T:void 0!==a[2]?(z.test(a[2])&&(r=RegExp("</"+a[2],"g")),o=M):void 0!==a[3]&&(o=M):o===M?">"===a[0]?(o=null!=r?r:j,h=-1):void 0===a[1]?h=-2:(h=o.lastIndex-a[2].length,l=a[1],o=void 0===a[3]?M:'"'===a[3]?R:U):o===R||o===U?o=M:o===O||o===T?o=j:(o=M,r=void 0);const c=o===M&&t[i+1].startsWith("/>")?" ":"";n+=o===j?s+A:h>=0?(e.push(l),s.slice(0,h)+$+s.slice(h)+w+c):s+w+(-2===h?(e.push(void 0),i):c)}return[L(t,n+(t[s]||"<?>")+(2===i?"</svg>":"")),e]})(t,i);if(this.el=K.createElement(a,s),P.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=P.nextNode())&&l.length<o;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith($)||i.startsWith(w)){const s=h[n++];if(t.push(i),void 0!==s){const t=e.getAttribute(s.toLowerCase()+$).split(w),i=/([.?@])?(.*)/.exec(s);l.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?Z:"?"===i[1]?F:"@"===i[1]?J:W})}else l.push({type:6,index:r})}for(const i of t)e.removeAttribute(i)}if(z.test(e.tagName)){const t=e.textContent.split(w),i=t.length-1;if(i>0){e.textContent=g?g.emptyScript:"";for(let s=0;s<i;s++)e.append(t[s],k()),P.nextNode(),l.push({type:2,index:++r});e.append(t[i],k())}}}else if(8===e.nodeType)if(e.data===x)l.push({type:2,index:r});else{let t=-1;for(;-1!==(t=e.data.indexOf(w,t+1));)l.push({type:7,index:r}),t+=w.length-1}r++}}static createElement(t,i){const s=S.createElement("template");return s.innerHTML=t,s}}function q(t,i,s=t,e){var r,n,o,l;if(i===N)return i;let a=void 0!==e?null===(r=s._$Co)||void 0===r?void 0:r[e]:s._$Cl;const h=E(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,s,e)),void 0!==e?(null!==(o=(l=s)._$Co)&&void 0!==o?o:l._$Co=[])[e]=a:s._$Cl=a),void 0!==a&&(i=q(t,a._$AS(t,i.values),a,e)),i}class H{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:s},parts:e}=this._$AD,r=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:S).importNode(s,!0);P.currentNode=r;let n=P.nextNode(),o=0,l=0,a=e[0];for(;void 0!==a;){if(o===a.index){let i;2===a.type?i=new V(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new X(n,this,t)),this._$AV.push(i),a=e[++l]}o!==(null==a?void 0:a.index)&&(n=P.nextNode(),o++)}return P.currentNode=S,r}v(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class V{constructor(t,i,s,e){var r;this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=null===(r=null==e?void 0:e.isConnected)||void 0===r||r}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=q(this,t,i),E(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==N&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>_(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==I&&E(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=K.createElement(L(e.h,e.h[0]),this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===r)this._$AH.v(s);else{const t=new H(r,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t}}_$AC(t){let i=D.get(t.strings);return void 0===i&&D.set(t.strings,i=new K(t)),i}T(t){_(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const r of t)e===i.length?i.push(s=new V(this.k(k()),this.k(k()),this,this.options)):s=i[e],s._$AI(r),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class W{constructor(t,i,s,e,r){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=I}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const r=this.strings;let n=!1;if(void 0===r)t=q(this,t,i,0),n=!E(t)||t!==this._$AH&&t!==N,n&&(this._$AH=t);else{const e=t;let o,l;for(t=r[0],o=0;o<r.length-1;o++)l=q(this,e[s+o],i,o),l===N&&(l=this._$AH[o]),n||(n=!E(l)||l!==this._$AH[o]),l===I?t=I:t!==I&&(t+=(null!=l?l:"")+r[o+1]),this._$AH[o]=l}n&&!e&&this.j(t)}j(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends W{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===I?void 0:t}}const B=g?g.emptyScript:"";class F extends W{constructor(){super(...arguments),this.type=4}j(t){t&&t!==I?this.element.setAttribute(this.name,B):this.element.removeAttribute(this.name)}}class J extends W{constructor(t,i,s,e,r){super(t,i,s,e,r),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=q(this,t,i,0))&&void 0!==s?s:I)===N)return;const e=this._$AH,r=t===I&&e!==I||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==I&&(e===I||r);r&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class X{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){q(this,t)}}const G=f.litHtmlPolyfillSupport;
|
|
18
|
-
/**
|
|
19
|
-
* @license
|
|
20
|
-
* Copyright 2017 Google LLC
|
|
21
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/
|
|
23
|
-
var Q;null==G||G(K,V),(null!==(b=f.litHtmlVersions)&&void 0!==b?b:f.litHtmlVersions=[]).push("2.8.0");const Y=window,tt=Y.trustedTypes,it=tt?tt.createPolicy("lit-html",{createHTML:t=>t}):void 0,st="$lit$",et=`lit$${(Math.random()+"").slice(9)}$`,rt="?"+et,nt=`<${rt}>`,ot=document,lt=()=>ot.createComment(""),at=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ht=Array.isArray,dt="[ \t\n\f\r]",ct=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ut=/-->/g,vt=/>/g,pt=RegExp(`>|${dt}(?:([^\\s"'>=/]+)(${dt}*=${dt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),mt=/'/g,bt=/"/g,ft=/^(?:script|style|textarea|title)$/i,gt=(t=>(i,...s)=>({_$litType$:t,strings:i,values:s}))(1),yt=Symbol.for("lit-noChange"),$t=Symbol.for("lit-nothing"),wt=new WeakMap,xt=ot.createTreeWalker(ot,129,null,!1);function At(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==it?it.createHTML(i):i}const St=(t,i)=>{const s=t.length-1,e=[];let r,n=2===i?"<svg>":"",o=ct;for(let i=0;i<s;i++){const s=t[i];let l,a,h=-1,d=0;for(;d<s.length&&(o.lastIndex=d,a=o.exec(s),null!==a);)d=o.lastIndex,o===ct?"!--"===a[1]?o=ut:void 0!==a[1]?o=vt:void 0!==a[2]?(ft.test(a[2])&&(r=RegExp("</"+a[2],"g")),o=pt):void 0!==a[3]&&(o=pt):o===pt?">"===a[0]?(o=null!=r?r:ct,h=-1):void 0===a[1]?h=-2:(h=o.lastIndex-a[2].length,l=a[1],o=void 0===a[3]?pt:'"'===a[3]?bt:mt):o===bt||o===mt?o=pt:o===ut||o===vt?o=ct:(o=pt,r=void 0);const c=o===pt&&t[i+1].startsWith("/>")?" ":"";n+=o===ct?s+nt:h>=0?(e.push(l),s.slice(0,h)+st+s.slice(h)+et+c):s+et+(-2===h?(e.push(void 0),i):c)}return[At(t,n+(t[s]||"<?>")+(2===i?"</svg>":"")),e]};class kt{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let r=0,n=0;const o=t.length-1,l=this.parts,[a,h]=St(t,i);if(this.el=kt.createElement(a,s),xt.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=xt.nextNode())&&l.length<o;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith(st)||i.startsWith(et)){const s=h[n++];if(t.push(i),void 0!==s){const t=e.getAttribute(s.toLowerCase()+st).split(et),i=/([.?@])?(.*)/.exec(s);l.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?Ot:"?"===i[1]?Mt:"@"===i[1]?Ut:jt})}else l.push({type:6,index:r})}for(const i of t)e.removeAttribute(i)}if(ft.test(e.tagName)){const t=e.textContent.split(et),i=t.length-1;if(i>0){e.textContent=tt?tt.emptyScript:"";for(let s=0;s<i;s++)e.append(t[s],lt()),xt.nextNode(),l.push({type:2,index:++r});e.append(t[i],lt())}}}else if(8===e.nodeType)if(e.data===rt)l.push({type:2,index:r});else{let t=-1;for(;-1!==(t=e.data.indexOf(et,t+1));)l.push({type:7,index:r}),t+=et.length-1}r++}}static createElement(t,i){const s=ot.createElement("template");return s.innerHTML=t,s}}function Et(t,i,s=t,e){var r,n,o,l;if(i===yt)return i;let a=void 0!==e?null===(r=s._$Co)||void 0===r?void 0:r[e]:s._$Cl;const h=at(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,s,e)),void 0!==e?(null!==(o=(l=s)._$Co)&&void 0!==o?o:l._$Co=[])[e]=a:s._$Cl=a),void 0!==a&&(i=Et(t,a._$AS(t,i.values),a,e)),i}class _t{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:s},parts:e}=this._$AD,r=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:ot).importNode(s,!0);xt.currentNode=r;let n=xt.nextNode(),o=0,l=0,a=e[0];for(;void 0!==a;){if(o===a.index){let i;2===a.type?i=new Ct(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new Rt(n,this,t)),this._$AV.push(i),a=e[++l]}o!==(null==a?void 0:a.index)&&(n=xt.nextNode(),o++)}return xt.currentNode=ot,r}v(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class Ct{constructor(t,i,s,e){var r;this.type=2,this._$AH=$t,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=null===(r=null==e?void 0:e.isConnected)||void 0===r||r}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=Et(this,t,i),at(t)?t===$t||null==t||""===t?(this._$AH!==$t&&this._$AR(),this._$AH=$t):t!==this._$AH&&t!==yt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>ht(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==$t&&at(this._$AH)?this._$AA.nextSibling.data=t:this.$(ot.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,r="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=kt.createElement(At(e.h,e.h[0]),this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===r)this._$AH.v(s);else{const t=new _t(r,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t}}_$AC(t){let i=wt.get(t.strings);return void 0===i&&wt.set(t.strings,i=new kt(t)),i}T(t){ht(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const r of t)e===i.length?i.push(s=new Ct(this.k(lt()),this.k(lt()),this,this.options)):s=i[e],s._$AI(r),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class jt{constructor(t,i,s,e,r){this.type=1,this._$AH=$t,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=$t}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const r=this.strings;let n=!1;if(void 0===r)t=Et(this,t,i,0),n=!at(t)||t!==this._$AH&&t!==yt,n&&(this._$AH=t);else{const e=t;let o,l;for(t=r[0],o=0;o<r.length-1;o++)l=Et(this,e[s+o],i,o),l===yt&&(l=this._$AH[o]),n||(n=!at(l)||l!==this._$AH[o]),l===$t?t=$t:t!==$t&&(t+=(null!=l?l:"")+r[o+1]),this._$AH[o]=l}n&&!e&&this.j(t)}j(t){t===$t?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Ot extends jt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===$t?void 0:t}}const Tt=tt?tt.emptyScript:"";class Mt extends jt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==$t?this.element.setAttribute(this.name,Tt):this.element.removeAttribute(this.name)}}class Ut extends jt{constructor(t,i,s,e,r){super(t,i,s,e,r),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=Et(this,t,i,0))&&void 0!==s?s:$t)===yt)return;const e=this._$AH,r=t===$t&&e!==$t||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==$t&&(e===$t||r);r&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class Rt{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Et(this,t)}}const zt=Y.litHtmlPolyfillSupport;null==zt||zt(kt,Ct),(null!==(Q=Y.litHtmlVersions)&&void 0!==Q?Q:Y.litHtmlVersions=[]).push("2.8.0");
|
|
24
|
-
/**
|
|
25
|
-
* @license
|
|
26
|
-
* Copyright 2017 Google LLC
|
|
27
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/
|
|
29
|
-
var Nt,It;class Dt extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,i;const s=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=s.firstChild),s}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,i,s)=>{var e,r;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let o=n._$litPart$;if(void 0===o){const t=null!==(r=null==s?void 0:s.renderBefore)&&void 0!==r?r:null;n._$litPart$=o=new Ct(i.insertBefore(lt(),t),t,void 0,null!=s?s:{})}return o._$AI(t),o})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return yt}}Dt.finalized=!0,Dt._$litElement$=!0,null===(Nt=globalThis.litElementHydrateSupport)||void 0===Nt||Nt.call(globalThis,{LitElement:Dt});const Pt=globalThis.litElementPolyfillSupport;null==Pt||Pt({LitElement:Dt}),(null!==(It=globalThis.litElementVersions)&&void 0!==It?It:globalThis.litElementVersions=[]).push("3.3.3");
|
|
30
|
-
/**
|
|
31
|
-
* @license
|
|
32
|
-
* Copyright 2017 Google LLC
|
|
33
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
-
*/
|
|
35
|
-
const Lt=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(s){s.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(s){s.createProperty(i.key,t)}};
|
|
36
|
-
/**
|
|
37
|
-
* @license
|
|
38
|
-
* Copyright 2017 Google LLC
|
|
39
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
|
-
*/function Kt(t){return(i,s)=>void 0!==s?((t,i,s)=>{i.constructor.createProperty(s,t)})(t,i,s):Lt(t,i)
|
|
41
|
-
/**
|
|
42
|
-
* @license
|
|
43
|
-
* Copyright 2021 Google LLC
|
|
44
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/}var qt;
|
|
46
|
-
/**
|
|
47
|
-
* @license
|
|
48
|
-
* Copyright 2021 Google LLC
|
|
49
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
50
|
-
*/
|
|
51
|
-
function*Ht(t,i){if(void 0!==t){let s=0;for(const e of t)yield i(e,s++)}}
|
|
52
|
-
/**
|
|
53
|
-
* @license
|
|
54
|
-
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
55
|
-
* SPDX-License-Identifier: MIT
|
|
56
|
-
*/null===(qt=window.HTMLSlotElement)||void 0===qt||qt.prototype.assignedElements;const Vt=((t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,s,e)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[e+1]),t[0]);return new r(e,t,s)})`
|
|
57
|
-
:host {
|
|
58
|
-
display: block;
|
|
59
|
-
font-family: var(--nuraly-font-family);
|
|
60
|
-
font-size: var(--nuraly-breadcrumb-font-size, 0.875rem);
|
|
61
|
-
line-height: var(--nuraly-breadcrumb-line-height, 1.5);
|
|
62
|
-
color: var(--nuraly-breadcrumb-item-color);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.breadcrumb {
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
flex-wrap: wrap;
|
|
69
|
-
gap: 0;
|
|
70
|
-
list-style: none;
|
|
71
|
-
margin: 0;
|
|
72
|
-
padding: 0;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.breadcrumb-item {
|
|
76
|
-
display: inline-flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
gap: var(--nuraly-spacing-1, 0.25rem);
|
|
79
|
-
position: relative;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.breadcrumb-item:not(:last-child) {
|
|
83
|
-
margin-right: var(--nuraly-breadcrumb-separator-margin, 8px);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.breadcrumb-link {
|
|
87
|
-
display: inline-flex;
|
|
88
|
-
align-items: center;
|
|
89
|
-
gap: var(--nuraly-spacing-1, 0.25rem);
|
|
90
|
-
color: var(--nuraly-breadcrumb-link-color);
|
|
91
|
-
text-decoration: none;
|
|
92
|
-
transition: color var(--nuraly-transition-fast, 0.15s) ease;
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
padding: var(--nuraly-spacing-1, 0.25rem) 0;
|
|
95
|
-
border-radius: var(--nuraly-border-radius-small, 2px);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.breadcrumb-link:hover {
|
|
99
|
-
color: var(--nuraly-breadcrumb-link-hover-color);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.breadcrumb-link:focus {
|
|
103
|
-
outline: var(--nuraly-focus-outline);
|
|
104
|
-
outline-offset: var(--nuraly-focus-outline-offset);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.breadcrumb-link.disabled {
|
|
108
|
-
color: var(--nuraly-color-text-disabled);
|
|
109
|
-
cursor: not-allowed;
|
|
110
|
-
pointer-events: none;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.breadcrumb-text {
|
|
114
|
-
display: inline-flex;
|
|
115
|
-
align-items: center;
|
|
116
|
-
gap: var(--nuraly-spacing-1, 0.25rem);
|
|
117
|
-
color: var(--nuraly-breadcrumb-last-item-color);
|
|
118
|
-
padding: var(--nuraly-spacing-1, 0.25rem) 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.breadcrumb-separator {
|
|
122
|
-
display: inline-flex;
|
|
123
|
-
align-items: center;
|
|
124
|
-
color: var(--nuraly-breadcrumb-separator-color);
|
|
125
|
-
margin: 0 var(--nuraly-breadcrumb-separator-margin, 8px);
|
|
126
|
-
user-select: none;
|
|
127
|
-
font-size: var(--nuraly-breadcrumb-icon-font-size, 14px);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.breadcrumb-icon {
|
|
131
|
-
display: inline-flex;
|
|
132
|
-
align-items: center;
|
|
133
|
-
font-size: var(--nuraly-breadcrumb-icon-font-size, 14px);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/* Dropdown menu styles */
|
|
137
|
-
.breadcrumb-item-with-menu {
|
|
138
|
-
position: relative;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.breadcrumb-item-with-menu:hover .breadcrumb-dropdown {
|
|
142
|
-
display: block;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.breadcrumb-dropdown {
|
|
146
|
-
display: none;
|
|
147
|
-
position: absolute;
|
|
148
|
-
top: 100%;
|
|
149
|
-
left: 0;
|
|
150
|
-
z-index: var(--nuraly-z-index-dropdown, 1000);
|
|
151
|
-
background-color: var(--nuraly-color-background-elevated);
|
|
152
|
-
border: 1px solid var(--nuraly-color-border);
|
|
153
|
-
border-radius: var(--nuraly-border-radius-medium, 4px);
|
|
154
|
-
box-shadow: var(--nuraly-shadow-dropdown);
|
|
155
|
-
min-width: 160px;
|
|
156
|
-
margin-top: var(--nuraly-spacing-1, 0.25rem);
|
|
157
|
-
padding: var(--nuraly-spacing-1, 0.25rem) 0;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.breadcrumb-menu-item {
|
|
161
|
-
display: flex;
|
|
162
|
-
align-items: center;
|
|
163
|
-
gap: var(--nuraly-spacing-2, 0.5rem);
|
|
164
|
-
padding: var(--nuraly-spacing-2, 0.5rem) var(--nuraly-spacing-3, 0.75rem);
|
|
165
|
-
color: var(--nuraly-color-text);
|
|
166
|
-
text-decoration: none;
|
|
167
|
-
cursor: pointer;
|
|
168
|
-
transition: background-color var(--nuraly-transition-fast, 0.15s) ease;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.breadcrumb-menu-item:hover {
|
|
172
|
-
background-color: var(--nuraly-color-background-hover);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.breadcrumb-menu-item.disabled {
|
|
176
|
-
color: var(--nuraly-color-text-disabled);
|
|
177
|
-
cursor: not-allowed;
|
|
178
|
-
pointer-events: none;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/* RTL Support */
|
|
182
|
-
:host([dir="rtl"]) .breadcrumb {
|
|
183
|
-
direction: rtl;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
:host([dir="rtl"]) .breadcrumb-item:not(:last-child) {
|
|
187
|
-
margin-right: 0;
|
|
188
|
-
margin-left: var(--nuraly-breadcrumb-separator-margin, 8px);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
:host([dir="rtl"]) .breadcrumb-separator {
|
|
192
|
-
transform: scaleX(-1);
|
|
193
|
-
}
|
|
194
|
-
`
|
|
1
|
+
import{css as r,LitElement as a,nothing as e,html as n}from"lit";import{property as i,customElement as o}from"lit/decorators.js";import{map as t}from"lit/directives/map.js";import{NuralyUIBaseMixin as l}from"@nuralyui/common/mixins";
|
|
195
2
|
/**
|
|
196
3
|
* @license
|
|
197
4
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
198
5
|
* SPDX-License-Identifier: MIT
|
|
199
|
-
|
|
6
|
+
*/const s=r`:host{display:block;font-family:var(--nuraly-font-family);font-size:var(--nuraly-breadcrumb-font-size,.875rem);line-height:var(--nuraly-breadcrumb-line-height,1.5);color:var(--nuraly-breadcrumb-item-color)}.breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:0;list-style:none;margin:0;padding:0}.breadcrumb-item{display:inline-flex;align-items:center;gap:var(--nuraly-spacing-1,.25rem);position:relative}.breadcrumb-item:not(:last-child){margin-right:var(--nuraly-breadcrumb-separator-margin,8px)}.breadcrumb-link{display:inline-flex;align-items:center;gap:var(--nuraly-spacing-1,.25rem);color:var(--nuraly-breadcrumb-link-color);text-decoration:none;transition:color var(--nuraly-transition-fast,.15s) ease;cursor:pointer;padding:var(--nuraly-spacing-1,.25rem) 0;border-radius:var(--nuraly-border-radius-small,2px)}.breadcrumb-link:hover{color:var(--nuraly-breadcrumb-link-hover-color)}.breadcrumb-link:focus{outline:var(--nuraly-focus-outline);outline-offset:var(--nuraly-focus-outline-offset)}.breadcrumb-link.disabled{color:var(--nuraly-color-text-disabled);cursor:not-allowed;pointer-events:none}.breadcrumb-text{display:inline-flex;align-items:center;gap:var(--nuraly-spacing-1,.25rem);color:var(--nuraly-breadcrumb-last-item-color);padding:var(--nuraly-spacing-1,.25rem) 0}.breadcrumb-separator{display:inline-flex;align-items:center;color:var(--nuraly-breadcrumb-separator-color);margin:0 var(--nuraly-breadcrumb-separator-margin,8px);user-select:none;font-size:var(--nuraly-breadcrumb-icon-font-size,14px)}.breadcrumb-icon{display:inline-flex;align-items:center;font-size:var(--nuraly-breadcrumb-icon-font-size,14px)}.breadcrumb-item-with-menu{position:relative}.breadcrumb-item-with-menu:hover .breadcrumb-dropdown{display:block}.breadcrumb-dropdown{display:none;position:absolute;top:100%;left:0;z-index:var(--nuraly-z-index-dropdown,1000);background-color:var(--nuraly-color-background-elevated);border:1px solid var(--nuraly-color-border);border-radius:var(--nuraly-border-radius-medium,4px);box-shadow:var(--nuraly-shadow-dropdown);min-width:160px;margin-top:var(--nuraly-spacing-1,.25rem);padding:var(--nuraly-spacing-1,.25rem) 0}.breadcrumb-menu-item{display:flex;align-items:center;gap:var(--nuraly-spacing-2,.5rem);padding:var(--nuraly-spacing-2,.5rem) var(--nuraly-spacing-3,.75rem);color:var(--nuraly-color-text);text-decoration:none;cursor:pointer;transition:background-color var(--nuraly-transition-fast,.15s) ease}.breadcrumb-menu-item:hover{background-color:var(--nuraly-color-background-hover)}.breadcrumb-menu-item.disabled{color:var(--nuraly-color-text-disabled);cursor:not-allowed;pointer-events:none}:host([dir=rtl]) .breadcrumb{direction:rtl}:host([dir=rtl]) .breadcrumb-item:not(:last-child){margin-right:0;margin-left:var(--nuraly-breadcrumb-separator-margin,8px)}:host([dir=rtl]) .breadcrumb-separator{transform:scaleX(-1)}`
|
|
200
7
|
/**
|
|
201
8
|
* @license
|
|
202
9
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
203
10
|
* SPDX-License-Identifier: MIT
|
|
204
|
-
|
|
205
|
-
var Jt=function(t,i,s,e){for(var r,n=arguments.length,o=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,l=t.length-1;l>=0;l--)(r=t[l])&&(o=(n<3?r(o):n>3?r(i,s,o):r(i,s))||o);return n>3&&o&&Object.defineProperty(i,s,o),o};let Xt=class extends((t=>Bt(Wt(Ft(t))))(Dt)){constructor(){super(...arguments),this.requiredComponents=["nr-icon"],this.items=[],this.separator="/"}handleItemClick(t,i){t.disabled?i.preventDefault():(this.dispatchEvent(new CustomEvent("nr-breadcrumb-click",{detail:{item:t,event:i},bubbles:!0,composed:!0})),t.onClick&&t.onClick(i))}handleMenuItemClick(t,i){t.disabled?i.preventDefault():t.onClick&&t.onClick(i)}renderIcon(t){return t.icon?gt`
|
|
206
|
-
<nr-icon
|
|
207
|
-
class="breadcrumb-icon"
|
|
208
|
-
name="${t.icon}"
|
|
209
|
-
type="${t.iconType||"regular"}"
|
|
210
|
-
></nr-icon>
|
|
211
|
-
`:$t}renderSeparator(){return this.separatorConfig?this.separatorConfig.isIcon?gt`
|
|
212
|
-
<span class="breadcrumb-separator">
|
|
213
|
-
<nr-icon
|
|
214
|
-
name="${this.separatorConfig.separator}"
|
|
215
|
-
type="${this.separatorConfig.iconType||"regular"}"
|
|
216
|
-
></nr-icon>
|
|
217
|
-
</span>
|
|
218
|
-
`:gt`<span class="breadcrumb-separator">${this.separatorConfig.separator}</span>`:gt`<span class="breadcrumb-separator">${this.separator}</span>`}renderMenu(t){return gt`
|
|
219
|
-
<div class="breadcrumb-dropdown">
|
|
220
|
-
${Ht(t,(t=>gt`
|
|
221
|
-
${t.href?gt`
|
|
222
|
-
<a
|
|
223
|
-
class="breadcrumb-menu-item ${t.disabled?"disabled":""}"
|
|
224
|
-
href="${t.href}"
|
|
225
|
-
@click="${i=>this.handleMenuItemClick(t,i)}"
|
|
226
|
-
>
|
|
227
|
-
${t.icon?gt`<nr-icon name="${t.icon}"></nr-icon>`:$t}
|
|
228
|
-
<span>${t.label}</span>
|
|
229
|
-
</a>
|
|
230
|
-
`:gt`
|
|
231
|
-
<div
|
|
232
|
-
class="breadcrumb-menu-item ${t.disabled?"disabled":""}"
|
|
233
|
-
@click="${i=>this.handleMenuItemClick(t,i)}"
|
|
234
|
-
>
|
|
235
|
-
${t.icon?gt`<nr-icon name="${t.icon}"></nr-icon>`:$t}
|
|
236
|
-
<span>${t.label}</span>
|
|
237
|
-
</div>
|
|
238
|
-
`}
|
|
239
|
-
`))}
|
|
240
|
-
</div>
|
|
241
|
-
`}renderItem(t,i){const s=i===this.items.length-1,e=t.menu&&t.menu.length>0,r=gt`
|
|
242
|
-
${this.renderIcon(t)}
|
|
243
|
-
<span>${t.title}</span>
|
|
244
|
-
`;return gt`
|
|
245
|
-
<li class="breadcrumb-item ${e?"breadcrumb-item-with-menu":""} ${t.className||""}">
|
|
246
|
-
${s?gt`<span class="breadcrumb-text">${r}</span>`:t.href?gt`
|
|
247
|
-
<a
|
|
248
|
-
class="breadcrumb-link ${t.disabled?"disabled":""}"
|
|
249
|
-
href="${t.href}"
|
|
250
|
-
@click="${i=>this.handleItemClick(t,i)}"
|
|
251
|
-
>
|
|
252
|
-
${r}
|
|
253
|
-
</a>
|
|
254
|
-
`:gt`
|
|
255
|
-
<span
|
|
256
|
-
class="breadcrumb-link ${t.disabled?"disabled":""}"
|
|
257
|
-
@click="${i=>this.handleItemClick(t,i)}"
|
|
258
|
-
>
|
|
259
|
-
${r}
|
|
260
|
-
</span>
|
|
261
|
-
`}
|
|
262
|
-
${e?this.renderMenu(t.menu):$t}
|
|
263
|
-
</li>
|
|
264
|
-
${s?$t:this.renderSeparator()}
|
|
265
|
-
`}render(){return this.items&&0!==this.items.length?gt`
|
|
266
|
-
<nav aria-label="Breadcrumb" class="breadcrumb">
|
|
267
|
-
${Ht(this.items,((t,i)=>this.renderItem(t,i)))}
|
|
268
|
-
</nav>
|
|
269
|
-
`:$t}};Xt.styles=Vt,Jt([Kt({type:Array})],Xt.prototype,"items",void 0),Jt([Kt({type:String})],Xt.prototype,"separator",void 0),Jt([Kt({type:Object,attribute:"separator-config"})],Xt.prototype,"separatorConfig",void 0),Xt=Jt([(t=>i=>"function"==typeof i?((t,i)=>(customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:s,elements:e}=i;return{kind:s,elements:e,finisher(i){customElements.define(t,i)}}})(t,i))("nr-breadcrumb")],Xt);export{Xt as NrBreadcrumbElement};
|
|
11
|
+
*/;var c=function(r,a,e,n){for(var i,o=arguments.length,t=o<3?a:null===n?n=Object.getOwnPropertyDescriptor(a,e):n,l=r.length-1;l>=0;l--)(i=r[l])&&(t=(o<3?i(t):o>3?i(a,e,t):i(a,e))||t);return o>3&&t&&Object.defineProperty(a,e,t),t};let d=class extends(l(a)){constructor(){super(...arguments),this.requiredComponents=["nr-icon"],this.items=[],this.separator="/"}handleItemClick(r,a){r.disabled?a.preventDefault():(this.dispatchEvent(new CustomEvent("nr-breadcrumb-click",{detail:{item:r,event:a},bubbles:!0,composed:!0})),r.onClick&&r.onClick(a))}handleMenuItemClick(r,a){r.disabled?a.preventDefault():r.onClick&&r.onClick(a)}renderIcon(r){return r.icon?n`<nr-icon class="breadcrumb-icon" name="${r.icon}" type="${r.iconType||"regular"}"></nr-icon>`:e}renderSeparator(){return this.separatorConfig?this.separatorConfig.isIcon?n`<span class="breadcrumb-separator"><nr-icon name="${this.separatorConfig.separator}" type="${this.separatorConfig.iconType||"regular"}"></nr-icon></span>`:n`<span class="breadcrumb-separator">${this.separatorConfig.separator}</span>`:n`<span class="breadcrumb-separator">${this.separator}</span>`}renderMenu(r){return n`<div class="breadcrumb-dropdown">${t(r,(r=>n`${r.href?n`<a class="breadcrumb-menu-item ${r.disabled?"disabled":""}" href="${r.href}" @click="${a=>this.handleMenuItemClick(r,a)}">${r.icon?n`<nr-icon name="${r.icon}"></nr-icon>`:e} <span>${r.label}</span></a>`:n`<div class="breadcrumb-menu-item ${r.disabled?"disabled":""}" @click="${a=>this.handleMenuItemClick(r,a)}">${r.icon?n`<nr-icon name="${r.icon}"></nr-icon>`:e} <span>${r.label}</span></div>`}`))}</div>`}renderItem(r,a){const i=a===this.items.length-1,o=r.menu&&r.menu.length>0,t=n`${this.renderIcon(r)} <span>${r.title}</span>`;return n`<li class="breadcrumb-item ${o?"breadcrumb-item-with-menu":""} ${r.className||""}">${i?n`<span class="breadcrumb-text">${t}</span>`:r.href?n`<a class="breadcrumb-link ${r.disabled?"disabled":""}" href="${r.href}" @click="${a=>this.handleItemClick(r,a)}">${t}</a>`:n`<span class="breadcrumb-link ${r.disabled?"disabled":""}" @click="${a=>this.handleItemClick(r,a)}">${t}</span>`} ${o?this.renderMenu(r.menu):e}</li>${i?e:this.renderSeparator()}`}render(){return this.items&&0!==this.items.length?n`<nav aria-label="Breadcrumb" class="breadcrumb">${t(this.items,((r,a)=>this.renderItem(r,a)))}</nav>`:e}};d.styles=s,c([i({type:Array})],d.prototype,"items",void 0),c([i({type:String})],d.prototype,"separator",void 0),c([i({type:Object,attribute:"separator-config"})],d.prototype,"separatorConfig",void 0),d=c([o("nr-breadcrumb")],d);export{d as NrBreadcrumbElement};
|