@aquera/nile-elements 0.0.110 → 0.0.112

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 (447) hide show
  1. package/README.md +11 -0
  2. package/demo/filenames.txt +1 -1
  3. package/demo/variables.css +2 -0
  4. package/dist/{angular-ts-7f0ea228.cjs.js → angular-ts-f3444056.cjs.js} +2 -2
  5. package/dist/{angular-ts-7f0ea228.cjs.js.map → angular-ts-f3444056.cjs.js.map} +1 -1
  6. package/dist/{github-dark-default-2257ba5e.cjs.js → github-dark-default-450c7c01.cjs.js} +2 -2
  7. package/dist/{github-dark-default-2257ba5e.cjs.js.map → github-dark-default-450c7c01.cjs.js.map} +1 -1
  8. package/dist/{github-dark-default-5814263b.esm.js → github-dark-default-c8549d91.esm.js} +1 -1
  9. package/dist/{github-dark-dimmed-b7e46b3b.esm.js → github-dark-dimmed-2d99017f.esm.js} +1 -1
  10. package/dist/{github-dark-dimmed-5703df55.cjs.js → github-dark-dimmed-ef1406bd.cjs.js} +2 -2
  11. package/dist/{github-dark-dimmed-5703df55.cjs.js.map → github-dark-dimmed-ef1406bd.cjs.js.map} +1 -1
  12. package/dist/{github-dark-high-contrast-af204903.cjs.js → github-dark-high-contrast-60f6edfa.cjs.js} +2 -2
  13. package/dist/{github-dark-high-contrast-af204903.cjs.js.map → github-dark-high-contrast-60f6edfa.cjs.js.map} +1 -1
  14. package/dist/{github-dark-high-contrast-917c210a.esm.js → github-dark-high-contrast-eb093cb4.esm.js} +1 -1
  15. package/dist/{github-light-default-a8b27e0c.esm.js → github-light-default-97194ef6.esm.js} +1 -1
  16. package/dist/{github-light-default-f34de887.cjs.js → github-light-default-cf60a983.cjs.js} +2 -2
  17. package/dist/{github-light-default-f34de887.cjs.js.map → github-light-default-cf60a983.cjs.js.map} +1 -1
  18. package/dist/{github-light-high-contrast-17c40b3b.esm.js → github-light-high-contrast-0ddc875a.esm.js} +1 -1
  19. package/dist/{github-light-high-contrast-ef2e56e6.cjs.js → github-light-high-contrast-ab424680.cjs.js} +2 -2
  20. package/dist/{github-light-high-contrast-ef2e56e6.cjs.js.map → github-light-high-contrast-ab424680.cjs.js.map} +1 -1
  21. package/dist/hy-431f15f8.cjs.js +2 -0
  22. package/dist/hy-431f15f8.cjs.js.map +1 -0
  23. package/dist/hy-5e43d6c1.esm.js +1 -0
  24. package/dist/index.cjs.js +1 -1
  25. package/dist/index.esm.js +1 -1
  26. package/dist/{mermaid-7f9972ac.cjs.js → mermaid-76489bb0.cjs.js} +2 -2
  27. package/dist/{mermaid-7f9972ac.cjs.js.map → mermaid-76489bb0.cjs.js.map} +1 -1
  28. package/dist/{mermaid-94e78bd4.esm.js → mermaid-ca28664b.esm.js} +1 -1
  29. package/dist/mipsasm-535432b4.cjs.js +2 -0
  30. package/dist/mipsasm-535432b4.cjs.js.map +1 -0
  31. package/dist/mipsasm-57581c0d.esm.js +1 -0
  32. package/dist/nile-accordion/nile-accordion.cjs.js +1 -1
  33. package/dist/nile-accordion/nile-accordion.cjs.js.map +1 -1
  34. package/dist/nile-accordion/nile-accordion.esm.js +1 -1
  35. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  36. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  37. package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
  38. package/dist/nile-avatar/nile-avatar.cjs.js +1 -1
  39. package/dist/nile-avatar/nile-avatar.cjs.js.map +1 -1
  40. package/dist/nile-avatar/nile-avatar.esm.js +1 -1
  41. package/dist/nile-badge/index.cjs.js +1 -1
  42. package/dist/nile-badge/index.esm.js +1 -1
  43. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  44. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  45. package/dist/nile-badge/nile-badge.esm.js +1 -1
  46. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  47. package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -1
  48. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  49. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js +1 -1
  50. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js.map +1 -1
  51. package/dist/nile-breadcrumb/nile-breadcrumb.esm.js +1 -1
  52. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +1 -1
  53. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -1
  54. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +2 -2
  55. package/dist/nile-button/index.cjs.js +1 -1
  56. package/dist/nile-button/index.esm.js +1 -1
  57. package/dist/nile-button/nile-button.cjs.js +1 -1
  58. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  59. package/dist/nile-button/nile-button.esm.js +1 -1
  60. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  61. package/dist/nile-button/nile-button.test.cjs.js.map +1 -1
  62. package/dist/nile-button/nile-button.test.esm.js +1 -1
  63. package/dist/nile-button-toggle/nile-button-toggle.cjs.js +1 -1
  64. package/dist/nile-button-toggle/nile-button-toggle.cjs.js.map +1 -1
  65. package/dist/nile-button-toggle/nile-button-toggle.esm.js +1 -1
  66. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +1 -1
  67. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -1
  68. package/dist/nile-button-toggle-group/nile-button-toggle-group.esm.js +1 -1
  69. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  70. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  71. package/dist/nile-calendar/nile-calendar.esm.js +7 -7
  72. package/dist/nile-card/nile-card.cjs.js +1 -1
  73. package/dist/nile-card/nile-card.cjs.js.map +1 -1
  74. package/dist/nile-card/nile-card.esm.js +1 -1
  75. package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
  76. package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
  77. package/dist/nile-checkbox/nile-checkbox.esm.js +3 -3
  78. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  79. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  80. package/dist/nile-chip/nile-chip.esm.js +1 -1
  81. package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
  82. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  83. package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
  84. package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
  85. package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
  86. package/dist/nile-content-editor/nile-content-editor.esm.js +5 -5
  87. package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
  88. package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
  89. package/dist/nile-date-picker/nile-date-picker.esm.js +3 -5
  90. package/dist/nile-dialog/index.cjs.js +1 -1
  91. package/dist/nile-dialog/index.esm.js +1 -1
  92. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  93. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  94. package/dist/nile-dialog/nile-dialog.esm.js +8 -6
  95. package/dist/nile-drawer/index.cjs.js +1 -1
  96. package/dist/nile-drawer/index.esm.js +1 -1
  97. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  98. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  99. package/dist/nile-drawer/nile-drawer.esm.js +1 -1
  100. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  101. package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -1
  102. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  103. package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
  104. package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
  105. package/dist/nile-empty-state/nile-empty-state.esm.js +1 -1
  106. package/dist/nile-highlighter/index.cjs.js +1 -1
  107. package/dist/nile-highlighter/index.esm.js +1 -1
  108. package/dist/nile-highlighter/nile-highlighter.cjs.js +1 -1
  109. package/dist/nile-highlighter/nile-highlighter.cjs.js.map +1 -1
  110. package/dist/nile-highlighter/nile-highlighter.esm.js +2 -2
  111. package/dist/nile-highlighter/theme-list.cjs.js +1 -1
  112. package/dist/nile-highlighter/theme-list.cjs.js.map +1 -1
  113. package/dist/nile-highlighter/theme-list.esm.js +1 -1
  114. package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
  115. package/dist/nile-icon/icons/svg/index.esm.js +1 -1
  116. package/dist/nile-icon/icons/svg/insert-at-cursor.cjs.js +2 -0
  117. package/dist/nile-icon/icons/svg/insert-at-cursor.cjs.js.map +1 -0
  118. package/dist/nile-icon/icons/svg/insert-at-cursor.esm.js +1 -0
  119. package/dist/nile-icon/icons/svg/warning-01.cjs.js +2 -0
  120. package/dist/nile-icon/icons/svg/warning-01.cjs.js.map +1 -0
  121. package/dist/nile-icon/icons/svg/warning-01.esm.js +1 -0
  122. package/dist/nile-icon/index.cjs.js +1 -1
  123. package/dist/nile-icon/index.cjs.js.map +1 -1
  124. package/dist/nile-icon/index.esm.js +2 -2
  125. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  126. package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -1
  127. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  128. package/dist/nile-icon-button/index.cjs.js +1 -1
  129. package/dist/nile-icon-button/index.esm.js +1 -1
  130. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  131. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  132. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  133. package/dist/nile-input/index.cjs.js +1 -1
  134. package/dist/nile-input/index.esm.js +1 -1
  135. package/dist/nile-input/nile-input.cjs.js +1 -1
  136. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  137. package/dist/nile-input/nile-input.esm.js +1 -1
  138. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  139. package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
  140. package/dist/nile-input/nile-input.test.esm.js +1 -1
  141. package/dist/nile-link/index.cjs.js +1 -1
  142. package/dist/nile-link/index.esm.js +1 -1
  143. package/dist/nile-link/nile-link.cjs.js +1 -1
  144. package/dist/nile-link/nile-link.cjs.js.map +1 -1
  145. package/dist/nile-link/nile-link.esm.js +4 -4
  146. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  147. package/dist/nile-link/nile-link.test.cjs.js.map +1 -1
  148. package/dist/nile-link/nile-link.test.esm.js +1 -1
  149. package/dist/nile-list/nile-list.cjs.js +1 -1
  150. package/dist/nile-list/nile-list.cjs.js.map +1 -1
  151. package/dist/nile-list/nile-list.esm.js +1 -1
  152. package/dist/nile-list-item/nile-list-item.cjs.js +1 -1
  153. package/dist/nile-list-item/nile-list-item.cjs.js.map +1 -1
  154. package/dist/nile-list-item/nile-list-item.esm.js +1 -1
  155. package/dist/nile-menu/nile-menu.cjs.js +1 -1
  156. package/dist/nile-menu/nile-menu.cjs.js.map +1 -1
  157. package/dist/nile-menu/nile-menu.esm.js +1 -1
  158. package/dist/nile-menu-item/index.cjs.js +1 -1
  159. package/dist/nile-menu-item/index.esm.js +1 -1
  160. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  161. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  162. package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
  163. package/dist/nile-option/index.cjs.js +1 -1
  164. package/dist/nile-option/index.esm.js +1 -1
  165. package/dist/nile-option/nile-option.cjs.js +1 -1
  166. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  167. package/dist/nile-option/nile-option.esm.js +1 -1
  168. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  169. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  170. package/dist/nile-popover/nile-popover.esm.js +2 -2
  171. package/dist/nile-popup/nile-popup.cjs.js +1 -1
  172. package/dist/nile-popup/nile-popup.cjs.js.map +1 -1
  173. package/dist/nile-popup/nile-popup.esm.js +1 -1
  174. package/dist/nile-radio/nile-radio.cjs.js +1 -1
  175. package/dist/nile-radio/nile-radio.cjs.js.map +1 -1
  176. package/dist/nile-radio/nile-radio.esm.js +4 -4
  177. package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
  178. package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
  179. package/dist/nile-radio-group/nile-radio-group.esm.js +1 -1
  180. package/dist/nile-select/index.cjs.js +1 -1
  181. package/dist/nile-select/index.esm.js +1 -1
  182. package/dist/nile-select/nile-select.cjs.js +1 -1
  183. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  184. package/dist/nile-select/nile-select.esm.js +1 -1
  185. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
  186. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
  187. package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +1 -1
  188. package/dist/nile-split-panel/nile-split-panel.cjs.js +1 -1
  189. package/dist/nile-split-panel/nile-split-panel.cjs.js.map +1 -1
  190. package/dist/nile-split-panel/nile-split-panel.esm.js +1 -1
  191. package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
  192. package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
  193. package/dist/nile-stepper/nile-stepper.esm.js +1 -1
  194. package/dist/nile-tab/index.cjs.js +1 -1
  195. package/dist/nile-tab/index.esm.js +1 -1
  196. package/dist/nile-tab/nile-tab.cjs.js +1 -1
  197. package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
  198. package/dist/nile-tab/nile-tab.esm.js +1 -1
  199. package/dist/nile-tab-group/index.cjs.js +1 -1
  200. package/dist/nile-tab-group/index.esm.js +1 -1
  201. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  202. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  203. package/dist/nile-tab-group/nile-tab-group.esm.js +2 -2
  204. package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
  205. package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
  206. package/dist/nile-table-body/nile-table-body.esm.js +1 -1
  207. package/dist/nile-table-header-item/nile-table-header-item.cjs.js +1 -1
  208. package/dist/nile-table-header-item/nile-table-header-item.cjs.js.map +1 -1
  209. package/dist/nile-table-header-item/nile-table-header-item.esm.js +1 -1
  210. package/dist/nile-tag/index.cjs.js +1 -1
  211. package/dist/nile-tag/index.esm.js +1 -1
  212. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  213. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  214. package/dist/nile-tag/nile-tag.esm.js +1 -1
  215. package/dist/nile-textarea/nile-textarea.cjs.js +1 -1
  216. package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
  217. package/dist/nile-textarea/nile-textarea.esm.js +1 -1
  218. package/dist/nile-toast/index.cjs.js +1 -1
  219. package/dist/nile-toast/index.esm.js +1 -1
  220. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  221. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  222. package/dist/nile-toast/nile-toast.esm.js +1 -1
  223. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  224. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  225. package/dist/nile-tooltip/nile-tooltip.esm.js +1 -1
  226. package/dist/nile-tree/index.cjs.js +1 -1
  227. package/dist/nile-tree/index.esm.js +1 -1
  228. package/dist/nile-tree/nile-tree.cjs.js +1 -1
  229. package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
  230. package/dist/nile-tree/nile-tree.esm.js +1 -1
  231. package/dist/nile-tree-item/index.cjs.js +1 -1
  232. package/dist/nile-tree-item/index.esm.js +1 -1
  233. package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
  234. package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
  235. package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
  236. package/dist/sass-16055185.esm.js +1 -0
  237. package/dist/sass-4bfa8a08.cjs.js +2 -0
  238. package/dist/sass-4bfa8a08.cjs.js.map +1 -0
  239. package/dist/{sparql-f0d04e05.cjs.js → sparql-ebe1ddf3.cjs.js} +2 -2
  240. package/dist/{sparql-f0d04e05.cjs.js.map → sparql-ebe1ddf3.cjs.js.map} +1 -1
  241. package/dist/src/nile-accordion/nile-accordion.d.ts +1 -0
  242. package/dist/src/nile-accordion/nile-accordion.js +1 -0
  243. package/dist/src/nile-accordion/nile-accordion.js.map +1 -1
  244. package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +1 -0
  245. package/dist/src/nile-auto-complete/nile-auto-complete.js +1 -0
  246. package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
  247. package/dist/src/nile-avatar/nile-avatar.d.ts +1 -0
  248. package/dist/src/nile-avatar/nile-avatar.js +1 -0
  249. package/dist/src/nile-avatar/nile-avatar.js.map +1 -1
  250. package/dist/src/nile-badge/nile-badge.d.ts +1 -0
  251. package/dist/src/nile-badge/nile-badge.js +1 -0
  252. package/dist/src/nile-badge/nile-badge.js.map +1 -1
  253. package/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +1 -0
  254. package/dist/src/nile-breadcrumb/nile-breadcrumb.js +5 -0
  255. package/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -1
  256. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +1 -0
  257. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +1 -0
  258. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -1
  259. package/dist/src/nile-button/nile-button.d.ts +1 -0
  260. package/dist/src/nile-button/nile-button.js +1 -0
  261. package/dist/src/nile-button/nile-button.js.map +1 -1
  262. package/dist/src/nile-button-toggle/nile-button-toggle.d.ts +1 -0
  263. package/dist/src/nile-button-toggle/nile-button-toggle.js +1 -0
  264. package/dist/src/nile-button-toggle/nile-button-toggle.js.map +1 -1
  265. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +1 -0
  266. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +1 -0
  267. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -1
  268. package/dist/src/nile-calendar/nile-calendar.d.ts +5 -5
  269. package/dist/src/nile-calendar/nile-calendar.js +8 -17
  270. package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  271. package/dist/src/nile-card/nile-card.d.ts +1 -0
  272. package/dist/src/nile-card/nile-card.js +1 -0
  273. package/dist/src/nile-card/nile-card.js.map +1 -1
  274. package/dist/src/nile-checkbox/nile-checkbox.d.ts +1 -0
  275. package/dist/src/nile-checkbox/nile-checkbox.js +3 -7
  276. package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  277. package/dist/src/nile-chip/nile-chip.d.ts +1 -0
  278. package/dist/src/nile-chip/nile-chip.js +1 -0
  279. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  280. package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -0
  281. package/dist/src/nile-code-editor/nile-code-editor.js +1 -0
  282. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  283. package/dist/src/nile-content-editor/nile-content-editor.d.ts +1 -0
  284. package/dist/src/nile-content-editor/nile-content-editor.js +1 -0
  285. package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  286. package/dist/src/nile-date-picker/nile-date-picker.d.ts +1 -0
  287. package/dist/src/nile-date-picker/nile-date-picker.js +2 -4
  288. package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  289. package/dist/src/nile-dialog/nile-dialog.d.ts +1 -0
  290. package/dist/src/nile-dialog/nile-dialog.js +10 -7
  291. package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
  292. package/dist/src/nile-drawer/nile-drawer.d.ts +1 -0
  293. package/dist/src/nile-drawer/nile-drawer.js +1 -0
  294. package/dist/src/nile-drawer/nile-drawer.js.map +1 -1
  295. package/dist/src/nile-empty-state/nile-empty-state.d.ts +1 -0
  296. package/dist/src/nile-empty-state/nile-empty-state.js +1 -0
  297. package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
  298. package/dist/src/nile-highlighter/nile-highlighter.d.ts +2 -1
  299. package/dist/src/nile-highlighter/nile-highlighter.js +16 -11
  300. package/dist/src/nile-highlighter/nile-highlighter.js.map +1 -1
  301. package/dist/src/nile-icon/icons/svg/index.d.ts +2 -0
  302. package/dist/src/nile-icon/icons/svg/index.js +2 -0
  303. package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  304. package/dist/src/nile-icon/icons/svg/insert-at-cursor.d.ts +5 -0
  305. package/dist/src/nile-icon/icons/svg/insert-at-cursor.js +5 -0
  306. package/dist/src/nile-icon/icons/svg/insert-at-cursor.js.map +1 -0
  307. package/dist/src/nile-icon/icons/svg/warning-01.d.ts +5 -0
  308. package/dist/src/nile-icon/icons/svg/warning-01.js +5 -0
  309. package/dist/src/nile-icon/icons/svg/warning-01.js.map +1 -0
  310. package/dist/src/nile-icon-button/nile-icon-button.d.ts +1 -0
  311. package/dist/src/nile-icon-button/nile-icon-button.js +1 -0
  312. package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
  313. package/dist/src/nile-input/nile-input.d.ts +1 -0
  314. package/dist/src/nile-input/nile-input.js +1 -0
  315. package/dist/src/nile-input/nile-input.js.map +1 -1
  316. package/dist/src/nile-link/nile-link.d.ts +1 -0
  317. package/dist/src/nile-link/nile-link.js +2 -2
  318. package/dist/src/nile-link/nile-link.js.map +1 -1
  319. package/dist/src/nile-list/nile-list.d.ts +1 -0
  320. package/dist/src/nile-list/nile-list.js +5 -0
  321. package/dist/src/nile-list/nile-list.js.map +1 -1
  322. package/dist/src/nile-list-item/nile-list-item.d.ts +1 -0
  323. package/dist/src/nile-list-item/nile-list-item.js +1 -0
  324. package/dist/src/nile-list-item/nile-list-item.js.map +1 -1
  325. package/dist/src/nile-menu/nile-menu.d.ts +1 -0
  326. package/dist/src/nile-menu/nile-menu.js +1 -0
  327. package/dist/src/nile-menu/nile-menu.js.map +1 -1
  328. package/dist/src/nile-menu-item/nile-menu-item.d.ts +2 -0
  329. package/dist/src/nile-menu-item/nile-menu-item.js +3 -5
  330. package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
  331. package/dist/src/nile-option/nile-option.d.ts +2 -0
  332. package/dist/src/nile-option/nile-option.js +3 -5
  333. package/dist/src/nile-option/nile-option.js.map +1 -1
  334. package/dist/src/nile-popover/nile-popover.d.ts +1 -0
  335. package/dist/src/nile-popover/nile-popover.js +3 -2
  336. package/dist/src/nile-popover/nile-popover.js.map +1 -1
  337. package/dist/src/nile-popup/nile-popup.d.ts +2 -0
  338. package/dist/src/nile-popup/nile-popup.js +2 -0
  339. package/dist/src/nile-popup/nile-popup.js.map +1 -1
  340. package/dist/src/nile-radio/nile-radio.js +2 -8
  341. package/dist/src/nile-radio/nile-radio.js.map +1 -1
  342. package/dist/src/nile-radio-group/nile-radio-group.d.ts +1 -0
  343. package/dist/src/nile-radio-group/nile-radio-group.js +1 -0
  344. package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
  345. package/dist/src/nile-select/nile-select.d.ts +1 -0
  346. package/dist/src/nile-select/nile-select.js +1 -0
  347. package/dist/src/nile-select/nile-select.js.map +1 -1
  348. package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +1 -0
  349. package/dist/src/nile-slide-toggle/nile-slide-toggle.js +2 -0
  350. package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
  351. package/dist/src/nile-split-panel/nile-split-panel.d.ts +1 -0
  352. package/dist/src/nile-split-panel/nile-split-panel.js +1 -0
  353. package/dist/src/nile-split-panel/nile-split-panel.js.map +1 -1
  354. package/dist/src/nile-stepper/nile-stepper.d.ts +1 -0
  355. package/dist/src/nile-stepper/nile-stepper.js +1 -0
  356. package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
  357. package/dist/src/nile-tab/nile-tab.d.ts +1 -0
  358. package/dist/src/nile-tab/nile-tab.js +3 -2
  359. package/dist/src/nile-tab/nile-tab.js.map +1 -1
  360. package/dist/src/nile-tab-group/nile-tab-group.d.ts +1 -0
  361. package/dist/src/nile-tab-group/nile-tab-group.js +3 -2
  362. package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
  363. package/dist/src/nile-table-body/nile-table-body.d.ts +1 -0
  364. package/dist/src/nile-table-body/nile-table-body.js +1 -0
  365. package/dist/src/nile-table-body/nile-table-body.js.map +1 -1
  366. package/dist/src/nile-table-header-item/nile-table-header-item.d.ts +1 -0
  367. package/dist/src/nile-table-header-item/nile-table-header-item.js +1 -0
  368. package/dist/src/nile-table-header-item/nile-table-header-item.js.map +1 -1
  369. package/dist/src/nile-tag/nile-tag.d.ts +1 -0
  370. package/dist/src/nile-tag/nile-tag.js +1 -0
  371. package/dist/src/nile-tag/nile-tag.js.map +1 -1
  372. package/dist/src/nile-textarea/nile-textarea.d.ts +1 -0
  373. package/dist/src/nile-textarea/nile-textarea.js +1 -0
  374. package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
  375. package/dist/src/nile-toast/nile-toast.d.ts +1 -0
  376. package/dist/src/nile-toast/nile-toast.js +1 -0
  377. package/dist/src/nile-toast/nile-toast.js.map +1 -1
  378. package/dist/src/nile-tooltip/nile-tooltip.d.ts +1 -0
  379. package/dist/src/nile-tooltip/nile-tooltip.js +1 -0
  380. package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  381. package/dist/src/nile-tree/nile-tree.d.ts +1 -0
  382. package/dist/src/nile-tree/nile-tree.js +1 -0
  383. package/dist/src/nile-tree/nile-tree.js.map +1 -1
  384. package/dist/src/nile-tree-item/nile-tree-item.d.ts +1 -0
  385. package/dist/src/nile-tree-item/nile-tree-item.js +1 -0
  386. package/dist/src/nile-tree-item/nile-tree-item.js.map +1 -1
  387. package/dist/tsconfig.tsbuildinfo +1 -1
  388. package/dist/{twig-4e6df20b.cjs.js → twig-2431875e.cjs.js} +2 -2
  389. package/dist/{twig-4e6df20b.cjs.js.map → twig-2431875e.cjs.js.map} +1 -1
  390. package/dist/{vue-html-4845664e.cjs.js → vue-html-36dd3960.cjs.js} +2 -2
  391. package/dist/{vue-html-4845664e.cjs.js.map → vue-html-36dd3960.cjs.js.map} +1 -1
  392. package/package.json +1 -1
  393. package/src/nile-accordion/nile-accordion.ts +1 -0
  394. package/src/nile-auto-complete/nile-auto-complete.ts +3 -1
  395. package/src/nile-avatar/nile-avatar.ts +2 -0
  396. package/src/nile-badge/nile-badge.ts +2 -0
  397. package/src/nile-breadcrumb/nile-breadcrumb.ts +2 -0
  398. package/src/nile-breadcrumb-item/nile-breadcrumb-item.ts +2 -0
  399. package/src/nile-button/nile-button.ts +2 -0
  400. package/src/nile-button-toggle/nile-button-toggle.ts +2 -0
  401. package/src/nile-button-toggle-group/nile-button-toggle-group.ts +2 -0
  402. package/src/nile-calendar/nile-calendar.ts +11 -19
  403. package/src/nile-card/nile-card.ts +2 -0
  404. package/src/nile-checkbox/nile-checkbox.ts +4 -9
  405. package/src/nile-chip/nile-chip.ts +2 -0
  406. package/src/nile-code-editor/nile-code-editor.ts +2 -0
  407. package/src/nile-content-editor/nile-content-editor.ts +2 -0
  408. package/src/nile-date-picker/nile-date-picker.ts +3 -4
  409. package/src/nile-dialog/nile-dialog.ts +12 -8
  410. package/src/nile-drawer/nile-drawer.ts +2 -0
  411. package/src/nile-empty-state/nile-empty-state.ts +2 -0
  412. package/src/nile-highlighter/nile-highlighter.ts +20 -13
  413. package/src/nile-icon/icons/svg/index.ts +2 -0
  414. package/src/nile-icon/icons/svg/insert-at-cursor.ts +5 -0
  415. package/src/nile-icon/icons/svg/warning-01.ts +5 -0
  416. package/src/nile-icon-button/nile-icon-button.ts +2 -0
  417. package/src/nile-input/nile-input.ts +2 -0
  418. package/src/nile-link/nile-link.ts +3 -1
  419. package/src/nile-list/nile-list.ts +2 -0
  420. package/src/nile-list-item/nile-list-item.ts +2 -0
  421. package/src/nile-menu/nile-menu.ts +3 -0
  422. package/src/nile-menu-item/nile-menu-item.ts +4 -5
  423. package/src/nile-option/nile-option.ts +4 -5
  424. package/src/nile-popover/nile-popover.ts +4 -2
  425. package/src/nile-popup/nile-popup.ts +3 -0
  426. package/src/nile-radio/nile-radio.ts +2 -12
  427. package/src/nile-radio-group/nile-radio-group.ts +2 -0
  428. package/src/nile-select/nile-select.ts +2 -0
  429. package/src/nile-slide-toggle/nile-slide-toggle.ts +3 -0
  430. package/src/nile-split-panel/nile-split-panel.ts +2 -0
  431. package/src/nile-stepper/nile-stepper.ts +2 -0
  432. package/src/nile-tab/nile-tab.ts +4 -2
  433. package/src/nile-tab-group/nile-tab-group.ts +4 -2
  434. package/src/nile-table-body/nile-table-body.ts +2 -0
  435. package/src/nile-table-header-item/nile-table-header-item.ts +2 -0
  436. package/src/nile-tag/nile-tag.ts +2 -0
  437. package/src/nile-textarea/nile-textarea.ts +2 -0
  438. package/src/nile-toast/nile-toast.ts +2 -0
  439. package/src/nile-tooltip/nile-tooltip.ts +2 -0
  440. package/src/nile-tree/nile-tree.ts +2 -0
  441. package/src/nile-tree-item/nile-tree-item.ts +2 -0
  442. package/dist/hy-70a23b1a.cjs.js +0 -2
  443. package/dist/hy-70a23b1a.cjs.js.map +0 -1
  444. package/dist/hy-c5d98bdd.esm.js +0 -1
  445. package/dist/sass-07548677.esm.js +0 -1
  446. package/dist/sass-836693eb.cjs.js +0 -2
  447. package/dist/sass-836693eb.cjs.js.map +0 -1
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","./nile-accordion.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","lit/decorators.js","../utilities/animation-registry.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var i,t,s,e,a,o,r,n,l,h,d,c,m,p,f,_templateObject,y;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}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 asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){i=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;},function(_nileAccordionCssCjsJs){s=_nileAccordionCssCjsJs.s;},function(_internalNileElementCjsJs){e=_internalNileElementCjsJs.N;},function(_internalAnimateCjsJs){a=_internalAnimateCjsJs.s;o=_internalAnimateCjsJs.a;r=_internalAnimateCjsJs.b;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_litDecoratorsJs){l=_litDecoratorsJs.query;h=_litDecoratorsJs.customElement;},function(_utilitiesAnimationRegistryCjsJs){d=_utilitiesAnimationRegistryCjsJs.s;c=_utilitiesAnimationRegistryCjsJs.g;},function(_internalEventCjsJs){m=_internalEventCjsJs.w;},function(_internalWatchCjsJs){p=_internalWatchCjsJs.w;},function(_property002CjsJs){f=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",y=/*#__PURE__*/function(_e){function y(){var _this;_classCallCheck(this,y);_this=_callSuper(this,y,arguments),_this.open=!1,_this.disabled=!1;return _this;}_inherits(y,_e);return _createClass(y,[{key:"firstUpdated",value:function firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0";}},{key:"handleSummaryClick",value:function handleSummaryClick(){this.disabled||(this.open?this.hide():this.show(),this.header.focus());}},{key:"handleSummaryKeyDown",value:function handleSummaryKeyDown(i){"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==i.key&&"ArrowLeft"!==i.key||(i.preventDefault(),this.hide()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(i.preventDefault(),this.show());}},{key:"handleOpenChange",value:function(){var _handleOpenChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _c,_i,_t,_c2,_i2,_t2;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!this.open){_context2.next=13;break;}if(!this.emit("nile-show",{cancelable:!0}).defaultPrevented){_context2.next=3;break;}return _context2.abrupt("return",void(this.open=!1));case 3:_context2.next=5;return a(this.body);case 5:this.body.hidden=!1;_c=c(this,"details.show",{dir:"ltr"}),_i=_c.keyframes,_t=_c.options;_context2.next=9;return o(this.body,r(_i,this.body.scrollHeight),_t);case 9:this.body.style.height="auto";this.emit("nile-after-show");_context2.next=23;break;case 13:if(!this.emit("nile-hide",{cancelable:!0}).defaultPrevented){_context2.next=15;break;}return _context2.abrupt("return",void(this.open=!0));case 15:_context2.next=17;return a(this.body);case 17:_c2=c(this,"details.hide",{dir:"ltr"}),_i2=_c2.keyframes,_t2=_c2.options;_context2.next=20;return o(this.body,r(_i2,this.body.scrollHeight),_t2);case 20:this.body.hidden=!0;this.body.style.height="auto";this.emit("nile-after-hide");case 23:case"end":return _context2.stop();}},_callee,this);}));function handleOpenChange(){return _handleOpenChange.apply(this,arguments);}return handleOpenChange;}()},{key:"show",value:function(){var _show=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!(!this.open&&!this.disabled)){_context3.next=2;break;}return _context3.abrupt("return",(this.open=!0,m(this,"nile-after-show")));case 2:case"end":return _context3.stop();}},_callee2,this);}));function show(){return _show.apply(this,arguments);}return show;}()},{key:"hide",value:function(){var _hide=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!(this.open&&!this.disabled)){_context4.next=2;break;}return _context4.abrupt("return",(this.open=!1,m(this,"nile-after-hide")));case 2:case"end":return _context4.stop();}},_callee3,this);}));function hide(){return _hide.apply(this,arguments);}return hide;}()},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"details__header\"\n role=\"button\"\n aria-expanded=","\n aria-controls=\"content\"\n aria-disabled=","\n tabindex=","\n @click=","\n @keydown=","\n >\n <slot name=\"summary\" part=\"summary\" class=\"details__summary\">","</slot>\n\n <span part=\"summary-icon\" class=\"details__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"details__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" class=\"details__content\"></slot>\n </div>\n </div>\n "])),n({details:!0,"details--open":this.open,"details--disabled":this.disabled,"details--rtl":!1}),this.open?"true":"false",this.disabled?"true":"false",this.disabled?"-1":"0",this.handleSummaryClick,this.handleSummaryKeyDown,this.summary);}}]);}(e));y.styles=s,i([l(".details")],y.prototype,"details",void 0),i([l(".details__header")],y.prototype,"header",void 0),i([l(".details__body")],y.prototype,"body",void 0),i([l(".details__expand-icon-slot")],y.prototype,"expandIconSlot",void 0),i([f({type:Boolean,reflect:!0})],y.prototype,"open",void 0),i([f()],y.prototype,"summary",void 0),i([f({type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),i([p("open",{waitUntilFirstUpdate:!0})],y.prototype,"handleOpenChange",null),_export("N",y=i([h("nile-accordion")],y)),d("details.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}}),d("details.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}});}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","./nile-accordion.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","lit/decorators.js","../utilities/animation-registry.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var i,t,s,e,a,o,r,n,l,h,d,c,m,p,f,_templateObject,y;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}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 asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){i=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;},function(_nileAccordionCssCjsJs){s=_nileAccordionCssCjsJs.s;},function(_internalNileElementCjsJs){e=_internalNileElementCjsJs.N;},function(_internalAnimateCjsJs){a=_internalAnimateCjsJs.s;o=_internalAnimateCjsJs.a;r=_internalAnimateCjsJs.b;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_litDecoratorsJs){l=_litDecoratorsJs.query;h=_litDecoratorsJs.customElement;},function(_utilitiesAnimationRegistryCjsJs){d=_utilitiesAnimationRegistryCjsJs.s;c=_utilitiesAnimationRegistryCjsJs.g;},function(_internalEventCjsJs){m=_internalEventCjsJs.w;},function(_internalWatchCjsJs){p=_internalWatchCjsJs.w;},function(_property002CjsJs){f=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",y=/*#__PURE__*/function(_e){function y(){var _this;_classCallCheck(this,y);_this=_callSuper(this,y,arguments),_this.BUBBLES=!1,_this.open=!1,_this.disabled=!1;return _this;}_inherits(y,_e);return _createClass(y,[{key:"firstUpdated",value:function firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0";}},{key:"handleSummaryClick",value:function handleSummaryClick(){this.disabled||(this.open?this.hide():this.show(),this.header.focus());}},{key:"handleSummaryKeyDown",value:function handleSummaryKeyDown(i){"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==i.key&&"ArrowLeft"!==i.key||(i.preventDefault(),this.hide()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(i.preventDefault(),this.show());}},{key:"handleOpenChange",value:function(){var _handleOpenChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _c,_i,_t,_c2,_i2,_t2;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!this.open){_context2.next=13;break;}if(!this.emit("nile-show",{cancelable:!0}).defaultPrevented){_context2.next=3;break;}return _context2.abrupt("return",void(this.open=!1));case 3:_context2.next=5;return a(this.body);case 5:this.body.hidden=!1;_c=c(this,"details.show",{dir:"ltr"}),_i=_c.keyframes,_t=_c.options;_context2.next=9;return o(this.body,r(_i,this.body.scrollHeight),_t);case 9:this.body.style.height="auto";this.emit("nile-after-show");_context2.next=23;break;case 13:if(!this.emit("nile-hide",{cancelable:!0}).defaultPrevented){_context2.next=15;break;}return _context2.abrupt("return",void(this.open=!0));case 15:_context2.next=17;return a(this.body);case 17:_c2=c(this,"details.hide",{dir:"ltr"}),_i2=_c2.keyframes,_t2=_c2.options;_context2.next=20;return o(this.body,r(_i2,this.body.scrollHeight),_t2);case 20:this.body.hidden=!0;this.body.style.height="auto";this.emit("nile-after-hide");case 23:case"end":return _context2.stop();}},_callee,this);}));function handleOpenChange(){return _handleOpenChange.apply(this,arguments);}return handleOpenChange;}()},{key:"show",value:function(){var _show=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!(!this.open&&!this.disabled)){_context3.next=2;break;}return _context3.abrupt("return",(this.open=!0,m(this,"nile-after-show")));case 2:case"end":return _context3.stop();}},_callee2,this);}));function show(){return _show.apply(this,arguments);}return show;}()},{key:"hide",value:function(){var _hide=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!(this.open&&!this.disabled)){_context4.next=2;break;}return _context4.abrupt("return",(this.open=!1,m(this,"nile-after-hide")));case 2:case"end":return _context4.stop();}},_callee3,this);}));function hide(){return _hide.apply(this,arguments);}return hide;}()},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"details__header\"\n role=\"button\"\n aria-expanded=","\n aria-controls=\"content\"\n aria-disabled=","\n tabindex=","\n @click=","\n @keydown=","\n >\n <slot name=\"summary\" part=\"summary\" class=\"details__summary\">","</slot>\n\n <span part=\"summary-icon\" class=\"details__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"details__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" class=\"details__content\"></slot>\n </div>\n </div>\n "])),n({details:!0,"details--open":this.open,"details--disabled":this.disabled,"details--rtl":!1}),this.open?"true":"false",this.disabled?"true":"false",this.disabled?"-1":"0",this.handleSummaryClick,this.handleSummaryKeyDown,this.summary);}}]);}(e));y.styles=s,i([l(".details")],y.prototype,"details",void 0),i([l(".details__header")],y.prototype,"header",void 0),i([l(".details__body")],y.prototype,"body",void 0),i([l(".details__expand-icon-slot")],y.prototype,"expandIconSlot",void 0),i([f({type:Boolean,reflect:!0})],y.prototype,"open",void 0),i([f()],y.prototype,"summary",void 0),i([f({type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),i([p("open",{waitUntilFirstUpdate:!0})],y.prototype,"handleOpenChange",null),_export("N",y=i([h("nile-accordion")],y)),d("details.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}}),d("details.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}});}};});
2
2
  //# sourceMappingURL=nile-accordion.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-accordion.cjs.js","sources":["../../../src/nile-accordion/nile-accordion.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport {styles} from './nile-accordion.css';\nimport NileElement from '../internal/nile-element';\nimport { animateTo, shimKeyframesHeightAuto, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile detail component.\n *\n * @tag nile-accordion\n *\n */\n@customElement('nile-accordion')\nexport class NileAccordion extends NileElement {\n\n/**\n * @summary Details show a brief summary and expand to show additional content.\n *\n * @dependency nile-icon\n *\n * @slot - The details' main content.\n * @slot summary - The details' summary. Alternatively, you can use the `summary` attribute.\n * @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<nile-icon>`.\n * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<nile-icon>`.\n *\n * @event nile-show - Emitted when the details opens.\n * @event nile-after-show - Emitted after the details opens and all animations are complete.\n * @event nile-hide - Emitted when the details closes.\n * @event nile-after-hide - Emitted after the details closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart header - The header that wraps both the summary and the expand/collapse icon.\n * @csspart summary - The container that wraps the summary.\n * @csspart summary-icon - The container that wraps the expand/collapse icons.\n * @csspart content - The details content.\n *\n * @animation details.show - The animation to use when showing details. You can use `height: auto` with this animation.\n * @animation details.hide - The animation to use when hiding details. You can use `height: auto` with this animation.\n */\n\nstatic styles: CSSResultGroup = styles;\n\n\n@query('.details') details: HTMLElement;\n@query('.details__header') header: HTMLElement;\n@query('.details__body') body: HTMLElement;\n@query('.details__expand-icon-slot') expandIconSlot: HTMLSlotElement;\n\n/**\n * Indicates whether or not the details is open. You can toggle this attribute to show and hide the details, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the details' open state.\n */\n@property({ type: Boolean, reflect: true }) open = false;\n\n/** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */\n@property() summary: string;\n\n/** Disables the details so it can't be toggled. */\n@property({ type: Boolean, reflect: true }) disabled = false;\n\nfirstUpdated() {\n this.body.hidden = !this.open;\n this.body.style.height = this.open ? 'auto' : '0';\n}\n\nprivate handleSummaryClick() {\n if (!this.disabled) {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n\n this.header.focus();\n }\n}\n\nprivate handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n}\n\n@watch('open', { waitUntilFirstUpdate: true })\nasync handleOpenChange() {\n if (this.open) {\n // Show\n const nileShow = this.emit('nile-show', { cancelable: true });\n if (nileShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n await stopAnimations(this.body);\n this.body.hidden = false;\n\n const { keyframes, options } = getAnimation(this, 'details.show', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = 'auto';\n\n this.emit('nile-after-show');\n } else {\n // Hide\n const nileHide = this.emit('nile-hide', { cancelable: true });\n if (nileHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n await stopAnimations(this.body);\n\n const { keyframes, options } = getAnimation(this, 'details.hide', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.hidden = true;\n this.body.style.height = 'auto';\n\n this.emit('nile-after-hide');\n }\n}\n\n/** Shows the details. */\nasync show() {\n if (this.open || this.disabled) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n}\n\n/** Hides the details */\nasync hide() {\n if (!this.open || this.disabled) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n}\n\nrender() {\n const isRtl = false;\n\n return html`\n <div\n part=\"base\"\n class=${classMap({\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n 'details--rtl': isRtl\n })}\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"details__header\"\n role=\"button\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-controls=\"content\"\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"summary\" part=\"summary\" class=\"details__summary\">${this.summary}</slot>\n\n <span part=\"summary-icon\" class=\"details__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"details__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" class=\"details__content\"></slot>\n </div>\n </div>\n `;\n}\n}\n\nsetDefaultAnimation('details.show', {\nkeyframes: [\n { height: '0', opacity: '0' },\n { height: 'auto', opacity: '1' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nsetDefaultAnimation('details.hide', {\nkeyframes: [\n { height: 'auto', opacity: '1' },\n { height: '0', opacity: '0' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nexport default NileAccordion;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-accordion': NileAccordion;\n }\n}\n"],"names":["NileAccordion","_e","y","constructor","this","open","disabled","_this","_inherits","_createClass","key","value","firstUpdated","body","hidden","style","height","handleSummaryClick","hide","show","header","focus","handleSummaryKeyDown","event","preventDefault","_handleOpenChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_c","_i","_t","_c2","_i2","_t2","wrap","_callee$","_context2","prev","next","emit","cancelable","defaultPrevented","stopAnimations","getAnimation","dir","animateTo","keyframes","options","shimKeyframesHeightAuto","scrollHeight","abrupt","stop","handleOpenChange","apply","arguments","_show","_callee2","_callee2$","_context3","waitForEvent","_hide","_callee3","_callee3$","_context4","render","html","_templateObject","_taggedTemplateLiteral","classMap","details","summary","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","watch","waitUntilFirstUpdate","customElement","setDefaultAnimation","opacity","duration","easing"],"mappings":"28YAyBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAuCqCC,KAAAA,CAAIC,IAAAA,CAAAA,CAAG,CAMPD,CAAAA,KAAAA,CAAQE,QAAG,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AA,EAAA,CAAA,CA0CvDF,CAAA,CAAA,CADLO,CAAM,CAAA,MAAA,CAAQ,CAAEC,oBAAAA,CAAAA,CAAsB,CAmCtCnF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA6E,SAAA,CAAA,kBAAA,CAAA,IAzHY7E,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAa2E,CAAA,CAAA,CADzBS,CAAc,CAAA,gBAAA,CAAA,CAAA,CACFpF,CA4LbqF,CAAAA,EAAAA,CAAAA,CAAoB,cAAgB,CAAA,CACpCrC,SAAW,CAAA,CACT,CAAEhC,MAAAA,CAAQ,GAAKsE,CAAAA,OAAAA,CAAS,GACxB,CAAA,CAAA,CAAEtE,MAAQ,CAAA,MAAA,CAAQsE,OAAS,CAAA,GAAA,CAAA,CAAA,CAE7BrC,OAAS,CAAA,CAAEsC,QAAU,CAAA,GAAA,CAAKC,MAAQ,CAAA,QAAA,CAAA,CAAA,CAAA,CAGlCH,CAAoB,CAAA,cAAA,CAAgB,CACpCrC,SAAAA,CAAW,CACT,CAAEhC,MAAQ,CAAA,MAAA,CAAQsE,OAAS,CAAA,GAAA,CAAA,CAC3B,CAAEtE,MAAAA,CAAQ,GAAKsE,CAAAA,OAAAA,CAAS,GAE1BrC,CAAAA,CAAAA,CAAAA,OAAAA,CAAS,CAAEsC,QAAAA,CAAU,GAAKC,CAAAA,MAAAA,CAAQ"}
