@aquera/nile-elements 0.1.36-beta-1.0 → 0.1.36-beta-1.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 (332) hide show
  1. package/README.md +68 -15
  2. package/demo/index.css +7 -4
  3. package/demo/index.html +20 -36
  4. package/demo/variables.css +13 -0
  5. package/demo/variables_v2.css +13 -0
  6. package/dist/{fixture-948ae33c.cjs.js → fixture-d5b55278.cjs.js} +2 -2
  7. package/dist/{fixture-948ae33c.cjs.js.map → fixture-d5b55278.cjs.js.map} +1 -1
  8. package/dist/{fixture-76051ef1.esm.js → fixture-df8b52d7.esm.js} +1 -1
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.esm.js +1 -1
  11. package/dist/internal/animate.cjs.js +1 -1
  12. package/dist/internal/animate.cjs.js.map +1 -1
  13. package/dist/internal/animate.esm.js +1 -1
  14. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  15. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  16. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  17. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
  18. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  19. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  20. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  21. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  22. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  23. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  24. package/dist/nile-button/nile-button.test.esm.js +1 -1
  25. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  26. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  27. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  28. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  29. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  30. package/dist/nile-card/nile-card.test.esm.js +1 -1
  31. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  32. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  33. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  34. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  35. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  36. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  37. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  38. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  39. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  40. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  41. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  42. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  43. package/dist/nile-error-message/nile-error-message.cjs.js +1 -1
  44. package/dist/nile-error-message/nile-error-message.cjs.js.map +1 -1
  45. package/dist/nile-error-message/nile-error-message.css.cjs.js +1 -1
  46. package/dist/nile-error-message/nile-error-message.css.cjs.js.map +1 -1
  47. package/dist/nile-error-message/nile-error-message.css.esm.js +6 -4
  48. package/dist/nile-error-message/nile-error-message.esm.js +4 -4
  49. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  50. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  51. package/dist/nile-error-notification/nile-error-notification.css.cjs.js +1 -1
  52. package/dist/nile-error-notification/nile-error-notification.css.cjs.js.map +1 -1
  53. package/dist/nile-error-notification/nile-error-notification.css.esm.js +1 -1
  54. package/dist/nile-filter-chip/index.cjs.js +2 -0
  55. package/dist/nile-filter-chip/index.esm.js +1 -0
  56. package/dist/nile-filter-chip/nile-filter-chip.cjs.js +2 -0
  57. package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -0
  58. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +2 -0
  59. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -0
  60. package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +121 -0
  61. package/dist/nile-filter-chip/nile-filter-chip.esm.js +43 -0
  62. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +2 -0
  63. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +1 -0
  64. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +20 -0
  65. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  66. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  67. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  68. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  69. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  70. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  71. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  72. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  73. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  74. package/dist/nile-input/nile-input.test.esm.js +1 -1
  75. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  76. package/dist/nile-link/nile-link.test.esm.js +1 -1
  77. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  78. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  79. package/dist/nile-popover/index.cjs.js +1 -1
  80. package/dist/nile-popover/index.esm.js +1 -1
  81. package/dist/nile-popover/nile-popover.cjs.js +11 -3
  82. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  83. package/dist/nile-popover/nile-popover.esm.js +13 -7
  84. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  85. package/dist/nile-popover/nile-popover.test.cjs.js.map +1 -1
  86. package/dist/nile-popover/nile-popover.test.esm.js +3 -3
  87. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  88. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  89. package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js +1 -1
  90. package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js.map +1 -1
  91. package/dist/nile-progress-bar/nile-progress-bar.css.esm.js +1 -0
  92. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  93. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  94. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  95. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  96. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  97. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  98. package/dist/nile-select/nile-select.cjs.js +1 -1
  99. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  100. package/dist/nile-select/nile-select.esm.js +1 -1
  101. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  102. package/dist/nile-select/nile-select.test.esm.js +1 -1
  103. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  104. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  105. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  106. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  107. package/dist/nile-table/nile-table.cjs.js.map +1 -1
  108. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  109. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  110. package/dist/nile-tooltip/index.cjs.js +1 -1
  111. package/dist/nile-tooltip/index.esm.js +1 -1
  112. package/dist/nile-tooltip/nile-tooltip-utils.cjs.js +2 -0
  113. package/dist/nile-tooltip/nile-tooltip-utils.cjs.js.map +1 -0
  114. package/dist/nile-tooltip/nile-tooltip-utils.esm.js +1 -0
  115. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  116. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  117. package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
  118. package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
  119. package/dist/nile-tooltip/nile-tooltip.css.esm.js +78 -45
  120. package/dist/nile-tooltip/nile-tooltip.esm.js +23 -28
  121. package/dist/nile-tooltip/nile-tooltip.test.cjs.js +2 -0
  122. package/dist/nile-tooltip/nile-tooltip.test.cjs.js.map +1 -0
  123. package/dist/nile-tooltip/nile-tooltip.test.esm.js +47 -0
  124. package/dist/src/index.d.ts +1 -2
  125. package/dist/src/index.js +1 -2
  126. package/dist/src/index.js.map +1 -1
  127. package/dist/src/nile-error-message/nile-error-message.css.js +6 -4
  128. package/dist/src/nile-error-message/nile-error-message.css.js.map +1 -1
  129. package/dist/src/nile-error-message/nile-error-message.d.ts +4 -0
  130. package/dist/src/nile-error-message/nile-error-message.js +20 -0
  131. package/dist/src/nile-error-message/nile-error-message.js.map +1 -1
  132. package/dist/src/nile-error-notification/nile-error-notification.css.js +1 -1
  133. package/dist/src/nile-error-notification/nile-error-notification.css.js.map +1 -1
  134. package/dist/src/nile-filter-chip/index.d.ts +1 -0
  135. package/dist/src/nile-filter-chip/index.js +2 -0
  136. package/dist/src/{nile-file-upload → nile-filter-chip}/index.js.map +1 -1
  137. package/dist/src/{nile-file-preview/nile-file-preview.css.d.ts → nile-filter-chip/nile-filter-chip.css.d.ts} +1 -1
  138. package/dist/src/nile-filter-chip/nile-filter-chip.css.js +133 -0
  139. package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -0
  140. package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +37 -0
  141. package/dist/src/nile-filter-chip/nile-filter-chip.js +145 -0
  142. package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -0
  143. package/dist/src/nile-filter-chip/nile-filter-chip.test.d.ts +1 -0
  144. package/dist/src/nile-filter-chip/nile-filter-chip.test.js +80 -0
  145. package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -0
  146. package/dist/src/nile-progress-bar/nile-progress-bar.css.js +1 -0
  147. package/dist/src/nile-progress-bar/nile-progress-bar.css.js.map +1 -1
  148. package/dist/src/nile-select/nile-select.js +1 -1
  149. package/dist/src/nile-select/nile-select.js.map +1 -1
  150. package/dist/src/nile-table/nile-table.js.map +1 -1
  151. package/dist/src/nile-tooltip/nile-tooltip-utils.d.ts +18 -0
  152. package/dist/src/nile-tooltip/nile-tooltip-utils.js +216 -0
  153. package/dist/src/nile-tooltip/nile-tooltip-utils.js.map +1 -0
  154. package/dist/src/nile-tooltip/nile-tooltip.css.js +76 -43
  155. package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
  156. package/dist/src/nile-tooltip/nile-tooltip.d.ts +24 -46
  157. package/dist/src/nile-tooltip/nile-tooltip.js +235 -232
  158. package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  159. package/dist/src/nile-tooltip/nile-tooltip.test.d.ts +1 -0
  160. package/dist/src/nile-tooltip/nile-tooltip.test.js +148 -0
  161. package/dist/src/nile-tooltip/nile-tooltip.test.js.map +1 -0
  162. package/dist/tsconfig.tsbuildinfo +1 -1
  163. package/package.json +2 -2
  164. package/plop-templates/lit/index.ts.hbs +1 -1
  165. package/plop-templates/lit/lit.css.ts.hbs +1 -1
  166. package/plop-templates/lit/lit.template.ts.hbs +3 -0
  167. package/{src/nile-file-preview/nile-file-preview.test.ts → plop-templates/lit/lit.test.ts.hbs} +5 -5
  168. package/plop-templates/lit/lit.ts.hbs +7 -3
  169. package/plop-templates/lit/sub-components/index.ts.hbs +4 -0
  170. package/plop-templates/lit/types/index.ts.hbs +0 -0
  171. package/plop-templates/lit/types/type.ts.hbs +3 -0
  172. package/plop-templates/lit/utils/lit.utils.ts.hbs +4 -0
  173. package/plopfile.js +32 -1
  174. package/src/index.ts +1 -2
  175. package/src/nile-error-message/nile-error-message.css.ts +6 -4
  176. package/src/nile-error-message/nile-error-message.ts +18 -0
  177. package/src/nile-error-notification/nile-error-notification.css.ts +1 -1
  178. package/src/nile-filter-chip/index.ts +1 -0
  179. package/src/nile-filter-chip/nile-filter-chip.css.ts +138 -0
  180. package/src/nile-filter-chip/nile-filter-chip.test.ts +92 -0
  181. package/src/nile-filter-chip/nile-filter-chip.ts +137 -0
  182. package/src/nile-progress-bar/nile-progress-bar.css.ts +1 -0
  183. package/src/nile-select/nile-select.ts +1 -1
  184. package/src/nile-table/nile-table.ts +2 -2
  185. package/src/nile-tooltip/nile-tooltip-utils.ts +271 -0
  186. package/src/nile-tooltip/nile-tooltip.css.ts +77 -44
  187. package/src/nile-tooltip/nile-tooltip.test.ts +168 -0
  188. package/src/nile-tooltip/nile-tooltip.ts +268 -230
  189. package/vscode-html-custom-data.json +120 -201
  190. package/dist/fixture-2b5b3aba.esm.js +0 -569
  191. package/dist/fixture-7bfb866e.cjs.js +0 -395
  192. package/dist/fixture-7bfb866e.cjs.js.map +0 -1
  193. package/dist/lit-html-39a6718c.esm.js +0 -6
  194. package/dist/lit-html-9b3af046.cjs.js +0 -6
  195. package/dist/lit-html-9b3af046.cjs.js.map +0 -1
  196. package/dist/nile-file-preview/index.cjs.js +0 -2
  197. package/dist/nile-file-preview/index.esm.js +0 -1
  198. package/dist/nile-file-preview/nile-file-preview.cjs.js +0 -2
  199. package/dist/nile-file-preview/nile-file-preview.cjs.js.map +0 -1
  200. package/dist/nile-file-preview/nile-file-preview.css.cjs.js +0 -2
  201. package/dist/nile-file-preview/nile-file-preview.css.cjs.js.map +0 -1
  202. package/dist/nile-file-preview/nile-file-preview.css.esm.js +0 -521
  203. package/dist/nile-file-preview/nile-file-preview.esm.js +0 -3
  204. package/dist/nile-file-preview/nile-file-preview.template.cjs.js +0 -2
  205. package/dist/nile-file-preview/nile-file-preview.template.cjs.js.map +0 -1
  206. package/dist/nile-file-preview/nile-file-preview.template.esm.js +0 -117
  207. package/dist/nile-file-preview/nile-file-preview.test.cjs.js +0 -2
  208. package/dist/nile-file-preview/nile-file-preview.test.cjs.js.map +0 -1
  209. package/dist/nile-file-preview/nile-file-preview.test.esm.js +0 -1
  210. package/dist/nile-file-preview/types/file-preview.enums.cjs.js +0 -2
  211. package/dist/nile-file-preview/types/file-preview.enums.cjs.js.map +0 -1
  212. package/dist/nile-file-preview/types/file-preview.enums.esm.js +0 -1
  213. package/dist/nile-file-preview/types/file-preview.interface.cjs.js +0 -2
  214. package/dist/nile-file-preview/types/file-preview.interface.cjs.js.map +0 -1
  215. package/dist/nile-file-preview/types/file-preview.interface.esm.js +0 -1
  216. package/dist/nile-file-preview/types/index.cjs.js +0 -2
  217. package/dist/nile-file-preview/types/index.cjs.js.map +0 -1
  218. package/dist/nile-file-preview/types/index.esm.js +0 -1
  219. package/dist/nile-file-preview/utils/file-preview.util.cjs.js +0 -2
  220. package/dist/nile-file-preview/utils/file-preview.util.cjs.js.map +0 -1
  221. package/dist/nile-file-preview/utils/file-preview.util.esm.js +0 -1
  222. package/dist/nile-file-preview/utils/index.cjs.js +0 -2
  223. package/dist/nile-file-preview/utils/index.cjs.js.map +0 -1
  224. package/dist/nile-file-preview/utils/index.esm.js +0 -1
  225. package/dist/nile-file-upload/index.cjs.js +0 -2
  226. package/dist/nile-file-upload/index.cjs.js.map +0 -1
  227. package/dist/nile-file-upload/index.esm.js +0 -1
  228. package/dist/nile-file-upload/nile-file-upload.cjs.js +0 -2
  229. package/dist/nile-file-upload/nile-file-upload.cjs.js.map +0 -1
  230. package/dist/nile-file-upload/nile-file-upload.css.cjs.js +0 -2
  231. package/dist/nile-file-upload/nile-file-upload.css.cjs.js.map +0 -1
  232. package/dist/nile-file-upload/nile-file-upload.css.esm.js +0 -535
  233. package/dist/nile-file-upload/nile-file-upload.esm.js +0 -3
  234. package/dist/nile-file-upload/nile-file-upload.template.cjs.js +0 -10
  235. package/dist/nile-file-upload/nile-file-upload.template.cjs.js.map +0 -1
  236. package/dist/nile-file-upload/nile-file-upload.template.esm.js +0 -155
  237. package/dist/nile-file-upload/nile-file-upload.test.cjs.js +0 -2
  238. package/dist/nile-file-upload/nile-file-upload.test.cjs.js.map +0 -1
  239. package/dist/nile-file-upload/nile-file-upload.test.esm.js +0 -1
  240. package/dist/nile-file-upload/types/file-upload.enums.cjs.js +0 -2
  241. package/dist/nile-file-upload/types/file-upload.enums.cjs.js.map +0 -1
  242. package/dist/nile-file-upload/types/file-upload.enums.esm.js +0 -1
  243. package/dist/nile-file-upload/types/file-upload.type.cjs.js +0 -2
  244. package/dist/nile-file-upload/types/file-upload.type.cjs.js.map +0 -1
  245. package/dist/nile-file-upload/types/file-upload.type.esm.js +0 -1
  246. package/dist/nile-file-upload/types/index.cjs.js +0 -2
  247. package/dist/nile-file-upload/types/index.cjs.js.map +0 -1
  248. package/dist/nile-file-upload/types/index.esm.js +0 -1
  249. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js +0 -2
  250. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js.map +0 -1
  251. package/dist/nile-file-upload/utils/drag-drop.util.esm.js +0 -1
  252. package/dist/nile-file-upload/utils/file-validation.util.cjs.js +0 -2
  253. package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +0 -1
  254. package/dist/nile-file-upload/utils/file-validation.util.esm.js +0 -1
  255. package/dist/src/nile-file-preview/index.d.ts +0 -1
  256. package/dist/src/nile-file-preview/index.js +0 -2
  257. package/dist/src/nile-file-preview/index.js.map +0 -1
  258. package/dist/src/nile-file-preview/nile-file-preview.css.js +0 -533
  259. package/dist/src/nile-file-preview/nile-file-preview.css.js.map +0 -1
  260. package/dist/src/nile-file-preview/nile-file-preview.d.ts +0 -48
  261. package/dist/src/nile-file-preview/nile-file-preview.js +0 -149
  262. package/dist/src/nile-file-preview/nile-file-preview.js.map +0 -1
  263. package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +0 -11
  264. package/dist/src/nile-file-preview/nile-file-preview.template.js +0 -144
  265. package/dist/src/nile-file-preview/nile-file-preview.template.js.map +0 -1
  266. package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +0 -7
  267. package/dist/src/nile-file-preview/nile-file-preview.test.js +0 -30
  268. package/dist/src/nile-file-preview/nile-file-preview.test.js.map +0 -1
  269. package/dist/src/nile-file-preview/types/file-preview.enums.d.ts +0 -23
  270. package/dist/src/nile-file-preview/types/file-preview.enums.js +0 -28
  271. package/dist/src/nile-file-preview/types/file-preview.enums.js.map +0 -1
  272. package/dist/src/nile-file-preview/types/file-preview.interface.d.ts +0 -4
  273. package/dist/src/nile-file-preview/types/file-preview.interface.js +0 -2
  274. package/dist/src/nile-file-preview/types/file-preview.interface.js.map +0 -1
  275. package/dist/src/nile-file-preview/types/index.d.ts +0 -2
  276. package/dist/src/nile-file-preview/types/index.js +0 -3
  277. package/dist/src/nile-file-preview/types/index.js.map +0 -1
  278. package/dist/src/nile-file-preview/utils/file-preview.util.d.ts +0 -3
  279. package/dist/src/nile-file-preview/utils/file-preview.util.js +0 -29
  280. package/dist/src/nile-file-preview/utils/file-preview.util.js.map +0 -1
  281. package/dist/src/nile-file-preview/utils/index.d.ts +0 -1
  282. package/dist/src/nile-file-preview/utils/index.js +0 -2
  283. package/dist/src/nile-file-preview/utils/index.js.map +0 -1
  284. package/dist/src/nile-file-upload/index.d.ts +0 -1
  285. package/dist/src/nile-file-upload/index.js +0 -2
  286. package/dist/src/nile-file-upload/nile-file-upload.css.d.ts +0 -12
  287. package/dist/src/nile-file-upload/nile-file-upload.css.js +0 -547
  288. package/dist/src/nile-file-upload/nile-file-upload.css.js.map +0 -1
  289. package/dist/src/nile-file-upload/nile-file-upload.d.ts +0 -45
  290. package/dist/src/nile-file-upload/nile-file-upload.js +0 -148
  291. package/dist/src/nile-file-upload/nile-file-upload.js.map +0 -1
  292. package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +0 -11
  293. package/dist/src/nile-file-upload/nile-file-upload.template.js +0 -163
  294. package/dist/src/nile-file-upload/nile-file-upload.template.js.map +0 -1
  295. package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +0 -7
  296. package/dist/src/nile-file-upload/nile-file-upload.test.js +0 -30
  297. package/dist/src/nile-file-upload/nile-file-upload.test.js.map +0 -1
  298. package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +0 -28
  299. package/dist/src/nile-file-upload/types/file-upload.enums.js +0 -35
  300. package/dist/src/nile-file-upload/types/file-upload.enums.js.map +0 -1
  301. package/dist/src/nile-file-upload/types/file-upload.type.d.ts +0 -4
  302. package/dist/src/nile-file-upload/types/file-upload.type.js +0 -2
  303. package/dist/src/nile-file-upload/types/file-upload.type.js.map +0 -1
  304. package/dist/src/nile-file-upload/types/index.d.ts +0 -2
  305. package/dist/src/nile-file-upload/types/index.js +0 -3
  306. package/dist/src/nile-file-upload/types/index.js.map +0 -1
  307. package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +0 -19
  308. package/dist/src/nile-file-upload/utils/drag-drop.util.js +0 -77
  309. package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +0 -1
  310. package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +0 -9
  311. package/dist/src/nile-file-upload/utils/file-validation.util.js +0 -58
  312. package/dist/src/nile-file-upload/utils/file-validation.util.js.map +0 -1
  313. package/src/nile-file-preview/index.ts +0 -1
  314. package/src/nile-file-preview/nile-file-preview.css.ts +0 -535
  315. package/src/nile-file-preview/nile-file-preview.template.ts +0 -174
  316. package/src/nile-file-preview/nile-file-preview.ts +0 -146
  317. package/src/nile-file-preview/types/file-preview.enums.ts +0 -26
  318. package/src/nile-file-preview/types/file-preview.interface.ts +0 -4
  319. package/src/nile-file-preview/types/index.ts +0 -2
  320. package/src/nile-file-preview/utils/file-preview.util.ts +0 -34
  321. package/src/nile-file-preview/utils/index.ts +0 -1
  322. package/src/nile-file-upload/index.ts +0 -1
  323. package/src/nile-file-upload/nile-file-upload.css.ts +0 -549
  324. package/src/nile-file-upload/nile-file-upload.template.ts +0 -194
  325. package/src/nile-file-upload/nile-file-upload.test.ts +0 -38
  326. package/src/nile-file-upload/nile-file-upload.ts +0 -138
  327. package/src/nile-file-upload/types/file-upload.enums.ts +0 -32
  328. package/src/nile-file-upload/types/file-upload.type.ts +0 -5
  329. package/src/nile-file-upload/types/index.ts +0 -2
  330. package/src/nile-file-upload/utils/drag-drop.util.ts +0 -95
  331. package/src/nile-file-upload/utils/file-validation.util.ts +0 -80
  332. /package/dist/{nile-file-preview → nile-filter-chip}/index.cjs.js.map +0 -0
