@aquera/nile-elements 0.0.81 → 0.0.84

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 (493) hide show
  1. package/README.md +19 -0
  2. package/demo/filenames.txt +1 -1
  3. package/demo/index.css +117 -0
  4. package/demo/index.html +34 -243
  5. package/demo/index.js +72 -0
  6. package/demo/variables.css +58 -0
  7. package/demo/variables_v2.css +51 -0
  8. package/dist/{fixture-b1476eef.cjs.js → fixture-1a9fb5f1.cjs.js} +5 -5
  9. package/dist/fixture-1a9fb5f1.cjs.js.map +1 -0
  10. package/dist/{fixture-6f853cbd.esm.js → fixture-81e5a936.esm.js} +3 -3
  11. package/dist/index.cjs.js +1 -1
  12. package/dist/index.esm.js +1 -1
  13. package/dist/index.iife.js +892 -570
  14. package/dist/internal/animate.cjs.js +1 -1
  15. package/dist/internal/animate.cjs.js.map +1 -1
  16. package/dist/internal/animate.esm.js +1 -1
  17. package/dist/nile-avatar/nile-avatar.css.cjs.js +1 -1
  18. package/dist/nile-avatar/nile-avatar.css.cjs.js.map +1 -1
  19. package/dist/nile-avatar/nile-avatar.css.esm.js +7 -8
  20. package/dist/nile-avatar/nile-avatar.test.cjs.js +2 -0
  21. package/dist/nile-avatar/nile-avatar.test.cjs.js.map +1 -0
  22. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -0
  23. package/dist/nile-badge/index.cjs.js +1 -1
  24. package/dist/nile-badge/index.esm.js +1 -1
  25. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  26. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  27. package/dist/nile-badge/nile-badge.css.cjs.js +1 -1
  28. package/dist/nile-badge/nile-badge.css.cjs.js.map +1 -1
  29. package/dist/nile-badge/nile-badge.css.esm.js +47 -47
  30. package/dist/nile-badge/nile-badge.esm.js +1 -1
  31. package/dist/nile-badge/nile-badge.test.cjs.js +2 -0
  32. package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -0
  33. package/dist/nile-badge/nile-badge.test.esm.js +1 -0
  34. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.cjs.js +1 -1
  35. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.cjs.js.map +1 -1
  36. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.esm.js +3 -4
  37. package/dist/nile-button/index.cjs.js +1 -1
  38. package/dist/nile-button/index.esm.js +1 -1
  39. package/dist/nile-button/nile-button.cjs.js +1 -1
  40. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  41. package/dist/nile-button/nile-button.esm.js +1 -1
  42. package/dist/nile-button/nile-button.test.cjs.js +2 -0
  43. package/dist/nile-button/nile-button.test.cjs.js.map +1 -0
  44. package/dist/nile-button/nile-button.test.esm.js +4 -0
  45. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +2 -0
  46. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js.map +1 -0
  47. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +49 -0
  48. package/dist/nile-calendar/index.cjs.js +1 -1
  49. package/dist/nile-calendar/index.esm.js +1 -1
  50. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  51. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  52. package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
  53. package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
  54. package/dist/nile-calendar/nile-calendar.css.esm.js +124 -193
  55. package/dist/nile-calendar/nile-calendar.esm.js +119 -135
  56. package/dist/nile-card/nile-card.test.cjs.js +2 -0
  57. package/dist/nile-card/nile-card.test.cjs.js.map +1 -0
  58. package/dist/nile-card/nile-card.test.esm.js +51 -0
  59. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  60. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  61. package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
  62. package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
  63. package/dist/nile-date-picker/nile-date-picker.esm.js +4 -2
  64. package/dist/nile-dialog/index.cjs.js +1 -1
  65. package/dist/nile-dialog/index.esm.js +1 -1
  66. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  67. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  68. package/dist/nile-dialog/nile-dialog.css.cjs.js +1 -1
  69. package/dist/nile-dialog/nile-dialog.css.cjs.js.map +1 -1
  70. package/dist/nile-dialog/nile-dialog.css.esm.js +4 -1
  71. package/dist/nile-dialog/nile-dialog.esm.js +5 -4
  72. package/dist/nile-divider/index.cjs.js +2 -0
  73. package/dist/nile-divider/index.cjs.js.map +1 -0
  74. package/dist/nile-divider/index.esm.js +1 -0
  75. package/dist/nile-divider/nile-divider.cjs.js +2 -0
  76. package/dist/nile-divider/nile-divider.cjs.js.map +1 -0
  77. package/dist/nile-divider/nile-divider.css.cjs.js +2 -0
  78. package/dist/nile-divider/nile-divider.css.cjs.js.map +1 -0
  79. package/dist/nile-divider/nile-divider.css.esm.js +28 -0
  80. package/dist/nile-divider/nile-divider.esm.js +3 -0
  81. package/dist/nile-drawer/index.cjs.js +1 -1
  82. package/dist/nile-drawer/index.esm.js +1 -1
  83. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  84. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  85. package/dist/nile-drawer/nile-drawer.esm.js +1 -1
  86. package/dist/nile-drawer/nile-drawer.test.cjs.js +2 -0
  87. package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -0
  88. package/dist/nile-drawer/nile-drawer.test.esm.js +18 -0
  89. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  90. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  91. package/dist/nile-error-message/nile-error-message.test.cjs.js +2 -0
  92. package/dist/nile-error-message/nile-error-message.test.cjs.js.map +1 -0
  93. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -0
  94. package/dist/nile-form-group/nile-form-group.test.cjs.js +2 -0
  95. package/dist/nile-form-group/nile-form-group.test.cjs.js.map +1 -0
  96. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -0
  97. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  98. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  99. package/dist/nile-icon/icons/svg/alert.cjs.js +2 -0
  100. package/dist/nile-icon/icons/svg/alert.cjs.js.map +1 -0
  101. package/dist/nile-icon/icons/svg/alert.esm.js +1 -0
  102. package/dist/nile-icon/icons/svg/file-check-02.cjs.js +2 -0
  103. package/dist/nile-icon/icons/svg/file-check-02.cjs.js.map +1 -0
  104. package/dist/nile-icon/icons/svg/file-check-02.esm.js +1 -0
  105. package/dist/nile-icon/icons/svg/headphones-01.cjs.js +2 -0
  106. package/dist/nile-icon/icons/svg/headphones-01.cjs.js.map +1 -0
  107. package/dist/nile-icon/icons/svg/headphones-01.esm.js +1 -0
  108. package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
  109. package/dist/nile-icon/icons/svg/index.esm.js +1 -1
  110. package/dist/nile-icon/icons/svg/keyboard-01.cjs.js +2 -0
  111. package/dist/nile-icon/icons/svg/keyboard-01.cjs.js.map +1 -0
  112. package/dist/nile-icon/icons/svg/keyboard-01.esm.js +1 -0
  113. package/dist/nile-icon/icons/svg/monitor-01.cjs.js +2 -0
  114. package/dist/nile-icon/icons/svg/monitor-01.cjs.js.map +1 -0
  115. package/dist/nile-icon/icons/svg/monitor-01.esm.js +1 -0
  116. package/dist/nile-icon/icons/svg/mouse.cjs.js +2 -0
  117. package/dist/nile-icon/icons/svg/mouse.cjs.js.map +1 -0
  118. package/dist/nile-icon/icons/svg/mouse.esm.js +1 -0
  119. package/dist/nile-icon/icons/svg/printer.cjs.js +2 -0
  120. package/dist/nile-icon/icons/svg/printer.cjs.js.map +1 -0
  121. package/dist/nile-icon/icons/svg/printer.esm.js +1 -0
  122. package/dist/nile-icon/index.cjs.js +1 -1
  123. package/dist/nile-icon/index.cjs.js.map +1 -1
  124. package/dist/nile-icon/index.esm.js +1 -1
  125. package/dist/nile-icon/nile-icon.test.cjs.js +2 -0
  126. package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -0
  127. package/dist/nile-icon/nile-icon.test.esm.js +1 -0
  128. package/dist/nile-icon-button/index.cjs.js +1 -1
  129. package/dist/nile-icon-button/index.esm.js +1 -1
  130. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  131. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  132. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  133. package/dist/nile-input/index.cjs.js +1 -1
  134. package/dist/nile-input/index.esm.js +1 -1
  135. package/dist/nile-input/nile-input.cjs.js +1 -1
  136. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  137. package/dist/nile-input/nile-input.esm.js +1 -1
  138. package/dist/nile-input/nile-input.test.cjs.js +2 -0
  139. package/dist/nile-input/nile-input.test.cjs.js.map +1 -0
  140. package/dist/nile-input/nile-input.test.esm.js +17 -0
  141. package/dist/nile-link/nile-link.test.cjs.js +2 -0
  142. package/dist/nile-link/nile-link.test.cjs.js.map +1 -0
  143. package/dist/nile-link/nile-link.test.esm.js +1 -0
  144. package/dist/nile-list/index.cjs.js +2 -0
  145. package/dist/nile-list/index.cjs.js.map +1 -0
  146. package/dist/nile-list/index.esm.js +1 -0
  147. package/dist/nile-list/nile-list.cjs.js +2 -0
  148. package/dist/nile-list/nile-list.cjs.js.map +1 -0
  149. package/dist/nile-list/nile-list.css.cjs.js +2 -0
  150. package/dist/nile-list/nile-list.css.cjs.js.map +1 -0
  151. package/dist/nile-list/nile-list.css.esm.js +8 -0
  152. package/dist/nile-list/nile-list.esm.js +3 -0
  153. package/dist/nile-list-item/index.cjs.js +2 -0
  154. package/dist/nile-list-item/index.cjs.js.map +1 -0
  155. package/dist/nile-list-item/index.esm.js +1 -0
  156. package/dist/nile-list-item/nile-list-item.cjs.js +2 -0
  157. package/dist/nile-list-item/nile-list-item.cjs.js.map +1 -0
  158. package/dist/nile-list-item/nile-list-item.css.cjs.js +2 -0
  159. package/dist/nile-list-item/nile-list-item.css.cjs.js.map +1 -0
  160. package/dist/nile-list-item/nile-list-item.css.esm.js +54 -0
  161. package/dist/nile-list-item/nile-list-item.esm.js +21 -0
  162. package/dist/nile-loader/nile-loader.test.cjs.js +2 -0
  163. package/dist/nile-loader/nile-loader.test.cjs.js.map +1 -0
  164. package/dist/nile-loader/nile-loader.test.esm.js +1 -0
  165. package/dist/nile-menu/nile-menu.cjs.js +1 -1
  166. package/dist/nile-menu/nile-menu.cjs.js.map +1 -1
  167. package/dist/nile-menu/nile-menu.css.cjs.js +1 -1
  168. package/dist/nile-menu/nile-menu.css.cjs.js.map +1 -1
  169. package/dist/nile-menu/nile-menu.css.esm.js +21 -7
  170. package/dist/nile-menu/nile-menu.esm.js +18 -15
  171. package/dist/nile-menu-item/index.cjs.js +1 -1
  172. package/dist/nile-menu-item/index.esm.js +1 -1
  173. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  174. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  175. package/dist/nile-menu-item/nile-menu-item.css.cjs.js +1 -1
  176. package/dist/nile-menu-item/nile-menu-item.css.cjs.js.map +1 -1
  177. package/dist/nile-menu-item/nile-menu-item.css.esm.js +1 -1
  178. package/dist/nile-menu-item/nile-menu-item.esm.js +18 -21
  179. package/dist/nile-option/index.cjs.js +1 -1
  180. package/dist/nile-option/index.esm.js +1 -1
  181. package/dist/nile-option/nile-option.cjs.js +1 -1
  182. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  183. package/dist/nile-option/nile-option.esm.js +1 -1
  184. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  185. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  186. package/dist/nile-popover/nile-popover.css.cjs.js +1 -1
  187. package/dist/nile-popover/nile-popover.css.cjs.js.map +1 -1
  188. package/dist/nile-popover/nile-popover.css.esm.js +6 -4
  189. package/dist/nile-popover/nile-popover.esm.js +4 -7
  190. package/dist/nile-popover/nile-popover.test.cjs.js +2 -0
  191. package/dist/nile-popover/nile-popover.test.cjs.js.map +1 -0
  192. package/dist/nile-popover/nile-popover.test.esm.js +21 -0
  193. package/dist/nile-popup/nile-popup.css.cjs.js +1 -1
  194. package/dist/nile-popup/nile-popup.css.cjs.js.map +1 -1
  195. package/dist/nile-popup/nile-popup.css.esm.js +8 -4
  196. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +2 -0
  197. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js.map +1 -0
  198. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -0
  199. package/dist/nile-radio/nile-radio.test.cjs.js +2 -0
  200. package/dist/nile-radio/nile-radio.test.cjs.js.map +1 -0
  201. package/dist/nile-radio/nile-radio.test.esm.js +1 -0
  202. package/dist/nile-select/index.cjs.js +1 -1
  203. package/dist/nile-select/index.esm.js +1 -1
  204. package/dist/nile-select/nile-select.cjs.js +1 -1
  205. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  206. package/dist/nile-select/nile-select.esm.js +3 -3
  207. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +2 -0
  208. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js.map +1 -0
  209. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -0
  210. package/dist/nile-tab/index.cjs.js +1 -1
  211. package/dist/nile-tab/index.esm.js +1 -1
  212. package/dist/nile-tab/nile-tab.cjs.js +1 -1
  213. package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
  214. package/dist/nile-tab/nile-tab.esm.js +1 -1
  215. package/dist/nile-tab-group/index.cjs.js +1 -1
  216. package/dist/nile-tab-group/index.esm.js +1 -1
  217. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  218. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  219. package/dist/nile-tab-group/nile-tab-group.css.cjs.js +1 -1
  220. package/dist/nile-tab-group/nile-tab-group.css.cjs.js.map +1 -1
  221. package/dist/nile-tab-group/nile-tab-group.css.esm.js +2 -2
  222. package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
  223. package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js +1 -1
  224. package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js.map +1 -1
  225. package/dist/nile-table-cell-item/nile-table-cell-item.css.esm.js +2 -1
  226. package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js +1 -1
  227. package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js.map +1 -1
  228. package/dist/nile-table-header-item/nile-table-header-item.css.esm.js +2 -5
  229. package/dist/nile-tag/index.cjs.js +1 -1
  230. package/dist/nile-tag/index.esm.js +1 -1
  231. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  232. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  233. package/dist/nile-tag/nile-tag.esm.js +1 -1
  234. package/dist/nile-textarea/nile-textarea.test.cjs.js +2 -0
  235. package/dist/nile-textarea/nile-textarea.test.cjs.js.map +1 -0
  236. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -0
  237. package/dist/nile-toast/index.cjs.js +1 -1
  238. package/dist/nile-toast/index.esm.js +1 -1
  239. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  240. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  241. package/dist/nile-toast/nile-toast.esm.js +1 -1
  242. package/dist/nile-tree/index.cjs.js +2 -0
  243. package/dist/nile-tree/index.cjs.js.map +1 -0
  244. package/dist/nile-tree/index.esm.js +1 -0
  245. package/dist/nile-tree/nile-tree.cjs.js +2 -0
  246. package/dist/nile-tree/nile-tree.cjs.js.map +1 -0
  247. package/dist/nile-tree/nile-tree.css.cjs.js +2 -0
  248. package/dist/nile-tree/nile-tree.css.cjs.js.map +1 -0
  249. package/dist/nile-tree/nile-tree.css.esm.js +36 -0
  250. package/dist/nile-tree/nile-tree.esm.js +13 -0
  251. package/dist/nile-tree-item/index.cjs.js +2 -0
  252. package/dist/nile-tree-item/index.cjs.js.map +1 -0
  253. package/dist/nile-tree-item/index.esm.js +1 -0
  254. package/dist/nile-tree-item/nile-tree-item.cjs.js +2 -0
  255. package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -0
  256. package/dist/nile-tree-item/nile-tree-item.css.cjs.js +2 -0
  257. package/dist/nile-tree-item/nile-tree-item.css.cjs.js.map +1 -0
  258. package/dist/nile-tree-item/nile-tree-item.css.esm.js +164 -0
  259. package/dist/nile-tree-item/nile-tree-item.esm.js +63 -0
  260. package/dist/src/index.d.ts +5 -0
  261. package/dist/src/index.js +5 -0
  262. package/dist/src/index.js.map +1 -1
  263. package/dist/src/nile-avatar/nile-avatar.css.js +5 -6
  264. package/dist/src/nile-avatar/nile-avatar.css.js.map +1 -1
  265. package/dist/src/nile-avatar/nile-avatar.test.d.ts +1 -0
  266. package/dist/src/nile-avatar/nile-avatar.test.js +58 -0
  267. package/dist/src/nile-avatar/nile-avatar.test.js.map +1 -0
  268. package/dist/src/nile-badge/nile-badge.css.js +45 -45
  269. package/dist/src/nile-badge/nile-badge.css.js.map +1 -1
  270. package/dist/src/nile-badge/nile-badge.test.d.ts +1 -0
  271. package/dist/src/nile-badge/nile-badge.test.js +42 -0
  272. package/dist/src/nile-badge/nile-badge.test.js.map +1 -0
  273. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js +3 -4
  274. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js.map +1 -1
  275. package/dist/src/nile-button/nile-button.test.d.ts +1 -0
  276. package/dist/src/nile-button/nile-button.test.js +86 -0
  277. package/dist/src/nile-button/nile-button.test.js.map +1 -0
  278. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.d.ts +2 -0
  279. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.js +108 -0
  280. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.js.map +1 -0
  281. package/dist/src/nile-calendar/nile-calendar.css.js +122 -191
  282. package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  283. package/dist/src/nile-calendar/nile-calendar.d.ts +8 -0
  284. package/dist/src/nile-calendar/nile-calendar.js +143 -169
  285. package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  286. package/dist/src/nile-card/nile-card.test.d.ts +1 -0
  287. package/dist/src/nile-card/nile-card.test.js +69 -0
  288. package/dist/src/nile-card/nile-card.test.js.map +1 -0
  289. package/dist/src/nile-date-picker/nile-date-picker.d.ts +1 -1
  290. package/dist/src/nile-date-picker/nile-date-picker.js +4 -0
  291. package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  292. package/dist/src/nile-dialog/nile-dialog.css.js +4 -1
  293. package/dist/src/nile-dialog/nile-dialog.css.js.map +1 -1
  294. package/dist/src/nile-dialog/nile-dialog.js +4 -3
  295. package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
  296. package/dist/src/nile-divider/index.d.ts +1 -0
  297. package/dist/src/nile-divider/index.js +2 -0
  298. package/dist/src/nile-divider/index.js.map +1 -0
  299. package/dist/src/nile-divider/nile-divider.css.d.ts +12 -0
  300. package/dist/src/nile-divider/nile-divider.css.js +40 -0
  301. package/dist/src/nile-divider/nile-divider.css.js.map +1 -0
  302. package/dist/src/nile-divider/nile-divider.d.ts +34 -0
  303. package/dist/src/nile-divider/nile-divider.js +55 -0
  304. package/dist/src/nile-divider/nile-divider.js.map +1 -0
  305. package/dist/src/nile-drawer/nile-drawer.test.d.ts +1 -0
  306. package/dist/src/nile-drawer/nile-drawer.test.js +88 -0
  307. package/dist/src/nile-drawer/nile-drawer.test.js.map +1 -0
  308. package/dist/src/nile-error-message/nile-error-message.test.d.ts +1 -0
  309. package/dist/src/nile-error-message/nile-error-message.test.js +61 -0
  310. package/dist/src/nile-error-message/nile-error-message.test.js.map +1 -0
  311. package/dist/src/nile-form-group/nile-form-group.test.d.ts +1 -0
  312. package/dist/src/nile-form-group/nile-form-group.test.js +55 -0
  313. package/dist/src/nile-form-group/nile-form-group.test.js.map +1 -0
  314. package/dist/src/nile-icon/icons/svg/alert.d.ts +5 -0
  315. package/dist/src/nile-icon/icons/svg/alert.js +5 -0
  316. package/dist/src/nile-icon/icons/svg/alert.js.map +1 -0
  317. package/dist/src/nile-icon/icons/svg/file-check-02.d.ts +5 -0
  318. package/dist/src/nile-icon/icons/svg/file-check-02.js +5 -0
  319. package/dist/src/nile-icon/icons/svg/file-check-02.js.map +1 -0
  320. package/dist/src/nile-icon/icons/svg/headphones-01.d.ts +5 -0
  321. package/dist/src/nile-icon/icons/svg/headphones-01.js +5 -0
  322. package/dist/src/nile-icon/icons/svg/headphones-01.js.map +1 -0
  323. package/dist/src/nile-icon/icons/svg/index.d.ts +7 -0
  324. package/dist/src/nile-icon/icons/svg/index.js +7 -0
  325. package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  326. package/dist/src/nile-icon/icons/svg/keyboard-01.d.ts +5 -0
  327. package/dist/src/nile-icon/icons/svg/keyboard-01.js +5 -0
  328. package/dist/src/nile-icon/icons/svg/keyboard-01.js.map +1 -0
  329. package/dist/src/nile-icon/icons/svg/monitor-01.d.ts +5 -0
  330. package/dist/src/nile-icon/icons/svg/monitor-01.js +5 -0
  331. package/dist/src/nile-icon/icons/svg/monitor-01.js.map +1 -0
  332. package/dist/src/nile-icon/icons/svg/mouse.d.ts +5 -0
  333. package/dist/src/nile-icon/icons/svg/mouse.js +5 -0
  334. package/dist/src/nile-icon/icons/svg/mouse.js.map +1 -0
  335. package/dist/src/nile-icon/icons/svg/printer.d.ts +5 -0
  336. package/dist/src/nile-icon/icons/svg/printer.js +5 -0
  337. package/dist/src/nile-icon/icons/svg/printer.js.map +1 -0
  338. package/dist/src/nile-icon/nile-icon.test.d.ts +1 -0
  339. package/dist/src/nile-icon/nile-icon.test.js +45 -0
  340. package/dist/src/nile-icon/nile-icon.test.js.map +1 -0
  341. package/dist/src/nile-input/nile-input.test.d.ts +1 -0
  342. package/dist/src/nile-input/nile-input.test.js +139 -0
  343. package/dist/src/nile-input/nile-input.test.js.map +1 -0
  344. package/dist/src/nile-link/nile-link.test.d.ts +1 -0
  345. package/dist/src/nile-link/nile-link.test.js +72 -0
  346. package/dist/src/nile-link/nile-link.test.js.map +1 -0
  347. package/dist/src/nile-list/index.d.ts +1 -0
  348. package/dist/src/nile-list/index.js +2 -0
  349. package/dist/src/nile-list/index.js.map +1 -0
  350. package/dist/src/nile-list/nile-list.css.d.ts +12 -0
  351. package/dist/src/nile-list/nile-list.css.js +20 -0
  352. package/dist/src/nile-list/nile-list.css.js.map +1 -0
  353. package/dist/src/nile-list/nile-list.d.ts +33 -0
  354. package/dist/src/nile-list/nile-list.js +47 -0
  355. package/dist/src/nile-list/nile-list.js.map +1 -0
  356. package/dist/src/nile-list-item/index.d.ts +1 -0
  357. package/dist/src/nile-list-item/index.js +2 -0
  358. package/dist/src/nile-list-item/index.js.map +1 -0
  359. package/dist/src/nile-list-item/nile-list-item.css.d.ts +12 -0
  360. package/dist/src/nile-list-item/nile-list-item.css.js +66 -0
  361. package/dist/src/nile-list-item/nile-list-item.css.js.map +1 -0
  362. package/dist/src/nile-list-item/nile-list-item.d.ts +38 -0
  363. package/dist/src/nile-list-item/nile-list-item.js +96 -0
  364. package/dist/src/nile-list-item/nile-list-item.js.map +1 -0
  365. package/dist/src/nile-loader/nile-loader.test.d.ts +1 -0
  366. package/dist/src/nile-loader/nile-loader.test.js +39 -0
  367. package/dist/src/nile-loader/nile-loader.test.js.map +1 -0
  368. package/dist/src/nile-menu/nile-menu.css.js +19 -5
  369. package/dist/src/nile-menu/nile-menu.css.js.map +1 -1
  370. package/dist/src/nile-menu/nile-menu.d.ts +1 -0
  371. package/dist/src/nile-menu/nile-menu.js +25 -13
  372. package/dist/src/nile-menu/nile-menu.js.map +1 -1
  373. package/dist/src/nile-menu-item/nile-menu-item.css.js +1 -1
  374. package/dist/src/nile-menu-item/nile-menu-item.css.js.map +1 -1
  375. package/dist/src/nile-menu-item/nile-menu-item.js +21 -20
  376. package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
  377. package/dist/src/nile-popover/nile-popover.css.js +6 -4
  378. package/dist/src/nile-popover/nile-popover.css.js.map +1 -1
  379. package/dist/src/nile-popover/nile-popover.d.ts +1 -0
  380. package/dist/src/nile-popover/nile-popover.js +7 -6
  381. package/dist/src/nile-popover/nile-popover.js.map +1 -1
  382. package/dist/src/nile-popover/nile-popover.test.d.ts +1 -0
  383. package/dist/src/nile-popover/nile-popover.test.js +73 -0
  384. package/dist/src/nile-popover/nile-popover.test.js.map +1 -0
  385. package/dist/src/nile-popup/nile-popup.css.d.ts +5 -5
  386. package/dist/src/nile-popup/nile-popup.css.js +13 -9
  387. package/dist/src/nile-popup/nile-popup.css.js.map +1 -1
  388. package/dist/src/nile-progress-bar/nile-progress-bar.test.d.ts +1 -0
  389. package/dist/src/nile-progress-bar/nile-progress-bar.test.js +48 -0
  390. package/dist/src/nile-progress-bar/nile-progress-bar.test.js.map +1 -0
  391. package/dist/src/nile-radio/nile-radio.test.d.ts +1 -0
  392. package/dist/src/nile-radio/nile-radio.test.js +71 -0
  393. package/dist/src/nile-radio/nile-radio.test.js.map +1 -0
  394. package/dist/src/nile-select/nile-select.d.ts +1 -0
  395. package/dist/src/nile-select/nile-select.js +5 -1
  396. package/dist/src/nile-select/nile-select.js.map +1 -1
  397. package/dist/src/nile-slide-toggle/nile-slide-toggle.test.d.ts +1 -0
  398. package/dist/src/nile-slide-toggle/nile-slide-toggle.test.js +54 -0
  399. package/dist/src/nile-slide-toggle/nile-slide-toggle.test.js.map +1 -0
  400. package/dist/src/nile-tab-group/nile-tab-group.css.js +2 -2
  401. package/dist/src/nile-tab-group/nile-tab-group.css.js.map +1 -1
  402. package/dist/src/nile-tab-group/nile-tab-group.js +3 -1
  403. package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
  404. package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js +2 -1
  405. package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js.map +1 -1
  406. package/dist/src/nile-table-header-item/nile-table-header-item.css.js +2 -5
  407. package/dist/src/nile-table-header-item/nile-table-header-item.css.js.map +1 -1
  408. package/dist/src/nile-textarea/nile-textarea.test.d.ts +1 -0
  409. package/dist/src/nile-textarea/nile-textarea.test.js +87 -0
  410. package/dist/src/nile-textarea/nile-textarea.test.js.map +1 -0
  411. package/dist/src/nile-tree/index.d.ts +1 -0
  412. package/dist/src/nile-tree/index.js +2 -0
  413. package/dist/src/nile-tree/index.js.map +1 -0
  414. package/dist/src/nile-tree/nile-tree.css.d.ts +12 -0
  415. package/dist/src/nile-tree/nile-tree.css.js +48 -0
  416. package/dist/src/nile-tree/nile-tree.css.js.map +1 -0
  417. package/dist/src/nile-tree/nile-tree.d.ts +69 -0
  418. package/dist/src/nile-tree/nile-tree.js +376 -0
  419. package/dist/src/nile-tree/nile-tree.js.map +1 -0
  420. package/dist/src/nile-tree-item/index.d.ts +1 -0
  421. package/dist/src/nile-tree-item/index.js +2 -0
  422. package/dist/src/nile-tree-item/index.js.map +1 -0
  423. package/dist/src/nile-tree-item/nile-tree-item.css.d.ts +12 -0
  424. package/dist/src/nile-tree-item/nile-tree-item.css.js +176 -0
  425. package/dist/src/nile-tree-item/nile-tree-item.css.js.map +1 -0
  426. package/dist/src/nile-tree-item/nile-tree-item.d.ts +96 -0
  427. package/dist/src/nile-tree-item/nile-tree-item.js +324 -0
  428. package/dist/src/nile-tree-item/nile-tree-item.js.map +1 -0
  429. package/dist/tsconfig.tsbuildinfo +1 -1
  430. package/package.json +71 -2
  431. package/plopfile.js +11 -0
  432. package/src/index.ts +6 -1
  433. package/src/nile-avatar/nile-avatar.css.ts +5 -6
  434. package/src/nile-avatar/nile-avatar.test.ts +65 -0
  435. package/src/nile-badge/nile-badge.css.ts +45 -45
  436. package/src/nile-badge/nile-badge.test.ts +48 -0
  437. package/src/nile-breadcrumb-item/nile-breadcrumb-item.css.ts +3 -4
  438. package/src/nile-button/nile-button.test.ts +117 -0
  439. package/src/nile-button-toggle-group/nile-button-toggle-group.test.ts +130 -0
  440. package/src/nile-calendar/nile-calendar.css.ts +122 -191
  441. package/src/nile-calendar/nile-calendar.ts +148 -213
  442. package/src/nile-card/nile-card.test.ts +74 -0
  443. package/src/nile-date-picker/nile-date-picker.ts +9 -7
  444. package/src/nile-dialog/nile-dialog.css.ts +4 -1
  445. package/src/nile-dialog/nile-dialog.ts +4 -4
  446. package/src/nile-divider/index.ts +1 -0
  447. package/src/nile-divider/nile-divider.css.ts +42 -0
  448. package/src/nile-divider/nile-divider.ts +56 -0
  449. package/src/nile-drawer/nile-drawer.test.ts +106 -0
  450. package/src/nile-error-message/nile-error-message.test.ts +69 -0
  451. package/src/nile-form-group/nile-form-group.test.ts +63 -0
  452. package/src/nile-icon/icons/svg/alert.ts +5 -0
  453. package/src/nile-icon/icons/svg/file-check-02.ts +5 -0
  454. package/src/nile-icon/icons/svg/headphones-01.ts +5 -0
  455. package/src/nile-icon/icons/svg/index.ts +7 -0
  456. package/src/nile-icon/icons/svg/keyboard-01.ts +5 -0
  457. package/src/nile-icon/icons/svg/monitor-01.ts +5 -0
  458. package/src/nile-icon/icons/svg/mouse.ts +5 -0
  459. package/src/nile-icon/icons/svg/printer.ts +5 -0
  460. package/src/nile-icon/nile-icon.test.ts +53 -0
  461. package/src/nile-input/nile-input.test.ts +160 -0
  462. package/src/nile-link/nile-link.test.ts +83 -0
  463. package/src/nile-list/index.ts +1 -0
  464. package/src/nile-list/nile-list.css.ts +22 -0
  465. package/src/nile-list/nile-list.ts +64 -0
  466. package/src/nile-list-item/index.ts +1 -0
  467. package/src/nile-list-item/nile-list-item.css.ts +68 -0
  468. package/src/nile-list-item/nile-list-item.ts +104 -0
  469. package/src/nile-loader/nile-loader.test.ts +45 -0
  470. package/src/nile-menu/nile-menu.css.ts +19 -5
  471. package/src/nile-menu/nile-menu.ts +28 -17
  472. package/src/nile-menu-item/nile-menu-item.css.ts +1 -1
  473. package/src/nile-menu-item/nile-menu-item.ts +22 -21
  474. package/src/nile-popover/nile-popover.css.ts +6 -4
  475. package/src/nile-popover/nile-popover.test.ts +86 -0
  476. package/src/nile-popover/nile-popover.ts +7 -10
  477. package/src/nile-popup/nile-popup.css.ts +14 -10
  478. package/src/nile-progress-bar/nile-progress-bar.test.ts +55 -0
  479. package/src/nile-radio/nile-radio.test.ts +81 -0
  480. package/src/nile-select/nile-select.ts +3 -1
  481. package/src/nile-slide-toggle/nile-slide-toggle.test.ts +61 -0
  482. package/src/nile-tab-group/nile-tab-group.css.ts +2 -2
  483. package/src/nile-tab-group/nile-tab-group.ts +2 -1
  484. package/src/nile-table-cell-item/nile-table-cell-item.css.ts +2 -1
  485. package/src/nile-table-header-item/nile-table-header-item.css.ts +2 -5
  486. package/src/nile-textarea/nile-textarea.test.ts +102 -0
  487. package/src/nile-tree/index.ts +1 -0
  488. package/src/nile-tree/nile-tree.css.ts +50 -0
  489. package/src/nile-tree/nile-tree.ts +433 -0
  490. package/src/nile-tree-item/index.ts +1 -0
  491. package/src/nile-tree-item/nile-tree-item.css.ts +178 -0
  492. package/src/nile-tree-item/nile-tree-item.ts +330 -0
  493. package/dist/fixture-b1476eef.cjs.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";import{query as e,state as s,customElement as n}from"lit/decorators.js";import{s as a}from"./nile-calendar.css.esm.js";import{w as h}from"../internal/watch.esm.js";import{N as l}from"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import{n as d}from"../property-09139d3c.esm.js";import"lit";import"lit/directives/class-map.js";import"../nile-popup/nile-popup.css.esm.js";let r=class extends l{constructor(){super(...arguments),this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.dropDownOpened=!1,this.allowedDates={},this.valueAttribute=null,this.formattedDate=null,this.startDate=null,this.endDate=null,this.isSelectingStart=!0,this.range=!1,this.type="absolute",this.selectedTimeZone="local",this.validAllowedDates=!0,this.hideInput=!1,this.hideDurationFields=[],this.hideTimeZone=!1,this.showManualInputs=!1}static get styles(){return[a]}firstUpdated(){const t=this.getAttribute("allowed-dates");if(null!==t)try{this.allowedDates=JSON.parse(t)}catch(t){console.error("Error parsing allowed-dates attribute:",t)}else this.validAllowedDates=!1}checkValidAllowedDate(){if(0==Object.keys(this.allowedDates).length)return void(this.validAllowedDates=!1);this.hideInput=!0;new Date(Date.UTC(this.allowedDates?.startDate?.slice(0,4),this.allowedDates?.startDate?.slice(5,7)-1,this.allowedDates?.startDate?.slice(8,10)))>new Date(Date.UTC(this.allowedDates?.endDate?.slice(0,4),this.allowedDates?.endDate?.slice(5,7)-1,this.allowedDates?.endDate?.slice(8,10)))?(console.error("StartDate must be greater than endDate"),this.validAllowedDates=!1):this.validAllowedDates=!0}valueChanged(){if("object"==typeof this.value&&null!==this.value&&(this.value=JSON.stringify(this.value)),this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){const t=this.value.getTimezoneOffset(),i=new Date(this.value.getTime()-60*t*1e3);isNaN(i.getTime())||(this.valueAttribute=i.toISOString().split("T")[0],this.formattedDate=`${String(i.getDate()).padStart(2,"0")}/${String(i.getMonth()+1).padStart(2,"0")}/${i.getFullYear()}`)}}updated(t){if(super.updated(t),t.has("valueAttribute")){const t=new Date(this.valueAttribute||"");if(!isNaN(t.getTime())){const i=t.getTimezoneOffset();this.value=new Date(t.getTime()-60*i*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear()}}}static get observedAttributes(){return["value","range"]}attributeChangedCallback(t,i,e){"value"===t?(this.valueAttribute=e,this.initializeValue()):"range"===t&&(this.range=null!==e)}initializeValue(){if(this.range)try{const t=JSON.parse(this.valueAttribute||"");this.startDate=new Date(t.startDate),this.endDate=new Date(t.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null}catch(t){}else if(this.valueAttribute){let t;t=new Date(this.valueAttribute),t=new Date(t.getTime()-6e4*t.getTimezoneOffset()),isNaN(t.getTime())||(this.value=t,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null)}this.requestUpdate()}connectedCallback(){if(super.connectedCallback(),this.initializeValue(),this.valueAttribute){const t=new Date(this.valueAttribute);isNaN(t.getTime())||(this.value=t,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear())}this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getDaysArray(t,i){const e=new Date(t,i+1,0).getDate();return Array.from({length:e},((t,i)=>i+1))}nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate()}prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate()}selectDate(t,i,e){const s=new Date(e,i,t);if(this.range)if(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart)this.startDate=s,this.endDate&&s>this.endDate&&(this.endDate=null),this.isSelectingStart=!1;else if(this.isSelectingStart=!0,this.startDate&&s<this.startDate)this.startDate=s,this.endDate=null,this.isSelectingStart=!1;else{const t=s;t.setHours(23,59,59,999),this.endDate=t}else this.value=s,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide();this.requestUpdate()}confimRange(){this.startDate&&this.endDate&&("local"!==this.selectedTimeZone&&(this.startDate=this.convertTZ(this.startDate,this.selectedTimeZone),this.endDate=this.convertTZ(this.endDate,this.selectedTimeZone)),this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate})}convertTZ(t,i){return new Date(("string"==typeof t?new Date(t):t).toLocaleString("en-US",{timeZone:i}))}isCurrentDate(t,i,e){const s=new Date;return t===s.getDate()&&i+1===s.getMonth()+1&&e===s.getFullYear()}isAllowedDate(t,i,e){if(!this.validAllowedDates)return!0;const s=new Date(Date.UTC(e,i,t)),n=new Date(Date.UTC(this.allowedDates?.startDate?.slice(0,4),this.allowedDates?.startDate?.slice(5,7)-1,this.allowedDates?.startDate?.slice(8,10))),a=new Date(Date.UTC(this.allowedDates?.endDate?.slice(0,4),this.allowedDates?.endDate?.slice(5,7)-1,this.allowedDates?.endDate?.slice(8,10)));a.setUTCHours(23,59,59,999);return s>=n&&s<=a}renderMonth(t,e,s){const n=new Date(t,e,1).getDay(),a=new Date(t,e+1,0).getDay(),h=this.getDaysArray(0===e?t-1:t,0===e?11:e-1),l=this.getDaysArray(11===e?t+1:t,11===e?0:e+1),d=h.slice(h.length-n),r=l.slice(0,6-a),o=[...d,...s,...r],u=(t,i,e,s)=>{if(!s)return"";if(!this.range&&this.value){if(t===this.value.getDate()&&i===this.value.getMonth()&&e===this.value.getFullYear())return"selected-date"}const n=this.startDate&&t===this.startDate.getDate()&&i===this.startDate.getMonth()&&e===this.startDate.getFullYear(),a=this.endDate&&t===this.endDate.getDate()&&i===this.endDate.getMonth()&&e===this.endDate.getFullYear();return n?"range-start":a?"range-end":""},c=(t,i,e,s)=>{if(!s)return!1;if(this.startDate&&this.endDate){const s=new Date(e,i,t);return s>=this.startDate&&s<=this.endDate}return!1};return i`
1
+ import{__decorate as t}from"tslib";import{x as i,A as e}from"../index-0a3007c5.esm.js";import{query as s,state as n,customElement as a}from"lit/decorators.js";import{s as h}from"./nile-calendar.css.esm.js";import{classMap as l}from"lit/directives/class-map.js";import{w as r}from"../internal/watch.esm.js";import{N as d}from"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import{n as o}from"../property-09139d3c.esm.js";import"lit";import"../nile-popup/nile-popup.css.esm.js";let u=class extends d{constructor(){super(...arguments),this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.dropDownOpened=!1,this.allowedDates={},this.valueAttribute=null,this.formattedDate=null,this.startDate=null,this.endDate=null,this.isSelectingStart=!0,this.range=!1,this.type="absolute",this.selectedTimeZone="local",this.validAllowedDates=!0,this.hideInput=!1,this.hideDurationFields=[],this.hideTimeZone=!1,this.showManualInputs=!1}static get styles(){return[h]}firstUpdated(){const t=this.getAttribute("allowed-dates");if(null!==t)try{this.allowedDates=JSON.parse(t)}catch(t){console.error("Error parsing allowed-dates attribute:",t)}else this.validAllowedDates=!1}checkValidAllowedDate(){if(0==Object.keys(this.allowedDates).length)return void(this.validAllowedDates=!1);this.hideInput=!0;new Date(Date.UTC(this.allowedDates?.startDate?.slice(0,4),this.allowedDates?.startDate?.slice(5,7)-1,this.allowedDates?.startDate?.slice(8,10)))>new Date(Date.UTC(this.allowedDates?.endDate?.slice(0,4),this.allowedDates?.endDate?.slice(5,7)-1,this.allowedDates?.endDate?.slice(8,10)))?(console.error("StartDate must be greater than endDate"),this.validAllowedDates=!1):this.validAllowedDates=!0}valueChanged(){if(this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){const t=this.value.getTimezoneOffset(),i=new Date(this.value.getTime()-60*t*1e3);isNaN(i.getTime())||(this.valueAttribute=i.toISOString().split("T")[0],this.formattedDate=`${String(i.getDate()).padStart(2,"0")}/${String(i.getMonth()+1).padStart(2,"0")}/${i.getFullYear()}`)}}updated(t){if(super.updated(t),t.has("valueAttribute")){const t=new Date(this.valueAttribute||"");if(!isNaN(t.getTime())){const i=t.getTimezoneOffset();this.value=new Date(t.getTime()-60*i*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear()}}}static get observedAttributes(){return["value","range"]}attributeChangedCallback(t,i,e){"value"===t?(this.valueAttribute=e,this.initializeValue()):"range"===t&&(this.range=null!==e)}initializeValue(){if(this.range)try{const t=JSON.parse(this.valueAttribute||"");this.startDate=new Date(t.startDate),this.endDate=new Date(t.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null}catch(t){}else if(this.valueAttribute){let t;t=new Date(this.valueAttribute),t=new Date(t.getTime()-6e4*t.getTimezoneOffset()),isNaN(t.getTime())||(this.value=t,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null)}this.requestUpdate()}connectedCallback(){if(super.connectedCallback(),this.initializeValue(),this.valueAttribute){const t=new Date(this.valueAttribute);isNaN(t.getTime())||(this.value=t,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear())}this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getDaysArray(t,i){const e=new Date(t,i+1,0).getDate();return Array.from({length:e},((t,i)=>i+1))}nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate()}prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate()}selectDate(t,i,e){const s=new Date(e,i,t);if(this.range)if(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart)this.startDate=s,this.endDate&&s>this.endDate&&(this.endDate=null),this.isSelectingStart=!1;else if(this.isSelectingStart=!0,this.startDate&&s<this.startDate)this.startDate=s,this.endDate=null,this.isSelectingStart=!1;else{const t=s;t.setHours(23,59,59,999),this.endDate=t}else this.value=s,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide();this.requestUpdate()}confimRange(){this.startDate&&this.endDate&&("local"!==this.selectedTimeZone&&(this.startDate=this.convertTZ(this.startDate,this.selectedTimeZone),this.endDate=this.convertTZ(this.endDate,this.selectedTimeZone)),this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate})}convertTZ(t,i){return new Date(("string"==typeof t?new Date(t):t).toLocaleString("en-US",{timeZone:i}))}isCurrentDate(t,i,e){const s=new Date;return t===s.getDate()&&i+1===s.getMonth()+1&&e===s.getFullYear()}isAllowedDate(t,i,e){if(!this.validAllowedDates)return!0;const s=new Date(Date.UTC(e,i,t)),n=new Date(Date.UTC(this.allowedDates?.startDate?.slice(0,4),this.allowedDates?.startDate?.slice(5,7)-1,this.allowedDates?.startDate?.slice(8,10))),a=new Date(Date.UTC(this.allowedDates?.endDate?.slice(0,4),this.allowedDates?.endDate?.slice(5,7)-1,this.allowedDates?.endDate?.slice(8,10)));a.setUTCHours(23,59,59,999);return s>=n&&s<=a}renderMonth(t,s,n){const a=new Date(t,s,1).getDay(),h=new Date(t,s+1,0).getDay(),r=this.getDaysArray(0===s?t-1:t,0===s?11:s-1),d=this.getDaysArray(11===s?t+1:t,11===s?0:s+1),o=r.slice(r.length-a),u=d.slice(0,6-h),c=[...o,...n,...u],v=(t,i,e,s)=>{if(!s)return"";if(!this.range&&this.value){if(t===this.value.getDate()&&i===this.value.getMonth()&&e===this.value.getFullYear())return"selected-date"}const n=this.startDate&&t===this.startDate.getDate()&&i===this.startDate.getMonth()&&e===this.startDate.getFullYear(),a=this.endDate&&t===this.endDate.getDate()&&i===this.endDate.getMonth()&&e===this.endDate.getFullYear();return n?"range-start":a?"range-end":""},p=(t,i,e,s)=>{if(!s)return!1;if(this.startDate&&this.endDate){const s=new Date(e,i,t);return s>=this.startDate&&s<=this.endDate}return!1};return i`
2
2
  <div class="calendar">
3
3
  <div class="calendar-header">
4
4
  <nile-icon
@@ -9,7 +9,7 @@ import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";
9
9
  >
10
10
  </nile-icon>
11
11
  <span
12
- >${new Date(t,e).toLocaleString("default",{month:"long"})}
12
+ >${new Date(t,s).toLocaleString("default",{month:"long"})}
13
13
  ${t}</span
14
14
  >
15
15
  <nile-icon
@@ -20,39 +20,37 @@ import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";
20
20
  >
21
21
  </nile-icon>
22
22
  </div>
23
- <div class="header-divider"></div>
24
- <div class="day-names">
25
- <div class="day">Sun</div>
26
- <div class="day">Mon</div>
27
- <div class="day">Tue</div>
28
- <div class="day">Wed</div>
29
- <div class="day">Thu</div>
30
- <div class="day">Fri</div>
31
- <div class="day">Sat</div>
32
- </div>
33
- <div class="days">
34
- ${o.map(((n,a)=>{const h=a>=d.length&&a<d.length+s.length;return i` <div
35
- class="day
36
- ${this.isAllowedDate(n,e,t)?"":"not-allowed"}
37
- ${u(n,e,t,h)} ${c(n,e,t,h)} ${c(n,e,t,h)?"in-range":""} ${h?"":"filler"}
38
- ${this.isCurrentDate(n,e,t)&&h?"current-date":""}
39
- "
40
- @click="${()=>{h&&this.selectDate(n,e,t)}}"
23
+ <div class="days_container">
24
+ <div class="day_name">Su</div>
25
+ <div class="day_name">Mo</div>
26
+ <div class="day_name">Tu</div>
27
+ <div class="day_name">We</div>
28
+ <div class="day_name">Th</div>
29
+ <div class="day_name">Fr</div>
30
+ <div class="day_name">Sa</div>
31
+
32
+ ${c.map(((a,h)=>{const r=h>=o.length&&h<o.length+n.length,d=v(a,s,t,r),u={day_date:!0,"not-allowed":!this.isAllowedDate(a,s,t),"in-range":p(a,s,t,r),filler:!r};return d&&(u[d]=!0),i`
33
+ <div
34
+ class=${l(u)}
35
+ @click="${()=>{r&&this.selectDate(a,s,t)}}"
41
36
  >
42
- ${n}
37
+ <span style="position:relative;">
38
+ ${a}
39
+ ${this.isCurrentDate(a,s,t)&&r?i`<div class="current__date__dot"></div>`:e}
40
+ </span>
43
41
  </div>`}))}
44
42
  </div>
45
43
  </div>
46
44
  `}formatDate(t){if(!t)return"";return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${t.getFullYear()}`}formatDateRange(t){return t?t.startDate&&t.endDate?`${this.formatDate(t.startDate)} - ${this.formatDate(t.endDate)}`:"":t}handleStartDateInput(t){const i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.startDate=null),i&&(!this.endDate||i<=this.endDate)?this.startDate=i:(this.startDate=null,this.endDate=null),this.requestUpdate()}handleEndDateInput(t){const i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.endDate=null),i&&(!this.startDate||i>=this.startDate)?this.endDate=i:this.endDate=null,this.requestUpdate()}parseDate(t){const[i,e,s]=t.split("/").map(Number),n=new Date(s,e-1,i);return isNaN(n.getTime())?null:n}isValidDateInput(t){return/^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(t)}formatTime(t){if(!t)return"";return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`}isValidTimeInput(t){return/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(t)}parseTime(t,i){if(!this.isValidTimeInput(t))return null;const[e,s,n]=t.split(":").map(Number),a=new Date(i.getTime());return a.setHours(e,s,n),a}handleStartTimeInput(t){if(!this.startDate)return void(this.startDate=null);const i=this.parseTime(t.detail.value,this.startDate);i?this.startDate=i:this.startDate.setHours(0,0,0),this.requestUpdate()}handleEndTimeInput(t){if(!this.endDate)return void(this.endDate=null);const i=this.parseTime(t.detail.value,this.endDate);i?this.endDate=i:this.endDate.setHours(0,0,0),this.requestUpdate()}setType(t){this.type=t}createRelativePeriod(t,i){const e=new Date,s=new Date;switch(t){case"minutes":s.setMinutes(s.getMinutes()-i);break;case"hours":s.setHours(s.getHours()-i);break;case"days":s.setDate(s.getDate()-i);break;case"weeks":s.setDate(s.getDate()-7*i);break;case"months":s.setMonth(s.getMonth()-i)}return this.startDate=new Date(s.getTime()),this.endDate=new Date(e.getTime()),this.requestUpdate(),{startDate:this.startDate,endDate:this.endDate}}handleTimeValueClick(t,i,e){this.createRelativePeriod(t,i),this.selectedUnit=t,this.selectedValue=i,this.requestUpdate()}renderTimeValues(t,e){return e.map((e=>i`
47
45
  <div
48
- class="time-value ${this.selectedUnit===t&&this.selectedValue===e?"time-value--selected":""}"
46
+ class="duration__value ${this.selectedUnit===t&&this.selectedValue===e?"duration__value--selected":""}"
49
47
  @click=${i=>this.handleTimeValueClick(t,e,i)}
50
48
  >
51
49
  ${e}
52
50
  </div>
53
- `))}handleDurationChange(t){this.selectedValue=Number(t.detail.value),this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t)}handleUnitChange(t){this.selectedUnit=t.detail.value,this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t)}handleTimeZoneChange(t){this.selectedTimeZone=t.detail.value,this.requestUpdate()}onTypeChange(t){this.type=t.detail.value}render(){this.getDaysArray(this.currentYear,this.currentMonth);const t=(this.currentMonth+1)%12,e=11===this.currentMonth?this.currentYear+1:this.currentYear;return this.getDaysArray(e,t),i`
51
+ `))}handleDurationChange(t){this.selectedValue=Number(t.detail.value),this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t)}handleUnitChange(t){this.selectedUnit=t.detail.value,this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t)}handleTimeZoneChange(t){this.selectedTimeZone=t.detail.value,this.requestUpdate()}onTypeChange(t){this.type=t.detail.value}render(){return i`
54
52
  <div
55
- class="base ${this.range?"base__range":""} ${"relative"===this.type?"base__relative":""}"
53
+ class=${l({base:!0,base__range:this.range})}
56
54
  >
57
55
  <div class="calendar-config ${this.range?"":"hidden"}">
58
56
  <div class="calendar-switcher">
@@ -63,124 +61,110 @@ import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";
63
61
  </div>
64
62
  </div>
65
63
 
66
- <div class="calendar-timezone ${!this.range||this.hideTimeZone?"hidden":""}">
67
- <nile-select
68
- hoist
69
- value=${this.selectedTimeZone}
70
- @nile-change=${this.handleTimeZoneChange}
71
- >
72
- <nile-option value="local">Local Time Zone</nile-option>
73
- <nile-option value="UTC">UTC</nile-option>
74
- </nile-select>
75
- </div>
64
+ ${"relative"==this.type?this.renderRelativeCalendar():""}
65
+ ${"absolute"==this.type?this.renderAbsoluteCalendar():""}
76
66
 
77
- <div
78
- class="calendar-wrapper ${"absolute"!==this.type?"hidden":""}"
79
- >
80
- <div class="calendar-container ${this.range?"with-margin":""}">
81
- ${this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth))}
82
- </div>
67
+ ${this.range?i`
68
+ <div class="button-container">
69
+ <nile-button
70
+ class="apply-button"
71
+ ?disabled="${!this.startDate||!this.endDate}"
72
+ @click="${this.confimRange}"
73
+ > Apply</nile-button>
83
74
  </div>
84
-
85
- <div class="unit-container ${"relative"!==this.type?"hidden":""}">
86
- <div
87
- class="time-unit-group ${this.hideDurationFields?.includes("minutes")?"hidden":""} "
88
- >
89
- <div class="time-unit-name"><span>Minutes</span></div>
90
- <div class="time-unit-value minute-values">
91
- ${this.renderTimeValues("minutes",[1,5,15,30,45])}
92
- </div>
93
- </div>
94
-
95
- <div
96
- class="time-unit-group ${this.hideDurationFields?.includes("hours")?"hidden":""}"
97
- >
98
- <div class="time-unit-name"><span>Hours</span></div>
99
- <div class="time-unit-value hours-values">
100
- ${this.renderTimeValues("hours",[1,2,3,6,8,12])}
101
- </div>
102
- </div>
103
-
104
- <div
105
- class="time-unit-group ${this.hideDurationFields?.includes("days")?"hidden":""}"
106
- >
107
- <div class="time-unit-name"><span>Days</span></div>
108
- <div class="time-unit-value">
109
- ${this.renderTimeValues("days",[1,2,3,4,5,6])}
110
- </div>
111
- </div>
112
-
113
- <div
114
- class="time-unit-group ${this.hideDurationFields?.includes("weeks")?"hidden":""}"
115
- >
116
- <div class="time-unit-name"><span>Weeks</span></div>
117
- <div class="time-unit-value weeks-values ">
118
- ${this.renderTimeValues("weeks",[1,2,4,6])}
119
- </div>
120
- </div>
121
-
122
- <div
123
- class="time-unit-group ${this.hideDurationFields?.includes("months")?"hidden":""}"
124
- >
125
- <div class="time-unit-name"><span>Months:</span></div>
126
- <div class="time-unit-value months-values ">
127
- ${this.renderTimeValues("months",[3,6,12,15])}
128
- </div>
129
- </div>
75
+ `:""}
76
+ </div>
77
+ `}renderAbsoluteCalendar(){return i`
78
+ <div class="calendar-wrapper">
79
+ <div class="calendar-container">
80
+ ${this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth))}
81
+ </div>
82
+ </div>
83
+ ${this.range?i`
84
+ <div class="calender-input ${this.showManualInputs?"":"hidden"}" >
85
+ <div class="from">
86
+ <nile-input
87
+ label="From"
88
+ class="manual-input"
89
+ value="${this.formatTime(this.startDate)}"
90
+ placeholder="HH:MM:SS" @nile-change="${this.handleStartTimeInput}"
91
+ > </nile-input>
130
92
  </div>
131
93
 
132
- ${this.range&&"relative"===this.type?i`
133
- <div class="calender-input calender-input--relative">
134
- <div class="unit-input-container">
135
- <nile-input class="manual-input duration-input" label="Duration" value="${this.selectedValue}"
136
- @nile-input="${this.handleDurationChange}"
137
- placeholder="Enter Value" ></nile-input>
138
- <nile-select class="manual-input time-input" label="Unit of time" style="margin-top:3px" value="${this.selectedUnit}"
139
- @nile-change="${this.handleUnitChange}"
140
- >
141
- <nile-option value="minutes" class="${this.hideDurationFields?.includes("minutes")?"hidden":""}"> Minutes </nile-option>
142
- <nile-option value="hours" class="${this.hideDurationFields?.includes("hours")?"hidden":""}"> Hours </nile-option>
143
- <nile-option value="days" class="${this.hideDurationFields?.includes("days")?"hidden":""}"> Days </nile-option>
144
- <nile-option value="weeks" class="${this.hideDurationFields?.includes("weeks")?"hidden":""}"> Weeks </nile-option>
145
- <nile-option value="months" class="${this.hideDurationFields?.includes("months")?"hidden":""}"> Months </nile-option>
146
- </nile-select>
147
-
148
- </div>
149
-
150
- <div class="button-container--relative">
151
- <nile-button class="apply-button" variant="primary" ?disabled="${!this.startDate||!this.endDate}" @click="${this.confimRange}"> Apply</nile-button>
152
- </div>
153
-
154
-
94
+ <div class="from">
95
+ <nile-input
96
+ label="To"
97
+ class="manual-input"
98
+ value="${this.formatTime(this.endDate)}"
99
+ placeholder="HH:MM:SS" @nile-change="${this.handleEndTimeInput}"
100
+ > </nile-input>
155
101
  </div>
102
+ </div>
103
+ `:""}
104
+ `}renderRelativeCalendar(){return i`
105
+ <div class="units-wrapper">
106
+ <div class="unit-container">
107
+ ${this.hideDurationFields?.includes("minutes")?"":i`
108
+ <div class="duration-name">Minutes</div>
109
+ <div class="duration-units">
110
+ ${this.renderTimeValues("minutes",[1,5,15,30,45])}
156
111
  </div>
157
- `:""}
158
- ${this.range&&"absolute"===this.type?i`
159
- <div class="calender-input ${this.showManualInputs?"":"hidden"}" >
160
- <div>
161
- <span class="manual-input-label">From </span>
162
- <div class="from">
163
- <!-- ${this.hideInput?i``:i`<nile-input class="manual-input" value="${this.formatDate(this.startDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleStartDateInput}">
164
- </nile-input>`} -->
165
-
166
- <nile-input class="manual-input" value="${this.formatTime(this.startDate)}" placeholder="HH:MM:SS" @nile-change="${this.handleStartTimeInput}"> </nile-input>
167
- </div>
168
- </div>
169
-
170
- <div>
171
- <span class="manual-input-label">To </span>
172
- <div class="from">
173
- <!-- ${this.hideInput?i``:i`<nile-input class="manual-input" value="${this.formatDate(this.endDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleEndDateInput}"></nile-input>`} -->
174
-
175
- <nile-input class="manual-input " value="${this.formatTime(this.endDate)}" placeholder="HH:MM:SS" @nile-change="${this.handleEndTimeInput}"> </nile-input>
176
- </div>
177
- </div>
112
+ `}
178
113
 
114
+ ${this.hideDurationFields?.includes("hours")?"":i`
115
+ <div class="duration-name">Hours</div>
116
+ <div class="duration-units">
117
+ ${this.renderTimeValues("hours",[1,2,3,6,8,12])}
179
118
  </div>
180
- <div class="button-container">
181
- <nile-button class="apply-button" ?disabled="${!this.startDate||!this.endDate}" @click="${this.confimRange}"> Apply</nile-button>
182
- </div>
119
+ `}
120
+
121
+ ${this.hideDurationFields?.includes("days")?"":i`
122
+ <div class="duration-name">Days</div>
123
+ <div class="duration-units">
124
+ ${this.renderTimeValues("days",[1,2,3,4,5,6])}
183
125
  </div>
184
- `:""}
126
+ `}
127
+
128
+ ${this.hideDurationFields?.includes("weeks")?"":i`
129
+ <div class="duration-name">Weeks</div>
130
+ <div class="duration-units">
131
+ ${this.renderTimeValues("weeks",[1,2,4,6])}
132
+ </div>
133
+ `}
134
+
135
+ ${this.hideDurationFields?.includes("months")?"":i`
136
+ <div class="duration-name">Months</div>
137
+ <div class="duration-units">
138
+ ${this.renderTimeValues("months",[3,6,12,15])}
139
+ </div>
140
+ `}
141
+ </div>
142
+ </div>
143
+
144
+ ${this.range?i`
145
+ <div>
146
+ <div class="unit-input-container">
147
+ <nile-input
148
+ class="manual-input duration-input"
149
+ label="Duration"
150
+ value="${this.selectedValue}"
151
+ @nile-input="${this.handleDurationChange}"
152
+ placeholder="Enter Value"
153
+ ></nile-input>
154
+
155
+ <nile-select class="manual-input time-input"
156
+ label="Unit of time"
157
+ style="margin-top:3px"
158
+ value="${this.selectedUnit}"
159
+ @nile-change="${this.handleUnitChange}"
160
+ >
161
+ <nile-option value="minutes" class="${this.hideDurationFields?.includes("minutes")?"hidden":""}">Minutes</nile-option>
162
+ <nile-option value="hours" class="${this.hideDurationFields?.includes("hours")?"hidden":""}"> Hours </nile-option>
163
+ <nile-option value="days" class="${this.hideDurationFields?.includes("days")?"hidden":""}">Days</nile-option>
164
+ <nile-option value="weeks" class="${this.hideDurationFields?.includes("weeks")?"hidden":""}">Weeks</nile-option>
165
+ <nile-option value="months" class="${this.hideDurationFields?.includes("months")?"hidden":""}"> Months </nile-option>
166
+ </nile-select>
185
167
  </div>
186
- `}};t([e("nile-dropdown")],r.prototype,"dropdown",void 0),t([d({type:Boolean,reflect:!0})],r.prototype,"dropDownOpened",void 0),t([d({type:Object})],r.prototype,"value",void 0),t([d({type:Object,attribute:"allowed-dates"})],r.prototype,"allowedDates",void 0),t([d({type:Object})],r.prototype,"rangeValue",void 0),t([d({type:String,attribute:"value"})],r.prototype,"valueAttribute",void 0),t([d({type:String,attribute:"value"})],r.prototype,"formattedDate",void 0),t([d({type:Object})],r.prototype,"startDate",void 0),t([d({type:Object})],r.prototype,"endDate",void 0),t([d({type:Boolean})],r.prototype,"isSelectingStart",void 0),t([d({type:Boolean})],r.prototype,"range",void 0),t([d({type:String})],r.prototype,"type",void 0),t([d({type:String})],r.prototype,"selectedUnit",void 0),t([d({type:Number})],r.prototype,"selectedValue",void 0),t([d({type:String})],r.prototype,"selectedTimeZone",void 0),t([s()],r.prototype,"validAllowedDates",void 0),t([h("allowedDates")],r.prototype,"checkValidAllowedDate",null),t([s()],r.prototype,"hideInput",void 0),t([d({type:Array,attribute:"hide-duration-fields"})],r.prototype,"hideDurationFields",void 0),t([d({type:Boolean,attribute:"hide-time-zone"})],r.prototype,"hideTimeZone",void 0),t([d({type:Boolean,attribute:"show-manual-inputs",reflect:!0})],r.prototype,"showManualInputs",void 0),t([h("value")],r.prototype,"valueChanged",null),r=t([n("nile-calendar")],r);export{r as N};
168
+ </div>
169
+ `:""}
170
+ `}};t([s("nile-dropdown")],u.prototype,"dropdown",void 0),t([o({type:Boolean,reflect:!0})],u.prototype,"dropDownOpened",void 0),t([o({type:Object})],u.prototype,"value",void 0),t([o({type:Object,attribute:"allowed-dates"})],u.prototype,"allowedDates",void 0),t([o({type:Object})],u.prototype,"rangeValue",void 0),t([o({type:String,attribute:"value"})],u.prototype,"valueAttribute",void 0),t([o({type:String,attribute:"value"})],u.prototype,"formattedDate",void 0),t([o({type:Object})],u.prototype,"startDate",void 0),t([o({type:Object})],u.prototype,"endDate",void 0),t([o({type:Boolean})],u.prototype,"isSelectingStart",void 0),t([o({type:Boolean})],u.prototype,"range",void 0),t([o({type:String})],u.prototype,"type",void 0),t([o({type:String})],u.prototype,"selectedUnit",void 0),t([o({type:Number})],u.prototype,"selectedValue",void 0),t([o({type:String})],u.prototype,"selectedTimeZone",void 0),t([n()],u.prototype,"validAllowedDates",void 0),t([r("allowedDates")],u.prototype,"checkValidAllowedDate",null),t([n()],u.prototype,"hideInput",void 0),t([o({type:Array,attribute:"hide-duration-fields"})],u.prototype,"hideDurationFields",void 0),t([o({type:Boolean,attribute:"hide-time-zone"})],u.prototype,"hideTimeZone",void 0),t([o({type:Boolean,attribute:"show-manual-inputs",reflect:!0})],u.prototype,"showManualInputs",void 0),t([r("value")],u.prototype,"valueChanged",null),u=t([a("nile-calendar")],u);export{u as N};
@@ -0,0 +1,2 @@
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-1a9fb5f1.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-card.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-card.css.cjs.js","lit/directives/class-map.js","../internal/slot.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,s,i,_templateObject,_templateObject2,_templateObject3;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(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){e=_fixture004CjsJs.f;s=_fixture004CjsJs.a;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileCardCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileCardCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalSlotCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("Nile Card",function(){it("should render the card properly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var a;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-card>\n <div style=\"display: flex;\">\n <img\n class=\"alert-prefix-img\"\n src=\"https://assets.aqueralabs.com/logos/aws.png\"\n />\n <nile-icon name=\"drag\" class=\"drag-icon\"> </nile-icon>\n </div>\n <div class=\"amazon-service\">\n Amazon web service Scalable Cloud Infrastructure\n </div>\n <div class=\"service-description\">Build, Deploy, and Manage Websites</div>\n <div slot=\"footer\" class=\"footer-link\">\n https://api.aquera.io/scim/5efdcsd\n </div>\n </nile-card>"]))));case 2:a=_context2.sent;s(a).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("should not render the card footer , if footer is not there",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var a;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-card>\n <div style=\"display: flex;\">\n <img\n class=\"alert-prefix-img\"\n src=\"https://assets.aqueralabs.com/logos/aws.png\"\n />\n <nile-icon name=\"drag\" class=\"drag-icon\"> </nile-icon>\n </div>\n <div class=\"amazon-service\">\n Amazon web service Scalable Cloud Infrastructure\n </div>\n <div class=\"service-description\">Build, Deploy, and Manage Websites</div>\n </nile-card>"]))));case 2:a=_context3.sent.shadowRoot.querySelector('div[part="footer"]');s(a).to["null"];case 4:case"end":return _context3.stop();}},_callee2);}))),it("should render the card header , if header is there",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral([" <nile-card>\n <div class=\"card-header\" slot=\"header\">\n <img\n class=\"alert-prefix-img\"\n src=\"https://assets.aqueralabs.com/logos/aws.png\"\n height=\"32\"\n width=\"32\"\n />\n <div class=\"card-header-text\">\n <span class=\"card-header-text-heading\">Title</span>\n <span class=\"card-header-text-subheading\">Support Text</span>\n </div>\n <nile-slide-toggle></nile-slide-toggle>\n <nile-icon name=\"dropdown\" class=\"drag-icon\" size=\"20\"> </nile-icon>\n </div>\n <div class=\"card-body\">You can use this space as description fo...</div>\n <div slot=\"footer\" class=\"footer-link\">\n <nile-avatar name=\"Aquera Labs\" isRounded></nile-avatar>\n <span class=\"right-side\">\n <nile-icon name=\"calendar\"></nile-icon>\n Hello\n </span>\n </div>\n </nile-card>"]))));case 2:a=_context4.sent.shadowRoot.querySelector('slot[name="header"]');s(a).to.exist;case 4:case"end":return _context4.stop();}},_callee3);})));});}};});
2
+ //# sourceMappingURL=nile-card.test.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-card.test.cjs.js","sources":["../../../src/nile-card/nile-card.test.ts"],"sourcesContent":["import { fixture, html, expect, oneEvent } from '@open-wc/testing';\nimport './nile-card';\nimport { NileCard } from './nile-card';\n\ndescribe('Nile Card', () => {\n it('should render the card properly', async () => {\n const el = await fixture<NileCard>(html`<nile-card>\n <div style=\"display: flex;\">\n <img\n class=\"alert-prefix-img\"\n src=\"https://assets.aqueralabs.com/logos/aws.png\"\n />\n <nile-icon name=\"drag\" class=\"drag-icon\"> </nile-icon>\n </div>\n <div class=\"amazon-service\">\n Amazon web service Scalable Cloud Infrastructure\n </div>\n <div class=\"service-description\">Build, Deploy, and Manage Websites</div>\n <div slot=\"footer\" class=\"footer-link\">\n https://api.aquera.io/scim/5efdcsd\n </div>\n </nile-card>`);\n expect(el).shadowDom.to.equalSnapshot();\n });\n\n it('should not render the card footer , if footer is not there', async () => {\n const el = await fixture<NileCard>(html`<nile-card>\n <div style=\"display: flex;\">\n <img\n class=\"alert-prefix-img\"\n src=\"https://assets.aqueralabs.com/logos/aws.png\"\n />\n <nile-icon name=\"drag\" class=\"drag-icon\"> </nile-icon>\n </div>\n <div class=\"amazon-service\">\n Amazon web service Scalable Cloud Infrastructure\n </div>\n <div class=\"service-description\">Build, Deploy, and Manage Websites</div>\n </nile-card>`);\n\n const footerDiv = el.shadowRoot!.querySelector('div[part=\"footer\"]');\n expect(footerDiv).to.null;\n });\n\n it('should render the card header , if header is there', async () => {\n const el = await fixture<NileCard>(html` <nile-card>\n <div class=\"card-header\" slot=\"header\">\n <img\n class=\"alert-prefix-img\"\n src=\"https://assets.aqueralabs.com/logos/aws.png\"\n height=\"32\"\n width=\"32\"\n />\n <div class=\"card-header-text\">\n <span class=\"card-header-text-heading\">Title</span>\n <span class=\"card-header-text-subheading\">Support Text</span>\n </div>\n <nile-slide-toggle></nile-slide-toggle>\n <nile-icon name=\"dropdown\" class=\"drag-icon\" size=\"20\"> </nile-icon>\n </div>\n <div class=\"card-body\">You can use this space as description fo...</div>\n <div slot=\"footer\" class=\"footer-link\">\n <nile-avatar name=\"Aquera Labs\" isRounded></nile-avatar>\n <span class=\"right-side\">\n <nile-icon name=\"calendar\"></nile-icon>\n Hello\n </span>\n </div>\n </nile-card>`);\n\n const headerDiv = el.shadowRoot!.querySelector('slot[name=\"header\"]');\n expect(headerDiv).to.exist;\n });\n});\n"],"names":["describe","it","_asyncToGenerator","_regeneratorRuntime","mark","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","shadowDom","to","equalSnapshot","_context2","stop","_callee","_templateObject2","shadowRoot","footerDiv","querySelector","null","_context3","_callee2","_templateObject3","headerDiv","exist","_context4","_callee3"],"mappings":"mhTAIAA,QAAAA,CAAS,WAAa,CAAA,UAAA,CACpBC,EAAG,CAAA,iCAAA,cAAAC,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,CAAmCC,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACnBC,CAAAA,CAAAA,CAAkBC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,mlBAAjCC,CAAWJ,CAAAA,SAAAA,CAAAA,IAAAA,CAgBjBK,CAAOD,CAAAA,CAAAA,CAAAA,CAAIE,SAAUC,CAAAA,EAAAA,CAAGC,aAAe,CAAA,CAAA,yBAAAC,SAAA,CAAAC,IAAA,MAAAC,OAAA,GAAA,EAAA,CAAA,CAGzChB,EAAG,CAAA,6DAAA,cAAAC,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,CAA+DC,SAAAA,SAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SAC/CC,CAAAA,CAAAA,CAAkBC,CAAI,CAAAW,gBAAA,GAAAA,gBAAA,CAAAT,sBAAA,6dAclBU,CAAAA,QAAfC,CAdWd,CAAAA,SAAAA,CAAAA,IAAAA,CAcIa,UAAAA,CAAYE,aAAc,CAAA,oBAAA,EAC/CV,CAAOS,CAAAA,CAAAA,CAAAA,CAAWP,EAAGS,QAAI,yBAAAC,SAAA,CAAAP,IAAA,MAAAQ,QAAA,GAG3BvB,EAAAA,CAAAA,CAAAA,EAAAA,CAAG,sDAAwDI,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,SAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACxCC,CAAAA,EAAkBC,CAAI,CAAAkB,gBAAA,GAAAA,gBAAA,CAAAhB,sBAAA,q7BAyBlBU,CAAAA,QAAfO,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,CAAeP,UAAAA,CAAYE,cAAc,qBAC/CV,EAAAA,CAAAA,CAAOe,CAAWb,CAAAA,CAAAA,EAAAA,CAAGc,KAAK,yBAAAC,SAAA,CAAAZ,IAAA,MAAAa,QAAA,GAC1B,EAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -0,0 +1,51 @@
1
+ import{f as e,a as s}from"../fixture-81e5a936.esm.js";import{html as i}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-card.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"./nile-card.css.esm.js";import"lit/directives/class-map.js";import"../internal/slot.esm.js";import"../internal/nile-element.esm.js";describe("Nile Card",(()=>{it("should render the card properly",(async()=>{const a=await e(i`<nile-card>
2
+ <div style="display: flex;">
3
+ <img
4
+ class="alert-prefix-img"
5
+ src="https://assets.aqueralabs.com/logos/aws.png"
6
+ />
7
+ <nile-icon name="drag" class="drag-icon"> </nile-icon>
8
+ </div>
9
+ <div class="amazon-service">
10
+ Amazon web service Scalable Cloud Infrastructure
11
+ </div>
12
+ <div class="service-description">Build, Deploy, and Manage Websites</div>
13
+ <div slot="footer" class="footer-link">
14
+ https://api.aquera.io/scim/5efdcsd
15
+ </div>
16
+ </nile-card>`);s(a).shadowDom.to.equalSnapshot()})),it("should not render the card footer , if footer is not there",(async()=>{const a=(await e(i`<nile-card>
17
+ <div style="display: flex;">
18
+ <img
19
+ class="alert-prefix-img"
20
+ src="https://assets.aqueralabs.com/logos/aws.png"
21
+ />
22
+ <nile-icon name="drag" class="drag-icon"> </nile-icon>
23
+ </div>
24
+ <div class="amazon-service">
25
+ Amazon web service Scalable Cloud Infrastructure
26
+ </div>
27
+ <div class="service-description">Build, Deploy, and Manage Websites</div>
28
+ </nile-card>`)).shadowRoot.querySelector('div[part="footer"]');s(a).to.null})),it("should render the card header , if header is there",(async()=>{const a=(await e(i` <nile-card>
29
+ <div class="card-header" slot="header">
30
+ <img
31
+ class="alert-prefix-img"
32
+ src="https://assets.aqueralabs.com/logos/aws.png"
33
+ height="32"
34
+ width="32"
35
+ />
36
+ <div class="card-header-text">
37
+ <span class="card-header-text-heading">Title</span>
38
+ <span class="card-header-text-subheading">Support Text</span>
39
+ </div>
40
+ <nile-slide-toggle></nile-slide-toggle>
41
+ <nile-icon name="dropdown" class="drag-icon" size="20"> </nile-icon>
42
+ </div>
43
+ <div class="card-body">You can use this space as description fo...</div>
44
+ <div slot="footer" class="footer-link">
45
+ <nile-avatar name="Aquera Labs" isRounded></nile-avatar>
46
+ <span class="right-side">
47
+ <nile-icon name="calendar"></nile-icon>
48
+ Hello
49
+ </span>
50
+ </div>
51
+ </nile-card>`)).shadowRoot.querySelector('slot[name="header"]');s(a).to.exist}))}));
@@ -1,2 +1,2 @@
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-b1476eef.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-checkbox.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-checkbox.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js"],function(_export,_context){"use strict";var e,t,i,c,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15;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(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){e=_fixture004CjsJs.f;t=_fixture004CjsJs.a;i=_fixture004CjsJs.o;},function(_litStaticHtmlJs){c=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileCheckboxCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileCheckboxCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalDefaultValueCjsJs){},function(_litDirectivesIfDefinedJs){},function(_litDirectivesLiveJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_property002CjsJs){}],execute:function execute(){describe("NileCheckbox",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(c(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context2.sent;t(i).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("toggles checked state on click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i,s;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(c(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context3.sent;s=i.shadowRoot.querySelector('input[type="checkbox"]');s.click(),t(i.checked).to.be["true"],s.click(),t(i.checked).to.be["false"];case 5:case"end":return _context3.stop();}},_callee2);}))),it("emits nile-change event on click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var s,o,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(c(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context4.sent;o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout(function(){return o.click();});_context4.next=7;return i(s,"valueChange");case 7:n=_context4.sent;t(n.detail.checked).to.be["true"];case 9:case"end":return _context4.stop();}},_callee3);}))),it("handles focus and blur events",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var s,o,n,a;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(c(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context5.sent;o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout(function(){return o.focus();});_context5.next=7;return i(s,"focus");case 7:n=_context5.sent;t(n).to.exist,setTimeout(function(){return o.blur();});_context5.next=11;return i(s,"blur");case 11:a=_context5.sent;t(a).to.exist;case 13:case"end":return _context5.stop();}},_callee4);}))),it("handles indeterminate state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var i,s;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(c(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-checkbox indeterminate></nile-checkbox>"]))));case 2:i=_context6.sent;s=i.shadowRoot.querySelector('input[type="checkbox"]');t(s.indeterminate).to.be["true"];i.checked=!0;i.indeterminate=!1;_context6.next=9;return i.updateComplete;case 9:t(s.indeterminate).to.be["false"];t(s.checked).to.be["true"];case 11:case"end":return _context6.stop();}},_callee5);}))),it("reflects properties to attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var i;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(c(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-checkbox\n name=\"test-name\"\n title=\"test-title\"\n disabled\n required\n label=\"test-label\"\n sub-label=\"test-sublabel\"\n help-text=\"test-help\"\n error-message=\"test-error\"\n ></nile-checkbox>\n "]))));case 2:i=_context7.sent;t(i.getAttribute("name")).to.equal("test-name"),t(i.getAttribute("title")).to.equal("test-title"),t(i.getAttribute("disabled")).to.equal(""),t(i.getAttribute("required")).to.equal(""),t(i.getAttribute("label")).to.equal("test-label"),t(i.getAttribute("sub-label")).to.equal("test-sublabel"),t(i.getAttribute("help-text")).to.equal("test-help"),t(i.getAttribute("error-message")).to.equal("test-error");case 4:case"end":return _context7.stop();}},_callee6);}))),it("displays help text when showHelpText is true",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var i,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(c(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-checkbox help-text=\"test-help\"></nile-checkbox>"]))));case 2:i=_context8.sent;i.showHelpText=!0;_context8.next=6;return i.updateComplete;case 6:s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.exist;case 8:case"end":return _context8.stop();}},_callee7);}))),it("updates host class based on helpText",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var i;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(c(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context9.sent;i.helpText="test-help";_context9.next=6;return i.updateComplete;case 6:t(i.classList.contains("full-width")).to.be["true"];i.helpText="";_context9.next=10;return i.updateComplete;case 10:t(i.classList.contains("full-width")).to.be["false"];case 11:case"end":return _context9.stop();}},_callee8);}))),it("emits custom events on connected and disconnected",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var e,c,s,o,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:e=document.createElement("nile-checkbox"),c=i(e,"nile-init");document.body.appendChild(e);_context10.next=4;return c;case 4:s=_context10.sent;t(s).to.exist;o=i(e,"nile-destroy");document.body.removeChild(e);_context10.next=10;return o;case 10:n=_context10.sent;t(n).to.exist;case 12:case"end":return _context10.stop();}},_callee9);}))),it("handles required attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var i;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return e(c(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-checkbox required></nile-checkbox>"]))));case 2:i=_context11.sent.shadowRoot.querySelector('input[type="checkbox"]');t(i.required).to.be["true"];case 4:case"end":return _context11.stop();}},_callee10);}))),it("simulates click using click method",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var i;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return e(c(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context12.sent;i.click(),t(i.checked).to.be["true"];case 4:case"end":return _context12.stop();}},_callee11);}))),it("sets and removes focus using focus and blur methods",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var s,o,n;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return e(c(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context13.sent;setTimeout(function(){return s.focus();});_context13.next=6;return i(s,"focus");case 6:o=_context13.sent;t(o).to.exist,setTimeout(function(){return s.blur();});_context13.next=10;return i(s,"blur");case 10:n=_context13.sent;t(n).to.exist;case 12:case"end":return _context13.stop();}},_callee12);}))),it("reflects checked attribute to property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var i;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return e(c(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["<nile-checkbox checked></nile-checkbox>"]))));case 2:i=_context14.sent;t(i.checked).to.be["true"];case 4:case"end":return _context14.stop();}},_callee13);}))),it("reflects indeterminate attribute to property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var i;return _regeneratorRuntime().wrap(function _callee14$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:_context15.next=2;return e(c(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["<nile-checkbox indeterminate></nile-checkbox>"]))));case 2:i=_context15.sent;t(i.indeterminate).to.be["true"];case 4:case"end":return _context15.stop();}},_callee14);}))),it("associates form using form attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15(){var i;return _regeneratorRuntime().wrap(function _callee15$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:_context16.next=2;return e(c(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <div>\n <form id=\"test-form\"></form>\n <nile-checkbox form=\"test-form\"></nile-checkbox>\n </div>\n "]))));case 2:i=_context16.sent.querySelector("nile-checkbox");t(i).to.not.be["null"],t(i.getAttribute("form")).to.equal("test-form");case 4:case"end":return _context16.stop();}},_callee15);}))),it("displays and hides help text correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(){var i,s;return _regeneratorRuntime().wrap(function _callee16$(_context17){while(1)switch(_context17.prev=_context17.next){case 0:_context17.next=2;return e(c(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["<nile-checkbox help-text=\"test-help\"></nile-checkbox>"]))));case 2:i=_context17.sent;t(i.showHelpText).to.be["false"];i.showHelpText=!0;_context17.next=7;return i.updateComplete;case 7:s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.exist;i.showHelpText=!1;_context17.next=12;return i.updateComplete;case 12:s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.be.exist;case 14:case"end":return _context17.stop();}},_callee16);})));});}};});
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-1a9fb5f1.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-checkbox.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-checkbox.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js"],function(_export,_context){"use strict";var e,t,i,c,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15;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(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){e=_fixture004CjsJs.f;t=_fixture004CjsJs.a;i=_fixture004CjsJs.o;},function(_litStaticHtmlJs){c=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileCheckboxCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileCheckboxCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalDefaultValueCjsJs){},function(_litDirectivesIfDefinedJs){},function(_litDirectivesLiveJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_property002CjsJs){}],execute:function execute(){describe("NileCheckbox",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(c(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context2.sent;t(i).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("toggles checked state on click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i,s;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(c(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context3.sent;s=i.shadowRoot.querySelector('input[type="checkbox"]');s.click(),t(i.checked).to.be["true"],s.click(),t(i.checked).to.be["false"];case 5:case"end":return _context3.stop();}},_callee2);}))),it("emits nile-change event on click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var s,o,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(c(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context4.sent;o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout(function(){return o.click();});_context4.next=7;return i(s,"valueChange");case 7:n=_context4.sent;t(n.detail.checked).to.be["true"];case 9:case"end":return _context4.stop();}},_callee3);}))),it("handles focus and blur events",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var s,o,n,a;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(c(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context5.sent;o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout(function(){return o.focus();});_context5.next=7;return i(s,"focus");case 7:n=_context5.sent;t(n).to.exist,setTimeout(function(){return o.blur();});_context5.next=11;return i(s,"blur");case 11:a=_context5.sent;t(a).to.exist;case 13:case"end":return _context5.stop();}},_callee4);}))),it("handles indeterminate state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var i,s;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(c(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-checkbox indeterminate></nile-checkbox>"]))));case 2:i=_context6.sent;s=i.shadowRoot.querySelector('input[type="checkbox"]');t(s.indeterminate).to.be["true"];i.checked=!0;i.indeterminate=!1;_context6.next=9;return i.updateComplete;case 9:t(s.indeterminate).to.be["false"];t(s.checked).to.be["true"];case 11:case"end":return _context6.stop();}},_callee5);}))),it("reflects properties to attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var i;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(c(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-checkbox\n name=\"test-name\"\n title=\"test-title\"\n disabled\n required\n label=\"test-label\"\n sub-label=\"test-sublabel\"\n help-text=\"test-help\"\n error-message=\"test-error\"\n ></nile-checkbox>\n "]))));case 2:i=_context7.sent;t(i.getAttribute("name")).to.equal("test-name"),t(i.getAttribute("title")).to.equal("test-title"),t(i.getAttribute("disabled")).to.equal(""),t(i.getAttribute("required")).to.equal(""),t(i.getAttribute("label")).to.equal("test-label"),t(i.getAttribute("sub-label")).to.equal("test-sublabel"),t(i.getAttribute("help-text")).to.equal("test-help"),t(i.getAttribute("error-message")).to.equal("test-error");case 4:case"end":return _context7.stop();}},_callee6);}))),it("displays help text when showHelpText is true",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var i,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(c(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-checkbox help-text=\"test-help\"></nile-checkbox>"]))));case 2:i=_context8.sent;i.showHelpText=!0;_context8.next=6;return i.updateComplete;case 6:s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.exist;case 8:case"end":return _context8.stop();}},_callee7);}))),it("updates host class based on helpText",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var i;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(c(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context9.sent;i.helpText="test-help";_context9.next=6;return i.updateComplete;case 6:t(i.classList.contains("full-width")).to.be["true"];i.helpText="";_context9.next=10;return i.updateComplete;case 10:t(i.classList.contains("full-width")).to.be["false"];case 11:case"end":return _context9.stop();}},_callee8);}))),it("emits custom events on connected and disconnected",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var e,c,s,o,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:e=document.createElement("nile-checkbox"),c=i(e,"nile-init");document.body.appendChild(e);_context10.next=4;return c;case 4:s=_context10.sent;t(s).to.exist;o=i(e,"nile-destroy");document.body.removeChild(e);_context10.next=10;return o;case 10:n=_context10.sent;t(n).to.exist;case 12:case"end":return _context10.stop();}},_callee9);}))),it("handles required attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var i;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return e(c(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-checkbox required></nile-checkbox>"]))));case 2:i=_context11.sent.shadowRoot.querySelector('input[type="checkbox"]');t(i.required).to.be["true"];case 4:case"end":return _context11.stop();}},_callee10);}))),it("simulates click using click method",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var i;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return e(c(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context12.sent;i.click(),t(i.checked).to.be["true"];case 4:case"end":return _context12.stop();}},_callee11);}))),it("sets and removes focus using focus and blur methods",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var s,o,n;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return e(c(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context13.sent;setTimeout(function(){return s.focus();});_context13.next=6;return i(s,"focus");case 6:o=_context13.sent;t(o).to.exist,setTimeout(function(){return s.blur();});_context13.next=10;return i(s,"blur");case 10:n=_context13.sent;t(n).to.exist;case 12:case"end":return _context13.stop();}},_callee12);}))),it("reflects checked attribute to property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var i;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return e(c(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["<nile-checkbox checked></nile-checkbox>"]))));case 2:i=_context14.sent;t(i.checked).to.be["true"];case 4:case"end":return _context14.stop();}},_callee13);}))),it("reflects indeterminate attribute to property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var i;return _regeneratorRuntime().wrap(function _callee14$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:_context15.next=2;return e(c(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["<nile-checkbox indeterminate></nile-checkbox>"]))));case 2:i=_context15.sent;t(i.indeterminate).to.be["true"];case 4:case"end":return _context15.stop();}},_callee14);}))),it("associates form using form attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15(){var i;return _regeneratorRuntime().wrap(function _callee15$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:_context16.next=2;return e(c(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <div>\n <form id=\"test-form\"></form>\n <nile-checkbox form=\"test-form\"></nile-checkbox>\n </div>\n "]))));case 2:i=_context16.sent.querySelector("nile-checkbox");t(i).to.not.be["null"],t(i.getAttribute("form")).to.equal("test-form");case 4:case"end":return _context16.stop();}},_callee15);}))),it("displays and hides help text correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(){var i,s;return _regeneratorRuntime().wrap(function _callee16$(_context17){while(1)switch(_context17.prev=_context17.next){case 0:_context17.next=2;return e(c(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["<nile-checkbox help-text=\"test-help\"></nile-checkbox>"]))));case 2:i=_context17.sent;t(i.showHelpText).to.be["false"];i.showHelpText=!0;_context17.next=7;return i.updateComplete;case 7:s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.exist;i.showHelpText=!1;_context17.next=12;return i.updateComplete;case 12:s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.be.exist;case 14:case"end":return _context17.stop();}},_callee16);})));});}};});
2
2
  //# sourceMappingURL=nile-checkbox.test.cjs.js.map