1
+ {"version":3,"file":"nile-accordion.cjs.js","sources":["../../../src/nile-accordion/nile-accordion.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport {styles} from './nile-accordion.css';\nimport NileElement from '../internal/nile-element';\nimport { animateTo, shimKeyframesHeightAuto, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile detail component.\n *\n * @tag nile-accordion\n *\n */\n@customElement('nile-accordion')\nexport class NileAccordion extends NileElement {\n\n/**\n * @summary Details show a brief summary and expand to show additional content.\n *\n * @dependency nile-icon\n *\n * @slot - The details' main content.\n * @slot summary - The details' summary. Alternatively, you can use the `summary` attribute.\n * @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<nile-icon>`.\n * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<nile-icon>`.\n *\n * @event nile-show - Emitted when the details opens.\n * @event nile-after-show - Emitted after the details opens and all animations are complete.\n * @event nile-hide - Emitted when the details closes.\n * @event nile-after-hide - Emitted after the details closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart header - The header that wraps both the summary and the expand/collapse icon.\n * @csspart summary - The container that wraps the summary.\n * @csspart summary-icon - The container that wraps the expand/collapse icons.\n * @csspart content - The details content.\n *\n * @animation details.show - The animation to use when showing details. You can use `height: auto` with this animation.\n * @animation details.hide - The animation to use when hiding details. You can use `height: auto` with this animation.\n */\n\nstatic styles: CSSResultGroup = styles;\n\nprotected override BUBBLES: boolean=false;\n\n@query('.details') details: HTMLElement;\n@query('.details__header') header: HTMLElement;\n@query('.details__body') body: HTMLElement;\n@query('.details__expand-icon-slot') expandIconSlot: HTMLSlotElement;\n\n/**\n * Indicates whether or not the details is open. You can toggle this attribute to show and hide the details, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the details' open state.\n */\n@property({ type: Boolean, reflect: true }) open = false;\n\n/** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */\n@property() summary: string;\n\n/** Disables the details so it can't be toggled. */\n@property({ type: Boolean, reflect: true }) disabled = false;\n\nfirstUpdated() {\n this.body.hidden = !this.open;\n this.body.style.height = this.open ? 'auto' : '0';\n}\n\nprivate handleSummaryClick() {\n if (!this.disabled) {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n\n this.header.focus();\n }\n}\n\nprivate handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n}\n\n@watch('open', { waitUntilFirstUpdate: true })\nasync handleOpenChange() {\n if (this.open) {\n // Show\n const nileShow = this.emit('nile-show', { cancelable: true });\n if (nileShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n await stopAnimations(this.body);\n this.body.hidden = false;\n\n const { keyframes, options } = getAnimation(this, 'details.show', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = 'auto';\n\n this.emit('nile-after-show');\n } else {\n // Hide\n const nileHide = this.emit('nile-hide', { cancelable: true });\n if (nileHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n await stopAnimations(this.body);\n\n const { keyframes, options } = getAnimation(this, 'details.hide', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.hidden = true;\n this.body.style.height = 'auto';\n\n this.emit('nile-after-hide');\n }\n}\n\n/** Shows the details. */\nasync show() {\n if (this.open || this.disabled) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n}\n\n/** Hides the details */\nasync hide() {\n if (!this.open || this.disabled) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n}\n\nrender() {\n const isRtl = false;\n\n return html`\n <div\n part=\"base\"\n class=${classMap({\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n 'details--rtl': isRtl\n })}\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"details__header\"\n role=\"button\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-controls=\"content\"\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"summary\" part=\"summary\" class=\"details__summary\">${this.summary}</slot>\n\n <span part=\"summary-icon\" class=\"details__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"details__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" class=\"details__content\"></slot>\n </div>\n </div>\n `;\n}\n}\n\nsetDefaultAnimation('details.show', {\nkeyframes: [\n { height: '0', opacity: '0' },\n { height: 'auto', opacity: '1' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nsetDefaultAnimation('details.hide', {\nkeyframes: [\n { height: 'auto', opacity: '1' },\n { height: '0', opacity: '0' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nexport default NileAccordion;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-accordion': NileAccordion;\n }\n}\n"],"names":["NileAccordion","_e","y","this","BUBBLES","open","disabled","_this","_inherits","_createClass","key","value","firstUpdated","body","hidden","style","height","handleSummaryClick","hide","show","header","focus","handleSummaryKeyDown","event","preventDefault","_handleOpenChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_c","_i","_t","_c2","_i2","_t2","wrap","_callee$","_context2","prev","next","emit","cancelable","defaultPrevented","abrupt","stopAnimations","getAnimation","dir","animateTo","keyframes","options","shimKeyframesHeightAuto","scrollHeight","stop","handleOpenChange","apply","arguments","_show","_callee2","_callee2$","_context3","waitForEvent","_hide","_callee3","_callee3$","_context4","render","html","_templateObject","_taggedTemplateLiteral","classMap","details","summary","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","watch","waitUntilFirstUpdate","customElement","setDefaultAnimation","opacity","duration","easing"],"mappings":"28YAyBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEA6BYC,EAAAA,KAAAA,CAAOC,OAAU,CAAA,CAAA,CAAA,CAWQD,KAAAA,CAAIE,IAAAA,CAAAA,CAAG,CAMPF,CAAAA,KAAAA,CAAQG,QAAG,CAAA,CAAA,CA6ItD,QAAAC,KAAA,EA3IDC,SAAA,CAAAN,CAAA,CAAAD,EAAA,SAAAQ,YAAA,CAAAP,CAAA,GAAAQ,GAAA,gBAAAC,KAAA,UAAAC,aAAA,CACET,CAAAA,IAAAA,CAAKU,IAAKC,CAAAA,MAAAA,CAAAA,CAAUX,IAAKE,CAAAA,IAAAA,CACzBF,IAAKU,CAAAA,IAAAA,CAAKE,KAAMC,CAAAA,MAAAA,CAASb,IAAKE,CAAAA,IAAAA,CAAO,MAAS,CAAA,GAC/C,EAEO,GAAAK,GAAA,sBAAAC,KAAA,UAAAM,mBAAA,EACDd,IAAKG,CAAAA,QAAAA,GACJH,IAAKE,CAAAA,IAAAA,CACPF,IAAKe,CAAAA,IAAAA,CAAAA,CAAAA,CAELf,IAAKgB,CAAAA,IAAAA,CAAAA,CAAAA,CAGPhB,IAAKiB,CAAAA,MAAAA,CAAOC,KAEf,CAAA,CAAA,CAAA,EAEO,GAAAX,GAAA,wBAAAC,KAAA,UAAAW,qBAAqBC,CACT,CAAA,CAAA,OAAA,GAAdA,CAAMb,CAAAA,GAAAA,EAAiC,GAAda,GAAAA,CAAAA,CAAMb,GACjCa,GAAAA,CAAAA,CAAMC,cAEFrB,CAAAA,CAAAA,CAAAA,IAAAA,CAAKE,IACPF,CAAAA,IAAAA,CAAKe,IAELf,CAAAA,CAAAA,CAAAA,IAAAA,CAAKgB,IAIS,CAAA,CAAA,CAAA,CAAA,SAAA,GAAdI,CAAMb,CAAAA,GAAAA,EAAmC,WAAda,GAAAA,CA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s}from"./nile-accordion.css.esm.js";import{N as e}from"../internal/nile-element.esm.js";import{s as a,a as o,b as r}from"../internal/animate.esm.js";import{classMap as n}from"lit/directives/class-map.js";import{query as l,customElement as h}from"lit/decorators.js";import{s as d,g as m}from"../utilities/animation-registry.esm.js";import{w as c}from"../internal/event.esm.js";import{w as p}from"../internal/watch.esm.js";import{n as f}from"../property-09139d3c.esm.js";import"lit";let y=class extends e{constructor(){super(...arguments),this.open=!1,this.disabled=!1}firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0"}handleSummaryClick(){this.disabled||(this.open?this.hide():this.show(),this.header.focus())}handleSummaryKeyDown(i){"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==i.key&&"ArrowLeft"!==i.key||(i.preventDefault(),this.hide()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(i.preventDefault(),this.show())}async handleOpenChange(){if(this.open){if(this.emit("nile-show",{cancelable:!0}).defaultPrevented)return void(this.open=!1);await a(this.body),this.body.hidden=!1;const{keyframes:i,options:t}=m(this,"details.show",{dir:"ltr"});await o(this.body,r(i,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("nile-after-show")}else{if(this.emit("nile-hide",{cancelable:!0}).defaultPrevented)return void(this.open=!0);await a(this.body);const{keyframes:i,options:t}=m(this,"details.hide",{dir:"ltr"});await o(this.body,r(i,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("nile-after-hide")}}async show(){if(!this.open&&!this.disabled)return this.open=!0,c(this,"nile-after-show")}async hide(){if(this.open&&!this.disabled)return this.open=!1,c(this,"nile-after-hide")}render(){return t`
1
+ import{__decorate as i}from"tslib";import{x as t}from"../index-0a3007c5.esm.js";import{s}from"./nile-accordion.css.esm.js";import{N as e}from"../internal/nile-element.esm.js";import{s as a,a as o,b as r}from"../internal/animate.esm.js";import{classMap as n}from"lit/directives/class-map.js";import{query as l,customElement as h}from"lit/decorators.js";import{s as d,g as m}from"../utilities/animation-registry.esm.js";import{w as c}from"../internal/event.esm.js";import{w as p}from"../internal/watch.esm.js";import{n as f}from"../property-09139d3c.esm.js";import"lit";let y=class extends e{constructor(){super(...arguments),this.BUBBLES=!1,this.open=!1,this.disabled=!1}firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0"}handleSummaryClick(){this.disabled||(this.open?this.hide():this.show(),this.header.focus())}handleSummaryKeyDown(i){"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==i.key&&"ArrowLeft"!==i.key||(i.preventDefault(),this.hide()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(i.preventDefault(),this.show())}async handleOpenChange(){if(this.open){if(this.emit("nile-show",{cancelable:!0}).defaultPrevented)return void(this.open=!1);await a(this.body),this.body.hidden=!1;const{keyframes:i,options:t}=m(this,"details.show",{dir:"ltr"});await o(this.body,r(i,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("nile-after-show")}else{if(this.emit("nile-hide",{cancelable:!0}).defaultPrevented)return void(this.open=!0);await a(this.body);const{keyframes:i,options:t}=m(this,"details.hide",{dir:"ltr"});await o(this.body,r(i,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("nile-after-hide")}}async show(){if(!this.open&&!this.disabled)return this.open=!0,c(this,"nile-after-show")}async hide(){if(this.open&&!this.disabled)return this.open=!1,c(this,"nile-after-hide")}render(){return t`
2
2
  <div
3
3
  part="base"
4
4
  class=${n({details:!0,"details--open":this.open,"details--disabled":this.disabled,"details--rtl":!1})}
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-auto-complete.css.cjs.js","../internal/nile-element.cjs.js","../watch.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var e,t,i,s,n,o,l,h,r,_templateObject,_templateObject2,_templateObject3,a;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}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 asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.state;s=_litDecoratorsJs.query;n=_litDecoratorsJs.customElement;},function(_nileAutoCompleteCssCjsJs){o=_nileAutoCompleteCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_watchCjsJs){h=_watchCjsJs.w;},function(_property002CjsJs){r=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",a=/*#__PURE__*/function(_l){function a(){var _this;_classCallCheck(this,a);_this=_callSuper(this,a,arguments),_this.isDropdownOpen=!1,_this.openOnFocus=!1,_this.value="",_this.placeholder="Type here ..",_this.noBorder=!1,_this.menuItems=[],_this.allMenuItems=[];return _this;}_inherits(a,_l);return _createClass(a,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(a.prototype),"connectedCallback",this).call(this),this.menuItems=_toConsumableArray(this.allMenuItems);}},{key:"handleAllMenuItemsChange",value:function handleAllMenuItemsChange(){this.menuItems=_toConsumableArray(this.allMenuItems);}},{key:"handleValueChange",value:function(){var _handleValueChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _this2=this;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this.updateComplete;case 2:this.menuItems=this.allMenuItems.filter(function(e){var _this2$value;return e.toLowerCase().includes((_this2$value=_this2.value)===null||_this2$value===void 0?void 0:_this2$value.toLowerCase());});case 3:case"end":return _context2.stop();}},_callee,this);}));function handleValueChange(){return _handleValueChange.apply(this,arguments);}return handleValueChange;}()},{key:"handleSelect",value:function handleSelect(e){var _this$dropdownElement;this.value=e.detail.value,this.emit("nile-complete",{value:e.detail.value}),this.isDropdownOpen=!1,(_this$dropdownElement=this.dropdownElement)===null||_this$dropdownElement===void 0?void 0:_this$dropdownElement.hide();}},{key:"handleSearch",value:function handleSearch(e){var _this$dropdownElement2;var t=e.detail.value.toLowerCase();this.value=t,this.menuItems=this.allMenuItems.filter(function(e){return e===null||e===void 0?void 0:e.toLowerCase().includes(t);}),this.isDropdownOpen=this.menuItems.length>0,this.isDropdownOpen&&((_this$dropdownElement2=this.dropdownElement)===null||_this$dropdownElement2===void 0?void 0:_this$dropdownElement2.show());}},{key:"handleFocus",value:function handleFocus(){var _this3=this;this.openOnFocus&&setTimeout(function(){var _this3$dropdownElemen;_this3.isDropdownOpen=!0,(_this3$dropdownElemen=_this3.dropdownElement)===null||_this3$dropdownElemen===void 0?void 0:_this3$dropdownElemen.show();},300);}},{key:"handleClick",value:function handleClick(){var _this$dropdownElement3;this.isDropdownOpen=!0,(_this$dropdownElement3=this.dropdownElement)===null||_this$dropdownElement3===void 0?void 0:_this$dropdownElement3.show();}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-dropdown class=\"nile-dropdown--input\" ?open="," noOpenOnCLick>\n <nile-input class=\"nile-auto-complete--input\"\n ?no-border=","\n .value=","\n @nile-input=","\n @focus=","\n @click=","\n slot=\"trigger\"\n placeholder=","\n ></nile-input>\n ","\n </nile-dropdown>\n "])),this.isDropdownOpen,this.noBorder,this.value,this.handleSearch,this.handleFocus,this.handleClick,this.placeholder,this.menuItems.length>0?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-menu @nile-select="," exportparts=\"menu__items-wrapper:options__wrapper\">\n ","\n </nile-menu>\n "])),this.handleSelect,this.menuItems.map(function(e){return t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-menu-item value=",">","</nile-menu-item>\n "])),e,e);})):"");}}]);}(l));a.styles=o,e([r({type:Boolean})],a.prototype,"isDropdownOpen",void 0),e([r({type:Boolean})],a.prototype,"openOnFocus",void 0),e([r({type:String})],a.prototype,"value",void 0),e([r({type:String})],a.prototype,"placeholder",void 0),e([r({type:Boolean})],a.prototype,"noBorder",void 0),e([i()],a.prototype,"menuItems",void 0),e([r({type:Array})],a.prototype,"allMenuItems",void 0),e([s("nile-dropdown")],a.prototype,"dropdownElement",void 0),e([h("allMenuItems")],a.prototype,"handleAllMenuItemsChange",null),e([h("value",{waitUntilFirstUpdate:!0}),h("isDropdownOpen",{waitUntilFirstUpdate:!0})],a.prototype,"handleValueChange",null),_export("N",a=e([n("nile-auto-complete")],a));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-auto-complete.css.cjs.js","../internal/nile-element.cjs.js","../watch.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var e,t,i,s,n,o,l,h,r,_templateObject,_templateObject2,_templateObject3,a;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}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 asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.state;s=_litDecoratorsJs.query;n=_litDecoratorsJs.customElement;},function(_nileAutoCompleteCssCjsJs){o=_nileAutoCompleteCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_watchCjsJs){h=_watchCjsJs.w;},function(_property002CjsJs){r=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",a=/*#__PURE__*/function(_l){function a(){var _this;_classCallCheck(this,a);_this=_callSuper(this,a,arguments),_this.BUBBLES=!1,_this.isDropdownOpen=!1,_this.openOnFocus=!1,_this.value="",_this.placeholder="Type here ..",_this.noBorder=!1,_this.menuItems=[],_this.allMenuItems=[];return _this;}_inherits(a,_l);return _createClass(a,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(a.prototype),"connectedCallback",this).call(this),this.menuItems=_toConsumableArray(this.allMenuItems);}},{key:"handleAllMenuItemsChange",value:function handleAllMenuItemsChange(){this.menuItems=_toConsumableArray(this.allMenuItems);}},{key:"handleValueChange",value:function(){var _handleValueChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _this2=this;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this.updateComplete;case 2:this.menuItems=this.allMenuItems.filter(function(e){var _this2$value;return e.toLowerCase().includes((_this2$value=_this2.value)===null||_this2$value===void 0?void 0:_this2$value.toLowerCase());});case 3:case"end":return _context2.stop();}},_callee,this);}));function handleValueChange(){return _handleValueChange.apply(this,arguments);}return handleValueChange;}()},{key:"handleSelect",value:function handleSelect(e){var _this$dropdownElement;this.value=e.detail.value,this.emit("nile-complete",{value:e.detail.value}),this.isDropdownOpen=!1,(_this$dropdownElement=this.dropdownElement)===null||_this$dropdownElement===void 0?void 0:_this$dropdownElement.hide();}},{key:"handleSearch",value:function handleSearch(e){var _this$dropdownElement2;var t=e.detail.value.toLowerCase();this.value=t,this.menuItems=this.allMenuItems.filter(function(e){return e===null||e===void 0?void 0:e.toLowerCase().includes(t);}),this.isDropdownOpen=this.menuItems.length>0,this.isDropdownOpen&&((_this$dropdownElement2=this.dropdownElement)===null||_this$dropdownElement2===void 0?void 0:_this$dropdownElement2.show());}},{key:"handleFocus",value:function handleFocus(){var _this3=this;this.openOnFocus&&setTimeout(function(){var _this3$dropdownElemen;_this3.isDropdownOpen=!0,(_this3$dropdownElemen=_this3.dropdownElement)===null||_this3$dropdownElemen===void 0?void 0:_this3$dropdownElemen.show();},300);}},{key:"handleClick",value:function handleClick(){var _this$dropdownElement3;this.isDropdownOpen=!0,(_this$dropdownElement3=this.dropdownElement)===null||_this$dropdownElement3===void 0?void 0:_this$dropdownElement3.show();}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-dropdown class=\"nile-dropdown--input\" ?open="," noOpenOnCLick>\n <nile-input class=\"nile-auto-complete--input\"\n ?no-border=","\n .value=","\n @nile-input=","\n @focus=","\n @click=","\n slot=\"trigger\"\n placeholder=","\n ></nile-input>\n ","\n </nile-dropdown>\n "])),this.isDropdownOpen,this.noBorder,this.value,this.handleSearch,this.handleFocus,this.handleClick,this.placeholder,this.menuItems.length>0?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-menu @nile-select="," exportparts=\"menu__items-wrapper:options__wrapper\">\n ","\n </nile-menu>\n "])),this.handleSelect,this.menuItems.map(function(e){return t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-menu-item value=",">","</nile-menu-item>\n "])),e,e);})):"");}}]);}(l));a.styles=o,e([r({type:Boolean})],a.prototype,"isDropdownOpen",void 0),e([r({type:Boolean})],a.prototype,"openOnFocus",void 0),e([r({type:String})],a.prototype,"value",void 0),e([r({type:String})],a.prototype,"placeholder",void 0),e([r({type:Boolean})],a.prototype,"noBorder",void 0),e([i()],a.prototype,"menuItems",void 0),e([r({type:Array})],a.prototype,"allMenuItems",void 0),e([s("nile-dropdown")],a.prototype,"dropdownElement",void 0),e([h("allMenuItems")],a.prototype,"handleAllMenuItemsChange",null),e([h("value",{waitUntilFirstUpdate:!0}),h("isDropdownOpen",{waitUntilFirstUpdate:!0})],a.prototype,"handleValueChange",null),_export("N",a=e([n("nile-auto-complete")],a));}};});
2
2
  //# sourceMappingURL=nile-auto-complete.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-auto-complete.cjs.js","sources":["../../../src/nile-auto-complete/nile-auto-complete.ts"],"sourcesContent":["import {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-auto-complete.css';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../watch';\nimport type { CSSResultGroup } from 'lit';\n\n// Define the custom element 'nile-auto-complete'\n@customElement('nile-auto-complete')\nexport class NileAutoComplete extends NileElement {\n\n static styles: CSSResultGroup = styles;\n\n // Define component properties\n @property({ type: Boolean }) isDropdownOpen: boolean = false;\n\n @property({ type: Boolean }) openOnFocus: boolean = false;\n\n @property({ type: String }) value: string = '';\n\n @property({ type: String }) placeholder: string = 'Type here ..';\n\n @property({ type: Boolean }) noBorder: boolean = false;\n\n @state() menuItems: any = [];\n\n @property({ type: Array }) allMenuItems: any = [];\n\n @query('nile-dropdown') dropdownElement: any;\n\n connectedCallback() {\n super.connectedCallback();\n this.menuItems = [...this.allMenuItems];\n }\n\n // Watch for changes in 'allMenuItems' property\n @watch('allMenuItems')\n handleAllMenuItemsChange() {\n this.menuItems = [...this.allMenuItems];\n }\n\n // Watch for changes in 'value' and 'isDropdownOpen' properties\n @watch('value', { waitUntilFirstUpdate: true })\n\n @watch('isDropdownOpen', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n // Filter menu items based on the search value\n this.menuItems = this.allMenuItems.filter((item: string) =>\n item.toLowerCase().includes(this.value?.toLowerCase())\n );\n }\n\n private handleSelect(event: CustomEvent) {\n this.value = event.detail.value;\n this.emit('nile-complete', { value: event.detail.value });\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n }\n\n private handleSearch(event: CustomEvent) {\n const searchValue = event.detail.value.toLowerCase();\n this.value = searchValue;\n\n // Filter menu items based on the search value\n this.menuItems = this.allMenuItems.filter((item: string) =>\n item?.toLowerCase().includes(searchValue)\n );\n\n this.isDropdownOpen = this.menuItems.length > 0;\n if (this.isDropdownOpen) this.dropdownElement?.show();\n }\n\n public handleFocus() {\n if (!this.openOnFocus) {\n return;\n }\n\n // Delay opening the dropdown to allow focus to take effect\n setTimeout(() => {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n }, 300);\n }\n\n private handleClick() {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n }\n\n public render(): TemplateResult {\n return html`\n <nile-dropdown class=\"nile-dropdown--input\" ?open=${this.isDropdownOpen} noOpenOnCLick>\n <nile-input class=\"nile-auto-complete--input\"\n ?no-border=${this.noBorder}\n .value=${this.value}\n @nile-input=${this.handleSearch}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n slot=\"trigger\"\n placeholder=${this.placeholder}\n ></nile-input>\n ${this.menuItems.length > 0\n ? html`\n <nile-menu @nile-select=${this.handleSelect} exportparts=\"menu__items-wrapper:options__wrapper\">\n ${this.menuItems.map(\n (item: unknown) => html`\n <nile-menu-item value=${item}>${item}</nile-menu-item>\n `\n )}\n </nile-menu>\n `\n : ''}\n </nile-dropdown>\n `;\n }\n}\n\nexport default NileAutoComplete;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-auto-complete': NileAutoComplete;\n }\n}\n"],"names":["NileAutoComplete","_l","a","this","isDropdownOpen","openOnFocus","value","placeholder","noBorder","menuItems","allMenuItems","_this","_inherits","_createClass","key","connectedCallback","super","handleAllMenuItemsChange","_toConsumableArray","_handleValueChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_this2","wrap","_callee$","_context2","prev","next","updateComplete","filter","item","toLowerCase","includes","stop","handleValueChange","apply","arguments","handleSelect","event","detail","emit","_this$dropdownElement","dropdownElement","hide","handleSearch","_this$dropdownElement2","searchValue","length","show","handleFocus","setTimeout","_this3$dropdownElemen","handleClick","_this$dropdownElement3","render","html","_templateObject","_taggedTemplateLiteral","_templateObject2","map","_templateObject3","NileElement","styles","__decorate","property","type","Boolean","prototype","String","state","Array","query","watch","waitUntilFirstUpdate","_export","customElement"],"mappings":"smbAeaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEAKwBC,KAAAA,CAAcC,cAAAA,CAAAA,CAAY,EAE1BD,KAAAA,CAAWE,WAAAA,CAAAA,CAAY,CAExBF,CAAAA,KAAAA,CAAKG,MAAW,EAEhBH,CAAAA,KAA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gBiE,CAAA,CAAA,CAD5BY,CAAc,CAAA,oBAAA,CAAA,CAAA,CACF7E"}
1
+ {"version":3,"file":"nile-auto-complete.cjs.js","sources":["../../../src/nile-auto-complete/nile-auto-complete.ts"],"sourcesContent":["import {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-auto-complete.css';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../watch';\nimport type { CSSResultGroup } from 'lit';\n\n// Define the custom element 'nile-auto-complete'\n@customElement('nile-auto-complete')\nexport class NileAutoComplete extends NileElement {\n\n static styles: CSSResultGroup = styles;\n \n protected override BUBBLES: boolean=false;\n\n // Define component properties\n @property({ type: Boolean }) isDropdownOpen: boolean = false;\n\n @property({ type: Boolean }) openOnFocus: boolean = false;\n\n @property({ type: String }) value: string = '';\n\n @property({ type: String }) placeholder: string = 'Type here ..';\n\n @property({ type: Boolean }) noBorder: boolean = false;\n\n @state() menuItems: any = [];\n\n @property({ type: Array }) allMenuItems: any = [];\n\n @query('nile-dropdown') dropdownElement: any;\n\n connectedCallback() {\n super.connectedCallback();\n this.menuItems = [...this.allMenuItems];\n }\n\n // Watch for changes in 'allMenuItems' property\n @watch('allMenuItems')\n handleAllMenuItemsChange() {\n this.menuItems = [...this.allMenuItems];\n }\n\n // Watch for changes in 'value' and 'isDropdownOpen' properties\n @watch('value', { waitUntilFirstUpdate: true })\n\n @watch('isDropdownOpen', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n // Filter menu items based on the search value\n this.menuItems = this.allMenuItems.filter((item: string) =>\n item.toLowerCase().includes(this.value?.toLowerCase())\n );\n }\n\n private handleSelect(event: CustomEvent) {\n this.value = event.detail.value;\n this.emit('nile-complete', { value: event.detail.value });\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n }\n\n private handleSearch(event: CustomEvent) {\n const searchValue = event.detail.value.toLowerCase();\n this.value = searchValue;\n\n // Filter menu items based on the search value\n this.menuItems = this.allMenuItems.filter((item: string) =>\n item?.toLowerCase().includes(searchValue)\n );\n\n this.isDropdownOpen = this.menuItems.length > 0;\n if (this.isDropdownOpen) this.dropdownElement?.show();\n }\n\n public handleFocus() {\n if (!this.openOnFocus) {\n return;\n }\n\n // Delay opening the dropdown to allow focus to take effect\n setTimeout(() => {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n }, 300);\n }\n\n private handleClick() {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n }\n\n public render(): TemplateResult {\n return html`\n <nile-dropdown class=\"nile-dropdown--input\" ?open=${this.isDropdownOpen} noOpenOnCLick>\n <nile-input class=\"nile-auto-complete--input\"\n ?no-border=${this.noBorder}\n .value=${this.value}\n @nile-input=${this.handleSearch}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n slot=\"trigger\"\n placeholder=${this.placeholder}\n ></nile-input>\n ${this.menuItems.length > 0\n ? html`\n <nile-menu @nile-select=${this.handleSelect} exportparts=\"menu__items-wrapper:options__wrapper\">\n ${this.menuItems.map(\n (item: any) => html`\n <nile-menu-item value=${item}>${item}</nile-menu-item>\n `\n )}\n </nile-menu>\n `\n : ''}\n </nile-dropdown>\n `;\n }\n}\n\nexport default NileAutoComplete;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-auto-complete': NileAutoComplete;\n }\n}\n"],"names":["NileAutoComplete","_l","a","this","BUBBLES","isDropdownOpen","openOnFocus","value","placeholder","noBorder","menuItems","allMenuItems","_this","_inherits","_createClass","key","connectedCallback","super","_toConsumableArray","handleAllMenuItemsChange","_handleValueChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_this2","wrap","_callee$","_context2","prev","next","updateComplete","filter","item","toLowerCase","includes","stop","handleValueChange","apply","arguments","handleSelect","event","detail","emit","dropdownElement","hide","handleSearch","searchValue","length","show","handleFocus","setTimeout","_this3$dropdownElemen","handleClick","_this$dropdownElement3","render","html","_templateObject","_taggedTemplateLiteral","_templateObject2","map","_templateObject3","NileElement","styles","__decorate","property","type","Boolean","prototype","String","state","Array","query","watch","waitUntilFirstUpdate","_export","customElement"],"mappings":"smbAeaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEAIcC,KAAAA,CAAOC,OAAU,CAAA,CAAA,CAAA,CAGPD,KAAAA,CAAcE,cAAY,CAAA,CAAA,CAAA,CAE1BF,KAAAA,CAAWG,WAAAA,CAAAA,CAAY,EAExBH,KAAAA,CAAKI,KAAAA,CAAW,GAEhBJ,KAAAA,CAAWK,WAAAA,CAAW,eAErBL,KAAAA,CAAQM,QAAAA,CAAAA,CAAY,CAExCN,CAAAA,KAAAA,CAASO,UAAQ,EAECP,CAAAA,KAAAA,CAAYQ,YAAQ,CAAA,EA0FhD,QAAAC,KAAA,EAtFCC,SAAA,CAAAX,CAAA,CAAAD,EAAA,SAAAa,YAAA,CAAAZ,CAAA,GAAAa,GAAA,qBAAAR,KAAA,UAAAS,kBAAA,CAAAA,CACEC,IAAAA,CAAAA,eAAAA,CAAAA,CAAAA,CAAAA,SAAAA,4BAAAA,IAAAA,OACAd,KAAKO,SAAY,CAAAQ,kBAAA,CAAIf,KAAKQ,YAC3B,CAAA,EAID,GAAAI,GAAA,4BAAAR,KAAA,UAAAY,yBAAA,CACEhB,CAAAA,IAAAA,CAAKO,SAAY,CAAAQ,kBAAA,CAAIf,KAAKQ,YAC3B,CAAA,EAMK,GAAAI,GAAA,qBAAAR,KAAA,gBAAAa,kBAAA,CAAAC,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,UAAAC,QAAA,MAAAC,MAAA,aAAAH,mBAAA,GAAAI,IAAA,UAAAC,SAAAC,SAAA,iBAAAA,SAAA,CAAAC,IAAA,CAAAD,SAAA,CAAAE,IAAA,SAAAF,SAAA,CAAAE,IAAA,SACE3B,KAAAA,CAAK4B,sBAEX5B,IAAKO,CAAAA,SAAAA,CAAYP,IAAKQ,CAAAA,YAAAA,CAAaqB,OAAQC,SAAAA,C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AAAA,SAAAA,CAAA,0BAAA,CAAA,IAAA,CAAA,CAMKJ,CAAA,CAAA,CAHLS,EAAM,OAAS,CAAA,CAAEC,oBAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAEvCD,CAAM,CAAA,gBAAA,CAAkB,CAAEC,oBAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAOhD1E,CAAAoE,CAAAA,SAAAA,CAAA,mBAAA,CAAA,IAAA,CAAA,CAAAO,OAAA,KA5CU3E,EAAgBgE,CAAA,CAAA,CAD5BY,CAAc,CAAA,oBAAA,CAAA,CAAA,CACF5E"}
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"tslib";import{x as t}from"../index-0a3007c5.esm.js";import{state as i,query as s,customElement as n}from"lit/decorators.js";import{s as o}from"./nile-auto-complete.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";import{w as h}from"../watch.esm.js";import{n as r}from"../property-09139d3c.esm.js";import"lit";let a=class extends l{constructor(){super(...arguments),this.isDropdownOpen=!1,this.openOnFocus=!1,this.value="",this.placeholder="Type here ..",this.noBorder=!1,this.menuItems=[],this.allMenuItems=[]}connectedCallback(){super.connectedCallback(),this.menuItems=[...this.allMenuItems]}handleAllMenuItemsChange(){this.menuItems=[...this.allMenuItems]}async handleValueChange(){await this.updateComplete,this.menuItems=this.allMenuItems.filter((e=>e.toLowerCase().includes(this.value?.toLowerCase())))}handleSelect(e){this.value=e.detail.value,this.emit("nile-complete",{value:e.detail.value}),this.isDropdownOpen=!1,this.dropdownElement?.hide()}handleSearch(e){const t=e.detail.value.toLowerCase();this.value=t,this.menuItems=this.allMenuItems.filter((e=>e?.toLowerCase().includes(t))),this.isDropdownOpen=this.menuItems.length>0,this.isDropdownOpen&&this.dropdownElement?.show()}handleFocus(){this.openOnFocus&&setTimeout((()=>{this.isDropdownOpen=!0,this.dropdownElement?.show()}),300)}handleClick(){this.isDropdownOpen=!0,this.dropdownElement?.show()}render(){return t`
1
+ import{__decorate as e}from"tslib";import{x as t}from"../index-0a3007c5.esm.js";import{state as i,query as s,customElement as n}from"lit/decorators.js";import{s as o}from"./nile-auto-complete.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";import{w as h}from"../watch.esm.js";import{n as r}from"../property-09139d3c.esm.js";import"lit";let a=class extends l{constructor(){super(...arguments),this.BUBBLES=!1,this.isDropdownOpen=!1,this.openOnFocus=!1,this.value="",this.placeholder="Type here ..",this.noBorder=!1,this.menuItems=[],this.allMenuItems=[]}connectedCallback(){super.connectedCallback(),this.menuItems=[...this.allMenuItems]}handleAllMenuItemsChange(){this.menuItems=[...this.allMenuItems]}async handleValueChange(){await this.updateComplete,this.menuItems=this.allMenuItems.filter((e=>e.toLowerCase().includes(this.value?.toLowerCase())))}handleSelect(e){this.value=e.detail.value,this.emit("nile-complete",{value:e.detail.value}),this.isDropdownOpen=!1,this.dropdownElement?.hide()}handleSearch(e){const t=e.detail.value.toLowerCase();this.value=t,this.menuItems=this.allMenuItems.filter((e=>e?.toLowerCase().includes(t))),this.isDropdownOpen=this.menuItems.length>0,this.isDropdownOpen&&this.dropdownElement?.show()}handleFocus(){this.openOnFocus&&setTimeout((()=>{this.isDropdownOpen=!0,this.dropdownElement?.show()}),300)}handleClick(){this.isDropdownOpen=!0,this.dropdownElement?.show()}render(){return t`
2
2
  <nile-dropdown class="nile-dropdown--input" ?open=${this.isDropdownOpen} noOpenOnCLick>
3
3
  <nile-input class="nile-auto-complete--input"
4
4
  ?no-border=${this.noBorder}
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","lit/directives/class-map.js","./nile-avatar.css.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var t,r,a,e,i,s,l,o,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,n;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){r=_index001CjsJs.x;},function(_litDecoratorsJs){a=_litDecoratorsJs.state;e=_litDecoratorsJs.customElement;},function(_litDirectivesClassMapJs){i=_litDirectivesClassMapJs.classMap;},function(_nileAvatarCssCjsJs){s=_nileAvatarCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_property002CjsJs){o=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",n=/*#__PURE__*/function(_l){function n(){var _this;_classCallCheck(this,n);_this=_callSuper(this,n,arguments),_this.src="",_this.name="",_this.bgColor="",_this.textColor="#fff",_this.borderColor="rgba(0, 0, 0, 0.08)",_this.size="medium",_this.isRounded=!1,_this.isDefaultAvatar=!0,_this.defaultAvatarContent=r(_templateObject||(_templateObject=_taggedTemplateLiteral([""])));return _this;}_inherits(n,_l);return _createClass(n,[{key:"generateInitials",value:function generateInitials(t){if(!t)return"";var r=t.split(" ").filter(function(t){return t.length>0;}).map(function(t){return t.charAt(0).toUpperCase();}).slice(0,2);return r.length>1?r[0]+r[1]:r[0];}},{key:"generateVariantCode",value:function generateVariantCode(t){var r=t.charCodeAt(0),a=1==t.length?r:t.charCodeAt(1);return(r*a+r%23+a%23)%5;}},{key:"getDefaultIconSize",value:function getDefaultIconSize(){switch(this.size){case"small":return"10";case"medium":default:return"16";case"large":return"20";case"extralarge":return"24";case"2xl":return"28";}}},{key:"handleImageError",value:function handleImageError(t){var a=this.generateInitials(this.name),e=this.generateVariantCode(a);this.defaultAvatarContent=r(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div\n class=","\n style=\"background-color: ",";color:",";border: 0.5px solid ",";\n border-color:","\"\n >\n ","\n </div>"])),i({text__avatar:!0,avatar__small:"small"===this.size,avatar__medium:"medium"===this.size,avatar__large:"large"===this.size,avatar__extralarge:"extralarge"===this.size,avatar__2xl:"2xl"===this.size,avatar__rounded:this.isRounded,variant__orange:0===e&&!this.bgColor,variant__pink:1===e&&!this.bgColor,variant__blue:2===e&&!this.bgColor,variant__light_blue:3===e&&!this.bgColor,variant__green:4===e&&!this.bgColor}),this.bgColor,this.textColor,this.borderColor,a?"rgba(0, 0, 0, 0.08)":"#C7CED4",a||r(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-icon\n name=\"user\"\n color=\"grey\"\n part=\"error__icon\"\n size=\"","\"\n ></nile-icon>"])),this.getDefaultIconSize())),this.isDefaultAvatar=!1;}},{key:"render",value:function render(){return r(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n ","\n "])),this.isDefaultAvatar?r(_templateObject5||(_templateObject5=_taggedTemplateLiteral([" <img\n src=\"","\"\n class=\"avatar\"\n class=","\n style=\"\tbackground-image: url(","), linear-gradient(lightgray, lightgray);\"\n @error=\"","\"\n />"])),this.src,i({avatar:!0,avatar__small:"small"===this.size,avatar__medium:"medium"===this.size,avatar__large:"large"===this.size,avatar__extralarge:"extralarge"===this.size,avatar__2xl:"2xl"===this.size,avatar__rounded:this.isRounded}),this.src,this.handleImageError):r(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["",""])),this.defaultAvatarContent));}}],[{key:"styles",get:function get(){return[s];}}]);}(l));t([o({type:String,reflect:!0})],n.prototype,"src",void 0),t([o({type:String,reflect:!0})],n.prototype,"name",void 0),t([o({type:String,reflect:!0,attribute:"bg-color"})],n.prototype,"bgColor",void 0),t([o({type:String,reflect:!0,attribute:"text-color"})],n.prototype,"textColor",void 0),t([o({type:String,reflect:!0,attribute:"border-color"})],n.prototype,"borderColor",void 0),t([o({reflect:!0})],n.prototype,"size",void 0),t([o({type:Boolean,reflect:!0})],n.prototype,"isRounded",void 0),t([a()],n.prototype,"isDefaultAvatar",void 0),t([a()],n.prototype,"defaultAvatarContent",void 0),_export("N",n=t([e("nile-avatar")],n));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","lit/directives/class-map.js","./nile-avatar.css.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var t,r,a,e,i,s,l,o,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,n;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){r=_index001CjsJs.x;},function(_litDecoratorsJs){a=_litDecoratorsJs.state;e=_litDecoratorsJs.customElement;},function(_litDirectivesClassMapJs){i=_litDirectivesClassMapJs.classMap;},function(_nileAvatarCssCjsJs){s=_nileAvatarCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_property002CjsJs){o=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",n=/*#__PURE__*/function(_l){function n(){var _this;_classCallCheck(this,n);_this=_callSuper(this,n,arguments),_this.BUBBLES=!1,_this.src="",_this.name="",_this.bgColor="",_this.textColor="#fff",_this.borderColor="rgba(0, 0, 0, 0.08)",_this.size="medium",_this.isRounded=!1,_this.isDefaultAvatar=!0,_this.defaultAvatarContent=r(_templateObject||(_templateObject=_taggedTemplateLiteral([""])));return _this;}_inherits(n,_l);return _createClass(n,[{key:"generateInitials",value:function generateInitials(t){if(!t)return"";var r=t.split(" ").filter(function(t){return t.length>0;}).map(function(t){return t.charAt(0).toUpperCase();}).slice(0,2);return r.length>1?r[0]+r[1]:r[0];}},{key:"generateVariantCode",value:function generateVariantCode(t){var r=t.charCodeAt(0),a=1==t.length?r:t.charCodeAt(1);return(r*a+r%23+a%23)%5;}},{key:"getDefaultIconSize",value:function getDefaultIconSize(){switch(this.size){case"small":return"10";case"medium":default:return"16";case"large":return"20";case"extralarge":return"24";case"2xl":return"28";}}},{key:"handleImageError",value:function handleImageError(t){var a=this.generateInitials(this.name),e=this.generateVariantCode(a);this.defaultAvatarContent=r(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div\n class=","\n style=\"background-color: ",";color:",";border: 0.5px solid ",";\n border-color:","\"\n >\n ","\n </div>"])),i({text__avatar:!0,avatar__small:"small"===this.size,avatar__medium:"medium"===this.size,avatar__large:"large"===this.size,avatar__extralarge:"extralarge"===this.size,avatar__2xl:"2xl"===this.size,avatar__rounded:this.isRounded,variant__orange:0===e&&!this.bgColor,variant__pink:1===e&&!this.bgColor,variant__blue:2===e&&!this.bgColor,variant__light_blue:3===e&&!this.bgColor,variant__green:4===e&&!this.bgColor}),this.bgColor,this.textColor,this.borderColor,a?"rgba(0, 0, 0, 0.08)":"#C7CED4",a||r(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-icon\n name=\"user\"\n color=\"grey\"\n part=\"error__icon\"\n size=\"","\"\n ></nile-icon>"])),this.getDefaultIconSize())),this.isDefaultAvatar=!1;}},{key:"render",value:function render(){return r(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n ","\n "])),this.isDefaultAvatar?r(_templateObject5||(_templateObject5=_taggedTemplateLiteral([" <img\n src=\"","\"\n class=\"avatar\"\n class=","\n style=\"\tbackground-image: url(","), linear-gradient(lightgray, lightgray);\"\n @error=\"","\"\n />"])),this.src,i({avatar:!0,avatar__small:"small"===this.size,avatar__medium:"medium"===this.size,avatar__large:"large"===this.size,avatar__extralarge:"extralarge"===this.size,avatar__2xl:"2xl"===this.size,avatar__rounded:this.isRounded}),this.src,this.handleImageError):r(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["",""])),this.defaultAvatarContent));}}],[{key:"styles",get:function get(){return[s];}}]);}(l));t([o({type:String,reflect:!0})],n.prototype,"src",void 0),t([o({type:String,reflect:!0})],n.prototype,"name",void 0),t([o({type:String,reflect:!0,attribute:"bg-color"})],n.prototype,"bgColor",void 0),t([o({type:String,reflect:!0,attribute:"text-color"})],n.prototype,"textColor",void 0),t([o({type:String,reflect:!0,attribute:"border-color"})],n.prototype,"borderColor",void 0),t([o({reflect:!0})],n.prototype,"size",void 0),t([o({type:Boolean,reflect:!0})],n.prototype,"isRounded",void 0),t([a()],n.prototype,"isDefaultAvatar",void 0),t([a()],n.prototype,"defaultAvatarContent",void 0),_export("N",n=t([e("nile-avatar")],n));}};});
2
2
  //# sourceMappingURL=nile-avatar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-avatar.cjs.js","sources":["../../../src/nile-avatar/nile-avatar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { styles } from './nile-avatar.css';\nimport NileElement from '../internal/nile-element';\nimport { string } from '../nile-icon/icons/svg';\n\n/**\n * Nile icon component.\n *\n * @tag nile-avatar\n *\n */\n@customElement('nile-avatar')\nexport class NileAvatar extends NileElement {\n /**\n * The styles for Avatar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /** Gives the url to the Avatar */\n @property({ type: String, reflect: true }) src = '';\n\n /** Gives the default Image Letters to the Avatar */\n @property({ type: String, reflect: true }) name = '';\n\n /** Gives the default bg color to the Avatar */\n @property({ type: String, reflect: true, attribute: 'bg-color' }) bgColor =\n '';\n\n /** Gives the default text color to the Avatar */\n @property({ type: String, reflect: true, attribute: 'text-color' })\n textColor = '#fff';\n\n /** Gives the default border color to the Avatar */\n @property({ type: String, reflect: true, attribute: 'border-color' })\n borderColor = 'rgba(0, 0, 0, 0.08)';\n\n /** Size of the Avatar */\n @property({ reflect: true }) size:\n | 'small'\n | 'medium'\n | 'large'\n | 'extralarge'\n | '2xl' = 'medium';\n\n /** Gives a border radius of 50% to the Avatar */\n @property({ type: Boolean, reflect: true }) isRounded = false;\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n @state() private isDefaultAvatar = true;\n\n @state() private defaultAvatarContent = html``;\n\n private generateInitials(name: String): string {\n if (!name) {\n return '';\n }\n const nameParts = name\n .split(' ')\n .filter(part => part.length > 0)\n .map(part => part.charAt(0).toUpperCase())\n .slice(0, 2);\n return nameParts.length > 1 ? nameParts[0] + nameParts[1] : nameParts[0];\n }\n\n private generateVariantCode(initials: string): number {\n const char1 = initials.charCodeAt(0);\n const char2 = initials.length == 1 ? char1 : initials.charCodeAt(1);\n const multifactor = char1 * char2 + (char1 % 23) + (char2 % 23);\n return multifactor % 5;\n }\n\n private getDefaultIconSize() {\n switch (this.size) {\n case 'small':\n return '10';\n case 'medium':\n return '16';\n case 'large':\n return '20';\n case 'extralarge':\n return '24';\n case '2xl':\n return '28';\n default:\n return '16';\n }\n }\n\n private handleImageError(event: Event): void {\n const defaultInitials = this.generateInitials(this.name);\n const variant__code = this.generateVariantCode(defaultInitials);\n\n this.defaultAvatarContent = html`<div\n class=${classMap({\n text__avatar: true,\n avatar__small: this.size === 'small',\n avatar__medium: this.size === 'medium',\n avatar__large: this.size === 'large',\n avatar__extralarge: this.size === 'extralarge',\n avatar__2xl: this.size === '2xl',\n avatar__rounded: this.isRounded,\n variant__orange: variant__code === 0 && !this.bgColor,\n variant__pink: variant__code === 1 && !this.bgColor,\n variant__blue: variant__code === 2 && !this.bgColor,\n variant__light_blue: variant__code === 3 && !this.bgColor,\n variant__green: variant__code === 4 && !this.bgColor,\n })}\n style=\"background-color: ${this.bgColor};color:${this\n .textColor};border: 0.5px solid ${this.borderColor};\n border-color:${defaultInitials ? 'rgba(0, 0, 0, 0.08)' : '#C7CED4'}\"\n >\n ${defaultInitials\n ? defaultInitials\n : html`<nile-icon\n name=\"user\"\n color=\"grey\"\n part=\"error__icon\"\n size=\"${this.getDefaultIconSize()}\"\n ></nile-icon>`}\n </div>`;\n\n this.isDefaultAvatar = false;\n }\n\n public render(): TemplateResult {\n return html`\n ${this.isDefaultAvatar\n ? html` <img\n src=\"${this.src}\"\n class=\"avatar\"\n class=${classMap({\n avatar: true,\n avatar__small: this.size === 'small',\n avatar__medium: this.size === 'medium',\n avatar__large: this.size === 'large',\n avatar__extralarge: this.size === 'extralarge',\n avatar__2xl: this.size === '2xl',\n avatar__rounded: this.isRounded,\n })}\n style=\"\tbackground-image: url(${this\n .src}), linear-gradient(lightgray, lightgray);\"\n @error=\"${this.handleImageError}\"\n />`\n : html`${this.defaultAvatarContent}`}\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileAvatar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-avatar': NileAvatar;\n }\n}\n"],"names":["NileAvatar","_l","n","this","src","name","bgColor","textColor","borderColor","size","isRounded","isDefaultAvatar","defaultAvatarContent","html","_templateObject","_taggedTemplateLiteral","_this","_inherits","_createClass","key","value","generateInitials","nameParts","split","filter","part","length","map","charAt","toUpperCase","slice","generateVariantCode","initials","char1","charCodeAt","char2","getDefaultIconSize","handleImageError","event","defaultInitials","variant__code","_templateObject2","classMap","text__avatar","avatar__small","avatar__medium","avatar__large","avatar__extralarge","avatar__2xl","avatar__rounded","variant__orange","variant__pink","variant__blue","variant__light_blue","variant__green","_templateObject3","render","_templateObject4","_templateObject5","avatar","_templateObject6","__decorate","get","styles","NileElement","property","type","String","reflect","prototype","attribute","Boolean","state","_export","customElement"],"mappings":"25HA4BaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEAUsCC,KAAAA,CAAGC,GAAAA,CAAG,GAGND,KAAAA,CAAIE,IAAAA,CAAG,EAGgBF,CAAAA,KAAAA,CAAOG,QACvE,EAIFH,CAAAA,KAAAA,CAASI,UAAG,MAIZJ,CAAAA,KAAAA,CAAWK,YAAG,qBAGeL,CAAAA,KAAAA,CAAIM,IAKrB,CAAA,QAAA,CAGgCN,KAAAA,CAASO,SAAG,CAAA,CAAA,CAAA,CAUvCP,KAAAA,CAAeQ,eAAAA,CAAAA,CAAG,EAElBR,KAAAA,CAAAS,oBAAAA,CAAuBC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,QAkG7C,QAAAC,KAAA,EA7IQC,SAAA,CAAAf,CAAA,CAAAD,EAAA,SAAAiB,YAAA,CAAAhB,CAAA,GAAAiB,GAAA,oBAAAC,KAAA,CA6CC,SAAAC,iBAAiBhB,CACvB,CAAA,CAAA,GAAA,CAAKA,EACH,MAAO,EAAA,CAET,GAAMiB,CAAAA,CAAAA,CAAYjB,EACfkB,KAAM,CAAA,GAAA,CAAA,CACNC,MAAOC,CAAAA,SAAAA,CAAAA,QAAQA,CAAAA,EAAKC,MAAS,CAAA,CAAA,EAAA,CAAA,CAC7BC,IAAIF,SAAAA,CAAQA,QAAAA,CAAAA,CAAAA,CAAKG,OAAO,CAAGC,CAAAA,CAAAA,WAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAC3BC,KAAM,CAAA,C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AME,UAAW,YACjCtE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqE,SAAA,CAAA,WAAA,CAAA,IAAA,EAInBR,CAAAA,CAAAA,CAAAA,CAAA,CADCI,CAAS,CAAA,CAAEC,IAAMC,CAAAA,MAAAA,CAAQC,OAAS,CAAA,CAAA,CAAA,CAAME,UAAW,cAChBtE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqE,SAAA,CAAA,aAAA,CAAA,IAAA,EAGPR,CAAAA,CAAAA,CAAAA,CAAA,CAA5BI,CAAS,CAAA,CAAEG,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAKApE,CAAAqE,CAAAA,SAAAA,CAAA,WAAA,EAGuBR,CAAAA,CAAAA,CAAAA,CAAA,CAA3CI,CAAAA,CAAS,CAAEC,IAAAA,CAAMK,QAASH,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0BpE,CAAAqE,CAAAA,SAAAA,CAAA,WAAA,CAAA,IAAA,EAAA,CAAA,CAUrDR,EAAA,CAARW,CAAAA,CAAAA,CAAAA,CAAAA,CAAuCxE,CAAAqE,CAAAA,SAAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAE/BR,EAAA,CAARW,CAAAA,CAAAA,CAAAA,CAAAA,CAA8CxE,CAAAqE,CAAAA,SAAAA,CAAA,sBAAA,CAAA,IAAA,EAAA,CAAA,CAAAI,OAAA,KAhDpCzE,EAAU6D,CAAA,CAAA,CADtBa,CAAc,CAAA,aAAA,CAAA,CAAA,CACF1E"}
1
+ {"version":3,"file":"nile-avatar.cjs.js","sources":["../../../src/nile-avatar/nile-avatar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { styles } from './nile-avatar.css';\nimport NileElement from '../internal/nile-element';\nimport { string } from '../nile-icon/icons/svg';\n\n/**\n * Nile icon component.\n *\n * @tag nile-avatar\n *\n */\n@customElement('nile-avatar')\nexport class NileAvatar extends NileElement {\n /**\n * The styles for Avatar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected override BUBBLES: boolean=false;\n\n /** Gives the url to the Avatar */\n @property({ type: String, reflect: true }) src = '';\n\n /** Gives the default Image Letters to the Avatar */\n @property({ type: String, reflect: true }) name = '';\n\n /** Gives the default bg color to the Avatar */\n @property({ type: String, reflect: true, attribute: 'bg-color' }) bgColor =\n '';\n\n /** Gives the default text color to the Avatar */\n @property({ type: String, reflect: true, attribute: 'text-color' })\n textColor = '#fff';\n\n /** Gives the default border color to the Avatar */\n @property({ type: String, reflect: true, attribute: 'border-color' })\n borderColor = 'rgba(0, 0, 0, 0.08)';\n\n /** Size of the Avatar */\n @property({ reflect: true }) size:\n | 'small'\n | 'medium'\n | 'large'\n | 'extralarge'\n | '2xl' = 'medium';\n\n /** Gives a border radius of 50% to the Avatar */\n @property({ type: Boolean, reflect: true }) isRounded = false;\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n @state() private isDefaultAvatar = true;\n\n @state() private defaultAvatarContent = html``;\n\n private generateInitials(name: String): string {\n if (!name) {\n return '';\n }\n const nameParts = name\n .split(' ')\n .filter(part => part.length > 0)\n .map(part => part.charAt(0).toUpperCase())\n .slice(0, 2);\n return nameParts.length > 1 ? nameParts[0] + nameParts[1] : nameParts[0];\n }\n\n private generateVariantCode(initials: string): number {\n const char1 = initials.charCodeAt(0);\n const char2 = initials.length == 1 ? char1 : initials.charCodeAt(1);\n const multifactor = char1 * char2 + (char1 % 23) + (char2 % 23);\n return multifactor % 5;\n }\n\n private getDefaultIconSize() {\n switch (this.size) {\n case 'small':\n return '10';\n case 'medium':\n return '16';\n case 'large':\n return '20';\n case 'extralarge':\n return '24';\n case '2xl':\n return '28';\n default:\n return '16';\n }\n }\n\n private handleImageError(event: Event): void {\n const defaultInitials = this.generateInitials(this.name);\n const variant__code = this.generateVariantCode(defaultInitials);\n\n this.defaultAvatarContent = html`<div\n class=${classMap({\n text__avatar: true,\n avatar__small: this.size === 'small',\n avatar__medium: this.size === 'medium',\n avatar__large: this.size === 'large',\n avatar__extralarge: this.size === 'extralarge',\n avatar__2xl: this.size === '2xl',\n avatar__rounded: this.isRounded,\n variant__orange: variant__code === 0 && !this.bgColor,\n variant__pink: variant__code === 1 && !this.bgColor,\n variant__blue: variant__code === 2 && !this.bgColor,\n variant__light_blue: variant__code === 3 && !this.bgColor,\n variant__green: variant__code === 4 && !this.bgColor,\n })}\n style=\"background-color: ${this.bgColor};color:${this\n .textColor};border: 0.5px solid ${this.borderColor};\n border-color:${defaultInitials ? 'rgba(0, 0, 0, 0.08)' : '#C7CED4'}\"\n >\n ${defaultInitials\n ? defaultInitials\n : html`<nile-icon\n name=\"user\"\n color=\"grey\"\n part=\"error__icon\"\n size=\"${this.getDefaultIconSize()}\"\n ></nile-icon>`}\n </div>`;\n\n this.isDefaultAvatar = false;\n }\n\n public render(): TemplateResult {\n return html`\n ${this.isDefaultAvatar\n ? html` <img\n src=\"${this.src}\"\n class=\"avatar\"\n class=${classMap({\n avatar: true,\n avatar__small: this.size === 'small',\n avatar__medium: this.size === 'medium',\n avatar__large: this.size === 'large',\n avatar__extralarge: this.size === 'extralarge',\n avatar__2xl: this.size === '2xl',\n avatar__rounded: this.isRounded,\n })}\n style=\"\tbackground-image: url(${this\n .src}), linear-gradient(lightgray, lightgray);\"\n @error=\"${this.handleImageError}\"\n />`\n : html`${this.defaultAvatarContent}`}\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileAvatar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-avatar': NileAvatar;\n }\n}\n"],"names":["NileAvatar","n","constructor","this","BUBBLES","src","name","bgColor","textColor","borderColor","size","isRounded","isDefaultAvatar","defaultAvatarContent","html","_templateObject","_taggedTemplateLiteral","_this","_inherits","_l","_createClass","key","value","generateInitials","nameParts","split","filter","part","length","map","charAt","toUpperCase","slice","generateVariantCode","initials","char1","charCodeAt","char2","getDefaultIconSize","handleImageError","event","defaultInitials","variant__code","_templateObject2","classMap","text__avatar","avatar__small","avatar__medium","avatar__large","avatar__extralarge","avatar__2xl","avatar__rounded","variant__orange","variant__pink","variant__blue","variant__light_blue","variant__green","_templateObject3","render","_templateObject4","_templateObject5","avatar","_templateObject6","__decorate","get","styles","NileElement","property","type","String","reflect","prototype","attribute","Boolean","state","_export","customElement"],"mappings":"25HA4BaA,4BAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,mCAScC,EAAAA,KAAAA,CAAOC,OAAU,CAAA,CAAA,CAAA,CAGOD,KAAAA,CAAGE,GAAG,CAAA,EAAA,CAGNF,KAAAA,CAAIG,IAAAA,CAAG,GAGgBH,KAAAA,CAAOI,OAAAA,CACvE,GAIFJ,KAAAA,CAASK,SAAAA,CAAG,OAIZL,KAAAA,CAAWM,WAAAA,CAAG,qBAGeN,CAAAA,KAAAA,CAAIO,KAKrB,QAGgCP,CAAAA,KAAAA,CAASQ,SAAG,CAAA,CAAA,CAAA,CAUvCR,KAAAA,CAAeS,eAAG,CAAA,CAAA,CAAA,CAElBT,KAAAA,CAAAU,oBAAAA,CAAuBC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,QAkG7C,QAAAC,KAAA,EA/IQC,SAAA,CAAAjB,CAAA,CAAAkB,EAAA,SAAAC,YAAA,CAAAnB,CAAA,GAAAoB,GAAA,oBAAAC,KAAA,CA+CC,SAAAC,iBAAiBjB,GACvB,GAAKA,CAAAA,CAAAA,CACH,MAAO,EAAA,CAET,GAAMkB,CAAAA,CAAYlB,CAAAA,CAA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ate as t}from"tslib";import{x as r}from"../index-0a3007c5.esm.js";import{state as e,customElement as a}from"lit/decorators.js";import{classMap as i}from"lit/directives/class-map.js";import{s}from"./nile-avatar.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";import{n as o}from"../property-09139d3c.esm.js";import"lit";let n=class extends l{constructor(){super(...arguments),this.src="",this.name="",this.bgColor="",this.textColor="#fff",this.borderColor="rgba(0, 0, 0, 0.08)",this.size="medium",this.isRounded=!1,this.isDefaultAvatar=!0,this.defaultAvatarContent=r``}static get styles(){return[s]}generateInitials(t){if(!t)return"";const r=t.split(" ").filter((t=>t.length>0)).map((t=>t.charAt(0).toUpperCase())).slice(0,2);return r.length>1?r[0]+r[1]:r[0]}generateVariantCode(t){const r=t.charCodeAt(0),e=1==t.length?r:t.charCodeAt(1);return(r*e+r%23+e%23)%5}getDefaultIconSize(){switch(this.size){case"small":return"10";case"medium":default:return"16";case"large":return"20";case"extralarge":return"24";case"2xl":return"28"}}handleImageError(t){const e=this.generateInitials(this.name),a=this.generateVariantCode(e);this.defaultAvatarContent=r`<div
1
+ import{__decorate as t}from"tslib";import{x as r}from"../index-0a3007c5.esm.js";import{state as e,customElement as a}from"lit/decorators.js";import{classMap as i}from"lit/directives/class-map.js";import{s}from"./nile-avatar.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";import{n as o}from"../property-09139d3c.esm.js";import"lit";let n=class extends l{constructor(){super(...arguments),this.BUBBLES=!1,this.src="",this.name="",this.bgColor="",this.textColor="#fff",this.borderColor="rgba(0, 0, 0, 0.08)",this.size="medium",this.isRounded=!1,this.isDefaultAvatar=!0,this.defaultAvatarContent=r``}static get styles(){return[s]}generateInitials(t){if(!t)return"";const r=t.split(" ").filter((t=>t.length>0)).map((t=>t.charAt(0).toUpperCase())).slice(0,2);return r.length>1?r[0]+r[1]:r[0]}generateVariantCode(t){const r=t.charCodeAt(0),e=1==t.length?r:t.charCodeAt(1);return(r*e+r%23+e%23)%5}getDefaultIconSize(){switch(this.size){case"small":return"10";case"medium":default:return"16";case"large":return"20";case"extralarge":return"24";case"2xl":return"28"}}handleImageError(t){const e=this.generateInitials(this.name),a=this.generateVariantCode(e);this.defaultAvatarContent=r`<div
2
2
  class=${i({text__avatar:!0,avatar__small:"small"===this.size,avatar__medium:"medium"===this.size,avatar__large:"large"===this.size,avatar__extralarge:"extralarge"===this.size,avatar__2xl:"2xl"===this.size,avatar__rounded:this.isRounded,variant__orange:0===a&&!this.bgColor,variant__pink:1===a&&!this.bgColor,variant__blue:2===a&&!this.bgColor,variant__light_blue:3===a&&!this.bgColor,variant__green:4===a&&!this.bgColor})}
3
3
  style="background-color: ${this.bgColor};color:${this.textColor};border: 0.5px solid ${this.borderColor};
4
4
  border-color:${e?"rgba(0, 0, 0, 0.08)":"#C7CED4"}"