@aquera/nile-elements 0.1.73 → 0.1.74

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 CHANGED
@@ -79,6 +79,9 @@ To run a local development server that serves the basic demo located in `demo/in
79
79
 
80
80
  In this section, you can find the updates for each release of `nile-elements`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
81
81
 
82
+ #### Version 0.1.74
83
+ - Technical Changes: Nile Badge, Parts Exposed. [UIF-973]
84
+
82
85
  #### Version 0.1.73
83
86
  - Technical Changes: Nile Select search, scroll events exposed [UIF-972]
84
87
  - Technical Changes: New property allowUncheck added to Nile Radio [UIF-972]
package/dist/index.js CHANGED
@@ -10772,6 +10772,16 @@ class Hi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
10772
10772
  margin-right: 12px;
10773
10773
  }
10774
10774
 
10775
+ .badge{
10776
+ display: inline-flex;
10777
+ align-items: center;
10778
+ height: 20px;
10779
+ }
10780
+
10781
+ nile-badge::part(content) {
10782
+ line-height: 20px;
10783
+ }
10784
+
10775
10785
  `;var Px;let Rx=Px=class extends Pe{constructor(){super(...arguments),this.label="",this.value="",this.viewMoreCount=0,this.editable=!1,this.closable=!1,this.icon="",this.removeIcon="",this.active=!1}static get styles(){return[Wx]}connectedCallback(){super.connectedCallback(),this.registerChip()}disconnectedCallback(){super.disconnectedCallback(),this.unregisterChip()}registerChip(){Px.activeChips.push(this)}unregisterChip(){Px.activeChips=Px.activeChips.filter((e=>e!==this))}handleClose(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("nile-close",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}})),this.remove()}handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}}))}getLabelSlot(){return R`
10776
10786
  <span class="label-wrapper">
10777
10787
  <slot name="label">
@@ -10790,7 +10800,7 @@ class Hi{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
10790
10800
  <slot name="suffix">
10791
10801
  ${this.viewMoreCount?R`
10792
10802
  <span class="badge-wrapper">
10793
- <nile-badge variant="primary" pilltype="pill-color">
10803
+ <nile-badge class="badge" part="badge" variant="primary" pilltype="pill-color" exportparts="content, base">
10794
10804
  +${this.viewMoreCount}
10795
10805
  </nile-badge>
10796
10806
  </span>
@@ -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","../internal/nile-element.cjs.js","./nile-filter-chip.css.cjs.js"],function(_export,_context){"use strict";var e,t,s,i,l,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_n,o;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 _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););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){e=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;i=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_nileFilterChipCssCjsJs){a=_nileFilterChipCssCjsJs.s;}],execute:function execute(){_export("N",o=_n=/*#__PURE__*/function(_l){function n(){var _this;_classCallCheck(this,n);_this=_callSuper(this,n,arguments),_this.label="",_this.value="",_this.viewMoreCount=0,_this.editable=!1,_this.closable=!1,_this.icon="",_this.removeIcon="",_this.active=!1;return _this;}_inherits(n,_l);return _createClass(n,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(n,"connectedCallback",this,3)([]),this.registerChip();}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(n,"disconnectedCallback",this,3)([]),this.unregisterChip();}},{key:"registerChip",value:function registerChip(){_n.activeChips.push(this);}},{key:"unregisterChip",value:function unregisterChip(){var _this2=this;_n.activeChips=_n.activeChips.filter(function(e){return e!==_this2;});}},{key:"handleClose",value:function handleClose(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("nile-close",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}})),this.remove();}},{key:"handleClick",value:function handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}}));}},{key:"getLabelSlot",value:function getLabelSlot(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">",":</span>\n </slot>\n </span>\n\n "])),this.label);}},{key:"getValueSlot",value:function getValueSlot(){return t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">","</span>\n </slot>\n </span>\n\n "])),this.value);}},{key:"getviewMoreCountSlot",value:function getviewMoreCountSlot(){return t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <slot name=\"suffix\">\n ","\n </slot>\n "])),this.viewMoreCount?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <span class=\"badge-wrapper\">\n <nile-badge variant=\"primary\" pilltype=\"pill-color\">\n +","\n </nile-badge>\n </span>\n\n "])),this.viewMoreCount):t(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""]))));}},{key:"getCloseIconSlot",value:function getCloseIconSlot(){return t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n ","\n "])),this.closable?t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <span class=\"close-icon\" @click=\"","\">\n <nile-icon name=\"","\" size=\"12\"></nile-icon>\n </span>\n "])),this.handleClose,this.removeIcon||"close"):t(_templateObject8||(_templateObject8=_taggedTemplateLiteral([""]))));}},{key:"render",value:function render(){return t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div class=\"chip\" @click=\"","\">\n <slot name=\"icon\">\n ","\n </slot>\n ","\n <slot name=\"content\"></slot>\n ","\n ","\n ","\n </div>\n "])),this.handleClick,this.icon?t(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<span class=\"icon\">","</span>"])),this.icon):t(_templateObject11||(_templateObject11=_taggedTemplateLiteral([""]))),this.getLabelSlot(),this.getValueSlot(),this.getviewMoreCountSlot(),this.getCloseIconSlot());}}],[{key:"styles",get:function get(){return[a];}}]);}(l));o.activeChips=[],e([s({type:String})],o.prototype,"label",void 0),e([s({type:String})],o.prototype,"value",void 0),e([s({type:Number})],o.prototype,"viewMoreCount",void 0),e([s({type:Boolean})],o.prototype,"editable",void 0),e([s({type:Boolean})],o.prototype,"closable",void 0),e([s({type:String})],o.prototype,"icon",void 0),e([s({type:String})],o.prototype,"removeIcon",void 0),e([s({type:Boolean,reflect:!0})],o.prototype,"active",void 0),_export("N",o=_n=e([i("nile-filter-chip")],o));}};});
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","../internal/nile-element.cjs.js","./nile-filter-chip.css.cjs.js"],function(_export,_context){"use strict";var e,t,s,i,l,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_n,o;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 _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););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){e=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;i=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_nileFilterChipCssCjsJs){a=_nileFilterChipCssCjsJs.s;}],execute:function execute(){_export("N",o=_n=/*#__PURE__*/function(_l){function n(){var _this;_classCallCheck(this,n);_this=_callSuper(this,n,arguments),_this.label="",_this.value="",_this.viewMoreCount=0,_this.editable=!1,_this.closable=!1,_this.icon="",_this.removeIcon="",_this.active=!1;return _this;}_inherits(n,_l);return _createClass(n,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(n,"connectedCallback",this,3)([]),this.registerChip();}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(n,"disconnectedCallback",this,3)([]),this.unregisterChip();}},{key:"registerChip",value:function registerChip(){_n.activeChips.push(this);}},{key:"unregisterChip",value:function unregisterChip(){var _this2=this;_n.activeChips=_n.activeChips.filter(function(e){return e!==_this2;});}},{key:"handleClose",value:function handleClose(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("nile-close",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}})),this.remove();}},{key:"handleClick",value:function handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}}));}},{key:"getLabelSlot",value:function getLabelSlot(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">",":</span>\n </slot>\n </span>\n\n "])),this.label);}},{key:"getValueSlot",value:function getValueSlot(){return t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">","</span>\n </slot>\n </span>\n\n "])),this.value);}},{key:"getviewMoreCountSlot",value:function getviewMoreCountSlot(){return t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <slot name=\"suffix\">\n ","\n </slot>\n "])),this.viewMoreCount?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <span class=\"badge-wrapper\">\n <nile-badge class=\"badge\" part=\"badge\" variant=\"primary\" pilltype=\"pill-color\" exportparts=\"content, base\">\n +","\n </nile-badge>\n </span>\n\n "])),this.viewMoreCount):t(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""]))));}},{key:"getCloseIconSlot",value:function getCloseIconSlot(){return t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n ","\n "])),this.closable?t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <span class=\"close-icon\" @click=\"","\">\n <nile-icon name=\"","\" size=\"12\"></nile-icon>\n </span>\n "])),this.handleClose,this.removeIcon||"close"):t(_templateObject8||(_templateObject8=_taggedTemplateLiteral([""]))));}},{key:"render",value:function render(){return t(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div class=\"chip\" @click=\"","\">\n <slot name=\"icon\">\n ","\n </slot>\n ","\n <slot name=\"content\"></slot>\n ","\n ","\n ","\n </div>\n "])),this.handleClick,this.icon?t(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<span class=\"icon\">","</span>"])),this.icon):t(_templateObject11||(_templateObject11=_taggedTemplateLiteral([""]))),this.getLabelSlot(),this.getValueSlot(),this.getviewMoreCountSlot(),this.getCloseIconSlot());}}],[{key:"styles",get:function get(){return[a];}}]);}(l));o.activeChips=[],e([s({type:String})],o.prototype,"label",void 0),e([s({type:String})],o.prototype,"value",void 0),e([s({type:Number})],o.prototype,"viewMoreCount",void 0),e([s({type:Boolean})],o.prototype,"editable",void 0),e([s({type:Boolean})],o.prototype,"closable",void 0),e([s({type:String})],o.prototype,"icon",void 0),e([s({type:String})],o.prototype,"removeIcon",void 0),e([s({type:Boolean,reflect:!0})],o.prototype,"active",void 0),_export("N",o=_n=e([i("nile-filter-chip")],o));}};});
2
2
  //# sourceMappingURL=nile-filter-chip.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-filter-chip.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport { styles } from './nile-filter-chip.css';\n\n/**\n * Nile filter-chip component.\n *\n * @tag nile-filter-chip\n */\n@customElement('nile-filter-chip')\nexport class NileFilterChip extends NileElement {\n @property({ type: String }) label = '';\n @property({ type: String }) value = '';\n @property({ type: Number }) viewMoreCount: number = 0;\n @property({ type: Boolean }) editable = false;\n @property({ type: Boolean }) closable = false;\n @property({ type: String }) icon = '';\n @property({ type: String }) removeIcon = '';\n @property({ type: Boolean, reflect: true }) active = false;\n\n\n private static activeChips: NileFilterChip[] = [];\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.registerChip();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.unregisterChip();\n }\n\n private registerChip() {\n NileFilterChip.activeChips.push(this);\n }\n\n private unregisterChip() {\n NileFilterChip.activeChips = NileFilterChip.activeChips.filter(\n (chip) => chip !== this\n );\n }\n\n private handleClose(event: Event) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('nile-close', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n this.remove();\n }\n\n private handleClick() {\n this.dispatchEvent(\n new CustomEvent('nile-click', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n }\n\n private getLabelSlot(): TemplateResult {\n return html`\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">${this.label}:</span>\n </slot>\n </span>\n\n `;\n }\n\n private getValueSlot(): TemplateResult {\n return html`\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">${this.value}</span>\n </slot>\n </span>\n\n `;\n }\n\n private getviewMoreCountSlot(): TemplateResult {\n return html`\n <slot name=\"suffix\">\n ${this.viewMoreCount\n ? html`\n <span class=\"badge-wrapper\">\n <nile-badge variant=\"primary\" pilltype=\"pill-color\">\n +${this.viewMoreCount}\n </nile-badge>\n </span>\n\n `\n : html``}\n </slot>\n `;\n }\n\n private getCloseIconSlot(): TemplateResult {\n return html`\n ${this.closable\n ? html`\n <span class=\"close-icon\" @click=\"${this.handleClose}\">\n <nile-icon name=\"${this.removeIcon || 'close'}\" size=\"12\"></nile-icon>\n </span>\n `\n : html``}\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"chip\" @click=\"${this.handleClick}\">\n <slot name=\"icon\">\n ${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : html``}\n </slot>\n ${this.getLabelSlot()}\n <slot name=\"content\"></slot>\n ${this.getValueSlot()}\n ${this.getviewMoreCountSlot()}\n ${this.getCloseIconSlot()}\n </div>\n `;\n }\n}\n\nexport default NileFilterChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-filter-chip': NileFilterChip;\n }\n}\n"],"names":["NileFilterChip","NileFilterChip_1","_l","n","this","label","value","viewMoreCount","editable","closable","icon","removeIcon","active","_this","_inherits","_createClass","key","connectedCallback","super","registerChip","disconnectedCallback","unregisterChip","activeChips","push","filter","chip","handleClose","event","stopPropagation","dispatchEvent","CustomEvent","detail","remove","handleClick","getLabelSlot","html","_templateObject","_taggedTemplateLiteral","getValueSlot","_templateObject2","getviewMoreCountSlot","_templateObject3","_templateObject4","_templateObject5","getCloseIconSlot","_templateObject6","_templateObject7","_templateObject8","render","_templateObject9","_templateObject10","_templateObject11","get","styles","NileElement","__decorate","property","type","String","prototype","Number","Boolean","reflect","customElement"],"mappings":"o0HAWaA,CAAAA,CAAcC,EAApB,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEACuBC,EAAAA,KAAAA,CAAKC,KAAG,CAAA,EAAA,CACRD,KAAAA,CAAKE,KAAAA,CAAG,EACRF,CAAAA,KAAAA,CAAaG,aAAW,CAAA,CAAA,CACvBH,KAAAA,CAAQI,QAAAA,CAAAA,CAAG,CACXJ,CAAAA,KAAAA,CAAQK,QAAG,CAAA,CAAA,CAAA,CACZL,KAAAA,CAAIM,IAAAA,CAAG,EACPN,CAAAA,KAAAA,CAAUO,UAAG,CAAA,EAAA,CACGP,KAAAA,CAAMQ,MAAAA,CAAAA,CAAG,CA4GtD,QAAAC,KAAA,EAvGQC,SAAA,CAAAX,CAAA,CAAAD,EAAA,SAAAa,YAAA,CAAAZ,CAAA,GAAAa,GAAA,qBAAAV,KAAA,CAIP,SAAAW,iBAAAA,CAAAA,CAAAA,CACEC,aAAAA,CAAAA,CAAAA,iCACAd,IAAKe,CAAAA,YAAAA,CAAAA,CACN,EAED,GAAAH,GAAA,wBAAAV,KAAA,UAAAc,oBAAAA,CAAAA,EACEF,aAAAA,CAAAA,CAAAA,oCACAd,IAAKiB,CAAAA,cAAAA,CAAAA,CACN,EAEO,GAAAL,GAAA,gBAAAV,KAAA,UAAAa,YAAAA,CAAAA,CACNlB,CAAAA,EAAAA,CAAeqB,WAAYC,CA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AAA,EAAAA,CAAAsD,EAAA,CAD1BQ,CAAAA,CAAc,qBACF/D"}
