@aquera/nile-elements 0.1.36-beta-1.2 → 0.1.36-beta-1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/README.md +3 -0
  2. package/dist/_commonjsHelpers-e8f8776f.cjs.js +2 -0
  3. package/dist/_commonjsHelpers-e8f8776f.cjs.js.map +1 -0
  4. package/dist/_commonjsHelpers-f94d783e.esm.js +1 -0
  5. package/dist/axe.min-61450170.cjs.js +12 -0
  6. package/dist/axe.min-61450170.cjs.js.map +1 -0
  7. package/dist/axe.min-640ded4a.esm.js +12 -0
  8. package/dist/fixture-205f11fa.cjs.js +395 -0
  9. package/dist/fixture-205f11fa.cjs.js.map +1 -0
  10. package/dist/fixture-2b5b3aba.esm.js +569 -0
  11. package/dist/{fixture-df8b52d7.esm.js → fixture-76051ef1.esm.js} +1 -1
  12. package/dist/fixture-7bfb866e.cjs.js +395 -0
  13. package/dist/fixture-7bfb866e.cjs.js.map +1 -0
  14. package/dist/{fixture-d5b55278.cjs.js → fixture-948ae33c.cjs.js} +2 -2
  15. package/dist/{fixture-d5b55278.cjs.js.map → fixture-948ae33c.cjs.js.map} +1 -1
  16. package/dist/fixture-e6fdfbfa.esm.js +569 -0
  17. package/dist/lit-html-39a6718c.esm.js +6 -0
  18. package/dist/lit-html-9b3af046.cjs.js +6 -0
  19. package/dist/lit-html-9b3af046.cjs.js.map +1 -0
  20. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  21. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  22. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  23. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  24. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  25. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  26. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  27. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  28. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  29. package/dist/nile-button/nile-button.test.esm.js +1 -1
  30. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  31. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  32. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  33. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  34. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  35. package/dist/nile-card/nile-card.test.esm.js +1 -1
  36. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  37. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  38. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  39. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  40. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  41. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  42. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  43. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  44. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  45. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  46. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  47. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  48. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  49. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  50. package/dist/nile-file-preview/index.cjs.js +2 -0
  51. package/dist/nile-file-preview/index.cjs.js.map +1 -0
  52. package/dist/nile-file-preview/index.esm.js +1 -0
  53. package/dist/nile-file-preview/nile-file-preview.cjs.js +2 -0
  54. package/dist/nile-file-preview/nile-file-preview.cjs.js.map +1 -0
  55. package/dist/nile-file-preview/nile-file-preview.css.cjs.js +2 -0
  56. package/dist/nile-file-preview/nile-file-preview.css.cjs.js.map +1 -0
  57. package/dist/nile-file-preview/nile-file-preview.css.esm.js +521 -0
  58. package/dist/nile-file-preview/nile-file-preview.esm.js +3 -0
  59. package/dist/nile-file-preview/nile-file-preview.template.cjs.js +2 -0
  60. package/dist/nile-file-preview/nile-file-preview.template.cjs.js.map +1 -0
  61. package/dist/nile-file-preview/nile-file-preview.template.esm.js +117 -0
  62. package/dist/nile-file-preview/nile-file-preview.test.cjs.js +2 -0
  63. package/dist/nile-file-preview/nile-file-preview.test.cjs.js.map +1 -0
  64. package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -0
  65. package/dist/nile-file-preview/types/file-preview.enums.cjs.js +2 -0
  66. package/dist/nile-file-preview/types/file-preview.enums.cjs.js.map +1 -0
  67. package/dist/nile-file-preview/types/file-preview.enums.esm.js +1 -0
  68. package/dist/nile-file-preview/types/file-preview.interface.cjs.js +2 -0
  69. package/dist/nile-file-preview/types/file-preview.interface.cjs.js.map +1 -0
  70. package/dist/nile-file-preview/types/file-preview.interface.esm.js +1 -0
  71. package/dist/nile-file-preview/types/index.cjs.js +2 -0
  72. package/dist/nile-file-preview/types/index.cjs.js.map +1 -0
  73. package/dist/nile-file-preview/types/index.esm.js +1 -0
  74. package/dist/nile-file-preview/utils/file-preview.util.cjs.js +2 -0
  75. package/dist/nile-file-preview/utils/file-preview.util.cjs.js.map +1 -0
  76. package/dist/nile-file-preview/utils/file-preview.util.esm.js +1 -0
  77. package/dist/nile-file-preview/utils/index.cjs.js +2 -0
  78. package/dist/nile-file-preview/utils/index.cjs.js.map +1 -0
  79. package/dist/nile-file-preview/utils/index.esm.js +1 -0
  80. package/dist/nile-file-upload/index.cjs.js +2 -0
  81. package/dist/nile-file-upload/index.cjs.js.map +1 -0
  82. package/dist/nile-file-upload/index.esm.js +1 -0
  83. package/dist/nile-file-upload/nile-file-upload.cjs.js +2 -0
  84. package/dist/nile-file-upload/nile-file-upload.cjs.js.map +1 -0
  85. package/dist/nile-file-upload/nile-file-upload.css.cjs.js +2 -0
  86. package/dist/nile-file-upload/nile-file-upload.css.cjs.js.map +1 -0
  87. package/dist/nile-file-upload/nile-file-upload.css.esm.js +535 -0
  88. package/dist/nile-file-upload/nile-file-upload.esm.js +3 -0
  89. package/dist/nile-file-upload/nile-file-upload.template.cjs.js +10 -0
  90. package/dist/nile-file-upload/nile-file-upload.template.cjs.js.map +1 -0
  91. package/dist/nile-file-upload/nile-file-upload.template.esm.js +155 -0
  92. package/dist/nile-file-upload/nile-file-upload.test.cjs.js +2 -0
  93. package/dist/nile-file-upload/nile-file-upload.test.cjs.js.map +1 -0
  94. package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -0
  95. package/dist/nile-file-upload/types/file-upload.enums.cjs.js +2 -0
  96. package/dist/nile-file-upload/types/file-upload.enums.cjs.js.map +1 -0
  97. package/dist/nile-file-upload/types/file-upload.enums.esm.js +1 -0
  98. package/dist/nile-file-upload/types/file-upload.type.cjs.js +2 -0
  99. package/dist/nile-file-upload/types/file-upload.type.cjs.js.map +1 -0
  100. package/dist/nile-file-upload/types/file-upload.type.esm.js +1 -0
  101. package/dist/nile-file-upload/types/index.cjs.js +2 -0
  102. package/dist/nile-file-upload/types/index.cjs.js.map +1 -0
  103. package/dist/nile-file-upload/types/index.esm.js +1 -0
  104. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js +2 -0
  105. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js.map +1 -0
  106. package/dist/nile-file-upload/utils/drag-drop.util.esm.js +1 -0
  107. package/dist/nile-file-upload/utils/file-validation.util.cjs.js +2 -0
  108. package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +1 -0
  109. package/dist/nile-file-upload/utils/file-validation.util.esm.js +1 -0
  110. package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
  111. package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
  112. package/dist/nile-filter-chip/nile-filter-chip.esm.js +12 -12
  113. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  114. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +1 -1
  115. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +16 -16
  116. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  117. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  118. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  119. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  120. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  121. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  122. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  123. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  124. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  125. package/dist/nile-input/nile-input.test.esm.js +1 -1
  126. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  127. package/dist/nile-link/nile-link.test.esm.js +1 -1
  128. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  129. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  130. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  131. package/dist/nile-popover/nile-popover.test.esm.js +1 -1
  132. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  133. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  134. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  135. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  136. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  137. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  138. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  139. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  140. package/dist/nile-rich-text-editor/index.cjs.js +2 -0
  141. package/dist/nile-rich-text-editor/index.cjs.js.map +1 -0
  142. package/dist/nile-rich-text-editor/index.esm.js +1 -0
  143. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +10 -0
  144. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -0
  145. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +2 -0
  146. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -0
  147. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +5 -0
  148. package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +28 -0
  149. package/dist/nile-rich-text-editor/nile-rich-text-editor.template.cjs.js +2 -0
  150. package/dist/nile-rich-text-editor/nile-rich-text-editor.template.cjs.js.map +1 -0
  151. package/dist/nile-rich-text-editor/nile-rich-text-editor.template.esm.js +1 -0
  152. package/dist/nile-rich-text-editor/nile-rich-text-editor.test.cjs.js +2 -0
  153. package/dist/nile-rich-text-editor/nile-rich-text-editor.test.cjs.js.map +1 -0
  154. package/dist/nile-rich-text-editor/nile-rich-text-editor.test.esm.js +1 -0
  155. package/dist/nile-rich-text-editor/sub-components/nile-rich-text-editor.cjs.js +2 -0
  156. package/dist/nile-rich-text-editor/sub-components/nile-rich-text-editor.cjs.js.map +1 -0
  157. package/dist/nile-rich-text-editor/sub-components/nile-rich-text-editor.esm.js +1 -0
  158. package/dist/nile-rich-text-editor/types/index.cjs.js +2 -0
  159. package/dist/nile-rich-text-editor/types/index.cjs.js.map +1 -0
  160. package/dist/nile-rich-text-editor/types/index.esm.js +1 -0
  161. package/dist/nile-rich-text-editor/types/rich-text-editor.type.cjs.js +2 -0
  162. package/dist/nile-rich-text-editor/types/rich-text-editor.type.cjs.js.map +1 -0
  163. package/dist/nile-rich-text-editor/types/rich-text-editor.type.esm.js +1 -0
  164. package/dist/nile-rich-text-editor/utils/nile-rich-text-editor.utils.cjs.js +2 -0
  165. package/dist/nile-rich-text-editor/utils/nile-rich-text-editor.utils.cjs.js.map +1 -0
  166. package/dist/nile-rich-text-editor/utils/nile-rich-text-editor.utils.esm.js +1 -0
  167. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  168. package/dist/nile-select/nile-select.test.esm.js +1 -1
  169. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  170. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  171. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  172. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  173. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  174. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  175. package/dist/nile-tooltip/nile-tooltip.test.cjs.js +1 -1
  176. package/dist/nile-tooltip/nile-tooltip.test.esm.js +1 -1
  177. package/dist/src/nile-file-preview/index.d.ts +1 -0
  178. package/dist/src/nile-file-preview/index.js +2 -0
  179. package/dist/src/nile-file-preview/index.js.map +1 -0
  180. package/dist/src/nile-file-preview/nile-file-preview.css.d.ts +12 -0
  181. package/dist/src/nile-file-preview/nile-file-preview.css.js +533 -0
  182. package/dist/src/nile-file-preview/nile-file-preview.css.js.map +1 -0
  183. package/dist/src/nile-file-preview/nile-file-preview.d.ts +48 -0
  184. package/dist/src/nile-file-preview/nile-file-preview.js +149 -0
  185. package/dist/src/nile-file-preview/nile-file-preview.js.map +1 -0
  186. package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +11 -0
  187. package/dist/src/nile-file-preview/nile-file-preview.template.js +144 -0
  188. package/dist/src/nile-file-preview/nile-file-preview.template.js.map +1 -0
  189. package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +7 -0
  190. package/dist/src/nile-file-preview/nile-file-preview.test.js +30 -0
  191. package/dist/src/nile-file-preview/nile-file-preview.test.js.map +1 -0
  192. package/dist/src/nile-file-preview/types/file-preview.enums.d.ts +23 -0
  193. package/dist/src/nile-file-preview/types/file-preview.enums.js +28 -0
  194. package/dist/src/nile-file-preview/types/file-preview.enums.js.map +1 -0
  195. package/dist/src/nile-file-preview/types/file-preview.interface.d.ts +4 -0
  196. package/dist/src/nile-file-preview/types/file-preview.interface.js +2 -0
  197. package/dist/src/nile-file-preview/types/file-preview.interface.js.map +1 -0
  198. package/dist/src/nile-file-preview/types/index.d.ts +2 -0
  199. package/dist/src/nile-file-preview/types/index.js +3 -0
  200. package/dist/src/nile-file-preview/types/index.js.map +1 -0
  201. package/dist/src/nile-file-preview/types/nile-file-preview.enums.d.ts +26 -0
  202. package/dist/src/nile-file-preview/types/nile-file-preview.enums.js +31 -0
  203. package/dist/src/nile-file-preview/types/nile-file-preview.enums.js.map +1 -0
  204. package/dist/src/nile-file-preview/types/nile-file-preview.interface.d.ts +4 -0
  205. package/dist/src/nile-file-preview/types/nile-file-preview.interface.js +2 -0
  206. package/dist/src/nile-file-preview/types/nile-file-preview.interface.js.map +1 -0
  207. package/dist/src/nile-file-preview/utils/file-preview.util.d.ts +3 -0
  208. package/dist/src/nile-file-preview/utils/file-preview.util.js +29 -0
  209. package/dist/src/nile-file-preview/utils/file-preview.util.js.map +1 -0
  210. package/dist/src/nile-file-preview/utils/index.d.ts +1 -0
  211. package/dist/src/nile-file-preview/utils/index.js +2 -0
  212. package/dist/src/nile-file-preview/utils/index.js.map +1 -0
  213. package/dist/src/nile-file-preview/utils/nile-file-preview.util.d.ts +4 -0
  214. package/dist/src/nile-file-preview/utils/nile-file-preview.util.js +45 -0
  215. package/dist/src/nile-file-preview/utils/nile-file-preview.util.js.map +1 -0
  216. package/dist/src/nile-file-upload/index.d.ts +1 -0
  217. package/dist/src/nile-file-upload/index.js +2 -0
  218. package/dist/src/nile-file-upload/index.js.map +1 -0
  219. package/dist/src/nile-file-upload/nile-file-upload.css.d.ts +12 -0
  220. package/dist/src/nile-file-upload/nile-file-upload.css.js +547 -0
  221. package/dist/src/nile-file-upload/nile-file-upload.css.js.map +1 -0
  222. package/dist/src/nile-file-upload/nile-file-upload.d.ts +45 -0
  223. package/dist/src/nile-file-upload/nile-file-upload.js +148 -0
  224. package/dist/src/nile-file-upload/nile-file-upload.js.map +1 -0
  225. package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +11 -0
  226. package/dist/src/nile-file-upload/nile-file-upload.template.js +163 -0
  227. package/dist/src/nile-file-upload/nile-file-upload.template.js.map +1 -0
  228. package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +7 -0
  229. package/dist/src/nile-file-upload/nile-file-upload.test.js +30 -0
  230. package/dist/src/nile-file-upload/nile-file-upload.test.js.map +1 -0
  231. package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +28 -0
  232. package/dist/src/nile-file-upload/types/file-upload.enums.js +35 -0
  233. package/dist/src/nile-file-upload/types/file-upload.enums.js.map +1 -0
  234. package/dist/src/nile-file-upload/types/file-upload.type.d.ts +4 -0
  235. package/dist/src/nile-file-upload/types/file-upload.type.js +2 -0
  236. package/dist/src/nile-file-upload/types/file-upload.type.js.map +1 -0
  237. package/dist/src/nile-file-upload/types/index.d.ts +2 -0
  238. package/dist/src/nile-file-upload/types/index.js +3 -0
  239. package/dist/src/nile-file-upload/types/index.js.map +1 -0
  240. package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +19 -0
  241. package/dist/src/nile-file-upload/utils/drag-drop.util.js +77 -0
  242. package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +1 -0
  243. package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +9 -0
  244. package/dist/src/nile-file-upload/utils/file-validation.util.js +58 -0
  245. package/dist/src/nile-file-upload/utils/file-validation.util.js.map +1 -0
  246. package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +1 -1
  247. package/dist/src/nile-filter-chip/nile-filter-chip.js +5 -5
  248. package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -1
  249. package/dist/src/nile-filter-chip/nile-filter-chip.test.js +10 -10
  250. package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -1
  251. package/dist/src/nile-pagination/index.d.ts +1 -0
  252. package/dist/src/nile-pagination/index.js +2 -0
  253. package/dist/src/nile-pagination/index.js.map +1 -0
  254. package/dist/src/nile-pagination/nile-pagination.css.d.ts +12 -0
  255. package/dist/src/nile-pagination/nile-pagination.css.js +156 -0
  256. package/dist/src/nile-pagination/nile-pagination.css.js.map +1 -0
  257. package/dist/src/nile-pagination/nile-pagination.d.ts +36 -0
  258. package/dist/src/nile-pagination/nile-pagination.js +170 -0
  259. package/dist/src/nile-pagination/nile-pagination.js.map +1 -0
  260. package/dist/src/nile-pagination/nile-pagination.template.d.ts +3 -0
  261. package/dist/src/nile-pagination/nile-pagination.template.js +5 -0
  262. package/dist/src/nile-pagination/nile-pagination.template.js.map +1 -0
  263. package/dist/src/nile-pagination/nile-pagination.test.d.ts +7 -0
  264. package/dist/src/nile-pagination/nile-pagination.test.js +30 -0
  265. package/dist/src/nile-pagination/nile-pagination.test.js.map +1 -0
  266. package/dist/src/nile-pagination/sub-components/nile-pagination.d.ts +0 -0
  267. package/dist/src/nile-pagination/sub-components/nile-pagination.js +2 -0
  268. package/dist/src/nile-pagination/sub-components/nile-pagination.js.map +1 -0
  269. package/dist/src/nile-pagination/types/index.d.ts +0 -0
  270. package/dist/src/nile-pagination/types/index.js +2 -0
  271. package/dist/src/nile-pagination/types/index.js.map +1 -0
  272. package/dist/src/nile-pagination/types/pagination.type.d.ts +3 -0
  273. package/dist/src/nile-pagination/types/pagination.type.js +5 -0
  274. package/dist/src/nile-pagination/types/pagination.type.js.map +1 -0
  275. package/dist/src/nile-pagination/utils/nile-pagination.utils.d.ts +0 -0
  276. package/dist/src/nile-pagination/utils/nile-pagination.utils.js +2 -0
  277. package/dist/src/nile-pagination/utils/nile-pagination.utils.js.map +1 -0
  278. package/dist/src/nile-rich-text-editor/index.d.ts +1 -0
  279. package/dist/src/nile-rich-text-editor/index.js +2 -0
  280. package/dist/src/nile-rich-text-editor/index.js.map +1 -0
  281. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.d.ts +12 -0
  282. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +17 -0
  283. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -0
  284. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +10 -0
  285. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +62 -0
  286. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -0
  287. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.template.d.ts +3 -0
  288. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.template.js +5 -0
  289. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.template.js.map +1 -0
  290. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.test.d.ts +7 -0
  291. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.test.js +30 -0
  292. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.test.js.map +1 -0
  293. package/dist/src/nile-rich-text-editor/quill/quill.d.ts +8 -0
  294. package/dist/src/nile-rich-text-editor/quill/quill.js +19 -0
  295. package/dist/src/nile-rich-text-editor/quill/quill.js.map +1 -0
  296. package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor.d.ts +0 -0
  297. package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor.js +2 -0
  298. package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor.js.map +1 -0
  299. package/dist/src/nile-rich-text-editor/types/index.d.ts +0 -0
  300. package/dist/src/nile-rich-text-editor/types/index.js +2 -0
  301. package/dist/src/nile-rich-text-editor/types/index.js.map +1 -0
  302. package/dist/src/nile-rich-text-editor/types/rich-text-editor.type.d.ts +3 -0
  303. package/dist/src/nile-rich-text-editor/types/rich-text-editor.type.js +5 -0
  304. package/dist/src/nile-rich-text-editor/types/rich-text-editor.type.js.map +1 -0
  305. package/dist/src/nile-rich-text-editor/utils/nile-rich-text-editor.utils.d.ts +0 -0
  306. package/dist/src/nile-rich-text-editor/utils/nile-rich-text-editor.utils.js +2 -0
  307. package/dist/src/nile-rich-text-editor/utils/nile-rich-text-editor.utils.js.map +1 -0
  308. package/dist/tsconfig.tsbuildinfo +1 -1
  309. package/package.json +1 -1
  310. package/src/nile-filter-chip/nile-filter-chip.test.ts +10 -10
  311. package/src/nile-filter-chip/nile-filter-chip.ts +4 -4
  312. package/vscode-html-custom-data.json +5 -5
