@aquera/nile-elements 0.1.61-beta-1.0 → 0.1.61

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 (567) hide show
  1. package/README.md +19 -0
  2. package/demo/index.html +10 -45
  3. package/dist/{fixture-f2693d97.esm.js → fixture-e7023246.esm.js} +1 -1
  4. package/dist/{fixture-324a7ef9.cjs.js → fixture-fe6c932e.cjs.js} +2 -2
  5. package/dist/{fixture-324a7ef9.cjs.js.map → fixture-fe6c932e.cjs.js.map} +1 -1
  6. package/dist/index.cjs.js +1 -1
  7. package/dist/index.esm.js +1 -1
  8. package/dist/index.js +1677 -573
  9. package/dist/internal/form.cjs.js +1 -1
  10. package/dist/internal/form.cjs.js.map +1 -1
  11. package/dist/internal/form.esm.js +1 -1
  12. package/dist/internal/resizable-table-helper.cjs.js +2 -0
  13. package/dist/internal/resizable-table-helper.cjs.js.map +1 -0
  14. package/dist/internal/resizable-table-helper.esm.js +1 -0
  15. package/dist/internal/resizable-table-styles.cjs.js +2 -0
  16. package/dist/internal/resizable-table-styles.cjs.js.map +1 -0
  17. package/dist/internal/resizable-table-styles.esm.js +120 -0
  18. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  19. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  20. package/dist/nile-auto-complete/index.cjs.js +1 -1
  21. package/dist/nile-auto-complete/index.esm.js +1 -1
  22. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -17
  23. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  24. package/dist/nile-auto-complete/nile-auto-complete.esm.js +8 -29
  25. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  26. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
  27. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  28. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  29. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  30. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  31. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  32. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  33. package/dist/nile-button/nile-button.test.esm.js +1 -1
  34. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  35. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  36. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  37. package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
  38. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  39. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  40. package/dist/nile-card/nile-card.test.esm.js +1 -1
  41. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  42. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  43. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  44. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  45. package/dist/nile-chip/nile-chip.esm.js +1 -1
  46. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  47. package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
  48. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  49. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  50. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  51. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  52. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  53. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  54. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  55. package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
  56. package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
  57. package/dist/nile-empty-state/nile-empty-state.esm.js +13 -13
  58. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  59. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  60. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  61. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  62. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  63. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +1 -1
  64. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  65. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  66. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  67. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  68. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  69. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  70. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  71. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  72. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  73. package/dist/nile-input/nile-input.test.esm.js +1 -1
  74. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  75. package/dist/nile-link/nile-link.test.esm.js +1 -1
  76. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  77. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  78. package/dist/nile-option/nile-option.cjs.js +1 -1
  79. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  80. package/dist/nile-option/nile-option.esm.js +2 -2
  81. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  82. package/dist/nile-popover/nile-popover.test.esm.js +1 -1
  83. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  84. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  85. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  86. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  87. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  88. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  89. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  90. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  91. package/dist/nile-select/index.cjs.js +1 -1
  92. package/dist/nile-select/index.esm.js +1 -1
  93. package/dist/nile-select/nile-select.cjs.js +1 -1
  94. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  95. package/dist/nile-select/nile-select.esm.js +2 -2
  96. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  97. package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
  98. package/dist/nile-select/nile-select.test.esm.js +2 -2
  99. package/dist/nile-select/virtual-scroll-helper.cjs.js +2 -0
  100. package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -0
  101. package/dist/nile-select/virtual-scroll-helper.esm.js +38 -0
  102. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  103. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  104. package/dist/nile-slider/nile-slider.css.cjs.js +1 -1
  105. package/dist/nile-slider/nile-slider.css.cjs.js.map +1 -1
  106. package/dist/nile-slider/nile-slider.css.esm.js +1 -1
  107. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  108. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  109. package/dist/nile-table-body/index.cjs.js +1 -1
  110. package/dist/nile-table-body/index.esm.js +1 -1
  111. package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
  112. package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
  113. package/dist/nile-table-body/nile-table-body.css.cjs.js +1 -1
  114. package/dist/nile-table-body/nile-table-body.css.cjs.js.map +1 -1
  115. package/dist/nile-table-body/nile-table-body.css.esm.js +4 -2
  116. package/dist/nile-table-body/nile-table-body.esm.js +3 -2
  117. package/dist/nile-table-cell-item/index.cjs.js +1 -1
  118. package/dist/nile-table-cell-item/index.esm.js +1 -1
  119. package/dist/nile-table-cell-item/nile-table-cell-item.cjs.js +1 -1
  120. package/dist/nile-table-cell-item/nile-table-cell-item.cjs.js.map +1 -1
  121. package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js +1 -1
  122. package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js.map +1 -1
  123. package/dist/nile-table-cell-item/nile-table-cell-item.css.esm.js +20 -3
  124. package/dist/nile-table-cell-item/nile-table-cell-item.esm.js +8 -3
  125. package/dist/nile-table-header-item/index.cjs.js +1 -1
  126. package/dist/nile-table-header-item/index.esm.js +1 -1
  127. package/dist/nile-table-header-item/nile-table-header-item.cjs.js +1 -1
  128. package/dist/nile-table-header-item/nile-table-header-item.cjs.js.map +1 -1
  129. package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js +1 -1
  130. package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js.map +1 -1
  131. package/dist/nile-table-header-item/nile-table-header-item.css.esm.js +7 -2
  132. package/dist/nile-table-header-item/nile-table-header-item.esm.js +9 -8
  133. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  134. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  135. package/dist/nile-virtual-select/index.cjs.js +2 -0
  136. package/dist/nile-virtual-select/index.esm.js +1 -0
  137. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +2 -0
  138. package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -0
  139. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +2 -0
  140. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -0
  141. package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +477 -0
  142. package/dist/nile-virtual-select/nile-virtual-select.esm.js +227 -0
  143. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +2 -0
  144. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js.map +1 -0
  145. package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +93 -0
  146. package/dist/nile-virtual-select/renderer.cjs.js +2 -0
  147. package/dist/nile-virtual-select/renderer.cjs.js.map +1 -0
  148. package/dist/nile-virtual-select/renderer.esm.js +27 -0
  149. package/dist/nile-virtual-select/search-manager.cjs.js +2 -0
  150. package/dist/nile-virtual-select/search-manager.cjs.js.map +1 -0
  151. package/dist/nile-virtual-select/search-manager.esm.js +1 -0
  152. package/dist/nile-virtual-select/selection-manager.cjs.js +2 -0
  153. package/dist/nile-virtual-select/selection-manager.cjs.js.map +1 -0
  154. package/dist/nile-virtual-select/selection-manager.esm.js +1 -0
  155. package/dist/{nile-file-upload/types/file-upload.type.cjs.js → nile-virtual-select/types.cjs.js} +1 -1
  156. package/dist/nile-virtual-select/types.cjs.js.map +1 -0
  157. package/dist/src/index.d.ts +2 -0
  158. package/dist/src/index.js +2 -0
  159. package/dist/src/index.js.map +1 -1
  160. package/dist/src/internal/form.js +3 -3
  161. package/dist/src/internal/form.js.map +1 -1
  162. package/dist/src/nile-chip/nile-chip.js +10 -1
  163. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  164. package/dist/src/nile-empty-state/nile-empty-state.js +11 -11
  165. package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
  166. package/dist/src/nile-option/nile-option.d.ts +2 -1
  167. package/dist/src/nile-option/nile-option.js +8 -5
  168. package/dist/src/nile-option/nile-option.js.map +1 -1
  169. package/dist/src/nile-select/nile-select.d.ts +11 -2
  170. package/dist/src/nile-select/nile-select.js +37 -18
  171. package/dist/src/nile-select/nile-select.js.map +1 -1
  172. package/dist/src/nile-table-body/nile-table-body.css.js +3 -0
  173. package/dist/src/nile-table-body/nile-table-body.css.js.map +1 -1
  174. package/dist/src/nile-table-body/nile-table-body.d.ts +2 -0
  175. package/dist/src/nile-table-body/nile-table-body.js +10 -0
  176. package/dist/src/nile-table-body/nile-table-body.js.map +1 -1
  177. package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js +19 -1
  178. package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js.map +1 -1
  179. package/dist/src/nile-table-cell-item/nile-table-cell-item.d.ts +3 -0
  180. package/dist/src/nile-table-cell-item/nile-table-cell-item.js +27 -8
  181. package/dist/src/nile-table-cell-item/nile-table-cell-item.js.map +1 -1
  182. package/dist/src/nile-table-header-item/nile-table-header-item.css.js +6 -0
  183. package/dist/src/nile-table-header-item/nile-table-header-item.css.js.map +1 -1
  184. package/dist/src/nile-table-header-item/nile-table-header-item.d.ts +3 -0
  185. package/dist/src/nile-table-header-item/nile-table-header-item.js +22 -15
  186. package/dist/src/nile-table-header-item/nile-table-header-item.js.map +1 -1
  187. package/dist/tsconfig.tsbuildinfo +1 -1
  188. package/dist/virtualize-a4a40d96.esm.js +22 -0
  189. package/dist/virtualize-b6a2fbe0.cjs.js +18 -0
  190. package/dist/virtualize-b6a2fbe0.cjs.js.map +1 -0
  191. package/package.json +3 -3
  192. package/src/index.ts +4 -1
  193. package/src/internal/form.ts +3 -3
  194. package/src/internal/resizable-table-helper.ts +151 -0
  195. package/src/internal/resizable-table-styles.ts +144 -0
  196. package/src/nile-chip/nile-chip.ts +9 -1
  197. package/src/nile-empty-state/nile-empty-state.ts +11 -11
  198. package/src/nile-option/nile-option.ts +6 -2
  199. package/src/nile-select/nile-select.ts +35 -9
  200. package/src/nile-select/virtual-scroll-helper.ts +56 -0
  201. package/src/nile-slider/index.ts +1 -0
  202. package/src/nile-slider/nile-slider.css.ts +119 -0
  203. package/src/nile-slider/nile-slider.template.ts +77 -0
  204. package/src/nile-slider/nile-slider.ts +215 -0
  205. package/src/nile-slider/types/nile-slider.enums.ts +10 -0
  206. package/src/nile-slider/types/nile-slider.types.ts +13 -0
  207. package/src/nile-slider/utils/nile-slider.utils.ts +136 -0
  208. package/src/nile-table-body/nile-table-body.css.ts +3 -0
  209. package/src/nile-table-body/nile-table-body.ts +9 -0
  210. package/src/nile-table-cell-item/nile-table-cell-item.css.ts +19 -1
  211. package/src/nile-table-cell-item/nile-table-cell-item.ts +22 -5
  212. package/src/nile-table-header-item/nile-table-header-item.css.ts +6 -0
  213. package/src/nile-table-header-item/nile-table-header-item.ts +11 -5
  214. package/src/nile-virtual-select/index.ts +1 -0
  215. package/src/nile-virtual-select/nile-virtual-select.css.ts +491 -0
  216. package/src/nile-virtual-select/nile-virtual-select.test.ts +774 -0
  217. package/src/nile-virtual-select/nile-virtual-select.ts +1314 -0
  218. package/src/nile-virtual-select/renderer.ts +99 -0
  219. package/src/nile-virtual-select/search-manager.ts +50 -0
  220. package/src/nile-virtual-select/selection-manager.ts +75 -0
  221. package/src/nile-virtual-select/types.ts +54 -0
  222. package/vscode-html-custom-data.json +373 -50
  223. package/dist/aquera-nile-elements-0.1.57-beta-2.0.tgz +0 -0
  224. package/dist/axe.min-2b379f29.cjs.js +0 -12
  225. package/dist/axe.min-2b379f29.cjs.js.map +0 -1
  226. package/dist/axe.min-c2cd8733.esm.js +0 -12
  227. package/dist/fixture-add72f26.esm.js +0 -569
  228. package/dist/fixture-ba65eb22.esm.js +0 -569
  229. package/dist/fixture-c1bd203f.cjs.js +0 -395
  230. package/dist/fixture-c1bd203f.cjs.js.map +0 -1
  231. package/dist/fixture-cb376a7f.cjs.js +0 -395
  232. package/dist/fixture-cb376a7f.cjs.js.map +0 -1
  233. package/dist/lit-html-39a6718c.esm.js +0 -6
  234. package/dist/lit-html-9b3af046.cjs.js +0 -6
  235. package/dist/lit-html-9b3af046.cjs.js.map +0 -1
  236. package/dist/nile-file-preview/index.cjs.js +0 -2
  237. package/dist/nile-file-preview/index.esm.js +0 -1
  238. package/dist/nile-file-preview/nile-file-preview.cjs.js +0 -2
  239. package/dist/nile-file-preview/nile-file-preview.cjs.js.map +0 -1
  240. package/dist/nile-file-preview/nile-file-preview.css.cjs.js +0 -2
  241. package/dist/nile-file-preview/nile-file-preview.css.cjs.js.map +0 -1
  242. package/dist/nile-file-preview/nile-file-preview.css.esm.js +0 -594
  243. package/dist/nile-file-preview/nile-file-preview.esm.js +0 -3
  244. package/dist/nile-file-preview/nile-file-preview.template.cjs.js +0 -2
  245. package/dist/nile-file-preview/nile-file-preview.template.cjs.js.map +0 -1
  246. package/dist/nile-file-preview/nile-file-preview.template.esm.js +0 -176
  247. package/dist/nile-file-preview/nile-file-preview.test.cjs.js +0 -2
  248. package/dist/nile-file-preview/nile-file-preview.test.cjs.js.map +0 -1
  249. package/dist/nile-file-preview/nile-file-preview.test.esm.js +0 -1
  250. package/dist/nile-file-preview/types/index.cjs.js +0 -2
  251. package/dist/nile-file-preview/types/index.cjs.js.map +0 -1
  252. package/dist/nile-file-preview/types/index.esm.js +0 -1
  253. package/dist/nile-file-preview/types/nile-file-preview.enums.cjs.js +0 -2
  254. package/dist/nile-file-preview/types/nile-file-preview.enums.cjs.js.map +0 -1
  255. package/dist/nile-file-preview/types/nile-file-preview.enums.esm.js +0 -1
  256. package/dist/nile-file-preview/types/nile-file-preview.interface.cjs.js +0 -2
  257. package/dist/nile-file-preview/types/nile-file-preview.interface.cjs.js.map +0 -1
  258. package/dist/nile-file-preview/utils/index.cjs.js +0 -2
  259. package/dist/nile-file-preview/utils/index.cjs.js.map +0 -1
  260. package/dist/nile-file-preview/utils/index.esm.js +0 -1
  261. package/dist/nile-file-preview/utils/nile-file-preview.util.cjs.js +0 -2
  262. package/dist/nile-file-preview/utils/nile-file-preview.util.cjs.js.map +0 -1
  263. package/dist/nile-file-preview/utils/nile-file-preview.util.esm.js +0 -1
  264. package/dist/nile-file-upload/index.cjs.js +0 -2
  265. package/dist/nile-file-upload/index.cjs.js.map +0 -1
  266. package/dist/nile-file-upload/index.esm.js +0 -1
  267. package/dist/nile-file-upload/nile-file-upload.cjs.js +0 -2
  268. package/dist/nile-file-upload/nile-file-upload.cjs.js.map +0 -1
  269. package/dist/nile-file-upload/nile-file-upload.css.cjs.js +0 -2
  270. package/dist/nile-file-upload/nile-file-upload.css.cjs.js.map +0 -1
  271. package/dist/nile-file-upload/nile-file-upload.css.esm.js +0 -585
  272. package/dist/nile-file-upload/nile-file-upload.esm.js +0 -3
  273. package/dist/nile-file-upload/nile-file-upload.template.cjs.js +0 -10
  274. package/dist/nile-file-upload/nile-file-upload.template.cjs.js.map +0 -1
  275. package/dist/nile-file-upload/nile-file-upload.template.esm.js +0 -109
  276. package/dist/nile-file-upload/nile-file-upload.test.cjs.js +0 -2
  277. package/dist/nile-file-upload/nile-file-upload.test.cjs.js.map +0 -1
  278. package/dist/nile-file-upload/nile-file-upload.test.esm.js +0 -1
  279. package/dist/nile-file-upload/types/file-upload.enums.cjs.js +0 -2
  280. package/dist/nile-file-upload/types/file-upload.enums.cjs.js.map +0 -1
  281. package/dist/nile-file-upload/types/file-upload.enums.esm.js +0 -1
  282. package/dist/nile-file-upload/types/file-upload.type.cjs.js.map +0 -1
  283. package/dist/nile-file-upload/types/file-upload.type.esm.js +0 -1
  284. package/dist/nile-file-upload/types/index.cjs.js +0 -2
  285. package/dist/nile-file-upload/types/index.cjs.js.map +0 -1
  286. package/dist/nile-file-upload/types/index.esm.js +0 -1
  287. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js +0 -2
  288. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js.map +0 -1
  289. package/dist/nile-file-upload/utils/drag-drop.util.esm.js +0 -1
  290. package/dist/nile-file-upload/utils/file-validation.util.cjs.js +0 -3
  291. package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +0 -1
  292. package/dist/nile-file-upload/utils/file-validation.util.esm.js +0 -1
  293. package/dist/src/nile-file-preview/index.d.ts +0 -1
  294. package/dist/src/nile-file-preview/index.js +0 -2
  295. package/dist/src/nile-file-preview/index.js.map +0 -1
  296. package/dist/src/nile-file-preview/nile-file-preview.css.d.ts +0 -12
  297. package/dist/src/nile-file-preview/nile-file-preview.css.js +0 -606
  298. package/dist/src/nile-file-preview/nile-file-preview.css.js.map +0 -1
  299. package/dist/src/nile-file-preview/nile-file-preview.d.ts +0 -50
  300. package/dist/src/nile-file-preview/nile-file-preview.js +0 -171
  301. package/dist/src/nile-file-preview/nile-file-preview.js.map +0 -1
  302. package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +0 -13
  303. package/dist/src/nile-file-preview/nile-file-preview.template.js +0 -208
  304. package/dist/src/nile-file-preview/nile-file-preview.template.js.map +0 -1
  305. package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +0 -7
  306. package/dist/src/nile-file-preview/nile-file-preview.test.js +0 -30
  307. package/dist/src/nile-file-preview/nile-file-preview.test.js.map +0 -1
  308. package/dist/src/nile-file-preview/types/index.d.ts +0 -2
  309. package/dist/src/nile-file-preview/types/index.js +0 -3
  310. package/dist/src/nile-file-preview/types/index.js.map +0 -1
  311. package/dist/src/nile-file-preview/types/nile-file-preview.enums.d.ts +0 -28
  312. package/dist/src/nile-file-preview/types/nile-file-preview.enums.js +0 -33
  313. package/dist/src/nile-file-preview/types/nile-file-preview.enums.js.map +0 -1
  314. package/dist/src/nile-file-preview/types/nile-file-preview.interface.d.ts +0 -4
  315. package/dist/src/nile-file-preview/types/nile-file-preview.interface.js +0 -2
  316. package/dist/src/nile-file-preview/types/nile-file-preview.interface.js.map +0 -1
  317. package/dist/src/nile-file-preview/utils/index.d.ts +0 -1
  318. package/dist/src/nile-file-preview/utils/index.js +0 -2
  319. package/dist/src/nile-file-preview/utils/index.js.map +0 -1
  320. package/dist/src/nile-file-preview/utils/nile-file-preview.util.d.ts +0 -9
  321. package/dist/src/nile-file-preview/utils/nile-file-preview.util.js +0 -63
  322. package/dist/src/nile-file-preview/utils/nile-file-preview.util.js.map +0 -1
  323. package/dist/src/nile-file-upload/index.d.ts +0 -1
  324. package/dist/src/nile-file-upload/index.js +0 -2
  325. package/dist/src/nile-file-upload/index.js.map +0 -1
  326. package/dist/src/nile-file-upload/nile-file-upload.css.d.ts +0 -12
  327. package/dist/src/nile-file-upload/nile-file-upload.css.js +0 -597
  328. package/dist/src/nile-file-upload/nile-file-upload.css.js.map +0 -1
  329. package/dist/src/nile-file-upload/nile-file-upload.d.ts +0 -50
  330. package/dist/src/nile-file-upload/nile-file-upload.js +0 -182
  331. package/dist/src/nile-file-upload/nile-file-upload.js.map +0 -1
  332. package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +0 -10
  333. package/dist/src/nile-file-upload/nile-file-upload.template.js +0 -116
  334. package/dist/src/nile-file-upload/nile-file-upload.template.js.map +0 -1
  335. package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +0 -7
  336. package/dist/src/nile-file-upload/nile-file-upload.test.js +0 -30
  337. package/dist/src/nile-file-upload/nile-file-upload.test.js.map +0 -1
  338. package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +0 -39
  339. package/dist/src/nile-file-upload/types/file-upload.enums.js +0 -46
  340. package/dist/src/nile-file-upload/types/file-upload.enums.js.map +0 -1
  341. package/dist/src/nile-file-upload/types/file-upload.type.d.ts +0 -4
  342. package/dist/src/nile-file-upload/types/file-upload.type.js +0 -2
  343. package/dist/src/nile-file-upload/types/file-upload.type.js.map +0 -1
  344. package/dist/src/nile-file-upload/types/index.d.ts +0 -2
  345. package/dist/src/nile-file-upload/types/index.js +0 -3
  346. package/dist/src/nile-file-upload/types/index.js.map +0 -1
  347. package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +0 -21
  348. package/dist/src/nile-file-upload/utils/drag-drop.util.js +0 -82
  349. package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +0 -1
  350. package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +0 -12
  351. package/dist/src/nile-file-upload/utils/file-validation.util.js +0 -154
  352. package/dist/src/nile-file-upload/utils/file-validation.util.js.map +0 -1
  353. package/dist/src/nile-icon/icons/svg/ng-activity.d.ts +0 -5
  354. package/dist/src/nile-icon/icons/svg/ng-activity.js +0 -5
  355. package/dist/src/nile-icon/icons/svg/ng-activity.js.map +0 -1
  356. package/dist/src/nile-icon/icons/svg/ng-align-center.d.ts +0 -5
  357. package/dist/src/nile-icon/icons/svg/ng-align-center.js +0 -5
  358. package/dist/src/nile-icon/icons/svg/ng-align-center.js.map +0 -1
  359. package/dist/src/nile-icon/icons/svg/ng-annotation-x.d.ts +0 -5
  360. package/dist/src/nile-icon/icons/svg/ng-annotation-x.js +0 -5
  361. package/dist/src/nile-icon/icons/svg/ng-annotation-x.js.map +0 -1
  362. package/dist/src/nile-icon/icons/svg/ng-arrow-down.d.ts +0 -5
  363. package/dist/src/nile-icon/icons/svg/ng-arrow-down.js +0 -5
  364. package/dist/src/nile-icon/icons/svg/ng-arrow-down.js.map +0 -1
  365. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.d.ts +0 -5
  366. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js +0 -5
  367. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js.map +0 -1
  368. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.d.ts +0 -5
  369. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js +0 -5
  370. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js.map +0 -1
  371. package/dist/src/nile-icon/icons/svg/ng-arrow-up.d.ts +0 -5
  372. package/dist/src/nile-icon/icons/svg/ng-arrow-up.js +0 -5
  373. package/dist/src/nile-icon/icons/svg/ng-arrow-up.js.map +0 -1
  374. package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.d.ts +0 -5
  375. package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js +0 -5
  376. package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js.map +0 -1
  377. package/dist/src/nile-icon/icons/svg/ng-bell-01.d.ts +0 -5
  378. package/dist/src/nile-icon/icons/svg/ng-bell-01.js +0 -5
  379. package/dist/src/nile-icon/icons/svg/ng-bell-01.js.map +0 -1
  380. package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.d.ts +0 -5
  381. package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js +0 -5
  382. package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js.map +0 -1
  383. package/dist/src/nile-icon/icons/svg/ng-bold-01.d.ts +0 -5
  384. package/dist/src/nile-icon/icons/svg/ng-bold-01.js +0 -5
  385. package/dist/src/nile-icon/icons/svg/ng-bold-01.js.map +0 -1
  386. package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.d.ts +0 -5
  387. package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js +0 -5
  388. package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js.map +0 -1
  389. package/dist/src/nile-icon/icons/svg/ng-calendar.d.ts +0 -5
  390. package/dist/src/nile-icon/icons/svg/ng-calendar.js +0 -5
  391. package/dist/src/nile-icon/icons/svg/ng-calendar.js.map +0 -1
  392. package/dist/src/nile-icon/icons/svg/ng-check-circle.d.ts +0 -5
  393. package/dist/src/nile-icon/icons/svg/ng-check-circle.js +0 -5
  394. package/dist/src/nile-icon/icons/svg/ng-check-circle.js.map +0 -1
  395. package/dist/src/nile-icon/icons/svg/ng-check-square-broken.d.ts +0 -5
  396. package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js +0 -5
  397. package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js.map +0 -1
  398. package/dist/src/nile-icon/icons/svg/ng-chevron-down.d.ts +0 -5
  399. package/dist/src/nile-icon/icons/svg/ng-chevron-down.js +0 -5
  400. package/dist/src/nile-icon/icons/svg/ng-chevron-down.js.map +0 -1
  401. package/dist/src/nile-icon/icons/svg/ng-chevron-left.d.ts +0 -5
  402. package/dist/src/nile-icon/icons/svg/ng-chevron-left.js +0 -5
  403. package/dist/src/nile-icon/icons/svg/ng-chevron-left.js.map +0 -1
  404. package/dist/src/nile-icon/icons/svg/ng-chevron-right.d.ts +0 -5
  405. package/dist/src/nile-icon/icons/svg/ng-chevron-right.js +0 -5
  406. package/dist/src/nile-icon/icons/svg/ng-chevron-right.js.map +0 -1
  407. package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.d.ts +0 -5
  408. package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js +0 -5
  409. package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js.map +0 -1
  410. package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.d.ts +0 -5
  411. package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js +0 -5
  412. package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js.map +0 -1
  413. package/dist/src/nile-icon/icons/svg/ng-chevron-up.d.ts +0 -5
  414. package/dist/src/nile-icon/icons/svg/ng-chevron-up.js +0 -5
  415. package/dist/src/nile-icon/icons/svg/ng-chevron-up.js.map +0 -1
  416. package/dist/src/nile-icon/icons/svg/ng-copy-03.d.ts +0 -5
  417. package/dist/src/nile-icon/icons/svg/ng-copy-03.js +0 -5
  418. package/dist/src/nile-icon/icons/svg/ng-copy-03.js.map +0 -1
  419. package/dist/src/nile-icon/icons/svg/ng-dots-grid.d.ts +0 -5
  420. package/dist/src/nile-icon/icons/svg/ng-dots-grid.js +0 -5
  421. package/dist/src/nile-icon/icons/svg/ng-dots-grid.js.map +0 -1
  422. package/dist/src/nile-icon/icons/svg/ng-dots-vertical.d.ts +0 -5
  423. package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js +0 -5
  424. package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js.map +0 -1
  425. package/dist/src/nile-icon/icons/svg/ng-download-01.d.ts +0 -5
  426. package/dist/src/nile-icon/icons/svg/ng-download-01.js +0 -5
  427. package/dist/src/nile-icon/icons/svg/ng-download-01.js.map +0 -1
  428. package/dist/src/nile-icon/icons/svg/ng-dropdown.d.ts +0 -5
  429. package/dist/src/nile-icon/icons/svg/ng-dropdown.js +0 -5
  430. package/dist/src/nile-icon/icons/svg/ng-dropdown.js.map +0 -1
  431. package/dist/src/nile-icon/icons/svg/ng-edit-02.d.ts +0 -5
  432. package/dist/src/nile-icon/icons/svg/ng-edit-02.js +0 -5
  433. package/dist/src/nile-icon/icons/svg/ng-edit-02.js.map +0 -1
  434. package/dist/src/nile-icon/icons/svg/ng-edit-05.d.ts +0 -5
  435. package/dist/src/nile-icon/icons/svg/ng-edit-05.js +0 -5
  436. package/dist/src/nile-icon/icons/svg/ng-edit-05.js.map +0 -1
  437. package/dist/src/nile-icon/icons/svg/ng-expand-06.d.ts +0 -5
  438. package/dist/src/nile-icon/icons/svg/ng-expand-06.js +0 -5
  439. package/dist/src/nile-icon/icons/svg/ng-expand-06.js.map +0 -1
  440. package/dist/src/nile-icon/icons/svg/ng-eye-off.d.ts +0 -5
  441. package/dist/src/nile-icon/icons/svg/ng-eye-off.js +0 -5
  442. package/dist/src/nile-icon/icons/svg/ng-eye-off.js.map +0 -1
  443. package/dist/src/nile-icon/icons/svg/ng-eye.d.ts +0 -5
  444. package/dist/src/nile-icon/icons/svg/ng-eye.js +0 -5
  445. package/dist/src/nile-icon/icons/svg/ng-eye.js.map +0 -1
  446. package/dist/src/nile-icon/icons/svg/ng-file-02.d.ts +0 -5
  447. package/dist/src/nile-icon/icons/svg/ng-file-02.js +0 -5
  448. package/dist/src/nile-icon/icons/svg/ng-file-02.js.map +0 -1
  449. package/dist/src/nile-icon/icons/svg/ng-file-check-02.d.ts +0 -5
  450. package/dist/src/nile-icon/icons/svg/ng-file-check-02.js +0 -5
  451. package/dist/src/nile-icon/icons/svg/ng-file-check-02.js.map +0 -1
  452. package/dist/src/nile-icon/icons/svg/ng-file-question-03.d.ts +0 -5
  453. package/dist/src/nile-icon/icons/svg/ng-file-question-03.js +0 -5
  454. package/dist/src/nile-icon/icons/svg/ng-file-question-03.js.map +0 -1
  455. package/dist/src/nile-icon/icons/svg/ng-filter-lines.d.ts +0 -5
  456. package/dist/src/nile-icon/icons/svg/ng-filter-lines.js +0 -5
  457. package/dist/src/nile-icon/icons/svg/ng-filter-lines.js.map +0 -1
  458. package/dist/src/nile-icon/icons/svg/ng-grid-01.d.ts +0 -5
  459. package/dist/src/nile-icon/icons/svg/ng-grid-01.js +0 -5
  460. package/dist/src/nile-icon/icons/svg/ng-grid-01.js.map +0 -1
  461. package/dist/src/nile-icon/icons/svg/ng-help-circle.d.ts +0 -5
  462. package/dist/src/nile-icon/icons/svg/ng-help-circle.js +0 -5
  463. package/dist/src/nile-icon/icons/svg/ng-help-circle.js.map +0 -1
  464. package/dist/src/nile-icon/icons/svg/ng-image-user-left.d.ts +0 -5
  465. package/dist/src/nile-icon/icons/svg/ng-image-user-left.js +0 -5
  466. package/dist/src/nile-icon/icons/svg/ng-image-user-left.js.map +0 -1
  467. package/dist/src/nile-icon/icons/svg/ng-info-circle.d.ts +0 -5
  468. package/dist/src/nile-icon/icons/svg/ng-info-circle.js +0 -5
  469. package/dist/src/nile-icon/icons/svg/ng-info-circle.js.map +0 -1
  470. package/dist/src/nile-icon/icons/svg/ng-italic-01.d.ts +0 -5
  471. package/dist/src/nile-icon/icons/svg/ng-italic-01.js +0 -5
  472. package/dist/src/nile-icon/icons/svg/ng-italic-01.js.map +0 -1
  473. package/dist/src/nile-icon/icons/svg/ng-layers-three-01.d.ts +0 -5
  474. package/dist/src/nile-icon/icons/svg/ng-layers-three-01.js +0 -5
  475. package/dist/src/nile-icon/icons/svg/ng-layers-three-01.js.map +0 -1
  476. package/dist/src/nile-icon/icons/svg/ng-list.d.ts +0 -5
  477. package/dist/src/nile-icon/icons/svg/ng-list.js +0 -5
  478. package/dist/src/nile-icon/icons/svg/ng-list.js.map +0 -1
  479. package/dist/src/nile-icon/icons/svg/ng-log-out-01.d.ts +0 -5
  480. package/dist/src/nile-icon/icons/svg/ng-log-out-01.js +0 -5
  481. package/dist/src/nile-icon/icons/svg/ng-log-out-01.js.map +0 -1
  482. package/dist/src/nile-icon/icons/svg/ng-mail-01.d.ts +0 -5
  483. package/dist/src/nile-icon/icons/svg/ng-mail-01.js +0 -5
  484. package/dist/src/nile-icon/icons/svg/ng-mail-01.js.map +0 -1
  485. package/dist/src/nile-icon/icons/svg/ng-mail-04.d.ts +0 -5
  486. package/dist/src/nile-icon/icons/svg/ng-mail-04.js +0 -5
  487. package/dist/src/nile-icon/icons/svg/ng-mail-04.js.map +0 -1
  488. package/dist/src/nile-icon/icons/svg/ng-menu-05.d.ts +0 -5
  489. package/dist/src/nile-icon/icons/svg/ng-menu-05.js +0 -5
  490. package/dist/src/nile-icon/icons/svg/ng-menu-05.js.map +0 -1
  491. package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.d.ts +0 -5
  492. package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js +0 -5
  493. package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js.map +0 -1
  494. package/dist/src/nile-icon/icons/svg/ng-minimize-02.d.ts +0 -5
  495. package/dist/src/nile-icon/icons/svg/ng-minimize-02.js +0 -5
  496. package/dist/src/nile-icon/icons/svg/ng-minimize-02.js.map +0 -1
  497. package/dist/src/nile-icon/icons/svg/ng-plus.d.ts +0 -5
  498. package/dist/src/nile-icon/icons/svg/ng-plus.js +0 -5
  499. package/dist/src/nile-icon/icons/svg/ng-plus.js.map +0 -1
  500. package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.d.ts +0 -5
  501. package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js +0 -5
  502. package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js.map +0 -1
  503. package/dist/src/nile-icon/icons/svg/ng-rocket-02.d.ts +0 -5
  504. package/dist/src/nile-icon/icons/svg/ng-rocket-02.js +0 -5
  505. package/dist/src/nile-icon/icons/svg/ng-rocket-02.js.map +0 -1
  506. package/dist/src/nile-icon/icons/svg/ng-search-lg.d.ts +0 -5
  507. package/dist/src/nile-icon/icons/svg/ng-search-lg.js +0 -5
  508. package/dist/src/nile-icon/icons/svg/ng-search-lg.js.map +0 -1
  509. package/dist/src/nile-icon/icons/svg/ng-send-01.d.ts +0 -5
  510. package/dist/src/nile-icon/icons/svg/ng-send-01.js +0 -5
  511. package/dist/src/nile-icon/icons/svg/ng-send-01.js.map +0 -1
  512. package/dist/src/nile-icon/icons/svg/ng-settings-01.d.ts +0 -5
  513. package/dist/src/nile-icon/icons/svg/ng-settings-01.js +0 -5
  514. package/dist/src/nile-icon/icons/svg/ng-settings-01.js.map +0 -1
  515. package/dist/src/nile-icon/icons/svg/ng-share-04.d.ts +0 -5
  516. package/dist/src/nile-icon/icons/svg/ng-share-04.js +0 -5
  517. package/dist/src/nile-icon/icons/svg/ng-share-04.js.map +0 -1
  518. package/dist/src/nile-icon/icons/svg/ng-share-06.d.ts +0 -5
  519. package/dist/src/nile-icon/icons/svg/ng-share-06.js +0 -5
  520. package/dist/src/nile-icon/icons/svg/ng-share-06.js.map +0 -1
  521. package/dist/src/nile-icon/icons/svg/ng-stars-02.d.ts +0 -5
  522. package/dist/src/nile-icon/icons/svg/ng-stars-02.js +0 -5
  523. package/dist/src/nile-icon/icons/svg/ng-stars-02.js.map +0 -1
  524. package/dist/src/nile-icon/icons/svg/ng-trash-01.d.ts +0 -5
  525. package/dist/src/nile-icon/icons/svg/ng-trash-01.js +0 -5
  526. package/dist/src/nile-icon/icons/svg/ng-trash-01.js.map +0 -1
  527. package/dist/src/nile-icon/icons/svg/ng-trash-03.d.ts +0 -5
  528. package/dist/src/nile-icon/icons/svg/ng-trash-03.js +0 -5
  529. package/dist/src/nile-icon/icons/svg/ng-trash-03.js.map +0 -1
  530. package/dist/src/nile-icon/icons/svg/ng-trend-up-01.d.ts +0 -5
  531. package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js +0 -5
  532. package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js.map +0 -1
  533. package/dist/src/nile-icon/icons/svg/ng-underline-01.d.ts +0 -5
  534. package/dist/src/nile-icon/icons/svg/ng-underline-01.js +0 -5
  535. package/dist/src/nile-icon/icons/svg/ng-underline-01.js.map +0 -1
  536. package/dist/src/nile-icon/icons/svg/ng-upload-01.d.ts +0 -5
  537. package/dist/src/nile-icon/icons/svg/ng-upload-01.js +0 -5
  538. package/dist/src/nile-icon/icons/svg/ng-upload-01.js.map +0 -1
  539. package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.d.ts +0 -5
  540. package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js +0 -5
  541. package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js.map +0 -1
  542. package/dist/src/nile-icon/icons/svg/ng-user-01.d.ts +0 -5
  543. package/dist/src/nile-icon/icons/svg/ng-user-01.js +0 -5
  544. package/dist/src/nile-icon/icons/svg/ng-user-01.js.map +0 -1
  545. package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.d.ts +0 -5
  546. package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js +0 -5
  547. package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js.map +0 -1
  548. package/dist/src/nile-icon/icons/svg/ng-user-check-02.d.ts +0 -5
  549. package/dist/src/nile-icon/icons/svg/ng-user-check-02.js +0 -5
  550. package/dist/src/nile-icon/icons/svg/ng-user-check-02.js.map +0 -1
  551. package/dist/src/nile-icon/icons/svg/ng-user-plus-02.d.ts +0 -5
  552. package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js +0 -5
  553. package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js.map +0 -1
  554. package/dist/src/nile-icon/icons/svg/ng-user-right-01.d.ts +0 -5
  555. package/dist/src/nile-icon/icons/svg/ng-user-right-01.js +0 -5
  556. package/dist/src/nile-icon/icons/svg/ng-user-right-01.js.map +0 -1
  557. package/dist/src/nile-icon/icons/svg/ng-users-01.d.ts +0 -5
  558. package/dist/src/nile-icon/icons/svg/ng-users-01.js +0 -5
  559. package/dist/src/nile-icon/icons/svg/ng-users-01.js.map +0 -1
  560. package/dist/src/nile-icon/icons/svg/ng-x-close.d.ts +0 -5
  561. package/dist/src/nile-icon/icons/svg/ng-x-close.js +0 -5
  562. package/dist/src/nile-icon/icons/svg/ng-x-close.js.map +0 -1
  563. package/dist/src/nile-icon/icons/svg/ng-x-square.d.ts +0 -5
  564. package/dist/src/nile-icon/icons/svg/ng-x-square.js +0 -5
  565. package/dist/src/nile-icon/icons/svg/ng-x-square.js.map +0 -1
  566. /package/dist/{nile-file-preview → nile-virtual-select}/index.cjs.js.map +0 -0
  567. /package/dist/{nile-file-preview/types/nile-file-preview.interface.esm.js → nile-virtual-select/types.esm.js} +0 -0
