@aquera/nile-elements 0.1.36-beta-1.4 → 0.1.37

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.
Files changed (179) hide show
  1. package/README.md +4 -0
  2. package/demo/index.html +9 -11
  3. package/demo/variables.css +13 -0
  4. package/dist/{fixture-d7bf42eb.cjs.js → fixture-161dee0b.cjs.js} +2 -2
  5. package/dist/{fixture-d7bf42eb.cjs.js.map → fixture-161dee0b.cjs.js.map} +1 -1
  6. package/dist/{fixture-178ed8d2.esm.js → fixture-372df3b0.esm.js} +1 -1
  7. package/dist/index.cjs.js +1 -1
  8. package/dist/index.esm.js +1 -1
  9. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  10. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  11. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  12. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  13. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  14. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  15. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  16. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  17. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  18. package/dist/nile-button/nile-button.test.esm.js +1 -1
  19. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  20. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  21. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  22. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  23. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  24. package/dist/nile-card/nile-card.test.esm.js +1 -1
  25. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  26. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  27. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  28. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  29. package/dist/nile-chip/nile-chip.esm.js +17 -8
  30. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  31. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  32. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  33. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  34. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  35. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  36. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  37. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  38. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  39. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  40. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  41. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  42. package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
  43. package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
  44. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +1 -1
  45. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
  46. package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +40 -17
  47. package/dist/nile-filter-chip/nile-filter-chip.esm.js +24 -15
  48. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  49. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +1 -1
  50. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +16 -16
  51. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  52. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  53. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  54. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  55. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  56. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  57. package/dist/nile-icon/icons/svg/accessreview.cjs.js +1 -1
  58. package/dist/nile-icon/icons/svg/accessreview.cjs.js.map +1 -1
  59. package/dist/nile-icon/icons/svg/accessreview.esm.js +1 -1
  60. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  61. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  62. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  63. package/dist/nile-input/nile-input.test.esm.js +1 -1
  64. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  65. package/dist/nile-link/nile-link.test.esm.js +1 -1
  66. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  67. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  68. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  69. package/dist/nile-popover/nile-popover.test.esm.js +1 -1
  70. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  71. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  72. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  73. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  74. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  75. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  76. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  77. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  78. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  79. package/dist/nile-select/nile-select.test.esm.js +1 -1
  80. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  81. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  82. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  83. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  84. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  85. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  86. package/dist/src/index.d.ts +1 -0
  87. package/dist/src/index.js +1 -0
  88. package/dist/src/index.js.map +1 -1
  89. package/dist/src/nile-chip/nile-chip.js +9 -0
  90. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  91. package/dist/src/nile-filter-chip/nile-filter-chip.css.js +40 -17
  92. package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
  93. package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +4 -3
  94. package/dist/src/nile-filter-chip/nile-filter-chip.js +25 -12
  95. package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -1
  96. package/dist/src/nile-filter-chip/nile-filter-chip.test.js +12 -12
  97. package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -1
  98. package/dist/src/nile-icon/icons/svg/accessreview.d.ts +1 -1
  99. package/dist/src/nile-icon/icons/svg/accessreview.js +1 -1
  100. package/dist/src/nile-icon/icons/svg/accessreview.js.map +1 -1
  101. package/dist/tsconfig.tsbuildinfo +1 -1
  102. package/package.json +1 -1
  103. package/src/index.ts +2 -1
  104. package/src/nile-chip/nile-chip.ts +9 -0
  105. package/src/nile-filter-chip/index.ts +1 -0
  106. package/src/nile-filter-chip/nile-filter-chip.css.ts +138 -0
  107. package/src/nile-filter-chip/nile-filter-chip.test.ts +92 -0
  108. package/src/nile-filter-chip/nile-filter-chip.ts +136 -0
  109. package/src/nile-icon/icons/svg/accessreview.ts +1 -1
  110. package/vscode-html-custom-data.json +49 -0
  111. package/dist/fixture-bb486165.cjs.js +0 -395
  112. package/dist/fixture-bb486165.cjs.js.map +0 -1
  113. package/dist/fixture-c4e75e04.esm.js +0 -569
  114. package/dist/nile-tooltip/nile-tooltip-utils.cjs.js +0 -2
  115. package/dist/nile-tooltip/nile-tooltip-utils.cjs.js.map +0 -1
  116. package/dist/nile-tooltip/nile-tooltip-utils.esm.js +0 -1
  117. package/dist/nile-tooltip/nile-tooltip.test.cjs.js +0 -2
  118. package/dist/nile-tooltip/nile-tooltip.test.cjs.js.map +0 -1
  119. package/dist/nile-tooltip/nile-tooltip.test.esm.js +0 -47
  120. package/dist/src/nile-new-error/index.d.ts +0 -1
  121. package/dist/src/nile-new-error/index.js +0 -2
  122. package/dist/src/nile-new-error/index.js.map +0 -1
  123. package/dist/src/nile-new-error/nile-new-error.css.d.ts +0 -12
  124. package/dist/src/nile-new-error/nile-new-error.css.js +0 -38
  125. package/dist/src/nile-new-error/nile-new-error.css.js.map +0 -1
  126. package/dist/src/nile-new-error/nile-new-error.d.ts +0 -36
  127. package/dist/src/nile-new-error/nile-new-error.js +0 -74
  128. package/dist/src/nile-new-error/nile-new-error.js.map +0 -1
  129. package/dist/src/nile-tooltip/nile-tooltip-utils.d.ts +0 -18
  130. package/dist/src/nile-tooltip/nile-tooltip-utils.js +0 -216
  131. package/dist/src/nile-tooltip/nile-tooltip-utils.js.map +0 -1
  132. package/dist/src/nile-tooltip/nile-tooltip.test.d.ts +0 -1
  133. package/dist/src/nile-tooltip/nile-tooltip.test.js +0 -148
  134. package/dist/src/nile-tooltip/nile-tooltip.test.js.map +0 -1
  135. package/dist/src/nile-virtual-list/index.d.ts +0 -1
  136. package/dist/src/nile-virtual-list/index.js +0 -2
  137. package/dist/src/nile-virtual-list/index.js.map +0 -1
  138. package/dist/src/nile-virtual-list/nile-virtual-list.css.d.ts +0 -12
  139. package/dist/src/nile-virtual-list/nile-virtual-list.css.js +0 -25
  140. package/dist/src/nile-virtual-list/nile-virtual-list.css.js.map +0 -1
  141. package/dist/src/nile-virtual-list/nile-virtual-list.d.ts +0 -28
  142. package/dist/src/nile-virtual-list/nile-virtual-list.js +0 -69
  143. package/dist/src/nile-virtual-list/nile-virtual-list.js.map +0 -1
  144. package/dist/src/nile-virtual-scroll/index.d.ts +0 -1
  145. package/dist/src/nile-virtual-scroll/index.js +0 -2
  146. package/dist/src/nile-virtual-scroll/index.js.map +0 -1
  147. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.css.d.ts +0 -12
  148. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.css.js +0 -17
  149. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.css.js.map +0 -1
  150. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.d.ts +0 -54
  151. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.js +0 -196
  152. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.js.map +0 -1
  153. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.utils.d.ts +0 -23
  154. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.utils.js +0 -48
  155. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.utils.js.map +0 -1
  156. package/dist/src/nile-virtual-select/event-handlers.d.ts +0 -19
  157. package/dist/src/nile-virtual-select/event-handlers.js +0 -153
  158. package/dist/src/nile-virtual-select/event-handlers.js.map +0 -1
  159. package/dist/src/nile-virtual-select/index.d.ts +0 -1
  160. package/dist/src/nile-virtual-select/index.js +0 -2
  161. package/dist/src/nile-virtual-select/index.js.map +0 -1
  162. package/dist/src/nile-virtual-select/models.d.ts +0 -33
  163. package/dist/src/nile-virtual-select/models.js +0 -5
  164. package/dist/src/nile-virtual-select/models.js.map +0 -1
  165. package/dist/src/nile-virtual-select/nile-virtual-select.css.d.ts +0 -12
  166. package/dist/src/nile-virtual-select/nile-virtual-select.css.js +0 -463
  167. package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +0 -1
  168. package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +0 -239
  169. package/dist/src/nile-virtual-select/nile-virtual-select.js +0 -1287
  170. package/dist/src/nile-virtual-select/nile-virtual-select.js.map +0 -1
  171. package/dist/src/nile-virtual-select/nile-virtual-select.test.d.ts +0 -0
  172. package/dist/src/nile-virtual-select/nile-virtual-select.test.js +0 -2
  173. package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +0 -1
  174. package/dist/src/nile-virtual-select/nile-virtual-select.utils.d.ts +0 -0
  175. package/dist/src/nile-virtual-select/nile-virtual-select.utils.js +0 -2
  176. package/dist/src/nile-virtual-select/nile-virtual-select.utils.js.map +0 -1
  177. package/dist/src/nile-virtual-select/option-utils.d.ts +0 -15
  178. package/dist/src/nile-virtual-select/option-utils.js +0 -59
  179. package/dist/src/nile-virtual-select/option-utils.js.map +0 -1
