@aquera/nile-elements 1.6.1 → 1.6.3

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 (741) hide show
  1. package/README.md +14 -0
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/index.esm.js +1 -1
  4. package/dist/index.js +1150 -624
  5. package/dist/internal/accessibility/a11y.custom-value.enum.cjs.js +2 -0
  6. package/dist/internal/accessibility/a11y.custom-value.enum.cjs.js.map +1 -0
  7. package/dist/internal/accessibility/a11y.custom-value.enum.esm.js +1 -0
  8. package/dist/internal/accessibility/a11y.property.enum.cjs.js +2 -0
  9. package/dist/internal/accessibility/a11y.property.enum.cjs.js.map +1 -0
  10. package/dist/internal/accessibility/a11y.property.enum.esm.js +1 -0
  11. package/dist/internal/accessibility/a11y.role.enum.cjs.js +2 -0
  12. package/dist/internal/accessibility/a11y.role.enum.cjs.js.map +1 -0
  13. package/dist/internal/accessibility/a11y.role.enum.esm.js +1 -0
  14. package/dist/internal/accessibility/a11y.state.enum.cjs.js +2 -0
  15. package/dist/internal/accessibility/a11y.state.enum.cjs.js.map +1 -0
  16. package/dist/internal/accessibility/a11y.state.enum.esm.js +1 -0
  17. package/dist/internal/accessibility/accessibility.const.cjs.js +2 -0
  18. package/dist/internal/accessibility/accessibility.const.cjs.js.map +1 -0
  19. package/dist/internal/accessibility/accessibility.const.esm.js +1 -0
  20. package/dist/internal/accessibility/role.enum.cjs.js +2 -0
  21. package/dist/internal/accessibility/role.enum.cjs.js.map +1 -0
  22. package/dist/internal/accessibility/role.enum.esm.js +1 -0
  23. package/dist/internal/enum.cjs.js +1 -1
  24. package/dist/internal/enum.cjs.js.map +1 -1
  25. package/dist/internal/enum.esm.js +1 -1
  26. package/dist/internal/nile-element.cjs.js +1 -1
  27. package/dist/internal/nile-element.cjs.js.map +1 -1
  28. package/dist/internal/nile-element.esm.js +1 -1
  29. package/dist/nile-accordion/index.cjs.js +1 -1
  30. package/dist/nile-accordion/index.esm.js +1 -1
  31. package/dist/nile-accordion/nile-accordion.cjs.js +1 -1
  32. package/dist/nile-accordion/nile-accordion.cjs.js.map +1 -1
  33. package/dist/nile-accordion/nile-accordion.esm.js +2 -2
  34. package/dist/nile-auto-complete/index.cjs.js +1 -1
  35. package/dist/nile-auto-complete/index.esm.js +1 -1
  36. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  37. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  38. package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
  39. package/dist/nile-avatar/index.cjs.js +1 -1
  40. package/dist/nile-avatar/index.esm.js +1 -1
  41. package/dist/nile-avatar/nile-avatar.cjs.js +1 -1
  42. package/dist/nile-avatar/nile-avatar.cjs.js.map +1 -1
  43. package/dist/nile-avatar/nile-avatar.esm.js +3 -1
  44. package/dist/nile-badge/index.cjs.js +1 -1
  45. package/dist/nile-badge/index.esm.js +1 -1
  46. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  47. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  48. package/dist/nile-badge/nile-badge.esm.js +2 -2
  49. package/dist/nile-breadcrumb/index.cjs.js +1 -1
  50. package/dist/nile-breadcrumb/index.esm.js +1 -1
  51. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js +1 -1
  52. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js.map +1 -1
  53. package/dist/nile-breadcrumb/nile-breadcrumb.esm.js +1 -1
  54. package/dist/nile-breadcrumb-item/index.cjs.js +1 -1
  55. package/dist/nile-breadcrumb-item/index.esm.js +1 -1
  56. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +1 -1
  57. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -1
  58. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +4 -4
  59. package/dist/nile-button/index.cjs.js +1 -1
  60. package/dist/nile-button/index.esm.js +1 -1
  61. package/dist/nile-button/nile-button.cjs.js +1 -1
  62. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  63. package/dist/nile-button/nile-button.esm.js +1 -1
  64. package/dist/nile-button-filter/index.cjs.js +1 -1
  65. package/dist/nile-button-filter/index.esm.js +1 -1
  66. package/dist/nile-button-filter/nile-button-filter.cjs.js +1 -1
  67. package/dist/nile-button-filter/nile-button-filter.cjs.js.map +1 -1
  68. package/dist/nile-button-filter/nile-button-filter.esm.js +7 -7
  69. package/dist/nile-button-toggle/index.cjs.js +1 -1
  70. package/dist/nile-button-toggle/index.esm.js +1 -1
  71. package/dist/nile-button-toggle/nile-button-toggle.cjs.js +1 -1
  72. package/dist/nile-button-toggle/nile-button-toggle.cjs.js.map +1 -1
  73. package/dist/nile-button-toggle/nile-button-toggle.esm.js +2 -2
  74. package/dist/nile-button-toggle-group/index.cjs.js +1 -1
  75. package/dist/nile-button-toggle-group/index.esm.js +1 -1
  76. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +1 -1
  77. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -1
  78. package/dist/nile-button-toggle-group/nile-button-toggle-group.esm.js +1 -1
  79. package/dist/nile-calendar/index.cjs.js +1 -1
  80. package/dist/nile-calendar/index.esm.js +1 -1
  81. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  82. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  83. package/dist/nile-calendar/nile-calendar.esm.js +4 -4
  84. package/dist/nile-card/index.cjs.js +1 -1
  85. package/dist/nile-card/index.esm.js +1 -1
  86. package/dist/nile-card/nile-card.cjs.js +1 -1
  87. package/dist/nile-card/nile-card.cjs.js.map +1 -1
  88. package/dist/nile-card/nile-card.esm.js +2 -2
  89. package/dist/nile-carousel/index.cjs.js +1 -1
  90. package/dist/nile-carousel/index.esm.js +1 -1
  91. package/dist/nile-carousel/nile-carousel-item/index.cjs.js +1 -1
  92. package/dist/nile-carousel/nile-carousel-item/index.esm.js +1 -1
  93. package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.cjs.js +1 -1
  94. package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.cjs.js.map +1 -1
  95. package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.esm.js +2 -2
  96. package/dist/nile-carousel/nile-carousel.cjs.js +1 -1
  97. package/dist/nile-carousel/nile-carousel.cjs.js.map +1 -1
  98. package/dist/nile-carousel/nile-carousel.esm.js +1 -1
  99. package/dist/nile-checkbox/index.cjs.js +1 -1
  100. package/dist/nile-checkbox/index.esm.js +1 -1
  101. package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
  102. package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
  103. package/dist/nile-checkbox/nile-checkbox.css.cjs.js +1 -1
  104. package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
  105. package/dist/nile-checkbox/nile-checkbox.css.esm.js +4 -0
  106. package/dist/nile-checkbox/nile-checkbox.esm.js +3 -3
  107. package/dist/nile-checkbox-group/index.cjs.js +2 -0
  108. package/dist/nile-checkbox-group/index.cjs.js.map +1 -0
  109. package/dist/nile-checkbox-group/index.esm.js +1 -0
  110. package/dist/nile-checkbox-group/nile-checkbox-group.cjs.js +2 -0
  111. package/dist/nile-checkbox-group/nile-checkbox-group.cjs.js.map +1 -0
  112. package/dist/nile-checkbox-group/nile-checkbox-group.css.cjs.js +2 -0
  113. package/dist/nile-checkbox-group/nile-checkbox-group.css.cjs.js.map +1 -0
  114. package/dist/nile-checkbox-group/nile-checkbox-group.css.esm.js +68 -0
  115. package/dist/nile-checkbox-group/nile-checkbox-group.esm.js +56 -0
  116. package/dist/nile-chip/index.cjs.js +1 -1
  117. package/dist/nile-chip/index.esm.js +1 -1
  118. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  119. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  120. package/dist/nile-chip/nile-chip.esm.js +2 -2
  121. package/dist/nile-circular-progressbar/index.cjs.js +1 -1
  122. package/dist/nile-circular-progressbar/index.esm.js +1 -1
  123. package/dist/nile-circular-progressbar/nile-circular-progressbar.cjs.js +1 -1
  124. package/dist/nile-circular-progressbar/nile-circular-progressbar.cjs.js.map +1 -1
  125. package/dist/nile-circular-progressbar/nile-circular-progressbar.esm.js +2 -2
  126. package/dist/nile-code-editor/index.cjs.js +1 -1
  127. package/dist/nile-code-editor/index.esm.js +1 -1
  128. package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
  129. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  130. package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
  131. package/dist/nile-content-editor/index.cjs.js +1 -1
  132. package/dist/nile-content-editor/index.esm.js +1 -1
  133. package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
  134. package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
  135. package/dist/nile-content-editor/nile-content-editor.esm.js +5 -5
  136. package/dist/nile-date-picker/index.cjs.js +1 -1
  137. package/dist/nile-date-picker/index.esm.js +1 -1
  138. package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
  139. package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
  140. package/dist/nile-date-picker/nile-date-picker.esm.js +1 -1
  141. package/dist/nile-detail/index.cjs.js +1 -1
  142. package/dist/nile-detail/index.esm.js +1 -1
  143. package/dist/nile-detail/nile-detail.cjs.js +1 -1
  144. package/dist/nile-detail/nile-detail.cjs.js.map +1 -1
  145. package/dist/nile-detail/nile-detail.esm.js +2 -2
  146. package/dist/nile-dialog/index.cjs.js +1 -1
  147. package/dist/nile-dialog/index.esm.js +1 -1
  148. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  149. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  150. package/dist/nile-dialog/nile-dialog.esm.js +2 -2
  151. package/dist/nile-divider/index.cjs.js +1 -1
  152. package/dist/nile-divider/index.esm.js +1 -1
  153. package/dist/nile-divider/nile-divider.cjs.js +1 -1
  154. package/dist/nile-divider/nile-divider.cjs.js.map +1 -1
  155. package/dist/nile-divider/nile-divider.esm.js +2 -2
  156. package/dist/nile-drawer/index.cjs.js +1 -1
  157. package/dist/nile-drawer/index.esm.js +1 -1
  158. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  159. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  160. package/dist/nile-drawer/nile-drawer.esm.js +1 -1
  161. package/dist/nile-dropdown/index.cjs.js +1 -1
  162. package/dist/nile-dropdown/index.esm.js +1 -1
  163. package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
  164. package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
  165. package/dist/nile-dropdown/nile-dropdown.esm.js +1 -1
  166. package/dist/nile-empty-state/index.cjs.js +1 -1
  167. package/dist/nile-empty-state/index.esm.js +1 -1
  168. package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
  169. package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
  170. package/dist/nile-empty-state/nile-empty-state.esm.js +2 -2
  171. package/dist/nile-file-preview/index.cjs.js +1 -1
  172. package/dist/nile-file-preview/index.esm.js +1 -1
  173. package/dist/nile-file-preview/nile-file-preview.cjs.js +1 -1
  174. package/dist/nile-file-preview/nile-file-preview.cjs.js.map +1 -1
  175. package/dist/nile-file-preview/nile-file-preview.esm.js +1 -1
  176. package/dist/nile-file-upload/index.cjs.js +1 -1
  177. package/dist/nile-file-upload/index.esm.js +1 -1
  178. package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
  179. package/dist/nile-file-upload/nile-file-upload.cjs.js.map +1 -1
  180. package/dist/nile-file-upload/nile-file-upload.esm.js +2 -2
  181. package/dist/nile-filter-chip/index.cjs.js +1 -1
  182. package/dist/nile-filter-chip/index.esm.js +1 -1
  183. package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
  184. package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
  185. package/dist/nile-filter-chip/nile-filter-chip.esm.js +2 -2
  186. package/dist/nile-floating-panel/index.cjs.js +1 -1
  187. package/dist/nile-floating-panel/index.esm.js +1 -1
  188. package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
  189. package/dist/nile-floating-panel/nile-floating-panel.cjs.js.map +1 -1
  190. package/dist/nile-floating-panel/nile-floating-panel.esm.js +1 -1
  191. package/dist/nile-form-group/index.cjs.js +1 -1
  192. package/dist/nile-form-group/index.esm.js +1 -1
  193. package/dist/nile-form-group/nile-form-group.cjs.js +1 -1
  194. package/dist/nile-form-group/nile-form-group.cjs.js.map +1 -1
  195. package/dist/nile-form-group/nile-form-group.esm.js +2 -2
  196. package/dist/nile-format-date/index.cjs.js +1 -1
  197. package/dist/nile-format-date/index.esm.js +1 -1
  198. package/dist/nile-format-date/nile-format-date.cjs.js +1 -1
  199. package/dist/nile-format-date/nile-format-date.cjs.js.map +1 -1
  200. package/dist/nile-format-date/nile-format-date.esm.js +1 -1
  201. package/dist/nile-grid/index.cjs.js +1 -1
  202. package/dist/nile-grid/index.esm.js +1 -1
  203. package/dist/nile-grid/nile-grid-body/index.cjs.js +1 -1
  204. package/dist/nile-grid/nile-grid-body/index.esm.js +1 -1
  205. package/dist/nile-grid/nile-grid-body/nile-grid-body.cjs.js +1 -1
  206. package/dist/nile-grid/nile-grid-body/nile-grid-body.cjs.js.map +1 -1
  207. package/dist/nile-grid/nile-grid-body/nile-grid-body.esm.js +2 -2
  208. package/dist/nile-grid/nile-grid-cell-item/index.cjs.js +1 -1
  209. package/dist/nile-grid/nile-grid-cell-item/index.esm.js +1 -1
  210. package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.cjs.js +1 -1
  211. package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.cjs.js.map +1 -1
  212. package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.esm.js +2 -2
  213. package/dist/nile-grid/nile-grid-head/index.cjs.js +1 -1
  214. package/dist/nile-grid/nile-grid-head/index.esm.js +1 -1
  215. package/dist/nile-grid/nile-grid-head/nile-grid-head.cjs.js +1 -1
  216. package/dist/nile-grid/nile-grid-head/nile-grid-head.cjs.js.map +1 -1
  217. package/dist/nile-grid/nile-grid-head/nile-grid-head.esm.js +2 -2
  218. package/dist/nile-grid/nile-grid-head-item/index.cjs.js +1 -1
  219. package/dist/nile-grid/nile-grid-head-item/index.esm.js +1 -1
  220. package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.cjs.js +1 -1
  221. package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.cjs.js.map +1 -1
  222. package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.esm.js +3 -3
  223. package/dist/nile-grid/nile-grid-row/index.cjs.js +1 -1
  224. package/dist/nile-grid/nile-grid-row/index.esm.js +1 -1
  225. package/dist/nile-grid/nile-grid-row/nile-grid-row.cjs.js +1 -1
  226. package/dist/nile-grid/nile-grid-row/nile-grid-row.cjs.js.map +1 -1
  227. package/dist/nile-grid/nile-grid-row/nile-grid-row.esm.js +2 -2
  228. package/dist/nile-grid/nile-grid.cjs.js +1 -1
  229. package/dist/nile-grid/nile-grid.cjs.js.map +1 -1
  230. package/dist/nile-grid/nile-grid.esm.js +2 -2
  231. package/dist/nile-hero/index.cjs.js +1 -1
  232. package/dist/nile-hero/index.esm.js +1 -1
  233. package/dist/nile-hero/nile-hero.cjs.js +1 -1
  234. package/dist/nile-hero/nile-hero.cjs.js.map +1 -1
  235. package/dist/nile-hero/nile-hero.esm.js +2 -2
  236. package/dist/nile-hero-header/index.cjs.js +1 -1
  237. package/dist/nile-hero-header/index.esm.js +1 -1
  238. package/dist/nile-hero-header/nile-hero-header.cjs.js +1 -1
  239. package/dist/nile-hero-header/nile-hero-header.cjs.js.map +1 -1
  240. package/dist/nile-hero-header/nile-hero-header.esm.js +2 -2
  241. package/dist/nile-icon/icons/svg/folder_delete.cjs.js +2 -0
  242. package/dist/nile-icon/icons/svg/folder_delete.cjs.js.map +1 -0
  243. package/dist/nile-icon/icons/svg/folder_delete.esm.js +1 -0
  244. package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
  245. package/dist/nile-icon/icons/svg/index.esm.js +1 -1
  246. package/dist/nile-icon/icons/svg/layers-three-02.cjs.js +1 -1
  247. package/dist/nile-icon/icons/svg/layers-three-02.cjs.js.map +1 -1
  248. package/dist/nile-icon/icons/svg/layers-three-02.esm.js +1 -1
  249. package/dist/nile-icon/index.cjs.js +1 -1
  250. package/dist/nile-icon/index.cjs.js.map +1 -1
  251. package/dist/nile-icon/index.esm.js +1 -1
  252. package/dist/nile-icon-button/index.cjs.js +1 -1
  253. package/dist/nile-icon-button/index.esm.js +1 -1
  254. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  255. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  256. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  257. package/dist/nile-inline-edit/index.cjs.js +1 -1
  258. package/dist/nile-inline-edit/index.esm.js +1 -1
  259. package/dist/nile-inline-edit/nile-inline-edit.cjs.js +1 -1
  260. package/dist/nile-inline-edit/nile-inline-edit.cjs.js.map +1 -1
  261. package/dist/nile-inline-edit/nile-inline-edit.esm.js +2 -2
  262. package/dist/nile-inline-sidebar/index.cjs.js +1 -1
  263. package/dist/nile-inline-sidebar/index.esm.js +1 -1
  264. package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js +1 -1
  265. package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js.map +1 -1
  266. package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +3 -3
  267. package/dist/nile-inline-sidebar-group/index.cjs.js +1 -1
  268. package/dist/nile-inline-sidebar-group/index.esm.js +1 -1
  269. package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.cjs.js +1 -1
  270. package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.cjs.js.map +1 -1
  271. package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.esm.js +3 -3
  272. package/dist/nile-inline-sidebar-item/index.cjs.js +1 -1
  273. package/dist/nile-inline-sidebar-item/index.esm.js +1 -1
  274. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
  275. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
  276. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +3 -3
  277. package/dist/nile-input/index.cjs.js +1 -1
  278. package/dist/nile-input/index.esm.js +1 -1
  279. package/dist/nile-input/nile-input.cjs.js +1 -1
  280. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  281. package/dist/nile-input/nile-input.esm.js +1 -1
  282. package/dist/nile-link/index.cjs.js +1 -1
  283. package/dist/nile-link/index.esm.js +1 -1
  284. package/dist/nile-link/nile-link.cjs.js +1 -1
  285. package/dist/nile-link/nile-link.cjs.js.map +1 -1
  286. package/dist/nile-link/nile-link.esm.js +3 -3
  287. package/dist/nile-list/index.cjs.js +1 -1
  288. package/dist/nile-list/index.esm.js +1 -1
  289. package/dist/nile-list/nile-list.cjs.js +1 -1
  290. package/dist/nile-list/nile-list.cjs.js.map +1 -1
  291. package/dist/nile-list/nile-list.esm.js +1 -1
  292. package/dist/nile-list-item/index.cjs.js +1 -1
  293. package/dist/nile-list-item/index.esm.js +1 -1
  294. package/dist/nile-list-item/nile-list-item.cjs.js +1 -1
  295. package/dist/nile-list-item/nile-list-item.cjs.js.map +1 -1
  296. package/dist/nile-list-item/nile-list-item.esm.js +2 -2
  297. package/dist/nile-lite-tooltip/index.cjs.js +1 -1
  298. package/dist/nile-lite-tooltip/index.esm.js +1 -1
  299. package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
  300. package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js.map +1 -1
  301. package/dist/nile-lite-tooltip/nile-lite-tooltip.esm.js +1 -1
  302. package/dist/nile-menu/index.cjs.js +1 -1
  303. package/dist/nile-menu/index.esm.js +1 -1
  304. package/dist/nile-menu/nile-menu.cjs.js +1 -1
  305. package/dist/nile-menu/nile-menu.cjs.js.map +1 -1
  306. package/dist/nile-menu/nile-menu.esm.js +2 -2
  307. package/dist/nile-menu-item/index.cjs.js +1 -1
  308. package/dist/nile-menu-item/index.esm.js +1 -1
  309. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  310. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  311. package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
  312. package/dist/nile-option/index.cjs.js +1 -1
  313. package/dist/nile-option/index.esm.js +1 -1
  314. package/dist/nile-option/nile-option.cjs.js +1 -1
  315. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  316. package/dist/nile-option/nile-option.esm.js +5 -5
  317. package/dist/nile-option-group/index.cjs.js +1 -1
  318. package/dist/nile-option-group/index.esm.js +1 -1
  319. package/dist/nile-option-group/nile-option-group.cjs.js +1 -1
  320. package/dist/nile-option-group/nile-option-group.cjs.js.map +1 -1
  321. package/dist/nile-option-group/nile-option-group.esm.js +2 -2
  322. package/dist/nile-otp-input/index.cjs.js +2 -0
  323. package/dist/nile-otp-input/index.cjs.js.map +1 -0
  324. package/dist/nile-otp-input/index.esm.js +1 -0
  325. package/dist/nile-otp-input/nile-otp-input.cjs.js +2 -0
  326. package/dist/nile-otp-input/nile-otp-input.cjs.js.map +1 -0
  327. package/dist/nile-otp-input/nile-otp-input.css.cjs.js +2 -0
  328. package/dist/nile-otp-input/nile-otp-input.css.cjs.js.map +1 -0
  329. package/dist/nile-otp-input/nile-otp-input.css.esm.js +257 -0
  330. package/dist/nile-otp-input/nile-otp-input.enum.cjs.js +2 -0
  331. package/dist/nile-otp-input/nile-otp-input.enum.cjs.js.map +1 -0
  332. package/dist/nile-otp-input/nile-otp-input.enum.esm.js +1 -0
  333. package/dist/nile-otp-input/nile-otp-input.esm.js +103 -0
  334. package/dist/nile-page-header/index.cjs.js +1 -1
  335. package/dist/nile-page-header/index.esm.js +1 -1
  336. package/dist/nile-page-header/nile-page-header.cjs.js +1 -1
  337. package/dist/nile-page-header/nile-page-header.cjs.js.map +1 -1
  338. package/dist/nile-page-header/nile-page-header.esm.js +2 -2
  339. package/dist/nile-pagination/index.cjs.js +1 -1
  340. package/dist/nile-pagination/index.esm.js +1 -1
  341. package/dist/nile-pagination/nile-pagination.cjs.js +1 -1
  342. package/dist/nile-pagination/nile-pagination.cjs.js.map +1 -1
  343. package/dist/nile-pagination/nile-pagination.css.cjs.js +1 -1
  344. package/dist/nile-pagination/nile-pagination.css.cjs.js.map +1 -1
  345. package/dist/nile-pagination/nile-pagination.css.esm.js +7 -0
  346. package/dist/nile-pagination/nile-pagination.esm.js +1 -1
  347. package/dist/nile-popover/index.cjs.js +1 -1
  348. package/dist/nile-popover/index.esm.js +1 -1
  349. package/dist/nile-popover/nile-popover.cjs.js +2 -2
  350. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  351. package/dist/nile-popover/nile-popover.esm.js +3 -3
  352. package/dist/nile-popup/index.cjs.js +1 -1
  353. package/dist/nile-popup/index.esm.js +1 -1
  354. package/dist/nile-popup/nile-popup.cjs.js +1 -1
  355. package/dist/nile-popup/nile-popup.cjs.js.map +1 -1
  356. package/dist/nile-popup/nile-popup.esm.js +2 -2
  357. package/dist/nile-progress-bar/index.cjs.js +1 -1
  358. package/dist/nile-progress-bar/index.esm.js +1 -1
  359. package/dist/nile-progress-bar/nile-progress-bar.cjs.js +1 -1
  360. package/dist/nile-progress-bar/nile-progress-bar.cjs.js.map +1 -1
  361. package/dist/nile-progress-bar/nile-progress-bar.esm.js +2 -2
  362. package/dist/nile-qr-code/index.cjs.js +1 -1
  363. package/dist/nile-qr-code/index.esm.js +1 -1
  364. package/dist/nile-qr-code/nile-qr-code.cjs.js +1 -1
  365. package/dist/nile-qr-code/nile-qr-code.cjs.js.map +1 -1
  366. package/dist/nile-qr-code/nile-qr-code.esm.js +2 -2
  367. package/dist/nile-radio/index.cjs.js +1 -1
  368. package/dist/nile-radio/index.esm.js +1 -1
  369. package/dist/nile-radio/nile-radio.cjs.js +1 -1
  370. package/dist/nile-radio/nile-radio.cjs.js.map +1 -1
  371. package/dist/nile-radio/nile-radio.css.cjs.js +1 -1
  372. package/dist/nile-radio/nile-radio.css.cjs.js.map +1 -1
  373. package/dist/nile-radio/nile-radio.css.esm.js +4 -0
  374. package/dist/nile-radio/nile-radio.esm.js +2 -2
  375. package/dist/nile-radio-group/index.cjs.js +1 -1
  376. package/dist/nile-radio-group/index.esm.js +1 -1
  377. package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
  378. package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
  379. package/dist/nile-radio-group/nile-radio-group.esm.js +2 -2
  380. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +1 -1
  381. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -1
  382. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +1 -1
  383. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -1
  384. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +8 -6
  385. package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
  386. package/dist/nile-section-message/index.cjs.js +1 -1
  387. package/dist/nile-section-message/index.esm.js +1 -1
  388. package/dist/nile-section-message/nile-section-message.cjs.js +1 -1
  389. package/dist/nile-section-message/nile-section-message.cjs.js.map +1 -1
  390. package/dist/nile-section-message/nile-section-message.esm.js +2 -2
  391. package/dist/nile-select/index.cjs.js +1 -1
  392. package/dist/nile-select/index.esm.js +1 -1
  393. package/dist/nile-select/nile-select.cjs.js +1 -1
  394. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  395. package/dist/nile-select/nile-select.css.cjs.js +1 -1
  396. package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
  397. package/dist/nile-select/nile-select.css.esm.js +21 -2
  398. package/dist/nile-select/nile-select.esm.js +33 -25
  399. package/dist/nile-select/portal-utils.cjs.js +1 -1
  400. package/dist/nile-select/portal-utils.cjs.js.map +1 -1
  401. package/dist/nile-select/portal-utils.esm.js +1 -1
  402. package/dist/nile-side-bar/index.cjs.js +1 -1
  403. package/dist/nile-side-bar/index.esm.js +1 -1
  404. package/dist/nile-side-bar/nile-side-bar.cjs.js +1 -1
  405. package/dist/nile-side-bar/nile-side-bar.cjs.js.map +1 -1
  406. package/dist/nile-side-bar/nile-side-bar.esm.js +2 -2
  407. package/dist/nile-side-bar-action/index.cjs.js +1 -1
  408. package/dist/nile-side-bar-action/index.esm.js +1 -1
  409. package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js +1 -1
  410. package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js.map +1 -1
  411. package/dist/nile-side-bar-action/nile-side-bar-action.esm.js +3 -3
  412. package/dist/nile-side-bar-action-menu/index.cjs.js +1 -1
  413. package/dist/nile-side-bar-action-menu/index.esm.js +1 -1
  414. package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.cjs.js +1 -1
  415. package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.cjs.js.map +1 -1
  416. package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.esm.js +2 -2
  417. package/dist/nile-side-bar-action-menu-item/index.cjs.js +1 -1
  418. package/dist/nile-side-bar-action-menu-item/index.esm.js +1 -1
  419. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.cjs.js +1 -1
  420. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.cjs.js.map +1 -1
  421. package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.esm.js +1 -1
  422. package/dist/nile-side-bar-expand/index.cjs.js +1 -1
  423. package/dist/nile-side-bar-expand/index.esm.js +1 -1
  424. package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js +1 -1
  425. package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js.map +1 -1
  426. package/dist/nile-side-bar-expand/nile-side-bar-expand.esm.js +2 -2
  427. package/dist/nile-side-bar-footer/index.cjs.js +1 -1
  428. package/dist/nile-side-bar-footer/index.esm.js +1 -1
  429. package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js +1 -1
  430. package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js.map +1 -1
  431. package/dist/nile-side-bar-footer/nile-side-bar-footer.esm.js +2 -2
  432. package/dist/nile-side-bar-footer-item/index.cjs.js +1 -1
  433. package/dist/nile-side-bar-footer-item/index.esm.js +1 -1
  434. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +1 -1
  435. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +1 -1
  436. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +1 -1
  437. package/dist/nile-side-bar-footer-text/index.cjs.js +1 -1
  438. package/dist/nile-side-bar-footer-text/index.esm.js +1 -1
  439. package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.cjs.js +1 -1
  440. package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.cjs.js.map +1 -1
  441. package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.esm.js +3 -3
  442. package/dist/nile-side-bar-group/index.cjs.js +1 -1
  443. package/dist/nile-side-bar-group/index.esm.js +1 -1
  444. package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js +1 -1
  445. package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js.map +1 -1
  446. package/dist/nile-side-bar-group/nile-side-bar-group.esm.js +2 -2
  447. package/dist/nile-side-bar-group-item/index.cjs.js +1 -1
  448. package/dist/nile-side-bar-group-item/index.esm.js +1 -1
  449. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.cjs.js +1 -1
  450. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.cjs.js.map +1 -1
  451. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.esm.js +2 -2
  452. package/dist/nile-side-bar-group-item-icon/index.cjs.js +1 -1
  453. package/dist/nile-side-bar-group-item-icon/index.esm.js +1 -1
  454. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js +1 -1
  455. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js.map +1 -1
  456. package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.esm.js +2 -2
  457. package/dist/nile-side-bar-group-item-text/index.cjs.js +1 -1
  458. package/dist/nile-side-bar-group-item-text/index.esm.js +1 -1
  459. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.cjs.js +1 -1
  460. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.cjs.js.map +1 -1
  461. package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.esm.js +1 -1
  462. package/dist/nile-side-bar-header/index.cjs.js +1 -1
  463. package/dist/nile-side-bar-header/index.esm.js +1 -1
  464. package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js +1 -1
  465. package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js.map +1 -1
  466. package/dist/nile-side-bar-header/nile-side-bar-header.esm.js +2 -2
  467. package/dist/nile-side-bar-logo/index.cjs.js +1 -1
  468. package/dist/nile-side-bar-logo/index.esm.js +1 -1
  469. package/dist/nile-side-bar-logo/nile-side-bar-logo.cjs.js +1 -1
  470. package/dist/nile-side-bar-logo/nile-side-bar-logo.cjs.js.map +1 -1
  471. package/dist/nile-side-bar-logo/nile-side-bar-logo.esm.js +2 -2
  472. package/dist/nile-side-bar-panel/index.cjs.js +1 -1
  473. package/dist/nile-side-bar-panel/index.esm.js +1 -1
  474. package/dist/nile-side-bar-panel/nile-side-bar-panel.cjs.js +1 -1
  475. package/dist/nile-side-bar-panel/nile-side-bar-panel.cjs.js.map +1 -1
  476. package/dist/nile-side-bar-panel/nile-side-bar-panel.esm.js +2 -2
  477. package/dist/nile-skeleton-loader/index.cjs.js +1 -1
  478. package/dist/nile-skeleton-loader/index.esm.js +1 -1
  479. package/dist/nile-skeleton-loader/nile-skeleton-loader.cjs.js +1 -1
  480. package/dist/nile-skeleton-loader/nile-skeleton-loader.cjs.js.map +1 -1
  481. package/dist/nile-skeleton-loader/nile-skeleton-loader.esm.js +2 -2
  482. package/dist/nile-slide-toggle/index.cjs.js +1 -1
  483. package/dist/nile-slide-toggle/index.esm.js +1 -1
  484. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
  485. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
  486. package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +2 -2
  487. package/dist/nile-slider/index.cjs.js +1 -1
  488. package/dist/nile-slider/index.esm.js +1 -1
  489. package/dist/nile-slider/nile-slider.cjs.js +1 -1
  490. package/dist/nile-slider/nile-slider.cjs.js.map +1 -1
  491. package/dist/nile-slider/nile-slider.esm.js +3 -3
  492. package/dist/nile-split-panel/index.cjs.js +1 -1
  493. package/dist/nile-split-panel/index.esm.js +1 -1
  494. package/dist/nile-split-panel/nile-split-panel.cjs.js +1 -1
  495. package/dist/nile-split-panel/nile-split-panel.cjs.js.map +1 -1
  496. package/dist/nile-split-panel/nile-split-panel.esm.js +2 -2
  497. package/dist/nile-stepper/index.cjs.js +1 -1
  498. package/dist/nile-stepper/index.esm.js +1 -1
  499. package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
  500. package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
  501. package/dist/nile-stepper/nile-stepper.esm.js +3 -3
  502. package/dist/nile-stepper-item/index.cjs.js +1 -1
  503. package/dist/nile-stepper-item/index.esm.js +1 -1
  504. package/dist/nile-stepper-item/nile-stepper-item.cjs.js +1 -1
  505. package/dist/nile-stepper-item/nile-stepper-item.cjs.js.map +1 -1
  506. package/dist/nile-stepper-item/nile-stepper-item.esm.js +1 -1
  507. package/dist/nile-switcher/index.cjs.js +1 -1
  508. package/dist/nile-switcher/index.esm.js +1 -1
  509. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  510. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  511. package/dist/nile-switcher/nile-switcher.esm.js +23 -23
  512. package/dist/nile-tab/index.cjs.js +1 -1
  513. package/dist/nile-tab/index.esm.js +1 -1
  514. package/dist/nile-tab/nile-tab.cjs.js +1 -1
  515. package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
  516. package/dist/nile-tab/nile-tab.esm.js +1 -1
  517. package/dist/nile-tab-group/index.cjs.js +1 -1
  518. package/dist/nile-tab-group/index.esm.js +1 -1
  519. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  520. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  521. package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
  522. package/dist/nile-tab-panel/index.cjs.js +1 -1
  523. package/dist/nile-tab-panel/index.esm.js +1 -1
  524. package/dist/nile-tab-panel/nile-tab-panel.cjs.js +1 -1
  525. package/dist/nile-tab-panel/nile-tab-panel.cjs.js.map +1 -1
  526. package/dist/nile-tab-panel/nile-tab-panel.esm.js +3 -3
  527. package/dist/nile-table/index.cjs.js +1 -1
  528. package/dist/nile-table/index.esm.js +1 -1
  529. package/dist/nile-table/nile-table.cjs.js +1 -1
  530. package/dist/nile-table/nile-table.cjs.js.map +1 -1
  531. package/dist/nile-table/nile-table.esm.js +1 -1
  532. package/dist/nile-table-body/index.cjs.js +1 -1
  533. package/dist/nile-table-body/index.esm.js +1 -1
  534. package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
  535. package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
  536. package/dist/nile-table-body/nile-table-body.esm.js +3 -3
  537. package/dist/nile-table-cell-item/index.cjs.js +1 -1
  538. package/dist/nile-table-cell-item/index.esm.js +1 -1
  539. package/dist/nile-table-cell-item/nile-table-cell-item.cjs.js +1 -1
  540. package/dist/nile-table-cell-item/nile-table-cell-item.cjs.js.map +1 -1
  541. package/dist/nile-table-cell-item/nile-table-cell-item.esm.js +5 -5
  542. package/dist/nile-table-header-item/index.cjs.js +1 -1
  543. package/dist/nile-table-header-item/index.esm.js +1 -1
  544. package/dist/nile-table-header-item/nile-table-header-item.cjs.js +1 -1
  545. package/dist/nile-table-header-item/nile-table-header-item.cjs.js.map +1 -1
  546. package/dist/nile-table-header-item/nile-table-header-item.esm.js +1 -1
  547. package/dist/nile-table-row/index.cjs.js +1 -1
  548. package/dist/nile-table-row/index.esm.js +1 -1
  549. package/dist/nile-table-row/nile-table-row.cjs.js +1 -1
  550. package/dist/nile-table-row/nile-table-row.cjs.js.map +1 -1
  551. package/dist/nile-table-row/nile-table-row.esm.js +2 -2
  552. package/dist/nile-tag/index.cjs.js +1 -1
  553. package/dist/nile-tag/index.esm.js +1 -1
  554. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  555. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  556. package/dist/nile-tag/nile-tag.esm.js +1 -1
  557. package/dist/nile-textarea/index.cjs.js +1 -1
  558. package/dist/nile-textarea/index.esm.js +1 -1
  559. package/dist/nile-textarea/nile-textarea.cjs.js +1 -1
  560. package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
  561. package/dist/nile-textarea/nile-textarea.esm.js +2 -2
  562. package/dist/nile-title/index.cjs.js +1 -1
  563. package/dist/nile-title/index.esm.js +1 -1
  564. package/dist/nile-title/nile-title.cjs.js +1 -1
  565. package/dist/nile-title/nile-title.cjs.js.map +1 -1
  566. package/dist/nile-title/nile-title.esm.js +1 -1
  567. package/dist/nile-toast/index.cjs.js +1 -1
  568. package/dist/nile-toast/index.esm.js +1 -1
  569. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  570. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  571. package/dist/nile-toast/nile-toast.esm.js +2 -2
  572. package/dist/nile-toolbar/index.cjs.js +1 -1
  573. package/dist/nile-toolbar/index.esm.js +1 -1
  574. package/dist/nile-toolbar/nile-toolbar.cjs.js +1 -1
  575. package/dist/nile-toolbar/nile-toolbar.cjs.js.map +1 -1
  576. package/dist/nile-toolbar/nile-toolbar.esm.js +2 -2
  577. package/dist/nile-tooltip/index.cjs.js +1 -1
  578. package/dist/nile-tooltip/index.esm.js +1 -1
  579. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  580. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  581. package/dist/nile-tooltip/nile-tooltip.esm.js +2 -2
  582. package/dist/nile-tree/index.cjs.js +1 -1
  583. package/dist/nile-tree/index.esm.js +1 -1
  584. package/dist/nile-tree/nile-tree.cjs.js +1 -1
  585. package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
  586. package/dist/nile-tree/nile-tree.esm.js +1 -1
  587. package/dist/nile-tree-item/index.cjs.js +1 -1
  588. package/dist/nile-tree-item/index.esm.js +1 -1
  589. package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
  590. package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
  591. package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
  592. package/dist/nile-vertical-stepper-item/index.cjs.js +1 -1
  593. package/dist/nile-vertical-stepper-item/index.esm.js +1 -1
  594. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js +1 -1
  595. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js.map +1 -1
  596. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.esm.js +7 -7
  597. package/dist/nile-virtual-select/index.cjs.js +1 -1
  598. package/dist/nile-virtual-select/index.esm.js +1 -1
  599. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +3 -3
  600. package/dist/nile-virtual-select/nile-virtual-select.esm.js +3 -3
  601. package/dist/src/index.d.ts +2 -0
  602. package/dist/src/index.js +2 -0
  603. package/dist/src/index.js.map +1 -1
  604. package/dist/src/internal/accessibility/a11y.custom-value.enum.d.ts +69 -0
  605. package/dist/src/internal/accessibility/a11y.custom-value.enum.js +71 -0
  606. package/dist/src/internal/accessibility/a11y.custom-value.enum.js.map +1 -0
  607. package/dist/src/internal/accessibility/a11y.property.enum.d.ts +33 -0
  608. package/dist/src/internal/accessibility/a11y.property.enum.js +35 -0
  609. package/dist/src/internal/accessibility/a11y.property.enum.js.map +1 -0
  610. package/dist/src/internal/accessibility/a11y.role.enum.d.ts +50 -0
  611. package/dist/src/internal/accessibility/a11y.role.enum.js +52 -0
  612. package/dist/src/internal/accessibility/a11y.role.enum.js.map +1 -0
  613. package/dist/src/internal/accessibility/a11y.state.enum.d.ts +17 -0
  614. package/dist/src/internal/accessibility/a11y.state.enum.js +19 -0
  615. package/dist/src/internal/accessibility/a11y.state.enum.js.map +1 -0
  616. package/dist/src/internal/accessibility/accessibility.const.d.ts +8 -0
  617. package/dist/src/internal/accessibility/accessibility.const.js +9 -0
  618. package/dist/src/internal/accessibility/accessibility.const.js.map +1 -0
  619. package/dist/src/internal/accessibility/role.enum.d.ts +3 -0
  620. package/dist/src/internal/accessibility/role.enum.js +5 -0
  621. package/dist/src/internal/accessibility/role.enum.js.map +1 -0
  622. package/dist/src/internal/enum.d.ts +21 -0
  623. package/dist/src/internal/enum.js +23 -1
  624. package/dist/src/internal/enum.js.map +1 -1
  625. package/dist/src/internal/nile-element.d.ts +52 -0
  626. package/dist/src/internal/nile-element.js +45 -0
  627. package/dist/src/internal/nile-element.js.map +1 -1
  628. package/dist/src/nile-avatar/nile-avatar.js +2 -0
  629. package/dist/src/nile-avatar/nile-avatar.js.map +1 -1
  630. package/dist/src/nile-badge/nile-badge.d.ts +1 -0
  631. package/dist/src/nile-badge/nile-badge.js +12 -1
  632. package/dist/src/nile-badge/nile-badge.js.map +1 -1
  633. package/dist/src/nile-checkbox/nile-checkbox.css.js +4 -0
  634. package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
  635. package/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -0
  636. package/dist/src/nile-checkbox/nile-checkbox.js +5 -0
  637. package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  638. package/dist/src/nile-checkbox-group/index.d.ts +1 -0
  639. package/dist/src/nile-checkbox-group/index.js +2 -0
  640. package/dist/src/nile-checkbox-group/index.js.map +1 -0
  641. package/dist/src/nile-checkbox-group/nile-checkbox-group.css.d.ts +1 -0
  642. package/dist/src/nile-checkbox-group/nile-checkbox-group.css.js +70 -0
  643. package/dist/src/nile-checkbox-group/nile-checkbox-group.css.js.map +1 -0
  644. package/dist/src/nile-checkbox-group/nile-checkbox-group.d.ts +84 -0
  645. package/dist/src/nile-checkbox-group/nile-checkbox-group.js +355 -0
  646. package/dist/src/nile-checkbox-group/nile-checkbox-group.js.map +1 -0
  647. package/dist/src/nile-checkbox-group/nile-checkbox-group.test.d.ts +2 -0
  648. package/dist/src/nile-checkbox-group/nile-checkbox-group.test.js +671 -0
  649. package/dist/src/nile-checkbox-group/nile-checkbox-group.test.js.map +1 -0
  650. package/dist/src/nile-floating-panel/nile-floating-panel.d.ts +2 -0
  651. package/dist/src/nile-floating-panel/nile-floating-panel.js +12 -1
  652. package/dist/src/nile-floating-panel/nile-floating-panel.js.map +1 -1
  653. package/dist/src/nile-icon/icons/svg/folder_delete.d.ts +5 -0
  654. package/dist/src/nile-icon/icons/svg/folder_delete.js +5 -0
  655. package/dist/src/nile-icon/icons/svg/folder_delete.js.map +1 -0
  656. package/dist/src/nile-icon/icons/svg/index.d.ts +1 -0
  657. package/dist/src/nile-icon/icons/svg/index.js +1 -0
  658. package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  659. package/dist/src/nile-icon/icons/svg/layers-three-02.d.ts +1 -1
  660. package/dist/src/nile-icon/icons/svg/layers-three-02.js +1 -1
  661. package/dist/src/nile-icon/icons/svg/layers-three-02.js.map +1 -1
  662. package/dist/src/nile-link/nile-link.d.ts +2 -1
  663. package/dist/src/nile-link/nile-link.js +18 -1
  664. package/dist/src/nile-link/nile-link.js.map +1 -1
  665. package/dist/src/nile-otp-input/index.d.ts +1 -0
  666. package/dist/src/nile-otp-input/index.js +2 -0
  667. package/dist/src/nile-otp-input/index.js.map +1 -0
  668. package/dist/src/nile-otp-input/nile-otp-input.css.d.ts +12 -0
  669. package/dist/src/nile-otp-input/nile-otp-input.css.js +269 -0
  670. package/dist/src/nile-otp-input/nile-otp-input.css.js.map +1 -0
  671. package/dist/src/nile-otp-input/nile-otp-input.d.ts +156 -0
  672. package/dist/src/nile-otp-input/nile-otp-input.enum.d.ts +26 -0
  673. package/dist/src/nile-otp-input/nile-otp-input.enum.js +32 -0
  674. package/dist/src/nile-otp-input/nile-otp-input.enum.js.map +1 -0
  675. package/dist/src/nile-otp-input/nile-otp-input.js +762 -0
  676. package/dist/src/nile-otp-input/nile-otp-input.js.map +1 -0
  677. package/dist/src/nile-otp-input/nile-otp-input.test.d.ts +1 -0
  678. package/dist/src/nile-otp-input/nile-otp-input.test.js +493 -0
  679. package/dist/src/nile-otp-input/nile-otp-input.test.js.map +1 -0
  680. package/dist/src/nile-pagination/nile-pagination.css.js +7 -0
  681. package/dist/src/nile-pagination/nile-pagination.css.js.map +1 -1
  682. package/dist/src/nile-radio/nile-radio.css.js +4 -0
  683. package/dist/src/nile-radio/nile-radio.css.js.map +1 -1
  684. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +8 -6
  685. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -1
  686. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +2 -0
  687. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +43 -0
  688. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
  689. package/dist/src/nile-rich-text-editor/nile-rte-link.test.js +6 -5
  690. package/dist/src/nile-rich-text-editor/nile-rte-link.test.js.map +1 -1
  691. package/dist/src/nile-select/nile-select.css.js +21 -2
  692. package/dist/src/nile-select/nile-select.css.js.map +1 -1
  693. package/dist/src/nile-select/nile-select.d.ts +4 -0
  694. package/dist/src/nile-select/nile-select.js +42 -24
  695. package/dist/src/nile-select/nile-select.js.map +1 -1
  696. package/dist/src/nile-select/portal-utils.d.ts +2 -0
  697. package/dist/src/nile-select/portal-utils.js +36 -3
  698. package/dist/src/nile-select/portal-utils.js.map +1 -1
  699. package/dist/src/version.js +2 -2
  700. package/dist/src/version.js.map +1 -1
  701. package/dist/tsconfig.tsbuildinfo +1 -1
  702. package/package.json +4 -2
  703. package/plop-templates/lit/index.ts.hbs +1 -1
  704. package/plop-templates/lit/lit.css.ts.hbs +1 -1
  705. package/plop-templates/lit/lit.ts.hbs +1 -1
  706. package/src/index.ts +3 -1
  707. package/src/internal/accessibility/a11y.custom-value.enum.ts +69 -0
  708. package/src/internal/accessibility/a11y.property.enum.ts +33 -0
  709. package/src/internal/accessibility/a11y.role.enum.ts +50 -0
  710. package/src/internal/accessibility/a11y.state.enum.ts +17 -0
  711. package/src/internal/accessibility/accessibility.const.ts +9 -0
  712. package/src/internal/accessibility/role.enum.ts +3 -0
  713. package/src/internal/enum.ts +23 -1
  714. package/src/internal/nile-element.ts +99 -0
  715. package/src/nile-avatar/nile-avatar.ts +2 -0
  716. package/src/nile-badge/nile-badge.ts +13 -1
  717. package/src/nile-checkbox/nile-checkbox.css.ts +4 -0
  718. package/src/nile-checkbox/nile-checkbox.ts +3 -0
  719. package/src/nile-checkbox-group/index.ts +1 -0
  720. package/src/nile-checkbox-group/nile-checkbox-group.css.ts +70 -0
  721. package/src/nile-checkbox-group/nile-checkbox-group.test.ts +769 -0
  722. package/src/nile-checkbox-group/nile-checkbox-group.ts +351 -0
  723. package/src/nile-floating-panel/nile-floating-panel.ts +10 -1
  724. package/src/nile-icon/icons/svg/folder_delete.ts +5 -0
  725. package/src/nile-icon/icons/svg/index.ts +1 -0
  726. package/src/nile-icon/icons/svg/layers-three-02.ts +1 -1
  727. package/src/nile-link/nile-link.ts +21 -2
  728. package/src/nile-otp-input/index.ts +1 -0
  729. package/src/nile-otp-input/nile-otp-input.css.ts +271 -0
  730. package/src/nile-otp-input/nile-otp-input.enum.ts +30 -0
  731. package/src/nile-otp-input/nile-otp-input.test.ts +732 -0
  732. package/src/nile-otp-input/nile-otp-input.ts +835 -0
  733. package/src/nile-pagination/nile-pagination.css.ts +7 -0
  734. package/src/nile-radio/nile-radio.css.ts +4 -0
  735. package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +8 -6
  736. package/src/nile-rich-text-editor/nile-rich-text-editor.ts +43 -0
  737. package/src/nile-rich-text-editor/nile-rte-link.test.ts +6 -5
  738. package/src/nile-select/nile-select.css.ts +21 -2
  739. package/src/nile-select/nile-select.ts +44 -24
  740. package/src/nile-select/portal-utils.ts +46 -3
  741. package/vscode-html-custom-data.json +281 -19