@@ -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-324a7ef9.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-error-message.cjs.js","tslib","lit/decorators.js","./nile-error-message.css.cjs.js"],function(_export,_context){"use strict";var e,r,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9;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;r=_fixture001CjsJs.a;},function(_litStaticHtmlJs){s=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileErrorMessageCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileErrorMessageCssCjsJs){}],execute:function execute(){describe("NileErrorMessage",function(){it("should render the error message",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var o;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(s(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>"]))));case 2:o=_context2.sent.shadowRoot.querySelector(".nile-error-message__error");r(o.textContent).to.equal("An error occurred");case 4:case"end":return _context2.stop();}},_callee);}))),it("should truncate the error response if it is too long",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var o,t;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:o="a".repeat(150);_context3.next=3;return e(s(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"","\"></nile-error-message>"])),o));case 3:t=_context3.sent.getTruncatedResponse();r(t).to.equal("".concat(o.substring(0,100),"..."));case 5:case"end":return _context3.stop();}},_callee2);}))),it("should not truncate the error response if it is within the maximum length",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var o,t;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:o="Short error message";_context4.next=3;return e(s(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"","\"></nile-error-message>"])),o));case 3:t=_context4.sent.getTruncatedResponse();r(t).to.equal(o);case 5:case"end":return _context4.stop();}},_callee3);}))),it("should toggle the expanded state when the button is clicked",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _o$shadowRoot$querySe;var o,t;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(s(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context5.sent;t=(_o$shadowRoot$querySe=o.shadowRoot.querySelector(".nile-error-message__more-button"))!==null&&_o$shadowRoot$querySe!==void 0?_o$shadowRoot$querySe:{};t.click(),r(o.isExpanded).to.be["true"],t.click(),r(o.isExpanded).to.be["false"];case 5:case"end":return _context5.stop();}},_callee4);}))),it('should display the "View More" button if there is extended error information',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var o;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(s(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context6.sent.shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.exist;case 4:case"end":return _context6.stop();}},_callee5);}))),it('should not display the "View More" button if there is no extended error information',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var o;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(s(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\"></nile-error-message>"]))));case 2:o=_context7.sent.shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.not.exist;case 4:case"end":return _context7.stop();}},_callee6);}))),it("should show the extended error information when expanded",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var o,t;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(s(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context8.sent;o.isExpanded=!0;_context8.next=6;return o.updateComplete;case 6:t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t===null||t===void 0?void 0:t.textContent).to.include("Detailed error information");case 8:case"end":return _context8.stop();}},_callee7);}))),it("should hide the extended error information when collapsed",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var o,t;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(s(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context9.sent;o.isExpanded=!1;_context9.next=6;return o.updateComplete;case 6:t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t).to.have["class"]("collapsed");case 8:case"end":return _context9.stop();}},_callee8);}))),it("should render icon and error message parts",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var o,t,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return e(s(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>"]))));case 2:o=_context10.sent;t=o.shadowRoot.querySelector("nile-icon");r(t).to.exist;n=o.shadowRoot.querySelector(".nile-error-message__error");r(n).to.exist;case 7:case"end":return _context10.stop();}},_callee9);})));});}};});
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-fe6c932e.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-error-message.cjs.js","tslib","lit/decorators.js","./nile-error-message.css.cjs.js"],function(_export,_context){"use strict";var e,r,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9;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(_fixture002CjsJs){e=_fixture002CjsJs.f;r=_fixture002CjsJs.a;},function(_litStaticHtmlJs){s=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileErrorMessageCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileErrorMessageCssCjsJs){}],execute:function execute(){describe("NileErrorMessage",function(){it("should render the error message",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var o;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(s(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>"]))));case 2:o=_context2.sent.shadowRoot.querySelector(".nile-error-message__error");r(o.textContent).to.equal("An error occurred");case 4:case"end":return _context2.stop();}},_callee);}))),it("should truncate the error response if it is too long",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var o,t;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:o="a".repeat(150);_context3.next=3;return e(s(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"","\"></nile-error-message>"])),o));case 3:t=_context3.sent.getTruncatedResponse();r(t).to.equal("".concat(o.substring(0,100),"..."));case 5:case"end":return _context3.stop();}},_callee2);}))),it("should not truncate the error response if it is within the maximum length",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var o,t;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:o="Short error message";_context4.next=3;return e(s(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"","\"></nile-error-message>"])),o));case 3:t=_context4.sent.getTruncatedResponse();r(t).to.equal(o);case 5:case"end":return _context4.stop();}},_callee3);}))),it("should toggle the expanded state when the button is clicked",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _o$shadowRoot$querySe;var o,t;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(s(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context5.sent;t=(_o$shadowRoot$querySe=o.shadowRoot.querySelector(".nile-error-message__more-button"))!==null&&_o$shadowRoot$querySe!==void 0?_o$shadowRoot$querySe:{};t.click(),r(o.isExpanded).to.be["true"],t.click(),r(o.isExpanded).to.be["false"];case 5:case"end":return _context5.stop();}},_callee4);}))),it('should display the "View More" button if there is extended error information',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var o;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(s(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context6.sent.shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.exist;case 4:case"end":return _context6.stop();}},_callee5);}))),it('should not display the "View More" button if there is no extended error information',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var o;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(s(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\"></nile-error-message>"]))));case 2:o=_context7.sent.shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.not.exist;case 4:case"end":return _context7.stop();}},_callee6);}))),it("should show the extended error information when expanded",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var o,t;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(s(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context8.sent;o.isExpanded=!0;_context8.next=6;return o.updateComplete;case 6:t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t===null||t===void 0?void 0:t.textContent).to.include("Detailed error information");case 8:case"end":return _context8.stop();}},_callee7);}))),it("should hide the extended error information when collapsed",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var o,t;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(s(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context9.sent;o.isExpanded=!1;_context9.next=6;return o.updateComplete;case 6:t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t).to.have["class"]("collapsed");case 8:case"end":return _context9.stop();}},_callee8);}))),it("should render icon and error message parts",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var o,t,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return e(s(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>"]))));case 2:o=_context10.sent;t=o.shadowRoot.querySelector("nile-icon");r(t).to.exist;n=o.shadowRoot.querySelector(".nile-error-message__error");r(n).to.exist;case 7:case"end":return _context10.stop();}},_callee9);})));});}};});
2
2
  //# sourceMappingURL=nile-error-message.test.cjs.js.map
@@ -1 +1 @@
1
- import{f as e,a as r}from"../fixture-ba65eb22.esm.js";import{html as s}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-error-message.esm.js";import"tslib";import"lit/decorators.js";import"./nile-error-message.css.esm.js";describe("NileErrorMessage",(()=>{it("should render the error message",(async()=>{const o=(await e(s`<nile-error-message errorMessage="An error occurred"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__error");r(o.textContent).to.equal("An error occurred")})),it("should truncate the error response if it is too long",(async()=>{const o="a".repeat(150),t=(await e(s`<nile-error-message errorResponse="${o}"></nile-error-message>`)).getTruncatedResponse();r(t).to.equal(`${o.substring(0,100)}...`)})),it("should not truncate the error response if it is within the maximum length",(async()=>{const o="Short error message",t=(await e(s`<nile-error-message errorResponse="${o}"></nile-error-message>`)).getTruncatedResponse();r(t).to.equal(o)})),it("should toggle the expanded state when the button is clicked",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`),t=o.shadowRoot.querySelector(".nile-error-message__more-button")??{};t.click(),r(o.isExpanded).to.be.true,t.click(),r(o.isExpanded).to.be.false})),it('should display the "View More" button if there is extended error information',(async()=>{const o=(await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.exist})),it('should not display the "View More" button if there is no extended error information',(async()=>{const o=(await e(s`<nile-error-message errorResponse="Short error message"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.not.exist})),it("should show the extended error information when expanded",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`);o.isExpanded=!0,await o.updateComplete;const t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t?.textContent).to.include("Detailed error information")})),it("should hide the extended error information when collapsed",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`);o.isExpanded=!1,await o.updateComplete;const t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t).to.have.class("collapsed")})),it("should render icon and error message parts",(async()=>{const o=await e(s`<nile-error-message errorMessage="An error occurred"></nile-error-message>`),t=o.shadowRoot.querySelector("nile-icon");r(t).to.exist;const n=o.shadowRoot.querySelector(".nile-error-message__error");r(n).to.exist}))}));
1
+ import{f as e,a as r}from"../fixture-e7023246.esm.js";import{html as s}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-error-message.esm.js";import"tslib";import"lit/decorators.js";import"./nile-error-message.css.esm.js";describe("NileErrorMessage",(()=>{it("should render the error message",(async()=>{const o=(await e(s`<nile-error-message errorMessage="An error occurred"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__error");r(o.textContent).to.equal("An error occurred")})),it("should truncate the error response if it is too long",(async()=>{const o="a".repeat(150),t=(await e(s`<nile-error-message errorResponse="${o}"></nile-error-message>`)).getTruncatedResponse();r(t).to.equal(`${o.substring(0,100)}...`)})),it("should not truncate the error response if it is within the maximum length",(async()=>{const o="Short error message",t=(await e(s`<nile-error-message errorResponse="${o}"></nile-error-message>`)).getTruncatedResponse();r(t).to.equal(o)})),it("should toggle the expanded state when the button is clicked",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`),t=o.shadowRoot.querySelector(".nile-error-message__more-button")??{};t.click(),r(o.isExpanded).to.be.true,t.click(),r(o.isExpanded).to.be.false})),it('should display the "View More" button if there is extended error information',(async()=>{const o=(await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.exist})),it('should not display the "View More" button if there is no extended error information',(async()=>{const o=(await e(s`<nile-error-message errorResponse="Short error message"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.not.exist})),it("should show the extended error information when expanded",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`);o.isExpanded=!0,await o.updateComplete;const t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t?.textContent).to.include("Detailed error information")})),it("should hide the extended error information when collapsed",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`);o.isExpanded=!1,await o.updateComplete;const t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t).to.have.class("collapsed")})),it("should render icon and error message parts",(async()=>{const o=await e(s`<nile-error-message errorMessage="An error occurred"></nile-error-message>`),t=o.shadowRoot.querySelector("nile-icon");r(t).to.exist;const n=o.shadowRoot.querySelector(".nile-error-message__error");r(n).to.exist}))}));
@@ -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-324a7ef9.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);})));});}};});
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-fe6c932e.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(_fixture002CjsJs){e=_fixture002CjsJs.f;i=_fixture002CjsJs.a;l=_fixture002CjsJs.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,4 +1,4 @@
1
- import{f as e,a as i,o as l}from"../fixture-ba65eb22.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`
1
+ import{f as e,a as i,o as l}from"../fixture-e7023246.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
2
  <nile-filter-chip label="L" value="T"></nile-filter-chip>
3
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
4
  <nile-filter-chip label="MyLabel" value="MyText"></nile-filter-chip>
@@ -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-324a7ef9.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-fe6c932e.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(_fixture002CjsJs){t=_fixture002CjsJs.f;e=_fixture002CjsJs.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-ba65eb22.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-e7023246.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,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-324a7ef9.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-form-help-text.cjs.js","tslib","lit/decorators.js","./nile-form-help-text.css.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var t,e,i,l,o,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5;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;i=_fixture001CjsJs.e;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFormHelpTextCjsJs){o=_nileFormHelpTextCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_nileFormHelpTextCssCjsJs){},function(_litDirectivesClassMapJs){}],execute:function execute(){describe("NileFormHelpText",function(){it("should render with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _i$textContent;var i,s;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-form-help-text>This is a short text</nile-form-help-text>"]))));case 2:i=_context2.sent;e(i).to.be.instanceOf(o),e(i.isExpanded).to.be["false"];s=i===null||i===void 0||(_i$textContent=i.textContent)===null||_i$textContent===void 0?void 0:_i$textContent.trim();e(s).to.equal("This is a short text");case 6:case"end":return _context2.stop();}},_callee);}))),it('should not show "View More" button if the text fits within the container',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _o$shadowRoot;var o,s;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-form-help-text>This is a short text</nile-form-help-text>"]))));case 2:o=_context3.sent;_context3.next=5;return i(o);case 5:s=(_o$shadowRoot=o.shadowRoot)===null||_o$shadowRoot===void 0?void 0:_o$shadowRoot.querySelector(".nile-form-help-text__more-button");e(s).to.be["null"],e(o.showButton).to.be["false"];case 7:case"end":return _context3.stop();}},_callee2);}))),it('should show "View More" button if the text overflows the container',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _o$shadowRoot2,_o$shadowRoot3;var o,s,h;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(l(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-form-help-text>","</nile-form-help-text>"])),'This is a very long help text that exceeds the container width and should show a "View More" button.'));case 2:o=_context4.sent;s=(_o$shadowRoot2=o.shadowRoot)===null||_o$shadowRoot2===void 0?void 0:_o$shadowRoot2.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300});Object.defineProperty(s,"clientWidth",{value:200});o.decideToToggleShowButton();_context4.next=9;return i(o);case 9:h=(_o$shadowRoot3=o.shadowRoot)===null||_o$shadowRoot3===void 0?void 0:_o$shadowRoot3.querySelector(".nile-form-help-text__more-button");e(h).to.exist,e(o.showButton).to.be["true"];case 11:case"end":return _context4.stop();}},_callee3);}))),it('should expand to show full text when "View More" is clicked',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _o$shadowRoot4,_o$shadowRoot5;var o,s,h;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(l(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-form-help-text>","</nile-form-help-text>"])),'This is a very long help text that exceeds the container width and should show a "View More" button.'));case 2:o=_context5.sent;s=(_o$shadowRoot4=o.shadowRoot)===null||_o$shadowRoot4===void 0?void 0:_o$shadowRoot4.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300});Object.defineProperty(s,"clientWidth",{value:200});o.decideToToggleShowButton();_context5.next=9;return i(o);case 9:h=(_o$shadowRoot5=o.shadowRoot)===null||_o$shadowRoot5===void 0?void 0:_o$shadowRoot5.querySelector(".nile-form-help-text__more-button");h!==null&&h!==void 0&&h.click();_context5.next=13;return i(o);case 13:e(o.isExpanded).to.be["true"];e(s).to.have["class"]("help__text__full--expanded");e(h===null||h===void 0?void 0:h.textContent).to.include("View Less");case 16:case"end":return _context5.stop();}},_callee4);}))),it('should collapse back to truncated text when "View Less" is clicked',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _o$shadowRoot6,_o$shadowRoot7;var o,s,h;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(l(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-form-help-text>","</nile-form-help-text>"])),'This is a very long help text that exceeds the container width and should show a "View More" button.'));case 2:o=_context6.sent;s=(_o$shadowRoot6=o.shadowRoot)===null||_o$shadowRoot6===void 0?void 0:_o$shadowRoot6.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300});Object.defineProperty(s,"clientWidth",{value:200});o.decideToToggleShowButton();_context6.next=9;return i(o);case 9:h=(_o$shadowRoot7=o.shadowRoot)===null||_o$shadowRoot7===void 0?void 0:_o$shadowRoot7.querySelector(".nile-form-help-text__more-button");h!==null&&h!==void 0&&h.click();_context6.next=13;return i(o);case 13:h!==null&&h!==void 0&&h.click();_context6.next=16;return i(o);case 16:e(o.isExpanded).to.be["false"];e(s).not.to.have["class"]("help__text__full--expanded");e(h===null||h===void 0?void 0:h.textContent).to.include("View More");case 19:case"end":return _context6.stop();}},_callee5);})));});}};});
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-fe6c932e.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-form-help-text.cjs.js","tslib","lit/decorators.js","./nile-form-help-text.css.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var t,e,i,l,o,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5;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(_fixture002CjsJs){t=_fixture002CjsJs.f;e=_fixture002CjsJs.a;i=_fixture002CjsJs.e;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFormHelpTextCjsJs){o=_nileFormHelpTextCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_nileFormHelpTextCssCjsJs){},function(_litDirectivesClassMapJs){}],execute:function execute(){describe("NileFormHelpText",function(){it("should render with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _i$textContent;var i,s;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-form-help-text>This is a short text</nile-form-help-text>"]))));case 2:i=_context2.sent;e(i).to.be.instanceOf(o),e(i.isExpanded).to.be["false"];s=i===null||i===void 0||(_i$textContent=i.textContent)===null||_i$textContent===void 0?void 0:_i$textContent.trim();e(s).to.equal("This is a short text");case 6:case"end":return _context2.stop();}},_callee);}))),it('should not show "View More" button if the text fits within the container',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _o$shadowRoot;var o,s;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-form-help-text>This is a short text</nile-form-help-text>"]))));case 2:o=_context3.sent;_context3.next=5;return i(o);case 5:s=(_o$shadowRoot=o.shadowRoot)===null||_o$shadowRoot===void 0?void 0:_o$shadowRoot.querySelector(".nile-form-help-text__more-button");e(s).to.be["null"],e(o.showButton).to.be["false"];case 7:case"end":return _context3.stop();}},_callee2);}))),it('should show "View More" button if the text overflows the container',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _o$shadowRoot2,_o$shadowRoot3;var o,s,h;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(l(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-form-help-text>","</nile-form-help-text>"])),'This is a very long help text that exceeds the container width and should show a "View More" button.'));case 2:o=_context4.sent;s=(_o$shadowRoot2=o.shadowRoot)===null||_o$shadowRoot2===void 0?void 0:_o$shadowRoot2.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300});Object.defineProperty(s,"clientWidth",{value:200});o.decideToToggleShowButton();_context4.next=9;return i(o);case 9:h=(_o$shadowRoot3=o.shadowRoot)===null||_o$shadowRoot3===void 0?void 0:_o$shadowRoot3.querySelector(".nile-form-help-text__more-button");e(h).to.exist,e(o.showButton).to.be["true"];case 11:case"end":return _context4.stop();}},_callee3);}))),it('should expand to show full text when "View More" is clicked',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _o$shadowRoot4,_o$shadowRoot5;var o,s,h;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(l(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-form-help-text>","</nile-form-help-text>"])),'This is a very long help text that exceeds the container width and should show a "View More" button.'));case 2:o=_context5.sent;s=(_o$shadowRoot4=o.shadowRoot)===null||_o$shadowRoot4===void 0?void 0:_o$shadowRoot4.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300});Object.defineProperty(s,"clientWidth",{value:200});o.decideToToggleShowButton();_context5.next=9;return i(o);case 9:h=(_o$shadowRoot5=o.shadowRoot)===null||_o$shadowRoot5===void 0?void 0:_o$shadowRoot5.querySelector(".nile-form-help-text__more-button");h!==null&&h!==void 0&&h.click();_context5.next=13;return i(o);case 13:e(o.isExpanded).to.be["true"];e(s).to.have["class"]("help__text__full--expanded");e(h===null||h===void 0?void 0:h.textContent).to.include("View Less");case 16:case"end":return _context5.stop();}},_callee4);}))),it('should collapse back to truncated text when "View Less" is clicked',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _o$shadowRoot6,_o$shadowRoot7;var o,s,h;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(l(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-form-help-text>","</nile-form-help-text>"])),'This is a very long help text that exceeds the container width and should show a "View More" button.'));case 2:o=_context6.sent;s=(_o$shadowRoot6=o.shadowRoot)===null||_o$shadowRoot6===void 0?void 0:_o$shadowRoot6.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300});Object.defineProperty(s,"clientWidth",{value:200});o.decideToToggleShowButton();_context6.next=9;return i(o);case 9:h=(_o$shadowRoot7=o.shadowRoot)===null||_o$shadowRoot7===void 0?void 0:_o$shadowRoot7.querySelector(".nile-form-help-text__more-button");h!==null&&h!==void 0&&h.click();_context6.next=13;return i(o);case 13:h!==null&&h!==void 0&&h.click();_context6.next=16;return i(o);case 16:e(o.isExpanded).to.be["false"];e(s).not.to.have["class"]("help__text__full--expanded");e(h===null||h===void 0?void 0:h.textContent).to.include("View More");case 19:case"end":return _context6.stop();}},_callee5);})));});}};});
2
2
  //# sourceMappingURL=nile-form-help-text.test.cjs.js.map