@@ -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 }) text = '';\n @property({ type: Number }) extraCount: 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\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: { text: this.text, extraCount: this.extraCount } })\n );\n this.remove();\n }\n\n private handleClick() {\n this.dispatchEvent(\n new CustomEvent('nile-click', { detail: { text: this.text, extraCount: this.extraCount } })\n );\n }\n\n private getLabelSlot(): TemplateResult {\n return html`\n <slot name=\"label\">\n <span class=\"label\">${this.label}:</span>\n </slot>\n `;\n }\n\n private getValueSlot(): TemplateResult {\n return html`\n <slot name=\"value\">\n <span class=\"value\">${this.text}</span>\n </slot>\n `;\n }\n\n private getExtraCountSlot(): TemplateResult {\n return html`\n <slot name=\"suffix\">\n ${this.extraCount\n ? html`\n <nile-badge variant=\"primary\" pilltype=\"pill-color\">\n +${this.extraCount}\n </nile-badge>\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.getExtraCountSlot()}\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","o","constructor","this","label","text","extraCount","editable","closable","icon","removeIcon","_this","_inherits","_l","_createClass","key","value","connectedCallback","super","registerChip","disconnectedCallback","unregisterChip","activeChips","push","filter","chip","handleClose","event","stopPropagation","dispatchEvent","CustomEvent","detail","remove","handleClick","getLabelSlot","html","_templateObject","_taggedTemplateLiteral","getValueSlot","_templateObject2","getExtraCountSlot","_templateObject3","_templateObject4","_templateObject5","getCloseIconSlot","_templateObject6","_templateObject7","_templateObject8","render","_templateObject9","_templateObject10","_templateObject11","get","styles","NileElement","__decorate","property","type","String","prototype","Number","Boolean","customElement"],"mappings":"o0HAWaA,CAAcC,CAAAA,EAAAA,uBAAAA,EAAAA,EAApB,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCACuBC,KAAAA,CAAKC,KAAAA,CAAG,EACRD,CAAAA,KAAAA,CAAIE,IAAG,CAAA,EAAA,CACPF,KAAAA,CAAUG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AS,CAAEC,IAAMI,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAA4B9D,CAAA4D,CAAAA,SAAAA,CAAA,eAAA,EACjBJ,CAAAA,CAAAA,CAAAA,CAAA,CAA5BC,CAAAA,CAAS,CAAEC,IAAMI,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAA4B9D,CAAA4D,CAAAA,SAAAA,CAAA,eAAA,EAClBJ,CAAAA,CAAAA,CAAAA,CAAA,CAA3BC,CAAS,CAAA,CAAEC,KAAMC,MAAoB3D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4D,SAAA,CAAA,MAAA,CAAA,IAAA,IACVJ,CAAA,CAAA,CAA3BC,CAAS,CAAA,CAAEC,KAAMC,MAA0B3D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4D,SAAA,CAAA,YAAA,CAAA,IAAA,gBAPjC5D,CAAcC,CAAAA,EAAAA,CAAAuD,EAAA,CAD1BO,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 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,YAAA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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 padding: 4px 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: var(--nile-radius-radius-xs);\n font-size: var(--nile-type-scale-3);\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 gap: 6px;\n margin-right: 6px;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\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\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 overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\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 padding: 2px;\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"]))));}};});
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"]))));}};});
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 padding: 4px 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: var(--nile-radius-radius-xs);\n font-size: var(--nile-type-scale-3);\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 gap: 6px;\n margin-right: 6px;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\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\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 overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\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 padding: 2px;\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\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`;\n\nexport default [styles];\n\n "],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAaaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -10,26 +10,30 @@ import{css as e}from"lit";const i=e`
10
10
  .chip {
11
11
  display: inline-flex;
12
12
  align-items: center;
13
- padding: 4px 8px;
13
+ height: 30px;
14
+ padding: 8px;
14
15
  border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);
15
- border-radius: var(--nile-radius-radius-xs);
16
- font-size: var(--nile-type-scale-3);
16
+ border-radius: 4px;
17
+ font-size: 14px;
17
18
  background-color: var(--nile-filter-chip-background-default);
18
19
  color: var(--nile-filter-chip-text-default);
19
20
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
20
21
  cursor: pointer;
21
- gap: 6px;
22
- margin-right: 6px;
22
+ box-sizing: border-box;
23
23
  }
24
24
 
25
25
  .chip:hover {
26
26
  background-color: var(--nile-filter-chip-hover-background);
27
27
  }
28
+ .chip:active {
29
+ background-color: var(--nile-filter-chip-active-background);
30
+ border-color: var(--nile-filter-chip-active-border-color-stroke);
31
+ }
32
+ :host([active]) .chip {
33
+ background-color: var(--nile-filter-chip-active-background);
34
+ border-color: var(--nile-filter-chip-active-border-color-stroke);
35
+ }
28
36
 
29
- .chip:active {
30
- background-color: var(--nile-filter-chip-active-background);
31
- border-color: var(--nile-filter-chip-active-border-color-stroke);
32
- }
33
37
 