@@ -1,4 +1,4 @@
1
- import{f as e,a as t,o as i}from"../fixture-6f853cbd.esm.js";import{html as c}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-checkbox.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"./nile-checkbox.css.esm.js";import"lit/directives/class-map.js";import"../internal/default-value.esm.js";import"lit/directives/if-defined.js";import"lit/directives/live.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";import"../property-09139d3c.esm.js";describe("NileCheckbox",(()=>{it("renders correctly with default properties",(async()=>{const i=await e(c`<nile-checkbox></nile-checkbox>`);t(i).shadowDom.to.equalSnapshot()})),it("toggles checked state on click",(async()=>{const i=await e(c`<nile-checkbox></nile-checkbox>`),s=i.shadowRoot.querySelector('input[type="checkbox"]');s.click(),t(i.checked).to.be.true,s.click(),t(i.checked).to.be.false})),it("emits nile-change event on click",(async()=>{const s=await e(c`<nile-checkbox></nile-checkbox>`),o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout((()=>o.click()));const n=await i(s,"valueChange");t(n.detail.checked).to.be.true})),it("handles focus and blur events",(async()=>{const s=await e(c`<nile-checkbox></nile-checkbox>`),o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout((()=>o.focus()));const n=await i(s,"focus");t(n).to.exist,setTimeout((()=>o.blur()));const a=await i(s,"blur");t(a).to.exist})),it("handles indeterminate state",(async()=>{const i=await e(c`<nile-checkbox indeterminate></nile-checkbox>`),s=i.shadowRoot.querySelector('input[type="checkbox"]');t(s.indeterminate).to.be.true,i.checked=!0,i.indeterminate=!1,await i.updateComplete,t(s.indeterminate).to.be.false,t(s.checked).to.be.true})),it("reflects properties to attributes",(async()=>{const i=await e(c`
1
+ import{f as e,a as t,o as i}from"../fixture-81e5a936.esm.js";import{html as c}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-checkbox.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"./nile-checkbox.css.esm.js";import"lit/directives/class-map.js";import"../internal/default-value.esm.js";import"lit/directives/if-defined.js";import"lit/directives/live.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";import"../property-09139d3c.esm.js";describe("NileCheckbox",(()=>{it("renders correctly with default properties",(async()=>{const i=await e(c`<nile-checkbox></nile-checkbox>`);t(i).shadowDom.to.equalSnapshot()})),it("toggles checked state on click",(async()=>{const i=await e(c`<nile-checkbox></nile-checkbox>`),s=i.shadowRoot.querySelector('input[type="checkbox"]');s.click(),t(i.checked).to.be.true,s.click(),t(i.checked).to.be.false})),it("emits nile-change event on click",(async()=>{const s=await e(c`<nile-checkbox></nile-checkbox>`),o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout((()=>o.click()));const n=await i(s,"valueChange");t(n.detail.checked).to.be.true})),it("handles focus and blur events",(async()=>{const s=await e(c`<nile-checkbox></nile-checkbox>`),o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout((()=>o.focus()));const n=await i(s,"focus");t(n).to.exist,setTimeout((()=>o.blur()));const a=await i(s,"blur");t(a).to.exist})),it("handles indeterminate state",(async()=>{const i=await e(c`<nile-checkbox indeterminate></nile-checkbox>`),s=i.shadowRoot.querySelector('input[type="checkbox"]');t(s.indeterminate).to.be.true,i.checked=!0,i.indeterminate=!1,await i.updateComplete,t(s.indeterminate).to.be.false,t(s.checked).to.be.true})),it("reflects properties to attributes",(async()=>{const i=await e(c`
2
2
  <nile-checkbox
3
3
  name="test-name"
4
4
  title="test-title"