@@ -1 +1 @@
1
- import{f as t,a as e,e as i}from"../fixture-ba65eb22.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 o}from"./nile-form-help-text.esm.js";import"tslib";import"lit/decorators.js";import"./nile-form-help-text.css.esm.js";import"lit/directives/class-map.js";describe("NileFormHelpText",(()=>{it("should render with default properties",(async()=>{const i=await t(l`<nile-form-help-text>This is a short text</nile-form-help-text>`);e(i).to.be.instanceOf(o),e(i.isExpanded).to.be.false;const s=i?.textContent?.trim();e(s).to.equal("This is a short text")})),it('should not show "View More" button if the text fits within the container',(async()=>{const o=await t(l`<nile-form-help-text>This is a short text</nile-form-help-text>`);await i(o);const s=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");e(s).to.be.null,e(o.showButton).to.be.false})),it('should show "View More" button if the text overflows the container',(async()=>{const o=await t(l`<nile-form-help-text>${'This is a very long help text that exceeds the container width and should show a "View More" button.'}</nile-form-help-text>`),s=o.shadowRoot?.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300}),Object.defineProperty(s,"clientWidth",{value:200}),o.decideToToggleShowButton(),await i(o);const h=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");e(h).to.exist,e(o.showButton).to.be.true})),it('should expand to show full text when "View More" is clicked',(async()=>{const o=await t(l`<nile-form-help-text>${'This is a very long help text that exceeds the container width and should show a "View More" button.'}</nile-form-help-text>`),s=o.shadowRoot?.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300}),Object.defineProperty(s,"clientWidth",{value:200}),o.decideToToggleShowButton(),await i(o);const h=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");h?.click(),await i(o),e(o.isExpanded).to.be.true,e(s).to.have.class("help__text__full--expanded"),e(h?.textContent).to.include("View Less")})),it('should collapse back to truncated text when "View Less" is clicked',(async()=>{const o=await t(l`<nile-form-help-text>${'This is a very long help text that exceeds the container width and should show a "View More" button.'}</nile-form-help-text>`),s=o.shadowRoot?.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300}),Object.defineProperty(s,"clientWidth",{value:200}),o.decideToToggleShowButton(),await i(o);const h=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");h?.click(),await i(o),h?.click(),await i(o),e(o.isExpanded).to.be.false,e(s).not.to.have.class("help__text__full--expanded"),e(h?.textContent).to.include("View More")}))}));
1
+ import{f as t,a as e,e as i}from"../fixture-e7023246.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 o}from"./nile-form-help-text.esm.js";import"tslib";import"lit/decorators.js";import"./nile-form-help-text.css.esm.js";import"lit/directives/class-map.js";describe("NileFormHelpText",(()=>{it("should render with default properties",(async()=>{const i=await t(l`<nile-form-help-text>This is a short text</nile-form-help-text>`);e(i).to.be.instanceOf(o),e(i.isExpanded).to.be.false;const s=i?.textContent?.trim();e(s).to.equal("This is a short text")})),it('should not show "View More" button if the text fits within the container',(async()=>{const o=await t(l`<nile-form-help-text>This is a short text</nile-form-help-text>`);await i(o);const s=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");e(s).to.be.null,e(o.showButton).to.be.false})),it('should show "View More" button if the text overflows the container',(async()=>{const o=await t(l`<nile-form-help-text>${'This is a very long help text that exceeds the container width and should show a "View More" button.'}</nile-form-help-text>`),s=o.shadowRoot?.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300}),Object.defineProperty(s,"clientWidth",{value:200}),o.decideToToggleShowButton(),await i(o);const h=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");e(h).to.exist,e(o.showButton).to.be.true})),it('should expand to show full text when "View More" is clicked',(async()=>{const o=await t(l`<nile-form-help-text>${'This is a very long help text that exceeds the container width and should show a "View More" button.'}</nile-form-help-text>`),s=o.shadowRoot?.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300}),Object.defineProperty(s,"clientWidth",{value:200}),o.decideToToggleShowButton(),await i(o);const h=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");h?.click(),await i(o),e(o.isExpanded).to.be.true,e(s).to.have.class("help__text__full--expanded"),e(h?.textContent).to.include("View Less")})),it('should collapse back to truncated text when "View Less" is clicked',(async()=>{const o=await t(l`<nile-form-help-text>${'This is a very long help text that exceeds the container width and should show a "View More" button.'}</nile-form-help-text>`),s=o.shadowRoot?.querySelector(".help__text__full");Object.defineProperty(s,"scrollWidth",{value:300}),Object.defineProperty(s,"clientWidth",{value:200}),o.decideToToggleShowButton(),await i(o);const h=o.shadowRoot?.querySelector(".nile-form-help-text__more-button");h?.click(),await i(o),h?.click(),await i(o),e(o.isExpanded).to.be.false,e(s).not.to.have.class("help__text__full--expanded"),e(h?.textContent).to.include("View More")}))}));
@@ -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-324a7ef9.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-hero.cjs.js","tslib","lit/decorators.js","./nile-hero.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var e,i,t,_templateObject,_templateObject2,_templateObject3;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;},function(_litStaticHtmlJs){t=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileHeroCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileHeroCssCjsJs){},function(_internalNileElementCjsJs){},function(_litDirectivesClassMapJs){}],execute:function execute(){describe("NileHero",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var r;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\t\t<nile-hero icon=\"error\" hero-text=\"Test Hero\">\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>"]))));case 2:r=_context2.sent;i(r.getAttribute("icon")).to.equal("error"),i(r.hasAttribute("collapse")).to.be["false"],i(r.getAttribute("img-src")).to.equal(""),i(r.getAttribute("hero-text")).to.equal("Test Hero"),i(r).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("checks for collapsed state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _r$shadowRoot;var r,a;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-hero></nile-hero>"]))));case 2:r=_context3.sent;r.collapse=!0;_context3.next=6;return r.updateComplete;case 6:i(r.collapse).to.be["true"];r.collapse=!0;_context3.next=10;return r.updateComplete;case 10:a=(_r$shadowRoot=r.shadowRoot)===null||_r$shadowRoot===void 0?void 0:_r$shadowRoot.querySelector(".hero__container");i(a===null||a===void 0?void 0:a.classList.contains("hero__container--collapsed")).to.be["true"];case 12:case"end":return _context3.stop();}},_callee2);}))),it("should render slot content",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var r,a;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-hero>\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>\n "]))));case 2:r=_context4.sent;_context4.next=5;return r.updateComplete;case 5:a=r.querySelector("nile-page-header");i(a).to.exist;case 7:case"end":return _context4.stop();}},_callee3);})));});}};});
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-fe6c932e.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-hero.cjs.js","tslib","lit/decorators.js","./nile-hero.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var e,i,t,_templateObject,_templateObject2,_templateObject3;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(_fixture002CjsJs){e=_fixture002CjsJs.f;i=_fixture002CjsJs.a;},function(_litStaticHtmlJs){t=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileHeroCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileHeroCssCjsJs){},function(_internalNileElementCjsJs){},function(_litDirectivesClassMapJs){}],execute:function execute(){describe("NileHero",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var r;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\t\t<nile-hero icon=\"error\" hero-text=\"Test Hero\">\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>"]))));case 2:r=_context2.sent;i(r.getAttribute("icon")).to.equal("error"),i(r.hasAttribute("collapse")).to.be["false"],i(r.getAttribute("img-src")).to.equal(""),i(r.getAttribute("hero-text")).to.equal("Test Hero"),i(r).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("checks for collapsed state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _r$shadowRoot;var r,a;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-hero></nile-hero>"]))));case 2:r=_context3.sent;r.collapse=!0;_context3.next=6;return r.updateComplete;case 6:i(r.collapse).to.be["true"];r.collapse=!0;_context3.next=10;return r.updateComplete;case 10:a=(_r$shadowRoot=r.shadowRoot)===null||_r$shadowRoot===void 0?void 0:_r$shadowRoot.querySelector(".hero__container");i(a===null||a===void 0?void 0:a.classList.contains("hero__container--collapsed")).to.be["true"];case 12:case"end":return _context3.stop();}},_callee2);}))),it("should render slot content",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var r,a;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-hero>\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>\n "]))));case 2:r=_context4.sent;_context4.next=5;return r.updateComplete;case 5:a=r.querySelector("nile-page-header");i(a).to.exist;case 7:case"end":return _context4.stop();}},_callee3);})));});}};});
2
2
  //# sourceMappingURL=nile-hero.test.cjs.js.map
@@ -1,4 +1,4 @@
1
- import{f as e,a as i}from"../fixture-ba65eb22.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"./nile-hero.esm.js";import"tslib";import"lit/decorators.js";import"./nile-hero.css.esm.js";import"../internal/nile-element.esm.js";import"lit/directives/class-map.js";describe("NileHero",(()=>{it("renders correctly with default properties",(async()=>{const r=await e(t`
1
+ import{f as e,a as i}from"../fixture-e7023246.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"./nile-hero.esm.js";import"tslib";import"lit/decorators.js";import"./nile-hero.css.esm.js";import"../internal/nile-element.esm.js";import"lit/directives/class-map.js";describe("NileHero",(()=>{it("renders correctly with default properties",(async()=>{const r=await e(t`
2
2
  <nile-hero icon="error" hero-text="Test Hero">
3
3
  <nile-page-header
4
4
  heading="I am heading"