34
38
  .icon {
35
39
  color: var(--nile-filter-chip-icon-color-default);
@@ -73,20 +77,22 @@ import{css as e}from"lit";const i=e`
73
77
  }
74
78
 
75
79
 
76
- .value {
77
- color: var(--nile-filter-chip-values-color-default);
78
- overflow: hidden;
79
- text-overflow: ellipsis;
80
- white-space: nowrap;
81
- max-width: 140px;
82
- }
80
+ .value {
81
+ color: var(--nile-filter-chip-values-color-default);
82
+ display: inline-block;
83
+ overflow: hidden;
84
+ text-overflow: ellipsis;
85
+ white-space: nowrap;
86
+ max-width: 140px;
87
+ vertical-align: bottom;
88
+ }
89
+
83
90
 
84
91
  .close-icon {
85
92
  color: var(--nile-filter-chip-close-icon-color-default);
86
93
  cursor: pointer;
87
94
  display: flex;
88
95
  align-items: center;
89
- padding: 2px;
90
96
  border-radius: 50%;
91
97
  transition: background-color 0.2s;
92
98
  }
@@ -95,4 +101,21 @@ import{css as e}from"lit";const i=e`
95
101
  background-color: var(--nile-filter-chip-close-icon-hover-background);
96
102
  color: var(--nile-filter-chip-close-icon-hover-color);
97
103
  }