1
+ {"version":3,"file":"nile-filter-chip.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport { styles } from './nile-filter-chip.css';\n\n/**\n * Nile filter-chip component.\n *\n * @tag nile-filter-chip\n */\n@customElement('nile-filter-chip')\nexport class NileFilterChip extends NileElement {\n @property({ type: String }) label = '';\n @property({ type: String }) value = '';\n @property({ type: Number }) viewMoreCount: number = 0;\n @property({ type: Boolean }) editable = false;\n @property({ type: Boolean }) closable = false;\n @property({ type: String }) icon = '';\n @property({ type: String }) removeIcon = '';\n @property({ type: Boolean, reflect: true }) active = false;\n\n\n private static activeChips: NileFilterChip[] = [];\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.registerChip();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.unregisterChip();\n }\n\n private registerChip() {\n NileFilterChip.activeChips.push(this);\n }\n\n private unregisterChip() {\n NileFilterChip.activeChips = NileFilterChip.activeChips.filter(\n (chip) => chip !== this\n );\n }\n\n private handleClose(event: Event) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('nile-close', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n this.remove();\n }\n\n private handleClick() {\n this.dispatchEvent(\n new CustomEvent('nile-click', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n }\n\n private getLabelSlot(): TemplateResult {\n return html`\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">${this.label}:</span>\n </slot>\n </span>\n\n `;\n }\n\n private getValueSlot(): TemplateResult {\n return html`\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">${this.value}</span>\n </slot>\n </span>\n\n `;\n }\n\n private getviewMoreCountSlot(): TemplateResult {\n return html`\n <slot name=\"suffix\">\n ${this.viewMoreCount\n ? html`\n <span class=\"badge-wrapper\">\n <nile-badge class=\"badge\" part=\"badge\" variant=\"primary\" pilltype=\"pill-color\" exportparts=\"content, base\">\n +${this.viewMoreCount}\n </nile-badge>\n </span>\n\n `\n : html``}\n </slot>\n `;\n }\n\n private getCloseIconSlot(): TemplateResult {\n return html`\n ${this.closable\n ? html`\n <span class=\"close-icon\" @click=\"${this.handleClose}\">\n <nile-icon name=\"${this.removeIcon || 'close'}\" size=\"12\"></nile-icon>\n </span>\n `\n : html``}\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"chip\" @click=\"${this.handleClick}\">\n <slot name=\"icon\">\n ${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : html``}\n </slot>\n ${this.getLabelSlot()}\n <slot name=\"content\"></slot>\n ${this.getValueSlot()}\n ${this.getviewMoreCountSlot()}\n ${this.getCloseIconSlot()}\n </div>\n `;\n }\n}\n\nexport default NileFilterChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-filter-chip': NileFilterChip;\n }\n}\n"],"names":["NileFilterChip","NileFilterChip_1","_l","n","this","label","value","viewMoreCount","editable","closable","icon","removeIcon","active","_this","_inherits","_createClass","key","connectedCallback","super","registerChip","disconnectedCallback","unregisterChip","activeChips","push","filter","chip","handleClose","event","stopPropagation","dispatchEvent","CustomEvent","detail","remove","handleClick","getLabelSlot","html","_templateObject","_taggedTemplateLiteral","getValueSlot","_templateObject2","getviewMoreCountSlot","_templateObject3","_templateObject4","_templateObject5","getCloseIconSlot","_templateObject6","_templateObject7","_templateObject8","render","_templateObject9","_templateObject10","_templateObject11","get","styles","NileElement","__decorate","property","type","String","prototype","Number","Boolean","reflect","customElement"],"mappings":"o0HAWaA,CAAAA,CAAcC,EAApB,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEACuBC,EAAAA,KAAAA,CAAKC,KAAG,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AAA,CAAA2D,UAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CACzBJ,EAAA,CAA5BC,CAAAA,CAAS,CAAEC,IAAMI,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAA4B7D,EAAA2D,SAAA,CAAA,UAAA,CAAA,IAAA,IACjBJ,CAAA,CAAA,CAA5BC,EAAS,CAAEC,IAAAA,CAAMI,WAA4B7D,CAAA2D,CAAAA,SAAAA,CAAA,eAAA,EAClBJ,CAAAA,CAAAA,CAAAA,CAAA,CAA3BC,CAAS,CAAA,CAAEC,KAAMC,MAAoB1D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA2D,UAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CACVJ,EAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAMC,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA0B1D,EAAA2D,SAAA,CAAA,YAAA,CAAA,IAAA,IACAJ,CAAA,CAAA,CAA3CC,EAAS,CAAEC,IAAAA,CAAMI,QAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB9D,EAAA2D,SAAA,CAAA,QAAA,CAAA,IAAA,gBARhD3D,CAAcC,CAAAA,EAAAA,CAAAsD,EAAA,CAD1BQ,CAAAA,CAAc,qBACF/D"}
@@ -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\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n"]))));}};});
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\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n.badge{\n display: inline-flex;\n align-items: center;\n height: 20px; \n}\n\nnile-badge::part(content) {\n line-height: 20px;\n}\n\n"]))));}};});
2
2
  //# sourceMappingURL=nile-filter-chip.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-filter-chip.css.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.css.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 {css} from 'lit';\n\n/**\n * FilterChip CSS\n */\n\nexport const styles = css`\n\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n`;\n\nexport default [styles];\n\n "],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAaaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-filter-chip.css.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.css.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 {css} from 'lit';\n\n/**\n * FilterChip CSS\n */\n\nexport const styles = css`\n\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n.badge{\n display: inline-flex;\n align-items: center;\n height: 20px; \n}\n\nnile-badge::part(content) {\n line-height: 20px;\n}\n\n`;\n\nexport default [styles];\n\n "],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAaaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -118,4 +118,14 @@ import{css as e}from"lit";const i=e`
