@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 +1 @@
1
- {"version":3,"file":"portal-utils.cjs.js","sources":["../../../src/nile-select/portal-utils.ts"],"sourcesContent":["import { \n type Placement,\n type MiddlewareData,\n type ComputePositionConfig,\n type Boundary\n} from '@floating-ui/dom';\n\nexport class PortalUtils {\n static calculateAvailableSpace(referenceElement: HTMLElement): {\n spaceAbove: number;\n spaceBelow: number;\n viewportHeight: number;\n } {\n const rect = referenceElement.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - rect.bottom;\n const spaceAbove = rect.top;\n \n return { spaceAbove, spaceBelow, viewportHeight };\n }\n\n static getOptimalPlacement(referenceElement: HTMLElement): Placement {\n const { spaceAbove, spaceBelow } = this.calculateAvailableSpace(referenceElement);\n \n if (spaceBelow < 200 && spaceAbove > spaceBelow) {\n return 'top';\n }\n \n return 'bottom';\n }\n\n static findBoundaryElements(component: HTMLElement): Element[] | undefined {\n const boundaryElements: Element[] = [];\n \n let currentElement = component.parentElement;\n \n while (currentElement && currentElement !== document.body) {\n const computedStyle = window.getComputedStyle(currentElement);\n const overflow = computedStyle.overflow;\n const overflowY = computedStyle.overflowY;\n const overflowX = computedStyle.overflowX;\n \n if (overflow === 'auto' || overflow === 'scroll' || \n overflowY === 'auto' || overflowY === 'scroll' ||\n overflowX === 'auto' || overflowX === 'scroll') {\n boundaryElements.push(currentElement);\n }\n \n if (currentElement.hasAttribute('data-floating-boundary') ||\n currentElement.classList.contains('floating-boundary') ||\n currentElement.classList.contains('scroll-container')) {\n boundaryElements.push(currentElement);\n }\n \n currentElement = currentElement.parentElement;\n }\n \n return boundaryElements.length > 0 ? boundaryElements : undefined;\n }\n\n static calculateOptimalHeight(\n referenceRect: { x: number; y: number; width: number; height: number },\n viewportHeight: number,\n placement: Placement\n ): number {\n const spaceBelow = viewportHeight - (referenceRect.y + referenceRect.height);\n const spaceAbove = referenceRect.y;\n \n if (spaceAbove > spaceBelow) {\n return Math.max(spaceAbove - 20, 100);\n }\n else if (spaceBelow > spaceAbove) {\n return Math.max(spaceBelow - 20, 100);\n }\n \n return Math.max(Math.min(spaceAbove, spaceBelow) - 20, 100);\n }\n\n static extractStylesAsCSS(styles: any): string {\n if (typeof styles === 'string') {\n return styles;\n }\n \n if (Array.isArray(styles)) {\n return styles.map(style => this.extractStylesAsCSS(style)).join('\\n');\n }\n \n if (styles && typeof styles === 'object' && styles.cssText) {\n return styles.cssText;\n }\n \n return '';\n }\n\n static generateStyleId(): string {\n return `nile-select-styles-${Math.random().toString(36).substring(2, 11)}`;\n }\n\n static isPositioningOptimal(\n placement: Placement,\n referenceElement: HTMLElement\n ): boolean {\n const { spaceAbove, spaceBelow } = this.calculateAvailableSpace(referenceElement);\n \n const isAbove = placement.startsWith('top');\n const isBelow = placement.startsWith('bottom');\n \n if (isAbove && spaceBelow > spaceAbove) return false;\n if (isBelow && spaceAbove > spaceBelow) return false;\n \n return true;\n }\n\n static applyCollisionData(\n element: HTMLElement,\n middlewareData: MiddlewareData,\n placement: Placement\n ): void {\n if (middlewareData.flip) {\n const { overflows } = middlewareData.flip;\n \n element.setAttribute('data-placement', placement);\n \n if (overflows && overflows.length > 0) {\n const overflowPlacements = overflows.map(overflow => overflow.placement).join(',');\n element.setAttribute('data-overflow', overflowPlacements);\n } else {\n element.removeAttribute('data-overflow');\n }\n }\n\n if (middlewareData.shift) {\n const { x, y } = middlewareData.shift;\n \n if (x !== undefined && y !== undefined && (x !== 0 || y !== 0)) {\n element.setAttribute('data-shift', `${x},${y}`);\n } else {\n element.removeAttribute('data-shift');\n }\n }\n\n if (middlewareData.size) {\n const { availableWidth, availableHeight } = middlewareData.size;\n \n if (availableWidth !== undefined) {\n element.setAttribute('data-available-width', availableWidth.toString());\n }\n if (availableHeight !== undefined) {\n element.setAttribute('data-available-height', availableHeight.toString());\n }\n }\n }\n\n static createFloatingUIMiddleware(\n boundary: Boundary,\n onSizeApply: (params: {\n availableWidth: number;\n availableHeight: number;\n elements: { floating: HTMLElement };\n rects: { reference: { x: number; y: number; width: number; height: number } };\n }) => void\n ): ComputePositionConfig['middleware'] {\n return [];\n }\n}\n\nexport class PortalContentUtils {\n static createBaseListbox(component: any): HTMLElement {\n const listbox = document.createElement('div');\n listbox.className = `select__listbox ${component.searchEnabled ? 'select__search-enabled ' : ''}`;\n listbox.setAttribute('tabindex', '-1');\n \n return listbox;\n }\n\n static addSearchSection(listbox: HTMLElement, component: any): void {\n if (!component.searchEnabled) return;\n\n const searchDiv = document.createElement('div');\n searchDiv.className = 'select__search';\n searchDiv.innerHTML = `\n <nile-input size=\"small\" clearable value=\"${component.searchValue}\" placeholder=\"${component.internalSearchPlaceHolder}\">\n <nile-icon name=\"var(--nile-icon-search, var(--ng-icon-search-lg))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" slot=\"suffix\"></nile-icon>\n </nile-input>\n `;\n listbox.appendChild(searchDiv);\n }\n\n static addLoadingSection(listbox: HTMLElement, component: any): void {\n if (!component.optionsLoading) return;\n\n const loaderSpan = document.createElement('span');\n loaderSpan.className = 'select__loader';\n loaderSpan.innerHTML = `\n <nile-icon class=\"select__loader--icon\" name=\"var(--nile-icon-button-loading-blue, var(--ng-icon-button-loading-blue))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"></nile-icon>\n `;\n listbox.appendChild(loaderSpan);\n }\n\n static addOptionsSection(listbox: HTMLElement, component: any): void {\n const optionsContainer = document.createElement('div');\n optionsContainer.className = `select__options ${component.searchEnabled ? 'select__options__search-enabled' : ''}`;\n \n this.addNoResultsMessage(optionsContainer, component);\n this.addClonedOptions(optionsContainer, component);\n \n listbox.appendChild(optionsContainer);\n }\n\n static addNoResultsMessage(container: HTMLElement, component: any): void {\n if (!component.showNoResults) return;\n\n const noResultsDiv = document.createElement('div');\n noResultsDiv.className = 'select__no-results';\n noResultsDiv.textContent = component.noResultsMessage;\n container.appendChild(noResultsDiv);\n }\n\n static addClonedOptions(container: HTMLElement, component: any): void {\n const options = Array.from(component.querySelectorAll('nile-option'));\n \n options.forEach((option: Element) => {\n const clonedOption = this.cloneOption(option as HTMLElement);\n container.appendChild(clonedOption);\n });\n }\n\n static cloneOption(option: HTMLElement): HTMLElement {\n const clonedOption = option.cloneNode(true) as HTMLElement;\n \n Array.from(option.attributes).forEach((attr: Attr) => {\n clonedOption.setAttribute(attr.name, attr.value);\n });\n \n this.copyOptionProperties(option, clonedOption);\n \n return clonedOption;\n }\n\n static copyOptionProperties(originalOption: HTMLElement, clonedOption: HTMLElement): void {\n const properties = ['selected', 'disabled', 'current', 'hidden'];\n \n properties.forEach(prop => {\n if ((originalOption as any)[prop] !== undefined) {\n (clonedOption as any)[prop] = (originalOption as any)[prop];\n }\n });\n }\n\n static addFooterSection(listbox: HTMLElement, component: any): void {\n if (!component.multiple) return;\n\n const footerDiv = this.createFooter(component);\n listbox.appendChild(footerDiv);\n }\n\n static createFooter(component: any): HTMLElement {\n const footerDiv = document.createElement('div');\n footerDiv.setAttribute('part', 'footer');\n footerDiv.className = 'select__footer';\n \n this.addShowSelectedToggle(footerDiv, component);\n this.addClearAllButton(footerDiv, component);\n \n return footerDiv;\n }\n\n static addShowSelectedToggle(footer: HTMLElement, component: any): void {\n const showSelectedSpan = document.createElement('span');\n showSelectedSpan.style.cursor = 'pointer';\n \n const checkbox = document.createElement('nile-checkbox');\n checkbox.disabled = component.selectedOptions.length === 0;\n checkbox.checked = component.showSelected;\n checkbox.innerHTML = '&nbsp; Show Selected';\n \n showSelectedSpan.appendChild(checkbox);\n footer.appendChild(showSelectedSpan);\n }\n\n static addClearAllButton(footer: HTMLElement, component: any): void {\n if (component.selectedOptions.length === 0) return;\n\n const clearAllSpan = document.createElement('span');\n clearAllSpan.className = 'select__clear';\n clearAllSpan.textContent = 'Clear All';\n clearAllSpan.style.cursor = 'pointer';\n footer.appendChild(clearAllSpan);\n }\n\n static updateClonedOptions(clonedListbox: HTMLElement, component: any): void {\n const optionsContainer = clonedListbox.querySelector('.select__options') as HTMLElement;\n if (!optionsContainer) return;\n\n const originalOptions = Array.from(component.querySelectorAll('nile-option'));\n \n const clonedOptions = Array.from(optionsContainer.querySelectorAll('nile-option'));\n \n originalOptions.forEach((originalOption: Element, index: number) => {\n const clonedOption = clonedOptions[index] as HTMLElement;\n if (clonedOption) {\n this.updateClonedOption(originalOption as HTMLElement, clonedOption);\n }\n });\n }\n\n static updateClonedOption(originalOption: HTMLElement, clonedOption: HTMLElement): void {\n (clonedOption as any).selected = (originalOption as any).selected;\n (clonedOption as any).disabled = (originalOption as any).disabled;\n (clonedOption as any).current = (originalOption as any).current;\n (clonedOption as any).hidden = (originalOption as any).hidden;\n \n this.updateClonedOptionAttributes(originalOption, clonedOption);\n }\n\n static updateClonedOptionAttributes(originalOption: HTMLElement, clonedOption: HTMLElement): void {\n const attributes = [\n { prop: 'selected', attr: 'selected' },\n { prop: 'disabled', attr: 'disabled' },\n { prop: 'current', attr: 'current' },\n { prop: 'hidden', attr: 'hidden' }\n ];\n\n attributes.forEach(({ prop, attr }) => {\n if ((originalOption as any)[prop]) {\n clonedOption.setAttribute(attr, '');\n } else {\n clonedOption.removeAttribute(attr);\n }\n });\n }\n\n static createPortalListbox(component: any): HTMLElement {\n const listbox = this.createBaseListbox(component);\n \n this.addSearchSection(listbox, component);\n this.addLoadingSection(listbox, component);\n this.addOptionsSection(listbox, component);\n this.addFooterSection(listbox, component);\n \n return listbox;\n }\n}\n\nexport class PortalEventUtils {\n static setupPortalEventListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n this.setupOptionClickListeners(clonedListbox, component);\n this.setupScrollListeners(clonedListbox, component);\n this.setupSearchListeners(clonedListbox, component);\n this.setupFooterListeners(clonedListbox, component);\n this.setupSlotListeners(clonedListbox, component);\n }\n\n static setupOptionClickListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n clonedListbox.addEventListener('mouseup', (event) => {\n const target = event.target as HTMLElement;\n const option = target.closest('nile-option');\n \n if (option) {\n this.handleOptionClick(option as HTMLElement, component);\n }\n });\n }\n\n static handleOptionClick(option: HTMLElement, component: any): void {\n const originalOption = component.querySelector(`nile-option[value=\"${option.getAttribute('value')}\"]`) as HTMLElement;\n if (originalOption) {\n const syntheticEvent = new MouseEvent('mouseup', {\n bubbles: true,\n cancelable: true,\n view: window\n });\n \n Object.defineProperty(syntheticEvent, 'target', {\n value: originalOption,\n writable: false\n });\n \n if (component.handleOptionClick) {\n component.handleOptionClick(syntheticEvent);\n }\n }\n }\n\n static setupScrollListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n clonedListbox.addEventListener('scroll', (event) => {\n if (component.handleScroll) {\n component.handleScroll(event);\n }\n });\n }\n\n static setupSearchListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n const searchInput = clonedListbox.querySelector('nile-input') as HTMLElement;\n if (searchInput) {\n searchInput.addEventListener('nile-input', (event) => {\n if (component.handleSearchChange) {\n component.handleSearchChange(event);\n }\n });\n \n searchInput.addEventListener('nile-focus', (event) => {\n if (component.handleSearchFocus) {\n component.handleSearchFocus();\n }\n });\n \n searchInput.addEventListener('nile-blur', (event) => {\n if (component.handleSearchBlur) {\n component.handleSearchBlur();\n }\n });\n }\n }\n\n static setupFooterListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n const footer = clonedListbox.querySelector('.select__footer') as HTMLElement;\n if (footer) {\n this.setupFooterClickHandlers(footer);\n this.setupShowSelectedToggle(footer, component);\n this.setupClearAllHandler(footer, component);\n }\n }\n\n static setupFooterClickHandlers(footer: HTMLElement): void {\n footer.addEventListener('click', (event) => {\n event.stopPropagation();\n event.preventDefault();\n });\n }\n\n static setupShowSelectedToggle(footer: HTMLElement, component: any): void {\n const showSelectedSpan = footer.querySelector('span[style*=\"cursor: pointer\"]');\n if (showSelectedSpan) {\n showSelectedSpan.addEventListener('click', (event) => {\n event.stopPropagation();\n event.preventDefault();\n if (component.toggleShowSelected) {\n component.toggleShowSelected(event);\n }\n });\n }\n }\n\n static setupClearAllHandler(footer: HTMLElement, component: any): void {\n footer.addEventListener('click', (event) => {\n const target = event.target as HTMLElement;\n if (target.classList.contains('select__clear')) {\n event.stopPropagation();\n event.preventDefault();\n if (component.unSlectAll) {\n component.unSlectAll();\n }\n }\n });\n }\n\n static setupSlotListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n const slot = clonedListbox.querySelector('slot');\n if (slot) {\n slot.addEventListener('slotchange', () => {\n if (component.updatePortalContent) {\n component.updatePortalContent();\n }\n });\n }\n }\n}\n"],"names":["PortalUtils","t","_classCallCheck","_createClass","key","value","calculateAvailableSpace","referenceElement","rect","getBoundingClientRect","viewportHeight","window","innerHeight","spaceBelow","bottom","spaceAbove","top","getOptimalPlacement","_this$calculateAvaila","this","findBoundaryElements","component","boundaryElements","currentElement","parentElement","document","body","computedStyle","getComputedStyle","overflow","overflowY","overflowX","push","hasAttribute","classList","contains","length","undefined","calculateOptimalHeight","referenceRect","placement","y","height","Math","max","min","extractStylesAsCSS","styles","Array","isArray","map","style","join","cssText","generateStyleId","concat","random","toString","substring","isPositioningOptimal","_this$calculateAvaila2","isAbove","startsWith","isBelow","applyCollisionData","element","middlewareData","flip","overflows","setAttribute","overflowPlacements","removeAttribute","shift","_e$shift","x","size","_e$size","availableWidth","availableHeight","createFloatingUIMiddleware","boundary","onSizeApply","PortalContentUtils","e","createBaseListbox","listbox","createElement","className","searchEnabled","addSearchSection","searchDiv","innerHTML","searchValue","internalSearchPlaceHolder","appendChild","addLoadingSection","optionsLoading","loaderSpan","addOptionsSection","optionsContainer","addNoResultsMessage","addClonedOptions","container","showNoResults","noResultsDiv","textContent","noResultsMessage","from","querySelectorAll","forEach","option","clonedOption","cloneOption","cloneNode","attributes","attr","name","copyOptionProperties","originalOption","prop","addFooterSection","multiple","footerDiv","createFooter","addShowSelectedToggle","addClearAllButton","footer","showSelectedSpan","cursor","checkbox","disabled","selectedOptions","checked","showSelected","clearAllSpan","updateClonedOptions","clonedListbox","_this3","querySelector","originalOptions","clonedOptions","index","updateClonedOption","selected","current","hidden","updateClonedOptionAttributes","_ref","createPortalListbox","_export","PortalEventUtils","setupPortalEventListeners","setupOptionClickListeners","setupScrollListeners","setupSearchListeners","setupFooterListeners","setupSlotListeners","addEventListener","event","target","closest","handleOptionClick","getAttribute","syntheticEvent","MouseEvent","bubbles","cancelable","view","Object","defineProperty","writable","handleScroll","searchInput","handleSearchChange","handleSearchFocus","handleSearchBlur","setupFooterClickHandlers","setupShowSelectedToggle","setupClearAllHandler","stopPropagation","preventDefault","toggleShowSelected","unSlectAll","slot","updatePortalContent"],"mappings":"itCAOaA,CACX,kCAAAC,EAAA,EAAAC,eAAA,MAAAD,CAAA,UAAAE,YAAA,CAAAF,CAAA,QAAAG,GAAA,2BAAAC,KAAA,CAAA,QAAA,CAAAC,uBAAOA,CAAwBC,EAAAA,CAAAA,CAK7B,GAAMC,CAAAA,CAAAA,CAAOD,EAAiBE,CAAAA,qBAAAA,CAAAA,CAAAA,CACxBC,CAAiBC,CAAAA,MAAAA,CAAOC,WACxBC,CAAAA,CAAAA,CAAaH,CAAiBF,CAAAA,CAAAA,CAAKM,MAGzC,CAAA,MAAO,CAAEC,UAAAA,CAFUP,CAAKQ,CAAAA,GAAAA,CAEHH,UAAYH,CAAAA,CAAAA,CAAAA,cAAAA,CAAAA,CAAAA,CAClC,EAED,GAAAN,GAAA,uBAAAC,KAAA,SAAA,CAAAY,m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C,KAAA,SAAO6K,CAAAA,oBAAAA,CAAqBpD,CAAqBzG,CAAAA,CAAAA,CAAAA,CAC/CyG,CAAO+B,CAAAA,gBAAAA,CAAiB,OAAUC,CAAAA,SAAAA,CAAAA,CAAAA,CACjBA,CAAMC,CAAAA,MAAAA,CACV7H,SAAUC,CAAAA,QAAAA,CAAS,eAC5B2H,CAAAA,GAAAA,CAAAA,CAAMqB,eACNrB,CAAAA,CAAAA,CAAAA,CAAAA,CAAMsB,cACF/J,CAAAA,CAAAA,CAAAA,CAAAA,CAAUiK,UACZjK,EAAAA,CAAAA,CAAUiK,UAEb,CAAA,CAAA,CAAA,EAAA,CAEJ,EAED,GAAAlL,GAAA,sBAAAC,KAAA,SAAA,CAAAuJ,kBAAOA,CAAmBpB,CAAAA,CAA4BnH,CACpD,CAAA,CAAA,GAAA,CAAKmH,CAAe,CAAA,OAEpB,GAAM+C,CAAAA,GAAAA,CAAO/C,CAAcE,CAAAA,aAAAA,CAAc,MACrC6C,CAAAA,CAAAA,GAAAA,EACFA,GAAK1B,CAAAA,gBAAAA,CAAiB,YAAc,CAAA,UAAA,CAC9BxI,CAAUmK,CAAAA,mBAAAA,EACZnK,CAAUmK,CAAAA,mBAAAA,CAAAA,CACX,EAGN,CAAA,EAAA"}
1
+ {"version":3,"file":"portal-utils.cjs.js","sources":["../../../src/nile-select/portal-utils.ts"],"sourcesContent":["import { \n type Placement,\n type MiddlewareData,\n type ComputePositionConfig,\n type Boundary\n} from '@floating-ui/dom';\n\nexport class PortalUtils {\n static calculateAvailableSpace(referenceElement: HTMLElement): {\n spaceAbove: number;\n spaceBelow: number;\n viewportHeight: number;\n } {\n const rect = referenceElement.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - rect.bottom;\n const spaceAbove = rect.top;\n \n return { spaceAbove, spaceBelow, viewportHeight };\n }\n\n static getOptimalPlacement(referenceElement: HTMLElement): Placement {\n const { spaceAbove, spaceBelow } = this.calculateAvailableSpace(referenceElement);\n \n if (spaceBelow < 200 && spaceAbove > spaceBelow) {\n return 'top';\n }\n \n return 'bottom';\n }\n\n static findBoundaryElements(component: HTMLElement): Element[] | undefined {\n const boundaryElements: Element[] = [];\n \n let currentElement = component.parentElement;\n \n while (currentElement && currentElement !== document.body) {\n const computedStyle = window.getComputedStyle(currentElement);\n const overflow = computedStyle.overflow;\n const overflowY = computedStyle.overflowY;\n const overflowX = computedStyle.overflowX;\n \n if (overflow === 'auto' || overflow === 'scroll' || \n overflowY === 'auto' || overflowY === 'scroll' ||\n overflowX === 'auto' || overflowX === 'scroll') {\n boundaryElements.push(currentElement);\n }\n \n if (currentElement.hasAttribute('data-floating-boundary') ||\n currentElement.classList.contains('floating-boundary') ||\n currentElement.classList.contains('scroll-container')) {\n boundaryElements.push(currentElement);\n }\n \n currentElement = currentElement.parentElement;\n }\n \n return boundaryElements.length > 0 ? boundaryElements : undefined;\n }\n\n static calculateOptimalHeight(\n referenceRect: { x: number; y: number; width: number; height: number },\n viewportHeight: number,\n placement: Placement\n ): number {\n const spaceBelow = viewportHeight - (referenceRect.y + referenceRect.height);\n const spaceAbove = referenceRect.y;\n \n if (spaceAbove > spaceBelow) {\n return Math.max(spaceAbove - 20, 100);\n }\n else if (spaceBelow > spaceAbove) {\n return Math.max(spaceBelow - 20, 100);\n }\n \n return Math.max(Math.min(spaceAbove, spaceBelow) - 20, 100);\n }\n\n static extractStylesAsCSS(styles: any): string {\n if (typeof styles === 'string') {\n return styles;\n }\n \n if (Array.isArray(styles)) {\n return styles.map(style => this.extractStylesAsCSS(style)).join('\\n');\n }\n \n if (styles && typeof styles === 'object' && styles.cssText) {\n return styles.cssText;\n }\n \n return '';\n }\n\n static generateStyleId(): string {\n return `nile-select-styles-${Math.random().toString(36).substring(2, 11)}`;\n }\n\n static isPositioningOptimal(\n placement: Placement,\n referenceElement: HTMLElement\n ): boolean {\n const { spaceAbove, spaceBelow } = this.calculateAvailableSpace(referenceElement);\n \n const isAbove = placement.startsWith('top');\n const isBelow = placement.startsWith('bottom');\n \n if (isAbove && spaceBelow > spaceAbove) return false;\n if (isBelow && spaceAbove > spaceBelow) return false;\n \n return true;\n }\n\n static applyCollisionData(\n element: HTMLElement,\n middlewareData: MiddlewareData,\n placement: Placement\n ): void {\n if (middlewareData.flip) {\n const { overflows } = middlewareData.flip;\n \n element.setAttribute('data-placement', placement);\n \n if (overflows && overflows.length > 0) {\n const overflowPlacements = overflows.map(overflow => overflow.placement).join(',');\n element.setAttribute('data-overflow', overflowPlacements);\n } else {\n element.removeAttribute('data-overflow');\n }\n }\n\n if (middlewareData.shift) {\n const { x, y } = middlewareData.shift;\n \n if (x !== undefined && y !== undefined && (x !== 0 || y !== 0)) {\n element.setAttribute('data-shift', `${x},${y}`);\n } else {\n element.removeAttribute('data-shift');\n }\n }\n\n if (middlewareData.size) {\n const { availableWidth, availableHeight } = middlewareData.size;\n \n if (availableWidth !== undefined) {\n element.setAttribute('data-available-width', availableWidth.toString());\n }\n if (availableHeight !== undefined) {\n element.setAttribute('data-available-height', availableHeight.toString());\n }\n }\n }\n\n static createFloatingUIMiddleware(\n boundary: Boundary,\n onSizeApply: (params: {\n availableWidth: number;\n availableHeight: number;\n elements: { floating: HTMLElement };\n rects: { reference: { x: number; y: number; width: number; height: number } };\n }) => void\n ): ComputePositionConfig['middleware'] {\n return [];\n }\n}\n\nexport class PortalContentUtils {\n static createBaseListbox(component: any): HTMLElement {\n const listbox = document.createElement('div');\n listbox.className = `select__listbox ${component.searchEnabled ? 'select__search-enabled ' : ''}`;\n listbox.setAttribute('tabindex', '-1');\n \n return listbox;\n }\n\n static addSearchSection(listbox: HTMLElement, component: any): void {\n if (!component.searchEnabled) return;\n\n const searchDiv = document.createElement('div');\n searchDiv.className = 'select__search';\n searchDiv.innerHTML = `\n <nile-input size=\"small\" clearable value=\"${component.searchValue}\" placeholder=\"${component.internalSearchPlaceHolder}\">\n <nile-icon name=\"var(--nile-icon-search, var(--ng-icon-search-lg))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" slot=\"suffix\"></nile-icon>\n </nile-input>\n `;\n listbox.appendChild(searchDiv);\n }\n\n static addLoadingSection(listbox: HTMLElement, component: any): void {\n if (!component.optionsLoading) return;\n\n const loaderSpan = document.createElement('span');\n loaderSpan.className = 'select__loader';\n loaderSpan.innerHTML = `\n <nile-icon class=\"select__loader--icon\" name=\"var(--nile-icon-button-loading-blue, var(--ng-icon-button-loading-blue))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"></nile-icon>\n `;\n listbox.appendChild(loaderSpan);\n }\n\n static addOptionsSection(listbox: HTMLElement, component: any): void {\n const optionsContainer = document.createElement('div');\n optionsContainer.className = `select__options ${component.searchEnabled ? 'select__options__search-enabled' : ''}`;\n \n this.addNoResultsMessage(optionsContainer, component);\n this.addClonedOptions(optionsContainer, component);\n \n listbox.appendChild(optionsContainer);\n }\n\n static addNoResultsMessage(container: HTMLElement, component: any): void {\n if (!component.showNoResults) return;\n\n const noResultsDiv = document.createElement('div');\n noResultsDiv.className = 'select__no-results';\n noResultsDiv.textContent = component.noResultsMessage;\n container.appendChild(noResultsDiv);\n }\n\n static addClonedOptions(container: HTMLElement, component: any): void {\n const options = Array.from(component.querySelectorAll('nile-option'));\n \n options.forEach((option: Element) => {\n const clonedOption = this.cloneOption(option as HTMLElement);\n container.appendChild(clonedOption);\n });\n }\n\n static cloneOption(option: HTMLElement): HTMLElement {\n const clonedOption = option.cloneNode(true) as HTMLElement;\n \n Array.from(option.attributes).forEach((attr: Attr) => {\n clonedOption.setAttribute(attr.name, attr.value);\n });\n \n this.copyOptionProperties(option, clonedOption);\n \n return clonedOption;\n }\n\n static copyOptionProperties(originalOption: HTMLElement, clonedOption: HTMLElement): void {\n const properties = ['selected', 'disabled', 'current', 'hidden'];\n \n properties.forEach(prop => {\n if ((originalOption as any)[prop] !== undefined) {\n (clonedOption as any)[prop] = (originalOption as any)[prop];\n }\n });\n }\n\n static addFooterSection(listbox: HTMLElement, component: any): void {\n const hasCustomFooter = component.querySelectorAll('[slot=\"pre-footer\"]').length > 0;\n const hasBuiltInFooter = component.multiple;\n\n if (!hasCustomFooter && !hasBuiltInFooter) return;\n\n const footerArea = document.createElement('div');\n footerArea.setAttribute('part', 'footer-area');\n footerArea.className = 'select__footer-area';\n\n if (hasCustomFooter) {\n this.addCustomFooter(footerArea, component);\n }\n\n if (hasBuiltInFooter) {\n const builtInFooter = this.createFooter(component);\n footerArea.appendChild(builtInFooter);\n }\n\n listbox.appendChild(footerArea);\n }\n\n static addCustomFooter(container: HTMLElement, component: any): void {\n const footerContent = Array.from(component.querySelectorAll('[slot=\"pre-footer\"]'));\n if (footerContent.length === 0) return;\n\n const customFooter = document.createElement('div');\n customFooter.className = 'select__custom-footer';\n customFooter.setAttribute('part', 'custom-footer');\n\n footerContent.forEach((el: Element) => {\n customFooter.appendChild(el.cloneNode(true));\n });\n\n customFooter.addEventListener('click', () => component.hide());\n\n container.appendChild(customFooter);\n }\n\n static createFooter(component: any): HTMLElement {\n const footerDiv = document.createElement('div');\n footerDiv.setAttribute('part', 'footer');\n footerDiv.className = 'select__footer';\n \n this.addShowSelectedToggle(footerDiv, component);\n this.addClearAllButton(footerDiv, component);\n \n return footerDiv;\n }\n\n static addShowSelectedToggle(footer: HTMLElement, component: any): void {\n const showSelectedSpan = document.createElement('span');\n showSelectedSpan.style.cursor = 'pointer';\n \n const checkbox = document.createElement('nile-checkbox');\n checkbox.disabled = component.selectedOptions.length === 0;\n checkbox.checked = component.showSelected;\n checkbox.innerHTML = '&nbsp; Show Selected';\n \n showSelectedSpan.appendChild(checkbox);\n footer.appendChild(showSelectedSpan);\n }\n\n static addClearAllButton(footer: HTMLElement, component: any): void {\n if (component.selectedOptions.length === 0) return;\n\n const clearAllSpan = document.createElement('span');\n clearAllSpan.className = 'select__clear';\n clearAllSpan.textContent = 'Clear All';\n clearAllSpan.style.cursor = 'pointer';\n footer.appendChild(clearAllSpan);\n }\n\n static updateClonedOptions(clonedListbox: HTMLElement, component: any): void {\n const optionsContainer = clonedListbox.querySelector('.select__options') as HTMLElement;\n if (!optionsContainer) return;\n\n const originalOptions = Array.from(component.querySelectorAll('nile-option'));\n \n const clonedOptions = Array.from(optionsContainer.querySelectorAll('nile-option'));\n \n originalOptions.forEach((originalOption: Element, index: number) => {\n const clonedOption = clonedOptions[index] as HTMLElement;\n if (clonedOption) {\n this.updateClonedOption(originalOption as HTMLElement, clonedOption);\n }\n });\n }\n\n static updateClonedOption(originalOption: HTMLElement, clonedOption: HTMLElement): void {\n (clonedOption as any).selected = (originalOption as any).selected;\n (clonedOption as any).disabled = (originalOption as any).disabled;\n (clonedOption as any).current = (originalOption as any).current;\n (clonedOption as any).hidden = (originalOption as any).hidden;\n \n this.updateClonedOptionAttributes(originalOption, clonedOption);\n }\n\n static updateClonedOptionAttributes(originalOption: HTMLElement, clonedOption: HTMLElement): void {\n const attributes = [\n { prop: 'selected', attr: 'selected' },\n { prop: 'disabled', attr: 'disabled' },\n { prop: 'current', attr: 'current' },\n { prop: 'hidden', attr: 'hidden' }\n ];\n\n attributes.forEach(({ prop, attr }) => {\n if ((originalOption as any)[prop]) {\n clonedOption.setAttribute(attr, '');\n } else {\n clonedOption.removeAttribute(attr);\n }\n });\n }\n\n static createPortalListbox(component: any): HTMLElement {\n const listbox = this.createBaseListbox(component);\n \n this.addSearchSection(listbox, component);\n this.addLoadingSection(listbox, component);\n this.addOptionsSection(listbox, component);\n this.addFooterSection(listbox, component);\n \n return listbox;\n }\n}\n\nexport class PortalEventUtils {\n static setupPortalEventListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n this.setupOptionClickListeners(clonedListbox, component);\n this.setupScrollListeners(clonedListbox, component);\n this.setupSearchListeners(clonedListbox, component);\n this.setupFooterListeners(clonedListbox, component);\n this.setupSlotListeners(clonedListbox, component);\n }\n\n static setupOptionClickListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n clonedListbox.addEventListener('mouseup', (event) => {\n const target = event.target as HTMLElement;\n const option = target.closest('nile-option');\n \n if (option) {\n this.handleOptionClick(option as HTMLElement, component);\n }\n });\n }\n\n static handleOptionClick(option: HTMLElement, component: any): void {\n const originalOption = component.querySelector(`nile-option[value=\"${option.getAttribute('value')}\"]`) as HTMLElement;\n if (originalOption) {\n const syntheticEvent = new MouseEvent('mouseup', {\n bubbles: true,\n cancelable: true,\n view: window\n });\n \n Object.defineProperty(syntheticEvent, 'target', {\n value: originalOption,\n writable: false\n });\n \n if (component.handleOptionClick) {\n component.handleOptionClick(syntheticEvent);\n }\n }\n }\n\n static setupScrollListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n clonedListbox.addEventListener('scroll', (event) => {\n if (component.handleScroll) {\n component.handleScroll(event);\n }\n });\n }\n\n static setupSearchListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n const searchInput = clonedListbox.querySelector('nile-input') as HTMLElement;\n if (searchInput) {\n searchInput.addEventListener('nile-input', (event) => {\n if (component.handleSearchChange) {\n component.handleSearchChange(event);\n }\n });\n \n searchInput.addEventListener('nile-focus', (event) => {\n if (component.handleSearchFocus) {\n component.handleSearchFocus();\n }\n });\n \n searchInput.addEventListener('nile-blur', (event) => {\n if (component.handleSearchBlur) {\n component.handleSearchBlur();\n }\n });\n }\n }\n\n static setupFooterListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n const footer = clonedListbox.querySelector('.select__footer') as HTMLElement;\n if (footer) {\n this.setupFooterClickHandlers(footer);\n this.setupShowSelectedToggle(footer, component);\n this.setupClearAllHandler(footer, component);\n }\n\n this.setupCustomFooterListeners(clonedListbox, component);\n }\n\n static setupCustomFooterListeners(clonedListbox: HTMLElement, component: any): void {\n const customFooter = clonedListbox.querySelector('.select__custom-footer') as HTMLElement;\n if (!customFooter) return;\n\n customFooter.addEventListener('click', (event) => {\n event.stopPropagation();\n });\n }\n\n static setupFooterClickHandlers(footer: HTMLElement): void {\n footer.addEventListener('click', (event) => {\n event.stopPropagation();\n event.preventDefault();\n });\n }\n\n static setupShowSelectedToggle(footer: HTMLElement, component: any): void {\n const showSelectedSpan = footer.querySelector('span[style*=\"cursor: pointer\"]');\n if (showSelectedSpan) {\n showSelectedSpan.addEventListener('click', (event) => {\n event.stopPropagation();\n event.preventDefault();\n if (component.toggleShowSelected) {\n component.toggleShowSelected(event);\n }\n });\n }\n }\n\n static setupClearAllHandler(footer: HTMLElement, component: any): void {\n footer.addEventListener('click', (event) => {\n const target = event.target as HTMLElement;\n if (target.classList.contains('select__clear')) {\n event.stopPropagation();\n event.preventDefault();\n if (component.unSlectAll) {\n component.unSlectAll();\n }\n }\n });\n }\n\n static setupSlotListeners(clonedListbox: HTMLElement, component: any): void {\n if (!clonedListbox) return;\n\n const slot = clonedListbox.querySelector('slot');\n if (slot) {\n slot.addEventListener('slotchange', () => {\n if (component.updatePortalContent) {\n component.updatePortalContent();\n }\n });\n }\n }\n}\n"],"names":["PortalUtils","t","_classCallCheck","_createClass","key","value","calculateAvailableSpace","referenceElement","rect","getBoundingClientRect","viewportHeight","window","innerHeight","spaceBelow","bottom","spaceAbove","top","getOptimalPlacement","_this$calculateAvaila","this","findBoundaryElements","component","boundaryElements","currentElement","parentElement","document","body","computedStyle","getComputedStyle","overflow","overflowY","overflowX","push","hasAttribute","classList","contains","length","undefined","calculateOptimalHeight","referenceRect","placement","y","height","Math","max","min","extractStylesAsCSS","styles","Array","isArray","map","style","join","_typeof","cssText","generateStyleId","concat","random","toString","substring","isPositioningOptimal","_this$calculateAvaila2","isAbove","startsWith","isBelow","applyCollisionData","element","middlewareData","flip","overflows","setAttribute","overflowPlacements","removeAttribute","shift","_e$shift","x","size","_e$size","availableWidth","availableHeight","createFloatingUIMiddleware","boundary","onSizeApply","_export","PortalContentUtils","createBaseListbox","listbox","createElement","className","searchEnabled","addSearchSection","searchDiv","innerHTML","searchValue","internalSearchPlaceHolder","appendChild","addLoadingSection","optionsLoading","loaderSpan","addOptionsSection","optionsContainer","addNoResultsMessage","addClonedOptions","container","showNoResults","noResultsDiv","textContent","noResultsMessage","from","querySelectorAll","forEach","option","clonedOption","cloneOption","cloneNode","attributes","attr","name","copyOptionProperties","originalOption","prop","addFooterSection","hasCustomFooter","hasBuiltInFooter","multiple","footerArea","addCustomFooter","builtInFooter","createFooter","footerContent","customFooter","el","addEventListener","hide","footerDiv","addShowSelectedToggle","addClearAllButton","footer","showSelectedSpan","cursor","checkbox","disabled","selectedOptions","checked","showSelected","clearAllSpan","updateClonedOptions","clonedListbox","querySelector","originalOptions","clonedOptions","index","updateClonedOption","selected","current","hidden","updateClonedOptionAttributes","_ref","createPortalListbox","PortalEventUtils","setupPortalEventListeners","setupOptionClickListeners","setupScrollListeners","setupSearchListeners","setupFooterListeners","setupSlotListeners","event","target","closest","handleOptionClick","getAttribute","syntheticEvent","MouseEvent","bubbles","cancelable","view","Object","defineProperty","writable","handleScroll","searchInput","handleSearchChange","handleSearchFocus","handleSearchBlur","setupFooterClickHandlers","setupShowSelectedToggle","setupClearAllHandler","setupCustomFooterListeners","stopPropagation","preventDefault","toggleShowSelected","unSlectAll","slot","updatePortalContent"],"mappings":"itCAOaA,CACX,kCAAAC,EAAA,EAAAC,eAAA,MAAAD,CAAA,UAAAE,YAAA,CAAAF,CAAA,QAAAG,GAAA,2BAAAC,KAAA,CAAA,QAAA,CAAAC,uBAAOA,CAAwBC,EAAAA,CAAAA,CAK7B,GAAMC,CAAAA,CAAAA,CAAOD,EAAiBE,CAAAA,qBAAAA,CAAAA,CAAAA,CACxBC,CAAiBC,CAAAA,MAAAA,CAAOC,WACxBC,CAAAA,CAAAA,CAAaH,EAAiBF,CAAKM,CAAAA,MAAAA,CAGzC,MAAO,CAAEC,UAFUP,CAAAA,CAAAA,CAAKQ,GAEHH,CAAAA,UAAAA,CAAAA,CAAAA,CAAYH,iBAClC,EAED,GAAAN,GAAA,uBAAAC,KAAA,SAAA,CAAAY,mBAAOA,CAAoBV,GAA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AMsB,CAAAA,eAAAA,CAAAA,CAAAA,CACNtB,CAAMuB,CAAAA,cAAAA,CAAAA,CAAAA,CACFxK,CAAU0K,CAAAA,UAAAA,EACZ1K,EAAU0K,UAEb,CAAA,CAAA,CAAA,EAAA,CAEJ,EAED,GAAA3L,GAAA,sBAAAC,KAAA,SAAA,CAAAgK,kBAAOA,CAAmBlB,CAAAA,CAA4B9H,CACpD,CAAA,CAAA,GAAA,CAAK8H,EAAe,OAEpB,GAAM6C,CAAAA,GAAO7C,CAAAA,CAAAA,CAAcC,aAAc,CAAA,MAAA,CAAA,CACrC4C,GACFA,EAAAA,GAAAA,CAAK5D,iBAAiB,YAAc,CAAA,UAAA,CAC9B/G,CAAU4K,CAAAA,mBAAAA,EACZ5K,CAAU4K,CAAAA,mBAAAA,CAAAA,CACX,EAGN,CAAA,EAAA"}
@@ -1 +1 @@
1
- class t{static calculateAvailableSpace(t){const e=t.getBoundingClientRect(),s=window.innerHeight,i=s-e.bottom;return{spaceAbove:e.top,spaceBelow:i,viewportHeight:s}}static getOptimalPlacement(t){const{spaceAbove:e,spaceBelow:s}=this.calculateAvailableSpace(t);return s<200&&e>s?"top":"bottom"}static findBoundaryElements(t){const e=[];let s=t.parentElement;for(;s&&s!==document.body;){const t=window.getComputedStyle(s),i=t.overflow,o=t.overflowY,n=t.overflowX;"auto"!==i&&"scroll"!==i&&"auto"!==o&&"scroll"!==o&&"auto"!==n&&"scroll"!==n||e.push(s),(s.hasAttribute("data-floating-boundary")||s.classList.contains("floating-boundary")||s.classList.contains("scroll-container"))&&e.push(s),s=s.parentElement}return e.length>0?e:void 0}static calculateOptimalHeight(t,e,s){const i=e-(t.y+t.height),o=t.y;return o>i?Math.max(o-20,100):i>o?Math.max(i-20,100):Math.max(Math.min(o,i)-20,100)}static extractStylesAsCSS(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>this.extractStylesAsCSS(t))).join("\n"):t&&"object"==typeof t&&t.cssText?t.cssText:""}static generateStyleId(){return`nile-select-styles-${Math.random().toString(36).substring(2,11)}`}static isPositioningOptimal(t,e){const{spaceAbove:s,spaceBelow:i}=this.calculateAvailableSpace(e),o=t.startsWith("top"),n=t.startsWith("bottom");return!(o&&i>s)&&!(n&&s>i)}static applyCollisionData(t,e,s){if(e.flip){const{overflows:i}=e.flip;if(t.setAttribute("data-placement",s),i&&i.length>0){const e=i.map((t=>t.placement)).join(",");t.setAttribute("data-overflow",e)}else t.removeAttribute("data-overflow")}if(e.shift){const{x:s,y:i}=e.shift;void 0===s||void 0===i||0===s&&0===i?t.removeAttribute("data-shift"):t.setAttribute("data-shift",`${s},${i}`)}if(e.size){const{availableWidth:s,availableHeight:i}=e.size;void 0!==s&&t.setAttribute("data-available-width",s.toString()),void 0!==i&&t.setAttribute("data-available-height",i.toString())}}static createFloatingUIMiddleware(t,e){return[]}}class e{static createBaseListbox(t){const e=document.createElement("div");return e.className="select__listbox "+(t.searchEnabled?"select__search-enabled ":""),e.setAttribute("tabindex","-1"),e}static addSearchSection(t,e){if(!e.searchEnabled)return;const s=document.createElement("div");s.className="select__search",s.innerHTML=`\n <nile-input size="small" clearable value="${e.searchValue}" placeholder="${e.internalSearchPlaceHolder}">\n <nile-icon name="var(--nile-icon-search, var(--ng-icon-search-lg))" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" slot="suffix"></nile-icon>\n </nile-input>\n `,t.appendChild(s)}static addLoadingSection(t,e){if(!e.optionsLoading)return;const s=document.createElement("span");s.className="select__loader",s.innerHTML='\n <nile-icon class="select__loader--icon" name="var(--nile-icon-button-loading-blue, var(--ng-icon-button-loading-blue))" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))"></nile-icon>\n ',t.appendChild(s)}static addOptionsSection(t,e){const s=document.createElement("div");s.className="select__options "+(e.searchEnabled?"select__options__search-enabled":""),this.addNoResultsMessage(s,e),this.addClonedOptions(s,e),t.appendChild(s)}static addNoResultsMessage(t,e){if(!e.showNoResults)return;const s=document.createElement("div");s.className="select__no-results",s.textContent=e.noResultsMessage,t.appendChild(s)}static addClonedOptions(t,e){Array.from(e.querySelectorAll("nile-option")).forEach((e=>{const s=this.cloneOption(e);t.appendChild(s)}))}static cloneOption(t){const e=t.cloneNode(!0);return Array.from(t.attributes).forEach((t=>{e.setAttribute(t.name,t.value)})),this.copyOptionProperties(t,e),e}static copyOptionProperties(t,e){["selected","disabled","current","hidden"].forEach((s=>{void 0!==t[s]&&(e[s]=t[s])}))}static addFooterSection(t,e){if(!e.multiple)return;const s=this.createFooter(e);t.appendChild(s)}static createFooter(t){const e=document.createElement("div");return e.setAttribute("part","footer"),e.className="select__footer",this.addShowSelectedToggle(e,t),this.addClearAllButton(e,t),e}static addShowSelectedToggle(t,e){const s=document.createElement("span");s.style.cursor="pointer";const i=document.createElement("nile-checkbox");i.disabled=0===e.selectedOptions.length,i.checked=e.showSelected,i.innerHTML="&nbsp; Show Selected",s.appendChild(i),t.appendChild(s)}static addClearAllButton(t,e){if(0===e.selectedOptions.length)return;const s=document.createElement("span");s.className="select__clear",s.textContent="Clear All",s.style.cursor="pointer",t.appendChild(s)}static updateClonedOptions(t,e){const s=t.querySelector(".select__options");if(!s)return;const i=Array.from(e.querySelectorAll("nile-option")),o=Array.from(s.querySelectorAll("nile-option"));i.forEach(((t,e)=>{const s=o[e];s&&this.updateClonedOption(t,s)}))}static updateClonedOption(t,e){e.selected=t.selected,e.disabled=t.disabled,e.current=t.current,e.hidden=t.hidden,this.updateClonedOptionAttributes(t,e)}static updateClonedOptionAttributes(t,e){[{prop:"selected",attr:"selected"},{prop:"disabled",attr:"disabled"},{prop:"current",attr:"current"},{prop:"hidden",attr:"hidden"}].forEach((({prop:s,attr:i})=>{t[s]?e.setAttribute(i,""):e.removeAttribute(i)}))}static createPortalListbox(t){const e=this.createBaseListbox(t);return this.addSearchSection(e,t),this.addLoadingSection(e,t),this.addOptionsSection(e,t),this.addFooterSection(e,t),e}}class s{static setupPortalEventListeners(t,e){t&&(this.setupOptionClickListeners(t,e),this.setupScrollListeners(t,e),this.setupSearchListeners(t,e),this.setupFooterListeners(t,e),this.setupSlotListeners(t,e))}static setupOptionClickListeners(t,e){t&&t.addEventListener("mouseup",(t=>{const s=t.target.closest("nile-option");s&&this.handleOptionClick(s,e)}))}static handleOptionClick(t,e){const s=e.querySelector(`nile-option[value="${t.getAttribute("value")}"]`);if(s){const t=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window});Object.defineProperty(t,"target",{value:s,writable:!1}),e.handleOptionClick&&e.handleOptionClick(t)}}static setupScrollListeners(t,e){t&&t.addEventListener("scroll",(t=>{e.handleScroll&&e.handleScroll(t)}))}static setupSearchListeners(t,e){if(!t)return;const s=t.querySelector("nile-input");s&&(s.addEventListener("nile-input",(t=>{e.handleSearchChange&&e.handleSearchChange(t)})),s.addEventListener("nile-focus",(t=>{e.handleSearchFocus&&e.handleSearchFocus()})),s.addEventListener("nile-blur",(t=>{e.handleSearchBlur&&e.handleSearchBlur()})))}static setupFooterListeners(t,e){if(!t)return;const s=t.querySelector(".select__footer");s&&(this.setupFooterClickHandlers(s),this.setupShowSelectedToggle(s,e),this.setupClearAllHandler(s,e))}static setupFooterClickHandlers(t){t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault()}))}static setupShowSelectedToggle(t,e){const s=t.querySelector('span[style*="cursor: pointer"]');s&&s.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),e.toggleShowSelected&&e.toggleShowSelected(t)}))}static setupClearAllHandler(t,e){t.addEventListener("click",(t=>{t.target.classList.contains("select__clear")&&(t.stopPropagation(),t.preventDefault(),e.unSlectAll&&e.unSlectAll())}))}static setupSlotListeners(t,e){if(!t)return;const s=t.querySelector("slot");s&&s.addEventListener("slotchange",(()=>{e.updatePortalContent&&e.updatePortalContent()}))}}export{t as P,e as a,s as b};
1
+ class t{static calculateAvailableSpace(t){const e=t.getBoundingClientRect(),s=window.innerHeight,o=s-e.bottom;return{spaceAbove:e.top,spaceBelow:o,viewportHeight:s}}static getOptimalPlacement(t){const{spaceAbove:e,spaceBelow:s}=this.calculateAvailableSpace(t);return s<200&&e>s?"top":"bottom"}static findBoundaryElements(t){const e=[];let s=t.parentElement;for(;s&&s!==document.body;){const t=window.getComputedStyle(s),o=t.overflow,i=t.overflowY,n=t.overflowX;"auto"!==o&&"scroll"!==o&&"auto"!==i&&"scroll"!==i&&"auto"!==n&&"scroll"!==n||e.push(s),(s.hasAttribute("data-floating-boundary")||s.classList.contains("floating-boundary")||s.classList.contains("scroll-container"))&&e.push(s),s=s.parentElement}return e.length>0?e:void 0}static calculateOptimalHeight(t,e,s){const o=e-(t.y+t.height),i=t.y;return i>o?Math.max(i-20,100):o>i?Math.max(o-20,100):Math.max(Math.min(i,o)-20,100)}static extractStylesAsCSS(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>this.extractStylesAsCSS(t))).join("\n"):t&&"object"==typeof t&&t.cssText?t.cssText:""}static generateStyleId(){return`nile-select-styles-${Math.random().toString(36).substring(2,11)}`}static isPositioningOptimal(t,e){const{spaceAbove:s,spaceBelow:o}=this.calculateAvailableSpace(e),i=t.startsWith("top"),n=t.startsWith("bottom");return!(i&&o>s)&&!(n&&s>o)}static applyCollisionData(t,e,s){if(e.flip){const{overflows:o}=e.flip;if(t.setAttribute("data-placement",s),o&&o.length>0){const e=o.map((t=>t.placement)).join(",");t.setAttribute("data-overflow",e)}else t.removeAttribute("data-overflow")}if(e.shift){const{x:s,y:o}=e.shift;void 0===s||void 0===o||0===s&&0===o?t.removeAttribute("data-shift"):t.setAttribute("data-shift",`${s},${o}`)}if(e.size){const{availableWidth:s,availableHeight:o}=e.size;void 0!==s&&t.setAttribute("data-available-width",s.toString()),void 0!==o&&t.setAttribute("data-available-height",o.toString())}}static createFloatingUIMiddleware(t,e){return[]}}class e{static createBaseListbox(t){const e=document.createElement("div");return e.className="select__listbox "+(t.searchEnabled?"select__search-enabled ":""),e.setAttribute("tabindex","-1"),e}static addSearchSection(t,e){if(!e.searchEnabled)return;const s=document.createElement("div");s.className="select__search",s.innerHTML=`\n <nile-input size="small" clearable value="${e.searchValue}" placeholder="${e.internalSearchPlaceHolder}">\n <nile-icon name="var(--nile-icon-search, var(--ng-icon-search-lg))" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" slot="suffix"></nile-icon>\n </nile-input>\n `,t.appendChild(s)}static addLoadingSection(t,e){if(!e.optionsLoading)return;const s=document.createElement("span");s.className="select__loader",s.innerHTML='\n <nile-icon class="select__loader--icon" name="var(--nile-icon-button-loading-blue, var(--ng-icon-button-loading-blue))" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))"></nile-icon>\n ',t.appendChild(s)}static addOptionsSection(t,e){const s=document.createElement("div");s.className="select__options "+(e.searchEnabled?"select__options__search-enabled":""),this.addNoResultsMessage(s,e),this.addClonedOptions(s,e),t.appendChild(s)}static addNoResultsMessage(t,e){if(!e.showNoResults)return;const s=document.createElement("div");s.className="select__no-results",s.textContent=e.noResultsMessage,t.appendChild(s)}static addClonedOptions(t,e){Array.from(e.querySelectorAll("nile-option")).forEach((e=>{const s=this.cloneOption(e);t.appendChild(s)}))}static cloneOption(t){const e=t.cloneNode(!0);return Array.from(t.attributes).forEach((t=>{e.setAttribute(t.name,t.value)})),this.copyOptionProperties(t,e),e}static copyOptionProperties(t,e){["selected","disabled","current","hidden"].forEach((s=>{void 0!==t[s]&&(e[s]=t[s])}))}static addFooterSection(t,e){const s=e.querySelectorAll('[slot="pre-footer"]').length>0,o=e.multiple;if(!s&&!o)return;const i=document.createElement("div");if(i.setAttribute("part","footer-area"),i.className="select__footer-area",s&&this.addCustomFooter(i,e),o){const t=this.createFooter(e);i.appendChild(t)}t.appendChild(i)}static addCustomFooter(t,e){const s=Array.from(e.querySelectorAll('[slot="pre-footer"]'));if(0===s.length)return;const o=document.createElement("div");o.className="select__custom-footer",o.setAttribute("part","custom-footer"),s.forEach((t=>{o.appendChild(t.cloneNode(!0))})),o.addEventListener("click",(()=>e.hide())),t.appendChild(o)}static createFooter(t){const e=document.createElement("div");return e.setAttribute("part","footer"),e.className="select__footer",this.addShowSelectedToggle(e,t),this.addClearAllButton(e,t),e}static addShowSelectedToggle(t,e){const s=document.createElement("span");s.style.cursor="pointer";const o=document.createElement("nile-checkbox");o.disabled=0===e.selectedOptions.length,o.checked=e.showSelected,o.innerHTML="&nbsp; Show Selected",s.appendChild(o),t.appendChild(s)}static addClearAllButton(t,e){if(0===e.selectedOptions.length)return;const s=document.createElement("span");s.className="select__clear",s.textContent="Clear All",s.style.cursor="pointer",t.appendChild(s)}static updateClonedOptions(t,e){const s=t.querySelector(".select__options");if(!s)return;const o=Array.from(e.querySelectorAll("nile-option")),i=Array.from(s.querySelectorAll("nile-option"));o.forEach(((t,e)=>{const s=i[e];s&&this.updateClonedOption(t,s)}))}static updateClonedOption(t,e){e.selected=t.selected,e.disabled=t.disabled,e.current=t.current,e.hidden=t.hidden,this.updateClonedOptionAttributes(t,e)}static updateClonedOptionAttributes(t,e){[{prop:"selected",attr:"selected"},{prop:"disabled",attr:"disabled"},{prop:"current",attr:"current"},{prop:"hidden",attr:"hidden"}].forEach((({prop:s,attr:o})=>{t[s]?e.setAttribute(o,""):e.removeAttribute(o)}))}static createPortalListbox(t){const e=this.createBaseListbox(t);return this.addSearchSection(e,t),this.addLoadingSection(e,t),this.addOptionsSection(e,t),this.addFooterSection(e,t),e}}class s{static setupPortalEventListeners(t,e){t&&(this.setupOptionClickListeners(t,e),this.setupScrollListeners(t,e),this.setupSearchListeners(t,e),this.setupFooterListeners(t,e),this.setupSlotListeners(t,e))}static setupOptionClickListeners(t,e){t&&t.addEventListener("mouseup",(t=>{const s=t.target.closest("nile-option");s&&this.handleOptionClick(s,e)}))}static handleOptionClick(t,e){const s=e.querySelector(`nile-option[value="${t.getAttribute("value")}"]`);if(s){const t=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window});Object.defineProperty(t,"target",{value:s,writable:!1}),e.handleOptionClick&&e.handleOptionClick(t)}}static setupScrollListeners(t,e){t&&t.addEventListener("scroll",(t=>{e.handleScroll&&e.handleScroll(t)}))}static setupSearchListeners(t,e){if(!t)return;const s=t.querySelector("nile-input");s&&(s.addEventListener("nile-input",(t=>{e.handleSearchChange&&e.handleSearchChange(t)})),s.addEventListener("nile-focus",(t=>{e.handleSearchFocus&&e.handleSearchFocus()})),s.addEventListener("nile-blur",(t=>{e.handleSearchBlur&&e.handleSearchBlur()})))}static setupFooterListeners(t,e){if(!t)return;const s=t.querySelector(".select__footer");s&&(this.setupFooterClickHandlers(s),this.setupShowSelectedToggle(s,e),this.setupClearAllHandler(s,e)),this.setupCustomFooterListeners(t,e)}static setupCustomFooterListeners(t,e){const s=t.querySelector(".select__custom-footer");s&&s.addEventListener("click",(t=>{t.stopPropagation()}))}static setupFooterClickHandlers(t){t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault()}))}static setupShowSelectedToggle(t,e){const s=t.querySelector('span[style*="cursor: pointer"]');s&&s.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),e.toggleShowSelected&&e.toggleShowSelected(t)}))}static setupClearAllHandler(t,e){t.addEventListener("click",(t=>{t.target.classList.contains("select__clear")&&(t.stopPropagation(),t.preventDefault(),e.unSlectAll&&e.unSlectAll())}))}static setupSlotListeners(t,e){if(!t)return;const s=t.querySelector("slot");s&&s.addEventListener("slotchange",(()=>{e.updatePortalContent&&e.updatePortalContent()}))}}export{t as P,e as a,s as b};
@@ -1,2 +1,2 @@
1
- System.register(["./nile-side-bar.cjs.js","tslib","lit","lit/decorators.js","./nile-side-bar.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileSideBarCjsJs){_export("NileSideBar",_nileSideBarCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileSideBarCssCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){}};});
1
+ System.register(["./nile-side-bar.cjs.js","tslib","lit","lit/decorators.js","./nile-side-bar.css.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(_nileSideBarCjsJs){_export("NileSideBar",_nileSideBarCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileSideBarCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- export{N as NileSideBar}from"./nile-side-bar.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-side-bar.css.esm.js";import"../internal/nile-element.esm.js";
1
+ export{N as NileSideBar}from"./nile-side-bar.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-side-bar.css.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-side-bar.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,e,i,r,s,l,_templateObject,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;r=_litDecoratorsJs.customElement;},function(_nileSideBarCssCjsJs){s=_nileSideBarCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",o=/*#__PURE__*/function(_l){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.position="left",_this.collapsed=!1,_this.fullHeight=!1,_this.width=null,_this.collapsedWidth=null;return _this;}_inherits(o,_l);return _createClass(o,[{key:"updated",value:function updated(t){var _this2=this;_superPropGet(o,"updated",this,3)([t]),t.has("collapsed")&&this.querySelectorAll("\n nile-side-bar-logo,\n nile-side-bar-footer-item,\n nile-side-bar-group-item,\n nile-side-bar-group,\n nile-side-bar-header,\n nile-side-bar-group-item-text,\n nile-side-bar-group-item-icon,\n nile-side-bar-expand\n ").forEach(function(t){return t.toggleAttribute("collapsed",_this2.collapsed);}),t.has("width")&&null!==this.width&&this.style.setProperty("--sidebar-width","".concat(this.width,"px")),t.has("collapsedWidth")&&null!==this.collapsedWidth&&this.style.setProperty("--sidebar-collapsed-width","".concat(this.collapsedWidth,"px"));}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <slot name=\"header\" part=\"header\"></slot>\n <div class=\"scroll-container\" part=\"scroll-container\">\n <slot></slot>\n </div>\n <slot name=\"footer\" part=\"footer\"></slot>\n "])));}}],[{key:"styles",get:function get(){return[s];}}]);}(l));t([i({type:String,reflect:!0,attribute:!0})],o.prototype,"position",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"collapsed",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"fullHeight",void 0),t([i({type:Number,attribute:!0})],o.prototype,"width",void 0),t([i({type:Number,attribute:!0})],o.prototype,"collapsedWidth",void 0),_export("N",o=t([r("nile-side-bar")],o));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-side-bar.css.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,e,i,s,r,l,_templateObject,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;s=_litDecoratorsJs.customElement;},function(_nileSideBarCssCjsJs){r=_nileSideBarCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",o=/*#__PURE__*/function(_l){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.position="left",_this.collapsed=!1,_this.fullHeight=!1,_this.width=null,_this.collapsedWidth=null;return _this;}_inherits(o,_l);return _createClass(o,[{key:"updated",value:function updated(t){var _this2=this;_superPropGet(o,"updated",this,3)([t]),t.has("collapsed")&&this.querySelectorAll("\n nile-side-bar-logo,\n nile-side-bar-footer-item,\n nile-side-bar-group-item,\n nile-side-bar-group,\n nile-side-bar-header,\n nile-side-bar-group-item-text,\n nile-side-bar-group-item-icon,\n nile-side-bar-expand\n ").forEach(function(t){return t.toggleAttribute("collapsed",_this2.collapsed);}),t.has("width")&&null!==this.width&&this.style.setProperty("--sidebar-width","".concat(this.width,"px")),t.has("collapsedWidth")&&null!==this.collapsedWidth&&this.style.setProperty("--sidebar-collapsed-width","".concat(this.collapsedWidth,"px"));}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <slot name=\"header\" part=\"header\"></slot>\n <div class=\"scroll-container\" part=\"scroll-container\">\n <slot></slot>\n </div>\n <slot name=\"footer\" part=\"footer\"></slot>\n "])));}}],[{key:"styles",get:function get(){return[r];}}]);}(l));t([i({type:String,reflect:!0,attribute:!0})],o.prototype,"position",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"collapsed",void 0),t([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"fullHeight",void 0),t([i({type:Number,attribute:!0})],o.prototype,"width",void 0),t([i({type:Number,attribute:!0})],o.prototype,"collapsedWidth",void 0),_export("N",o=t([s("nile-side-bar")],o));}};});
2
2
  //# sourceMappingURL=nile-side-bar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-side-bar.cjs.js","sources":["../../../src/nile-side-bar/nile-side-bar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-side-bar.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile side-bar component.\n *\n * @tag nile-side-bar\n *\n * @attr position - Position of the sidebar (\"left\" | \"right\"). Defaults to \"left\".\n * @attr width - Expanded width of the sidebar (px).\n * @attr collapsed-width - Collapsed width of the sidebar (px).\n */\n@customElement('nile-side-bar')\nexport class NileSideBar extends NileElement {\n @property({ type: String, reflect: true, attribute: true })position: 'left' | 'right' = 'left';\n\n @property({ type: Boolean, reflect: true, attribute: true })collapsed: boolean = false;\n\n @property({ type: Boolean, reflect: true, attribute: true })fullHeight: boolean = false;\n \n @property({ type: Number, attribute: true })width: number | null = null;\n\n \n @property({ type: Number, attribute: true })collapsedWidth: number | null = null;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n if (changedProps.has('collapsed')) {\n this.querySelectorAll<NileElement>(\n `\n nile-side-bar-logo,\n nile-side-bar-footer-item,\n nile-side-bar-group-item,\n nile-side-bar-group,\n nile-side-bar-header,\n nile-side-bar-group-item-text,\n nile-side-bar-group-item-icon,\n nile-side-bar-expand\n `\n ).forEach(el => el.toggleAttribute('collapsed', this.collapsed));\n }\n \n\n if (changedProps.has('width') && this.width !== null) {\n this.style.setProperty('--sidebar-width', `${this.width}px`);\n }\n if (changedProps.has('collapsedWidth') && this.collapsedWidth !== null) {\n this.style.setProperty('--sidebar-collapsed-width', `${this.collapsedWidth}px`);\n }\n }\n\n public render(): TemplateResult {\n return html`\n <slot name=\"header\" part=\"header\"></slot>\n <div class=\"scroll-container\" part=\"scroll-container\">\n <slot></slot>\n </div>\n <slot name=\"footer\" part=\"footer\"></slot>\n `;\n }\n \n}\n\nexport default NileSideBar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-side-bar': NileSideBar;\n }\n}\n"],"names":["NileSideBar","o","this","position","collapsed","fullHeight","width","collapsedWidth","_this","_inherits","_l","_createClass","key","value","updated","changedProps","super","has","querySelectorAll","forEach","el","toggleAttribute","style","setProperty","concat","render","html","_templateObject","_taggedTemplateLiteral","get","styles","NileElement","__decorate","property","type","String","reflect","attribute","prototype","Boolean","Number","customElement"],"mappings":"4oHAsBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,uEACsDC,KAAAA,CAAQC,QAAqB,CAAA,MAAA,CAE5BD,KAAAA,CAASE,SAAAA,CAAAA,CAAY,EAErBF,KAAAA,CAAUG,UAAAA,CAAAA,CAAY,EAEtCH,KAAAA,CAAKI,KAAAA,CAAkB,KAGvBJ,KAAAA,CAAcK,cAAAA,CAAkB,IA2C7E,QAAAC,KAAA,EAzCQC,SAAA,CAAAR,CAAA,CAAAS,EAAA,SAAAC,YAAA,CAAAV,CAAA,GAAAW,GAAA,WAAAC,KAAA,CAIG,SAAAC,OAAAA,CAAQC,CAChBC,CAAAA,KAAAA,MAAAA,MAAAA,aAAAA,CAAAA,CAAAA,oBAAcD,CAAAA,GAEVA,EAAaE,GAAI,CAAA,WAAA,CAAA,EACnBf,KAAKgB,gBACH,CAAA,2SAAA,CAAA,CAUAC,QAAQC,SAAAA,CAAMA,QAAAA,CAAAA,CAAAA,CAAGC,gBAAgB,WAAanB,CAAAA,MAAAA,CAAKE,cAInDW,CAAaE,CAAAA,GAAAA,CAAI,UAA2B,IAAff,GAAAA,IAAAA,CAAKI,OACpCJ,IAAKoB,CAAAA,KAAAA,CAAMC,YAAY,iBAAmB,IAAAC,MAAA,CAAGtB,KAAKI,KAEhDS,MAAAA,CAAAA,CAAAA,CAAAA,CAAaE,IAAI,gBAA6C,CAAA,EAAA,IAAA,GAAxBf,KAAKK,cAC7CL,EAAAA,IAAAA,CAAKoB,MAAMC,WAAY,CAAA,2BAAA,IAAAC,MAAA,CAAgCtB,IAAKK,CAAAA,cAAAA,MA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AA,CAAAA,CAAA,CADvBS,CAAAA,CAAc,kBACFzC"}