@@ -0,0 +1,58 @@
1
+ import { FileUploadState, FileUploadError } from "../types";
2
+ // to check the duplicate files
3
+ export const areDuplicates = (files, uploadedFiles) => {
4
+ return files.some(file => uploadedFiles.some(existing => file.name === existing.name &&
5
+ file.size === existing.size &&
6
+ file.lastModified === existing.lastModified));
7
+ };
8
+ // set up the drag handler
9
+ export const setUpDragHandler = (nileFileUpload, dragHandler) => {
10
+ dragHandler.onStateChange((newState) => {
11
+ nileFileUpload.state = newState;
12
+ });
13
+ dragHandler.onFileDrop((files) => {
14
+ if (!nileFileUpload.allowMultiple) {
15
+ const total = nileFileUpload.uploadedFiles.length + files.length;
16
+ if (total > 1) {
17
+ nileFileUpload.errorMessage = FileUploadError.MULTIPLE_NOT_ALLOWED;
18
+ nileFileUpload.requestUpdate();
19
+ return;
20
+ }
21
+ }
22
+ if (!nileFileUpload.allowDuplicates) {
23
+ const duplicates = areDuplicates(files, nileFileUpload.uploadedFiles);
24
+ if (duplicates) {
25
+ nileFileUpload.errorMessage = FileUploadError.DUPLICATES_NOT_ALLOWED;
26
+ nileFileUpload.requestUpdate();
27
+ return;
28
+ }
29
+ }
30
+ nileFileUpload.uploadedFiles = [...nileFileUpload.uploadedFiles, ...files];
31
+ nileFileUpload.requestUpdate();
32
+ });
33
+ };
34
+ // global listenrers
35
+ export const addGlobalListeners = (dragHandler) => {
36
+ document.addEventListener('dragover', dragHandler.preventDragOver, { passive: false });
37
+ document.addEventListener('drop', dragHandler.preventDrop, { passive: false });
38
+ };
39
+ // for hover & dragging functionality
40
+ export const addInternalListeners = (nileFileUpload, dragHandler) => {
41
+ nileFileUpload.addEventListener('mouseenter', (e) => handleHoverIn(nileFileUpload.setState, nileFileUpload.state));
42
+ nileFileUpload.addEventListener('mouseleave', (e) => handleHoverOut(nileFileUpload.setState, nileFileUpload.state));
43
+ nileFileUpload.addEventListener('dragenter', (e) => dragHandler.dragEnter(e));
44
+ nileFileUpload.addEventListener('dragleave', (e) => dragHandler.dragLeave(e));
45
+ nileFileUpload.addEventListener('dragover', (e) => dragHandler.dragOver(e));
46
+ nileFileUpload.addEventListener('drop', (e) => dragHandler.drop(e));
47
+ };
48
+ export function handleHoverIn(setState, currentState) {
49
+ if (currentState === FileUploadState.DEFAULT) {
50
+ setState(FileUploadState.HOVER);
51
+ }
52
+ }
53
+ export function handleHoverOut(setState, currentState) {
54
+ if (currentState === FileUploadState.HOVER) {
55
+ setState(FileUploadState.DEFAULT);
56
+ }
57
+ }
58
+ //# sourceMappingURL=file-validation.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-validation.util.js","sourceRoot":"","sources":["../../../../src/nile-file-upload/utils/file-validation.util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG5D,+BAA+B;AAC/B,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,aAAqB,EAAW,EAAE;IAC7E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACvB,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAC5B,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI;QAC3B,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI;QAC3B,IAAI,CAAC,YAAY,KAAK,QAAQ,CAAC,YAAY,CAC5C,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,0BAA0B;AAC1B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,cAA8B,EAC9B,WAAwB,EAClB,EAAE;IACR,WAAW,CAAC,aAAa,CAAC,CAAC,QAAyB,EAAE,EAAE;QACtD,cAAc,CAAC,KAAK,GAAG,QAAQ,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,WAAW,CAAC,UAAU,CAAC,CAAC,KAAa,EAAE,EAAE;QACvC,IAAI,CAAC,c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AAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IACnH,cAAc,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IACpH,cAAc,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,cAAc,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,cAAc,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,cAAc,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC,CAAA;AAED,MAAM,UAAU,aAAa,CAC3B,QAA0C,EAC1C,YAA6B;IAE7B,IAAI,YAAY,KAAK,eAAe,CAAC,OAAO,EAAE,CAAC;QAC7C,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,QAA0C,EAC1C,YAA6B;IAE7B,IAAI,YAAY,KAAK,eAAe,CAAC,KAAK,EAAE,CAAC;QAC3C,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;AACH,CAAC","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}"]}
@@ -7,7 +7,7 @@ import NileElement from '../internal/nile-element';
7
7
  */
