@aquera/nile-elements 0.0.110 → 0.0.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/README.md +11 -0
  2. package/demo/filenames.txt +1 -1
  3. package/demo/variables.css +2 -0
  4. package/dist/{angular-ts-7f0ea228.cjs.js → angular-ts-f3444056.cjs.js} +2 -2
  5. package/dist/{angular-ts-7f0ea228.cjs.js.map → angular-ts-f3444056.cjs.js.map} +1 -1
  6. package/dist/{github-dark-default-2257ba5e.cjs.js → github-dark-default-450c7c01.cjs.js} +2 -2
  7. package/dist/{github-dark-default-2257ba5e.cjs.js.map → github-dark-default-450c7c01.cjs.js.map} +1 -1
  8. package/dist/{github-dark-default-5814263b.esm.js → github-dark-default-c8549d91.esm.js} +1 -1
  9. package/dist/{github-dark-dimmed-b7e46b3b.esm.js → github-dark-dimmed-2d99017f.esm.js} +1 -1
  10. package/dist/{github-dark-dimmed-5703df55.cjs.js → github-dark-dimmed-ef1406bd.cjs.js} +2 -2
  11. package/dist/{github-dark-dimmed-5703df55.cjs.js.map → github-dark-dimmed-ef1406bd.cjs.js.map} +1 -1
  12. package/dist/{github-dark-high-contrast-af204903.cjs.js → github-dark-high-contrast-60f6edfa.cjs.js} +2 -2
  13. package/dist/{github-dark-high-contrast-af204903.cjs.js.map → github-dark-high-contrast-60f6edfa.cjs.js.map} +1 -1
  14. package/dist/{github-dark-high-contrast-917c210a.esm.js → github-dark-high-contrast-eb093cb4.esm.js} +1 -1
  15. package/dist/{github-light-default-a8b27e0c.esm.js → github-light-default-97194ef6.esm.js} +1 -1
  16. package/dist/{github-light-default-f34de887.cjs.js → github-light-default-cf60a983.cjs.js} +2 -2
  17. package/dist/{github-light-default-f34de887.cjs.js.map → github-light-default-cf60a983.cjs.js.map} +1 -1
  18. package/dist/{github-light-high-contrast-17c40b3b.esm.js → github-light-high-contrast-0ddc875a.esm.js} +1 -1
  19. package/dist/{github-light-high-contrast-ef2e56e6.cjs.js → github-light-high-contrast-ab424680.cjs.js} +2 -2
  20. package/dist/{github-light-high-contrast-ef2e56e6.cjs.js.map → github-light-high-contrast-ab424680.cjs.js.map} +1 -1
  21. package/dist/hy-431f15f8.cjs.js +2 -0
  22. package/dist/hy-431f15f8.cjs.js.map +1 -0
  23. package/dist/hy-5e43d6c1.esm.js +1 -0
  24. package/dist/index.cjs.js +1 -1
  25. package/dist/index.esm.js +1 -1
  26. package/dist/{mermaid-7f9972ac.cjs.js → mermaid-76489bb0.cjs.js} +2 -2
  27. package/dist/{mermaid-7f9972ac.cjs.js.map → mermaid-76489bb0.cjs.js.map} +1 -1
  28. package/dist/{mermaid-94e78bd4.esm.js → mermaid-ca28664b.esm.js} +1 -1
  29. package/dist/mipsasm-535432b4.cjs.js +2 -0
  30. package/dist/mipsasm-535432b4.cjs.js.map +1 -0
  31. package/dist/mipsasm-57581c0d.esm.js +1 -0
  32. package/dist/nile-accordion/nile-accordion.cjs.js +1 -1
  33. package/dist/nile-accordion/nile-accordion.cjs.js.map +1 -1
  34. package/dist/nile-accordion/nile-accordion.esm.js +1 -1
  35. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  36. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  37. package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
  38. package/dist/nile-avatar/nile-avatar.cjs.js +1 -1
  39. package/dist/nile-avatar/nile-avatar.cjs.js.map +1 -1
  40. package/dist/nile-avatar/nile-avatar.esm.js +1 -1
  41. package/dist/nile-badge/index.cjs.js +1 -1
  42. package/dist/nile-badge/index.esm.js +1 -1
  43. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  44. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  45. package/dist/nile-badge/nile-badge.esm.js +1 -1
  46. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  47. package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -1
  48. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  49. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js +1 -1
  50. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js.map +1 -1
  51. package/dist/nile-breadcrumb/nile-breadcrumb.esm.js +1 -1
  52. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +1 -1
  53. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -1
  54. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +2 -2
  55. package/dist/nile-button/index.cjs.js +1 -1
  56. package/dist/nile-button/index.esm.js +1 -1
  57. package/dist/nile-button/nile-button.cjs.js +1 -1
  58. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  59. package/dist/nile-button/nile-button.esm.js +1 -1
  60. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  61. package/dist/nile-button/nile-button.test.cjs.js.map +1 -1
  62. package/dist/nile-button/nile-button.test.esm.js +1 -1
  63. package/dist/nile-button-toggle/nile-button-toggle.cjs.js +1 -1
  64. package/dist/nile-button-toggle/nile-button-toggle.cjs.js.map +1 -1
  65. package/dist/nile-button-toggle/nile-button-toggle.esm.js +1 -1
  66. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +1 -1
  67. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -1
  68. package/dist/nile-button-toggle-group/nile-button-toggle-group.esm.js +1 -1
  69. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  70. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  71. package/dist/nile-calendar/nile-calendar.esm.js +7 -7
  72. package/dist/nile-card/nile-card.cjs.js +1 -1
  73. package/dist/nile-card/nile-card.cjs.js.map +1 -1
  74. package/dist/nile-card/nile-card.esm.js +1 -1
  75. package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
  76. package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
  77. package/dist/nile-checkbox/nile-checkbox.esm.js +3 -3
  78. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  79. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  80. package/dist/nile-chip/nile-chip.esm.js +1 -1
  81. package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
  82. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  83. package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
  84. package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
  85. package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
  86. package/dist/nile-content-editor/nile-content-editor.esm.js +5 -5
  87. package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
  88. package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
  89. package/dist/nile-date-picker/nile-date-picker.esm.js +3 -5
  90. package/dist/nile-dialog/index.cjs.js +1 -1
  91. package/dist/nile-dialog/index.esm.js +1 -1
  92. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  93. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  94. package/dist/nile-dialog/nile-dialog.esm.js +8 -6
  95. package/dist/nile-drawer/index.cjs.js +1 -1
  96. package/dist/nile-drawer/index.esm.js +1 -1
  97. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  98. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  99. package/dist/nile-drawer/nile-drawer.esm.js +1 -1
  100. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  101. package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -1
  102. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  103. package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
  104. package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
  105. package/dist/nile-empty-state/nile-empty-state.esm.js +1 -1
  106. package/dist/nile-highlighter/index.cjs.js +1 -1
  107. package/dist/nile-highlighter/index.esm.js +1 -1
  108. package/dist/nile-highlighter/nile-highlighter.cjs.js +1 -1
  109. package/dist/nile-highlighter/nile-highlighter.cjs.js.map +1 -1
  110. package/dist/nile-highlighter/nile-highlighter.esm.js +2 -2
  111. package/dist/nile-highlighter/theme-list.cjs.js +1 -1
  112. package/dist/nile-highlighter/theme-list.cjs.js.map +1 -1
  113. package/dist/nile-highlighter/theme-list.esm.js +1 -1
  114. package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
  115. package/dist/nile-icon/icons/svg/index.esm.js +1 -1
  116. package/dist/nile-icon/icons/svg/insert-at-cursor.cjs.js +2 -0
  117. package/dist/nile-icon/icons/svg/insert-at-cursor.cjs.js.map +1 -0
  118. package/dist/nile-icon/icons/svg/insert-at-cursor.esm.js +1 -0
  119. package/dist/nile-icon/icons/svg/warning-01.cjs.js +2 -0
  120. package/dist/nile-icon/icons/svg/warning-01.cjs.js.map +1 -0
  121. package/dist/nile-icon/icons/svg/warning-01.esm.js +1 -0
  122. package/dist/nile-icon/index.cjs.js +1 -1
  123. package/dist/nile-icon/index.cjs.js.map +1 -1
  124. package/dist/nile-icon/index.esm.js +2 -2
  125. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  126. package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -1
  127. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  128. package/dist/nile-icon-button/index.cjs.js +1 -1
  129. package/dist/nile-icon-button/index.esm.js +1 -1
  130. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  131. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  132. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  133. package/dist/nile-input/index.cjs.js +1 -1
  134. package/dist/nile-input/index.esm.js +1 -1
  135. package/dist/nile-input/nile-input.cjs.js +1 -1
  136. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  137. package/dist/nile-input/nile-input.esm.js +1 -1
  138. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  139. package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
  140. package/dist/nile-input/nile-input.test.esm.js +1 -1
  141. package/dist/nile-link/index.cjs.js +1 -1
  142. package/dist/nile-link/index.esm.js +1 -1
  143. package/dist/nile-link/nile-link.cjs.js +1 -1
  144. package/dist/nile-link/nile-link.cjs.js.map +1 -1
  145. package/dist/nile-link/nile-link.esm.js +4 -4
  146. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  147. package/dist/nile-link/nile-link.test.cjs.js.map +1 -1
  148. package/dist/nile-link/nile-link.test.esm.js +1 -1
  149. package/dist/nile-list/nile-list.cjs.js +1 -1
  150. package/dist/nile-list/nile-list.cjs.js.map +1 -1
  151. package/dist/nile-list/nile-list.esm.js +1 -1
  152. package/dist/nile-list-item/nile-list-item.cjs.js +1 -1
  153. package/dist/nile-list-item/nile-list-item.cjs.js.map +1 -1
  154. package/dist/nile-list-item/nile-list-item.esm.js +1 -1
  155. package/dist/nile-menu/nile-menu.cjs.js +1 -1
  156. package/dist/nile-menu/nile-menu.cjs.js.map +1 -1
  157. package/dist/nile-menu/nile-menu.esm.js +1 -1
  158. package/dist/nile-menu-item/index.cjs.js +1 -1
  159. package/dist/nile-menu-item/index.esm.js +1 -1
  160. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  161. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  162. package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
  163. package/dist/nile-option/index.cjs.js +1 -1
  164. package/dist/nile-option/index.esm.js +1 -1
  165. package/dist/nile-option/nile-option.cjs.js +1 -1
  166. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  167. package/dist/nile-option/nile-option.esm.js +1 -1
  168. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  169. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  170. package/dist/nile-popover/nile-popover.esm.js +2 -2
  171. package/dist/nile-popup/nile-popup.cjs.js +1 -1
  172. package/dist/nile-popup/nile-popup.cjs.js.map +1 -1
  173. package/dist/nile-popup/nile-popup.esm.js +1 -1
  174. package/dist/nile-radio/nile-radio.cjs.js +1 -1
  175. package/dist/nile-radio/nile-radio.cjs.js.map +1 -1
  176. package/dist/nile-radio/nile-radio.esm.js +4 -4
  177. package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
  178. package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
  179. package/dist/nile-radio-group/nile-radio-group.esm.js +1 -1
  180. package/dist/nile-select/index.cjs.js +1 -1
  181. package/dist/nile-select/index.esm.js +1 -1
  182. package/dist/nile-select/nile-select.cjs.js +1 -1
  183. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  184. package/dist/nile-select/nile-select.esm.js +1 -1
  185. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
  186. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
  187. package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +1 -1
  188. package/dist/nile-split-panel/nile-split-panel.cjs.js +1 -1
  189. package/dist/nile-split-panel/nile-split-panel.cjs.js.map +1 -1
  190. package/dist/nile-split-panel/nile-split-panel.esm.js +1 -1
  191. package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
  192. package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
  193. package/dist/nile-stepper/nile-stepper.esm.js +1 -1
  194. package/dist/nile-tab/index.cjs.js +1 -1
  195. package/dist/nile-tab/index.esm.js +1 -1
  196. package/dist/nile-tab/nile-tab.cjs.js +1 -1
  197. package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
  198. package/dist/nile-tab/nile-tab.esm.js +1 -1
  199. package/dist/nile-tab-group/index.cjs.js +1 -1
  200. package/dist/nile-tab-group/index.esm.js +1 -1
  201. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  202. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  203. package/dist/nile-tab-group/nile-tab-group.esm.js +2 -2
  204. package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
  205. package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
  206. package/dist/nile-table-body/nile-table-body.esm.js +1 -1
  207. package/dist/nile-table-header-item/nile-table-header-item.cjs.js +1 -1
  208. package/dist/nile-table-header-item/nile-table-header-item.cjs.js.map +1 -1
  209. package/dist/nile-table-header-item/nile-table-header-item.esm.js +1 -1
  210. package/dist/nile-tag/index.cjs.js +1 -1
  211. package/dist/nile-tag/index.esm.js +1 -1
  212. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  213. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  214. package/dist/nile-tag/nile-tag.esm.js +1 -1
  215. package/dist/nile-textarea/nile-textarea.cjs.js +1 -1
  216. package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
  217. package/dist/nile-textarea/nile-textarea.esm.js +1 -1
  218. package/dist/nile-toast/index.cjs.js +1 -1
  219. package/dist/nile-toast/index.esm.js +1 -1
  220. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  221. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  222. package/dist/nile-toast/nile-toast.esm.js +1 -1
  223. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  224. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  225. package/dist/nile-tooltip/nile-tooltip.esm.js +1 -1
  226. package/dist/nile-tree/index.cjs.js +1 -1
  227. package/dist/nile-tree/index.esm.js +1 -1
  228. package/dist/nile-tree/nile-tree.cjs.js +1 -1
  229. package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
  230. package/dist/nile-tree/nile-tree.esm.js +1 -1
  231. package/dist/nile-tree-item/index.cjs.js +1 -1
  232. package/dist/nile-tree-item/index.esm.js +1 -1
  233. package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
  234. package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
  235. package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
  236. package/dist/sass-16055185.esm.js +1 -0
  237. package/dist/sass-4bfa8a08.cjs.js +2 -0
  238. package/dist/sass-4bfa8a08.cjs.js.map +1 -0
  239. package/dist/{sparql-f0d04e05.cjs.js → sparql-ebe1ddf3.cjs.js} +2 -2
  240. package/dist/{sparql-f0d04e05.cjs.js.map → sparql-ebe1ddf3.cjs.js.map} +1 -1
  241. package/dist/src/nile-accordion/nile-accordion.d.ts +1 -0
  242. package/dist/src/nile-accordion/nile-accordion.js +1 -0
  243. package/dist/src/nile-accordion/nile-accordion.js.map +1 -1
  244. package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +1 -0
  245. package/dist/src/nile-auto-complete/nile-auto-complete.js +1 -0
  246. package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
  247. package/dist/src/nile-avatar/nile-avatar.d.ts +1 -0
  248. package/dist/src/nile-avatar/nile-avatar.js +1 -0
  249. package/dist/src/nile-avatar/nile-avatar.js.map +1 -1
  250. package/dist/src/nile-badge/nile-badge.d.ts +1 -0
  251. package/dist/src/nile-badge/nile-badge.js +1 -0
  252. package/dist/src/nile-badge/nile-badge.js.map +1 -1
  253. package/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +1 -0
  254. package/dist/src/nile-breadcrumb/nile-breadcrumb.js +5 -0
  255. package/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -1
  256. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +1 -0
  257. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +1 -0
  258. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -1
  259. package/dist/src/nile-button/nile-button.d.ts +1 -0
  260. package/dist/src/nile-button/nile-button.js +1 -0
  261. package/dist/src/nile-button/nile-button.js.map +1 -1
  262. package/dist/src/nile-button-toggle/nile-button-toggle.d.ts +1 -0
  263. package/dist/src/nile-button-toggle/nile-button-toggle.js +1 -0
  264. package/dist/src/nile-button-toggle/nile-button-toggle.js.map +1 -1
  265. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +1 -0
  266. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +1 -0
  267. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -1
  268. package/dist/src/nile-calendar/nile-calendar.d.ts +5 -5
  269. package/dist/src/nile-calendar/nile-calendar.js +8 -17
  270. package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  271. package/dist/src/nile-card/nile-card.d.ts +1 -0
  272. package/dist/src/nile-card/nile-card.js +1 -0
  273. package/dist/src/nile-card/nile-card.js.map +1 -1
  274. package/dist/src/nile-checkbox/nile-checkbox.d.ts +1 -0
  275. package/dist/src/nile-checkbox/nile-checkbox.js +3 -7
  276. package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  277. package/dist/src/nile-chip/nile-chip.d.ts +1 -0
  278. package/dist/src/nile-chip/nile-chip.js +1 -0
  279. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  280. package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -0
  281. package/dist/src/nile-code-editor/nile-code-editor.js +1 -0
  282. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  283. package/dist/src/nile-content-editor/nile-content-editor.d.ts +1 -0
  284. package/dist/src/nile-content-editor/nile-content-editor.js +1 -0
  285. package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  286. package/dist/src/nile-date-picker/nile-date-picker.d.ts +1 -0
  287. package/dist/src/nile-date-picker/nile-date-picker.js +2 -4
  288. package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  289. package/dist/src/nile-dialog/nile-dialog.d.ts +1 -0
  290. package/dist/src/nile-dialog/nile-dialog.js +10 -7
  291. package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
  292. package/dist/src/nile-drawer/nile-drawer.d.ts +1 -0
  293. package/dist/src/nile-drawer/nile-drawer.js +1 -0
  294. package/dist/src/nile-drawer/nile-drawer.js.map +1 -1
  295. package/dist/src/nile-empty-state/nile-empty-state.d.ts +1 -0
  296. package/dist/src/nile-empty-state/nile-empty-state.js +1 -0
  297. package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
  298. package/dist/src/nile-highlighter/nile-highlighter.d.ts +2 -1
  299. package/dist/src/nile-highlighter/nile-highlighter.js +16 -11
  300. package/dist/src/nile-highlighter/nile-highlighter.js.map +1 -1
  301. package/dist/src/nile-icon/icons/svg/index.d.ts +2 -0
  302. package/dist/src/nile-icon/icons/svg/index.js +2 -0
  303. package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  304. package/dist/src/nile-icon/icons/svg/insert-at-cursor.d.ts +5 -0
  305. package/dist/src/nile-icon/icons/svg/insert-at-cursor.js +5 -0
  306. package/dist/src/nile-icon/icons/svg/insert-at-cursor.js.map +1 -0
  307. package/dist/src/nile-icon/icons/svg/warning-01.d.ts +5 -0
  308. package/dist/src/nile-icon/icons/svg/warning-01.js +5 -0
  309. package/dist/src/nile-icon/icons/svg/warning-01.js.map +1 -0
  310. package/dist/src/nile-icon-button/nile-icon-button.d.ts +1 -0
  311. package/dist/src/nile-icon-button/nile-icon-button.js +1 -0
  312. package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
  313. package/dist/src/nile-input/nile-input.d.ts +1 -0
  314. package/dist/src/nile-input/nile-input.js +1 -0
  315. package/dist/src/nile-input/nile-input.js.map +1 -1
  316. package/dist/src/nile-link/nile-link.d.ts +1 -0
  317. package/dist/src/nile-link/nile-link.js +2 -2
  318. package/dist/src/nile-link/nile-link.js.map +1 -1
  319. package/dist/src/nile-list/nile-list.d.ts +1 -0
  320. package/dist/src/nile-list/nile-list.js +5 -0
  321. package/dist/src/nile-list/nile-list.js.map +1 -1
  322. package/dist/src/nile-list-item/nile-list-item.d.ts +1 -0
  323. package/dist/src/nile-list-item/nile-list-item.js +1 -0
  324. package/dist/src/nile-list-item/nile-list-item.js.map +1 -1
  325. package/dist/src/nile-menu/nile-menu.d.ts +1 -0
  326. package/dist/src/nile-menu/nile-menu.js +1 -0
  327. package/dist/src/nile-menu/nile-menu.js.map +1 -1
  328. package/dist/src/nile-menu-item/nile-menu-item.d.ts +2 -0
  329. package/dist/src/nile-menu-item/nile-menu-item.js +3 -5
  330. package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
  331. package/dist/src/nile-option/nile-option.d.ts +2 -0
  332. package/dist/src/nile-option/nile-option.js +3 -5
  333. package/dist/src/nile-option/nile-option.js.map +1 -1
  334. package/dist/src/nile-popover/nile-popover.d.ts +1 -0
  335. package/dist/src/nile-popover/nile-popover.js +3 -2
  336. package/dist/src/nile-popover/nile-popover.js.map +1 -1
  337. package/dist/src/nile-popup/nile-popup.d.ts +2 -0
  338. package/dist/src/nile-popup/nile-popup.js +2 -0
  339. package/dist/src/nile-popup/nile-popup.js.map +1 -1
  340. package/dist/src/nile-radio/nile-radio.js +2 -8
  341. package/dist/src/nile-radio/nile-radio.js.map +1 -1
  342. package/dist/src/nile-radio-group/nile-radio-group.d.ts +1 -0
  343. package/dist/src/nile-radio-group/nile-radio-group.js +1 -0
  344. package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
  345. package/dist/src/nile-select/nile-select.d.ts +1 -0
  346. package/dist/src/nile-select/nile-select.js +1 -0
  347. package/dist/src/nile-select/nile-select.js.map +1 -1
  348. package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +1 -0
  349. package/dist/src/nile-slide-toggle/nile-slide-toggle.js +2 -0
  350. package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
  351. package/dist/src/nile-split-panel/nile-split-panel.d.ts +1 -0
  352. package/dist/src/nile-split-panel/nile-split-panel.js +1 -0
  353. package/dist/src/nile-split-panel/nile-split-panel.js.map +1 -1
  354. package/dist/src/nile-stepper/nile-stepper.d.ts +1 -0
  355. package/dist/src/nile-stepper/nile-stepper.js +1 -0
  356. package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
  357. package/dist/src/nile-tab/nile-tab.d.ts +1 -0
  358. package/dist/src/nile-tab/nile-tab.js +3 -2
  359. package/dist/src/nile-tab/nile-tab.js.map +1 -1
  360. package/dist/src/nile-tab-group/nile-tab-group.d.ts +1 -0
  361. package/dist/src/nile-tab-group/nile-tab-group.js +3 -2
  362. package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
  363. package/dist/src/nile-table-body/nile-table-body.d.ts +1 -0
  364. package/dist/src/nile-table-body/nile-table-body.js +1 -0
  365. package/dist/src/nile-table-body/nile-table-body.js.map +1 -1
  366. package/dist/src/nile-table-header-item/nile-table-header-item.d.ts +1 -0
  367. package/dist/src/nile-table-header-item/nile-table-header-item.js +1 -0
  368. package/dist/src/nile-table-header-item/nile-table-header-item.js.map +1 -1
  369. package/dist/src/nile-tag/nile-tag.d.ts +1 -0
  370. package/dist/src/nile-tag/nile-tag.js +1 -0
  371. package/dist/src/nile-tag/nile-tag.js.map +1 -1
  372. package/dist/src/nile-textarea/nile-textarea.d.ts +1 -0
  373. package/dist/src/nile-textarea/nile-textarea.js +1 -0
  374. package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
  375. package/dist/src/nile-toast/nile-toast.d.ts +1 -0
  376. package/dist/src/nile-toast/nile-toast.js +1 -0
  377. package/dist/src/nile-toast/nile-toast.js.map +1 -1
  378. package/dist/src/nile-tooltip/nile-tooltip.d.ts +1 -0
  379. package/dist/src/nile-tooltip/nile-tooltip.js +1 -0
  380. package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  381. package/dist/src/nile-tree/nile-tree.d.ts +1 -0
  382. package/dist/src/nile-tree/nile-tree.js +1 -0
  383. package/dist/src/nile-tree/nile-tree.js.map +1 -1
  384. package/dist/src/nile-tree-item/nile-tree-item.d.ts +1 -0
  385. package/dist/src/nile-tree-item/nile-tree-item.js +1 -0
  386. package/dist/src/nile-tree-item/nile-tree-item.js.map +1 -1
  387. package/dist/tsconfig.tsbuildinfo +1 -1
  388. package/dist/{twig-4e6df20b.cjs.js → twig-2431875e.cjs.js} +2 -2
  389. package/dist/{twig-4e6df20b.cjs.js.map → twig-2431875e.cjs.js.map} +1 -1
  390. package/dist/{vue-html-4845664e.cjs.js → vue-html-36dd3960.cjs.js} +2 -2
  391. package/dist/{vue-html-4845664e.cjs.js.map → vue-html-36dd3960.cjs.js.map} +1 -1
  392. package/package.json +1 -1
  393. package/src/nile-accordion/nile-accordion.ts +1 -0
  394. package/src/nile-auto-complete/nile-auto-complete.ts +3 -1
  395. package/src/nile-avatar/nile-avatar.ts +2 -0
  396. package/src/nile-badge/nile-badge.ts +2 -0
  397. package/src/nile-breadcrumb/nile-breadcrumb.ts +2 -0
  398. package/src/nile-breadcrumb-item/nile-breadcrumb-item.ts +2 -0
  399. package/src/nile-button/nile-button.ts +2 -0
  400. package/src/nile-button-toggle/nile-button-toggle.ts +2 -0
  401. package/src/nile-button-toggle-group/nile-button-toggle-group.ts +2 -0
  402. package/src/nile-calendar/nile-calendar.ts +11 -19
  403. package/src/nile-card/nile-card.ts +2 -0
  404. package/src/nile-checkbox/nile-checkbox.ts +4 -9
  405. package/src/nile-chip/nile-chip.ts +2 -0
  406. package/src/nile-code-editor/nile-code-editor.ts +2 -0
  407. package/src/nile-content-editor/nile-content-editor.ts +2 -0
  408. package/src/nile-date-picker/nile-date-picker.ts +3 -4
  409. package/src/nile-dialog/nile-dialog.ts +12 -8
  410. package/src/nile-drawer/nile-drawer.ts +2 -0
  411. package/src/nile-empty-state/nile-empty-state.ts +2 -0
  412. package/src/nile-highlighter/nile-highlighter.ts +20 -13
  413. package/src/nile-icon/icons/svg/index.ts +2 -0
  414. package/src/nile-icon/icons/svg/insert-at-cursor.ts +5 -0
  415. package/src/nile-icon/icons/svg/warning-01.ts +5 -0
  416. package/src/nile-icon-button/nile-icon-button.ts +2 -0
  417. package/src/nile-input/nile-input.ts +2 -0
  418. package/src/nile-link/nile-link.ts +3 -1
  419. package/src/nile-list/nile-list.ts +2 -0
  420. package/src/nile-list-item/nile-list-item.ts +2 -0
  421. package/src/nile-menu/nile-menu.ts +3 -0
  422. package/src/nile-menu-item/nile-menu-item.ts +4 -5
  423. package/src/nile-option/nile-option.ts +4 -5
  424. package/src/nile-popover/nile-popover.ts +4 -2
  425. package/src/nile-popup/nile-popup.ts +3 -0
  426. package/src/nile-radio/nile-radio.ts +2 -12
  427. package/src/nile-radio-group/nile-radio-group.ts +2 -0
  428. package/src/nile-select/nile-select.ts +2 -0
  429. package/src/nile-slide-toggle/nile-slide-toggle.ts +3 -0
  430. package/src/nile-split-panel/nile-split-panel.ts +2 -0
  431. package/src/nile-stepper/nile-stepper.ts +2 -0
  432. package/src/nile-tab/nile-tab.ts +4 -2
  433. package/src/nile-tab-group/nile-tab-group.ts +4 -2
  434. package/src/nile-table-body/nile-table-body.ts +2 -0
  435. package/src/nile-table-header-item/nile-table-header-item.ts +2 -0
  436. package/src/nile-tag/nile-tag.ts +2 -0
  437. package/src/nile-textarea/nile-textarea.ts +2 -0
  438. package/src/nile-toast/nile-toast.ts +2 -0
  439. package/src/nile-tooltip/nile-tooltip.ts +2 -0
  440. package/src/nile-tree/nile-tree.ts +2 -0
  441. package/src/nile-tree-item/nile-tree-item.ts +2 -0
  442. package/dist/hy-70a23b1a.cjs.js +0 -2
  443. package/dist/hy-70a23b1a.cjs.js.map +0 -1
  444. package/dist/hy-c5d98bdd.esm.js +0 -1
  445. package/dist/sass-07548677.esm.js +0 -1
  446. package/dist/sass-836693eb.cjs.js +0 -2
  447. package/dist/sass-836693eb.cjs.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"nile-content-editor.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAkB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,WAAW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,EAAE;+CAAyB;AAExB;IAAX,QAAQ,EAAE;mDAA0B;AAEH;IAAjC,KAAK,CAAC,yBAAyB,CAAC;wDAAiC;AAChC;IAAjC,KAAK,CAAC,yBAAyB,CAAC;sDAA+B;AAEvD;IAAR,KAAK,EAAE;uDAAsB;AAMQ;IAArC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;mDAAe;AAEf;IAApC,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;mDAAkB;AAEZ;IAAzC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;uDAAmB;AAE1B;IAAjC,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;gDAAe;AACX;IAApC,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;mDAAkB;AACzB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDAA0B;AAE7C;IAAR,KAAK,EAAE;uDAAmB;AAwE3B;IADC,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;yDAOxD;AAxHU,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAsX7B;SAtXY,iBAAiB;AAwX9B,eAAe,iBAAiB,CAAC","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, property, TemplateResult } from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-content-editor.css';\nimport { CSSResultGroup } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport { KeyCode } from '../internal/enum';\nimport { live } from 'lit/directives/live.js';\n\n/**\n * Nile icon component.\n *\n * @tag nile-attribute-expression\n *\n */\n@customElement('nile-content-editor')\nexport class NileContentEditor extends NileElement {\n /**\n * @summary Allows you to handle both input and dropdown selection\n\n * @dependency nile-option\n \n * @event nile-change - Emitted when the control's value changes. \n */\n\n @property() value: string = '';\n\n @property() options: Array<any>;\n\n @property() filteredOptions: Array<any>;\n\n @property() showLabel: boolean = true;\n\n @property() labelText = '';\n\n @property() type = 'text|text-area';\n\n @property() required: boolean = true;\n\n @query('.content-editable-input') contentEditor: HTMLInputElement;\n @query('.nile-options-container') autoOptions: HTMLInputElement;\n\n @state() openDropdown = false;\n\n tagIdentifier = '$';\n\n filteredValue = '';\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'readonly' }) readonly = false;\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n @property({ attribute: 'error' }) error = false;\n @property({ attribute: 'noborder' }) noborder = false;\n @property({ type: Boolean }) updateValue: any = false;\n\n @state() initialValue = '';\n\n static styles: CSSResultGroup = styles;\n\n connectedCallback() {\n this.handleOutsideClick = this.handleOutsideClick.bind(this);\n this.handleClipboardEvent = this.handleClipboardEvent.bind(this);\n super.connectedCallback();\n this.emit('nile-init');\n this.addOpenListeners();\n this.setInitialValues();\n }\n\n addOpenListeners() {\n window.addEventListener('click', this.handleOutsideClick);\n this.addEventListener('cut', this.handleClipboardEvent);\n this.addEventListener('copy', this.handleClipboardEvent);\n this.addEventListener('paste', this.handleClipboardEvent);\n }\n\n removeOpenListeners() {\n this.removeEventListener('click', this.handleOutsideClick);\n this.removeEventListener('cut', this.handleClipboardEvent);\n this.removeEventListener('copy', this.handleClipboardEvent);\n this.removeEventListener('paste', this.handleClipboardEvent);\n }\n\n handleOutsideClick(event: any) {\n if (event && event.target && !this.contains(event.target)) {\n this.toggleDropdown(false);\n }\n }\n\n async handleClipboardEvent(event: Event) {\n const selectedText = window?.getSelection()?.toString();\n switch (event.type) {\n case 'cut':\n case 'copy':\n if (!!selectedText) await navigator.clipboard.writeText(selectedText);\n document.execCommand(event.type);\n break;\n case 'paste':\n event.preventDefault();\n let pastedText = '';\n pastedText = await navigator.clipboard.readText();\n pastedText = pastedText\n .replace(/<(|\\/)(html|body|meta|span)[^>]*?>/gi, '')\n .trim();\n document.execCommand('insertText', false, pastedText);\n break;\n default:\n break;\n }\n setTimeout(() => {\n this.emitInputChange();\n });\n }\n\n toggleDropdown(value: boolean) {\n this.openDropdown = value;\n }\n\n setInitialValues() {\n this.updateComplete.then(res => {\n if (res)\n this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(\n this.value\n );\n });\n }\n\n @watch(['type', 'value'], { waitUntilFirstUpdate: true })\n handleTypeChange() {\n if (this.updateValue) {\n this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(\n this.value\n );\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.emit('nile-destroy');\n }\n\n private handlekeyDown(event: any) {\n if (event.code === KeyCode.ENTER && this.type === 'text') {\n event.preventDefault();\n return;\n }\n if (\n [KeyCode.CUT, KeyCode.COPY, KeyCode.PASTE].includes(event.code) &&\n (event.ctrlKey || event.metaKey)\n ) {\n return;\n }\n\n if (event.code === KeyCode.ESCAPE) {\n event.preventDefault();\n this.toggleDropdown(false);\n return;\n }\n setTimeout(() => {\n const value = this.contentEditor.innerText;\n this.emitInputChange();\n if (value.includes(this.tagIdentifier)) {\n this.insertNodes(this.contentEditor, this.contentEditor.childNodes);\n this.filterOptions();\n this.toggleDropdown(true);\n } else {\n this.toggleDropdown(false);\n }\n }, 10);\n }\n\n filterOptions() {\n this.filteredOptions = this.options;\n this.filteredValue = this.filteredValue.trim();\n if (!!this.options.length && !!this.filteredValue) {\n this.filteredOptions = this.options.filter(item =>\n item.includes(this.filteredValue)\n );\n } else {\n this.filteredOptions = this.options;\n }\n }\n\n generateValuesFromHTMLTags(string: any): string {\n let errorTag =\n /<span class=\"chips chip-error\" contenteditable=\"false\">(.*?)<\\/span>/g;\n this.error = !!string.match(errorTag);\n var pattern =\n /<span class=\"chips(?: chip-error)?\" contenteditable=\"false\">(.*?)<\\/span>/g;\n let result = string.replace(pattern, (match: any, option: any) => {\n return '{{' + option + '}}';\n });\n return result;\n }\n\n generateHTMLTagsWithValues(string: any): string {\n var pattern = /{{(.*?)}}/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return this.options.includes(option)\n ? '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>'\n : this.setError(option);\n });\n return result;\n }\n\n setError(option: any) {\n this.error = true;\n return (\n '<span class=\"chips chip-error\" contenteditable=\"false\">' +\n option +\n '</span>'\n );\n }\n\n emitInputChange(): void {\n if (this.contentEditor) {\n let fieldValue = this.contentEditor.innerHTML;\n fieldValue = fieldValue.replace(/&nbsp;/g, ' ');\n fieldValue = fieldValue.replace('<br>', '');\n this.emit('nile-change', {\n value: this.generateValuesFromHTMLTags(fieldValue),\n });\n }\n }\n\n replaceText = '';\n\n insertNodes(\n parentNode: Node,\n childNodes: NodeList,\n autoOptionsTag?: HTMLElement\n ) {\n [...childNodes].forEach((node: Node, index: number) => {\n if (node.hasChildNodes()) {\n if (autoOptionsTag) {\n this.insertNodes(node, node.childNodes, autoOptionsTag);\n } else {\n this.insertNodes(node, node.childNodes);\n }\n } else {\n if (node.nodeValue?.includes(this.tagIdentifier)) {\n if (autoOptionsTag) {\n this.insertAutoOptionsTag(node, autoOptionsTag);\n }\n\n this.setFilterValue(node.nodeValue);\n\n return;\n }\n }\n });\n }\n\n insertAutoOptionsTag(node: any, autoOptionsTag: any) {\n const selection = window.getSelection();\n const range = document.createRange();\n const curssorNodeindex = node.nodeValue.indexOf(this.tagIdentifier);\n range.setStart(node, curssorNodeindex);\n range.insertNode(autoOptionsTag);\n range.setStartAfter(autoOptionsTag);\n range.collapse(true);\n selection?.removeAllRanges();\n selection?.addRange(range);\n\n if (autoOptionsTag.nextSibling?.nodeValue) {\n autoOptionsTag.nextSibling.nodeValue =\n autoOptionsTag.nextSibling?.nodeValue?.replace(\n this.tagIdentifier + this.filteredValue,\n ''\n );\n }\n this.contentEditor.focus();\n }\n\n setFilterValue(value: any) {\n //replace Text - check if text exists after tagidentifier , if exists take account of that too\n if (!this.openDropdown) {\n this.replaceText = value.split(this.tagIdentifier).slice(1).join();\n }\n if (!!value && this.openDropdown) {\n this.filteredValue = value\n ?.split(this.tagIdentifier)\n .slice(1)\n .join()\n .replace(this.replaceText, '');\n } else {\n this.filteredValue = '';\n }\n }\n\n handleOptions(option: any): void {\n this.toggleDropdown(false);\n let autoOptionsTag = document.createElement('span');\n autoOptionsTag.setAttribute('class', 'chips');\n autoOptionsTag.setAttribute('contentEditable', 'false');\n autoOptionsTag.innerText = option;\n this.insertNodes(\n this.contentEditor,\n this.contentEditor.childNodes,\n autoOptionsTag\n );\n this.resetOptions();\n this.emitInputChange();\n }\n\n resetOptions() {\n this.filteredOptions = this.options;\n this.filteredValue = '';\n }\n\n public renderAutoOptions(): TemplateResult {\n return html`<div\n class=\"${classMap({\n 'nile-options-container': true,\n 'dropdown-position': this.type === 'text-area',\n })}\"\n >\n ${this.filteredOptions &&\n this.filteredOptions.map((option: any) => {\n return html` <nile-option\n .value=\"${option}\"\n @click=\"${(event: Event) => {\n this.handleOptions(option);\n }}\"\n >${option}\n </nile-option>`;\n })}\n </div>`;\n }\n\n public render(): TemplateResult {\n const hasHelpText = this.helpText ? true : false;\n const hasError = !!this.error;\n const hasErrorMessage = !!this.errorMessage;\n const readonly = !!this.readonly;\n const noborder = !!this.noborder;\n const type = this.type;\n return html`\n <nile-popup\n .active=\"${live(this.openDropdown)}\"\n sync=\"width\"\n strategy=\"fixed\"\n placement=\"bottom\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': true,\n popup: true,\n })}\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ${this.showLabel && this.labelText\n ? html`<label class=\"ods-label\">${this.labelText} </label> ${this\n .required\n ? html`<span class=\"asterik\">*</span>`\n : ''}`\n : ''}\n <div\n contenteditable=\"${!readonly}\"\n spellcheck=\"false\"\n class=${classMap({\n 'content-editable-input': true,\n error: hasError || hasErrorMessage,\n 'read-only': readonly,\n 'no-border': noborder,\n 'text-area': type === 'text-area' ? true : false,\n })}\n @keydown=${this.handlekeyDown}\n ></div>\n ${hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </div>\n ${this.filteredOptions && !!this.filteredOptions.length\n ? this.renderAutoOptions()\n : null}\n </nile-popup>\n `;\n }\n}\n\nexport default NileContentEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-content-editor': NileContentEditor;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-content-editor.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAkB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C;;;;;GAKG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,WAAW;IAA3C;QACL;;;;;;SAMC;;QAEkB,YAAO,GAAU,KAAK,CAAC;QAE9B,UAAK,GAAW,EAAE,CAAC;QAMnB,cAAS,GAAY,IAAI,CAAC;QAE1B,cAAS,GAAG,EAAE,CAAC;QAEf,SAAI,GAAG,gBAAgB,C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1B;IAAjC,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;gDAAe;AACX;IAApC,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;mDAAkB;AACzB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDAA0B;AAE7C;IAAR,KAAK,EAAE;uDAAmB;AAwE3B;IADC,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;yDAOxD;AA1HU,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAwX7B;SAxXY,iBAAiB;AA0X9B,eAAe,iBAAiB,CAAC","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, property, TemplateResult } from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-content-editor.css';\nimport { CSSResultGroup } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport { KeyCode } from '../internal/enum';\nimport { live } from 'lit/directives/live.js';\n\n/**\n * Nile icon component.\n *\n * @tag nile-attribute-expression\n *\n */\n@customElement('nile-content-editor')\nexport class NileContentEditor extends NileElement {\n /**\n * @summary Allows you to handle both input and dropdown selection\n\n * @dependency nile-option\n \n * @event nile-change - Emitted when the control's value changes. \n */\n\n protected override BUBBLES: boolean=false;\n\n @property() value: string = '';\n\n @property() options: Array<any>;\n\n @property() filteredOptions: Array<any>;\n\n @property() showLabel: boolean = true;\n\n @property() labelText = '';\n\n @property() type = 'text|text-area';\n\n @property() required: boolean = true;\n\n @query('.content-editable-input') contentEditor: HTMLInputElement;\n @query('.nile-options-container') autoOptions: HTMLInputElement;\n\n @state() openDropdown = false;\n\n tagIdentifier = '$';\n\n filteredValue = '';\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'readonly' }) readonly = false;\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n @property({ attribute: 'error' }) error = false;\n @property({ attribute: 'noborder' }) noborder = false;\n @property({ type: Boolean }) updateValue: any = false;\n\n @state() initialValue = '';\n\n static styles: CSSResultGroup = styles;\n\n connectedCallback() {\n this.handleOutsideClick = this.handleOutsideClick.bind(this);\n this.handleClipboardEvent = this.handleClipboardEvent.bind(this);\n super.connectedCallback();\n this.emit('nile-init');\n this.addOpenListeners();\n this.setInitialValues();\n }\n\n addOpenListeners() {\n window.addEventListener('click', this.handleOutsideClick);\n this.addEventListener('cut', this.handleClipboardEvent);\n this.addEventListener('copy', this.handleClipboardEvent);\n this.addEventListener('paste', this.handleClipboardEvent);\n }\n\n removeOpenListeners() {\n this.removeEventListener('click', this.handleOutsideClick);\n this.removeEventListener('cut', this.handleClipboardEvent);\n this.removeEventListener('copy', this.handleClipboardEvent);\n this.removeEventListener('paste', this.handleClipboardEvent);\n }\n\n handleOutsideClick(event: any) {\n if (event && event.target && !this.contains(event.target)) {\n this.toggleDropdown(false);\n }\n }\n\n async handleClipboardEvent(event: Event) {\n const selectedText = window?.getSelection()?.toString();\n switch (event.type) {\n case 'cut':\n case 'copy':\n if (!!selectedText) await navigator.clipboard.writeText(selectedText);\n document.execCommand(event.type);\n break;\n case 'paste':\n event.preventDefault();\n let pastedText = '';\n pastedText = await navigator.clipboard.readText();\n pastedText = pastedText\n .replace(/<(|\\/)(html|body|meta|span)[^>]*?>/gi, '')\n .trim();\n document.execCommand('insertText', false, pastedText);\n break;\n default:\n break;\n }\n setTimeout(() => {\n this.emitInputChange();\n });\n }\n\n toggleDropdown(value: boolean) {\n this.openDropdown = value;\n }\n\n setInitialValues() {\n this.updateComplete.then(res => {\n if (res)\n this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(\n this.value\n );\n });\n }\n\n @watch(['type', 'value'], { waitUntilFirstUpdate: true })\n handleTypeChange() {\n if (this.updateValue) {\n this.contentEditor.innerHTML = this.generateHTMLTagsWithValues(\n this.value\n );\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.emit('nile-destroy');\n }\n\n private handlekeyDown(event: any) {\n if (event.code === KeyCode.ENTER && this.type === 'text') {\n event.preventDefault();\n return;\n }\n if (\n [KeyCode.CUT, KeyCode.COPY, KeyCode.PASTE].includes(event.code) &&\n (event.ctrlKey || event.metaKey)\n ) {\n return;\n }\n\n if (event.code === KeyCode.ESCAPE) {\n event.preventDefault();\n this.toggleDropdown(false);\n return;\n }\n setTimeout(() => {\n const value = this.contentEditor.innerText;\n this.emitInputChange();\n if (value.includes(this.tagIdentifier)) {\n this.insertNodes(this.contentEditor, this.contentEditor.childNodes);\n this.filterOptions();\n this.toggleDropdown(true);\n } else {\n this.toggleDropdown(false);\n }\n }, 10);\n }\n\n filterOptions() {\n this.filteredOptions = this.options;\n this.filteredValue = this.filteredValue.trim();\n if (!!this.options.length && !!this.filteredValue) {\n this.filteredOptions = this.options.filter(item =>\n item.includes(this.filteredValue)\n );\n } else {\n this.filteredOptions = this.options;\n }\n }\n\n generateValuesFromHTMLTags(string: any): string {\n let errorTag =\n /<span class=\"chips chip-error\" contenteditable=\"false\">(.*?)<\\/span>/g;\n this.error = !!string.match(errorTag);\n var pattern =\n /<span class=\"chips(?: chip-error)?\" contenteditable=\"false\">(.*?)<\\/span>/g;\n let result = string.replace(pattern, (match: any, option: any) => {\n return '{{' + option + '}}';\n });\n return result;\n }\n\n generateHTMLTagsWithValues(string: any): string {\n var pattern = /{{(.*?)}}/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return this.options.includes(option)\n ? '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>'\n : this.setError(option);\n });\n return result;\n }\n\n setError(option: any) {\n this.error = true;\n return (\n '<span class=\"chips chip-error\" contenteditable=\"false\">' +\n option +\n '</span>'\n );\n }\n\n emitInputChange(): void {\n if (this.contentEditor) {\n let fieldValue = this.contentEditor.innerHTML;\n fieldValue = fieldValue.replace(/&nbsp;/g, ' ');\n fieldValue = fieldValue.replace('<br>', '');\n this.emit('nile-change', {\n value: this.generateValuesFromHTMLTags(fieldValue),\n });\n }\n }\n\n replaceText = '';\n\n insertNodes(\n parentNode: Node,\n childNodes: NodeList,\n autoOptionsTag?: HTMLElement\n ) {\n [...childNodes].forEach((node: Node, index: number) => {\n if (node.hasChildNodes()) {\n if (autoOptionsTag) {\n this.insertNodes(node, node.childNodes, autoOptionsTag);\n } else {\n this.insertNodes(node, node.childNodes);\n }\n } else {\n if (node.nodeValue?.includes(this.tagIdentifier)) {\n if (autoOptionsTag) {\n this.insertAutoOptionsTag(node, autoOptionsTag);\n }\n\n this.setFilterValue(node.nodeValue);\n\n return;\n }\n }\n });\n }\n\n insertAutoOptionsTag(node: any, autoOptionsTag: any) {\n const selection = window.getSelection();\n const range = document.createRange();\n const curssorNodeindex = node.nodeValue.indexOf(this.tagIdentifier);\n range.setStart(node, curssorNodeindex);\n range.insertNode(autoOptionsTag);\n range.setStartAfter(autoOptionsTag);\n range.collapse(true);\n selection?.removeAllRanges();\n selection?.addRange(range);\n\n if (autoOptionsTag.nextSibling?.nodeValue) {\n autoOptionsTag.nextSibling.nodeValue =\n autoOptionsTag.nextSibling?.nodeValue?.replace(\n this.tagIdentifier + this.filteredValue,\n ''\n );\n }\n this.contentEditor.focus();\n }\n\n setFilterValue(value: any) {\n //replace Text - check if text exists after tagidentifier , if exists take account of that too\n if (!this.openDropdown) {\n this.replaceText = value.split(this.tagIdentifier).slice(1).join();\n }\n if (!!value && this.openDropdown) {\n this.filteredValue = value\n ?.split(this.tagIdentifier)\n .slice(1)\n .join()\n .replace(this.replaceText, '');\n } else {\n this.filteredValue = '';\n }\n }\n\n handleOptions(option: any): void {\n this.toggleDropdown(false);\n let autoOptionsTag = document.createElement('span');\n autoOptionsTag.setAttribute('class', 'chips');\n autoOptionsTag.setAttribute('contentEditable', 'false');\n autoOptionsTag.innerText = option;\n this.insertNodes(\n this.contentEditor,\n this.contentEditor.childNodes,\n autoOptionsTag\n );\n this.resetOptions();\n this.emitInputChange();\n }\n\n resetOptions() {\n this.filteredOptions = this.options;\n this.filteredValue = '';\n }\n\n public renderAutoOptions(): TemplateResult {\n return html`<div\n class=\"${classMap({\n 'nile-options-container': true,\n 'dropdown-position': this.type === 'text-area',\n })}\"\n >\n ${this.filteredOptions &&\n this.filteredOptions.map((option: any) => {\n return html` <nile-option\n .value=\"${option}\"\n @click=\"${(event: Event) => {\n this.handleOptions(option);\n }}\"\n >${option}\n </nile-option>`;\n })}\n </div>`;\n }\n\n public render(): TemplateResult {\n const hasHelpText = this.helpText ? true : false;\n const hasError = !!this.error;\n const hasErrorMessage = !!this.errorMessage;\n const readonly = !!this.readonly;\n const noborder = !!this.noborder;\n const type = this.type;\n return html`\n <nile-popup\n .active=\"${live(this.openDropdown)}\"\n sync=\"width\"\n strategy=\"fixed\"\n placement=\"bottom\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': true,\n popup: true,\n })}\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ${this.showLabel && this.labelText\n ? html`<label class=\"ods-label\">${this.labelText} </label> ${this\n .required\n ? html`<span class=\"asterik\">*</span>`\n : ''}`\n : ''}\n <div\n contenteditable=\"${!readonly}\"\n spellcheck=\"false\"\n class=${classMap({\n 'content-editable-input': true,\n error: hasError || hasErrorMessage,\n 'read-only': readonly,\n 'no-border': noborder,\n 'text-area': type === 'text-area' ? true : false,\n })}\n @keydown=${this.handlekeyDown}\n ></div>\n ${hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </div>\n ${this.filteredOptions && !!this.filteredOptions.length\n ? this.renderAutoOptions()\n : null}\n </nile-popup>\n `;\n }\n}\n\nexport default NileContentEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-content-editor': NileContentEditor;\n }\n}\n"]}
