@aquera/nile-elements 0.0.6-9 → 0.0.7-1

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 (267) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +3 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +3 -0
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/modal.d.ts +12 -0
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/modal.js +52 -0
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/modal.js.map +1 -0
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/nile-element.d.ts +1 -1
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/nile-element.js +1 -0
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/nile-element.js.map +1 -1
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/index.d.ts +1 -0
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/index.js +2 -0
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/index.js.map +1 -0
  13. package/{dist/src/nile-radio-button-group/nile-radio-button-group.css.d.ts → .rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.css.d.ts} +1 -1
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.css.js +56 -0
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.css.js.map +1 -0
  16. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.d.ts +41 -0
  17. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.js +104 -0
  18. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.js.map +1 -0
  19. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/index.d.ts +1 -0
  20. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/index.js +2 -0
  21. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/index.js.map +1 -0
  22. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.d.ts +12 -0
  23. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.js +17 -0
  24. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.js.map +1 -0
  25. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +41 -0
  26. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +99 -0
  27. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -0
  28. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js +17 -6
  29. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  30. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.d.ts +6 -2
  31. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js +79 -21
  32. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  33. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js +1 -1
  34. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  35. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/index.d.ts +1 -0
  36. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/index.js +2 -0
  37. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/index.js.map +1 -0
  38. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/{nile-radio-button/nile-radio-button.css.d.ts → nile-dialog/nile-dialog.css.d.ts} +1 -1
  39. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.css.js +145 -0
  40. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.css.js.map +1 -0
  41. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.d.ts +60 -0
  42. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.js +297 -0
  43. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.js.map +1 -0
  44. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js +5 -0
  45. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js.map +1 -1
  46. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popup/nile-popup.css.js +1 -0
  47. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popup/nile-popup.css.js.map +1 -1
  48. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-progress-bar/nile-progress-bar.js +0 -1
  49. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-progress-bar/nile-progress-bar.js.map +1 -1
  50. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +1 -0
  51. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
  52. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +1 -1
  53. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
  54. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.js +3 -3
  55. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
  56. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +18 -4
  57. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +60 -34
  58. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  59. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  60. package/demo/index.html +1 -1
  61. package/dist/index.cjs.js +1 -1
  62. package/dist/index.esm.js +1 -1
  63. package/dist/index.iife.js +469 -212
  64. package/dist/internal/modal.cjs.js +2 -0
  65. package/dist/internal/modal.cjs.js.map +1 -0
  66. package/dist/internal/modal.esm.js +1 -0
  67. package/dist/internal/nile-element.cjs.js +1 -1
  68. package/dist/internal/nile-element.cjs.js.map +1 -1
  69. package/dist/internal/nile-element.esm.js +1 -1
  70. package/dist/internal/scroll.cjs.js +1 -1
  71. package/dist/internal/scroll.cjs.js.map +1 -1
  72. package/dist/internal/scroll.esm.js +1 -1
  73. package/dist/nile-button-toggle/index.cjs.js +2 -0
  74. package/dist/nile-button-toggle/index.esm.js +1 -0
  75. package/dist/nile-button-toggle/nile-button-toggle.cjs.js +2 -0
  76. package/dist/nile-button-toggle/nile-button-toggle.cjs.js.map +1 -0
  77. package/dist/nile-button-toggle/nile-button-toggle.css.cjs.js +2 -0
  78. package/dist/nile-button-toggle/nile-button-toggle.css.cjs.js.map +1 -0
  79. package/dist/nile-button-toggle/nile-button-toggle.css.esm.js +44 -0
  80. package/dist/nile-button-toggle/nile-button-toggle.esm.js +6 -0
  81. package/dist/nile-button-toggle-group/index.cjs.js +2 -0
  82. package/dist/nile-button-toggle-group/index.esm.js +1 -0
  83. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +2 -0
  84. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -0
  85. package/dist/nile-button-toggle-group/nile-button-toggle-group.css.cjs.js +2 -0
  86. package/dist/nile-button-toggle-group/nile-button-toggle-group.css.cjs.js.map +1 -0
  87. package/dist/nile-button-toggle-group/nile-button-toggle-group.css.esm.js +5 -0
  88. package/dist/nile-button-toggle-group/nile-button-toggle-group.esm.js +1 -0
  89. package/dist/nile-content-editor/index.cjs.js +1 -1
  90. package/dist/nile-content-editor/index.esm.js +1 -1
  91. package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
  92. package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
  93. package/dist/nile-content-editor/nile-content-editor.css.cjs.js +1 -1
  94. package/dist/nile-content-editor/nile-content-editor.css.cjs.js.map +1 -1
  95. package/dist/nile-content-editor/nile-content-editor.css.esm.js +17 -6
  96. package/dist/nile-content-editor/nile-content-editor.esm.js +9 -7
  97. package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
  98. package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
  99. package/dist/nile-date-picker/nile-date-picker.esm.js +1 -1
  100. package/dist/nile-dialog/index.cjs.js +2 -0
  101. package/dist/nile-dialog/index.cjs.js.map +1 -0
  102. package/dist/nile-dialog/index.esm.js +1 -0
  103. package/dist/nile-dialog/nile-dialog.cjs.js +2 -0
  104. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -0
  105. package/dist/nile-dialog/nile-dialog.css.cjs.js +2 -0
  106. package/dist/nile-dialog/nile-dialog.css.cjs.js.map +1 -0
  107. package/dist/nile-dialog/nile-dialog.css.esm.js +133 -0
  108. package/dist/nile-dialog/nile-dialog.esm.js +45 -0
  109. package/dist/nile-input/nile-input.cjs.js +1 -1
  110. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  111. package/dist/nile-input/nile-input.esm.js +1 -1
  112. package/dist/nile-popup/nile-popup.css.cjs.js +1 -1
  113. package/dist/nile-popup/nile-popup.css.cjs.js.map +1 -1
  114. package/dist/nile-popup/nile-popup.css.esm.js +1 -0
  115. package/dist/nile-progress-bar/nile-progress-bar.cjs.js +1 -1
  116. package/dist/nile-progress-bar/nile-progress-bar.cjs.js.map +1 -1
  117. package/dist/nile-progress-bar/nile-progress-bar.esm.js +2 -3
  118. package/dist/nile-select/nile-select.cjs.js +1 -1
  119. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  120. package/dist/nile-select/nile-select.esm.js +1 -0
  121. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
  122. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
  123. package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js +1 -1
  124. package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
  125. package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +1 -1
  126. package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +3 -3
  127. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  128. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  129. package/dist/nile-switcher/nile-switcher.esm.js +39 -29
  130. package/dist/src/index.d.ts +3 -0
  131. package/dist/src/index.js +3 -0
  132. package/dist/src/index.js.map +1 -1
  133. package/dist/src/internal/modal.d.ts +12 -0
  134. package/dist/src/internal/modal.js +52 -0
  135. package/dist/src/internal/modal.js.map +1 -0
  136. package/dist/src/internal/nile-element.d.ts +1 -1
  137. package/dist/src/internal/nile-element.js +1 -0
  138. package/dist/src/internal/nile-element.js.map +1 -1
  139. package/dist/src/nile-button-toggle/index.d.ts +1 -0
  140. package/dist/src/nile-button-toggle/index.js +2 -0
  141. package/dist/src/nile-button-toggle/index.js.map +1 -0
  142. package/{.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.css.d.ts → dist/src/nile-button-toggle/nile-button-toggle.css.d.ts} +1 -1
  143. package/dist/src/nile-button-toggle/nile-button-toggle.css.js +56 -0
  144. package/dist/src/nile-button-toggle/nile-button-toggle.css.js.map +1 -0
  145. package/dist/src/nile-button-toggle/nile-button-toggle.d.ts +41 -0
  146. package/dist/src/nile-button-toggle/nile-button-toggle.js +104 -0
  147. package/dist/src/nile-button-toggle/nile-button-toggle.js.map +1 -0
  148. package/dist/src/nile-button-toggle-group/index.d.ts +1 -0
  149. package/dist/src/nile-button-toggle-group/index.js +2 -0
  150. package/dist/src/nile-button-toggle-group/index.js.map +1 -0
  151. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.d.ts +12 -0
  152. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.js +17 -0
  153. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.js.map +1 -0
  154. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +41 -0
  155. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +99 -0
  156. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -0
  157. package/dist/src/nile-content-editor/nile-content-editor.css.js +17 -6
  158. package/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  159. package/dist/src/nile-content-editor/nile-content-editor.d.ts +6 -2
  160. package/dist/src/nile-content-editor/nile-content-editor.js +79 -21
  161. package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  162. package/dist/src/nile-date-picker/nile-date-picker.js +1 -1
  163. package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  164. package/dist/src/nile-dialog/index.d.ts +1 -0
  165. package/dist/src/nile-dialog/index.js +2 -0
  166. package/dist/src/nile-dialog/index.js.map +1 -0
  167. package/dist/src/{nile-radio-button/nile-radio-button.css.d.ts → nile-dialog/nile-dialog.css.d.ts} +1 -1
  168. package/dist/src/nile-dialog/nile-dialog.css.js +145 -0
  169. package/dist/src/nile-dialog/nile-dialog.css.js.map +1 -0
  170. package/dist/src/nile-dialog/nile-dialog.d.ts +60 -0
  171. package/dist/src/nile-dialog/nile-dialog.js +297 -0
  172. package/dist/src/nile-dialog/nile-dialog.js.map +1 -0
  173. package/dist/src/nile-input/nile-input.js +5 -0
  174. package/dist/src/nile-input/nile-input.js.map +1 -1
  175. package/dist/src/nile-popup/nile-popup.css.js +1 -0
  176. package/dist/src/nile-popup/nile-popup.css.js.map +1 -1
  177. package/dist/src/nile-progress-bar/nile-progress-bar.js +0 -1
  178. package/dist/src/nile-progress-bar/nile-progress-bar.js.map +1 -1
  179. package/dist/src/nile-select/nile-select.js +1 -0
  180. package/dist/src/nile-select/nile-select.js.map +1 -1
  181. package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +1 -1
  182. package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
  183. package/dist/src/nile-slide-toggle/nile-slide-toggle.js +3 -3
  184. package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
  185. package/dist/src/nile-switcher/nile-switcher.d.ts +18 -4
  186. package/dist/src/nile-switcher/nile-switcher.js +60 -34
  187. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  188. package/dist/tsconfig.tsbuildinfo +1 -1
  189. package/package.json +1 -1
  190. package/src/index.ts +4 -1
  191. package/src/internal/modal.ts +64 -0
  192. package/src/internal/nile-element.ts +1 -0
  193. package/src/nile-button-toggle/index.ts +1 -0
  194. package/src/nile-button-toggle/nile-button-toggle.css.ts +58 -0
  195. package/src/nile-button-toggle/nile-button-toggle.ts +106 -0
  196. package/src/nile-button-toggle-group/index.ts +1 -0
  197. package/src/nile-button-toggle-group/nile-button-toggle-group.css.ts +19 -0
  198. package/src/nile-button-toggle-group/nile-button-toggle-group.ts +115 -0
  199. package/src/nile-content-editor/nile-content-editor.css.ts +17 -6
  200. package/src/nile-content-editor/nile-content-editor.ts +81 -27
  201. package/src/nile-date-picker/nile-date-picker.ts +1 -1
  202. package/src/nile-dialog/index.ts +1 -0
  203. package/src/nile-dialog/nile-dialog.css.ts +147 -0
  204. package/src/nile-dialog/nile-dialog.ts +325 -0
  205. package/src/nile-input/nile-input.ts +1 -1
  206. package/src/nile-popup/nile-popup.css.ts +1 -0
  207. package/src/nile-progress-bar/nile-progress-bar.ts +0 -1
  208. package/src/nile-select/nile-select.ts +1 -0
  209. package/src/nile-slide-toggle/nile-slide-toggle.css.ts +1 -1
  210. package/src/nile-slide-toggle/nile-slide-toggle.ts +3 -3
  211. package/src/nile-switcher/nile-switcher.ts +103 -33
  212. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/index.d.ts +0 -1
  213. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/index.js +0 -2
  214. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/index.js.map +0 -1
  215. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.css.js +0 -173
  216. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.css.js.map +0 -1
  217. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.d.ts +0 -57
  218. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.js +0 -145
  219. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.js.map +0 -1
  220. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/index.d.ts +0 -1
  221. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/index.js +0 -2
  222. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/index.js.map +0 -1
  223. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.css.js +0 -70
  224. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.css.js.map +0 -1
  225. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.d.ts +0 -66
  226. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.js +0 -308
  227. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.js.map +0 -1
  228. package/dist/nile-radio-button/index.cjs.js +0 -2
  229. package/dist/nile-radio-button/index.esm.js +0 -1
  230. package/dist/nile-radio-button/nile-radio-button.cjs.js +0 -2
  231. package/dist/nile-radio-button/nile-radio-button.cjs.js.map +0 -1
  232. package/dist/nile-radio-button/nile-radio-button.css.cjs.js +0 -2
  233. package/dist/nile-radio-button/nile-radio-button.css.cjs.js.map +0 -1
  234. package/dist/nile-radio-button/nile-radio-button.css.esm.js +0 -161
  235. package/dist/nile-radio-button/nile-radio-button.esm.js +0 -21
  236. package/dist/nile-radio-button-group/index.cjs.js +0 -2
  237. package/dist/nile-radio-button-group/index.esm.js +0 -1
  238. package/dist/nile-radio-button-group/nile-radio-button-group.cjs.js +0 -2
  239. package/dist/nile-radio-button-group/nile-radio-button-group.cjs.js.map +0 -1
  240. package/dist/nile-radio-button-group/nile-radio-button-group.css.cjs.js +0 -2
  241. package/dist/nile-radio-button-group/nile-radio-button-group.css.cjs.js.map +0 -1
  242. package/dist/nile-radio-button-group/nile-radio-button-group.css.esm.js +0 -58
  243. package/dist/nile-radio-button-group/nile-radio-button-group.esm.js +0 -56
  244. package/dist/src/nile-radio-button/index.d.ts +0 -1
  245. package/dist/src/nile-radio-button/index.js +0 -2
  246. package/dist/src/nile-radio-button/index.js.map +0 -1
  247. package/dist/src/nile-radio-button/nile-radio-button.css.js +0 -173
  248. package/dist/src/nile-radio-button/nile-radio-button.css.js.map +0 -1
  249. package/dist/src/nile-radio-button/nile-radio-button.d.ts +0 -57
  250. package/dist/src/nile-radio-button/nile-radio-button.js +0 -145
  251. package/dist/src/nile-radio-button/nile-radio-button.js.map +0 -1
  252. package/dist/src/nile-radio-button-group/index.d.ts +0 -1
  253. package/dist/src/nile-radio-button-group/index.js +0 -2
  254. package/dist/src/nile-radio-button-group/index.js.map +0 -1
  255. package/dist/src/nile-radio-button-group/nile-radio-button-group.css.js +0 -70
  256. package/dist/src/nile-radio-button-group/nile-radio-button-group.css.js.map +0 -1
  257. package/dist/src/nile-radio-button-group/nile-radio-button-group.d.ts +0 -66
  258. package/dist/src/nile-radio-button-group/nile-radio-button-group.js +0 -308
  259. package/dist/src/nile-radio-button-group/nile-radio-button-group.js.map +0 -1
  260. package/src/nile-radio-button/index.ts +0 -1
  261. package/src/nile-radio-button/nile-radio-button.css.ts +0 -175
  262. package/src/nile-radio-button/nile-radio-button.ts +0 -151
  263. package/src/nile-radio-button-group/index.ts +0 -1
  264. package/src/nile-radio-button-group/nile-radio-button-group.css.ts +0 -72
  265. package/src/nile-radio-button-group/nile-radio-button-group.ts +0 -337
  266. /package/dist/{nile-radio-button → nile-button-toggle}/index.cjs.js.map +0 -0
  267. /package/dist/{nile-radio-button-group → nile-button-toggle-group}/index.cjs.js.map +0 -0
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { css } from 'lit-element';
8
+ /**
9
+ * Modal CSS
10
+ */
11
+ export const styles = css `
12
+ :host {
13
+ --width: 31rem;
14
+ --header-spacing: 1.25rem;
15
+ --body-spacing: 1.25rem;
16
+ --footer-spacing: 1.25rem;
17
+
18
+ display: contents;
19
+ }
20
+
21
+ :host *,
22
+ :host *::before,
23
+ :host *::after {
24
+ box-sizing: inherit;
25
+ }
26
+
27
+ [hidden] {
28
+ display: none !important;
29
+ }
30
+
31
+ .dialog {
32
+ display: flex;
33
+ align-items: center;
34
+ justify-content: center;
35
+ position: fixed;
36
+ top: 0;
37
+ right: 0;
38
+ bottom: 0;
39
+ left: 0;
40
+ z-index: 800;
41
+ }
42
+
43
+ .dialog__panel {
44
+ display: flex;
45
+ flex-direction: column;
46
+ z-index: 2;
47
+ width: var(--width);
48
+ max-width: calc(100% - 2.25rem);
49
+ max-height: calc(100% - 2.25rem);
50
+ background-color: hsl(0, 0%, 100%);
51
+ border-radius: 4px;
52
+ box-shadow: 0 4px 16px rgb(0 0 0 / 24%);
53
+ }
54
+
55
+ .dialog__panel:focus {
56
+ outline: none;
57
+ }
58
+
59
+ @media screen and (max-width: 420px) {
60
+ .dialog__panel {
61
+ max-height: 80vh;
62
+ }
63
+ }
64
+
65
+ .dialog--open .dialog__panel {
66
+ display: flex;
67
+ opacity: 1;
68
+ }
69
+
70
+ .dialog__header {
71
+ flex: 0 0 auto;
72
+ display: flex;
73
+ padding: 24px 24px 24px 24px;
74
+ background-color: #FAFAFA;
75
+ border-radius: 4px 4px 0 0;
76
+ border: 1px solid #E5E9EB;
77
+ }
78
+
79
+ .dialog__title {
80
+ flex: 1 1 auto;
81
+ font: inherit;
82
+ font-size: 1.25rem;
83
+ line-height: 1.4;
84
+ margin: 0;
85
+ }
86
+
87
+ .dialog__header-actions {
88
+ flex-shrink: 0;
89
+ display: flex;
90
+ flex-wrap: wrap;
91
+ justify-content: end;
92
+ gap: 24px;
93
+ }
94
+
95
+ .dialog__header-actions nile-icon-button,
96
+ .dialog__header-actions ::slotted(nile-icon-button) {
97
+ flex: 0 0 auto;
98
+ display: flex;
99
+ align-items: center;
100
+ font-size: 1rem;
101
+ }
102
+
103
+ .dialog__body {
104
+ flex: 1 1 auto;
105
+ display: block;
106
+ padding: 1.25rem;
107
+ overflow: auto;
108
+ -webkit-overflow-scrolling: touch;
109
+ border: 1px solid #E5E9EB;
110
+ }
111
+
112
+ .dialog__footer {
113
+ flex: 0 0 auto;
114
+ text-align: right;
115
+ padding: 12px 24px;
116
+ background-color: #FAFAFA;
117
+ border-radius: 0 0 4px 4px;
118
+ border: 1px solid #E5E9EB;
119
+ }
120
+
121
+ .dialog__footer ::slotted(nile-button:not(:first-of-type)) {
122
+ margin-inline-start: 0.5rem;
123
+ }
124
+
125
+ .dialog:not(.dialog--has-footer) .dialog__footer {
126
+ display: none;
127
+ }
128
+
129
+ .dialog__overlay {
130
+ position: fixed;
131
+ top: 0;
132
+ right: 0;
133
+ bottom: 0;
134
+ left: 0;
135
+ background-color: hsl(0 0% 0% / 43%);
136
+ }
137
+
138
+ @media (forced-colors: active) {
139
+ .dialog__panel {
140
+ border: solid 1px hsl(240, 5.9%, 11%);
141
+ }
142
+ }
143
+ `;
144
+ export default [styles];
145
+ //# sourceMappingURL=nile-dialog.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-dialog.css.js","sourceRoot":"","sources":["../../../src/nile-dialog/nile-dialog.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoIxB,CAAC;AAEF,eAAe,CAAC,MAAM,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 { css } from 'lit-element';\n\n/**\n * Modal CSS\n */\nexport const styles = css`\n :host {\n --width: 31rem;\n --header-spacing: 1.25rem;\n --body-spacing: 1.25rem;\n --footer-spacing: 1.25rem;\n\n display: contents;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .dialog {\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 800;\n }\n\n .dialog__panel {\n display: flex;\n flex-direction: column;\n z-index: 2;\n width: var(--width);\n max-width: calc(100% - 2.25rem);\n max-height: calc(100% - 2.25rem);\n background-color: hsl(0, 0%, 100%);\n border-radius: 4px;\n box-shadow: 0 4px 16px rgb(0 0 0 / 24%);\n }\n\n .dialog__panel:focus {\n outline: none;\n }\n\n @media screen and (max-width: 420px) {\n .dialog__panel {\n max-height: 80vh;\n }\n }\n\n .dialog--open .dialog__panel {\n display: flex;\n opacity: 1;\n }\n\n .dialog__header {\n flex: 0 0 auto;\n display: flex;\n padding: 24px 24px 24px 24px;\n background-color: #FAFAFA;\n border-radius: 4px 4px 0 0;\n border: 1px solid #E5E9EB;\n }\n\n .dialog__title {\n flex: 1 1 auto;\n font: inherit;\n font-size: 1.25rem;\n line-height: 1.4;\n margin: 0;\n }\n\n .dialog__header-actions {\n flex-shrink: 0;\n display: flex;\n flex-wrap: wrap;\n justify-content: end;\n gap: 24px;\n }\n\n .dialog__header-actions nile-icon-button,\n .dialog__header-actions ::slotted(nile-icon-button) {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1rem;\n }\n\n .dialog__body {\n flex: 1 1 auto;\n display: block;\n padding: 1.25rem;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n border: 1px solid #E5E9EB;\n }\n\n .dialog__footer {\n flex: 0 0 auto;\n text-align: right;\n padding: 12px 24px;\n background-color: #FAFAFA;\n border-radius: 0 0 4px 4px;\n border: 1px solid #E5E9EB;\n }\n\n .dialog__footer ::slotted(nile-button:not(:first-of-type)) {\n margin-inline-start: 0.5rem;\n }\n\n .dialog:not(.dialog--has-footer) .dialog__footer {\n display: none;\n }\n\n .dialog__overlay {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: hsl(0 0% 0% / 43%);\n }\n\n @media (forced-colors: active) {\n .dialog__panel {\n border: solid 1px hsl(240, 5.9%, 11%);\n }\n }\n`;\n\nexport default [styles];\n"]}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { TemplateResult } from 'lit-element';
8
+ import '../nile-icon-button/nile-icon-button';
9
+ import type { CSSResultGroup } from 'lit';
10
+ import NileElement from '../internal/nile-element';
11
+ /**
12
+ * Nile icon component.
13
+ *
14
+ * @tag nile-modal
15
+ *
16
+ */
17
+ export declare class NileDialog extends NileElement {
18
+ static styles: CSSResultGroup;
19
+ private readonly hasSlotController;
20
+ private modal;
21
+ private originalTrigger;
22
+ dialog: HTMLElement;
23
+ panel: HTMLElement;
24
+ overlay: HTMLElement;
25
+ /**
26
+ * Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can
27
+ * use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.
28
+ */
29
+ open: boolean;
30
+ /**
31
+ * The dialog's label as displayed in the header. You should always include a relevant label even when using
32
+ * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.
33
+ */
34
+ label: string;
35
+ /**
36
+ * Disables the header. This will also remove the default close button, so please ensure you provide an easy,
37
+ * accessible way for users to dismiss the dialog.
38
+ */
39
+ noHeader: boolean;
40
+ preventOverlayClose: boolean;
41
+ connectedCallback(): void;
42
+ firstUpdated(): void;
43
+ disconnectedCallback(): void;
44
+ private requestClose;
45
+ private addOpenListeners;
46
+ private removeOpenListeners;
47
+ private handleDocumentKeyDown;
48
+ handleOpenChange(): Promise<void>;
49
+ /** Shows the dialog. */
50
+ show(): Promise<void>;
51
+ /** Hides the dialog */
52
+ hide(): Promise<void>;
53
+ render(): TemplateResult<1>;
54
+ }
55
+ export default NileDialog;
56
+ declare global {
57
+ interface HTMLElementTagNameMap {
58
+ 'nile-dialog': NileDialog;
59
+ }
60
+ }
@@ -0,0 +1,297 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { __decorate } from "tslib";
8
+ import { styles } from './nile-dialog.css';
9
+ import '../nile-icon-button/nile-icon-button';
10
+ import { animateTo, stopAnimations } from '../internal/animate';
11
+ import { classMap } from 'lit/directives/class-map.js';
12
+ import { customElement, property, query } from 'lit/decorators.js';
13
+ import { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';
14
+ import { HasSlotController } from '../internal/slot';
15
+ import { html } from 'lit';
16
+ import { ifDefined } from 'lit/directives/if-defined.js';
17
+ import { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';
18
+ import { waitForEvent } from '../internal/event';
19
+ import { watch } from '../internal/watch';
20
+ import Modal from '../internal/modal';
21
+ import NileElement from '../internal/nile-element';
22
+ /**
23
+ * Nile icon component.
24
+ *
25
+ * @tag nile-modal
26
+ *
27
+ */
28
+ let NileDialog = class NileDialog extends NileElement {
29
+ constructor() {
30
+ super(...arguments);
31
+ this.hasSlotController = new HasSlotController(this, 'footer');
32
+ /**
33
+ * Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can
34
+ * use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.
35
+ */
36
+ this.open = false;
37
+ /**
38
+ * The dialog's label as displayed in the header. You should always include a relevant label even when using
39
+ * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.
40
+ */
41
+ this.label = '';
42
+ /**
43
+ * Disables the header. This will also remove the default close button, so please ensure you provide an easy,
44
+ * accessible way for users to dismiss the dialog.
45
+ */
46
+ this.noHeader = false;
47
+ this.preventOverlayClose = false;
48
+ }
49
+ connectedCallback() {
50
+ super.connectedCallback();
51
+ this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);
52
+ this.modal = new Modal(this);
53
+ }
54
+ firstUpdated() {
55
+ this.dialog.hidden = !this.open;
56
+ if (this.open) {
57
+ this.addOpenListeners();
58
+ this.modal.activate();
59
+ lockBodyScrolling(this);
60
+ }
61
+ }
62
+ disconnectedCallback() {
63
+ super.disconnectedCallback();
64
+ unlockBodyScrolling(this);
65
+ }
66
+ requestClose(source) {
67
+ const nileRequestClose = this.emit('nile-request-close', {
68
+ cancelable: true,
69
+ detail: { source }
70
+ });
71
+ if (source === 'close-button') {
72
+ this.hide();
73
+ return;
74
+ }
75
+ if (nileRequestClose.defaultPrevented || this.preventOverlayClose) {
76
+ const animation = getAnimation(this, 'dialog.denyClose', { dir: 'right' });
77
+ animateTo(this.panel, animation.keyframes, animation.options);
78
+ return;
79
+ }
80
+ this.hide();
81
+ }
82
+ addOpenListeners() {
83
+ document.addEventListener('keydown', this.handleDocumentKeyDown);
84
+ }
85
+ removeOpenListeners() {
86
+ document.removeEventListener('keydown', this.handleDocumentKeyDown);
87
+ }
88
+ handleDocumentKeyDown(event) {
89
+ if (this.open && event.key === 'Escape') {
90
+ event.stopPropagation();
91
+ this.requestClose('keyboard');
92
+ }
93
+ }
94
+ async handleOpenChange() {
95
+ if (this.open) {
96
+ // Show
97
+ this.emit('nile-show');
98
+ this.addOpenListeners();
99
+ this.originalTrigger = document.activeElement;
100
+ this.modal.activate();
101
+ lockBodyScrolling(this);
102
+ // When the dialog is shown, Safari will attempt to set focus on whatever element has autofocus. This can cause
103
+ // the dialogs's animation to jitter (if it starts offscreen), so we'll temporarily remove the attribute, call
104
+ // `focus({ preventScroll: true })` ourselves, and add the attribute back afterwards.
105
+ //
106
+ // Related: https://github.com/shoelace-style/shoelace/issues/693
107
+ //
108
+ const autoFocusTarget = this.querySelector('[autofocus]');
109
+ if (autoFocusTarget) {
110
+ autoFocusTarget.removeAttribute('autofocus');
111
+ }
112
+ await Promise.all([stopAnimations(this.dialog), stopAnimations(this.overlay)]);
113
+ this.dialog.hidden = false;
114
+ // Set initial focus
115
+ requestAnimationFrame(() => {
116
+ const nileInitialFocus = this.emit('nile-initial-focus', { cancelable: true });
117
+ if (!nileInitialFocus.defaultPrevented) {
118
+ // Set focus to the autofocus target and restore the attribute
119
+ if (autoFocusTarget) {
120
+ autoFocusTarget.focus({ preventScroll: true });
121
+ }
122
+ else {
123
+ this.panel.focus({ preventScroll: true });
124
+ }
125
+ }
126
+ // Restore the autofocus attribute
127
+ if (autoFocusTarget) {
128
+ autoFocusTarget.setAttribute('autofocus', '');
129
+ }
130
+ });
131
+ const panelAnimation = getAnimation(this, 'dialog.show', { dir: 'right' });
132
+ const overlayAnimation = getAnimation(this, 'dialog.overlay.show', { dir: 'right' });
133
+ await Promise.all([
134
+ animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),
135
+ animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)
136
+ ]);
137
+ this.emit('nile-after-show');
138
+ }
139
+ else {
140
+ // Hide
141
+ this.emit('nile-hide');
142
+ this.removeOpenListeners();
143
+ this.modal.deactivate();
144
+ await Promise.all([stopAnimations(this.dialog), stopAnimations(this.overlay)]);
145
+ const panelAnimation = getAnimation(this, 'dialog.hide', { dir: 'right' });
146
+ const overlayAnimation = getAnimation(this, 'dialog.overlay.hide', { dir: 'right' });
147
+ // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to
148
+ // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear
149
+ // unexpectedly. We'll unhide them after all animations have completed.
150
+ await Promise.all([
151
+ animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {
152
+ this.overlay.hidden = true;
153
+ }),
154
+ animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {
155
+ this.panel.hidden = true;
156
+ })
157
+ ]);
158
+ this.dialog.hidden = true;
159
+ // Now that the dialog is hidden, restore the overlay and panel for next time
160
+ this.overlay.hidden = false;
161
+ this.panel.hidden = false;
162
+ unlockBodyScrolling(this);
163
+ // Restore focus to the original trigger
164
+ const trigger = this.originalTrigger;
165
+ if (typeof trigger?.focus === 'function') {
166
+ setTimeout(() => trigger.focus());
167
+ }
168
+ this.emit('nile-after-hide');
169
+ }
170
+ }
171
+ /** Shows the dialog. */
172
+ async show() {
173
+ if (this.open) {
174
+ return undefined;
175
+ }
176
+ this.open = true;
177
+ return waitForEvent(this, 'nile-after-show');
178
+ }
179
+ /** Hides the dialog */
180
+ async hide() {
181
+ if (!this.open) {
182
+ return undefined;
183
+ }
184
+ this.open = false;
185
+ return waitForEvent(this, 'nile-after-hide');
186
+ }
187
+ render() {
188
+ return html `
189
+ <div
190
+ part="base"
191
+ class=${classMap({
192
+ dialog: true,
193
+ 'dialog--open': this.open,
194
+ 'dialog--has-footer': this.hasSlotController.test('footer')
195
+ })}
196
+ >
197
+ <div part="overlay" class="dialog__overlay" @click=${() => this.requestClose('overlay')} tabindex="-1"></div>
198
+
199
+ <div
200
+ part="panel"
201
+ class="dialog__panel"
202
+ role="dialog"
203
+ aria-modal="true"
204
+ aria-hidden=${this.open ? 'false' : 'true'}
205
+ aria-label=${ifDefined(this.noHeader ? this.label : undefined)}
206
+ aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}
207
+ tabindex="0"
208
+ >
209
+ ${!this.noHeader
210
+ ? html `
211
+ <header part="header" class="dialog__header">
212
+ <h2 part="title" class="dialog__title" id="title">
213
+ <slot name="label"> ${this.label.length > 0 ? this.label : String.fromCharCode(65279)} </slot>
214
+ </h2>
215
+ <div part="header-actions" class="dialog__header-actions">
216
+ <slot name="header-actions"></slot>
217
+ <nile-icon-button
218
+ part="close-button"
219
+ exportparts="base:close-button__base"
220
+ class="dialog__close"
221
+ name="close"
222
+ label="close"
223
+ library="system"
224
+ @click="${() => this.requestClose('close-button')}"
225
+ ></nile-icon-button>
226
+ </div>
227
+ </header>
228
+ `
229
+ : ''}
230
+
231
+ <slot part="body" class="dialog__body"></slot>
232
+
233
+ <footer part="footer" class="dialog__footer">
234
+ <slot name="footer"></slot>
235
+ </footer>
236
+ </div>
237
+ </div>
238
+ `;
239
+ }
240
+ };
241
+ NileDialog.styles = styles;
242
+ __decorate([
243
+ query('.dialog')
244
+ ], NileDialog.prototype, "dialog", void 0);
245
+ __decorate([
246
+ query('.dialog__panel')
247
+ ], NileDialog.prototype, "panel", void 0);
248
+ __decorate([
249
+ query('.dialog__overlay')
250
+ ], NileDialog.prototype, "overlay", void 0);
251
+ __decorate([
252
+ property({ type: Boolean, reflect: true })
253
+ ], NileDialog.prototype, "open", void 0);
254
+ __decorate([
255
+ property({ reflect: true })
256
+ ], NileDialog.prototype, "label", void 0);
257
+ __decorate([
258
+ property({ type: Boolean, reflect: true })
259
+ ], NileDialog.prototype, "noHeader", void 0);
260
+ __decorate([
261
+ property({ type: Boolean, reflect: true })
262
+ ], NileDialog.prototype, "preventOverlayClose", void 0);
263
+ __decorate([
264
+ watch('open', { waitUntilFirstUpdate: true })
265
+ ], NileDialog.prototype, "handleOpenChange", null);
266
+ NileDialog = __decorate([
267
+ customElement('nile-dialog')
268
+ ], NileDialog);
269
+ export { NileDialog };
270
+ setDefaultAnimation('dialog.show', {
271
+ keyframes: [
272
+ { opacity: 0, scale: 0.8 },
273
+ { opacity: 1, scale: 1 }
274
+ ],
275
+ options: { duration: 250, easing: 'ease' }
276
+ });
277
+ setDefaultAnimation('dialog.hide', {
278
+ keyframes: [
279
+ { opacity: 1, scale: 1 },
280
+ { opacity: 0, scale: 0.8 }
281
+ ],
282
+ options: { duration: 250, easing: 'ease' }
283
+ });
284
+ setDefaultAnimation('dialog.denyClose', {
285
+ keyframes: [{ scale: 1 }, { scale: 1.02 }, { scale: 1 }],
286
+ options: { duration: 250 }
287
+ });
288
+ setDefaultAnimation('dialog.overlay.show', {
289
+ keyframes: [{ opacity: 0 }, { opacity: 1 }],
290
+ options: { duration: 250 }
291
+ });
292
+ setDefaultAnimation('dialog.overlay.hide', {
293
+ keyframes: [{ opacity: 1 }, { opacity: 0 }],
294
+ options: { duration: 250 }
295
+ });
296
+ export default NileDialog;
297
+ //# sourceMappingURL=nile-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-dialog.js","sourceRoot":"","sources":["../../../src/nile-dialog/nile-dialog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;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mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, CSSResultArray, TemplateResult} from 'lit-element';\nimport {styles} from './nile-dialog.css';\n\nimport '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\n/**\n * Nile icon component.\n *\n * @tag nile-modal\n *\n */\n@customElement('nile-dialog')\nexport class NileDialog extends NileElement {\n\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.dialog') dialog: HTMLElement;\n @query('.dialog__panel') panel: HTMLElement;\n @query('.dialog__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The dialog's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n\n /**\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 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 }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n\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', { dir: 'right'});\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 // Show\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n this.modal.activate();\n\n lockBodyScrolling(this);\n\n // When the dialog is shown, Safari will attempt to set focus on whatever element has autofocus. This can cause\n // the dialogs's animation to jitter (if it starts offscreen), so we'll temporarily remove the attribute, call\n // `focus({ preventScroll: true })` ourselves, and add the attribute back afterwards.\n //\n // Related: https://github.com/shoelace-style/shoelace/issues/693\n //\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([stopAnimations(this.dialog), stopAnimations(this.overlay)]);\n this.dialog.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const nileInitialFocus = this.emit('nile-initial-focus', { cancelable: true });\n\n if (!nileInitialFocus.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, 'dialog.show', { dir: 'right' });\n const overlayAnimation = getAnimation(this, 'dialog.overlay.show', { dir: 'right' });\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 this.modal.deactivate();\n\n await Promise.all([stopAnimations(this.dialog), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, 'dialog.hide', { dir: 'right' });\n const overlayAnimation = getAnimation(this, 'dialog.overlay.hide', { dir: 'right' });\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.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 part=\"overlay\" class=\"dialog__overlay\" @click=${() => this.requestClose('overlay')} tabindex=\"-1\"></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__title\" id=\"title\">\n <slot name=\"label\"> ${this.label.length > 0 ? this.label : String.fromCharCode(65279)} </slot>\n </h2>\n <div part=\"header-actions\" class=\"dialog__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon-button\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"dialog__close\"\n name=\"close\"\n label=\"close\"\n library=\"system\"\n @click=\"${() => this.requestClose('close-button')}\"\n ></nile-icon-button>\n </div>\n </header>\n `\n : ''}\n\n <slot part=\"body\" class=\"dialog__body\"></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"]}
@@ -84,6 +84,11 @@ let NileInput = class NileInput extends NileElement {
84
84
  this.form = '';
85
85
  /** Makes the input a required field. */
86
86
  this.required = false;
87
+ /**
88
+ * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to
89
+ * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.
90
+ */
91
+ this.autocomplete = "off";
87
92
  /** Enables spell checking on the input. */
88
93
  this.spellcheck = true;
89
94
  }