@aquera/nile-elements 0.0.121 → 0.0.122

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 (510) hide show
  1. package/README.md +5 -0
  2. package/dist/abap-511af2a5.cjs.js +2 -0
  3. package/dist/abap-511af2a5.cjs.js.map +1 -0
  4. package/dist/abap-f2ab40d0.esm.js +1 -0
  5. package/dist/{angular-ts-32bbcd01.cjs.js → angular-ts-a70761c6.cjs.js} +2 -2
  6. package/dist/{angular-ts-32bbcd01.cjs.js.map → angular-ts-a70761c6.cjs.js.map} +1 -1
  7. package/dist/cairo-014ad724.cjs.js +2 -0
  8. package/dist/cairo-014ad724.cjs.js.map +1 -0
  9. package/dist/cairo-9be40999.esm.js +1 -0
  10. package/dist/catppuccin-frappe-52a52bb1.cjs.js +2 -0
  11. package/dist/catppuccin-frappe-52a52bb1.cjs.js.map +1 -0
  12. package/dist/catppuccin-frappe-dbc3161e.esm.js +1 -0
  13. package/dist/catppuccin-latte-d8a0f6a8.cjs.js +2 -0
  14. package/dist/catppuccin-latte-d8a0f6a8.cjs.js.map +1 -0
  15. package/dist/catppuccin-latte-e7591143.esm.js +1 -0
  16. package/dist/catppuccin-macchiato-19a7795e.cjs.js +2 -0
  17. package/dist/catppuccin-macchiato-19a7795e.cjs.js.map +1 -0
  18. package/dist/catppuccin-macchiato-283b424a.esm.js +1 -0
  19. package/dist/catppuccin-mocha-165e830c.esm.js +1 -0
  20. package/dist/catppuccin-mocha-9f9ec5f6.cjs.js +2 -0
  21. package/dist/catppuccin-mocha-9f9ec5f6.cjs.js.map +1 -0
  22. package/dist/cobol-8517cfc1.esm.js +1 -0
  23. package/dist/cobol-922d57ed.cjs.js +2 -0
  24. package/dist/cobol-922d57ed.cjs.js.map +1 -0
  25. package/dist/{cpp-c2442fe2.cjs.js → cpp-8812199e.cjs.js} +2 -2
  26. package/dist/{cpp-c2442fe2.cjs.js.map → cpp-8812199e.cjs.js.map} +1 -1
  27. package/dist/{crystal-1913e34d.cjs.js → crystal-5458e62a.cjs.js} +2 -2
  28. package/dist/{crystal-1913e34d.cjs.js.map → crystal-5458e62a.cjs.js.map} +1 -1
  29. package/dist/{edge-ef9e682b.cjs.js → edge-cb04b11b.cjs.js} +2 -2
  30. package/dist/{edge-ef9e682b.cjs.js.map → edge-cb04b11b.cjs.js.map} +1 -1
  31. package/dist/{elm-7fd07d47.cjs.js → elm-53a0b5b4.cjs.js} +2 -2
  32. package/dist/{elm-7fd07d47.cjs.js.map → elm-53a0b5b4.cjs.js.map} +1 -1
  33. package/dist/{erb-c813c1f2.cjs.js → erb-1bc4721c.cjs.js} +2 -2
  34. package/dist/{erb-c813c1f2.cjs.js.map → erb-1bc4721c.cjs.js.map} +1 -1
  35. package/dist/{fortran-fixed-form-c39bf051.cjs.js → fortran-fixed-form-00a9d08f.cjs.js} +2 -2
  36. package/dist/{fortran-fixed-form-c39bf051.cjs.js.map → fortran-fixed-form-00a9d08f.cjs.js.map} +1 -1
  37. package/dist/{fsharp-ba007c9c.cjs.js → fsharp-661f4f18.cjs.js} +2 -2
  38. package/dist/{fsharp-ba007c9c.cjs.js.map → fsharp-661f4f18.cjs.js.map} +1 -1
  39. package/dist/{gdresource-f3068367.cjs.js → gdresource-8fb6a6ad.cjs.js} +2 -2
  40. package/dist/{gdresource-f3068367.cjs.js.map → gdresource-8fb6a6ad.cjs.js.map} +1 -1
  41. package/dist/{git-commit-372b638c.cjs.js → git-commit-9373b48b.cjs.js} +2 -2
  42. package/dist/{git-commit-372b638c.cjs.js.map → git-commit-9373b48b.cjs.js.map} +1 -1
  43. package/dist/{git-rebase-2cc6f2a3.cjs.js → git-rebase-c3fa2bb9.cjs.js} +2 -2
  44. package/dist/{git-rebase-2cc6f2a3.cjs.js.map → git-rebase-c3fa2bb9.cjs.js.map} +1 -1
  45. package/dist/go-85139440.esm.js +1 -0
  46. package/dist/go-d5ed1b82.cjs.js +2 -0
  47. package/dist/go-d5ed1b82.cjs.js.map +1 -0
  48. package/dist/{graphql-74f146e1.cjs.js → graphql-1541cb3c.cjs.js} +2 -2
  49. package/dist/{graphql-74f146e1.cjs.js.map → graphql-1541cb3c.cjs.js.map} +1 -1
  50. package/dist/{handlebars-864fcb12.cjs.js → handlebars-39ab86cd.cjs.js} +2 -2
  51. package/dist/{handlebars-864fcb12.cjs.js.map → handlebars-39ab86cd.cjs.js.map} +1 -1
  52. package/dist/{http-08501497.cjs.js → http-1cf9a3de.cjs.js} +2 -2
  53. package/dist/{http-08501497.cjs.js.map → http-1cf9a3de.cjs.js.map} +1 -1
  54. package/dist/{hxml-bbac80e4.cjs.js → hxml-6d54d760.cjs.js} +2 -2
  55. package/dist/{hxml-bbac80e4.cjs.js.map → hxml-6d54d760.cjs.js.map} +1 -1
  56. package/dist/hy-33aa9c6f.cjs.js +2 -0
  57. package/dist/hy-33aa9c6f.cjs.js.map +1 -0
  58. package/dist/hy-a7a6e9c3.esm.js +1 -0
  59. package/dist/{julia-689ac552.cjs.js → julia-0152d8b9.cjs.js} +2 -2
  60. package/dist/{julia-689ac552.cjs.js.map → julia-0152d8b9.cjs.js.map} +1 -1
  61. package/dist/{latex-4d76e817.cjs.js → latex-33ebd2ce.cjs.js} +2 -2
  62. package/dist/{latex-4d76e817.cjs.js.map → latex-33ebd2ce.cjs.js.map} +1 -1
  63. package/dist/luau-19444703.cjs.js +2 -0
  64. package/dist/luau-19444703.cjs.js.map +1 -0
  65. package/dist/luau-b564b070.esm.js +1 -0
  66. package/dist/{marko-2880d4ee.cjs.js → marko-23ca6223.cjs.js} +2 -2
  67. package/dist/{marko-2880d4ee.cjs.js.map → marko-23ca6223.cjs.js.map} +1 -1
  68. package/dist/mdc-05d87356.esm.js +1 -0
  69. package/dist/mdc-56aefda2.cjs.js +2 -0
  70. package/dist/mdc-56aefda2.cjs.js.map +1 -0
  71. package/dist/{mdx-a859ee84.cjs.js → mdx-01dab0d1.cjs.js} +2 -2
  72. package/dist/{mdx-a859ee84.cjs.js.map → mdx-01dab0d1.cjs.js.map} +1 -1
  73. package/dist/{mdx-bf2a8fe9.esm.js → mdx-0782bcd8.esm.js} +1 -1
  74. package/dist/nextflow-11e4899f.esm.js +1 -0
  75. package/dist/nextflow-2a4bf0cc.cjs.js +2 -0
  76. package/dist/nextflow-2a4bf0cc.cjs.js.map +1 -0
  77. package/dist/{nginx-7bc0fc82.cjs.js → nginx-1aabec59.cjs.js} +2 -2
  78. package/dist/{nginx-7bc0fc82.cjs.js.map → nginx-1aabec59.cjs.js.map} +1 -1
  79. package/dist/nile-accordion/nile-accordion.cjs.js +1 -1
  80. package/dist/nile-accordion/nile-accordion.cjs.js.map +1 -1
  81. package/dist/nile-accordion/nile-accordion.esm.js +1 -1
  82. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  83. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  84. package/dist/nile-auto-complete/nile-auto-complete.esm.js +6 -15
  85. package/dist/nile-avatar/nile-avatar.cjs.js +1 -1
  86. package/dist/nile-avatar/nile-avatar.cjs.js.map +1 -1
  87. package/dist/nile-avatar/nile-avatar.esm.js +1 -1
  88. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  89. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  90. package/dist/nile-badge/nile-badge.esm.js +1 -1
  91. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js +1 -1
  92. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js.map +1 -1
  93. package/dist/nile-breadcrumb/nile-breadcrumb.esm.js +1 -1
  94. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +1 -1
  95. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -1
  96. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +2 -2
  97. package/dist/nile-button/nile-button.cjs.js +1 -1
  98. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  99. package/dist/nile-button/nile-button.esm.js +1 -1
  100. package/dist/nile-button-toggle/nile-button-toggle.cjs.js +1 -1
  101. package/dist/nile-button-toggle/nile-button-toggle.cjs.js.map +1 -1
  102. package/dist/nile-button-toggle/nile-button-toggle.esm.js +1 -1
  103. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +1 -1
  104. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -1
  105. package/dist/nile-button-toggle-group/nile-button-toggle-group.esm.js +1 -1
  106. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  107. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  108. package/dist/nile-calendar/nile-calendar.esm.js +3 -3
  109. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  110. package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
  111. package/dist/nile-calendar/nile-calendar.test.esm.js +9 -5
  112. package/dist/nile-card/nile-card.cjs.js +1 -1
  113. package/dist/nile-card/nile-card.cjs.js.map +1 -1
  114. package/dist/nile-card/nile-card.esm.js +1 -1
  115. package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
  116. package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
  117. package/dist/nile-checkbox/nile-checkbox.esm.js +1 -1
  118. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  119. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  120. package/dist/nile-chip/nile-chip.esm.js +2 -6
  121. package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
  122. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  123. package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
  124. package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
  125. package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
  126. package/dist/nile-content-editor/nile-content-editor.esm.js +5 -5
  127. package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
  128. package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
  129. package/dist/nile-date-picker/nile-date-picker.esm.js +8 -15
  130. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  131. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  132. package/dist/nile-dialog/nile-dialog.esm.js +1 -1
  133. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  134. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  135. package/dist/nile-drawer/nile-drawer.esm.js +1 -1
  136. package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
  137. package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
  138. package/dist/nile-empty-state/nile-empty-state.esm.js +1 -1
  139. package/dist/nile-form-help-text/nile-form-help-text.cjs.js +1 -1
  140. package/dist/nile-form-help-text/nile-form-help-text.cjs.js.map +1 -1
  141. package/dist/nile-form-help-text/nile-form-help-text.esm.js +5 -4
  142. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +2 -0
  143. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js.map +1 -0
  144. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -0
  145. package/dist/nile-highlighter/nile-highlighter.cjs.js +1 -1
  146. package/dist/nile-highlighter/nile-highlighter.cjs.js.map +1 -1
  147. package/dist/nile-highlighter/nile-highlighter.esm.js +1 -1
  148. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  149. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  150. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  151. package/dist/nile-input/nile-input.cjs.js +1 -1
  152. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  153. package/dist/nile-input/nile-input.esm.js +1 -1
  154. package/dist/nile-link/nile-link.cjs.js +1 -1
  155. package/dist/nile-link/nile-link.cjs.js.map +1 -1
  156. package/dist/nile-link/nile-link.esm.js +1 -1
  157. package/dist/nile-list/nile-list.cjs.js +1 -1
  158. package/dist/nile-list/nile-list.cjs.js.map +1 -1
  159. package/dist/nile-list/nile-list.esm.js +1 -1
  160. package/dist/nile-list-item/nile-list-item.cjs.js +1 -1
  161. package/dist/nile-list-item/nile-list-item.cjs.js.map +1 -1
  162. package/dist/nile-list-item/nile-list-item.esm.js +1 -1
  163. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  164. package/dist/nile-loader/nile-loader.test.cjs.js.map +1 -1
  165. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  166. package/dist/nile-menu/nile-menu.cjs.js +1 -1
  167. package/dist/nile-menu/nile-menu.cjs.js.map +1 -1
  168. package/dist/nile-menu/nile-menu.esm.js +2 -5
  169. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  170. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  171. package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
  172. package/dist/nile-option/nile-option.cjs.js +1 -1
  173. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  174. package/dist/nile-option/nile-option.esm.js +1 -1
  175. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  176. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  177. package/dist/nile-popover/nile-popover.esm.js +4 -4
  178. package/dist/nile-popup/nile-popup.cjs.js +1 -1
  179. package/dist/nile-popup/nile-popup.cjs.js.map +1 -1
  180. package/dist/nile-popup/nile-popup.esm.js +1 -1
  181. package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
  182. package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
  183. package/dist/nile-radio-group/nile-radio-group.esm.js +1 -1
  184. package/dist/nile-select/nile-select.cjs.js +1 -1
  185. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  186. package/dist/nile-select/nile-select.esm.js +4 -6
  187. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
  188. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
  189. package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +1 -1
  190. package/dist/nile-split-panel/nile-split-panel.cjs.js +1 -1
  191. package/dist/nile-split-panel/nile-split-panel.cjs.js.map +1 -1
  192. package/dist/nile-split-panel/nile-split-panel.esm.js +1 -1
  193. package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
  194. package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
  195. package/dist/nile-stepper/nile-stepper.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/nile-tab-group.cjs.js +1 -1
  200. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  201. package/dist/nile-tab-group/nile-tab-group.esm.js +4 -4
  202. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  203. package/dist/nile-tab-group/nile-tab-group.test.cjs.js.map +1 -1
  204. package/dist/nile-tab-group/nile-tab-group.test.esm.js +13 -5
  205. package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
  206. package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
  207. package/dist/nile-table-body/nile-table-body.esm.js +1 -1
  208. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  209. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  210. package/dist/nile-tag/nile-tag.esm.js +1 -1
  211. package/dist/nile-textarea/nile-textarea.cjs.js +1 -1
  212. package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
  213. package/dist/nile-textarea/nile-textarea.esm.js +1 -1
  214. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  215. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  216. package/dist/nile-toast/nile-toast.esm.js +1 -1
  217. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  218. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  219. package/dist/nile-tooltip/nile-tooltip.esm.js +1 -1
  220. package/dist/nile-tree/nile-tree.cjs.js +1 -1
  221. package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
  222. package/dist/nile-tree/nile-tree.esm.js +1 -1
  223. package/dist/{nim-1cf0460c.cjs.js → nim-55b3acf7.cjs.js} +2 -2
  224. package/dist/{nim-1cf0460c.cjs.js.map → nim-55b3acf7.cjs.js.map} +1 -1
  225. package/dist/one-dark-pro-3bcc58f7.cjs.js +2 -0
  226. package/dist/one-dark-pro-3bcc58f7.cjs.js.map +1 -0
  227. package/dist/one-dark-pro-4fce25f8.esm.js +1 -0
  228. package/dist/{razor-0acc551a.cjs.js → razor-57f13c4a.cjs.js} +2 -2
  229. package/dist/{razor-0acc551a.cjs.js.map → razor-57f13c4a.cjs.js.map} +1 -1
  230. package/dist/{rst-6b792481.cjs.js → rst-4226018b.cjs.js} +2 -2
  231. package/dist/{rst-6b792481.cjs.js.map → rst-4226018b.cjs.js.map} +1 -1
  232. package/dist/{ruby-578b1ee6.cjs.js → ruby-4306ddd1.cjs.js} +2 -2
  233. package/dist/{ruby-578b1ee6.cjs.js.map → ruby-4306ddd1.cjs.js.map} +1 -1
  234. package/dist/{shaderlab-606f022b.cjs.js → shaderlab-2234cd06.cjs.js} +2 -2
  235. package/dist/{shaderlab-606f022b.cjs.js.map → shaderlab-2234cd06.cjs.js.map} +1 -1
  236. package/dist/{shellsession-cb0df007.cjs.js → shellsession-cd95727e.cjs.js} +2 -2
  237. package/dist/{shellsession-cb0df007.cjs.js.map → shellsession-cd95727e.cjs.js.map} +1 -1
  238. package/dist/{sparql-589e0308.cjs.js → sparql-197a828d.cjs.js} +2 -2
  239. package/dist/{sparql-589e0308.cjs.js.map → sparql-197a828d.cjs.js.map} +1 -1
  240. package/dist/src/nile-accordion/nile-accordion.d.ts +0 -1
  241. package/dist/src/nile-accordion/nile-accordion.js +0 -1
  242. package/dist/src/nile-accordion/nile-accordion.js.map +1 -1
  243. package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +0 -1
  244. package/dist/src/nile-auto-complete/nile-auto-complete.js +2 -12
  245. package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
  246. package/dist/src/nile-avatar/nile-avatar.d.ts +0 -1
  247. package/dist/src/nile-avatar/nile-avatar.js +0 -1
  248. package/dist/src/nile-avatar/nile-avatar.js.map +1 -1
  249. package/dist/src/nile-badge/nile-badge.d.ts +0 -1
  250. package/dist/src/nile-badge/nile-badge.js +0 -1
  251. package/dist/src/nile-badge/nile-badge.js.map +1 -1
  252. package/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +0 -1
  253. package/dist/src/nile-breadcrumb/nile-breadcrumb.js +0 -5
  254. package/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -1
  255. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +0 -1
  256. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +0 -1
  257. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -1
  258. package/dist/src/nile-button/nile-button.d.ts +0 -1
  259. package/dist/src/nile-button/nile-button.js +0 -1
  260. package/dist/src/nile-button/nile-button.js.map +1 -1
  261. package/dist/src/nile-button-toggle/nile-button-toggle.d.ts +0 -1
  262. package/dist/src/nile-button-toggle/nile-button-toggle.js +0 -1
  263. package/dist/src/nile-button-toggle/nile-button-toggle.js.map +1 -1
  264. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +0 -1
  265. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +0 -1
  266. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -1
  267. package/dist/src/nile-calendar/nile-calendar.d.ts +1 -9
  268. package/dist/src/nile-calendar/nile-calendar.js +1 -55
  269. package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  270. package/dist/src/nile-calendar/nile-calendar.test.js +50 -5
  271. package/dist/src/nile-calendar/nile-calendar.test.js.map +1 -1
  272. package/dist/src/nile-card/nile-card.d.ts +0 -1
  273. package/dist/src/nile-card/nile-card.js +0 -1
  274. package/dist/src/nile-card/nile-card.js.map +1 -1
  275. package/dist/src/nile-checkbox/nile-checkbox.d.ts +0 -1
  276. package/dist/src/nile-checkbox/nile-checkbox.js +0 -1
  277. package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  278. package/dist/src/nile-chip/nile-chip.d.ts +0 -1
  279. package/dist/src/nile-chip/nile-chip.js +0 -5
  280. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  281. package/dist/src/nile-code-editor/nile-code-editor.d.ts +0 -1
  282. package/dist/src/nile-code-editor/nile-code-editor.js +0 -1
  283. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  284. package/dist/src/nile-content-editor/nile-content-editor.d.ts +0 -1
  285. package/dist/src/nile-content-editor/nile-content-editor.js +0 -1
  286. package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  287. package/dist/src/nile-date-picker/nile-date-picker.d.ts +0 -1
  288. package/dist/src/nile-date-picker/nile-date-picker.js +7 -14
  289. package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  290. package/dist/src/nile-dialog/nile-dialog.d.ts +0 -1
  291. package/dist/src/nile-dialog/nile-dialog.js +0 -1
  292. package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
  293. package/dist/src/nile-drawer/nile-drawer.d.ts +0 -1
  294. package/dist/src/nile-drawer/nile-drawer.js +0 -1
  295. package/dist/src/nile-drawer/nile-drawer.js.map +1 -1
  296. package/dist/src/nile-empty-state/nile-empty-state.d.ts +0 -1
  297. package/dist/src/nile-empty-state/nile-empty-state.js +0 -1
  298. package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
  299. package/dist/src/nile-form-help-text/nile-form-help-text.d.ts +2 -0
  300. package/dist/src/nile-form-help-text/nile-form-help-text.js +14 -6
  301. package/dist/src/nile-form-help-text/nile-form-help-text.js.map +1 -1
  302. package/dist/src/nile-form-help-text/nile-form-help-text.test.d.ts +1 -0
  303. package/dist/src/nile-form-help-text/nile-form-help-text.test.js +67 -0
  304. package/dist/src/nile-form-help-text/nile-form-help-text.test.js.map +1 -0
  305. package/dist/src/nile-icon-button/nile-icon-button.d.ts +0 -1
  306. package/dist/src/nile-icon-button/nile-icon-button.js +0 -1
  307. package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
  308. package/dist/src/nile-input/nile-input.d.ts +0 -1
  309. package/dist/src/nile-input/nile-input.js +0 -1
  310. package/dist/src/nile-input/nile-input.js.map +1 -1
  311. package/dist/src/nile-link/nile-link.d.ts +0 -1
  312. package/dist/src/nile-link/nile-link.js +0 -1
  313. package/dist/src/nile-link/nile-link.js.map +1 -1
  314. package/dist/src/nile-list/nile-list.d.ts +0 -1
  315. package/dist/src/nile-list/nile-list.js +0 -5
  316. package/dist/src/nile-list/nile-list.js.map +1 -1
  317. package/dist/src/nile-list-item/nile-list-item.d.ts +0 -1
  318. package/dist/src/nile-list-item/nile-list-item.js +0 -1
  319. package/dist/src/nile-list-item/nile-list-item.js.map +1 -1
  320. package/dist/src/nile-loader/nile-loader.test.js +5 -0
  321. package/dist/src/nile-loader/nile-loader.test.js.map +1 -1
  322. package/dist/src/nile-menu/nile-menu.d.ts +0 -1
  323. package/dist/src/nile-menu/nile-menu.js +0 -4
  324. package/dist/src/nile-menu/nile-menu.js.map +1 -1
  325. package/dist/src/nile-menu-item/nile-menu-item.d.ts +0 -2
  326. package/dist/src/nile-menu-item/nile-menu-item.js +0 -2
  327. package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
  328. package/dist/src/nile-option/nile-option.d.ts +0 -2
  329. package/dist/src/nile-option/nile-option.js +0 -2
  330. package/dist/src/nile-option/nile-option.js.map +1 -1
  331. package/dist/src/nile-popover/nile-popover.d.ts +0 -1
  332. package/dist/src/nile-popover/nile-popover.js +0 -1
  333. package/dist/src/nile-popover/nile-popover.js.map +1 -1
  334. package/dist/src/nile-popup/nile-popup.d.ts +0 -2
  335. package/dist/src/nile-popup/nile-popup.js +0 -2
  336. package/dist/src/nile-popup/nile-popup.js.map +1 -1
  337. package/dist/src/nile-radio-group/nile-radio-group.d.ts +0 -1
  338. package/dist/src/nile-radio-group/nile-radio-group.js +0 -1
  339. package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
  340. package/dist/src/nile-select/nile-select.d.ts +0 -1
  341. package/dist/src/nile-select/nile-select.js +3 -6
  342. package/dist/src/nile-select/nile-select.js.map +1 -1
  343. package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +0 -1
  344. package/dist/src/nile-slide-toggle/nile-slide-toggle.js +0 -1
  345. package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
  346. package/dist/src/nile-split-panel/nile-split-panel.d.ts +0 -1
  347. package/dist/src/nile-split-panel/nile-split-panel.js +0 -1
  348. package/dist/src/nile-split-panel/nile-split-panel.js.map +1 -1
  349. package/dist/src/nile-stepper/nile-stepper.d.ts +0 -1
  350. package/dist/src/nile-stepper/nile-stepper.js +0 -1
  351. package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
  352. package/dist/src/nile-tab/nile-tab.d.ts +0 -1
  353. package/dist/src/nile-tab/nile-tab.js +0 -1
  354. package/dist/src/nile-tab/nile-tab.js.map +1 -1
  355. package/dist/src/nile-tab-group/nile-tab-group.d.ts +1 -2
  356. package/dist/src/nile-tab-group/nile-tab-group.js +5 -10
  357. package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
  358. package/dist/src/nile-tab-group/nile-tab-group.test.js +56 -22
  359. package/dist/src/nile-tab-group/nile-tab-group.test.js.map +1 -1
  360. package/dist/src/nile-table-body/nile-table-body.d.ts +0 -1
  361. package/dist/src/nile-table-body/nile-table-body.js +0 -1
  362. package/dist/src/nile-table-body/nile-table-body.js.map +1 -1
  363. package/dist/src/nile-tag/nile-tag.d.ts +0 -1
  364. package/dist/src/nile-tag/nile-tag.js +0 -1
  365. package/dist/src/nile-tag/nile-tag.js.map +1 -1
  366. package/dist/src/nile-textarea/nile-textarea.d.ts +0 -1
  367. package/dist/src/nile-textarea/nile-textarea.js +0 -1
  368. package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
  369. package/dist/src/nile-toast/nile-toast.d.ts +0 -1
  370. package/dist/src/nile-toast/nile-toast.js +0 -1
  371. package/dist/src/nile-toast/nile-toast.js.map +1 -1
  372. package/dist/src/nile-tooltip/nile-tooltip.d.ts +0 -1
  373. package/dist/src/nile-tooltip/nile-tooltip.js +0 -1
  374. package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  375. package/dist/src/nile-tree/nile-tree.d.ts +0 -1
  376. package/dist/src/nile-tree/nile-tree.js +0 -1
  377. package/dist/src/nile-tree/nile-tree.js.map +1 -1
  378. package/dist/{svelte-2ae868b6.cjs.js → svelte-5a90df12.cjs.js} +2 -2
  379. package/dist/{svelte-2ae868b6.cjs.js.map → svelte-5a90df12.cjs.js.map} +1 -1
  380. package/dist/{svelte-ac03a3ac.esm.js → svelte-cb8564e6.esm.js} +1 -1
  381. package/dist/{system-verilog-7d2d7268.cjs.js → system-verilog-b3e652eb.cjs.js} +2 -2
  382. package/dist/{system-verilog-7d2d7268.cjs.js.map → system-verilog-b3e652eb.cjs.js.map} +1 -1
  383. package/dist/{system-verilog-2d49210f.esm.js → system-verilog-c1c6377f.esm.js} +1 -1
  384. package/dist/{templ-f2d0dadd.esm.js → templ-13492ead.esm.js} +1 -1
  385. package/dist/{templ-2a2d64b7.cjs.js → templ-4425132d.cjs.js} +2 -2
  386. package/dist/{templ-2a2d64b7.cjs.js.map → templ-4425132d.cjs.js.map} +1 -1
  387. package/dist/{tex-8addc455.cjs.js → tex-d609b400.cjs.js} +2 -2
  388. package/dist/{tex-8addc455.cjs.js.map → tex-d609b400.cjs.js.map} +1 -1
  389. package/dist/{ts-tags-e56ee3ee.cjs.js → ts-tags-ba7eb9e3.cjs.js} +2 -2
  390. package/dist/{ts-tags-e56ee3ee.cjs.js.map → ts-tags-ba7eb9e3.cjs.js.map} +1 -1
  391. package/dist/tsconfig.tsbuildinfo +1 -1
  392. package/dist/{twig-911808dc.cjs.js → twig-e9bb57f2.cjs.js} +2 -2
  393. package/dist/{twig-911808dc.cjs.js.map → twig-e9bb57f2.cjs.js.map} +1 -1
  394. package/dist/{vue-9b06428b.cjs.js → vue-16d91bfa.cjs.js} +2 -2
  395. package/dist/{vue-9b06428b.cjs.js.map → vue-16d91bfa.cjs.js.map} +1 -1
  396. package/dist/{vue-html-ca1dd5bf.cjs.js → vue-html-432cdd7f.cjs.js} +2 -2
  397. package/dist/{vue-html-ca1dd5bf.cjs.js.map → vue-html-432cdd7f.cjs.js.map} +1 -1
  398. package/dist/wikitext-2748811a.cjs.js +2 -0
  399. package/dist/wikitext-2748811a.cjs.js.map +1 -0
  400. package/dist/wikitext-c9071578.esm.js +1 -0
  401. package/package.json +2 -2
  402. package/src/nile-accordion/nile-accordion.ts +0 -1
  403. package/src/nile-auto-complete/nile-auto-complete.ts +2 -13
  404. package/src/nile-avatar/nile-avatar.ts +0 -2
  405. package/src/nile-badge/nile-badge.ts +0 -2
  406. package/src/nile-breadcrumb/nile-breadcrumb.ts +0 -2
  407. package/src/nile-breadcrumb-item/nile-breadcrumb-item.ts +0 -2
  408. package/src/nile-button/nile-button.ts +0 -2
  409. package/src/nile-button-toggle/nile-button-toggle.ts +0 -2
  410. package/src/nile-button-toggle-group/nile-button-toggle-group.ts +0 -2
  411. package/src/nile-calendar/nile-calendar.test.ts +64 -5
  412. package/src/nile-calendar/nile-calendar.ts +2 -69
  413. package/src/nile-card/nile-card.ts +0 -2
  414. package/src/nile-checkbox/nile-checkbox.ts +0 -2
  415. package/src/nile-chip/nile-chip.ts +0 -6
  416. package/src/nile-code-editor/nile-code-editor.ts +0 -2
  417. package/src/nile-content-editor/nile-content-editor.ts +0 -2
  418. package/src/nile-date-picker/nile-date-picker.ts +7 -15
  419. package/src/nile-dialog/nile-dialog.ts +0 -2
  420. package/src/nile-drawer/nile-drawer.ts +0 -2
  421. package/src/nile-empty-state/nile-empty-state.ts +0 -2
  422. package/src/nile-form-help-text/nile-form-help-text.test.ts +86 -0
  423. package/src/nile-form-help-text/nile-form-help-text.ts +17 -15
  424. package/src/nile-icon-button/nile-icon-button.ts +0 -2
  425. package/src/nile-input/nile-input.ts +0 -2
  426. package/src/nile-link/nile-link.ts +0 -2
  427. package/src/nile-list/nile-list.ts +0 -2
  428. package/src/nile-list-item/nile-list-item.ts +0 -2
  429. package/src/nile-loader/nile-loader.test.ts +6 -0
  430. package/src/nile-menu/nile-menu.ts +0 -6
  431. package/src/nile-menu-item/nile-menu-item.ts +0 -3
  432. package/src/nile-option/nile-option.ts +0 -3
  433. package/src/nile-popover/nile-popover.ts +0 -2
  434. package/src/nile-popup/nile-popup.ts +0 -3
  435. package/src/nile-radio-group/nile-radio-group.ts +0 -2
  436. package/src/nile-select/nile-select.ts +3 -7
  437. package/src/nile-slide-toggle/nile-slide-toggle.ts +0 -2
  438. package/src/nile-split-panel/nile-split-panel.ts +0 -2
  439. package/src/nile-stepper/nile-stepper.ts +0 -2
  440. package/src/nile-tab/nile-tab.ts +0 -2
  441. package/src/nile-tab-group/nile-tab-group.test.ts +71 -29
  442. package/src/nile-tab-group/nile-tab-group.ts +6 -14
  443. package/src/nile-table-body/nile-table-body.ts +0 -2
  444. package/src/nile-tag/nile-tag.ts +0 -2
  445. package/src/nile-textarea/nile-textarea.ts +0 -2
  446. package/src/nile-toast/nile-toast.ts +0 -2
  447. package/src/nile-tooltip/nile-tooltip.ts +0 -2
  448. package/src/nile-tree/nile-tree.ts +0 -2
  449. package/tsconfig.json +1 -0
  450. package/vscode-html-custom-data.json +3717 -60
  451. package/dist/abap-1e9762d1.esm.js +0 -1
  452. package/dist/abap-3b3fe406.cjs.js +0 -2
  453. package/dist/abap-3b3fe406.cjs.js.map +0 -1
  454. package/dist/catppuccin-frappe-c0734345.esm.js +0 -1
  455. package/dist/catppuccin-frappe-eb77e95d.cjs.js +0 -2
  456. package/dist/catppuccin-frappe-eb77e95d.cjs.js.map +0 -1
  457. package/dist/catppuccin-latte-471f76fc.cjs.js +0 -2
  458. package/dist/catppuccin-latte-471f76fc.cjs.js.map +0 -1
  459. package/dist/catppuccin-latte-d798493f.esm.js +0 -1
  460. package/dist/catppuccin-macchiato-7ac78e7e.cjs.js +0 -2
  461. package/dist/catppuccin-macchiato-7ac78e7e.cjs.js.map +0 -1
  462. package/dist/catppuccin-macchiato-d78b2ec2.esm.js +0 -1
  463. package/dist/catppuccin-mocha-3b00f8d6.cjs.js +0 -2
  464. package/dist/catppuccin-mocha-3b00f8d6.cjs.js.map +0 -1
  465. package/dist/catppuccin-mocha-6a189a57.esm.js +0 -1
  466. package/dist/cobol-4ed2b235.esm.js +0 -1
  467. package/dist/cobol-c428fca2.cjs.js +0 -2
  468. package/dist/cobol-c428fca2.cjs.js.map +0 -1
  469. package/dist/go-4c55ae2b.esm.js +0 -1
  470. package/dist/go-9bee484b.cjs.js +0 -2
  471. package/dist/go-9bee484b.cjs.js.map +0 -1
  472. package/dist/hy-431f15f8.cjs.js +0 -2
  473. package/dist/hy-431f15f8.cjs.js.map +0 -1
  474. package/dist/hy-5e43d6c1.esm.js +0 -1
  475. package/dist/luau-0b166b7a.cjs.js +0 -2
  476. package/dist/luau-0b166b7a.cjs.js.map +0 -1
  477. package/dist/luau-7d7eaa97.esm.js +0 -1
  478. package/dist/mdc-13285ad6.esm.js +0 -1
  479. package/dist/mdc-a3fe82c5.cjs.js +0 -2
  480. package/dist/mdc-a3fe82c5.cjs.js.map +0 -1
  481. package/dist/nextflow-35e5a63d.esm.js +0 -1
  482. package/dist/nextflow-c666e91b.cjs.js +0 -2
  483. package/dist/nextflow-c666e91b.cjs.js.map +0 -1
  484. package/dist/nile-split-panel/nile-split-panel.test.cjs.js +0 -2
  485. package/dist/nile-split-panel/nile-split-panel.test.cjs.js.map +0 -1
  486. package/dist/nile-split-panel/nile-split-panel.test.esm.js +0 -1
  487. package/dist/nile-stepper/nile-stepper.test.cjs.js +0 -2
  488. package/dist/nile-stepper/nile-stepper.test.cjs.js.map +0 -1
  489. package/dist/nile-stepper/nile-stepper.test.esm.js +0 -1
  490. package/dist/nile-tree/nile-tree.test.cjs.js +0 -2
  491. package/dist/nile-tree/nile-tree.test.cjs.js.map +0 -1
  492. package/dist/nile-tree/nile-tree.test.esm.js +0 -1
  493. package/dist/one-dark-pro-9477257e.cjs.js +0 -2
  494. package/dist/one-dark-pro-9477257e.cjs.js.map +0 -1
  495. package/dist/one-dark-pro-deb4f5e9.esm.js +0 -1
  496. package/dist/src/nile-split-panel/nile-split-panel.test.d.ts +0 -1
  497. package/dist/src/nile-split-panel/nile-split-panel.test.js +0 -4
  498. package/dist/src/nile-split-panel/nile-split-panel.test.js.map +0 -1
  499. package/dist/src/nile-stepper/nile-stepper.test.d.ts +0 -4
  500. package/dist/src/nile-stepper/nile-stepper.test.js +0 -7
  501. package/dist/src/nile-stepper/nile-stepper.test.js.map +0 -1
  502. package/dist/src/nile-tree/nile-tree.test.d.ts +0 -2
  503. package/dist/src/nile-tree/nile-tree.test.js +0 -5
  504. package/dist/src/nile-tree/nile-tree.test.js.map +0 -1
  505. package/dist/wikitext-b9a7e67b.cjs.js +0 -2
  506. package/dist/wikitext-b9a7e67b.cjs.js.map +0 -1
  507. package/dist/wikitext-c06489b3.esm.js +0 -1
  508. package/src/nile-split-panel/nile-split-panel.test.ts +0 -7
  509. package/src/nile-stepper/nile-stepper.test.ts +0 -12
  510. package/src/nile-tree/nile-tree.test.ts +0 -9