@@ -19,6 +19,7 @@ export declare class NileDatePicker extends NileElement {
19
19
  * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
20
20
  */
21
21
  static get styles(): CSSResultArray;
22
+ protected BUBBLES: boolean;
22
23
  range: boolean;
23
24
  hideTypes: boolean;
24
25
  open: boolean;
@@ -18,6 +18,7 @@ import NileElement from '../internal/nile-element';
18
18
  let NileDatePicker = class NileDatePicker extends NileElement {
19
19
  constructor() {
20
20
  super(...arguments);
21
+ this.BUBBLES = false;
21
22
  this.range = false;
22
23
  this.hideTypes = false;
23
24
  this.open = false;
@@ -47,10 +48,8 @@ let NileDatePicker = class NileDatePicker extends NileElement {
47
48
  .type="${this.type}"
48
49
  value="${this.value}"
49
50
  .range="${this.range}"
50
- @nile-init="${(e) => e.stopPropagation()}"
51
- @nile-destroy="${(e) => e.stopPropagation()}"
52
- @nile-changed="${(e) => e.stopPropagation()}"
53
51
  @nile-change="${this.handleChanged}"
52
+ @nile-type-change="${(e) => this.emit('nile-type-change', e.detail)}"
54
53
  .allowedDates="${this.allowedDates}"
55
54
  .hideDurationFields="${this.hideDurationFields}"
56
55
  .showManualInputs="${this.showManualInputs}"
@@ -59,7 +58,6 @@ let NileDatePicker = class NileDatePicker extends NileElement {
59
58
  `;
60
59
  }
61
60
  handleChanged(event) {
62
- event.stopPropagation();
63
61
  this.emit('nile-changed', event.detail);
64
62
  this.emit('nile-change', event.detail);
65
63
  if (this.dropdown) {
@@ -1 +1 @@
1
- {"version":3,"file":"nile-date-picker.js","sourceRoot":"","sources":["../../../src/nile-date-picker/nile-date-picker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,E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ensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query } from 'lit/decorators.js';\nimport { styles } from './nile-date-picker.css';\nimport NileElement from '../internal/nile-element';\nimport { NileDropdown } from '../nile-dropdown';\n\n/**\n * Nile icon component.\n *\n * @tag nile-date-picker\n *\n */\n@customElement('nile-date-picker')\nexport class NileDatePicker extends NileElement {\n /**\n * The styles for DatePicker\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean }) range = false;\n\n @property({ type: Boolean }) hideTypes = false;\n\n @property({ type: Boolean }) open = false;\n\n @property({ type: Boolean, attribute: 'hide-time-zone' }) hideTimeZone = false;\n\n @property({ type: String, reflect: true }) type :'absolute' | 'relative' = 'absolute';\n\n @property({ type: Boolean, attribute: 'showManualInputs' })\n showManualInputs = false;\n\n @property() value: any;\n @property({ type: Array, attribute: 'hide-duration-fields' })\n hideDurationFields: any = [];\n\n @property({ attribute: 'allowedDates' }) allowedDates: any = '{}';\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n /**\n * Render method\n * @slot This is a slot test\n */\n render(): TemplateResult {\n return html`\n <nile-dropdown .open=\"${this.open}\" part=\"dd-base\" .hoist=\"${true}\" distance=\"6\" exportparts=\"base\">\n <slot slot=\"trigger\" part=\"trigger\" name=\"trigger\"></slot>\n <nile-calendar\n .hideTypes=\"${this.hideTypes}\"\n \t.type=\"${this.type}\"\n value=\"${this.value}\"\n .range=\"${this.range}\"\n @nile-init=\"${(e:CustomEvent)=>e.stopPropagation()}\"\n @nile-destroy=\"${(e:CustomEvent)=>e.stopPropagation()}\"\n @nile-changed=\"${(e:CustomEvent)=>e.stopPropagation()}\"\n @nile-change=\"${this.handleChanged}\"\n .allowedDates=\"${this.allowedDates}\"\n .hideDurationFields=\"${this.hideDurationFields}\"\n .showManualInputs=\"${this.showManualInputs}\"\n ></nile-calendar>\n </nile-dropdown>\n `;\n }\n\n handleChanged(event: CustomEvent) {\n event.stopPropagation()\n this.emit('nile-changed', event.detail);\n this.emit('nile-change', event.detail);\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n}\n\nexport default NileDatePicker;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-date-picker': NileDatePicker;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-date-picker.js","sourceRoot":"","sources":["../../../src/nile-date-picker/nile-date-picker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QASc,YAAO,GAAU,KAAK,CAAC;QAEb,UAAK,GAAG,KAAK,CAAC;QAEd,cAAS,GAAG,KAAK,CAAC;QAElB,SAAI,GAAG,KAAK,CAAC;QAEgB,iBAAY,GAAG,KAAK,CAAC;QAEpC,SAAI,GAA4B,UAAU,CAAC;QAGtF,qBAAgB,GAAG,KAAK,CAAC;QAIzB,uBAAkB,GAAQ,EAAE,CAAC;QAEY,iBAAY,GAAQ,IAAI,CAAC;IA4CpE,CAAC;IAvEC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAyBD;;;OAGG;IACH,MAAM;QACJ,OAAO,IAAI,CAAA;8BACe,IAAI,CAAC,IAAI,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O,EAAE,IAAI,EAAE,CAAC;4CAA4C;AAGtF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;wDAClC;AAEb;IAAX,QAAQ,EAAE;6CAAY;AAEvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC;0DAChC;AAEY;IAAxC,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;oDAA0B;AAE1C;IAAvB,KAAK,CAAC,eAAe,CAAC;gDAAwB;AA9BpC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAwE1B;SAxEY,cAAc;AA0E3B,eAAe,cAAc,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query } from 'lit/decorators.js';\nimport { styles } from './nile-date-picker.css';\nimport NileElement from '../internal/nile-element';\nimport { NileDropdown } from '../nile-dropdown';\n\n/**\n * Nile icon component.\n *\n * @tag nile-date-picker\n *\n */\n@customElement('nile-date-picker')\nexport class NileDatePicker extends NileElement {\n /**\n * The styles for DatePicker\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected override BUBBLES: boolean=false;\n\n @property({ type: Boolean }) range = false;\n\n @property({ type: Boolean }) hideTypes = false;\n\n @property({ type: Boolean }) open = false;\n\n @property({ type: Boolean, attribute: 'hide-time-zone' }) hideTimeZone = false;\n\n @property({ type: String, reflect: true }) type :'absolute' | 'relative' = 'absolute';\n\n @property({ type: Boolean, attribute: 'showManualInputs' })\n showManualInputs = false;\n\n @property() value: any;\n @property({ type: Array, attribute: 'hide-duration-fields' })\n hideDurationFields: any = [];\n\n @property({ attribute: 'allowedDates' }) allowedDates: any = '{}';\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n /**\n * Render method\n * @slot This is a slot test\n */\n render(): TemplateResult {\n return html`\n <nile-dropdown .open=\"${this.open}\" part=\"dd-base\" .hoist=\"${true}\" distance=\"6\" exportparts=\"base\">\n <slot slot=\"trigger\" part=\"trigger\" name=\"trigger\"></slot>\n <nile-calendar\n .hideTypes=\"${this.hideTypes}\"\n \t.type=\"${this.type}\"\n value=\"${this.value}\"\n .range=\"${this.range}\"\n @nile-change=\"${this.handleChanged}\"\n @nile-type-change=\"${(e:CustomEvent)=>this.emit('nile-type-change',e.detail)}\"\n .allowedDates=\"${this.allowedDates}\"\n .hideDurationFields=\"${this.hideDurationFields}\"\n .showManualInputs=\"${this.showManualInputs}\"\n ></nile-calendar>\n </nile-dropdown>\n `;\n }\n\n handleChanged(event: CustomEvent) {\n this.emit('nile-changed', event.detail);\n this.emit('nile-change', event.detail);\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n}\n\nexport default NileDatePicker;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-date-picker': NileDatePicker;\n }\n}\n"]}
@@ -16,6 +16,7 @@ import NileElement from '../internal/nile-element';
16
16
  */
17
17
  export declare class NileDialog extends NileElement {
18
18
  static styles: CSSResultGroup;
19
+ protected BUBBLES: boolean;
19
20
  private readonly hasSlotController;
20
21
  private modal;
21
22
  private originalTrigger;
@@ -12,7 +12,7 @@ import { classMap } from 'lit/directives/class-map.js';
12
12
  import { customElement, property, query } from 'lit/decorators.js';
13
13
  import { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';
14
14
  import { HasSlotController } from '../internal/slot';
15
- import { html } from 'lit';
15
+ import { html, nothing } from 'lit';
16
16
  import { ifDefined } from 'lit/directives/if-defined.js';
17
17
  import { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';
18
18
  import { waitForEvent } from '../internal/event';
@@ -28,7 +28,8 @@ import NileElement from '../internal/nile-element';
28
28
  let NileDialog = class NileDialog extends NileElement {
29
29
  constructor() {
30
30
  super(...arguments);
31
- this.hasSlotController = new HasSlotController(this, 'footer');
31
+ this.BUBBLES = false;
32
+ this.hasSlotController = new HasSlotController(this, 'footer', 'sublabel', 'label');
32
33
  /**
33
34
  * Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can
34
35
  * use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.
@@ -246,13 +247,15 @@ let NileDialog = class NileDialog extends NileElement {
246
247
  <slot name="label">
247
248
  ${this.label?.length
248
249
  ? this.label
249
- : String.fromCharCode(65279)}
250
+ : nothing}
250
251
  </slot>
251
- <slot name="sublabel">
252
- ${this.sublabel?.length
252
+ ${this.sublabel || this.hasSlotController.test('sublabel') ? html `
253
+ <slot name="sublabel">
254
+ ${this.sublabel?.length
253
255
  ? this.sublabel
254
- : String.fromCharCode(65279)}
255
- </slot>
256
+ : nothing}
257
+ </slot>
258
+ ` : ''}
256
259
  </h2>
257
260
  <div part="header-actions" class="dialog__header-actions">
258
261
  <slot name="header-actions"></slot>
@@ -1 +1 @@
1
- {"version":3,"file":"nile-dialog.js","sourceRoot":"","sources":["../../../src/nile-dialog/nile-dialog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAi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E,CAAC,EAAE;QACxB,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE;KAC3B;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE;CAC3C,CAAC,CAAC;AAEH,mBAAmB,CAAC,kBAAkB,EAAE;IACtC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACxD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, CSSResultArray, TemplateResult} from 'lit-element';\nimport {styles} from './nile-dialog.css';\n\nimport '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\n/**\n * Nile icon component.\n *\n * @tag nile-modal\n *\n */\n@customElement('nile-dialog')\nexport class NileDialog extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.dialog') dialog: HTMLElement;\n @query('.dialog__panel') panel: HTMLElement;\n @query('.dialog__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The dialog's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n \n @property({ reflect: true }) sublabel = '';\n\n /**\n * Disables the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the dialog.\n */\n @property({ type: Boolean, reflect: true }) noHeader = false;\n\n @property({ type: Boolean, reflect: true }) preventOverlayClose = false;\n\n /**\n * Added to resolve conflicts between Angular Material's mat-drawer components.\n */\n private drawerStyle = `\n <style id=\"drawer-style\">\n .mat-drawer.mat-drawer-side { z-index: 1; }\n </style>\n `;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.dialog.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n this.modal.activate();\n lockBodyScrolling(this);\n document.head.insertAdjacentHTML('beforeend', this.drawerStyle);\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n const nileRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source },\n });\n\n if (source === 'close-button') {\n this.hide();\n return;\n }\n\n if (nileRequestClose.defaultPrevented || this.preventOverlayClose) {\n const animation = getAnimation(this, 'dialog.denyClose', {\n dir: 'right',\n });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n this.modal.activate();\n document.head.insertAdjacentHTML('beforeend', this.drawerStyle);\n lockBodyScrolling(this);\n\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([\n stopAnimations(this.dialog),\n stopAnimations(this.overlay),\n ]);\n this.dialog.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const nileInitialFocus = this.emit('nile-initial-focus', {\n cancelable: true,\n });\n\n if (!nileInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({\n preventScroll: true,\n });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, 'dialog.show', {\n dir: 'right',\n });\n const overlayAnimation = getAnimation(this, 'dialog.overlay.show', {\n dir: 'right',\n });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(\n this.overlay,\n overlayAnimation.keyframes,\n overlayAnimation.options\n ),\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n this.modal.deactivate();\n\n await Promise.all([\n stopAnimations(this.dialog),\n stopAnimations(this.overlay),\n ]);\n const panelAnimation = getAnimation(this, 'dialog.hide', {\n dir: 'right',\n });\n const overlayAnimation = getAnimation(this, 'dialog.overlay.hide', {\n dir: 'right',\n });\n\n const styleTag = document.getElementById('drawer-style');\n if (styleTag) {\n document.head.removeChild(styleTag);\n }\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(\n this.overlay,\n overlayAnimation.keyframes,\n overlayAnimation.options\n ).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(\n this.panel,\n panelAnimation.keyframes,\n panelAnimation.options\n ).then(() => {\n this.panel.hidden = true;\n }),\n ]);\n\n this.dialog.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n unlockBodyScrolling(this);\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n /** Shows the dialog. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the dialog */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n dialog: true,\n 'dialog--open': this.open,\n 'dialog--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div\n part=\"overlay\"\n class=\"dialog__overlay\"\n @click=${() => this.requestClose('overlay')}\n tabindex=\"-1\"\n ></div>\n\n <div\n part=\"panel\"\n class=\"dialog__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"dialog__header\">\n <h2 part=\"title\" class=\"dialog__header__text\" id=\"title\">\n <slot name=\"label\">\n ${this.label?.length\n ? this.label\n : String.fromCharCode(65279)}\n </slot>\n <slot name=\"sublabel\">\n ${this.sublabel?.length\n ? this.sublabel\n : String.fromCharCode(65279)}\n </slot>\n </h2>\n <div part=\"header-actions\" class=\"dialog__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"dialog__close\"\n name=\"close\"\n label=\"close\"\n color=\"var(--nile-dialog-remove-icon-color)\"\n @click=\"${() => this.requestClose('close-button')}\"\n ></nile-icon>\n </div>\n </header>\n `\n : ''}\n\n <slot\n part=\"body\"\n class=\"dialog__body ${this.noHeader\n ? 'dialog__body-noheader'\n : ''}\"\n ></slot>\n\n <footer part=\"footer\" class=\"dialog__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\nsetDefaultAnimation('dialog.show', {\n keyframes: [\n { opacity: 0, scale: 0.8 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('dialog.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.8 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('dialog.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.02 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('dialog.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('dialog.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\nexport default NileDialog;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-dialog': NileDialog;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-dialog.js","sourceRoot":"","sources":["../../../src/nile-dialog/nile-dialog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAC,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAEtC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD;;;;;GAKG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,WAAW;IAApC;;QAGc,YAAO,GAAU,KAAK,CAAC;QAEzB,sBAAiB,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAC,UAAU,EAAC,OAAO,CAAC,CAAC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E,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, CSSResultArray, TemplateResult} from 'lit-element';\nimport {styles} from './nile-dialog.css';\n\nimport '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html,nothing } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\n/**\n * Nile icon component.\n *\n * @tag nile-modal\n *\n */\n@customElement('nile-dialog')\nexport class NileDialog extends NileElement {\n static styles: CSSResultGroup = styles;\n\n protected override BUBBLES: boolean=false;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer','sublabel','label');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.dialog') dialog: HTMLElement;\n @query('.dialog__panel') panel: HTMLElement;\n @query('.dialog__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The dialog's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n \n @property({ reflect: true }) sublabel = '';\n\n /**\n * Disables the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the dialog.\n */\n @property({ type: Boolean, reflect: true }) noHeader = false;\n\n @property({ type: Boolean, reflect: true }) preventOverlayClose = false;\n\n /**\n * Added to resolve conflicts between Angular Material's mat-drawer components.\n */\n private drawerStyle = `\n <style id=\"drawer-style\">\n .mat-drawer.mat-drawer-side { z-index: 1; }\n </style>\n `;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.dialog.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n this.modal.activate();\n lockBodyScrolling(this);\n document.head.insertAdjacentHTML('beforeend', this.drawerStyle);\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n const nileRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source },\n });\n\n if (source === 'close-button') {\n this.hide();\n return;\n }\n\n if (nileRequestClose.defaultPrevented || this.preventOverlayClose) {\n const animation = getAnimation(this, 'dialog.denyClose', {\n dir: 'right',\n });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n this.modal.activate();\n document.head.insertAdjacentHTML('beforeend', this.drawerStyle);\n lockBodyScrolling(this);\n\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([\n stopAnimations(this.dialog),\n stopAnimations(this.overlay),\n ]);\n this.dialog.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const nileInitialFocus = this.emit('nile-initial-focus', {\n cancelable: true,\n });\n\n if (!nileInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({\n preventScroll: true,\n });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, 'dialog.show', {\n dir: 'right',\n });\n const overlayAnimation = getAnimation(this, 'dialog.overlay.show', {\n dir: 'right',\n });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(\n this.overlay,\n overlayAnimation.keyframes,\n overlayAnimation.options\n ),\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n this.modal.deactivate();\n\n await Promise.all([\n stopAnimations(this.dialog),\n stopAnimations(this.overlay),\n ]);\n const panelAnimation = getAnimation(this, 'dialog.hide', {\n dir: 'right',\n });\n const overlayAnimation = getAnimation(this, 'dialog.overlay.hide', {\n dir: 'right',\n });\n\n const styleTag = document.getElementById('drawer-style');\n if (styleTag) {\n document.head.removeChild(styleTag);\n }\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(\n this.overlay,\n overlayAnimation.keyframes,\n overlayAnimation.options\n ).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(\n this.panel,\n panelAnimation.keyframes,\n panelAnimation.options\n ).then(() => {\n this.panel.hidden = true;\n }),\n ]);\n\n this.dialog.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n unlockBodyScrolling(this);\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n /** Shows the dialog. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the dialog */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n dialog: true,\n 'dialog--open': this.open,\n 'dialog--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div\n part=\"overlay\"\n class=\"dialog__overlay\"\n @click=${() => this.requestClose('overlay')}\n tabindex=\"-1\"\n ></div>\n\n <div\n part=\"panel\"\n class=\"dialog__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"dialog__header\">\n <h2 part=\"title\" class=\"dialog__header__text\" id=\"title\">\n <slot name=\"label\">\n ${this.label?.length\n ? this.label\n : nothing}\n </slot>\n ${this.sublabel || this.hasSlotController.test('sublabel')?html`\n <slot name=\"sublabel\">\n ${this.sublabel?.length\n ? this.sublabel\n : nothing}\n </slot>\n `:''}\n </h2>\n <div part=\"header-actions\" class=\"dialog__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"dialog__close\"\n name=\"close\"\n label=\"close\"\n color=\"var(--nile-dialog-remove-icon-color)\"\n @click=\"${() => this.requestClose('close-button')}\"\n ></nile-icon>\n </div>\n </header>\n `\n : ''}\n\n <slot\n part=\"body\"\n class=\"dialog__body ${this.noHeader\n ? 'dialog__body-noheader'\n : ''}\"\n ></slot>\n\n <footer part=\"footer\" class=\"dialog__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\nsetDefaultAnimation('dialog.show', {\n keyframes: [\n { opacity: 0, scale: 0.8 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('dialog.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.8 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('dialog.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.02 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('dialog.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('dialog.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\nexport default NileDialog;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-dialog': NileDialog;\n }\n}\n"]}
@@ -63,6 +63,7 @@ import type { CSSResultGroup, TemplateResult } from 'lit';
63
63
  */
64
64
  export declare class NileDrawer extends NileElement {
65
65
  static styles: CSSResultGroup;
66
+ protected BUBBLES: boolean;
66
67
  private readonly hasSlotController;
67
68
  private modal;
68
69
  private originalTrigger;
@@ -77,6 +77,7 @@ import styles from './nile-drawer.css';
77
77
  let NileDrawer = class NileDrawer extends NileElement {
78
78
  constructor() {
79
79
  super(...arguments);
80
+ this.BUBBLES = false;
80
81
  this.hasSlotController = new HasSlotController(this, 'footer');
81
82
  /**
82
83
  * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can
@@ -1 +1 @@
1
- {"version":3,"file":"nile-drawer.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-drawer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,WAAW;IAApC;;QAIY,sBAAiB,GAAG,IAAI,iBAAiB,CAA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AM,EAAE;KAClC;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE;CAC3C,CAAC,CAAC;AAEH,aAAa;AACb,mBAAmB,CAAC,kBAAkB,EAAE;IACtC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACxD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,UAAU;AACV,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC","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 '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { uppercaseFirstLetter } from '../internal/string';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport NileElement from '../internal/nile-element';\nimport styles from './nile-drawer.css';\nimport type { CSSResultGroup, TemplateResult } from 'lit';\n\n/**\n * Nile drawer component.\n *\n * @tag nile-drawer\n *\n * @summary Drawers slide in from a container to expose additional options and information.\n *\n * @dependency nile-icon-button\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @event nile-show - Emitted when the drawer opens.\n * @event nile-after-show - Emitted after the drawer opens and all animations are complete.\n * @event nile-hide - Emitted when the drawer closes.\n * @event nile-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event nile-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} nile-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @csspart title - The drawer's title.\n * @csspart close-button - The close button, an `<nile-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n * @csspart body - The drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.\n * @cssproperty --header-spacing - The amount of padding to use for the header.\n * @cssproperty --body-spacing - The amount of padding to use for the body.\n * @cssproperty --footer-spacing - The amount of padding to use for the footer.\n *\n * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.\n * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.\n * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.\n * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.\n * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.\n * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.\n * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.\n * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.\n * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.\n * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.\n * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.\n */\n@customElement('nile-drawer')\nexport class NileDrawer extends NileElement {\n\n\tstatic styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.drawer') drawer: HTMLElement;\n @query('.drawer__panel') panel: HTMLElement;\n @query('.drawer__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n\n /** The direction from which the drawer will open. */\n @property({ reflect: true }) placement: 'top' | 'end' | 'bottom' | 'start' = 'end';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n /**\n * Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property\n */\n @property({ type: Boolean, reflect:true }) preventOverlayClose = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @property({ attribute: 'no-header', type: Boolean, reflect: true }) noHeader = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n if((source=='overlay' || source=='keyboard') && this.preventOverlayClose) return;\n const slRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, 'drawer.denyClose', { dir: '' });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && !this.contained && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n //\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit('nile-initial-focus', { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.show', { dir: '' });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n if (!this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.hide', { dir: '' });\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n @watch('contained', { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the drawer */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--top': this.placement === 'top',\n 'drawer--end': this.placement === 'end',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--start': this.placement === 'start',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--rtl': 'rtl',\n 'drawer--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div\n part=\"overlay\"\n class=\"drawer__overlay\"\n @click=${() => this.requestClose('overlay')}\n tabindex=\"-1\"\n ></div>\n\n <div\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"drawer__header\">\n <h2 part=\"title\" class=\"drawer__title\" id=\"title\">\n <!-- If there's no label, use an invisible character to prevent the header from collapsing -->\n <slot name=\"label\">\n ${this.label.length > 0\n ? this.label\n : String.fromCharCode(65279)}\n </slot>\n </h2>\n <div part=\"header-actions\" class=\"drawer__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon\n class=\"drawer__close\"\n name=\"close\"\n label=\"close\"\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n color=\"var(--nile-drawer-remove-icon-color)\"\n @click=${() => this.requestClose('close-button')}\n ></nile-icon>\n </div>\n </header>\n `\n : ''}\n\n <slot part=\"body\" class=\"drawer__body\"></slot>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation('drawer.showTop', {\n keyframes: [\n { opacity: 0, translate: '0 -100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideTop', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 -100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// End\nsetDefaultAnimation('drawer.showEnd', {\n keyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideEnd', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Bottom\nsetDefaultAnimation('drawer.showBottom', {\n keyframes: [\n { opacity: 0, translate: '0 100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideBottom', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Start\nsetDefaultAnimation('drawer.showStart', {\n keyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideStart', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Deny close\nsetDefaultAnimation('drawer.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation('drawer.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('drawer.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-drawer': NileDrawer;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-drawer.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-drawer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE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ause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { uppercaseFirstLetter } from '../internal/string';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport NileElement from '../internal/nile-element';\nimport styles from './nile-drawer.css';\nimport type { CSSResultGroup, TemplateResult } from 'lit';\n\n/**\n * Nile drawer component.\n *\n * @tag nile-drawer\n *\n * @summary Drawers slide in from a container to expose additional options and information.\n *\n * @dependency nile-icon-button\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @event nile-show - Emitted when the drawer opens.\n * @event nile-after-show - Emitted after the drawer opens and all animations are complete.\n * @event nile-hide - Emitted when the drawer closes.\n * @event nile-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event nile-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} nile-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @csspart title - The drawer's title.\n * @csspart close-button - The close button, an `<nile-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n * @csspart body - The drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.\n * @cssproperty --header-spacing - The amount of padding to use for the header.\n * @cssproperty --body-spacing - The amount of padding to use for the body.\n * @cssproperty --footer-spacing - The amount of padding to use for the footer.\n *\n * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.\n * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.\n * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.\n * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.\n * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.\n * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.\n * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.\n * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.\n * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.\n * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.\n * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.\n */\n@customElement('nile-drawer')\nexport class NileDrawer extends NileElement {\n\n\tstatic styles: CSSResultGroup = styles;\n\n protected override BUBBLES: boolean=false;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.drawer') drawer: HTMLElement;\n @query('.drawer__panel') panel: HTMLElement;\n @query('.drawer__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n\n /** The direction from which the drawer will open. */\n @property({ reflect: true }) placement: 'top' | 'end' | 'bottom' | 'start' = 'end';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n /**\n * Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property\n */\n @property({ type: Boolean, reflect:true }) preventOverlayClose = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @property({ attribute: 'no-header', type: Boolean, reflect: true }) noHeader = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n if((source=='overlay' || source=='keyboard') && this.preventOverlayClose) return;\n const slRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, 'drawer.denyClose', { dir: '' });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && !this.contained && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n //\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit('nile-initial-focus', { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.show', { dir: '' });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n if (!this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.hide', { dir: '' });\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n @watch('contained', { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the drawer */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--top': this.placement === 'top',\n 'drawer--end': this.placement === 'end',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--start': this.placement === 'start',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--rtl': 'rtl',\n 'drawer--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div\n part=\"overlay\"\n class=\"drawer__overlay\"\n @click=${() => this.requestClose('overlay')}\n tabindex=\"-1\"\n ></div>\n\n <div\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"drawer__header\">\n <h2 part=\"title\" class=\"drawer__title\" id=\"title\">\n <!-- If there's no label, use an invisible character to prevent the header from collapsing -->\n <slot name=\"label\">\n ${this.label.length > 0\n ? this.label\n : String.fromCharCode(65279)}\n </slot>\n </h2>\n <div part=\"header-actions\" class=\"drawer__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon\n class=\"drawer__close\"\n name=\"close\"\n label=\"close\"\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n color=\"var(--nile-drawer-remove-icon-color)\"\n @click=${() => this.requestClose('close-button')}\n ></nile-icon>\n </div>\n </header>\n `\n : ''}\n\n <slot part=\"body\" class=\"drawer__body\"></slot>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation('drawer.showTop', {\n keyframes: [\n { opacity: 0, translate: '0 -100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideTop', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 -100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// End\nsetDefaultAnimation('drawer.showEnd', {\n keyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideEnd', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Bottom\nsetDefaultAnimation('drawer.showBottom', {\n keyframes: [\n { opacity: 0, translate: '0 100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideBottom', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Start\nsetDefaultAnimation('drawer.showStart', {\n keyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideStart', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Deny close\nsetDefaultAnimation('drawer.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation('drawer.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('drawer.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-drawer': NileDrawer;\n }\n}\n"]}
@@ -18,6 +18,7 @@ export declare class NileEmptyState extends NileElement {
18
18
  * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
19
19
  */
20
20
  static get styles(): CSSResultArray;
21
+ protected BUBBLES: boolean;
21
22
  size: 'sm' | 'md' | 'lg';
22
23
  variant: 'flat' | 'content' | 'tonal';
23
24
  icon: string;
@@ -19,6 +19,7 @@ import NileElement from '../internal/nile-element';
19
19
  let NileEmptyState = class NileEmptyState extends NileElement {
20
20
  constructor() {
21
21
  super(...arguments);
22
+ this.BUBBLES = false;
22
23
  this.size = 'md';
23
24
  this.variant = 'tonal';
24
25
  this.icon = 'error';
@@ -1 +1 @@
1
- {"version":3,"file":"nile-empty-state.js","sourceRoot":"","sources":["../../../src/nile-empty-state/nile-empty-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAS,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAkC,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QAUO,SAAI,GAAuB,IAAI,CAAC;QAEhC,YAAO,GAGL,OAAO,CAAC;QAEV,SAAI,GAAW,OAAO,CAAC;QACT,cAAS,GAAY,KAAK,CAAC;QAEzC,SAAI,GAAW,aAAa,CAAC;QACP,YAAO,GAAW,SAAS,CAAC;QA4D9D,gBAAgB;IAClB,CAAC;IAhFC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAgBD,gBAAgB;IAEhB,qBAAqB;IAErB;;;OAGG;IACI,MAAM;QACX,OAAO,IAAI,CAAA;gBACC,QAAQ,CAAC;YACnB,aAAa,EAAE,IAAI;YACnB,iBAAiB,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI;YACpC,iBAAiB,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI;YACpC,iBAAiB,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI;SACrC,CAAC;oBACc,QAAQ,CAAC,EAAE,mBA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AC,EAAC,SAAS,EAAC,UAAU,EAAC,CAAC;+CAA6B;AArBnD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAkF1B;SAlFY,cAAc;AAoF3B,eAAe,cAAc,CAAC","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 { state, html, nothing, property, CSSResultArray, TemplateResult } from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-empty-state.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile empty-state component.\n *\n * @tag nile-empty-state\n *\n */\n@customElement('nile-empty-state')\nexport class NileEmptyState extends NileElement {\n\n /**\n * The styles for nile-empty-state\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property() size: 'sm' | 'md' | 'lg' = 'md';\n\n @property() variant:\n | 'flat'\n | 'content'\n | 'tonal' = 'tonal';\n\n @property() icon: string = 'error';\n @property({type:Boolean}) grayscale: boolean = false;\n\n @property() text: String = 'Empty State';\n @property({attribute:'sub-text'}) subText: String = 'No Data';\n\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n\t\t<div class=\"${classMap({\n 'empty-state': true,\n 'empty-state--sm': this.size == 'sm',\n 'empty-state--md': this.size == 'md',\n 'empty-state--lg': this.size == 'lg'\n })}\">\n <div class=\"${classMap({ 'empty-state__body': true })}\">\n\n ${this.variant == 'content' ? html`\n <div class=\"empty-state__body--content\">\n \n <div src=\"\" class=\"${classMap({ 'empty-state__image': true, 'empty-state__image--grayscale':this.grayscale })}\"></div>\n ${!this.icon ? nothing : html`\n <div class=\"empty-state__img__icon\">\n <nile-icon name=\"${this.icon}\" color=\"white\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\"></nile-icon>\n </div>`\n }\n </div>`: nothing\n }\n\t\t\t\t\n\t\t\t ${this.variant == 'tonal' ? html`\n\t\t\t\t<div class=\"empty-state__body--tonal\">\n\t\t\t\t\t<nile-icon name=\"${this.icon}\" size=\"40\"></nile-icon>\n\t\t\t\t</div>`: nothing\n }\n\n\t\t\t ${this.variant == 'flat' ? html`\n\t\t\t\t<div class=\"empty-state__body--flat\">\n\t\t\t\t\t<span class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t<nile-icon name=\"${this.icon}\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\" variant=\"secondary\"></nile-icon>\n\t\t\t\t\t</span>\n\t\t\t\t</div>`: nothing\n }\n \n <div class=\"empty__state__text-section\">\n <div class=\"empty-state__text\">${this.text}</div>\n <div class=\"empty-state__subtext\">${this.subText}</div>\n </div>\n\t\t\t</div>\n\n\t\t\t<div class=\"empty-state-actions\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t</div>\n\t\t`;\n }\n\n /* #endregion */\n}\n\nexport default NileEmptyState;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-empty-state': NileEmptyState;\n }\n}"]}
1
+ {"version":3,"file":"nile-empty-state.js","sourceRoot":"","sources":["../../../src/nile-empty-state/nile-empty-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAS,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAkC,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QAUc,YAAO,GAAU,KAA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AC,CAAC,OACL;;OAED,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;;;yBAGX,IAAI,CAAC,IAAI,WAAW,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;;WAEtF,CAAA,CAAC,CAAC,OACL;;;2CAGmC,IAAI,CAAC,IAAI;8CACN,IAAI,CAAC,OAAO;;;;;;;;GAQvD,CAAC;IACF,CAAC;CAGF,CAAA;AAxEa;IAAX,QAAQ,EAAE;4CAAiC;AAEhC;IAAX,QAAQ,EAAE;+CAGW;AAEV;IAAX,QAAQ,EAAE;4CAAwB;AACT;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAC,OAAO,EAAC,CAAC;iDAA4B;AAEzC;IAAX,QAAQ,EAAE;4CAA8B;AACP;IAAjC,QAAQ,CAAC,EAAC,SAAS,EAAC,UAAU,EAAC,CAAC;+CAA6B;AAvBnD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAoF1B;SApFY,cAAc;AAsF3B,eAAe,cAAc,CAAC","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 { state, html, nothing, property, CSSResultArray, TemplateResult } from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-empty-state.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile empty-state component.\n *\n * @tag nile-empty-state\n *\n */\n@customElement('nile-empty-state')\nexport class NileEmptyState extends NileElement {\n\n /**\n * The styles for nile-empty-state\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected override BUBBLES: boolean=false;\n\n @property() size: 'sm' | 'md' | 'lg' = 'md';\n\n @property() variant:\n | 'flat'\n | 'content'\n | 'tonal' = 'tonal';\n\n @property() icon: string = 'error';\n @property({type:Boolean}) grayscale: boolean = false;\n\n @property() text: String = 'Empty State';\n @property({attribute:'sub-text'}) subText: String = 'No Data';\n\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n\t\t<div class=\"${classMap({\n 'empty-state': true,\n 'empty-state--sm': this.size == 'sm',\n 'empty-state--md': this.size == 'md',\n 'empty-state--lg': this.size == 'lg'\n })}\">\n <div class=\"${classMap({ 'empty-state__body': true })}\">\n\n ${this.variant == 'content' ? html`\n <div class=\"empty-state__body--content\">\n \n <div src=\"\" class=\"${classMap({ 'empty-state__image': true, 'empty-state__image--grayscale':this.grayscale })}\"></div>\n ${!this.icon ? nothing : html`\n <div class=\"empty-state__img__icon\">\n <nile-icon name=\"${this.icon}\" color=\"white\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\"></nile-icon>\n </div>`\n }\n </div>`: nothing\n }\n\t\t\t\t\n\t\t\t ${this.variant == 'tonal' ? html`\n\t\t\t\t<div class=\"empty-state__body--tonal\">\n\t\t\t\t\t<nile-icon name=\"${this.icon}\" size=\"40\"></nile-icon>\n\t\t\t\t</div>`: nothing\n }\n\n\t\t\t ${this.variant == 'flat' ? html`\n\t\t\t\t<div class=\"empty-state__body--flat\">\n\t\t\t\t\t<span class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t<nile-icon name=\"${this.icon}\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\" variant=\"secondary\"></nile-icon>\n\t\t\t\t\t</span>\n\t\t\t\t</div>`: nothing\n }\n \n <div class=\"empty__state__text-section\">\n <div class=\"empty-state__text\">${this.text}</div>\n <div class=\"empty-state__subtext\">${this.subText}</div>\n </div>\n\t\t\t</div>\n\n\t\t\t<div class=\"empty-state-actions\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t</div>\n\t\t`;\n }\n\n /* #endregion */\n}\n\nexport default NileEmptyState;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-empty-state': NileEmptyState;\n }\n}"]}
@@ -24,13 +24,14 @@ export declare class NileHighlighter extends NileElement {
24
24
  * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
25
25
  */
26
26
  static get styles(): CSSResultArray;
27
- connectedCallback(): Promise<void>;
28
27
  protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): Promise<void>;
29
28
  /**
30
29
  * Render method
31
30
  * @slot This is a slot test
32
31
  */
33
32
  render(): TemplateResult;
33
+ updateHighlighter(): Promise<void>;
34
+ updateHighlightedCode(): Promise<void>;
34
35
  }
35
36
  export default NileHighlighter;
36
37
  declare global {