@@ -1,155 +0,0 @@
1
- import{html as i}from"lit";import"./nile-file-upload.css.esm.js";import{T as e}from"../lit-html-39a6718c.esm.js";
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */const n=1;class t{constructor(i){}get _$AU(){return this._$AM._$AU}_$AT(i,e,n){this._$Ct=i,this._$AM=e,this._$Ci=n}_$AS(i,e){return this.update(i,e)}update(i,e){return this.render(...e)}}
7
- /**
8
- * @license
9
- * Copyright 2018 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */const l=(i=>(...e)=>({_$litDirective$:i,values:e}))(class extends t{constructor(i){if(super(i),i.type!==n||"class"!==i.name||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[n]){if(void 0===this.st){this.st=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((i=>""!==i))));for(const i in n)n[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(n)}const t=i.element.classList;for(const i of this.st)i in n||(t.remove(i),this.st.delete(i));for(const i in n){const e=!!n[i];e===this.st.has(i)||this.nt?.has(i)||(e?(t.add(i),this.st.add(i)):(t.remove(i),this.st.delete(i)))}return e}});let s;const o=i=>{s=i},a=(e,n,t,o,a)=>i`
12
- <div>
13
- <div class=${l({"hover-border":"hover"===a,"horizontal-div":!0})}>
14
- <div class="inner-div">
15
- <slot name="icon">
16
- <nile-icon name="upload" size="24"></nile-icon>
17
- </slot>
18
- <div class="content">
19
- <slot name="title">
20
- <h4>${n}</h4>
21
- </slot>
22
- <slot name="subtitle">
23
- <p>${t}</p>
24
- </slot>
25
- </div>
26
- </div>
27
- <input
28
- type="file"
29
- @change=${i=>s.handleFiles(i)}
30
- multiple
31
- />
32
- <nile-button @click=${e} variant="tertiary">
33
- Browse File
34
- </nile-button>
35
- </div>
36
- ${o?i`<div class="upload-error">
37
- <nile-icon name="warning" size="12" color="red"></nile-icon>
38
- <span>${o}</span>
39
- </div>`:i``}
40
- </div>
41
- `,r=(e,n,t)=>i`
42
- <div
43
- class="horizontal-div disabled"
44
- >
45
- <div class="inner-div">
46
- <slot name="icon">
47
- <nile-icon name="upload" size="24"></nile-icon>
48
- </slot>
49
- <div class="content">
50
- <slot name="title">
51
- <h4>${n}</h4>
52
- </slot>
53
- <slot name="subtitle">
54
- <p>${t}</p>
55
- </slot>
56
- </div>
57
- </div>
58
- <input
59
- type="file"
60
- @change=${i=>s.handleFiles(i)}
61
- multiple
62
- />
63
- <nile-button @click=${e} variant="tertiary">
64
- Browse File
65
- </nile-button>
66
- </div>
67
- `,c=()=>i`
68
- <div class="horizontal-div dragging">
69
- <div class="icons-container">
70
- <nile-icon
71
- color="var(--nile-colors-blue-500)"
72
- name="general"
73
- size="20"
74
- class="general-icon"
75
- ></nile-icon>
76
- <nile-icon
77
- color="var(--nile-colors-blue-500)"
78
- name="image"
79
- size="24"
80
- class="image-icon"
81
- ></nile-icon>
82
- </div>
83
- <p>Drop files here to upload</p>
84
- </div>
85
- `,d=(e,n,t,o,a)=>i`
86
- <div>
87
- <div class=${l({"hover-border":"hover"===a,"vertical-div":!0})}>
88
- <slot name="icon">
89
- <nile-icon name="upload" size="24"></nile-icon>
90
- </slot>
91
- <div class="content-container">
92
- <slot name="title">
93
- <h4>${n}</h4>
94
- </slot>
95
- <slot name="title">
96
- <p>${t}</p>
97
- </slot>
98
- </div>
99
- <input
100
- type="file"
101
- @change=${i=>s.handleFiles(i)}
102
- multiple
103
- />
104
- <nile-button @click=${e} variant="tertiary">
105
- Browse File
106
- </nile-button>
107
- </div>
108
- ${o?i`<div class="upload-error">
109
- <nile-icon name="warning" size="12" color="red"></nile-icon>
110
- <span>${o}</span>
111
- </div>`:i``}
112
- </div>
113
- `,v=(e,n,t)=>i`
114
- <div
115
- class="vertical-deafult vertical-div disable"
116
- >
117
- <slot name="icon">
118
- <nile-icon name="upload" size="24"></nile-icon>
119
- </slot>
120
- <div class="content-container">
121
- <slot name="title">
122
- <h4>${n}</h4>
123
- </slot>
124
- <slot name="title">
125
- <p>${t}o</p>
126
- </slot>
127
- </div>
128
- <input
129
- type="file"
130
- @change=${i=>s.handleFiles(i)}
131
- multiple
132
- />
133
- <nile-button @click=${e} variant="tertiary">
134
- Browse File
135
- </nile-button>
136
- </div>
137
- `,p=()=>i`
138
- <div class="vertical-div vertical-drag">
139
- <div class="icons-container">
140
- <nile-icon
141
- color="var(--nile-colors-blue-500)"
142
- name="general"
143
- size="20"
144
- class="general-icon"
145
- ></nile-icon>
146
- <nile-icon
147
- color="var(--nile-colors-blue-500)"
148
- name="image"
149
- size="24"
150
- class="image-icon"
151
- ></nile-icon>
152
- </div>
153
- <p>Drop files here to upload</p>
154
- </div>
155
- `;export{a,c as b,r as c,d,p as e,v as f,o as g};
@@ -1,2 +0,0 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-948ae33c.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-file-upload.cjs.js","tslib","./nile-file-upload.css.cjs.js","../internal/nile-element.cjs.js","./utils/drag-drop.util.cjs.js","./types/file-upload.enums.cjs.js","./nile-file-upload.template.cjs.js","../lit-html-9b3af046.cjs.js","lit/decorators.js","./utils/file-validation.util.cjs.js"],function(_export,_context){"use strict";var t,i,e,l,_templateObject,_templateObject2;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture002CjsJs){t=_fixture002CjsJs.f;i=_fixture002CjsJs.a;e=_fixture002CjsJs.h;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFileUploadCjsJs){},function(_tslib){},function(_nileFileUploadCssCjsJs){},function(_internalNileElementCjsJs){},function(_utilsDragDropUtilCjsJs){},function(_typesFileUploadEnumsCjsJs){},function(_nileFileUploadTemplateCjsJs){},function(_litHtml001CjsJs){},function(_litDecoratorsJs){},function(_utilsFileValidationUtilCjsJs){}],execute:function execute(){describe("<nile-file-upload>",function(){var s;beforeEach(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-file-upload></nile-file-upload>"]))));case 2:s=_context2.sent;case 3:case"end":return _context2.stop();}},_callee);}))),it("passes accessibility test",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return i(s).to.be.accessible();case 2:case"end":return _context3.stop();}},_callee2);}))),it("renders with the correct tag name",function(){i(s.tagName.toLowerCase()).to.equal("nile-file-upload");}),it("renders with slot content when provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _r$0$textContent;var o,a,r;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:o="Test Content";_context4.next=3;return t(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-file-upload>","</nile-file-upload>"])),o));case 3:s=_context4.sent;a=s.shadowRoot.querySelector("slot");e.exists(a,"Slot should exist");r=a.assignedNodes({flatten:!0});i(r.length).to.be.greaterThan(0),i((_r$0$textContent=r[0].textContent)===null||_r$0$textContent===void 0?void 0:_r$0$textContent.trim()).to.equal(o);case 8:case"end":return _context4.stop();}},_callee3);})));});}};});
2
- //# sourceMappingURL=nile-file-upload.test.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nile-file-upload.test.cjs.js","sources":["../../../src/nile-file-upload/nile-file-upload.test.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\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\n \nimport { fixture, assert, expect, html } from '@open-wc/testing';\nimport './nile-file-upload'; // Just import to register the element\n\ndescribe('<nile-file-upload>', () => {\n let element: HTMLElement;\n\n beforeEach(async () => {\n element = await fixture(html`<nile-file-upload></nile-file-upload>`);\n });\n\n it('passes accessibility test', async () => {\n await expect(element).to.be.accessible();\n });\n\n it('renders with the correct tag name', () => {\n expect(element.tagName.toLowerCase()).to.equal('nile-file-upload');\n });\n\n it('renders with slot content when provided', async () => {\n const testContent = 'Test Content';\n element = await fixture(html`<nile-file-upload>${testContent}</nile-file-upload>`);\n \n const slot = (element.shadowRoot!.querySelector('slot') as HTMLSlotElement);\n assert.exists(slot, 'Slot should exist');\n\n const assignedNodes = slot.assignedNodes({ flatten: true });\n expect(assignedNodes.length).to.be.greaterThan(0);\n expect(assignedNodes[0].textContent?.trim()).to.equal(testContent);\n });\n});"],"names":["describe","element","beforeEach","async","fixture","html","_templateObject","_taggedTemplateLiteral","it","expect","to","be","accessible","_context3","stop","_callee2","tagName","toLowerCase","equal","_asyncToGenerator","_regeneratorRuntime","mark","testContent","_templateObject2","slot","shadowRoot","querySelector","assert","exists","assignedNodes","flatten","length","greaterThan","textContent","trim","_context4","_callee3"],"mappings":"4iTAWAA,SAAS,oBAAsB,CAAA,UAAA,CAC7B,GAAIC,CAAAA,CAEJC,CAAAA,UAAAA,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAWC,SAAAA,QAAAA,SAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACOC,CAAAA,CAAAA,CAAQC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,6CAAwC,CAAA,QAApEN,CAAgBG,CAAAA,SAAAA,CAAAA,IAAAA,yBAAAA,SAAAA,CAAAA,IAAAA,MAAAA,OAAAA,GAAoD,EAAA,CAAA,CAGtEI,GAAG,2BAA6BL,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,SAAAA,SAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACxBM,CAAAA,EAAOR,CAASS,CAAAA,CAAAA,EAAAA,CAAGC,GAAGC,UAAY,CAAA,CAAA,yBAAAC,SAAA,CAAAC,IAAA,MAAAC,QAAA,GAAA,EAAA,CAAA,CAG1CP,GAAG,mCAAqC,CAAA,UAAA,CACtCC,CAAOR,CAAAA,CAAAA,CAAQe,OAAQC,CAAAA,WAAAA,CAAAA,CAAAA,CAAAA,CAAeP,GAAGQ,KAAM,CAAA,kBAAA,CAAmB,IAGpEV,EAAG,CAAA,yCAAA,cAAAW,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,CAA2ClB,SAAAA,SAAAA,MAAAA,gBAAAA,KAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SACtCmB,CAAAA,CAAc,sCACJlB,CAAAA,CAAAA,CAAQC,CAAI,CAAAkB,gBAAA,GAAAA,gBAAA,CAAAhB,sBAAA,gDAAqBe,CAAAA,CAAAA,CAAAA,QAAjDrB,CAAgBG,CAAAA,SAAAA,CAAAA,IAAAA,CAEVoB,CAAQvB,CAAAA,CAAAA,CAAQwB,WAAYC,aAAc,CAAA,MAAA,CAAA,CAChDC,EAAOC,MAAOJ,CAAAA,CAAAA,CAAM,qBAEdK,CAAAA,CAAgBL,EAAKK,aAAc,CAAA,CAAEC,SAAS,CACpDrB,CAAAA,CAAAA,CAAAA,CAAAA,CAAOoB,EAAcE,MAAQrB,CAAAA,CAAAA,EAAAA,CAAGC,GAAGqB,WAAY,CAAA,CAAA,CAAA,CAC/CvB,oBAAOoB,CAAc,CAAA,CAAA,CAAA,CAAGI,sDAAjBJ,gBAAAA,CAA8BK,IAAQxB,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAGQ,KAAMI,CAAAA,CAAAA,CAAY,yBAAAa,SAAA,CAAArB,IAAA,MAAAsB,QAAA,GAClE,EAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- import{f as t,a as i,h as e}from"../fixture-76051ef1.esm.js";import{html as l}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-file-upload.esm.js";import"tslib";import"./nile-file-upload.css.esm.js";import"../internal/nile-element.esm.js";import"./utils/drag-drop.util.esm.js";import"./types/file-upload.enums.esm.js";import"./nile-file-upload.template.esm.js";import"../lit-html-39a6718c.esm.js";import"lit/decorators.js";import"./utils/file-validation.util.esm.js";describe("<nile-file-upload>",(()=>{let s;beforeEach((async()=>{s=await t(l`<nile-file-upload></nile-file-upload>`)})),it("passes accessibility test",(async()=>{await i(s).to.be.accessible()})),it("renders with the correct tag name",(()=>{i(s.tagName.toLowerCase()).to.equal("nile-file-upload")})),it("renders with slot content when provided",(async()=>{const o="Test Content";s=await t(l`<nile-file-upload>${o}</nile-file-upload>`);const a=s.shadowRoot.querySelector("slot");e.exists(a,"Slot should exist");const r=a.assignedNodes({flatten:!0});i(r.length).to.be.greaterThan(0),i(r[0].textContent?.trim()).to.equal(o)}))}));
@@ -1,2 +0,0 @@
1
- System.register([],function(_export,_context){"use strict";var e,i,l,a,o;_export({F:void 0,c:void 0,a:void 0,d:void 0,b:void 0});return{setters:[],execute:function execute(){!function(e){e.DEFAULT="default",e.DISABLED="disabled",e.HOVER="hover",e.DRAG="drag";}(e||_export("F",e={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical";}(i||_export("c",i={})),function(e){e.INVALID_FORMAT="Invalid file format! Upload valid file.",e.SIZE_LIMIT="File exceeds size limit! Upload smaller size.",e.MULTIPLE_NOT_ALLOWED="Please Upload Single File!",e.DUPLICATES_NOT_ALLOWED="Duplicate Files Are Not Allowed!";}(l||_export("a",l={})),function(e){e.NILE_INIT="nile-init",e.NILE_BROWSE="nile-browse",e.NILE_DRAG="nile-drag",e.NILE_CHANGE="nile-change",e.NILE_DESTROY="nile-destroy";}(a||_export("d",a={})),function(e){e.TITLE="Drag and drop to upload",e.SUBTITLE="PNG, JPG or SVG (upto 1MB) | 1:1 ratio",e.ERROR_MESSAGE="Invalid File Format.";}(o||_export("b",o={}));}};});
2
- //# sourceMappingURL=file-upload.enums.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-upload.enums.cjs.js","sources":["../../../../src/nile-file-upload/types/file-upload.enums.ts"],"sourcesContent":["export enum FileUploadState {\n DEFAULT = 'default',\n DISABLED = 'disabled',\n HOVER = 'hover',\n DRAG = 'drag'\n}\n\nexport enum FileUploadVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical'\n}\n\nexport enum FileUploadError {\n INVALID_FORMAT = \"Invalid file format! Upload valid file.\",\n SIZE_LIMIT = \"File exceeds size limit! Upload smaller size.\",\n MULTIPLE_NOT_ALLOWED = \"Please Upload Single File!\",\n DUPLICATES_NOT_ALLOWED = \"Duplicate Files Are Not Allowed!\"\n}\n\nexport enum FileUploadEvent {\n NILE_INIT = \"nile-init\",\n NILE_BROWSE = \"nile-browse\",\n NILE_DRAG = \"nile-drag\",\n NILE_CHANGE = \"nile-change\",\n NILE_DESTROY = \"nile-destroy\"\n}\n\nexport enum FileUploadDefaults {\n TITLE = 'Drag and drop to upload',\n SUBTITLE = 'PNG, JPG or SVG (upto 1MB) | 1:1 ratio',\n ERROR_MESSAGE = 'Invalid File Format.',\n};"],"names":["FileUploadState","DEFAULT","DISABLED","HOVER","DRAG","FileUploadVariant","HORIZONTAL","VERTICAL","FileUploadError","INVALID_FORMAT","SIZE_LIMIT","MULTIPLE_NOT_ALLOWED","DUPLICATES_NOT_ALLOWED","FileUploadEvent","NILE_INIT","NILE_BROWSE","NILE_DRAG","NILE_CHANGE","NILE_DESTROY","FileUploadDefaults","TITLE","SUBTITLE","ERROR_MESSAGE"],"mappings":"+KAAA,SAAYA,CAAAA,CAAAA,CACVA,CAAA,CAAAC,OAAA,CAAA,SACAD,CAAAA,CAAAA,CAAAE,SAAA,UACAF,CAAAA,CAAAA,CAAAG,MAAA,OACAH,CAAAA,CAAAA,CAAAI,KAAA,MACD,EALD,CAAYJ,CAAAA,EAAAA,OAAAA,KAAAA,CAKX,CAAA,CAAA,IAED,SAAYK,CAAAA,CAAAA,CACVA,EAAAC,UAAA,CAAA,YAAA,CACAD,EAAAE,QAAA,CAAA,UACD,EAHD,CAAYF,CAAAA,EAAAA,OAAAA,KAAAA,CAAAA,CAGX,CAAA,CAED,CAAA,CAAA,CAAA,SAAYG,CACVA,CAAAA,CAAAA,CAAAA,CAAAC,cAAA,CAAA,yCAAA,CACAD,EAAAE,UAAA,CAAA,+CAAA,CACAF,CAAA,CAAAG,oBAAA,CAAA,4BACAH,CAAAA,CAAAA,CAAAI,uBAAA,kCACD,EALD,CAAYJ,CAAAA,EAAAA,OAAAA,KAAAA,CAAAA,CAKX,CAAA,CAED,CAAA,CAAA,CAAA,SAAYK,CACVA,CAAAA,CAAAA,CAAAA,CAAAC,SAAA,CAAA,WAAA,CACAD,EAAAE,WAAA,CAAA,aAAA,CACAF,EAAAG,SAAA,CAAA,WAAA,CACAH,EAAAI,WAAA,CAAA,aAAA,CACAJ,CAAA,CAAAK,YAAA,CAAA,cACD,EAND,CAAYL,CAAAA,EAAAA,OAAAA,KAAAA,CAAAA,CAMX,CAAA,CAED,CAAA,CAAA,CAAA,SAAYM,GACVA,CAAA,CAAAC,KAAA,CAAA,yBACAD,CAAAA,CAAAA,CAAAE,QAAA,CAAA,wCAAA,CACAF,EAAAG,aAAA,CAAA,sBACD,EAJD,CAAYH,CAAAA,EAAAA,OAAAA,KAAAA,CAAAA,CAIX,CAAA"}
@@ -1 +0,0 @@
1
- var e,i,l,a,o;!function(e){e.DEFAULT="default",e.DISABLED="disabled",e.HOVER="hover",e.DRAG="drag"}(e||(e={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(i||(i={})),function(e){e.INVALID_FORMAT="Invalid file format! Upload valid file.",e.SIZE_LIMIT="File exceeds size limit! Upload smaller size.",e.MULTIPLE_NOT_ALLOWED="Please Upload Single File!",e.DUPLICATES_NOT_ALLOWED="Duplicate Files Are Not Allowed!"}(l||(l={})),function(e){e.NILE_INIT="nile-init",e.NILE_BROWSE="nile-browse",e.NILE_DRAG="nile-drag",e.NILE_CHANGE="nile-change",e.NILE_DESTROY="nile-destroy"}(a||(a={})),function(e){e.TITLE="Drag and drop to upload",e.SUBTITLE="PNG, JPG or SVG (upto 1MB) | 1:1 ratio",e.ERROR_MESSAGE="Invalid File Format."}(o||(o={}));export{e as F,l as a,o as b,i as c,a as d};
@@ -1,2 +0,0 @@
1
- System.register([],function(_export,_context){"use strict";return{setters:[],execute:function execute(){}};});
2
- //# sourceMappingURL=file-upload.type.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-upload.type.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- System.register(["./file-upload.enums.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_fileUploadEnumsCjsJs){_export({FileUploadDefaults:_fileUploadEnumsCjsJs.b,FileUploadError:_fileUploadEnumsCjsJs.a,FileUploadEvent:_fileUploadEnumsCjsJs.d,FileUploadState:_fileUploadEnumsCjsJs.F,FileUploadVariant:_fileUploadEnumsCjsJs.c});}],execute:function execute(){}};});
2
- //# sourceMappingURL=index.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export{b as FileUploadDefaults,a as FileUploadError,d as FileUploadEvent,F as FileUploadState,c as FileUploadVariant}from"./file-upload.enums.esm.js";
@@ -1,2 +0,0 @@
1
- System.register(["../types/file-upload.enums.cjs.js"],function(_export,_context){"use strict";var t,s;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_typesFileUploadEnumsCjsJs){t=_typesFileUploadEnumsCjsJs.F;}],execute:function execute(){_export("D",s=/*#__PURE__*/function(){function s(){_classCallCheck(this,s);this.currentState=t.DEFAULT;}return _createClass(s,[{key:"updateState",value:function updateState(t){this.currentState=t;}},{key:"onFileDrop",value:function onFileDrop(t){this.fileDropCallback=t;}},{key:"onStateChange",value:function onStateChange(t){this.stateChangeCallback=t;}},{key:"setState",value:function setState(_s){var _this$stateChangeCall;this.currentState!==t.DISABLED&&(this.currentState=_s,(_this$stateChangeCall=this.stateChangeCallback)===null||_this$stateChangeCall===void 0?void 0:_this$stateChangeCall.call(this,_s));}},{key:"dragEnter",value:function dragEnter(_s2){this.currentState!==t.DISABLED&&(_s2.preventDefault(),this.setState(t.DRAG));}},{key:"dragLeave",value:function dragLeave(_s3){this.currentState!==t.DISABLED&&(_s3.preventDefault(),this.setState(t.DEFAULT));}},{key:"dragOver",value:function dragOver(_s4){this.currentState!==t.DISABLED&&_s4.preventDefault();}},{key:"drop",value:function drop(_s5){this.currentState!==t.DISABLED&&(_s5.preventDefault(),_s5.stopPropagation(),this.setState(t.DEFAULT),this.handleFiles(_s5));}},{key:"handleDocumentDrop",value:function handleDocumentDrop(_s6){this.currentState!==t.DISABLED&&(_s6.preventDefault(),_s6.stopPropagation(),this.setState(t.DEFAULT));}},{key:"preventDragOver",value:function preventDragOver(t){t.preventDefault();}},{key:"preventDrop",value:function preventDrop(t){t.preventDefault(),t.stopPropagation();}},{key:"handleFiles",value:function handleFiles(_s7){var _s7$preventDefault;if(this.currentState===t.DISABLED)return;(_s7$preventDefault=_s7.preventDefault)===null||_s7$preventDefault===void 0||_s7$preventDefault.call(_s7);var e=null;if("dataTransfer"in _s7&&_s7.dataTransfer&&(e=_s7.dataTransfer.files),!e&&_s7.target instanceof HTMLInputElement&&(e=_s7.target.files),e&&e.length>0){var _this$fileDropCallbac;var _t=Array.from(e);(_this$fileDropCallbac=this.fileDropCallback)===null||_this$fileDropCallbac===void 0||_this$fileDropCallbac.call(this,_t);}}}]);}());}};});
2
- //# sourceMappingURL=drag-drop.util.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drag-drop.util.cjs.js","sources":["../../../../src/nile-file-upload/utils/drag-drop.util.ts"],"sourcesContent":["import { FileUploadState } from \"../types\";\n\nexport class DragHandler {\n private currentState: FileUploadState = FileUploadState.DEFAULT;\n\n private stateChangeCallback?: (state: FileUploadState) => void;\n private fileDropCallback?: (files: File[]) => void;\n\n constructor() {}\n\n public updateState(state: FileUploadState): void {\n this.currentState = state;\n }\n\n public onFileDrop(callback: (files: File[]) => void): void {\n this.fileDropCallback = callback;\n }\n\n public onStateChange(callback: (state: FileUploadState) => void): void {\n this.stateChangeCallback = callback;\n }\n\n private setState(state: FileUploadState): void {\n if (this.currentState === FileUploadState.DISABLED) return;\n\n this.currentState = state;\n this.stateChangeCallback?.(state);\n }\n\n public dragEnter(e: DragEvent): void {\n if (this.currentState === FileUploadState.DISABLED) return;\n\n e.preventDefault();\n this.setState(FileUploadState.DRAG);\n }\n\n public dragLeave(e: DragEvent): void {\n if (this.currentState === FileUploadState.DISABLED) return;\n\n e.preventDefault();\n this.setState(FileUploadState.DEFAULT);\n }\n\n public dragOver(e: DragEvent): void {\n if (this.currentState === FileUploadState.DISABLED) return;\n\n e.preventDefault();\n }\n\n public drop(e: DragEvent): void {\n if (this.currentState === FileUploadState.DISABLED) return;\n\n e.preventDefault();\n e.stopPropagation();\n this.setState(FileUploadState.DEFAULT);\n this.handleFiles(e);\n }\n\n public handleDocumentDrop(e: DragEvent): void {\n if (this.currentState === FileUploadState.DISABLED) return;\n\n e.preventDefault();\n e.stopPropagation();\n this.setState(FileUploadState.DEFAULT);\n }\n\n public preventDragOver(e: DragEvent): void {\n e.preventDefault();\n }\n\n public preventDrop(e: DragEvent): void {\n e.preventDefault();\n e.stopPropagation();\n }\n\n public handleFiles(event: Event | DragEvent): void {\n if (this.currentState === FileUploadState.DISABLED) return;\n\n event.preventDefault?.();\n let files: FileList | null = null;\n\n if ('dataTransfer' in event && event.dataTransfer) {\n files = event.dataTransfer.files;\n }\n\n if (!files && event.target instanceof HTMLInputElement) {\n files = event.target.files;\n }\n\n if (files && files.length > 0) {\n const newFiles = Array.from(files);\n this.fileDropCallback?.(newFiles);\n }\n }\n}\n"],"names":["DragHandler","s","this","currentState","FileUploadState","DEFAULT","_createClass","key","value","updateState","state","onFileDrop","callback","fileDropCallback","onStateChange","stateChangeCallback","setState","DISABLED","dragEnter","e","preventDefault","DRAG","dragLeave","dragOver","drop","stopPropagation","handleFiles","handleDocumentDrop","preventDragOver","preventDrop","event","_s7$preventDefault","files","dataTransfer","target","HTMLInputElement","length","_this$fileDropCallbac","newFiles","Array","from"],"mappings":"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"}
@@ -1 +0,0 @@
1
- import{F as t}from"../types/file-upload.enums.esm.js";class s{constructor(){this.currentState=t.DEFAULT}updateState(t){this.currentState=t}onFileDrop(t){this.fileDropCallback=t}onStateChange(t){this.stateChangeCallback=t}setState(s){this.currentState!==t.DISABLED&&(this.currentState=s,this.stateChangeCallback?.(s))}dragEnter(s){this.currentState!==t.DISABLED&&(s.preventDefault(),this.setState(t.DRAG))}dragLeave(s){this.currentState!==t.DISABLED&&(s.preventDefault(),this.setState(t.DEFAULT))}dragOver(s){this.currentState!==t.DISABLED&&s.preventDefault()}drop(s){this.currentState!==t.DISABLED&&(s.preventDefault(),s.stopPropagation(),this.setState(t.DEFAULT),this.handleFiles(s))}handleDocumentDrop(s){this.currentState!==t.DISABLED&&(s.preventDefault(),s.stopPropagation(),this.setState(t.DEFAULT))}preventDragOver(t){t.preventDefault()}preventDrop(t){t.preventDefault(),t.stopPropagation()}handleFiles(s){if(this.currentState===t.DISABLED)return;s.preventDefault?.();let e=null;if("dataTransfer"in s&&s.dataTransfer&&(e=s.dataTransfer.files),!e&&s.target instanceof HTMLInputElement&&(e=s.target.files),e&&e.length>0){const t=Array.from(e);this.fileDropCallback?.(t)}}}export{s as D};
@@ -1,2 +0,0 @@
1
- System.register(["../types/file-upload.enums.cjs.js"],function(_export,_context){"use strict";var e,r,a,o,s;function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}return{setters:[function(_typesFileUploadEnumsCjsJs){e=_typesFileUploadEnumsCjsJs.a;r=_typesFileUploadEnumsCjsJs.F;}],execute:function execute(){_export("s",a=function a(r,_a){_a.onStateChange(function(e){r.state=e;}),_a.onFileDrop(function(a){if(!r.allowMultiple){if(r.uploadedFiles.length+a.length>1)return r.errorMessage=e.MULTIPLE_NOT_ALLOWED,void r.requestUpdate();}if(!r.allowDuplicates){var _o=function(e,r){return e.some(function(e){return r.some(function(r){return e.name===r.name&&e.size===r.size&&e.lastModified===r.lastModified;});});}(a,r.uploadedFiles);if(_o)return r.errorMessage=e.DUPLICATES_NOT_ALLOWED,void r.requestUpdate();}r.uploadedFiles=[].concat(_toConsumableArray(r.uploadedFiles),_toConsumableArray(a)),r.requestUpdate();});}),_export("b",o=function o(e){document.addEventListener("dragover",e.preventDragOver,{passive:!1}),document.addEventListener("drop",e.preventDrop,{passive:!1});}),_export("a",s=function s(e,a){e.addEventListener("mouseenter",function(a){return o=e.setState,void(e.state===r.DEFAULT&&o(r.HOVER));var o;}),e.addEventListener("mouseleave",function(a){return o=e.setState,void(e.state===r.HOVER&&o(r.DEFAULT));var o;}),e.addEventListener("dragenter",function(e){return a.dragEnter(e);}),e.addEventListener("dragleave",function(e){return a.dragLeave(e);}),e.addEventListener("dragover",function(e){return a.dragOver(e);}),e.addEventListener("drop",function(e){return a.drop(e);});});}};});
2
- //# sourceMappingURL=file-validation.util.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-validation.util.cjs.js","sources":["../../../../src/nile-file-upload/utils/file-validation.util.ts"],"sourcesContent":["import { DragHandler } from \"./drag-drop.util\";\nimport { FileUploadState, FileUploadError } from \"../types\";\nimport { NileFileUpload } from \"../nile-file-upload\";\n\n// to check the duplicate files\nexport const areDuplicates = (files: File[], uploadedFiles: File[]): boolean => {\n return files.some(file =>\n uploadedFiles.some(existing =>\n file.name === existing.name &&\n file.size === existing.size &&\n file.lastModified === existing.lastModified\n )\n );\n};\n\n// set up the drag handler\nexport const setUpDragHandler = (\n nileFileUpload: NileFileUpload,\n dragHandler: DragHandler\n): void => {\n dragHandler.onStateChange((newState: FileUploadState) => {\n nileFileUpload.state = newState;\n });\n\n dragHandler.onFileDrop((files: File[]) => {\n if (!nileFileUpload.allowMultiple) {\n const total = nileFileUpload.uploadedFiles.length + files.length;\n if (total > 1) {\n nileFileUpload.errorMessage = FileUploadError.MULTIPLE_NOT_ALLOWED;\n nileFileUpload.requestUpdate();\n return;\n }\n }\n\n if (!nileFileUpload.allowDuplicates) {\n const duplicates = areDuplicates(files, nileFileUpload.uploadedFiles);\n if (duplicates) {\n nileFileUpload.errorMessage = FileUploadError.DUPLICATES_NOT_ALLOWED;\n nileFileUpload.requestUpdate();\n return;\n }\n }\n nileFileUpload.uploadedFiles = [...nileFileUpload.uploadedFiles, ...files];\n nileFileUpload.requestUpdate();\n });\n};\n\n// global listenrers\nexport const addGlobalListeners = (dragHandler: DragHandler): void => {\n document.addEventListener('dragover', dragHandler.preventDragOver, { passive: false });\n document.addEventListener('drop', dragHandler.preventDrop, { passive: false });\n}\n\n// for hover & dragging functionality\nexport const addInternalListeners = (nileFileUpload: NileFileUpload, dragHandler: DragHandler): void => {\n nileFileUpload.addEventListener('mouseenter', (e) => handleHoverIn(nileFileUpload.setState, nileFileUpload.state));\n nileFileUpload.addEventListener('mouseleave', (e) => handleHoverOut(nileFileUpload.setState, nileFileUpload.state));\n nileFileUpload.addEventListener('dragenter', (e) => dragHandler.dragEnter(e));\n nileFileUpload.addEventListener('dragleave', (e) => dragHandler.dragLeave(e));\n nileFileUpload.addEventListener('dragover', (e) => dragHandler.dragOver(e));\n nileFileUpload.addEventListener('drop', (e) => dragHandler.drop(e));\n}\n\nexport function handleHoverIn(\n setState: (state: FileUploadState) => void,\n currentState: FileUploadState\n): void {\n if (currentState === FileUploadState.DEFAULT) {\n setState(FileUploadState.HOVER);\n }\n}\n\nexport function handleHoverOut(\n setState: (state: FileUploadState) => void,\n currentState: FileUploadState\n): void {\n if (currentState === FileUploadState.HOVER) {\n setState(FileUploadState.DEFAULT);\n }\n}"],"names":["setUpDragHandler","nileFileUpload","dragHandler","onStateChange","newState","state","onFileDrop","files","allowMultiple","uploadedFiles","length","errorMessage","FileUploadError","MULTIPLE_NOT_ALLOWED","requestUpdate","allowDuplicates","duplicates","some","file","existing","name","size","lastModified","DUPLICATES_NOT_ALLOWED","addGlobalListeners","document","addEventListener","preventDragOver","passive","preventDrop","addInternalListeners","e","handleHoverIn","setState","FileUploadState","DEFAULT","HOVER","handleHoverOut","dragEnter","dragLeave","dragOver","drop"],"mappings":"guCAgBaA,EAAmB,QAAnBA,CAAAA,EACXC,CAAAA,CACAC,IAEAA,EAAYC,CAAAA,aAAAA,CAAeC,SAAAA,CACzBH,CAAAA,CAAAA,CAAAA,CAAeI,MAAQD,CAAQ,EAAA,CAAA,CAGjCF,GAAYI,UAAYC,CAAAA,SAAAA,CAAAA,CAAAA,CACtB,IAAKN,CAAeO,CAAAA,aAAAA,CAAe,CAEjC,GADcP,EAAeQ,aAAcC,CAAAA,MAAAA,CAASH,EAAMG,MAC9C,CAAA,CAAA,CAGV,MAFAT,CAAAA,CAAeU,CAAAA,YAAAA,CAAeC,EAAgBC,oBAC9CZ,CAAAA,IAAAA,CAAAA,CAAAA,CAAea,eAGlB,EAED,GAAA,CAAKb,EAAec,eAAiB,CAAA,CACnC,GAAMC,CAAAA,EA9BiB,CAAA,SAACT,CAAeE,CAAAA,CAAAA,QACpCF,CAAAA,EAAMU,IAAKC,CAAAA,SAAAA,CAAAA,QAChBT,CAAAA,EAAcQ,IAAKE,CAAAA,SAAAA,CAAAA,QACjBD,CAAAA,EAAKE,IAASD,GAAAA,CAAAA,CAASC,IACvBF,EAAAA,CAAAA,CAAKG,OAASF,CAASE,CAAAA,IAAAA,EACvBH,EAAKI,YAAiBH,GAAAA,CAAAA,CAASG,qBAyBEf,CAAAA,CAAON,CAAeQ,CAAAA,aAAAA,CAAAA,CACvD,GAAIO,EAGF,CAAA,MAFAf,CAAAA,EAAeU,YAAeC,CAAAA,CAAAA,CAAgBW,2BAC9CtB,CAAAA,CAAea,CAAAA,aAAAA,CAAAA,CAGlB,EACDb,CAAeQ,CAAAA,aAAAA,IAAAA,MAAAA,CAAAA,kBAAAA,CAAoBR,CAAeQ,CAAAA,aAAAA,EAAAA,kBAAAA,CAAkBF,IACpEN,CAAea,CAAAA,aAAAA,CAAAA,CAAe,GAC9B,EAISU,EAAAA,OAAAA,KAAAA,CAAAA,CAAsBtB,QAAtBsB,CAAAA,CAAAA,CAAsBtB,CACjCuB,CAAAA,CAAAA,QAAAA,CAASC,iBAAiB,UAAYxB,CAAAA,CAAAA,CAAYyB,gBAAiB,CAAEC,OAAAA,CAAAA,CAAS,IAC9EH,QAASC,CAAAA,gBAAAA,CAAiB,MAAQxB,CAAAA,CAAAA,CAAY2B,YAAa,CAAED,OAAAA,CAAAA,CAAS,GAAQ,EAInEE,EAAAA,OAAAA,KAAAA,CAAAA,CAAuB,QAAvBA,CAAAA,CAAAA,CAAwB7B,CAAgCC,CAAAA,CAAAA,CAAAA,CACnED,CAAeyB,CAAAA,gBAAAA,CAAiB,aAAeK,SAAAA,CAAMC,CAAAA,CAAAA,MASrDC,CAAAA,EATmEhC,CAAegC,CAAAA,QAAAA,CAAAA,KAAUhC,EAAeI,KAYtF6B,GAAAA,CAAAA,CAAgBC,SACnCF,CAASC,CAAAA,CAAAA,CAAgBE,QALb,GACdH,CAAAA,CATiH,IACjHhC,CAAeyB,CAAAA,gBAAAA,CAAiB,aAAeK,SAAAA,CAAMM,CAAAA,CAAAA,MAiBrDJ,CAAAA,CAjBoEhC,CAAAA,CAAAA,CAAegC,cAAUhC,CAAeI,CAAAA,KAAAA,GAoBvF6B,EAAgBE,KACnCH,EAAAA,CAAAA,CAASC,EAAgBC,OALb,CAAA,CAAA,CAAA,GACdF,CAAAA,CAjBkH,EAAA,CAAA,CAClHhC,EAAeyB,gBAAiB,CAAA,WAAA,CAAcK,SAAAA,SAAM7B,CAAAA,CAAYoC,CAAAA,SAAAA,CAAUP,MAC1E9B,CAAeyB,CAAAA,gBAAAA,CAAiB,WAAcK,CAAAA,SAAAA,CAAAA,QAAM7B,CAAAA,EAAYqC,SAAUR,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAC1E9B,EAAeyB,gBAAiB,CAAA,UAAA,CAAaK,SAAAA,SAAM7B,CAAAA,CAAYsC,CAAAA,QAAAA,CAAST,MACxE9B,CAAeyB,CAAAA,gBAAAA,CAAiB,OAASK,SAAAA,CAAM7B,QAAAA,CAAAA,CAAAA,CAAYuC,KAAKV,CAAG,CAAA,EAAA,CAAA,EAAA"}
@@ -1 +0,0 @@
1
- import{a as e,F as r}from"../types/file-upload.enums.esm.js";const a=(r,a)=>{a.onStateChange((e=>{r.state=e})),a.onFileDrop((a=>{if(!r.allowMultiple){if(r.uploadedFiles.length+a.length>1)return r.errorMessage=e.MULTIPLE_NOT_ALLOWED,void r.requestUpdate()}if(!r.allowDuplicates){const o=((e,r)=>e.some((e=>r.some((r=>e.name===r.name&&e.size===r.size&&e.lastModified===r.lastModified)))))(a,r.uploadedFiles);if(o)return r.errorMessage=e.DUPLICATES_NOT_ALLOWED,void r.requestUpdate()}r.uploadedFiles=[...r.uploadedFiles,...a],r.requestUpdate()}))},o=e=>{document.addEventListener("dragover",e.preventDragOver,{passive:!1}),document.addEventListener("drop",e.preventDrop,{passive:!1})},s=(e,a)=>{e.addEventListener("mouseenter",(a=>{return o=e.setState,void(e.state===r.DEFAULT&&o(r.HOVER));var o})),e.addEventListener("mouseleave",(a=>{return o=e.setState,void(e.state===r.HOVER&&o(r.DEFAULT));var o})),e.addEventListener("dragenter",(e=>a.dragEnter(e))),e.addEventListener("dragleave",(e=>a.dragLeave(e))),e.addEventListener("dragover",(e=>a.dragOver(e))),e.addEventListener("drop",(e=>a.drop(e)))};export{s as a,o as b,a as s};
@@ -1 +0,0 @@
1
- export { NileFilePreview } from './nile-file-preview';
@@ -1,2 +0,0 @@
1
- export { NileFilePreview } from './nile-file-preview';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-file-preview/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export { NileFilePreview } from './nile-file-preview';"]}