1
+ {"version":3,"file":"nile-side-bar.cjs.js","sources":["../../../src/nile-side-bar/nile-side-bar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-side-bar.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile side-bar component.\n *\n * @tag nile-side-bar\n *\n * @attr position - Position of the sidebar (\"left\" | \"right\"). Defaults to \"left\".\n * @attr width - Expanded width of the sidebar (px).\n * @attr collapsed-width - Collapsed width of the sidebar (px).\n */\n@customElement('nile-side-bar')\nexport class NileSideBar extends NileElement {\n @property({ type: String, reflect: true, attribute: true })position: 'left' | 'right' = 'left';\n\n @property({ type: Boolean, reflect: true, attribute: true })collapsed: boolean = false;\n\n @property({ type: Boolean, reflect: true, attribute: true })fullHeight: boolean = false;\n \n @property({ type: Number, attribute: true })width: number | null = null;\n\n \n @property({ type: Number, attribute: true })collapsedWidth: number | null = null;\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n if (changedProps.has('collapsed')) {\n this.querySelectorAll<NileElement>(\n `\n nile-side-bar-logo,\n nile-side-bar-footer-item,\n nile-side-bar-group-item,\n nile-side-bar-group,\n nile-side-bar-header,\n nile-side-bar-group-item-text,\n nile-side-bar-group-item-icon,\n nile-side-bar-expand\n `\n ).forEach(el => el.toggleAttribute('collapsed', this.collapsed));\n }\n \n\n if (changedProps.has('width') && this.width !== null) {\n this.style.setProperty('--sidebar-width', `${this.width}px`);\n }\n if (changedProps.has('collapsedWidth') && this.collapsedWidth !== null) {\n this.style.setProperty('--sidebar-collapsed-width', `${this.collapsedWidth}px`);\n }\n }\n\n public render(): TemplateResult {\n return html`\n <slot name=\"header\" part=\"header\"></slot>\n <div class=\"scroll-container\" part=\"scroll-container\">\n <slot></slot>\n </div>\n <slot name=\"footer\" part=\"footer\"></slot>\n `;\n }\n \n}\n\nexport default NileSideBar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-side-bar': NileSideBar;\n }\n}\n"],"names":["NileSideBar","_l","o","constructor","this","position","collapsed","fullHeight","width","collapsedWidth","_this","_inherits","_createClass","key","value","updated","changedProps","super","has","querySelectorAll","forEach","el","toggleAttribute","style","setProperty","concat","render","html","_templateObject","_taggedTemplateLiteral","get","styles","NileElement","__decorate","property","type","String","reflect","attribute","prototype","Boolean","Number","customElement"],"mappings":"+7HAsBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,mCACsDC,EAAAA,KAAAA,CAAQC,SAAqB,MAE5BD,CAAAA,KAAAA,CAASE,WAAY,CAErBF,CAAAA,KAAAA,CAAUG,YAAY,CAEtCH,CAAAA,KAAAA,CAAKI,MAAkB,IAGvBJ,CAAAA,KAAAA,CAAcK,eAAkB,IA2C7E,QAAAC,KAAA,EAzCQC,SAAA,CAAAT,CAAA,CAAAD,EAAA,SAAAW,YAAA,CAAAV,CAAA,GAAAW,GAAA,WAAAC,KAAA,CAIG,SAAAC,OAAAA,CAAQC,CAAAA,CAAAA,KAAAA,MAAAA,MAChBC,aAAAA,CAAAA,CAAAA,oBAAcD,CAAAA,GAEVA,EAAaE,GAAI,CAAA,WAAA,CAAA,EACnBd,KAAKe,gBACH,CAAA,2SAAA,CAAA,CAUAC,QAAQC,SAAAA,CAAMA,QAAAA,CAAAA,CAAAA,CAAGC,gBAAgB,WAAalB,CAAAA,MAAAA,CAAKE,cAInDU,CAAaE,CAAAA,GAAAA,CAAI,UAA2B,IAAfd,GAAAA,IAAAA,CAAKI,OACpCJ,IAAKmB,CAAAA,KAAAA,CAAMC,YAAY,iBAAmB,IAAAC,MAAA,CAAG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CAAA,IAAA,EAAA,CAAA,CAG5BN,CAAA,CAAA,CAA3CC,CAAS,CAAA,CAAEC,IAAMM,CAAAA,MAAAA,CAAQH,WAAW,CAA4CtC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAuC,SAAA,CAAA,gBAAA,CAAA,IAAA,gBAVtEvC,CAAWiC,CAAAA,CAAAA,CAAA,CADvBS,CAAAA,CAAc,kBACF1C"}
@@ -1,7 +1,7 @@
1
- import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as i,customElement as r}from"lit/decorators.js";import{s}from"./nile-side-bar.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";let o=class extends l{constructor(){super(...arguments),this.position="left",this.collapsed=!1,this.fullHeight=!1,this.width=null,this.collapsedWidth=null}static get styles(){return[s]}updated(e){super.updated(e),e.has("collapsed")&&this.querySelectorAll("\n nile-side-bar-logo,\n nile-side-bar-footer-item,\n nile-side-bar-group-item,\n nile-side-bar-group,\n nile-side-bar-header,\n nile-side-bar-group-item-text,\n nile-side-bar-group-item-icon,\n nile-side-bar-expand\n ").forEach((e=>e.toggleAttribute("collapsed",this.collapsed))),e.has("width")&&null!==this.width&&this.style.setProperty("--sidebar-width",`${this.width}px`),e.has("collapsedWidth")&&null!==this.collapsedWidth&&this.style.setProperty("--sidebar-collapsed-width",`${this.collapsedWidth}px`)}render(){return t`
1
+ import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as i,customElement as s}from"lit/decorators.js";import{s as r}from"./nile-side-bar.css.esm.js";import{N as l}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 o=class extends l{constructor(){super(...arguments),this.position="left",this.collapsed=!1,this.fullHeight=!1,this.width=null,this.collapsedWidth=null}static get styles(){return[r]}updated(e){super.updated(e),e.has("collapsed")&&this.querySelectorAll("\n nile-side-bar-logo,\n nile-side-bar-footer-item,\n nile-side-bar-group-item,\n nile-side-bar-group,\n nile-side-bar-header,\n nile-side-bar-group-item-text,\n nile-side-bar-group-item-icon,\n nile-side-bar-expand\n ").forEach((e=>e.toggleAttribute("collapsed",this.collapsed))),e.has("width")&&null!==this.width&&this.style.setProperty("--sidebar-width",`${this.width}px`),e.has("collapsedWidth")&&null!==this.collapsedWidth&&this.style.setProperty("--sidebar-collapsed-width",`${this.collapsedWidth}px`)}render(){return t`
2
2
  <slot name="header" part="header"></slot>
3
3
  <div class="scroll-container" part="scroll-container">
4
4
  <slot></slot>
5
5
  </div>
6
6
  <slot name="footer" part="footer"></slot>
7
- `}};e([i({type:String,reflect:!0,attribute:!0})],o.prototype,"position",void 0),e([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"collapsed",void 0),e([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"fullHeight",void 0),e([i({type:Number,attribute:!0})],o.prototype,"width",void 0),e([i({type:Number,attribute:!0})],o.prototype,"collapsedWidth",void 0),o=e([r("nile-side-bar")],o);export{o as N};
7
+ `}};e([i({type:String,reflect:!0,attribute:!0})],o.prototype,"position",void 0),e([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"collapsed",void 0),e([i({type:Boolean,reflect:!0,attribute:!0})],o.prototype,"fullHeight",void 0),e([i({type:Number,attribute:!0})],o.prototype,"width",void 0),e([i({type:Number,attribute:!0})],o.prototype,"collapsedWidth",void 0),o=e([s("nile-side-bar")],o);export{o as N};
@@ -1,2 +1,2 @@
1
- System.register(["./nile-side-bar-action.cjs.js","tslib","lit","lit/decorators.js","lit/directives/class-map.js","./nile-side-bar-action.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","../utilities/animation-registry.cjs.js","../internal/tabbable.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../nile-popup/nile-popup.cjs.js","../floating-ui.dom-007bbe96.cjs.js","../nile-popup/nile-popup.css.cjs.js","./portal-manager.cjs.js","./portal-utils.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileSideBarActionCjsJs){_export("NileSideBarAction",_nileSideBarActionCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_litDirectivesClassMapJs){},function(_nileSideBarActionCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAnimateCjsJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalTabbableCjsJs){},function(_internalEventCjsJs){},function(_internalWatchCjsJs){},function(_nilePopupNilePopupCjsJs){},function(_floatingUiDom001CjsJs){},function(_nilePopupNilePopupCssCjsJs){},function(_portalManagerCjsJs){},function(_portalUtilsCjsJs){}],execute:function execute(){}};});
1
+ System.register(["./nile-side-bar-action.cjs.js","tslib","lit","lit/decorators.js","lit/directives/class-map.js","./nile-side-bar-action.css.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","../internal/animate.cjs.js","../utilities/animation-registry.cjs.js","../internal/tabbable.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../nile-popup/nile-popup.cjs.js","../floating-ui.dom-007bbe96.cjs.js","../nile-popup/nile-popup.css.cjs.js","./portal-manager.cjs.js","./portal-utils.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileSideBarActionCjsJs){_export("NileSideBarAction",_nileSideBarActionCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_litDirectivesClassMapJs){},function(_nileSideBarActionCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){},function(_internalAnimateCjsJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalTabbableCjsJs){},function(_internalEventCjsJs){},function(_internalWatchCjsJs){},function(_nilePopupNilePopupCjsJs){},function(_floatingUiDom001CjsJs){},function(_nilePopupNilePopupCssCjsJs){},function(_portalManagerCjsJs){},function(_portalUtilsCjsJs){}],execute:function execute(){}};});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- export{N as NileSideBarAction}from"./nile-side-bar-action.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"./nile-side-bar-action.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/animate.esm.js";import"../utilities/animation-registry.esm.js";import"../internal/tabbable.esm.js";import"../internal/event.esm.js";import"../internal/watch.esm.js";import"../nile-popup/nile-popup.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"../nile-popup/nile-popup.css.esm.js";import"./portal-manager.esm.js";import"./portal-utils.esm.js";
1
+ export{N as NileSideBarAction}from"./nile-side-bar-action.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"./nile-side-bar-action.css.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";import"../internal/animate.esm.js";import"../utilities/animation-registry.esm.js";import"../internal/tabbable.esm.js";import"../internal/event.esm.js";import"../internal/watch.esm.js";import"../nile-popup/nile-popup.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"../nile-popup/nile-popup.css.esm.js";import"./portal-manager.esm.js";import"./portal-utils.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","lit/directives/class-map.js","./nile-side-bar-action.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","../utilities/animation-registry.cjs.js","../internal/tabbable.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../nile-popup/nile-popup.cjs.js","./portal-manager.cjs.js","../floating-ui.dom-007bbe96.cjs.js","../nile-popup/nile-popup.css.cjs.js","./portal-utils.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,o,h,n,a,r,l,d,p,c,m,u,w,_templateObject,f;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}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);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.property;o=_litDecoratorsJs.customElement;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_nileSideBarActionCssCjsJs){n=_nileSideBarActionCssCjsJs.s;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_internalAnimateCjsJs){r=_internalAnimateCjsJs.s;l=_internalAnimateCjsJs.a;},function(_utilitiesAnimationRegistryCjsJs){d=_utilitiesAnimationRegistryCjsJs.s;p=_utilitiesAnimationRegistryCjsJs.g;},function(_internalTabbableCjsJs){c=_internalTabbableCjsJs.g;},function(_internalEventCjsJs){m=_internalEventCjsJs.w;},function(_internalWatchCjsJs){u=_internalWatchCjsJs.w;},function(_nilePopupNilePopupCjsJs){},function(_portalManagerCjsJs){w=_portalManagerCjsJs.D;},function(_floatingUiDom001CjsJs){},function(_nilePopupNilePopupCssCjsJs){},function(_portalUtilsCjsJs){}],execute:function execute(){_export("N",f=/*#__PURE__*/function(_a){function f(){var _this;_classCallCheck(this,f);_this=_callSuper(this,f,arguments),_this.open=!1,_this.placement="bottom-start",_this.disabled=!1,_this.stayOpenOnSelect=!1,_this.distance=0,_this.skidding=0,_this.hoist=!1,_this.portal=!1,_this.portalManager=null,_this.triggerDropdown="click";return _this;}_inherits(f,_a);return _createClass(f,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_superPropGet(f,"connectedCallback",this,3)([]),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.handleTriggerMouseEnter=this.handleTriggerMouseEnter.bind(this),this.handleTriggerMouseLeave=this.handleTriggerMouseLeave.bind(this),this.containingElement||(this.containingElement=this),this.emit("nile-init"),requestAnimationFrame(function(){_this2.portal&&!_this2.portalManager&&(_this2.portalManager=new w(_this2));});}},{key:"firstUpdated",value:function firstUpdated(){if(this.panel.hidden=!this.open,"hover"===this.triggerDropdown){var _t=this.trigger;_t&&(_t.addEventListener("mouseenter",this.handleTriggerMouseEnter),_t.addEventListener("mouseleave",this.handleTriggerMouseLeave)),this.panel&&(this.panel.addEventListener("mouseenter",this.handleTriggerMouseEnter),this.panel.addEventListener("mouseleave",this.handleTriggerMouseLeave));}this.open&&(this.addOpenListeners(),this.popup.active=!0);}},{key:"handleTriggerMouseEnter",value:function handleTriggerMouseEnter(){clearTimeout(this.hoverTimeout),this.show();}},{key:"handleTriggerMouseLeave",value:function handleTriggerMouseLeave(){var _this3=this;clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(function(){return _this3.hide();},200);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(f,"disconnectedCallback",this,3)([]),this.removeOpenListeners(),this.hide(),this.emit("nile-destroy"),this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null);}},{key:"focusOnTrigger",value:function focusOnTrigger(){var t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof(t===null||t===void 0?void 0:t.focus)&&t.focus();}},{key:"getMenu",value:function getMenu(){return this.panel.assignedElements({flatten:!0}).find(function(t){return"nile-menu"===t.tagName.toLowerCase();});}},{key:"handleKeyDown",value:function handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger());}},{key:"handleDocumentKeyDown",value:function handleDocumentKeyDown(t){var _this4=this;if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();"Tab"===t.key&&setTimeout(function(){var _this4$containingElem,_document$activeEleme,_this4$portalManager;var t=((_this4$containingElem=_this4.containingElement)===null||_this4$containingElem===void 0?void 0:_this4$containingElem.getRootNode())instanceof ShadowRoot?(_document$activeEleme=document.activeElement)===null||_document$activeEleme===void 0||(_document$activeEleme=_document$activeEleme.shadowRoot)===null||_document$activeEleme===void 0?void 0:_document$activeEleme.activeElement:document.activeElement,i=_this4.containingElement&&(t===null||t===void 0?void 0:t.closest(_this4.containingElement.tagName.toLowerCase()))===_this4.containingElement,s=_this4.portal&&((_this4$portalManager=_this4.portalManager)===null||_this4$portalManager===void 0?void 0:_this4$portalManager.portalContainerElement)&&(t===_this4.portalManager.portalContainerElement||(t===null||t===void 0?void 0:t.closest(".nile-dropdown-portal-append"))===_this4.portalManager.portalContainerElement);i||s||_this4.hide();});}},{key:"handleDocumentMouseDown",value:function handleDocumentMouseDown(t){var _this$portalManager;var i=t.composedPath(),s=this.containingElement&&i.includes(this.containingElement),e=this.portal&&((_this$portalManager=this.portalManager)===null||_this$portalManager===void 0?void 0:_this$portalManager.portalContainerElement)&&i.includes(this.portalManager.portalContainerElement);s||e||this.hide();}},{key:"handlePanelSelect",value:function handlePanelSelect(t){var i=t.target;this.stayOpenOnSelect||"nile-menu"!==i.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger());}},{key:"handleTriggerClick",value:function handleTriggerClick(){this.open?this.hide():(this.show(),this.focusOnTrigger());}},{key:"handleTriggerKeyDown",value:function handleTriggerKeyDown(t){var i=this.getMenu();if(i){var _s=i.getAllItems(),_e=_s[0],_o=_s[_s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),_s.length>0&&this.updateComplete.then(function(){"ArrowDown"!==t.key&&"Home"!==t.key||(i.setCurrentItem(_e),_e.focus()),"ArrowUp"!==t.key&&"End"!==t.key||(i.setCurrentItem(_o),_o.focus());}));}}},{key:"handleTriggerKeyUp",value:function handleTriggerKeyUp(t){" "===t.key&&t.preventDefault();}},{key:"handleTriggerSlotChange",value:function handleTriggerSlotChange(){this.updateAccessibleTrigger();}},{key:"updateAccessibleTrigger",value:function updateAccessibleTrigger(){var t=this.trigger.assignedElements({flatten:!0}).find(function(t){return c(t).start;});var i;if(t){switch(t.tagName.toLowerCase()){case"nile-button":case"nile-icon-button":i=t.button;break;default:i=t;}i.setAttribute("aria-haspopup","true"),i.setAttribute("aria-expanded",this.open?"true":"false");}}},{key:"show",value:function(){var _show=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(this.open){_context2.next=2;break;}return _context2.abrupt("return",(this.open=!0,m(this,"nile-after-show")));case 2:case"end":return _context2.stop();}},_callee,this);}));function show(){return _show.apply(this,arguments);}return show;}()},{key:"hide",value:function(){var _hide=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!this.open){_context3.next=2;break;}return _context3.abrupt("return",(this.open=!1,m(this,"nile-after-hide")));case 2:case"end":return _context3.stop();}},_callee2,this);}));function hide(){return _hide.apply(this,arguments);}return hide;}()},{key:"reposition",value:function reposition(){this.popup.reposition();}},{key:"addOpenListeners",value:function addOpenListeners(){this.panel.addEventListener("nile-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown);}},{key:"removeOpenListeners",value:function removeOpenListeners(){this.panel&&(this.panel.removeEventListener("nile-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown);}},{key:"updated",value:function updated(t){_superPropGet(f,"updated",this,3)([t]),t.has("portal")&&(this.portal&&!this.portalManager?(this.portalManager=new w(this),this.open&&this.portalManager.setupPortalAppend()):!this.portal&&this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null));}},{key:"handleOpenChange",value:function(){var _handleOpenChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _p,_t2,_i,_p2,_t3,_i2;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!this.disabled){_context4.next=4;break;}this.open=!1;_context4.next=30;break;case 4:if(!(this.updateAccessibleTrigger(),this.open)){_context4.next=18;break;}this.emit("nile-show");this.addOpenListeners();this.portal&&this.portalManager?this.portalManager.setupPortalAppend():this.portal&&!this.portalManager&&(this.portalManager=new w(this),this.portalManager.setupPortalAppend());_context4.next=10;return r(this);case 10:if(this.portal){_context4.next=15;break;}this.panel.hidden=!1,this.popup.active=!0;_p=p(this,"dropdown.show",{dir:""}),_t2=_p.keyframes,_i=_p.options;_context4.next=15;return l(this.popup.popup,_t2,_i);case 15:this.emit("nile-after-show");_context4.next=30;break;case 18:this.emit("nile-hide");this.removeOpenListeners();this.portal&&this.portalManager&&this.portalManager.cleanupPortalAppend();_context4.next=23;return r(this);case 23:if(this.portal){_context4.next=29;break;}_p2=p(this,"dropdown.hide",{dir:""}),_t3=_p2.keyframes,_i2=_p2.options;_context4.next=27;return l(this.popup.popup,_t3,_i2);case 27:this.panel.hidden=!0;this.popup.active=!1;case 29:this.emit("nile-after-hide");case 30:case"end":return _context4.stop();}},_callee3,this);}));function handleOpenChange(){return _handleOpenChange.apply(this,arguments);}return handleOpenChange;}()},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-popup\n part=\"base\"\n id=\"sidebar-action-dropdown\"\n placement=","\n distance=","\n skidding=","\n strategy=","\n sync=","\n flip\n shift\n auto-size=\"both\"\n auto-size-padding=\"10\"\n class=","\n >\n <slot\n name=\"trigger\"\n slot=\"anchor\"\n part=\"trigger\"\n class=\"dropdown__trigger\"\n @click=","\n @keydown=","\n @keyup=","\n @slotchange=","\n ></slot>\n\n <slot\n part=\"panel\"\n class=\"dropdown__panel\"\n aria-hidden=","\n aria-labelledby=\"sidebar-action-dropdown\"\n style=","\n ></slot>\n </nile-popup>\n "])),this.placement,this.distance,this.skidding,this.hoist?"fixed":"absolute",this.sync,h({dropdown:!0,"dropdown--open":this.open}),this.handleTriggerClick,this.handleTriggerKeyDown,this.handleTriggerKeyUp,this.handleTriggerSlotChange,this.open?"false":"true",this.portal&&this.portalManager?"display: none;":"");}}]);}(a));f.styles=[n],t([s(".dropdown")],f.prototype,"popup",void 0),t([s(".dropdown__trigger")],f.prototype,"trigger",void 0),t([s(".dropdown__panel")],f.prototype,"panel",void 0),t([e({type:Boolean,reflect:!0})],f.prototype,"open",void 0),t([e({reflect:!0})],f.prototype,"placement",void 0),t([e({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),t([e({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],f.prototype,"stayOpenOnSelect",void 0),t([e({attribute:!1})],f.prototype,"containingElement",void 0),t([e({type:Number})],f.prototype,"distance",void 0),t([e({type:Number})],f.prototype,"skidding",void 0),t([e()],f.prototype,"sync",void 0),t([e({type:Boolean})],f.prototype,"hoist",void 0),t([e({type:Boolean,reflect:!0})],f.prototype,"portal",void 0),t([e({reflect:!0})],f.prototype,"triggerDropdown",void 0),t([u("open",{waitUntilFirstUpdate:!0})],f.prototype,"handleOpenChange",null),_export("N",f=t([o("nile-side-bar-action")],f)),d("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),d("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});}};});
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","lit/directives/class-map.js","./nile-side-bar-action.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","../utilities/animation-registry.cjs.js","../internal/tabbable.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../nile-popup/nile-popup.cjs.js","./portal-manager.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js","../floating-ui.dom-007bbe96.cjs.js","../nile-popup/nile-popup.css.cjs.js","./portal-utils.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,o,n,h,a,r,l,d,p,c,m,u,w,_templateObject,f;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}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);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.property;o=_litDecoratorsJs.customElement;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_nileSideBarActionCssCjsJs){h=_nileSideBarActionCssCjsJs.s;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_internalAnimateCjsJs){r=_internalAnimateCjsJs.s;l=_internalAnimateCjsJs.a;},function(_utilitiesAnimationRegistryCjsJs){d=_utilitiesAnimationRegistryCjsJs.s;p=_utilitiesAnimationRegistryCjsJs.g;},function(_internalTabbableCjsJs){c=_internalTabbableCjsJs.g;},function(_internalEventCjsJs){m=_internalEventCjsJs.w;},function(_internalWatchCjsJs){u=_internalWatchCjsJs.w;},function(_nilePopupNilePopupCjsJs){},function(_portalManagerCjsJs){w=_portalManagerCjsJs.D;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){},function(_floatingUiDom001CjsJs){},function(_nilePopupNilePopupCssCjsJs){},function(_portalUtilsCjsJs){}],execute:function execute(){_export("N",f=/*#__PURE__*/function(_a){function f(){var _this;_classCallCheck(this,f);_this=_callSuper(this,f,arguments),_this.open=!1,_this.placement="bottom-start",_this.disabled=!1,_this.stayOpenOnSelect=!1,_this.distance=0,_this.skidding=0,_this.hoist=!1,_this.portal=!1,_this.portalManager=null,_this.triggerDropdown="click";return _this;}_inherits(f,_a);return _createClass(f,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_superPropGet(f,"connectedCallback",this,3)([]),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.handleTriggerMouseEnter=this.handleTriggerMouseEnter.bind(this),this.handleTriggerMouseLeave=this.handleTriggerMouseLeave.bind(this),this.containingElement||(this.containingElement=this),this.emit("nile-init"),requestAnimationFrame(function(){_this2.portal&&!_this2.portalManager&&(_this2.portalManager=new w(_this2));});}},{key:"firstUpdated",value:function firstUpdated(){if(this.panel.hidden=!this.open,"hover"===this.triggerDropdown){var _t=this.trigger;_t&&(_t.addEventListener("mouseenter",this.handleTriggerMouseEnter),_t.addEventListener("mouseleave",this.handleTriggerMouseLeave)),this.panel&&(this.panel.addEventListener("mouseenter",this.handleTriggerMouseEnter),this.panel.addEventListener("mouseleave",this.handleTriggerMouseLeave));}this.open&&(this.addOpenListeners(),this.popup.active=!0);}},{key:"handleTriggerMouseEnter",value:function handleTriggerMouseEnter(){clearTimeout(this.hoverTimeout),this.show();}},{key:"handleTriggerMouseLeave",value:function handleTriggerMouseLeave(){var _this3=this;clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(function(){return _this3.hide();},200);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(f,"disconnectedCallback",this,3)([]),this.removeOpenListeners(),this.hide(),this.emit("nile-destroy"),this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null);}},{key:"focusOnTrigger",value:function focusOnTrigger(){var t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof(t===null||t===void 0?void 0:t.focus)&&t.focus();}},{key:"getMenu",value:function getMenu(){return this.panel.assignedElements({flatten:!0}).find(function(t){return"nile-menu"===t.tagName.toLowerCase();});}},{key:"handleKeyDown",value:function handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger());}},{key:"handleDocumentKeyDown",value:function handleDocumentKeyDown(t){var _this4=this;if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();"Tab"===t.key&&setTimeout(function(){var _this4$containingElem,_document$activeEleme,_this4$portalManager;var t=((_this4$containingElem=_this4.containingElement)===null||_this4$containingElem===void 0?void 0:_this4$containingElem.getRootNode())instanceof ShadowRoot?(_document$activeEleme=document.activeElement)===null||_document$activeEleme===void 0||(_document$activeEleme=_document$activeEleme.shadowRoot)===null||_document$activeEleme===void 0?void 0:_document$activeEleme.activeElement:document.activeElement,i=_this4.containingElement&&(t===null||t===void 0?void 0:t.closest(_this4.containingElement.tagName.toLowerCase()))===_this4.containingElement,s=_this4.portal&&((_this4$portalManager=_this4.portalManager)===null||_this4$portalManager===void 0?void 0:_this4$portalManager.portalContainerElement)&&(t===_this4.portalManager.portalContainerElement||(t===null||t===void 0?void 0:t.closest(".nile-dropdown-portal-append"))===_this4.portalManager.portalContainerElement);i||s||_this4.hide();});}},{key:"handleDocumentMouseDown",value:function handleDocumentMouseDown(t){var _this$portalManager;var i=t.composedPath(),s=this.containingElement&&i.includes(this.containingElement),e=this.portal&&((_this$portalManager=this.portalManager)===null||_this$portalManager===void 0?void 0:_this$portalManager.portalContainerElement)&&i.includes(this.portalManager.portalContainerElement);s||e||this.hide();}},{key:"handlePanelSelect",value:function handlePanelSelect(t){var i=t.target;this.stayOpenOnSelect||"nile-menu"!==i.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger());}},{key:"handleTriggerClick",value:function handleTriggerClick(){this.open?this.hide():(this.show(),this.focusOnTrigger());}},{key:"handleTriggerKeyDown",value:function handleTriggerKeyDown(t){var i=this.getMenu();if(i){var _s=i.getAllItems(),_e=_s[0],_o=_s[_s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),_s.length>0&&this.updateComplete.then(function(){"ArrowDown"!==t.key&&"Home"!==t.key||(i.setCurrentItem(_e),_e.focus()),"ArrowUp"!==t.key&&"End"!==t.key||(i.setCurrentItem(_o),_o.focus());}));}}},{key:"handleTriggerKeyUp",value:function handleTriggerKeyUp(t){" "===t.key&&t.preventDefault();}},{key:"handleTriggerSlotChange",value:function handleTriggerSlotChange(){this.updateAccessibleTrigger();}},{key:"updateAccessibleTrigger",value:function updateAccessibleTrigger(){var t=this.trigger.assignedElements({flatten:!0}).find(function(t){return c(t).start;});var i;if(t){switch(t.tagName.toLowerCase()){case"nile-button":case"nile-icon-button":i=t.button;break;default:i=t;}i.setAttribute("aria-haspopup","true"),i.setAttribute("aria-expanded",this.open?"true":"false");}}},{key:"show",value:function(){var _show=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(this.open){_context2.next=2;break;}return _context2.abrupt("return",(this.open=!0,m(this,"nile-after-show")));case 2:case"end":return _context2.stop();}},_callee,this);}));function show(){return _show.apply(this,arguments);}return show;}()},{key:"hide",value:function(){var _hide=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!this.open){_context3.next=2;break;}return _context3.abrupt("return",(this.open=!1,m(this,"nile-after-hide")));case 2:case"end":return _context3.stop();}},_callee2,this);}));function hide(){return _hide.apply(this,arguments);}return hide;}()},{key:"reposition",value:function reposition(){this.popup.reposition();}},{key:"addOpenListeners",value:function addOpenListeners(){this.panel.addEventListener("nile-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown);}},{key:"removeOpenListeners",value:function removeOpenListeners(){this.panel&&(this.panel.removeEventListener("nile-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown);}},{key:"updated",value:function updated(t){_superPropGet(f,"updated",this,3)([t]),t.has("portal")&&(this.portal&&!this.portalManager?(this.portalManager=new w(this),this.open&&this.portalManager.setupPortalAppend()):!this.portal&&this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null));}},{key:"handleOpenChange",value:function(){var _handleOpenChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _p,_t2,_i,_p2,_t3,_i2;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!this.disabled){_context4.next=4;break;}this.open=!1;_context4.next=30;break;case 4:if(!(this.updateAccessibleTrigger(),this.open)){_context4.next=18;break;}this.emit("nile-show");this.addOpenListeners();this.portal&&this.portalManager?this.portalManager.setupPortalAppend():this.portal&&!this.portalManager&&(this.portalManager=new w(this),this.portalManager.setupPortalAppend());_context4.next=10;return r(this);case 10:if(this.portal){_context4.next=15;break;}this.panel.hidden=!1,this.popup.active=!0;_p=p(this,"dropdown.show",{dir:""}),_t2=_p.keyframes,_i=_p.options;_context4.next=15;return l(this.popup.popup,_t2,_i);case 15:this.emit("nile-after-show");_context4.next=30;break;case 18:this.emit("nile-hide");this.removeOpenListeners();this.portal&&this.portalManager&&this.portalManager.cleanupPortalAppend();_context4.next=23;return r(this);case 23:if(this.portal){_context4.next=29;break;}_p2=p(this,"dropdown.hide",{dir:""}),_t3=_p2.keyframes,_i2=_p2.options;_context4.next=27;return l(this.popup.popup,_t3,_i2);case 27:this.panel.hidden=!0;this.popup.active=!1;case 29:this.emit("nile-after-hide");case 30:case"end":return _context4.stop();}},_callee3,this);}));function handleOpenChange(){return _handleOpenChange.apply(this,arguments);}return handleOpenChange;}()},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-popup\n part=\"base\"\n id=\"sidebar-action-dropdown\"\n placement=","\n distance=","\n skidding=","\n strategy=","\n sync=","\n flip\n shift\n auto-size=\"both\"\n auto-size-padding=\"10\"\n class=","\n >\n <slot\n name=\"trigger\"\n slot=\"anchor\"\n part=\"trigger\"\n class=\"dropdown__trigger\"\n @click=","\n @keydown=","\n @keyup=","\n @slotchange=","\n ></slot>\n\n <slot\n part=\"panel\"\n class=\"dropdown__panel\"\n aria-hidden=","\n aria-labelledby=\"sidebar-action-dropdown\"\n style=","\n ></slot>\n </nile-popup>\n "])),this.placement,this.distance,this.skidding,this.hoist?"fixed":"absolute",this.sync,n({dropdown:!0,"dropdown--open":this.open}),this.handleTriggerClick,this.handleTriggerKeyDown,this.handleTriggerKeyUp,this.handleTriggerSlotChange,this.open?"false":"true",this.portal&&this.portalManager?"display: none;":"");}}]);}(a));f.styles=[h],t([s(".dropdown")],f.prototype,"popup",void 0),t([s(".dropdown__trigger")],f.prototype,"trigger",void 0),t([s(".dropdown__panel")],f.prototype,"panel",void 0),t([e({type:Boolean,reflect:!0})],f.prototype,"open",void 0),t([e({reflect:!0})],f.prototype,"placement",void 0),t([e({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),t([e({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],f.prototype,"stayOpenOnSelect",void 0),t([e({attribute:!1})],f.prototype,"containingElement",void 0),t([e({type:Number})],f.prototype,"distance",void 0),t([e({type:Number})],f.prototype,"skidding",void 0),t([e()],f.prototype,"sync",void 0),t([e({type:Boolean})],f.prototype,"hoist",void 0),t([e({type:Boolean,reflect:!0})],f.prototype,"portal",void 0),t([e({reflect:!0})],f.prototype,"triggerDropdown",void 0),t([u("open",{waitUntilFirstUpdate:!0})],f.prototype,"handleOpenChange",null),_export("N",f=t([o("nile-side-bar-action")],f)),d("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),d("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});}};});
2
2
  //# sourceMappingURL=nile-side-bar-action.cjs.js.map