8
8
  export declare class NileFilterChip extends NileElement {
9
9
  label: string;
10
- text: string;
10
+ value: string;
11
11
  viewMoreCount: number;
12
12
  editable: boolean;
13
13
  closable: boolean;
@@ -13,7 +13,7 @@ let NileFilterChip = NileFilterChip_1 = class NileFilterChip extends NileElement
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.label = '';
16
- this.text = '';
16
+ this.value = '';
17
17
  this.viewMoreCount = 0;
18
18
  this.editable = false;
19
19
  this.closable = false;
@@ -40,11 +40,11 @@ let NileFilterChip = NileFilterChip_1 = class NileFilterChip extends NileElement
40
40
  }
41
41
  handleClose(event) {
42
42
  event.stopPropagation();
43
- this.dispatchEvent(new CustomEvent('nile-close', { detail: { text: this.text, viewMoreCount: this.viewMoreCount } }));
43
+ this.dispatchEvent(new CustomEvent('nile-close', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } }));
44
44
  this.remove();
45
45
  }
46
46
  handleClick() {
47
- this.dispatchEvent(new CustomEvent('nile-click', { detail: { text: this.text, viewMoreCount: this.viewMoreCount } }));
47
+ this.dispatchEvent(new CustomEvent('nile-click', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } }));
48
48
  }