104
+
105
+ .label-wrapper {
106
+ margin-right: 4px;
107
+ }
108
+
109
+ ::slotted([slot="icon"]) {
110
+ margin-right: 6px;
111
+ }
112
+
113
+ .value-wrapper {
114
+ margin-right: 4px;
115
+ }
116
+
117
+ .badge-wrapper {
118
+ margin-right: 12px;
119
+ }
120
+
98
121
  `;export{i as s};
@@ -1,34 +1,43 @@
1
- import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as s,customElement as i}from"lit/decorators.js";import{N as l}from"../internal/nile-element.esm.js";import{s as n}from"./nile-filter-chip.css.esm.js";var o;let a=o=class extends l{constructor(){super(...arguments),this.label="",this.text="",this.extraCount=0,this.editable=!1,this.closable=!1,this.icon="",this.removeIcon=""}static get styles(){return[n]}connectedCallback(){super.connectedCallback(),this.registerChip()}disconnectedCallback(){super.disconnectedCallback(),this.unregisterChip()}registerChip(){o.activeChips.push(this)}unregisterChip(){o.activeChips=o.activeChips.filter((t=>t!==this))}handleClose(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("nile-close",{detail:{text:this.text,extraCount:this.extraCount}})),this.remove()}handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{text:this.text,extraCount:this.extraCount}}))}getLabelSlot(){return e`
1
+ import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as s,customElement as i}from"lit/decorators.js";import{N as l}from"../internal/nile-element.esm.js";import{s as a}from"./nile-filter-chip.css.esm.js";var n;let o=n=class extends l{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[a]}connectedCallback(){super.connectedCallback(),this.registerChip()}disconnectedCallback(){super.disconnectedCallback(),this.unregisterChip()}registerChip(){n.activeChips.push(this)}unregisterChip(){n.activeChips=n.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 t`
2
+ <span class="label-wrapper">
2
3
  <slot name="label">
3
- <span class="label">${this.label}:</span>
4
+ <span class="label" part="label">${this.label}:</span>
4
5
  </slot>
5
- `}getValueSlot(){return e`
6
+ </span>
7
+
8
+ `}getValueSlot(){return t`
9
+ <span class="value-wrapper">
6
10
  <slot name="value">
7
- <span class="value">${this.text}</span>
11
+ <span class="value" part="value">${this.value}</span>
8
12
  </slot>
9
- `}getExtraCountSlot(){return e`
13
+ </span>
14
+
15
+ `}getviewMoreCountSlot(){return t`
10
16
  <slot name="suffix">
11
- ${this.extraCount?e`
17
+ ${this.viewMoreCount?t`
18
+ <span class="badge-wrapper">
12
19
  <nile-badge variant="primary" pilltype="pill-color">
13
- +${this.extraCount}
20
+ +${this.viewMoreCount}
14
21
  </nile-badge>
15
- `:e``}
22
+ </span>
23
+
24
+ `:t``}
16
25
  </slot>
17
- `}getCloseIconSlot(){return e`
18
- ${this.closable?e`
26
+ `}getCloseIconSlot(){return t`
27
+ ${this.closable?t`
19
28
  <span class="close-icon" @click="${this.handleClose}">
20
29
  <nile-icon name="${this.removeIcon||"close"}" size="12"></nile-icon>
21
30
  </span>
22
- `:e``}
23
- `}render(){return e`
31
+ `:t``}
32
+ `}render(){return t`
24
33
  <div class="chip" @click="${this.handleClick}">
25
34
  <slot name="icon">
26
- ${this.icon?e`<span class="icon">${this.icon}</span>`:e``}
35
+ ${this.icon?t`<span class="icon">${this.icon}</span>`:t``}
27
36
  </slot>
28
37
  ${this.getLabelSlot()}
29
38
  <slot name="content"></slot>
30
39
  ${this.getValueSlot()}
31
- ${this.getExtraCountSlot()}
40
+ ${this.getviewMoreCountSlot()}
32
41
  ${this.getCloseIconSlot()}
33
42
  </div>
34
- `}};a.activeChips=[],t([s({type:String})],a.prototype,"label",void 0),t([s({type:String})],a.prototype,"text",void 0),t([s({type:Number})],a.prototype,"extraCount",void 0),t([s({type:Boolean})],a.prototype,"editable",void 0),t([s({type:Boolean})],a.prototype,"closable",void 0),t([s({type:String})],a.prototype,"icon",void 0),t([s({type:String})],a.prototype,"removeIcon",void 0),a=o=t([i("nile-filter-chip")],a);export{a as N};
43
+ `}};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),o=n=e([i("nile-filter-chip")],o);export{o as N};
@@ -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(["../fixture-bb486165.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-filter-chip.cjs.js","tslib","lit/decorators.js","../internal/nile-element.cjs.js","./nile-filter-chip.css.cjs.js"],function(_export,_context){"use strict";var e,t,i,l,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture001CjsJs){e=_fixture001CjsJs.f;t=_fixture001CjsJs.a;i=_fixture001CjsJs.o;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFilterChipCjsJs){a=_nileFilterChipCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){},function(_nileFilterChipCssCjsJs){}],execute:function execute(){describe("<nile-filter-chip>",function(){afterEach(function(){a.activeChips=[];}),it("registers and unregisters itself in activeChips",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"L\" text=\"T\"></nile-filter-chip>\n "]))));case 2:i=_context2.sent;t(a.activeChips).to.include(i);i.remove();_context2.next=7;return i.updateComplete;case 7:t(a.activeChips).to.not.include(i);case 8:case"end":return _context2.stop();}},_callee);}))),it("renders fallback label and text",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i,a,n;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"MyLabel\" text=\"MyText\"></nile-filter-chip>\n "]))));case 2:i=_context3.sent;a=i.shadowRoot.querySelector(".label");n=i.shadowRoot.querySelector(".value");t(a.textContent).to.equal("MyLabel:"),t(n.textContent.trim()).to.equal("MyText");case 6:case"end":return _context3.stop();}},_callee2);}))),it("renders slotted label and value over fallback",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var i,a,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(l(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-filter-chip>\n <span slot=\"label\">SLOT-LBL</span>\n <span slot=\"value\">SLOT-VAL</span>\n </nile-filter-chip>\n "]))));case 2:i=_context4.sent;a=i.querySelector('[slot="label"]');n=i.querySelector('[slot="value"]');t(a.textContent).to.equal("SLOT-LBL"),t(n.textContent).to.equal("SLOT-VAL");case 6:case"end":return _context4.stop();}},_callee3);}))),it("renders an icon when the `icon` property is set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var i;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(l(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-filter-chip icon=\"\u2605\" label=\"L\" text=\"T\"></nile-filter-chip>\n "]))));case 2:i=_context5.sent.shadowRoot.querySelector(".icon");t(i).to.exist,t(i.textContent).to.equal("★");case 4:case"end":return _context5.stop();}},_callee4);}))),it("does not render a badge when extraCount is zero",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var i;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(l(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-filter-chip extraCount=\"0\" label=\"L\" text=\"T\"></nile-filter-chip>\n "]))));case 2:i=_context6.sent;t(i.shadowRoot.querySelector("nile-badge")).to.be["null"];case 4:case"end":return _context6.stop();}},_callee5);}))),it("renders a +badge when extraCount > 0",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var i;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(l(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-filter-chip extraCount=\"5\" label=\"L\" text=\"T\"></nile-filter-chip>\n "]))));case 2:i=_context7.sent.shadowRoot.querySelector("nile-badge");t(i).to.exist,t(i.textContent).to.contain("+5");case 4:case"end":return _context7.stop();}},_callee6);}))),it("dispatches `nile-click` on chip click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var a,n,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(l(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"L\" text=\"T\"></nile-filter-chip>\n "]))));case 2:a=_context8.sent;n=a.shadowRoot.querySelector(".chip");setTimeout(function(){return n.click();});_context8.next=7;return i(a,"nile-click");case 7:s=_context8.sent;t(s.detail).to.deep.equal({text:"T",extraCount:0});case 9:case"end":return _context8.stop();}},_callee7);}))),it("dispatches `nile-close` on close icon click and removes itself",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var a,n,s;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(l(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-filter-chip closable extraCount=\"2\" text=\"TT\"></nile-filter-chip>\n "]))));case 2:a=_context9.sent;n=a.shadowRoot.querySelector(".close-icon");setTimeout(function(){return n.click();});_context9.next=7;return i(a,"nile-close");case 7:s=_context9.sent;t(s.detail).to.deep.equal({text:"TT",extraCount:2}),t(document.body.contains(a)).to.be["false"];case 9:case"end":return _context9.stop();}},_callee8);})));});}};});
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(["../fixture-161dee0b.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-filter-chip.cjs.js","tslib","lit/decorators.js","../internal/nile-element.cjs.js","./nile-filter-chip.css.cjs.js"],function(_export,_context){"use strict";var e,i,l,t,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture001CjsJs){e=_fixture001CjsJs.f;i=_fixture001CjsJs.a;l=_fixture001CjsJs.o;},function(_litStaticHtmlJs){t=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFilterChipCjsJs){a=_nileFilterChipCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){},function(_nileFilterChipCssCjsJs){}],execute:function execute(){describe("<nile-filter-chip>",function(){afterEach(function(){a.activeChips=[];}),it("registers and unregisters itself in activeChips",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var l;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"L\" value=\"T\"></nile-filter-chip>\n "]))));case 2:l=_context2.sent;i(a.activeChips).to.include(l);l.remove();_context2.next=7;return l.updateComplete;case 7:i(a.activeChips).to.not.include(l);case 8:case"end":return _context2.stop();}},_callee);}))),it("renders fallback label and value",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var l,a,n;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"MyLabel\" value=\"MyText\"></nile-filter-chip>\n "]))));case 2:l=_context3.sent;a=l.shadowRoot.querySelector(".label");n=l.shadowRoot.querySelector(".value");i(a.textContent).to.equal("MyLabel:"),i(n.textContent.trim()).to.equal("MyText");case 6:case"end":return _context3.stop();}},_callee2);}))),it("renders slotted label and value over fallback",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var l,a,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-filter-chip>\n <span slot=\"label\">SLOT-LBL</span>\n <span slot=\"value\">SLOT-VAL</span>\n </nile-filter-chip>\n "]))));case 2:l=_context4.sent;a=l.querySelector('[slot="label"]');n=l.querySelector('[slot="value"]');i(a.textContent).to.equal("SLOT-LBL"),i(n.textContent).to.equal("SLOT-VAL");case 6:case"end":return _context4.stop();}},_callee3);}))),it("renders an icon when the `icon` property is set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var l;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-filter-chip icon=\"\u2605\" label=\"L\" value=\"T\"></nile-filter-chip>\n "]))));case 2:l=_context5.sent.shadowRoot.querySelector(".icon");i(l).to.exist,i(l.textContent).to.equal("★");case 4:case"end":return _context5.stop();}},_callee4);}))),it("does not render a badge when viewMoreCount is zero",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var l;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-filter-chip viewMoreCount=\"0\" label=\"L\" value=\"T\"></nile-filter-chip>\n "]))));case 2:l=_context6.sent;i(l.shadowRoot.querySelector("nile-badge")).to.be["null"];case 4:case"end":return _context6.stop();}},_callee5);}))),it("renders a +badge when viewMoreCount > 0",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var l;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-filter-chip viewMoreCount=\"5\" label=\"L\" value=\"T\"></nile-filter-chip>\n "]))));case 2:l=_context7.sent.shadowRoot.querySelector("nile-badge");i(l).to.exist,i(l.textContent).to.contain("+5");case 4:case"end":return _context7.stop();}},_callee6);}))),it("dispatches `nile-click` on chip click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var a,n,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"L\" value=\"T\"></nile-filter-chip>\n "]))));case 2:a=_context8.sent;n=a.shadowRoot.querySelector(".chip");setTimeout(function(){return n.click();});_context8.next=7;return l(a,"nile-click");case 7:s=_context8.sent;i(s.detail).to.deep.equal({value:"T",viewMoreCount:0});case 9:case"end":return _context8.stop();}},_callee7);}))),it("dispatches `nile-close` on close icon click and removes itself",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var a,n,s;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(t(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-filter-chip closable viewMoreCount=\"2\" value=\"TT\"></nile-filter-chip>\n "]))));case 2:a=_context9.sent;n=a.shadowRoot.querySelector(".close-icon");setTimeout(function(){return n.click();});_context9.next=7;return l(a,"nile-close");case 7:s=_context9.sent;i(s.detail).to.deep.equal({value:"TT",viewMoreCount:2}),i(document.body.contains(a)).to.be["false"];case 9:case"end":return _context9.stop();}},_callee8);})));});}};});
2
2
  //# sourceMappingURL=nile-filter-chip.test.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-filter-chip.test.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.test.ts"],"sourcesContent":["import { fixture, expect, html, oneEvent } from '@open-wc/testing';\nimport './nile-filter-chip';\nimport { NileFilterChip } from './nile-filter-chip';\n\ndescribe('<nile-filter-chip>', () => {\n afterEach(() => {\n (NileFilterChip as any).activeChips = [];\n });\n\n it('registers and unregisters itself in activeChips', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n expect((NileFilterChip as any).activeChips).to.include(el);\n el.remove();\n await el.updateComplete;\n expect((NileFilterChip as any).activeChips).to.not.include(el);\n });\n\n it('renders fallback label and text', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"MyLabel\" text=\"MyText\"></nile-filter-chip>\n `);\n const label = el.shadowRoot!.querySelector('.label')! as HTMLElement;\n const value = el.shadowRoot!.querySelector('.value')! as HTMLElement;\n expect(label.textContent).to.equal('MyLabel:');\n expect(value.textContent!.trim()).to.equal('MyText');\n });\n\n it('renders slotted label and value over fallback', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip>\n <span slot=\"label\">SLOT-LBL</span>\n <span slot=\"value\">SLOT-VAL</span>\n </nile-filter-chip>\n `);\n const slottedLabel = el.querySelector('[slot=\"label\"]')! as HTMLElement;\n const slottedValue = el.querySelector('[slot=\"value\"]')! as HTMLElement;\n expect(slottedLabel.textContent).to.equal('SLOT-LBL');\n expect(slottedValue.textContent).to.equal('SLOT-VAL');\n });\n\n it('renders an icon when the `icon` property is set', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip icon=\"★\" label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n const iconSpan = el.shadowRoot!.querySelector('.icon')! as HTMLElement;\n expect(iconSpan).to.exist;\n expect(iconSpan.textContent).to.equal('★');\n });\n\n it('does not render a badge when extraCount is zero', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip extraCount=\"0\" label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n expect(el.shadowRoot!.querySelector('nile-badge')).to.be.null;\n });\n\n it('renders a +badge when extraCount > 0', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip extraCount=\"5\" label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n const badge = el.shadowRoot!.querySelector('nile-badge')! as HTMLElement;\n expect(badge).to.exist;\n expect(badge.textContent).to.contain('+5');\n });\n\n\n\n it('dispatches `nile-click` on chip click', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n const chip = el.shadowRoot!.querySelector('.chip')! as HTMLElement;\n setTimeout(() => chip.click());\n const ev = await oneEvent(el, 'nile-click');\n expect(ev.detail).to.deep.equal({ text: 'T', extraCount: 0 });\n });\n\n it('dispatches `nile-close` on close icon click and removes itself', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip closable extraCount=\"2\" text=\"TT\"></nile-filter-chip>\n `);\n const closeIcon = el.shadowRoot!.querySelector('.close-icon')! as HTMLElement;\n setTimeout(() => closeIcon.click());\n const ev = await oneEvent(el, 'nile-close');\n expect(ev.detail).to.deep.equal({ text: 'TT', extraCount: 2 });\n expect(document.body.contains(el)).to.be.false;\n });\n\n \n});\n"],"names":["describe","afterEach","NileFilterChip","activeChips","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","to","include","remove","updateComplete","not","_context2","stop","_callee","_templateObject2","label","shadowRoot","querySelector","value","textContent","equal","trim","_context3","_callee2","_templateObject3","slottedLabel","slottedValue","_context4","_callee3","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject4","iconSpan","exist","_context5","_callee4","_templateObject5","be","null","_context6","_callee5","_templateObject6","badge","contain","_context7","_callee6","_templateObject7","chip","setTimeout","click","_context8","next","oneEvent","ev","detail","deep","text","extraCount","_callee7","_templateObject8","closeIcon","_context9","document","body","contains","_callee8"],"mappings":"s0SAIAA,QAAS,CAAA,oBAAA,CAAsB,UAC7BC,CAAAA,SAAAA,CAAU,UACPC,CAAAA,CAAAA,CAAuBC,WAAc,CAAA,EAAE,EAG1CC,CAAAA,CAAAA,EAAAA,CAAG,iDAAmDC,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACnCC,CAAAA,EAAwBC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,2FAAvCC,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,CAGNC,CAAQT,CAAAA,CAAAA,CAAuBC,aAAaS,EAAGC,CAAAA,OAAAA,CAAQH,GACvDA,CAAGI,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SACGJ,CAAAA,CAAGK,CAAAA,cAAAA,QACTJ,CAAQT,CAAAA,CAAAA,CAAuBC,aAAaS,EAAGI,CAAAA,GAAAA,CAAIH,OAAQH,CAAAA,CAAAA,CAAG,yBAAAO,SAAA,CAAAC,IAAA,MAAAC,OAAA,GAGhEf,EAAAA,CAAAA,CAAAA,EAAAA,CAAG,yGAAmCC,SAAAA,SAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SA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AAY,CAC1DrD,CAAAA,CAAAA,CAAAA,CAAAA,CAAO0D,QAASC,CAAAA,IAAAA,CAAKC,QAAS7D,CAAAA,CAAAA,CAAAA,CAAAA,CAAKE,EAAGgC,CAAAA,EAAAA,SAAQ,yBAAAwB,SAAA,CAAAlD,IAAA,MAAAsD,QAAA,GAC9C,EAAA,CAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"nile-filter-chip.test.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.test.ts"],"sourcesContent":["import { fixture, expect, html, oneEvent } from '@open-wc/testing';\nimport './nile-filter-chip';\nimport { NileFilterChip } from './nile-filter-chip';\n\ndescribe('<nile-filter-chip>', () => {\n afterEach(() => {\n (NileFilterChip as any).activeChips = [];\n });\n\n it('registers and unregisters itself in activeChips', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n expect((NileFilterChip as any).activeChips).to.include(el);\n el.remove();\n await el.updateComplete;\n expect((NileFilterChip as any).activeChips).to.not.include(el);\n });\n\n it('renders fallback label and value', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"MyLabel\" value=\"MyText\"></nile-filter-chip>\n `);\n const label = el.shadowRoot!.querySelector('.label')! as HTMLElement;\n const value = el.shadowRoot!.querySelector('.value')! as HTMLElement;\n expect(label.textContent).to.equal('MyLabel:');\n expect(value.textContent!.trim()).to.equal('MyText');\n });\n\n it('renders slotted label and value over fallback', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip>\n <span slot=\"label\">SLOT-LBL</span>\n <span slot=\"value\">SLOT-VAL</span>\n </nile-filter-chip>\n `);\n const slottedLabel = el.querySelector('[slot=\"label\"]')! as HTMLElement;\n const slottedValue = el.querySelector('[slot=\"value\"]')! as HTMLElement;\n expect(slottedLabel.textContent).to.equal('SLOT-LBL');\n expect(slottedValue.textContent).to.equal('SLOT-VAL');\n });\n\n it('renders an icon when the `icon` property is set', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip icon=\"★\" label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n const iconSpan = el.shadowRoot!.querySelector('.icon')! as HTMLElement;\n expect(iconSpan).to.exist;\n expect(iconSpan.textContent).to.equal('★');\n });\n\n it('does not render a badge when viewMoreCount is zero', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip viewMoreCount=\"0\" label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n expect(el.shadowRoot!.querySelector('nile-badge')).to.be.null;\n });\n\n it('renders a +badge when viewMoreCount > 0', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip viewMoreCount=\"5\" label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n const badge = el.shadowRoot!.querySelector('nile-badge')! as HTMLElement;\n expect(badge).to.exist;\n expect(badge.textContent).to.contain('+5');\n });\n\n\n\n it('dispatches `nile-click` on chip click', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n const chip = el.shadowRoot!.querySelector('.chip')! as HTMLElement;\n setTimeout(() => chip.click());\n const ev = await oneEvent(el, 'nile-click');\n expect(ev.detail).to.deep.equal({ value: 'T', viewMoreCount: 0 });\n });\n\n it('dispatches `nile-close` on close icon click and removes itself', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip closable viewMoreCount=\"2\" value=\"TT\"></nile-filter-chip>\n `);\n const closeIcon = el.shadowRoot!.querySelector('.close-icon')! as HTMLElement;\n setTimeout(() => closeIcon.click());\n const ev = await oneEvent(el, 'nile-close');\n expect(ev.detail).to.deep.equal({ value: 'TT', viewMoreCount: 2 });\n expect(document.body.contains(el)).to.be.false;\n });\n\n \n});\n"],"names":["describe","afterEach","NileFilterChip","activeChips","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","to","include","remove","updateComplete","not","_context2","stop","_callee","_templateObject2","label","shadowRoot","querySelector","value","textContent","equal","trim","_context3","_callee2","_templateObject3","slottedLabel","slottedValue","_context4","_callee3","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject4","iconSpan","exist","_context5","_callee4","_templateObject5","be","null","_context6","_callee5","_templateObject6","badge","contain","_context7","_callee6","_templateObject7","chip","setTimeout","click","_context8","next","oneEvent","ev","detail","deep","viewMoreCount","_callee7","_templateObject8","closeIcon","_context9","document","body","contains","_callee8"],"mappings":"s0SAIAA,QAAS,CAAA,oBAAA,CAAsB,UAC7BC,CAAAA,SAAAA,CAAU,UACPC,CAAAA,CAAAA,CAAuBC,WAAc,CAAA,EAAE,EAG1CC,CAAAA,CAAAA,EAAAA,CAAG,iDAAmDC,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACnCC,CAAAA,EAAwBC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,4FAAvCC,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,CAGNC,CAAQT,CAAAA,CAAAA,CAAuBC,aAAaS,EAAGC,CAAAA,OAAAA,CAAQH,GACvDA,CAAGI,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SACGJ,CAAAA,CAAGK,CAAAA,cAAAA,QACTJ,CAAQT,CAAAA,CAAAA,CAAuBC,aAAaS,EAAGI,CAAAA,GAAAA,CAAIH,OAAQH,CAAAA,CAAAA,CAAG,yBAAAO,SAAA,CAAAC,IAAA,MAAAC,OAAA,GAGhEf,EAAAA,CAAAA,CAAAA,EAAAA,CAAG,0GAAoCC,SAAAA,SAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA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AAQjD,EAAGkD,CAAAA,IAAAA,CAAKpC,KAAM,CAAA,CAAEF,KAAO,CAAA,IAAA,CAAMuC,cAAe,CAC9DpD,CAAAA,CAAAA,CAAAA,CAAAA,CAAOyD,QAASC,CAAAA,IAAAA,CAAKC,QAAS5D,CAAAA,CAAAA,CAAAA,CAAAA,CAAKE,EAAGgC,CAAAA,EAAAA,SAAQ,yBAAAuB,SAAA,CAAAjD,IAAA,MAAAqD,QAAA,GAC9C,EAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1,20 +1,20 @@
1
- import{f as e,a as t,o as i}from"../fixture-c4e75e04.esm.js";import{html as l}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as a}from"./nile-filter-chip.esm.js";import"tslib";import"lit/decorators.js";import"../internal/nile-element.esm.js";import"./nile-filter-chip.css.esm.js";describe("<nile-filter-chip>",(()=>{afterEach((()=>{a.activeChips=[]})),it("registers and unregisters itself in activeChips",(async()=>{const i=await e(l`
2
- <nile-filter-chip label="L" text="T"></nile-filter-chip>
3
- `);t(a.activeChips).to.include(i),i.remove(),await i.updateComplete,t(a.activeChips).to.not.include(i)})),it("renders fallback label and text",(async()=>{const i=await e(l`
4
- <nile-filter-chip label="MyLabel" text="MyText"></nile-filter-chip>
5
- `),a=i.shadowRoot.querySelector(".label"),n=i.shadowRoot.querySelector(".value");t(a.textContent).to.equal("MyLabel:"),t(n.textContent.trim()).to.equal("MyText")})),it("renders slotted label and value over fallback",(async()=>{const i=await e(l`
1
+ import{f as e,a as i,o as l}from"../fixture-372df3b0.esm.js";import{html as t}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as a}from"./nile-filter-chip.esm.js";import"tslib";import"lit/decorators.js";import"../internal/nile-element.esm.js";import"./nile-filter-chip.css.esm.js";describe("<nile-filter-chip>",(()=>{afterEach((()=>{a.activeChips=[]})),it("registers and unregisters itself in activeChips",(async()=>{const l=await e(t`
2
+ <nile-filter-chip label="L" value="T"></nile-filter-chip>
3
+ `);i(a.activeChips).to.include(l),l.remove(),await l.updateComplete,i(a.activeChips).to.not.include(l)})),it("renders fallback label and value",(async()=>{const l=await e(t`
4
+ <nile-filter-chip label="MyLabel" value="MyText"></nile-filter-chip>
5
+ `),a=l.shadowRoot.querySelector(".label"),n=l.shadowRoot.querySelector(".value");i(a.textContent).to.equal("MyLabel:"),i(n.textContent.trim()).to.equal("MyText")})),it("renders slotted label and value over fallback",(async()=>{const l=await e(t`
6
6
  <nile-filter-chip>
7
7
  <span slot="label">SLOT-LBL</span>
8
8
  <span slot="value">SLOT-VAL</span>
9
9
  </nile-filter-chip>
10
- `),a=i.querySelector('[slot="label"]'),n=i.querySelector('[slot="value"]');t(a.textContent).to.equal("SLOT-LBL"),t(n.textContent).to.equal("SLOT-VAL")})),it("renders an icon when the `icon` property is set",(async()=>{const i=(await e(l`
11
- <nile-filter-chip icon="★" label="L" text="T"></nile-filter-chip>
12
- `)).shadowRoot.querySelector(".icon");t(i).to.exist,t(i.textContent).to.equal("★")})),it("does not render a badge when extraCount is zero",(async()=>{const i=await e(l`
13
- <nile-filter-chip extraCount="0" label="L" text="T"></nile-filter-chip>
14
- `);t(i.shadowRoot.querySelector("nile-badge")).to.be.null})),it("renders a +badge when extraCount > 0",(async()=>{const i=(await e(l`
15
- <nile-filter-chip extraCount="5" label="L" text="T"></nile-filter-chip>
16
- `)).shadowRoot.querySelector("nile-badge");t(i).to.exist,t(i.textContent).to.contain("+5")})),it("dispatches `nile-click` on chip click",(async()=>{const a=await e(l`
17
- <nile-filter-chip label="L" text="T"></nile-filter-chip>
18
- `),n=a.shadowRoot.querySelector(".chip");setTimeout((()=>n.click()));const s=await i(a,"nile-click");t(s.detail).to.deep.equal({text:"T",extraCount:0})})),it("dispatches `nile-close` on close icon click and removes itself",(async()=>{const a=await e(l`
19
- <nile-filter-chip closable extraCount="2" text="TT"></nile-filter-chip>
20
- `),n=a.shadowRoot.querySelector(".close-icon");setTimeout((()=>n.click()));const s=await i(a,"nile-close");t(s.detail).to.deep.equal({text:"TT",extraCount:2}),t(document.body.contains(a)).to.be.false}))}));
10
+ `),a=l.querySelector('[slot="label"]'),n=l.querySelector('[slot="value"]');i(a.textContent).to.equal("SLOT-LBL"),i(n.textContent).to.equal("SLOT-VAL")})),it("renders an icon when the `icon` property is set",(async()=>{const l=(await e(t`
11
+ <nile-filter-chip icon="★" label="L" value="T"></nile-filter-chip>
12
+ `)).shadowRoot.querySelector(".icon");i(l).to.exist,i(l.textContent).to.equal("★")})),it("does not render a badge when viewMoreCount is zero",(async()=>{const l=await e(t`
13
+ <nile-filter-chip viewMoreCount="0" label="L" value="T"></nile-filter-chip>
14
+ `);i(l.shadowRoot.querySelector("nile-badge")).to.be.null})),it("renders a +badge when viewMoreCount > 0",(async()=>{const l=(await e(t`
15
+ <nile-filter-chip viewMoreCount="5" label="L" value="T"></nile-filter-chip>
16
+ `)).shadowRoot.querySelector("nile-badge");i(l).to.exist,i(l.textContent).to.contain("+5")})),it("dispatches `nile-click` on chip click",(async()=>{const a=await e(t`
17
+ <nile-filter-chip label="L" value="T"></nile-filter-chip>
18
+ `),n=a.shadowRoot.querySelector(".chip");setTimeout((()=>n.click()));const s=await l(a,"nile-click");i(s.detail).to.deep.equal({value:"T",viewMoreCount:0})})),it("dispatches `nile-close` on close icon click and removes itself",(async()=>{const a=await e(t`
19
+ <nile-filter-chip closable viewMoreCount="2" value="TT"></nile-filter-chip>
20
+ `),n=a.shadowRoot.querySelector(".close-icon");setTimeout((()=>n.click()));const s=await l(a,"nile-close");i(s.detail).to.deep.equal({value:"TT",viewMoreCount:2}),i(document.body.contains(a)).to.be.false}))}));
@@ -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(["../fixture-d7bf42eb.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-form-group.cjs.js","tslib","lit/decorators.js","./nile-form-group.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,e,i,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture001CjsJs){t=_fixture001CjsJs.f;e=_fixture001CjsJs.a;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFormGroupCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileFormGroupCssCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("NileFormGroup",function(){it("should have default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var l;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-form-group></nile-form-group>"]))));case 2:l=_context2.sent;e(l.title).to.equal(""),e(l.subtitle).to.equal("");case 4:case"end":return _context2.stop();}},_callee);}))),it("should render title when set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _l$textContent;var l;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\"></nile-form-group>"]))));case 2:l=_context3.sent.shadowRoot.querySelector('slot[name="title"]');e(l).to.exist,e(l===null||l===void 0||(_l$textContent=l.textContent)===null||_l$textContent===void 0?void 0:_l$textContent.trim()).to.equal("Test Title");case 4:case"end":return _context3.stop();}},_callee2);}))),it("should render subtitle when set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _l$textContent2;var l;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>"]))));case 2:l=_context4.sent.shadowRoot.querySelector('slot[name="subtitle"]');e(l).to.exist,e(l===null||l===void 0||(_l$textContent2=l.textContent)===null||_l$textContent2===void 0?void 0:_l$textContent2.trim()).to.equal("Test Subtitle");case 4:case"end":return _context4.stop();}},_callee3);}))),it("should not render title and subtitle if not set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var l,o,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-form-group></nile-form-group>"]))));case 2:l=_context5.sent;o=l.shadowRoot.querySelector('slot[name="title"]');s=l.shadowRoot.querySelector('slot[name="subtitle"]');e(o).to.not.exist,e(s).to.not.exist;case 6:case"end":return _context5.stop();}},_callee4);}))),it("should render content inside the form body slot",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _l$assignedNodes;var l,o;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-form-group><p>Form Content</p></nile-form-group>"]))));case 2:l=_context6.sent.shadowRoot.querySelector(".form__body slot");o=(_l$assignedNodes=l===null||l===void 0?void 0:l.assignedNodes())!==null&&_l$assignedNodes!==void 0?_l$assignedNodes:[];e(o.length).to.equal(1),e(o[0].textContent.trim()).to.equal("Form Content");case 5:case"end":return _context6.stop();}},_callee5);}))),it("should reflect title and subtitle attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var l;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>"]))));case 2:l=_context7.sent;e(l.getAttribute("title")).to.equal("Test Title"),e(l.getAttribute("subtitle")).to.equal("Test Subtitle");case 4:case"end":return _context7.stop();}},_callee6);}))),it("should update the title dynamically",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _l$shadowRoot$querySe;var l,o;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return t(i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-form-group title=\"Initial Title\"></nile-form-group>"]))));case 2:l=_context8.sent;l.title="Updated Title";_context8.next=6;return l.updateComplete;case 6:o=(_l$shadowRoot$querySe=l.shadowRoot.querySelector('slot[name="title"]'))!==null&&_l$shadowRoot$querySe!==void 0?_l$shadowRoot$querySe:{};e(o.textContent.trim()).to.equal("Updated Title");case 8:case"end":return _context8.stop();}},_callee7);}))),it("should update the subtitle dynamically",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _l$shadowRoot$querySe2;var l,o;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return t(i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Initial Subtitle\"></nile-form-group>"]))));case 2:l=_context9.sent;l.subtitle="Updated Subtitle";_context9.next=6;return l.updateComplete;case 6:o=(_l$shadowRoot$querySe2=l.shadowRoot.querySelector('slot[name="subtitle"]'))!==null&&_l$shadowRoot$querySe2!==void 0?_l$shadowRoot$querySe2:{};e(o.textContent.trim()).to.equal("Updated Subtitle");case 8:case"end":return _context9.stop();}},_callee8);})));});}};});
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(["../fixture-161dee0b.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-form-group.cjs.js","tslib","lit/decorators.js","./nile-form-group.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,e,i,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture001CjsJs){t=_fixture001CjsJs.f;e=_fixture001CjsJs.a;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFormGroupCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileFormGroupCssCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("NileFormGroup",function(){it("should have default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var l;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-form-group></nile-form-group>"]))));case 2:l=_context2.sent;e(l.title).to.equal(""),e(l.subtitle).to.equal("");case 4:case"end":return _context2.stop();}},_callee);}))),it("should render title when set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _l$textContent;var l;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\"></nile-form-group>"]))));case 2:l=_context3.sent.shadowRoot.querySelector('slot[name="title"]');e(l).to.exist,e(l===null||l===void 0||(_l$textContent=l.textContent)===null||_l$textContent===void 0?void 0:_l$textContent.trim()).to.equal("Test Title");case 4:case"end":return _context3.stop();}},_callee2);}))),it("should render subtitle when set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _l$textContent2;var l;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>"]))));case 2:l=_context4.sent.shadowRoot.querySelector('slot[name="subtitle"]');e(l).to.exist,e(l===null||l===void 0||(_l$textContent2=l.textContent)===null||_l$textContent2===void 0?void 0:_l$textContent2.trim()).to.equal("Test Subtitle");case 4:case"end":return _context4.stop();}},_callee3);}))),it("should not render title and subtitle if not set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var l,o,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-form-group></nile-form-group>"]))));case 2:l=_context5.sent;o=l.shadowRoot.querySelector('slot[name="title"]');s=l.shadowRoot.querySelector('slot[name="subtitle"]');e(o).to.not.exist,e(s).to.not.exist;case 6:case"end":return _context5.stop();}},_callee4);}))),it("should render content inside the form body slot",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _l$assignedNodes;var l,o;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-form-group><p>Form Content</p></nile-form-group>"]))));case 2:l=_context6.sent.shadowRoot.querySelector(".form__body slot");o=(_l$assignedNodes=l===null||l===void 0?void 0:l.assignedNodes())!==null&&_l$assignedNodes!==void 0?_l$assignedNodes:[];e(o.length).to.equal(1),e(o[0].textContent.trim()).to.equal("Form Content");case 5:case"end":return _context6.stop();}},_callee5);}))),it("should reflect title and subtitle attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var l;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>"]))));case 2:l=_context7.sent;e(l.getAttribute("title")).to.equal("Test Title"),e(l.getAttribute("subtitle")).to.equal("Test Subtitle");case 4:case"end":return _context7.stop();}},_callee6);}))),it("should update the title dynamically",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _l$shadowRoot$querySe;var l,o;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return t(i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-form-group title=\"Initial Title\"></nile-form-group>"]))));case 2:l=_context8.sent;l.title="Updated Title";_context8.next=6;return l.updateComplete;case 6:o=(_l$shadowRoot$querySe=l.shadowRoot.querySelector('slot[name="title"]'))!==null&&_l$shadowRoot$querySe!==void 0?_l$shadowRoot$querySe:{};e(o.textContent.trim()).to.equal("Updated Title");case 8:case"end":return _context8.stop();}},_callee7);}))),it("should update the subtitle dynamically",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _l$shadowRoot$querySe2;var l,o;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return t(i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Initial Subtitle\"></nile-form-group>"]))));case 2:l=_context9.sent;l.subtitle="Updated Subtitle";_context9.next=6;return l.updateComplete;case 6:o=(_l$shadowRoot$querySe2=l.shadowRoot.querySelector('slot[name="subtitle"]'))!==null&&_l$shadowRoot$querySe2!==void 0?_l$shadowRoot$querySe2:{};e(o.textContent.trim()).to.equal("Updated Subtitle");case 8:case"end":return _context9.stop();}},_callee8);})));});}};});
2
2
  //# sourceMappingURL=nile-form-group.test.cjs.js.map