118
118
  margin-right: 12px;
119
119
  }
120
120
 
121
+ .badge{
122
+ display: inline-flex;
123
+ align-items: center;
124
+ height: 20px;
125
+ }
126
+
127
+ nile-badge::part(content) {
128
+ line-height: 20px;
129
+ }
130
+
121
131
  `;export{i as s};
@@ -16,7 +16,7 @@ import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as
16
16
  <slot name="suffix">
17
17
  ${this.viewMoreCount?t`
18
18
  <span class="badge-wrapper">
19
- <nile-badge variant="primary" pilltype="pill-color">
19
+ <nile-badge class="badge" part="badge" variant="primary" pilltype="pill-color" exportparts="content, base">
20
20
  +${this.viewMoreCount}
21
21
  </nile-badge>
22
22
  </span>
@@ -128,6 +128,16 @@ export const styles = css `
128
128
  margin-right: 12px;
129
129
  }
130
130
 
131
+ .badge{
132
+ display: inline-flex;
133
+ align-items: center;
134
+ height: 20px;
135
+ }
136
+
137
+ nile-badge::part(content) {
138
+ line-height: 20px;
139
+ }
140
+
131
141
  `;
132
142
  export default [styles];
133
143
  //# sourceMappingURL=nile-filter-chip.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-filter-chip.css.js","sourceRoot":"","sources":["../../../src/nile-filter-chip/nile-filter-chip.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwHxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","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 {css} from 'lit';\n\n/**\n * FilterChip CSS\n */\n\nexport const styles = css`\n\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n`;\n\nexport default [styles];\n\n "]}