49
49
  getLabelSlot() {
50
50
  return html `
@@ -60,7 +60,7 @@ let NileFilterChip = NileFilterChip_1 = class NileFilterChip extends NileElement
60
60
  return html `
61
61
  <span class="value-wrapper">
62
62
  <slot name="value">
63
- <span class="value" part="value">${this.text}</span>
63
+ <span class="value" part="value">${this.value}</span>
64
64
  </slot>
65
65
  </span>
66
66
 
@@ -114,7 +114,7 @@ __decorate([
114
114
  ], NileFilterChip.prototype, "label", void 0);
115
115
  __decorate([
116
116
  property({ type: String })
117
- ], NileFilterChip.prototype, "text", void 0);
117
+ ], NileFilterChip.prototype, "value", void 0);
118
118
  __decorate([
119
119
  property({ type: Number })
120
120
  ], NileFilterChip.prototype, "viewMoreCount", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-filter-chip.js","sourceRoot":"","sources":["../../../src/nile-filter-chip/nile-filter-chip.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAc,IAAI,EAAuC,MAAM,KAAK,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD;;;;GAIG;AAEI,IAAM,cAAc,sBAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QACuB,UAAK,GAAG,EAAE,CAAC;QACX,SAAI,GAAG,EAAE,CAAC;QACV,kBAAa,GAAW,CAAC,CAAC;QACzB,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QAClB,SAAI,GAAG,EAAE,CAAC;QACV,eAAU,GAAG,EAAE,CAAC;QACA,WAAM,GAAG,KAAK,CAAC;IA4G7D,CAAC;IAvGQ,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAEO,YAAY;QAClB,gBAAc,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAEO,cAAc;QACpB,gBAAc,CAAC,WAAW,GAAG,gBAAc,CAAC,WAAW,CAAC,MAAM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AAW;;YAEtC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,sBAAsB,IAAI,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA,EAAE;;UAEnE,IAAI,CAAC,YAAY,EAAE;;UAEnB,IAAI,CAAC,YAAY,EAAE;UACnB,IAAI,CAAC,oBAAoB,EAAE;UAC3B,IAAI,CAAC,gBAAgB,EAAE;;KAE5B,CAAC;IACJ,CAAC;;AAxGc,0BAAW,GAAqB,EAAE,AAAvB,CAAwB;AAVtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAY;AACX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAA2B;AACzB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAkB;AACjB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAkB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAiB;AACA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAgB;AARhD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAoH1B;;AAED,eAAe,cAAc,CAAC","sourcesContent":["import { LitElement, html, css, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport { styles } from './nile-filter-chip.css';\n\n/**\n * Nile filter-chip component.\n *\n * @tag nile-filter-chip\n */\n@customElement('nile-filter-chip')\nexport class NileFilterChip extends NileElement {\n @property({ type: String }) label = '';\n @property({ type: String }) text = '';\n @property({ type: Number }) viewMoreCount: number = 0;\n @property({ type: Boolean }) editable = false;\n @property({ type: Boolean }) closable = false;\n @property({ type: String }) icon = '';\n @property({ type: String }) removeIcon = '';\n @property({ type: Boolean, reflect: true }) active = false;\n\n\n private static activeChips: NileFilterChip[] = [];\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.registerChip();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.unregisterChip();\n }\n\n private registerChip() {\n NileFilterChip.activeChips.push(this);\n }\n\n private unregisterChip() {\n NileFilterChip.activeChips = NileFilterChip.activeChips.filter(\n (chip) => chip !== this\n );\n }\n\n private handleClose(event: Event) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('nile-close', { detail: { text: this.text, viewMoreCount: this.viewMoreCount } })\n );\n this.remove();\n }\n\n private handleClick() {\n this.dispatchEvent(\n new CustomEvent('nile-click', { detail: { text: this.text, viewMoreCount: this.viewMoreCount } })\n );\n }\n\n private getLabelSlot(): TemplateResult {\n return html`\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">${this.label}:</span>\n </slot>\n </span>\n\n `;\n }\n\n private getValueSlot(): TemplateResult {\n return html`\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">${this.text}</span>\n </slot>\n </span>\n\n `;\n }\n\n private getviewMoreCountSlot(): TemplateResult {\n return html`\n <slot name=\"suffix\">\n ${this.viewMoreCount\n ? html`\n <span class=\"badge-wrapper\">\n <nile-badge variant=\"primary\" pilltype=\"pill-color\">\n +${this.viewMoreCount}\n </nile-badge>\n </span>\n\n `\n : html``}\n </slot>\n `;\n }\n\n private getCloseIconSlot(): TemplateResult {\n return html`\n ${this.closable\n ? html`\n <span class=\"close-icon\" @click=\"${this.handleClose}\">\n <nile-icon name=\"${this.removeIcon || 'close'}\" size=\"12\"></nile-icon>\n </span>\n `\n : html``}\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"chip\" @click=\"${this.handleClick}\">\n <slot name=\"icon\">\n ${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : html``}\n </slot>\n ${this.getLabelSlot()}\n <slot name=\"content\"></slot>\n ${this.getValueSlot()}\n ${this.getviewMoreCountSlot()}\n ${this.getCloseIconSlot()}\n </div>\n `;\n }\n}\n\nexport default NileFilterChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-filter-chip': NileFilterChip;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-filter-chip.js","sourceRoot":"","sources":["../../../src/nile-filter-chip/nile-filter-chip.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAc,IAAI,EAAuC,MAAM,KAAK,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD;;;;GAIG;AAEI,IAAM,cAAc,sBAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QACuB,UAAK,GAAG,EAAE,CAAC;QACX,UAAK,GAAG,EAAE,CAAC;QACX,kBAAa,GAAW,CAAC,CAAC;QACzB,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QAClB,SAAI,GAAG,EAAE,CAAC;QACV,eAAU,GAAG,EAAE,CAAC;QACA,WAAM,GAAG,KAAK,CAAC;IA4G7D,CAAC;IAvGQ,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;IAC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, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport { styles } from './nile-filter-chip.css';\n\n/**\n * Nile filter-chip component.\n *\n * @tag nile-filter-chip\n */\n@customElement('nile-filter-chip')\nexport class NileFilterChip extends NileElement {\n @property({ type: String }) label = '';\n @property({ type: String }) value = '';\n @property({ type: Number }) viewMoreCount: number = 0;\n @property({ type: Boolean }) editable = false;\n @property({ type: Boolean }) closable = false;\n @property({ type: String }) icon = '';\n @property({ type: String }) removeIcon = '';\n @property({ type: Boolean, reflect: true }) active = false;\n\n\n private static activeChips: NileFilterChip[] = [];\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.registerChip();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.unregisterChip();\n }\n\n private registerChip() {\n NileFilterChip.activeChips.push(this);\n }\n\n private unregisterChip() {\n NileFilterChip.activeChips = NileFilterChip.activeChips.filter(\n (chip) => chip !== this\n );\n }\n\n private handleClose(event: Event) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('nile-close', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n this.remove();\n }\n\n private handleClick() {\n this.dispatchEvent(\n new CustomEvent('nile-click', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })\n );\n }\n\n private getLabelSlot(): TemplateResult {\n return html`\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\" part=\"label\">${this.label}:</span>\n </slot>\n </span>\n\n `;\n }\n\n private getValueSlot(): TemplateResult {\n return html`\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\" part=\"value\">${this.value}</span>\n </slot>\n </span>\n\n `;\n }\n\n private getviewMoreCountSlot(): TemplateResult {\n return html`\n <slot name=\"suffix\">\n ${this.viewMoreCount\n ? html`\n <span class=\"badge-wrapper\">\n <nile-badge variant=\"primary\" pilltype=\"pill-color\">\n +${this.viewMoreCount}\n </nile-badge>\n </span>\n\n `\n : html``}\n </slot>\n `;\n }\n\n private getCloseIconSlot(): TemplateResult {\n return html`\n ${this.closable\n ? html`\n <span class=\"close-icon\" @click=\"${this.handleClose}\">\n <nile-icon name=\"${this.removeIcon || 'close'}\" size=\"12\"></nile-icon>\n </span>\n `\n : html``}\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"chip\" @click=\"${this.handleClick}\">\n <slot name=\"icon\">\n ${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : html``}\n </slot>\n ${this.getLabelSlot()}\n <slot name=\"content\"></slot>\n ${this.getValueSlot()}\n ${this.getviewMoreCountSlot()}\n ${this.getCloseIconSlot()}\n </div>\n `;\n }\n}\n\nexport default NileFilterChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-filter-chip': NileFilterChip;\n }\n}\n"]}