@@ -28,7 +28,6 @@ import NileElement from '../internal/nile-element';
28
28
  let NileDialog = class NileDialog extends NileElement {
29
29
  constructor() {
30
30
  super(...arguments);
31
- this.BUBBLES = false;
32
31
  this.hasSlotController = new HasSlotController(this, 'footer', 'sublabel', 'label');
33
32
  /**
34
33
  * Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can
@@ -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,mBAAm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,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"]}
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,O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AAE;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,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 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,7 +63,6 @@ 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;
67
66
  private readonly hasSlotController;
68
67
  private modal;
69
68
  private originalTrigger;
@@ -77,7 +77,6 @@ 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;
81
80
  this.hasSlotController = new HasSlotController(this, 'footer');
82
81
  /**
83
82
  * 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,OAA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","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 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"]}
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,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ACV,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"]}
@@ -18,7 +18,6 @@ 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;
22
21
  size: 'sm' | 'md' | 'lg';
23
22
  variant: 'flat' | 'content' | 'tonal';
24
23
  icon: string;
@@ -19,7 +19,6 @@ 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;
23
22
  this.size = 'md';
24
23
  this.variant = 'tonal';
25
24
  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;;QAUc,YAAO,GAAU,KAAK,CAAC;QAE9B,SAAI,GAAuB,IAAI,CAAC;QAEhC,YAAO,GAGL,OAAO,CAAC;QAEV,SAAI,GAAW,OAAO,CAAC;QACT,cAAS,GAAY,KAAK,CAAC;QAEzC,SAAI,GAAW,aAAa,C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AAC,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': NileE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C","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}"]}
@@ -19,12 +19,14 @@ export declare class NileFormHelpText extends LitElement {
19
19
  static get styles(): CSSResultArray;
20
20
  isExpanded: boolean;
21
21
  fullText: string;
22
+ textLimit: number;
22
23
  displayedText: string;
23
24
  slotElement: HTMLSlotElement;
24
25
  connectedCallback(): void;
25
26
  firstUpdated(): void;
26
27
  handleSlotChange(): void;
27
28
  toggleExpanded(): void;
29
+ updateDisplayedText(): void;
28
30
  /**
29
31
  * Render method
30
32
  * @slot This is a slot test
@@ -19,6 +19,7 @@ let NileFormHelpText = class NileFormHelpText extends LitElement {
19
19
  super(...arguments);
20
20
  this.isExpanded = false;
21
21
  this.fullText = '';
22
+ this.textLimit = 47;
22
23
  this.displayedText = '';
23
24
  }
24
25
  /**
@@ -40,12 +41,15 @@ let NileFormHelpText = class NileFormHelpText extends LitElement {
40
41
  handleSlotChange() {
41
42
  const nodes = this.slotElement.assignedNodes({ flatten: true });
42
43
  const textContent = nodes.map(node => node.textContent).join('');
43
- this.fullText = textContent;
44
- this.displayedText = textContent.length > 50 ? `${textContent.substring(0, 47)}...` : textContent;
44
+ this.fullText = textContent.trim();
45
+ this.updateDisplayedText();
45
46
  }
46
47
  toggleExpanded() {
47
48
  this.isExpanded = !this.isExpanded;
48
- this.displayedText = this.isExpanded ? this.fullText : `${this.fullText.substring(0, 47)}...`;
49
+ this.updateDisplayedText();
50
+ }
51
+ updateDisplayedText() {
52
+ this.displayedText = this.isExpanded ? this.fullText : `${this.fullText.substring(0, this.textLimit)}...`;
49
53
  }
50
54
  /* #endregion */
51
55
  /* #region Methods */
@@ -54,12 +58,13 @@ let NileFormHelpText = class NileFormHelpText extends LitElement {
54
58
  * @slot This is a slot test
55
59
  */
56
60
  render() {
57
- const showMoreButton = this.fullText.length > 50;
61
+ const showMoreButton = this.fullText.length > this.textLimit + 3;
58
62
  const iconName = this.isExpanded ? 'arrowup' : 'arrowdown';
59
63
  return html `
60
64
  <div class="nile-form-help-text" part="container">
61
- <slot hidden></slot>
62
- <div part="text">${this.displayedText}
65
+ <slot hidden>${this.fullText}</slot>
66
+ <div part="text">
67
+ <span>${this.displayedText}</span>
63
68
  ${showMoreButton ? html `
64
69
  <span
65
70
  class="nile-form-help-text__more-button"
@@ -80,6 +85,9 @@ __decorate([
80
85
  __decorate([
81
86
  property({ type: String, reflect: true })
82
87
  ], NileFormHelpText.prototype, "fullText", void 0);
88
+ __decorate([
89
+ property({ type: Number, reflect: true })
90
+ ], NileFormHelpText.prototype, "textLimit", void 0);
83
91
  __decorate([
84
92
  property({ type: String, reflect: true })
85
93
  ], NileFormHelpText.prototype, "displayedText", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-form-help-text.js","sourceRoot":"","sources":["../../../src/nile-form-help-text/nile-form-help-text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB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C,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC;IAChG,CAAC;IAED,gBAAgB;IAEhB,qBAAqB;IAErB;;;OAGG;IACI,MAAM;QACX,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,EAAE,CAAC;QACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC;QAE3D,OAAO,IAAI,CAAA;;;yBAGU,IAAI,CAAC,aAAa;UACjC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAA;;;;qBAIV,IAAI,CAAC,cAAc;eACzB,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW;qEACW,QAAQ;;SAEpE,CAAC,CAAC,CAAC,EAAE;;;GAGX,CAAC;IACF,CAAC;CACF,CAAA;AA/DC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAG,CAAC;oDAChB;AAG5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAG,CAAC;kDACrB;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAG,CAAC;uDAChB;AAG3B;IADC,KAAK,CAAC,MAAM,CAAC;qDACgB;AApBnB,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CA0E5B;SA1EY,gBAAgB;AA4E7B,eAAe,gBAAgB,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, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement, query } from 'lit/decorators.js';\nimport {styles} from './nile-form-help-text.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-form-help-text\n *\n */\n@customElement('nile-form-help-text')\nexport class NileFormHelpText extends LitElement {\n /**\n * The styles for FormHelpText\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\n @property({ type: Boolean, reflect: true })\n isExpanded: boolean = false;\n\n @property({ type: String, reflect: true })\n fullText: string = '';\n\n @property({ type: String, reflect: true })\n displayedText: string = '';\n\n @query('slot')\n slotElement!: HTMLSlotElement;\n\n connectedCallback() {\n super.connectedCallback();\n requestAnimationFrame(() => {\n this.slotElement?.addEventListener('slotchange', this.handleSlotChange.bind(this));\n });\n }\n\n firstUpdated() {\n this.handleSlotChange();\n }\n\n handleSlotChange() {\n const nodes = this.slotElement.assignedNodes({flatten: true});\n const textContent = nodes.map(node => node.textContent).join('');\n this.fullText = textContent;\n this.displayedText = textContent.length > 50 ? `${textContent.substring(0, 47)}...` : textContent;\n }\n\n toggleExpanded() {\n this.isExpanded = !this.isExpanded;\n this.displayedText = this.isExpanded ? this.fullText : `${this.fullText.substring(0, 47)}...`;\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 const showMoreButton = this.fullText.length > 50;\n const iconName = this.isExpanded ? 'arrowup' : 'arrowdown';\n\n return html`\n <div class=\"nile-form-help-text\" part=\"container\">\n <slot hidden></slot>\n <div part=\"text\">${this.displayedText}\n ${showMoreButton ? html`\n <span\n class=\"nile-form-help-text__more-button\"\n part=\"toggle-button\"\n @click=${this.toggleExpanded}\n >${this.isExpanded ? 'View Less' : 'View More'}\n <nile-icon color=\"#005EA6\" part=\"icon\" size=\"14\" name=\"${iconName}\"></nile-icon>\n </span>\n ` : ''}\n </div>\n </div>\n `;\n }\n}\n\nexport default NileFormHelpText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-form-help-text': NileFormHelpText;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-form-help-text.js","sourceRoot":"","sources":["../../../src/nile-form-help-text/nile-form-help-text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAC,MAAM,2BAA2B,CAAC;AAEjD;;;;;GAKG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QASwC,eAAU,GAAY,KAAK,CAAC;QAE7B,aAAQ,GAAW,EAAE,CAAC;QAEtB,cAAS,GAAW,EAAE,CAAC;QAEvB,kBAAa,GAAW,EAAE,CAAC;IA6DzE,CAAC;IA3EC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAYD,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,qBAAqB,CAAC,GAAG,EAAE;YACzB,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACrF,CAAC,CAAC,CAAC;IACL,CAAC;IAED,YAAY;QACV,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAED,gBAAgB;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QAC9D,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjE,IAAI,CAAC,QAAQ,GA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E,OAAO,EAAE,IAAI,EAAG,CAAC;mDAAwB;AAEvB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAG,CAAC;uDAA4B;AAExD;IAAd,KAAK,CAAC,MAAM,CAAC;qDAA+B;AAjBlC,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CA4E5B;SA5EY,gBAAgB;AA8E7B,eAAe,gBAAgB,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, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement, query } from 'lit/decorators.js';\nimport {styles} from './nile-form-help-text.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-form-help-text\n *\n */\n@customElement('nile-form-help-text')\nexport class NileFormHelpText extends LitElement {\n /**\n * The styles for FormHelpText\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, reflect: true }) isExpanded: boolean = false;\n\n @property({ type: String, reflect: true }) fullText: string = '';\n\n @property({ type: Number, reflect: true }) textLimit: number = 47;\n\n @property({ type: String, reflect: true }) displayedText: string = '';\n\n @query('slot') slotElement!: HTMLSlotElement;\n\n connectedCallback() {\n super.connectedCallback();\n requestAnimationFrame(() => {\n this.slotElement?.addEventListener('slotchange', this.handleSlotChange.bind(this));\n });\n }\n\n firstUpdated() {\n this.handleSlotChange();\n }\n\n handleSlotChange() {\n const nodes = this.slotElement.assignedNodes({flatten: true});\n const textContent = nodes.map(node => node.textContent).join('');\n this.fullText = textContent.trim();\n this.updateDisplayedText()\n }\n\n toggleExpanded() {\n this.isExpanded = !this.isExpanded;\n this.updateDisplayedText()\n }\n\n updateDisplayedText(){\n this.displayedText = this.isExpanded ? this.fullText : `${this.fullText.substring(0, this.textLimit)}...`;\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 const showMoreButton = this.fullText.length > this.textLimit+3;\n const iconName = this.isExpanded ? 'arrowup' : 'arrowdown';\n\n return html`\n <div class=\"nile-form-help-text\" part=\"container\">\n <slot hidden>${this.fullText}</slot>\n <div part=\"text\">\n <span>${this.displayedText}</span>\n ${showMoreButton ? html`\n <span\n class=\"nile-form-help-text__more-button\"\n part=\"toggle-button\"\n @click=${this.toggleExpanded}\n >${this.isExpanded ? 'View Less' : 'View More'}\n <nile-icon color=\"#005EA6\" part=\"icon\" size=\"14\" name=\"${iconName}\"></nile-icon>\n </span>\n ` : ''}\n </div>\n </div>\n `;\n }\n}\n\nexport default NileFormHelpText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-form-help-text': NileFormHelpText;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ import './nile-form-help-text';
@@ -0,0 +1,67 @@
1
+ import { fixture, expect, html } from '@open-wc/testing';
2
+ import './nile-form-help-text';
3
+ const wait = (ms = 50000) => new Promise(resolve => setTimeout(resolve, ms));
4
+ describe('NileFormHelpText', () => {
5
+ it('should render with default properties', async () => {
6
+ const el = await fixture(html `<nile-form-help-text></nile-form-help-text>`);
7
+ // Check if the displayed text is empty initially (no content in slot)
8
+ const textContent = el.shadowRoot.querySelector('div>span:first-child')?.textContent?.trim();
9
+ expect(textContent).to.equal('...');
10
+ });
11
+ it('should truncate the text if it exceeds textLimit and show "View More" button', async () => {
12
+ const longText = "This is a very long help text that should be truncated and should show a 'View More' button.";
13
+ const el = await fixture(html `<nile-form-help-text><span>${longText}</span></nile-form-help-text>`);
14
+ // Check if the displayed text is truncated
15
+ const textContent = el.shadowRoot.querySelector('div>span:first-child')?.textContent?.trim();
16
+ expect(textContent?.endsWith('...')).to.be.true;
17
+ // Check if the "View More" button is visible
18
+ const moreButton = el.shadowRoot.querySelector('.nile-form-help-text__more-button');
19
+ expect(moreButton).to.exist;
20
+ expect(moreButton?.textContent).to.include('View More');
21
+ });
22
+ it('should expand to show full text when "View More" is clicked', async () => {
23
+ const longText = "This is a very long help text that should be truncated and should show a 'View More' button.";
24
+ const el = await fixture(html `<nile-form-help-text><span>${longText}</span></nile-form-help-text>`);
25
+ // Simulate clicking the "View More" button
26
+ const moreButton = el.shadowRoot.querySelector('.nile-form-help-text__more-button');
27
+ moreButton?.click();
28
+ await el.updateComplete;
29
+ // Verify that the full text is displayed
30
+ const textContent = el.shadowRoot.querySelector('div>span:first-child')?.textContent?.trim();
31
+ expect(textContent).to.equal(longText);
32
+ // Check if the "View Less" button is now visible
33
+ const lessButton = el.shadowRoot.querySelector('.nile-form-help-text__more-button');
34
+ expect(lessButton).to.exist;
35
+ expect(lessButton?.textContent).to.include('View Less');
36
+ });
37
+ it('should collapse back to truncated text when "View Less" is clicked', async () => {
38
+ const longText = "This is a very long help text that should be truncated and should show a 'View More' button.";
39
+ const el = await fixture(html `<nile-form-help-text><span>${longText}</span></nile-form-help-text>`);
40
+ // Expand the text
41
+ const moreButton = el.shadowRoot.querySelector('.nile-form-help-text__more-button');
42
+ moreButton?.click();
43
+ await el.updateComplete;
44
+ // Collapse the text by clicking "View Less"
45
+ const lessButton = el.shadowRoot.querySelector('.nile-form-help-text__more-button');
46
+ lessButton?.click();
47
+ await el.updateComplete;
48
+ // Verify that the text is truncated again
49
+ const textContent = el.shadowRoot.querySelector('div>span:first-child')?.textContent?.trim();
50
+ expect(textContent?.endsWith('...')).to.be.true;
51
+ // Check if the "View More" button is visible again
52
+ const viewMoreButton = el.shadowRoot.querySelector('.nile-form-help-text__more-button');
53
+ expect(viewMoreButton).to.exist;
54
+ expect(viewMoreButton?.textContent).to.include('View More');
55
+ });
56
+ it('should not show "View More" button when text is within limit', async () => {
57
+ const shortText = "Short help text.";
58
+ const el = await fixture(html `<nile-form-help-text><span>${shortText}</span></nile-form-help-text>`);
59
+ // Check if the displayed text is not truncated
60
+ const textContent = el.shadowRoot.querySelector('div>span:first-child')?.textContent?.trim();
61
+ expect(textContent).to.equal(shortText + '...');
62
+ // Verify that "View More" button is not rendered
63
+ const moreButton = el.shadowRoot.querySelector('.nile-form-help-text__more-button');
64
+ expect(moreButton).to.be.null;
65
+ });
66
+ });
67
+ //# sourceMappingURL=nile-form-help-text.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-form-help-text.test.js","sourceRoot":"","sources":["../../../src/nile-form-help-text/nile-form-help-text.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,uBAAuB,CAAC;AAG/B,MAAM,IAAI,GAAG,CAAC,KAAa,KAAK,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;AAEpF,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,EAAE,GAAqB,MAAM,OAAO,CAAC,IAAI,CAAA,6CAA6C,CAAC,CAAC;QAE9F,sEAAsE;QACtE,MAAM,WAAW,GAAG,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,sBAAsB,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAA;QAC7F,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8EAA8E,EAAE,KAAK,IAAI,EAAE;QAC5F,MAAM,QAAQ,GAAG,8FAA8F,CAAC;QAChH,MAAM,EAAE,GAAqB,MAAM,OAAO,CAAC,IAAI,CAAA,8BAA8B,QAAQ,+BAA+B,CAAC,CAAC;QAEtH,2CAA2C;QAC3C,MAAM,WAAW,GAAG,EAAE,CAAC,UAAW,CAAC,aAA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,CAAC;QAEvH,+CAA+C;QAC/C,MAAM,WAAW,GAAG,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,sBAAsB,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAA;QAC7F,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,GAAC,KAAK,CAAC,CAAC;QAE9C,iDAAiD;QACjD,MAAM,UAAU,GAAG,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,mCAAmC,CAAC,CAAC;QACrF,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAChC,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC","sourcesContent":["import { fixture, expect, html } from '@open-wc/testing';\nimport './nile-form-help-text';\nimport { NileFormHelpText } from './nile-form-help-text';\n\nconst wait = (ms: number = 50000) => new Promise(resolve => setTimeout(resolve, ms))\n\ndescribe('NileFormHelpText', () => {\n it('should render with default properties', async () => {\n const el: NileFormHelpText = await fixture(html`<nile-form-help-text></nile-form-help-text>`);\n \n // Check if the displayed text is empty initially (no content in slot)\n const textContent = el.shadowRoot!.querySelector('div>span:first-child')?.textContent?.trim()\n expect(textContent).to.equal('...');\n });\n\n it('should truncate the text if it exceeds textLimit and show \"View More\" button', async () => {\n const longText = \"This is a very long help text that should be truncated and should show a 'View More' button.\";\n const el: NileFormHelpText = await fixture(html`<nile-form-help-text><span>${longText}</span></nile-form-help-text>`);\n \n // Check if the displayed text is truncated\n const textContent = el.shadowRoot!.querySelector('div>span:first-child')?.textContent?.trim()\n expect(textContent?.endsWith('...')).to.be.true;\n \n // Check if the \"View More\" button is visible\n const moreButton = el.shadowRoot!.querySelector('.nile-form-help-text__more-button');\n expect(moreButton).to.exist;\n expect(moreButton?.textContent).to.include('View More');\n });\n\n it('should expand to show full text when \"View More\" is clicked', async () => {\n const longText = \"This is a very long help text that should be truncated and should show a 'View More' button.\";\n const el: NileFormHelpText = await fixture(html`<nile-form-help-text><span>${longText}</span></nile-form-help-text>`);\n \n // Simulate clicking the \"View More\" button\n const moreButton = el.shadowRoot!.querySelector<HTMLElement>('.nile-form-help-text__more-button');\n moreButton?.click();\n await el.updateComplete;\n\n // Verify that the full text is displayed\n const textContent = el.shadowRoot!.querySelector('div>span:first-child')?.textContent?.trim()\n expect(textContent).to.equal(longText);\n \n // Check if the \"View Less\" button is now visible\n const lessButton = el.shadowRoot!.querySelector('.nile-form-help-text__more-button');\n expect(lessButton).to.exist;\n expect(lessButton?.textContent).to.include('View Less');\n });\n\n it('should collapse back to truncated text when \"View Less\" is clicked', async () => {\n const longText = \"This is a very long help text that should be truncated and should show a 'View More' button.\";\n const el: NileFormHelpText = await fixture(html`<nile-form-help-text><span>${longText}</span></nile-form-help-text>`);\n \n // Expand the text\n const moreButton = el.shadowRoot!.querySelector<HTMLElement>('.nile-form-help-text__more-button');\n moreButton?.click();\n await el.updateComplete;\n\n // Collapse the text by clicking \"View Less\"\n const lessButton = el.shadowRoot!.querySelector<HTMLElement>('.nile-form-help-text__more-button');\n lessButton?.click();\n await el.updateComplete;\n\n // Verify that the text is truncated again\n const textContent = el.shadowRoot!.querySelector('div>span:first-child')?.textContent?.trim()\n expect(textContent?.endsWith('...')).to.be.true;\n \n // Check if the \"View More\" button is visible again\n const viewMoreButton = el.shadowRoot!.querySelector('.nile-form-help-text__more-button');\n expect(viewMoreButton).to.exist;\n expect(viewMoreButton?.textContent).to.include('View More');\n });\n\n it('should not show \"View More\" button when text is within limit', async () => {\n const shortText = \"Short help text.\";\n const el: NileFormHelpText = await fixture(html`<nile-form-help-text><span>${shortText}</span></nile-form-help-text>`);\n \n // Check if the displayed text is not truncated\n const textContent = el.shadowRoot!.querySelector('div>span:first-child')?.textContent?.trim()\n expect(textContent).to.equal(shortText+'...');\n\n // Verify that \"View More\" button is not rendered\n const moreButton = el.shadowRoot!.querySelector('.nile-form-help-text__more-button');\n expect(moreButton).to.be.null;\n });\n\n});\n"]}
@@ -28,7 +28,6 @@ import NileElement from '../internal/nile-element';
28
28
  */
29
29
  export declare class NileIconButton extends NileElement {
30
30
  static styles: CSSResultGroup;
31
- protected BUBBLES: boolean;
32
31
  button: HTMLButtonElement | HTMLLinkElement;
33
32
  private hasFocus;
34
33
  /** The name of the icon to draw. Available names depend on the icon library being used. */
@@ -35,7 +35,6 @@ import NileElement from '../internal/nile-element';
35
35
  let NileIconButton = class NileIconButton extends NileElement {
36
36
  constructor() {
37
37
  super(...arguments);
38
- this.BUBBLES = false;
39
38
  this.hasFocus = false;
40
39
  /**
41
40
  * A description that gets read by assistive devices. For optimal accessibility, you should always include a label
@@ -1 +1 @@
1
- {"version":3,"file":"nile-icon-button.js","sourceRoot":"","sources":["../../../src/nile-icon-button/nile-icon-button.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QAGc,YAAO,GAAU,KAAK,CAAC;QAIzB,aAAQ,GAAG,KAAK,CAAC;QAuBlC;;;WAGG;QACS,UAAK,GAAG,EAAE,CAAC;QAEvB,2BAA2B;QACiB,aAAQ,GAAG,KAAK,CAAC;QAKjB,cAAS,GAAY,KAAK,C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AAc,CAAC;8CAA6C;AAE1D;IAAR,KAAK,EAAE;gDAA0B;AAGtB;IAAX,QAAQ,EAAE;4CAAe;AAGd;IAAX,QAAQ,EAAE;+CAAkB;AAMjB;IAAX,QAAQ,EAAE;2CAAc;AAGb;IAAX,QAAQ,EAAE;4CAAe;AAGd;IAAX,QAAQ,EAAE;8CAAkD;AAGjD;IAAX,QAAQ,EAAE;gDAAmB;AAMlB;IAAX,QAAQ,EAAE;6CAAY;AAGqB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAkB;AAGlB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAgB;AAEd;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAA4B;AA1C5D,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA8H1B;SA9HY,cAAc;AAgI3B,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 property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-icon-button.css';\n\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { literal, html } from 'lit/static-html.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\n\n/**\n * @summary Icons buttons are simple, icon-only buttons that can be used for actions and in toolbars.\n * @status stable\n * @since 2.0\n *\n * @dependency nile-icon\n *\n * @event nile-blur - Emitted when the icon button loses focus.\n * @event nile-focus - Emitted when the icon button gains focus.\n *\n * @csspart base - The component's base wrapper.\n */\n/**\n * Nile icon component.\n *\n * @tag nile-icon-button\n *\n */\n@customElement('nile-icon-button')\nexport class NileIconButton extends NileElement {\n static styles: CSSResultGroup = styles;\n\n protected override BUBBLES: boolean=false;\n\n @query('.icon-button') button: HTMLButtonElement | HTMLLinkElement;\n\n @state() private hasFocus = false;\n\n /** The name of the icon to draw. Available names depend on the icon library being used. */\n @property() name?: string;\n\n /** The name of a registered custom icon library. */\n @property() library?: string;\n\n /**\n * An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\n * can result in XSS attacks.\n */\n @property() src?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @property() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @property() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @property() download?: string;\n\n /**\n * A description that gets read by assistive devices. For optimal accessibility, you should always include a label\n * that describes what the icon button does.\n */\n @property() label = '';\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**Default color to icon */\n @property({ type: String, reflect: true }) color?: string;\n\n @property({ type: Boolean, reflect: true }) ishovered: boolean = false;\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus');\n }\n\n private handleClick(event: MouseEvent) {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /** Simulates a click on the icon button. */\n click() {\n this.button.click();\n }\n\n /** Sets focus on the icon button. */\n focus(options?: FocusOptions) {\n this.button.focus(options);\n }\n\n /** Removes focus from the icon button. */\n blur() {\n this.button.blur();\n }\n\n private handleMouseOver(e: any) {\n this.ishovered = true;\n }\n private handleMouseLeave(e: any) {\n this.ishovered = false;\n }\n\n render(): TemplateResult {\n const isLink = this.href ? true : false;\n const tag = isLink ? literal`a` : literal`button`;\n /* eslint-disable lit/binding-positions, lit/no-invalid-html */\n return html`\n <${tag}\n part=\"base\"\n class=${classMap({\n 'icon-button': true,\n 'icon-button--disabled': !isLink && this.disabled,\n 'icon-button--focused': this.hasFocus,\n })}\n ?disabled=${ifDefined(isLink ? undefined : this.disabled)}\n type=${ifDefined(isLink ? undefined : 'button')}\n href=${ifDefined(isLink ? this.href : undefined)}\n target=${ifDefined(isLink ? this.target : undefined)}\n download=${ifDefined(isLink ? this.download : undefined)}\n rel=${ifDefined(\n isLink && this.target ? 'noreferrer noopener' : undefined\n )}\n role=${ifDefined(isLink ? undefined : 'button')}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-label=\"${this.label}\"\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n @mouseover=${this.handleMouseOver}\n @mouseleave=${this.handleMouseLeave}\n >\n \n <nile-icon\n class=\"icon-button__icon\"\n name=${ifDefined(this.name)}\n library=${ifDefined(this.library)}\n src=${ifDefined(this.src)}\n .color=${this.color}\n aria-hidden=\"true\"\n size=\"14\"\n ></nile-icon>\n </${tag}>\n `;\n }\n}\n\nexport default NileIconButton;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-icon-button': NileIconButton;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-icon-button.js","sourceRoot":"","sources":["../../../src/nile-icon-button/nile-icon-button.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,o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AAC,WAAW;iBAChB,IAAI,CAAC,WAAW;qBACZ,IAAI,CAAC,eAAe;sBACnB,IAAI,CAAC,gBAAgB;;;;;iBAK1B,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;oBACjB,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC3B,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;mBAChB,IAAI,CAAC,KAAK;;;;UAInB,GAAG;KACR,CAAC;IACJ,CAAC;;AA1HM,qBAAM,GAAmB,MAAM,CAAC;AAEhB;IAAtB,KAAK,CAAC,cAAc,CAAC;8CAA6C;AAE1D;IAAR,KAAK,EAAE;gDAA0B;AAGtB;IAAX,QAAQ,EAAE;4CAAe;AAGd;IAAX,QAAQ,EAAE;+CAAkB;AAMjB;IAAX,QAAQ,EAAE;2CAAc;AAGb;IAAX,QAAQ,EAAE;4CAAe;AAGd;IAAX,QAAQ,EAAE;8CAAkD;AAGjD;IAAX,QAAQ,EAAE;gDAAmB;AAMlB;IAAX,QAAQ,EAAE;6CAAY;AAGqB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAkB;AAGlB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAgB;AAEd;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAA4B;AAxC5D,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA4H1B;SA5HY,cAAc;AA8H3B,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 property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-icon-button.css';\n\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { literal, html } from 'lit/static-html.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\n\n/**\n * @summary Icons buttons are simple, icon-only buttons that can be used for actions and in toolbars.\n * @status stable\n * @since 2.0\n *\n * @dependency nile-icon\n *\n * @event nile-blur - Emitted when the icon button loses focus.\n * @event nile-focus - Emitted when the icon button gains focus.\n *\n * @csspart base - The component's base wrapper.\n */\n/**\n * Nile icon component.\n *\n * @tag nile-icon-button\n *\n */\n@customElement('nile-icon-button')\nexport class NileIconButton extends NileElement {\n static styles: CSSResultGroup = styles;\n\n @query('.icon-button') button: HTMLButtonElement | HTMLLinkElement;\n\n @state() private hasFocus = false;\n\n /** The name of the icon to draw. Available names depend on the icon library being used. */\n @property() name?: string;\n\n /** The name of a registered custom icon library. */\n @property() library?: string;\n\n /**\n * An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\n * can result in XSS attacks.\n */\n @property() src?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @property() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @property() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @property() download?: string;\n\n /**\n * A description that gets read by assistive devices. For optimal accessibility, you should always include a label\n * that describes what the icon button does.\n */\n @property() label = '';\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**Default color to icon */\n @property({ type: String, reflect: true }) color?: string;\n\n @property({ type: Boolean, reflect: true }) ishovered: boolean = false;\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus');\n }\n\n private handleClick(event: MouseEvent) {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /** Simulates a click on the icon button. */\n click() {\n this.button.click();\n }\n\n /** Sets focus on the icon button. */\n focus(options?: FocusOptions) {\n this.button.focus(options);\n }\n\n /** Removes focus from the icon button. */\n blur() {\n this.button.blur();\n }\n\n private handleMouseOver(e: any) {\n this.ishovered = true;\n }\n private handleMouseLeave(e: any) {\n this.ishovered = false;\n }\n\n render(): TemplateResult {\n const isLink = this.href ? true : false;\n const tag = isLink ? literal`a` : literal`button`;\n /* eslint-disable lit/binding-positions, lit/no-invalid-html */\n return html`\n <${tag}\n part=\"base\"\n class=${classMap({\n 'icon-button': true,\n 'icon-button--disabled': !isLink && this.disabled,\n 'icon-button--focused': this.hasFocus,\n })}\n ?disabled=${ifDefined(isLink ? undefined : this.disabled)}\n type=${ifDefined(isLink ? undefined : 'button')}\n href=${ifDefined(isLink ? this.href : undefined)}\n target=${ifDefined(isLink ? this.target : undefined)}\n download=${ifDefined(isLink ? this.download : undefined)}\n rel=${ifDefined(\n isLink && this.target ? 'noreferrer noopener' : undefined\n )}\n role=${ifDefined(isLink ? undefined : 'button')}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-label=\"${this.label}\"\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n @mouseover=${this.handleMouseOver}\n @mouseleave=${this.handleMouseLeave}\n >\n \n <nile-icon\n class=\"icon-button__icon\"\n name=${ifDefined(this.name)}\n library=${ifDefined(this.library)}\n src=${ifDefined(this.src)}\n .color=${this.color}\n aria-hidden=\"true\"\n size=\"14\"\n ></nile-icon>\n </${tag}>\n `;\n }\n}\n\nexport default NileIconButton;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-icon-button': NileIconButton;\n }\n}\n"]}
@@ -16,7 +16,6 @@ import NileElement, { NileFormControl } from '../internal/nile-element';
16
16
  */
17
17
  export declare class NileInput extends NileElement implements NileFormControl {
18
18
  static styles: CSSResultGroup;
19
- protected BUBBLES: boolean;
20
19
  private readonly formControlController;
21
20
  private readonly hasSlotController;
22
21
  input: HTMLInputElement;