@@ -1 +1 @@
1
- import{f as t,a as e}from"../fixture-178ed8d2.esm.js";import{html as i}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-form-group.esm.js";import"tslib";import"lit/decorators.js";import"./nile-form-group.css.esm.js";import"../internal/nile-element.esm.js";describe("NileFormGroup",(()=>{it("should have default properties",(async()=>{const l=await t(i`<nile-form-group></nile-form-group>`);e(l.title).to.equal(""),e(l.subtitle).to.equal("")})),it("should render title when set",(async()=>{const l=(await t(i`<nile-form-group title="Test Title"></nile-form-group>`)).shadowRoot.querySelector('slot[name="title"]');e(l).to.exist,e(l?.textContent?.trim()).to.equal("Test Title")})),it("should render subtitle when set",(async()=>{const l=(await t(i`<nile-form-group title="Test Title" subtitle="Test Subtitle"></nile-form-group>`)).shadowRoot.querySelector('slot[name="subtitle"]');e(l).to.exist,e(l?.textContent?.trim()).to.equal("Test Subtitle")})),it("should not render title and subtitle if not set",(async()=>{const l=await t(i`<nile-form-group></nile-form-group>`),o=l.shadowRoot.querySelector('slot[name="title"]'),s=l.shadowRoot.querySelector('slot[name="subtitle"]');e(o).to.not.exist,e(s).to.not.exist})),it("should render content inside the form body slot",(async()=>{const l=(await t(i`<nile-form-group><p>Form Content</p></nile-form-group>`)).shadowRoot.querySelector(".form__body slot"),o=l?.assignedNodes()??[];e(o.length).to.equal(1),e(o[0].textContent.trim()).to.equal("Form Content")})),it("should reflect title and subtitle attributes",(async()=>{const l=await t(i`<nile-form-group title="Test Title" subtitle="Test Subtitle"></nile-form-group>`);e(l.getAttribute("title")).to.equal("Test Title"),e(l.getAttribute("subtitle")).to.equal("Test Subtitle")})),it("should update the title dynamically",(async()=>{const l=await t(i`<nile-form-group title="Initial Title"></nile-form-group>`);l.title="Updated Title",await l.updateComplete;const o=l.shadowRoot.querySelector('slot[name="title"]')??{};e(o.textContent.trim()).to.equal("Updated Title")})),it("should update the subtitle dynamically",(async()=>{const l=await t(i`<nile-form-group title="Test Title" subtitle="Initial Subtitle"></nile-form-group>`);l.subtitle="Updated Subtitle",await l.updateComplete;const o=l.shadowRoot.querySelector('slot[name="subtitle"]')??{};e(o.textContent.trim()).to.equal("Updated Subtitle")}))}));
1
+ import{f as t,a as e}from"../fixture-372df3b0.esm.js";import{html as i}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-form-group.esm.js";import"tslib";import"lit/decorators.js";import"./nile-form-group.css.esm.js";import"../internal/nile-element.esm.js";describe("NileFormGroup",(()=>{it("should have default properties",(async()=>{const l=await t(i`<nile-form-group></nile-form-group>`);e(l.title).to.equal(""),e(l.subtitle).to.equal("")})),it("should render title when set",(async()=>{const l=(await t(i`<nile-form-group title="Test Title"></nile-form-group>`)).shadowRoot.querySelector('slot[name="title"]');e(l).to.exist,e(l?.textContent?.trim()).to.equal("Test Title")})),it("should render subtitle when set",(async()=>{const l=(await t(i`<nile-form-group title="Test Title" subtitle="Test Subtitle"></nile-form-group>`)).shadowRoot.querySelector('slot[name="subtitle"]');e(l).to.exist,e(l?.textContent?.trim()).to.equal("Test Subtitle")})),it("should not render title and subtitle if not set",(async()=>{const l=await t(i`<nile-form-group></nile-form-group>`),o=l.shadowRoot.querySelector('slot[name="title"]'),s=l.shadowRoot.querySelector('slot[name="subtitle"]');e(o).to.not.exist,e(s).to.not.exist})),it("should render content inside the form body slot",(async()=>{const l=(await t(i`<nile-form-group><p>Form Content</p></nile-form-group>`)).shadowRoot.querySelector(".form__body slot"),o=l?.assignedNodes()??[];e(o.length).to.equal(1),e(o[0].textContent.trim()).to.equal("Form Content")})),it("should reflect title and subtitle attributes",(async()=>{const l=await t(i`<nile-form-group title="Test Title" subtitle="Test Subtitle"></nile-form-group>`);e(l.getAttribute("title")).to.equal("Test Title"),e(l.getAttribute("subtitle")).to.equal("Test Subtitle")})),it("should update the title dynamically",(async()=>{const l=await t(i`<nile-form-group title="Initial Title"></nile-form-group>`);l.title="Updated Title",await l.updateComplete;const o=l.shadowRoot.querySelector('slot[name="title"]')??{};e(o.textContent.trim()).to.equal("Updated Title")})),it("should update the subtitle dynamically",(async()=>{const l=await t(i`<nile-form-group title="Test Title" subtitle="Initial Subtitle"></nile-form-group>`);l.subtitle="Updated Subtitle",await l.updateComplete;const o=l.shadowRoot.querySelector('slot[name="subtitle"]')??{};e(o.textContent.trim()).to.equal("Updated Subtitle")}))}));