@@ -7,16 +7,16 @@ describe('<nile-filter-chip>', () => {
7
7
  });
8
8
  it('registers and unregisters itself in activeChips', async () => {
9
9
  const el = await fixture(html `
10
- <nile-filter-chip label="L" text="T"></nile-filter-chip>
10
+ <nile-filter-chip label="L" value="T"></nile-filter-chip>
11
11
  `);
12
12
  expect(NileFilterChip.activeChips).to.include(el);
13
13
  el.remove();
14
14
  await el.updateComplete;
15
15
  expect(NileFilterChip.activeChips).to.not.include(el);
16
16
  });
17
- it('renders fallback label and text', async () => {
17
+ it('renders fallback label and value', async () => {
18
18
  const el = await fixture(html `
19
- <nile-filter-chip label="MyLabel" text="MyText"></nile-filter-chip>
19
+ <nile-filter-chip label="MyLabel" value="MyText"></nile-filter-chip>
20
20
  `);
21
21
  const label = el.shadowRoot.querySelector('.label');
22
22
  const value = el.shadowRoot.querySelector('.value');
@@ -37,7 +37,7 @@ describe('<nile-filter-chip>', () => {
37
37
  });
38
38
  it('renders an icon when the `icon` property is set', async () => {
39
39
  const el = await fixture(html `
40
- <nile-filter-chip icon="★" label="L" text="T"></nile-filter-chip>
40
+ <nile-filter-chip icon="★" label="L" value="T"></nile-filter-chip>
41
41
  `);
42
42
  const iconSpan = el.shadowRoot.querySelector('.icon');
43
43
  expect(iconSpan).to.exist;
@@ -45,13 +45,13 @@ describe('<nile-filter-chip>', () => {
45
45
  });
46
46
  it('does not render a badge when viewMoreCount is zero', async () => {
47
47
  const el = await fixture(html `
48
- <nile-filter-chip viewMoreCount="0" label="L" text="T"></nile-filter-chip>
48
+ <nile-filter-chip viewMoreCount="0" label="L" value="T"></nile-filter-chip>
49
49
  `);
50
50
  expect(el.shadowRoot.querySelector('nile-badge')).to.be.null;
51
51
  });
52
52
  it('renders a +badge when viewMoreCount > 0', async () => {
53
53
  const el = await fixture(html `
54
- <nile-filter-chip viewMoreCount="5" label="L" text="T"></nile-filter-chip>
54
+ <nile-filter-chip viewMoreCount="5" label="L" value="T"></nile-filter-chip>
55
55
  `);
56
56
  const badge = el.shadowRoot.querySelector('nile-badge');
57
57
  expect(badge).to.exist;
@@ -59,21 +59,21 @@ describe('<nile-filter-chip>', () => {
59
59
  });
60
60
  it('dispatches `nile-click` on chip click', async () => {
61
61
  const el = await fixture(html `
62
- <nile-filter-chip label="L" text="T"></nile-filter-chip>
62
+ <nile-filter-chip label="L" value="T"></nile-filter-chip>
63
63
  `);
64
64
  const chip = el.shadowRoot.querySelector('.chip');
65
65
  setTimeout(() => chip.click());
66
66
  const ev = await oneEvent(el, 'nile-click');
67
- expect(ev.detail).to.deep.equal({ text: 'T', viewMoreCount: 0 });
67
+ expect(ev.detail).to.deep.equal({ value: 'T', viewMoreCount: 0 });
68
68
  });
69
69
  it('dispatches `nile-close` on close icon click and removes itself', async () => {
70
70
  const el = await fixture(html `
71
- <nile-filter-chip closable viewMoreCount="2" text="TT"></nile-filter-chip>
71
+ <nile-filter-chip closable viewMoreCount="2" value="TT"></nile-filter-chip>
72
72
  `);
73
73
  const closeIcon = el.shadowRoot.querySelector('.close-icon');
74
74
  setTimeout(() => closeIcon.click());
75
75
  const ev = await oneEvent(el, 'nile-close');
76
- expect(ev.detail).to.deep.equal({ text: 'TT', viewMoreCount: 2 });
76
+ expect(ev.detail).to.deep.equal({ value: 'TT', viewMoreCount: 2 });
77
77
  expect(document.body.contains(el)).to.be.false;
78
78
  });
79
79
  });
@@ -1 +1 @@
1
- {"version":3,"file":"nile-filter-chip.test.js","sourceRoot":"","sources":["../../../src/nile-filter-chip/nile-filter-chip.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,SAAS,CAAC,GAAG,EAAE;QACZ,cAAsB,CAAC,WAAW,GAAG,EAAE,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;QAC/D,MAAM,EAAE,GAAG,MAAM,OAAO,CAAiB,IAAI,CAAA;;KAE5C,CAAC,CAAC;QACH,MAAM,CAAE,cAAsB,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3D,EAAE,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,EAAE,CAAC,cAAc,CAAC;QACxB,MAAM,CAAE,cAAsB,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAC/C,MAAM,EAAE,GAAG,MAAM,OAAO,CAAiB,IAAI,CAAA;;KAE5C,CAAC,CAAC;QACH,MAAM,KAAK,GAAG,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,QAAQ,CAAiB,CAAC;QACrE,MAAM,KAAK,GAAG,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,QAAQ,CAAiB,CAAC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AC9E,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC;QACpC,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;QAC5C,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;QAClE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IACjD,CAAC,CAAC,CAAC;AAGL,CAAC,CAAC,CAAC","sourcesContent":["import { fixture, expect, html, oneEvent } from '@open-wc/testing';\nimport './nile-filter-chip';\nimport { NileFilterChip } from './nile-filter-chip';\n\ndescribe('<nile-filter-chip>', () => {\n afterEach(() => {\n (NileFilterChip as any).activeChips = [];\n });\n\n it('registers and unregisters itself in activeChips', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n expect((NileFilterChip as any).activeChips).to.include(el);\n el.remove();\n await el.updateComplete;\n expect((NileFilterChip as any).activeChips).to.not.include(el);\n });\n\n it('renders fallback label and text', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"MyLabel\" text=\"MyText\"></nile-filter-chip>\n `);\n const label = el.shadowRoot!.querySelector('.label')! as HTMLElement;\n const value = el.shadowRoot!.querySelector('.value')! as HTMLElement;\n expect(label.textContent).to.equal('MyLabel:');\n expect(value.textContent!.trim()).to.equal('MyText');\n });\n\n it('renders slotted label and value over fallback', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip>\n <span slot=\"label\">SLOT-LBL</span>\n <span slot=\"value\">SLOT-VAL</span>\n </nile-filter-chip>\n `);\n const slottedLabel = el.querySelector('[slot=\"label\"]')! as HTMLElement;\n const slottedValue = el.querySelector('[slot=\"value\"]')! as HTMLElement;\n expect(slottedLabel.textContent).to.equal('SLOT-LBL');\n expect(slottedValue.textContent).to.equal('SLOT-VAL');\n });\n\n it('renders an icon when the `icon` property is set', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip icon=\"★\" label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n const iconSpan = el.shadowRoot!.querySelector('.icon')! as HTMLElement;\n expect(iconSpan).to.exist;\n expect(iconSpan.textContent).to.equal('★');\n });\n\n it('does not render a badge when viewMoreCount is zero', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip viewMoreCount=\"0\" label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n expect(el.shadowRoot!.querySelector('nile-badge')).to.be.null;\n });\n\n it('renders a +badge when viewMoreCount > 0', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip viewMoreCount=\"5\" label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n const badge = el.shadowRoot!.querySelector('nile-badge')! as HTMLElement;\n expect(badge).to.exist;\n expect(badge.textContent).to.contain('+5');\n });\n\n\n\n it('dispatches `nile-click` on chip click', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n const chip = el.shadowRoot!.querySelector('.chip')! as HTMLElement;\n setTimeout(() => chip.click());\n const ev = await oneEvent(el, 'nile-click');\n expect(ev.detail).to.deep.equal({ text: 'T', viewMoreCount: 0 });\n });\n\n it('dispatches `nile-close` on close icon click and removes itself', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip closable viewMoreCount=\"2\" text=\"TT\"></nile-filter-chip>\n `);\n const closeIcon = el.shadowRoot!.querySelector('.close-icon')! as HTMLElement;\n setTimeout(() => closeIcon.click());\n const ev = await oneEvent(el, 'nile-close');\n expect(ev.detail).to.deep.equal({ text: 'TT', viewMoreCount: 2 });\n expect(document.body.contains(el)).to.be.false;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,QAAQ,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;QAC5C,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;QACnE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IACjD,CAAC,CAAC,CAAC;AAGL,CAAC,CAAC,CAAC","sourcesContent":["import { fixture, expect, html, oneEvent } from '@open-wc/testing';\nimport './nile-filter-chip';\nimport { NileFilterChip } from './nile-filter-chip';\n\ndescribe('<nile-filter-chip>', () => {\n afterEach(() => {\n (NileFilterChip as any).activeChips = [];\n });\n\n it('registers and unregisters itself in activeChips', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n expect((NileFilterChip as any).activeChips).to.include(el);\n el.remove();\n await el.updateComplete;\n expect((NileFilterChip as any).activeChips).to.not.include(el);\n });\n\n it('renders fallback label and value', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"MyLabel\" value=\"MyText\"></nile-filter-chip>\n `);\n const label = el.shadowRoot!.querySelector('.label')! as HTMLElement;\n const value = el.shadowRoot!.querySelector('.value')! as HTMLElement;\n expect(label.textContent).to.equal('MyLabel:');\n expect(value.textContent!.trim()).to.equal('MyText');\n });\n\n it('renders slotted label and value over fallback', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip>\n <span slot=\"label\">SLOT-LBL</span>\n <span slot=\"value\">SLOT-VAL</span>\n </nile-filter-chip>\n `);\n const slottedLabel = el.querySelector('[slot=\"label\"]')! as HTMLElement;\n const slottedValue = el.querySelector('[slot=\"value\"]')! as HTMLElement;\n expect(slottedLabel.textContent).to.equal('SLOT-LBL');\n expect(slottedValue.textContent).to.equal('SLOT-VAL');\n });\n\n it('renders an icon when the `icon` property is set', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip icon=\"★\" label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n const iconSpan = el.shadowRoot!.querySelector('.icon')! as HTMLElement;\n expect(iconSpan).to.exist;\n expect(iconSpan.textContent).to.equal('★');\n });\n\n it('does not render a badge when viewMoreCount is zero', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip viewMoreCount=\"0\" label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n expect(el.shadowRoot!.querySelector('nile-badge')).to.be.null;\n });\n\n it('renders a +badge when viewMoreCount > 0', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip viewMoreCount=\"5\" label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n const badge = el.shadowRoot!.querySelector('nile-badge')! as HTMLElement;\n expect(badge).to.exist;\n expect(badge.textContent).to.contain('+5');\n });\n\n\n\n it('dispatches `nile-click` on chip click', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" value=\"T\"></nile-filter-chip>\n `);\n const chip = el.shadowRoot!.querySelector('.chip')! as HTMLElement;\n setTimeout(() => chip.click());\n const ev = await oneEvent(el, 'nile-click');\n expect(ev.detail).to.deep.equal({ value: 'T', viewMoreCount: 0 });\n });\n\n it('dispatches `nile-close` on close icon click and removes itself', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip closable viewMoreCount=\"2\" value=\"TT\"></nile-filter-chip>\n `);\n const closeIcon = el.shadowRoot!.querySelector('.close-icon')! as HTMLElement;\n setTimeout(() => closeIcon.click());\n const ev = await oneEvent(el, 'nile-close');\n expect(ev.detail).to.deep.equal({ value: 'TT', viewMoreCount: 2 });\n expect(document.body.contains(el)).to.be.false;\n });\n\n \n});\n"]}
@@ -0,0 +1 @@
1
+ export { NilePagination } from './nile-pagination';
@@ -0,0 +1,2 @@
1
+ export { NilePagination } from './nile-pagination';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-pagination/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { NilePagination } from './nile-pagination';"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright Aquera Inc 2025
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
+ /**
8
+ * Pagination CSS
9
+ */
10
+ export declare const styles: import("lit").CSSResult;
11
+ declare const _default: import("lit").CSSResult[];
12
+ export default _default;
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Copyright Aquera Inc 2025
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';
8
+ /**
9
+ * Pagination CSS
10
+ */
11
+ export const styles = css `
12
+ :host {
13
+ }
14
+
15
+ .pagination-wrapper {
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: space-between;
19
+ padding: 1rem;
20
+ background: #fff;
21
+ gap: 1rem;
22
+ }
23
+
24
+ .pagination-wrapper.v2 {
25
+ justify-content: space-between;
26
+ gap: 0.75rem;
27
+ }
28
+
29
+ .pagination-wrapper.v2 .pager-container {
30
+ flex-direction: row;
31
+ align-items: center;
32
+ gap: 0.5rem;
33
+ margin-right: 1rem;
34
+ }
35
+
36
+ .pagination-wrapper.v2 .range-text {
37
+ margin-right: 0.5rem;
38
+ }
39
+
40
+ .pager-container {
41
+ display: flex;
42
+ align-items: center;
43
+ gap: 1rem;
44
+ }
45
+
46
+ .range-text {
47
+ font-size: 1rem;
48
+ color: #111;
49
+ white-space: nowrap;
50
+ }
51
+
52
+ .page-size-select {
53
+ display: inline-flex;
54
+ align-items: center;
55
+ border: 1px solid #ccc;
56
+ border-radius: 4px;
57
+ padding: 4px 8px;
58
+ background: #fff;
59
+ }
60
+
61
+ .page-size-select label {
62
+ font-size: 0.9rem;
63
+ color: #666;
64
+ margin-right: 0.5rem;
65
+ }
66
+
67
+ .page-size-select select {
68
+ border: none;
69
+ background: transparent;
70
+ font-size: 1rem;
71
+ color: #111;
72
+ outline: none;
73
+ cursor: pointer;
74
+ }
75
+
76
+ ul.pagination {
77
+ display: flex;
78
+ list-style: none;
79
+ padding: 0;
80
+ margin: 0;
81
+ gap: 4px;
82
+ }
83
+
84
+ ul.pagination li {
85
+ margin: 0;
86
+ }
87
+
88
+ ul.pagination button {
89
+ border: 1px solid #ccc;
90
+ background: #fff;
91
+ padding: 8px 12px;
92
+ font-size: 1rem;
93
+ cursor: pointer;
94
+ border-radius: 4px;
95
+ min-width: 36px;
96
+ transition: background 0.2s ease;
97
+ }
98
+
99
+ ul.pagination nile-button:hover:not(:disabled):not(.active),
100
+ .ellipsis-button:hover {
101
+ background: #f0f0f0;
102
+ }
103
+
104
+ ul.pagination button:disabled {
105
+ opacity: 0.4;
106
+ cursor: default;
107
+ }
108
+
109
+ ul.pagination button.active {
110
+ background: #007aff;
111
+ color: #fff;
112
+ border-color: #007aff;
113
+ }
114
+
115
+ .ellipsis-button {
116
+ all: unset;
117
+ display: inline-flex;
118
+ align-items: center;
119
+ justify-content: center;
120
+ box-sizing: border-box;
121
+
122
+ width: 36px;
123
+ height: 36px;
124
+ min-width: 36px;
125
+
126
+ font-size: 1rem;
127
+ font-weight: 500;
128
+ color: #111;
129
+
130
+ background: #fff;
131
+ border: 1px solid #ccc;
132
+ border-radius: 4px;
133
+ cursor: pointer;
134
+ }
135
+
136
+ .ellipsis-button:hover {
137
+ background: #f0f0f0;
138
+ }
139
+
140
+ .ellipsis-dropdown nile-menu {
141
+ width: 66px;
142
+ height: 170px;
143
+ overflow-y: auto;
144
+ padding: 4px 0;
145
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
146
+ }
147
+
148
+ .ellipsis-dropdown nile-menu-item {
149
+ font-size: 0.95rem;
150
+ padding: 6px 12px;
151
+ cursor: pointer;
152
+ text-align: center;
153
+ }
154
+ `;
155
+ export default [styles];
156
+ //# sourceMappingURL=nile-pagination.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-pagination.css.js","sourceRoot":"","sources":["../../../src/nile-pagination/nile-pagination.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+IxB,CAAC;AAIF,eAAe,CAAC,MAAM,CAAC,CAAC","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\nimport {css} from 'lit';\n\n/**\n * Pagination CSS\n */\nexport const styles = css`\n :host {\n }\n\n .pagination-wrapper {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 1rem;\n background: #fff;\n gap: 1rem;\n }\n\n .pagination-wrapper.v2 {\n justify-content: space-between;\n gap: 0.75rem;\n }\n\n .pagination-wrapper.v2 .pager-container {\n flex-direction: row;\n align-items: center;\n gap: 0.5rem;\n margin-right: 1rem;\n }\n\n .pagination-wrapper.v2 .range-text {\n margin-right: 0.5rem;\n }\n\n .pager-container {\n display: flex;\n align-items: center;\n gap: 1rem;\n }\n\n .range-text {\n font-size: 1rem;\n color: #111;\n white-space: nowrap;\n }\n\n .page-size-select {\n display: inline-flex;\n align-items: center;\n border: 1px solid #ccc;\n border-radius: 4px;\n padding: 4px 8px;\n background: #fff;\n }\n\n .page-size-select label {\n font-size: 0.9rem;\n color: #666;\n margin-right: 0.5rem;\n }\n\n .page-size-select select {\n border: none;\n background: transparent;\n font-size: 1rem;\n color: #111;\n outline: none;\n cursor: pointer;\n }\n\n ul.pagination {\n display: flex;\n list-style: none;\n padding: 0;\n margin: 0;\n gap: 4px;\n }\n\n ul.pagination li {\n margin: 0;\n }\n\n ul.pagination button {\n border: 1px solid #ccc;\n background: #fff;\n padding: 8px 12px;\n font-size: 1rem;\n cursor: pointer;\n border-radius: 4px;\n min-width: 36px;\n transition: background 0.2s ease;\n }\n\n ul.pagination nile-button:hover:not(:disabled):not(.active),\n .ellipsis-button:hover {\n background: #f0f0f0;\n }\n\n ul.pagination button:disabled {\n opacity: 0.4;\n cursor: default;\n }\n\n ul.pagination button.active {\n background: #007aff;\n color: #fff;\n border-color: #007aff;\n }\n\n .ellipsis-button {\n all: unset;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n\n width: 36px;\n height: 36px;\n min-width: 36px;\n\n font-size: 1rem;\n font-weight: 500;\n color: #111;\n\n background: #fff;\n border: 1px solid #ccc;\n border-radius: 4px;\n cursor: pointer;\n }\n\n .ellipsis-button:hover {\n background: #f0f0f0;\n }\n\n .ellipsis-dropdown nile-menu {\n width: 66px;\n height: 170px;\n overflow-y: auto;\n padding: 4px 0;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n }\n\n .ellipsis-dropdown nile-menu-item {\n font-size: 0.95rem;\n padding: 6px 12px;\n cursor: pointer;\n text-align: center;\n }\n`;\n\n\n\nexport default [styles];"]}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright Aquera Inc 2025
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 { CSSResultArray, TemplateResult } from 'lit';
8
+ import NileElement from '../internal/nile-element';
9
+ /**
10
+ * Nile pagination component.
11
+ *
12
+ * @tag nile-pagination
13
+ */
14
+ export declare class NilePagination extends NileElement {
15
+ static get styles(): CSSResultArray;
16
+ totalItems: number;
17
+ pageSize: number;
18
+ currentPage: number;
19
+ variant: 'v1' | 'v2';
20
+ disabled: boolean;
21
+ showTitle: boolean;
22
+ pageSizeOptions: number[];
23
+ private get totalPages();
24
+ private getPaginationItems;
25
+ private getHiddenPages;
26
+ private getRangeText;
27
+ private goToPage;
28
+ private onPageSizeChange;
29
+ render(): TemplateResult;
30
+ }
31
+ export default NilePagination;
32
+ declare global {
33
+ interface HTMLElementTagNameMap {
34
+ 'nile-pagination': NilePagination;
35
+ }
36
+ }