1
+ {"version":3,"file":"nile-filter-chip.css.js","sourceRoot":"","sources":["../../../src/nile-filter-chip/nile-filter-chip.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkIxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","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 {css} from 'lit';\n\n/**\n * FilterChip CSS\n */\n\nexport const styles = css`\n\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n.badge{\n display: inline-flex;\n align-items: center;\n height: 20px; \n}\n\nnile-badge::part(content) {\n line-height: 20px;\n}\n\n`;\n\nexport default [styles];\n\n "]}
@@ -72,7 +72,7 @@ let NileFilterChip = NileFilterChip_1 = class NileFilterChip extends NileElement
72
72
  ${this.viewMoreCount
73
73
  ? html `
74
74
  <span class="badge-wrapper">
75
- <nile-badge variant="primary" pilltype="pill-color">
75
+ <nile-badge class="badge" part="badge" variant="primary" pilltype="pill-color" exportparts="content, base">
76
76
  +${this.viewMoreCount}
77
77
  </nile-badge>
78
78
  </span>
@@ -1 +1 @@
1
- {"version":3,"file":"nile-filter-chip.js","sourceRoot":"","sources":["../../../src/nile-filter-chip/nile-filter-chip.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAc,IAAI,EAAuC,MAAM,KAAK,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD;;;;GAIG;AAEI,IAAM,cAAc,sBAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QACuB,UAAK,GAAG,EAAE,CAAC;QACX,UAAK,GAAG,EAAE,CAAC;QACX,kBAAa,GAAW,CAAC,CAAC;QACzB,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QAClB,SAAI,GAAG,EAAE,CAAC;QACV,eAAU,GAAG,EAAE,CAAC;QACA,WAAM,GAAG,KAAK,CAAC;IA4G7D,CAAC;IAvGQ,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAEO,YAAY;QAClB,gBAAc,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAEO,cAAc;QACpB,gBAAc,CAAC,WAAW,GAAG,gBAAc,CAAC,WAAW,CAAC,MAAM,CAC5D,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CACxB,CAAC;IACJ,CAAC;I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IAAI,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA,EAAE;;UAEnE,IAAI,CAAC,YAAY,EAAE;;UAEnB,IAAI,CAAC,YAAY,EAAE;UACnB,IAAI,CAAC,oBAAoB,EAAE;UAC3B,IAAI,CAAC,gBAAgB,EAAE;;KAE5B,CAAC;IACJ,CAAC;;AAxGc,0BAAW,GAAqB,EAAE,AAAvB,CAAwB;AAVtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAY;AACX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAY;AACX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAA2B;AACzB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAkB;AACjB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAkB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAiB;AACA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAgB;AARhD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAoH1B;;AAED,eAAe,cAAc,CAAC","sourcesContent":["import { LitElement, html, css, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport { styles } from './nile-filter-chip.css';\n\n/**\n * Nile filter-chip component.\n *\n * @tag nile-filter-chip\n */\n@customElement('nile-filter-chip')\nexport class NileFilterChip extends NileElement {\n @property({ type: String }) label = '';\n @property({ type: String }) value = '';\n @property({ type: Number }) viewMoreCount: number = 0;\n @property({ type: Boolean }) editable = false;\n @property({ type: Boolean }) closable = false;\n @property({ type: String }) icon = '';\n @property({ type: String }) removeIcon = '';\n @property({ type: Boolean, reflect: true }) active = false;\n\n\n private static activeChips: NileFilterChip[] = [];\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.registerChip();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.unregisterChip();\n }\n\n private registerChip() {\n NileFilterChip.activeChips.push(this);\n }\n\n private unregisterChip() {\n NileFilterChip.activeChips = NileFilterChip.activeChips.filter(\n (chip) => chip !== this\n );\n }\n\n private handleClose(event: Event) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('nile-close', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n this.remove();\n }\n\n private handleClick() {\n this.dispatchEvent(\n new CustomEvent('nile-click', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n }\n\n private getLabelSlot(): TemplateResult {\n return html`\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">${this.label}:</span>\n </slot>\n </span>\n\n `;\n }\n\n private getValueSlot(): TemplateResult {\n return html`\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">${this.value}</span>\n </slot>\n </span>\n\n `;\n }\n\n private getviewMoreCountSlot(): TemplateResult {\n return html`\n <slot name=\"suffix\">\n ${this.viewMoreCount\n ? html`\n <span class=\"badge-wrapper\">\n <nile-badge variant=\"primary\" pilltype=\"pill-color\">\n +${this.viewMoreCount}\n </nile-badge>\n </span>\n\n `\n : html``}\n </slot>\n `;\n }\n\n private getCloseIconSlot(): TemplateResult {\n return html`\n ${this.closable\n ? html`\n <span class=\"close-icon\" @click=\"${this.handleClose}\">\n <nile-icon name=\"${this.removeIcon || 'close'}\" size=\"12\"></nile-icon>\n </span>\n `\n : html``}\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"chip\" @click=\"${this.handleClick}\">\n <slot name=\"icon\">\n ${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : html``}\n </slot>\n ${this.getLabelSlot()}\n <slot name=\"content\"></slot>\n ${this.getValueSlot()}\n ${this.getviewMoreCountSlot()}\n ${this.getCloseIconSlot()}\n </div>\n `;\n }\n}\n\nexport default NileFilterChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-filter-chip': NileFilterChip;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-filter-chip.js","sourceRoot":"","sources":["../../../src/nile-filter-chip/nile-filter-chip.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAc,IAAI,EAAuC,MAAM,KAAK,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD;;;;GAIG;AAEI,IAAM,cAAc,sBAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QACuB,UAAK,GAAG,EAAE,CAAC;QACX,UAAK,GAAG,EAAE,CAAC;QACX,kBAAa,GAAW,CAAC,CAAC;QACzB,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QAClB,SAAI,GAAG,EAAE,CAAC;QACV,eAAU,GAAG,EAAE,CAAC;QACA,WAAM,GAAG,KAAK,CAAC;IA4G7D,CAAC;IAvGQ,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAEO,YAAY;QAClB,gBAAc,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC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A,EAAE;KACX,CAAC;IACJ,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;kCACmB,IAAI,CAAC,WAAW;;YAEtC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,sBAAsB,IAAI,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA,EAAE;;UAEnE,IAAI,CAAC,YAAY,EAAE;;UAEnB,IAAI,CAAC,YAAY,EAAE;UACnB,IAAI,CAAC,oBAAoB,EAAE;UAC3B,IAAI,CAAC,gBAAgB,EAAE;;KAE5B,CAAC;IACJ,CAAC;;AAxGc,0BAAW,GAAqB,EAAE,AAAvB,CAAwB;AAVtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAY;AACX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAY;AACX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAA2B;AACzB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAkB;AACjB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAkB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAiB;AACA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAgB;AARhD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAoH1B;;AAED,eAAe,cAAc,CAAC","sourcesContent":["import { LitElement, html, css, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport { styles } from './nile-filter-chip.css';\n\n/**\n * Nile filter-chip component.\n *\n * @tag nile-filter-chip\n */\n@customElement('nile-filter-chip')\nexport class NileFilterChip extends NileElement {\n @property({ type: String }) label = '';\n @property({ type: String }) value = '';\n @property({ type: Number }) viewMoreCount: number = 0;\n @property({ type: Boolean }) editable = false;\n @property({ type: Boolean }) closable = false;\n @property({ type: String }) icon = '';\n @property({ type: String }) removeIcon = '';\n @property({ type: Boolean, reflect: true }) active = false;\n\n\n private static activeChips: NileFilterChip[] = [];\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.registerChip();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.unregisterChip();\n }\n\n private registerChip() {\n NileFilterChip.activeChips.push(this);\n }\n\n private unregisterChip() {\n NileFilterChip.activeChips = NileFilterChip.activeChips.filter(\n (chip) => chip !== this\n );\n }\n\n private handleClose(event: Event) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('nile-close', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n this.remove();\n }\n\n private handleClick() {\n this.dispatchEvent(\n new CustomEvent('nile-click', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n }\n\n private getLabelSlot(): TemplateResult {\n return html`\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">${this.label}:</span>\n </slot>\n </span>\n\n `;\n }\n\n private getValueSlot(): TemplateResult {\n return html`\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">${this.value}</span>\n </slot>\n </span>\n\n `;\n }\n\n private getviewMoreCountSlot(): TemplateResult {\n return html`\n <slot name=\"suffix\">\n ${this.viewMoreCount\n ? html`\n <span class=\"badge-wrapper\">\n <nile-badge class=\"badge\" part=\"badge\" variant=\"primary\" pilltype=\"pill-color\" exportparts=\"content, base\">\n +${this.viewMoreCount}\n </nile-badge>\n </span>\n\n `\n : html``}\n </slot>\n `;\n }\n\n private getCloseIconSlot(): TemplateResult {\n return html`\n ${this.closable\n ? html`\n <span class=\"close-icon\" @click=\"${this.handleClose}\">\n <nile-icon name=\"${this.removeIcon || 'close'}\" size=\"12\"></nile-icon>\n </span>\n `\n : html``}\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"chip\" @click=\"${this.handleClick}\">\n <slot name=\"icon\">\n ${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : html``}\n </slot>\n ${this.getLabelSlot()}\n <slot name=\"content\"></slot>\n ${this.getValueSlot()}\n ${this.getviewMoreCountSlot()}\n ${this.getCloseIconSlot()}\n </div>\n `;\n }\n}\n\nexport default NileFilterChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-filter-chip': NileFilterChip;\n }\n}\n"]}