@@ -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","../floating-ui.dom-007bbe96.cjs.js","lit/directives/class-map.js","lit/decorators.js","lit","../internal/nile-element.cjs.js","./nile-popup.css.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,a,o,r,h,n,l,p,d,c,u,f,b,_templateObject,_templateObject2,y;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}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(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function m(t){return function(t){for(var _i=t;_i;_i=v(_i))if(_i instanceof Element&&"none"===getComputedStyle(_i).display)return null;for(var _i2=v(t);_i2;_i2=v(_i2)){if(!(_i2 instanceof Element))continue;var _t=getComputedStyle(_i2);if("contents"!==_t.display){if("static"!==_t.position||"none"!==_t.filter)return _i2;if("BODY"===_i2.tagName)return _i2;}}return null;}(t);}function v(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode;}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_floatingUiDom001CjsJs){i=_floatingUiDom001CjsJs.b;e=_floatingUiDom001CjsJs.o;s=_floatingUiDom001CjsJs.f;a=_floatingUiDom001CjsJs.a;o=_floatingUiDom001CjsJs.s;r=_floatingUiDom001CjsJs.d;h=_floatingUiDom001CjsJs.p;n=_floatingUiDom001CjsJs.c;},function(_litDirectivesClassMapJs){l=_litDirectivesClassMapJs.classMap;},function(_litDecoratorsJs){p=_litDecoratorsJs.query;d=_litDecoratorsJs.property;c=_litDecoratorsJs.customElement;},function(_lit){u=_lit.html;},function(_internalNileElementCjsJs){f=_internalNileElementCjsJs.N;},function(_nilePopupCssCjsJs){b=_nilePopupCssCjsJs.s;}],execute:function execute(){_export("N",y=/*#__PURE__*/function(_f){function y(){var _this;_classCallCheck(this,y);_this=_callSuper(this,y,arguments),_this.active=!1,_this.placement="top",_this.strategy="absolute",_this.distance=0,_this.skidding=0,_this.arrow=!1,_this.arrowPlacement="anchor",_this.arrowPadding=10,_this.flip=!1,_this.flipFallbackPlacements="",_this.flipFallbackStrategy="best-fit",_this.flipPadding=0,_this.shift=!1,_this.shiftPadding=0,_this.autoSizePadding=0;return _this;}_inherits(y,_f);return _createClass(y,[{key:"connectedCallback",value:function(){var _connectedCallback=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_superPropGet(y,"connectedCallback",this,3)([]);_context2.next=3;return this.updateComplete;case 3:this.start();case 4:case"end":return _context2.stop();}},_callee,this);}));function connectedCallback(){return _connectedCallback.apply(this,arguments);}return connectedCallback;}()},{key:"disconnectedCallback",value:function disconnectedCallback(){this.stop();}},{key:"updated",value:function(){var _updated=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(t){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_superPropGet(y,"updated",this,3)([t]);t.has("active")&&(this.active?this.start():this.stop());t.has("anchor")&&this.handleAnchorChange();_context3.t0=this.active;if(!_context3.t0){_context3.next=8;break;}_context3.next=7;return this.updateComplete;case 7:this.reposition();case 8:case"end":return _context3.stop();}},_callee2,this);}));function updated(_x){return _updated.apply(this,arguments);}return updated;}()},{key:"handleAnchorChange",value:function(){var _handleAnchorChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _t2;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return this.stop();case 2:if(!(this.anchor&&"string"==typeof this.anchor)){_context4.next=7;break;}_t2=this.getRootNode();this.anchorEl=_t2.getElementById(this.anchor);_context4.next=8;break;case 7:this.anchor instanceof Element?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');case 8:this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start();case 9:case"end":return _context4.stop();}},_callee3,this);}));function handleAnchorChange(){return _handleAnchorChange.apply(this,arguments);}return handleAnchorChange;}()},{key:"start",value:function start(){var _this2=this;this.anchorEl&&(this.cleanup=i(this.anchorEl,this.popup,function(){_this2.reposition();}));}},{key:"stop",value:function(){var _stop=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _this3=this;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:return _context5.abrupt("return",new Promise(function(t){_this3.cleanup?(_this3.cleanup(),_this3.cleanup=void 0,_this3.removeAttribute("data-current-placement"),_this3.style.removeProperty("--auto-size-available-width"),_this3.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(function(){return t();})):t();}));case 1:case"end":return _context5.stop();}},_callee4);}));function stop(){return _stop.apply(this,arguments);}return stop;}()},{key:"reposition",value:function reposition(){var _this4=this;if(!this.active||!this.anchorEl)return;var t=[e({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(o({apply:function apply(_ref){var t=_ref.rects;var i="width"===_this4.sync||"both"===_this4.sync,e="height"===_this4.sync||"both"===_this4.sync;_this4.popup.style.width=i?"".concat(t.reference.width,"px"):"",_this4.popup.style.height=e?"".concat(t.reference.height,"px"):"";}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(s({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(a({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(o({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:function apply(_ref2){var t=_ref2.availableWidth,i=_ref2.availableHeight;"vertical"===_this4.autoSize||"both"===_this4.autoSize?_this4.style.setProperty("--auto-size-available-height","".concat(i,"px")):_this4.style.removeProperty("--auto-size-available-height"),"horizontal"===_this4.autoSize||"both"===_this4.autoSize?_this4.style.setProperty("--auto-size-available-width","".concat(t,"px")):_this4.style.removeProperty("--auto-size-available-width");}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(r({element:this.arrowEl,padding:this.arrowPadding}));var i="absolute"===this.strategy?function(t){return h.getOffsetParent(t,m);}:h.getOffsetParent;n(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:_objectSpread(_objectSpread({},h),{},{getOffsetParent:i})}).then(function(_ref3){var t=_ref3.x,i=_ref3.y,e=_ref3.middlewareData,s=_ref3.placement;var a="rtl"===getComputedStyle(_this4).direction,o={top:"bottom",right:"left",bottom:"top",left:"right"}[s.split("-")[0]];if(_this4.setAttribute("data-current-placement",s),Object.assign(_this4.popup.style,{left:"".concat(t,"px"),top:"".concat(i,"px")}),_this4.arrow){var _t3=e.arrow.x,_i3=e.arrow.y;var _s="",_r="",_h="",_n="";if("start"===_this4.arrowPlacement){var _e="number"==typeof _t3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";_s="number"==typeof _i3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"",_r=a?_e:"",_n=a?"":_e;}else if("end"===_this4.arrowPlacement){var _e2="number"==typeof _t3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";_r=a?"":_e2,_n=a?_e2:"",_h="number"==typeof _i3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";}else"center"===_this4.arrowPlacement?(_n="number"==typeof _t3?"calc(50% - var(--arrow-size-diagonal))":"",_s="number"==typeof _i3?"calc(50% - var(--arrow-size-diagonal))":""):(_n="number"==typeof _t3?"".concat(_t3,"px"):"",_s="number"==typeof _i3?"".concat(_i3,"px"):"");Object.assign(_this4.arrowEl.style,_defineProperty({top:_s,right:_r,bottom:_h,left:_n},o,"calc(var(--arrow-size-diagonal) * -1)"));}}),this.emit("reposition");}},{key:"render",value:function render(){return u(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <slot name=\"anchor\" @slotchange=","></slot>\n\n <div\n part=\"popup\"\n class=","\n >\n <slot></slot>\n ","\n </div>\n "])),this.handleAnchorChange,l({popup:!0,"popup--active":this.active,"popup--fixed":"fixed"===this.strategy,"popup--has-arrow":this.arrow}),this.arrow?u(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>"]))):"");}}]);}(f));y.styles=b,t([p(".popup")],y.prototype,"popup",void 0),t([p(".popup__arrow")],y.prototype,"arrowEl",void 0),t([d()],y.prototype,"anchor",void 0),t([d({type:Boolean,reflect:!0})],y.prototype,"active",void 0),t([d({reflect:!0})],y.prototype,"placement",void 0),t([d({reflect:!0})],y.prototype,"strategy",void 0),t([d({type:Number})],y.prototype,"distance",void 0),t([d({type:Number})],y.prototype,"skidding",void 0),t([d({type:Boolean})],y.prototype,"arrow",void 0),t([d({attribute:"arrow-placement"})],y.prototype,"arrowPlacement",void 0),t([d({attribute:"arrow-padding",type:Number})],y.prototype,"arrowPadding",void 0),t([d({type:Boolean})],y.prototype,"flip",void 0),t([d({attribute:"flip-fallback-placements",converter:{fromAttribute:function fromAttribute(t){return t.split(" ").map(function(t){return t.trim();}).filter(function(t){return""!==t;});},toAttribute:function toAttribute(t){return t.join(" ");}}})],y.prototype,"flipFallbackPlacements",void 0),t([d({attribute:"flip-fallback-strategy"})],y.prototype,"flipFallbackStrategy",void 0),t([d({type:Object})],y.prototype,"flipBoundary",void 0),t([d({attribute:"flip-padding",type:Number})],y.prototype,"flipPadding",void 0),t([d({type:Boolean})],y.prototype,"shift",void 0),t([d({type:Object})],y.prototype,"shiftBoundary",void 0),t([d({attribute:"shift-padding",type:Number})],y.prototype,"shiftPadding",void 0),t([d({attribute:"auto-size"})],y.prototype,"autoSize",void 0),t([d()],y.prototype,"sync",void 0),t([d({type:Object})],y.prototype,"autoSizeBoundary",void 0),t([d({attribute:"auto-size-padding",type:Number})],y.prototype,"autoSizePadding",void 0),_export("N",y=t([c("nile-popup")],y));}};});
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","../floating-ui.dom-007bbe96.cjs.js","lit/directives/class-map.js","lit/decorators.js","lit","../internal/nile-element.cjs.js","./nile-popup.css.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,a,o,r,n,h,l,p,c,d,u,f,m,_templateObject,_templateObject2,y;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}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(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function b(t){return function(t){for(var _i=t;_i;_i=v(_i))if(_i instanceof Element&&"none"===getComputedStyle(_i).display)return null;for(var _i2=v(t);_i2;_i2=v(_i2)){if(!(_i2 instanceof Element))continue;var _t=getComputedStyle(_i2);if("contents"!==_t.display){if("static"!==_t.position||"none"!==_t.filter)return _i2;if("BODY"===_i2.tagName)return _i2;}}return null;}(t);}function v(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode;}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_floatingUiDom001CjsJs){i=_floatingUiDom001CjsJs.b;e=_floatingUiDom001CjsJs.o;s=_floatingUiDom001CjsJs.f;a=_floatingUiDom001CjsJs.a;o=_floatingUiDom001CjsJs.s;r=_floatingUiDom001CjsJs.d;n=_floatingUiDom001CjsJs.p;h=_floatingUiDom001CjsJs.c;},function(_litDirectivesClassMapJs){l=_litDirectivesClassMapJs.classMap;},function(_litDecoratorsJs){p=_litDecoratorsJs.query;c=_litDecoratorsJs.property;d=_litDecoratorsJs.customElement;},function(_lit){u=_lit.html;},function(_internalNileElementCjsJs){f=_internalNileElementCjsJs.N;},function(_nilePopupCssCjsJs){m=_nilePopupCssCjsJs.s;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",y=/*#__PURE__*/function(_f){function y(){var _this;_classCallCheck(this,y);_this=_callSuper(this,y,arguments),_this.active=!1,_this.placement="top",_this.strategy="absolute",_this.distance=0,_this.skidding=0,_this.arrow=!1,_this.arrowPlacement="anchor",_this.arrowPadding=10,_this.flip=!1,_this.flipFallbackPlacements="",_this.flipFallbackStrategy="best-fit",_this.flipPadding=0,_this.shift=!1,_this.shiftPadding=0,_this.autoSizePadding=0;return _this;}_inherits(y,_f);return _createClass(y,[{key:"connectedCallback",value:function(){var _connectedCallback=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_superPropGet(y,"connectedCallback",this,3)([]);_context2.next=3;return this.updateComplete;case 3:this.start();case 4:case"end":return _context2.stop();}},_callee,this);}));function connectedCallback(){return _connectedCallback.apply(this,arguments);}return connectedCallback;}()},{key:"disconnectedCallback",value:function disconnectedCallback(){this.stop();}},{key:"updated",value:function(){var _updated=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(t){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_superPropGet(y,"updated",this,3)([t]);t.has("active")&&(this.active?this.start():this.stop());t.has("anchor")&&this.handleAnchorChange();_context3.t0=this.active;if(!_context3.t0){_context3.next=8;break;}_context3.next=7;return this.updateComplete;case 7:this.reposition();case 8:case"end":return _context3.stop();}},_callee2,this);}));function updated(_x){return _updated.apply(this,arguments);}return updated;}()},{key:"handleAnchorChange",value:function(){var _handleAnchorChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _t2;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return this.stop();case 2:if(!(this.anchor&&"string"==typeof this.anchor)){_context4.next=7;break;}_t2=this.getRootNode();this.anchorEl=_t2.getElementById(this.anchor);_context4.next=8;break;case 7:this.anchor instanceof Element?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');case 8:this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start();case 9:case"end":return _context4.stop();}},_callee3,this);}));function handleAnchorChange(){return _handleAnchorChange.apply(this,arguments);}return handleAnchorChange;}()},{key:"start",value:function start(){var _this2=this;this.anchorEl&&(this.cleanup=i(this.anchorEl,this.popup,function(){_this2.reposition();}));}},{key:"stop",value:function(){var _stop=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _this3=this;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:return _context5.abrupt("return",new Promise(function(t){_this3.cleanup?(_this3.cleanup(),_this3.cleanup=void 0,_this3.removeAttribute("data-current-placement"),_this3.style.removeProperty("--auto-size-available-width"),_this3.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(function(){return t();})):t();}));case 1:case"end":return _context5.stop();}},_callee4);}));function stop(){return _stop.apply(this,arguments);}return stop;}()},{key:"reposition",value:function reposition(){var _this4=this;if(!this.active||!this.anchorEl)return;var t=[e({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(o({apply:function apply(_ref){var t=_ref.rects;var i="width"===_this4.sync||"both"===_this4.sync,e="height"===_this4.sync||"both"===_this4.sync;_this4.popup.style.width=i?"".concat(t.reference.width,"px"):"",_this4.popup.style.height=e?"".concat(t.reference.height,"px"):"";}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(s({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(a({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(o({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:function apply(_ref2){var t=_ref2.availableWidth,i=_ref2.availableHeight;"vertical"===_this4.autoSize||"both"===_this4.autoSize?_this4.style.setProperty("--auto-size-available-height","".concat(i,"px")):_this4.style.removeProperty("--auto-size-available-height"),"horizontal"===_this4.autoSize||"both"===_this4.autoSize?_this4.style.setProperty("--auto-size-available-width","".concat(t,"px")):_this4.style.removeProperty("--auto-size-available-width");}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(r({element:this.arrowEl,padding:this.arrowPadding}));var i="absolute"===this.strategy?function(t){return n.getOffsetParent(t,b);}:n.getOffsetParent;h(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:_objectSpread(_objectSpread({},n),{},{getOffsetParent:i})}).then(function(_ref3){var t=_ref3.x,i=_ref3.y,e=_ref3.middlewareData,s=_ref3.placement;var a="rtl"===getComputedStyle(_this4).direction,o={top:"bottom",right:"left",bottom:"top",left:"right"}[s.split("-")[0]];if(_this4.setAttribute("data-current-placement",s),Object.assign(_this4.popup.style,{left:"".concat(t,"px"),top:"".concat(i,"px")}),_this4.arrow){var _t3=e.arrow.x,_i3=e.arrow.y;var _s="",_r="",_n="",_h="";if("start"===_this4.arrowPlacement){var _e="number"==typeof _t3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";_s="number"==typeof _i3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"",_r=a?_e:"",_h=a?"":_e;}else if("end"===_this4.arrowPlacement){var _e2="number"==typeof _t3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";_r=a?"":_e2,_h=a?_e2:"",_n="number"==typeof _i3?"calc(".concat(_this4.arrowPadding,"px - var(--arrow-padding-offset))"):"";}else"center"===_this4.arrowPlacement?(_h="number"==typeof _t3?"calc(50% - var(--arrow-size-diagonal))":"",_s="number"==typeof _i3?"calc(50% - var(--arrow-size-diagonal))":""):(_h="number"==typeof _t3?"".concat(_t3,"px"):"",_s="number"==typeof _i3?"".concat(_i3,"px"):"");Object.assign(_this4.arrowEl.style,_defineProperty({top:_s,right:_r,bottom:_n,left:_h},o,"calc(var(--arrow-size-diagonal) * -1)"));}}),this.emit("reposition");}},{key:"render",value:function render(){return u(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <slot name=\"anchor\" @slotchange=","></slot>\n\n <div\n part=\"popup\"\n class=","\n >\n <slot></slot>\n ","\n </div>\n "])),this.handleAnchorChange,l({popup:!0,"popup--active":this.active,"popup--fixed":"fixed"===this.strategy,"popup--has-arrow":this.arrow}),this.arrow?u(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>"]))):"");}}]);}(f));y.styles=m,t([p(".popup")],y.prototype,"popup",void 0),t([p(".popup__arrow")],y.prototype,"arrowEl",void 0),t([c()],y.prototype,"anchor",void 0),t([c({type:Boolean,reflect:!0})],y.prototype,"active",void 0),t([c({reflect:!0})],y.prototype,"placement",void 0),t([c({reflect:!0})],y.prototype,"strategy",void 0),t([c({type:Number})],y.prototype,"distance",void 0),t([c({type:Number})],y.prototype,"skidding",void 0),t([c({type:Boolean})],y.prototype,"arrow",void 0),t([c({attribute:"arrow-placement"})],y.prototype,"arrowPlacement",void 0),t([c({attribute:"arrow-padding",type:Number})],y.prototype,"arrowPadding",void 0),t([c({type:Boolean})],y.prototype,"flip",void 0),t([c({attribute:"flip-fallback-placements",converter:{fromAttribute:function fromAttribute(t){return t.split(" ").map(function(t){return t.trim();}).filter(function(t){return""!==t;});},toAttribute:function toAttribute(t){return t.join(" ");}}})],y.prototype,"flipFallbackPlacements",void 0),t([c({attribute:"flip-fallback-strategy"})],y.prototype,"flipFallbackStrategy",void 0),t([c({type:Object})],y.prototype,"flipBoundary",void 0),t([c({attribute:"flip-padding",type:Number})],y.prototype,"flipPadding",void 0),t([c({type:Boolean})],y.prototype,"shift",void 0),t([c({type:Object})],y.prototype,"shiftBoundary",void 0),t([c({attribute:"shift-padding",type:Number})],y.prototype,"shiftPadding",void 0),t([c({attribute:"auto-size"})],y.prototype,"autoSize",void 0),t([c()],y.prototype,"sync",void 0),t([c({type:Object})],y.prototype,"autoSizeBoundary",void 0),t([c({attribute:"auto-size-padding",type:Number})],y.prototype,"autoSizePadding",void 0),_export("N",y=t([d("nile-popup")],y));}};});
2
2
  //# sourceMappingURL=nile-popup.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-popup.cjs.js","sources":["../../../../node_modules/composed-offset-position/dist/composed-offset-position.mjs","../../../src/nile-popup/nile-popup.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nfunction offsetParent(element) {\n return offsetParentPolyfill(element);\n}\nfunction offsetTop(element) {\n return offsetTopLeftPolyfill(element, 'offsetTop');\n}\nfunction offsetLeft(element) {\n return offsetTopLeftPolyfill(element, 'offsetLeft');\n}\nfunction flatTreeParent(element) {\n if (element.assignedSlot) {\n return element.assignedSlot;\n }\n if (element.parentNode instanceof ShadowRoot) {\n return element.parentNode.host;\n }\n return element.parentNode;\n}\nfunction ancestorTreeScopes(element) {\n const scopes = new Set();\n let currentScope = element.getRootNode();\n while (currentScope) {\n scopes.add(currentScope);\n currentScope = currentScope.parentNode\n ? currentScope.parentNode.getRootNode()\n : null;\n }\n return scopes;\n}\nfunction offsetParentPolyfill(element) {\n // Do an initial walk to check for display:none ancestors.\n for (let ancestor = element; ancestor; ancestor = flatTreeParent(ancestor)) {\n if (!(ancestor instanceof Element)) {\n continue;\n }\n if (getComputedStyle(ancestor).display === 'none') {\n return null;\n }\n }\n for (let ancestor = flatTreeParent(element); ancestor; ancestor = flatTreeParent(ancestor)) {\n if (!(ancestor instanceof Element)) {\n continue;\n }\n const style = getComputedStyle(ancestor);\n // Display:contents nodes aren't in the layout tree so they should be skipped.\n if (style.display === 'contents') {\n continue;\n }\n if (style.position !== 'static' || style.filter !== 'none') {\n return ancestor;\n }\n if (ancestor.tagName === 'BODY') {\n return ancestor;\n }\n }\n return null;\n}\nfunction offsetTopLeftPolyfill(element, offsetTopOrLeft) {\n let value = element[offsetTopOrLeft];\n let nextOffsetParent = offsetParentPolyfill(element);\n const scopes = ancestorTreeScopes(element);\n while (nextOffsetParent && !scopes.has(nextOffsetParent.getRootNode())) {\n value -= nextOffsetParent[offsetTopOrLeft];\n nextOffsetParent = offsetParentPolyfill(nextOffsetParent);\n }\n return value;\n}\n\nexport { offsetLeft, offsetParent, offsetTop };\n","/**\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, CSSResultArray, TemplateResult} from 'lit';\nimport { arrow, autoUpdate, computePosition, flip, offset, platform, shift, size } from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { offsetParent } from 'composed-offset-position';\nimport NileElement from '../internal/nile-element';\nimport {styles} from './nile-popup.css';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile icon component.\n *\n * @tag nile-popup\n *\n */\n@customElement('nile-popup')\nexport class NilePopup extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private anchorEl: Element | null;\n private cleanup: ReturnType<typeof autoUpdate> | undefined;\n\n /** A reference to the internal popup container. Useful for animating and styling the popup with JavaScript. */\n @query('.popup') popup: HTMLElement;\n @query('.popup__arrow') private arrowEl: HTMLElement;\n\n /**\n * The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide its `id` or a\n * reference to it here. If the anchor lives inside the popup, use the `anchor` slot instead.\n */\n @property() anchor: Element | string;\n\n /**\n * Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\n * down and the popup will be hidden.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /**\n * The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\n * panel inside of the viewport.\n */\n @property({ reflect: true }) placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /**\n * Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\n * clipped, using a `fixed` position strategy can often workaround it.\n */\n @property({ reflect: true }) strategy: 'absolute' | 'fixed' = 'absolute';\n\n /** The distance in pixels from which to offset the panel away from its anchor. */\n @property({ type: Number }) distance = 0;\n\n /** The distance in pixels from which to offset the panel along its anchor. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n * `--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n * `::part(arrow)` in your stylesheet.\n */\n @property({ type: Boolean }) arrow = false;\n\n /**\n * The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\n * anchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\n * align the arrow to the start, end, or center of the popover instead.\n */\n @property({ attribute: 'arrow-placement' }) arrowPlacement: 'start' | 'end' | 'center' | 'anchor' = 'anchor';\n\n /**\n * The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\n * this will prevent it from overflowing the corners.\n */\n @property({ attribute: 'arrow-padding', type: Number }) arrowPadding = 10;\n\n /**\n * When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n * `flipFallbackPlacements` to further configure how the fallback placement is determined.\n */\n @property({ type: Boolean }) flip = false;\n\n /**\n * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\n * string of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\n * fallback strategy will be used instead.\n * */\n @property({\n attribute: 'flip-fallback-placements',\n converter: {\n fromAttribute: (value: string) => {\n return value\n .split(' ')\n .map(p => p.trim())\n .filter(p => p !== '');\n },\n toAttribute: (value: []) => {\n return value.join(' ');\n }\n }\n })\n flipFallbackPlacements = '';\n\n /**\n * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\n * the popup should be positioned using the best available fit based on available space or as it was initially\n * preferred.\n */\n @property({ attribute: 'flip-fallback-strategy' }) flipFallbackStrategy: 'best-fit' | 'initial' = 'best-fit';\n\n /**\n * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) flipBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the flip behavior will occur. */\n @property({ attribute: 'flip-padding', type: Number }) flipPadding = 0;\n\n /** Moves the popup along the axis to keep it in view when clipped. */\n @property({ type: Boolean }) shift = false;\n\n /**\n * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) shiftBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the shift behavior will occur. */\n @property({ attribute: 'shift-padding', type: Number }) shiftPadding = 0;\n\n /** When set, this will cause the popup to automatically resize itself to prevent it from overflowing. */\n @property({ attribute: 'auto-size' }) autoSize: 'horizontal' | 'vertical' | 'both';\n\n /** Syncs the popup's width or height to that of the anchor element. */\n @property() sync: 'width' | 'height' | 'both';\n\n /**\n * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) autoSizeBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the auto-size behavior will occur. */\n @property({ attribute: 'auto-size-padding', type: Number }) autoSizePadding = 0;\n\n async connectedCallback() {\n super.connectedCallback();\n\n // Start the positioner after the first update\n await this.updateComplete;\n this.start();\n }\n\n disconnectedCallback() {\n this.stop();\n }\n\n async updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n // Start or stop the positioner when active changes\n if (changedProps.has('active')) {\n if (this.active) {\n this.start();\n } else {\n this.stop();\n }\n }\n\n // Update the anchor when anchor changes\n if (changedProps.has('anchor')) {\n this.handleAnchorChange();\n }\n\n // All other properties will trigger a reposition when active\n if (this.active) {\n await this.updateComplete;\n this.reposition();\n }\n }\n\n private async handleAnchorChange() {\n await this.stop();\n\n if (this.anchor && typeof this.anchor === 'string') {\n // Locate the anchor by id\n const root = this.getRootNode() as Document | ShadowRoot;\n this.anchorEl = root.getElementById(this.anchor);\n } else if (this.anchor instanceof Element) {\n // Use the anchor's reference\n this.anchorEl = this.anchor;\n } else {\n // Look for a slotted anchor\n this.anchorEl = this.querySelector<HTMLElement>('[slot=\"anchor\"]');\n }\n\n // If the anchor is a <slot>, we'll use the first assigned element as the target since slots use `display: contents`\n // and positioning can't be calculated on them\n if (this.anchorEl instanceof HTMLSlotElement) {\n this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n /**\n * NOTE TO DEVELOPERS:\n * The anchor element is essential for nile-popup to function correctly.\n * This error was thrown when an anchor (slot=\"anchor\") or anchor reference was not found.\n *\n * In many places, developers are using *ngIf or similar conditional rendering directly on the anchor slot\n * inside <nile-tooltip>, which removes the anchor from the DOM.\n * As a result, the tooltip remains but cannot be anchored — leading to this error.\n *\n * Suggested Fixes:\n * - Move *ngIf to a wrapper above <nile-tooltip>\n * - OR use the 'disabled' property of nile-tooltip to prevent it from activating without anchor\n *\n * For now, this error is commented out to avoid runtime crashes.\n * Proper usage patterns should be followed instead.\n */\n if (!this.anchorEl) {\n // throw new Error(\n // 'Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.'\n // );\n return;\n }\n\n this.start();\n }\n\n private start() {\n // We can't start the positioner without an anchor\n if (!this.anchorEl) {\n return;\n }\n\n this.cleanup = autoUpdate(this.anchorEl, this.popup, () => {\n this.reposition();\n });\n }\n\n private async stop(): Promise<void> {\n return new Promise(resolve => {\n if (this.cleanup) {\n this.cleanup();\n this.cleanup = undefined;\n this.removeAttribute('data-current-placement');\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n requestAnimationFrame(() => resolve());\n } else {\n resolve();\n }\n });\n }\n\n /** Forces the popup to recalculate and reposition itself. */\n reposition() {\n // Nothing to do if the popup is inactive or the anchor doesn't exist\n if (!this.active || !this.anchorEl) {\n return;\n }\n\n //\n // NOTE: Floating UI middlewares are order dependent: https://floating-ui.com/docs/middleware\n //\n const middleware = [\n // The offset middleware goes first\n offset({ mainAxis: this.distance, crossAxis: this.skidding })\n ];\n\n // First we sync width/height\n if (this.sync) {\n middleware.push(\n size({\n apply: ({ rects }) => {\n const syncWidth = this.sync === 'width' || this.sync === 'both';\n const syncHeight = this.sync === 'height' || this.sync === 'both';\n this.popup.style.width = syncWidth ? `${rects.reference.width}px` : '';\n this.popup.style.height = syncHeight ? `${rects.reference.height}px` : '';\n }\n })\n );\n } else {\n // Cleanup styles if we're not matching width/height\n this.popup.style.width = '';\n this.popup.style.height = '';\n }\n\n // Then we flip\n if (this.flip) {\n middleware.push(\n flip({\n boundary: this.flipBoundary,\n // @ts-expect-error - We're converting a string attribute to an array here\n fallbackPlacements: this.flipFallbackPlacements,\n fallbackStrategy: this.flipFallbackStrategy === 'best-fit' ? 'bestFit' : 'initialPlacement',\n padding: this.flipPadding\n })\n );\n }\n\n // Then we shift\n if (this.shift) {\n middleware.push(\n shift({\n boundary: this.shiftBoundary,\n padding: this.shiftPadding\n })\n );\n }\n\n // Now we adjust the size as needed\n if (this.autoSize) {\n middleware.push(\n size({\n boundary: this.autoSizeBoundary,\n padding: this.autoSizePadding,\n apply: ({ availableWidth, availableHeight }) => {\n if (this.autoSize === 'vertical' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-height', `${availableHeight}px`);\n } else {\n this.style.removeProperty('--auto-size-available-height');\n }\n\n if (this.autoSize === 'horizontal' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-width', `${availableWidth}px`);\n } else {\n this.style.removeProperty('--auto-size-available-width');\n }\n }\n })\n );\n } else {\n // Cleanup styles if we're no longer using auto-size\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n }\n\n // Finally, we add an arrow\n if (this.arrow) {\n middleware.push(\n arrow({\n element: this.arrowEl,\n padding: this.arrowPadding\n })\n );\n }\n\n //\n // Use custom positioning logic if the strategy is absolute. Otherwise, fall back to the default logic.\n //\n //\n const getOffsetParent =\n this.strategy === 'absolute'\n ? (element: Element) => platform.getOffsetParent(element, offsetParent)\n : platform.getOffsetParent;\n\n computePosition(this.anchorEl, this.popup, {\n placement: this.placement,\n middleware,\n strategy: this.strategy,\n platform: {\n ...platform,\n getOffsetParent\n }\n }).then(({ x, y, middlewareData, placement }) => {\n //\n // Even though we have our own localization utility, it uses different heuristics to determine RTL. Because of\n // that, we'll use the same approach that Floating UI uses.\n //\n // Source: https://github.com/floating-ui/floating-ui/blob/cb3b6ab07f95275730d3e6e46c702f8d4908b55c/packages/dom/src/utils/getDocumentRect.ts#L31\n //\n const isRtl = getComputedStyle(this).direction === 'rtl';\n const staticSide = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }[placement.split('-')[0]]!;\n\n this.setAttribute('data-current-placement', placement);\n\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n\n if (this.arrow) {\n const arrowX = middlewareData.arrow!.x;\n const arrowY = middlewareData.arrow!.y;\n let top = '';\n let right = '';\n let bottom = '';\n let left = '';\n\n if (this.arrowPlacement === 'start') {\n // Start\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n top = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? value : '';\n left = isRtl ? '' : value;\n } else if (this.arrowPlacement === 'end') {\n // End\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? '' : value;\n left = isRtl ? value : '';\n bottom = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n } else if (this.arrowPlacement === 'center') {\n // Center\n left = typeof arrowX === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n top = typeof arrowY === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n } else {\n // Anchor (default)\n left = typeof arrowX === 'number' ? `${arrowX}px` : '';\n top = typeof arrowY === 'number' ? `${arrowY}px` : '';\n }\n\n Object.assign(this.arrowEl.style, {\n top,\n right,\n bottom,\n left,\n [staticSide]: 'calc(var(--arrow-size-diagonal) * -1)'\n });\n }\n });\n\n this.emit('reposition');\n }\n\n render() {\n return html`\n <slot name=\"anchor\" @slotchange=${this.handleAnchorChange}></slot>\n\n <div\n part=\"popup\"\n class=${classMap({\n popup: true,\n 'popup--active': this.active,\n 'popup--fixed': this.strategy === 'fixed',\n 'popup--has-arrow': this.arrow\n })}\n >\n <slot></slot>\n ${this.arrow ? html`<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>` : ''}\n </div>\n `;\n }\n}\n\nexport default NilePopup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-popup': NilePopup;\n }\n}\n"],"names":["offsetParent","element","ancestor","flatTreeParent","Element","getComputedStyle","display","style","position","filter","tagName","offsetParentPolyfill","assignedSlot","parentNode","ShadowRoot","host","setters","_tslib","NilePopup","y","this","active","placement","strategy","distance","skidding","arrow","arrowPlacement","arrowPadding","flip","flipFallbackPlacements","flipFallbackStrategy","flipPadding","shift","shiftPadding","autoSizePadding","_this","_inherits","_f","_createClass","key","value","_connectedCallback","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context2","prev","next","_superPropGet","updateComplete","start","stop","connectedCallback","disconnectedCallback","_updated","_callee2","changedProps","has","handleAnchorChange","reposition","_context3","updated","_callee3","_t2","_callee3$","_context4","anchor","root","getRootNode","anchorEl","getElementById","querySelector","HTMLSlotElement","assignedElements","flatten","cleanup","autoUpdate","popup","_stop","_callee4","_this3","_callee4$","_context5","abrupt","Promise","resolve","undefined","removeAttribute","removeProperty","requestAnimationFrame","_this4","middleware","offset","mainAxis","crossAxis","sync","push","size","apply","_ref","rects","syncWidth","syncHeight","width","reference","height","concat","boundary","flipBoundary","fallbackPlacements","fallbackStrategy","padding","shiftBoundary","autoSize","autoSizeBoundary","availableWidth","availableHeight","setProperty","arrowEl","getOffsetParent","platform","computePosition","then","_ref3","x","middlewareData","s","isRtl","direction","staticSide","top","right","bottom","left","split","setAttribute","Object","assign","arrowX","arrowY","_defineProperty","emit","render","html","_templateObject","_taggedTemplateLiteral","classMap","_templateObject2","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","Number","attribute","converter","fromAttribute","map","p","trim","toAttribute","join","_export","customElement"],"mappings":"8pYACA,QAASA,CAAAA,CAAAA,CAAaC,CAClB,CAAA,CAAA,MA4BJ,UAA8BA,CAE1B,CAAA,CAAA,IAAK,GAAIC,CAAAA,EAAAA,CAAWD,EAASC,EAAUA,CAAAA,EAAAA,CAAWC,EAAeD,EAC7D,CAAA,CAAA,GAAMA,aAAoBE,CAAAA,OAGiB,EAAA,MAAA,GAAvCC,gBAAiBH,CAAAA,EAAAA,CAAAA,CAAUI,QAC3B,MAAO,KAAA,CAGf,IAAK,GAAIJ,CAAAA,IAAWC,CAAeF,CAAAA,CAAAA,CAAAA,CAAUC,GAAUA,CAAAA,GAAAA,CAAWC,EAAeD,GAAW,CAAA,CAAA,CACxF,KAAMA,GAAoBE,WAAAA,CAAAA,OAAAA,CAAAA,CACtB,SAEJ,GAAMG,CAAAA,EAAAA,CAAQF,gBAAiBH,CAAAA,GAAAA,CAAAA,CAE/B,GAAsB,UAAlBK,GAAAA,EAAAA,CAAMD,OAAV,CAAA,CAGA,GAAuB,QAAnBC,GAAAA,EAAAA,CAAMC,QAA0C,EAAA,MAAA,GAAjBD,GAAME,MACrC,CAAA,MAAOP,CAAAA,IAEX,GAAyB,MAAA,GAArBA,IAASQ,OACT,CAAA,MAAOR,CAAAA,GALV,EAOJ,C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AAA,CAAA,IAAA,IAOfF,CAAA,CAAA,CAA3BG,CAAS,CAAA,CAAEC,IAAMlB,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA6C1H,CAAA0I,CAAAA,SAAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAGPF,CAAA,CAAA,CAAvDG,CAAS,CAAA,CAAEK,SAAW,CAAA,eAAA,CAAiBJ,IAAMG,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA2B/I,CAAA0I,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAGnCF,CAAA,CAAA,CAArCG,CAAS,CAAA,CAAEK,SAAW,CAAA,WAAA,CAAA,CAAA,CAAA,CAA4DhJ,CAAA0I,CAAAA,SAAAA,CAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAGvEF,EAAA,CAAXG,CAAAA,CAAAA,CAAAA,CAAAA,CAA6C3I,CAAA0I,CAAAA,SAAAA,CAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CAOlBF,CAAA,CAAA,CAA3BG,CAAS,CAAA,CAAEC,IAAMlB,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAgD1H,CAAA0I,CAAAA,SAAAA,CAAA,kBAAA,CAAA,IAAA,EAAA,CAAA,CAGNF,CAAA,CAAA,CAA3DG,CAAS,CAAA,CAAEK,SAAW,CAAA,mBAAA,CAAqBJ,IAAMG,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA8B/I,CAAA0I,CAAAA,SAAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAAc,OAAA,KA/IrExJ,CAASwI,CAAAA,CAAAA,CAAA,CADrBiB,CAAAA,CAAc,eACFzJ","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"nile-popup.cjs.js","sources":["../../../../node_modules/composed-offset-position/dist/composed-offset-position.mjs","../../../src/nile-popup/nile-popup.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nfunction offsetParent(element) {\n return offsetParentPolyfill(element);\n}\nfunction offsetTop(element) {\n return offsetTopLeftPolyfill(element, 'offsetTop');\n}\nfunction offsetLeft(element) {\n return offsetTopLeftPolyfill(element, 'offsetLeft');\n}\nfunction flatTreeParent(element) {\n if (element.assignedSlot) {\n return element.assignedSlot;\n }\n if (element.parentNode instanceof ShadowRoot) {\n return element.parentNode.host;\n }\n return element.parentNode;\n}\nfunction ancestorTreeScopes(element) {\n const scopes = new Set();\n let currentScope = element.getRootNode();\n while (currentScope) {\n scopes.add(currentScope);\n currentScope = currentScope.parentNode\n ? currentScope.parentNode.getRootNode()\n : null;\n }\n return scopes;\n}\nfunction offsetParentPolyfill(element) {\n // Do an initial walk to check for display:none ancestors.\n for (let ancestor = element; ancestor; ancestor = flatTreeParent(ancestor)) {\n if (!(ancestor instanceof Element)) {\n continue;\n }\n if (getComputedStyle(ancestor).display === 'none') {\n return null;\n }\n }\n for (let ancestor = flatTreeParent(element); ancestor; ancestor = flatTreeParent(ancestor)) {\n if (!(ancestor instanceof Element)) {\n continue;\n }\n const style = getComputedStyle(ancestor);\n // Display:contents nodes aren't in the layout tree so they should be skipped.\n if (style.display === 'contents') {\n continue;\n }\n if (style.position !== 'static' || style.filter !== 'none') {\n return ancestor;\n }\n if (ancestor.tagName === 'BODY') {\n return ancestor;\n }\n }\n return null;\n}\nfunction offsetTopLeftPolyfill(element, offsetTopOrLeft) {\n let value = element[offsetTopOrLeft];\n let nextOffsetParent = offsetParentPolyfill(element);\n const scopes = ancestorTreeScopes(element);\n while (nextOffsetParent && !scopes.has(nextOffsetParent.getRootNode())) {\n value -= nextOffsetParent[offsetTopOrLeft];\n nextOffsetParent = offsetParentPolyfill(nextOffsetParent);\n }\n return value;\n}\n\nexport { offsetLeft, offsetParent, offsetTop };\n","/**\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, CSSResultArray, TemplateResult} from 'lit';\nimport { arrow, autoUpdate, computePosition, flip, offset, platform, shift, size } from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { offsetParent } from 'composed-offset-position';\nimport NileElement from '../internal/nile-element';\nimport {styles} from './nile-popup.css';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile icon component.\n *\n * @tag nile-popup\n *\n */\n@customElement('nile-popup')\nexport class NilePopup extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private anchorEl: Element | null;\n private cleanup: ReturnType<typeof autoUpdate> | undefined;\n\n /** A reference to the internal popup container. Useful for animating and styling the popup with JavaScript. */\n @query('.popup') popup: HTMLElement;\n @query('.popup__arrow') private arrowEl: HTMLElement;\n\n /**\n * The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide its `id` or a\n * reference to it here. If the anchor lives inside the popup, use the `anchor` slot instead.\n */\n @property() anchor: Element | string;\n\n /**\n * Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\n * down and the popup will be hidden.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /**\n * The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\n * panel inside of the viewport.\n */\n @property({ reflect: true }) placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /**\n * Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\n * clipped, using a `fixed` position strategy can often workaround it.\n */\n @property({ reflect: true }) strategy: 'absolute' | 'fixed' = 'absolute';\n\n /** The distance in pixels from which to offset the panel away from its anchor. */\n @property({ type: Number }) distance = 0;\n\n /** The distance in pixels from which to offset the panel along its anchor. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n * `--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n * `::part(arrow)` in your stylesheet.\n */\n @property({ type: Boolean }) arrow = false;\n\n /**\n * The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\n * anchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\n * align the arrow to the start, end, or center of the popover instead.\n */\n @property({ attribute: 'arrow-placement' }) arrowPlacement: 'start' | 'end' | 'center' | 'anchor' = 'anchor';\n\n /**\n * The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\n * this will prevent it from overflowing the corners.\n */\n @property({ attribute: 'arrow-padding', type: Number }) arrowPadding = 10;\n\n /**\n * When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n * `flipFallbackPlacements` to further configure how the fallback placement is determined.\n */\n @property({ type: Boolean }) flip = false;\n\n /**\n * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\n * string of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\n * fallback strategy will be used instead.\n * */\n @property({\n attribute: 'flip-fallback-placements',\n converter: {\n fromAttribute: (value: string) => {\n return value\n .split(' ')\n .map(p => p.trim())\n .filter(p => p !== '');\n },\n toAttribute: (value: []) => {\n return value.join(' ');\n }\n }\n })\n flipFallbackPlacements = '';\n\n /**\n * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\n * the popup should be positioned using the best available fit based on available space or as it was initially\n * preferred.\n */\n @property({ attribute: 'flip-fallback-strategy' }) flipFallbackStrategy: 'best-fit' | 'initial' = 'best-fit';\n\n /**\n * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) flipBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the flip behavior will occur. */\n @property({ attribute: 'flip-padding', type: Number }) flipPadding = 0;\n\n /** Moves the popup along the axis to keep it in view when clipped. */\n @property({ type: Boolean }) shift = false;\n\n /**\n * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) shiftBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the shift behavior will occur. */\n @property({ attribute: 'shift-padding', type: Number }) shiftPadding = 0;\n\n /** When set, this will cause the popup to automatically resize itself to prevent it from overflowing. */\n @property({ attribute: 'auto-size' }) autoSize: 'horizontal' | 'vertical' | 'both';\n\n /** Syncs the popup's width or height to that of the anchor element. */\n @property() sync: 'width' | 'height' | 'both';\n\n /**\n * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) autoSizeBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the auto-size behavior will occur. */\n @property({ attribute: 'auto-size-padding', type: Number }) autoSizePadding = 0;\n\n async connectedCallback() {\n super.connectedCallback();\n\n // Start the positioner after the first update\n await this.updateComplete;\n this.start();\n }\n\n disconnectedCallback() {\n this.stop();\n }\n\n async updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n // Start or stop the positioner when active changes\n if (changedProps.has('active')) {\n if (this.active) {\n this.start();\n } else {\n this.stop();\n }\n }\n\n // Update the anchor when anchor changes\n if (changedProps.has('anchor')) {\n this.handleAnchorChange();\n }\n\n // All other properties will trigger a reposition when active\n if (this.active) {\n await this.updateComplete;\n this.reposition();\n }\n }\n\n private async handleAnchorChange() {\n await this.stop();\n\n if (this.anchor && typeof this.anchor === 'string') {\n // Locate the anchor by id\n const root = this.getRootNode() as Document | ShadowRoot;\n this.anchorEl = root.getElementById(this.anchor);\n } else if (this.anchor instanceof Element) {\n // Use the anchor's reference\n this.anchorEl = this.anchor;\n } else {\n // Look for a slotted anchor\n this.anchorEl = this.querySelector<HTMLElement>('[slot=\"anchor\"]');\n }\n\n // If the anchor is a <slot>, we'll use the first assigned element as the target since slots use `display: contents`\n // and positioning can't be calculated on them\n if (this.anchorEl instanceof HTMLSlotElement) {\n this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n /**\n * NOTE TO DEVELOPERS:\n * The anchor element is essential for nile-popup to function correctly.\n * This error was thrown when an anchor (slot=\"anchor\") or anchor reference was not found.\n *\n * In many places, developers are using *ngIf or similar conditional rendering directly on the anchor slot\n * inside <nile-tooltip>, which removes the anchor from the DOM.\n * As a result, the tooltip remains but cannot be anchored — leading to this error.\n *\n * Suggested Fixes:\n * - Move *ngIf to a wrapper above <nile-tooltip>\n * - OR use the 'disabled' property of nile-tooltip to prevent it from activating without anchor\n *\n * For now, this error is commented out to avoid runtime crashes.\n * Proper usage patterns should be followed instead.\n */\n if (!this.anchorEl) {\n // throw new Error(\n // 'Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.'\n // );\n return;\n }\n\n this.start();\n }\n\n private start() {\n // We can't start the positioner without an anchor\n if (!this.anchorEl) {\n return;\n }\n\n this.cleanup = autoUpdate(this.anchorEl, this.popup, () => {\n this.reposition();\n });\n }\n\n private async stop(): Promise<void> {\n return new Promise(resolve => {\n if (this.cleanup) {\n this.cleanup();\n this.cleanup = undefined;\n this.removeAttribute('data-current-placement');\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n requestAnimationFrame(() => resolve());\n } else {\n resolve();\n }\n });\n }\n\n /** Forces the popup to recalculate and reposition itself. */\n reposition() {\n // Nothing to do if the popup is inactive or the anchor doesn't exist\n if (!this.active || !this.anchorEl) {\n return;\n }\n\n //\n // NOTE: Floating UI middlewares are order dependent: https://floating-ui.com/docs/middleware\n //\n const middleware = [\n // The offset middleware goes first\n offset({ mainAxis: this.distance, crossAxis: this.skidding })\n ];\n\n // First we sync width/height\n if (this.sync) {\n middleware.push(\n size({\n apply: ({ rects }) => {\n const syncWidth = this.sync === 'width' || this.sync === 'both';\n const syncHeight = this.sync === 'height' || this.sync === 'both';\n this.popup.style.width = syncWidth ? `${rects.reference.width}px` : '';\n this.popup.style.height = syncHeight ? `${rects.reference.height}px` : '';\n }\n })\n );\n } else {\n // Cleanup styles if we're not matching width/height\n this.popup.style.width = '';\n this.popup.style.height = '';\n }\n\n // Then we flip\n if (this.flip) {\n middleware.push(\n flip({\n boundary: this.flipBoundary,\n // @ts-expect-error - We're converting a string attribute to an array here\n fallbackPlacements: this.flipFallbackPlacements,\n fallbackStrategy: this.flipFallbackStrategy === 'best-fit' ? 'bestFit' : 'initialPlacement',\n padding: this.flipPadding\n })\n );\n }\n\n // Then we shift\n if (this.shift) {\n middleware.push(\n shift({\n boundary: this.shiftBoundary,\n padding: this.shiftPadding\n })\n );\n }\n\n // Now we adjust the size as needed\n if (this.autoSize) {\n middleware.push(\n size({\n boundary: this.autoSizeBoundary,\n padding: this.autoSizePadding,\n apply: ({ availableWidth, availableHeight }) => {\n if (this.autoSize === 'vertical' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-height', `${availableHeight}px`);\n } else {\n this.style.removeProperty('--auto-size-available-height');\n }\n\n if (this.autoSize === 'horizontal' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-width', `${availableWidth}px`);\n } else {\n this.style.removeProperty('--auto-size-available-width');\n }\n }\n })\n );\n } else {\n // Cleanup styles if we're no longer using auto-size\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n }\n\n // Finally, we add an arrow\n if (this.arrow) {\n middleware.push(\n arrow({\n element: this.arrowEl,\n padding: this.arrowPadding\n })\n );\n }\n\n //\n // Use custom positioning logic if the strategy is absolute. Otherwise, fall back to the default logic.\n //\n //\n const getOffsetParent =\n this.strategy === 'absolute'\n ? (element: Element) => platform.getOffsetParent(element, offsetParent)\n : platform.getOffsetParent;\n\n computePosition(this.anchorEl, this.popup, {\n placement: this.placement,\n middleware,\n strategy: this.strategy,\n platform: {\n ...platform,\n getOffsetParent\n }\n }).then(({ x, y, middlewareData, placement }) => {\n //\n // Even though we have our own localization utility, it uses different heuristics to determine RTL. Because of\n // that, we'll use the same approach that Floating UI uses.\n //\n // Source: https://github.com/floating-ui/floating-ui/blob/cb3b6ab07f95275730d3e6e46c702f8d4908b55c/packages/dom/src/utils/getDocumentRect.ts#L31\n //\n const isRtl = getComputedStyle(this).direction === 'rtl';\n const staticSide = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }[placement.split('-')[0]]!;\n\n this.setAttribute('data-current-placement', placement);\n\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n\n if (this.arrow) {\n const arrowX = middlewareData.arrow!.x;\n const arrowY = middlewareData.arrow!.y;\n let top = '';\n let right = '';\n let bottom = '';\n let left = '';\n\n if (this.arrowPlacement === 'start') {\n // Start\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n top = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? value : '';\n left = isRtl ? '' : value;\n } else if (this.arrowPlacement === 'end') {\n // End\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? '' : value;\n left = isRtl ? value : '';\n bottom = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n } else if (this.arrowPlacement === 'center') {\n // Center\n left = typeof arrowX === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n top = typeof arrowY === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n } else {\n // Anchor (default)\n left = typeof arrowX === 'number' ? `${arrowX}px` : '';\n top = typeof arrowY === 'number' ? `${arrowY}px` : '';\n }\n\n Object.assign(this.arrowEl.style, {\n top,\n right,\n bottom,\n left,\n [staticSide]: 'calc(var(--arrow-size-diagonal) * -1)'\n });\n }\n });\n\n this.emit('reposition');\n }\n\n render() {\n return html`\n <slot name=\"anchor\" @slotchange=${this.handleAnchorChange}></slot>\n\n <div\n part=\"popup\"\n class=${classMap({\n popup: true,\n 'popup--active': this.active,\n 'popup--fixed': this.strategy === 'fixed',\n 'popup--has-arrow': this.arrow\n })}\n >\n <slot></slot>\n ${this.arrow ? html`<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>` : ''}\n </div>\n `;\n }\n}\n\nexport default NilePopup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-popup': NilePopup;\n }\n}\n"],"names":["offsetParent","element","ancestor","flatTreeParent","Element","getComputedStyle","display","style","position","filter","tagName","offsetParentPolyfill","assignedSlot","parentNode","ShadowRoot","host","setters","_tslib","NilePopup","_f","y","this","active","placement","strategy","distance","skidding","arrow","arrowPlacement","arrowPadding","flip","flipFallbackPlacements","flipFallbackStrategy","flipPadding","shift","shiftPadding","autoSizePadding","_this","_inherits","_createClass","key","value","_connectedCallback","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context2","prev","next","_superPropGet","updateComplete","start","stop","connectedCallback","disconnectedCallback","_updated","_callee2","changedProps","super","has","handleAnchorChange","reposition","updated","_callee3","_t2","_callee3$","_context4","anchor","root","getRootNode","anchorEl","getElementById","querySelector","HTMLSlotElement","assignedElements","flatten","cleanup","autoUpdate","popup","_stop","_callee4","_this3","_callee4$","_context5","abrupt","Promise","resolve","undefined","removeAttribute","removeProperty","requestAnimationFrame","middleware","offset","mainAxis","crossAxis","sync","push","size","apply","t","_ref","rects","syncWidth","syncHeight","width","reference","height","boundary","flipBoundary","fallbackPlacements","fallbackStrategy","padding","shiftBoundary","autoSize","autoSizeBoundary","availableWidth","availableHeight","setProperty","arrowEl","getOffsetParent","platform","computePosition","then","_ref3","x","middlewareData","s","isRtl","direction","staticSide","top","right","bottom","left","split","setAttribute","Object","assign","concat","arrowX","arrowY","_defineProperty","emit","render","html","_templateObject","_taggedTemplateLiteral","classMap","_templateObject2","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","Number","attribute","converter","fromAttribute","map","p","trim","toAttribute","join","_export","customElement"],"mappings":"ozYACA,QAASA,CAAAA,EAAaC,CAClB,CAAA,CAAA,MA4BJ,UAA8BA,CAAAA,CAAAA,CAE1B,IAAK,GAAIC,CAAAA,EAAAA,CAAWD,EAASC,EAAUA,CAAAA,EAAAA,CAAWC,EAAeD,EAC7D,CAAA,CAAA,GAAMA,EAAoBE,WAAAA,CAAAA,OAAAA,EAGiB,SAAvCC,gBAAiBH,CAAAA,EAAAA,CAAAA,CAAUI,OAC3B,CAAA,MAAO,MAGf,IAAK,GAAIJ,CAAAA,GAAWC,CAAAA,CAAAA,CAAeF,GAAUC,GAAUA,CAAAA,GAAAA,CAAWC,EAAeD,GAAW,CAAA,CAAA,CACxF,KAAMA,GAAoBE,WAAAA,CAAAA,OAAAA,CAAAA,CACtB,SAEJ,GAAMG,CAAAA,GAAQF,gBAAiBH,CAAAA,GAAAA,CAAAA,CAE/B,GAAsB,UAAlBK,GAAAA,EAAAA,CAAMD,QAAV,CAGA,GAAuB,QAAnBC,GAAAA,EAAAA,CAAMC,UAA0C,MAAjBD,GAAAA,EAAAA,CAAME,OACrC,MAAOP,CAAAA,GAAAA,CAEX,GAAyB,MAArBA,GAAAA,GAAAA,CAASQ,OACT,CAAA,MAAOR,CAAAA,GALV,EAOJ,CACD,MAAO,KACX,EAvDWS,CAAqBV,CAAAA,CAChC,EAOA,QAASE,CAAAA,EAAeF,CACpB,CAAA,CAAA,MAAIA,CAAAA,EAAQW,YACDX,CAAAA,CAAAA,CAAQW,aAEfX,CAAQY,CAAAA,UAAAA,WAAsBC,CAAAA,UACvBb,CAAAA,CAAAA,CAAQY,WAAWE,IAEvBd,CAAAA,CAAAA,CAAQY,UACnB,ECMO,OAAAG,OAAA,WAAAC,MAAA,2yBAAMC,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEAoBuCC,KAAAA,CAAMC,MAAG,CAAA,CAAA,CA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CG,CAAS,CAAA,CAAEK,SAAW,CAAA,WAAA,CAAA,CAAA,CAAA,CAA4DhJ,CAAA0I,CAAAA,SAAAA,CAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAGvEF,EAAA,CAAXG,CAAAA,CAAAA,CAAAA,CAAAA,CAA6C3I,CAAA0I,CAAAA,SAAAA,CAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CAOlBF,CAAA,CAAA,CAA3BG,CAAS,CAAA,CAAEC,IAAMnB,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAgDzH,CAAA0I,CAAAA,SAAAA,CAAA,kBAAA,CAAA,IAAA,EAAA,CAAA,CAGNF,CAAA,CAAA,CAA3DG,CAAS,CAAA,CAAEK,SAAW,CAAA,mBAAA,CAAqBJ,IAAMG,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA8B/I,CAAA0I,CAAAA,SAAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAAc,OAAA,KA/IrExJ,CAASwI,CAAAA,CAAAA,CAAA,CADrBiB,CAAAA,CAAc,eACFzJ","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import{__decorate as t}from"tslib";import{b as i,o as e,f as s,a,s as o,d as r,p as h,c as n}from"../floating-ui.dom-cc9126da.esm.js";import{classMap as l}from"lit/directives/class-map.js";import{query as p,property as d,customElement as c}from"lit/decorators.js";import{html as u}from"lit";import{N as f}from"../internal/nile-element.esm.js";import{s as m}from"./nile-popup.css.esm.js";function b(t){return function(t){for(let i=t;i;i=v(i))if(i instanceof Element&&"none"===getComputedStyle(i).display)return null;for(let i=v(t);i;i=v(i)){if(!(i instanceof Element))continue;const t=getComputedStyle(i);if("contents"!==t.display){if("static"!==t.position||"none"!==t.filter)return i;if("BODY"===i.tagName)return i}}return null}(t)}function v(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}let y=class extends f{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){this.anchorEl&&(this.cleanup=i(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[e({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(o({apply:({rects:t})=>{const i="width"===this.sync||"both"===this.sync,e="height"===this.sync||"both"===this.sync;this.popup.style.width=i?`${t.reference.width}px`:"",this.popup.style.height=e?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(s({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(a({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(o({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:i})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${i}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(r({element:this.arrowEl,padding:this.arrowPadding}));const i="absolute"===this.strategy?t=>h.getOffsetParent(t,b):h.getOffsetParent;n(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...h,getOffsetParent:i}}).then((({x:t,y:i,middlewareData:e,placement:s})=>{const a="rtl"===getComputedStyle(this).direction,o={top:"bottom",right:"left",bottom:"top",left:"right"}[s.split("-")[0]];if(this.setAttribute("data-current-placement",s),Object.assign(this.popup.style,{left:`${t}px`,top:`${i}px`}),this.arrow){const t=e.arrow.x,i=e.arrow.y;let s="",r="",h="",n="";if("start"===this.arrowPlacement){const e="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";s="number"==typeof i?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",r=a?e:"",n=a?"":e}else if("end"===this.arrowPlacement){const e="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";r=a?"":e,n=a?e:"",h="number"==typeof i?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(n="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",s="number"==typeof i?"calc(50% - var(--arrow-size-diagonal))":""):(n="number"==typeof t?`${t}px`:"",s="number"==typeof i?`${i}px`:"");Object.assign(this.arrowEl.style,{top:s,right:r,bottom:h,left:n,[o]:"calc(var(--arrow-size-diagonal) * -1)"})}})),this.emit("reposition")}render(){return u`
1
+ import{__decorate as t}from"tslib";import{b as i,o as e,f as s,a,s as o,d as r,p as n,c as h}from"../floating-ui.dom-cc9126da.esm.js";import{classMap as l}from"lit/directives/class-map.js";import{query as p,property as c,customElement as d}from"lit/decorators.js";import{html as u}from"lit";import{N as f}from"../internal/nile-element.esm.js";import{s as m}from"./nile-popup.css.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";function b(t){return function(t){for(let i=t;i;i=v(i))if(i instanceof Element&&"none"===getComputedStyle(i).display)return null;for(let i=v(t);i;i=v(i)){if(!(i instanceof Element))continue;const t=getComputedStyle(i);if("contents"!==t.display){if("static"!==t.position||"none"!==t.filter)return i;if("BODY"===i.tagName)return i}}return null}(t)}function v(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}let y=class extends f{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){this.anchorEl&&(this.cleanup=i(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[e({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(o({apply:({rects:t})=>{const i="width"===this.sync||"both"===this.sync,e="height"===this.sync||"both"===this.sync;this.popup.style.width=i?`${t.reference.width}px`:"",this.popup.style.height=e?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(s({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(a({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(o({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:i})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${i}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(r({element:this.arrowEl,padding:this.arrowPadding}));const i="absolute"===this.strategy?t=>n.getOffsetParent(t,b):n.getOffsetParent;h(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...n,getOffsetParent:i}}).then((({x:t,y:i,middlewareData:e,placement:s})=>{const a="rtl"===getComputedStyle(this).direction,o={top:"bottom",right:"left",bottom:"top",left:"right"}[s.split("-")[0]];if(this.setAttribute("data-current-placement",s),Object.assign(this.popup.style,{left:`${t}px`,top:`${i}px`}),this.arrow){const t=e.arrow.x,i=e.arrow.y;let s="",r="",n="",h="";if("start"===this.arrowPlacement){const e="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";s="number"==typeof i?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",r=a?e:"",h=a?"":e}else if("end"===this.arrowPlacement){const e="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";r=a?"":e,h=a?e:"",n="number"==typeof i?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(h="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",s="number"==typeof i?"calc(50% - var(--arrow-size-diagonal))":""):(h="number"==typeof t?`${t}px`:"",s="number"==typeof i?`${i}px`:"");Object.assign(this.arrowEl.style,{top:s,right:r,bottom:n,left:h,[o]:"calc(var(--arrow-size-diagonal) * -1)"})}})),this.emit("reposition")}render(){return u`
2
2
  <slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
3
3
 
4
4
  <div
@@ -8,4 +8,4 @@ import{__decorate as t}from"tslib";import{b as i,o as e,f as s,a,s as o,d as r,p
8
8
  <slot></slot>
9
9
  ${this.arrow?u`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
10
10
  </div>
11
- `}};y.styles=m,t([p(".popup")],y.prototype,"popup",void 0),t([p(".popup__arrow")],y.prototype,"arrowEl",void 0),t([d()],y.prototype,"anchor",void 0),t([d({type:Boolean,reflect:!0})],y.prototype,"active",void 0),t([d({reflect:!0})],y.prototype,"placement",void 0),t([d({reflect:!0})],y.prototype,"strategy",void 0),t([d({type:Number})],y.prototype,"distance",void 0),t([d({type:Number})],y.prototype,"skidding",void 0),t([d({type:Boolean})],y.prototype,"arrow",void 0),t([d({attribute:"arrow-placement"})],y.prototype,"arrowPlacement",void 0),t([d({attribute:"arrow-padding",type:Number})],y.prototype,"arrowPadding",void 0),t([d({type:Boolean})],y.prototype,"flip",void 0),t([d({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],y.prototype,"flipFallbackPlacements",void 0),t([d({attribute:"flip-fallback-strategy"})],y.prototype,"flipFallbackStrategy",void 0),t([d({type:Object})],y.prototype,"flipBoundary",void 0),t([d({attribute:"flip-padding",type:Number})],y.prototype,"flipPadding",void 0),t([d({type:Boolean})],y.prototype,"shift",void 0),t([d({type:Object})],y.prototype,"shiftBoundary",void 0),t([d({attribute:"shift-padding",type:Number})],y.prototype,"shiftPadding",void 0),t([d({attribute:"auto-size"})],y.prototype,"autoSize",void 0),t([d()],y.prototype,"sync",void 0),t([d({type:Object})],y.prototype,"autoSizeBoundary",void 0),t([d({attribute:"auto-size-padding",type:Number})],y.prototype,"autoSizePadding",void 0),y=t([c("nile-popup")],y);export{y as N};
11
+ `}};y.styles=m,t([p(".popup")],y.prototype,"popup",void 0),t([p(".popup__arrow")],y.prototype,"arrowEl",void 0),t([c()],y.prototype,"anchor",void 0),t([c({type:Boolean,reflect:!0})],y.prototype,"active",void 0),t([c({reflect:!0})],y.prototype,"placement",void 0),t([c({reflect:!0})],y.prototype,"strategy",void 0),t([c({type:Number})],y.prototype,"distance",void 0),t([c({type:Number})],y.prototype,"skidding",void 0),t([c({type:Boolean})],y.prototype,"arrow",void 0),t([c({attribute:"arrow-placement"})],y.prototype,"arrowPlacement",void 0),t([c({attribute:"arrow-padding",type:Number})],y.prototype,"arrowPadding",void 0),t([c({type:Boolean})],y.prototype,"flip",void 0),t([c({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],y.prototype,"flipFallbackPlacements",void 0),t([c({attribute:"flip-fallback-strategy"})],y.prototype,"flipFallbackStrategy",void 0),t([c({type:Object})],y.prototype,"flipBoundary",void 0),t([c({attribute:"flip-padding",type:Number})],y.prototype,"flipPadding",void 0),t([c({type:Boolean})],y.prototype,"shift",void 0),t([c({type:Object})],y.prototype,"shiftBoundary",void 0),t([c({attribute:"shift-padding",type:Number})],y.prototype,"shiftPadding",void 0),t([c({attribute:"auto-size"})],y.prototype,"autoSize",void 0),t([c()],y.prototype,"sync",void 0),t([c({type:Object})],y.prototype,"autoSizeBoundary",void 0),t([c({attribute:"auto-size-padding",type:Number})],y.prototype,"autoSizePadding",void 0),y=t([d("nile-popup")],y);export{y as N};
@@ -1,2 +1,2 @@
1
- System.register(["./nile-progress-bar.cjs.js","tslib","lit","./nile-progress-bar.css.cjs.js","lit/decorators.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileProgressBarCjsJs){_export("NileProgressBar",_nileProgressBarCjsJs.N);},function(_tslib){},function(_lit){},function(_nileProgressBarCssCjsJs){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){}};});
1
+ System.register(["./nile-progress-bar.cjs.js","tslib","lit","./nile-progress-bar.css.cjs.js","lit/decorators.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileProgressBarCjsJs){_export("NileProgressBar",_nileProgressBarCjsJs.N);},function(_tslib){},function(_lit){},function(_nileProgressBarCssCjsJs){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- export{N as NileProgressBar}from"./nile-progress-bar.esm.js";import"tslib";import"lit";import"./nile-progress-bar.css.esm.js";import"lit/decorators.js";import"../internal/nile-element.esm.js";
1
+ export{N as NileProgressBar}from"./nile-progress-bar.esm.js";import"tslib";import"lit";import"./nile-progress-bar.css.esm.js";import"lit/decorators.js";import"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","./nile-progress-bar.css.cjs.js","lit/decorators.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,r,s,t,i,a,_templateObject,l;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){r=_lit.html;},function(_nileProgressBarCssCjsJs){s=_nileProgressBarCssCjsJs.s;},function(_litDecoratorsJs){t=_litDecoratorsJs.property;i=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_a){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.value=0;return _this;}_inherits(l,_a);return _createClass(l,[{key:"updated",value:function updated(e){e.has("value")&&((this.value<0||this.value>100)&&(console.error("[NileProgressBar]: Invalid value (".concat(this.value,") detected. Value must be between 0 and 100.")),this.value=0),100===this.value&&this.emit("nile-complete",{message:"Nile Progress reached 100%"}));}},{key:"render",value:function render(){return r(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div part=\"container\" class=\"nile-progress-bar__container\">\n <ul part=\"progress-bar\" class=\"nile-progress-bar__progress-bar\">\n <li part=\"remaining\"><span part=\"progress\" style=\"width: ","%\"></span></li>\n </ul>\n </div>\n "])),this.value);}}]);}(a));l.styles=s,e([t({type:Number,reflect:!0,attribute:!0})],l.prototype,"value",void 0),_export("N",l=e([i("nile-progress-bar")],l));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","./nile-progress-bar.css.cjs.js","lit/decorators.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var e,s,r,t,i,a,_templateObject,l;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){s=_lit.html;},function(_nileProgressBarCssCjsJs){r=_nileProgressBarCssCjsJs.s;},function(_litDecoratorsJs){t=_litDecoratorsJs.property;i=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_a){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.value=0;return _this;}_inherits(l,_a);return _createClass(l,[{key:"updated",value:function updated(e){e.has("value")&&((this.value<0||this.value>100)&&(console.error("[NileProgressBar]: Invalid value (".concat(this.value,") detected. Value must be between 0 and 100.")),this.value=0),100===this.value&&this.emit("nile-complete",{message:"Nile Progress reached 100%"}));}},{key:"render",value:function render(){return s(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div part=\"container\" class=\"nile-progress-bar__container\">\n <ul part=\"progress-bar\" class=\"nile-progress-bar__progress-bar\">\n <li part=\"remaining\"><span part=\"progress\" style=\"width: ","%\"></span></li>\n </ul>\n </div>\n "])),this.value);}}]);}(a));l.styles=r,e([t({type:Number,reflect:!0,attribute:!0})],l.prototype,"value",void 0),_export("N",l=e([i("nile-progress-bar")],l));}};});
2
2
  //# sourceMappingURL=nile-progress-bar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-progress-bar.cjs.js","sources":["../../../src/nile-progress-bar/nile-progress-bar.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultGroup } from 'lit';\nimport styles from './nile-progress-bar.css';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\n@customElement('nile-progress-bar')\nexport class NileProgressBar extends NileElement {\n static override styles: CSSResultGroup = styles;\n\n @property({ type: Number, reflect: true, attribute: true }) value = 0;\n\n override updated(changedProperties: Map<string, any>) {\n if (changedProperties.has('value')) {\n if (this.value < 0 || this.value > 100) {\n console.error(`[NileProgressBar]: Invalid value (${this.value}) detected. Value must be between 0 and 100.`);\n this.value = 0; \n }\n\n if (this.value === 100) {\n this.emit('nile-complete', { message: 'Nile Progress reached 100%' });\n }\n }\n }\n\n override render() {\n return html`\n <div part=\"container\" class=\"nile-progress-bar__container\">\n <ul part=\"progress-bar\" class=\"nile-progress-bar__progress-bar\">\n <li part=\"remaining\"><span part=\"progress\" style=\"width: ${this.value}%\"></span></li>\n </ul>\n </div>\n `;\n }\n}\n"],"names":["NileProgressBar","l","this","value","_this","_inherits","_a","_createClass","key","updated","changedProperties","has","console","error","emit","message","render","html","_templateObject","_taggedTemplateLiteral","NileElement","styles","__decorate","property","type","Number","reflect","attribute","prototype","_export","customElement"],"mappings":"2oGAKaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,qEAGuDC,EAAAA,KAAAA,CAAKC,KAAG,CAAA,CAwBrE,QAAAC,KAAA,EAtBUC,SAAA,CAAAJ,CAAA,CAAAK,EAAA,SAAAC,YAAA,CAAAN,CAAA,GAAAO,GAAA,WAAAL,KAAA,UAAAM,OAAAA,CAAQC,CAAAA,CAAAA,CACXA,CAAkBC,CAAAA,GAAAA,CAAI,YACpBT,IAAKC,CAAAA,KAAAA,CAAQ,CAAKD,EAAAA,IAAAA,CAAKC,KAAQ,CAAA,GAAA,IACjCS,OAAQC,CAAAA,KAAAA,sCAAAA,MAAAA,CAA2CX,IAAAA,CAAKC,KACxDD,gDAAAA,CAAAA,CAAAA,IAAAA,CAAKC,KAAQ,CAAA,CAAA,CAAA,CAGI,MAAfD,IAAKC,CAAAA,KAAAA,EACPD,IAAKY,CAAAA,IAAAA,CAAK,eAAiB,CAAA,CAAEC,OAAS,CAAA,4BAAA,CAAA,CAAA,CAG3C,EAEQ,GAAAP,GAAA,UAAAL,KAAA,UAAAa,MAAAA,CAAAA,CACP,CAAA,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,6RAGsDjB,IAAKC,CAAAA,KAAAA,EAIvE,CAzBeH,MADmBoB,CAA9B,GACWpB,CAAAA,CAAMqB,OAAmBA,CAEmBC,CAAAA,CAAAA,CAAA,CAA3DC,CAAS,CAAA,CAAEC,IAAMC,CAAAA,MAAAA,CAAQC,OAAS,CAAA,CAAA,CAAA,CAAMC,WAAW,CAAkB3B,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4B,UAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CAAAC,OAAA,KAH3D7B,EAAesB,CAAA,CAAA,CAD3BQ,CAAc,CAAA,mBAAA,CAAA,CAAA,CACF9B"}
1
+ {"version":3,"file":"nile-progress-bar.cjs.js","sources":["../../../src/nile-progress-bar/nile-progress-bar.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultGroup } from 'lit';\nimport styles from './nile-progress-bar.css';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\n@customElement('nile-progress-bar')\nexport class NileProgressBar extends NileElement {\n static override styles: CSSResultGroup = styles;\n\n @property({ type: Number, reflect: true, attribute: true }) value = 0;\n\n override updated(changedProperties: Map<string, any>) {\n if (changedProperties.has('value')) {\n if (this.value < 0 || this.value > 100) {\n console.error(`[NileProgressBar]: Invalid value (${this.value}) detected. Value must be between 0 and 100.`);\n this.value = 0; \n }\n\n if (this.value === 100) {\n this.emit('nile-complete', { message: 'Nile Progress reached 100%' });\n }\n }\n }\n\n override render() {\n return html`\n <div part=\"container\" class=\"nile-progress-bar__container\">\n <ul part=\"progress-bar\" class=\"nile-progress-bar__progress-bar\">\n <li part=\"remaining\"><span part=\"progress\" style=\"width: ${this.value}%\"></span></li>\n </ul>\n </div>\n `;\n }\n}\n"],"names":["NileProgressBar","l","constructor","this","value","_this","_inherits","_a","_createClass","key","updated","changedProperties","has","console","error","concat","emit","message","render","html","_templateObject","_taggedTemplateLiteral","NileElement","styles","__decorate","property","type","Number","reflect","attribute","prototype","_export","customElement"],"mappings":"87GAKaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAGuDC,KAAAA,CAAKC,KAAAA,CAAG,CAwBrE,QAAAC,KAAA,EAtBUC,SAAA,CAAAL,CAAA,CAAAM,EAAA,SAAAC,YAAA,CAAAP,CAAA,GAAAQ,GAAA,WAAAL,KAAA,UAAAM,OAAAA,CAAQC,CACXA,CAAAA,CAAAA,CAAAA,CAAkBC,IAAI,OACpBT,CAAAA,GAAAA,CAAAA,IAAAA,CAAKC,KAAQ,CAAA,CAAA,EAAKD,IAAKC,CAAAA,KAAAA,CAAQ,GACjCS,IAAAA,OAAAA,CAAQC,KAAM,sCAAAC,MAAA,CAAqCZ,IAAKC,CAAAA,KAAAA,gDAAAA,CAAAA,CACxDD,IAAKC,CAAAA,KAAAA,CAAQ,CAGI,CAAA,CAAA,GAAA,GAAfD,IAAKC,CAAAA,KAAAA,EACPD,IAAKa,CAAAA,IAAAA,CAAK,eAAiB,CAAA,CAAEC,OAAS,CAAA,4BAAA,CAAA,CAAA,CAG3C,EAEQ,GAAAR,GAAA,UAAAL,KAAA,UAAAc,MAAAA,CAAAA,CACP,CAAA,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,6RAGsDlB,IAAKC,CAAAA,KAAAA,EAIvE,CAzBeJ,MADmBsB,CAAAA,GACnBtB,CAAAA,CAAMuB,OAAmBA,CAEmBC,CAAAA,CAAAA,CAAA,CAA3DC,CAAS,CAAA,CAAEC,IAAMC,CAAAA,MAAAA,CAAQC,OAAS,CAAA,CAAA,CAAA,CAAMC,WAAW,CAAkB7B,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8B,UAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CAAAC,OAAA,KAH3D/B,EAAewB,CAAA,CAAA,CAD3BQ,CAAc,CAAA,mBAAA,CAAA,CAAA,CACFhC"}
@@ -1,7 +1,7 @@
1
- import{__decorate as e}from"tslib";import{html as r}from"lit";import{s}from"./nile-progress-bar.css.esm.js";import{property as t,customElement as i}from"lit/decorators.js";import{N as a}from"../internal/nile-element.esm.js";let l=class extends a{constructor(){super(...arguments),this.value=0}updated(e){e.has("value")&&((this.value<0||this.value>100)&&(console.error(`[NileProgressBar]: Invalid value (${this.value}) detected. Value must be between 0 and 100.`),this.value=0),100===this.value&&this.emit("nile-complete",{message:"Nile Progress reached 100%"}))}render(){return r`
1
+ import{__decorate as e}from"tslib";import{html as s}from"lit";import{s as r}from"./nile-progress-bar.css.esm.js";import{property as t,customElement as i}from"lit/decorators.js";import{N as a}from"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let l=class extends a{constructor(){super(...arguments),this.value=0}updated(e){e.has("value")&&((this.value<0||this.value>100)&&(console.error(`[NileProgressBar]: Invalid value (${this.value}) detected. Value must be between 0 and 100.`),this.value=0),100===this.value&&this.emit("nile-complete",{message:"Nile Progress reached 100%"}))}render(){return s`
2
2
  <div part="container" class="nile-progress-bar__container">
3
3
  <ul part="progress-bar" class="nile-progress-bar__progress-bar">
4
4
  <li part="remaining"><span part="progress" style="width: ${this.value}%"></span></li>
5
5
  </ul>
6
6
  </div>
7
- `}};l.styles=s,e([t({type:Number,reflect:!0,attribute:!0})],l.prototype,"value",void 0),l=e([i("nile-progress-bar")],l);export{l as N};
7
+ `}};l.styles=r,e([t({type:Number,reflect:!0,attribute:!0})],l.prototype,"value",void 0),l=e([i("nile-progress-bar")],l);export{l as N};
@@ -1,2 +1,2 @@
1
- System.register(["./nile-qr-code.cjs.js","tslib","lit","lit/decorators.js","./nile-qr-code.css.cjs.js","./nile-qr-code-utils.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileQrCodeCjsJs){_export("NileQrCode",_nileQrCodeCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileQrCodeCssCjsJs){},function(_nileQrCodeUtilsCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){}};});
1
+ System.register(["./nile-qr-code.cjs.js","tslib","lit","lit/decorators.js","./nile-qr-code.css.cjs.js","./nile-qr-code-utils.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileQrCodeCjsJs){_export("NileQrCode",_nileQrCodeCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileQrCodeCssCjsJs){},function(_nileQrCodeUtilsCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- export{N as NileQrCode}from"./nile-qr-code.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-qr-code.css.esm.js";import"./nile-qr-code-utils.esm.js";import"../internal/nile-element.esm.js";
1
+ export{N as NileQrCode}from"./nile-qr-code.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-qr-code.css.esm.js";import"./nile-qr-code-utils.esm.js";import"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-qr-code.css.cjs.js","./nile-qr-code-utils.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,i,e,r,s,a,n,o,_templateObject,h;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;},function(_litDecoratorsJs){e=_litDecoratorsJs.property;r=_litDecoratorsJs.query;s=_litDecoratorsJs.customElement;},function(_nileQrCodeCssCjsJs){a=_nileQrCodeCssCjsJs.s;},function(_nileQrCodeUtilsCjsJs){n=_nileQrCodeUtilsCjsJs.g;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",h=/*#__PURE__*/function(_o){function h(){var _this;_classCallCheck(this,h);_this=_callSuper(this,h,arguments),_this.value="",_this.size=128,_this.fill="black",_this.background="white",_this.radius=0,_this.errorCorrection="H",_this.label="",_this.image="",_this.imageSize=.25,_this.imagePadding=4,_this.imageRadius=4,_this.fillGradient="",_this._loadedImage=null,_this._imageLoadPromise=null;return _this;}_inherits(h,_o);return _createClass(h,[{key:"updated",value:function updated(t){if(_superPropGet(h,"updated",this,3)([t]),t.has("image")&&(this._loadedImage=null,this._imageLoadPromise=null,this.image))return void this.loadImage(this.image);["value","size","fill","background","radius","errorCorrection","imageSize","imagePadding","imageRadius","fillGradient"].some(function(i){return t.has(i);})&&this.drawQrCode();}},{key:"render",value:function render(){var t=this.label||this.value||"QR Code";return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <canvas\n part=\"base\"\n role=\"img\"\n aria-label=","\n width=","\n height=","\n ></canvas>\n "])),t,this.size,this.size);}},{key:"download",value:function download(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"qr-code.png";if(!this.canvas)return;var i=document.createElement("a");i.download=t,i.href=this.canvas.toDataURL("image/png"),i.click();}},{key:"toDataURL",value:function toDataURL(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"image/png";return this.canvas?this.canvas.toDataURL(t):"";}},{key:"loadImage",value:function loadImage(t){var _this2=this;var i=new Image();i.crossOrigin="anonymous",this._imageLoadPromise=new Promise(function(e){i.onload=function(){_this2._loadedImage=i,_this2._imageLoadPromise=null,_this2.drawQrCode(),e();},i.onerror=function(){_this2._loadedImage=null,_this2._imageLoadPromise=null,_this2.emit("nile-qr-image-error",{src:t}),_this2.drawQrCode(),e();};}),i.src=t;}},{key:"drawQrCode",value:function drawQrCode(){if(!this.canvas)return;var t=this.canvas.getContext("2d");if(!t)return;var i=this.size,e=this.fill,r=this.background,s=this.radius,a=this.errorCorrection,o=this.value,_h=Math.max(0,Math.min(.5,s)),l=n(o,a),d=l.length,c=i/d;t.clearRect(0,0,i,i),r&&"transparent"!==r&&(t.fillStyle=r,t.fillRect(0,0,i,i));var u=Math.max(.1,Math.min(.4,this.imageSize)),m=this._loadedImage?i*u:0,f=m+(this._loadedImage?2*this.imagePadding:0),g=(i-f)/2,p=g+f,v=this.resolveModuleFill(t,i);t.fillStyle=v;for(var _i=0;_i<d;_i++)for(var _e=0;_e<d;_e++){if(1!==l[_i][_e])continue;var _r=_e*c,_s=_i*c;if(this._loadedImage){if(_r>=g&&_r+c<=p&&_s>=g&&_s+c<=p)continue;}_h>0?this.drawRoundedModule(t,_r,_s,c,c,_h*c):t.fillRect(_r,_s,c,c);}this._loadedImage&&this.drawCenterImage(t,i,m);}},{key:"resolveModuleFill",value:function resolveModuleFill(t,i){if(!this.fillGradient)return this.fill;var e=this.fillGradient.split(",").map(function(t){return t.trim();});if(e.length<3)return this.fill;var r=parseFloat(e[0]);if(Number.isNaN(r))return this.fill;var s=r*Math.PI/180,a=i/2,n=i/2,o=i/2,_h2=a-Math.cos(s)*o,l=n-Math.sin(s)*o,d=a+Math.cos(s)*o,c=n+Math.sin(s)*o,u=t.createLinearGradient(_h2,l,d,c),m=e.slice(1);for(var _t=0;_t<m.length;_t++)u.addColorStop(_t/(m.length-1),m[_t]);return u;}},{key:"drawCenterImage",value:function drawCenterImage(t,i,e){if(!this._loadedImage)return;var r=(i-e)/2,s=(i-e)/2,a=Math.min(this.imageRadius,e/2),n=this.imagePadding;if(n>0&&this.background&&"transparent"!==this.background){t.fillStyle=this.background;var _i2=r-n,_o2=s-n,_h3=e+2*n,l=e+2*n,d=a+.5*n;this.drawRoundedRect(t,_i2,_o2,_h3,l,d),t.fill();}t.save(),this.clipRoundedRect(t,r,s,e,e,a),t.drawImage(this._loadedImage,r,s,e,e),t.restore();}},{key:"drawRoundedModule",value:function drawRoundedModule(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath(),t.fill();}},{key:"drawRoundedRect",value:function drawRoundedRect(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath();}},{key:"clipRoundedRect",value:function clipRoundedRect(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath(),t.clip();}}],[{key:"styles",get:function get(){return[a];}}]);}(o));t([e({type:String,reflect:!0})],h.prototype,"value",void 0),t([e({type:Number,reflect:!0})],h.prototype,"size",void 0),t([e({type:String,reflect:!0})],h.prototype,"fill",void 0),t([e({type:String,reflect:!0})],h.prototype,"background",void 0),t([e({type:Number,reflect:!0})],h.prototype,"radius",void 0),t([e({attribute:"error-correction",reflect:!0})],h.prototype,"errorCorrection",void 0),t([e({type:String,reflect:!0})],h.prototype,"label",void 0),t([e({type:String,reflect:!0})],h.prototype,"image",void 0),t([e({attribute:"image-size",type:Number,reflect:!0})],h.prototype,"imageSize",void 0),t([e({attribute:"image-padding",type:Number,reflect:!0})],h.prototype,"imagePadding",void 0),t([e({attribute:"image-radius",type:Number,reflect:!0})],h.prototype,"imageRadius",void 0),t([e({attribute:"fill-gradient",type:String,reflect:!0})],h.prototype,"fillGradient",void 0),t([r("canvas")],h.prototype,"canvas",void 0),_export("N",h=t([s("nile-qr-code")],h));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-qr-code.css.cjs.js","./nile-qr-code-utils.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,i,e,r,s,a,n,o,_templateObject,l;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;},function(_litDecoratorsJs){e=_litDecoratorsJs.property;r=_litDecoratorsJs.query;s=_litDecoratorsJs.customElement;},function(_nileQrCodeCssCjsJs){a=_nileQrCodeCssCjsJs.s;},function(_nileQrCodeUtilsCjsJs){n=_nileQrCodeUtilsCjsJs.g;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_o){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.value="",_this.size=128,_this.fill="black",_this.background="white",_this.radius=0,_this.errorCorrection="H",_this.label="",_this.image="",_this.imageSize=.25,_this.imagePadding=4,_this.imageRadius=4,_this.fillGradient="",_this._loadedImage=null,_this._imageLoadPromise=null;return _this;}_inherits(l,_o);return _createClass(l,[{key:"updated",value:function updated(t){if(_superPropGet(l,"updated",this,3)([t]),t.has("image")&&(this._loadedImage=null,this._imageLoadPromise=null,this.image))return void this.loadImage(this.image);["value","size","fill","background","radius","errorCorrection","imageSize","imagePadding","imageRadius","fillGradient"].some(function(i){return t.has(i);})&&this.drawQrCode();}},{key:"render",value:function render(){var t=this.label||this.value||"QR Code";return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <canvas\n part=\"base\"\n role=\"img\"\n aria-label=","\n width=","\n height=","\n ></canvas>\n "])),t,this.size,this.size);}},{key:"download",value:function download(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"qr-code.png";if(!this.canvas)return;var i=document.createElement("a");i.download=t,i.href=this.canvas.toDataURL("image/png"),i.click();}},{key:"toDataURL",value:function toDataURL(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"image/png";return this.canvas?this.canvas.toDataURL(t):"";}},{key:"loadImage",value:function loadImage(t){var _this2=this;var i=new Image();i.crossOrigin="anonymous",this._imageLoadPromise=new Promise(function(e){i.onload=function(){_this2._loadedImage=i,_this2._imageLoadPromise=null,_this2.drawQrCode(),e();},i.onerror=function(){_this2._loadedImage=null,_this2._imageLoadPromise=null,_this2.emit("nile-qr-image-error",{src:t}),_this2.drawQrCode(),e();};}),i.src=t;}},{key:"drawQrCode",value:function drawQrCode(){if(!this.canvas)return;var t=this.canvas.getContext("2d");if(!t)return;var i=this.size,e=this.fill,r=this.background,s=this.radius,a=this.errorCorrection,o=this.value,_l=Math.max(0,Math.min(.5,s)),h=n(o,a),c=h.length,d=i/c;t.clearRect(0,0,i,i),r&&"transparent"!==r&&(t.fillStyle=r,t.fillRect(0,0,i,i));var u=Math.max(.1,Math.min(.4,this.imageSize)),m=this._loadedImage?i*u:0,f=m+(this._loadedImage?2*this.imagePadding:0),g=(i-f)/2,p=g+f,b=this.resolveModuleFill(t,i);t.fillStyle=b;for(var _i=0;_i<c;_i++)for(var _e=0;_e<c;_e++){if(1!==h[_i][_e])continue;var _r=_e*d,_s=_i*d;if(this._loadedImage){if(_r>=g&&_r+d<=p&&_s>=g&&_s+d<=p)continue;}_l>0?this.drawRoundedModule(t,_r,_s,d,d,_l*d):t.fillRect(_r,_s,d,d);}this._loadedImage&&this.drawCenterImage(t,i,m);}},{key:"resolveModuleFill",value:function resolveModuleFill(t,i){if(!this.fillGradient)return this.fill;var e=this.fillGradient.split(",").map(function(t){return t.trim();});if(e.length<3)return this.fill;var r=parseFloat(e[0]);if(Number.isNaN(r))return this.fill;var s=r*Math.PI/180,a=i/2,n=i/2,o=i/2,_l2=a-Math.cos(s)*o,h=n-Math.sin(s)*o,c=a+Math.cos(s)*o,d=n+Math.sin(s)*o,u=t.createLinearGradient(_l2,h,c,d),m=e.slice(1);for(var _t=0;_t<m.length;_t++)u.addColorStop(_t/(m.length-1),m[_t]);return u;}},{key:"drawCenterImage",value:function drawCenterImage(t,i,e){if(!this._loadedImage)return;var r=(i-e)/2,s=(i-e)/2,a=Math.min(this.imageRadius,e/2),n=this.imagePadding;if(n>0&&this.background&&"transparent"!==this.background){t.fillStyle=this.background;var _i2=r-n,_o2=s-n,_l3=e+2*n,h=e+2*n,c=a+.5*n;this.drawRoundedRect(t,_i2,_o2,_l3,h,c),t.fill();}t.save(),this.clipRoundedRect(t,r,s,e,e,a),t.drawImage(this._loadedImage,r,s,e,e),t.restore();}},{key:"drawRoundedModule",value:function drawRoundedModule(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath(),t.fill();}},{key:"drawRoundedRect",value:function drawRoundedRect(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath();}},{key:"clipRoundedRect",value:function clipRoundedRect(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath(),t.clip();}}],[{key:"styles",get:function get(){return[a];}}]);}(o));t([e({type:String,reflect:!0})],l.prototype,"value",void 0),t([e({type:Number,reflect:!0})],l.prototype,"size",void 0),t([e({type:String,reflect:!0})],l.prototype,"fill",void 0),t([e({type:String,reflect:!0})],l.prototype,"background",void 0),t([e({type:Number,reflect:!0})],l.prototype,"radius",void 0),t([e({attribute:"error-correction",reflect:!0})],l.prototype,"errorCorrection",void 0),t([e({type:String,reflect:!0})],l.prototype,"label",void 0),t([e({type:String,reflect:!0})],l.prototype,"image",void 0),t([e({attribute:"image-size",type:Number,reflect:!0})],l.prototype,"imageSize",void 0),t([e({attribute:"image-padding",type:Number,reflect:!0})],l.prototype,"imagePadding",void 0),t([e({attribute:"image-radius",type:Number,reflect:!0})],l.prototype,"imageRadius",void 0),t([e({attribute:"fill-gradient",type:String,reflect:!0})],l.prototype,"fillGradient",void 0),t([r("canvas")],l.prototype,"canvas",void 0),_export("N",l=t([s("nile-qr-code")],l));}};});
2
2
  //# sourceMappingURL=nile-qr-code.cjs.js.map